111
This commit is contained in:
parent
c6cd07b711
commit
147e16a632
|
@ -19,8 +19,8 @@ const install = (Vue, vm) => {
|
|||
// },
|
||||
// });
|
||||
Vue.prototype.$u.http.setConfig({
|
||||
// baseUrl: 'http://192.168.2.106:10002',
|
||||
baseUrl: 'https://kg.chuangtewl.com/prod-api',
|
||||
baseUrl: 'http://192.168.2.106:10002',
|
||||
// baseUrl: 'https://kg.chuangtewl.com/prod-api',
|
||||
// loadingText: '努力加载中~',
|
||||
// loadingTime: 1000,
|
||||
// 设置自定义头部content-type
|
||||
|
|
|
@ -127,6 +127,7 @@
|
|||
立即支付
|
||||
</view>
|
||||
</view>
|
||||
<view class="mask" v-if="zhifuflag"></view>
|
||||
<view class="mask" v-if="czflag"></view>
|
||||
|
||||
<view class="czdh" v-if="jzflag">
|
||||
|
@ -161,10 +162,11 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
flags:false,
|
||||
jzflag:false,
|
||||
progress: 0,
|
||||
isLoading: false,
|
||||
zhifuflag:true,
|
||||
zhifuflag:false,
|
||||
indexactive: -1,
|
||||
checked: false,
|
||||
lanyaflag: false,
|
||||
|
@ -447,16 +449,16 @@
|
|||
mapGearTimeToGearAmount(suitList) {
|
||||
// 遍历 suitList 数组
|
||||
suitList.forEach(suit => {
|
||||
const gearTime = suit.gearTime;
|
||||
const gearAmount = suit.gearAmount;
|
||||
const arr = new Array(gearTime.length).fill(null);
|
||||
const gearTime = suit.gearTime
|
||||
const gearAmount = suit.gearAmount
|
||||
const arr = new Array(gearTime.length).fill(null)
|
||||
gearTime.forEach((time, index) => {
|
||||
if (time >= 0 && time < gearAmount.length) {
|
||||
arr[index] = gearAmount[time];
|
||||
arr[index] = gearAmount[time]
|
||||
}
|
||||
});
|
||||
suit.arr = arr;
|
||||
});
|
||||
})
|
||||
suit.arr = arr
|
||||
})
|
||||
},
|
||||
btnzhifu() {
|
||||
if (this.checked == false) {
|
||||
|
@ -474,14 +476,15 @@
|
|||
}else if(this.mchShowBillMobile == true && this.phonenumber == ''){
|
||||
this.getPhoneNumber()
|
||||
}else {
|
||||
this.zhifuflag = true
|
||||
this.getzhifu()
|
||||
}
|
||||
},
|
||||
// 获取手机号
|
||||
getPhoneNumber(e){
|
||||
// console.log(e,'121212');
|
||||
this.$u.put(`/app/user/bindWxMobile?mobileCode=${e.detail.code}`).then(res =>{
|
||||
if(res.code == 200){
|
||||
this.zhifuflag = true
|
||||
this.getzhifu()
|
||||
}else{
|
||||
uni.showToast({
|
||||
|
@ -499,7 +502,6 @@
|
|||
title: '准备支付中...'
|
||||
})
|
||||
this.getzfqd()
|
||||
this.zhifuflag = false
|
||||
let that = this
|
||||
let data = {
|
||||
deviceNo: that.id,
|
||||
|
@ -543,7 +545,7 @@
|
|||
signType: res.data.payParams.signType,
|
||||
paySign: res.data.payParams.paySign,
|
||||
success: (res) => {
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
// console.log(res, '支付成功')
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer)
|
||||
|
@ -558,7 +560,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
|
@ -568,7 +570,7 @@
|
|||
}
|
||||
})
|
||||
}else{
|
||||
this.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -591,7 +593,7 @@
|
|||
signType: res.data.payParams.signType,
|
||||
paySign: res.data.payParams.paySign,
|
||||
success: (res) => {
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
// console.log(res, '支付成功')
|
||||
if (that.timer) {
|
||||
clearInterval(this.timer)
|
||||
|
@ -605,7 +607,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
// 支付失败逻辑
|
||||
uni.showToast({
|
||||
title: '支付失败',
|
||||
|
@ -615,7 +617,7 @@
|
|||
}
|
||||
})
|
||||
}else{
|
||||
this.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -628,12 +630,13 @@
|
|||
uni.reLaunch({
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
that.zhifuflag = false
|
||||
}else if(res.code == 500){
|
||||
uni.showToast({
|
||||
title:res.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
|
@ -683,7 +686,7 @@
|
|||
title: '准备支付中...'
|
||||
})
|
||||
this.getzfqd()
|
||||
this.zhifuflag = false
|
||||
this.zhifuflag = true
|
||||
let that = this
|
||||
let data = {
|
||||
deviceNo: that.id,
|
||||
|
@ -743,7 +746,7 @@
|
|||
customData: '11open'
|
||||
})
|
||||
setTimeout(() => {
|
||||
that.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
uni.reLaunch({
|
||||
// url: '/pages/shouye/index'
|
||||
url:'/page_components/eletj?id=' + that.orderno
|
||||
|
@ -782,7 +785,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
setTimeout(() => {
|
||||
this.czflag = false
|
||||
uni.hideLoading()
|
||||
|
@ -796,7 +799,7 @@
|
|||
}
|
||||
})
|
||||
}else{
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
}
|
||||
})
|
||||
}else{
|
||||
|
@ -848,7 +851,7 @@
|
|||
})
|
||||
that.$u.get(`/app/bill/recharge/${dingobj}/bluetoothSuccess`).then(res => {
|
||||
if (res.code == 200) {
|
||||
that.zhifuflag = true
|
||||
that.zhifuflag = false
|
||||
console.log('蓝牙离线充值成功11')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
|
@ -885,7 +888,7 @@
|
|||
uni.setStorageSync('time', that.expireTimeStr)
|
||||
},
|
||||
fail(err) {
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
setTimeout(() => {
|
||||
this.czflag = false
|
||||
uni.hideLoading()
|
||||
|
@ -899,7 +902,7 @@
|
|||
}
|
||||
})
|
||||
}else{
|
||||
this.zhifuflag = true
|
||||
this.zhifuflag = false
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
|
@ -935,7 +938,7 @@
|
|||
},
|
||||
//选择套餐
|
||||
btnactive(item) {
|
||||
this.zhifuflag = true
|
||||
// this.zhifuflag = true
|
||||
this.prices = item.price
|
||||
this.sytime = item.value
|
||||
this.zfobj = item
|
||||
|
|
Loading…
Reference in New Issue
Block a user