Browse Source

修改游记攻略跳转

master
panyiping 4 years ago
parent
commit
9a393ba039
  1. 2
      app.js
  2. 16
      pages/list/strategy/index.js
  3. 6
      pages/list/strategy/index.wxml
  4. 2
      project.config.json

2
app.js

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

16
pages/list/strategy/index.js

@ -1,5 +1,6 @@
// pages/list/store/index.js
import commonApi from "../../../utils/https/common"
let app = getApp()
Page({
/**
@ -90,7 +91,20 @@ Page({
})
},
gotoGuide: function(e) {
let item = e.currentTarget.dataset.item
if (item.outside_url) {
app.globalData.weburl = item.outside_url
wx.navigateTo({
url: '/pages/pbService/web/index'
})
}
else {
wx.navigateTo({
url: '/pages/info/guideInfo/index?id='+item.id
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/

6
pages/list/strategy/index.wxml

@ -5,7 +5,7 @@
<input type="text" bindinput="changeKeyword" placeholder="请输入搜索关键字" />
<view class="search-btn" bindtap="search">搜索</view>
</view>
<image class="topimg" src="https://m.cloud.sz-trip.com/static/images/TravelNotesIntroduction/topBacThree.png" mode="widthFix"></image>
<image class="topimg" src="https://m.cloud.sz-trip.com/static/images/TravelNotesIntroduction/topBac.png" mode="widthFix"></image>
<view class="types">
<view class="type {{type==1?'active':''}}" bindtap="changeType" data-type="1">
<image wx:if="{{type==1}}" class="bgimg" src="https://m.cloud.sz-trip.com/static/images/TravelNotesIntroduction/navBacActive.png" mode="aspectFill"></image>
@ -38,7 +38,7 @@
</navigator>
</view>
<view class="list" wx:if="{{type==1}}">
<navigator url="/pages/info/guideInfo/index?id={{item.id}}" class="item" wx:for="{{list}}">
<view bindtap="gotoGuide" data-item='{{item}}' url="/pages/info/guideInfo/index?id={{item.id}}" class="item" wx:for="{{list}}">
<view class="title textOver">
<text class="textOver">{{item.title}}</text>
<image wx:if="{{item.is_hot==1}}" src="https://static.ticket.sz-trip.com/xcxImages/listtop/hot.png" mode="widthFix"></image>
@ -50,7 +50,7 @@
<view style="flex:1"></view>
<view class="btn">查看详情 ></view>
</view>
</navigator>
</view>
</view>
<view style="height:60rpx"></view>
<view wx:if="{{list.length==0 && total==0}}" class="common-empty" style="z-index:-1;top:300rpx">

2
project.config.json

@ -4,7 +4,7 @@
"ignore": []
},
"setting": {
"urlCheck": true,
"urlCheck": false,
"es6": true,
"enhance": false,
"postcss": true,

Loading…
Cancel
Save