This commit is contained in:
liuye
2024-07-01 13:48:14 +08:00
parent 45fc07c4fe
commit 446dc2c135

View File

@@ -66,7 +66,7 @@
</template>
<script>
import { mapActions, mapState } from 'vuex'
export default {
name: 'StoreDetail',
appName: '门店情况',
@@ -88,18 +88,34 @@ export default {
}
}
},
onLoad(o) {
console.log(234)
console.log(o)
this.shopId = o?.shopId
if (decodeURIComponent(o.scene) != 'undefined') {
this.shopId = decodeURIComponent(o.scene)
computed: {
...mapState(['token']),
},
onLoad(query) {
if (decodeURIComponent(query.scene)) {
this.shopId = decodeURIComponent(query.scene)
}
this.$dict.load(['operatorType', 'shopEvaluateType']).then(() => {
this.getDetail()
this.getAssessList()
this.getTypeNum()
})
if (query.shopId) {
this.shopId = query.shopId
}
if (this.token) {
this.$dict.load(['operatorType', 'shopEvaluateType']).then(() => {
this.getDetail()
this.getAssessList()
this.getTypeNum()
})
} else {
this.autoLogin().then(() => {
this.$dict.load(['operatorType', 'shopEvaluateType']).then(() => {
this.getDetail()
this.getAssessList()
this.getTypeNum()
})
})
}
uni.$on('updateStore', () => {
this.getDetail()
this.getAssessList()
@@ -113,6 +129,7 @@ export default {
})
},
methods: {
...mapActions(['autoLogin']),
getDetail() {
this.$instance.post(`/app/appshoparchives/queryDetailById?id=${this.shopId}`).then(res => {
if (res?.data) {