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