optimize charge

This commit is contained in:
java110 2023-04-03 14:50:36 +08:00
parent cf4ec2fa74
commit d20bb79736
3 changed files with 14 additions and 8 deletions

View File

@ -33,7 +33,7 @@
}; };
}, },
created() { created() {
this.loadOwnerAccount(); //this.loadOwnerAccount();
}, },
methods: { methods: {
loadOwnerAccount: function(_communityId) { loadOwnerAccount: function(_communityId) {

View File

@ -52,6 +52,7 @@
queryOwnerAccount queryOwnerAccount
} from '../../api/user/userApi.js'; } from '../../api/user/userApi.js';
import {getCommunityId} from '@/api/community/communityApi.js'; import {getCommunityId} from '@/api/community/communityApi.js';
import {getWAppId} from '../../lib/java110/utils/StorageUtil.js'
import {payFeeApp,payFeeWechat} from '@/api/fee/feeApi.js'; import {payFeeApp,payFeeWechat} from '@/api/fee/feeApi.js';
export default { export default {
@ -71,7 +72,7 @@
this.appId = accountInfo.miniProgram.appId; this.appId = accountInfo.miniProgram.appId;
// #endif // #endif
// #ifdef H5 // #ifdef H5
this.appId = uni.getStorageSync(constant.mapping.W_APP_ID) this.appId = getWAppId();
// #endif // #endif
}, },
methods: { methods: {
@ -79,9 +80,6 @@
let _that = this; let _that = this;
context.getOwner(function(_ownerInfo) { context.getOwner(function(_ownerInfo) {
if (_ownerInfo) { if (_ownerInfo) {
if(!_that.communityId){
_that.communityId = _ownerInfo.communityId;
}
queryOwnerAccount({ queryOwnerAccount({
page: 1, page: 1,
row: 20, row: 20,
@ -131,7 +129,7 @@
payFeeWechat(this,{ payFeeWechat(this,{
business: "preStoreOnline", business: "preStoreOnline",
communityId: getCommunityId(), communityId: this.communityId,
acctId: this.account.acctId, acctId: this.account.acctId,
feeName: '账户充值', feeName: '账户充值',
receivedAmount: _receivedAmount, receivedAmount: _receivedAmount,

View File

@ -7,7 +7,7 @@
</view> </view>
<view class="flex justify-start mtc-machine-port"> <view class="flex justify-start mtc-machine-port">
<view v-for="(item,index) in ports" :key="index" class="port-item"> <view v-for="(item,index) in ports" :key="index" class="port-item">
<view class="item-1" :class="{'item-1-active':curPort.portId == item.portId}" @click="_switchPort(item)"> <view class="item-1" :class="{'item-1-active':curPort.portId == item.portId || item.state=='WORK'}" @click="_switchPort(item)">
<view class="port-name"> <view class="port-name">
{{item.portName}} {{item.portName}}
</view> </view>
@ -103,10 +103,18 @@
this.communityId = options.communityId; this.communityId = options.communityId;
this._loadChargeMachines(); this._loadChargeMachines();
this._loadChargeMachinePorts(); this._loadChargeMachinePorts();
let _that = this;
setTimeout(function(){
_that.$refs.accRef.loadOwnerAccount(_that.communityId);
},1000);
}, },
onShow: function(options) { onShow: function(options) {
this._dealChargeCoupons(); this._dealChargeCoupons();
if(this.$refs.accRef){
this.$refs.accRef.loadOwnerAccount(this.communityId); this.$refs.accRef.loadOwnerAccount(this.communityId);
}
}, },
methods: { methods: {
_loadChargeMachines: function() { _loadChargeMachines: function() {