Task:指引功能/状态接口对接

This commit is contained in:
modendeveloper
2025-01-19 02:52:58 +08:00
parent 85854ea2f6
commit bd2338f16a
13 changed files with 359 additions and 269 deletions
+37 -1
View File
@@ -1,3 +1,4 @@
import { queryUserGuide, setUserGuide } from '@/api/user'
export default {
data() {
return {
@@ -18,9 +19,44 @@ export default {
}
},
onLoad() {
this.$refs.FunctionGuide.init()
// this.setGuide('countyFamousIndex', 0)
// this.setGuide('landmarkGoodsIndex', 0)
// this.setGuide('findFunIndex', 0)
// this.setGuide('wellnessFoodIndex', 0)
// this.setGuide('ichIndex', 0)
// this.setGuide('wenwanIndex', 0)
// this.setGuide('goodsIndex', 0)
// this.setGuide('index', 0)
},
methods: {
setGuide(type, status = 1) {
const params = {
guideName: type,
guideStatus: status
}
setUserGuide(params).then(res => {
if(type === 'index') {
this.queryGuide(type)
}
})
},
queryGuide(type) {
const params = {
guideName: type
}
queryUserGuide(params).then(res => {
const { data, success } = res
if(success && data.guideStatus === 0) {
this.$refs.FunctionGuide.init()
}
if(type === 'index' && data.guideStatus === 1) {
this.isOldUser = true
}
if(type === 'index' && data.guideStatus === 0) {
this.isOldUser = false
}
})
},
setFunctionGuideData(data) {
this.functionGuideData = {
...this.functionGuideData,