This commit is contained in:
java110 2021-10-17 01:42:50 +08:00
parent 73258d7dd7
commit f894b1b6eb
3 changed files with 55 additions and 6 deletions

View File

@ -219,3 +219,27 @@ export function queryOwnerAccountDetail(_objData) {
});
})
}
/**
* 刷新用户
* @param {Object} _objData
*/
export function refreshUserOpenId(_objData){
return new Promise((resolve, reject) => {
requestNoAuth({
url: url.queryOwnerAccountDetail,
method: "POST",
data: JSON.stringify(_obj), //动态数据
success: function(res) {
if (res.statusCode == 200) {
resolve(res);
return;
}
reject();
},
fail: function(e) {
reject();
}
});
})
}

View File

@ -44,7 +44,8 @@
</view>
</view>
<view class="cu-bar btn-group" style="margin-top: 30px;">
<button @click="onPayFee" :disabled="amount == 0" class="cu-btn bg-green shadow-blur round lg">确认缴费</button>
<button @click="onPayFee" :disabled="amount == 0"
class="cu-btn bg-green shadow-blur round lg">确认缴费</button>
</view>
</view>
</scroll-view>
@ -62,6 +63,12 @@
import {
getTempCarFeeOrder
} from '../../api/fee/feeApi.js'
import {
isNotNull
} from '../../utils/StringUtil.js'
import {
refreshUserOpenId
} from '../../api/user/userApi.js'
export default {
data() {
return {
@ -70,16 +77,24 @@
stopTimeTotal: 0,
inTime: '',
amount: 0.0,
queryTime:''
queryTime: '',
appId: '',
openId: '',
};
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
this.openId = options.openId;
this.paId = options.paId;
this.carNum = options.carNum;
this.appId = uni.getStorageSync(constant.mapping.W_APP_ID);
this.appId = options.appId;
if (!isNotNull(this.openId)) {
// openId
this._refreshWechatOpenId();
return;
}
this._loadTempCarFee();
},
methods: {
@ -156,6 +171,15 @@
});
}
});
},
_refreshWechatOpenId: function() {
let _redirectUrl = window.location.href;
refreshUserOpenId({
redirectUrl: _redirectUrl,
wAppId: this.appId
}).then(_data => {
});
}
}
};

View File

@ -79,7 +79,8 @@
index7: ""
},
carNum: '',
paId:''
paId:'',
appId:''
}
},
components: {
@ -87,6 +88,7 @@
},
onLoad(options) {
this.paId = options.paId;
this.appId = options.appId;
},
methods: {
showCarNumberKeyboard() {
@ -152,9 +154,8 @@
})
return ;
}
uni.navigateTo({
url:'/pages/tempCarFee/tempCarFee?paId='+_that.paId+'&carNum='+_that.carNum
url:'/pages/tempCarFee/tempCarFee?paId='+_that.paId+'&carNum='+_that.carNum+"&appId="+_that.appId
})
})
}