|
@@ -2,7 +2,7 @@
|
|
* @Author: PoJun
|
|
* @Author: PoJun
|
|
* @Date: 2023-05-15 19:59:55
|
|
* @Date: 2023-05-15 19:59:55
|
|
* @LastEditors: XuanJi
|
|
* @LastEditors: XuanJi
|
|
- * @LastEditTime: 2024-05-21 10:36:13
|
|
|
|
|
|
+ * @LastEditTime: 2024-05-21 12:51:31
|
|
* @Message: Nothing
|
|
* @Message: Nothing
|
|
-->
|
|
-->
|
|
<template>
|
|
<template>
|
|
@@ -100,18 +100,16 @@ export default {
|
|
score: 0,
|
|
score: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onLoad() {
|
|
|
|
- checkAppUpdate();
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
onShow() {
|
|
onShow() {
|
|
- this.times++;
|
|
|
|
- this.showChart = true;
|
|
|
|
|
|
+ if (this.vuex_userInfo) {
|
|
|
|
+ this.showChart = true;
|
|
|
|
+ this.times++;
|
|
|
|
+ } else {
|
|
|
|
+ this.showChart = false;
|
|
|
|
+ }
|
|
console.log("show");
|
|
console.log("show");
|
|
},
|
|
},
|
|
- onHide() {
|
|
|
|
- console.log("hide");
|
|
|
|
- // this.showChart = false;
|
|
|
|
- },
|
|
|
|
methods: {
|
|
methods: {
|
|
toLogin() {
|
|
toLogin() {
|
|
if (!this.vuex_userInfo) {
|
|
if (!this.vuex_userInfo) {
|
|
@@ -123,10 +121,28 @@ export default {
|
|
toAppeal() {
|
|
toAppeal() {
|
|
uni.$uv.route("/subpkg/home/representations");
|
|
uni.$uv.route("/subpkg/home/representations");
|
|
},
|
|
},
|
|
|
|
+ methodToTrigger() {
|
|
|
|
+ // console.log("登录成功后触发");
|
|
|
|
+ this.showChart = false;
|
|
|
|
+ },
|
|
},
|
|
},
|
|
async onLoad() {
|
|
async onLoad() {
|
|
- const res = await getMySupplierInfo();
|
|
|
|
- this.score = res.mark;
|
|
|
|
|
|
+ checkAppUpdate();
|
|
|
|
+ console.log("首页onload");
|
|
|
|
+ if (this.vuex_userInfo) {
|
|
|
|
+ this.showChart = true;
|
|
|
|
+ if (this.vuex_userInfo.attr.BusinessRole == "supplier") {
|
|
|
|
+ const res = await getMySupplierInfo();
|
|
|
|
+ this.score = res.mark;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.showChart = false;
|
|
|
|
+ }
|
|
|
|
+ uni.$on("triggerMethod", this.methodToTrigger);
|
|
|
|
+ },
|
|
|
|
+ onUnload() {
|
|
|
|
+ console.log("首页unload");
|
|
|
|
+ uni.$off("triggerMethod", this.methodToTrigger);
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|