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
+6 -2
View File
@@ -137,7 +137,7 @@
</view>
</mescroll-body>
</view>
<FunctionGuide :maxStep="maxStep" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<FunctionGuide :maxStep="maxStep" @hide="setGuide(pageKeyId)" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
</view>
</template>
@@ -197,7 +197,7 @@ export default {
maxStep() {
const stepsMap = {
0: 1,
1: 1,
1: 2,
}
return stepsMap[this.type] || 1
}
@@ -230,6 +230,7 @@ export default {
this.getMapData()
}
this.init()
this.queryGuide(this.pageKeyId)
},
methods: {
showFunctionGuide() {
@@ -294,6 +295,9 @@ export default {
})
return
} else {
if(this.type === 1) {
this.$refs.FunctionGuide.show = false
}
return
}
},
+63 -62
View File
@@ -162,7 +162,7 @@
:show-avatar="false"
/>
</view>
<FunctionGuide :maxStep="3" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<FunctionGuide @hide="setGuide('findFunIndex')" :maxStep="3" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<xdd-tabbar :curr-index="4" />
</view>
</template>
@@ -226,6 +226,7 @@ export default {
this.getMapData()
})
this.getIcon()
this.queryGuide('findFunIndex')
},
onShow() {
const memCityName = uni.getStorageSync('cityName')
@@ -302,74 +303,74 @@ export default {
tipsPosition: '420rpx',
btnGroupPosition: '',
position: {
top: res.top*2 + 'rpx',
left: res.left*2 + 'rpx',
width: `${res.width*2}rpx`,
height: `${res.height*2}rpx`,
top: res.top + 'px',
left: res.left + 'px',
width: `${res.width}px`,
height: `${res.height}px`,
}
})
})
return
} else {
if(this.functionGuideData.step == 2) {
this._step = this.functionGuideData.step
this._step = this.functionGuideData.step
this.getElementData('#type-box', res=>{
const imgs = [
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-1.png',
style: {
position: 'absolute',
zIndex: 99,
width: '504rpx',
top: 170*2+'rpx',
left: 0+'rpx',
right: 0,
margin: 'auto',
height: '191rpx',
/* px: ; */
this.getElementData('#type-box', res=>{
const imgs = [
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-1.png',
style: {
position: 'absolute',
zIndex: 99,
width: '504rpx',
top: 170*2+'rpx',
left: 0+'rpx',
right: 0,
margin: 'auto',
height: '191rpx',
/* px: ; */
},
isBtn: false
},
isBtn: false
},
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-3.png',
style: {
position: 'absolute',
zIndex: 99,
width: '117rpx',
top: 270*2+'rpx',
left: -160*2+'rpx',
right: 0,
margin: 'auto',
height: '46rpx',
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-3.png',
style: {
position: 'absolute',
zIndex: 99,
width: '117rpx',
top: 270*2+'rpx',
left: -160*2+'rpx',
right: 0,
margin: 'auto',
height: '46rpx',
},
isBtn: 'jump'
},
isBtn: 'jump'
},
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-2.png',
style: {
position: 'absolute',
zIndex: 99,
width: '117rpx',
top: 270*2+'rpx',
left: 160*2+'rpx',
height: '46rpx',
{
url: this.webUrl + '/引导页素材/寻趣味/Group 2/Group 2-2.png',
style: {
position: 'absolute',
zIndex: 99,
width: '117rpx',
top: 270*2+'rpx',
left: 160*2+'rpx',
height: '46rpx',
},
isBtn: 'next'
},
isBtn: 'next'
},
]
this.setFunctionGuideData({
imgs: imgs,
tipsPosition: '420rpx',
btnGroupPosition: '',
position: {
top: res.top*2 + 'rpx',
left: res.left*2 + 'rpx',
width: `${res.width*2}rpx`,
height: `${(res.height-13)*2}rpx`,
}
]
this.setFunctionGuideData({
imgs: imgs,
tipsPosition: '420rpx',
btnGroupPosition: '',
position: {
top: res.top + 'px',
left: res.left + 'px',
width: `${res.width}px`,
height: `${(res.height-20)}px`,
}
})
})
})
return
}
if(this.functionGuideData.step == 3) {
@@ -412,10 +413,10 @@ export default {
tipsPosition: '420rpx',
btnGroupPosition: '',
position: {
top: (res.top-10)*2 + 'rpx',
left: res.left*2 + 'rpx',
width: `${res.width*2}rpx`,
height: `${res.height*2}rpx`,
top: (res.top) + 'px',
left: res.left+10 + 'px',
width: `${res.width-20}px`,
height: `${res.height-20}px`,
}
})
})
+18 -2
View File
@@ -296,11 +296,11 @@
</view>
</view>
<!-- v9 老用户弹窗 -->
<!-- :show="isOldUser && oldUserPopup.image && lotteryCanDraw" -->
<u-popup
mode="center"
bgColor="transparent"
:show="isOldUser && oldUserPopup.image && lotteryCanDraw"
>
<view class="popup-old-user flex flex-col ai-center">
<image
@@ -338,7 +338,7 @@
@ok="handleOk"
paddingBottom="200rpx"
/>
<FunctionGuide :maxStep="15" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<FunctionGuide :maxStep="15" @hide="setGuide('index')" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<xdd-tabbar :curr-index="0" @getElementData="elementData" @getIcon="getIcon"/>
</view>
</template>
@@ -416,6 +416,7 @@ export default {
// uni.hideTabBar()
const _this = this
_this.init()
_this.queryGuide('index')
uni.getSystemInfo({
success: (e) => {
let statusBar = 0
@@ -443,6 +444,7 @@ export default {
this.scrollTop = e.scrollTop
},
methods: {
elementData(e) {
this.tabIconPostion = e
},
@@ -1341,6 +1343,20 @@ export default {
this.$yrouter.push('/pages/shop/GoodSearch/index')
},
goGoodsCon(item) {
if(item.isFarmerShop) {
if (item.farmerShopId === 0) {
uni.showToast({
title: '店铺装修中~',
icon: 'none',
duration: 3000
})
return
}
uni.navigateTo({
url: '/pagesInn/inn/farmerStore?id=' + item.farmerShopId + '&isQianxian=1&from=famous&isFarmer=1'
})
return
}
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
+9 -8
View File
@@ -84,7 +84,7 @@
@changeFun="changeFun"
@ok="handleOk"
/>
<FunctionGuide :maxStep="2" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
<FunctionGuide @hide="setGuide('landmarkGoodsIndex')" :maxStep="2" :guideData="functionGuideData" ref="FunctionGuide"></FunctionGuide>
</view>
</template>
@@ -152,6 +152,7 @@ export default {
this.sceneId = decodeURIComponent(opts.scene).split('&')[0].split('=')[1]
}
this.getNavList()
this.queryGuide('landmarkGoodsIndex')
},
onHide() {
this.pageToHideHandle()
@@ -218,10 +219,10 @@ export default {
tipsPosition: '420rpx',
btnGroupPosition: '',
position: {
top: res.top*2 + 'rpx',
left: res.left*2 + 'rpx',
width: `${res.width*2}rpx`,
height: `${res.height*2}rpx`,
top: res.top + 'px',
left: res.left + 'px',
width: `${res.width}px`,
height: `${res.height}px`,
}
})
})
@@ -283,9 +284,9 @@ export default {
btnGroupPosition: '',
position: {
top: (res.top - res.height + 41)*2 + 'rpx',
left: res.left*2 + 'rpx',
width: `${res.width*2}rpx`,
height: `${(res.height+41)*2}rpx`,
left: res.left + 'px',
width: `${res.width}px`,
height: `${(res.height+41)}px`,
}
})
})