| | |
| | | ACCESSTOKEN |
| | | } from 'common/config.js'; |
| | | import { |
| | | queryShop, |
| | | queryShopByCid, |
| | | queryShopByShopId, |
| | | userLogin, |
| | | queryUseSweepPayCoupon, |
| | | getWechatConfigInfo, |
| | |
| | | showRemark: false, |
| | | UNIONID: null, |
| | | payWay: this.$utils.getPlat(), |
| | | cid: '', |
| | | cid: '', //码牌id C扫B静态码时有 |
| | | activityQrcodeId: '', //动态收款码 C扫B动态码时有 |
| | | shopId: '', //商户id C扫B动态码时有 |
| | | bordShow: false, // 显示键盘 |
| | | shopInfo: { |
| | | cusid: '', |
| | |
| | | this.money = opt.smoney |
| | | }else{ |
| | | this.bordShow = true |
| | | } |
| | | if (opt.activityQrcodeId) { |
| | | this.activityQrcodeId = opt.activityQrcodeId |
| | | // this.getOrderInfo() |
| | | } |
| | | if (opt.shopId) { |
| | | this.shopId = opt.shopId |
| | | this.init() |
| | | } |
| | | if (opt.cid) { |
| | | this.cid = opt.cid |
| | |
| | | this.tips = '当前用户过多,请稍后重试~_~' |
| | | this.loading = false |
| | | }, 2000) |
| | | let api = queryShopByCid |
| | | let params = { |
| | | cid: this.cid |
| | | } |
| | | if(this.cid){ |
| | | api = queryShopByCid |
| | | params = { |
| | | cid: this.cid |
| | | } |
| | | } |
| | | if(this.activityQrcodeId){ |
| | | api = queryShopByShopId |
| | | params = { |
| | | shopId: this.shopId |
| | | } |
| | | } |
| | | //获取商铺信息 |
| | | queryShop({ |
| | | params: { |
| | | cid: this.cid |
| | | } |
| | | api({ |
| | | params |
| | | }).then(res => { |
| | | clearTimeout(timer) |
| | | this.loading = false |
| | |
| | | // 金额 this.money |
| | | uni.showLoading() |
| | | const params = { |
| | | money: Number(this.money * 100), |
| | | shopId: this.shopInfo.id, |
| | | cid: this.cid, |
| | | payWay: this.payWay, |
| | | buyerNote: this.buyerNote, |
| | | score: 0, |
| | | couponDetailId: this.couponInfo.id |
| | | } |
| | | if(this.activityQrcodeId){ |
| | | params.activityQrcodeId = this.activityQrcodeId |
| | | } |
| | | if(this.cid){ |
| | | params.money = Number(this.money * 100) |
| | | params.shopId = this.shopInfo.id |
| | | params.cid = this.cid |
| | | } |
| | | //生成订单 |
| | | saveOrder(params).then(res => { |
| | | uni.hideLoading() |