mirror of
https://gitee.com/java110/WechatOwnerService.git
synced 2026-02-23 21:36:38 +08:00
开发完成二维码支付功能
This commit is contained in:
parent
633ea492f7
commit
8fd5c37c2b
@ -152,7 +152,16 @@
|
||||
},
|
||||
|
||||
checkboxChange: function(e) {
|
||||
let _that =this;
|
||||
this.feeIds = e.detail.value;
|
||||
_that.fees.forEach(function(_item) {
|
||||
_item.selected = "0";
|
||||
_that.feeIds.forEach(_feeId =>{
|
||||
if(_item.feeId == _feeId){
|
||||
_item.selected = "1";
|
||||
}
|
||||
});
|
||||
})
|
||||
this.computeAmount();
|
||||
},
|
||||
_getDeadlineTime: function(_fee) {
|
||||
@ -203,4 +212,8 @@
|
||||
.line-height {
|
||||
line-height: 100upx;
|
||||
}
|
||||
|
||||
.uni-checkbox-input{
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -7,7 +7,10 @@
|
||||
<view class="money-value">{{money}}</view>
|
||||
</view>
|
||||
|
||||
<view class="cu-bar btn-group" style="margin-top: 30px;">
|
||||
<view class="cu-bar btn-group" style="margin-top: 30px;" v-if="!appId">
|
||||
<button disabled="disabled" class="cu-btn bg-blue shadow-blur round lg">确认支付</button>
|
||||
</view>
|
||||
<view class="cu-bar btn-group" style="margin-top: 30px;" v-else>
|
||||
<button @click="_submit" class="cu-btn bg-blue shadow-blur round lg">确认支付</button>
|
||||
</view>
|
||||
|
||||
@ -59,31 +62,34 @@
|
||||
this.openId = options.openId;
|
||||
this.communityId = options.communityId;
|
||||
this.cashierUserId = options.cashierUserId;
|
||||
|
||||
if (!isNotNull(this.openId)) {
|
||||
let _that =this;
|
||||
this._loadAppId(function(){
|
||||
if (!isNotNull(_that.openId)) {
|
||||
//刷新 openId
|
||||
// #ifdef H5
|
||||
if (isWxOrAli() == 'ALIPAY') {
|
||||
this._refreshAliPayOpenId();
|
||||
_that._refreshAliPayOpenId();
|
||||
return;
|
||||
}
|
||||
//todo h5 情况
|
||||
this._refreshWechatOpenId();
|
||||
_that._refreshWechatOpenId();
|
||||
return;
|
||||
// #endif
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this._refreshWechatMiniOpenId();
|
||||
_that._refreshWechatMiniOpenId();
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.money = options.money;
|
||||
this.business = options.business;
|
||||
this.data = uni.getStorageSync('doing_cashier');
|
||||
this._loadAppId();
|
||||
|
||||
},
|
||||
methods: {
|
||||
_loadAppId:function(){
|
||||
_loadAppId:function(_call){
|
||||
let _objType = "1100"; // todo public
|
||||
// #ifdef MP-WEIXIN
|
||||
_objType = "1000";
|
||||
@ -95,13 +101,14 @@
|
||||
objType:_objType
|
||||
}).then(_data =>{
|
||||
_that.appId = _data.data;
|
||||
_call();
|
||||
})
|
||||
},
|
||||
_refreshWechatOpenId: function() {
|
||||
let _redirectUrl = window.location.href;
|
||||
refreshUserOpenId({
|
||||
redirectUrl: _redirectUrl,
|
||||
communityId: this.communityId,
|
||||
wAppId: this.appId,
|
||||
}).then(_data => {
|
||||
console.log(_data, 123)
|
||||
if (_data.code == 0) {
|
||||
|
||||
@ -164,7 +164,7 @@
|
||||
|
||||
.tips {
|
||||
text-align: center;
|
||||
margin: 80rpx 0;
|
||||
margin: 40rpx 0;
|
||||
font-size: 12pt;
|
||||
margin-bottom: 20upx;
|
||||
color: #888888;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user