Commit d385bc3e by hxx

引导页文案优化,新用户登录弹窗

parent 25f8eedf
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</div> </div>
</div> </div>
<div class="confirm" @click="confirm"> <div class="confirm" @click="confirm">
<p>开启AI之旅</p> <p>{{ tagId !== -1 ? '开启AI之旅' : '请先选择您的身份' }}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
data() { data() {
return { return {
show: false, show: false,
tagId: "", tagId: -1,
list: [], list: [],
} }
}, },
...@@ -62,7 +62,11 @@ export default { ...@@ -62,7 +62,11 @@ export default {
} }
this.getStatus(); this.getStatus();
}, },
mounted() { }, onShow() {
if (wx.getStorageSync('isThereALabelAgain')) {
this.getStatus();
}
},
methods: { methods: {
open() { open() {
this.getTageList(); this.getTageList();
...@@ -79,6 +83,8 @@ export default { ...@@ -79,6 +83,8 @@ export default {
let res = await login.isThereALabel(); let res = await login.isThereALabel();
if (res.data.code == 200 && res.data.data == 'false') { if (res.data.code == 200 && res.data.data == 'false') {
this.open(); this.open();
} else if (res.data.code == 300) { // 当前未登录
wx.setStorageSync('isThereALabelAgain', 'true');
} }
} catch (error) { } catch (error) {
...@@ -95,9 +101,11 @@ export default { ...@@ -95,9 +101,11 @@ export default {
} }
}, },
async confirm() { async confirm() {
if (this.tagId === -1) return;
try { try {
let res = await login.addCustomerRel(this.tagId); let res = await login.addCustomerRel(this.tagId);
if (res.data.data == "true") { if (res.data.data == "true") {
wx.removeStorageSync('isThereALabelAgain');
this.close(); this.close();
} else { } else {
wx.showToast({ wx.showToast({
......
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