Commit d385bc3e by hxx

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

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