Commit 9a7de056 by Chao Sun

openid问题修改

parent 65726b13
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div id="app"><!--app-html--></div> <div id="app"><!--app-html--></div>
<script type="module" src="/main.js"></script> <script type="module" src="/main.js"></script>
<!-- 移动端调试 --> <!-- 移动端调试 -->
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script> <!-- <script type="text/javascript" src="//cdn.jsdelivr.net/npm/eruda"></script>
<script>eruda.init();</script> <script>eruda.init();</script> -->
</body> </body>
</html> </html>
...@@ -234,6 +234,11 @@ ...@@ -234,6 +234,11 @@
dataImport dataImport
}, },
onLoad() { onLoad() {
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('isBack') == 1){ if(dataHandling.getQueryString('isBack') == 1){
const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null; const calcuteData = uni.getStorageSync('calcuteData') ? JSON.parse(uni.getStorageSync('calcuteData')) : null;
if(calcuteData){ if(calcuteData){
...@@ -249,21 +254,19 @@ ...@@ -249,21 +254,19 @@
//初始化删除上次批量计算结果 //初始化删除上次批量计算结果
uni.removeStorageSync('resIrrAndSimpleResInfos'); uni.removeStorageSync('resIrrAndSimpleResInfos');
} }
if(!uni.getStorageSync('businessNo')){
uni.setStorageSync('businessNo', nanoid().replace(/\_/g,""));
}else{
this.businessNo = uni.getStorageSync('businessNo');
}
if(dataHandling.getQueryString('subscribe')==0){ if(dataHandling.getQueryString('subscribe')==0){
this.isNeedOfficialAccountQrcode = true; this.isNeedOfficialAccountQrcode = true;
return false;
}else{ }else{
this.isNeedOfficialAccountQrcode = false; if(!uni.getStorageSync('openId')){
this.isNeedOfficialAccountQrcode = true;
}else{
this.isNeedOfficialAccountQrcode = false;
}
} }
if(dataHandling.getQueryString('openId')) { if(dataHandling.getQueryString('openId')) {
uni.setStorageSync('openId',dataHandling.getQueryString('openId')) uni.setStorageSync('openId',dataHandling.getQueryString('openId'))
}else if(!uni.getStorageSync('openId')){ }else if(!uni.getStorageSync('openId')){
api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{ api.getWxUserInfo({userApplyType:'1',businessNo:uni.getStorageSync('businessNo')}).then(res=>{
console.log(res); console.log(res);
if(res['success']){ if(res['success']){
...@@ -271,11 +274,6 @@ ...@@ -271,11 +274,6 @@
} }
}) })
} }
if(dataHandling.getQueryString('subscribe')==0 || !uni.getStorageSync('openId')){
this.isNeedOfficialAccountQrcode = true;
}else{
this.isNeedOfficialAccountQrcode = false;
}
if(this.yearWithdrawal.length>0){ if(this.yearWithdrawal.length>0){
this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'}) this.yearWithdrawalInfos.push({...this.yearWithdrawal,withdrawalType:this.withdrawalType?'1':'2'})
} }
...@@ -497,7 +495,7 @@ ...@@ -497,7 +495,7 @@
//增额提领信息校验 //增额提领信息校验
if(this.calcuteType == 1){ if(this.calcuteType == 1){
if(!this.yearWithdrawalInfos[i].withdrawalStart || !this.yearWithdrawalInfos[i].withdrawalEnd || this.yearWithdrawalInfos[i].withdrawalStart<=0 || this.yearWithdrawalInfos[i].withdrawalEnd<=0){ 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; return false;
}else{ }else{
if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){ if(this.yearWithdrawalInfos[i].withdrawalEnd < this.yearWithdrawalInfos[i].withdrawalStart){
...@@ -598,10 +596,7 @@ ...@@ -598,10 +596,7 @@
}, },
resetData(){ resetData(){
this.irrAndSimpleCalcuteParam = {}; this.irrAndSimpleCalcuteParam = {};
this.yearWithdrawalInfos = [{withdrawalType:'1', this.yearWithdrawalInfos = [];
withdrawalStart:undefined,
withdrawalEnd:undefined,
yearWithdrawalAmount:undefined}];
this.withdrawalType = '1'; this.withdrawalType = '1';
this.irrAndSimple = {nyear:undefined,cashValue:undefined}; this.irrAndSimple = {nyear:undefined,cashValue:undefined};
this.resultShowFlag = false; 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