Browse Source

Merge branch 'master' into dev_fix

master
jiazhipeng 5 months ago
parent
commit
a73c3511d6
  1. 2
      app.js
  2. 4
      app.json
  3. 8
      app.wxss
  4. 2
      pages/component/TitleHeader.wxss
  5. 4
      pages/component/proRec/proRec.js
  6. 20
      pages/index/index.js
  7. 10
      pages/index/index.wxml
  8. 21
      pages/index/index.wxss
  9. 6
      pages/info/foodProductInfo/index.wxml
  10. 28
      pages/info/postProductInfo/index.js
  11. 32
      pages/info/postProductInfo/index.wxml
  12. 50
      pages/info/postProductInfo/index.wxss
  13. 2
      pages/info/roadInfo/index.js
  14. 82
      pages/info/sceneProductInfo/index.js
  15. 13
      pages/info/sceneProductInfo/index.wxml
  16. 14
      pages/info/sceneProductInfo/index.wxss
  17. 2
      pages/list/six/index.wxml
  18. 2
      pages/order/components/address/index.wxml
  19. 4
      pages/order/components/address/index.wxss
  20. 86
      pages/order/orderList/index.js
  21. 78
      pages/order/orderList/index.wxml
  22. 79
      pages/order/orderList/index.wxss
  23. 4
      pages/order/pay/index.js
  24. 2
      pages/order/pay/index.wxml
  25. 295
      pages/order/postOrder/index.js
  26. 151
      pages/order/postOrder/index.wxml
  27. 59
      pages/order/postOrder/index.wxss
  28. 55
      pages/order/scene/index.js
  29. 53
      pages/order/scene/index.wxml
  30. 59
      pages/order/scene/index.wxss
  31. 2
      pages/search/list/index.wxml
  32. 50
      pages/user/bindtel/index.js
  33. 2
      pages/user/bindtel/index.wxml
  34. 63
      pages/user/cartlist/list.js
  35. 7
      pages/user/cartlist/list.wxml
  36. 24
      pages/user/cartlist/list.wxss
  37. 6
      pages/user/likes/index.js
  38. 6
      pages/user/order/list.js
  39. 17
      pages/user/order/list.wxml
  40. 2
      pages/user/order/list.wxss
  41. 171
      pages/user/order/postOrderInfo/index.js
  42. 233
      pages/user/order/postOrderInfo/index.wxml
  43. 51
      pages/user/order/postOrderInfo/index.wxss
  44. 5
      pages/user/order/sceneOrderInfo/index.js
  45. 5
      pages/user/order/showOrderInfo/index.js
  46. 1
      pages/user/order/showOrderInfo/index.wxml
  47. 3
      pages/user/user.wxml
  48. 192
      project.config.json
  49. 77
      project.private.config.json
  50. 2
      subPackageCheckPoint/app.js
  51. 8
      subPackageCheckPoint/pages/detailsmap/index.wxml
  52. 8
      subPackageCheckPoint/pages/detailsmap/index.wxss
  53. 2
      subPackageCheckPoint/pages/index/index.js
  54. 81
      subPackages/feiyiNew/index.js
  55. 30
      subPackages/feiyiNew/index.wxml
  56. 56
      subPackages/feiyiNew/index.wxss
  57. 13
      subPackages/foodNew/index.js
  58. 6
      subPackages/foodNew/index.wxml
  59. 743
      subPackages/goods/memberCard/index.js
  60. 5
      subPackages/goods/memberCard/index.json
  61. 226
      subPackages/goods/memberCard/index.wxml
  62. 1025
      subPackages/goods/memberCard/index.wxss
  63. 2
      subPackages/password/overview/overview.wxml
  64. 2
      subPackages/password/setting/setting.js
  65. 75
      subPackages/postSearch/index.js
  66. 36
      subPackages/postSearch/index.wxml
  67. 56
      subPackages/postSearch/index.wxss
  68. 91
      subPackages/techanNew/index.js
  69. 32
      subPackages/techanNew/index.wxml
  70. 56
      subPackages/techanNew/index.wxss
  71. 152
      subPackages/techanNew/selfPickPoint/index.js
  72. 5
      subPackages/techanNew/selfPickPoint/index.json
  73. 35
      subPackages/techanNew/selfPickPoint/index.wxml
  74. 124
      subPackages/techanNew/selfPickPoint/index.wxss
  75. 20
      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.isTest142? true : false; data.isTest = data.isTest154? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

4
app.json

@ -204,7 +204,9 @@
"feiyiNew/CGCLetter/index", "feiyiNew/CGCLetter/index",
"feiyiNew/CGCTime/index", "feiyiNew/CGCTime/index",
"foodListNew/index", "foodListNew/index",
"foodNew/index" "foodNew/index",
"goods/memberCard/index",
"techanNew/selfPickPoint/index"
] ]
}, },
{ {

8
app.wxss

@ -45,7 +45,7 @@ page{
position: relative; position: relative;
z-index: 1; z-index: 1;
width: 80%; width: 80%;
max-height: 1000rpx; max-height: 1200rpx;
background: white; background: white;
border-radius: 12rpx; border-radius: 12rpx;
overflow-y: auto; overflow-y: auto;
@ -171,6 +171,12 @@ page{
.flex-shrink-0{ .flex-shrink-0{
flex-shrink: 0; flex-shrink: 0;
} }
.hidden{
opacity: 0;
display: none;
}
/* page { /* page {
filter: grayscale(100%); filter: grayscale(100%);
} */ } */

2
pages/component/TitleHeader.wxss

@ -12,7 +12,7 @@
font-size: 32rpx; font-size: 32rpx;
line-height: 90rpx; line-height: 90rpx;
background: #f9f9f9; background: #f9f9f9;
z-index: 2; z-index: 99;
top: 0; top: 0;
} }
.title-header .icon-fanhui1 { .title-header .icon-fanhui1 {

4
pages/component/proRec/proRec.js

@ -31,8 +31,8 @@ Component({
}, },
observers:{ observers:{
'ids': function(newVal,oldVal){ 'ids': function(newVal,oldVal){
console.log('newVal--------',newVal) // console.log('newVal--------',newVal)
console.log('oldVal--------',oldVal) // console.log('oldVal--------',oldVal)
if (newVal && this.data.tjList.length<=0) { if (newVal && this.data.tjList.length<=0) {
this.getTj(newVal) this.getTj(newVal)
} }

20
pages/index/index.js

@ -409,6 +409,8 @@ Page({
cityIndex: 0, cityIndex: 0,
scrollItem: "scrollItem-0", scrollItem: "scrollItem-0",
aiStr: "",
// ---------------2025-5-26改版没用到的------------------ // ---------------2025-5-26改版没用到的------------------
fourProduct: [], fourProduct: [],
hotIndex: 0, hotIndex: 0,
@ -444,7 +446,9 @@ Page({
this.getHeight() this.getHeight()
this.getWeather() // 天气 this.getWeather() // 天气
this.getIndexSeason() this.getIndexSeason()
this.getBanner() this.getBanner()
this.setAiStr()
this.getXpthList() // 限时特惠 this.getXpthList() // 限时特惠
@ -470,6 +474,20 @@ Page({
this.getShowMore() this.getShowMore()
}, },
setAiStr :function () {
let str = "你好啊,我是卿卿,我来带你游苏州~";
let i = 0;
let timer = setInterval(()=>{
i++
this.setData({
aiStr: str.slice(0,i)
})
if (i>str.length) {
clearInterval(timer)
}
},125)
},
showImg (img) { showImg (img) {
if (!img) { return img } if (!img) { return img }
if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) { if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) {

10
pages/index/index.wxml

@ -63,6 +63,10 @@
</view> --> </view> -->
</view> </view>
<view class="ai-box">
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/aiPlay/banniyou.gif"></image>
<view class="ai-text">{{aiStr}}</view>
</view>
@ -70,7 +74,7 @@
<!-- 苏城环游记 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="{{true}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="ztBannerIndex"> bindchange="changeBannerIndex" data-keyname="ztBannerIndex" circular>
<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}}">
<!-- 原 圆角77rpx,现改为13rpx --> <!-- 原 圆角77rpx,现改为13rpx -->
@ -180,7 +184,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="{{true}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="smBannerIndex"> bindchange="changeBannerIndex" data-keyname="smBannerIndex" circular>
<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;">
<!-- 原 圆角77rpx,现改为13rpx --> <!-- 原 圆角77rpx,现改为13rpx -->
@ -358,7 +362,7 @@
<!-- 底部AI伴你游 --> <!-- 底部AI伴你游 -->
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/uploads/20250929/6f29f557e80a331e84f01f2a5083d933.gif"></image> <!-- <image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/uploads/20250929/6f29f557e80a331e84f01f2a5083d933.gif"></image> -->
</view> </view>

21
pages/index/index.wxss

@ -1041,13 +1041,30 @@
margin-right: 0rpx; margin-right: 0rpx;
} }
.ai-box{
margin: 15rpx 0 40rpx;
width: 100%;
position: relative;
}
.ai-text{
position: absolute;
font-weight: 500;
font-size: 25rpx;
color: #111111;
top: 97rpx;
left: 210rpx;
width: 320rpx;
}
.ai-fix{ .ai-fix{
position: fixed; /* position: fixed;
width: 150.33rpx; width: 150.33rpx;
height: 200rpx; height: 200rpx;
bottom: 30rpx; bottom: 30rpx;
right: 24rpx; right: 24rpx;
z-index: 100; z-index: 100; */
width: 100%;
display: block;
} }
.hot-prod-new{ .hot-prod-new{
display: flex; display: flex;

6
pages/info/foodProductInfo/index.wxml

@ -4,14 +4,17 @@
<!-- <view class="share-icon" bindtap="share"></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> <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;"> <view style="position: relative;">
<scroll-view>
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}" <swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}"
interval="{{2000}}" duration="{{300}}" bindchange="swiperChange"> interval="{{2000}}" duration="{{300}}" bindchange="swiperChange">
<block wx:if="{{info.videourl}}" wx:key="*this"> <block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item> <swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}" <scroll-view>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{false}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}" show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video> show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
<!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> --> <!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> -->
</scroll-view>
</swiper-item> </swiper-item>
</block> </block>
<block wx:for="{{info.listimg}}" wx:key="*this"> <block wx:for="{{info.listimg}}" wx:key="*this">
@ -28,6 +31,7 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</scroll-view>
<view class="swiper-bottom" wx:if="{{info}}"> <view class="swiper-bottom" wx:if="{{info}}">
<!-- <view class="swuper-bottom-bg"> <!-- <view class="swuper-bottom-bg">
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}" <view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}"

28
pages/info/postProductInfo/index.js

@ -45,6 +45,8 @@ Page({
sku: {min:0,max:0} sku: {min:0,max:0}
}, },
otherInfoShow: 0, otherInfoShow: 0,
user_type: null,
}, },
/** /**
@ -318,7 +320,8 @@ Page({
return; return;
} }
this.setData({ this.setData({
skuFlag: "cart" skuFlag: "cart",
user_type: this.data.info.sku[this.data.skuIndex].use_type>1?null:this.data.info.sku[this.data.skuIndex].use_type
}) })
let that = this let that = this
wx.createSelectorQuery().select('#skuImg').boundingClientRect(function (res) { wx.createSelectorQuery().select('#skuImg').boundingClientRect(function (res) {
@ -351,9 +354,18 @@ Page({
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
skuIndex: index, skuIndex: index,
swiperCurrent: index+this.data.swiperRange.picture.max+1 swiperCurrent: index+this.data.swiperRange.picture.max+1,
user_type: this.data.info.sku[index].use_type>1?null:this.data.info.sku[index].use_type,
})
},
changeSelectSkuPost: function(e) {
let value = e.currentTarget.dataset.value;
this.setData({
user_type: value,
}) })
}, },
showOrder: function () { showOrder: function () {
commonApi.user_post('wx/get_user_keep', { commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id, jumpurl: '/pages/info/postProductInfo/index?id=' + this.data.id,
@ -437,10 +449,20 @@ Page({
}else { }else {
type = '' type = ''
} }
// 非酒景 要选配送方式
if (this.data.info.is_package!=1 && ![0,1].includes(this.data.user_type)) {
wx.showToast({
title: "请选择配送方式",
icon:"none"
})
return
}
commonApi.user_post("cart/add_sku", { commonApi.user_post("cart/add_sku", {
sku_id: this.data.info.sku[this.data.skuIndex].id, sku_id: this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum, num: this.data.producNum,
type:type type:type,
delivery_method: this.data.user_type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
commonApi.user_post('cart/get_list', {}).then(res => { commonApi.user_post('cart/get_list', {}).then(res => {

32
pages/info/postProductInfo/index.wxml

@ -4,13 +4,17 @@
<view class="share-icon" bindtap="share"></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> <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;"> <view style="position: relative;">
<scroll-view>
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}" <swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}"
interval="{{2000}}" duration="{{300}}" bindchange="swiperChange"> interval="{{2000}}" duration="{{300}}" bindchange="swiperChange">
<block wx:if="{{info.videourl}}" wx:key="*this"> <block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item> <swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}" <scroll-view>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{false}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}" show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video> show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
</scroll-view>
<!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> --> <!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> -->
</swiper-item> </swiper-item>
</block> </block>
@ -28,6 +32,7 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</scroll-view>
<view class="swiper-bottom" wx:if="{{info}}"> <view class="swiper-bottom" wx:if="{{info}}">
<view class="swuper-bottom-bg"> <view class="swuper-bottom-bg">
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}" <view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}"
@ -63,6 +68,8 @@
<image lazy-load wx:for="{{info.sku}}" wx:key="index" bind:tap="changeSwiperCurrent" data-index="{{swiperRange.picture.max+1+index}}" <image lazy-load wx:for="{{info.sku}}" wx:key="index" bind:tap="changeSwiperCurrent" data-index="{{swiperRange.picture.max+1+index}}"
class="{{swiperCurrent==swiperRange.picture.max+1+index?'active':''}}" class="{{swiperCurrent==swiperRange.picture.max+1+index?'active':''}}"
src="{{item.headimg}}"></image> src="{{item.headimg}}"></image>
<view style="width: 20rpx;height: 100%;flex-shrink: 0;"></view>
</view> </view>
<view class="select-sku" bind:tap="showOrder">></view> <view class="select-sku" bind:tap="showOrder">></view>
@ -187,7 +194,7 @@
<view class="shop-container" wx:if="{{iShop}}"> <view class="shop-container" wx:if="{{iShop}}">
<image lazy-load class="shop-img" src="{{info.supplier_headimg}}" mode="aspectFill"></image> <image lazy-load class="shop-img" src="{{info.supplier_headimg}}" mode="aspectFill"></image>
<view class="textOver2">{{info.supplier_name}}</view> <view class="textOver2">{{info.shop_name}}</view>
<navigator class="shop-btn" url="/pages/list/store/index?id={{supplierId}}">进店</navigator> <navigator class="shop-btn" url="/pages/list/store/index?id={{supplierId}}">进店</navigator>
</view> </view>
@ -297,6 +304,27 @@
</view> </view>
</view> </view>
<view class="delivery-method" wx:if="{{info.is_package!=1&&skuFlag=='cart'}}">
<view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">
<view class="select-cycle" wx:if="{{user_type!==0}}"></view>
<view class="select-cycle selected" wx:else>
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">邮寄</view>
</view>
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=0}}" bind:tap="changeSelectSkuPost" data-value="{{1}}">
<view class="select-cycle" wx:if="{{user_type!==1}}"></view>
<view class="select-cycle selected" wx:else="">
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">自提</view>
</view>
</view>
</view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="btn-box"> <view class="btn-box">

50
pages/info/postProductInfo/index.wxss

@ -438,6 +438,7 @@ page {
justify-content: space-between; justify-content: space-between;
text-align: center; text-align: center;
padding-left: 0; padding-left: 0;
z-index: 77;
} }
.fixed-bottom .iconfont { .fixed-bottom .iconfont {
@ -550,9 +551,10 @@ page {
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
justify-content: space-between; justify-content: space-between;
max-height: 800rpx; height: 400rpx;
min-height: 400rpx;
align-content: flex-start; align-content: flex-start;
overflow-y: auto;
overflow-x: hidden;
} }
.sku-name-item { .sku-name-item {
@ -697,7 +699,7 @@ width: 250rpx;
border-radius: 50%; border-radius: 50%;
right: 20rpx; right: 20rpx;
bottom: 166rpx; bottom: 166rpx;
z-index: 15; z-index: 88;
} }
.cart-box image { .cart-box image {
@ -1265,3 +1267,45 @@ color: #010101;
font-size: 27rpx; font-size: 27rpx;
color: #000000; color: #000000;
} }
.delivery-method{
font-weight: 400;
font-size: 29rpx;
color: #1E1E1E;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 25rpx 40rpx;
}
.delivery-method .select-cycle{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1px solid #999999;
overflow: hidden;
flex-shrink: 0;
}
.delivery-method .select-cycle image{
width: 100%;
height: 100%;
}
.delivery-method .select-cycle.selected {
border: none;
}
.delivery-method .select-cycle.selected image{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
}
.delivery-method .method-str{
padding-left: 10rpx;
flex-shrink: 0;
}
.delivery-method .flex-center{
width: 150rpx;
justify-content: flex-end;
display: flex;
align-items: center;
}

2
pages/info/roadInfo/index.js

@ -218,7 +218,7 @@ Page({
if (res&&Array.isArray(res.data)&&res.data.length>0) { if (res&&Array.isArray(res.data)&&res.data.length>0) {
res.data.forEach(v => { res.data.forEach(v => {
v.sku.is_compose = 1; v.sku.is_compose = 1;
v.num = this.data.producNum; v.num = this.data.producNum * v.num;
v.sku.compose_sku_id = v.compose_sku_id v.sku.compose_sku_id = v.compose_sku_id
}); });
app.globalData.list = [] app.globalData.list = []

82
pages/info/sceneProductInfo/index.js

@ -62,6 +62,8 @@ Page({
skuShowDomId: "", skuShowDomId: "",
skuDays: 30, skuDays: 30,
advList: [],
}, },
/** /**
@ -211,6 +213,9 @@ Page({
}, 1) }, 1)
this.BroswerRecord() this.BroswerRecord()
}) })
this.getAdv()
// 获取收藏的状态 // 获取收藏的状态
if (wx.getStorageSync("jstrip_token")) { if (wx.getStorageSync("jstrip_token")) {
commonApi.user_post("scene/is_scene_collection", { commonApi.user_post("scene/is_scene_collection", {
@ -261,6 +266,83 @@ Page({
}, },
// 获取广告
getAdv() {
commonApi._post("adv/getAdv", {
position: 9,
type_id: 3,
scenic_id: this.data.id
}).then(res => {
try {
this.setData({advList: res.data || []})
} catch (error) {
console.log(error);
}
})
},
bannerClick: function(e) {
if (this.data.isTest) return;
let item = e.currentTarget.dataset.item;
switch (item.jump_type) {
case 0:
break;
case 1:
util.gotoDetail(item.product_model)
break;
case 2:
if (item.front_model && item.front_model.mini) {
wx.navigateTo({
url: "/" + item.front_model.mini
})
}
break;
case 3:
// 外部h5
console.log(item)
app.globalData.weburl = item.tdata.url;
wx.navigateTo({
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.tdata
.url)
})
break;
case 4:
if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) {
// 如果是苏心游的小程序 直接把authCode带过去
userApi.user_post("user/getJumpThirdAppCode", {}).then(res => {
let weburl = item.tdata.page
if (weburl.indexOf('?') != -1) {
weburl += '&authCode=' + res.data;
} else {
weburl += '?authCode=' + res.data
}
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: weburl
})
}).catch(err => {
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: item.tdata.page
})
})
} else {
wx.navigateToMiniProgram({
appId: item.tdata.appid,
path: item.tdata.page
})
}
break;
default:
break;
}
return;
},
// 获取日期 // 获取日期
changeDate: function (e) { changeDate: function (e) {
// 2025-7-2 合并票日期变更 需要获取sku并重新赋值 // 2025-7-2 合并票日期变更 需要获取sku并重新赋值

13
pages/info/sceneProductInfo/index.wxml

@ -6,7 +6,7 @@
<swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{false}}" interval="{{2000}}" duration="{{300}}"> <swiper class="swiper" indicator-dots="{{true}}" wx:if="{{info}}" autoplay="{{false}}" interval="{{2000}}" duration="{{300}}">
<block wx:if="{{info.videourl}}" wx:key="*this"> <block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item> <swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}" <video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{false}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}" show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
></video> ></video>
</swiper-item> </swiper-item>
@ -47,6 +47,17 @@
<view class="status-text{{info.garden_flag==0?' disable':''}}" wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view> <view class="status-text{{info.garden_flag==0?' disable':''}}" wx:if="{{info.garden_flag_text && info.garden_flag!=1}}">{{info.garden_flag_text}}</view>
</view> </view>
<view class="adv-container" wx:if="{{advList.length > 0 && info}}">
<swiper class="adv-swiper" indicator-dots="{{false}}" autoplay="{{true}}" circular interval="{{2000}}" duration="{{300}}">
<block wx:for="{{advList}}" wx:key="*this" >
<swiper-item>
<image lazy-load src="{{item.head_img}}" mode="aspectFill" bindtap="bannerClick" data-item="{{item}}"></image>
</swiper-item>
</block>
</swiper>
</view>
<view class="tab-info-container" wx:if="{{info}}"> <view class="tab-info-container" wx:if="{{info}}">
<view class="tab-item {{showTabIndex==0?'active':''}}" bind:tap="changeTabIndex" data-value="0">预订</view> <view class="tab-item {{showTabIndex==0?'active':''}}" bind:tap="changeTabIndex" data-value="0">预订</view>
<view class="tab-item {{showTabIndex==2?'active':''}}" bind:tap="changeTabIndex" data-value="2">详情/政策</view> <view class="tab-item {{showTabIndex==2?'active':''}}" bind:tap="changeTabIndex" data-value="2">详情/政策</view>

14
pages/info/sceneProductInfo/index.wxss

@ -1069,3 +1069,17 @@ line-height: 93rpx;
flex: 1; flex: 1;
height: 100rpx; height: 100rpx;
} }
.adv-container{
padding-top: 20rpx;
width: 100%;
}
.adv-container image{
width: 672rpx;
height: 166.67rpx;
margin: 0 auto;
display: block;
}
.adv-swiper{
height: 166.67rpx;
}

2
pages/list/six/index.wxml

@ -1,6 +1,6 @@
<!--pages/list/six/index.wxml--> <!--pages/list/six/index.wxml-->
<!-- <search bind:onload="search"></search> --> <!-- <search bind:onload="search"></search> -->
<title title="十全十美"></title> <title title="苏邑十景"></title>
<!-- <image lazy-load src="https://resource.sz-trip.com/uploads/20190831/3ecfcb81bab36027606676737788110c.png" mode="aspectFill" class="topbg"></image> --> <!-- <image lazy-load src="https://resource.sz-trip.com/uploads/20190831/3ecfcb81bab36027606676737788110c.png" mode="aspectFill" class="topbg"></image> -->
<image lazy-load src="{{areas[areaIndex].img}}" mode="widthFix" class="bannerImg" data-event="{{areas[areaIndex]}}" bindtap="gotoPath"></image> <image lazy-load src="{{areas[areaIndex].img}}" mode="widthFix" class="bannerImg" data-event="{{areas[areaIndex]}}" bindtap="gotoPath"></image>

2
pages/order/components/address/index.wxml

@ -1,4 +1,4 @@
<view class="box"> <view class="address-box">
<view class="box-title"> <view class="box-title">
<view style="flex:1">收货地址</view> <view style="flex:1">收货地址</view>
<view class="contact-add" bindtap="showLinkman" wx:if="{{selectLinkman}}"><text class="iconfont icon-add-select"></text>选择</view> <view class="contact-add" bindtap="showLinkman" wx:if="{{selectLinkman}}"><text class="iconfont icon-add-select"></text>选择</view>

4
pages/order/components/address/index.wxss

@ -49,8 +49,8 @@
flex-shrink: 0; flex-shrink: 0;
font-size: 37rpx; font-size: 37rpx;
} }
.box { .address-box {
margin: 30rpx 25rpx; margin: 30rpx 0rpx;
background: white; background: white;
border-radius: 9rpx; border-radius: 9rpx;
} }

86
pages/order/orderList/index.js

@ -9,7 +9,11 @@ Page({
data: { data: {
goodsList: [], goodsList: [],
ticketList: [], ticketList: [],
productPrice: 0, // 仅展示用,区分邮寄自提
postList: [],
pickUpList: [],
productPrice: 0,
ticketPrice: 0, ticketPrice: 0,
product:"", product:"",
sku_id: '', sku_id: '',
@ -26,6 +30,10 @@ Page({
finalPrice: 0, finalPrice: 0,
showCoupon: true, showCoupon: true,
explainDataList: [],
showContent: null,
}, },
/** /**
@ -33,8 +41,8 @@ Page({
*/ */
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
goodsList: app.globalData.postProduct, goodsList: app.globalData.postProduct || [],
ticketList: app.globalData.list, ticketList: app.globalData.list || [],
kjId: app.globalData.kjId, kjId: app.globalData.kjId,
gp_id: app.globalData.gp_id || app.globalData.team_id, gp_id: app.globalData.gp_id || app.globalData.team_id,
flag:options.flag, flag:options.flag,
@ -44,7 +52,7 @@ Page({
console.log('-------------',this.data.ticketList, this.data.goodsList); console.log('-------------',this.data.ticketList, this.data.goodsList);
// debugger // debugger
let price = 0, sku_id = [] ,postFee= 0; let price = 0, sku_id = [] ,postFee= 0;
app.globalData.postProduct.map(item => { this.data.goodsList.map(item => {
try { try {
item.postFee = parseFloat(item.postFee) item.postFee = parseFloat(item.postFee)
} catch(e){ } catch(e){
@ -60,7 +68,7 @@ Page({
} }
sku_id.push(item.sku.id) sku_id.push(item.sku.id)
}) })
app.globalData.list.map(item => { this.data.ticketList.map(item => {
// price = price + item.sku.price * item.linkmanList.length; // price = price + item.sku.price * item.linkmanList.length;
price = price + item.sku.price * item.num; price = price + item.sku.price * item.num;
sku_id.push(item.sku.id) sku_id.push(item.sku.id)
@ -70,12 +78,36 @@ Page({
postFee:postFee, postFee:postFee,
sku_id: sku_id.join(",") sku_id: sku_id.join(",")
}) })
this.handlePostData()
if (!this.data.kjId && !this.data.gp_id) { if (!this.data.kjId && !this.data.gp_id) {
this.couponCom = this.selectAllComponents("#coupon")[0]; this.couponCom = this.selectAllComponents("#coupon")[0];
} }
this.getExplain()
},
handlePostData () {
let postList = this.data.goodsList.filter(x=>x.user_select_type === 0)
let pickUpList = this.data.goodsList.filter(x=>x.user_select_type === 1)
this.setData({
postList: postList,
pickUpList: pickUpList,
})
}, },
order: function (){ order: function (){
console.log(app.globalData.createDate); console.log(app.globalData.createDate);
let explainData = (this.data.explainDataList || []).filter(x=>x.selectExplain).map(x=>{
return {
product_id: x.product.id,
product_num: 1,
sku_id: x.sku.id,
type: x.product.type,
}
})
app.globalData.createDate.product_list = app.globalData.createDate.product_list.concat(explainData)
app.globalData.createDate.coupon_id= this.data.coupon ? this.data.coupon.id : null; app.globalData.createDate.coupon_id= this.data.coupon ? this.data.coupon.id : null;
let service = "order/create", postData = {data: JSON.stringify(app.globalData.createDate)} let service = "order/create", postData = {data: JSON.stringify(app.globalData.createDate)}
@ -130,6 +162,50 @@ Page({
}) })
}, },
// 讲解
getExplain () {
if (this.data.ticketList.length>0) {
let explainArr = []
let productId = this.data.ticketList.map(x=>x.product.id)
Promise.all(
productId.map(x=>commonApi._post("product/get_product_compose_list", {
product_id: x
}))
).then(res=>{
if (res) {
res.forEach(x=>{
if (x.data && x.data[0] && !explainArr.find(v=>v.sku.id == x.data[0].sku.id)) {
explainArr.push(x.data[0])
}
})
this.setData({
explainDataList: explainArr
})
}
console.log(res)
})
}
},
changeSeletExplain (e) {
let val = e.currentTarget.dataset.val;
let index = e.currentTarget.dataset.index;
let explainDataList = this.data.explainDataList
let explainData = this.data.explainDataList[index]
explainData.selectExplain = val
this.setData({
explainDataList: explainDataList
})
},
changeContent (e) {
let val = e.currentTarget.dataset.val;
this.setData({
showContent: val
})
},
/** /**

78
pages/order/orderList/index.wxml

@ -1,6 +1,8 @@
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="订单列表"></title> <title title="订单列表"></title>
<view class="box" wx:if="{{goodsList.length != 0}}"> <!-- 邮寄 -->
<view class="goods-item" wx:for="{{goodsList}}" wx:key="index"> <view class="box" wx:if="{{postList.length != 0}}">
<view class="goods-item" wx:for="{{postList}}" wx:key="index">
<view class="item-box item-title"> <view class="item-box item-title">
<view>{{item.product.title}}</view> <view>{{item.product.title}}</view>
<view class="price">¥{{item.sku.price/100}}</view> <view class="price">¥{{item.sku.price/100}}</view>
@ -26,6 +28,31 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 自提 -->
<view class="box" wx:if="{{pickUpList.length != 0}}">
<view class="goods-item" wx:for="{{pickUpList}}" wx:key="index">
<view class="item-box item-title">
<view>{{item.product.title}}</view>
<view class="price">¥{{item.sku.price/100}}</view>
</view>
<view class="item-box">
<view>{{item.sku.sku_name}}</view>
<view>X{{item.productNum}}</view>
</view>
<view class="item-box item-title" style="padding-top: 27rpx;">自提信息</view>
<view style="padding: 10rpx;">
<view class="text"><view class="text-left">预留手机号:</view>{{item.phone}}</view>
<view class="text">
<view class="text-left">自提地址:</view>
<view>
<view>{{item.pickupAddress.title}}</view>
<view style="padding-top: 20rpx;">{{item.pickupAddress.address}}</view>
</view>
</view>
</view>
</view>
</view>
<!-- 门票 -->
<view class="box" wx:if="{{ticketList.length != 0}}"> <view class="box" wx:if="{{ticketList.length != 0}}">
<view class="goods-item" wx:for="{{ticketList}}" wx:key="index"> <view class="goods-item" wx:for="{{ticketList}}" wx:key="index">
<view class="item-box item-title"> <view class="item-box item-title">
@ -37,7 +64,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}}"> <view style="padding: 10rpx;" 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>
@ -46,7 +73,7 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:else> <view style="padding: 10rpx;" wx:else>
<view class="text"><view class="text-left">手机号:</view>{{item.phone}}</view> <view class="text"><view class="text-left">手机号:</view>{{item.phone}}</view>
</view> </view>
</view> </view>
@ -58,6 +85,28 @@
</view> --> </view> -->
<coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{showCoupon && !kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}" sourceFrom="cart"></coupon> <coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{showCoupon && !kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}" sourceFrom="cart"></coupon>
<view class="explain-box" wx:if="{{explainDataList.length>0}}">
<view class="explain-title">景点讲解服务</view>
<view class="explain-prod" wx:for="{{explainDataList}}" wx:key="index">
<image class="explain-img" src="{{item.product.headimg}}"></image>
<view class="explain-content">
<view class="explain-goods textOver2">{{item.product.title}}</view>
<view class="explain-sku textOver2">{{item.sku.sku_name}}</view>
<view class="explain-price">0</view>
</view>
<view class="explain-sku" style="font-size: 28rpx;" bind:tap="changeContent" data-val="{{item}}"
style="align-self: flex-start;flex-shrink: 0;padding: 0 20rpx 0 0;">
详情 >
</view>
<view style="align-self: flex-start;">
<view class="iconfont icon-quan" wx:if="{{!item.selectExplain}}" bind:tap="changeSeletExplain" data-val="{{true}}" data-index="{{index}}"></view>
<view class="iconfont icon-gou1" wx:else bind:tap="changeSeletExplain" data-val="{{false}}" data-index="{{index}}"></view>
</view>
</view>
</view>
<view class="fixed-bottom"> <view class="fixed-bottom">
<view class="fixed-price-box"> <view class="fixed-price-box">
@ -73,3 +122,24 @@
</view> </view>
<view class="fixed-btn" bindtap="order">下一步</view> <view class="fixed-btn" bindtap="order">下一步</view>
</view> </view>
<view class="mask" wx:if="{{showContent}}">
<view class="mask-bg" bind:tap="changeContent" data-val="{{null}}"></view>
<view class="mask-content2" >
<view class="iconfont icon-close" bind:tap="changeContent" data-val="{{null}}"></view>
<view style="text-align: center;padding: 20rpx 0;">产品详情</view>
<view style="max-height: 65vh;overflow-y: auto;">
<view style="width: 100%;padding:20rpx 20rpx 0;box-sizing: border-box;">
<image style="width: 100%;border-radius: 20rpx;height: 200rpx;" mode="widthFix" src="{{showContent.product.headimg}}"></image>
<view style="font-weight: bold;padding:20rpx 0">{{showContent.product.title}}</view>
</view>
<view style="height: 10rpx;background:#f2f2f2"></view>
<view style="padding:20rpx">
<view style="font-weight: bold;padding:0 0 20rpx">产品详情</view>
<rich-text class="detail" nodes="{{tool.formateRichText(showContent.product.content)}}"></rich-text>
</view>
<view style="height: 50rpx;"></view>
</view>
</view>
</view>

79
pages/order/orderList/index.wxss

@ -66,6 +66,9 @@ page{
font-size: 27rpx; font-size: 27rpx;
color: #666666; color: #666666;
} }
.text .text-left{
flex-shrink: 0;
}
.goods-item{ .goods-item{
@ -95,3 +98,79 @@ color: #666666;
color: #D62828; color: #D62828;
font-weight: bold; font-weight: bold;
} }
.explain-box{
width: 699rpx;
background: #FFFFFF;
border-radius: 9rpx;
margin: 0 auto;
padding: 26rpx 22rpx;
box-sizing: border-box;
}
.explain-box .explain-title{
font-weight: bold;
font-size: 32rpx;
color: #000000;
/* margin-bottom: 26rpx; */
}
.explain-box .explain-prod{
display: flex;
width: 100%;
align-items: center;
margin-top: 25rpx;
}
.explain-box .explain-img{
width: 135.33rpx;
height: 112rpx;
flex-shrink: 0;
}
.explain-box .explain-content{
flex: 1;
width: 1rpx;
padding: 0 36rpx;
box-sizing: border-box;
line-height: 1;
}
.explain-box .explain-goods{
font-weight: 500;
font-size: 31rpx;
color: #000000;
}
.explain-box .explain-sku{
font-weight: 500;
font-size: 24rpx;
color: #999999;
padding: 20rpx 0;
}
.explain-box .explain-price{
font-weight: 500;
font-size: 33.33rpx;
color: #E30000;
}
.explain-box .explain-price::before{
content: "¥";
font-size: 24rpx;
}
.icon-quan{
font-size: 33rpx;
}
.icon-gou1{
color: #D62828;
font-size: 33rpx;
}
.mask-content2 {
position: absolute;
left: 0;
right: 0;
bottom: 0;
width: 100%;
background: white;
border-radius: 12rpx;
min-height: 1100rpx;
}
.icon-close {
position: absolute;
top: 30rpx;
right: 30rpx;
}

4
pages/order/pay/index.js

@ -441,11 +441,11 @@ Page({
title: '您的支付密码已过期', title: '您的支付密码已过期',
content: resCode, content: resCode,
cancelText: '修改密码', cancelText: '修改密码',
confirmText:'忘记密码', confirmText:'重置密码',
confirmColor:"#0E8790", confirmColor:"#0E8790",
success(res){ success(res){
if (res.confirm) { if (res.confirm) {
console.log('忘记密码') console.log('重置密码')
_this.goReset() _this.goReset()
} else if (res.cancel) { } else if (res.cancel) {
console.log('修改密码') console.log('修改密码')

2
pages/order/pay/index.wxml

@ -137,7 +137,7 @@
</view> </view>
<view class="resetPassword"> <view class="resetPassword">
<view bind:tap="goReset" url="/subPackages/password/setting/setting?type=reset">忘记密码</view> <view bind:tap="goReset" url="/subPackages/password/setting/setting?type=reset">重置密码</view>
</view> </view>
</view> </view>

295
pages/order/postOrder/index.js

@ -7,6 +7,9 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
pageUseType: 0, // 0 邮寄 1 自提 3邮寄或自提 购物车用 不考虑3
allProduct: [],
product: [], product: [],
showPrice: 0, showPrice: 0,
from: null, from: null,
@ -23,7 +26,9 @@ Page({
showAllowance: false, showAllowance: false,
flag:null, flag:null,
isCar:'single', isCar:'single',
showYhq:null showYhq:null,
pickupIndex: null,
}, },
/** /**
@ -39,28 +44,85 @@ Page({
isCar:options.isCar, isCar:options.isCar,
showYhq:app.globalData.listName?false:true showYhq:app.globalData.listName?false:true
}) })
let price = 0, sku_id = []; this.handleProduct()
app.globalData.postProduct.map(item => { },
if (!app.globalData.kjId && !this.data.gp_id) {
price = price + item.sku.price * item.productNum; handleProduct () {
} app.globalData.postProduct.forEach((item,index) => {
else if (this.data.gp_id) { item.keyIndex = index
price = price + item.sku.event_price * item.productNum;
}
item.sku.batch_shipment = item.sku.batch_shipment?item.sku.batch_shipment:0; item.sku.batch_shipment = item.sku.batch_shipment?item.sku.batch_shipment:0;
sku_id.push(item.sku.id) // 用户选择的配送方式
item.user_select_type = item.sku.use_type === 1 ? 1 : 0
})
this.setData({
allProduct: app.globalData.postProduct,
})
if (this.data.from == "cart") {
if (this.data.pageUseType == 0) {
let pageUseType = app.globalData.postProduct.some(x=>x.user_select_type==0)?0:1
let productList = app.globalData.postProduct.filter(x=>x.user_select_type == pageUseType)
this.setData({
product: productList,
pageUseType: pageUseType,
})
} else {
let productList = app.globalData.postProduct.filter(x=>x.user_select_type == 1)
this.setData({
product: productList,
pageUseType: 1,
})
}
} else {
this.setData({
product: app.globalData.postProduct,
})
}
console.log(this.data.product, "页面数据")
let price = 0, sku_id = [];
this.data.product.forEach(item=>{
if (!app.globalData.kjId && !this.data.gp_id) {
price = price + item.sku.price * item.productNum;
}
else if (this.data.gp_id) {
price = price + item.sku.event_price * item.productNum;
}
sku_id.push(item.sku.id)
}) })
this.setData({ this.setData({
product: app.globalData.postProduct, showPrice: app.globalData.kjId ? 0 : price,
showPrice: app.globalData.kjId ? 0 : price, sku_id: sku_id.join(","),
sku_id: sku_id.join(",")
}) })
console.log(this.data.product)
if (!this.data.kjId && !this.data.gp_id) { if (!this.data.kjId && !this.data.gp_id) {
this.couponCom = this.selectAllComponents("#coupon")[0]; this.couponCom = this.selectAllComponents("#coupon")[0];
} }
console.log(this.data.showPrice)
this.getPostFee()
this.changePrice()
}, },
changeUserPost (e) {
let item = e.currentTarget.dataset.item
let value = e.currentTarget.dataset.value
let index = e.currentTarget.dataset.index
item.user_select_type = value
this.data.product[index] = item
this.setData({
product: this.data.product
})
this.getPostFee()
this.changePrice()
},
price() { price() {
let allPrice let allPrice
if (this.data.coupon) { if (this.data.coupon) {
@ -83,6 +145,23 @@ Page({
product: product product: product
}) })
}, },
phoneInput: function (e) {
let index = e.currentTarget.dataset.index, product = this.data.product;
product[index].phone = e.detail.value;
this.setData({
product: product
})
},
delTel: function(e) {
let index = e.currentTarget.dataset.index, product = this.data.product;
product[index].phone = "";
this.setData({
product: product
})
},
setAddress: function (e) { setAddress: function (e) {
console.log('我触发了'); console.log('我触发了');
this.setData({ this.setData({
@ -90,6 +169,31 @@ Page({
}) })
this.getPostFee() this.getPostFee()
}, },
changePickup:function (e) {
let index = e.currentTarget.dataset.index;
let item = e.currentTarget.dataset.item
this.setData({
pickupIndex: index
})
wx.navigateTo({
url:`/subPackages/techanNew/selfPickPoint/index?pickupId=null&goodsId=${item.product.id}&skuId=${item.sku.id}`
})
},
setPickUpPoint: function (data) {
console.log(data)
let goods = this.data.product[this.data.pickupIndex]
if (goods) {
goods.pickupAddress = data
}
this.setData({
product: this.data.product
})
},
minus: function (e) { minus: function (e) {
let index = e.currentTarget.dataset.index, product = this.data.product; let index = e.currentTarget.dataset.index, product = this.data.product;
let productNum = product[index].productNum; let productNum = product[index].productNum;
@ -140,27 +244,81 @@ Page({
}) })
}, },
order: function () { order: function () {
if (!this.data.address) {
wx.showToast({ for(let info of this.data.product) {
title: '请选择收货地址!', if (info.user_select_type == 0) {
icon: 'none' if (!this.data.address) {
}) wx.showToast({title: '请选择收货地址',icon: 'none'});
return; return;
}
}
if (info.user_select_type == 1) {
if (!info.pickupAddress||!info.pickupAddress.id) {
wx.showToast({title: '请选择自提点',icon: 'none'});
return;
}
if (!info.phone) {
wx.showToast({title: '请输入预留手机号',icon: 'none'});
return;
}
}
let allProductIndex = this.data.allProduct.findIndex(x=>x.keyIndex == info.keyIndex)
if (allProductIndex>=0) {
this.data.allProduct[allProductIndex] = info
}
} }
let product = this.data.product, product_list = [];
product.map(item => {
let productItem = {
type: item.product.type, // 判断邮寄自提下单结束
product_id: item.product.id, let canEnd = this.data.from == "cart"?false:true;
sku_id: item.sku.id, if (!canEnd) {
post: this.data.address.id, // 还有自提的产品
product_num: item.productNum, if (this.data.pageUseType==0 && this.data.allProduct.some(x=>x.user_select_type==1)) {
remark: item.remark, canEnd = false
is_batch_shipment: item.sku.batch_shipment, } else {
compose_sku_id: item.sku.compose_sku_id, canEnd = true
} }
product_list.push(productItem) }
})
if (!canEnd) {
this.setData({
pageUseType: 1
})
this.handleProduct()
return
}
// 真下单
let product_list = [];
for(let info of this.data.allProduct) {
let param = {
type: info.product.type,
product_id: info.product.id,
sku_id: info.sku.id,
// post: this.data.address.id,
product_num: info.productNum,
remark: info.remark,
is_batch_shipment: info.sku.batch_shipment,
compose_sku_id: info.sku.compose_sku_id,
supplier_id: info.product.supplier_id,
}
if (info.user_select_type == 0) {
param.use_type = 0
param.post = this.data.address.id
}
if (info.user_select_type == 1) {
param.use_type = 1
param.pickup_shop_id = info.pickupAddress.id
param.pickup_shop_info = info.pickupAddress
param.phone = info.phone
}
product_list.push(param)
}
let data = { let data = {
source: "WECHATXCX", source: "WECHATXCX",
product_list: product_list, product_list: product_list,
@ -189,8 +347,19 @@ Page({
data.partner_code = ZTPointProduct.product.ZTPoint data.partner_code = ZTPointProduct.product.ZTPoint
data.channel = ZTPointProduct.product.ZTPoint data.channel = ZTPointProduct.product.ZTPoint
} }
console.log(app.globalData.list) console.log(app.globalData.list,this.data.flag)
if(!app.globalData.list || app.globalData.list.length == 0){ if(!app.globalData.list || app.globalData.list.length == 0){
// 判断混合下单
let use_type = product_list[0].use_type
if (product_list.some(x=>x.use_type!=use_type)) {
app.globalData.productPrice = (this.data.showPrice + this.data.postFee - (this.data.coupon?this.data.coupon.activity.money:0))/100;
app.globalData.createDate = data
wx.redirectTo({
url: '/pages/order/orderList/index?flag=mix'
})
return
}
commonApi.user_post("order/create", { commonApi.user_post("order/create", {
data: JSON.stringify(data) data: JSON.stringify(data)
}).then(res => { }).then(res => {
@ -199,22 +368,22 @@ Page({
this.setData({ this.setData({
kjId: null kjId: null
}) })
this.onLoad({}) // this.onLoad({})
} }
app.globalData.gp_id = null; app.globalData.gp_id = null;
app.globalData.team_id = null; app.globalData.team_id = null;
this.setData({ this.setData({
gp_id: null gp_id: null
}) })
this.onLoad({}); // this.onLoad({});
}) })
}else{ }else{
app.globalData.productPrice = (this.data.showPrice + this.data.postFee - (this.data.coupon?this.data.coupon.activity.money:0))/100; app.globalData.productPrice = (this.data.showPrice + this.data.postFee - (this.data.coupon?this.data.coupon.activity.money:0))/100;
app.globalData.createDate = data app.globalData.createDate = data
console.log(app.globalData.product) console.log(app.globalData.product)
if (!app.globalData.product) { if (!app.globalData.product) {
app.globalData.product = app.globalData.list[0] app.globalData.product = app.globalData.list[0]
} }
wx.redirectTo({ wx.redirectTo({
url: '/pages/order/scene/index?flag='+this.data.flag+'&isCar='+this.data.isCar, url: '/pages/order/scene/index?flag='+this.data.flag+'&isCar='+this.data.isCar,
}) })
@ -222,7 +391,39 @@ Page({
}, },
getPostFee: function () { getPostFee: function () {
if (!this.data.address) return; if (!this.data.address) return;
let product = this.data.product, list = [], that = this; let list = [], indexList = [],that = this;
let product = this.data.product.filter((x,i)=>{
if (x.user_select_type == 0) {
indexList.push(i)
return x
}
});
if (product.length<=0) {
let postFee = 0;
this.data.product.forEach(x=>{
x.postFee = 0;
})
if (this.data.coupon && this.data.postFee != postFee) {
wx.showToast({
title: '订单价格发生变化,请重新选择优惠券',
icon: 'none'
})
app.globalData.couponInfo = null;
if (!this.data.kjId && !this.data.gp_id) {
this.couponCom.setNullCoupon()
}
this.setData({
coupon: null
})
}
this.setData({
postFee: postFee,
product: this.data.product,
})
return
}
product.map(item => { product.map(item => {
list.push(commonApi.user_post("order/get_post_price", { list.push(commonApi.user_post("order/get_post_price", {
sku_id: item.sku.id, sku_id: item.sku.id,
@ -268,9 +469,13 @@ Page({
coupon: null coupon: null
}) })
} }
for(let i=0;i<indexList.length;i++) {
this.data.product[indexList[i]] = product[i]
}
this.setData({ this.setData({
postFee: postFee, postFee: postFee,
product: product product: this.data.product
}) })
}) })
}, },

151
pages/order/postOrder/index.wxml

@ -1,70 +1,105 @@
<!--pages/order/post/index.wxml--> <!--pages/order/post/index.wxml-->
<title title="订单填写"></title> <title title="订单填写"></title>
<address bind:setAddress="setAddress"></address>
<view class="box topbox" wx:for="{{product}}"> <view class="box topbox" wx:for="{{product}}" wx:key="index">
<view class="header-title textOver" wx:if="{{from=='cart'}}"> <!-- 选择配送方式 -->
供应商:{{item.product.supplier_name}} <view class="sendwayArea" wx:if="{{from!='cart'}}">
</view> <view class="sendway-item {{item.user_select_type==0?'active':''}}" wx:if="{{item.sku.use_type==0||item.sku.use_type==3}}"
<view class="skuinfo"> bind:tap="changeUserPost" data-item="{{item}}" data-value="{{0}}" data-index="{{index}}">邮寄</view>
<image lazy-load src="{{item.sku.headimg}}" mode="aspectFill"></image> <view class="sendway-item {{item.user_select_type==1?'active':''}}" wx:if="{{item.sku.use_type==1||item.sku.use_type==3}}"
<view class="right-info"> bind:tap="changeUserPost" data-item="{{item}}" data-value="{{1}}" data-index="{{index}}">自提</view>
<view class="sku-name textOver">
<text class="textOver">{{item.product.title}}</text>
<view class="price"><text>¥</text>{{item.sku.price/100}}</view>
</view>
<view class="info-tips">
<text>{{item.sku.sku_name}}</text>
<text>x{{item.productNum}}</text>
<!-- <view bindtap="showNotice">购买须知 <text class="iconfont icon-you"></text> </view> -->
</view>
</view> </view>
</view>
<view class="box-title" wx:if="{{from!='cart'}}"> <address class="{{item.user_select_type==0?'':'hidden'}}" bind:setAddress="setAddress" wx:if="{{index==0}}"></address>
<view style="flex:1">购票数量</view>
<view wx:if="{{!kjId && !gp_id}}" class="iconfont icon-sami-select" bindtap="minus" data-index="{{index}}"></view> <view class="pickup-container" wx:if="{{item.user_select_type==1}}">
<view class="number-box">{{item.productNum}}</view> <view bind:tap="changePickup" data-index="{{index}}" data-item="{{item}}" class="box-title">
<view wx:if="{{!kjId && !gp_id}}" class="iconfont icon-add-select" bindtap="add" data-index="{{index}}"></view> <view style="flex-shrink:0" >自提点</view>
</view> <view class="flex-1 textOver">
<view class="box-title" style="height:auto;min-height:126rpx;position: relative;" wx:if="{{item.sku.is_batch_shipment}}"> <text wx:if="{{!item.pickupAddress}}" style="color: #666666;">选择提货地址</text>
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">收货方式</view> <text wx:else>{{item.pickupAddress.title}}</text>
<view class="batch-view"> </view>
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{0}}" data-index="{{index}}"> <image lazy-load class="cha"
<view class="no-select" wx:if="{{item.sku.batch_shipment==1}}"></view> src="https://static.ticket.sz-trip.com/uploads/20251028/7b4c134eef979fb0540205d18e168ae1.png" mode=""/>
<image lazy-load class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>一次性收货</text>
</view>
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{1}}" data-index="{{index}}"
style="margin-left: 30rpx;" wx:if="{{item.sku.is_batch_shipment}}">
<view class="no-select" wx:if="{{item.sku.batch_shipment==0}}"></view>
<image lazy-load class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>分批收货<text style="font-size: 24rpx;">(共{{item.sku.batch_count}}次)</text></text>
</view> </view>
<view class="batch-info-tip" wx:if="{{item.sku.is_batch_shipment && item.sku.batch_remark}}">{{item.sku.batch_remark}}</view> <view class="box-title">
<view style="flex-shrink:0" >预留手机号</view>
<view class="flex-1">
<input bindinput="phoneInput" type="number" value="{{item.phone}}" data-item="{{item}}"
data-index="{{index}}" class="weui-input" placeholder="请输入手机号" />
</view>
<image lazy-load class="cha" bindtap="delTel" wx:if="{{item.phone}}" data-index="{{index}}"
src="https://static.ticket.sz-trip.com/jundaosuzhou/images/scenicNew/cha.png" mode=""/>
<view class="cha" v-else></view>
</view>
</view> </view>
</view>
<view class="box-title" style="height:auto;min-height:113rpx;"> <view class="sku-info-container">
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">运费</view> <view class="header-title textOver" wx:if="{{from=='cart'}}">
<view style="display: flex;"> 供应商:{{item.product.supplier_name}}
<!-- <text>{{item.postFee?(item.postFee==0?'包邮':("¥"+(item.postFee/100))):item.sku.sku_model.post_template_name}}</text> -->
<text>{{item.postFee?("¥"+(item.postFee/100)):"包邮"}}</text>
<view wx:if="{{item.postFee>0 && item.sku.batch_shipment==1}}">
<text style="padding-left: 10rpx;">x{{item.sku.batch_count}}</text>
<text style="padding-left: 40rpx;">¥{{(item.postFee/100)*item.sku.batch_count}}</text>
</view> </view>
</view> <view class="skuinfo">
</view> <image lazy-load src="{{item.sku.headimg}}" mode="aspectFill"></image>
<view class="box-title" wx:if="{{flag!='mix'}}"> <view class="right-info">
<view style="flex-shrink:0" >订单备注:</view> <view class="sku-name textOver">
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input> <text class="textOver">{{item.product.title}}</text>
</view> <view class="price"><text>¥</text>{{item.sku.price/100}}</view>
<view class="all-money-box" wx:if="{{from=='cart'}}"> </view>
小计:<text class="unit">¥</text> <view class="info-tips">
<text class="s-price" wx:if="{{item.sku.batch_shipment==1}}">{{(item.sku.price * item.productNum + item.postFee*item.sku.batch_count || 0) /100}}</text> <text>{{item.sku.sku_name}}</text>
<text class="s-price" wx:else>{{(item.sku.price * item.productNum + item.postFee || 0) /100}}</text> <text>x{{item.productNum}}</text>
<!-- <view bindtap="showNotice">购买须知 <text class="iconfont icon-you"></text> </view> -->
</view>
</view>
</view>
<view class="box-title" wx:if="{{from!='cart'}}">
<view style="flex:1">购票数量</view>
<view wx:if="{{!kjId && !gp_id}}" class="iconfont icon-sami-select" bindtap="minus" data-index="{{index}}"></view>
<view class="number-box">{{item.productNum}}</view>
<view wx:if="{{!kjId && !gp_id}}" class="iconfont icon-add-select" bindtap="add" data-index="{{index}}"></view>
</view>
<view class="box-title" style="height:auto;min-height:126rpx;position: relative;" wx:if="{{item.sku.is_batch_shipment}}">
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">收货方式</view>
<view class="batch-view">
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{0}}" data-index="{{index}}">
<view class="no-select" wx:if="{{item.sku.batch_shipment==1}}"></view>
<image lazy-load class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>一次性收货</text>
</view>
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{1}}" data-index="{{index}}"
style="margin-left: 30rpx;" wx:if="{{item.sku.is_batch_shipment}}">
<view class="no-select" wx:if="{{item.sku.batch_shipment==0}}"></view>
<image lazy-load class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>分批收货<text style="font-size: 24rpx;">(共{{item.sku.batch_count}}次)</text></text>
</view>
</view> <view class="batch-info-tip" wx:if="{{item.sku.is_batch_shipment && item.sku.batch_remark}}">{{item.sku.batch_remark}}</view>
</view>
</view>
<view class="box-title" style="height:auto;min-height:113rpx;" wx:if="{{item.user_select_type==0}}">
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">运费</view>
<view style="display: flex;">
<!-- <text>{{item.postFee?(item.postFee==0?'包邮':("¥"+(item.postFee/100))):item.sku.sku_model.post_template_name}}</text> -->
<text>{{item.postFee?("¥"+(item.postFee/100)):"包邮"}}</text>
<view wx:if="{{item.postFee>0 && item.sku.batch_shipment==1}}">
<text style="padding-left: 10rpx;">x{{item.sku.batch_count}}</text>
<text style="padding-left: 40rpx;">¥{{(item.postFee/100)*item.sku.batch_count}}</text>
</view>
</view>
</view>
<view class="box-title" style="border-bottom: {{from=='cart'?1:0}}px solid #ccc;" wx:if="{{flag!='mix'}}">
<view style="flex-shrink:0" >订单备注:</view>
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view>
<view class="all-money-box" wx:if="{{from=='cart'}}">
小计:<text class="unit">¥</text>
<text class="s-price" wx:if="{{item.sku.batch_shipment==1}}">{{(item.sku.price * item.productNum + item.postFee*item.sku.batch_count || 0) /100}}</text>
<text class="s-price" wx:else>{{(item.sku.price * item.productNum + item.postFee || 0) /100}}</text>
</view>
</view>
<!-- 补贴 --> <!-- 补贴 -->
<view class="box-title allowance" wx:if="{{allowance_price}}"> <view class="box-title allowance" wx:if="{{allowance_price}}">
<view bindtap="changeAllowance">惠民补贴</view> <view bindtap="changeAllowance">惠民补贴</view>

59
pages/order/postOrder/index.wxss

@ -3,10 +3,34 @@ page {
background: #f6f6f6; background: #f6f6f6;
} }
.sendwayArea{
display: flex;
justify-content: space-between;
box-sizing: border-box;
}
.sendwayArea .sendway-item{
font-weight: 500;
font-size: 27rpx;
color: #111111;
width: 333rpx;
text-align: center;
height: 57rpx;
line-height: 57rpx;
background: #FFFFFF;
border-radius: 29rpx;
}
.sendwayArea .sendway-item.active{
border: 1px solid #0E8790;
color: #0E8790;
}
.sku-info-container{
background: #FFFFFF;
border-radius: 9rpx;
}
.box { .box {
margin: 30rpx 25rpx; margin: 30rpx 25rpx;
background: white;
border-radius: 9rpx;
} }
.box-title { .box-title {
@ -19,6 +43,30 @@ page {
align-items: center; align-items: center;
} }
.sku-info-container .box-title{
border-bottom: 1px solid #CCCCCC;
}
.pickup-container .box-title{
justify-content: space-between;
background: #FFFFFF;
margin: 26rpx 0;
border-radius: 13rpx;
padding: 0 20rpx;
}
.pickup-container .flex-1{
display: flex;
align-items: center;
justify-content: flex-end;
padding-right: 34rpx;
text-align: right;
}
.cha {
width: 20rpx;
height: 20rpx;
}
.allowance { .allowance {
justify-content: space-between; justify-content: space-between;
} }
@ -56,7 +104,6 @@ page {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 30rpx 20rpx; padding: 30rpx 20rpx;
margin-bottom: 30rpx;
} }
.skuinfo image { .skuinfo image {
@ -129,10 +176,6 @@ page {
height: 1rpx; height: 1rpx;
} }
.topbox .box-title {
border-top: 1rpx solid #ccc;
}
.box-title input { .box-title input {
flex: 1; flex: 1;
display: block; display: block;
@ -187,7 +230,7 @@ page {
font-size: 27rpx; font-size: 27rpx;
height: 80rpx; height: 80rpx;
align-items: center; align-items: center;
border-top: 1rpx solid #ccc; /* border-top: 1rpx solid #ccc; */
color: #000; color: #000;
} }

55
pages/order/scene/index.js

@ -48,6 +48,10 @@ Page({
couponFlag:false, couponFlag:false,
skuDays: 30, skuDays: 30,
selectExplain: false,
explainData: null,
showContent: false,
}, },
/** /**
@ -63,7 +67,7 @@ Page({
flag:options.flag, flag:options.flag,
date:null, date:null,
ticket_type:app.globalData.product.sku.ticket_type || 1, ticket_type:app.globalData.product.sku.ticket_type || 1,
isCar:options.isCar, isCar:options.isCar || 'single',
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 || 0, 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,
@ -71,7 +75,7 @@ Page({
time: app.globalData.product.time || {}, time: app.globalData.product.time || {},
showYhq:app.globalData.listName?false:true showYhq:app.globalData.listName?false:true
}) })
console.log('-------',this.data.product,this.data.time); console.log('-------',this.data.product,this.data.time, app.globalData);
// debugger // debugger
console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard); console.log('-------',app.globalData.product.sku.sku_model.is_need_idcard);
console.log('---是否实名----',app.globalData.product.sku.sku_model.is_authentication); console.log('---是否实名----',app.globalData.product.sku.sku_model.is_authentication);
@ -115,7 +119,13 @@ Page({
// singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price // singlePrice: this.data.gp_id ? app.globalData.product.sku.event_price : app.globalData.product.sku.price
}) })
console.log(this.data.singlePrice); console.log(this.data.singlePrice);
this.getNewCoupon()
this.getExplain()
try {
this.getNewCoupon()
} catch (e) {}
// this.showAllPrice() // this.showAllPrice()
// console.log('********',this.data.product); // console.log('********',this.data.product);
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') {
@ -520,6 +530,17 @@ changeDate: function (e) {
team_id: app.globalData.team_id, team_id: app.globalData.team_id,
linkmanList:this.data.is_authentication == 1?this.data.linkmanList:[] linkmanList:this.data.is_authentication == 1?this.data.linkmanList:[]
} }
if (this.data.selectExplain && this.data.explainData) {
let explainData = this.data.explainData
let explain_prod = {
type: explainData.product.type,
product_id: explainData.product.id,
sku_id: explainData.sku.id,
product_num: 1,
}
data.product_list.push(explain_prod)
}
if (app.globalData.from) { if (app.globalData.from) {
data.system_name = app.globalData.from; data.system_name = app.globalData.from;
} }
@ -842,6 +863,34 @@ changeDate: function (e) {
this.showAllPrice() this.showAllPrice()
}, },
// 讲解
getExplain () {
console.log(this.data.product)
commonApi._post("product/get_product_compose_list", {
product_id: this.data.product.product.id
}).then(res => {
if (res.data && res.data.length>0) {
this.setData({
explainData: res.data[0]
})
}
})
},
changeSeletExplain (e) {
let val = e.currentTarget.dataset.val;
this.setData({
selectExplain: val
})
},
changeContent (e) {
let val = e.currentTarget.dataset.val;
this.setData({
showContent: val
})
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */

53
pages/order/scene/index.wxml

@ -1,4 +1,5 @@
<!--pages/order/scene/index.wxml--> <!--pages/order/scene/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" />
<view class="{{product && product.isGroup==1?'group-order':''}}"> <view class="{{product && product.isGroup==1?'group-order':''}}">
<title title="订单填写"></title> <title title="订单填写"></title>
<!-- <view class="product-info" wx:if="{{product}}"> <!-- <view class="product-info" wx:if="{{product}}">
@ -70,7 +71,7 @@
</view> </view>
</view> </view>
<coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single' && type!='museum' && showYhq}}" id="coupon" <coupon bind:getNewCoupon = 'getNewCoupon' wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1 && isCar=='single' && type!='museum'}}" id="coupon"
money="{{singlePrice * productNum}}" sku="{{product.sku.id}}" couponFlag="{{couponFlag}}"></coupon> money="{{singlePrice * productNum}}" sku="{{product.sku.id}}" couponFlag="{{couponFlag}}"></coupon>
<!-- <view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}"> <!-- <view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}">
@ -80,7 +81,33 @@
</view> </view>
</view> --> </view> -->
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> <!-- 景点讲解 -->
<view class="explain-box" wx:if="{{explainData && explainData.id}}">
<view class="explain-title">景点讲解服务</view>
<view class="explain-prod">
<image class="explain-img" src="{{explainData.product.headimg}}"></image>
<view class="explain-content">
<view class="explain-goods textOver2">{{explainData.product.title}}</view>
<view class="explain-sku textOver2">{{explainData.sku.sku_name}}</view>
<view class="explain-price">0</view>
</view>
<view class="explain-sku" style="font-size: 28rpx;" bind:tap="changeContent" data-val="{{true}}"
style="align-self: flex-start;flex-shrink: 0;padding: 0 20rpx 0 0;">
详情 >
</view>
<view style="align-self: flex-start;flex-shrink: 0;">
<view class="iconfont icon-quan" wx:if="{{!selectExplain}}" bind:tap="changeSeletExplain" data-val="{{true}}"></view>
<view class="iconfont icon-gou1" wx:else bind:tap="changeSeletExplain" data-val="{{false}}"></view>
</view>
</view>
</view>
<!-- <view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> -->
<view style="height:138rpx"></view>
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}"> <view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}">
<view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view> <view class="fixed-price-box" wx:if="{{kjId || prizeId}}"><text>合计:</text><text class="price">¥0</text></view>
<!-- <view class="fixed-price-box" wx:elif="{{prizeId}}"><text>合计:</text><text class="price">¥0</text></view> --> <!-- <view class="fixed-price-box" wx:elif="{{prizeId}}"><text>合计:</text><text class="price">¥0</text></view> -->
@ -150,4 +177,26 @@
</view> </view>
</view> </view>
</view> </view>
<view class="mask" wx:if="{{showContent && explainData}}">
<view class="mask-bg" bind:tap="changeContent" data-val="{{false}}"></view>
<view class="mask-content2" style="min-height: 1100rpx;">
<view class="iconfont icon-close" bind:tap="changeContent" data-val="{{false}}"></view>
<view style="text-align: center;padding: 20rpx 0;">产品详情</view>
<view style="max-height: 65vh;overflow-y: auto;">
<view style="width: 100%;padding:20rpx 20rpx 0;box-sizing: border-box;">
<image style="width: 100%;border-radius: 20rpx;height: 200rpx;" mode="widthFix" src="{{explainData.product.headimg}}"></image>
<view style="font-weight: bold;padding:20rpx 0">{{explainData.product.title}}</view>
</view>
<view style="height: 10rpx;background:#f2f2f2"></view>
<view style="padding:20rpx">
<view style="font-weight: bold;padding:0 0 20rpx">产品详情</view>
<rich-text class="detail" nodes="{{tool.formateRichText(explainData.product.content)}}"></rich-text>
</view>
<view style="height: 50rpx;"></view>
</view>
</view>
</view>
</view> </view>

59
pages/order/scene/index.wxss

@ -451,3 +451,62 @@ page {
content: "¥"; content: "¥";
font-size: 24rpx; font-size: 24rpx;
} }
.explain-box{
width: 699rpx;
background: #FFFFFF;
border-radius: 9rpx;
margin: 0 auto;
padding: 26rpx 22rpx;
box-sizing: border-box;
}
.explain-box .explain-title{
font-weight: bold;
font-size: 32rpx;
color: #000000;
margin-bottom: 26rpx;
}
.explain-box .explain-prod{
display: flex;
width: 100%;
align-items: center;
}
.explain-box .explain-img{
width: 135.33rpx;
height: 112rpx;
flex-shrink: 0;
}
.explain-box .explain-content{
flex: 1;
width: 1rpx;
padding: 0 36rpx;
box-sizing: border-box;
line-height: 1;
}
.explain-box .explain-goods{
font-weight: 500;
font-size: 31rpx;
color: #000000;
}
.explain-box .explain-sku{
font-weight: 500;
font-size: 24rpx;
color: #999999;
padding: 20rpx 0;
}
.explain-box .explain-price{
font-weight: 500;
font-size: 33.33rpx;
color: #E30000;
}
.explain-box .explain-price::before{
content: "¥";
font-size: 24rpx;
}
.icon-quan{
font-size: 33rpx;
}
.icon-gou1{
color: #D62828;
font-size: 33rpx;
}

2
pages/search/list/index.wxml

@ -48,7 +48,7 @@
<view class="product-item" wx:if="{{item.ext.type=='line'}}"> <view class="product-item" wx:if="{{item.ext.type=='line'}}">
<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>
<view class="product-info"> <view class="product-info">
<view class="product-title">{{item.title}}</view> <view class="product-title textOver2">{{item.title}}</view>
<view class="sale-rate" style="margin-top:15rpx"><text style="color:#D62828;margin-right:20rpx">{{item.ext.rate}}分</text><text>月销{{item.ext.sales_number}}份</text></view> <view class="sale-rate" style="margin-top:15rpx"><text style="color:#D62828;margin-right:20rpx">{{item.ext.rate}}分</text><text>月销{{item.ext.sales_number}}份</text></view>
<view class="scene-tags textOver" style="margin-top:15rpx;margin-bottom:10rpx"> <view class="scene-tags textOver" style="margin-top:15rpx;margin-bottom:10rpx">
<text class="scene-tag textOver" wx:for="{{item.ext.display_tags}}">{{item}}</text> <text class="scene-tag textOver" wx:for="{{item.ext.display_tags}}">{{item}}</text>

50
pages/user/bindtel/index.js

@ -110,31 +110,41 @@ Page({
sendFlag: false, sendFlag: false,
codeId: res.data.id codeId: res.data.id
}) })
// 获取成功之后需要马上改变成倒计时 }
let time = 59; else {
var timer = setInterval(() => { this.changeImgCode()
// 倒计时结束需要重置可发送验证码状态和按钮文字
if (time < 0) {
// 清除定时器
clearInterval(timer)
this.setData({
buttonText: "重新发送",
sendFlag: true
})
return false;
}
this.setData({ this.setData({
buttonText: time + "秒后重新发送" picCode: ""
})
wx.showModal({
content: res.msg,
showCancel: false,
}) })
time--;
}, 1000) // this.setData({
// buttonText: "重新发送",
// sendFlag: true
// })
} }
else {
// 获取成功之后需要马上改变成倒计时
let time = 59;
var timer = setInterval(() => {
// 倒计时结束需要重置可发送验证码状态和按钮文字
if (time < 0) {
// 清除定时器
clearInterval(timer)
this.setData({
buttonText: "重新发送",
sendFlag: true
})
return false;
}
this.setData({ this.setData({
buttonText: "重新发送", buttonText: time + "秒后重新发送"
sendFlag: true
}) })
} time--;
}, 1000)
}) })
// wx.navigateToMiniProgram({ // wx.navigateToMiniProgram({

2
pages/user/bindtel/index.wxml

@ -8,7 +8,7 @@
</view> </view>
<view class="bind-item" wx:if="{{imgCodeInfo}}"> <view class="bind-item" wx:if="{{imgCodeInfo}}">
<view class="bind-item-left">图形验证码</view> <view class="bind-item-left">图形验证码</view>
<input type="number" bindinput="picCodeInput" class="weui-input" placeholder="请输入图形验证码" /> <input type="number" value="{{picCode}}" bindinput="picCodeInput" class="weui-input" placeholder="请输入图形验证码" />
<image lazy-load bindtap="changeImgCode" class="code-img" src="{{imgCodeInfo.code}}" mode="aspectFill"></image> <image lazy-load bindtap="changeImgCode" class="code-img" src="{{imgCodeInfo.code}}" mode="aspectFill"></image>
<!-- <input bindinput="telInput" class="weui-input" auto-focus placeholder="请输入手机号" /> --> <!-- <input bindinput="telInput" class="weui-input" auto-focus placeholder="请输入手机号" /> -->
</view> </view>

63
pages/user/cartlist/list.js

@ -67,6 +67,15 @@ Page({
limit:999, limit:999,
}).then(res => { }).then(res => {
let resData = this.data.list.concat((res.data || [])) let resData = this.data.list.concat((res.data || []))
resData.forEach(x=>{
if (x.product&&x.product.type == 'post'&&x.product.is_package===0&&x.delivery_method===null) {
if (x.sku.sku_model.use_type == 1) {
x.delivery_method = 1
} else {
x.delivery_method = 0
}
}
})
this.setData({ this.setData({
list: resData list: resData
}) })
@ -143,7 +152,7 @@ Page({
}, },
changeNumber(item) { changeNumber(item) {
commonApi.user_post("cart/update_sku", { commonApi.user_post("cart/update_sku", {
sku_id: item.sku.id, id: item.id,
num: item.num num: item.num
}).then(res => { }) }).then(res => { })
}, },
@ -160,6 +169,8 @@ Page({
}) })
}, },
order: function () { order: function () {
commonApi.user_post('wx/get_user_keep', { commonApi.user_post('wx/get_user_keep', {
jumpurl: '/pages/user/cartlist/list', jumpurl: '/pages/user/cartlist/list',
title: '购物车', title: '购物车',
@ -179,13 +190,15 @@ Page({
price = 0, price = 0,
product = [], product = [],
product1 = [] product1 = []
list.map(item => { list.map((item,index) => {
if (item.checked) { if (item.checked) {
// item.product.type="post"; // item.product.type="post";
if (item.product.type == 'post') { if (item.product.type == 'post') {
product.push({ product.push({
product: item.product, product: item.product,
sku: item.sku, // todo
// sku: {...item.sku, use_type: item.sku.sku_model.use_type||index},
sku: {...item.sku, use_type: item.delivery_method||0},
productNum: item.num productNum: item.num
}) })
} else { } else {
@ -205,7 +218,28 @@ Page({
return; return;
} }
let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
if(repeatSku) {
let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
wx.showModal({
content: str,
showCancel: false,
complete: (res) => {}
})
return
}
this.setData({flag:''}) this.setData({flag:''})
if (product.length>0) {
let use_type = product[0].sku.use_type
if (product.some(x=>x.sku.use_type!=use_type)) {
this.setData({
flag: 'mix',
isCar: 'multiple'
})
}
}
if (product.length > 0 && product1.length > 0) { if (product.length > 0 && product1.length > 0) {
this.setData({ this.setData({
@ -213,6 +247,8 @@ Page({
isCar: 'multiple' isCar: 'multiple'
}) })
} }
if (product1.length > 1) { if (product1.length > 1) {
this.setData({ this.setData({
isCar: 'multiple' isCar: 'multiple'
@ -239,9 +275,18 @@ Page({
url: '/pages/order/postOrder/index?from=cart&flag=' + this.data.flag, url: '/pages/order/postOrder/index?from=cart&flag=' + this.data.flag,
}) })
} else { } else {
wx.navigateTo({ if (this.data.isCar == "single") {
url: '/subPackages/gwcOrder/index?isCar=' + this.data.isCar, console.log("123")
}) wx.navigateTo({
url: '/pages/order/scene/index?isCar=' + this.data.isCar,
})
} else {
wx.navigateTo({
url: '/subPackages/gwcOrder/index?isCar=' + this.data.isCar,
})
}
} }
} }
}) })
@ -330,7 +375,7 @@ Page({
let index = e.currentTarget.dataset.index, let index = e.currentTarget.dataset.index,
list = this.data.list; list = this.data.list;
commonApi.user_post("cart/del_sku", { commonApi.user_post("cart/del_sku", {
sku_id: list[index].sku_id id: list[index].id
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
wx.showToast({ wx.showToast({
@ -350,7 +395,7 @@ Page({
let suid = [] let suid = []
arr.forEach(item => { arr.forEach(item => {
if (item.checked) { if (item.checked) {
suid.push(item.sku_id) suid.push(item.id)
} }
}); });
let skuids = suid.join(',') let skuids = suid.join(',')
@ -360,7 +405,7 @@ Page({
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
commonApi.user_post("cart/del_sku", { commonApi.user_post("cart/del_sku", {
sku_id: skuids id: skuids
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
wx.showToast({ wx.showToast({

7
pages/user/cartlist/list.wxml

@ -5,7 +5,12 @@
<view wx:for="{{list}}" class="goods-item {{item.isTouchMove ? 'touch-move-active' : ''}}" bindtouchstart='touchStart' bindtouchmove='touchmove' data-index="{{index}}"> <view wx:for="{{list}}" class="goods-item {{item.isTouchMove ? 'touch-move-active' : ''}}" bindtouchstart='touchStart' bindtouchmove='touchmove' data-index="{{index}}">
<view class="item{{(item.product.flag!=1 || item.sku.flag!='on')?' disable':''}}"> <view class="item{{(item.product.flag!=1 || item.sku.flag!='on')?' disable':''}}">
<view class="iconfont{{item.checked?' icon-gou':' icon-quan'}}" bindtap="select" data-index="{{index}}"></view> <view class="iconfont{{item.checked?' icon-gou':' icon-quan'}}" bindtap="select" data-index="{{index}}"></view>
<image lazy-load src="{{item.sku.headimg}}" mode="aspectFill" bindtap="gotoDetail" data-item="{{item}}"></image> <view class="img-container" bindtap="gotoDetail" data-item="{{item}}">
<image lazy-load src="{{item.sku.headimg}}" mode="aspectFill" ></image>
<view class="use-type" wx:if="{{item.delivery_method===0||item.delivery_method===1}}">
{{item.delivery_method===1?"自提":"邮寄"}}
</view>
</view>
<view class="item-info textOver"> <view class="item-info textOver">
<view class="title textOver">{{item.product.title}}</view> <view class="title textOver">{{item.product.title}}</view>
<view class="sku-title textOver"> <view class="sku-title textOver">

24
pages/user/cartlist/list.wxss

@ -58,12 +58,34 @@ page {
flex-shrink: 0; flex-shrink: 0;
font-size: 40rpx; font-size: 40rpx;
} }
.item image { .item .img-container{
margin: 0 25rpx; margin: 0 25rpx;
flex-shrink: 0; flex-shrink: 0;
width: 173rpx; width: 173rpx;
height: 173rpx; height: 173rpx;
border-radius: 7rpx; border-radius: 7rpx;
overflow: hidden;
position: relative;
}
.item .img-container image {
width: 173rpx;
height: 173rpx;
border-radius: 7rpx;
}
.item .img-container .use-type{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-radius: 0rpx 0rpx 7rpx 7rpx;
height: 33rpx;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 33rpx;
} }
.item-info { .item-info {
flex: 1; flex: 1;

6
pages/user/likes/index.js

@ -149,6 +149,12 @@ Page({
}); });
return return
} }
if (item.product &&item.product.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.product.id
});
return
}
switch(type){ switch(type){

6
pages/user/order/list.js

@ -94,7 +94,10 @@ Page({
res.data.list.map((item,index)=>{ res.data.list.map((item,index)=>{
let orderNum = 0; let orderNum = 0;
item.order_product_list.map(order=>{ item.order_product_list.map(order=>{
orderNum = orderNum + order.product_num; if (!order.is_bind_agent) {
orderNum = orderNum + order.product_num;
}
/// ///
// 景点线路场馆酒店四类产品的订单 如果是已支付未出票的显示出票中 // 景点线路场馆酒店四类产品的订单 如果是已支付未出票的显示出票中
if(order.state=='PAID' && (order.product_model=='venue' || order.product_model=='ticket' || order.product_model=='hotel' || order.product_model=='line')){ if(order.state=='PAID' && (order.product_model=='venue' || order.product_model=='ticket' || order.product_model=='hotel' || order.product_model=='line')){
@ -118,7 +121,6 @@ Page({
if (item.is_order_card_product==1) { if (item.is_order_card_product==1) {
item.order_product_list = [item.order_product_list[0]] item.order_product_list = [item.order_product_list[0]]
} }
item.orderNum = orderNum; item.orderNum = orderNum;
}) })
console.log(ajaxes) console.log(ajaxes)

17
pages/user/order/list.wxml

@ -18,18 +18,21 @@
</view> </view>
</view> </view>
<view style="height:176rpx"></view> <view style="height:176rpx"></view>
<view class="order-item" bindtap="gotoDetail" data-item="{{item}}" wx:for="{{list}}"> <view class="order-item" bindtap="gotoDetail" data-item="{{item}}" wx:for="{{list}}" >
<view class="order-top"> <view class="order-top">
<text>订单号:{{item.order_id}}</text> <text>订单号:{{item.order_id}}</text>
<text class="status">{{item.orderStateText?item.orderStateText:orderState[item.state]}}</text> <text class="status">{{item.orderStateText?item.orderStateText:orderState[item.state]}}</text>
</view> </view>
<view data-item="{{item}}" class="order-info" wx:for="{{item.order_product_list}}"> <view data-item="{{order}}" wx:for="{{item.order_product_list}}" wx:for-item="order">
<image lazy-load src="{{item.product_model=='movie'?item.product_img:item.sku_headimg}}" mode="aspectFill"></image> <view class="order-info" wx:if="{{!order.is_bind_agent}}">
<view class="sku-title textOver2">{{item.product_model=='movie'?item.product_title:(item.product_title+item.sku_name)}}</view> <image lazy-load src="{{order.product_model=='movie'?order.product_img:order.sku_headimg}}" mode="aspectFill"></image>
<view class="sku-tips"> <view class="sku-title textOver2">{{order.product_model=='movie'?order.product_title:(order.product_title+order.sku_name)}}</view>
<view class="sku-price">¥{{item.product_price/100}}</view> <view class="sku-tips">
<view class="sku-number">x{{item.product_num}}</view> <view class="sku-price">¥{{order.paid_money/100}}</view>
<view class="sku-number">共{{order.product_num}}件</view>
</view>
</view> </view>
</view> </view>
<view style="text-align:right;font-size:28rpx;margin-right:30rpx;color:#333"> <view style="text-align:right;font-size:28rpx;margin-right:30rpx;color:#333">
<text>共{{item.orderNum}}件商品</text> <text>共{{item.orderNum}}件商品</text>

2
pages/user/order/list.wxss

@ -84,7 +84,7 @@ page {
line-height: 40rpx; line-height: 40rpx;
} }
.sku-tips .sku-price { .sku-tips .sku-price {
margin-bottom: 10rpx; /* margin-bottom: 10rpx; */
} }
.total { .total {
text-align: right; text-align: right;

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

@ -10,6 +10,8 @@ Page({
*/ */
data: { data: {
info:null, info:null,
isPickup: false, // 是否自提
orderState:app.globalData.orderState, orderState:app.globalData.orderState,
productState:app.globalData.productState, productState:app.globalData.productState,
product_model:null, product_model:null,
@ -17,6 +19,7 @@ Page({
feeInfoFlag:false, feeInfoFlag:false,
codeIndex:0, codeIndex:0,
codeImgs:[], codeImgs:[],
imgLen: [],
minute:"", minute:"",
second:"", second:"",
id:null, id:null,
@ -99,26 +102,40 @@ Page({
}) })
}, },
getCodeImg:function(){ getCodeImg:function(){
let code = "111"; let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[]; qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[],codeId=0,arr = [];
qrcode.map((item,index)=>{
new QRCode('damocode'+index,{ this.data.info.order_product_list.forEach(qrcode=>{
text: item.use_code, qrcode.qrcode.map((item,index)=>{
width: 300 * radio, console.log(qrcode.is_force_display_code);
height: 300 * radio, item.is_force_display_code = qrcode.is_force_display_code
padding: 12, // 生成二维码四周自动留边宽度,不传入默认为0 console.log(item.is_force_display_code);
correctLevel: QRCode.CorrectLevel.L, // 二维码可辨识度 arr.push(index)
callback: (res) => { this.setData({imgLen:arr})
codeImgs.push(res.path); if(item.use_url&&item.use_code){
if(codeImgs.length==qrcode.length){ codeImgs.push({img:item.use_url,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state});
that.setData({ that.setData({
codeImgs:codeImgs codeImgs:codeImgs
}) })
} }
console.log(res) else {
} new QRCode('damocode'+codeId,{
text: item.use_code,
width: 300 * radio,
height: 300 * radio,
padding:10, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
callback: (res) => {
codeImgs.push({img:res.path,code:item.use_code,text:item.use_code_display_text,state:item.stateText,is_force_display_code:item.is_force_display_code,flag:item.state});
that.setData({
codeImgs:codeImgs
})
}
})
codeId = codeId + 1
}
})
}) })
})
}, },
prevCodeImg:function(){ prevCodeImg:function(){
let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex; let qrcode=this.data.info.order_product_list[0].qrcode,codeIndex = this.data.codeIndex;
@ -212,6 +229,11 @@ Page({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id
}); });
return return
} else if (item.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.product_id
});
return
} }
if (item.product_model=='ticket') { if (item.product_model=='ticket') {
@ -313,8 +335,28 @@ getInfo () {
order.consignee_info = order.consignee_info?JSON.parse(order.consignee_info):null; order.consignee_info = order.consignee_info?JSON.parse(order.consignee_info):null;
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):[]
if (order.pickup_shop_id>0) {
try {
order.pickupShop = JSON.parse(order.pickup_shop_info)
} catch(e) {
order.pickupShop = null
}
}
}) })
// 2025-7-21能否确认收货
res.data.is_all_confirm = true;
if (res.data.state=='PAID' && res.data.stateNums.WAIT_DELIVERY==res.data.order_product_list.length) {
res.data.order_product_list.forEach(v=>{
if (v.shipped_batch_count < v.batch_count ) {
res.data.is_all_confirm = false
}
})
} else {
res.data.is_all_confirm = false;
}
// 权益卡 // 权益卡
let cardPostList = []; let cardPostList = [];
let isCard= false; let isCard= false;
@ -326,18 +368,19 @@ getInfo () {
cardPostList.forEach(v=>{ cardPostList.forEach(v=>{
console.log(v) console.log(v)
if (v.order_card_product) { 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.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_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) 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)) { if (['WAIT_DELIVERY', 'WAIT_COMMENT', 'COMPLETED'].includes(v.state)) {
deliveryNum += 1 deliveryNum += 1
} }
}) })
} }
console.log(res.data, 'aaa')
this.setData({ this.setData({
isRefund:state.indexOf("REFUND")!=-1, isRefund:state.indexOf("REFUND")!=-1,
isPickup: res.data.order_product_list.some(v=>v.pickup_shop_id>0),
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(","),
@ -367,78 +410,30 @@ getInfo () {
util.gotoDetail(item); util.gotoDetail(item);
} }
}, },
callPhone: function (e) {
let item = e.currentTarget.dataset.item
let phone = item.pickupShop.tel
wx.makePhoneCall({
phoneNumber: phone
})
},
gotolocation: function(e) {
let item = e.currentTarget.dataset.item
let info = item.pickupShop
wx.openLocation({
latitude: Number(info.lat),
longitude: Number(info.lon),
name:info.title,
address:info.address
})
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
commonApi.user_post("order/query",{ this.getInfo()
order_id:this.data.id
}).then(res=>{
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);
this.daojishi(time);
}
let proId = []
res.data.order_product_list.forEach(item => {
proId.push(item.product_id)
})
let state = "";
res.data.stateNums = {}
res.data.order_product_list.map(order=>{
if(res.data.stateNums[order.state]){
res.data.stateNums[order.state]++;
}
else {
res.data.stateNums[order.state] = 1;
}
order.consignee_info = order.consignee_info?JSON.parse(order.consignee_info):null;
state = state + order.state;
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
})
// 2025-7-21能否确认收货
res.data.is_all_confirm = true;
if (res.data.state=='PAID' && res.data.stateNums.WAIT_DELIVERY==res.data.order_product_list.length) {
res.data.order_product_list.forEach(v=>{
if (v.shipped_batch_count < v.batch_count ) {
res.data.is_all_confirm = false
}
})
} else {
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({
isRefund:state.indexOf("REFUND")!=-1,
info:res.data,
product_model:res.data.order_product_list[0].product_model,
ids: proId.join(","),
cardPostList: cardPostList,
isCard: isCard,
deliveryNum: deliveryNum
})
this.getCodeImg()
})
}, },
/** /**

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

@ -2,8 +2,9 @@
<wxs src="../../../../utils/filter.wxs" module="tool" /> <wxs src="../../../../utils/filter.wxs" module="tool" />
<title title="订单详情"></title> <title title="订单详情"></title>
<view class="top-bg"></view> <view class="top-bg"></view>
<canvas wx:for="{{imgLen}}" wx:key="index" class="code-img" style="position:absolute;z-index:-1;" canvas-id="damocode{{index}}"></canvas>
<view class="state-text" wx:if="{{info}}">{{info.state_text}}</view> <view class="state-text" wx:if="{{info}}">{{info.state_text}}</view>
<view class="box" wx:if="{{info}}" style="color:#333"> <view class="box" wx:if="{{info&&!isPickup}}" style="color:#333">
<view class="scene-box-left" wx:if="{{info.state=='REFUND'}}" style="width:100%">您的退款已成功,退款金额预计在1-7个工作日内退还到您支付的账户</view> <view class="scene-box-left" wx:if="{{info.state=='REFUND'}}" style="width:100%">您的退款已成功,退款金额预计在1-7个工作日内退还到您支付的账户</view>
<view class="scene-box-left" wx:elif="{{info.state=='WAIT_REFUND'}}" style="width:100%">您已成功发起退款申请,请耐心等待</view> <view class="scene-box-left" wx:elif="{{info.state=='WAIT_REFUND'}}" style="width:100%">您已成功发起退款申请,请耐心等待</view>
<view class="scene-box-left" wx:elif="{{info.state=='UNPAID'}}" style="width:100%">请在00:{{minute}}:{{second}}内支付,逾期订单将自动取消</view> <view class="scene-box-left" wx:elif="{{info.state=='UNPAID'}}" style="width:100%">请在00:{{minute}}:{{second}}内支付,逾期订单将自动取消</view>
@ -13,6 +14,25 @@
<view style="font-size:26rpx;color:#333;line-height:50rpx"><text style="color:#0B898E;margin-right:10rpx" class="iconfont icon-location"></text>{{info.order_product_list[0].consignee_info.address}}</view> <view style="font-size:26rpx;color:#333;line-height:50rpx"><text style="color:#0B898E;margin-right:10rpx" class="iconfont icon-location"></text>{{info.order_product_list[0].consignee_info.address}}</view>
</view> </view>
<view class="code-box box" wx:if="{{info && isPickup && codeImgs.length>0}}">
<!-- <view bindtap="prevCodeImg" class="iconfont icon-you-copy"></view> -->
<view wx:for="{{codeImgs}}" wx:if="{{index==codeIndex}}" style="position: relative;" wx:key="index">
<image lazy-load src="{{item.img}}" mode="widthFix" style="width:300rpx;height: 300rpx;"></image>
<!-- 代表核销后是否继续展示二维码(0否1是) -->
<view class="text-shadow" wx:if="{{item.is_force_display_code != 1 && item.flag != 0}}">
<view class="text-shadow-state">
{{item.state}}
</view>
</view>
</view>
<!-- <view bindtap="nextCodeImg" class="iconfont icon-you"></view> -->
<view class="code-text">
核销码:{{codeImgs[codeIndex].code}}
<!-- <view class="copy-box" data-num="{{codeImgs[codeIndex].code}}" bindtap="copy">复制</view> -->
</view>
<!-- <view class="code-state">{{codeImgs[codeIndex].state}} {{codeIndex+1}}/{{codeImgs.length}}</view> -->
</view>
<view class="box" wx:if="{{info && info.order_product_list && info.order_product_list.length>0}}" <view class="box" wx:if="{{info && info.order_product_list && info.order_product_list.length>0}}"
wx:for="{{info.order_product_list}}"> wx:for="{{info.order_product_list}}">
<view> <view>
@ -30,47 +50,96 @@
</view> </view>
<view class="product-state">{{item.state_text}}</view> <view class="product-state">{{item.state_text}}</view>
</view> </view>
<view class="detail-item">
<text>收货方式:</text> <view >
<text wx:if="{{item.is_batch_shipment==1}}">分批收货 (共{{item.batch_count}}次)</text> <view wx:if="{{isPickup}}" class="detail-item"><text>收货方式:</text><text>自提</text></view>
<text wx:else>一次性收货</text>
</view> <view wx:else class="detail-item">
<view class="detail-item"> <text>收货方式:</text>
<text>运费:</text> <text wx:if="{{item.is_batch_shipment==1}}">分批收货 (共{{item.batch_count}}次)</text>
<view> <text wx:else>一次性收货</text>
<text style="padding-right: 56rpx;" wx:if="{{item.post_fee&&item.is_batch_shipment==1}}">¥{{item.post_fee/item.batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
<text>{{item.post_fee?("¥"+item.post_fee/100):"包邮"}}</text>
</view> </view>
</view> <!-- <view class="detail-item">
<view class="detail-item"> <text>运费:</text>
<text>小计:</text> <view>
<text>¥{{item.paid_money/100}}</text> <text style="padding-right: 56rpx;" wx:if="{{item.post_fee&&item.is_batch_shipment==1}}">¥{{item.post_fee/item.batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
</view> <text>{{item.post_fee?("¥"+item.post_fee/100):"包邮"}}</text>
</view>
</view>
<view class="detail-item">
<text>小计:</text>
<text>¥{{item.paid_money/100}}</text>
</view> -->
<!-- <view wx:if="{{item.post_detail_list.length>0}}"> --> <!-- <view wx:if="{{item.post_detail_list.length>0}}"> -->
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;"
wx:if="{{item.is_batch_shipment==1 || (item.is_batch_shipment==0&&item.post_detail_list.length>=1)}}"> <view class="detail-item">
<view class="box-title" style="position: relative;"> <text>商品总价:</text>
物流信息 <text>¥{{info.total_money/100}}</text>
<text bind:tap="expandPost" data-index="{{index}}" class="expand-tip" wx:if="{{item.is_batch_shipment==1}}">
{{item.showMore?"收起":"展开"}}
</text>
</view> </view>
<!-- 多批次发货 --> <view class="detail-item" wx:if="{{!isPickup}}">
<view wx:if="{{item.is_batch_shipment==1}}"> <text>运费:</text>
<view class="detail-item post-line-info"> <view>
<text>当前已发:{{item.shipped_batch_count}}</text> <text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}">¥{{info.total_post_fee/info.order_product_list[0].batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
<text>{{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}</text>
</view> </view>
<view class="detail-item post-line-info"> </view>
<text>当前待发:{{item.batch_count - item.shipped_batch_count}}</text> <view class="detail-item" wx:if="{{info.preference_money}}" >
<text>优惠券:</text>
<text>-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item">
<text>实付款</text>
<view class="price">¥{{info.paid_money/100}}</view>
</view>
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;"
wx:if="{{item.is_batch_shipment==1 || (item.is_batch_shipment==0&&item.post_detail_list.length>=1)}}">
<view class="box-title" style="position: relative;">
物流信息
<text bind:tap="expandPost" data-index="{{index}}" class="expand-tip" wx:if="{{item.is_batch_shipment==1}}">
{{item.showMore?"收起":"展开"}}
</text>
</view> </view>
<view class="detail-item post-line-info"> <!-- 多批次发货 -->
<text>物流备注:{{item.batch_remark}}</text> <view wx:if="{{item.is_batch_shipment==1}}">
<view class="detail-item post-line-info">
<text>当前已发:{{item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>当前待发:{{item.batch_count - item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>物流备注:{{item.batch_remark}}</text>
</view>
<view class="post-child" style="padding-top: 12rpx;" wx:if="{{item.showMore}}">
<view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex">
<view class="detail-item">快递{{shipIndex+1}}</view>
<view class="detail-item post-line-info">
<text>快递公司:{{shipment.express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{shipment.courier_number}} <text data-num="{{shipment.courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{shipment.post_time}}</text>
</view>
</view>
</view>
<!-- <view class="post-child-btn" bind:tap="expandPost" data-index="{{index}}">{{item.showMore?"收起":"展开"}}</view> -->
</view> </view>
<view class="post-child" style="padding-top: 12rpx;" wx:if="{{item.showMore}}"> <!-- 一次性发货 -->
<view wx:elif="{{item.post_detail_list.length>=1}}">
<view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex"> <view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex">
<view class="detail-item">快递{{shipIndex+1}}</view>
<view class="detail-item post-line-info"> <view class="detail-item post-line-info">
<text>快递公司:{{shipment.express_name}}</text> <text>快递公司:{{shipment.express_name}}</text>
</view> </view>
@ -81,45 +150,24 @@
</view> </view>
</view> </view>
<view class="detail-item post-line-info"> <view class="detail-item post-line-info">
<text>发货时间:{{shipment.post_time}}</text> <text>发货时间:{{shipment.post_time}} </text>
</view> </view>
</view> </view>
</view>
<!-- <view class="post-child-btn" bind:tap="expandPost" data-index="{{index}}">{{item.showMore?"收起":"展开"}}</view> -->
</view>
</view> </view>
<!-- 一次性发货 --> <view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;" wx:if="{{!isPickup}}">
<view wx:elif="{{item.post_detail_list.length>=1}}"> <view class="box-title" style="position: relative;">
<view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex"> 使用说明
<view class="detail-item post-line-info"> <text bind:tap="expandMsg" data-index="{{index}}" class="expand-tip">
<text>快递公司:{{shipment.express_name}}</text> {{item.showMsg?"收起":"展开"}}
</view> </text>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{shipment.courier_number}} <text data-num="{{shipment.courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{shipment.post_time}} </text>
</view>
</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>
</view> </view>
</view> </view>
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;">
<view class="box-title" style="position: relative;">
使用说明
<text bind:tap="expandMsg" data-index="{{index}}" class="expand-tip">
{{item.showMsg?"收起":"展开"}}
</text>
</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>
</view>
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;" wx:if="{{isCard&&cardPostList.length>0}}"> <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;"> <view class="box-title" style="position: relative;">
@ -174,29 +222,46 @@
</view> </view>
</view> </view>
<view class="box" wx:if="{{info}}"> <view class="box" wx:if="{{info && isPickup}}">
<view class="box-title">订单信息</view> <view class="box-title">自提信息</view>
<view class="detail-item">
<text>商品总价:</text> <view class="mask-shop-info">
<text>¥{{info.total_money/100}}</text> <view class="shop-info-item">
</view> <image class="start-icon" src="https://static.ticket.sz-trip.com/uploads/20251029/c84b0c0c8d99504a059b7e41035da67c.png"></image>
<view class="detail-item"> <view>预留手机号:{{info.order_product_list[0].phone}}</view>
<text>运费:</text>
<view>
<text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}">¥{{info.total_post_fee/info.order_product_list[0].batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
<text>{{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}</text>
</view> </view>
<view class="shop-info-item" style="justify-content: space-between;">
<image class="start-icon" src="https://static.ticket.sz-trip.com/uploads/20251029/a49d29cb9ad295752f298d7240fea88b.png"></image>
<view style="flex: 1;width: 100rpx;">
<view>{{info.order_product_list[0].pickupShop.title}}</view>
<view class="subtitle">{{info.order_product_list[0].pickupShop.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 style="display: flex;flex-direction: column;align-items: center;padding-left: 40rpx;"
catch:tap="callPhone" data-item="{{info.order_product_list[0]}}">
<image class="icon-phone" src="https://static.ticket.sz-trip.com/uploads/20250926/6d69afa7a2f955f60fd7cd5475e2b119.png"></image>
<view style="font-size: 24rpx;color: #666666;margin-top: 14rpx;font-weight: 500;">电话</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;padding-left: 40rpx;"
catch:tap="gotolocation" data-item="{{info.order_product_list[0]}}">
<image class="icon-phone" src="https://static.ticket.sz-trip.com/uploads/20250926/6ce5e0467e0745e5f1140b6757ada213.png"></image>
<view style="font-size: 24rpx;color: #666666;margin-top: 14rpx;font-weight: 500;">导航</view>
</view>
</view>
</view> </view>
<view class="detail-item" wx:if="{{info.preference_money}}" >
<text>优惠券:</text>
<text>-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item">
<text>实付款</text>
<view class="price">¥{{info.paid_money/100}}</view>
</view>
<view style="border-top:1rpx solid #ccc;margin: 12rpx 0;"></view> </view>
<view class="box" wx:if="{{info}}">
<view class="box-title">订单信息</view>
<!-- <view style="border-top:1rpx solid #ccc;margin: 12rpx 0;"></view> -->
<view class="detail-item"> <view class="detail-item">
<text>订单编号:</text> <text>订单编号:</text>

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

@ -16,6 +16,18 @@ page {
color: #fff; color: #fff;
font-size: 48rpx; font-size: 48rpx;
} }
.copy-box {
width: 73rpx;
line-height: 35rpx;
border-radius: 7rpx;
border: 1rpx solid #09898C;
margin-left: 15rpx;
text-align: center;
font-weight: 500;
font-size: 23rpx;
color: #0E8790;
height: 40rpx;
}
.box { .box {
padding: 20rpx; padding: 20rpx;
background: white; background: white;
@ -202,8 +214,8 @@ page {
top: 30rpx; top: 30rpx;
} }
.code-box { .code-box {
text-align: center; text-align: center;
height: 530rpx; min-height: 340rpx;
position: relative; position: relative;
} }
.code-box .iconfont { .code-box .iconfont {
@ -240,6 +252,8 @@ page {
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
margin: 25rpx; margin: 25rpx;
display: flex;
justify-content: center;
} }
.code-btn { .code-btn {
width: 220rpx; width: 220rpx;
@ -440,3 +454,36 @@ color: #333333;
height: 100%; height: 100%;
border-radius: 50%; border-radius: 50%;
} }
.mask-shop-info{
font-weight: 500;
font-size: 31rpx;
color: #000000;
}
.shop-info-item{
display: flex;
align-items: flex-start;
font-family: PingFang SC;
font-weight: bold;
font-size: 27rpx;
color: #000000;
padding: 20rpx 0;
word-wrap: break-all;
}
.shop-info-item .start-icon{
width: 33.33rpx;
height: 33.33rpx;
margin: 4rpx 17rpx 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;
}

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

@ -245,6 +245,11 @@ Page({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id
}); });
return return
} else if (item.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.product_id
});
return
} }
if (item.product_model=='ticket') { if (item.product_model=='ticket') {

5
pages/user/order/showOrderInfo/index.js

@ -240,6 +240,11 @@ Page({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id
}); });
return return
} else if (item.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.product_id
});
return
} }
if (item.product_model=='ticket') { if (item.product_model=='ticket') {

1
pages/user/order/showOrderInfo/index.wxml

@ -48,6 +48,7 @@
<view wx:if="{{info.state!='UNPAID'}}"> <view wx:if="{{info.state!='UNPAID'}}">
<navigator wx:if="{{info.order_product_list[0].is_package==1}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> <navigator wx:if="{{info.order_product_list[0].is_package==1}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:elif="{{info.order_product_list[0].is_package==2}}" url="/subPackages/goods/oneCardTour/info/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator> <navigator wx:elif="{{info.order_product_list[0].is_package==2}}" url="/subPackages/goods/oneCardTour/info/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator>
<navigator wx:elif="{{info.order_product_list[0].is_package==3}}" url="/subPackages/goods/memberCard/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:else url="/pages/info/showInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> <navigator wx:else url="/pages/info/showInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
</view> </view>

3
pages/user/user.wxml

@ -66,9 +66,10 @@
<!-- <navigator url="order/team/list" class="user-box-line" catchtap="pagePoint" data-event="mine_teamorder"> <!-- <navigator url="order/team/list" class="user-box-line" catchtap="pagePoint" data-event="mine_teamorder">
团体预约订单 团体预约订单
</navigator> --> </navigator> -->
<navigator url="videoCoupon/index" class="user-box-line"> <navigator url="/pages/pbService/web/index?weburl=https://m.cloud.sz-trip.com/PrizeLog" class="user-box-line">
中奖记录 中奖记录
</navigator> </navigator>
<!-- <navigator url="service/index" class="user-box-line" catchtap="pagePoint" data-event="mine_customerservice"> <!-- <navigator url="service/index" class="user-box-line" catchtap="pagePoint" data-event="mine_customerservice">
在线客服 在线客服
</navigator> --> </navigator> -->

192
project.config.json

@ -1,102 +1,102 @@
{ {
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"packOptions": { "packOptions": {
"ignore": [], "ignore": [],
"include": [] "include": []
},
"setting": {
"urlCheck": false,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": false,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [
{
"packageJsonPath": "./package.json",
"miniprogramNpmDistDir": "./miniprogram/"
}
],
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": true,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}, },
"enableEngineNative": false, "setting": {
"bundle": false, "urlCheck": false,
"useIsolateContext": true, "es6": true,
"useCompilerModule": false, "enhance": true,
"userConfirmedUseCompilerModuleSwitch": false, "postcss": true,
"userConfirmedBundleSwitch": false, "preloadBackgroundData": false,
"packNpmManually": false, "minified": true,
"minifyWXSS": true, "newFeature": true,
"lazyloadPlaceholderEnable": false, "coverView": true,
"useStaticServer": true, "nodeModules": false,
"showES6CompileOption": false, "autoAudits": false,
"disableUseStrict": false, "showShadowRootInWxmlPanel": true,
"useCompilerPlugins": false, "packNpmRelationList": [
"minifyWXML": true, {
"condition": false, "packageJsonPath": "./package.json",
"ignoreUploadUnusedFiles": true "miniprogramNpmDistDir": "./miniprogram/"
}, }
"compileType": "miniprogram", ],
"libVersion": "3.8.9", "scopeDataCheck": false,
"appid": "wx4bb7b6050831f585", "uglifyFileName": false,
"projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85", "checkInvalidKey": true,
"simulatorType": "wechat", "checkSiteMap": true,
"simulatorPluginLibVersion": {}, "uploadWithSourceMap": true,
"condition": { "compileHotReLoad": false,
"miniprogram": { "useMultiFrameRuntime": true,
"list": [ "useApiHook": true,
{ "useApiHostProcess": true,
"name": "pages/user/bindtel/index", "babelSetting": {
"pathName": "pages/user/bindtel/index", "ignore": [],
"query": "id=0000000000LINELINEINFO18082257199008", "disablePlugins": [],
"scene": null "outputPath": ""
}, },
{ "enableEngineNative": false,
"name": "好行", "bundle": false,
"pathName": "pages/list/haoxing/index", "useIsolateContext": true,
"query": "", "useCompilerModule": false,
"scene": null "userConfirmedUseCompilerModuleSwitch": false,
}, "userConfirmedBundleSwitch": false,
{ "packNpmManually": false,
"name": "pages/list/activitynew/index", "minifyWXSS": true,
"pathName": "pages/list/activitynew/index", "lazyloadPlaceholderEnable": false,
"query": "id=0000000000LINELINEINFO18082257199008", "useStaticServer": true,
"scene": null "showES6CompileOption": false,
}, "disableUseStrict": false,
{ "useCompilerPlugins": false,
"name": "微旅行", "minifyWXML": true,
"pathName": "pages/list/minitrip/index", "condition": false,
"query": "", "ignoreUploadUnusedFiles": true
"scene": null },
}, "compileType": "miniprogram",
{ "libVersion": "3.8.9",
"name": "一日游", "appid": "wx4bb7b6050831f585",
"pathName": "pages/list/oneday/index", "projectname": "%E8%8B%8F%E5%B7%9E%E6%96%87%E6%97%85",
"query": "", "simulatorType": "wechat",
"scene": null "simulatorPluginLibVersion": {},
"condition": {
"miniprogram": {
"list": [
{
"name": "pages/user/bindtel/index",
"pathName": "pages/user/bindtel/index",
"query": "id=0000000000LINELINEINFO18082257199008",
"scene": null
},
{
"name": "好行",
"pathName": "pages/list/haoxing/index",
"query": "",
"scene": null
},
{
"name": "pages/list/activitynew/index",
"pathName": "pages/list/activitynew/index",
"query": "id=0000000000LINELINEINFO18082257199008",
"scene": null
},
{
"name": "微旅行",
"pathName": "pages/list/minitrip/index",
"query": "",
"scene": null
},
{
"name": "一日游",
"pathName": "pages/list/oneday/index",
"query": "",
"scene": null
}
]
} }
] },
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
} }
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
} }

77
project.private.config.json

@ -6,6 +6,83 @@
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{
"name": "pages/info/roadInfo/index",
"pathName": "pages/info/roadInfo/index",
"query": "id=465058",
"scene": null,
"launchMode": "default"
},
{
"name": "pages/pbService/web/index",
"pathName": "pages/pbService/web/index",
"query": "weburl=https://test.m.cloud.sz-trip.com/selectedHotels",
"launchMode": "default",
"scene": null
},
{
"name": "pages/group/index",
"pathName": "pages/group/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "pages/info/sceneProductInfo/index",
"pathName": "pages/info/sceneProductInfo/index",
"query": "id=5257",
"launchMode": "default",
"scene": null
},
{
"name": "subPackages/postSearch/index",
"pathName": "subPackages/postSearch/index",
"query": "type_id=1&ids=",
"launchMode": "default",
"scene": null
},
{
"name": "pages/info/postProductInfo/index",
"pathName": "pages/info/postProductInfo/index",
"query": "id=462080",
"launchMode": "default",
"scene": null
},
{
"name": "pages/info/postProductInfo/index",
"pathName": "pages/info/postProductInfo/index",
"query": "id=464888",
"launchMode": "default",
"scene": null
},
{
"name": "pages/order/orderList/index",
"pathName": "pages/order/orderList/index",
"query": "flag=mix",
"launchMode": "default",
"scene": null
},
{
"name": "subPackages/techanNew/selfPickPoint/index",
"pathName": "subPackages/techanNew/selfPickPoint/index",
"query": "pickupId=null&goodsId=457654&skuId=190836",
"launchMode": "default",
"scene": null
},
{
"name": "pages/info/postProductInfo/index",
"pathName": "pages/info/postProductInfo/index",
"query": "id=457654",
"launchMode": "default",
"scene": null
},
{
"name": "subPackages/goods/memberCard/index",
"pathName": "subPackages/goods/memberCard/index",
"query": "id=464704",
"launchMode": "default",
"scene": null
},
{ {
"name": "subPackages/foodListNew/index", "name": "subPackages/foodListNew/index",
"pathName": "subPackages/foodListNew/index", "pathName": "subPackages/foodListNew/index",

2
subPackageCheckPoint/app.js

@ -1 +1 @@
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./common/vendor.js");Math;const o={globalData:{baseUrl:null,innerAudioContext:t.index.createInnerAudioContext(),T:""},onLaunch:function(){this.globalData.baseUrl="https://jdsz.ispush.com",this.globalData.innerAudioContext.src=`${this.globalData.baseUrl}/static/audio/bg.mp3`,this.globalData.innerAudioContext.obeyMuteSwitch=!1,this.globalData.innerAudioContext.autoplay=!1,this.globalData.innerAudioContext.loop=!0,console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},onShareAppMessage:t=>({title:"君到苏州最美打卡点",path:"pages/index/index"}),onShareTimeline:()=>({title:"君到苏州最美打卡点",path:"pages/index/index"})};function e(){return{app:t.createSSRApp(o)}}e().app.mount("#app"),exports.createApp=e; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./common/vendor.js");Math;const o={globalData:{baseUrl:null,innerAudioContext:t.index.createInnerAudioContext(),T:""},onLaunch:function(){this.globalData.baseUrl="https://jdsz.ispush.com",this.globalData.innerAudioContext.src=`${this.globalData.baseUrl}/static/audio/bg.mp3`,this.globalData.innerAudioContext.obeyMuteSwitch=!1,this.globalData.innerAudioContext.autoplay=!1,this.globalData.innerAudioContext.loop=!0,console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")},onShareAppMessage:t=>({title:"君到苏州最美打卡点",path:"subPackageCheckPoint/pages/index/index"}),onShareTimeline:()=>({title:"君到苏州最美打卡点",path:"subPackageCheckPoint/pages/index/index"})};function e(){return{app:t.createSSRApp(o)}}e().app.mount("#app"),exports.createApp=e;

8
subPackageCheckPoint/pages/detailsmap/index.wxml

@ -1 +1,7 @@
<audio-com wx:if="{{a}}" class="r data-v-5f2d6979" u-r="audioCom" u-i="5f2d6979-0" bind:__l="__l"></audio-com><view class="content data-v-5f2d6979" style="{{'background:' + w}}"><view class="bgBox data-v-5f2d6979"><view class="bgItem bgGusuItem data-v-5f2d6979" style="{{'width:' + d + ';' + ('height:' + e)}}"><image lazy-load class="data-v-5f2d6979" src="{{c}}"/></view></view><movable-area class="movableArea data-v-5f2d6979" style="width:100vw;height:100vh"><movable-view class="data-v-5f2d6979" style="{{'width:' + h + ';' + ('height:' + i)}}" disabled="{{j}}" animation="{{false}}" scale-value="{{k}}" scale-min="{{l}}" x="{{m}}" y="{{n}}" scale="true" direction="all" out-of-bounds="true" bindchange="{{o}}" bindscale="{{p}}"><view class="detailsMap data-v-5f2d6979"><image lazy-load class="data-v-5f2d6979" src="{{f}}"/></view><view wx:for="{{g}}" wx:for-item="item" wx:key="a" class="detailsMapPoint data-v-5f2d6979" style="{{'width:' + item.b + ';' + ('height:' + item.c) + ';' + ('left:' + item.d) + ';' + ('top:' + item.e) + ';' + ('z-index:' + item.f)}}" bindtap="{{item.g}}" data-name="{{item.h}}"></view><view class="stickyMask data-v-5f2d6979"></view></movable-view></movable-area><view class="stickyMask data-v-5f2d6979"><view class="stickyItem data-v-5f2d6979"><view class="stickyTitle data-v-5f2d6979" style="{{'width:' + r + ';' + ('height:' + s) + ';' + ('left:' + t) + ';' + ('top:' + v)}}"><image lazy-load class="data-v-5f2d6979" src="{{q}}"/></view></view></view></view> <audio-com wx:if="{{a}}" class="r data-v-5f2d6979" u-r="audioCom" u-i="5f2d6979-0" bind:__l="__l"></audio-com>
<view class="content data-v-5f2d6979" style="{{'background:' + w}}">
<view class="bgBox data-v-5f2d6979">
<view class="bgItem bgGusuItem data-v-5f2d6979" style="{{'width:' + d + ';' + ('height:' + e)}}">
<image lazy-load class="data-v-5f2d6979" src="{{c}}"/></view></view>
<movable-area class="movableArea data-v-5f2d6979" style="width:100vw;height:100vh;overflow: hidden;">
<movable-view class="data-v-5f2d6979" style="{{'width:' + h + ';' + ('height:' + i)}}" disabled="{{true}}" animation="{{false}}" scale-value="{{k}}" scale-min="{{l}}" x="{{m}}" y="{{n}}" scale="true" direction="all" out-of-bounds="true" bindchange="{{o}}" bindscale="{{p}}"><view class="detailsMap data-v-5f2d6979"><image lazy-load class="data-v-5f2d6979" src="{{f}}"/></view><view wx:for="{{g}}" wx:for-item="item" wx:key="a" class="detailsMapPoint data-v-5f2d6979" style="{{'width:' + item.b + ';' + ('height:' + item.c) + ';' + ('left:' + item.d) + ';' + ('top:' + item.e) + ';' + ('z-index:' + item.f)}}" bindtap="{{item.g}}" data-name="{{item.h}}"></view><view class="stickyMask data-v-5f2d6979"></view></movable-view></movable-area><view class="stickyMask data-v-5f2d6979"><view class="stickyItem data-v-5f2d6979"><view class="stickyTitle data-v-5f2d6979" style="{{'width:' + r + ';' + ('height:' + s) + ';' + ('left:' + t) + ';' + ('top:' + v)}}"><image lazy-load class="data-v-5f2d6979" src="{{q}}"/></view></view></view></view>

8
subPackageCheckPoint/pages/detailsmap/index.wxss

@ -1,2 +1,8 @@
@import "../../app.wxss"; @import "../../app.wxss";
.content.data-v-5f2d6979{background:#eeeeed}.detailsMap.data-v-5f2d6979{width:100%;height:100%}.detailsMap>image.data-v-5f2d6979{width:100%;height:100%}.detailsMapPoint.data-v-5f2d6979{position:absolute}.detailsMapPoint>image.data-v-5f2d6979{width:100%;height:100%}.stickyMask.data-v-5f2d6979{position:absolute;pointer-events:none;width:750rpx;height:1334rpx;z-index:999;top:0}.stickyMask .stickyItem.data-v-5f2d6979{position:absolute;left:0;top:0;width:750rpx;height:1334rpx}.stickyMask .stickyItem .stickyTitle.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*1188rpx);height:calc(var(--base-width)*378rpx);left:calc(var(--base-width)*708rpx);top:calc(var(--base-width)*200rpx);transform:translate(150%);opacity:0;animation:1s stickyTitleAnime-5f2d6979 ease-in-out forwards}.stickyMask .stickyItem .stickyTitle>image.data-v-5f2d6979{width:100%;height:100%}.stickyMask .stickyItem .stickyGusuLeft.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*1067rpx);height:calc(var(--base-width)*759rpx);left:calc(var(--base-width)*0rpx);top:calc(var(--base-width)*2388rpx);transform:translate(-150%);opacity:0;animation:1s stickyGusuLeftAnime-5f2d6979 ease-in-out forwards}.stickyMask .stickyItem .stickyGusuLeft>image.data-v-5f2d6979{width:100%;height:100%}.stickyMask .stickyItem .stickyGusuRight.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*601rpx);height:calc(var(--base-width)*258rpx);right:0;top:calc(var(--base-width)*3260rpx);transform:translate(150%);opacity:0;animation:1s ease-in-out stickyGusuRightAnime-5f2d6979 forwards}.stickyMask .stickyItem .stickyGusuRight>image.data-v-5f2d6979{width:100%;height:100%}.bgBox.data-v-5f2d6979{position:absolute;width:calc(var(--base-width) * 2160rpx);height:calc(var(--base-width) * 3840rpx);top:0}.bgBox .bgItem.data-v-5f2d6979{width:100%;height:100%;top:0}.bgBox .bgItem>image.data-v-5f2d6979{width:100%;height:100%}@keyframes stickyTitleAnime-5f2d6979{0%{transform:translate(150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes stickyGusuLeftAnime-5f2d6979{0%{transform:translate(-150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes stickyGusuRightAnime-5f2d6979{0%{transform:translate(150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes bgGusuItemAnime-5f2d6979{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}} .content.data-v-5f2d6979{background:#eeeeed;overflow: hidden;}
.detailsMap.data-v-5f2d6979{width:100%;height:100%;overflow: hidden;}
.detailsMap>image.data-v-5f2d6979{width:100%;height:100%}
.detailsMapPoint.data-v-5f2d6979{position:absolute}
.detailsMapPoint>image.data-v-5f2d6979{width:100%;height:100%}
.stickyMask.data-v-5f2d6979{position:absolute;pointer-events:none;width:750rpx;height:1334rpx;z-index:999;top:0}
.stickyMask .stickyItem.data-v-5f2d6979{position:absolute;left:0;top:0;width:750rpx;height:1334rpx}.stickyMask .stickyItem .stickyTitle.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*1188rpx);height:calc(var(--base-width)*378rpx);left:calc(var(--base-width)*708rpx);top:calc(var(--base-width)*200rpx);transform:translate(150%);opacity:0;animation:1s stickyTitleAnime-5f2d6979 ease-in-out forwards}.stickyMask .stickyItem .stickyTitle>image.data-v-5f2d6979{width:100%;height:100%}.stickyMask .stickyItem .stickyGusuLeft.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*1067rpx);height:calc(var(--base-width)*759rpx);left:calc(var(--base-width)*0rpx);top:calc(var(--base-width)*2388rpx);transform:translate(-150%);opacity:0;animation:1s stickyGusuLeftAnime-5f2d6979 ease-in-out forwards}.stickyMask .stickyItem .stickyGusuLeft>image.data-v-5f2d6979{width:100%;height:100%}.stickyMask .stickyItem .stickyGusuRight.data-v-5f2d6979{position:absolute;width:calc(var(--base-width)*601rpx);height:calc(var(--base-width)*258rpx);right:0;top:calc(var(--base-width)*3260rpx);transform:translate(150%);opacity:0;animation:1s ease-in-out stickyGusuRightAnime-5f2d6979 forwards}.stickyMask .stickyItem .stickyGusuRight>image.data-v-5f2d6979{width:100%;height:100%}.bgBox.data-v-5f2d6979{position:absolute;width:calc(var(--base-width) * 2160rpx);height:calc(var(--base-width) * 3840rpx);top:0}.bgBox .bgItem.data-v-5f2d6979{width:100%;height:100%;top:0}.bgBox .bgItem>image.data-v-5f2d6979{width:100%;height:100%}@keyframes stickyTitleAnime-5f2d6979{0%{transform:translate(150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes stickyGusuLeftAnime-5f2d6979{0%{transform:translate(-150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes stickyGusuRightAnime-5f2d6979{0%{transform:translate(150%);opacity:0}to{transform:translate(0);opacity:1}}@keyframes bgGusuItemAnime-5f2d6979{0%{transform:scale(.8);opacity:0}to{transform:scale(1);opacity:1}}

2
subPackageCheckPoint/pages/index/index.js

@ -1,2 +1,2 @@
require('../../app.js'); require('../../app.js');
"use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),o={components:{audioCom:()=>"../../components/audioCom.js"},data:()=>({comDom:!0,homeShowState:!0,scopeMapShowState:!1,x:0,y:0,old:{x:0,y:0},scopePointList:[{w:"76rpx",h:"55rpx",x:"270rpx",y:"715rpx",tag:"姑苏区",source:"/subPackageCheckPoint/static/images/scopeMap/gusuqu.png",state:!0},{w:"76rpx",h:"54rpx",x:"177rpx",y:"667rpx",tag:"高新区",source:"/subPackageCheckPoint/static/images/scopeMap/gaoxinqu.png",state:!0},{w:"73rpx",h:"60rpx",x:"520rpx",y:"710rpx",tag:"昆山市",source:"/subPackageCheckPoint/static/images/scopeMap/kunshanshi.png",state:!0},{w:"76rpx",h:"58rpx",x:"616rpx",y:"510rpx",tag:"太仓市",source:"/subPackageCheckPoint/static/images/scopeMap/taicangshi.png",state:!0},{w:"100rpx",h:"56rpx",x:"360rpx",y:"706rpx",tag:"工业园区",source:"/subPackageCheckPoint/static/images/scopeMap/gongyeyuanqu.png",state:!0},{w:"75rpx",h:"58rpx",x:"390rpx",y:"464rpx",tag:"常熟市",source:"/subPackageCheckPoint/static/images/scopeMap/changshushi.png",state:!0},{w:"76rpx",h:"55rpx",x:"343rpx",y:"940rpx",tag:"吴江区",source:"/subPackageCheckPoint/static/images/scopeMap/wujiangqu.png",state:!0},{w:"75rpx",h:"54rpx",x:"220rpx",y:"810rpx",tag:"吴中区",source:"/subPackageCheckPoint/static/images/scopeMap/wuzhongqu.png",state:!0},{w:"76rpx",h:"56rpx",x:"278rpx",y:"613rpx",tag:"相城区",source:"/subPackageCheckPoint/static/images/scopeMap/xiangchengqu.png",state:!0},{w:"101rpx",h:"49rpx",x:"236rpx",y:"284rpx",tag:"张家港市",source:"/subPackageCheckPoint/static/images/scopeMap/zhangjiagangshi.png",state:!0}]}),async onLoad(){},onShareAppMessage:e=>({title:"君到苏州最美打卡点",path:"pages/index/index"}),onShareTimeline:()=>({title:"君到苏州最美打卡点",path:"pages/index/index"}),onShow(){this.comDom=!0},onHide(){this.comDom=!1},methods:{openMap(){e.index.navigateTo({url:"/subPackageCheckPoint/pages/scopemap/index"})},getClass:e=>`scopePoint${e+1}`,showScopeMap(){this.homeShowState=!1,this.scopeMapShowState=!0},getScopePointStyle:e=>({width:e.w,height:e.h,left:e.x,top:e.y}),openDetailsMap(t){t.state?e.index.navigateTo({url:`/subPackageCheckPoint/pages/detailsmap/index?tag=${t.tag}`}):e.index.showToast({title:"暂未开放",icon:"error",duration:2e3})},onChange(e){this.old.x=e.detail.x,this.old.y=e.detail.y}}};if(!Array){e.resolveComponent("audio-com")()}const a=e._export_sfc(o,[["render",function(o,a,p,s,i,r){return e.e({a:i.comDom},i.comDom?{b:e.sr("audioCom","46c0ccd2-0")}:{},{c:t._imports_0,d:t._imports_1,e:i.homeShowState,f:e.o(((...e)=>r.showScopeMap&&r.showScopeMap(...e))),g:t._imports_2,h:t._imports_3,i:i.scopeMapShowState,j:t._imports_4,k:e.f(i.scopePointList,((t,o,a)=>({a:t.source,b:e.n(r.getClass(o)),c:o,d:e.s(r.getScopePointStyle(t)),e:t.tag,f:e.o((e=>r.openDetailsMap(t)),o)}))),l:"750rpx",m:"1334rpx",n:i.x,o:i.y,p:e.o(((...e)=>r.onChange&&r.onChange(...e))),q:i.scopeMapShowState,r:t._imports_5,s:i.scopeMapShowState,t:t._imports_6,v:i.scopeMapShowState})}],["__scopeId","data-v-46c0ccd2"]]);o.__runtimeHooks=6,wx.createPage(a); "use strict";const e=require("../../common/vendor.js"),t=require("../../common/assets.js"),o={components:{audioCom:()=>"../../components/audioCom.js"},data:()=>({comDom:!0,homeShowState:!0,scopeMapShowState:!1,x:0,y:0,old:{x:0,y:0},scopePointList:[{w:"76rpx",h:"55rpx",x:"270rpx",y:"715rpx",tag:"姑苏区",source:"/subPackageCheckPoint/static/images/scopeMap/gusuqu.png",state:!0},{w:"76rpx",h:"54rpx",x:"177rpx",y:"667rpx",tag:"高新区",source:"/subPackageCheckPoint/static/images/scopeMap/gaoxinqu.png",state:!0},{w:"73rpx",h:"60rpx",x:"520rpx",y:"710rpx",tag:"昆山市",source:"/subPackageCheckPoint/static/images/scopeMap/kunshanshi.png",state:!0},{w:"76rpx",h:"58rpx",x:"616rpx",y:"510rpx",tag:"太仓市",source:"/subPackageCheckPoint/static/images/scopeMap/taicangshi.png",state:!0},{w:"100rpx",h:"56rpx",x:"360rpx",y:"706rpx",tag:"工业园区",source:"/subPackageCheckPoint/static/images/scopeMap/gongyeyuanqu.png",state:!0},{w:"75rpx",h:"58rpx",x:"390rpx",y:"464rpx",tag:"常熟市",source:"/subPackageCheckPoint/static/images/scopeMap/changshushi.png",state:!0},{w:"76rpx",h:"55rpx",x:"343rpx",y:"940rpx",tag:"吴江区",source:"/subPackageCheckPoint/static/images/scopeMap/wujiangqu.png",state:!0},{w:"75rpx",h:"54rpx",x:"220rpx",y:"810rpx",tag:"吴中区",source:"/subPackageCheckPoint/static/images/scopeMap/wuzhongqu.png",state:!0},{w:"76rpx",h:"56rpx",x:"278rpx",y:"613rpx",tag:"相城区",source:"/subPackageCheckPoint/static/images/scopeMap/xiangchengqu.png",state:!0},{w:"101rpx",h:"49rpx",x:"236rpx",y:"284rpx",tag:"张家港市",source:"/subPackageCheckPoint/static/images/scopeMap/zhangjiagangshi.png",state:!0}]}),async onLoad(){},onShareAppMessage:e=>({title:"君到苏州最美打卡点",path:"subPackageCheckPoint/pages/index/index"}),onShareTimeline:()=>({title:"君到苏州最美打卡点",path:"subPackageCheckPoint/pages/index/index"}),onShow(){this.comDom=!0},onHide(){this.comDom=!1},methods:{openMap(){e.index.navigateTo({url:"/subPackageCheckPoint/pages/scopemap/index"})},getClass:e=>`scopePoint${e+1}`,showScopeMap(){this.homeShowState=!1,this.scopeMapShowState=!0},getScopePointStyle:e=>({width:e.w,height:e.h,left:e.x,top:e.y}),openDetailsMap(t){t.state?e.index.navigateTo({url:`/subPackageCheckPoint/pages/detailsmap/index?tag=${t.tag}`}):e.index.showToast({title:"暂未开放",icon:"error",duration:2e3})},onChange(e){this.old.x=e.detail.x,this.old.y=e.detail.y}}};if(!Array){e.resolveComponent("audio-com")()}const a=e._export_sfc(o,[["render",function(o,a,p,s,i,r){return e.e({a:i.comDom},i.comDom?{b:e.sr("audioCom","46c0ccd2-0")}:{},{c:t._imports_0,d:t._imports_1,e:i.homeShowState,f:e.o(((...e)=>r.showScopeMap&&r.showScopeMap(...e))),g:t._imports_2,h:t._imports_3,i:i.scopeMapShowState,j:t._imports_4,k:e.f(i.scopePointList,((t,o,a)=>({a:t.source,b:e.n(r.getClass(o)),c:o,d:e.s(r.getScopePointStyle(t)),e:t.tag,f:e.o((e=>r.openDetailsMap(t)),o)}))),l:"750rpx",m:"1334rpx",n:i.x,o:i.y,p:e.o(((...e)=>r.onChange&&r.onChange(...e))),q:i.scopeMapShowState,r:t._imports_5,s:i.scopeMapShowState,t:t._imports_6,v:i.scopeMapShowState})}],["__scopeId","data-v-46c0ccd2"]]);o.__runtimeHooks=6,wx.createPage(a);

81
subPackages/feiyiNew/index.js

@ -44,7 +44,9 @@ Page({
seachFlag:false, //搜索模式 seachFlag:false, //搜索模式
totalPrice:0, //获取购物车总价 totalPrice:0, //获取购物车总价
name:'非遗专卖', name:'非遗专卖',
nowAddListId:[] nowAddListId:[],
user_type: null,
}, },
/** /**
@ -69,10 +71,10 @@ Page({
delAll() { delAll() {
let ids = [] let ids = []
this.data.gwcList.forEach(item => { this.data.gwcList.forEach(item => {
ids.push(item.sku_id) ids.push(item.id)
}) })
commonApi.user_post("cart_within/del_sku", { commonApi.user_post("cart_within/del_sku", {
sku_id: ids+'', id: ids+'',
type:'2' type:'2'
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -92,10 +94,11 @@ Page({
del(e) { del(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
let gwcList = this.data.gwcList let gwcList = this.data.gwcList
let valueNum = e.currentTarget.dataset.value
commonApi.user_post("cart_within/update_sku", { commonApi.user_post("cart_within/update_sku", {
num:item.num-1, num:item.num + valueNum,
sku_id: item.sku_id, id: item.id,
type:'2' type:'1'
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
// this.getCount() // this.getCount()
@ -117,6 +120,9 @@ Page({
if (item.selected ==1) { if (item.selected ==1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
} }
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
@ -132,6 +138,13 @@ Page({
}, },
// 添加产品到购物车 // 添加产品到购物车
addCart: function (e) { addCart: function (e) {
if (![0,1].includes(this.data.user_type)) {
wx.showToast({
title: "请选择配送方式",
icon:"none"
})
return
}
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
app.globalData.postProduct = [] app.globalData.postProduct = []
app.globalData.list = [] app.globalData.list = []
@ -144,7 +157,8 @@ Page({
commonApi.user_post("cart_within/add_sku", { commonApi.user_post("cart_within/add_sku", {
sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id, sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum, num: this.data.producNum,
type:"2" type:"2",
delivery_method: this.data.user_type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
@ -187,6 +201,9 @@ Page({
if (element.selected == 1) { if (element.selected == 1) {
totalPrice += Number(element.num*element.sku.price) totalPrice += Number(element.num*element.sku.price)
} }
if (element.delivery_method === null) {
element.delivery_method = element.sku.sku_model.use_type == 1?1:0
}
}) })
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
this.setData({ this.setData({
@ -252,7 +269,7 @@ Page({
if (item.product.type == 'post') { if (item.product.type == 'post') {
product.push({ product.push({
product: item.product, product: item.product,
sku: item.sku, sku: {...item.sku, use_type: item.delivery_method||0},
productNum: item.num productNum: item.num
}) })
} else { } else {
@ -271,21 +288,27 @@ Page({
// }) // })
return; return;
} }
if (product.length > 0 && product1.length > 0) { let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
this.setData({ if(repeatSku) {
flag: 'mix', let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
isCar: 'multiple' wx.showModal({
content: str,
showCancel: false,
complete: (res) => {}
}) })
return
} }
if (product1.length > 1) {
this.setData({ let useType = product[0].sku.use_type
isCar: 'multiple' let flag = this.data.flag, isCar = "single";
}) if (product.some(x=>x.sku.use_type!=useType)) {
} else { flag = "mix"
this.setData({ isCar = "multiple"
isCar: 'single'
})
} }
this.setData({
flag: flag,
isCar: isCar
})
console.log(product1); console.log(product1);
app.globalData.postProduct = product; app.globalData.postProduct = product;
if (app.globalData.list) { if (app.globalData.list) {
@ -427,6 +450,9 @@ Page({
if(item.selected == 1) { if(item.selected == 1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
} }
this.setData({ this.setData({
@ -581,6 +607,9 @@ Page({
}, },
// 添加产品弹窗 1.首先获取到该产品下的规格 // 添加产品弹窗 1.首先获取到该产品下的规格
addBuyCart(e) { addBuyCart(e) {
this.setData({
user_type: null
})
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item); console.log(item);
commonApi._post("product/get_product_detail", { commonApi._post("product/get_product_detail", {
@ -594,6 +623,7 @@ Page({
this.setData({ this.setData({
info: res.data, info: res.data,
// skuFlag: "cart" // skuFlag: "cart"
user_type: res.data.sku[0].use_type>1?null:res.data.sku[0].use_type,
}) })
this.showCart() this.showCart()
this.BroswerRecord() this.BroswerRecord()
@ -637,9 +667,16 @@ Page({
selectSku: function (e) { selectSku: function (e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
skuIndex: index skuIndex: index,
}) user_type: this.data.info.sku[index].use_type>1?null:this.data.info.sku[index].use_type,
})
}, },
changeSelectSkuPost: function(e) {
let value = e.currentTarget.dataset.value;
this.setData({
user_type: value,
})
},
// 关闭弹窗 // 关闭弹窗
hideSku: function () { hideSku: function () {
this.setData({ this.setData({

30
subPackages/feiyiNew/index.wxml

@ -197,6 +197,25 @@
<view class="number">{{producNum}}</view> <view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view> <view class="iconfont icon-add-select" bindtap="add"></view>
</view> </view>
<view class="delivery-method" wx:if="{{info.is_package!=1}}">
<view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">
<view class="select-cycle" wx:if="{{user_type!==0}}"></view>
<view class="select-cycle selected" wx:else>
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">邮寄</view>
</view>
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=0}}" bind:tap="changeSelectSkuPost" data-value="{{1}}">
<view class="select-cycle" wx:if="{{user_type!==1}}"></view>
<view class="select-cycle selected" wx:else="">
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">自提</view>
</view>
</view>
</view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="btn-box"> <view class="btn-box">
<!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}} <!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}}
@ -209,7 +228,7 @@
<!-- 购物车的弹窗 --> <!-- 购物车的弹窗 -->
<view class="mask" wx:if="{{showPopup}}"> <view class="mask" wx:if="{{showPopup}}">
<view bindtap="openPopup" class="mask-bg"></view> <view bindtap="openPopup" class="mask-bg"></view>
<view class="mask-content" style="padding: 40rpx 0 180rpx;min-height: 600rpx;"> <view class="mask-content" style="padding: 40rpx 0 180rpx;height: 900rpx;">
<view style="margin: 0 26.67rpx;"> <view style="margin: 0 26.67rpx;">
<!-- 顶部操作按钮 --> <!-- 顶部操作按钮 -->
<view class="flex" style="margin-bottom: 56.67rpx;"> <view class="flex" style="margin-bottom: 56.67rpx;">
@ -228,7 +247,10 @@
<image lazy-load wx:if="{{item.selected ==1}}" style="width: 40rpx;height: 40rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" /> <image lazy-load wx:if="{{item.selected ==1}}" style="width: 40rpx;height: 40rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view> <view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
</view> </view>
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" /> <view style="position: relative;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;">
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="use-type">{{item.delivery_method==1?"自提":"邮寄"}}</view>
</view>
<view class="main"> <view class="main">
<view> <view>
<view class="title textOver">{{item.product.title}}</view> <view class="title textOver">{{item.product.title}}</view>
@ -237,9 +259,9 @@
<view class="main-bottom"> <view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view> <view class="price">{{item.sku.price/100}}</view>
<view class="num-box"> <view class="num-box">
<image lazy-load class="reduce" catchtap="del" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" /> <image lazy-load class="reduce" catchtap="del" data-item="{{item}}" data-value="{{-1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" />
<view style="margin: 0 25.33rpx;">{{item.num}}</view> <view style="margin: 0 25.33rpx;">{{item.num}}</view>
<image lazy-load class="grow" catchtap="addCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" /> <image lazy-load class="grow" catchtap="del" data-item="{{item}}" data-value="{{1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view> </view>
</view> </view>
</view> </view>

56
subPackages/feiyiNew/index.wxss

@ -440,7 +440,7 @@ page {
display: flex; display: flex;
font-size: 29rpx; font-size: 29rpx;
color: #333; color: #333;
margin: 0 40rpx; margin: 0 30rpx;
text-align: center; text-align: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -777,3 +777,57 @@ page {
.phcolor { .phcolor {
color: #ccc; color: #ccc;
} }
.delivery-method{
font-weight: 400;
font-size: 29rpx;
color: #1E1E1E;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40rpx 40rpx;
}
.delivery-method .select-cycle{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1px solid #999999;
overflow: hidden;
flex-shrink: 0;
}
.delivery-method .select-cycle image{
width: 100%;
height: 100%;
}
.delivery-method .select-cycle.selected {
border: none;
}
.delivery-method .select-cycle.selected image{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
}
.delivery-method .method-str{
padding-left: 10rpx;
flex-shrink: 0;
}
.delivery-method .flex-center{
width: 150rpx;
justify-content: flex-end;
display: flex;
align-items: center;
}
.use-type{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-radius: 0rpx 0rpx 7rpx 7rpx;
height: 33rpx;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 33rpx;
}

13
subPackages/foodNew/index.js

@ -167,15 +167,16 @@ Page({
} catch(e) {} } catch(e) {}
// let swiperRange = this.data.swiperRange; let swiperRange = this.data.swiperRange;
// swiperRange.video = resData.videourl? { min: 0, max: 0 } : { min: -1, max: -1 } 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.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} swiperRange.sku = {min:swiperRange.picture.max+1,max:swiperRange.picture.max+1+resData.sku.length-1}
this.setData({ this.setData({
info: resData, info: resData,
// swiperRange: swiperRange, swiperRange: swiperRange,
shareImg: null, shareImg: null,
prod_phone: resData.scene_tel prod_phone: resData.scene_tel,
swiperCurrent: 0
}) })
this.drawImg() this.drawImg()

6
subPackages/foodNew/index.wxml

@ -34,14 +34,17 @@
<!-- <view class="share-icon" bindtap="share"></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> <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;"> <view style="position: relative;">
<scroll-view>
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}" <swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}" current="{{swiperCurrent}}"
interval="{{2000}}" duration="{{300}}" bindchange="swiperChange"> interval="{{2000}}" duration="{{300}}" bindchange="swiperChange">
<block wx:if="{{info.videourl}}" wx:key="*this"> <block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item> <swiper-item>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{true}}" muted="{{true}}" <scroll-view>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{false}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}" show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video> show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
<!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> --> <!-- <image lazy-load src="{{info.headimg}}" mode="aspectFill"></image> -->
</scroll-view>
</swiper-item> </swiper-item>
</block> </block>
<block wx:for="{{info.listimg}}" wx:key="*this"> <block wx:for="{{info.listimg}}" wx:key="*this">
@ -58,6 +61,7 @@
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</scroll-view>
<view class="swiper-bottom" wx:if="{{info}}"> <view class="swiper-bottom" wx:if="{{info}}">
<!-- <view class="swuper-bottom-bg"> <!-- <view class="swuper-bottom-bg">
<view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}" <view class="swiper-bottom-item {{(swiperCurrent>=swiperRange.video.min&&swiperCurrent<=swiperRange.video.max)?'active':''}}"

743
subPackages/goods/memberCard/index.js

@ -0,0 +1,743 @@
// 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 util 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,
retailId: "",
cartTop: 0,
cartImgInfo: null,
cartCount: 0,
shareImg: null,
showShareFlag: false,
allowance_data: null,
showAllowance: 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,
},
/**
* 生命周期函数--监听页面加载
*/
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
})
}
if (options.retailId) {
this.setData({
retailId: options.retailId
})
}
commonApi._post("product/get_product_detail", {
id: options.id
}).then(res => {
res.data.display_tags = (res.data.display_tags ? res.data.display_tags.split(",") : []).splice(0, 2);
if (options.skuid) {
let sku = res.data.sku.find(item => item.id == options.skuid);
res.data.sku = [sku];
}
res.data.sku.forEach(x=>{
x.display_tags = (x.display_tags ? x.display_tags.split(",")[0] : "");
})
let resData = res.data
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({
info: resData,
swiperRange: swiperRange,
})
this.BroswerRecord()
})
},
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;
}
},
changeAllowance: function () {
this.setData({
showAllowance: !this.data.showAllowance
})
},
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)
},
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 => {
if (res.code == 1) {
this.setData({
isLike: isLike == 1 ? 0 : 1
})
}
})
},
changeMenu: function (e) {
let index = e.currentTarget.dataset.index;
this.setData({
type: index
})
},
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 () {
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 (this.data.skuFlag == '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;
// 购买
let product = [{
product: {...this.data.info,ZTPoint:this.data.ZTPoint},
sku: this.data.info.sku[this.data.skuIndex],
productNum: this.data.producNum
}];
app.globalData.postProduct = product;
app.globalData.retailId = this.data.retailId;
app.globalData.listName = null
wx.navigateTo({
url: '/pages/order/postOrder/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) {
return
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;
}
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
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

5
subPackages/goods/memberCard/index.json

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

226
subPackages/goods/memberCard/index.wxml

@ -0,0 +1,226 @@
<!--pages/info/hotelProductInfo/index.wxml-->
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="产品详情"></title>
<!-- <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;">
<scroll-view>
<swiper class="swiper" wx:if="{{info}}" autoplay="{{autoPlay}}"
interval="{{2000}}" duration="{{300}}" >
<block wx:if="{{info.videourl}}" wx:key="*this">
<swiper-item>
<scroll-view>
<video bindplay="playVideo" src="{{info.videourl}}" autoplay="{{false}}" muted="{{true}}"
show-mute-btn="{{true}}" show-background-playback-button="{{false}}"
show-progress="{{false}}" enable-progress-gesture="{{false}}"></video>
</scroll-view>
</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>
</scroll-view>
<!-- <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">
<view class="title">{{info.title}}</view>
<view class="price-box">
<text class="top-price">¥{{info.sku[skuIndex].price / 100}}</text>
<text class="old-price">¥{{info.sku[skuIndex].market_price / 100}}</text>
</view>
</view>
</view>
<view class="scroll-all-box" id="menus" wx:if="{{info}}">
<!-- <view class="scroll-menus{{fixed?' fixed-menus':''}}" style="top:{{top}}px"> -->
<view class="scroll-menus">
<view class="type-box">
<view class="scroll-menu-item{{type==1?' active':''}}" bindtap="changeMenu" data-index="1">{{info.sku[skuIndex].display_tags}}</view>
<view class="scroll-menu-item{{type==2?' active':''}}" bindtap="changeMenu" data-index="2">增值权益</view>
</view>
</view>
<!-- <view style="height:85rpx" wx:if="{{fixed}}"></view> -->
<view class="info-box" >
<rich-text wx:if="{{type==1}}" class="details" nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.detailinfo)}}"></rich-text>
<rich-text wx:if="{{type==2}}" class="details" nodes="{{tool.formateRichText(info.sku[skuIndex].sku_model.expenseinfo)}}"></rich-text>
</view>
</view>
<view style="height:140rpx"></view>
<view class="fixed-bottom">
<view class="['left-img','no-shop']">
<!-- <navigator wx:if="{{iShop}}" url="/pages/list/store/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>
<view class="btns">
<view class="btn" bindtap="showCart">加入购物车</view>
<view class="btn" bindtap="showOrder">立即购买</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>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code>
<view class="mask" wx:if="{{otherInfoShow>0}}">
<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 class="key-title">该商品预计13小时内发货</view>
<view class="key-content">订单支付成功后48小时内发货,若未在48小时内发货消费者 可联系客服咨询催促发货。</view> -->
</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 class="prod-param">
<view class="prod-key">名称</view>
<view class="prod-content">鸡头米</view>
</view>
<view class="prod-param">
<view class="prod-key">购买须知</view>
<view class="prod-content">购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知购买须知</view>
</view> -->
</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>

1025
subPackages/goods/memberCard/index.wxss

File diff suppressed because it is too large

2
subPackages/password/overview/overview.wxml

@ -14,7 +14,7 @@
<view class="iconfont icon-you"></view> <view class="iconfont icon-you"></view>
</view> </view>
<view bindtap="goSetting" data-type="reset" class="profile-item" wx:if="{{havePassword&&!isLock}}"> <view bindtap="goSetting" data-type="reset" class="profile-item" wx:if="{{havePassword&&!isLock}}">
<text>忘记密码</text> <text>重置密码</text>
<view class="info"></view> <view class="info"></view>
<view class="iconfont icon-you"></view> <view class="iconfont icon-you"></view>
</view> </view>

2
subPackages/password/setting/setting.js

@ -41,7 +41,7 @@ Page({
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
type: options.type||'add', type: options.type||'add',
title: options.type=='reset'?'忘记密码':options.type=='edit'?'修改密码':'设置支付密码', title: options.type=='reset'?'重置密码':options.type=='edit'?'修改密码':'设置支付密码',
editConfrim: options.type == 'edit'?true:false editConfrim: options.type == 'edit'?true:false
}) })
}, },

75
subPackages/postSearch/index.js

@ -26,7 +26,9 @@ Page({
totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格 totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格
nowAddListId:[], nowAddListId:[],
type:'', //购物车分类1文创,2非遗 type:'', //购物车分类1文创,2非遗
show:false show:false,
user_type: null,
}, },
/** /**
@ -60,6 +62,14 @@ Page({
}, },
// 添加产品到购物车 // 添加产品到购物车
addCart: function (e) { addCart: function (e) {
if (![0,1].includes(this.data.user_type)) {
wx.showToast({
title: "请选择配送方式",
icon:"none"
})
return
}
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
app.globalData.postProduct = [] app.globalData.postProduct = []
app.globalData.list = [] app.globalData.list = []
@ -72,7 +82,8 @@ Page({
commonApi.user_post("cart_within/add_sku", { commonApi.user_post("cart_within/add_sku", {
sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id, sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum, num: this.data.producNum,
type:this.data.type type:this.data.type,
delivery_method: this.data.user_type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
@ -107,6 +118,9 @@ Page({
if (element.selected == 1) { if (element.selected == 1) {
totalPrice += Number(element.num*element.sku.price) totalPrice += Number(element.num*element.sku.price)
} }
if (element.delivery_method === null) {
element.delivery_method = element.sku.sku_model.use_type == 1?1:0
}
}) })
console.log(res.data); console.log(res.data);
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
@ -173,7 +187,7 @@ Page({
if (item.product.type == 'post') { if (item.product.type == 'post') {
product.push({ product.push({
product: item.product, product: item.product,
sku: item.sku, sku: {...item.sku, use_type: item.delivery_method||0},
productNum: item.num productNum: item.num
}) })
} else { } else {
@ -207,6 +221,29 @@ Page({
isCar: 'single' isCar: 'single'
}) })
} }
let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
if(repeatSku) {
let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
wx.showModal({
content: str,
showCancel: false,
complete: (res) => {}
})
return
}
let useType = product[0].sku.use_type
let flag = this.data.flag, isCar = "single";
if (product.some(x=>x.sku.use_type!=useType)) {
flag = "mix"
isCar = "multiple"
}
this.setData({
flag: flag,
isCar: isCar
})
console.log(product1); console.log(product1);
app.globalData.postProduct = product; app.globalData.postProduct = product;
if (app.globalData.list) { if (app.globalData.list) {
@ -248,10 +285,10 @@ selectedIt(e) {
delAll() { delAll() {
let ids = [] let ids = []
this.data.gwcList.forEach(item => { this.data.gwcList.forEach(item => {
ids.push(item.sku_id) ids.push(item.id)
}) })
commonApi.user_post("cart_within/del_sku", { commonApi.user_post("cart_within/del_sku", {
sku_id: ids+'', id: ids+'',
type:this.data.type type:this.data.type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -270,9 +307,10 @@ delAll() {
del(e) { del(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
let gwcList = this.data.gwcList let gwcList = this.data.gwcList
let valueNum = e.currentTarget.dataset.value
commonApi.user_post("cart_within/update_sku", { commonApi.user_post("cart_within/update_sku", {
num:item.num-1, num:item.num + valueNum,
sku_id: item.sku_id, id: item.id,
type:this.data.type type:this.data.type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -295,6 +333,9 @@ del(e) {
if (item.selected ==1) { if (item.selected ==1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
} }
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
@ -367,6 +408,9 @@ openPopup() {
if (item.selected == 1) { if (item.selected == 1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
// console.log(arr); // console.log(arr);
// debugger // debugger
@ -380,7 +424,8 @@ openPopup() {
}, },
search() { search() {
this.setData({ this.setData({
list:[] list:[],
show:false
}) })
this.getList() this.getList()
}, },
@ -390,9 +435,6 @@ openPopup() {
}) })
}, },
getList() { getList() {
this.setData({
show:false
})
let list= this.data.list; let list= this.data.list;
if (this.data.keywords == '' || this.data.keywords.indexOf(' ')!==-1) { if (this.data.keywords == '' || this.data.keywords.indexOf(' ')!==-1) {
return return
@ -458,6 +500,8 @@ openPopup() {
this.setData({ this.setData({
info: res.data, info: res.data,
// skuFlag: "cart" // skuFlag: "cart"
skuIndex: 0,
user_type: res.data.sku[0].use_type>1?1:res.data.sku[0].use_type
}) })
this.showCart() this.showCart()
this.BroswerRecord() this.BroswerRecord()
@ -501,9 +545,16 @@ openPopup() {
selectSku: function (e) { selectSku: function (e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
skuIndex: index skuIndex: index,
user_type: this.data.info.sku[index].use_type>1?null:this.data.info.sku[index].use_type,
}) })
}, },
changeSelectSkuPost: function(e) {
let value = e.currentTarget.dataset.value;
this.setData({
user_type: value,
})
},
// 关闭弹窗 // 关闭弹窗
hideSku: function () { hideSku: function () {
this.setData({ this.setData({

36
subPackages/postSearch/index.wxml

@ -1,18 +1,18 @@
<view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;"> <view class="title-box{{transparent==1?' bg-box':''}}" style="height:{{isScene==1?'0':(height+padHeight)}}px;">
<view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px"> <view class="title-header" style="padding-top:{{padHeight}}px;height:{{height}}px">
<icon bindtap="back" class="iconfont icon-fanhui1"></icon> <icon bindtap="back" class="iconfont icon-fanhui1"></icon>
<view bindtap="indexFocus" class="search-box" style="margin-right:{{right + 5}}px;"> <view class="search-box" style="margin-right:{{right + 5}}px;">
<icon class="iconfont icon-sousuo"></icon> <icon class="iconfont icon-sousuo"></icon>
<input placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="searchInput" class="weui-input" placeholder="请输入商品名称" /> <input placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="searchInput" class="weui-input" placeholder="请输入商品名称" />
<!-- <input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" /> --> <!-- <input bindfocus="inputFocus" placeholder-class="{{transparent==1?'phcolor':''}}" bindinput="getVal" class="weui-input" placeholder="搜索" /> -->
<view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;"> <view wx:if="{{isScene!=1}}" style="display: flex;padding-right: 12rpx;">
<view style="color: #ccc;">|</view> <view style="color: #ccc;">|</view>
<view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;" bindtap="getList">搜索</view> <view style="margin-left:22rpx;font-weight: 400;font-size: 29rpx;color: #0B898E;" bindtap="search">搜索</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{show}}"> <view>
<view class="hot-list" wx:if="{{list.length>0}}"> <view class="hot-list" wx:if="{{list.length>0}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="this"> <view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="this">
<view class="hot-item" wx:if="{{index%2==number}}" wx:for="{{list}}" bindtap="goodsDetail" data-goods="{{item}}" wx:key="id"> <view class="hot-item" wx:if="{{index%2==number}}" wx:for="{{list}}" bindtap="goodsDetail" data-goods="{{item}}" wx:key="id">
@ -83,6 +83,25 @@
<view class="number">{{producNum}}</view> <view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view> <view class="iconfont icon-add-select" bindtap="add"></view>
</view> </view>
<view class="delivery-method" wx:if="{{info.is_package!=1}}">
<view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">
<view class="select-cycle" wx:if="{{user_type!==0}}"></view>
<view class="select-cycle selected" wx:else>
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">邮寄</view>
</view>
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=0}}" bind:tap="changeSelectSkuPost" data-value="{{1}}">
<view class="select-cycle" wx:if="{{user_type!==1}}"></view>
<view class="select-cycle selected" wx:else="">
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">自提</view>
</view>
</view>
</view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="btn-box"> <view class="btn-box">
<!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}} <!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}}
@ -95,7 +114,7 @@
<!-- 购物车的弹窗 --> <!-- 购物车的弹窗 -->
<view class="mask" wx:if="{{showPopup}}"> <view class="mask" wx:if="{{showPopup}}">
<view bindtap="openPopup" class="mask-bg"></view> <view bindtap="openPopup" class="mask-bg"></view>
<view class="mask-content" style="padding: 40rpx 0 180rpx;min-height: 600rpx;"> <view class="mask-content" style="padding: 40rpx 0 180rpx;height: 900rpx;">
<view style="margin: 0 26.67rpx;"> <view style="margin: 0 26.67rpx;">
<!-- 顶部操作按钮 --> <!-- 顶部操作按钮 -->
<view class="flex" style="margin-bottom: 56.67rpx;"> <view class="flex" style="margin-bottom: 56.67rpx;">
@ -114,7 +133,10 @@
<image lazy-load wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" /> <image lazy-load wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view> <view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
</view> </view>
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" /> <view style="position: relative;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;">
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="use-type">{{item.delivery_method==1?"自提":"邮寄"}}</view>
</view>
<view class="main"> <view class="main">
<view> <view>
<view class="title textOver">{{item.product.title}}</view> <view class="title textOver">{{item.product.title}}</view>
@ -123,9 +145,9 @@
<view class="main-bottom"> <view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view> <view class="price">{{item.sku.price/100}}</view>
<view class="num-box"> <view class="num-box">
<image lazy-load class="reduce" catchtap="del" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" /> <image lazy-load class="reduce" catchtap="del" data-item="{{item}}" data-value="{{-1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" />
<view style="margin: 0 25.33rpx;">{{item.num}}</view> <view style="margin: 0 25.33rpx;">{{item.num}}</view>
<image lazy-load class="grow" catchtap="addCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" /> <image lazy-load class="grow" catchtap="del" data-item="{{item}}" data-value="{{1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view> </view>
</view> </view>
</view> </view>

56
subPackages/postSearch/index.wxss

@ -318,7 +318,7 @@
display: flex; display: flex;
font-size: 29rpx; font-size: 29rpx;
color: #333; color: #333;
margin: 0 40rpx; margin: 0 30rpx;
text-align: center; text-align: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -472,3 +472,57 @@
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
} }
.delivery-method{
font-weight: 400;
font-size: 29rpx;
color: #1E1E1E;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40rpx 40rpx;
}
.delivery-method .select-cycle{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1px solid #999999;
overflow: hidden;
flex-shrink: 0;
}
.delivery-method .select-cycle image{
width: 100%;
height: 100%;
}
.delivery-method .select-cycle.selected {
border: none;
}
.delivery-method .select-cycle.selected image{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
}
.delivery-method .method-str{
padding-left: 10rpx;
flex-shrink: 0;
}
.delivery-method .flex-center{
width: 150rpx;
justify-content: flex-end;
display: flex;
align-items: center;
}
.use-type{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-radius: 0rpx 0rpx 7rpx 7rpx;
height: 33rpx;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 33rpx;
}

91
subPackages/techanNew/index.js

@ -52,7 +52,9 @@ Page({
seachFlag:false, //搜索模式 seachFlag:false, //搜索模式
totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格 totalPrice:0, //获取购物车总价--打开购物车后勾选的产品价格
name:'文创特产', name:'文创特产',
nowAddListId:[] nowAddListId:[],
user_type: null,
}, },
/** /**
@ -87,10 +89,10 @@ Page({
delAll() { delAll() {
let ids = [] let ids = []
this.data.gwcList.forEach(item => { this.data.gwcList.forEach(item => {
ids.push(item.sku_id) ids.push(item.id)
}) })
commonApi.user_post("cart_within/del_sku", { commonApi.user_post("cart_within/del_sku", {
sku_id: ids+'', id: ids+'',
type:'1' type:'1'
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -107,11 +109,12 @@ Page({
}, },
// 减少一个 // 减少一个
del(e) { del(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item;
let gwcList = this.data.gwcList let gwcList = this.data.gwcList;
let valueNum = e.currentTarget.dataset.value
commonApi.user_post("cart_within/update_sku", { commonApi.user_post("cart_within/update_sku", {
num:item.num-1, num:item.num + valueNum,
sku_id: item.sku_id, id: item.id,
type:'1' type:'1'
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
@ -134,6 +137,9 @@ Page({
if (item.selected ==1) { if (item.selected ==1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
} }
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
@ -149,6 +155,14 @@ Page({
}, },
// 添加产品到购物车 // 添加产品到购物车
addCart: function (e) { addCart: function (e) {
if (![0,1].includes(this.data.user_type)) {
wx.showToast({
title: "请选择配送方式",
icon:"none"
})
return
}
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
app.globalData.postProduct = [] app.globalData.postProduct = []
app.globalData.list = [] app.globalData.list = []
@ -161,7 +175,8 @@ Page({
commonApi.user_post("cart_within/add_sku", { commonApi.user_post("cart_within/add_sku", {
sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id, sku_id: this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id,
num: this.data.producNum, num: this.data.producNum,
type:"1" type:"1",
delivery_method: this.data.user_type
}).then(res => { }).then(res => {
if (res.code == 1) { if (res.code == 1) {
let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id let sku_id = this.data.showPopup ? item.sku.id :this.data.info.sku[this.data.skuIndex].id
@ -195,6 +210,9 @@ Page({
if (element.selected == 1) { if (element.selected == 1) {
totalPrice += Number(element.num*element.sku.price) totalPrice += Number(element.num*element.sku.price)
} }
if (element.delivery_method === null) {
element.delivery_method = element.sku.sku_model.use_type == 1?1:0
}
}) })
console.log(res.data); console.log(res.data);
let status = res.data.every(el => el.selected === 1) let status = res.data.every(el => el.selected === 1)
@ -261,7 +279,7 @@ Page({
if (item.product.type == 'post') { if (item.product.type == 'post') {
product.push({ product.push({
product: item.product, product: item.product,
sku: item.sku, sku: {...item.sku, use_type: item.delivery_method||0},
productNum: item.num productNum: item.num
}) })
} else { } else {
@ -280,21 +298,28 @@ Page({
// }) // })
return; return;
} }
if (product.length > 0 && product1.length > 0) { let repeatSku = product.find(x=>product.filter(v=>v.sku.id == x.sku.id).length>1)
this.setData({ if(repeatSku) {
flag: 'mix', let str = `${repeatSku.product.title}-${repeatSku.sku.sku_name}邮寄和自提只能选择一种`
isCar: 'multiple' wx.showModal({
content: str,
showCancel: false,
complete: (res) => {}
}) })
return
} }
if (product1.length > 1) {
this.setData({ let useType = product[0].sku.use_type
isCar: 'multiple' let flag = this.data.flag, isCar = "single";
}) if (product.some(x=>x.sku.use_type!=useType)) {
} else { flag = "mix"
this.setData({ isCar = "multiple"
isCar: 'single'
})
} }
this.setData({
flag: flag,
isCar: isCar
})
console.log(product1); console.log(product1);
app.globalData.postProduct = product; app.globalData.postProduct = product;
if (app.globalData.list) { if (app.globalData.list) {
@ -414,14 +439,12 @@ Page({
}, },
// 获取历史购物车详情 // 获取历史购物车详情
getCount() { getCount() {
// debugger
commonApi.user_post('cart_within/get_list', { commonApi.user_post('cart_within/get_list', {
type:'1' type:'1'
}).then(res => { }).then(res => {
let arr = res.data,totalPrice = 0,cartCount=0 let arr = res.data,totalPrice = 0,cartCount=0
if (arr.length>0) { if (arr.length>0) {
arr.forEach(item=> { arr.forEach(item=> {
// totalPrice += item.num*item.sku.price
cartCount += item.num cartCount += item.num
}) })
} }
@ -433,15 +456,17 @@ Page({
} }
}) })
}) })
// debugger
arr.forEach(item=> { arr.forEach(item=> {
if(item.selected == 1) { if(item.selected == 1) {
totalPrice += item.num*item.sku.price totalPrice += item.num*item.sku.price
} }
if (item.delivery_method === null) {
item.delivery_method = item.sku.sku_model.use_type == 1?1:0
}
}) })
} }
// console.log(arr);
// debugger
this.setData({ this.setData({
cartCount: cartCount, //1 cartCount: cartCount, //1
gwcList:arr, gwcList:arr,
@ -605,6 +630,7 @@ Page({
}, },
// 添加产品弹窗 1.首先获取到该产品下的规格 // 添加产品弹窗 1.首先获取到该产品下的规格
addBuyCart(e) { addBuyCart(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item); console.log(item);
commonApi._post("product/get_product_detail", { commonApi._post("product/get_product_detail", {
@ -617,6 +643,8 @@ Page({
res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0 res.data.flag = res.data.sku.find(item => item.flag == 'on') ? res.data.flag : 0
this.setData({ this.setData({
info: res.data, info: res.data,
skuIndex: 0,
user_type: res.data.sku[0].use_type>1?null:res.data.sku[0].use_type
// skuFlag: "cart" // skuFlag: "cart"
}) })
this.showCart() this.showCart()
@ -661,9 +689,18 @@ Page({
selectSku: function (e) { selectSku: function (e) {
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
this.setData({ this.setData({
skuIndex: index skuIndex: index,
user_type: this.data.info.sku[index].use_type>1?null:this.data.info.sku[index].use_type,
}) })
}, },
changeSelectSkuPost: function(e) {
let value = e.currentTarget.dataset.value;
this.setData({
user_type: value,
})
},
// 关闭弹窗 // 关闭弹窗
hideSku: function () { hideSku: function () {
this.setData({ this.setData({

32
subPackages/techanNew/index.wxml

@ -177,6 +177,27 @@
<view class="number">{{producNum}}</view> <view class="number">{{producNum}}</view>
<view class="iconfont icon-add-select" bindtap="add"></view> <view class="iconfont icon-add-select" bindtap="add"></view>
</view> </view>
<view class="delivery-method" wx:if="{{info.is_package!=1}}">
<view class="delivery-title">配送方式</view>
<view class="flex" style="display: flex;">
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=1}}" bind:tap="changeSelectSkuPost" data-value="{{0}}">
<view class="select-cycle" wx:if="{{user_type!==0}}"></view>
<view class="select-cycle selected" wx:else>
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">邮寄</view>
</view>
<view class="flex-center" wx:if="{{info.sku[skuIndex].use_type!=0}}" bind:tap="changeSelectSkuPost" data-value="{{1}}">
<view class="select-cycle" wx:if="{{user_type!==1}}"></view>
<view class="select-cycle selected" wx:else="">
<image src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png"></image>
</view>
<view class="method-str">自提</view>
</view>
</view>
</view>
<view style="height:138rpx"></view> <view style="height:138rpx"></view>
<view class="btn-box"> <view class="btn-box">
<!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}} <!-- <view class="mask-btn" bindtap="addCart" wx:if="{{info.sku[skuIndex].flag=='on'}}">{{skuFlag=='cart'?'加入购物车':'立即购买'}}
@ -189,7 +210,7 @@
<!-- 购物车的弹窗 --> <!-- 购物车的弹窗 -->
<view class="mask" wx:if="{{showPopup}}"> <view class="mask" wx:if="{{showPopup}}">
<view bindtap="openPopup" class="mask-bg"></view> <view bindtap="openPopup" class="mask-bg"></view>
<view class="mask-content" style="padding: 40rpx 0 180rpx;min-height: 600rpx;"> <view class="mask-content" style="padding: 40rpx 0 180rpx;height: 900rpx;">
<view style="margin: 0 26.67rpx;"> <view style="margin: 0 26.67rpx;">
<!-- 顶部操作按钮 --> <!-- 顶部操作按钮 -->
<view class="flex" style="margin-bottom: 56.67rpx;"> <view class="flex" style="margin-bottom: 56.67rpx;">
@ -208,7 +229,10 @@
<image lazy-load wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" /> <image lazy-load wx:if="{{item.selected ==1}}" style="width: 43rpx;height: 43rpx;" src="https://static.ticket.sz-trip.com/uploads/20240715/a961604bc708670cbdc76d1580eb3f3c.png" mode="" />
<view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view> <view wx:else style="width: 40rpx;height: 40rpx;border-radius: 50%;border: 1px solid #999999;"></view>
</view> </view>
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;" src="{{item.sku.headimg}}" mode="" /> <view style="position: relative;height: 179rpx;border-radius: 13rpx;flex-shrink: 0;margin-right: 26rpx;">
<image lazy-load style="width:179rpx;height: 179rpx;border-radius: 13rpx;" src="{{item.sku.headimg}}" mode="" />
<view class="use-type">{{item.delivery_method==1?"自提":"邮寄"}}</view>
</view>
<view class="main"> <view class="main">
<view> <view>
<view class="title textOver">{{item.product.title}}</view> <view class="title textOver">{{item.product.title}}</view>
@ -217,9 +241,9 @@
<view class="main-bottom"> <view class="main-bottom">
<view class="price">{{item.sku.price/100}}</view> <view class="price">{{item.sku.price/100}}</view>
<view class="num-box"> <view class="num-box">
<image lazy-load class="reduce" catchtap="del" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" /> <image lazy-load class="reduce" catchtap="del" data-item="{{item}}" data-value="{{-1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/054627e5d3864a9a4a8b397cae47754e.png" mode="" />
<view style="margin: 0 25.33rpx;">{{item.num}}</view> <view style="margin: 0 25.33rpx;">{{item.num}}</view>
<image lazy-load class="grow" catchtap="addCart" data-item="{{item}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" /> <image lazy-load class="grow" catchtap="del" data-item="{{item}}" data-value="{{1}}" src="https://static.ticket.sz-trip.com/uploads/20240715/3ad59eac0088d47ff4bc2fec6ffd8f56.png" mode="" />
</view> </view>
</view> </view>
</view> </view>

56
subPackages/techanNew/index.wxss

@ -442,7 +442,7 @@ page {
display: flex; display: flex;
font-size: 29rpx; font-size: 29rpx;
color: #333; color: #333;
margin: 0 40rpx; margin: 0 30rpx;
text-align: center; text-align: center;
flex-wrap: wrap; flex-wrap: wrap;
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -740,3 +740,57 @@ page {
.phcolor { .phcolor {
color: #ccc; color: #ccc;
} }
.delivery-method{
font-weight: 400;
font-size: 29rpx;
color: #1E1E1E;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 40rpx 40rpx;
}
.delivery-method .select-cycle{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
border: 1px solid #999999;
overflow: hidden;
flex-shrink: 0;
}
.delivery-method .select-cycle image{
width: 100%;
height: 100%;
}
.delivery-method .select-cycle.selected {
border: none;
}
.delivery-method .select-cycle.selected image{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
}
.delivery-method .method-str{
padding-left: 10rpx;
flex-shrink: 0;
}
.delivery-method .flex-center{
width: 150rpx;
justify-content: flex-end;
display: flex;
align-items: center;
}
.use-type{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-radius: 0rpx 0rpx 7rpx 7rpx;
height: 33rpx;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 33rpx;
}

152
subPackages/techanNew/selfPickPoint/index.js

@ -0,0 +1,152 @@
// subPackages/techanNew/selfPickPoint/index.js
import commonApi from "../../../utils/https/common"
let device = wx.getSystemInfoSync();
const ratio = device.windowWidth / 750;
let app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
pickupId: null,
goodsId: null,
skuId: null,
selectIndex: null,
lat:23,
lon:113,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
goodsId: options.goodsId,
skuId: options.skuId,
})
let _this = this
wx.getLocation({
type: 'gcj02',
success: function (res) {
_this.getList()
},
fail: function(e) {
_this.getList()
},
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
getList() {
let param = {
product_id: this.data.goodsId,
lon: this.data.lon || '113',
lat: this.data.lat || '23',
}
commonApi.user_post("product/getDeliverShop", param).then(res => {
let resData = res.data || []
resData.forEach(x=>{
if (x.distance) {
x.distance = (x.distance / 1000).toFixed(2)
}
})
this.setData({
list: res.data || []
})
})
},
selectPoint (e) {
let index = e.currentTarget.dataset.index;
this.setData({
selectIndex: index
})
},
goMap (e) {
let item = e.currentTarget.dataset.item;
console.log(123)
wx.openLocation({
latitude: Number(item.lat),
longitude: Number(item.lon),
name:item.title,
address:item.address,
fail: function (e) {
console.log(e)
}
})
},
confirmPoint () {
if(this.data.selectIndex==null) {
wx.showToast({icon: "none",title: "请先选择自提点"})
return;
}
// 返回上一个页面并带回selectItem
let selectItem = this.data.list[this.data.selectIndex]
const pages = getCurrentPages();
const prevPage = pages[pages.length - 2];
if (prevPage && prevPage.setPickUpPoint) {
console.log(prevPage)
prevPage.setPickUpPoint(selectItem)
}
wx.navigateBack()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

5
subPackages/techanNew/selfPickPoint/index.json

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

35
subPackages/techanNew/selfPickPoint/index.wxml

@ -0,0 +1,35 @@
<wxs src="../../../utils/filter.wxs" module="tool" />
<title title="选择自提点"></title>
<view class="bg">
<view class="item-bg'{{selectIndex==index?'active':''}}" wx:for="{{list}}"
wx:key="index" data-index="{{index}}" bind:tap="selectPoint" data-item="{{item}}">
<view class="item">
<view class="item-point-title">
<view class="name">{{item.title}}</view>
<!-- <view style="padding: 10rpx 0;">营业时间:{{item.remark}}</view> -->
<view >地址:{{item.address}}</view>
</view>
<view class="item-point-guide" catchtap="goMap" data-item="{{item}}">
<view>
<image src="https://static.ticket.sz-trip.com/uploads/20251028/071021313e5d04d98ca82f1f9e0678fd.png" mode="aspectFill" class="mapPoint"></image>
</view>
<!-- <view class="distance" wx:if="{{item.distance}}">距离{{item.distance}}km</view> -->
<view class="distance" >去这里</view>
</view>
</view>
</view>
<view class="no-data" wx:if="{{list.length==0}}">
<image src="https://static.ticket.sz-trip.com/dongtai/images/user/noAddress.png" mode="aspectFill" class="no-address"></image>
<view class="">
暂无自提点地址
</view>
</view>
<view class="btn-bottom">
<view class="addBox" bind:tap="confirmPoint">
确定
</view>
</view>
</view>

124
subPackages/techanNew/selfPickPoint/index.wxss

@ -0,0 +1,124 @@
.bg {
/* position: relative; */
background: #F7F7F7;
padding-bottom: 170rpx;
box-sizing: border-box;
min-height: 100vh;
padding-top: 20rpx;
}
.flex-shrink-0{
flex-shrink: 0;
}
.item-bg{
width: 697rpx;
min-height: 160rpx;
height: 160rpx;
background: #FFFFFF;
border-radius: 13rpx;
margin: 0 auto;
margin-bottom: 28rpx;
}
.item-bg.active{
border:1px solid #0E8790;
}
.item {
padding: 24rpx;
padding-right: 0;
display: flex;
background: #FFFFFF;
border-radius: 13rpx;
width: 100%;
height: 100%;
box-sizing: border-box;
}
.item .item-point-title{
flex: 1;
width: 10rpx;
padding-right: 78rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 500;
font-size: 27rpx;
color: #999999;
}
.item .item-point-guide{
width:140rpx;
flex-shrink: 0;
border-left: 1px solid #D8D8D8;
color: #515150;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 24rpx;
}
.item .mapPoint{
width: 33rpx;
height: 33rpx;
}
.name {
display: flex;
font-size: 31rpx;
font-weight: bold;
color: #333333;
}
.no-data {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
padding: 300rpx 0;
}
.no-data view:nth-child(2) {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
margin-top: 25rpx;
}
.no-data image {
width: 160rpx;
height: 160rpx;
}
.btn-bottom{
position: fixed;
bottom: 0;
width: 750rpx;
height: 150rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
display: flex;
justify-content: space-between;
padding: 30rpx 50rpx 30rpx 50rpx;
box-sizing: border-box;
}
.btn-bottom .addBox{
margin: 0 auto;
width: 697rpx;
height: 73rpx;
background: #D62828;
border-radius: 39rpx;
font-size: 36rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
line-height: 80rpx;
text-align: center;
}
.distance{
font-weight: 500;
font-size: 24rpx;
color: #0E8790;
text-align: center;
padding-top: 11rpx;
word-wrap: break-all;
}

20
utils/util.js

@ -199,6 +199,11 @@ const gotoDetail = (item,isPagePoint,queryStr="") =>{
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id+queryStr url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id+queryStr
}); });
return return
} else if (item.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.id+queryStr
});
return
} }
console.log(item) console.log(item)
@ -370,6 +375,11 @@ const orderMoreTime = function(item){
url: '/subPackages/goods/oneCardTour/info/index?id='+info.scene_id url: '/subPackages/goods/oneCardTour/info/index?id='+info.scene_id
}); });
return return
} else if (info.is_package==3) {
wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+info.product_id
});
return
} }
else if(info.product_model=='movie'){ else if(info.product_model=='movie'){
// wx.navigateTo({ // wx.navigateTo({
@ -397,8 +407,13 @@ const gotoOrder = function(item){
if (item.order_product_list.length>1) { if (item.order_product_list.length>1) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/pbService/web/index?weburl=" + encodeURIComponent("https://m.cloud.sz-trip.com/TicketCartOrderDetail?order_id="+item.order_id), url: "/pages/pbService/web/index?weburl=" + encodeURIComponent("https://m.cloud.sz-trip.com/TicketCartOrderDetail?order_id="+item.order_id),
}) })
return; return;
// wx.navigateTo({
// url: "/pages/pbService/web/index?weburl=" + encodeURIComponent("https://test.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({
@ -559,7 +574,6 @@ const pagePointPostUrl = [
const detailPagePoint = function (url, res) { const detailPagePoint = function (url, res) {
try { try {
console.log(res)
let pagePointRoute = pagePointPostUrl.find(v=>url.indexOf(v.url)>=0) let pagePointRoute = pagePointPostUrl.find(v=>url.indexOf(v.url)>=0)
if (pagePointRoute) { if (pagePointRoute) {
// 如果是产品详情的话 需要加埋点 // 如果是产品详情的话 需要加埋点

Loading…
Cancel
Save