Commit 9a7de056 by Chao Sun

openid问题修改

parent 65726b13
......@@ -17,7 +17,7 @@
<div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script>
<!-- 移动端调试 -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script>
<!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script> -->
</body>
</html>
......@@ -234,6 +234,11 @@
dataImport
},
onLoad() {
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('isBack') == 1){
const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null;
if(calcuteData){
......@@ -249,21 +254,19 @@
//初始化删除上次批量计算结果
uni.removeStorageSync('resIrrAndSimpleResInfos');
}
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true;
return false;
}else{
this.isNeedOfficialAccountQrcode = false;
if(!uni.getStorageSync('openId')){
this.isNeedOfficialAccountQrcode = true;
}else{
this.isNeedOfficialAccountQrcode = false;
}
}
if(dataHandling.getQueryString('openId')) {
uni.setStorageSync('openId',dataHandling.getQueryString('openId'))
}else if(!uni.getStorageSync('openId')){
api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{
console.log(res);
if(res['success']){
......@@ -271,11 +274,6 @@
}
})
}
if(dataHandling.getQueryString('subscribe')==0 || !uni.getStorageSync('openId')){
this.isNeedOfficialAccountQrcode = true;
}else{
this.isNeedOfficialAccountQrcode = false;
}
if(this.yearWithdrawal.length>0){
this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'})
}
......@@ -497,7 +495,7 @@
//增额提领信息校验
if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){
this.errorDialog(2,`请输入第${i+1}行起领年度和止领年度,且该日期必须大于0!`);
this.errorDialog(2,`请输入第${i+1}行起领年度和止领年度,且该年度必须大于0!`);
return false;
}else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){
......@@ -598,10 +596,7 @@
},
resetData(){
this.irrAndSimpleCalcuteParam = {};
this.yearWithdrawalInfos = [{withdrawalType:'1',
withdrawalStart:undefined,
withdrawalEnd:undefined,
yearWithdrawalAmount:undefined}];
this.yearWithdrawalInfos = [];
this.withdrawalType = '1';
this.irrAndSimple = {nyear:undefined,cashValue:undefined};
this.resultShowFlag = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment