Browse Source

调整

master
nige 3 years ago
parent
commit
8a985c61e1
  1. 6
      app.js
  2. 34
      pages/index/index.js
  3. 4
      pages/index/index.wxml
  4. 97
      pages/info/sceneProductInfo/index.js
  5. 5
      pages/list/activitynew/index.wxml
  6. 9
      pages/list/activitynew/index.wxss
  7. 1
      pages/list/movieticket/list/info/index.wxss
  8. 1
      pages/list/museum/index.wxss

6
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest68? true : false;
data.isTest = data.isTest71? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件
@ -31,6 +31,7 @@ App({
obj[item.id] = item.image
});
this.globalData.configJson.indexSeason = obj
this.globalData.loadIndexSeason = true
})
})
@ -253,6 +254,7 @@ App({
prizeId: null,
loginPageEvent: {
"pages/list/message/index": 'message_login_'
}
},
loadIndexSeason:false
}
})

34
pages/index/index.js

@ -206,6 +206,16 @@ Page({
})
},
//获取季节配置
getIndexSeason(){
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
otherPlat: app.globalData.configJson.otherPlats,
indexSeason: app.globalData.configJson.indexSeason
})
this.getFourProduct()
},
//关闭弹窗广告
closeAdv: function () {
this.setData({
@ -735,20 +745,8 @@ Page({
return
},
onReady: function () {
if (app.globalData.configJson) {
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
otherPlat: app.globalData.configJson.otherPlats,
indexSeason: app.globalData.configJson.indexSeason
})
console.log(app.globalData.configJson)
this.getFourProduct()
} else {
setTimeout(() => {
this.onReady()
}, 300)
}
},
gotoOther: function (e) {
let item = e.currentTarget.dataset.item;
@ -772,6 +770,14 @@ Page({
util.pagePoint(e, type)
},
onShow: function () {
if (app.globalData.loadIndexSeason) {
this.getIndexSeason()
} else {
setTimeout(() => {
this.getIndexSeason()
}, 500)
}
this.pagePoint({
event: 'home_view'
}, 1)

4
pages/index/index.wxml

@ -216,11 +216,11 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image>
<view>书香借阅</view>
</view>
<view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index"
<!-- <view bindtap="gotoPath" data-event="book_click" data-title="文化配送" data-path="/pages/culture/index"
class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20220818/e02af6e8bf9170060ed7295d367d72c1.png" mode="widthFix"></image>
<view>文化配送</view>
</view>
</view> -->
<view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展"
data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb13.png" mode="widthFix"></image>

97
pages/info/sceneProductInfo/index.js

@ -32,41 +32,7 @@ Page({
cartTop: 0,
top: 0,
skuList: [], //立即预定的列表
sku_ids: [
353954,
353950,
353949,
353951,
353947,
353953,
353685,
353684,
353952,
353686,
353948,
354730,
354409,
354359,
345343,
354756,
354385,
354360,
354361,
354362,
355466,
355465,
356230,
356223,
356207,
346648,
357518,
356233,
354381,
354384,
356324,
354737,
355467,
]
sku_ids: []
},
/**
@ -89,6 +55,7 @@ Page({
commonApi._post("scene/detail", {
id: options.id
}).then(res => {
let flag = false
if (!res.data) {
wx.showToast({
title: '产品已下架',
@ -122,22 +89,58 @@ Page({
if (pItem) {
res.data.product = [pItem];
}
} else if (options.zhuanti_type == "yihuFree") {
let skuArr = this.data.sku_ids
let newArr = []
for (let i = 0; i < res.data.product.length; i++) { //3
for (let j = 0; j < res.data.product[i].sku.length; j++) { //4
for (let k = 0; k < skuArr.length; k++) {
if (res.data.product[i].sku[j].id == skuArr[k]) {
newArr.push(res.data.product[i].sku[j])
} else if (options.zhuanti_type) {
flag = true
commonApi._post("theme/getYihuFreeList", {
zhuanti_type: options.zhuanti_type
}).then(res1 => {
let skuArr = res1.data.sku_ids
let newArr = []
for (let i = 0; i < res.data.product.length; i++) { //3
for (let j = 0; j < res.data.product[i].sku.length; j++) { //4
for (let k = 0; k < skuArr.length; k++) {
if (res.data.product[i].sku[j].id == skuArr[k]) {
newArr.push(res.data.product[i].sku[j])
}
}
}
res.data.product[i].sku = newArr;
}
res.data.product[i].sku = newArr;
}
res.data.product.map(product => {
product.sku.map(sku => {
sku.display_tags = (sku.display_tags ? sku.display_tags.split(",") : []).splice(0, 2);
})
})
this.setData({
info: res.data
})
var arr = []
res.data.product.forEach((item, index) => {
item.sku.forEach(itemB => {
itemB.proIndex = index
arr.push(itemB)
})
});
this.setData({
skuList: arr
})
util.pagePoint({
event: 'scene_view',
param: {
type: res.data.type,
id: res.data.id
}
}, 1)
this.BroswerRecord()
})
}
console.log(res.data.product);
if (flag) {
return
}
// res.data.listimg = res.data.listimg?res.data.listimg.split(","):[];
res.data.product.map(product => {
product.sku.map(sku => {

5
pages/list/activitynew/index.wxml

@ -95,11 +95,14 @@
<view wx:if="{{list.length>0 && type==4 && movieType!=2}}">
<view bindtap="gotoDetail" data-item="{{item}}" class="activity-item activity-item-out" style="margin-top:0" wx:for="{{list}}">
<common-image width="180rpx" height='180rpx' src="{{item.headimg}}" mode="aspectFill"></common-image>
<view style="height:180rpx;margin:0;margin-left:20rpx;display:block" class="activity-info">
<view style="height:180rpx;margin:0;margin-left:20rpx;display:block;max-width:327rpx" class="activity-info">
<view class="activity-title textOver2" style="margin-bottom:20rpx">{{item.title}}</view>
<view class="textOver" wx:if="{{item.director}}" style="margin-bottom:10rpx">导演:{{item.director}}</view>
<view class="textOver2" wx:if="{{item.leading_role}}">主演:{{item.leading_role}}</view>
</view>
<view class="btn">
查看
</view>
</view>
</view>
<view wx:if="{{list.length>0 && type==4 && movieType==2}}">

9
pages/list/activitynew/index.wxss

@ -291,3 +291,12 @@ background: rgba(11, 137, 142, .1);
display: flex;
justify-content: space-between;
}
.btn{
flex-shrink: 0;
color: #fff;
background: #f55;
font-size: 26rpx;
padding: 6rpx 20rpx;
border-radius: 40rpx;
margin-left: 10rpx;
}

1
pages/list/movieticket/list/info/index.wxss

@ -34,6 +34,7 @@
box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.06);
border-radius: 27rpx 27rpx 0px 0px;
padding: 0 40rpx;
padding-bottom: 60rpx;
}
.content .title {
font-size: 33rpx;

1
pages/list/museum/index.wxss

@ -55,6 +55,7 @@ page {
}
.info .address {
margin-bottom: 15rpx;
max-width: 320rpx;
}
.info .com-flex {
width: 240rpx;

Loading…
Cancel
Save