|
|
@ -66,15 +66,16 @@ |
|
|
|
<view class="width100 height60"></view> |
|
|
|
<view class="width100 height60"></view> |
|
|
|
<view class="footer"> |
|
|
|
<view class="footer"> |
|
|
|
<view class="settlement"> |
|
|
|
<view class="settlement"> |
|
|
|
<view class="sum">实付:<view class="money" v-if="paytype == 'weixin' || paytype == 'gonghuika' ">¥{{payPrice}}</view> |
|
|
|
<view class="sum">实付:<view class="money" v-if="paytype == 'weixin' || paytype == 'gonghuika' "> |
|
|
|
|
|
|
|
¥{{payPrice}}</view> |
|
|
|
<view class="money aliitem" v-else> |
|
|
|
<view class="money aliitem" v-else> |
|
|
|
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png"> |
|
|
|
<image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png"> |
|
|
|
</image>{{payPrice*100}} |
|
|
|
</image>{{payPrice*100}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- #ifdef MP --> |
|
|
|
<!-- #ifdef MP --> |
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user.phone == null" |
|
|
|
<button class="btn" open-type="getPhoneNumber" v-if="user == null" |
|
|
|
@getphonenumber="getPhoneNumber">立即支付</button> |
|
|
|
@getphonenumber="loginByPhone">立即支付</button> |
|
|
|
<button class="btn" v-else @tap="toPay">立即支付</button> |
|
|
|
<button class="btn" v-else @tap="toPay">立即支付</button> |
|
|
|
<!-- #endif --> |
|
|
|
<!-- #endif --> |
|
|
|
<!-- #ifdef H5 --> |
|
|
|
<!-- #ifdef H5 --> |
|
|
@ -96,7 +97,8 @@ |
|
|
|
orderToGoldPay, |
|
|
|
orderToGoldPay, |
|
|
|
orderToGoldPayunion, |
|
|
|
orderToGoldPayunion, |
|
|
|
hltUnionCardPayUnion, |
|
|
|
hltUnionCardPayUnion, |
|
|
|
getHuiLianTongCardBalance |
|
|
|
getHuiLianTongCardBalance, |
|
|
|
|
|
|
|
loginByPhone |
|
|
|
} from '../../Utils/Api.js'; |
|
|
|
} from '../../Utils/Api.js'; |
|
|
|
import ssPaymentPassword from '../../components/sanshui-payment-password'; |
|
|
|
import ssPaymentPassword from '../../components/sanshui-payment-password'; |
|
|
|
let app = getApp(); |
|
|
|
let app = getApp(); |
|
|
@ -198,17 +200,29 @@ |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 微信获取手机号 |
|
|
|
// 微信获取手机号 |
|
|
|
getPhoneNumber(PhoneNumber) { |
|
|
|
loginByPhone(PhoneNumber) { |
|
|
|
|
|
|
|
if (PhoneNumber.detail.iv == undefined) { |
|
|
|
|
|
|
|
uni.showToast({ |
|
|
|
|
|
|
|
title: "用户取消授权", |
|
|
|
|
|
|
|
icon: "none" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
let params = { |
|
|
|
let params = { |
|
|
|
openId: app.globalData.openId, |
|
|
|
openId: app.globalData.openId, |
|
|
|
iv: PhoneNumber.detail.iv, |
|
|
|
iv: PhoneNumber.detail.iv, |
|
|
|
encryptedData: PhoneNumber.detail.encryptedData |
|
|
|
encryptedData: PhoneNumber.detail.encryptedData |
|
|
|
} |
|
|
|
} |
|
|
|
GetPhoneNumber(params).then(res => { |
|
|
|
loginByPhone(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
app.globalData.userInfo = res.return_data |
|
|
|
app.globalData.userInfo = res.return_data |
|
|
|
.object |
|
|
|
.object |
|
|
|
.highUser; |
|
|
|
.highUser; |
|
|
|
|
|
|
|
app.globalData.token = res.return_data.uniqueCode; |
|
|
|
|
|
|
|
uni.setStorage({ |
|
|
|
|
|
|
|
key: "token", |
|
|
|
|
|
|
|
data: res.return_data.uniqueCode |
|
|
|
|
|
|
|
}) |
|
|
|
uni.setStorage({ |
|
|
|
uni.setStorage({ |
|
|
|
key: "user", |
|
|
|
key: "user", |
|
|
|
data: res.return_data |
|
|
|
data: res.return_data |
|
|
@ -239,7 +253,7 @@ |
|
|
|
"rechargeModel": this.rechargeModel, |
|
|
|
"rechargeModel": this.rechargeModel, |
|
|
|
"agentKey": this.agentKey, |
|
|
|
"agentKey": this.agentKey, |
|
|
|
"objectId": this.objectId, |
|
|
|
"objectId": this.objectId, |
|
|
|
"identificationCode":app.globalData.identificationCode |
|
|
|
"identificationCode": app.globalData.identificationCode |
|
|
|
} |
|
|
|
} |
|
|
|
addOrderPay(params).then(res => { |
|
|
|
addOrderPay(params).then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
@ -301,7 +315,7 @@ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.switchTab({ |
|
|
|
uni.switchTab({ |
|
|
|
url:'../../pages/tabBar/user/user' |
|
|
|
url: '../../pages/tabBar/user/user' |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
fail: function(err) { |
|
|
|
fail: function(err) { |
|
|
@ -388,7 +402,7 @@ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.switchTab({ |
|
|
|
uni.switchTab({ |
|
|
|
url:'../../pages/tabBar/user/user' |
|
|
|
url: '../../pages/tabBar/user/user' |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -417,7 +431,7 @@ |
|
|
|
title: '支付成功' |
|
|
|
title: '支付成功' |
|
|
|
}) |
|
|
|
}) |
|
|
|
uni.switchTab({ |
|
|
|
uni.switchTab({ |
|
|
|
url:'../../pages/tabBar/user/user' |
|
|
|
url: '../../pages/tabBar/user/user' |
|
|
|
}) |
|
|
|
}) |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|