Browse Source

合并下

master
Myth 4 years ago
parent
commit
659711e986
  1. 2
      app.js
  2. 34
      pages/index/index.js
  3. 17
      pages/index/index.wxml
  4. 22
      pages/index/index.wxss
  5. 7
      pages/user/user.js
  6. 4
      pages/user/user.wxml

2
app.js

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

34
pages/index/index.js

@ -29,7 +29,8 @@ Page({
urltopage:{},
scrollLeft:0,
videoPrize:false,
prizeInfo:null
prizeInfo:null,
otherPlat:null
},
onLoad: function (options) {
if(options.from){
@ -260,6 +261,13 @@ Page({
url:"/pages/pbService/web/index"
})
},
gotoMini:function(e){
let appid = e.currentTarget.dataset.appid,path = e.currentTarget.dataset.path
wx.navigateToMiniProgram({
appId: appid,
path:path
})
},
garbage:function(){
wx.navigateToMiniProgram({
appId: 'wx13be821f3b1afed3',
@ -499,8 +507,10 @@ Page({
if(app.globalData.configJson){
this.setData({
indexHot:app.globalData.configJson.indexHot,
isTest:app.globalData.configJson.isTest
isTest:app.globalData.configJson.isTest,
otherPlat:app.globalData.configJson.otherPlats
})
console.log(app.globalData.configJson)
this.getFourProduct()
}
else {
@ -509,6 +519,26 @@ Page({
},300)
}
},
gotoOther:function(e){
let item = e.currentTarget.dataset.item;
if(item.type=='h5'){
app.globalData.weburl = item.url
wx.navigateTo({
url:"/pages/pbService/web/index"
})
}
else if(item.type=='mini'){
wx.navigateToMiniProgram({
appId: item.appid,
path:item.path
})
}
else if(item.type=='page'){
wx.navigateTo({
url: item.page,
})
}
},
/**
* 用户点击右上角分享

17
pages/index/index.wxml

@ -49,7 +49,7 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/icon2.png" mode="widthFix"></image>
<view class="top-icon-text">一卡游苏州</view>
</view>
<view bindtap="gotoPath" data-title="场馆预约" data-path="/pages/list/museum/index" class="top-icon-item">
<view bindtap="gotoPath" data-title="场馆预约" data-path="/pages/list/{{isTest?'scene':'museum'}}/index" class="top-icon-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/icon6.png" mode="widthFix"></image>
<view class="top-icon-text">场馆预约</view>
</view>
@ -259,6 +259,10 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb11.png" mode="widthFix"></image>
<view>文旅单位</view>
</view>
<view bindtap="gotoMini" data-title="国保微展示" data-path="pages/index/index" data-appid="wxe21b8429555d777a" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb12.png" mode="widthFix"></image>
<view>国保微展示</view>
</view>
</view>
</scroll-view>
<view class="scroll-line">
@ -273,10 +277,21 @@
wx:for="{{10}}" src="https://static.ticket.sz-trip.com/xcxImages/index/six{{index+1}}.png" mode="widthFix">
</image>
</view>
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat}}">
<image mode="widthFix" style="width:446rpx" src="https://static.ticket.sz-trip.com/xcxImages/index/title8.png">
</image>
</view>
<view class="other-plats" wx:if="{{otherPlat}}">
<view class="other-plat" wx:for="{{otherPlat}}" bindtap="gotoOther" data-item="{{item}}">
<image src="{{item.icon}}" mode="widthFix"></image>
<view>{{item.name}}</view>
</view>
</view>
<view class="sale-road-boxes" style="margin-top:0">
<image mode="widthFix" style="width:267rpx" src="https://static.ticket.sz-trip.com/xcxImages/index/title4.png">
</image>
</view>
<view class="hot-list" wx:if="{{isTest==false}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number">
<view wx:for="{{list}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}">

22
pages/index/index.wxss

@ -583,4 +583,26 @@
left: 0;
right: 0;
top: 120rpx;
}
.other-plats {
display: flex;
font-size: 25rpx;
margin: 20rpx;
text-align: center;
margin-bottom: 70rpx;
color: #333333;
line-height: 42rpx;
flex-wrap: wrap;
}
.other-plats image {
width: 107rpx;
display: block;
height: 107rpx;
}
.other-plat {
margin-right: 79rpx;
margin-top: 20rpx;
}
.other-plat:nth-child(4n){
margin-right: 0;
}

7
pages/user/user.js

@ -1,6 +1,7 @@
import common from "../../utils/https/common";
// pages/user/user.js
import userApi from "../../utils/https/user"
let app = getApp()
Page({
/**
@ -21,6 +22,12 @@ Page({
})
},
supplier:function(){
app.globalData.weburl = "https://m.cloud.sz-trip.com/Audit"
wx.navigateTo({
url: '/pages/pbService/web/index',
})
},
retail:function(){
common.user_post('commission/getCommissionUser',{}).then(res=>{
if(res.code==0){

4
pages/user/user.wxml

@ -61,9 +61,9 @@
<navigator url="likes/index" class="user-box-line">
我的收藏
</navigator>
<navigator url="../supplier/index" class="user-box-line">
<view bindtap="supplier" class="user-box-line">
商户审核
</navigator>
</view>
<!-- <navigator url="/pages/group/mine/index" class="user-box-line">
我的团购
</navigator>

Loading…
Cancel
Save