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