提交 91d61ca4 作者: ZhangLingKun

修复:店铺页面跳转

上级 638e0aa3
......@@ -65,8 +65,20 @@ export default {
return {
location: { lat: 22.539692, lng: 113.888588 },
networkTypeList: [
{ type: 0, name: '飞手团队', action: '派单', tagId: 5 },
{ type: 1, name: '租赁商家', action: '租设备', tagId: 3 },
{
type: 0,
name: '飞手团队',
action: '派单',
tagId: 5,
path: '/page-service/service-category/index'
},
{
type: 1,
name: '租赁商家',
action: '租设备',
tagId: 3,
path: '/page-rent/rent-store/index'
},
{ type: 2, name: '培训机构', action: '报名培训', tagId: 4 },
{ type: 3, name: '维修网点', action: '维修设备', tagId: 10 }
],
......@@ -108,7 +120,7 @@ export default {
this.networkList = res.result.list || []
setTimeout(() => {
if (this.networkList.length !== 0) {
this.handleSelect(this.networkList[0])
this.handleSelect(this.networkList[0], 'map')
} else {
this.removeAllOverlay()
}
......@@ -116,7 +128,17 @@ export default {
}
},
// 网点点击事件
handleSelect(e) {
handleSelect(e, from) {
if (from !== 'map') {
// 当前选择的类型
const item = this.networkTypeList[this.currentTypeIndex]
// 如果存在路径
if (item?.path) {
weChatSDK.miniProgram.navigateTo({
url: `${item?.path}?id=${e?.backUserAccountId}`
})
}
}
this.setCenterPoint(e)
},
// 显示网点列表
......@@ -285,11 +307,10 @@ import weChatSDK from 'z-weixin-ts'
},
// 设置中心点
setCenterPoint(e){
console.log('执行到此处 --->',e,this.currentTypeIndex)
this.map.setCenter([e.lon, e.lat])
this.openInfo({position:[e.lon, e.lat],...e});
},
},
}
}
};
</script>
<style lang="scss" scoped>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论