Browse Source

Merge pull request 'master' (#4) from master into dev

Reviewed-on: http://code.xmainc.com:3000/panyiping/jundaosuzhou_wechatxcx/pulls/4
master
chenkainan 4 years ago
parent
commit
9598885e09
  1. 4
      app.js
  2. 8
      app.json
  3. 256
      pages/index/index.js
  4. 38
      pages/index/index.wxml
  5. 53
      pages/index/index.wxss
  6. 13
      pages/info/hotelProductInfo/index.js
  7. 18
      pages/info/hotelProductInfo/index.wxml
  8. 38
      pages/info/hotelProductInfo/index.wxss
  9. 17
      pages/info/postProductInfo/index.js
  10. 20
      pages/info/postProductInfo/index.wxml
  11. 38
      pages/info/postProductInfo/index.wxss
  12. 17
      pages/info/sceneProductInfo/index.js
  13. 81
      pages/info/sceneProductInfo/index.wxml
  14. 45
      pages/info/sceneProductInfo/index.wxss
  15. 4
      pages/list/activitynew/index.wxml
  16. 46
      pages/list/comments/index.js
  17. 12
      pages/list/comments/index.wxml
  18. 29
      pages/list/comments/index.wxss
  19. 193
      pages/order/comment/index.js
  20. 17
      pages/order/comment/index.wxml
  21. 80
      pages/order/comment/index.wxss
  22. 3
      pages/order/postOrder/index.js
  23. 17
      pages/order/scene/index.js
  24. 4
      pages/pbService/index.wxml
  25. 3
      pages/user/cartlist/list.wxml
  26. 2
      pages/user/order/list.wxml
  27. 7
      pages/user/order/postOrderInfo/index.js
  28. 228
      pages/user/personalInfo/index.js
  29. 5
      pages/user/personalInfo/index.json
  30. 37
      pages/user/personalInfo/index.wxml
  31. 77
      pages/user/personalInfo/index.wxss
  32. 30
      pages/user/service/list/index.js
  33. 27
      pages/user/service/list/index.wxml
  34. 93
      pages/user/service/list/index.wxss
  35. 15
      pages/user/user.wxml
  36. 71
      pages/user/userPrivacy/index.js
  37. 5
      pages/user/userPrivacy/index.json
  38. 11
      pages/user/userPrivacy/index.wxml
  39. 9
      pages/user/userPrivacy/index.wxss

4
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.isTest30?true:false; data.isTest = data.isTest36?true:false;
this.globalData.configJson = data this.globalData.configJson = data
}) })
@ -146,7 +146,7 @@ App({
ticketProduct:[], ticketProduct:[],
index: 0, index: 0,
createDate: null, createDate: null,
list: [], list: null,
productPrice: 0, productPrice: 0,
ticketPrice: 0, ticketPrice: 0,
productState:{ productState:{

8
app.json

@ -179,11 +179,15 @@
"pages/order/orderList/index", "pages/order/orderList/index",
"pages/user/linkman/add/index", "pages/user/linkman/add/index",
"pages/user/address/add/index", "pages/user/address/add/index",
"pages/user/linkman/index" "pages/user/linkman/index",
"pages/user/userPrivacy/index",
"pages/user/personalInfo/index"
], ],
"plugins": { "plugins": {
"live-player-plugin": { "live-player-plugin": {
"version": "1.3.0", "version": "1.3.5",
"provider": "wx2b03c6e691cd7370" "provider": "wx2b03c6e691cd7370"
} }
}, },

256
pages/index/index.js

@ -33,14 +33,55 @@ Page({
otherPlat: null, otherPlat: null,
activeBannerIndex: 0, activeBannerIndex: 0,
smBannerIndex: 0, smBannerIndex: 0,
indexSeason: {} indexSeason: {},
startList: [], // 启动页广告
alertSwipeList: [], //弹窗广告
showAdv: false, //弹窗开关
showFullAdv: true, //全屏广告开关
time: 5, //全屏广告剩余时间
showTime:false,
}, },
onLoad: function (options) { onLoad: function (options) {
//全屏广告
wx.hideTabBar() //这里隐藏了底部导航栏
commonApi._post("adv/getAdv", {
position: 2,
type_id: 5
}).then(res => {
if (res.data.length > 0) {
this.setData({
showTime:true
})
var timer = setInterval(() => {
this.setData({
time: this.data.time - 1
})
if (this.data.time == 0) {
timer = null
this.setData({
showFullAdv: false
})
if (this.data.alertSwipeList.length==0) {
wx.showTabBar() //倒计时结束清楚定时器显示导航栏
}
}
}, 1000)
this.setData({
startList: res.data || []
})
}else{
this.setData({
showFullAdv: false
})
}
})
if (options.from) { if (options.from) {
app.globalData.from = options.from; app.globalData.from = options.from;
} }
let systemInfo = wx.getSystemInfoSync(), rect = wx.getMenuButtonBoundingClientRect(); let systemInfo = wx.getSystemInfoSync(),
rect = wx.getMenuButtonBoundingClientRect();
let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height; let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height;
wx.getLocation({ wx.getLocation({
type: 'gcj02', type: 'gcj02',
@ -147,6 +188,43 @@ Page({
xiaobanner: res.data || [] xiaobanner: res.data || []
}) })
}) })
//弹窗广告
commonApi._post("adv/getAdv", {
position: 3,
type_id: 5
}).then(res => {
if (res.data.length > 0) {
this.setData({
alertSwipeList: res.data || [],
showAdv: true
})
}else if(!this.data.showFullAdv){
wx.showTabBar({
animation: true,
})
}
})
},
//关闭弹窗广告
closeAdv: function () {
this.setData({
showAdv: false
})
wx.showTabBar({
animation: true,
})
},
//关闭全屏广告
closeFullAdv:function(){
this.setData({
showFullAdv:false
})
if (!this.data.alertSwipeList.length>0) {
wx.showTabBar({
animation: true,
})
}
}, },
getWeather: function () { getWeather: function () {
commonApi._post('pbservice/Ztfw/getWeather').then(res => { commonApi._post('pbservice/Ztfw/getWeather').then(res => {
@ -156,8 +234,7 @@ Page({
}) })
}) })
}, },
saleDetail: function () { saleDetail: function () {},
},
getTwoProduct: function () { getTwoProduct: function () {
// 获取首页限时特惠 // 获取首页限时特惠
commonApi._post('act/fast_sale_now', { commonApi._post('act/fast_sale_now', {
@ -209,17 +286,18 @@ Page({
}) })
}, },
getFourProduct: function () { getFourProduct: function () {
let item = this.data.indexHot[this.data.hotIndex], service = "product/get_product_by_tag", data = { let item = this.data.indexHot[this.data.hotIndex],
tag_id: item.id, service = "product/get_product_by_tag",
offset: 0, data = {
limit: 4, tag_id: item.id,
sort: 'weight', offset: 0,
order: 'desc' limit: 4,
}; sort: 'weight',
order: 'desc'
};
if (item.type == 'scene') { if (item.type == 'scene') {
service = "scene/get_scene_by_tag"; service = "scene/get_scene_by_tag";
} } else if (item.type == 'movie') {
else if (item.type == 'movie') {
service = "Cinema/getHotMovieList"; service = "Cinema/getHotMovieList";
data = { data = {
page: 1, page: 1,
@ -238,8 +316,7 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + item.title, url: '/pages/list/movieticket/list/info/index?id=' + item.third_id + '&title=' + item.title,
}) })
} } else {
else {
util.gotoDetail(item) util.gotoDetail(item)
} }
}, },
@ -248,9 +325,11 @@ Page({
util.gotoDetail(item) util.gotoDetail(item)
}, },
gotoPath: function (e) { gotoPath: function (e) {
console.log(e) console.log(e)
if (e.currentTarget.dataset.event) { if (e.currentTarget.dataset.event) {
this.pagePoint({ event: e.currentTarget.dataset.event }, 1) this.pagePoint({
event: e.currentTarget.dataset.event
}, 1)
} }
if (e.currentTarget.dataset.title == '书香借阅') { if (e.currentTarget.dataset.title == '书香借阅') {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
@ -258,7 +337,7 @@ Page({
path: 'pages/home/home' path: 'pages/home/home'
}) })
return; return;
}else if (e.currentTarget.dataset.title == '12348') { } else if (e.currentTarget.dataset.title == '12348') {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wxcdfd45c001466ba3', appId: 'wxcdfd45c001466ba3',
path: 'pages/index/index' path: 'pages/index/index'
@ -280,7 +359,9 @@ Page({
}, },
gotoUrl: function (e) { gotoUrl: function (e) {
if (e.currentTarget.dataset.event) { if (e.currentTarget.dataset.event) {
this.pagePoint({ event: e.currentTarget.dataset.event }, 1) this.pagePoint({
event: e.currentTarget.dataset.event
}, 1)
} }
let url = e.currentTarget.dataset.url; let url = e.currentTarget.dataset.url;
app.globalData.weburl = url; app.globalData.weburl = url;
@ -289,7 +370,8 @@ Page({
}) })
}, },
gotoMini: function (e) { gotoMini: function (e) {
let appid = e.currentTarget.dataset.appid, path = e.currentTarget.dataset.path let appid = e.currentTarget.dataset.appid,
path = e.currentTarget.dataset.path
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: appid, appId: appid,
path: path path: path
@ -334,8 +416,7 @@ Page({
res.data.map(item => { res.data.map(item => {
if (item.ext.display_tags) { if (item.ext.display_tags) {
item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2) item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2)
} } else {
else {
item.ext.display_tags = [] item.ext.display_tags = []
} }
}) })
@ -366,8 +447,7 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/strategyInfo/index?id=' + item.s_id, url: '/pages/info/strategyInfo/index?id=' + item.s_id,
}) })
} } else {
else {
util.gotoDetail(item.ext); util.gotoDetail(item.ext);
} }
}, },
@ -407,24 +487,22 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/pbService/web/index" url: "/pages/pbService/web/index"
}) })
} } else {
else {
let page = item.tdata.split("/"); let page = item.tdata.split("/");
page = page[page.length - 1].split("?") page = page[page.length - 1].split("?")
console.log(page[0]) console.log(page[0])
let url = this.data.urltopage[page[0]]; let url = this.data.urltopage[page[0]];
if (url && url.indexOf('map') != -1) { if (url && url.indexOf('map') != -1) {
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'], type = page[1] ? page[1].split("=") : []; let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'],
type = page[1] ? page[1].split("=") : [];
wx.reLaunch({ wx.reLaunch({
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null)
}) })
} } else if (url) {
else if (url) {
wx.navigateTo({ wx.navigateTo({
url: url, url: url,
}) })
} } else {
else {
app.globalData.weburl = item.tdata; app.globalData.weburl = item.tdata;
wx.navigateTo({ wx.navigateTo({
url: "/pages/pbService/web/index" url: "/pages/pbService/web/index"
@ -439,8 +517,7 @@ Page({
let weburl = item.tdata.page let weburl = item.tdata.page
if (weburl.indexOf('?') != -1) { if (weburl.indexOf('?') != -1) {
weburl += '&authCode=' + res.data; weburl += '&authCode=' + res.data;
} } else {
else {
weburl += '?authCode=' + res.data weburl += '?authCode=' + res.data
} }
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
@ -453,8 +530,7 @@ Page({
path: item.tdata.page path: item.tdata.page
}) })
}) })
} } else {
else {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: item.tdata.appid, appId: item.tdata.appid,
path: item.tdata.page path: item.tdata.page
@ -476,19 +552,16 @@ Page({
appId: info[0], appId: info[0],
path: info[1] path: info[1]
}) })
} } else if (item.href.indexOf('map/index') != -1) {
else if (item.href.indexOf('map/index') != -1) {
wx.reLaunch({ wx.reLaunch({
url: item.href url: item.href
}) })
} } else {
else {
wx.navigateTo({ wx.navigateTo({
url: item.href, url: item.href,
}) })
} }
} } else if (item.action == "web") {
else if (item.action == "web") {
app.globalData.weburl = item.href; app.globalData.weburl = item.href;
wx.navigateTo({ wx.navigateTo({
url: "/pages/pbService/web/index", url: "/pages/pbService/web/index",
@ -541,6 +614,91 @@ Page({
} }
}) })
}, },
bannerJumpNew(item) {
let that = this
item = item.currentTarget.dataset.item
if (item.tdata == '') return
that.pagePoint({
event: "banner_click",
type: 'banner'
}, 1)
switch (item.jump_type) {
case 0:
break;
case 1:
util.gotoDetail(item.product_model)
break;
case 2:
if (item.front_model && item.front_model.mini) {
wx.navigateTo({
url: "/" + item.front_model.mini
})
}
break;
case 3:
if ((item.tdata.indexOf('http://') != -1 || item.tdata.indexOf('https://') != -1) && item.tdata.indexOf('m.cloud.sz-trip.com') == -1) {
// 外部h5
console.log(item.tdata)
app.globalData.weburl = item.tdata;
wx.navigateTo({
url: "/pages/pbService/web/index"
})
} else {
let page = item.tdata.split("/");
page = page[page.length - 1].split("?")
console.log(page[0])
let url = this.data.urltopage[page[0]];
if (url && url.indexOf('map') != -1) {
let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', 'cinema', 'academes'],
type = page[1] ? page[1].split("=") : [];
wx.reLaunch({
url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null)
})
} else if (url) {
wx.navigateTo({
url: url,
})
} else {
app.globalData.weburl = item.tdata;
wx.navigateTo({
url: "/pages/pbService/web/index"
})
}
}
break;
case 4:
if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) {
// 如果是苏心游的小程序 直接把authCode带过去
userApi.user_post("user/getJumpThirdAppCode", {}).then(res => {
let weburl = item.tdata.page
if (weburl.indexOf('?') != -1) {
weburl += '&authCode=' + res.data;
} else {
weburl += '?authCode=' + res.data
}
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: weburl
})
}).catch(err => {
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: item.tdata.page
})
})
} else {
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: item.tdata.page
})
}
break;
default:
break;
}
return
},
onReady: function () { onReady: function () {
if (app.globalData.configJson) { if (app.globalData.configJson) {
this.setData({ this.setData({
@ -551,8 +709,7 @@ Page({
}) })
console.log(app.globalData.configJson) console.log(app.globalData.configJson)
this.getFourProduct() this.getFourProduct()
} } else {
else {
setTimeout(() => { setTimeout(() => {
this.onReady() this.onReady()
}, 300) }, 300)
@ -565,14 +722,12 @@ Page({
wx.navigateTo({ wx.navigateTo({
url: "/pages/pbService/web/index" url: "/pages/pbService/web/index"
}) })
} } else if (item.type == 'mini') {
else if (item.type == 'mini') {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: item.appid, appId: item.appid,
path: item.path path: item.path
}) })
} } else if (item.type == 'page') {
else if (item.type == 'page') {
wx.navigateTo({ wx.navigateTo({
url: item.page, url: item.page,
}) })
@ -582,7 +737,10 @@ Page({
util.pagePoint(e, type) util.pagePoint(e, type)
}, },
onShow: function () { onShow: function () {
this.pagePoint({ event: 'home_view' }, 1) this.pagePoint({
event: 'home_view'
}, 1)
this.data.time!=5?wx.showTabBar():1
}, },
/** /**
@ -591,4 +749,4 @@ Page({
onShareAppMessage: function () { onShareAppMessage: function () {
} }
}) })

38
pages/index/index.wxml

@ -20,11 +20,11 @@
<view class="textOver">搜索想要的旅游产品或服务</view> <view class="textOver">搜索想要的旅游产品或服务</view>
</navigator> </navigator>
</view> </view>
<view style="position:relative"> <view style="position:relative" >
<swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeBannerIndex"> <swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeBannerIndex">
<block wx:for="{{banner}}" wx:key="*this"> <block wx:for="{{banner}}" wx:key="*this">
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <swiper-item bindtap="bannerClick" data-item="{{item}}">
<image src="{{item.head_img}}" mode="aspectFill"></image> <image src="{{item.head_img}}" mode="scaleToFill"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -197,8 +197,8 @@
</view> </view>
<view bindtap="gotoUrl" data-event="book_click" data-title="文博会" data-url="https://yscbh.sz-trip.com/" <view bindtap="gotoUrl" data-event="book_click" data-title="文博会" data-url="https://yscbh.sz-trip.com/"
class="pbservice-item"> class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20220806/c544e31e5c9c910292450b2c349ae6e2.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20220810/ceb07b75aa3df20d7f1de22e2588332a.png" mode="widthFix"></image>
<view>文博会</view> <view>云上文博会</view>
</view> </view>
<view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展" <view bindtap="gotoUrl" data-event="cloud_click" data-title="云上观展"
data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item"> data-url="https://m.cloud.sz-trip.com/CloudPerform2022" class="pbservice-item">
@ -220,6 +220,11 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/newpb5.png" mode="widthFix"></image>
<view>书香借阅</view> <view>书香借阅</view>
</view> </view>
<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>
</scroll-view> </scroll-view>
<view class="scroll-line"> <view class="scroll-line">
@ -411,4 +416,27 @@
<image bindtap="closePrice" style="width:80rpx;margin-top:40rpx" <image bindtap="closePrice" style="width:80rpx;margin-top:40rpx"
src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/allclose.png" mode="widthFix"></image> src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/allclose.png" mode="widthFix"></image>
</view> </view>
</view> </view>
<!-- 广告弹窗 -->
<view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}" ></view>
<view class="alertavd" wx:if="{{showAdv}}">
<swiper class="alertsp" indicator-dots='{{true}}' indicator-color="rgba(255,255,255,0.5)" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}" indicator-active-color="white">
<block wx:for="{{alertSwipeList}}" wx:key="*this">
<swiper-item data-item="{{item}}" bindtap="bannerJumpNew" >
<image src="{{item.head_img}}" style="width: 100%;height: 100%;" mode="widthFix"></image>
</swiper-item>
</block>
</swiper>
<image bindtap="closeAdv" style="width: 100rpx; height: 100rpx;transform: translate(200rpx,6rpx);" src="https://static.ticket.sz-trip.com/uploads/20220810/f4bb1a4f0b5eb394e6ca6e4f03aaa1e0.png"></image>
</view>
<!-- 广告弹窗结束 -->
<view class="fullavd" wx:if="{{showFullAdv}}">
<view class="time" bindtap="closeFullAdv" wx:if="{{showTime}}">跳过 {{time}}</view>
<swiper class="fullsp" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}" indicator-active-color="white">
<block wx:for="{{startList}}" wx:key="*this">
<swiper-item data-item="{{item}}" bindtap="bannerJumpNew" >
<image src="{{item.head_img}}" style="width: 100%;height: 100%;" mode="widthFix"></image>
</swiper-item>
</block>
</swiper>
</view>

53
pages/index/index.wxss

@ -669,4 +669,57 @@
width: 20rpx; width: 20rpx;
height: 7rpx; height: 7rpx;
border-radius: 3rpx; border-radius: 3rpx;
}
/* 弹窗广告 */
.zzc{
background: gray;
position: fixed;
left: 0px;
top: 0px;
width:100%;
height: 100%;
z-index: 998;
filter: alpha(opacity=80);
opacity: 0.8 !important;
}
.alertavd{
width: 500rpx;
height: 500rpx;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-250rpx,-150rpx);
z-index: 999;
}
.alertsp{
width: 100%;
height: 100%;
z-index: 1000;
}
.fullavd{
position: fixed;
left: 0px;
top: 0px;
width:100%;
height: 100%;
z-index: 1001;
background-color: #fff;
}
.fullsp{
width: 100%;
height: 100%;
}
.time{
width: 150rpx;
height: 60rpx;
background-color: #999999;
color: #fff;
position: absolute;
right: 20rpx;
top: 200rpx;
border-radius:6rpx ;
text-align: center;
line-height: 60rpx;
z-index: 1002;
} }

13
pages/info/hotelProductInfo/index.js

@ -215,9 +215,20 @@ Page({
item.rate = Number(item.rate) item.rate = Number(item.rate)
}) })
this.setData({ this.setData({
comment: res.data.list, comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
let arr = this.data.comment
arr.map((item)=>{
if (item.img_list) {
item.img_list = item.img_list.split(',')
}else{
item.img_list=[]
}
})
this.setData({
comment:arr
})
}) })
}, },
like: function () { like: function () {

18
pages/info/hotelProductInfo/index.wxml

@ -95,22 +95,34 @@
<view class="box"> <view class="box">
<view class="box-top"> <view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text> <text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text>
<text class="all-comment-num">共{{commentTotal}}条</text> <navigator url="/pages/list/comments/index?sceneid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
</navigator>
</view> </view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}"> <view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view> <view>这里空空如也,快去点评吧!</view>
<!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> --> <!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> -->
</view> </view>
<navigator wx:for="{{comment}}" url="/pages/list/comments/index?id={{info.id}}" class="product-comment"> <navigator wx:for="{{comment}}" wx:for-index="index" url="/pages/list/comments/index?id={{info.id}}&&index={{index}}" class="product-comment">
<view class="product-comment-top"> <view class="product-comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image> <image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="comment-info"> <view class="comment-info">
<view class="nickname">{{item.user.nickname}}</view> <view class="nickname">{{item.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view> <view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view> </view>
<view class="comment-date">{{item.create_time}}</view> <view class="comment-date">{{item.create_time}}</view>
</view> </view>
<view class="comment-content">{{item.content}}</view> <view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}">
<view class="img-box" wx:for="{{item.img_list}}" wx:for-index="index" wx:for-item="img" mode="scaleToFill" data-img="{{img}}" data-list="{{item.img_list}}">
<image wx:if="{{index<6}}" class="imgs" src="{{img}}" bindtap="imgsc">
</image>
<view class="all" wx:if="{{index==5}}" >
<view>共{{item.img_list.length}}张</view>
<view>查看全部</view>
</view>
</view>
</view>
<view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">查看全部点评<text class="iconfont icon-you"></text></navigator> <navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">查看全部点评<text class="iconfont icon-you"></text></navigator>
</view> </view>

38
pages/info/hotelProductInfo/index.wxss

@ -269,7 +269,7 @@ page {
margin-right: 6rpx; margin-right: 6rpx;
} }
.comment-content { .comment-content {
margin-left: 72rpx; margin-left: 12rpx;
margin-top: 36rpx; margin-top: 36rpx;
font-size: 28rpx; font-size: 28rpx;
color: #000; color: #000;
@ -550,4 +550,40 @@ page {
font-size: 31rpx; font-size: 31rpx;
font-weight: 500; font-weight: 500;
margin-top: 50rpx; margin-top: 50rpx;
}
.imgs{
width: 200rpx;
height: 200rpx;
margin: 10rpx;
border-radius: 8rpx;
}
.img-box{
display: inline-block;
position: relative;
}
.all{
color: #fff;
position:absolute;
bottom: 17rpx;
right: 10rpx;
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background-color: rgba(0, 0, 0, .5);
}
.all view{
text-align: center;
}
.all view:first-child{
font-size: 45rpx;
margin-top: 40rpx;
}
.all view:last-child{
margin-top: 10rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

17
pages/info/postProductInfo/index.js

@ -87,11 +87,24 @@ Page({
}).then(res => { }).then(res => {
res.data.list.map(item => { res.data.list.map(item => {
item.rate = Number(item.rate) item.rate = Number(item.rate)
item.create_time = item.create_time.substring(0,10)
}) })
this.setData({ this.setData({
comment: res.data.list, comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
let arr = this.data.comment
arr.map((item)=>{
if (item.img_list) {
item.img_list = item.img_list.split(',')
}else{
item.img_list=[]
}
})
this.setData({
comment:arr
})
}) })
}, },
@ -243,7 +256,7 @@ Page({
}) })
}, },
order: function () { order: function () {
app.globalData.postProduct = [] app.globalData.postProduct = null
app.globalData.list = [] app.globalData.list = []
if (this.data.skuFlag == 'order') { if (this.data.skuFlag == 'order') {
util.pagePoint({ util.pagePoint({

20
pages/info/postProductInfo/index.wxml

@ -56,23 +56,35 @@
<view class="box-top"> <view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" <text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score"
wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text> wx:if="{{info && info.rate && commentTotal>0}}">{{info.rate}}分</text>
<text class="all-comment-num">共{{commentTotal}}条</text> <navigator url="/pages/list/comments/index?productid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
</navigator>
</view> </view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}"> <view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view> <view>这里空空如也,快去点评吧!</view>
<!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> --> <!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> -->
</view> </view>
<navigator wx:for="{{comment}}" url="/pages/list/comments/index?productid={{id}}" class="product-comment"> <navigator wx:for="{{comment}}" wx:for-index="index" url="/pages/list/comments/index?productid={{id}}&&index={{index}}" class="product-comment">
<view class="product-comment-top"> <view class="product-comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image> <image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="comment-info"> <view class="comment-info">
<view class="nickname">{{item.user.nickname}}</view> <view class="nickname">{{item.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text <view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text
wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view> wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view> </view>
<view class="comment-date">{{item.create_time}}</view> <!-- <view class="comment-date">{{item.create_time}}</view> -->
</view> </view>
<view class="comment-content">{{item.content}}</view> <view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}">
<view class="img-box" wx:for="{{item.img_list}}" wx:for-index="index" wx:for-item="img" mode="scaleToFill" data-img="{{img}}" data-list="{{item.img_list}}">
<image wx:if="{{index<6}}" class="imgs" src="{{img}}" bindtap="imgsc">
</image>
<view class="all" wx:if="{{index==5}}" >
<view>共{{item.img_list.length}}张</view>
<view>查看全部</view>
</view>
</view>
</view>
<view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn"> <navigator url="/pages/list/comments/index?productid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator> 查看全部点评<text class="iconfont icon-you"></text></navigator>

38
pages/info/postProductInfo/index.wxss

@ -312,7 +312,7 @@ page {
} }
.comment-content { .comment-content {
margin-left: 72rpx; margin-left: 13rpx;
margin-top: 36rpx; margin-top: 36rpx;
font-size: 28rpx; font-size: 28rpx;
color: #000; color: #000;
@ -806,4 +806,40 @@ page {
.mask-allowance .mask-content .rule-title { .mask-allowance .mask-content .rule-title {
text-align: center; text-align: center;
margin-bottom: 20rpx; margin-bottom: 20rpx;
}
.imgs{
width: 200rpx;
height: 200rpx;
margin: 10rpx;
border-radius: 8rpx;
}
.img-box{
display: inline-block;
position: relative;
}
.all{
color: #fff;
position:absolute;
bottom: 17rpx;
right: 10rpx;
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background-color: rgba(0, 0, 0, .5);
}
.all view{
text-align: center;
}
.all view:first-child{
font-size: 45rpx;
margin-top: 40rpx;
}
.all view:last-child{
margin-top: 10rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

17
pages/info/sceneProductInfo/index.js

@ -96,6 +96,7 @@ Page({
this.setData({ this.setData({
info: res.data info: res.data
}) })
console.log(this.data.info);
util.pagePoint({ event: 'scene_view', param: { type: res.data.type, id: res.data.id } }, 1) util.pagePoint({ event: 'scene_view', param: { type: res.data.type, id: res.data.id } }, 1)
this.BroswerRecord() this.BroswerRecord()
}) })
@ -127,10 +128,22 @@ Page({
item.rate = Number(item.rate) item.rate = Number(item.rate)
}) })
this.setData({ this.setData({
comment: res.data.list.splice(0, 3), comment: res.data.list.splice(0, 2),
commentTotal: res.data.total commentTotal: res.data.total
}) })
console.log(res) let arr = this.data.comment
arr.map((item)=>{
if (item.img_list) {
let arr = item.img_list.split(',')
item.img_list = arr
}else{
item.img_list=[]
}
})
this.setData({
comment:arr
})
}) })
}, },
changeAllowance: function () { changeAllowance: function () {

81
pages/info/sceneProductInfo/index.wxml

@ -3,14 +3,12 @@
<title title="产品详情"></title> <title title="产品详情"></title>
<view class="iconfont icon-fenxiang" bindtap="share"></view> <view class="iconfont icon-fenxiang" bindtap="share"></view>
<!-- <view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}" bindtap="like"></view> --> <!-- <view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}" bindtap="like"></view> -->
<image wx:for="{{info.product}}" style="{{aniSkuIndex==index?('top:689px;'):('top:'+top+'px;'+cartImgInfo)}}" <image wx:for="{{info.product}}" style="{{aniSkuIndex==index?('top:689px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{item.headimg}}" mode="aspectFill"></image>
class="headimg{{aniSkuIndex==index?' active':''}}" src="{{item.headimg}}" mode="aspectFill"></image>
<!-- <view class="audio-box" bindtap="audioGuide"> <!-- <view class="audio-box" bindtap="audioGuide">
<view>语音导览</view> <view>语音导览</view>
<image src="https://static.ticket.sz-trip.com/xcxImages/info/play-btn.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/info/play-btn.png" mode="widthFix"></image>
</view> --> </view> -->
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}" <swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{true}}" interval="{{2000}}" duration="{{300}}">
duration="{{300}}">
<block wx:for="{{info.listimg}}" wx:key="*this"> <block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item> <swiper-item>
<image src="{{item}}" mode="aspectFill"></image> <image src="{{item}}" mode="aspectFill"></image>
@ -26,16 +24,13 @@
</view> </view>
<view class="tags-box address-box" style="height:auto"> <view class="tags-box address-box" style="height:auto">
<view class="info-address">开园时间:{{info.open_time}}</view> <view class="info-address">开园时间:{{info.open_time}}</view>
<navigator url="/pages/info/sceneInfo/index?id={{info.id}}" catchtap="pagePoint" data-event="scene_detail" <navigator url="/pages/info/sceneInfo/index?id={{info.id}}" catchtap="pagePoint" data-event="scene_detail" class="iconfont" style="font-size:27rpx;flex-shrink:0">优待政策 | 景点介绍 <text class="iconfont icon-you" style="font-size:24rpx"></text></navigator>
class="iconfont" style="font-size:27rpx;flex-shrink:0">优待政策 | 景点介绍 <text class="iconfont icon-you"
style="font-size:24rpx"></text></navigator>
</view> </view>
<view class="tags-box textOver address-box"> <view class="tags-box textOver address-box">
<view class="info-address">地址:{{info.address}}</view> <view class="info-address">地址:{{info.address}}</view>
<view class="iconfont icon-daohang" bindtap="gotolocation"></view> <view class="iconfont icon-daohang" bindtap="gotolocation"></view>
</view> </view>
<view class="status-text{{info.garden_flag==0?' disable':''}}" <view class="status-text{{info.garden_flag==0?' disable':''}}" wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
</view> </view>
<view class="box" wx:if="{{info}}" wx:for="{{info.product}}"> <view class="box" wx:if="{{info}}" wx:for="{{info.product}}">
<view class="allowance-box" wx:if="{{info.allowance}}" bindtap="changeAllowance"> <view class="allowance-box" wx:if="{{info.allowance}}" bindtap="changeAllowance">
@ -64,24 +59,23 @@
</view> </view>
</view> </view>
<view class="fixed-bottom"> <view class="fixed-bottom">
<navigator url="/pages/user/service/index" catchtap="pagePoint" data-event='product_customservice' class="kefu-box"> <navigator url="/pages/user/service/index" catchtap="pagePoint" data-event='product_customservice' class="kefu-box">
<view class="iconfont icon-kefu"></view> <view class="iconfont icon-kefu"></view>
<view>客服</view> <view>客服</view>
</navigator> </navigator>
<view bindtap="like" class="kefu-box" style="margin-left:70rpx"> <view bindtap="like" class="kefu-box" style="margin-left:70rpx">
<view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}"></view> <view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}"></view>
<view>收藏</view> <view>收藏</view>
</view> </view>
<view style="flex:1"></view> <view style="flex:1"></view>
<view class="btns"> <view class="btns">
<view class="btn" bindtap="showCart">加入购物车</view> <view class="btn" bindtap="showCart">加入购物车</view>
<view class="btn" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即预订</view> <view class="btn" bindtap="showOrder" wx:if="{{info && info.flag==1}}">立即预订</view>
<view class="btn disable" wx:elif="{{info}}">该商品已下架</view> <view class="btn disable" wx:elif="{{info}}">该商品已下架</view>
</view> </view>
</view> </view>
<!-- 购物车悬浮框 --> <!-- 购物车悬浮框 -->
<navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" <navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart">
id="cart">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image> <image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/cart.png" mode="widthFix"></image>
<view class="cart-num">{{cartCount}}</view> <view class="cart-num">{{cartCount}}</view>
</navigator> </navigator>
@ -100,8 +94,7 @@
</view> </view>
</view> </view>
<view class="sku-names"> <view class="sku-names">
<view bindtap="selectSku" data-index="{{index}}" class="sku-name-item textOver{{index==skuIndex?' active':''}}" <view bindtap="selectSku" data-index="{{index}}" class="sku-name-item textOver{{index==skuIndex?' active':''}}" wx:for="{{info.product[0].sku}}">{{item.sku_name}}</view>
wx:for="{{info.product[0].sku}}">{{item.sku_name}}</view>
</view> </view>
<view class="number-box"> <view class="number-box">
<text>数量</text> <text>数量</text>
@ -111,7 +104,7 @@
</view> </view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="btn-box"> <view class="btn-box">
<view class="mask-btn" bindtap="order" data-sku="{{sku}}" data-product="{{item}}" wx:if="{{info && info.flag==1}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}">{{skuFlag=='cart'?'确认':'立即购买'}} <view class="mask-btn" bindtap="order" data-sku="{{sku}}" data-product="{{item}}" wx:if="{{info && info.flag==1}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}" data-disable="{{item.flag==0 || sku.flag=='off'?1:0}}">{{skuFlag=='cart'?'确认':'立即购买'}}
</view> </view>
<view class="mask-btn disable" wx:else>该商品已下架</view> <view class="mask-btn disable" wx:else>该商品已下架</view>
</view> </view>
@ -132,8 +125,7 @@
</navigator> </navigator>
</view> </view>
<view class="ask-list" wx:else> <view class="ask-list" wx:else>
<navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment" <navigator url="/pages/ask/info/index?id={{item.id}}" catchtap="pagePoint" data-event="scene_comment" class="ask-item" wx:for="{{ask}}">
class="ask-item" wx:for="{{ask}}">
<view class="item-ques"> <view class="item-ques">
<image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ask.png" mode="widthFix"></image> <image class="item-icon" src="https://static.ticket.sz-trip.com/xcxImages/ask/ask.png" mode="widthFix"></image>
<view class="ques">{{item.question_name}}</view> <view class="ques">{{item.question_name}}</view>
@ -155,25 +147,35 @@
</view> </view>
<view class="box"> <view class="box">
<view class="box-top"> <view class="box-top">
<text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" <text class="iconfont icon-tiwen"></text><text>游客点评</text><text class="score" wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text>
wx:if="{{info && commentTotal>0}}">{{info.rate}}分</text> <navigator url="/pages/list/comments/index?sceneid={{id}}" style="display: inline;"> <text class="all-comment-num">共{{commentTotal}}条 <text style="font-family: fangsong; font-weight: bold;color: #000;">></text></text>
<text class="all-comment-num">共{{commentTotal}}条</text> </navigator>
</view> </view>
<view class="empty-box" wx:if="{{!comment || comment.length==0}}"> <view class="empty-box" wx:if="{{!comment || comment.length==0}}">
<view>这里空空如也,快去点评吧!</view> <view>这里空空如也,快去点评吧!</view>
<!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> --> <!-- <navigator url="/pages/ask/index?id={{id}}" class="empty-btn">去点评</navigator> -->
</view> </view>
<navigator wx:for="{{comment}}" url="/pages/list/comments/index?id={{info.id}}" class="product-comment"> <navigator wx:for="{{comment}}" wx:for-index="index" url="/pages/list/comments/index?sceneid={{info.id}}&&index={{index}}" class="product-comment">
<view class="product-comment-top"> <view class="product-comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image> <image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="comment-info"> <view class="comment-info">
<view class="nickname">{{item.user.nickname}}</view> <view class="nickname">{{item.nickname}}</view>
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text <view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
</view> </view>
<view class="comment-date">{{item.create_time}}</view> <!-- <view class="comment-date">{{item.create_time}}</view> -->
</view> </view>
<view class="comment-content">{{item.content}}</view> <view class="comment-content">{{item.content}}</view>
<view wx:if="{{item.img_list}}">
<view class="img-box" wx:for="{{item.img_list}}" wx:for-index="index" wx:for-item="img" mode="scaleToFill" data-img="{{img}}" data-list="{{item.img_list}}">
<image wx:if="{{index<6}}" class="imgs" src="{{img}}" bindtap="imgsc">
</image>
<view class="all" wx:if="{{index==5}}" >
<view>共{{item.img_list.length}}张</view>
<view>查看全部</view>
</view>
</view>
</view>
<view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view>
</navigator> </navigator>
<navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn"> <navigator url="/pages/list/comments/index?sceneid={{id}}" wx:if="{{comment.length>0}}" class="more-comment-btn">
查看全部点评<text class="iconfont icon-you"></text></navigator> 查看全部点评<text class="iconfont icon-you"></text></navigator>
@ -199,8 +201,7 @@
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image> <image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view> </view>
</view> </view>
<image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png" <image style="width:36rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/arrow2.png" mode="widthFix"></image>
mode="widthFix"></image>
<view style="position:relative"> <view style="position:relative">
<image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix"> <image class="img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/info/code.png" mode="widthFix">
</image> </image>

45
pages/info/sceneProductInfo/index.wxss

@ -252,6 +252,7 @@ page {
.product-comment-top .comment-info .iconfont { .product-comment-top .comment-info .iconfont {
color: #D62828; color: #D62828;
font-size: 22rpx; font-size: 22rpx;
margin-top: 6rpx;
} }
.product-comment-top .comment-info .iconfont text { .product-comment-top .comment-info .iconfont text {
@ -259,7 +260,7 @@ page {
} }
.comment-content { .comment-content {
margin-left: 72rpx; margin-left:10rpx;
margin-top: 36rpx; margin-top: 36rpx;
font-size: 28rpx; font-size: 28rpx;
color: #000; color: #000;
@ -272,6 +273,7 @@ page {
color: #999; color: #999;
font-size: 27rpx; font-size: 27rpx;
font-weight: 500; font-weight: 500;
margin-bottom:60rpx ;
} }
.more-comment-btn .iconfont { .more-comment-btn .iconfont {
@ -284,6 +286,7 @@ page {
color: #999999; color: #999999;
font-size: 27rpx; font-size: 27rpx;
font-weight: 400; font-weight: 400;
font-family: PingFang SC !important;
} }
.ask-list .ask-item:nth-child(1) { .ask-list .ask-item:nth-child(1) {
@ -779,7 +782,6 @@ page {
right: -2rpx; right: -2rpx;
top: -5rpx; top: -5rpx;
} }
.headimg { .headimg {
position: fixed; position: fixed;
z-index: 3; z-index: 3;
@ -788,11 +790,48 @@ page {
height: 180rpx; height: 180rpx;
top: 0; top: 0;
} }
.headimg.active { .headimg.active {
transition: left .6s linear, top .6s cubic-bezier(0.5, -0.5, 1, 1), width .6s ease, height .6s ease; transition: left .6s linear, top .6s cubic-bezier(0.5, -0.5, 1, 1), width .6s ease, height .6s ease;
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
left: 650rpx; left: 650rpx;
border-radius: 50%; border-radius: 50%;
}
.imgs{
width: 200rpx;
height: 200rpx;
margin: 10rpx;
border-radius: 8rpx;
}
.img-box{
display: inline-block;
position: relative;
}
.all{
color: #fff;
position:absolute;
bottom: 17rpx;
right: 10rpx;
width: 200rpx;
height: 200rpx;
border-radius: 8rpx;
background-color: rgba(0, 0, 0, .5);
}
.all view{
text-align: center;
}
.all view:first-child{
font-size: 40rpx;
margin-top: 40rpx;
}
.all view:last-child{
margin-top: 10rpx;
font-size: 30rpx;
}
.sku{
margin-left: 10rpx;
color: #666;
font-size: 24rpx;
margin-top: 8rpx;
} }

4
pages/list/activitynew/index.wxml

@ -27,10 +27,10 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon1{{type==1?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==1?'color:#FFB423':''}}">演出</view> <view style="{{type==1?'color:#FFB423':''}}">演出</view>
</view> </view>
<view class="type-item" bindtap="changeType" data-type="5"> <!-- <view class="type-item" bindtap="changeType" data-type="5">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon5{{type==5?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==5?'color:#0B898E':''}}">讲座</view> <view style="{{type==5?'color:#0B898E':''}}">讲座</view>
</view> </view> -->
<view class="type-item" bindtap="changeType" data-type="4"> <view class="type-item" bindtap="changeType" data-type="4">
<image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/activitynew/icon4{{type==4?'_active':''}}.png" mode="widthFix"></image>
<view style="{{type==4?'color:#63B71F':''}}">电影</view> <view style="{{type==4?'color:#63B71F':''}}">电影</view>

46
pages/list/comments/index.js

@ -9,7 +9,8 @@ Page({
productid:null, productid:null,
sceneid:null, sceneid:null,
list:[], list:[],
total:1 total:1,
index:null,
}, },
/** /**
@ -22,8 +23,10 @@ Page({
}) })
} }
else if(options.sceneid){ else if(options.sceneid){
console.log(options.index);
this.setData({ this.setData({
sceneid:options.sceneid sceneid:options.sceneid,
index:options.index,
}) })
} }
this.getList() this.getList()
@ -41,13 +44,44 @@ Page({
} }
commonApi._post(service,data).then(res=>{ commonApi._post(service,data).then(res=>{
console.log(res) console.log(res)
this.setData({ // this.setData({
total:res.data.total, // total:res.data.total,
list:list.concat(res.data.list) // list:list.concat(res.data.list)
// })
let arr = res.data.list
arr.map((item)=>{
item.rate = Number(item.rate)
item.create_time = item.create_time.substring(0,10)
if (item.img_list) {
item.img_list = item.img_list.split(',')
}else{
item.img_list=[]
}
}) })
if (this.data.index) {
this.setData({
list:arr.splice(this.data.index,1)
})
}else{
this.setData({
total:res.data.total,
list:list.concat(arr)
})
}
})
},
imgsc:function(e){
console.log(e);
var src = e.currentTarget.dataset.img;//获取data-src
var imgList = e.currentTarget.dataset.list;//获取data-list
console.log(src)
//图片预览
wx.previewImage({
current: src, // 当前显示图片的http链接
urls: imgList // 需要预览的图片http链接列表
}) })
}, },
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

12
pages/list/comments/index.wxml

@ -5,11 +5,21 @@
<view class="comment-top"> <view class="comment-top">
<image src="{{item.user.avatar}}" mode="aspectFill"></image> <image src="{{item.user.avatar}}" mode="aspectFill"></image>
<view class="author-info"> <view class="author-info">
<view class="author-name">{{item.user.nickname}}</view> <view class="top">
<view class="author-name">{{item.nickname}}</view>
<view class="author-time">{{item.create_time}}</view> <view class="author-time">{{item.create_time}}</view>
</view> </view>
<view class="bot">
<view class="iconfont"><text wx:for="{{item.rate}}" class="icon-xingxing"></text><text wx:for="{{5 - item.rate}}" style="color:#999" class="icon-xingxing"></text></view>
<view class="sku" wx:if="{{item.sku_name}}">{{item.sku_name}}</view>
</view>
</view>
</view> </view>
<view class="comment-detail">{{item.content}}</view> <view class="comment-detail">{{item.content}}</view>
<view wx:if="{{item.img_list}}">
<image class="imgs" wx:for="{{item.img_list}}" wx:for-item="Goods" mode="scaleToFill" data-img="{{Goods}}" data-list="{{item.img_list}}" src="{{Goods}}" bindtap="imgsc"></image>
</view>
</view> </view>
<view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1"> <view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1">
<image mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image> <image mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image>

29
pages/list/comments/index.wxss

@ -30,6 +30,7 @@
flex: 1; flex: 1;
font-size: 27rpx; font-size: 27rpx;
color: #333; color: #333;
} }
.author-time { .author-time {
color: #999999; color: #999999;
@ -37,11 +38,37 @@
margin-top: 4rpx; margin-top: 4rpx;
} }
.comment-detail { .comment-detail {
margin-left: 87rpx; margin-left: 10rpx;
font-size: 29rpx; font-size: 29rpx;
color: #000; color: #000;
margin-top: 25rpx; margin-top: 25rpx;
} }
.comment-item:last-child { .comment-item:last-child {
border-bottom: none; border-bottom: none;
}
.imgs{
width: 200rpx;
height: 200rpx;
margin: 10rpx;
border-radius: 8rpx;
}
.iconfont {
color: #D62828;
font-size: 22rpx;
line-height: 30rpx;
}
.top{
display: flex;
justify-content: space-between;
}
.bot{
margin-top: 10rpx;
display: flex;
justify-content: left;
align-self: center;
}
.sku{
color: #666;
margin-left:20rpx ;
font-size: 24rpx;
} }

193
pages/order/comment/index.js

@ -6,93 +6,212 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
info:null info: null,
imgs: [],
upImgs:[],
checked:false,
rate:0
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
commonApi.user_post("order/query",{ commonApi.user_post("order/query", {
order_id:options.id order_id: options.id
}).then(res=>{ }).then(res => {
let list = []; let list = [];
res.data.order_product_list.map(item=>{ res.data.order_product_list.map(item => {
item.star = 5; item.star = 5;
item.content = ""; item.content = "";
if(item.state=='WAIT_COMMENT'){ if (item.state == 'WAIT_COMMENT') {
list.push(item); list.push(item);
} }
}) })
if(list.length==0){ if (list.length == 0) {
wx.showToast({ wx.showToast({
title: '该订单没有待评价产品', title: '该订单没有待评价产品',
icon:'none' icon: 'none'
}) })
setTimeout(()=>{ setTimeout(() => {
wx.navigateBack() wx.navigateBack()
},1000) }, 1000)
return; return;
} }
res.data.order_product_list = list; res.data.order_product_list = list;
this.setData({ this.setData({
info:res.data info: res.data
}) })
}) })
}, },
changeStar:function(e){ changeStar: function (e) {
console.log(e)
wx.showLoading({ wx.showLoading({
title: '加载中' title: '加载中'
}) })
let index = e.currentTarget.dataset.index,star = e.currentTarget.dataset.star; let index = e.currentTarget.dataset.index,
star = e.currentTarget.dataset.star;
let info = this.data.info; let info = this.data.info;
info.order_product_list[index].star = Number(star)+1; info.order_product_list[index].star = Number(star) + 1;
this.setData({ this.setData({
info:info info: info,
}) rate:info.order_product_list[index].star
wx.hideLoading({
}) })
wx.hideLoading({})
}, },
changeContent:function(e){ changeContent: function (e) {
console.log(e) let index = e.currentTarget.dataset.index,
let index = e.currentTarget.dataset.index,info = this.data.info; info = this.data.info;
info.order_product_list[index].content = e.detail.value; info.order_product_list[index].content = e.detail.value;
this.setData({ this.setData({
info:info info: info
}) })
}, },
submit:function(){ submit: function () {
let info = this.data.info,flag = true,ajax=[] let info = this.data.info,
info.order_product_list.map(item=>{ flag = true,
if(!item.content) { ajax = []
info.order_product_list.map(item => {
if (!item.content) {
wx.showToast({ wx.showToast({
title: '请输入评价内容', title: '请输入评价内容',
icon:'none' icon: 'none'
}) })
flag = false; flag = false;
} }
ajax.push(commonApi.user_post("product/product_comment",{ ajax.push(commonApi.user_post("product/product_comment", {
product_id:item.product_id, product_id: item.product_id,
content:item.content, content: item.content,
order_id:this.data.id order_id: item.order_id,
rate:this.data.rate,
img_list:this.data.upImgs.join(','),
is_anonymous:this.data.checked?1:0,
sku_id:item.sku_id
})) }))
}) })
if(!flag) return; if (!flag) return;
Promise.all(ajax).then(res=>{ Promise.all(ajax).then(res => {
console.log(res)
let flag = false; let flag = false;
res.map(item=>{ res.map(item => {
if(item.code==1){ if (item.code == 1) {
flag = true flag = true
} }
}) })
if(flag){ if (flag) {
wx.navigateBack() wx.navigateBack()
} }
}) })
}, },
//图片上传
// 上传图片
chooseImg: function (e) {
var that = this;
var imgs = this.data.imgs;
if (imgs.length >= 9) {
wx.showToast({
title: '最多上传九张图片哦..',
icon: 'none'
})
return false;
}
wx.chooseImage({
// count: 1, // 默认9
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function (res) {
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
let size = res.tempFiles[0].size
const temp = res.tempFilePaths[0]
if (size > 1024 * 1024 * 20) {
wx.showToast({
title: '图片最大支持20M..',
icon: 'none'
})
return
} else if (temp.substr(temp.length - 4, 4) == '.gif') {
wx.showToast({
title: '图片格式错误',
icon: 'none'
})
return;
}
var tempFilePaths = res.tempFilePaths;
var imgs = that.data.imgs;
console.log(imgs);
wx.showLoading({
title: '上传中',
})
for (let i = 0; i < tempFilePaths.length; i++) {
wx.uploadFile({
url: 'https://test.api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址
filePath: tempFilePaths[i],
name: 'file',
header: {
token: wx.getStorageSync('jstrip_token'),
},
success(res) {
wx.hideLoading()
var res = JSON.parse(res.data);
if (res.code!=1) {
wx.showToast({
title: res.msg,
icon: 'none'
})
return
}
let img = res.data.url;
let arr = that.data.upImgs
arr.push(img)
that.setData({
upImgs:arr
})
imgs.push(tempFilePaths[i]);
that.setData({
imgs: imgs
});
}
})
if (that.data,imgs.length+i==8) {
return
}
}
}
});
},
// 删除图片
deleteImg: function (e) {
let imgs = this.data.imgs;
let index = e.currentTarget.dataset.index;
let upimg = this.data.upImgs
imgs.splice(index, 1);
upimg.splice(index,1)
this.setData({
imgs: imgs,
upImgs:upimg
});
},
// 预览图片
previewImg: function (e) {
//获取当前图片的下标
var index = e.currentTarget.dataset.index;
//所有图片
var imgs = this.data.imgs;
wx.previewImage({
//当前显示图片
current: imgs[index],
//所有图片
urls: imgs
})
},
checkboxChange:function(){
this.setData({
checked:!this.data.checked
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

17
pages/order/comment/index.wxml

@ -1,7 +1,7 @@
<!--pages/order/comment/index.wxml--> <!--pages/order/comment/index.wxml-->
<title title="填写评论"></title> <title title="填写评论"></title>
<view class="product-box" wx:if="{{info}}" wx:for="{{info.order_product_list}}"> <view class="product-box" wx:if="{{info}}" wx:for="{{info.order_product_list}}">
<view class="product-top"> <view class="product-top prd">
<image src="{{item.product_img}}" mode="aspectFill"></image> <image src="{{item.product_img}}" mode="aspectFill"></image>
<view class="product-info"> <view class="product-info">
<view class="product-title">{{item.product_title}}</view> <view class="product-title">{{item.product_title}}</view>
@ -18,6 +18,21 @@
<!-- <text wx:for="{{5 - item.star}}" class="iconfont icon-xingxing "></text> --> <!-- <text wx:for="{{5 - item.star}}" class="iconfont icon-xingxing "></text> -->
</view> </view>
<textarea bindinput="changeContent" data-index="{{index}}" placeholder="您对产品还满意吗?您的评价会帮助更多的人哦~"></textarea> <textarea bindinput="changeContent" data-index="{{index}}" placeholder="您对产品还满意吗?您的评价会帮助更多的人哦~"></textarea>
<view class="weui-uploader">
<view class='pics' wx:for="{{imgs}}" wx:for-item="item" wx:key="*this">
<image class='weui-uploader__img' src="{{item}}" data-index="{{index}}" mode="aspectFill" bindtap="previewImg">
<icon type='cancel' class="delete-btn" data-index="{{index}}" catchtap="deleteImg"></icon>
</image>
</view>
<view class="tp_cont {{tj_ycang?'':'hide'}}" bindtap="chooseImg">
<view class="tp_add"><image style="width: 60rpx;" mode="widthFix" src="https://static.ticket.sz-trip.com/uploads/20220811/13f3f3558cb7e627cef42581f8a2555d.png"></image> <view>上传图片</view></view>
</view>
</view>
</view> </view>
<checkbox-group class="checkbox" bindchange="checkboxChange" >
<label >
<checkbox value="是否匿名" checked="{{checked}}"/>是否匿名
</label>
</checkbox-group>
<view style="height:80rpx"></view> <view style="height:80rpx"></view>
<view class="btn" bindtap="submit">提交</view> <view class="btn" bindtap="submit">提交</view>

80
pages/order/comment/index.wxss

@ -1,7 +1,11 @@
/* pages/order/comment/index.wxss */ /* pages/order/comment/index.wxss */
page{
background-color: #FBF8FB;
}
.product-box { .product-box {
margin: 0 30rpx; padding: 0 30rpx 10rpx 30rpx;
font-size: 28rpx; font-size: 28rpx;
background-color: #fff;
} }
.product-top { .product-top {
display: flex; display: flex;
@ -17,11 +21,19 @@
flex: 1; flex: 1;
width: 100%; width: 100%;
margin: 0 30rpx; margin: 0 30rpx;
height: 120rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
} }
.product-title { .product-title {
font-size: 32rpx; font-size: 32rpx;
color: #000; color: #000;
} }
.sku-name{
margin-bottom:12rpx ;
}
.product-price { .product-price {
flex-shrink: 0; flex-shrink: 0;
text-align: right; text-align: right;
@ -56,6 +68,7 @@
.product-box textarea { .product-box textarea {
display: block; display: block;
width: 100%; width: 100%;
height: 210rpx;
} }
.btn { .btn {
width: 360rpx; width: 360rpx;
@ -70,4 +83,67 @@
bottom: 40rpx; bottom: 40rpx;
left: 50%; left: 50%;
margin-left: -180rpx; margin-left: -180rpx;
} }
/* 图片 */
.three{
margin-top: 27rpx;
}
.weui-uploader{
margin: 16rpx 0;
}
.tp_add{
width: 152rpx;
height: 152rpx;
border-radius: 10rpx;
opacity: 1;
border: 2rpx dashed #999999;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
font-size: 22rpx;
color: #BCBCBC;
}
.pics {
float:left;
position:relative;
margin-right:15px;
margin-bottom:15px;
}
.pics image{
width: 152rpx;
height: 152rpx;
}
.delete-btn{
width: 20rpx;
height: 20rpx;
position: absolute;
top: -15rpx;
right: -5rpx;
}
.weui-uploader{
padding: 10rpx 0;
}
.prd{
border-bottom: 1px solid #CCCCCC;
}
.checkbox{
margin: 16rpx 20rpx;
color: #BCBCBC;
}
checkbox .wx-checkbox-input {
width: 30rpx;
height: 30rpx;
border-radius: 50%;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked {
border-color: #18d6ff;
background-color: #18d6ff;
}
checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
color:#fff;
}

3
pages/order/postOrder/index.js

@ -164,7 +164,8 @@ Page({
if (app.globalData.category_id) { if (app.globalData.category_id) {
data.category_id = app.globalData.category_id; data.category_id = app.globalData.category_id;
} }
if(!app.globalData.list){ console.log(app.globalData.list)
if(!app.globalData.list || app.globalData.list.length == 0){
commonApi.user_post("order/create", { commonApi.user_post("order/create", {
data: JSON.stringify(data) data: JSON.stringify(data)
}).then(res => { }).then(res => {

17
pages/order/scene/index.js

@ -34,7 +34,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(app.globalData.product)
this.setData({ this.setData({
type: options.type, type: options.type,
kjId: app.globalData.kjId, kjId: app.globalData.kjId,
@ -115,7 +114,7 @@ Page({
icon: 'none' icon: 'none'
}) })
} }
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1) { if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && !this.data.flag) {
this.couponCom.setNullCoupon() this.couponCom.setNullCoupon()
} }
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
@ -249,9 +248,11 @@ Page({
postData.team_name = this.data.groupName postData.team_name = this.data.groupName
postData.type = 1; postData.type = 1;
} }
app.globalData.list[app.globalData.index] = this.data.product if(app.globalData.list){
app.globalData.list[app.globalData.index] = this.data.product
}
app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100; app.globalData.ticketPrice += (this.data.singlePrice * this.data.productNum - (this.data.coupon?this.data.coupon.activity.money:0))/100;
if(app.globalData.list.length > app.globalData.index + 1){ if(app.globalData.list && app.globalData.list.length > app.globalData.index + 1){
if(app.globalData.createDate){ if(app.globalData.createDate){
app.globalData.createDate.product_list.push(data.product_list[0]) app.globalData.createDate.product_list.push(data.product_list[0])
}else{ }else{
@ -264,8 +265,7 @@ Page({
}) })
return return
}else{ }else{
console.log(app.globalData.list.length,app.globalData.postProduct) if(app.globalData.list && app.globalData.list.length > 1 || app.globalData.postProduct.length>0){
if(app.globalData.list.length > 1 || app.globalData.postProduct.length>0){
if(app.globalData.createDate){ if(app.globalData.createDate){
app.globalData.createDate.product_list.push(data.product_list[0]) app.globalData.createDate.product_list.push(data.product_list[0])
} }
@ -347,11 +347,9 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
console.log(this.data.flag); if(app.globalData.list && app.globalData.list.length != 0){
if(app.globalData.list.length != 0){
app.globalData.product = app.globalData.list[app.globalData.index] app.globalData.product = app.globalData.list[app.globalData.index]
} }
console.log(app.globalData.product)
if (!this.data.isLogin) { if (!this.data.isLogin) {
commonApi.user_post("token/check").then(res => { commonApi.user_post("token/check").then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -369,7 +367,6 @@ Page({
commonApi.user_post("product/getProductAllowancePrice", { commonApi.user_post("product/getProductAllowancePrice", {
product_code: this.data.product.product.product_code product_code: this.data.product.product.product_code
}).then(resTwo => { }).then(resTwo => {
console.log(resTwo)
if (resTwo && resTwo.code == 1) { if (resTwo && resTwo.code == 1) {
this.setData({ this.setData({
allowance_data: resTwo.data allowance_data: resTwo.data

4
pages/pbService/index.wxml

@ -38,6 +38,10 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/index/pb4New.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/xcxImages/index/pb4New.png" mode="widthFix"></image>
<view>12348</view> <view>12348</view>
</view> </view>
<!-- <view class="pb-item" data-title="文化配送" bindtap="gotoPath" data-path="/pages/culture/index">
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb20.png" mode="widthFix"></image>
<view>文化配送</view>
</view> -->
</view> </view>
</view> </view>
<image class="title-img" src="https://static.ticket.sz-trip.com/uploads/20211115/335a42385c9e15ece075980209b0643a.png" <image class="title-img" src="https://static.ticket.sz-trip.com/uploads/20211115/335a42385c9e15ece075980209b0643a.png"

3
pages/user/cartlist/list.wxml

@ -31,7 +31,8 @@
<view class="fixed-bottom" wx:if="{{list.length>0}}"> <view class="fixed-bottom" wx:if="{{list.length>0}}">
<view bindtap="selectAll" class="iconfont{{allChecked?' icon-gou':' icon-quan'}}"></view> <view bindtap="selectAll" class="iconfont{{allChecked?' icon-gou':' icon-quan'}}"></view>
<view class="tip">合计:</view> <view class="tip">合计:</view>
<view class="bottom-price">¥{{allPrice/100}}</view> <view class="bottom-price">¥{{allPrice/100}} </view>
<view style="margin-right: 10rpx; font-size: 29rpx;color: #000;">起</view>
<view style="flex:1">不含运费</view> <view style="flex:1">不含运费</view>
<view class="btn" bindtap="order">去下单</view> <view class="btn" bindtap="order">去下单</view>
</view> </view>

2
pages/user/order/list.wxml

@ -41,7 +41,7 @@
<view class="btns"> <view class="btns">
<view wx:if="{{item.guihuaUrl}}" catchtap="gotoWeb" data-web="{{item.guihuaUrl}}" class="btn" data-item="{{item}}">行程规划</view> <view wx:if="{{item.guihuaUrl}}" catchtap="gotoWeb" data-web="{{item.guihuaUrl}}" class="btn" data-item="{{item}}">行程规划</view>
<view class="btn" catchtap="order" data-item="{{item}}">再次购买</view> <view class="btn" catchtap="order" data-item="{{item}}">再次购买</view>
<view catchtap="gotoComment" data-id="{{item.order_id}}" class="btn" wx:if="{{item.state=='WAIT_COMMENT'}}">立即评价</view> <!-- <view catchtap="gotoComment" data-id="{{item.order_id}}" class="btn" wx:if="{{item.state=='WAIT_COMMENT'}}">立即评价</view> -->
<view catchtap="cancel" data-index="{{index}}" class="btn" wx:if="{{item.state=='UNPAID'}}">取消预订</view> <view catchtap="cancel" data-index="{{index}}" class="btn" wx:if="{{item.state=='UNPAID'}}">取消预订</view>
<view catchtap="refund" data-index="{{index}}" class="btn" wx:if="{{item.state=='PAID'}}">取消预订</view> <view catchtap="refund" data-index="{{index}}" class="btn" wx:if="{{item.state=='PAID'}}">取消预订</view>
<view catchtap="refundInfo" data-id="{{item.order_id}}" class="btn" wx:if="{{item.state=='WAIT_REFUND' || item.state=='REFUND' || item.state=='NEED_REFUND' || item.state=='REFUNDING'}}">退款详情</view> <view catchtap="refundInfo" data-id="{{item.order_id}}" class="btn" wx:if="{{item.state=='WAIT_REFUND' || item.state=='REFUND' || item.state=='NEED_REFUND' || item.state=='REFUNDING'}}">退款详情</view>

7
pages/user/order/postOrderInfo/index.js

@ -160,7 +160,12 @@ Page({
return; return;
}) })
}, },
gotoComment:function(e){
let id = e.currentTarget.dataset.id;
wx.navigateTo({
url: '/pages/order/comment/index?id='+id,
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

228
pages/user/personalInfo/index.js

@ -0,0 +1,228 @@
// /pages/user/address/index.js
import user from "../../../utils/https/user.js"
import commonApi from "../../../utils/https/common"
import util from "../../../utils/util.js"
import http from "../../../utils/https.js"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
baseList: [],
title: "为提供相应的产品和服务,并保障系统的安全稳定运行,我们可能会收集你的以下个人信息",
childList: [],
flag: true,
nowTitle: ""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.getInfo()
},
getInfo: function () {
let that = this
wx.request({
url: http.baseUrl + 'pbservice/Other/getUserInformation', // 仅为示例,并非真实的接口地址
method: 'post',
header: {
'content-type': 'application/x-www-form-urlencoded', // 默认值
token: wx.getStorageSync('jstrip_token')
},
success(res) {
that.setData({
baseList: res.data.data
})
}
})
},
goDetail: function (e) {
let item = e.currentTarget.dataset.item;
this.setData({
nowTitle: item.title
})
for (let i = 0; i < item.child.length; i++) {
switch (item.child[i].information) {
case 'user':
item.child[i]['jump'] = true
break;
case 'address':
item.child[i]['jump'] = true
break;
case 'travel_user':
item.child[i]['jump'] = true
break;
case 'cart':
item.child[i]['jump'] = true
break;
case 'orders':
item.child[i]['jump'] = true
break;
case 'search_history':
item.child[i]['jump'] = true
break;
case 'my_collection':
item.child[i]['jump'] = true
break;
default:
item.child[i]['jump'] = false
break;
}
switch (item.child[i].information) {
case 'user':
item.child[i].information = "个人信息"
break;
case 'address':
item.child[i].information = "收货地址"
break;
case 'travel_user':
item.child[i].information = "出游人信息"
break;
case 'cart':
item.child[i].information = "购物车"
break;
case 'orders':
item.child[i].information = "我的订单"
break;
case 'search_history':
item.child[i].information = "搜索历史"
break;
case 'my_collection':
item.child[i].information = "我的收藏"
break;
default:
break;
}
}
this.setData({
childList: item.child,
flag: false
})
},
goRouter: function (e) {
let item = e.currentTarget.dataset.item
if (!item.jump) return
let name = item.information
switch (name) {
case '个人信息':
wx.navigateTo({
url: '/pages/user/profile/index',
})
break;
case '收货地址':
wx.navigateTo({
url: "/pages/user/address/index"
})
break;
case '出游人信息':
wx.navigateTo({
url: "/pages/user/linkman/index"
})
break;
case '购物车':
wx.navigateTo({
url: "/pages/user/cartlist/list"
})
break;
case '我的订单':
wx.navigateTo({
url: "/pages/user/order/list"
})
break;
case '搜索历史':
wx.navigateTo({
url: "/pages/search/index"
})
break;
case '我的收藏':
wx.navigateTo({
url: "/pages/user/likes/index"
})
break;
default:
break;
}
},
getName: function () {
let name = item.information
switch (name) {
case 'user':
name = "个人信息"
break;
case 'address':
name = "收货地址"
break;
case 'travel_user':
name = "出游人信息"
break;
case 'cart':
name = "购物车"
break;
case 'orders':
name = "我的订单"
break;
case 'search_history':
name = "搜索历史"
break;
case 'my_collection':
name = "我的收藏"
break;
default:
break;
}
return name
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

5
pages/user/personalInfo/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title-header": "/pages/component/TitleHeader"
}
}

37
pages/user/personalInfo/index.wxml

@ -0,0 +1,37 @@
<!--pages/user/address/index.wxml-->
<view class="info">
<title-header title="{{nowTitle}}"></title-header>
<view class="content" wx:if="{{flag}}">
<view class="title">{{ title }}</view>
<view class="list">
<view class="item" wx:for="{{baseList}}" wx:key="index" data-item="{{item}}" bindtap="goDetail">
<view class="item-title">{{ item.title }}</view>
<view class="item-info">{{ item.des }}</view>
<view class="item-icon"> > </view>
</view>
</view>
</view>
<view class="info-content" wx:if="{{!flag}}">
<view class="info-list" wx:for="{{childList}}">
<view class="title">{{ item.title }}</view>
<view class="info-column">
<view class="column-title">使用目的</view>
<view class="column-info">{{ item.purpose }}</view>
</view>
<view class="info-column">
<view class="column-title">使用场景</view>
<view class="column-info">{{ item.usage_scenarios }}</view>
</view>
<view class="info-column">
<view class="column-title">收集情况</view>
<view class="column-info">{{ item.collect }}</view>
</view>
<view class="info-column" data-item="{{item}}" bindtap="goRouter">
<view class="column-title">信息内容</view>
<view class="column-info" style="color: {{item.jump?'#0B898E':'#000'}};">{{item.information}}</view>
</view>
</view>
</view>
</view>

77
pages/user/personalInfo/index.wxss

@ -0,0 +1,77 @@
page{
background-color: rgb(242,242,242);
}
.info{
font-size: .6rem;
padding: 1.4rem .6rem 0 .6rem;
}
.title-header{
background-color:#fff !important;
}
.title-box{
background-color:transparent !important;
}
.title {
color: #000;
font-size: .8rem;
margin: .4rem 0;
}
.item {
background: #fff;
font-size: .7rem;
padding: .8rem .8rem .4rem .8rem;
margin-top: .6rem;
position: relative;
border-radius: .6rem;
min-height: 4rem;
}
.item-info {
color: #666;
margin: .4rem 0 .2rem 0;
}
.item-icon {
position: absolute;
right: .2rem;
top: 50%;
font-family: cursive;
transform: translate(-.2rem, -.2rem);
}
.info-content {
font-size: .7rem;
}
.info-list {
background: #fff;
font-size: .7rem;
padding: .2rem .8rem .4rem .8rem;
margin-top: .6rem;
border-radius: .6rem;
min-height: 4rem;
}
.info-column {
display: flex;
align-items: flex-start;
margin-top: .4rem;
}
.column-title {
color: #666;
white-space: nowrap;
margin-right: .2rem;
}
.green {
color: #0B898E;
}
.column-info{
overflow:auto;
width: 100%;
}

30
pages/user/service/list/index.js

@ -12,7 +12,11 @@ Page({
list:[], list:[],
total:1, total:1,
page_no:1, page_no:1,
keyword:"" keyword:"",
showModal: false,
// 成功
ses:true,
}, },
/** /**
@ -86,7 +90,29 @@ Page({
}) })
}) })
}, },
showDialogBtn: function () {
this.setData({
showModal: true
})
},
hideModal: function () {
this.setData({
showModal: false
});
},
onCancel: function () {
this.hideModal();
},
onConfirm: function (e) {
console.log(e.currentTarget.dataset.name);
this.hideModal();
},
phoneCall:function(){
console.log(1111);
wx.makePhoneCall({
phoneNumber: '0512-66555111',
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

27
pages/user/service/list/index.wxml

@ -9,4 +9,29 @@
<view class="ques-name textOver">{{item.question_name}}</view> <view class="ques-name textOver">{{item.question_name}}</view>
<view class="iconfont icon-you"></view> <view class="iconfont icon-you"></view>
</navigator> </navigator>
<navigator url="list/index?typeid={{typeId}}" class="more-btn" bindtap="showService">没找到想要的答案?一键呼唤<text>人工客服</text></navigator> <!-- <navigator url="list/index?typeid={{typeId}}" class="more-btn" bindtap="showService">没找到想要的答案?一键呼唤<text>人工客服</text></navigator> -->
<!-- <button class="more-btn" open-type="contact" bindcontact="handleContact">没找到想要的答案?一键呼唤<text>人工客服</text></button> -->
<view class="more-btn" bindtap="showDialogBtn">没找到想要的答案?一键呼唤<text>人工客服</text></view>
<!-- 弹出层 -->
<view
class="modal-mask"
bindtap="hideModal"
catchtouchmove="preventTouchMove"
wx:if="{{showModal}}"
></view>
<!-- 成功 -->
<view class="modal-dialog" wx:if="{{showModal && ses}}">
<view class="modal-title"><view class="modal-info">即将跳转人工在线客服
<view>客服服务时间:08:30-17:30</view>
如遇紧急情况可拨打 <view class="green" bindtap="phoneCall"> 0512-66555111 </view></view></view>
<view class="modal-footer">
<view
class="btn-confirms two"
bindtap="onConfirm"
data-status="confirm"
data-name="{{name}}"
>取消
</view>
<button class="btn-confirms" open-type="contact" bindcontact="handleContact">确定</button>
</view>
</view>

93
pages/user/service/list/index.wxss

@ -47,7 +47,7 @@
} }
.more-btn { .more-btn {
text-align: center; text-align: center;
width: 520rpx; width: 550rpx !important;
line-height: 60rpx; line-height: 60rpx;
background: rgba(11, 137, 142, 0); background: rgba(11, 137, 142, 0);
border: 1rpx solid #D8D8D8; border: 1rpx solid #D8D8D8;
@ -55,7 +55,96 @@
margin: 30rpx auto; margin: 30rpx auto;
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
} }
.more-btn text { .more-btn text {
color: #0B898E; color: #0B898E;
} }
/**index.wxss**/
.show-btn {
margin-top: 100rpx;
color: #22cc22;
}
.modal-mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.5;
overflow: hidden;
z-index: 9000;
color: #fff;
}
.modal-dialog {
width: 540rpx;
overflow: hidden;
position: fixed;
top: 46%;
left: 0;
z-index: 9999;
background: #f9f9f9;
margin: -180rpx 105rpx;
border-radius: 8px;
}
.modal-title {
padding-top: 30rpx;
padding-bottom: 30rpx;
font-size: 14px;
color: #030303;
text-align: center;
}
.modal-img {
width: 40px;
height: 40px;
margin: 0 auto;
margin-top: 20rpx;
}
.modal-footer {
display: flex;
flex-direction: row;
height: 86rpx;
border-top: 1px solid #dedede;
font-size: 34rpx;
line-height: 86rpx;
}
.btn-cancel {
width: 50%;
color: #8f8f8f;
background-color: #f2f2f2;
text-align: center;
border-right: 1px solid #dedede;
}
.btn-confirm {
width: 50%;
color: #8f8f8f;
background-color: #f2f2f2;
text-align: center;
}
.btn-confirms {
width: 100%;
background-color: #f2f2f2;
color: rgb(91,198,72);
text-align: center;
font-weight: normal !important;
}
.btn-confirms.two {
color: #8f8f8f;
}
.modal-info{
line-height: 70rpx;
font-size: 30rpx;
}
.green{
color: #22cc22;
}

15
pages/user/user.wxml

@ -88,5 +88,20 @@
收货地址 收货地址
</navigator> </navigator>
</view> </view>
<view class="user-box" style="margin-bottom:0;margin-top: 18rpx;">
<navigator url="userPrivacy/index?id=9" class="user-box-line" catchtap="pagePoint" data-event="mine_travelinfo">
用户协议
</navigator>
<navigator url="userPrivacy/index?id=12" class="user-box-line" catchtap="pagePoint" data-event="mine_receiveinfo">
隐私政策
</navigator>
<navigator url="personalInfo/index" class="user-box-line" catchtap="pagePoint" data-event="mine_receiveinfo">
个人信息收集清单
</navigator>
<navigator url="userPrivacy/index?id=14" class="user-box-line" catchtap="pagePoint" data-event="mine_receiveinfo">
第三方共享信息清单
</navigator>
</view>
</view> </view>
<view style="height:20rpx"></view> <view style="height:20rpx"></view>

71
pages/user/userPrivacy/index.js

@ -0,0 +1,71 @@
// pages/user/address/index.js
import user from "../../../utils/https/user.js"
import commonApi from "../../../utils/https/common"
import util from "../../../utils/util.js"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id:null,
info:"",
title:"",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
this.getInfo()
},
getInfo:function(){
commonApi._post("pbservice/Other/getDictionary", { id: this.data.id }).then(res => {
console.log(res);
res=res.data
this.setData({
info:res[0].content,
title:res[0].type_name
})
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
}
})

5
pages/user/userPrivacy/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"title-header": "/pages/component/TitleHeader"
}
}

11
pages/user/userPrivacy/index.wxml

@ -0,0 +1,11 @@
<!--pages/user/address/index.wxml-->
<view>
<title-header title="{{title}}"></title-header>
<view class="title">{{title}}</view>
<view class="text">
<rich-text >
{{info}}
</rich-text>
</view>
</view>

9
pages/user/userPrivacy/index.wxss

@ -0,0 +1,9 @@
.title{
padding: 10rpx 20rpx 0rpx 20rpx;
font-size: 28rpx;
}
.text{
padding: 10rpx 20rpx 0rpx 20rpx;
font-size: 24rpx;
}
Loading…
Cancel
Save