Browse Source

Merge branch 'master' into dev_fix

master
jiazhipeng 6 months ago
parent
commit
cc37fedc97
  1. 2
      app.js
  2. 14
      app.json
  3. 2
      app.wxss
  4. BIN
      images/ai.png
  5. BIN
      images/ai_seld.png
  6. BIN
      images/aindex_seld.png
  7. BIN
      images/amap_seld.png
  8. BIN
      images/auser_seld.png
  9. BIN
      images/index.png
  10. BIN
      images/index_seld.png
  11. BIN
      images/map.png
  12. BIN
      images/map_seld.png
  13. BIN
      images/place1.png
  14. BIN
      images/place2.png
  15. BIN
      images/user.png
  16. BIN
      images/user_seld.png
  17. 162
      pages/activity/huawei/form/index.js
  18. 5
      pages/activity/huawei/form/index.json
  19. 29
      pages/activity/huawei/form/index.wxml
  20. 72
      pages/activity/huawei/form/index.wxss
  21. 107
      pages/activity/huawei/index.js
  22. 5
      pages/activity/huawei/index.json
  23. 20
      pages/activity/huawei/index.wxml
  24. 71
      pages/activity/huawei/index.wxss
  25. 209
      pages/activity/huawei/list/index.js
  26. 5
      pages/activity/huawei/list/index.json
  27. 42
      pages/activity/huawei/list/index.wxml
  28. 163
      pages/activity/huawei/list/index.wxss
  29. 73
      pages/activity/huawei/result/index.js
  30. 5
      pages/activity/huawei/result/index.json
  31. 7
      pages/activity/huawei/result/index.wxml
  32. 30
      pages/activity/huawei/result/index.wxss
  33. 234
      pages/activity/huawei/upload/index.js
  34. 5
      pages/activity/huawei/upload/index.json
  35. 38
      pages/activity/huawei/upload/index.wxml
  36. 112
      pages/activity/huawei/upload/index.wxss
  37. 78
      pages/activity/huawei/uploadres/index.js
  38. 5
      pages/activity/huawei/uploadres/index.json
  39. 8
      pages/activity/huawei/uploadres/index.wxml
  40. 26
      pages/activity/huawei/uploadres/index.wxss
  41. 58
      pages/component/kefu/index.js
  42. 4
      pages/component/kefu/index.json
  43. 24
      pages/component/kefu/index.wxml
  44. 88
      pages/component/kefu/index.wxss
  45. 4
      pages/component/proRec/proRec.js
  46. 48
      pages/index/index.js
  47. 168
      pages/index/index.wxml
  48. 240
      pages/index/index.wxss
  49. 837
      pages/info/foodProductInfo/index.js
  50. 3
      pages/info/foodProductInfo/index.json
  51. 310
      pages/info/foodProductInfo/index.wxml
  52. 1316
      pages/info/foodProductInfo/index.wxss
  53. 17
      pages/map/index.wxml
  54. 2
      pages/map/index.wxss
  55. 1
      pages/order/components/date/index.wxss
  56. 51
      pages/order/food/index.js
  57. 32
      pages/order/food/index.wxml
  58. 49
      pages/order/food/index.wxss
  59. 2
      pages/order/orderList/index.wxml
  60. 2
      pages/order/payresult/index.js
  61. 7
      pages/order/scene/index.js
  62. 11
      pages/search/list/index.wxml
  63. 2
      pages/search/list/index.wxss
  64. 54
      pages/user/order/foodOrderInfo/index.js
  65. 3
      pages/user/order/foodOrderInfo/index.json
  66. 129
      pages/user/order/foodOrderInfo/index.wxml
  67. 81
      pages/user/order/foodOrderInfo/index.wxss
  68. 7
      pages/user/order/list.js
  69. 61
      pages/user/order/postOrderInfo/index.js
  70. 53
      pages/user/order/postOrderInfo/index.wxml
  71. 63
      pages/user/order/postOrderInfo/index.wxss
  72. 7
      pages/user/order/sceneOrderInfo/index.js
  73. 19
      pages/user/order/sceneOrderInfo/index.wxml
  74. 3
      pages/user/service/info/index.json
  75. 6
      pages/user/service/info/index.wxml
  76. 3
      pages/user/service/list/index.js
  77. 3
      pages/user/service/list/index.json
  78. 27
      pages/user/service/list/index.wxml
  79. 4
      pages/user/user.json
  80. 5
      pages/user/user.wxml
  81. 13
      project.private.config.json
  82. 198
      subPackages/foodListNew/index.js
  83. 5
      subPackages/foodListNew/index.json
  84. 52
      subPackages/foodListNew/index.wxml
  85. 158
      subPackages/foodListNew/index.wxss
  86. 798
      subPackages/foodNew/index.js
  87. 6
      subPackages/foodNew/index.json
  88. 290
      subPackages/foodNew/index.wxml
  89. 1374
      subPackages/foodNew/index.wxss
  90. 7
      subPackages/gwcOrder/index.js
  91. 7
      subPackages/gwcOrder/index.wxml
  92. 40
      utils/filter.wxs
  93. 55
      utils/util.js

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest134? true : false; data.isTest = data.isTest142? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

14
app.json

@ -161,12 +161,6 @@
"pages/activity/redlist/index", "pages/activity/redlist/index",
"pages/activity/subway/index", "pages/activity/subway/index",
"pages/activity/tenscenic/index", "pages/activity/tenscenic/index",
"pages/activity/huawei/index",
"pages/activity/huawei/form/index",
"pages/activity/huawei/result/index",
"pages/activity/huawei/upload/index",
"pages/activity/huawei/uploadres/index",
"pages/activity/huawei/list/index",
"pages/kj/index", "pages/kj/index",
"pages/kj/his/index", "pages/kj/his/index",
"pages/kj/info/index", "pages/kj/info/index",
@ -208,7 +202,9 @@
"goods/oneCardTour/info/index", "goods/oneCardTour/info/index",
"feiyiNew/CGCIndex/index", "feiyiNew/CGCIndex/index",
"feiyiNew/CGCLetter/index", "feiyiNew/CGCLetter/index",
"feiyiNew/CGCTime/index" "feiyiNew/CGCTime/index",
"foodListNew/index",
"foodNew/index"
] ]
}, },
{ {
@ -249,8 +245,8 @@
"style": "v2", "style": "v2",
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"tabBar": { "tabBar": {
"color": "#999999", "color": "#000000",
"selectedColor": "#22A3CD", "selectedColor": "#000000",
"borderStyle": "white", "borderStyle": "white",
"list": [ "list": [
{ {

2
app.wxss

@ -124,7 +124,7 @@ page{
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.sz-xcx-fwb-img { .sz-xcx-fwb-img {
max-width: 100%; max-width: 100% !important;
height: auto; height: auto;
object-fit: cover; object-fit: cover;
} }

BIN
images/ai.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

BIN
images/ai_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 10 KiB

BIN
images/aindex_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
images/amap_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
images/auser_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

BIN
images/index.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

BIN
images/index_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
images/map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

BIN
images/map_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

BIN
images/place1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
images/place2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
images/user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
images/user_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

162
pages/activity/huawei/form/index.js

@ -1,162 +0,0 @@
// pages/activity/huawei/form/index.js
import commonApi from "../../../../utils/https/common"
import userApi from "../../../../utils/https/user"
Page({
/**
* 页面的初始数据
*/
data: {
multiArray:[],
multiIndex:[],
areaList:[],
info:{},
brands:[],
brandIndex:-1,
id:null,
info:{}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
commonApi.user_post('actonline/act_online/getActDetail',{
id:options.id
}).then(res=>{
this.setData({
info:res.data
})
})
commonApi.user_post('actonline/act_online/getMobileBrand',{}).then(res=>{
let brands = []
for(let i in res.data){
brands.push({
name:res.data[i],
id:i
})
}
this.setData({
brands:brands,
id:options.id
})
})
},
changeBrand:function(e){
this.setData({
brandIndex:e.detail.value
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
changeName:function(e){
let info = this.data.info
info.name = e.detail.value
this.setData({
info:info
})
},
changeTel:function(e){
let info = this.data.info
info.mobile = e.detail.value
this.setData({
info:info
})
},
changeCard:function(e){
let info = this.data.info
info.card_number = e.detail.value
this.setData({
info:info
})
},
submit:function(e){
let info = this.data.info;
if(!info.name){
wx.showToast({
title: '请输入姓名',
icon:'none'
})
return;
}
if(info.mobile.length!=11){
wx.showToast({
title: '请输入正确的手机号',
icon:'none'
})
return;
}
if(info.card_number.length!=18){
wx.showToast({
title: '请输入正确的身份证号码',
icon:'none'
})
return;
}
if(this.data.brandIndex==-1){
wx.showToast({
title: '请选择手机品牌',
icon:'none'
})
return;
}
info.id = this.data.id
info.mobile_type = Number(this.data.brands[this.data.brandIndex].id)
commonApi.user_post("actonline/act_online/actSign",info).then(res=>{
if(res.code==1){
wx.navigateTo({
url: '../result/index?id='+this.data.id,
})
}
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/huawei/form/index.json

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

29
pages/activity/huawei/form/index.wxml

@ -1,29 +0,0 @@
<!--pages/activity/huawei/form/index.wxml-->
<title title="信息填写"></title>
<image lazy-load src="{{info.head_img}}" mode="widthFix" class="topimg"></image>
<view class="input-box">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/huawei/regtip.png" mode="widthFix"></image>
<view class="input-item">
<view>姓名</view>
<input bindinput="changeName" type="text" />
</view>
<view class="input-item">
<view>联系方式</view>
<input bindinput="changeTel" type="text" />
</view>
<view class="input-item">
<view>身份证</view>
<input bindinput="changeCard" type="text" />
</view>
<view class="input-item">
<view>手机品牌</view>
<picker mode="selector" value="{{brandIndex}}" range="{{brands}}" range-key="name" bindchange="changeBrand">
<view class="picker">
<view class="areatext">{{brandIndex==-1?'请选择':brands[brandIndex].name}}</view>
<view class="iconfont icon-xia"></view>
</view>
</picker>
</view>
<image lazy-load bindtap="submit" src="https://static.ticket.sz-trip.com/xcxImages/huawei/regsubmit.png" class="submit-btn" mode="widthFix"></image>
</view>
<view style="height:30rpx"></view>

72
pages/activity/huawei/form/index.wxss

@ -1,72 +0,0 @@
/* pages/activity/huawei/form/index.wxss */
.topimg {
display: block;
width: 100%;
}
page {
background: #003323;
}
.input-box {
margin: 0 42rpx;
position: relative;
z-index: 1;
margin-top: -130rpx;
background: white;
border-radius: 16rpx;
font-size: 31rpx;
padding: 30rpx 52rpx;
}
.input-box image {
display: block;
width: 264rpx;
height: 68rpx;
}
.input-box image.submit-btn {
display: block;
width: 561rpx;
height: 104rpx;
margin: 0 auto;
margin-top: 35rpx;
}
.input-box input {
display: block;
padding: 10rpx 30rpx;
width: 420rpx;
height: 71rpx;
line-height: 71rpx;
background: #FFFFFF;
border: 1rpx solid #CCCCCC;
border-radius: 10rpx;
box-sizing: border-box;
color: #333;
font-size: 32rpx;
font-weight: 500;
flex-shrink: 0;
}
.input-item {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 32rpx;
color: #333333;
margin-top: 45rpx;
margin-bottom: 45rpx;
}
.picker {
padding: 0 30rpx;
width: 420rpx;
height: 71rpx;
line-height: 71rpx;
background: #FFFFFF;
border: 1rpx solid #CCCCCC;
border-radius: 10rpx;
box-sizing: border-box;
color: #333;
font-size: 32rpx;
font-weight: 500;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
}

107
pages/activity/huawei/index.js

@ -1,107 +0,0 @@
// pages/activity/huawei/index.js
const sys = wx.getSystemInfoSync(),rect = wx.getMenuButtonBoundingClientRect();
let height = sys.screenHeight - (rect.top - sys.statusBarHeight) * 2 - rect.height - sys.statusBarHeight;
import commonApi from "../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
height:height,
isReg:false,
id:null,
info:{},
showRuleFlag:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 判断是否报名
this.setData({
id:options.id
})
commonApi.user_post("actonline/act_online/isSign",{id:options.id}).then(res=>{
this.setData({
isReg:res.data
})
})
commonApi.user_post("actonline/act_online/getActDetail",{
id:options.id
}).then(res=>{
if(res.data){
for(let i in res.data){
if(i.indexOf('time')!=-1 && res.data[i]){
res.data[i] = res.data[i].replace(/-/g,'.')
res.data[i] = res.data[i].substr(0,res.data[i].length-3)
}
}
this.setData({
info:res.data
})
}
})
},
showRule:function(){
this.setData({
showRuleFlag:!this.data.showRuleFlag
})
},
gotoPath:function(e){
let path = e.currentTarget.dataset.path;
wx.navigateTo({
url: path
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/huawei/index.json

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

20
pages/activity/huawei/index.wxml

@ -1,20 +0,0 @@
<!--pages/activity/huawei/index.wxml-->
<view class="bg">
<title title="摄影大赛"></title>
<view class="info-box" style="background:url({{info.back_img}});background-size:100% 100%;background-repeat:no-repat;height:{{height}}px">
<view bindtap="showRule" class="rule-btn">规则</view>
<view wx:if="{{!isReg}}" class="tiptext">线上报名时间:{{info.sign_begin_time}} - {{info.sign_end_time}} </view>
<view wx:if="{{!isReg}}" class="tiptext">线上投票时间:{{info.begin_time}} - {{info.end_time}} </view>
<image lazy-load bindtap="gotoPath" style="margin-top:40rpx" data-path="form/index?id={{id}}" wx:if="{{!isReg}}" src="https://static.ticket.sz-trip.com/xcxImages/huawei/regbtn.png" mode="widthFix" class="btnimg"></image>
<image lazy-load bindtap="gotoPath" data-path="upload/index?id={{id}}" wx:if="{{isReg}}" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadbtn.png" mode="widthFix" class="btnimg"></image>
<image lazy-load bindtap="gotoPath" data-path="list/index?id={{id}}" wx:if="{{isReg}}" src="https://static.ticket.sz-trip.com/xcxImages/huawei/mybtn.png" mode="widthFix" class="btnimg"></image>
<view class="bottomtext">{{info.sub_title}}</view>
</view>
</view>
<view class="mask" wx:if="{{info && showRuleFlag}}">
<view bindtap="showRule" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">• 活动规则 •</view>
<rich-text nodes="{{info.rule_desc}}"></rich-text>
</view>
</view>

71
pages/activity/huawei/index.wxss

@ -1,71 +0,0 @@
/* pages/activity/huawei/index.wxss */
.info-box {
position: absolute;
left: 0;
right: 0;
bottom: 0;
background: url(https://static.ticket.sz-trip.com/xcxImages/huawei/bg.png);
background-size: 100% 100%;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: center;
}
.bg {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
}
.btnimg {
display: block;
width: 558rpx;
height: 104rpx;
margin-bottom: 23rpx;
}
.bottomtext {
color: #fff;
text-align: center;
font-size: 24rpx;
margin-bottom: 45rpx;
}
.rule-btn {
font-size: 27rpx;
color: #fff;
font-weight: 500;
width: 73rpx;
height: 73rpx;
border: 1rpx solid;
border-radius: 50%;
position: absolute;
right: 30rpx;
top: 30rpx;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.tiptext {
color: #fff;
font-size: 25rpx;
margin-top: 20rpx;
}
.rule-box {
height: 50%;
overflow-y: auto;
font-size: 27rpx;
color: #010101;
padding: 0 50rpx;
width: 500rpx;
padding-bottom: 30rpx;
line-height: 46rpx;
}
.rule-title {
text-align: center;
font-size: 32rpx;
color: #000;
font-weight: 500;
line-height: 100rpx;
}

209
pages/activity/huawei/list/index.js

@ -1,209 +0,0 @@
// pages/activity/huawei/list/index.js
import commonApi from "../../../../utils/https/common"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
id:null,
types:[],
typeIndex:0,
list:[],
detail:{},
showRuleFlag:false,
user_id:null,
isReg:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
if(options.user_id){
let user_id = wx.getStorageSync('jstrip_userid');
if(user_id!=options.user_id){
app.globalData.weburl = 'https://m.cloud.sz-trip.com/photoWorksDetail?id='+options.id+'&type_id='+options.type_id
wx.redirectTo({
url: '/pages/pbService/web/index'
})
return;
}
}
commonApi.user_post("actonline/act_online/isSign",{id:options.id}).then(res=>{
if(res.code==1){
this.setData({
isReg:res.data
})
}
})
commonApi.user_post("actonline/act_online/getActDetail",{id:options.id}).then(res=>{
this.setData({
detail:res.data
})
})
commonApi.user_post("actonline/act_online/getActTypeList",{
act_id:this.data.id
}).then(res=>{
this.setData({
types:res.data
})
if(res.data.length>0){
this.getList()
}
})
},
showRule:function(){
this.setData({
showRuleFlag:!this.data.showRuleFlag
})
},
reUpload:function(){
let that = this;
wx.showModal({
title:"提示",
content:"一个分类的作品多次提交,平台只保留最近上传的作品。",
cancelText:"否",
confirmText:"是",
success:function(res){
if(res.confirm){
that.gotoUpload()
}
}
})
},
changeType:function(e){
this.setData({
typeIndex:e.currentTarget.dataset.type,
list:[]
})
this.getList()
},
getList:function(){
commonApi.user_post("actonline/act_online/myWork",{
type_id:this.data.types[this.data.typeIndex].id,
id:this.data.id,
page:1,
limit:100,
user_id:this.data.user_id || null
}).then(res=>{
if(this.data.user_id && res.data.data[0].status!=1){
res.data.data = []
}
this.setData({
list:res.data.data
})
this.onShareAppMessage()
})
},
gotoUpload:function(){
if(this.data.isReg){
wx.navigateTo({
url: '../upload/index?id='+this.data.id
})
}
else {
wx.navigateTo({
url: '../index?id='+this.data.id
})
}
},
vote:function(e){
let that = this
commonApi.user_post("actonline/act_online/vote",{
id:this.data.list[0].id
}).then(res=>{
if(res.code==1){
wx.showToast({
title: '投票成功',
icon:'success'
})
let list = this.data.list;
list[0].votes = Number(list[0].votes) + 1;
}
else if(res.code==-1){
wx.showModal({
title:"提示",
content:res.msg,
confirmText:"关闭",
cancelText:"前往报名",
success:function(res){
if(!res.confirm){
wx.navigateTo({
url: '/pages/activity/huawei/index?id='+that.data.id
})
}
}
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
if(this.data.list.length>0){
return {
title:"帮我投一票吧~",
path:'/pages/activity/huawei/list/index?id='+this.data.list[0].act_online_id+'&type_id='+this.data.list[0].act_online_type+'&user_id='+this.data.list[0].user.id+'&did='+this.data.list[0].id,
imageUrl:this.data.list[0].img
}
}
else {
return {
title:"君到苏州摄影大赛作品",
path:"/pages/pbService/web/index?url="+encodeURIComponent('https://m.cloud.sz-trip.com/photoWorksList?id=6'),
imageUrl:"https://m.cloud.sz-trip.com/static/images/logobai.png"
}
}
}
})

5
pages/activity/huawei/list/index.json

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

42
pages/activity/huawei/list/index.wxml

@ -1,42 +0,0 @@
<!--pages/activity/huawei/list/index.wxml-->
<title title="{{user_id?'作品详情':'我的作品'}}"></title>
<view class="tabs">
<view wx:for="{{types}}" bindtap="changeType" data-type="{{index}}" class="tab{{typeIndex==index?' active':''}}">{{item.title}}</view>
</view>
<view wx:if="{{list.length!=0}}">
<view class="title">{{list[0].title}}</view>
<view class="work-tips-my" wx:if="{{user_id}}">
<image lazy-load src="{{list[0].user.avatar}}" mode="aspectFill"></image>
<view class="nickname">{{list[0].user.nickname}}</view>
<text style="color:#333">作品id:{{list[0].id}}</text>
</view>
<view class="work-tips-my" wx:else>
<view>作品id:{{list[0].id}}</view>
<text>作品状态:</text>
<text class="status{{list[0].status==1?' active':''}}">{{list[0].status_text}}</text>
</view>
<view class="refund-msg" wx:if="{{!user_id && list[0].status==2 && list[0].refund_msg}}">拒绝理由:{{list[0].refund_msg}}</view>
<image lazy-load src="{{list[0].img}}" class="mainimg" mode="widthFix"></image>
<view class="vote-box">
<view class="count-num">当前得票:{{list[0].votes}}</view>
<view class="vote-btn" wx:if="{{user_id}}" bindtap="vote">投票</view>
</view>
<view class="content">
{{list[0].desc}}
</view>
<view wx:if="{{!user_id}}" class="rule-btn" bindtap="showRule">规则</view>
<!-- <image lazy-load wx:if="{{!user_id}}" style="width:646rpx" bindtap="reUpload" class="btnimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/reupload.png" mode="widthFix"></image> -->
<view wx:if="{{!user_id}}" style="height:50rpx"></view>
</view>
<view wx:else>
<image lazy-load class="emptyimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/emptyimg.png" mode="widthFix"></image>
<view class="tip1">投票已开始,无法上传作品!</view>
<!-- <image lazy-load bindtap="gotoUpload" class="btnimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image> -->
</view>
<view class="mask" wx:if="{{detail && showRuleFlag}}">
<view bindtap="showRule" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">• 活动规则 •</view>
<rich-text nodes="{{detail.rule_desc}}"></rich-text>
</view>
</view>

163
pages/activity/huawei/list/index.wxss

@ -1,163 +0,0 @@
/* pages/activity/huawei/list/index.wxss */
.tabs {
display: flex;
align-items: center;
flex-wrap: nowrap;
overflow-x: auto;
margin: 0 27rpx;
height: 92rpx;
border-bottom: 1rpx solid #cccccc;
color: #666;
font-size: 31rpx;
padding: 0 28rpx;
}
.tab {
margin-right: 140rpx;
position: relative;
line-height: 92rpx;
flex-shrink: 0;
}
.tab:last-child {
margin-right: 0;
}
.tab.active {
color: #000;
font-weight: 500;
}
.tab.active::after {
content: "1";
font-size: 0;
display: block;
position: absolute;
width: 60rpx;
left: 50%;
margin-left: -30rpx;
bottom: 0;
height: 7rpx;
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93));
border-radius: 3rpx;
}
.title {
text-align: center;
padding: 39rpx 30rpx;
margin-top: 12rpx;
font-size: 36rpx;
color: #333;
font-weight: bold;
}
.mainimg {
display: block;
margin: 0 auto;
width: 625rpx;
border: 13rpx solid #FEE5C6;
margin-bottom: 50rpx;
}
.content {
margin: 0 52rpx;
padding-bottom: 30rpx;
font-size: 27rpx;
color: #333333;
}
.emptyimg {
display: block;
margin: 91rpx auto;
width: 414rpx;
height: 193rpx;
}
.tip1 {
text-align: center;
font-size: 35rpx;
color: #000000;
}
.btnimg {
width: 558rpx;
margin: 0 auto;
margin-top: 86rpx;
display: block;
}
.work-tips-my {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 31rpx;
color: #666;
margin: 0 53rpx;
padding: 20rpx 0;
}
.work-tips-my view {
flex: 1;
}
.work-tips-my .status {
color: #CC0000;
}
.work-tips-my .status.active {
color: #169900;
}
.count-num {
color: #333;
font-size: 31rpx;
font-weight: 500;
}
.rule-btn {
width: 143rpx;
position: fixed;
text-align: center;
line-height: 66rpx;
background: #FFFC00;
border-top-left-radius: 33rpx;
border-bottom-left-radius: 33rpx;
font-size: 31rpx;
color: #333333;
padding-right: 10rpx;
right: 0;
bottom: 246rpx;
}
.rule-box {
height: 50%;
overflow-y: auto;
font-size: 27rpx;
color: #010101;
padding: 0 50rpx;
width: 500rpx;
padding-bottom: 30rpx;
line-height: 46rpx;
}
.rule-title {
text-align: center;
font-size: 32rpx;
color: #000;
font-weight: 500;
line-height: 100rpx;
}
.vote-box {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 53rpx;
padding-bottom: 50rpx;
}
.vote-btn {
width: 175rpx;
line-height: 64rpx;
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93));
border-radius: 32rpx;
text-align: center;
color: #333333;
font-size: 31rpx;
font-weight: 500;
}
.work-tips-my image {
display: block;
width: 53rpx;
height: 53rpx;
border-radius: 50%;
}
.work-tips-my view.nickname {
font-size: 28rpx;
margin: 0 20rpx;
}
.refund-msg {
color: #CC0000;
margin: 30rpx 53rpx;
margin-top: 10rpx;
}

73
pages/activity/huawei/result/index.js

@ -1,73 +0,0 @@
// pages/activity/huawei/result/index.js
Page({
/**
* 页面的初始数据
*/
data: {
id:null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
},
upload:function(e){
wx.navigateTo({
url: '../upload/index?id='+this.data.id
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/huawei/result/index.json

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

7
pages/activity/huawei/result/index.wxml

@ -1,7 +0,0 @@
<!--pages/activity/huawei/result/index.wxml-->
<title title="报名成功"></title>
<image lazy-load class="logo" src="https://static.ticket.sz-trip.com/xcxImages/huawei/regsuccess.png" mode="widthFix"></image>
<view class="text">恭喜您已报名成功!</view>
<view>点击下方按钮开始进行作品上传</view>
<image lazy-load class="arrowimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/resarrow.png" mode="widthFix"></image>
<image lazy-load bindtap="upload" class="uploadimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadbtn.png"></image>

30
pages/activity/huawei/result/index.wxss

@ -1,30 +0,0 @@
/* pages/activity/huawei/result/index.wxss */
.logo {
margin: 64rpx auto;
width: 415rpx;
height: 393rpx;
display: block;
}
page {
text-align: center;
color: #666666;
font-size: 28rpx;
}
.uploadimg {
display: block;
width: 558rpx;
height: 104rpx;
margin: 0 auto;
}
.arrowimg {
display: block;
margin: 35rpx auto;
width: 42rpx;
height: 58rpx;
}
.text {
font-size: 45rpx;
font-weight: 500;
color: #000000;
margin-bottom: 20rpx;
}

234
pages/activity/huawei/upload/index.js

@ -1,234 +0,0 @@
// pages/activity/huawei/upload/index.js
import commonApi from "../../../../utils/https/common"
Page({
/**
* 页面的初始数据
*/
data: {
id:null,
types:[],
typeIndex:-1,
title:"",
img:null,
desc:"",
date:null,
address:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
commonApi.user_post('actonline/act_online/getActTypeList',{
act_id:options.id
}).then(res=>{
this.setData({
types:res.data
})
})
},
changeType:function(e){
this.setData({
typeIndex:e.detail.value
})
},
changeTitle:function(e){
this.setData({
title:e.detail.value
})
},
changeContent:function(e){
this.setData({
desc:e.detail.value
})
},
uploadImg:function(){
let that = this;
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success (res) {
// tempFilePath可以作为img标签的src属性显示图片
const tempFilePaths = res.tempFilePaths[0]
if(tempFilePaths.substr(tempFilePaths.length-4,4)=='.gif'){
wx.showToast({
title: '图片格式错误',
icon:'none'
})
return;
}
wx.showLoading({
title: '图片上传中,请稍后'
})
wx.uploadFile({
url: 'https://api.cloud.sz-trip.com/api/pbservice.other/upload', //这里是上传的服务器地址
filePath: tempFilePaths,
header:{
token: wx.getStorageSync('jstrip_token'),
},
name: "file",
success: function (res) {
var res = JSON.parse(res.data);
let img = res.data.url;
that.setData({
img:img
})
wx.hideLoading();
},
fail:function(res){
wx.hideLoading();
}
})
}
})
},
bindDateChange:function(e){
this.setData({
date:e.detail.value
})
},
changeAddress:function(e){
this.setData({
address:e.detail.value
})
},
submit:function(){
if(!this.data.title){
wx.showToast({
title: '请输入作品标题',
icon:'none'
})
return;
}
if(this.getCNLen(this.data.title)>30){
wx.showToast({
title: '作品标题过长',
icon:'none'
})
return;
}
if(this.data.typeIndex==-1){
wx.showToast({
title: '请选择分类',
icon:'none'
})
return;
}
if(!this.data.date){
wx.showToast({
title: '请选择拍摄时间',
icon:'none'
})
return;
}
if(!this.data.address){
wx.showToast({
title: '请输入您所上传照片的拍摄地点',
icon:'none'
})
return;
}
if(!this.data.img){
wx.showToast({
title: '请上传图片',
icon:'none'
})
return;
}
if(!this.data.desc){
wx.showToast({
title: '请输入作品描述',
icon:'none'
})
return;
}
if(this.getCNLen(this.data.desc)>600){
wx.showToast({
title: '作品描述过长',
icon:'none'
})
return;
}
commonApi.user_post("actonline/act_online/uploadWork",{
title:this.data.title,
img:this.data.img,
desc:this.data.desc,
type_id:this.data.types[this.data.typeIndex].id,
id:this.data.id,
shot_time:this.data.date,
shot_address:this.data.address
}).then(res=>{
if(res.code==1){
wx.navigateTo({
url: '../uploadres/index?id='+this.data.id
})
}
})
},
getCNLen:function(str){
var len = 0;
for (var i=0; i<str.length; i++) {
if (str.charCodeAt(i)>127 || str.charCodeAt(i)==94) {
len += 2;
} else {
len ++;
}
}
return len;
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/huawei/upload/index.json

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

38
pages/activity/huawei/upload/index.wxml

@ -1,38 +0,0 @@
<!--pages/activity/huawei/upload/index.wxml-->
<title title="作品上传"></title>
<image lazy-load class="topimg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadtop.png" mode="widthFix"></image>
<view class="input-box">
<view class="input-item">
<text>作品标题</text>
<input type="text" bindinput="changeTitle" placeholder="标题长度限制15个中文字符" />
</view>
<view class="input-item">
<text>选择分类</text>
<picker mode="selector" value="{{typeIndex}}" range="{{types}}" range-key="title" bindchange="changeType">
<view class="picker">
<view class="areatext">{{typeIndex==-1?'请选择':types[typeIndex].title}}</view>
<view class="iconfont icon-xia"></view>
</view>
</picker>
</view>
<view class="input-item">
<text>拍摄时间</text>
<picker mode="date" value="{{date}}" start="2015-09-01" end="2022-09-01" bindchange="bindDateChange">
<view class="picker">
<view class="areatext">{{!date?'请选择':date}}</view>
<view class="iconfont icon-xia"></view>
</view>
</picker>
</view>
<view class="input-item">
<text>拍摄地点</text>
<input type="text" bindinput="changeAddress" placeholder="请输入您所上传照片的拍摄地点" />
</view>
</view>
<view class="tip1">上传图片</view>
<image lazy-load wx:if="{{img}}" class="uploadimg" bindtap="uploadImg" src="{{img}}" mode="aspectFill"></image>
<image lazy-load wx:else class="uploadimg" bindtap="uploadImg" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadimg.png" mode="widthFix"></image>
<view class="tip1">作品描述</view>
<textarea bindinput="changeContent" placeholder="请添加您作品的描述(最多300字)" class="textarea"></textarea>
<image lazy-load bindtap="submit" class="uploadbtn" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadbtn.png" mode="widthFix"></image>
<view class="tip2">一个分类的作品多次提交,平台只保留最近上传的作品</view>

112
pages/activity/huawei/upload/index.wxss

@ -1,112 +0,0 @@
/* pages/activity/huawei/upload/index.wxss */
.topimg {
display: block;
width: 100%;
}
page {
background: #F7F7F7;
}
.input-box {
margin: 0 24rpx;
margin-top: -60rpx;
position: relative;
z-index: 1;
border-radius: 7rpx;
background: white;
padding: 32rpx 28rpx;
font-size: 31rpx;
color: #333333;
}
.input-item {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 24rpx;
margin-bottom: 27rpx;
}
.input-box text {
margin-right: 20rpx;
flex-shrink: 0;
font-size: 31rpx;
}
.input-box input {
width: 483rpx;
height: 80rpx;
line-height: 80rpx;
box-sizing: border-box;
display: block;
padding: 0 15rpx;
border: 1rpx solid #CCCCCC;
border-radius: 4rpx;
}
.input-box .input-item:last-child{
margin-bottom: 0;
}
.picker {
display: flex;
width: 483rpx;
height: 80rpx;
box-sizing: border-box;
padding-left: 15rpx;
border: 1rpx solid #CCCCCC;
border-radius: 4rpx;
align-items: center;
justify-content: space-between;
}
.picker .iconfont {
width: 80rpx;
text-align: center;
line-height: 80rpx;
border-left: 1rpx solid #CCCCCC;
flex-shrink: 0;
}
.picker .areatext {
flex: 1;
}
.tip1 {
font-size: 36rpx;
padding-left: 52rpx;
margin-top: 46rpx;
margin-bottom: 26rpx;
position: relative;
line-height: 33rpx;
}
.tip1::before {
content:"1";
font-size: 0;
position: absolute;
width: 10rpx;
height: 33rpx;
left: 24rpx;
top: 0;
background: linear-gradient(0deg, rgba(251, 197, 34, 0.93), rgba(255, 252, 0, 0.93));
}
.uploadimg {
display: block;
margin-left: 24rpx;
width: 249rpx;
height: 191rpx;
margin-bottom: 50rpx;
}
.textarea {
font-size: 24rpx;
margin: 24rpx;
padding: 20rpx 30rpx;
border-radius: 7rpx;
background: white;
display: block;
height: 230rpx;
width: 640rpx;
}
.uploadbtn {
display: block;
margin: 40rpx auto;
width: 558rpx;
height: 104rpx;
}
.tip2 {
text-align: center;
font-size: 24rpx;
color: #b2b2b2;
padding-bottom: 40rpx;
}

78
pages/activity/huawei/uploadres/index.js

@ -1,78 +0,0 @@
// pages/activity/huawei/uploadres/index.js
Page({
/**
* 页面的初始数据
*/
data: {
id:null
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
this.setData({
id:options.id
})
},
gotoPath:function(e){
wx.navigateTo({
url: e.currentTarget.dataset.path,
})
},
backhome:function(){
wx.switchTab({
url: '/pages/index/index'
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
pages/activity/huawei/uploadres/index.json

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

8
pages/activity/huawei/uploadres/index.wxml

@ -1,8 +0,0 @@
<!--pages/activity/huawei/uploadres/index.wxml-->
<title title="上传成功"></title>
<image lazy-load class="logo" src="https://static.ticket.sz-trip.com/xcxImages/huawei/uploadres.png" mode="widthFix"></image>
<view class="tip1">恭喜您的作品已上传完成!</view>
<image lazy-load class="btnimg" bindtap="backhome" data-path="/pages/index/index" src="https://static.ticket.sz-trip.com/xcxImages/huawei/gobtn.png" mode="widthFix"></image>
<image lazy-load class="btnimg" bindtap="gotoPath" data-path="../list/index?id={{id}}" style="margin-bottom:92rpx" src="https://static.ticket.sz-trip.com/xcxImages/huawei/mybtn.png" mode="widthFix"></image>
<view class="tip2">通过第一轮评审的摄影作品将在9月1号后</view>
<view class="tip2">进行线上展示,请注意查看平台通知</view>

26
pages/activity/huawei/uploadres/index.wxss

@ -1,26 +0,0 @@
/* pages/activity/huawei/uploadres/index.wxss */
.logo {
display: block;
margin: 64rpx auto;
width: 414rpx;
height: 393rpx;
}
.tip1 {
font-size: 45rpx;
color: #000000;
font-weight: 500;
margin-bottom: 90rpx;
text-align: center;
}
.btnimg {
display: block;
margin: 24rpx auto;
width: 558rpx;
height: 104rpx;
}
.tip2 {
text-align: center;
font-size: 28rpx;
color: #666;
margin-bottom: 20rpx;
}

58
pages/component/kefu/index.js

@ -0,0 +1,58 @@
// pages/component/kefu/index.js
import commonApi from "../../../utils/https/common.js"
Component({
/**
* 组件的属性列表
*/
properties: {
},
data: {
show: false,
showPhone: false,
info: "",
phones: []
},
lifetimes: {
attached() {
console.log('组件已挂载到页面');
this.initData();
}
},
/**
* 组件的初始数据
*/
/**
* 组件的方法列表
*/
methods: {
initData () {
commonApi._post("kefu_tips/getTips", {platform:'miniapp'}).then(res=>{
if (res.data) {
this.setData({
showPhone: res.data.is_online,
info: res.data.content,
phones: res.data.emergency_phones
})
}
})
},
hideModal: function () {
this.setData({
show: false,
})
this.triggerEvent('hideModal');
},
phoneCall:function(e){
let phone = e.currentTarget.dataset.phone;
wx.makePhoneCall({
phoneNumber: phone,
})
},
}
})

4
pages/component/kefu/index.json

@ -0,0 +1,4 @@
{
"component": true,
"usingComponents": {}
}

24
pages/component/kefu/index.wxml

@ -0,0 +1,24 @@
<wxs src="../../../utils/filter.wxs" module="tool" />
<view class="bg">
<view class="modal-mask" bindtap="hideModal" catchtouchmove="preventTouchMove"></view>
<view class="modal-dialog">
<view class="iconfont icon-close" bindtap="hideModal">
<image src="https://static.ticket.sz-trip.com/uploads/20250929/75f708ed1c580afdefd3aed82d53f94a.png"></image>
</view>
<view class="modal-content">
<rich-text style="width: 100%;word-break: break-all;"
nodes="{{tool.formateRichText(info)}}"></rich-text>
<view class="phone-container" wx:for="{{phones}}" wx:if="{{showPhone}}">
<view bind:tap="phoneCall" data-phone="{{item}}">{{item}}</view>
</view>
</view>
<view class="modal-footer">
<view class="btn-confirms two" style="border-right: 1px solid #D8D8D8;" bindtap="hideModal">取消</view>
<button class="btn-confirms"
open-type="contact" bindcontact="handleContact">确定</button>
</view>
</view>
</view>

88
pages/component/kefu/index.wxss

@ -0,0 +1,88 @@
.bg{
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
overflow: hidden;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.modal-mask {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background: #000;
opacity: 0.5;
overflow: hidden;
z-index: 200;
color: #fff;
}
.modal-dialog {
width: 540rpx;
overflow: hidden;
position: relative;
z-index: 9999;
background: #FFFFFF;
border-radius: 20rpx;
}
.modal-content{
padding: 38rpx 26rpx;
}
.modal-footer {
display: flex;
flex-direction: row;
height: 112rpx;
border-top: 1px solid #dedede;
color: #000000;
padding: 30rpx 0;
box-sizing: border-box;
}
.btn-confirms {
flex: 1;
text-align: center;
font-weight: normal !important;
box-sizing: border-box;
width: 50% !important;
padding: 0 !important;
line-height: 50rpx;
background: none;
color: #0C898F;
font-weight: 500;
font-size: 32rpx;
}
.btn-confirms.two {
color: #000000;
}
.icon-close{
position: absolute;
width: 27.33rpx;
height: 27.33rpx;
top: 39rpx;
right: 26rpx;
}
.icon-close image{
width: 100%;
height: 100%;
}
.phone-container{
text-align: center;
font-weight: 500;
font-size: 27rpx;
color: #0C898F;
line-height: 1.8;
}

4
pages/component/proRec/proRec.js

@ -113,10 +113,10 @@ Component({
if (item.type == 'travels') { if (item.type == 'travels') {
// 游记做特殊处理 其他都按照原来的来 // 游记做特殊处理 其他都按照原来的来
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/strategyInfo/index?id=' + item.s_id, url: '/pages/info/strategyInfo/index?id=' + item.s_id+"&sourceFrom=recommend",
}) })
} else { } else {
util.gotoDetail(item); util.gotoDetail(item, false, "&sourceFrom=recommend");
} }
}, },
}, },

48
pages/index/index.js

@ -7,6 +7,7 @@ import commonApi from "../../utils/https/common"
import userApi from "../../utils/https/user" import userApi from "../../utils/https/user"
import util from "../../utils/util" import util from "../../utils/util"
import https from "../../utils/https.js" import https from "../../utils/https.js"
import { unix } from "dayjs"
Page({ Page({
data: { data: {
@ -405,6 +406,9 @@ Page({
urltopage: {}, urltopage: {},
cityIndex: 0,
scrollItem: "scrollItem-0",
// ---------------2025-5-26改版没用到的------------------ // ---------------2025-5-26改版没用到的------------------
fourProduct: [], fourProduct: [],
hotIndex: 0, hotIndex: 0,
@ -592,9 +596,12 @@ Page({
getShowMore () { getShowMore () {
commonApi._post("multimedia/detail", {id: 2462}).then(res => { commonApi._post("multimedia/detail", {id: 2462}).then(res => {
if (res && res.data) {
this.setData({ this.setData({
showMore: res.data.company_name ==1?true:false showMore: res.data.company_name ==1?true:false
}) })
}
}) })
}, },
@ -797,7 +804,6 @@ Page({
}) })
return return
} }
}, },
// 后台配置数据跳转 // 后台配置数据跳转
mainNavClick:function (e) { mainNavClick:function (e) {
@ -860,6 +866,16 @@ Page({
}) })
return return
} }
if (item.jump_type == "text") {
setTimeout(() => {
wx.showToast({
title: item.text,
icon:'none',
duration: 2000,
})
}, 200);
}
}, },
// 其他平台配置数据的跳转 // 其他平台配置数据的跳转
@ -926,7 +942,10 @@ Page({
tag_id: 85,offset: 0,limit: 5, tag_id: 85,offset: 0,limit: 5,
}).then(res=>{ }).then(res=>{
let resData = res.data.list || [] let resData = res.data.list || []
resData.forEach(v=>{ v.pagePoint = {classification: 'hot', key_number: v.id} }) resData.forEach(v=>{
v.pagePoint = {classification: 'hot', key_number: v.id};
v.display_tags_arr = v.display_tags?v.display_tags.split(",") : []
})
this.setData({ list: resData}) this.setData({ list: resData})
}) })
}, },
@ -1006,6 +1025,21 @@ Page({
}) })
}, },
changeSimpleVal (e) {
let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val;
let param = {}
param[keyname] = val
if (keyname == "cityIndex") {
let scrollIndex = val-2
if (scrollIndex<0) { scrollIndex = 0 }
param.scrollItem = "scrollItem-"+scrollIndex
}
this.setData(param)
console.log(this.data)
},
onShow: function() { onShow: function() {
this.pagePoint({event: 'home_view'}, 1) this.pagePoint({event: 'home_view'}, 1)
// 修复 首页广告点击后返回首页 tabbar不显示 // 修复 首页广告点击后返回首页 tabbar不显示
@ -1013,6 +1047,16 @@ Page({
wx.showTabBar() wx.showTabBar()
} }
util.clearGlobalPagePoint() util.clearGlobalPagePoint()
if (app.globalData.innerAudioContext) {
app.globalData.innerAudioContext.stop()
}
},
goAIUrl () {
wx.switchTab({
url: '/pages/pbService/aiHelpYou/index',
})
}, },
/** /**

168
pages/index/index.wxml

@ -1,22 +1,7 @@
<!--index.wxml--> <!--index.wxml-->
<view class="bg" wx:if="{{!isTest}}" style="background-image: url({{indexSeason.background}});background: linear-gradient(165deg, #FF8623 213px, #FFE68A 213px); ">
<view class="bg" wx:if="{{!isTest}}" style="background-image: url({{indexSeason.background}});">
<!-- 顶部banner --> <!-- 顶部banner -->
<view style="position:relative;z-index: 1;"> <view style="position:relative;z-index: 1;padding-top: 200rpx;">
<swiper class="swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular
indicator-dots indicator-active-color="#fff">
<block wx:for="{{banner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image lazy-load src="{{item.head_img}}" mode="scaleToFill"></image>
</swiper-item>
</block>
</swiper>
<!-- <view class="com-flex dot-list">
<view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view>
</view> -->
<view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px"> <view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px">
<view wx:if="{{weather}}" style="display: flex;flex-shrink: 0;"> <view wx:if="{{weather}}" style="display: flex;flex-shrink: 0;">
<image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image> <image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image>
@ -26,10 +11,24 @@
src="https://static.ticket.sz-trip.com/uploads/20250714/1f3ac6a7144c6e6849edad89289061cc.png" mode="aspectFill"></image> src="https://static.ticket.sz-trip.com/uploads/20250714/1f3ac6a7144c6e6849edad89289061cc.png" mode="aspectFill"></image>
</view> </view>
<navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver"> <navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250526/f7cbe782688db5e39d30a24e4a2724b6.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image> <image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250916/7d6a5865ffc145ba762fb5a977e4bb37.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image>
<view class="textOver" style="color:#000000">搜索您想要的</view> <view class="textOver" style="color:#000000">搜索您想要的</view>
</navigator> </navigator>
</view> </view>
<swiper class="swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular
indicator-dots indicator-color="rgba(255, 255, 255, .5)" indicator-active-color="#fff">
<block wx:for="{{banner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image lazy-load src="{{item.head_img}}" mode="scaleToFill"></image>
</swiper-item>
</block>
</swiper>
<!-- <view class="com-flex dot-list">
<view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view>
</view> -->
<view class="banner-main"> <view class="banner-main">
<view catchtap="mainNavClick" class="banner-main-item" wx:for="{{bannerDataList}}" wx:key="index" data-item="{{item}}"> <view catchtap="mainNavClick" class="banner-main-item" wx:for="{{bannerDataList}}" wx:key="index" data-item="{{item}}">
@ -40,16 +39,8 @@
<view class="main-content" > <view class="main-content" >
<!-- 金刚区 --> <!-- 金刚区 -->
<view class="no-scrollbar" wx:if="{{mainTypeList.length>0}}"> <view style="padding: 0 20rpx;" wx:if="{{mainTypeList.length>0}}">
<!-- <scroll-view scroll-x style="height:152rpx" bindscroll="listenScroll" data-keyname="mainTypeLeft" class="no-scrollbar"> <!-- <swiper class="top-icons no-scrollbar" autoplay="{{true}}" style="height:180rpx;padding-top: 43rpx;"
<view class="top-icons no-scrollbar">
<view bindtap="mainNavClick" class="top-icon-item" wx:for="{{mainTypeList}}" wx:key="index" data-item="{{item}}">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
<view class="top-icon-text">{{item.menu_name}}</view>
</view>
</view>
</scroll-view> -->
<swiper class="top-icons no-scrollbar" autoplay="{{false}}" style="height:180rpx;padding-top: 43rpx;"
bindchange="changeBannerIndex" data-keyname="mainNavIndex" bindchange="changeBannerIndex" data-keyname="mainNavIndex"
display-multiple-items="5" circular display-multiple-items="5" circular
current="0"> current="0">
@ -59,18 +50,26 @@
<view class="top-icon-text">{{item.menu_name}}</view> <view class="top-icon-text">{{item.menu_name}}</view>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper> -->
<view class="scroll-line" > <view class="top-icons no-scrollbar">
<view bindtap="mainNavClick" class="top-icon-item" data-item="{{item}}" wx:for="{{mainTypeList}}" wx:key="index">
<image lazy-load src="{{item.icon}}" mode="aspectFill" class="{{(mainNavIndex+2)==index?'active':''}}"></image>
<view class="top-icon-text">{{item.menu_name}}</view>
</view>
</view>
<!-- <view class="scroll-line" >
<view class="scroll-line-bg" wx:if="{{(mainNavIndex+2) < (mainTypeList.length/2)}}" style="width:17rpx;"></view> <view class="scroll-line-bg" wx:if="{{(mainNavIndex+2) < (mainTypeList.length/2)}}" style="width:17rpx;"></view>
<view class="scroll-line-bg" wx:else style="width:17rpx;margin-left: 17rpx;"></view> <view class="scroll-line-bg" wx:else style="width:17rpx;margin-left: 17rpx;"></view>
</view> -->
</view> </view>
</view>
<view class="content-box"> <view class="content-box">
<!-- 苏城环游记 todo--> <!-- 苏城环游记 todo-->
<view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}"> <view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}">
<swiper class="small-swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="ztBannerIndex"> bindchange="changeBannerIndex" data-keyname="ztBannerIndex">
<block wx:for="{{ztbanner}}" wx:key="index"> <block wx:for="{{ztbanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <swiper-item bindtap="bannerClick" data-item="{{item}}">
@ -85,28 +84,36 @@
</view> </view>
<!-- 限时特惠--新版--> <!-- 限时特惠--新版-->
<view class="sale-road-boxes xpth" style="margin-bottom: 18.67rpx;margin-top: 0;padding-top: 0;" wx:if="{{func_data.hot_deals}}"> <view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.hot_deals}}">
<!-- 上方标题部分 --> <image lazy-load class="common-header-img" mode="widthFix" src="{{indexSeason.hotBac}}"></image>
<view class="xsth-title"> <!-- <image lazy-load class="common-header-img" mode="widthFix" src="https://static.ticket.sz-trip.com/uploads/20250929/49cb17e72c8841c9a72f2d109901de83.png"></image> -->
<view class="xsth-left" style="display: flex;">
<image lazy-load style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBac}}"></image>
<image lazy-load style="width: 253.33rpx;" wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.hotBacImg}}"></image>
<view style="font-size: 0;" wx:if="{{indexSeason.xpthBac && indexSeason.xpthBacImg}}">
<image lazy-load style="width: 253.33rpx;" wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBacImg}}"></image>
<image lazy-load style="width: 253.33rpx;" wx:else mode="aspectFill" class="common-header-img" src="{{indexSeason.xpthBac}}"></image>
</view> </view>
<!-- 上方标题部分 -->
<!-- <view class="xsth-title">
<view class="xsth-left" style="display: flex;">
<image lazy-load wx:if="{{xpthIndex==0}}" mode="widthFix" class="common-header-img" src="{{indexSeason.hotBac}}"></image>
<image lazy-load wx:else="" bindtap="changeXpthIndex" data-value="{{0}}" mode="widthFix" class="common-header-img" src="{{indexSeason.hotBacImg}}"></image>
<view style="font-size: 0;padding-left: 34rpx;" wx:if="{{indexSeason.xpthBac && indexSeason.xpthBacImg}}">
<image lazy-load wx:if="{{xpthIndex==0}}" bindtap="changeXpthIndex" data-value="{{1}}" mode="widthFix" class="common-header-img" src="{{indexSeason.xpthBacImg}}"></image>
<image lazy-load wx:else mode="widthFix" class="common-header-img" src="{{indexSeason.xpthBac}}"></image>
</view> </view>
</view> </view>
</view> -->
<view style="margin-top: -38rpx;" wx:if="{{func_data.hot_deals}}">
<!-- 热门 --> <!-- 热门 -->
<view style="width: 100%;" wx:if="{{xpthIndex==0}}"> <view style="width: 100%;" wx:if="{{false}}">
<scroll-view scroll-x style="height:372rpx;padding-top: 25rpx;"> <scroll-view scroll-x style="height:372rpx;padding-top: 25rpx;">
<view class="season-hot"> <view class="season-hot">
<view class="season-item" wx:for="{{list}}" wx:key="index" bind:tap="productGotoDetail" data-item="{{item}}" data-source="当季热门"> <view class="season-item" wx:for="{{list}}" wx:key="index" bind:tap="productGotoDetail" data-item="{{item}}" data-source="当季热门">
<image lazy-load src="{{item.headimg}}"></image> <image lazy-load src="{{item.headimg}}"></image>
<view class="season-content" style="padding:6rpx 12rpx;min-height: 130rpx;"> <view class="season-content" style="padding:0 12rpx 6rpx;min-height: 130rpx;">
<view class="textOver2">{{item.title}}</view> <view class="textOver2">{{item.title}}</view>
<view class="tags textOver" wx:if="{{item.display_tags}}">
<view class="tag" wx:for="{{item.display_tags_arr}}" wx:key="index" wx:for-item="tag">{{tag}}</view>
</view>
<view class="price"> <view class="price">
<text>¥</text><text>{{item.price/100}}</text><text>起</text> <text>¥</text><text>{{item.price/100}}</text><text>起</text>
</view> </view>
@ -118,7 +125,7 @@
</view> </view>
<!-- 显示特惠 --> <!-- 显示特惠 -->
<view class="xpth-product" wx:else=""> <view class="xpth-product" wx:if="{{false}}">
<!-- 左边的2个产品 --> <!-- 左边的2个产品 -->
<view class="xpth-left"> <view class="xpth-left">
<view class="xpth-item" wx:for="{{xpth.list}}" bindtap="productGotoDetail" data-item="{{item}}" wx:key="id" data-source="限时特惠"> <view class="xpth-item" wx:for="{{xpth.list}}" bindtap="productGotoDetail" data-item="{{item}}" wx:key="id" data-source="限时特惠">
@ -134,7 +141,7 @@
</view> </view>
<!-- 右边的banner --> <!-- 右边的banner -->
<view class="xpth-banner" wx:if="{{xpth&&xpth.adv&&xpth.adv.length>0}}"> <view class="xpth-banner" wx:if="{{xpth&&xpth.adv&&xpth.adv.length>0}}">
<swiper class="xpth-banner-swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="xpth-banner-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="XPathBannerIndex"> bindchange="changeBannerIndex" data-keyname="XPathBannerIndex">
<block wx:for="{{xpth.adv}}" wx:key="index"> <block wx:for="{{xpth.adv}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}" data-source="限时特惠"> <swiper-item bindtap="bannerClick" data-item="{{item}}" data-source="限时特惠">
@ -149,10 +156,30 @@
</view> --> </view> -->
</view> </view>
</view> </view>
<view class="hot-prod-new">
<view class="hot-prod-left" bindtap="productGotoDetail" data-item="{{list[0]}}" wx:key="id" data-source="当季热门">
<image lazy-load class="prod-img" src="{{list[0].headimg}}" mode="aspectFill" />
<view class="xpth-item-title">{{list[0].subtitle}}</view>
</view>
<view class="hot-prod-right">
<view class="hot-right-item hot-prod-left" bindtap="productGotoDetail" data-item="{{list[1]}}" wx:key="id" data-source="当季热门">
<image lazy-load class="prod-img" src="{{list[1].headimg}}" mode="aspectFill" />
<view class="xpth-item-title">{{list[1].subtitle}}</view>
</view>
<view class="hot-right-item hot-prod-left" bindtap="productGotoDetail" data-item="{{list[2]}}" wx:key="id" data-source="当季热门">
<image lazy-load class="prod-img" src="{{list[2].headimg}}" mode="aspectFill" />
<view class="xpth-item-title">{{list[2].subtitle}}</view>
</view>
</view>
</view>
</view> </view>
<view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}"> <view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}">
<swiper class="small-swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="smBannerIndex"> bindchange="changeBannerIndex" data-keyname="smBannerIndex">
<block wx:for="{{xiaobanner}}" wx:key="index"> <block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}" style="position: relative;"> <swiper-item bindtap="bannerClick" data-item="{{item}}" style="position: relative;">
@ -169,14 +196,14 @@
<!-- 公共服务 --> <!-- 公共服务 -->
<view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.service_public}}"> <view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.service_public}}">
<image lazy-load class="common-header-img" mode="heightFix" src="{{indexSeason.ggfw}}"></image> <image lazy-load class="common-header-img" mode="widthFix" src="{{indexSeason.ggfw}}"></image>
<navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more" wx:if="{{showMore}}"> <navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more" wx:if="{{showMore}}">
<view style="height: 40rpx;line-height: 40rpx;">更多 ></view> <view style="height: 40rpx;line-height: 40rpx;">更多 ></view>
<!-- <image lazy-load style="width: 12rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20250526/e6b945c42851563e9672c6992057bd91.png" mode="" /> --> <!-- <image lazy-load style="width: 12rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20250526/e6b945c42851563e9672c6992057bd91.png" mode="" /> -->
</navigator> </navigator>
</view> </view>
<view wx:if="{{func_data.service_public}}"> <view wx:if="{{func_data.service_public}}">
<view class="ggfw-list" style="width:100%;margin-top: 30rpx;"> <view class="ggfw-list" style="width:100%;margin-top: -40rpx;position: relative;z-index: 1;">
<view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"> <view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image> <image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
</view> </view>
@ -185,10 +212,10 @@
<!-- 旅游助手 --> <!-- 旅游助手 -->
<view class="sale-road-boxes" style="margin-top:36rpx" wx:if="{{func_data.helper_travel}}"> <view class="sale-road-boxes" style="margin-top:36rpx" wx:if="{{func_data.helper_travel}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="pic-list" style="margin-top:30rpx" wx:if="{{func_data.helper_travel}}"> <view class="pic-list" style="margin-top:-40rpx;position: relative;z-index: 1;" wx:if="{{func_data.helper_travel}}">
<image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick" <image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"
src="{{item.icon}}" mode="aspectFill"></image> src="{{item.icon}}" mode="aspectFill"></image>
</view> </view>
@ -206,7 +233,7 @@
<!-- 数字文旅--> <!-- 数字文旅-->
<view class="sale-road-boxes" style="margin-top:30rpx" wx:if="{{func_data.culture_digital}}"> <view class="sale-road-boxes" style="margin-top:30rpx" wx:if="{{func_data.culture_digital}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.wlcx}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.wlcx}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[0]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[0]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="slide-out-box" wx:if="{{func_data.culture_digital}}"> <view class="slide-out-box" wx:if="{{func_data.culture_digital}}">
@ -228,16 +255,30 @@
<!-- 十全十美 --> <!-- 十全十美 -->
<view class="sale-road-boxes" wx:if="{{func_data.scenery_ten}}"> <view class="sale-road-boxes" wx:if="{{func_data.scenery_ten}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.sqj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.sqj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> -->
</view> </view>
<view class="six-box-new" wx:if="{{func_data.scenery_ten}}" > <view class="six-box-new" wx:if="{{func_data.scenery_ten}}" >
<image lazy-load wx:for="{{SQSM}}" src="{{item.icon}}" data-item="{{item}}" bindtap="mainNavClick" mode="aspectFill" wx:key="index"></image> <view class="big-image-box">
<image lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image>
<!-- <view class="text-container">
<view style="font-weight: bold;font-size: 32rpx;">昆山市</view>
<view>小昆山势卧麒麟,独角撑空甓塔新</view>
</view> -->
</view>
<scroll-view scroll-x enable-flex scroll-with-animation class="small-image-box" scroll-into-view="{{scrollItem}}">
<view id="scrollItem-{{index}}" class="small-image-item {{cityIndex==index?'active':''}}" wx:for="{{SQSM}}" bind:tap="changeSimpleVal"
data-keyname="cityIndex" data-val="{{index}}" mode="aspectFill" wx:key="index">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
<view class="text-box">{{item.menu_name}}</view>
</view>
</scroll-view>
</view> </view>
<!-- 长三角文旅平台 --> <!-- 长三角文旅平台 -->
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat &&func_data.platform_nearby}}"> <view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat &&func_data.platform_nearby}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.csjwlpt}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.csjwlpt}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[3]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[3]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="other-plats" wx:if="{{otherPlat &&func_data.platform_nearby}}"> <view class="other-plats" wx:if="{{otherPlat &&func_data.platform_nearby}}">
@ -249,10 +290,10 @@
<!-- 热门推荐 --> <!-- 热门推荐 -->
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{repurchaseList.length>0 &&func_data.repurchase }}"> <view class="sale-road-boxes" style="margin-top:0" wx:if="{{repurchaseList.length>0 &&func_data.repurchase }}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="hot-list" wx:if="{{func_data.repurchase}}"> <view class="hot-list" style="margin-top: -40rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number"> <view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number">
<view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id"> <view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id">
<view class="hot-item"> <view class="hot-item">
@ -286,7 +327,7 @@
<!-- 广告弹窗 --> <!-- 广告弹窗 -->
<view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view> <view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view>
<view class="alertavd" wx:if="{{showAdv}}"> <view class="alertavd" wx:if="{{showAdv}}">
<swiper class="alertsp" indicator-dots='{{true}}' indicator-color="rgba(255,255,255,0.5)" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" indicator-active-color="white"> <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="index"> <block wx:for="{{alertSwipeList}}" wx:key="index">
<swiper-item data-item="{{item}}" bindtap="bannerClick"> <swiper-item data-item="{{item}}" bindtap="bannerClick">
<image lazy-load src="{{item.head_img}}" style="width: 100%; height:100%; border-radius: 10rpx;" mode="aspectFill"></image> <image lazy-load src="{{item.head_img}}" style="width: 100%; height:100%; border-radius: 10rpx;" mode="aspectFill"></image>
@ -315,13 +356,16 @@
</view> </view>
</view> </view>
<!-- 底部AI伴你游 -->
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/uploads/20250929/6f29f557e80a331e84f01f2a5083d933.gif"></image>
</view> </view>
<view class="bg" wx:else style="background-image: url({{indexSeason.background}});"> <view class="bg" wx:else style="background-image: url({{indexSeason.background}});background: linear-gradient(165deg, #FF8623 213px, #FFE68A 213px);">
<!-- 顶部banner --> <!-- 顶部banner -->
<view style="position:relative;z-index: 1;"> <view style="position:relative;z-index: 1;padding-top: 60rpx;">
<swiper class="swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular> bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular>
<block wx:for="{{banner}}" wx:key="index"> <block wx:for="{{banner}}" wx:key="index">
<swiper-item data-item="{{item}}"> <swiper-item data-item="{{item}}">
@ -347,7 +391,7 @@
<view class="content-box"> <view class="content-box">
<!-- 苏城环游记 todo--> <!-- 苏城环游记 todo-->
<view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}"> <view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}">
<swiper class="small-swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="ztBannerIndex"> bindchange="changeBannerIndex" data-keyname="ztBannerIndex">
<block wx:for="{{ztbanner}}" wx:key="index"> <block wx:for="{{ztbanner}}" wx:key="index">
<swiper-item data-item="{{item}}"> <swiper-item data-item="{{item}}">
@ -361,7 +405,7 @@
<view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}"> <view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}">
<swiper class="small-swiper" autoplay="{{false}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="smBannerIndex"> bindchange="changeBannerIndex" data-keyname="smBannerIndex">
<block wx:for="{{xiaobanner}}" wx:key="index"> <block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item data-item="{{item}}" style="position: relative;"> <swiper-item data-item="{{item}}" style="position: relative;">

240
pages/index/index.wxss

@ -2,18 +2,28 @@
/* 元旦修改 */ /* 元旦修改 */
.bg{ .bg{
height: 100vh; min-height: 100vh;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-bottom: 220rpx;
/* background-color:#E8F9FA; */ /* background-color:#E8F9FA; */
} }
.swiper,.swiper image { .swiper{
width: 100%;
display: block; display: block;
height: 908rpx; width: 697rpx;
height: 340rpx;
margin: 0 auto;
} }
.swiper image {
display: block;
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.top-box { .top-box {
display: flex; display: flex;
@ -45,7 +55,7 @@
font-size: 25rpx; font-size: 25rpx;
padding: 2rpx 5rpx; padding: 2rpx 5rpx;
box-sizing: border-box; box-sizing: border-box;
background: rgba(255, 255, 255, 0.6); background: #FFEEAD;
} }
.search-box .iconfont { .search-box .iconfont {
font-size: 30rpx; font-size: 30rpx;
@ -55,21 +65,17 @@
} }
.banner-main{ .banner-main{
position: absolute;
z-index: 3;
width: 100%; width: 100%;
left: 0;
bottom: 0rpx;
right: 0;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 0rpx 20rpx 30rpx; padding: 26rpx 20rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
/* background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) */ /* background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) */
} }
.banner-main image{ .banner-main image{
width: 173.33rpx; width: 156rpx;
height: 173.33rpx; height: 156rpx;
} }
.swiper .wx-swiper-dots.wx-swiper-dots-horizontal { .swiper .wx-swiper-dots.wx-swiper-dots-horizontal {
@ -88,19 +94,22 @@
/* padding-top: 63rpx; */ /* padding-top: 63rpx; */
} }
.top-icons { .top-icons {
display: flex; display: flex;
padding:0 20rpx; flex-wrap: wrap;
align-items: center; border-radius: 20rpx;
background: #FFEEAD;
padding-top: 13rpx;
} }
.top-icon-item { .top-icon-item {
margin-bottom: 20rpx; margin-bottom: 37rpx;
line-height: 37rpx; line-height: 37rpx;
font-size: 25rpx; font-size: 25rpx;
color: #000; color: #000;
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
width: 20%; width: 25%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@ -110,8 +119,8 @@
margin-right: 0; margin-right: 0;
} }
.top-icon-item image { .top-icon-item image {
width: 93.33rpx; width: 66.33rpx;
height: 93.33rpx; height: 66.33rpx;
display: block; display: block;
transition: all 0.2s; transition: all 0.2s;
/* margin: 0 auto; */ /* margin: 0 auto; */
@ -131,7 +140,7 @@
margin: 0 25rpx; margin: 0 25rpx;
} }
.common-header-img{ .common-header-img{
height: 106.67rpx; width: 220.67rpx;
} }
.small-swiper { .small-swiper {
@ -156,7 +165,7 @@
.sale-road-boxes { .sale-road-boxes {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 40rpx; margin-top: 48rpx;
position: relative; position: relative;
align-items: flex-end; align-items: flex-end;
} }
@ -185,6 +194,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
} }
.season-hot{ .season-hot{
display: flex; display: flex;
} }
@ -218,6 +228,23 @@
height: 100%; height: 100%;
border-radius: 0; border-radius: 0;
} }
.season-hot .tags{
width: 100%;
display: flex;
flex-wrap: nowrap;
overflow-x: hidden;
}
.season-hot .tag{
height: 27rpx;
border: 1px solid #FF8623;
line-height: 27rpx;
padding: 0 10rpx;
font-weight: 500;
font-size: 20rpx;
color: #FF8623;
margin-right: 8rpx;
flex-shrink: 0;
}
.xsth-more { .xsth-more {
margin-top: 19.33rpx; margin-top: 19.33rpx;
@ -398,9 +425,8 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.new-pic { .new-pic {
width: 340rpx; width: 157.33rpx;
height: 146.67rpx; height: 226.67rpx;
margin-bottom: 20rpx;
} }
.title-more { .title-more {
@ -472,13 +498,13 @@
justify-content: space-between; justify-content: space-between;
} }
.hot-list-item { .hot-list-item {
width: 337rpx; width: 340rpx;
} }
.hot-item { .hot-item {
background: white; background: white;
/* box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); */ /* box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); */
border-radius: 15rpx; border-radius: 15rpx;
margin-bottom: 15rpx; margin-bottom: 20rpx;
height: 498rpx; height: 498rpx;
} }
.hot-item image:nth-child(1) { .hot-item image:nth-child(1) {
@ -761,14 +787,14 @@
.ggfw-list { .ggfw-list {
display: grid; display: grid;
grid-template-columns: repeat(4, 166rpx); grid-template-columns: repeat(4, 157.33rpx);
row-gap: 23rpx; row-gap: 23rpx;
justify-content: space-between; justify-content: space-between;
} }
.ggfw-list .ggfw { .ggfw-list .ggfw {
width: 166rpx; width: 157.33rpx;
height: 133rpx; height: 130.67rpx;
/* margin-bottom: 23rpx; */ /* margin-bottom: 23rpx; */
} }
.ggfw image{ .ggfw image{
@ -777,26 +803,95 @@
} }
.six-box-new { .six-box-new {
width: 697rpx; width: 100%;
/* background: linear-gradient(-90deg, #FF9B6A, #D02E25); */ /* background: linear-gradient(-90deg, #FF9B6A, #D02E25); */
border-radius: 20rpx; border-radius: 20rpx;
display: flex; margin: -40rpx 0 53.33rpx;
justify-content: space-between;
align-items: center;
overflow: scroll;
margin: 32rpx 0 53.33rpx;
z-index: 1; z-index: 1;
position: relative; position: relative;
} }
.six-box-new image { .six-box-new .big-image-box {
width: 333.33rpx; width: 100%;
height: 200rpx !important; height: 346rpx;
/* background: #FFE7C0; */ position: relative;
border-radius: 20rpx;
}
.six-box-new .big-image-box image{
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
}
.six-box-new .big-image-box .text-container{
width: 100%;
height: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 16rpx;
box-sizing: border-box;
}
.six-box-new .small-image-box{
width: 100%;
padding: 10rpx 16rpx;
overflow-x: auto;
background: white;
display: flex;
flex-wrap: nowrap;
border-radius: 0 0 20rpx 20rpx;
box-sizing: border-box;
height: 120rpx;
}
.six-box-new .small-image-box .small-image-item{
width: 120rpx;
height: 100rpx;
background: #FF8623;
border-radius: 13rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 13.33rpx; margin-right: 27rpx;
position: relative;
box-sizing: border-box;
overflow: hidden;
}
.six-box-new .small-image-box .small-image-item.active{
border: 2px solid #000;
}
.six-box-new .small-image-box .small-image-item:last-of-type{
margin-right: 0rpx;
}
.six-box-new .small-image-box image{
width: 100%;
height: 100%;
border-radius: 13rpx;
}
.six-box-new .small-image-box .small-image-item .text-box{
width: 100%;
height: 40rpx;
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #FFC543;
font-weight: 500;
font-size: 23rpx;
color: #000000;
text-align: center;
line-height: 40rpx;
border-radius: 0 0 13rpx 13rpx;
}
.six-box-new .small-image-box .small-image-item.active .text-box{
background: #FF8623;
color: #FFFFFF;
} }
/* 春节金刚区字体颜色样式更换 */ /* 春节金刚区字体颜色样式更换 */
.top-icon-text { .top-icon-text {
color: #111111; color: #111111;
@ -945,3 +1040,66 @@
margin-left: -6rpx; margin-left: -6rpx;
margin-right: 0rpx; margin-right: 0rpx;
} }
.ai-fix{
position: fixed;
width: 150.33rpx;
height: 200rpx;
bottom: 30rpx;
right: 24rpx;
z-index: 100;
}
.hot-prod-new{
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
}
.hot-prod-left{
width: 400rpx;
height: 350rpx;
position: relative;
}
.hot-prod-left .prod-img{
width: 100%;
height: 100%;
border-radius: 20rpx;
}
.hot-prod-left .xpth-item-title{
position: absolute;
width: 100%;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
bottom: 0;
left: 0;
right: 0;
top: 0;
height: 100%;
width: 100%;
background: linear-gradient(to bottom, rgba(0,0,0,0),rgba(0,0,0,0.5)) ;
display: flex;
border-radius: 20rpx;
padding: 0 8rpx 6rpx;
box-sizing: border-box;
overflow: hidden;
align-items: flex-end;
}
.hot-prod-right{
display: flex;
flex-direction: column;
justify-content: space-between;
height: 350rpx;
align-items: flex-end;
flex: 1;
width: 100rpx;
padding-left: 14rpx;
}
.hot-prod-right .hot-right-item{
height: 167rpx;
width: 100%;
}

837
pages/info/foodProductInfo/index.js

@ -1,5 +1,9 @@
// pages/info/sceneProductInfo/index.js // pages/info/roadInfo/index.js
let device = wx.getSystemInfoSync();
const ratio = device.windowWidth / 750;
import commonApi from "../../../utils/https/common" import commonApi from "../../../utils/https/common"
import QRCode from '../../../utils/weapp-qrcode.js'
import util from '../../../utils/util'
let app = getApp() let app = getApp()
Page({ Page({
@ -7,50 +11,227 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
info:{}, autoPlay: false,
number:['一','二','三','四','五','六','七','八','九','十','十一','十二'], fixed: false,
type: 1,
top: 0,
isLike: 0,
commentTotal: 0,
comment: [],
info: null,
skuFlag: null,
producNum: 1,
skuIndex: 0, skuIndex: 0,
bookingInfo:null, aniSkuIndex: -1,
skuName:"", retailId: "",
retailId:'' cartTop: 0,
cartImgInfo: null,
cartCount: 0,
shareImg: null,
showShareFlag: false,
allowance_data: null,
showAllowance: false,
tjList: [], //推荐商品列表
iShop: false,
supplierId: null,
showQrCode: false,
wxqrcode: null,
ZTPoint:'',
swiperCurrent: 0,
swiperRange: {
video: {min:0,max:0},
picture: {min:0,max:0},
sku: {min:0,max:0}
},
otherInfoShow: 0,
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
let api = commonApi._post console.log(options)
if(wx.getStorageSync("jstrip_token")){ //删除临时存储的联系人
api = commonApi.user_post wx.removeStorageSync('linkMan')
let rect = wx.getMenuButtonBoundingClientRect(),
that = this;
let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
this.setData({
top: height,
id: options.id
})
// 获取购物车按钮的位置
wx.createSelectorQuery().select('#cart').boundingClientRect(function (res) {
console.log(res)
that.setData({
cartTop: res.top
})
}).exec()
if (options.ZTPoint) {
this.setData({
ZTPoint: options.ZTPoint
})
} }
if (options.retailId) { if (options.retailId) {
this.setData({ this.setData({
retailId: options.retailId retailId: options.retailId
}) })
} }
api("product/get_product_detail",{ commonApi._post("product/get_product_detail", {
id: options.id id: options.id
}).then(res => { }).then(res => {
let tags = res.data.display_tags?res.data.display_tags.split(","):[]; if (res.code == 0) {
res.data.tags = tags.splice(0,2); wx.showToast({
// 如果带有指定skuid的话 那么取指定的sku展示 title: res.msg,
icon:'none'
})
setTimeout(() => {
wx.navigateBack()
}, 1500);
return
}
res.data.display_tags = (res.data.display_tags ? res.data.display_tags.split(",") : []).splice(0, 2);
if (options.skuid) { if (options.skuid) {
for(let i = 0;i<res.data.sku.length;i++){ let sku = res.data.sku.find(item => item.id == options.skuid);
if(res.data.sku[i].id==options.skuid){ res.data.sku = [sku];
res.data.sku = [res.data.sku[i]];
break;
} }
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
let resData = res.data
try {
if (resData.product_data && resData.is_package==1) {
for(let key in resData.product_data) {
resData.product_data[key] = JSON.parse(resData.product_data[key])
} }
// if (resData.product_data["住"]) {
// resData.product_data["住"] = JSON.parse(resData.product_data["住"])
// }
// if (resData.product_data["游"]) {
// resData.product_data["游"] = JSON.parse(resData.product_data["游"])
// }
// if (resData.product_data["食"]) {
// resData.product_data["食"] = JSON.parse(resData.product_data["食"])
// }
} }
res.data.sku.map(item=>{
item.display_tags = (item.display_tags?item.display_tags.split(','):[]).splice(0,2) resData.shipment_tag_arr = []
}) if (resData.shipment_tag) {
// res.data.listimg = res.data.listimg?res.data.listimg.split(","):[]; resData.shipment_tag_arr = resData.shipment_tag.split(',')
resData.shipment_tag_str = resData.shipment_tag_arr.join(' | ')
}
if (resData.service_tag) {
resData.service_tag_str = resData.service_tag.split(',').join(' | ')
}
if (resData.parameter_tag) {
resData.parameter_tag_str = resData.parameter_tag.split(',').join(' | ')
}
if (resData.supplier_headimg) {
resData.supplier_headimg = that.showImg(resData.supplier_headimg)
}
} catch(e) {}
let swiperRange = this.data.swiperRange;
swiperRange.video = resData.videourl? { min: 0, max: 0 } : { min: -1, max: -1 }
swiperRange.picture = {min:swiperRange.video.max+1, max:swiperRange.video.max+1+resData.listimg.length-1}
swiperRange.sku = {min:swiperRange.picture.max+1,max:swiperRange.picture.max+1+resData.sku.length-1}
console.log(swiperRange)
this.setData({ this.setData({
info:res.data info: resData,
supplierId: res.data.scene_id,
iShop: res.data.scene_id ? true : false,
swiperRange: swiperRange,
}) })
// 获取补贴
// commonApi.user_post("product/getProductAllowancePrice", {
// product_code: res.data.product_code
// }).then(resTwo => {
// if (resTwo && resTwo.code == 1) {
// this.setData({
// allowance_data: resTwo.data
// })
// }
// })
this.BroswerRecord() this.BroswerRecord()
console.log(res) })
// 获取评价列表
commonApi._post("product/product_comment_list", {
product_id: options.id,
offset: 0,
limit: 3
}).then(res => {
res.data.list.map(item => {
item.rate = Number(item.rate)
item.create_time = item.create_time.substring(0, 10)
})
this.setData({
comment: res.data.list.splice(0, 5),
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
})
})
commonApi._post("search/product_recommend", {
offset: 0,
limit: 4,
rand: true,
type: 'post',
product_ids:options.id,
}).then(res => {
try {
this.setData({
tjList: res.data.list.slice(0,4)
})
} catch (error) {
console.log(error);
}
})
},
showImg (img) {
if (!img) { return img }
if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) {
return img;
} else {
// return "https://test.api.cloud.sz-trip.com"+img
return "https://static.ticket.sz-trip.com" + img;
}
},
gotolocation: function () {
let info = this.data.info;
wx.openLocation({
latitude: Number(info.scene_lat),
longitude: Number(info.scene_lon),
name:info.scene_name,
address:info.scene_address
})
},
callPhone :function () {
wx.makePhoneCall({
phoneNumber: this.data.info.scene_tel,
})
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
}) })
}, },
BroswerRecord: function () { BroswerRecord: function () {
@ -61,51 +242,586 @@ Page({
title: this.data.info.title, title: this.data.info.title,
drive: "mini", drive: "mini",
source_id: this.data.info.id, source_id: this.data.info.id,
url:"/pages/info/foodProductInfo/index?id="+this.data.info.id, url: "/pages/info/postProductInfo/index?id=" + this.data.info.id,
uuid: app.globalData.uuid uuid: app.globalData.uuid
}).then(res => {})
} else {
this.BroswerRecord();
}
}, 500)
},
like: function () {
let id = this.data.id,
isLike = this.data.isLike;
commonApi.user_post("product/" + (isLike == 1 ? "product_cancel_collection" : "product_collection"), {
product_id: id
}).then(res => { }).then(res => {
if (res.code == 1) {
this.setData({
isLike: isLike == 1 ? 0 : 1
}) })
} }
else { })
this.BroswerRecord(); },
changeMenu: function (e) {
let index = e.currentTarget.dataset.index,
that = this;
const query = wx.createSelectorQuery(); //创建节点查询器
query.select("#box" + index).boundingClientRect() //选择toViewid获取位置信息
query.selectViewport().scrollOffset() //获取页面查询位置的
query.exec(function (res) {
let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.data.top;
wx.pageScrollTo({
scrollTop: scrollTop + 4,
duration: 0
})
that.setData({
type: index
})
})
},
// onPageScroll: function (e) {
// let that = this,
// height = this.data.top;
// let topHeight = height;
// wx.createSelectorQuery().select('#menus').boundingClientRect(function (rect) {
// if (rect.top <= topHeight) {
// // 此时应该把menus固定在顶部
// that.setData({
// fixed: true
// })
// } else {
// that.setData({
// fixed: false
// })
// }
// // 滚动时判断滚动到哪个部分了
// const query = wx.createSelectorQuery(); //创建节点查询器
// query.select("#box1").boundingClientRect() //选择toViewid获取位置信息
// query.select("#box2").boundingClientRect() //选择toViewid获取位置信息
// query.select("#box3").boundingClientRect() //选择toViewid获取位置信息
// query.select("#box4").boundingClientRect() //选择toViewid获取位置信息
// let minHeight = that.data.fixed ? (110 * ratio + height) : topHeight;
// query.exec(function (res) {
// if (res[3].top < minHeight) {
// that.setData({
// type: 4
// })
// } else if (res[2].top < minHeight) {
// that.setData({
// type: 3
// })
// }else if (res[1].top < minHeight) {
// that.setData({
// type: 2
// })
// } else {
// that.setData({
// type: 1
// })
// }
// })
// }).exec()
// },
showCart: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能加购',
icon: 'none'
})
return;
} }
},500) this.setData({
skuFlag: "cart"
})
let that = this
wx.createSelectorQuery().select('#skuImg').boundingClientRect(function (res) {
console.log(res)
that.setData({
cartImgInfo: 'top:' + res.top + 'px;left:' + res.left + 'px;'
})
}).exec()
}
})
}, },
changeSku:function(e){ hideSku: function () {
this.setData({ this.setData({
skuIndex:e.currentTarget.dataset.index skuFlag: null,
cartImgInfo: null
}) })
}, },
showNotice:function(e){ minus: function () {
let sku = e.currentTarget.dataset.sku; if (this.data.producNum == 1) return;
this.setData({ this.setData({
skuName:sku.sku_name, producNum: this.data.producNum - 1
bookingInfo:sku.sku_model
}) })
}, },
closeMask:function(){ add: function () {
this.setData({ this.setData({
skuName:"", producNum: this.data.producNum + 1
bookingInfo:null
}) })
}, },
gotoLocation:function(){ selectSku: function (e) {
let info = this.data.info; let index = e.currentTarget.dataset.index;
if(info && info.lat && info.lon){ this.setData({
wx.openLocation({ skuIndex: index,
latitude: Number(info.lat), swiperCurrent: index+this.data.swiperRange.picture.max+1
longitude: Number(info.lon) })
},
showOrder: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能购买',
icon: 'none'
}) })
return;
} }
let swiperCurrent = this.data.swiperCurrent;
let skuIndex = swiperCurrent - this.data.swiperRange.sku.min
console.log(swiperCurrent, skuIndex)
if (skuIndex<0) {skuIndex=0}
this.setData({
skuFlag: 'order',
skuIndex: skuIndex,
swiperCurrent: skuIndex+this.data.swiperRange.picture.max+1
})
}
})
}, },
order: function (e) { order: function (e) {
let buy_type = e.currentTarget.dataset.type
app.globalData.postProduct = []
app.globalData.list = []
commonApi.user_post("/product/checkStock", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
}).then(res => {
if (res && res.code != 1) {
return;
} else {
if (buy_type == 'order') {
// util.pagePoint({
// event: 'product_order',
// param: {
// id: this.data.info.id,
// type: this.data.info.type
// }
// }, 1)
// wx.setStorageSync('login_from', 'product_order_login')
// wx.setStorageSync('order_from', 'product_order_submit')
app.globalData.couponInfo = null; app.globalData.couponInfo = null;
// 购买
let product = [{
product: {...this.data.info,ZTPoint:this.data.ZTPoint},
sku: this.data.info.sku[this.data.skuIndex],
productNum: this.data.producNum
}];
app.globalData.retailId = this.data.retailId; app.globalData.retailId = this.data.retailId;
app.globalData.product = e.currentTarget.dataset; app.globalData.listName = null
app.globalData.product = product[0];
wx.navigateTo({ wx.navigateTo({
url: '/pages/order/food/index', url: '/pages/order/food/index',
}) })
} else {
let tag_id = this.data.info.tag_id,type = ''
if (tag_id.includes(20) || tag_id.includes(19)) { //文创
type = '1'
}else if (tag_id.includes(5)) { //非遗
type = '2'
}else {
type = ''
}
commonApi.user_post("cart/add_sku", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum,
type:type
}).then(res => {
if (res.code == 1) {
commonApi.user_post('cart/get_list', {}).then(res => {
this.setData({
cartCount: res.data.length
})
})
// 加动效
this.setData({
skuFlag: null,
aniSkuIndex: this.data.skuIndex,
cartImgInfo: null
})
setTimeout(() => {
this.setData({
aniSkuIndex: -1
})
wx.showModal({
title: "提示",
content: "去购物车结算?",
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/user/cartlist/list',
})
}
}
})
}, 650)
}
})
}
}
})
},
// 分享
share: function () {
if (!wx.getStorageSync("jstrip_token")) {
util.pagePoint({
event: 'product_share_login',
type: this.data.info.type,
id: this.data.info.id
}, 1)
commonApi.user_post("user/getMyInfo", {}).then(res => {
})
return;
}
if (!this.data.shareImg) {
wx.showToast({
title: '图片生成中,稍后再试',
icon: 'none'
})
return;
}
this.setData({
showShareFlag: !this.data.showShareFlag
})
},
// 保存
save() {
let url = this.data.shareImg,
that = this;
wx.authorize({
/* 这个就是保存相册的 */
scope: 'scope.writePhotosAlbum',
success() {
wx.saveImageToPhotosAlbum({
filePath: url,
success(res) {
wx.showToast({
title: '保存成功',
icon: "success"
})
that.setData({
showShareFlag: !this.data.showShareFlag
})
util.pagePoint({
event: 'product_share_save',
type: that.data.info.type,
id: that.data.info.id
}, 1)
},
fail(res) {
wx.showToast({
title: '保存失败',
icon: 'none'
})
}
})
}, },
complete(res) {
console.log(res);
/* 这里判断一下如果没有授权重新打开设置选项 */
wx.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
/* 打开设置的方法 */
// opensit();
wx.showToast({
title: '请打开权限后再试',
icon: 'none'
})
}
}
});
}
});
},
pagePoint: function (e) {
util.pagePoint(e)
},
// 绘制海报
drawImg: function () {
var that = this,
userinfo = wx.getStorageSync('jstrip_userInfo');
if (!userinfo) {
// 去登录
return false;
}
const ctx = wx.createCanvasContext('imageCanvas');
// const device = wx.getSystemInfoSync();
// const ratio = device.screenWidth / 750;
// 先获取到图片信息
let promise2 = new Promise(function (resolve, reject) {
wx.getImageInfo({
src: that.data.info.headimg,
success: function (res) {
resolve(res);
},
fail: function (res) {
reject(res);
}
})
})
let promise3 = new Promise(function (resolve, reject) {
let userid = wx.getStorageSync('jstrip_userid')
new QRCode('myQrcode', {
text: 'https://m.cloud.sz-trip.com/MailMerchandiseDetail?id=' + that.data.info.id + '&sharedUserId=' + userid + '&channel=-1',
width: 500,
height: 500,
padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
callback: (res) => {
resolve(res);
}
})
})
//成功得到图片信息后,开始绘图
Promise.all([promise2, promise3]).then(imgs => {
ctx.save();
ctx.beginPath(); //开始绘制
that.handleBorderRect(ctx, 0, 0, 551 * ratio, 407 * ratio, 25 * ratio, '#ccc')
ctx.clip(); //画好了圆 剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内 这也是我们要save上下文的原因
ctx.drawImage(imgs[0].path, 0, 0, 551 * ratio, 407 * ratio);
ctx.restore();
ctx.save();
that.handleBorderRect2(ctx, 0, 407 * ratio, 551 * ratio, 236 * ratio, 25 * ratio, '#fff')
ctx.restore();
// 绘制二维码
ctx.drawImage(imgs[1].path, 373 * ratio, 495 * ratio, 137 * ratio, 137 * ratio);
// 开始文字绘制
ctx.setFillStyle("#000");
ctx.setFontSize(30 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
that.drawText(ctx, that.data.info.title, 25 * ratio, 450 * ratio, 480 * ratio, ratio);
// 售价
ctx.setFillStyle("#D62828");
ctx.setFontSize(40 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let price = "¥" + (that.data.info.price / 100);
let width = ctx.measureText(price).width;
ctx.fillText(price, 25 * ratio, 620 * ratio);
// 副标题
ctx.setFillStyle("#999999");
ctx.setFontSize(28 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let subtitle = that.data.info.subtitle;
if (that.data.info.subtitle.length > 10) {
subtitle = that.data.info.subtitle.substr(0, 10) + '...'
}
ctx.fillText(subtitle, 25 * ratio, 540 * ratio);
// ctx.draw();
// 划线价
ctx.setFillStyle("#999999");
ctx.setFontSize(32 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let market_price = "¥" + (that.data.info.market_price / 100)
ctx.fillText(market_price, 40 * ratio + width, 620 * ratio);
let market_price_width = ctx.measureText(market_price).width;
// 划线
ctx.beginPath()
ctx.setLineWidth(1)
ctx.moveTo(40 * ratio + width, 608 * ratio)
ctx.lineTo(45 * ratio + width + market_price_width, 608 * ratio)
ctx.stroke();
// 长按识别二维码
// ctx.setFillStyle("#666");
// ctx.setFontSize(22 * ratio); //字大小
// ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
// ctx.fillText("长按识别二维码", 404*ratio, 710*ratio);
// 长按图片转发或保存
// ctx.setFillStyle("#000");
// ctx.setFontSize(24 * ratio); //字大小
// ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
// ctx.fillText("长按图片保存到本地",(592*ratio - ctx.measureText("长按图片保存到本地").width)/2, 740*ratio);
ctx.draw();
// 转为图片
setTimeout(() => {
wx.canvasToTempFilePath({
x: 0,
y: 0,
canvasId: 'imageCanvas',
success: function (res) {
that.setData({
shareImg: res.tempFilePath
})
},
fail(err) {
console.log('agdgjgdajhg', err)
}
})
}, 500)
return false;
}).catch(err => {
console.log("this err", err)
})
},
// 圆角矩形
handleBorderRect(ctx, x, y, w, h, r, color) {
ctx.beginPath();
ctx.moveTo(x + w, y + h);
ctx.lineTo(x, y + h)
// 左上角
ctx.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI);
ctx.moveTo(x + r, y);
ctx.lineTo(x + w - r, y);
ctx.lineTo(x + w, y + r);
// 右上角
ctx.arc(x + w - r, y + r, r, 1.5 * Math.PI, 2 * Math.PI);
ctx.lineTo(x + w, y + h);
ctx.lineTo(x + w - r, y + h);
ctx.fillStyle = color;
ctx.fill();
ctx.closePath();
},
handleBorderRect2(ctx, x, y, w, h, r, color) {
ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x + w, y)
// 右下角
ctx.arc(x + w - r, y + h - r, r, 0, 0.5 * Math.PI);
ctx.lineTo(x + r, y + h);
ctx.lineTo(x, y + h - r);
// 左下角
ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, Math.PI);
ctx.lineTo(x, y);
ctx.lineTo(x, y);
ctx.fillStyle = color;
ctx.fill();
ctx.closePath();
},
// 绘制两行文字
drawText: function (ctx, str, x, y, canvasWidth, ratio) {
let row = [],
temp = "",
chr = str.split("");
for (var a = 0; a < chr.length; a++) {
if (ctx.measureText(temp).width < canvasWidth) {
temp += chr[a];
} else {
a--; //这里添加了a-- 是为了防止字符丢失,效果图中有对比
row.push(temp);
temp = "";
}
}
row.push(temp);
//如果数组长度大于2 则截取前两个
if (row.length > 2) {
var rowCut = row.slice(0, 2);
var rowPart = rowCut[1];
var test = "";
var empty = [];
for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < canvasWidth - 30 * ratio) {
test += rowPart[a];
} else {
break;
}
}
empty.push(test);
var group = empty[0] + "..." //这里只显示两行,超出的用...表示
rowCut.splice(1, 1, group);
row = rowCut;
}
for (var b = 0; b < row.length; b++) {
ctx.fillText(row[b], x, y + b * 40 * ratio, canvasWidth);
}
},
gotoDetail: function (e) {
let item = e.currentTarget.dataset.item;
util.pagePoint({
event: 'recommend_click',
param: {
id: item.id,
type: item.type
}
}, 1)
if (item.type == 'travels') {
// 游记做特殊处理 其他都按照原来的来
wx.navigateTo({
url: '/pages/info/strategyInfo/index?id=' + item.s_id,
})
} else {
util.gotoDetail(item);
}
},
gotolocation: function () {
let info = this.data.info;
wx.openLocation({
latitude: Number(info.scene_lat),
longitude: Number(info.scene_lon),
name:info.scene_name,
address:info.scene_address
})
},
viewImg:function(e){
let item = e.currentTarget.dataset.item;
if (item.img_list.length>0) {
wx.previewImage({
urls: item.img_list
})
}
},
swiperChange (e) {
if(e.detail.source == "touch") {
let index = e.detail.current
this.setData({
swiperCurrent: index
})
}
console.log(e, this.data.swiperCurrent)
},
changeSwiperCurrent (e) {
let index = e.currentTarget.dataset.index
this.setData({
swiperCurrent: index
})
},
changeSimpleVal (e) {
let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val;
let param = {}
param[keyname] = val
this.setData(param)
console.log(this.data)
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
@ -118,7 +834,40 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
app.globalData.postProduct = []
if (!wx.getStorageSync('jstrip_token')) {
return;
}
if (this.data.info && this.data.info.id) {
commonApi.user_post("product/is_product_collection", {
product_id: this.data.info.id
}).then(res => {
this.setData({
isLike: res.data
})
this.drawImg()
})
// commonApi.user_post('cart/get_list', {}).then(res => {
// this.setData({
// cartCount: res.data.length
// })
// })
commonApi.user_post('cart/get_count', {noLogin: true}).then(res => {
this.setData({
cartCount: res.data //1
})
})
} else {
setTimeout(() => {
this.onShow()
}, 200)
}
},
playVideo() {
// 播放视频需要把autoplay暂停
this.setData({
autoPlay: false
})
}, },
/** /**

3
pages/info/foodProductInfo/index.json

@ -1,6 +1,7 @@
{ {
"usingComponents": { "usingComponents": {
"title":"/pages/component/TitleHeader", "title":"/pages/component/TitleHeader",
"notice":"/pages/component/notice/notice" "code":"../../order/components/wxqrCode/index"
} }
} }

310
pages/info/foodProductInfo/index.wxml

@ -1,79 +1,285 @@
<!--pages/info/sceneProductInfo/index.wxml--> <!--pages/info/hotelProductInfo/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" /> <wxs src="../../../utils/filter.wxs" module="tool" />
<title title="产品详情"></title> <title title="产品详情"></title>
<view class="iconfont icon-xin"></view> <!-- <view class="share-icon" bindtap="share"></view> -->
<swiper class="swiper" indicator-dots="{{true}}" <image lazy-load wx:for="{{info.sku}}" style="{{aniSkuIndex==index?('top:'+cartTop+'px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{info.headimg}}" mode="aspectFill"></image>
autoplay="{{true}}" interval="{{2000}}" duration="{{300}}" wx:if="{{info.listimg}}"> <view style="position: relative;">
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}"
interval="{{2000}}" duration="{{300}}" bindchange="swiperChange">
<block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
<!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> -->
</swiper-item>
</block>
<block wx:for="{{info.listimg}}" wx:key="*this"> <block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item> <swiper-item>
<image lazy-load src="{{item}}" mode="aspectFill"></image> <image lazy-load src="{{item}}" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</block> </block>
<block wx:for="{{info.sku}}" wx:key="*this">
<swiper-item style="position: relative;">
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image>
<!-- <view class="sku-tips ">
<view class="textOver">{{item.sku_name}}</view>
</view> -->
</swiper-item>
</block>
</swiper> </swiper>
<view class="top-info"> <view class="swiper-bottom" wx:if="{{info}}">
<view class="title">{{info.title}}</view> <!-- <view class="swuper-bottom-bg">
<view class="tags-box textOver" style="height:auto"> <view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}"
<view class="tag textOver" wx:for="{{info.tags}}">{{item}}<view class="line"></view></view> wx:if="{{info.videourl}}" bind:tap="changeSwiperCurrent" data-index="{{0}}">视频</view>
<view class="tags-price"><text>¥</text><text>{{info.price/100}}</text><text>起</text></view> <view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.picture.min&&swiperCurrent<=swiperRange.picture.max)?'active':''}}"
<!-- <view class="tags-text">详情 <text class="iconfont icon-you"></text></view> --> bind:tap="changeSwiperCurrent" data-index="{{swiperRange.picture.min}}">图片</view>
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.sku.min&&swiperCurrent<=swiperRange.sku.max)?'active':''}}"
bind:tap="changeSwiperCurrent" data-index="{{swiperRange.sku.min}}">款式</view>
</view> -->
<view class="swiper-bottom-item bottom-number active">{{swiperCurrent+1}}/{{swiperRange.sku.max+1}}</view>
</view>
</view>
<view class="allowance-box" wx:if="{{allowance_data}}" bindtap="changeAllowance">
补贴价
<view class="com-price two">¥{{ allowance_data.mini_price / 100 }}起</view>
<view class="yellow">单品最高补贴{{ allowance_data.max_price / 100 }}元</view>
</view>
<view wx:if="{{info}}">
<view class="top-info" style="padding: 0;" >
<view class="wineScene-price-container" >
<view class="wineSecne-price">{{info.price/100}}<text class="wineSecne-money">优惠前¥{{info.market_price/100}}</text></view>
<view>已售{{info.sales_number>1000?"1000+":(info.sales_number||0)}}</view>
</view>
<view style="padding: 20rpx 20rpx 20rpx 26rpx;">
<view class="title textOver2"><text class="hot-font">热</text>{{info.title}}</view>
<view class="tags-box textOver" wx:if="{{info.subtitle}}">
<view class="tag textOver" >{{info.subtitle}}</view>
</view>
<view class="other-info-box" >
<view class="other-info-item" style="align-items: flex-start;"bindtap="changeSimpleVal"
data-keyname="otherInfoShow" data-val="{{1}}" wx:if="{{info.shipment_tag}}">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/50f3e2316c3f3cc906fe4c78f127e960.png"></image>
<view class="other-content textOver" >{{info.shipment_tag_str}}</view>
<!-- <view style="margin-top: 6rpx;" class="view-arrow">></view> -->
</view> </view>
<view class="other-info-item" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{2}}"
wx:if="{{info.service_tag_str}}">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/ce4323d9bcdf2ff03a0985ae4cbdabbe.png"></image>
<view class="other-content textOver">{{info.service_tag_str}}</view>
<!-- <view class="view-arrow">></view> -->
</view> </view>
<view class="box"> <view class="other-info-item" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{3}}"
<view class="box-top" style="border-top:none;border-bottom:1rpx solid #d9d9d9"> wx:if="{{info.parameter_tag_str}}">
<text>{{info.title}}</text> <image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/958d9a3ed9404790ba5d17548e20fee8.png"></image>
<view class="other-content textOver">{{info.parameter_tag_str}}</view>
<!-- <view class="view-arrow">></view> -->
</view> </view>
<view class="product-item" wx:for="{{info.sku}}">
<view class="skutitle">{{item.sku_name}}</view>
<view class="product-box">
<view class="product-left textOver">
<view class="product-tags">
<view class="product-tag textOver" wx:for="{{item.display_tags}}">{{item}}</view>
</view> </view>
<view class="order-tip-text" bindtap="showNotice" data-sku="{{item}}">预订须知>></view>
</view> </view>
<view class="product-right">
<view class="price"><text>¥</text><text>{{item.price/100}}</text><text>起</text></view> </view>
<view wx:if="{{item.flag=='on'}}" class="btn" data-product="{{info}}" data-sku="{{item}}" bindtap="order">立即预订</view>
<view wx:else class="btn disable" >立即预订</view> </view>
<view class="scroll-all-box" id="menus" wx:if="{{info}}">
<view class="shop-info">
<image class="supplier-headImg" wx:if="{{info.scene_img}}" src="{{info.scene_img}}" mode="aspectFill"></image>
<view class="content">
<view style="display: flex;align-items: flex-start;">
<view class="shop-title shop-com-width textOver2">{{info.scene_name}}</view>
<!-- <image style="height: 25rpx;margin: 10rpx 68rpx 0 13rpx;" mode="heightFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/postDetail/rightIcon.png"></image> -->
<image wx:if="{{info.scene_tel}}" class="icon-phone" catch:tap="callPhone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
</view>
<view class="address" style="display: flex;align-items: center;justify-content: space-between;">
<view class="shop-com-width textOver" style="padding-right: 98rpx;">{{info.scene_address}}</view>
<image class="icon-phone" catch:tap="gotolocation" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
</view>
</view>
</view>
<view style="height: 20rpx;width: 100%;background: #F7F7F7;"></view>
<view class="info-box" id="box1">
<view class="info-title">套餐详情</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
</view>
<view style="height: 20rpx;width: 100%;background: #F7F7F7;"></view>
<!-- <view class="info-box" id="box2">
<view class="info-title">费用说明</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.expense_info)}}"></rich-text>
</view> -->
<view class="info-box" id="box3">
<view class="info-title">购买须知</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
</view>
<!-- <view class="info-box" id="box4" style="padding: 20rpx 26rpx;">
<view class="info-title">产品推荐</view>
<view class="pro-list">
<view class="proitem" wx:for="{{tjList}}" bindtap="gotoDetail" data-item="{{item}}">
<view class="item-hd">
<image lazy-load src="{{item.headimg}}"></image>
</view>
<view class="item-bm" style="height: 120rpx;display: flex;flex-direction: column;justify-content: space-between;">
<view class="protitle textOver2">{{item.title}}</view>
<view class="pro-price">{{item.price/100}}</view>
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="empty-box">
<view>这里空空如也,快去向大家提问吧!</view>
<view class="empty-btn">去提问</view>
</view> --> </view> -->
</view> </view>
<view class="box" wx:if="{{info}}">
<view class="box-top" style="border-top:none"> <view style="height:140rpx"></view>
<text>商家信息</text> <view class="fixed-bottom">
<view class="['left-img',{{!iShop?'no-shop':''}}]">
<navigator wx:if="{{iShop}}" url="/subPackages/foodNew/index?id={{supplierId}}" catchtap="pagePoint" data-event='product_customservice' class="shop-box">
<view class="shop-box">
<image lazy-load class="icon-shop" src="https://static.ticket.sz-trip.com/uploads/20230220/cc7bfaf50dccd354c56a1ad40d730b2e.png" mode="aspectFill"/>
<view>店铺</view>
</view>
</navigator>
<navigator url="/pages/user/service/index" catchtap="pagePoint" data-event='product_customservice' class="kefu-box">
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</navigator>
<!-- <view bindtap="like" class="kefu-box">
<view class="iconfont {{isLike==1?'icon-shoucang':'icon-xin'}}"></view>
<view>收藏</view>
</view> -->
<view class="kefu-box"></view>
</view>
<view class="btns">
<view class="btn" bindtap="order">加入购物车</view>
<view class="btn" bindtap="order" data-type="order" wx:if="{{info && info.flag==1}}" >立即购买</view>
<view class="btn disable" wx:elif="{{info}}" style="border-radius: 39rpx;">该商品已下架</view>
</view>
</view>
<!-- 购物车悬浮框 -->
<navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/cart.png" mode="widthFix"></image>
<view class="cart-num">{{cartCount}}</view>
</navigator>
<view class="mask" wx:if="{{skuFlag}}">
<view class="mask-bg" bindtap="hideSku"></view>
<view class="mask-content">
<view class="iconfont icon-close" bindtap="hideSku"></view>
<view class="sku-info-box">
<image lazy-load id="skuImg" src="{{info.sku[skuIndex].headimg}}" mode="aspectFill"></image>
<view class="sku-info">
<view>
<view class="sku-price">{{info.sku[skuIndex].price/100}}
<!-- <view class="allowance" wx:if="{{allowance_data}}">
补贴价:¥{{ (1 - allowance_data.discount_rate / 100) * info.sku[skuIndex].price / 100 }}</view> -->
</view>
<view class="sku-name">已选择:{{info.sku[skuIndex].sku_name}}</view>
</view>
<view style="display: flex;align-items: center;">
<view class="number-box">
<view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view>
</view>
<view class="limit-number" wx:if="{{info.sku[skuIndex].sku_model.traveller_limit_num>0}}">限购{{info.sku[skuIndex].sku_model.traveller_limit_num}}件</view>
</view>
</view>
</view>
<view style="font-weight: bold;font-size: 33rpx;color: #060001;margin:0rpx 25rpx 27rpx">产品分类({{info.sku.length}})</view>
<view class="sku-names">
<view bindtap="selectSku" data-index="{{index}}" class="sku-name-item {{index==skuIndex?' active':''}}"
wx:for="{{info.sku}}">
<image lazy-load src="{{item.headimg}}"></image>
<view class="sku-name textOver2">{{item.sku_name}}</view>
</view>
</view>
<view style="height:138rpx"></view>
<view class="btn-box">
<view class="mask-btn" bindtap="order" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'确认':'立即购买'}}
</view>
<view class="mask-btn disable" wx:else>该商品已下架</view>
</view>
</view>
</view>
<view style="position:absolute;right:0;left:-10000rpx;top:-20000rpx;z-index:-1">
<canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'>
</canvas>
<canvas class="canvasCode" style="opacity:0;width:500px;height:500px" canvas-id="myQrcode"></canvas>
</view>
<view class="mask" wx:if="{{showShareFlag}}" style="align-items: center;">
<view class="mask-bg" bindtap="share"></view>
<view class="mask-content share-img-box">
<image lazy-load class="share-img" src="{{shareImg}}" mode="widthFix"></image>
<view class="share-tips">
<view style="position:relative">
<image lazy-load class="img" src="https://static.ticket.sz-trip.com/xcxImages/info/img.png" mode="widthFix">
</image>
<view>保存图片到相册</view>
<view class="tipimg">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view>
</view>
<image lazy-load style="width:36rpx" src="https://static.ticket.sz-trip.com/xcxImages/info/arrow2.png" mode="widthFix"></image>
<view style="position:relative">
<image lazy-load class="img" src="https://static.ticket.sz-trip.com/xcxImages/info/code.png" mode="widthFix">
</image>
<view>微信识别二维码</view>
<view class="tipimg">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/ok1.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<view class="mask mask-allowance" wx:if="{{showAllowance}}">
<view bindtap="changeAllowance" class="mask-bg"></view>
<view class="mask-content rule-box">
<view class="rule-title">{{allowance_data.title}}</view>
<rich-text nodes="{{allowance_data.content}}"></rich-text>
</view> </view>
<view class="info-address">
<text>商家电话:{{info.supplier_tel}}</text>
<view class="iconfont icon-dianhua"></view>
</view> </view>
<view class="info-address"> <code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
<text>商家地址:{{info.supplier_address}}</text> </code>
<view class="iconfont icon-daohang" bindtap="gotoLocation"></view>
<!-- <view class="mask" wx:if="{{otherInfoShow>0}}"> -->
<view class="mask" wx:if="{{false}}">
<view class="mask-bg" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}"></view>
<view class="mask-content">
<view class="iconfont icon-close" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}"></view>
<view class="other-info-content">
<view class="title">{{otherInfoShow==3?"产品参数":otherInfoShow==2?"服务说明":"发货说明"}}</view>
<view wx:if="{{otherInfoShow==1}}">
<rich-text class="details" nodes="{{tool.formateRichText(info.shipment_info)}}"></rich-text>
</view> </view>
<view class="box-top"> <view wx:if="{{otherInfoShow==2}}">
<text>购买须知</text> <rich-text class="details" nodes="{{tool.formateRichText(info.service_info)}}"></rich-text>
</view> </view>
<view class="sku-items"> <view wx:if="{{otherInfoShow==3}}">
<view class="sku-item{{skuIndex==index?' active':''}}" bindtap="changeSku" data-index="{{index}}" wx:for="{{info.sku}}">套餐{{number[index]}}</view> <rich-text class="details" nodes="{{tool.formateRichText(info.parameter_info)}}"></rich-text>
<!-- <view class="sku-item">套餐一</view> -->
<!-- <view class="sku-item">套餐一</view> -->
</view> </view>
<view class="details">
<rich-text nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.bookinfo)}}"></rich-text>
<!-- <rich-text nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.detailinfo)}}"></rich-text> -->
<!-- <rich-text nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.expenseinfo)}}"></rich-text> -->
<!-- <rich-text nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.extrainfo)}}"></rich-text> -->
</view> </view>
<view class="box-top"> <view style="height:138rpx"></view>
<text>产品详情</text> <view class="btn-box">
<view class="mask-btn" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}">确定</view>
</view> </view>
<view class="details">
<rich-text nodes="{{tool.formateRichText(info.content)}}"></rich-text>
</view> </view>
</view> </view>
<notice wx:if="{{bookingInfo}}" bind:close="closeMask" bookingInfo="{{bookingInfo}}" skuName="{{skuName}}"></notice>

1316
pages/info/foodProductInfo/index.wxss

File diff suppressed because it is too large

17
pages/map/index.wxml

@ -24,18 +24,23 @@
<image lazy-load class="menu-item-img" src="{{type==2?'https://static.ticket.sz-trip.com/uploads/20240123/021858cdaa954dab5eb8180303f33143.png':'https://static.ticket.sz-trip.com/uploads/20240123/c6c46566f32eeb8b9663a6be2ef0ae08.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==2?'https://static.ticket.sz-trip.com/uploads/20240123/021858cdaa954dab5eb8180303f33143.png':'https://static.ticket.sz-trip.com/uploads/20240123/c6c46566f32eeb8b9663a6be2ef0ae08.png'}}" mode="aspectFill"/>
<text class="text">场馆</text> <text class="text">场馆</text>
</view> </view>
<view class="menu-item{{type==3?' active':''}}" bindtap="changeType" data-title="酒店" data-type="3"> <!-- <view class="menu-item{{type==3?' active':''}}" bindtap="changeType" data-title="酒店" data-type="3">
<image lazy-load class="menu-item-img" src="{{type==3?'https://static.ticket.sz-trip.com/uploads/20240123/bf35245fe360ee8ff7194deff26285e5.png':'https://static.ticket.sz-trip.com/uploads/20240123/8e81faa85e98a7bee269ef9fdbfd6628.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==3?'https://static.ticket.sz-trip.com/uploads/20240123/bf35245fe360ee8ff7194deff26285e5.png':'https://static.ticket.sz-trip.com/uploads/20240123/8e81faa85e98a7bee269ef9fdbfd6628.png'}}" mode="aspectFill"/>
<text class="text">酒店</text> <text class="text">酒店</text>
</view> </view> -->
<!-- <view class="menu-item{{type==4?' active':''}}" bindtap="changeType" data-title="公共自行车" data-type="4"> <!-- <view class="menu-item{{type==4?' active':''}}" bindtap="changeType" data-title="公共自行车" data-type="4">
<image lazy-load class="menu-item-img" src="{{type==4?'https://static.ticket.sz-trip.com/uploads/20240123/8a953d4354ce4fd6b63832d00ba1d93a.png':'https://static.ticket.sz-trip.com/uploads/20240123/47a1dc475686ef5a080ba2a297dd78d8.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==4?'https://static.ticket.sz-trip.com/uploads/20240123/8a953d4354ce4fd6b63832d00ba1d93a.png':'https://static.ticket.sz-trip.com/uploads/20240123/47a1dc475686ef5a080ba2a297dd78d8.png'}}" mode="aspectFill"/>
<text class="text">公共自行车</text> <text class="text">公共自行车</text>
</view> --> </view> -->
<view class="menus-item{{type==10?' active':''}}" bindtap="changeType" data-title="行李寄存" data-type="10">
<image lazy-load class="menu-item-img" src="{{type==10?'https://static.ticket.sz-trip.com/uploads/20240123/4288a56bbb7d333e4c007baa68c5e02f.png':'https://static.ticket.sz-trip.com/uploads/20240123/fdd743af95af2679f2dd60229fe06bd0.png'}}" mode="aspectFill"/>
<text class="text">行李寄存</text>
</view>
<view class="menus-item{{type==7?' active':''}}" bindtap="changeType" data-title="运河十景" data-type="7"> <view class="menus-item{{type==7?' active':''}}" bindtap="changeType" data-title="运河十景" data-type="7">
<image lazy-load class="menu-item-img" src="{{type==7?'https://static.ticket.sz-trip.com/uploads/20240123/c57bfbb67fe73593904e92188399ea10.png':'https://static.ticket.sz-trip.com/uploads/20240123/c99e25679e5c1d5a9e0587ddcb278948.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==7?'https://static.ticket.sz-trip.com/uploads/20240123/c57bfbb67fe73593904e92188399ea10.png':'https://static.ticket.sz-trip.com/uploads/20240123/c99e25679e5c1d5a9e0587ddcb278948.png'}}" mode="aspectFill"/>
<text class="text">运河十景</text> <text class="text">运河十景</text>
</view> </view>
</view> </view>
</view> </view>
<view class="menus2" wx:else> <view class="menus2" wx:else>
@ -59,18 +64,18 @@
<image lazy-load class="menu-item-img" src="{{type==11?'https://static.ticket.sz-trip.com/uploads/20240123/2f90c0a3be0afbab22ab9c07c6a0eb4c.png':'https://static.ticket.sz-trip.com/uploads/20240123/434433c37b40681d6b6d7e99fe8736f3.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==11?'https://static.ticket.sz-trip.com/uploads/20240123/2f90c0a3be0afbab22ab9c07c6a0eb4c.png':'https://static.ticket.sz-trip.com/uploads/20240123/434433c37b40681d6b6d7e99fe8736f3.png'}}" mode="aspectFill"/>
<text class="text">游客中心</text> <text class="text">游客中心</text>
</view> </view>
<view class="menus-item{{type==3?' active':''}}" bindtap="changeType" data-title="酒店" data-type="3"> <!-- <view class="menus-item{{type==3?' active':''}}" bindtap="changeType" data-title="酒店" data-type="3">
<image lazy-load class="menu-item-img" src="{{type==3?'https://static.ticket.sz-trip.com/uploads/20240123/bf35245fe360ee8ff7194deff26285e5.png':'https://static.ticket.sz-trip.com/uploads/20240123/8e81faa85e98a7bee269ef9fdbfd6628.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==3?'https://static.ticket.sz-trip.com/uploads/20240123/bf35245fe360ee8ff7194deff26285e5.png':'https://static.ticket.sz-trip.com/uploads/20240123/8e81faa85e98a7bee269ef9fdbfd6628.png'}}" mode="aspectFill"/>
<text class="text">酒店</text> <text class="text">酒店</text>
</view> </view> -->
<view class="menus-item{{type==10?' active':''}}" bindtap="changeType" data-title="行李寄存" data-type="10"> <view class="menus-item{{type==10?' active':''}}" bindtap="changeType" data-title="行李寄存" data-type="10">
<image lazy-load class="menu-item-img" src="{{type==10?'https://static.ticket.sz-trip.com/uploads/20240123/4288a56bbb7d333e4c007baa68c5e02f.png':'https://static.ticket.sz-trip.com/uploads/20240123/fdd743af95af2679f2dd60229fe06bd0.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==10?'https://static.ticket.sz-trip.com/uploads/20240123/4288a56bbb7d333e4c007baa68c5e02f.png':'https://static.ticket.sz-trip.com/uploads/20240123/fdd743af95af2679f2dd60229fe06bd0.png'}}" mode="aspectFill"/>
<text class="text">行李寄存</text> <text class="text">行李寄存</text>
</view> </view>
<view class="menus-item{{type==12?' active':''}}" bindtap="changeType" data-title="特产" data-type="12"> <!-- <view class="menus-item{{type==12?' active':''}}" bindtap="changeType" data-title="特产" data-type="12">
<image lazy-load class="menu-item-img" src="{{type==12?'https://static.ticket.sz-trip.com/uploads/20240123/8d8bf4cd274617eddc67b7f7bfc600ad.png':'https://static.ticket.sz-trip.com/uploads/20240123/c3fe8b4e3c7b13ff8eeabad48f2784c1.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==12?'https://static.ticket.sz-trip.com/uploads/20240123/8d8bf4cd274617eddc67b7f7bfc600ad.png':'https://static.ticket.sz-trip.com/uploads/20240123/c3fe8b4e3c7b13ff8eeabad48f2784c1.png'}}" mode="aspectFill"/>
<text class="text">特产</text> <text class="text">特产</text>
</view> </view> -->
<view class="menus-item{{type==5?' active':''}}" bindtap="changeType" data-title="美食" data-type="5"> <view class="menus-item{{type==5?' active':''}}" bindtap="changeType" data-title="美食" data-type="5">
<image lazy-load class="menu-item-img" src="{{type==5?'https://static.ticket.sz-trip.com/uploads/20240123/a1c54d7b95d69646d55a7cb66a5b7ba2.png':'https://static.ticket.sz-trip.com/uploads/20240123/491264b09539365d16c8f625a5c40258.png'}}" mode="aspectFill"/> <image lazy-load class="menu-item-img" src="{{type==5?'https://static.ticket.sz-trip.com/uploads/20240123/a1c54d7b95d69646d55a7cb66a5b7ba2.png':'https://static.ticket.sz-trip.com/uploads/20240123/491264b09539365d16c8f625a5c40258.png'}}" mode="aspectFill"/>
<text class="text">美食</text> <text class="text">美食</text>

2
pages/map/index.wxss

@ -583,7 +583,7 @@
display: flex; display: flex;
/* justify-content: space-around; */ /* justify-content: space-around; */
flex-wrap: wrap; flex-wrap: wrap;
width: calc(170rpx * 7); width: calc(170rpx * 6);
margin: 0 20rpx; margin: 0 20rpx;
} }

1
pages/order/components/date/index.wxss

@ -123,6 +123,7 @@
right: 0; right: 0;
bottom: 0; bottom: 0;
padding-bottom: 50rpx; padding-bottom: 50rpx;
z-index: 50;
} }
.short-date { .short-date {
font-weight: 500; font-weight: 500;

51
pages/order/food/index.js

@ -14,7 +14,8 @@ Page({
user:"", user:"",
tel:"", tel:"",
showNoticeFlag:false, showNoticeFlag:false,
coupon:null coupon:null,
price: 0,
}, },
/** /**
@ -34,6 +35,7 @@ Page({
}) })
}) })
console.log(app.globalData.product) console.log(app.globalData.product)
this.showAllPrice()
}, },
showNotice:function(){ showNotice:function(){
this.setData({ this.setData({
@ -46,6 +48,34 @@ Page({
}) })
}, },
getNewCoupon(e){
this.setData({
coupon:e.detail
})
this.showAllPrice()
},
showAllPrice () {
console.log('couponInfo',app.globalData.couponInfo);
let price
if (this.data.coupon) {
if (this.data.coupon.activity.discount_type == 'pricebreak') {
price = this.data.product.sku.price * this.data.productNum - this.data.coupon.activity.money
} else {
price =(this.data.product.sku.price * this.data.productNum * this.data.coupon.activity.fold)/ 10
}
} else {
price = this.data.product.sku.price * this.data.productNum
}
if (price >0) {
this.setData({ price:price/100})
}else {
this.setData({ price:0 })
}
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -66,11 +96,14 @@ Page({
productNum:(this.data.productNum-1), productNum:(this.data.productNum-1),
coupon:null coupon:null
}) })
this.showAllPrice()
}, },
add:function(){ add:function(){
this.setData({ this.setData({
productNum:this.data.productNum+1 productNum:this.data.productNum+1
}) })
this.showAllPrice()
}, },
userInput:function(e){ userInput:function(e){
this.setData({ this.setData({
@ -83,16 +116,16 @@ Page({
}) })
}, },
order:function(){ order:function(){
if(!this.data.user){ // if(!this.data.user){
wx.showToast({ // wx.showToast({
title: '请输入预订人', // title: '请输入联系人',
icon: 'none' // icon: 'none'
}) // })
return; // return;
} // }
if(!this.data.tel){ if(!this.data.tel){
wx.showToast({ wx.showToast({
title: '请输入手机号', title: '请输入手机号',
icon: 'none' icon: 'none'
}) })
return; return;

32
pages/order/food/index.wxml

@ -4,32 +4,36 @@
<view class="skuinfo"> <view class="skuinfo">
<image lazy-load src="{{product.sku.headimg}}" mode="aspectFill"></image> <image lazy-load src="{{product.sku.headimg}}" mode="aspectFill"></image>
<view class="right-info"> <view class="right-info">
<view class="sku-name textOver2">{{product.product.title+product.sku.sku_name}}</view> <view class="sku-name textOver2">{{product.product.title}}</view>
<view class="info-tips"> <view class="sku-name2 textOver2">{{product.sku.sku_name}}</view>
<!-- <view class="info-tips">
<view class="price"><text>¥</text>{{product.sku.price/100}}</view> <view class="price"><text>¥</text>{{product.sku.price/100}}</view>
<view bindtap="showNotice">购买须知 <text class="iconfont icon-you"></text> </view> <view bindtap="showNotice">购买须知 <text class="iconfont icon-you"></text> </view>
</view> -->
</view> </view>
<view class="info-tips"><text>¥</text>{{product.sku.price/100}}</view>
</view> </view>
</view> <view class="box-title" style="border-top: none;">
<view class="box-title"> <view style="flex:1">购买数量</view>
<view style="flex:1">购票数量</view>
<view class="iconfont icon-sami-select" bindtap="minus"></view> <view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number-box">{{productNum}}</view> <view class="number-box">{{productNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view> <view class="iconfont icon-add-select" bindtap="add"></view>
</view> </view>
<!-- <view class="box-title">
<view style="flex-shrink:0">联系人:</view>
<input type="text" value="{{user}}" bindinput="userInput" placeholder="输入您的名字"></input>
</view> -->
<view class="box-title"> <view class="box-title">
<view style="flex-shrink:0">预订人:</view> <view style="flex-shrink:0">手机号:</view>
<input type="text" value="{{user}}" bindinput="userInput" placeholder="请输入预订人真实姓名"></input> <input type="number" value="{{tel}}" bindinput="telInput" placeholder="请输入手机号"></input>
</view>
<view class="box-title">
<view style="flex-shrink:0">手机号码:</view>
<input type="number" value="{{tel}}" bindinput="telInput" placeholder="请输入手机号码"></input>
</view> </view>
</view> </view>
<coupon id="coupon" money="{{product.sku.price * productNum}}" sku="{{product.sku.id}}"></coupon> <coupon id="coupon" bind:getNewCoupon = 'getNewCoupon' money="{{product.sku.price * productNum}}" sku="{{product.sku.id}}"></coupon>
<view style="height:113rpx"></view> <view style="height:113rpx"></view>
<view class="fixed-bottom" wx:if="{{product}}"> <view class="fixed-bottom" wx:if="{{product}}">
<view class="fixed-price-box"><text>合计:</text><text class="price">¥{{((product.sku.price * productNum - (coupon?coupon.activity.money:0))>0?(product.sku.price * productNum - (coupon?coupon.activity.money:0)):0) / 100}}</text></view> <!-- <view class="fixed-price-box"><text>订单金额:</text><text class="price">¥{{((product.sku.price * productNum - (coupon?coupon.activity.money:0))>0?(product.sku.price * productNum - (coupon?coupon.activity.money:0)):0) / 100}}</text></view> -->
<view class="fixed-btn" bindtap="order">立即预约</view> <view class="fixed-price-box"><text>订单金额:</text><text class="price">¥{{price}}</text></view>
<view class="fixed-btn" bindtap="order">提交订单</view>
</view> </view>
<notice bind:close="closeNotice" wx:if="{{showNoticeFlag}}" bookingInfo="{{product.sku.sku_model}}" skuName="{{product.sku.sku_name}}"></notice> <notice bind:close="closeNotice" wx:if="{{showNoticeFlag}}" bookingInfo="{{product.sku.sku_model}}" skuName="{{product.sku.sku_name}}"></notice>

49
pages/order/food/index.wxss

@ -12,10 +12,11 @@ page {
margin: 0 20rpx; margin: 0 20rpx;
font-size: 31rpx; font-size: 31rpx;
color: #000; color: #000;
font-weight: 500; font-weight: 600;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.coupon-btn { .coupon-btn {
width: 138rpx; width: 138rpx;
line-height: 56rpx; line-height: 56rpx;
@ -29,48 +30,48 @@ page {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
margin-bottom: 30rpx; align-items: flex-start;
} }
.skuinfo image { .skuinfo image {
flex-shrink: 0; flex-shrink: 0;
width: 174rpx; width: 147rpx;
height: 143rpx; height: 147rpx;
border-radius: 7rpx; border-radius: 13rpx;
margin-right: 23rpx; margin-right: 12rpx;
background: red;
} }
.right-info { .right-info {
flex: 1; flex: 1;
width: 100%; width: 100%;
padding-right: 30rpx;
} }
.sku-name { .sku-name {
font-size: 32rpx; font-weight: bold;
line-height: 47rpx; font-size: 31rpx;
height: 94rpx; color: #333333;
color: #333;
margin-bottom: 10rpx;
} }
.info-tips { .sku-name2{
display: flex; font-weight: 500;
justify-content: space-between;
align-items: center;
font-size: 27rpx; font-size: 27rpx;
color: #666; color: #999999;
margin-top: 30rpx;
} }
.info-tips .price { .info-tips {
font-weight: bold;
font-size: 33rpx; font-size: 33rpx;
color: #000; color: #000000;
flex-shrink: 0;
flex-shrink: 0;
} }
.info-tips .price text { .info-tips text {
font-size: 24rpx; font-size: 24rpx;
font-weight: 400;
} }
.info-tips .iconfont {
font-size: 26rpx;
}
.box-title .iconfont { .box-title .iconfont {
font-size: 28rpx; font-size: 28rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.number-box { .number-box {
font-size: 29rpx; font-size: 29rpx;
font-weight: 500; font-weight: 500;
@ -95,7 +96,7 @@ page {
flex: 1; flex: 1;
display: block; display: block;
font-size: 31rpx; font-size: 31rpx;
color: #666; color: #000000;
margin-left: 15rpx; margin-left: 15rpx;
font-weight: 400; font-weight: 400;
} }

2
pages/order/orderList/index.wxml

@ -37,7 +37,7 @@
<view>X{{item.num}}</view> <view>X{{item.num}}</view>
</view> </view>
<view class="item-box item-title" style="padding-top: 27rpx;">出行人信息</view> <view class="item-box item-title" style="padding-top: 27rpx;">出行人信息</view>
<view wx:if="{{item.sku.sku_model.is_authentication != 0}}"> <view wx:if="{{item.sku.sku_model.is_authentication}}">
<view wx:for="{{item.linkmanList}}" style="padding-left: 10rpx;" wx:for-item="items"> <view wx:for="{{item.linkmanList}}" style="padding-left: 10rpx;" wx:for-item="items">
<view> <view>
<view class="text"><view class="text-left">姓名:</view>{{items.name}}</view> <view class="text"><view class="text-left">姓名:</view>{{items.name}}</view>

2
pages/order/payresult/index.js

@ -54,7 +54,7 @@ Page({
} }
util.gotoDetail(item) util.gotoDetail(item, false, "&sourceFrom=recommend")
}, },
gotoOrderList:function(){ gotoOrderList:function(){
if(!this.data.info) return; if(!this.data.info) return;

7
pages/order/scene/index.js

@ -65,7 +65,7 @@ Page({
ticket_type:app.globalData.product.sku.ticket_type || 1, ticket_type:app.globalData.product.sku.ticket_type || 1,
isCar:options.isCar, isCar:options.isCar,
is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard, is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard,
is_authentication:app.globalData.product.sku.sku_model.is_authentication, is_authentication:app.globalData.product.sku.sku_model.is_authentication || 0,
is_real_name:app.globalData.product.sku.sku_model.is_real_name, is_real_name:app.globalData.product.sku.sku_model.is_real_name,
date: app.globalData.product.date, date: app.globalData.product.date,
time: app.globalData.product.time || {}, time: app.globalData.product.time || {},
@ -505,6 +505,8 @@ Page({
remark: remark, remark: remark,
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum, product_num: app.globalData.product.isGroup == 1 ? 1 : productNum,
phone:this.data.phone,// 不实名的时候传的手机号参数 phone:this.data.phone,// 不实名的时候传的手机号参数
// 美食预定
reserve_mobile: product.product.type=="food"?this.data.phone:"",
}], }],
originate_order_id: this.data.kjId, originate_order_id: this.data.kjId,
gp_id: app.globalData.gp_id, gp_id: app.globalData.gp_id,
@ -541,8 +543,9 @@ Page({
if(app.globalData.list){ if(app.globalData.list){
app.globalData.list[app.globalData.index] = this.data.product app.globalData.list[app.globalData.index] = this.data.product
// app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList // app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList
if (app.globalData.list[app.globalData.index].sku.sku_model.is_authentication == 0) { if (!app.globalData.list[app.globalData.index].sku.sku_model.is_authentication) {
app.globalData.list[app.globalData.index].phone = this.data.phone app.globalData.list[app.globalData.index].phone = this.data.phone
// app.globalData.list[app.globalData.index].reserve_mobile = this.data.phone
app.globalData.list[app.globalData.index].linkmanList = [] app.globalData.list[app.globalData.index].linkmanList = []
}else { }else {
app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList

11
pages/search/list/index.wxml

@ -71,6 +71,17 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 活动 -->
<view class="product-item" wx:if="{{item.ext.type=='act_calendar'}}">
<image lazy-load class="product-img" src="{{item.ext.post_url}}" mode="aspectFill"></image>
<view class="product-info show-info">
<view class="product-title">{{item.ext.name}}</view>
<view class="show-info">
<view>{{item.ext.begin_date}}-{{item.ext.end_date}}</view>
<view>{{item.ext.from_platform}}</view>
</view>
</view>
</view>
<!-- 电影 --> <!-- 电影 -->
<view class="product-item" wx:if="{{item.ext.type=='movie'}}"> <view class="product-item" wx:if="{{item.ext.type=='movie'}}">
<image lazy-load class="product-img" src="{{item.ext.headimg}}" mode="aspectFill"></image> <image lazy-load class="product-img" src="{{item.ext.headimg}}" mode="aspectFill"></image>

2
pages/search/list/index.wxss

@ -50,6 +50,7 @@ page {
font-size: 29rpx; font-size: 29rpx;
color: #333; color: #333;
overflow-x: auto; overflow-x: auto;
overflow-y: hidden;
} }
.search-type { .search-type {
flex-shrink: 0; flex-shrink: 0;
@ -160,6 +161,7 @@ page {
font-size: 20rpx; font-size: 20rpx;
line-height: 20rpx; line-height: 20rpx;
align-items: center; align-items: center;
overflow: visible;
} }
.scene-tag { .scene-tag {
position: relative; position: relative;

54
pages/user/order/foodOrderInfo/index.js

@ -20,7 +20,11 @@ Page({
codeImgs:[], codeImgs:[],
minute:"", minute:"",
second:"", second:"",
pay_methods:app.globalData.pay_methods pay_methods:app.globalData.pay_methods,
ids: [],
lon: null,
lat: null,
}, },
/** /**
@ -177,6 +181,23 @@ Page({
}) })
}, },
gotolocation: function () {
let info = this.data.info.order_product_list[0].supplier_info;
wx.openLocation({
latitude: Number(info.lat),
longitude: Number(info.lon),
name:info.shop_name,
address:info.address
})
},
callPhone :function () {
wx.makePhoneCall({
phoneNumber: this.data.info.order_product_list[0].scene_detail.tel,
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
@ -184,12 +205,11 @@ Page({
}, },
/** getOrderInfo () {
* 生命周期函数--监听页面显示
*/
onShow: function () {
commonApi.user_post("order/query",{ commonApi.user_post("order/query",{
order_id:this.data.id order_id:this.data.id,
lon: this.data.lon,
lat: this.data.lat
}).then(res=>{ }).then(res=>{
if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){ if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){
let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000); let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000);
@ -207,12 +227,32 @@ Page({
this.setData({ this.setData({
isRefund:state.indexOf("REFUND")!=-1, isRefund:state.indexOf("REFUND")!=-1,
info:res.data, info:res.data,
product_model:res.data.order_product_list[0].product_model product_model:res.data.order_product_list[0].product_model,
ids: res.data.order_product_list.map(x=>x.product_id).join(","),
}) })
this.getCodeImg() this.getCodeImg()
}) })
}, },
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this
wx.getLocation({
type: 'gcj02',
success: function (res) {
that.setData({lat:res.latitude,lon:res.longitude})
that.getOrderInfo()
},
fail:function(){
that.getOrderInfo()
}
})
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */

3
pages/user/order/foodOrderInfo/index.json

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"title":"/pages/component/TitleHeader" "title":"/pages/component/TitleHeader",
"sptj":"/pages/component/proRec/proRec"
} }
} }

129
pages/user/order/foodOrderInfo/index.wxml

@ -19,8 +19,9 @@
<!-- 美食的 --> <!-- 美食的 -->
<view class="box" wx:if="{{product_model=='food'}}" style="padding-bottom:0"> <view wx:if="{{product_model=='food'}}">
<view wx:if="{{info.order_product_list && info.order_product_list.length>0}}" class="product-info" wx:for="{{info.order_product_list}}"> <view class="box" wx:if="{{info.order_product_list && info.order_product_list.length>0}}" wx:for="{{info.order_product_list}}">
<view class="product-info">
<image lazy-load src="{{item.sku_headimg}}" mode="aspectFill"></image> <image lazy-load src="{{item.sku_headimg}}" mode="aspectFill"></image>
<view class="title-box textOver2"> <view class="title-box textOver2">
<view class="title textOver2">{{item.product_title}}</view> <view class="title textOver2">{{item.product_title}}</view>
@ -31,52 +32,76 @@
<view>x{{item.product_num}}</view> <view>x{{item.product_num}}</view>
</view> </view>
</view> </view>
<view class="detail-item">
<text>商品总价</text> <view class="reserve-box">
<text>¥{{info.total_money/100}}</text> <view >{{item.order_product_extend.reserve_username}}</view>
<view >{{item.order_product_extend.reserve_mobile}}</view>
</view> </view>
<view class="detail-item" wx:if="{{info.total_post_fee}}"> <view class="state_text">{{item.state_text}}</view>
<text>运费</text>
<text>¥{{info.total_post_fee/100}}</text> <view class="detail-item" wx:if="{{item.paid_money}}">
<text>小计</text>
<text style="color: #DC2525;font-weight: bold;">¥{{item.paid_money/100}}</text>
</view> </view>
<view class="detail-item" wx:if="{{info.preference_money}}">
<text>优惠券抵扣</text>
<text>-¥{{info.preference_money/100}}</text> <view class="box-title">商家信息</view>
<view class=" supplier-mask">
<view class="mask-shop-info">
<view>{{info.order_product_list[0].supplier_info.shop_name}}</view>
<view class="shop-info-item">
<image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/time.png"></image>
<view>
<view>营业时间</view>
<view class="subtitle">{{info.order_product_list[0].supplier_info.business_hours}}</view>
</view> </view>
<view class="detail-item all-total-item" style="border-bottom:none">
<text>需付款</text>
<view class="price">{{info.paid_money/100}}</view>
</view> </view>
<view class="btns" style="border-top:1rpx solid #ccc" wx:if="{{info.state!='CLOSED'}}"> <view class="shop-info-item" style="justify-content: space-between;">
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view> <image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/address.png"></image>
<navigator url="/pages/info/foodProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> <view style="flex: 1;width: 100rpx;">
<navigator wx:if="{{info.state!='UNPAID'}}" url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator> <view>{{info.order_product_list[0].supplier_info.address}}</view>
<view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消订单</view> <view class="subtitle" wx:if="{{info.order_product_list[0].supplier_info.distance>0}}">据您约{{info.order_product_list[0].supplier_info.distance}}km</view>
<view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
</view> </view>
<image class="icon-phone" catch:tap="callPhone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
<image class="icon-phone" catch:tap="gotolocation" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
</view> </view>
<view class="box" wx:if="{{info && product_model=='food'}}">
</view>
</view>
</view>
</view>
<!-- <view class="box" wx:if="{{info && product_model=='food'}}">
<view class="box-title">商家信息</view> <view class="box-title">商家信息</view>
<view class="detail-item"> <view class=" supplier-mask">
<text>{{info.order_product_list[0].scene_detail.title}}</text> <view class="mask-shop-info">
<view>{{info.order_product_list[0].supplier_info.shop_name}}</view>
<view class="shop-info-item">
<image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/time.png"></image>
<view>
<view>营业时间</view>
<view class="subtitle">{{info.order_product_list[0].supplier_info.business_hours}}</view>
</view> </view>
<view class="detail-item">
<text>商家电话:{{info.order_product_list[0].scene_detail.tel}}</text>
</view> </view>
<view class="detail-item"> <view class="shop-info-item" style="justify-content: space-between;">
<text>商家地址:{{info.order_product_list[0].scene_detail.address}}</text> <image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/address.png"></image>
<view style="flex: 1;width: 100rpx;">
<view>{{info.order_product_list[0].supplier_info.address}}</view>
<view class="subtitle" wx:if="{{info.order_product_list[0].supplier_info.distance>0}}">据您约{{info.order_product_list[0].supplier_info.distance}}km</view>
</view> </view>
<image class="icon-phone" catch:tap="callPhone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
<image class="icon-phone" catch:tap="gotolocation" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
</view> </view>
<view class="box" wx:if="{{info && product_model=='food'}}">
<view class="box-title">订单信息</view>
<view class="detail-item">
<text>姓名:{{info.order_product_list[0].order_product_extend.reserve_username}}</text>
</view> </view>
<view class="detail-item">
<text>预留手机号:{{info.order_product_list[0].order_product_extend.reserve_mobile}}</text>
</view> </view>
</view> -->
<view class="box" wx:if="{{info && product_model=='food'}}">
<view class="box-title">订单信息</view>
<view class="detail-item"> <view class="detail-item">
<text>订单编号:{{info.order_id}}</text> <text>订单编号:{{info.order_id}}</text>
</view> </view>
@ -89,18 +114,48 @@
<view class="detail-item" wx:if="{{info.pay_method}}"> <view class="detail-item" wx:if="{{info.pay_method}}">
<text>支付方式:{{pay_methods[info.pay_method]}}</text> <text>支付方式:{{pay_methods[info.pay_method]}}</text>
</view> </view>
<view class="detail-item">
<text>商品总额:¥{{info.total_money/100}}</text>
</view> </view>
<view class="box" wx:if="{{info && product_model=='food'}}"> <view class="detail-item" wx:if="{{info.total_post_fee}}">
<text>运费:¥{{info.total_post_fee/100}}</text>
</view>
<view class="detail-item" wx:if="{{info.preference_money}}">
<text>优惠券:-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item">
<text>实付金额:<text>{{info.paid_money/100}}</text></text>
</view>
<view class="detail-item" style="font-weight: bold;" wx:if="{{info.state=='UNPAID'}}">
<text>剩余时间:00:{{minute}}:{{second}}</text>
</view>
<view class="btns" style="border-top:1rpx solid #ccc" wx:if="{{info.state!='CLOSED'}}">
<!-- <view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view> -->
<navigator url="/pages/info/foodProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:if="{{info.state!='UNPAID'}}" url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消订单</view>
<view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
</view>
</view>
<!-- <view class="box" wx:if="{{info && product_model=='food'}}">
<view class="box-title">使用说明</view> <view class="box-title">使用说明</view>
<rich-text class="detail-item" style="display:block;height:auto" nodes="{{tool.formateRichText(info.order_product_list[0].sku_model.bookinfo)}}"></rich-text> <rich-text class="detail-item" style="display:block;height:auto" nodes="{{tool.formateRichText(info.order_product_list[0].sku_model.bookinfo)}}"></rich-text>
</view> </view> -->
<!-- <view class="box" wx:if="{{info && product_model=='food'}}"> <!-- <view class="box" wx:if="{{info && product_model=='food'}}">
<view class="box-title">退款须知</view> <view class="box-title">退款须知</view>
<rich-text class="detail-item" style="display:block;height:auto" nodes="{{tool.formateRichText(info.order_product_list[0].sku_model.refund_info)}}"></rich-text> <rich-text class="detail-item" style="display:block;height:auto" nodes="{{tool.formateRichText(info.order_product_list[0].sku_model.refund_info)}}"></rich-text>
</view> --> </view> -->
<sptj ids="{{ ids }}"></sptj>
<navigator url="/pages/user/service/index" wx:if="{{info && info.state!='CLOSED'}}" class="bottom-btn"> <navigator url="/pages/user/service/index" wx:if="{{info && info.state!='CLOSED'}}" class="bottom-btn">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服 <image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服
</navigator> </navigator>
<view style="width: 100%;height: 50rpx;"></view>
<view class="mask" wx:if="{{feeInfoFlag}}"> <view class="mask" wx:if="{{feeInfoFlag}}">
<view class="mask-bg" bindtap="showFeeInfo"></view> <view class="mask-bg" bindtap="showFeeInfo"></view>
<view class="mask-content"> <view class="mask-content">

81
pages/user/order/foodOrderInfo/index.wxss

@ -33,8 +33,6 @@ page {
color: #333; color: #333;
font-size: 24rpx; font-size: 24rpx;
padding-bottom: 20rpx; padding-bottom: 20rpx;
border-bottom: 1rpx solid #d8d8d8;
margin-bottom: 10rpx;
} }
.product-info image { .product-info image {
width: 140rpx; width: 140rpx;
@ -63,19 +61,18 @@ page {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
height: 45rpx; height: 45rpx;
color: #333; font-weight: 500;
font-size: 26rpx; font-size: 27rpx;
} color: #666666;
.all-total-item { margin-bottom: 10rpx;
font-weight: bold;
height: 70rpx;
border-bottom: 1rpx solid #d8d8d8;
} }
.all-total-item .price { .detail-item .price{
color: #D62828; color: #D62828;
font-size: 36rpx; font-size: 34rpx;
font-weight: bold;
} }
.all-total-item .price::before {
.detail-item .price::before {
content: "¥"; content: "¥";
font-size: 26rpx; font-size: 26rpx;
} }
@ -287,3 +284,63 @@ page {
color: #999; color: #999;
margin-top: 30rpx; margin-top: 30rpx;
} }
.reserve-box{
display: flex;
align-items: center;
justify-content: space-between;
font-weight: bold;
font-size: 31rpx;
color: #000000;
}
.state_text{
font-weight: bold;
font-size: 31rpx;
color: #0B898E;
text-align: right;
margin: 20rpx 0;
padding-bottom: 20rpx;
border-bottom: 1px solid #D8D8D8;
}
.supplier-mask{
display: flex;
flex-direction: column;
}
.supplier-mask .supplier-mask-header{
padding: 28rpx 26rpx;
font-weight: bold;
font-size: 31rpx;
color: #000000;
}
.mask-shop-info{
font-weight: 500;
font-size: 31rpx;
color: #000000;
}
.shop-info-item{
display: flex;
align-items: flex-start;
font-weight: 500;
font-size: 26rpx;
color: #000000;
padding: 20rpx 0;
word-wrap: break-all;
}
.shop-info-item .start-icon{
width: 28rpx;
height: 28rpx;
margin: 4rpx 8rpx 0 0;
flex-shrink: 0;
}
.shop-info-item .subtitle{
font-weight: 500;
font-size: 24rpx;
color: #666666;
margin-top: 26rpx;
}
.shop-info-item .icon-phone{
width: 56rpx;
height: 56rpx;
margin-left: 40rpx;
}

7
pages/user/order/list.js

@ -114,6 +114,11 @@ Page({
ajaxes.push(ajax); ajaxes.push(ajax);
indexes.push(index); indexes.push(index);
} }
// 权益卡只展示第一个
if (item.is_order_card_product==1) {
item.order_product_list = [item.order_product_list[0]]
}
item.orderNum = orderNum; item.orderNum = orderNum;
}) })
console.log(ajaxes) console.log(ajaxes)
@ -141,7 +146,7 @@ Page({
}, },
gotoDetail:function(e){ gotoDetail:function(e){
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
item = this.getChild(item) // item = this.getChild(item)
util.gotoOrder(item) util.gotoOrder(item)
}, },

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

@ -23,7 +23,12 @@ Page({
pay_methods:app.globalData.pay_methods, pay_methods:app.globalData.pay_methods,
tjList:[], tjList:[],
showLoading:true, showLoading:true,
ids:[] ids:[],
// 权益卡
isCard: false,
cardPostList: [],
deliveryNum: 0,
}, },
/** /**
@ -309,11 +314,36 @@ getInfo () {
state = state + order.state; state = state + order.state;
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[] order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
}) })
// 权益卡
let cardPostList = [];
let isCard= false;
let deliveryNum = 0;
if (res.data.order_product_list.some(v=>v.order_card_product)) {
cardPostList = res.data.order_product_list.slice(1)
res.data.order_product_list = [res.data.order_product_list[0]]
isCard = true;
cardPostList.forEach(v=>{
console.log(v)
if (v.order_card_product) {
v.order_card_product.month = new Date(v.order_card_product.delivery_start_date).getMonth()+1
v.order_card_product.delivery_start_date = v.order_card_product.delivery_start_date.slice(0,10)
v.order_card_product.delivery_end_date = v.order_card_product.delivery_end_date.slice(0,10)
}
if (['WAIT_DELIVERY', 'WAIT_COMMENT', 'COMPLETED'].includes(v.state)) {
deliveryNum += 1
}
})
}
this.setData({ this.setData({
isRefund:state.indexOf("REFUND")!=-1, isRefund:state.indexOf("REFUND")!=-1,
info:res.data, info:res.data,
product_model:res.data.order_product_list[0].product_model, product_model:res.data.order_product_list[0].product_model,
ids: proId.join(",") ids: proId.join(","),
cardPostList: cardPostList,
isCard: isCard,
deliveryNum: deliveryNum
}) })
this.getCodeImg() this.getCodeImg()
}) })
@ -377,12 +407,35 @@ getInfo () {
} else { } else {
res.data.is_all_confirm = false; res.data.is_all_confirm = false;
} }
// 权益卡
let cardPostList = [];
let isCard= false;
let deliveryNum = 0;
if (res.data.order_product_list.some(v=>v.order_card_product)) {
cardPostList = res.data.order_product_list.slice(1)
res.data.order_product_list = [res.data.order_product_list[0]]
isCard = true;
cardPostList.forEach(v=>{
console.log(v)
if (v.order_card_product) {
v.order_card_product.month = new Date(v.order_card_product.delivery_start_date).getMonth()+1
v.order_card_product.delivery_start_date = v.order_card_product.delivery_start_date.slice(0,10)
v.order_card_product.delivery_end_date = v.order_card_product.delivery_end_date.slice(0,10)
}
if (['WAIT_DELIVERY', 'WAIT_COMMENT', 'COMPLETED'].includes(v.state)) {
deliveryNum += 1
}
})
}
console.log(res.data, 'aaa')
this.setData({ this.setData({
isRefund:state.indexOf("REFUND")!=-1, isRefund:state.indexOf("REFUND")!=-1,
info:res.data, info:res.data,
product_model:res.data.order_product_list[0].product_model, product_model:res.data.order_product_list[0].product_model,
ids: proId.join(",") ids: proId.join(","),
cardPostList: cardPostList,
isCard: isCard,
deliveryNum: deliveryNum
}) })
this.getCodeImg() this.getCodeImg()
}) })

53
pages/user/order/postOrderInfo/index.wxml

@ -120,6 +120,57 @@
</view> </view>
<rich-text class="detail-item {{item.showMsg?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;height: auto;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text> <rich-text class="detail-item {{item.showMsg?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;height: auto;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view> </view>
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;" wx:if="{{isCard&&cardPostList.length>0}}">
<view class="box-title" style="position: relative;">
物流信息
<text bind:tap="expandPost" data-index="{{index}}" class="expand-tip" >{{item.showMore?"收起":"展开"}}</text>
</view>
<view style="height:{{item.showMore?'auto':'340rpx'}};overflow: hidden;">
<view class="detail-item post-line-info">
<text>当前已发:{{deliveryNum}}</text>
</view>
<view class="detail-item post-line-info" style="margin-bottom: 20rpx;">
<text>当前待发:{{cardPostList.length - deliveryNum}}</text>
</view>
<view class="my-shipment-place" style="display: flex;" wx:for="{{cardPostList}}" wx:for-item="shipment" wx:for-index="shipIndex">
<view class="line-card">
<view wx:if="{{shipIndex==0}}" class="first-line"></view>
<view wx:if="{{shipIndex==(cardPostList.length-1)}}" class="last-line"></view>
<view class="line-dot ">
<image wx:if="{{shipment.post_detail_list&&shipment.post_detail_list[0]}}" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250928/397edd1ef1daba7026d2900f1a59ff7d.png"></image>
</view>
<view class="{{shipment.post_detail_list&&shipment.post_detail_list[0]?'completed':''}}">{{shipment.order_card_product.month}}月</view>
</view>
<view class="post-child-item" style="margin-bottom: 0;">
<view class="detail-item post-line-info">
<text class="textOver" style="font-weight: bold;font-size: 27rpx;width: 400rpx;">{{shipment.sku_name}}</text>
<text style="color: #0B898E;">{{shipment.state_text}}</text>
</view>
<view wx:if="{{shipment.post_detail_list&&shipment.post_detail_list[0]}}">
<view class="detail-item post-line-info">
<text>快递公司:{{shipment.post_detail_list[0].express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{shipment.post_detail_list[0].courier_number}} <text data-num="{{shipment.post_detail_list[0].courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{shipment.order_card_product.delivery_start_date}} 至 {{shipment.order_card_product.delivery_end_date}} </text>
</view>
</view>
</view>
</view>
</view>
</view> </view>
</view> </view>
@ -169,6 +220,8 @@
<!-- <navigator wx:if="{{info.state!='UNPAID'}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> --> <!-- <navigator wx:if="{{info.state!='UNPAID'}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> -->
<navigator url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator> <navigator url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="btn" wx:if="{{info.is_all_confirm}}" bind:tap="toConfirmPost">确认收货</view> <view class="btn" wx:if="{{info.is_all_confirm}}" bind:tap="toConfirmPost">确认收货</view>
<view class="btn" wx:if="{{isCard}}" bind:tap="toConfirmPost">确认收货</view>
<view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">申请退款</view> <view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">申请退款</view>
<view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view> <view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator> <navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>

63
pages/user/order/postOrderInfo/index.wxss

@ -371,7 +371,6 @@ color: #333333;
width: fit-content; width: fit-content;
margin: 0 auto; margin: 0 auto;
box-sizing: border-box; box-sizing: border-box;
margin-top: 20rpx;
} }
.expand-tip{ .expand-tip{
position: absolute; position: absolute;
@ -379,3 +378,65 @@ color: #333333;
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
.line-card{
width: 90rpx;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
font-weight: bold;
font-size: 23rpx;
color: #999999;
position: relative;
/* height: 100%; */
}
.line-card .line-dot{
width: 33rpx;
height: 33rpx;
background: #CCCCCC;
border-radius: 50%;
position: absolute;
left: -16.5rpx;
top: calc(50% - 16.5rpx);
z-index: 3;
}
.first-line{
height: 50%;
position: absolute;
top: 0;
width: 4rpx;
left: -2rpx;
z-index: 2;
background: white;
z-index: 2;
}
.last-line{
height: 50%;
position: absolute;
bottom: 0;
width: 4rpx;
left: -2rpx;
z-index: 2;
background: white;
z-index: 2;
}
.my-shipment-place{
box-sizing: border-box;
margin-left: 20rpx;
border-left: 1px solid #ccc;
padding-bottom: 20rpx;
}
.my-shipment-place:last-of-type{
padding-bottom: 0rpx;
}
.completed{
color: #0b898e;
}
.line-dot image{
width: 100%;
height: 100%;
border-radius: 50%;
}

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

@ -29,7 +29,9 @@ Page({
sysm2:false, sysm2:false,
sysm2Text:'更多', sysm2Text:'更多',
imgLen:[], imgLen:[],
ids:[] ids:[],
isPost: false, // 有没有邮寄产品
}, },
/** /**
@ -316,7 +318,8 @@ Page({
isRefund:state.indexOf("REFUND")!=-1, isRefund:state.indexOf("REFUND")!=-1,
info:res.data, info:res.data,
product_model:"ticket"||res.data.order_product_list[0].product_model, product_model:"ticket"||res.data.order_product_list[0].product_model,
ids: proId.join(",") ids: proId.join(","),
isPost: res.data.order_product_list.some(x=>x.product_model == 'post'),
}) })
console.log(res.data); console.log(res.data);
// debugger // debugger

19
pages/user/order/sceneOrderInfo/index.wxml

@ -38,20 +38,7 @@
<!-- 景点订单详情需要这个 --> <!-- 景点订单详情需要这个 -->
<!-- <view class="box" wx:if='{{product_model=="ticket"}}'> <!-- <view class="box" wx:if='{{product_model=="ticket"}}'>
<view class="scene-box">
<view class="scene-box-left">
<view wx:if="{{info.state=='UNPAID'}}">库存有限,请尽快完成付款</view>
<view wx:if="{{info.state=='CLOSED' || info.state=='REFUND'}}">您的订单已取消,您可以通过苏州文旅总入口再次预订</view>
<view wx:if="{{info.order_product_list[0].state=='WAIT_USE'}}">预定已成功,祝您出游愉快</view>
<view>订单号:{{info.order_id}}</view>
<view>下单时间:{{info.create_time}}</view>
</view>
<view class="scene-box-right">
<view class="price">¥{{info.paid_money/100}}</view>
<view bindtap="showFeeInfo">费用明细</view>
</view>
</view>
</view> --> </view> -->
<!--景点订单详情需要这个 --> <!--景点订单详情需要这个 -->
<view class="box" wx:for="{{info.order_product_list}}" wx:for-index='index'> <view class="box" wx:for="{{info.order_product_list}}" wx:for-index='index'>
@ -98,9 +85,9 @@
</text> </text>
</view> </view>
<view class="post-child" style="padding-top: 12rpx;"> <view class="post-child" style="padding-top: 12rpx;">
<view wx:if="{{item.sku_model.is_authentication == 0}}"> <view wx:if="{{!item.sku_model.is_authentication}}">
<view class="detail-item"> <view class="detail-item">
<text>手机号: {{item.phone}}</text> <text>手机号: {{item.phone || item.reserve_mobile}}</text>
</view> </view>
</view> </view>
<view wx:else style="overflow: hidden; max-height:{{item.showMore?'100vh':'180rpx'}};"> <view wx:else style="overflow: hidden; max-height:{{item.showMore?'100vh':'180rpx'}};">
@ -246,7 +233,7 @@
<text>商品总价:</text> <text>商品总价:</text>
<text>¥{{info.total_money/100}}</text> <text>¥{{info.total_money/100}}</text>
</view> </view>
<view class="detail-item"> <view class="detail-item" wx:if="{{isPost}}">
<text>运费:</text> <text>运费:</text>
<view> <view>
<text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}"> <text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}">

3
pages/user/service/info/index.json

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"title":"/pages/component/TitleHeader" "title":"/pages/component/TitleHeader",
"kefuCom": "/pages/component/kefu"
} }
} }

6
pages/user/service/info/index.wxml

@ -21,7 +21,7 @@
</view> </view>
<view class="mask" wx:if="{{showPhoneMask}}"> <!-- <view class="mask" wx:if="{{showPhoneMask}}">
<view class="mask-bg" bindtap="closePhoneMask"></view> <view class="mask-bg" bindtap="closePhoneMask"></view>
<view class="mask-content" style="text-align:center;width:70%;border-radius:10rpx"> <view class="mask-content" style="text-align:center;width:70%;border-radius:10rpx">
<view class="num-pay-top" style="font-weight: bold;padding: 30rpx 60rpx;font-size: 30rpx;"> <view class="num-pay-top" style="font-weight: bold;padding: 30rpx 60rpx;font-size: 30rpx;">
@ -33,4 +33,6 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<kefuCom wx:if="{{showPhoneMask}}" bind:hideModal="closePhoneMask"></kefuCom>

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

@ -14,8 +14,7 @@ Page({
page_no:1, page_no:1,
keyword:"", keyword:"",
showModal: false, showModal: false,
// 成功
ses:true,
}, },

3
pages/user/service/list/index.json

@ -1,5 +1,6 @@
{ {
"usingComponents": { "usingComponents": {
"title":"/pages/component/TitleHeader" "title":"/pages/component/TitleHeader",
"kefuCom": "/pages/component/kefu"
} }
} }

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

@ -12,27 +12,6 @@
<!-- <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> --> <!-- <button class="more-btn" open-type="contact" bindcontact="handleContact">没找到想要的答案?一键呼唤<text>人工客服</text></button> -->
<view class="more-btn" bindtap="showDialogBtn">没找到想要的答案?一键呼唤<text>人工客服</text></view> <view class="more-btn" bindtap="showDialogBtn">没找到想要的答案?一键呼唤<text>人工客服</text></view>
<!-- 弹出层 -->
<view
class="modal-mask" <kefuCom wx:if="{{showModal}}" bind:hideModal="hideModal"></kefuCom>
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>客服服务时间:9:00-12:00,</view>
<view>13:00-18:00</view>
如遇紧急情况可拨打 <view class="green" bindtap="phoneCall"> 0512-66555111 </view><view class="green" bindtap="phoneCall2"> 18915532527 </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>

4
pages/user/user.json

@ -1,3 +1,5 @@
{ {
"usingComponents": {} "usingComponents": {
"kefuCom": "/pages/component/kefu"
}
} }

5
pages/user/user.wxml

@ -131,7 +131,7 @@
<view>备案号:苏ICP备19064944号-3X@君到苏州</view> <view>备案号:苏ICP备19064944号-3X@君到苏州</view>
</view> </view>
</view> </view>
<view class="mask" wx:if="{{showModel}}"> <!-- <view class="mask" wx:if="{{showModel}}">
<view class="model"> <view class="model">
<view class="model-content"> <view class="model-content">
@ -148,5 +148,6 @@
</button> </button>
</view> </view>
</view> </view>
</view> </view> -->
<kefuCom wx:if="{{showModel}}" bind:hideModal="closeModel"></kefuCom>
<view style="height:20rpx"></view> <view style="height:20rpx"></view>

13
project.private.config.json

@ -7,18 +7,11 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/info/postProductInfo/index", "name": "subPackages/foodListNew/index",
"pathName": "pages/info/postProductInfo/index", "pathName": "subPackages/foodListNew/index",
"query": "id=457638", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "pages/info/roadInfo/index",
"pathName": "pages/info/roadInfo/index",
"query": "id=457643",
"scene": null,
"launchMode": "default"
} }
] ]
} }

198
subPackages/foodListNew/index.js

@ -0,0 +1,198 @@
// pages/list/theatre/index.js
import commonApi from "../../utils/https/common"
import util from "../../utils/util"
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
list:[],
tagList: [
{id: 521, name: "品苏式面"},
{id: 522, name: "尝农家乐"},
// {id: 11, name: "鉴苏帮菜"},
// {id: 12, name: "寻夜食堂"},
], // 父标签477
total:1,
type:521,
areas: [],
areaIndex:0,
needDistance: false,
lat:"",
lon:"",
keywords:""
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.showShareMenu({
withShareTicket: true,
menus: ['shareAppMessage', 'shareTimeline']
})
this.getList();
this.getAreas();
},
getAreas:function(){
commonApi._post("supplier/get_area_list",{pid:320500}).then(res=>{
this.setData({
areas: [{id:0, name:"选择地区"},...res.data]
})
})
},
changeArea:function(e){
this.setData({
areaIndex:e.detail.value,
list: [],
total:1,
})
this.getList()
},
selectDistance: function () {
this.setData({
needDistance: !this.data.needDistance,
list: [],
total:1,
})
this.getList()
},
search:function(e){
this.setData({
list:[],
keywords:e.detail.keywords,
total:1
})
this.getList()
},
gotoDetail:function(e){
let item = e.currentTarget.dataset.item;
// util.pagePoint({
// event: 'food_detail_click',
// param: {
// id:item.id
// }
// },1)
wx.navigateTo({
url: '/subPackages/foodNew/index?id='+item.id,
})
},
getList:function(){
let list = this.data.list,that = this;
if(list.length>=this.data.total) return;0
// // 距离排序
if(this.data.needDistance && !this.data.lon){
wx.getLocation({
type: 'gcj02',
success: function (res) {
that.setData({
lat:res.latitude,
lon:res.longitude
})
that.realgetList()
},
fail:function(){
that.realgetList()
}
})
}
else {
this.realgetList()
}
},
realgetList:function(){
let list = this.data.list;
let param = {}
if (this.data.needDistance) {
param = {lat:this.data.lat,lon:this.data.lon}
}
commonApi._post("supplier/get_supplier_list",{
supplier_tag_id: this.data.type,
area_id: (this.data.areas[this.data.areaIndex] || {id: 0}).id,
offset:list.length,
limit:10,
...param,
keyword:this.data.keywords
}).then(res=>{
this.setData({
list:list.concat(res.data.list),
total:res.data.total
})
})
},
changeType:function(e){
this.setData({
type:e.currentTarget.dataset.type,
list:[],
total:1
})
this.getList();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.getList()
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
onShareTimeline: function() {
return {
title: '君到苏州-剧场演出',
query: '',
imageUrl: 'https://static.ticket.sz-trip.com/xcxImages/index/icon4New.png'
}
}
})

5
subPackages/foodListNew/index.json

@ -0,0 +1,5 @@
{
"usingComponents": {
"search": "/pages/component/SearchHeader"
}
}

52
subPackages/foodListNew/index.wxml

@ -0,0 +1,52 @@
<!--pages/list/theatre/index.wxml-->
<wxs src="../../utils/filter.wxs" module="tool" />
<view class="my-header-search">
<search bind:onload="search" transparent="1"></search>
<view class="sale-types no-scrollbar">
<view wx:for="{{tagList}}" wx:key="id" class="sale-type{{type==item.id?' active':''}}"
bindtap="changeType" data-type="{{item.id}}">{{item.name}}</view>
</view>
<view class="search-fix">
<view>
<picker mode="selector" value="{{areaIndex}}" range="{{areas}}" range-key="name" bindchange="changeArea">
<view class="picker feiyi-picker">
<text style="color: {{areaIndex>0?'#FF8530':'#000000'}};">{{areaIndex>0?areas[areaIndex].name:'选择地区'}}</text>
<view class="trian-down"></view>
</view>
</picker>
</view>
<view bind:tap="selectDistance" style="color: {{needDistance?'#FF8530':'#000000'}};">距离最近</view>
</view>
</view>
<view style="height:700rpx"></view>
<view class="prod-box">
<view bindtap="gotoDetail" data-item="{{item}}" class="item" wx:for="{{list}}">
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image>
<view class="info">
<view class="textOver2 title">{{item.supplier_name}}</view>
<view class=" subtitle" style="display: flex;">
<text class="textOver" style="flex: 1;width: 100rpx;padding-right: 40rpx;">{{item.address}}</text>
<text style="flex-shrink: 0;" wx:if="{{item.distance>0}}">{{item.distance}}km</text>
</view>
<view class="line" wx:if="{{item.hot_products.length>0}}"></view>
<view class="prod-container" wx:for="{{item.hot_products}}" wx:for-item="prod" wx:for-index="indexs" wx:key="indexs">
<view class="prod-item textOver">
<text class="hot">热</text>
<text class="price">¥{{prod.price?prod.price/100:0}}</text>
<text class="prod-name textOver">{{prod.title}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{list.length==0}}" class="common-empty" style="z-index:-1">
<image lazy-load mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image>
<view>暂无内容</view>
</view>
</view>

158
subPackages/foodListNew/index.wxss

@ -0,0 +1,158 @@
/* pages/list/theatre/index.wxss */
page{
background:#F7F7F7;
padding-bottom: 20rpx;
}
.my-header-search{
background: white;
position: fixed;
top: 0;
left: 0;
right: 0;
}
.my-header-search .bg-box .title-header{
color: #999;
}
.my-header-search .title-header .icon-fanhui1{
color: #333 !important;
}
.sale-types {
background-image: url("https://static.ticket.sz-trip.com/uploads/20250924/e47d70fa4d99ac1804729b024cdf4d6a.png");
background-size: 100% 100%;
width: 100%;
height: 466.67rpx;
display: flex;
align-items: flex-end;
padding: 0 26rpx 50rpx;
/* justify-content: space-between; */
box-sizing: border-box;
}
.sale-type {
width: 160rpx;
height: 77.33rpx;
flex-shrink: 0;
font-weight: bold;
font-size: 28rpx;
color: #FE7429;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250924/12b88d55fac2e526445d101f90eb9e0b.png");
background-size: 100% 100%;
text-align: center;
line-height: 77rpx;
margin-right: 40rpx;
}
.sale-type.active {
font-weight: bold;
font-size: 28rpx;
color: #000000;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250924/5c0f204a31181920f5561f2cdc725559.png");
}
.search-fix{
height: 95rpx;
width: 100%;
border-radius: 20rpx 20rpx 0 0;
background: #F7F7F7;
position: relative;
z-index: 2;
margin-top: -30rpx;
box-sizing: border-box;
padding: 0 144rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 500;
font-size: 24rpx;
color: #000000;
}
.feiyi-picker{
display: flex;
align-items: center;
}
.trian-down{
margin-left: 13rpx;
width: 0;
height: 0;
/* 关键:左右边框宽度大于底部边框宽度,形成扁平效果 */
border-left: 14rpx solid transparent; /* 左宽 */
border-right: 14rpx solid transparent; /* 右宽 */
border-top: 10rpx solid #999; /* 高度(数值越小越扁) */
}
.prod-box{
background: #F7F7F7;
border-radius: 20rpx 20rpx 0 0;
padding-top: 33rpx;
}
.item {
background: #FFFFFF;
margin: 0rpx 27rpx 30rpx;
display: flex;
align-items: flex-start;
justify-content: space-between;
padding: 6rpx;
border-radius: 13rpx;
}
.item image {
width: 160rpx;
height: 160rpx;
background: #D1D7CB;
border-radius: 7rpx;
margin-right: 14rpx;
flex-shrink: 0;
}
.info {
flex: 1;
width: 1rpx;
min-height: 160rpx;
}
.info .title {
font-weight: bold;
font-size: 31rpx;
color: #000000;
margin-bottom: 20rpx;
}
.info .subtitle {
font-weight: 500;
font-size: 24rpx;
color: #999999;
}
.info .line{
width: 100%;
height: 1px;
background: #D8D8D8;
margin: 22rpx 0;
}
.prod-item{
font-weight: 500;
font-size: 24rpx;
color: #000000;
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.prod-item .hot{
width: 31rpx;
height: 31rpx;
background: linear-gradient(-30deg, #FF4000, #FF8D23);
border-radius: 7rpx;
font-weight: 500;
font-size: 23rpx;
color: #FFFFFF;
text-align: center;
line-height: 31rpx;
margin-right: 17rpx;
flex-shrink: 0;
}
.prod-item .price{
font-weight: bold;
font-size: 24rpx;
color: #D80000;
margin-right: 17rpx;
}

798
subPackages/foodNew/index.js

@ -0,0 +1,798 @@
// pages/info/roadInfo/index.js
let device = wx.getSystemInfoSync();
const ratio = device.windowWidth / 750;
import commonApi from "../../utils/https/common"
import QRCode from '../../utils/weapp-qrcode.js'
import {pagePoint, gotoDetail} from '../../utils/util'
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
autoPlay: false,
fixed: false,
type: 1,
top: 0,
isLike: 0,
info: null,
skuFlag: null,
producNum: 1,
skuIndex: 0,
aniSkuIndex: -1,
cartTop: 0,
cartImgInfo: null,
cartCount: 0,
shareImg: null,
showShareFlag: false,
showQrCode: false,
wxqrcode: null,
ZTPoint:'',
swiperCurrent: 0,
swiperRange: {
video: {min:0,max:0},
picture: {min:0,max:0},
sku: {min:0,max:0}
},
otherInfoShow: 0,
supplierInfo: null,
showShopInfo: false,
idIndex: 0,
lon: null,
lat: null,
scrollLeft: 0,
scrollDom: "",
scrollDomLeft:0,
windowWidth: 375,
prod_phone: "",
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
//删除临时存储的联系人
wx.removeStorageSync('linkMan')
let rect = wx.getMenuButtonBoundingClientRect(),
that = this;
let height = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
this.setData({top: height,id: options.id})
// 获取购物车按钮的位置
wx.createSelectorQuery().select('#cart').boundingClientRect(function (res) {
console.log(res)
that.setData({
cartTop: res.top
})
}).exec()
if (options.ZTPoint) {
this.setData({
ZTPoint: options.ZTPoint
})
}
wx.getLocation({
type: 'gcj02',
success: function (res) {
that.setData({lat:res.latitude,lon:res.longitude})
that.getShopInfo(options.id)
},
fail:function(){
that.getShopInfo(options.id)
}
})
const { windowWidth } = wx.getSystemInfoSync();
this.setData({ windowWidth });
console.log(windowWidth)
},
getShopInfo (id) {
commonApi._post("/supplier/get_supplier_products",
{supplier_id: id, lon: this.data.lon,lat: this.data.lat}
).then(res => {
if (res.code == 0) {
wx.showToast({title: res.msg,icon:'none'})
setTimeout(() => { wx.navigateBack()}, 1000);
return
} else {
// res.data.products = [...res.data.products,...res.data.products,...res.data.products,...res.data.products]
this.setData({ supplierInfo: res.data})
if (res.data.products.length>0) {
let id = res.data.products[0].id
this.getProductInfo(id)
}
}
})
},
changeProduct (e) {
let _this = this;
let index = e.currentTarget.dataset.index;
let prod = e.currentTarget.dataset.item;
this.setData({
idIndex: index
})
this.getProductInfo(prod.id)
let windowWidth = this.data.windowWidth;
let domId = e.currentTarget.id
wx.createSelectorQuery().select(`#${domId}`).boundingClientRect(rect => {
console.log(rect)
if (rect) {
let targetScrollLeft = rect.left + (rect.width / 2) - (windowWidth / 2)+_this.data.scrollLeft;
console.log((rect.width / 2) - (windowWidth / 2))
this.setData({
scrollLeft: targetScrollLeft||0,
scrollDomLeft: (rect.width / 2) - (windowWidth / 2),
});
this.setData({
scrollDom: domId,
})
}
}).exec()
},
getProductInfo (id) {
commonApi._post("product/get_product_detail", {id: id}).then(res => {
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0;
let resData = res.data
try {
resData.shipment_tag_arr = []
if (resData.shipment_tag) {
resData.shipment_tag_arr = resData.shipment_tag.split(',')
resData.shipment_tag_str = resData.shipment_tag_arr.join(' | ')
}
if (resData.service_tag) {
resData.service_tag_str = resData.service_tag.split(',').join(' | ')
}
if (resData.parameter_tag) {
resData.parameter_tag_str = resData.parameter_tag.split(',').join(' | ')
}
if (resData.supplier_headimg) {
resData.supplier_headimg = that.showImg(resData.supplier_headimg)
}
} catch(e) {}
// let swiperRange = this.data.swiperRange;
// swiperRange.video = resData.videourl? { min: 0, max: 0 } : { min: -1, max: -1 }
// swiperRange.picture = {min:swiperRange.video.max+1, max:swiperRange.video.max+1+resData.listimg.length-1}
// swiperRange.sku = {min:swiperRange.picture.max+1,max:swiperRange.picture.max+1+resData.sku.length-1}
this.setData({
info: resData,
// swiperRange: swiperRange,
shareImg: null,
prod_phone: resData.scene_tel
})
this.drawImg()
})
},
showImg (img) {
if (!img) { return img }
if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) {
return img;
} else {
// return "https://test.api.cloud.sz-trip.com"+img
return "https://static.ticket.sz-trip.com" + img;
}
},
BroswerRecord: function () {
setTimeout(() => {
if (app.globalData.uuid) {
commonApi._post('browse/browse_record', {
type: "goods",
title: this.data.info.title,
drive: "mini",
source_id: this.data.info.id,
url: "/pages/info/postProductInfo/index?id=" + this.data.info.id,
uuid: app.globalData.uuid
}).then(res => {})
} else {
this.BroswerRecord();
}
}, 500)
},
onPageScroll: function (e) {
let that = this,
height = this.data.top;
let topHeight = height;
wx.createSelectorQuery().select('#menus').boundingClientRect(function (rect) {
console.log(rect,height, e.scrollTop)
if (rect.top < topHeight) {
// 此时应该把menus固定在顶部
that.setData({ fixed: true})
}
if (e.scrollTop<100) {
that.setData({fixed: false})
}
}).exec()
},
showCart: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能加购',
icon: 'none'
})
return;
}
this.setData({
skuFlag: "cart"
})
let that = this
wx.createSelectorQuery().select('#skuImg').boundingClientRect(function (res) {
console.log(res)
that.setData({
cartImgInfo: 'top:' + res.top + 'px;left:' + res.left + 'px;'
})
}).exec()
}
})
},
hideSku: function () {
this.setData({
skuFlag: null,
cartImgInfo: null
})
},
minus: function () {
if (this.data.producNum == 1) return;
this.setData({
producNum: this.data.producNum - 1
})
},
add: function () {
this.setData({
producNum: this.data.producNum + 1
})
},
selectSku: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
skuIndex: index,
swiperCurrent: index+this.data.swiperRange.picture.max+1
})
},
showOrder: function () {
commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
title: this.data.info.title,
type: 'mini'
}).then(res => {
if (res.data.subscribe == 0) {
this.setData({
wxqrcode: res.data.qrcode,
showQrCode: true
})
} else {
if (this.data.info.sku.length == 0) {
wx.showToast({
title: '该产品未设置规格,不能购买',
icon: 'none'
})
return;
}
let swiperCurrent = this.data.swiperCurrent;
let skuIndex = swiperCurrent - this.data.swiperRange.sku.min
console.log(swiperCurrent, skuIndex)
if (skuIndex<0) {skuIndex=0}
this.setData({
skuFlag: 'order',
skuIndex: skuIndex,
swiperCurrent: skuIndex+this.data.swiperRange.picture.max+1
})
}
})
},
order: function (e) {
let skuFlag = e.currentTarget.dataset.type
app.globalData.postProduct = []
app.globalData.list = []
commonApi.user_post("/product/checkStock", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
}).then(res => {
if (res && res.code != 1) {
return;
} else {
if (skuFlag == 'order') {
pagePoint({
event: 'product_order',
param: {
id: this.data.info.id,
type: this.data.info.type
}
}, 1)
wx.setStorageSync('login_from', 'product_order_login')
wx.setStorageSync('order_from', 'product_order_submit')
app.globalData.couponInfo = null;
// 购买
let product = [{
product: {...this.data.info,ZTPoint:this.data.ZTPoint},
sku: this.data.info.sku[this.data.skuIndex],
productNum: this.data.producNum
}];
app.globalData.listName = null
app.globalData.product = product[0];
wx.navigateTo({
url: '/pages/order/food/index',
})
} else {
let tag_id = this.data.info.tag_id,type = ''
if (tag_id.includes(20) || tag_id.includes(19)) { //文创
type = '1'
}else if (tag_id.includes(5)) { //非遗
type = '2'
}else {
type = ''
}
commonApi.user_post("cart/add_sku", {
sku_id: this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum,
type:type
}).then(res => {
if (res.code == 1) {
commonApi.user_post('cart/get_list', {}).then(res => {
this.setData({
cartCount: res.data.length
})
})
// 加动效
this.setData({
skuFlag: null,
aniSkuIndex: this.data.skuIndex,
cartImgInfo: null
})
setTimeout(() => {
this.setData({
aniSkuIndex: -1
})
wx.showModal({
title: "提示",
content: "去购物车结算?",
success: function (res) {
if (res.confirm) {
wx.navigateTo({
url: '/pages/user/cartlist/list',
})
}
}
})
}, 650)
}
})
}
}
})
},
// 分享
share: function () {
if (!wx.getStorageSync("jstrip_token")) {
pagePoint({
event: 'product_share_login',
type: this.data.info.type,
id: this.data.info.id
}, 1)
commonApi.user_post("user/getMyInfo", {}).then(res => {
})
return;
}
if (!this.data.shareImg) {
wx.showToast({
title: '图片生成中,稍后再试',
icon: 'none'
})
return;
}
this.setData({
showShareFlag: !this.data.showShareFlag
})
},
// 保存
save() {
let url = this.data.shareImg,
that = this;
wx.authorize({
/* 这个就是保存相册的 */
scope: 'scope.writePhotosAlbum',
success() {
wx.saveImageToPhotosAlbum({
filePath: url,
success(res) {
wx.showToast({
title: '保存成功',
icon: "success"
})
that.setData({
showShareFlag: !this.data.showShareFlag
})
pagePoint({
event: 'product_share_save',
type: that.data.info.type,
id: that.data.info.id
}, 1)
},
fail(res) {
wx.showToast({
title: '保存失败',
icon: 'none'
})
}
})
},
complete(res) {
console.log(res);
/* 这里判断一下如果没有授权重新打开设置选项 */
wx.getSetting({
success(res) {
if (!res.authSetting['scope.writePhotosAlbum']) {
/* 打开设置的方法 */
// opensit();
wx.showToast({
title: '请打开权限后再试',
icon: 'none'
})
}
}
});
}
});
},
pagePoint: function (e) {
pagePoint(e)
},
// 绘制海报
drawImg: function () {
var that = this,
userinfo = wx.getStorageSync('jstrip_userInfo');
if (!userinfo) {
// 去登录
return false;
}
const ctx = wx.createCanvasContext('imageCanvas');
// const device = wx.getSystemInfoSync();
// const ratio = device.screenWidth / 750;
// 先获取到图片信息
let promise2 = new Promise(function (resolve, reject) {
wx.getImageInfo({
src: that.data.info.headimg,
success: function (res) {
resolve(res);
},
fail: function (res) {
reject(res);
}
})
})
let promise3 = new Promise(function (resolve, reject) {
let userid = wx.getStorageSync('jstrip_userid')
new QRCode('myQrcode', {
text: 'https://m.cloud.sz-trip.com/FoodShopDetail?id=' + that.data.info.id + '&sharedUserId=' + userid + '&channel=-1',
width: 500,
height: 500,
padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
callback: (res) => {
resolve(res);
}
})
})
//成功得到图片信息后,开始绘图
Promise.all([promise2, promise3]).then(imgs => {
ctx.save();
ctx.beginPath(); //开始绘制
that.handleBorderRect(ctx, 0, 0, 551 * ratio, 407 * ratio, 25 * ratio, '#ccc')
ctx.clip(); //画好了圆 剪切 原始画布中剪切任意形状和尺寸。一旦剪切了某个区域,则所有之后的绘图都会被限制在被剪切的区域内 这也是我们要save上下文的原因
ctx.drawImage(imgs[0].path, 0, 0, 551 * ratio, 407 * ratio);
ctx.restore();
ctx.save();
that.handleBorderRect2(ctx, 0, 407 * ratio, 551 * ratio, 236 * ratio, 25 * ratio, '#fff')
ctx.restore();
// 绘制二维码
ctx.drawImage(imgs[1].path, 373 * ratio, 495 * ratio, 137 * ratio, 137 * ratio);
// 开始文字绘制
ctx.setFillStyle("#000");
ctx.setFontSize(30 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
that.drawText(ctx, that.data.info.title, 25 * ratio, 450 * ratio, 480 * ratio, ratio);
// 售价
ctx.setFillStyle("#D62828");
ctx.setFontSize(40 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let price = "¥" + (that.data.info.price / 100);
let width = ctx.measureText(price).width;
ctx.fillText(price, 25 * ratio, 620 * ratio);
// 副标题
ctx.setFillStyle("#999999");
ctx.setFontSize(28 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let subtitle = that.data.info.subtitle;
if (that.data.info.subtitle.length > 10) {
subtitle = that.data.info.subtitle.substr(0, 10) + '...'
}
ctx.fillText(subtitle, 25 * ratio, 540 * ratio);
// ctx.draw();
// 划线价
ctx.setFillStyle("#999999");
ctx.setFontSize(32 * ratio); //字大小
ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
let market_price = "¥" + (that.data.info.market_price / 100)
ctx.fillText(market_price, 40 * ratio + width, 620 * ratio);
let market_price_width = ctx.measureText(market_price).width;
// 划线
ctx.beginPath()
ctx.setLineWidth(1)
ctx.moveTo(40 * ratio + width, 608 * ratio)
ctx.lineTo(45 * ratio + width + market_price_width, 608 * ratio)
ctx.stroke();
// 长按识别二维码
// ctx.setFillStyle("#666");
// ctx.setFontSize(22 * ratio); //字大小
// ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
// ctx.fillText("长按识别二维码", 404*ratio, 710*ratio);
// 长按图片转发或保存
// ctx.setFillStyle("#000");
// ctx.setFontSize(24 * ratio); //字大小
// ctx.setTextAlign('left'); //是否居中显示,参考点画布中线
// ctx.fillText("长按图片保存到本地",(592*ratio - ctx.measureText("长按图片保存到本地").width)/2, 740*ratio);
ctx.draw();
// 转为图片
setTimeout(() => {
wx.canvasToTempFilePath({
x: 0,
y: 0,
canvasId: 'imageCanvas',
success: function (res) {
that.setData({
shareImg: res.tempFilePath
})
},
fail(err) {
console.log('agdgjgdajhg', err)
}
})
}, 500)
return false;
}).catch(err => {
console.log("this err", err)
})
},
// 圆角矩形
handleBorderRect(ctx, x, y, w, h, r, color) {
ctx.beginPath();
ctx.moveTo(x + w, y + h);
ctx.lineTo(x, y + h)
// 左上角
ctx.arc(x + r, y + r, r, Math.PI, 1.5 * Math.PI);
ctx.moveTo(x + r, y);
ctx.lineTo(x + w - r, y);
ctx.lineTo(x + w, y + r);
// 右上角
ctx.arc(x + w - r, y + r, r, 1.5 * Math.PI, 2 * Math.PI);
ctx.lineTo(x + w, y + h);
ctx.lineTo(x + w - r, y + h);
ctx.fillStyle = color;
ctx.fill();
ctx.closePath();
},
handleBorderRect2(ctx, x, y, w, h, r, color) {
ctx.beginPath();
ctx.moveTo(x, y);
ctx.lineTo(x + w, y)
// 右下角
ctx.arc(x + w - r, y + h - r, r, 0, 0.5 * Math.PI);
ctx.lineTo(x + r, y + h);
ctx.lineTo(x, y + h - r);
// 左下角
ctx.arc(x + r, y + h - r, r, 0.5 * Math.PI, Math.PI);
ctx.lineTo(x, y);
ctx.lineTo(x, y);
ctx.fillStyle = color;
ctx.fill();
ctx.closePath();
},
// 绘制两行文字
drawText: function (ctx, str, x, y, canvasWidth, ratio) {
let row = [],
temp = "",
chr = str.split("");
for (var a = 0; a < chr.length; a++) {
if (ctx.measureText(temp).width < canvasWidth) {
temp += chr[a];
} else {
a--; //这里添加了a-- 是为了防止字符丢失,效果图中有对比
row.push(temp);
temp = "";
}
}
row.push(temp);
//如果数组长度大于2 则截取前两个
if (row.length > 2) {
var rowCut = row.slice(0, 2);
var rowPart = rowCut[1];
var test = "";
var empty = [];
for (var a = 0; a < rowPart.length; a++) {
if (ctx.measureText(test).width < canvasWidth - 30 * ratio) {
test += rowPart[a];
} else {
break;
}
}
empty.push(test);
var group = empty[0] + "..." //这里只显示两行,超出的用...表示
rowCut.splice(1, 1, group);
row = rowCut;
}
for (var b = 0; b < row.length; b++) {
ctx.fillText(row[b], x, y + b * 40 * ratio, canvasWidth);
}
},
gotoDetail: function (e) {
let item = e.currentTarget.dataset.item;
pagePoint({
event: 'recommend_click',
param: {
id: item.id,
type: item.type
}
}, 1)
if (item.type == 'travels') {
// 游记做特殊处理 其他都按照原来的来
wx.navigateTo({
url: '/pages/info/strategyInfo/index?id=' + item.s_id,
})
} else {
gotoDetail(item);
}
},
gotolocation: function () {
let info = this.data.supplierInfo;
wx.openLocation({
latitude: Number(info.lat),
longitude: Number(info.lon),
name:info.shop_name,
address:info.address
})
},
callPhone :function () {
wx.makePhoneCall({
phoneNumber: this.data.prod_phone,
})
},
viewImg:function(e){
let item = e.currentTarget.dataset.item;
if (item.img_list.length>0) {
wx.previewImage({
urls: item.img_list
})
}
},
swiperChange (e) {
if(e.detail.source == "touch") {
let index = e.detail.current
this.setData({
swiperCurrent: index
})
}
console.log(e, this.data.swiperCurrent)
},
changeSwiperCurrent (e) {
let index = e.currentTarget.dataset.index
this.setData({
swiperCurrent: index
})
},
changeSimpleVal (e) {
let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val;
let param = {}
param[keyname] = val
this.setData(param)
console.log(this.data)
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
app.globalData.postProduct = []
if (!wx.getStorageSync('jstrip_token')) {
return;
}
commonApi.user_post('cart/get_count', {noLogin: true}).then(res => {
this.setData({
cartCount: res.data //1
})
})
},
playVideo() {
// 播放视频需要把autoplay暂停
this.setData({
autoPlay: false
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

6
subPackages/foodNew/index.json

@ -0,0 +1,6 @@
{
"usingComponents": {
"title":"/pages/component/TitleHeader",
"code":"/pages/order/components/wxqrCode/index"
}
}

290
subPackages/foodNew/index.wxml

@ -0,0 +1,290 @@
<!--pages/info/hotelProductInfo/index.wxml-->
<wxs src="../../utils/filter.wxs" module="tool" />
<title title="产品详情"></title>
<view class="shop-info" bindtap="changeSimpleVal" data-keyname="showShopInfo" data-val="{{true}}">
<image class="supplier-headImg" src="{{supplierInfo.headimg}}" mode="aspectFill"></image>
<view class="content">
<view style="display: flex;align-items: flex-start;">
<view class="shop-title shop-com-width textOver2">{{supplierInfo.shop_name}}</view>
<image style="height: 25rpx;margin: 10rpx 68rpx 0 13rpx;" mode="heightFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/postDetail/rightIcon.png"></image>
<image wx:if="{{prod_phone}}" class="icon-phone" catch:tap="callPhone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
</view>
<view class="address" style="display: flex;align-items: center;justify-content: space-between;">
<view class="shop-com-width textOver" style="padding-right: 98rpx;">{{supplierInfo.address}}</view>
<image class="icon-phone" catch:tap="gotolocation" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
</view>
</view>
</view>
<view style="height: 20rpx;width: 100%;background: #F7F7F7;"></view>
<scroll-view scroll-x scroll-with-animation enable-flex id="menus"
scroll-into-view="{{scrollDom}}" scroll-into-view-offset="{{scrollDomLeft}}"
class="scroll-menus{{fixed?' fixed-menus':''}}" style="top:{{top}}px" wx:if="{{supplierInfo&&supplierInfo.products.length>0}}">
<view id="scrollView{{index}}" class="scroll-menu-item {{idIndex==index?'active':''}}"
wx:for="{{supplierInfo.products}}" data-item="{{item}}" data-index="{{index}}"
bind:tap="changeProduct">
{{item.subtitle}}
</view>
</scroll-view>
<!-- <view class="share-icon" bindtap="share"></view> -->
<image lazy-load wx:for="{{info.sku}}" style="{{aniSkuIndex==index?('top:'+cartTop+'px;'):('top:'+top+'px;'+cartImgInfo)}}" class="headimg{{aniSkuIndex==index?' active':''}}" src="{{info.headimg}}" mode="aspectFill"></image>
<view style="position: relative;">
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}"
interval="{{2000}}" duration="{{300}}" bindchange="swiperChange">
<block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
<!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> -->
</swiper-item>
</block>
<block wx:for="{{info.listimg}}" wx:key="*this">
<swiper-item>
<image lazy-load src="{{item}}" mode="aspectFill"></image>
</swiper-item>
</block>
<block wx:for="{{info.sku}}" wx:key="*this">
<swiper-item style="position: relative;">
<image lazy-load src="{{item.headimg}}" mode="aspectFill"></image>
<view class="sku-tips ">
<view class="textOver">{{item.sku_name}}</view>
</view>
</swiper-item>
</block>
</swiper>
<view class="swiper-bottom" wx:if="{{info}}">
<!-- <view class="swuper-bottom-bg">
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}"
wx:if="{{info.videourl}}" bind:tap="changeSwiperCurrent" data-index="{{0}}">视频</view>
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.picture.min&&swiperCurrent<=swiperRange.picture.max)?'active':''}}"
bind:tap="changeSwiperCurrent" data-index="{{swiperRange.picture.min}}">图片</view>
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.sku.min&&swiperCurrent<=swiperRange.sku.max)?'active':''}}"
bind:tap="changeSwiperCurrent" data-index="{{swiperRange.sku.min}}">款式</view>
</view> -->
<view class="swiper-bottom-item bottom-number active">{{swiperCurrent+1}}/{{swiperRange.sku.max+1}}</view>
</view>
</view>
<view wx:if="{{info}}">
<view class="top-info" style="padding: 0;" >
<view class="wineScene-price-container" >
<view class="wineSecne-price">{{info.price/100}}<text class="wineSecne-money">优惠前¥{{info.market_price/100}}</text></view>
<view>已售{{info.sales_number>1000?"1000+":(info.sales_number||0)}}</view>
</view>
<view style="padding: 20rpx 20rpx 20rpx 26rpx;">
<view class="title textOver2"><text class="hot-font">热</text>{{info.title}}</view>
<view class="tags-box textOver" wx:if="{{info.subtitle}}">
<view class="tag textOver" >{{info.subtitle}}</view>
</view>
<view class="other-info-box" >
<view class="other-info-item" style="align-items: flex-start;"bindtap="changeSimpleVal"
data-keyname="otherInfoShow" data-val="{{1}}" wx:if="{{info.shipment_tag}}">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/50f3e2316c3f3cc906fe4c78f127e960.png"></image>
<view class="other-content textOver" >{{info.shipment_tag_str}}</view>
<!-- <view style="margin-top: 6rpx;" class="view-arrow">></view> -->
</view>
<view class="other-info-item" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{2}}"
wx:if="{{info.service_tag_str}}">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/ce4323d9bcdf2ff03a0985ae4cbdabbe.png"></image>
<view class="other-content textOver">{{info.service_tag_str}}</view>
<!-- <view class="view-arrow">></view> -->
</view>
<view class="other-info-item" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{3}}"
wx:if="{{info.parameter_tag_str}}">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250925/958d9a3ed9404790ba5d17548e20fee8.png"></image>
<view class="other-content textOver">{{info.parameter_tag_str}}</view>
<!-- <view class="view-arrow">></view> -->
</view>
</view>
</view>
</view>
</view>
<view class="scroll-all-box" wx:if="{{info}}">
<view class="info-box" id="box1">
<view class="info-title">套餐详情</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.content)}}"></rich-text>
</view>
<view style="height: 20rpx;width: 100%;background: #F7F7F7;"></view>
<!-- <view class="info-box" id="box2">
<view class="info-title">费用说明</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.expense_info)}}"></rich-text>
</view> -->
<view class="info-box" id="box3">
<view class="info-title">购买须知</view>
<rich-text class="details" nodes="{{tool.formateRichText(info.book_info)}}"></rich-text>
</view>
</view>
<view style="height:140rpx"></view>
<view class="fixed-bottom">
<view class="['left-img',{{!iShop?'no-shop':''}}]">
<navigator url="/pages/user/service/index" catchtap="pagePoint" data-event='product_customservice' class="kefu-box">
<view class="iconfont icon-kefu"></view>
<view>客服</view>
</navigator>
<view class="kefu-box"></view>
</view>
<view class="btns">
<view class="btn" bindtap="order">加入购物车</view>
<view class="btn" bindtap="order" data-type="order" wx:if="{{info && info.flag==1}}" >立即购买</view>
<view class="btn disable" wx:elif="{{info}}" style="border-radius: 39rpx;">该商品已下架</view>
</view>
</view>
<!-- 购物车悬浮框 -->
<navigator url="/pages/user/cartlist/list" catchtap="pagePoint" data-event='product_cart_click' class="cart-box" id="cart">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/cart.png" mode="widthFix"></image>
<view class="cart-num">{{cartCount}}</view>
</navigator>
<view class="mask" wx:if="{{skuFlag}}">
<view class="mask-bg" bindtap="hideSku"></view>
<view class="mask-content">
<view class="iconfont icon-close" bindtap="hideSku"></view>
<view class="sku-info-box">
<image lazy-load id="skuImg" src="{{info.sku[skuIndex].headimg}}" mode="aspectFill"></image>
<view class="sku-info">
<view>
<view class="sku-price">{{info.sku[skuIndex].price/100}}
</view>
<view class="sku-name">已选择:{{info.sku[skuIndex].sku_name}}</view>
</view>
<view style="display: flex;align-items: center;">
<view class="number-box">
<view class="iconfont icon-sami-select" bindtap="minus"></view>
<view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view>
</view>
<view class="limit-number" wx:if="{{info.sku[skuIndex].sku_model.traveller_limit_num>0}}">限购{{info.sku[skuIndex].sku_model.traveller_limit_num}}件</view>
</view>
</view>
</view>
<view style="font-weight: bold;font-size: 33rpx;color: #060001;margin:0rpx 25rpx 27rpx">产品分类({{info.sku.length}})</view>
<view class="sku-names">
<view bindtap="selectSku" data-index="{{index}}" class="sku-name-item {{index==skuIndex?' active':''}}"
wx:for="{{info.sku}}">
<image lazy-load src="{{item.headimg}}"></image>
<view class="sku-name textOver2">{{item.sku_name}}</view>
</view>
</view>
<view style="height:138rpx"></view>
<view class="btn-box">
<view class="mask-btn" bindtap="order" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'确认':'立即购买'}}
</view>
<view class="mask-btn disable" wx:else>该商品已下架</view>
</view>
</view>
</view>
<view style="position:absolute;right:0;left:-10000rpx;top:-20000rpx;z-index:-1">
<canvas canvas-id='imageCanvas' class='imageCanvas' style="width:551rpx;height:643rpx;" disable-scroll='true'>
</canvas>
<canvas class="canvasCode" style="opacity:0;width:500px;height:500px" canvas-id="myQrcode"></canvas>
</view>
<view class="mask" wx:if="{{showShareFlag}}" style="align-items: center;">
<view class="mask-bg" bindtap="share"></view>
<view class="mask-content share-img-box">
<image lazy-load class="share-img" src="{{shareImg}}" mode="widthFix"></image>
<view class="share-tips">
<view style="position:relative">
<image lazy-load class="img" src="https://static.ticket.sz-trip.com/xcxImages/info/img.png" mode="widthFix">
</image>
<view>保存图片到相册</view>
<view class="tipimg">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/ok.png" mode="widthFix"></image>
</view>
</view>
<image lazy-load style="width:36rpx" src="https://static.ticket.sz-trip.com/xcxImages/info/arrow2.png" mode="widthFix"></image>
<view style="position:relative">
<image lazy-load class="img" src="https://static.ticket.sz-trip.com/xcxImages/info/code.png" mode="widthFix">
</image>
<view>微信识别二维码</view>
<view class="tipimg">
<image lazy-load src="https://static.ticket.sz-trip.com/xcxImages/info/ok1.png" mode="widthFix"></image>
</view>
</view>
</view>
<view class="save-btn" bindtap="save">保存到相册</view>
</view>
</view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>
<!-- <view class="mask" wx:if="{{otherInfoShow>0}}"> -->
<view class="mask" wx:if="{{false}}">
<view class="mask-bg" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}"></view>
<view class="mask-content">
<view class="iconfont icon-close" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}"></view>
<view class="other-info-content">
<view class="title">{{otherInfoShow==3?"产品参数":otherInfoShow==2?"服务说明":"发货说明"}}</view>
<view wx:if="{{otherInfoShow==1}}">
<rich-text class="details" nodes="{{tool.formateRichText(info.shipment_info)}}"></rich-text>
</view>
<view wx:if="{{otherInfoShow==2}}">
<rich-text class="details" nodes="{{tool.formateRichText(info.service_info)}}"></rich-text>
</view>
<view wx:if="{{otherInfoShow==3}}">
<rich-text class="details" nodes="{{tool.formateRichText(info.parameter_info)}}"></rich-text>
</view>
</view>
<view style="height:138rpx"></view>
<view class="btn-box">
<view class="mask-btn" bindtap="changeSimpleVal" data-keyname="otherInfoShow" data-val="{{0}}">确定</view>
</view>
</view>
</view>
<!-- 店铺信息 -->
<view class="mask" wx:if="{{showShopInfo}}">
<view class="mask-bg" bindtap="changeSimpleVal" data-keyname="showShopInfo" data-val="{{false}}"></view>
<view class="mask-content supplier-mask">
<view class="iconfont icon-close" bindtap="changeSimpleVal" data-keyname="showShopInfo" data-val="{{false}}"></view>
<view class="supplier-mask-header">商家信息</view>
<view class="mask-shop-info">
<view>{{supplierInfo.shop_name}}</view>
<view class="shop-info-item">
<image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/time.png"></image>
<view>
<view>营业时间</view>
<view class="subtitle">{{supplierInfo.business_hours}}</view>
</view>
</view>
<view class="shop-info-item" style="justify-content: space-between;">
<image class="start-icon" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/food/time.png"></image>
<view style="flex: 1;width: 100rpx;">
<view>{{supplierInfo.address}}</view>
<view class="subtitle" wx:if="{{supplierInfo.distance}}">据您约{{supplierInfo.distance}}km</view>
</view>
<image class="icon-phone" catch:tap="callPhone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
<image class="icon-phone" catch:tap="gotolocation" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
</view>
</view>
<view style="height: 20rpx;width: 100%;background: #F7F7F7;"></view>
<view class="supplier-mask-header">商家介绍</view>
<rich-text style="padding: 0 28rpx;" class="details" nodes="{{tool.formateRichText(supplierInfo.content)}}"></rich-text >
<view style="width: 100%;height: 20rpx;"></view>
</view>
</view>

1374
subPackages/foodNew/index.wxss

File diff suppressed because it is too large

7
subPackages/gwcOrder/index.js

@ -57,7 +57,7 @@ Page({
ticket_type:app.globalData.product.sku.ticket_type || 1, ticket_type:app.globalData.product.sku.ticket_type || 1,
isCar:options.isCar, isCar:options.isCar,
is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard, is_need_idcard:app.globalData.product.sku.sku_model.is_need_idcard,
is_authentication:app.globalData.product.sku.sku_model.is_authentication, is_authentication:app.globalData.product.sku.sku_model.is_authentication || 0,
is_real_name:app.globalData.product.sku.sku_model.is_real_name, is_real_name:app.globalData.product.sku.sku_model.is_real_name,
}) })
console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard); console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard);
@ -396,6 +396,9 @@ Page({
remark: remark, remark: remark,
product_num: app.globalData.product.isGroup == 1 ? 1 : productNum, product_num: app.globalData.product.isGroup == 1 ? 1 : productNum,
phone:this.data.phone,// 不实名的时候传的手机号参数 phone:this.data.phone,// 不实名的时候传的手机号参数
// 美食类型
reserve_mobile: product.product.type=='food'?this.data.phone:"",
}], }],
originate_order_id: this.data.kjId, originate_order_id: this.data.kjId,
gp_id: app.globalData.gp_id, gp_id: app.globalData.gp_id,
@ -427,7 +430,7 @@ Page({
if(app.globalData.list){ if(app.globalData.list){
app.globalData.list[app.globalData.index] = this.data.product app.globalData.list[app.globalData.index] = this.data.product
// app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList // app.globalData.list[app.globalData.index].linkmanList = this.data.linkmanList
if (app.globalData.list[app.globalData.index].sku.sku_model.is_authentication == 0) { if (!app.globalData.list[app.globalData.index].sku.sku_model.is_authentication) {
app.globalData.list[app.globalData.index].phone = this.data.phone app.globalData.list[app.globalData.index].phone = this.data.phone
app.globalData.list[app.globalData.index].linkmanList = [] app.globalData.list[app.globalData.index].linkmanList = []
}else { }else {

7
subPackages/gwcOrder/index.wxml

@ -15,13 +15,14 @@
</view> </view>
<view class="box"> <view class="box">
<view class="box-title"> <view class="box-title">
<view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view> <view style="flex:1">{{product && product.isGroup!=1?'数量':'预约人数'}}</view>
<view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="minus"></view> <view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="minus"></view>
<view class="number-box">{{productNum}}</view> <view class="number-box">{{productNum}}</view>
<view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="add"></view> <view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity' && !product.sku.is_compose}}" bindtap="add"></view>
</view> </view>
</view> </view>
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}" is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact> <contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman" productNum="{{productNum}}"
is_authentication="{{is_authentication}}" is_real_name="{{is_real_name}}"></contact>
<!-- 补贴 --> <!-- 补贴 -->
<view class="box"> <view class="box">
<view class="box-title allowance" wx:if="{{allowance_price}}"> <view class="box-title allowance" wx:if="{{allowance_price}}">
@ -63,7 +64,7 @@
<view class="mask-content1"> <view class="mask-content1">
<view class="dialog-top"> <view class="dialog-top">
<view class="scene-title">{{product.product.title}}-{{product.sku.sku_name}}</view> <view class="scene-title">{{product.product.title}}-{{product.sku.sku_name}}</view>
<view class="people-message">出行人信息</view> <view class="people-message">{{product.product.type=="food"?'预定人信息':'出行人信息'}}</view>
<view style="max-height:430rpx;overflow: scroll;" wx:if="{{is_authentication=='1'}}"> <view style="max-height:430rpx;overflow: scroll;" wx:if="{{is_authentication=='1'}}">
<view class="people" wx:for="{{linkmanList}}"> <view class="people" wx:for="{{linkmanList}}">
<view class="flex"> <view class="flex">

40
utils/filter.wxs

@ -1,19 +1,45 @@
var formateRichText = function(str) { var formateRichText = function(str) {
if (!str) { if (!str) {
return ""; return ""; // 正确:函数内部的return
} }
// 处理img标签
var reg = getRegExp("<img", "g"); var reg = getRegExp("<img", "g");
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'") str = str.replace(reg, '<img class="sz-xcx-fwb-img" style="width:100%!important;height:auto!important;"');
reg = getRegExp("<IMG", "g"); reg = getRegExp("<IMG", "g");
str = str.replace(reg, "<img class='sz-xcx-fwb-img' width='100%'") str = str.replace(reg, '<img class="sz-xcx-fwb-img" style="width:100%!important;height:auto!important;"');
// 移除width和height属性
reg = getRegExp('width="[^"]*"', "gi");
str = str.replace(reg, "");
reg = getRegExp('height="[^"]*"', "gi");
str = str.replace(reg, "");
// 清除style中的宽高样式
reg = getRegExp('width:[^;]+;', "gi");
str = str.replace(reg, "");
reg = getRegExp('height:[^;]+;', "gi");
str = str.replace(reg, "");
reg = getRegExp('width:[^;]+', "gi");
str = str.replace(reg, "");
reg = getRegExp('height:[^;]+', "gi");
str = str.replace(reg, "");
// 处理其他标签
reg = getRegExp("&nbsp;", "g"); reg = getRegExp("&nbsp;", "g");
str = str.replace(reg, '<span style="width: 8rpx;display: inline-block;"></span>') str = str.replace(reg, '<span style="width: 8rpx;display: inline-block;"></span>');
reg = getRegExp("section", "g"); reg = getRegExp("section", "g");
str = str.replace(reg, 'div'); str = str.replace(reg, "div");
reg = getRegExp("↵", "g"); reg = getRegExp("↵", "g");
str = str.replace(reg, '<br />'); str = str.replace(reg, "<br />");
return str; return str;
} };
var gotoUrl = function(item){ var gotoUrl = function(item){
var str = "/pages/info/" var str = "/pages/info/"
if(item.frontShowModel=='multisku'){ if(item.frontShowModel=='multisku'){

55
utils/util.js

@ -172,7 +172,7 @@ const checkLocation = function(){
}) })
}) })
} }
const gotoDetail = (item,isPagePoint) =>{ const gotoDetail = (item,isPagePoint,queryStr="") =>{
wx.removeStorageSync('prizeId'); wx.removeStorageSync('prizeId');
let pagePointData = { let pagePointData = {
param: { param: {
@ -183,7 +183,7 @@ const gotoDetail = (item,isPagePoint) =>{
// 组合产品 跳线路 // 组合产品 跳线路
if (item.compose_product_id) { if (item.compose_product_id) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/roadInfo/index?id='+item.compose_product_id url: '/pages/info/roadInfo/index?id='+item.compose_product_id+queryStr
}) })
return return
} }
@ -191,12 +191,12 @@ const gotoDetail = (item,isPagePoint) =>{
if (item.is_package === 1) { if (item.is_package === 1) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/postProductInfo/index?id='+item.id, url: '/pages/info/postProductInfo/index?id='+item.id+queryStr,
}) })
return return
}else if (item.is_package==2) { }else if (item.is_package==2) {
wx.navigateTo({ wx.navigateTo({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id+queryStr
}); });
return return
} }
@ -207,7 +207,7 @@ const gotoDetail = (item,isPagePoint) =>{
case "tenscenic": case "tenscenic":
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/foodInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/foodInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
case "ticket": case "ticket":
@ -217,7 +217,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
case "hotel": case "hotel":
@ -227,7 +227,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
case "post": case "post":
@ -240,11 +240,11 @@ const gotoDetail = (item,isPagePoint) =>{
try { try {
if (item.iShop) { if (item.iShop) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/postProductInfo/index?id='+item.id+'&iShop='+item.iShop+'&supplierId='+item.supplierId url: '/pages/info/postProductInfo/index?id='+item.id+'&iShop='+item.iShop+'&supplierId='+item.supplierId+queryStr
}) })
}else{ }else{
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/postProductInfo/index?id='+item.id url: '/pages/info/postProductInfo/index?id='+item.id+queryStr
}) })
} }
} catch (error) { } catch (error) {
@ -260,7 +260,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/roadInfo/index?id='+item.id url: '/pages/info/roadInfo/index?id='+item.id+queryStr
}) })
break; break;
case "coupon": case "coupon":
@ -271,7 +271,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/cardInfo/index?id='+item.id url: '/pages/info/cardInfo/index?id='+item.id+queryStr
}) })
break; break;
case "show": case "show":
@ -282,24 +282,30 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/showInfo/index?id='+item.id url: '/pages/info/showInfo/index?id='+item.id+queryStr
}) })
break; break;
case "food": case "food":
// 产品 美食 // 产品 美食
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/foodProductInfo/index?id='+item.id url: '/pages/info/foodProductInfo/index?id='+item.id+queryStr
}) })
break; break;
case "activity": case "activity":
// 活动 // 活动
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/activityInfo/index?id='+(item.act_calendar_id || item.id) url: '/pages/info/activityInfo/index?id='+(item.act_calendar_id || item.id)+queryStr
})
break;
case "act_calendar":
// 活动
wx.navigateTo({
url: '/pages/info/activityInfo/index?id='+(item.act_calendar_id || item.id)+queryStr
}) })
break; break;
case "movie": case "movie":
// 产品 电影票 // 产品 电影票
let tempUrl = 'https://m.cloud.sz-trip.com'+`/MovieInfo?id=${item.third_id || item.id}`+'&title='+item.title let tempUrl = 'https://m.cloud.sz-trip.com'+`/MovieInfo?id=${item.third_id || item.id}`+'&title='+item.title+queryStr
wx.navigateTo({ wx.navigateTo({
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl), url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
// url: '/pages/list/movieticket/list/info/index?id='+(item.third_id || item.id)+'&title='+item.title // url: '/pages/list/movieticket/list/info/index?id='+(item.third_id || item.id)+'&title='+item.title
@ -308,7 +314,7 @@ const gotoDetail = (item,isPagePoint) =>{
case "cinema": case "cinema":
// 产品 电影票 // 产品 电影票
wx.navigateTo({ wx.navigateTo({
url: '/pages/list/movieticket/list/cinema/index?id='+item.third_id+'&title='+item.title url: '/pages/list/movieticket/list/cinema/index?id='+item.third_id+'&title='+item.title+queryStr
}) })
break; break;
case "scenic": case "scenic":
@ -318,7 +324,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/sceneProductInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
case "room": case "room":
@ -328,7 +334,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/hotelProductInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
case "venue": case "venue":
@ -338,7 +344,7 @@ const gotoDetail = (item,isPagePoint) =>{
pagePoint(pagePointData,1) pagePoint(pagePointData,1)
} }
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/museumInfo/index?id='+(item.scene_id || item.id) url: '/pages/info/museumInfo/index?id='+(item.scene_id || item.id)+queryStr
}) })
break; break;
} }
@ -386,12 +392,21 @@ const orderMoreTime = function(item){
} }
} }
const gotoOrder = function(item){ const gotoOrder = function(item){
// 数量超过两个 购物车下单 跳H5 (小程序二维码没分开)
if (item.order_product_list.length>1) {
wx.navigateTo({
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent("https://m.cloud.sz-trip.com/TicketCartOrderDetail?order_id="+item.order_id),
})
return;
}
if(item.order_product_list[0].product_model=='ticket'){ if(item.order_product_list[0].product_model=='ticket'){
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/order/sceneOrderInfo/index?id='+item.order_id, url: '/pages/user/order/sceneOrderInfo/index?id='+item.order_id,
}) })
return; return;
} }
if(item.order_product_list[0].product_model=='food'){ if(item.order_product_list[0].product_model=='food'){
wx.navigateTo({ wx.navigateTo({
url: '/pages/user/order/foodOrderInfo/index?id='+item.order_id, url: '/pages/user/order/foodOrderInfo/index?id='+item.order_id,
@ -745,7 +760,7 @@ const goProdInOtherPlatform = function (item) {
webUrl+= `/OneCardTourDetail?id=${item.scene_id || item.id}` webUrl+= `/OneCardTourDetail?id=${item.scene_id || item.id}`
} }
webUrl+="&sourceFrom=recommend"
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: appIdObj[platform], appId: appIdObj[platform],
path: "/subPackages/webPage/webPage?url="+encodeURIComponent(webUrl), path: "/subPackages/webPage/webPage?url="+encodeURIComponent(webUrl),

Loading…
Cancel
Save