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