Browse Source

太仓、工业园区跳转其他小程序

master
chenkainan 4 years ago
parent
commit
e1b367cc05
  1. 2
      app.js
  2. 26
      pages/index/index.js
  3. 13
      pages/list/six/index.js
  4. 2
      pages/list/six/index.wxml

2
app.js

@ -22,7 +22,7 @@ App({
unique_key: "wechatxcx" unique_key: "wechatxcx"
}).then(res => { }).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest41?true:false; data.isTest = data.isTest42?true:false;
this.globalData.configJson = data this.globalData.configJson = data
}) })

26
pages/index/index.js

@ -326,19 +326,19 @@ Page({
}, },
gotoPath: function (e) { gotoPath: function (e) {
console.log(e) console.log(e)
if (e.currentTarget.dataset.event) { // if (e.currentTarget.dataset.event) {
if (e.currentTarget.dataset.event=='gongyeyuanqu_click') { // if (e.currentTarget.dataset.event=='gongyeyuanqu_click') {
wx.navigateToMiniProgram({ // wx.navigateToMiniProgram({
appId: 'wxd323e63a10aa6865', // appId: 'wxd323e63a10aa6865',
path: 'pages/home/index' // path: 'pages/home/index'
}) // })
return // return
}else{ // }else{
this.pagePoint({ // this.pagePoint({
event: e.currentTarget.dataset.event // event: e.currentTarget.dataset.event
}, 1) // }, 1)
} // }
} // }
if (e.currentTarget.dataset.title == '书香借阅') { if (e.currentTarget.dataset.title == '书香借阅') {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx165d4f1727f6bdb0', appId: 'wx165d4f1727f6bdb0',

13
pages/list/six/index.js

@ -35,6 +35,19 @@ Page({
this.getTypes() this.getTypes()
}) })
}, },
gotoPath:function(e){
if(e.currentTarget.dataset.event.area_key == 'taicang'){
wx.navigateToMiniProgram({
appId: 'wx8853b0d93cbca75e',
path: 'pages/home/home'
})
}else if(e.currentTarget.dataset.event.area_key == 'gongyeyuanqu'){
wx.navigateToMiniProgram({
appId: 'wxd323e63a10aa6865',
path: 'pages/home/index'
})
}
},
getTypes:function(){ getTypes:function(){
// 获取苏城六纪下面的分类 // 获取苏城六纪下面的分类
commonApi._post("act/get_type_by_area",{ commonApi._post("act/get_type_by_area",{

2
pages/list/six/index.wxml

@ -3,7 +3,7 @@
<title title="十全街"></title> <title title="十全街"></title>
<!-- <image src="https://resource.sz-trip.com/uploads/20190831/3ecfcb81bab36027606676737788110c.png" mode="aspectFill" class="topbg"></image> --> <!-- <image src="https://resource.sz-trip.com/uploads/20190831/3ecfcb81bab36027606676737788110c.png" mode="aspectFill" class="topbg"></image> -->
<image src="{{areas[areaIndex].img}}" mode="widthFix" class="bannerImg"></image> <image src="{{areas[areaIndex].img}}" mode="widthFix" class="bannerImg" data-event="{{areas[areaIndex]}}" bindtap="gotoPath"></image>
<view class="types-box"> <view class="types-box">
<picker mode="selector" range="{{areas}}" range-key="area_title" bindchange="changeArea"> <picker mode="selector" range="{{areas}}" range-key="area_title" bindchange="changeArea">
<view class="picker active"> <view class="picker active">

Loading…
Cancel
Save