| @@ -133,6 +133,10 @@ let config = { | |||||
| * 预约详情 | * 预约详情 | ||||
| */ | */ | ||||
| appointDetail: "/api/wxCouponOrderReservation/detail", | appointDetail: "/api/wxCouponOrderReservation/detail", | ||||
| /** | |||||
| * 核销 | |||||
| */ | |||||
| verify: "/api/wxCouponOrderReservation/verify", | |||||
| /** | /** | ||||
| * 预约确认 | * 预约确认 | ||||
| */ | */ | ||||
| @@ -12,7 +12,8 @@ Page({ | |||||
| endTime: "结束时间", | endTime: "结束时间", | ||||
| pageNum: 1, | pageNum: 1, | ||||
| status: 0, | status: 0, | ||||
| list: [] | |||||
| list: [], | |||||
| Phone: '', | |||||
| }, | }, | ||||
| onLoad(options) { | onLoad(options) { | ||||
| @@ -23,6 +24,7 @@ Page({ | |||||
| const that = this | const that = this | ||||
| const data = { | const data = { | ||||
| pageNum: this.data.pageNum, | pageNum: this.data.pageNum, | ||||
| userPhone: this.data.Phone, | |||||
| pageSize: 200, | pageSize: 200, | ||||
| } | } | ||||
| @@ -115,7 +117,81 @@ Page({ | |||||
| url: `/pages/appointDetail/appointDetail?id=${id}`, | url: `/pages/appointDetail/appointDetail?id=${id}`, | ||||
| }); | }); | ||||
| }, | }, | ||||
| // 核销 | |||||
| goVerification(e) { | |||||
| let _this = this | |||||
| // console.log(id, shop); | |||||
| console.log(e); | |||||
| // const id = BigInt(e.currentTarget.dataset.id) | |||||
| const id = e.currentTarget.dataset.id | |||||
| console.log(typeof (id)); | |||||
| console.log(id); | |||||
| const shop = e.currentTarget.dataset.shop | |||||
| const data = { | |||||
| id | |||||
| } | |||||
| tt.showModal({ | |||||
| title: "提示", | |||||
| content: `当前正在核销【${shop}】的预约订单,请确认是否核销?`, | |||||
| showCancel: true, | |||||
| confirmText: "确认核销", | |||||
| confirmColor: "#52a0fd", | |||||
| cancelText: "返回", | |||||
| success(res) { | |||||
| if (res.confirm) { | |||||
| HttpBasics.post({ | |||||
| url: config.api.verify, | |||||
| data | |||||
| }).then(res => { | |||||
| console.log(res, 'res'); | |||||
| _this.getList() | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/success.png', | |||||
| title: '核销成功', | |||||
| }) | |||||
| }).catch(err => { | |||||
| console.log(err, 'err'); | |||||
| tt.showToast({ | |||||
| image: './../../assets/images/fail.png', | |||||
| title: '核销失败', | |||||
| }) | |||||
| }) | |||||
| } | |||||
| if (res.cancel) { | |||||
| return | |||||
| } | |||||
| } | |||||
| }); | |||||
| }, | |||||
| // 解决数字丢失精度 | |||||
| parseBigNumber(numberStr) { | |||||
| let result = ''; | |||||
| let carry = 0; | |||||
| for (let i = numberStr.length - 1; i >= 0; i--) { | |||||
| const digit = Number(numberStr[i]); | |||||
| const sum = digit + carry; | |||||
| if (sum >= 10) { | |||||
| result = (sum - 10).toString() + result; | |||||
| carry = 1; | |||||
| } else { | |||||
| result = sum.toString() + result; | |||||
| carry = 0; | |||||
| } | |||||
| } | |||||
| if (carry === 1) { | |||||
| result = '1' + result; | |||||
| } | |||||
| return result; | |||||
| }, | |||||
| handleInput(e) { | |||||
| // console.log(e.detail.value); | |||||
| this.data.Phone = e.detail.value | |||||
| }, | |||||
| onShow() { | onShow() { | ||||
| this.getList() | this.getList() | ||||
| } | } | ||||
| @@ -1,4 +1,11 @@ | |||||
| <view> | <view> | ||||
| <view class="input"> | |||||
| <input type="number" placeholder="手机号查询" bindinput="handleInput" value="{{Phone}}" /> | |||||
| <button type="default" size="default" bindtap="getList"> | |||||
| 搜索 | |||||
| </button> | |||||
| </view> | |||||
| <view class="nav"> | <view class="nav"> | ||||
| <view class="{{ currentID == 1 ? 'currentItem' : 'item' }}" bindtap="setNav" data-id="1"> | <view class="{{ currentID == 1 ? 'currentItem' : 'item' }}" bindtap="setNav" data-id="1"> | ||||
| <text>类型</text> | <text>类型</text> | ||||
| @@ -39,12 +46,16 @@ | |||||
| </view> | </view> | ||||
| <view class="body"> | <view class="body"> | ||||
| <view class="items">商品名称:{{ item.couponTitle }}</view> | <view class="items">商品名称:{{ item.couponTitle }}</view> | ||||
| <view class="items">店铺名称:{{ item.reservationMerchantName }}</view> | |||||
| <view class="items">用户手机号码:{{ item.userPhone }}</view> | <view class="items">用户手机号码:{{ item.userPhone }}</view> | ||||
| <view class="items">服务预约时间:<text tt:if="{{ item.appointTime == '暂无' }}">暂无</text></view> | <view class="items">服务预约时间:<text tt:if="{{ item.appointTime == '暂无' }}">暂无</text></view> | ||||
| <view tt:if="{{ item.appointTime != '暂无' }}" class="items">{{ item.appointTime }}</view> | <view tt:if="{{ item.appointTime != '暂无' }}" class="items">{{ item.appointTime }}</view> | ||||
| </view> | </view> | ||||
| <view class="footer"> | <view class="footer"> | ||||
| <button type="primary" bindtap="goDetail" data-id="{{ item.id }}">详情</button> | <button type="primary" bindtap="goDetail" data-id="{{ item.id }}">详情</button> | ||||
| <button tt:if="{{item.status==-1||item.status==0||item.status==5||item.status==7}}" type="primary" | |||||
| bindtap="goVerification" data-id="{{ item.id }}" | |||||
| data-shop="{{ item.reservationMerchantName }}">核销</button> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view tt:if="{{ list.length == 0 }}" class="itemXX"> | <view tt:if="{{ list.length == 0 }}" class="itemXX"> | ||||
| @@ -1,10 +1,32 @@ | |||||
| .nav { | .nav { | ||||
| display: flex; | display: flex; | ||||
| flex-wrap: wrap; | |||||
| justify-content: space-between; | justify-content: space-between; | ||||
| padding: 20rpx 150rpx; | padding: 20rpx 150rpx; | ||||
| background-color: #f7f7f7; | background-color: #f7f7f7; | ||||
| } | } | ||||
| .input { | |||||
| /* width: 100%; */ | |||||
| display: flex; | |||||
| justify-content: space-between; | |||||
| padding: 10rpx; | |||||
| height: 100rpx; | |||||
| } | |||||
| .input input { | |||||
| width: 70%; | |||||
| height: 60rpx; | |||||
| border: #52a0fd 1rpx solid; | |||||
| border-radius: 5rpx; | |||||
| padding: 20rpx; | |||||
| } | |||||
| .input button { | |||||
| width: 25%; | |||||
| height: 100rpx; | |||||
| } | |||||
| .nav .item image { | .nav .item image { | ||||
| position: relative; | position: relative; | ||||
| bottom: 5rpx; | bottom: 5rpx; | ||||
| @@ -149,10 +171,12 @@ | |||||
| .list .item .footer { | .list .item .footer { | ||||
| display: flex; | |||||
| margin: 25rpx 0; | margin: 25rpx 0; | ||||
| padding: 0 170rpx; | padding: 0 170rpx; | ||||
| } | } | ||||
| .list .item .footer button { | .list .item .footer button { | ||||
| background-color: #52a0fd; | background-color: #52a0fd; | ||||
| } | } | ||||
| @@ -30,6 +30,7 @@ Page({ | |||||
| }, | }, | ||||
| getDetail(id) { | getDetail(id) { | ||||
| const that = this | const that = this | ||||
| const data = { | const data = { | ||||
| id | id | ||||
| @@ -40,6 +41,7 @@ Page({ | |||||
| }) | }) | ||||
| .then(res => { | .then(res => { | ||||
| console.log(res, 'res'); | console.log(res, 'res'); | ||||
| console.log(typeof (data.id)); | |||||
| const appointStart = util.timestampToTime(res.data.startDate, 'YYYY-MM-DD hh:mm:ss') | const appointStart = util.timestampToTime(res.data.startDate, 'YYYY-MM-DD hh:mm:ss') | ||||
| const appointEnd = util.timestampToTime(res.data.endDate, 'hh:mm:ss') | const appointEnd = util.timestampToTime(res.data.endDate, 'hh:mm:ss') | ||||
| @@ -247,6 +249,7 @@ Page({ | |||||
| duration: 2000 | duration: 2000 | ||||
| }); | }); | ||||
| that.getDetail(that.data.id) | that.getDetail(that.data.id) | ||||
| }).catch(err => { | }).catch(err => { | ||||
| console.log(err, 'err'); | console.log(err, 'err'); | ||||
| tt.showToast({ | tt.showToast({ | ||||
| @@ -3,6 +3,7 @@ | |||||
| <view class="card"> | <view class="card"> | ||||
| <view class="item">券码:{{ detail.couponOrderId }}</view> | <view class="item">券码:{{ detail.couponOrderId }}</view> | ||||
| <view class="item">商品名称:{{ detail.couponTitle }}</view> | <view class="item">商品名称:{{ detail.couponTitle }}</view> | ||||
| <view class="item">店铺名称:{{ detail.reservationMerchantName }}</view> | |||||
| <view class="item">服务预约时间:{{ detail.appointTime }}<span | <view class="item">服务预约时间:{{ detail.appointTime }}<span | ||||
| tt:if="{{ detail.status == 0 || detail.status == 5 || detail.status == '-1' }}" class="edit" | tt:if="{{ detail.status == 0 || detail.status == 5 || detail.status == '-1' }}" class="edit" | ||||
| bindtap="setDate">修改</span></view> | bindtap="setDate">修改</span></view> | ||||
| @@ -3,6 +3,7 @@ const Http = require('../../utils/http.js') | |||||
| const HttpBasics = require('../../utils/HttpBasics.js') | const HttpBasics = require('../../utils/HttpBasics.js') | ||||
| const util = require('../../utils/util') | const util = require('../../utils/util') | ||||
| const changeNum = require('../../utils/changeNum.js') | const changeNum = require('../../utils/changeNum.js') | ||||
| import * as echarts from '../../ec-canvas/echarts'; | import * as echarts from '../../ec-canvas/echarts'; | ||||
| var app = getApp() | var app = getApp() | ||||
| @@ -241,6 +242,11 @@ Page({ | |||||
| ec: { | ec: { | ||||
| lazyLoad: true | lazyLoad: true | ||||
| }, | }, | ||||
| classIfyList2: [{ | |||||
| text: '服务预约', | |||||
| icon: 'iconfont icon-lingquanzhongxin', | |||||
| id: 9 | |||||
| }], | |||||
| classIfyList: [ | classIfyList: [ | ||||
| // { | // { | ||||
| // text: '收银台', | // text: '收银台', | ||||
| @@ -320,6 +326,7 @@ Page({ | |||||
| getUserInfo() { | getUserInfo() { | ||||
| return new Promise((resolve, reject) => { | return new Promise((resolve, reject) => { | ||||
| Http.getRequest(config.api.userDetail, app.globalData.token, '', {}, (res) => { | Http.getRequest(config.api.userDetail, app.globalData.token, '', {}, (res) => { | ||||
| app.globalData.isAdmin = res.data.is_admin; | |||||
| resolve(res.data); | resolve(res.data); | ||||
| }) | }) | ||||
| }) | }) | ||||
| @@ -394,6 +401,7 @@ Page({ | |||||
| userInfoLoadIf: true | userInfoLoadIf: true | ||||
| }) | }) | ||||
| app.globalData.merchant = res; | app.globalData.merchant = res; | ||||
| tt.setNavigationBarTitle({ | tt.setNavigationBarTitle({ | ||||
| title: res.mall_name + "(" + res.merchant_name + ")" | title: res.mall_name + "(" + res.merchant_name + ")" | ||||
| }) | }) | ||||
| @@ -1,8 +1,8 @@ | |||||
| <view class='firstPage'> | <view class='firstPage'> | ||||
| <view class='fix'> | |||||
| <image src='../../assets/images/bannerbg.png'></image> | |||||
| <view class='writeOff writeOff1'> | |||||
| <!-- <view class='topBox clearfix' tt:if="{{djArr.length>0||count > 0}}" > | |||||
| <view class='fix'> | |||||
| <image src='../../assets/images/bannerbg.png'></image> | |||||
| <view class='writeOff writeOff1'> | |||||
| <!-- <view class='topBox clearfix' tt:if="{{djArr.length>0||count > 0}}" > | |||||
| <view class='left fl' > | <view class='left fl' > | ||||
| <text>待缴账单</text> | <text>待缴账单</text> | ||||
| <text>{{djArr.length}}</text> | <text>{{djArr.length}}</text> | ||||
| @@ -14,79 +14,93 @@ | |||||
| <text>¥{{amountMoney/100}}</text> | <text>¥{{amountMoney/100}}</text> | ||||
| </view> | </view> | ||||
| </view> --> | </view> --> | ||||
| <!-- tt:if="{{djArr.length == 0 && count == 0}}" --> | |||||
| <view class='topBox2 clearfix' > | |||||
| <view class='imgBox'> | |||||
| <image src='{{userInfo.merchant_img_url}}' mode='{{widthFix}}' ></image> | |||||
| </view> | |||||
| <text class='name'>{{userInfo.mall_name}}({{userInfo.merchant_name}})</text> | |||||
| <!-- tt:if="{{djArr.length == 0 && count == 0}}" --> | |||||
| <view class='topBox2 clearfix'> | |||||
| <view class='imgBox'> | |||||
| <image src='{{userInfo.merchant_img_url}}' mode='{{widthFix}}'></image> | |||||
| </view> | </view> | ||||
| <text class='name'>{{userInfo.mall_name}}({{userInfo.merchant_name}})</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='location'> | |||||
| <view class='message' tt:if="{{billList.length>0}}"> | |||||
| <image src='../../assets/images/mess.png' mode='widthFix'></image> | |||||
| <text>{{billList.length}}</text> | |||||
| </view> | |||||
| <swiper tt:if="{{billList.length>0}}" current='{{currentIndex}}' class="swiper_container" vertical="true" autoplay="true" circular="true" interval="3000"> | |||||
| <block tt:for="{{billList}}" tt:key="index"> | |||||
| <swiper-item bindtap="gotobill" data-data='{{item}}' data-id='{{item.id}}'> | |||||
| <view class="swiper_item clearfix"> | |||||
| <text tt:if="{{item.status=='1'}}" class="state1 fl">欠缴</text> | |||||
| <text tt:if="{{item.status=='2'}}" class="state2 fl">待缴</text> | |||||
| <text class="fl billtype">{{item.name}}{{item.end}}</text> | |||||
| <text class="fl">{{item.owe/100}}元</text> | |||||
| </view> | |||||
| </swiper-item> | |||||
| </block> | |||||
| </swiper> | |||||
| </view> | |||||
| <view class='location'> | |||||
| <view class='message' tt:if="{{billList.length>0}}"> | |||||
| <image src='../../assets/images/mess.png' mode='widthFix'></image> | |||||
| <text>{{billList.length}}</text> | |||||
| </view> | </view> | ||||
| <view class='writeOff'> | |||||
| <view class='classification clearfix' tt:if="{{userInfoLoadIf}}"> | |||||
| <view tt:for='{{classIfyList}}' tt:if="{{!(item.id==4&&userInfo.creditLocked==1)}}" tt:key='{{index}}'> | |||||
| <view hover-class='active' style='background:{{item.bg}}' bindtap='toWriteoff' data-id='{{item.id}}'> | |||||
| <icon class='{{item.icon}}'></icon> | |||||
| <swiper tt:if="{{billList.length>0}}" current='{{currentIndex}}' class="swiper_container" vertical="true" | |||||
| autoplay="true" circular="true" interval="3000"> | |||||
| <block tt:for="{{billList}}" tt:key="index"> | |||||
| <swiper-item bindtap="gotobill" data-data='{{item}}' data-id='{{item.id}}'> | |||||
| <view class="swiper_item clearfix"> | |||||
| <text tt:if="{{item.status=='1'}}" class="state1 fl">欠缴</text> | |||||
| <text tt:if="{{item.status=='2'}}" class="state2 fl">待缴</text> | |||||
| <text class="fl billtype">{{item.name}}{{item.end}}</text> | |||||
| <text class="fl">{{item.owe/100}}元</text> | |||||
| </view> | </view> | ||||
| <text>{{item.text}}</text> | |||||
| </swiper-item> | |||||
| </block> | |||||
| </swiper> | |||||
| </view> | |||||
| <view class='writeOff'> | |||||
| <view class='classification clearfix' tt:if="{{userInfoLoadIf&&userInfo.is_admin!=4}}"> | |||||
| <view tt:for='{{classIfyList}}' tt:if="{{!(item.id==4&&userInfo.creditLocked==1)}}"> | |||||
| <!-- <view tt:for='{{classIfyList}}' tt:if="{{false}}" tt:key='{{index}}'> --> | |||||
| <view hover-class='active' style='background:{{item.bg}}' bindtap='toWriteoff' data-id='{{item.id}}'> | |||||
| <icon class='{{item.icon}}'></icon> | |||||
| </view> | </view> | ||||
| <text>{{item.text}}</text> | |||||
| </view> | </view> | ||||
| </view> | </view> | ||||
| <view class='jiaoyi jiaoyi1 jiaoyi2' hover-class='actives' bindtap='toTran' data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>交易记录</text> | |||||
| </view> | |||||
| <view>今日交易额:{{amountMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| <view class='classification clearfix' tt:if="{{userInfoLoadIf&&userInfo.is_admin==4}}"> | |||||
| <view tt:for='{{classIfyList2}}' tt:if="{{!(item.id==4&&userInfo.creditLocked==1)}}"> | |||||
| <!-- <view tt:for='{{classIfyList}}' tt:if="{{false}}" tt:key='{{index}}'> --> | |||||
| <view hover-class='active' style='background:{{item.bg}}' bindtap='toWriteoff' data-id='{{item.id}}'> | |||||
| <icon class='{{item.icon}}'></icon> | |||||
| </view> | </view> | ||||
| <text>{{item.text}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view tt:if="{{userInfo.is_admin!=4}}" class='jiaoyi jiaoyi1 jiaoyi2' hover-class='actives' bindtap='toTran' | |||||
| data-type='0'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>交易记录</text> | |||||
| </view> | </view> | ||||
| <!-- <view class='transaction' tt:if="{{ifShowChart!='show'}}"> | |||||
| <view>今日交易额:{{amountMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart!='show'}}"> | |||||
| <ec-canvas id="mychart-jiaoyi" canvas-id="mychart-multi-bar" ec="{{ ecBar }}"></ec-canvas> | <ec-canvas id="mychart-jiaoyi" canvas-id="mychart-multi-bar" ec="{{ ecBar }}"></ec-canvas> | ||||
| </view> --> | </view> --> | ||||
| <view class='transaction' tt:if="{{ifShowChart=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave01.png' mode='widthFix'></image> | |||||
| <view class="nothave">暂无数据</view> | |||||
| </view> | |||||
| <view class='transaction' tt:if="{{ifShowChart=='show'}}"> | |||||
| <image class='img' src='../../assets/images/nothave01.png' mode='widthFix'></image> | |||||
| <view class="nothave">暂无数据</view> | |||||
| </view> | </view> | ||||
| <view class='jiaoyi' hover-class='actives' bindtap='toTran' data-type='1'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>核销记录</text> | |||||
| </view> | |||||
| <view>今日核销额:{{writeOffMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | |||||
| </view> | |||||
| <view tt:if="{{userInfo.is_admin!=4}}" class='jiaoyi' hover-class='actives' bindtap='toTran' data-type='1'> | |||||
| <view class='toTransaction'> | |||||
| <view> | |||||
| <text>核销记录</text> | |||||
| </view> | |||||
| <view>今日核销额:{{writeOffMoney/100}}元 | |||||
| <image class='iconfonts' src='../../assets/images/jian.png' mode="widthFix"></image> | |||||
| </view> | </view> | ||||
| <!-- <view class='transaction' tt:if="{{ifShowChart1!='show'}}"> | |||||
| </view> | |||||
| <!-- <view class='transaction' tt:if="{{ifShowChart1!='show'}}"> | |||||
| <ec-canvas id="mychart-hexiao" canvas-id="mychart-multi-scatter" ec="{{ ecScatter }}"></ec-canvas> | <ec-canvas id="mychart-hexiao" canvas-id="mychart-multi-scatter" ec="{{ ecScatter }}"></ec-canvas> | ||||
| </view> | </view> | ||||
| <view class='transaction' tt:if="{{ifShowChart1=='show'}}"> | <view class='transaction' tt:if="{{ifShowChart1=='show'}}"> | ||||
| <image class='img' src='../../assets/images/nothave02.png' mode='widthFix'></image> | <image class='img' src='../../assets/images/nothave02.png' mode='widthFix'></image> | ||||
| <view class="nothave1">暂无数据</view> | <view class="nothave1">暂无数据</view> | ||||
| </view> --> | </view> --> | ||||
| </view> | |||||
| <!-- <view class='jiaoyi jiaoyi1' hover-class='actives' bindtap='toRecord' data-type='0'> | |||||
| </view> | |||||
| <!-- <view class='jiaoyi jiaoyi1' hover-class='actives' bindtap='toRecord' data-type='0'> | |||||
| <view class='toTransaction'> | <view class='toTransaction'> | ||||
| <view> | <view> | ||||
| <text>收银记录</text> | <text>收银记录</text> | ||||
| @@ -103,4 +117,4 @@ | |||||
| <view class="nothave2">暂无数据</view> | <view class="nothave2">暂无数据</view> | ||||
| </view> | </view> | ||||
| </view> --> | </view> --> | ||||
| </view> | |||||
| </view> | |||||
| @@ -6,30 +6,30 @@ const Http = require('../../utils/HttpBasics.js') | |||||
| Page({ | Page({ | ||||
| data: { | data: { | ||||
| cashOutOpenHeadImg:"",//用户头像 | |||||
| cashOutOpenNickName:"",//用户名 | |||||
| cashOutCount: "",//当日已提现次数 | |||||
| cashOutOpenHeadImg: "", //用户头像 | |||||
| cashOutOpenNickName: "", //用户名 | |||||
| cashOutCount: "", //当日已提现次数 | |||||
| cashOutNumber: "", // 可提现余额 | cashOutNumber: "", // 可提现余额 | ||||
| cashOutSupport: "",// 1 - 支持提现 0-不支持提现 | |||||
| cashOutLimit: "",// 当日提现次数限制 | |||||
| cashOutSupport: "", // 1 - 支持提现 0-不支持提现 | |||||
| cashOutLimit: "", // 当日提现次数限制 | |||||
| city: '', | city: '', | ||||
| userInfo: {}, | userInfo: {}, | ||||
| flag: 'hidden', | flag: 'hidden', | ||||
| isSet:false, | |||||
| isSet: false, | |||||
| haveData: false, | haveData: false, | ||||
| ttBalanceUrl:"",//余额链接 | |||||
| ttImportUrl:"",//进件链接 | |||||
| ttBalanceUrl: "", //余额链接 | |||||
| ttImportUrl: "", //进件链接 | |||||
| }, | }, | ||||
| toDetail() { | toDetail() { | ||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `./signInDetail/signInDetail?userInfo=${this.data.userInfo}` | url: `./signInDetail/signInDetail?userInfo=${this.data.userInfo}` | ||||
| }) | }) | ||||
| }, | }, | ||||
| phone(e){ | |||||
| phone(e) { | |||||
| tt.makePhoneCall({ | tt.makePhoneCall({ | ||||
| phoneNumber: e.currentTarget.dataset.phone | |||||
| phoneNumber: e.currentTarget.dataset.phone | |||||
| }) | }) | ||||
| }, | }, | ||||
| toExit() { | toExit() { | ||||
| @@ -51,21 +51,21 @@ Page({ | |||||
| console.log(that.data.flag) | console.log(that.data.flag) | ||||
| }, | }, | ||||
| //获取提现信息 | //获取提现信息 | ||||
| getTx(){ | |||||
| getTx() { | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.balance | url: config.api.balance | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| console.log(111) | console.log(111) | ||||
| this.setData({ | this.setData({ | ||||
| cashOutCount: res.data.cashOutCount,//当日已提现次数 | |||||
| cashOutCount: res.data.cashOutCount, //当日已提现次数 | |||||
| cashOutNumber: res.data.cashOutNumber, // 可提现余额 | cashOutNumber: res.data.cashOutNumber, // 可提现余额 | ||||
| cashOutSupport: res.data.cashOutSupport,// 1 - 支持提现 0-不支持提现 | |||||
| cashOutLimit: res.data.cashOutLimit,// 当日提现次数限制 | |||||
| cashOutSupport: res.data.cashOutSupport, // 1 - 支持提现 0-不支持提现 | |||||
| cashOutLimit: res.data.cashOutLimit, // 当日提现次数限制 | |||||
| withdrawNun: res.data.cashOutLimit - res.data.cashOutCount, | withdrawNun: res.data.cashOutLimit - res.data.cashOutCount, | ||||
| cashOutOpenHeadImg: res.data.cashOutOpenHeadImg, | cashOutOpenHeadImg: res.data.cashOutOpenHeadImg, | ||||
| cashOutOpenNickName: res.data.cashOutOpenNickName | cashOutOpenNickName: res.data.cashOutOpenNickName | ||||
| }) | }) | ||||
| }).catch(err=>{ | |||||
| }).catch(err => { | |||||
| // tt.showToast({ | // tt.showToast({ | ||||
| // title: err.message, | // title: err.message, | ||||
| // icon:"none", | // icon:"none", | ||||
| @@ -73,10 +73,10 @@ Page({ | |||||
| // }) | // }) | ||||
| }) | }) | ||||
| }, | }, | ||||
| onLoad(){ | |||||
| onLoad() { | |||||
| // this.findJurisdiction() | // this.findJurisdiction() | ||||
| }, | }, | ||||
| onShow(){ | |||||
| onShow() { | |||||
| // this.getTx() | // this.getTx() | ||||
| app.globalData.userInfo().then(res => { | app.globalData.userInfo().then(res => { | ||||
| this.setData({ | this.setData({ | ||||
| @@ -86,9 +86,10 @@ Page({ | |||||
| // this.setData({ | // this.setData({ | ||||
| // appVersion:appVersion | // appVersion:appVersion | ||||
| // }) | // }) | ||||
| console.log(app.globalData.isAdmin); | |||||
| }, | }, | ||||
| //提现按钮 | //提现按钮 | ||||
| withdraw(){ | |||||
| withdraw() { | |||||
| console.log(this.data.cashOutOpenNickName) | console.log(this.data.cashOutOpenNickName) | ||||
| tt.navigateTo({ | tt.navigateTo({ | ||||
| url: `/pages/withdraw/withdraw?money=${this.data.cashOutNumber}&userTop=${this.data.cashOutOpenHeadImg}&userName=${this.data.cashOutOpenNickName}`, | url: `/pages/withdraw/withdraw?money=${this.data.cashOutNumber}&userTop=${this.data.cashOutOpenHeadImg}&userName=${this.data.cashOutOpenNickName}`, | ||||
| @@ -97,7 +98,7 @@ Page({ | |||||
| /** | /** | ||||
| * 查询是否有修改账户权限 | * 查询是否有修改账户权限 | ||||
| */ | */ | ||||
| findJurisdiction(){ | |||||
| findJurisdiction() { | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.permitModifiy, | url: config.api.permitModifiy, | ||||
| }).then(res => { | }).then(res => { | ||||
| @@ -121,26 +122,26 @@ Page({ | |||||
| }) | }) | ||||
| }, | }, | ||||
| goWebView(e){ | |||||
| goWebView(e) { | |||||
| tt.showLoading({ | tt.showLoading({ | ||||
| title: "获取中!", | title: "获取中!", | ||||
| }); | }); | ||||
| let type = e.currentTarget.dataset.type | let type = e.currentTarget.dataset.type | ||||
| this.findAccountById(this.data.userInfo.merchant_id,type) | |||||
| this.findAccountById(this.data.userInfo.merchant_id, type) | |||||
| }, | }, | ||||
| /** | /** | ||||
| * 查询收款账户状态 | * 查询收款账户状态 | ||||
| */ | */ | ||||
| findAccountById(merchant_id,type){ | |||||
| findAccountById(merchant_id, type) { | |||||
| Http.get({ | Http.get({ | ||||
| url: config.api.findTt, | url: config.api.findTt, | ||||
| data:{ | |||||
| data: { | |||||
| id: merchant_id, | id: merchant_id, | ||||
| urlType:type | |||||
| urlType: type | |||||
| } | } | ||||
| }).then(res=>{ | |||||
| }).then(res => { | |||||
| tt.hideLoading() | tt.hideLoading() | ||||
| console.log(); | console.log(); | ||||
| /** | /** | ||||
| @@ -150,7 +151,7 @@ Page({ | |||||
| */ | */ | ||||
| tt.setClipboardData({ | tt.setClipboardData({ | ||||
| data: res.data, | data: res.data, | ||||
| success: function() { | |||||
| success: function () { | |||||
| tt.showToast({ | tt.showToast({ | ||||
| title: '复制成功 请到浏览器打开', | title: '复制成功 请到浏览器打开', | ||||
| icon: "none", | icon: "none", | ||||
| @@ -158,12 +159,12 @@ Page({ | |||||
| }) | }) | ||||
| } | } | ||||
| }) | }) | ||||
| }).catch(err=>{ | |||||
| }).catch(err => { | |||||
| tt.hideLoading() | tt.hideLoading() | ||||
| tt.showToast({ | tt.showToast({ | ||||
| title: err.message, | title: err.message, | ||||
| icon:"none", | |||||
| duration:2000 | |||||
| icon: "none", | |||||
| duration: 2000 | |||||
| }) | }) | ||||
| }) | }) | ||||
| } | } | ||||
| @@ -38,7 +38,7 @@ | |||||
| </navigator> | </navigator> | ||||
| <navigator url='/pages/orderUrl/orderUrl' open-type='navigate' hover-class='none' | <navigator url='/pages/orderUrl/orderUrl' open-type='navigate' hover-class='none' | ||||
| tt:if="{{userInfo.user_is_admin==1}}"> | |||||
| tt:if="{{userInfo.user_is_admin==1&&userInfo.is_admin!=4}}"> | |||||
| <view> | <view> | ||||
| <text>导出核销记录</text> | <text>导出核销记录</text> | ||||
| <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | ||||
| @@ -49,12 +49,12 @@ | |||||
| <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | ||||
| </view> --> | </view> --> | ||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin}}" data-type="{{1}}"> | |||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin&&userInfo.is_admin!=4}}" data-type="{{1}}"> | |||||
| <text>开通收款账户</text> | <text>开通收款账户</text> | ||||
| <text>点击复制链接</text> | <text>点击复制链接</text> | ||||
| </view> | </view> | ||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin}}" data-type="{{2}}"> | |||||
| <view bindtap="goWebView" tt:if="{{userInfo.user_is_admin&&userInfo.is_admin!=4}}" data-type="{{2}}"> | |||||
| <text>账户余额</text> | <text>账户余额</text> | ||||
| <text>点击复制链接</text> | <text>点击复制链接</text> | ||||
| </view> | </view> | ||||
| @@ -80,7 +80,8 @@ | |||||
| </view> | </view> | ||||
| </navigator> --> | </navigator> --> | ||||
| <navigator url='/pages/creditOperate/index' open-type='navigate' hover-class='none'> | |||||
| <navigator tt:if="{{!(userInfo.is_admin==4)}}" url='/pages/creditOperate/index' open-type='navigate' | |||||
| hover-class='none'> | |||||
| <view> | <view> | ||||
| <text>积分操作记录</text> | <text>积分操作记录</text> | ||||
| <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | <image class='imgs' src='../../assets/images/jian.png' mode="widthFix"></image> | ||||