Browse Source

首页改版

master
chenkainan 2 months ago
parent
commit
d0d4263b3a
  1. 2
      app.js
  2. 8
      app.json
  3. BIN
      images/ais.png
  4. BIN
      images/indexs.png
  5. BIN
      images/tuyous.png
  6. BIN
      images/users.png
  7. 616
      pages/index/index.js
  8. 148
      pages/index/index.wxml
  9. 316
      pages/index/index.wxss
  10. 9
      pages/info/sceneProductInfo/index.js
  11. 2
      pages/info/sceneProductInfo/index.wxml
  12. 8
      pages/info/sceneProductInfo/index.wxss
  13. 333
      pages/pbService/web/index.js
  14. 3
      pages/user/order/list.wxml
  15. 346
      pages/user/order/sceneOrderInfo/index.js
  16. 68
      pages/user/order/sceneOrderInfo/index.wxml
  17. 214
      pages/user/order/sceneOrderInfo/index.wxss

2
app.js

@ -39,7 +39,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.isTest162? true : false; data.isTest = data.isTest165? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

8
app.json

@ -254,26 +254,26 @@
{ {
"pagePath": "pages/index/index", "pagePath": "pages/index/index",
"iconPath": "/images/index.png", "iconPath": "/images/index.png",
"selectedIconPath": "/images/index_seld.png", "selectedIconPath": "/images/indexs.png",
"text": "首页", "text": "首页",
"shareTimeline": true "shareTimeline": true
}, },
{ {
"pagePath": "pages/pbService/aiHelpYou/index", "pagePath": "pages/pbService/aiHelpYou/index",
"iconPath": "/images/ai.png", "iconPath": "/images/ai.png",
"selectedIconPath": "/images/ai_seld.png", "selectedIconPath": "/images/ais.png",
"text": "AI" "text": "AI"
}, },
{ {
"pagePath": "pages/map/index", "pagePath": "pages/map/index",
"iconPath": "/images/map.png", "iconPath": "/images/map.png",
"selectedIconPath": "/images/map_seld.png", "selectedIconPath": "/images/tuyous.png",
"text": "图游" "text": "图游"
}, },
{ {
"pagePath": "pages/user/user", "pagePath": "pages/user/user",
"iconPath": "/images/user.png", "iconPath": "/images/user.png",
"selectedIconPath": "/images/user_seld.png", "selectedIconPath": "/images/users.png",
"text": "我的" "text": "我的"
} }
] ]

BIN
images/ais.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
images/indexs.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/tuyous.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/users.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

616
pages/index/index.js

@ -7,13 +7,17 @@ import commonApi from "../../utils/https/common"
import userApi from "../../utils/https/user" import userApi from "../../utils/https/user"
import util from "../../utils/util" import util from "../../utils/util"
import https from "../../utils/https.js" import https from "../../utils/https.js"
import { unix } from "dayjs" import {
unix
} from "dayjs"
Page({ Page({
data: { data: {
isTest: false, isTest: false,
startList: {head_img: ''}, // 启动页广告 startList: {
head_img: ''
}, // 启动页广告
fullAdvTimer: null, // 全屏timer fullAdvTimer: null, // 全屏timer
showFullAdv: true, //全屏广告开关 showFullAdv: true, //全屏广告开关
opacity: 1, // 全屏广告透明度 opacity: 1, // 全屏广告透明度
@ -42,13 +46,11 @@ Page({
activeBannerIndex: 0, activeBannerIndex: 0,
smBannerIndex: 0, smBannerIndex: 0,
ztBannerIndex: 0, ztBannerIndex: 0,
bannerDataListFake: [ bannerDataListFake: [{
{
title: "景点门票", title: "景点门票",
img: "https://static.ticket.sz-trip.com/uploads/20250526/5934b8b77b058ce1de5943adbaf51739.png", img: "https://static.ticket.sz-trip.com/uploads/20250526/5934b8b77b058ce1de5943adbaf51739.png",
path: "/pages/list/scene/index", path: "/pages/list/scene/index",
}, }, ],
],
// banner上的金刚区 // banner上的金刚区
bannerDataList: [ bannerDataList: [
@ -385,17 +387,17 @@ Page({
// "appid":"wxdaf3d5edd07dc7af" // "appid":"wxdaf3d5edd07dc7af"
// }, // },
{ {
"name":"常享游", "name": "常享游",
"icon":"https://static.ticket.sz-trip.com/uploads/20250604/5112dd50e7c175bf58416ba9d4e4b846.png", "icon": "https://static.ticket.sz-trip.com/uploads/20250604/5112dd50e7c175bf58416ba9d4e4b846.png",
"type":"h5", "type": "h5",
"url":"https://tour.wlczy.com/h5/" "url": "https://tour.wlczy.com/h5/"
}, },
{ {
"name":"畅游宿迁", "name": "畅游宿迁",
"icon":"https://static.ticket.sz-trip.com/uploads/20250604/962f331b2319b9759363c3787ca8d088.png", "icon": "https://static.ticket.sz-trip.com/uploads/20250604/962f331b2319b9759363c3787ca8d088.png",
"type":"mini", "type": "mini",
"path":"/pages/index/index", "path": "/pages/index/index",
"appid":"wxcb00a59c4fba136e" "appid": "wxcb00a59c4fba136e"
}, },
], ],
@ -421,15 +423,50 @@ Page({
// 页面图片 // 页面图片
// imageSourceList:imageSource, // imageSourceList:imageSource,
recommendType: [{
id: 306,
name: '必逛景点榜',
img: 'https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/biguang.png',
path: '/pages/list/scene/index',
list: []
},
{
id: 307,
name: '寻鲜美食榜',
img: 'https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/biguang.png',
path: '/subPackages/foodListNew/index',
list: []
},
{
id: 308,
name: '优选住宿榜',
img: 'https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/biguang.png',
path: '/pages/pbService/web/index?weburl=' + encodeURIComponent(
'https://m.cloud.sz-trip.com/selectedHotels'),
list: []
},
{
id: 309,
name: '必看演出榜',
img: 'https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/biguang.png',
path: '/pages/list/theatre/index',
list: []
}
],
activeIndex: 0,
touchStartX: 0,
// 用于存储计算好的样式字符串数组
cardStyles: []
}, },
onLoad: function(options) { onLoad: function(options) {
// 初始化时计算一次样式
this.updateCardStyles();
// 相城小程序跳转获取用户信息 // 相城小程序跳转获取用户信息
if(options && options.szxcCode) { if (options && options.szxcCode) {
commonApi._post("uservice/user/loginByXC", { commonApi._post("uservice/user/loginByXC", {
code: options.szxcCode code: options.szxcCode
}).then(res => { }).then(res => {
if(res.data && res.data.id && res.data.token) { if (res.data && res.data.id && res.data.token) {
https.set_logininfo(res); https.set_logininfo(res);
} }
}) })
@ -437,9 +474,6 @@ Page({
if (options.from) { if (options.from) {
app.globalData.from = options.from; app.globalData.from = options.from;
} }
return
console.log('options',options)
}, },
onReady: function() { onReady: function() {
@ -466,30 +500,193 @@ Page({
lon: res.longitude lon: res.longitude
}) })
}, },
fail: (err) => { fail: (err) => {}
}
}) })
this.getUrlToPage() this.getUrlToPage()
this.getShowMore() this.getShowMore()
const typeList = this.data.recommendType;
// 遍历数组进行请求
typeList.forEach((item, index) => {
// 1. 根据索引判断接口地址 (前两个用 scene 接口,后面用 product 接口)
let apiUrl = '';
if (index < 2) {
apiUrl = 'scene/get_scene_by_tag_subject';
} else {
apiUrl = 'product/get_product_by_tag_subject';
}
// 2. 发起请求
commonApi._post(apiUrl, {
offset: 0,
limit: 3,
tag_id: item.id
}).then(res => {
const key = `recommendType[${index}].list`;
res.data.list.forEach(item => {
// 手动增加一个 tagsArray 字段
if (item.display_tags) {
item.tagsArray = item.display_tags.split(',').slice(0, 2);
} else {
item.tagsArray = [];
}
});
this.setData({
[key]: res.data.list // 假设返回的数据里直接有 list 字段
});
}).catch(err => {
console.error(`请求第 ${index + 1} 个榜单失败`, err);
});
});
},
// 1. 点击 Tab 切换
handleTabClick(e) {
const index = e.currentTarget.dataset.index;
this.setData({
activeIndex: index
});
this.updateCardStyles(); // 更新样式
},
// 2. 点击卡片切换
handleCardClick(e) {
const index = e.currentTarget.dataset.index;
if (index !== this.data.activeIndex) {
this.setData({
activeIndex: index
});
this.updateCardStyles(); // 更新样式
}
},
// 3. ★核心逻辑:在 JS 中计算所有卡片的样式
updateCardStyles() {
const {
activeIndex,
recommendType
} = this.data;
const len = recommendType.length;
// 偏移量配置 (单位 rpx)
const xStep = 24;
const yStep = 14;
// 遍历生成每个卡片的样式字符串
const newStyles = recommendType.map((item, index) => {
// 计算距离
let diff = (index - activeIndex + len) % len;
let zIndex = 0;
let xOffset = 0;
let yOffset = 0;
let opacity = 1;
let bgColor = '#fcf1e2';
let bgImage = 'none';
if (diff === 0) {
// --- 第1层 (最上面) ---
zIndex = 10;
xOffset = 0;
yOffset = 0;
bgImage =
'url(https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/biguang.png)';
} else if (diff === 1) {
// --- 第2层 ---
zIndex = 9;
xOffset = xStep * 1;
yOffset = yStep * 1;
bgImage =
'url(https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/hotBgs.png)';
} else if (diff === 2) {
// --- 第3层 ---
zIndex = 8;
xOffset = xStep * 2;
yOffset = yStep * 2;
bgImage =
'url(https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/hotBgs.png)';
} else if (diff === 3) {
// --- 第4层 ---
zIndex = 7;
xOffset = xStep * 3;
yOffset = yStep * 3;
bgImage =
'url(https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/hotBgs.png)';
} else {
// --- 储备层 (隐藏在第4层后面) ---
zIndex = 1;
xOffset = xStep * 3;
yOffset = yStep * 3;
bgImage =
'url(https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/hotBgs.png)';
}
// 构造样式字符串
return `
z-index: ${zIndex};
transform: translate(${xOffset}rpx, ${yOffset}rpx);
opacity: ${opacity};
background-image: ${bgImage};
background-size: 100% 100%;
background-repeat: no-repeat;
`;
});
// 更新到视图
this.setData({
cardStyles: newStyles
});
},
// 4. 触摸开始
handleTouchStart(e) {
this.setData({
touchStartX: e.touches[0].clientX
});
},
// 5. 触摸结束
handleTouchEnd(e) {
const touchEndX = e.changedTouches[0].clientX;
const diff = this.data.touchStartX - touchEndX;
const len = this.data.recommendType.length;
let current = this.data.activeIndex;
if (diff > 50) {
// 左滑 -> 下一张
current = (current + 1) % len;
} else if (diff < -50) {
// 右滑 -> 上一张
current = (current - 1 + len) % len;
}
if (current !== this.data.activeIndex) {
this.setData({
activeIndex: current
});
this.updateCardStyles(); // 更新样式
}
}, },
setAiStr :function () { setAiStr: function() {
let str = "你好啊,我是卿卿,我来带你游苏州~"; let str = "你好啊,我是卿卿,我来带你游苏州~";
let i = 0; let i = 0;
let timer = setInterval(()=>{ let timer = setInterval(() => {
i++ i++
this.setData({ this.setData({
aiStr: str.slice(0,i) aiStr: str.slice(0, i)
}) })
if (i>str.length) { if (i > str.length) {
clearInterval(timer) clearInterval(timer)
} }
},125) }, 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) {
return img; return img;
} else { } else {
@ -499,9 +696,10 @@ Page({
}, },
gotoPath(e) { gotoPath(e) {
if (e.currentTarget.dataset.path){ console.log(e.currentTarget.dataset.item.path)
if (e.currentTarget.dataset.item.path) {
wx.navigateTo({ wx.navigateTo({
url: e.currentTarget.dataset.path, url: e.currentTarget.dataset.item.path,
}) })
return return
} }
@ -525,7 +723,7 @@ Page({
}, },
//获取季节配置 //获取季节配置
getIndexSeason() { getIndexSeason() {
if (app.globalData.configJson&&app.globalData.configJson.indexSeason) { if (app.globalData.configJson && app.globalData.configJson.indexSeason) {
console.log('app', app.globalData.configJson) console.log('app', app.globalData.configJson)
this.setData({ this.setData({
indexHot: app.globalData.configJson.indexHot, indexHot: app.globalData.configJson.indexHot,
@ -534,51 +732,97 @@ Page({
bannerDataList: (app.globalData.configJson.nav_menu || []), bannerDataList: (app.globalData.configJson.nav_menu || []),
mainTypeList: (app.globalData.configJson.menu_button || []), mainTypeList: (app.globalData.configJson.menu_button || []),
publicSerivce: (app.globalData.configJson.service_data || []), publicSerivce: (app.globalData.configJson.service_data || []),
travelData:(app.globalData.configJson.travel_data||[]), travelData: (app.globalData.configJson.travel_data || []),
travelCulture:(app.globalData.configJson.number_data||[]), travelCulture: (app.globalData.configJson.number_data || []),
SQSM:(app.globalData.configJson.city_data||[]), SQSM: (app.globalData.configJson.city_data || []),
otherPlat: app.globalData.configJson.platform_data, otherPlat: app.globalData.configJson.platform_data,
func_data: (app.globalData.configJson.func_data||{}) func_data: (app.globalData.configJson.func_data || {})
}) })
} else { } else {
// 小程序是3 测试H5 15 // 小程序是3 测试H5 15
commonApi._post("adv/get_home_ui", {type_id: 3}).then(res => { commonApi._post("adv/get_home_ui", {
type_id: 3
}).then(res => {
let obj = {}; let obj = {};
(res.data.content||[]).forEach(item => { (res.data.content || []).forEach(item => {
obj[item.id] = item.image obj[item.id] = item.image
}); });
app.globalData.configJson.indexSeason = obj app.globalData.configJson.indexSeason = obj
app.globalData.loadIndexSeason = true app.globalData.loadIndexSeason = true
app.globalData.configJson.nav_menu = (res.data.nav_menu || []).map((v,index)=>{ app.globalData.configJson.nav_menu = (res.data.nav_menu || []).map((v, index) => {
return {...v, pagePoint: {classification: 'nav_menu', key_number: index}} return {
...v,
pagePoint: {
classification: 'nav_menu',
key_number: index
}
}
}) })
app.globalData.configJson.menu_button = (res.data.menu_button || []).map((v,index)=>{ app.globalData.configJson.menu_button = (res.data.menu_button || []).map((v, index) => {
return {...v, pagePoint: {classification: 'menu_button', key_number: index}} return {
...v,
pagePoint: {
classification: 'menu_button',
key_number: index
}
}
}) })
// 公共服务 publicSerivce // 公共服务 publicSerivce
app.globalData.configJson.service_data = (res.data.service_data || []).map((v,index)=>{ app.globalData.configJson.service_data = (res.data.service_data || []).map((v,
return {...v, pagePoint: {classification: 'service_data', key_number: index}} index) => {
return {
...v,
pagePoint: {
classification: 'service_data',
key_number: index
}
}
}) })
// 旅游助手 travelData // 旅游助手 travelData
app.globalData.configJson.travel_data = (res.data.travel_data || []).map((v,index)=>{ app.globalData.configJson.travel_data = (res.data.travel_data || []).map((v, index) => {
return {...v, pagePoint: {classification: 'travel_data', key_number: index}} return {
...v,
pagePoint: {
classification: 'travel_data',
key_number: index
}
}
}) })
// 数字文旅 travelCulture // 数字文旅 travelCulture
app.globalData.configJson.number_data = (res.data.number_data || []).map((v,index)=>{ app.globalData.configJson.number_data = (res.data.number_data || []).map((v, index) => {
return {...v, pagePoint: {classification: 'number_data', key_number: index}} return {
...v,
pagePoint: {
classification: 'number_data',
key_number: index
}
}
}) })
// 十全十美 SQSM // 十全十美 SQSM
app.globalData.configJson.city_data = (res.data.city_data || []).map((v,index)=>{ app.globalData.configJson.city_data = (res.data.city_data || []).map((v, index) => {
return {...v, pagePoint: {classification: 'city_data', key_number: index}} return {
...v,
pagePoint: {
classification: 'city_data',
key_number: index
}
}
}) })
// 其他平台otherPlat // 其他平台otherPlat
app.globalData.configJson.platform_data = (res.data.platform_data || []).map((v,index)=>{ app.globalData.configJson.platform_data = (res.data.platform_data || []).map((v,
return {...v, pagePoint: {classification: 'platform_data', key_number: index}} index) => {
return {
...v,
pagePoint: {
classification: 'platform_data',
key_number: index
}
}
}) })
let func_data = {} let func_data = {}
for(let item of (res.data.func_data || [])) { for (let item of (res.data.func_data || [])) {
func_data[item.jump_type] = true func_data[item.jump_type] = true
} }
app.globalData.configJson.func_data = func_data app.globalData.configJson.func_data = func_data
@ -591,17 +835,17 @@ Page({
bannerDataList: (app.globalData.configJson.nav_menu || []), bannerDataList: (app.globalData.configJson.nav_menu || []),
mainTypeList: (app.globalData.configJson.menu_button || []), mainTypeList: (app.globalData.configJson.menu_button || []),
publicSerivce: (app.globalData.configJson.service_data || []), publicSerivce: (app.globalData.configJson.service_data || []),
travelData:(app.globalData.configJson.travel_data||[]), travelData: (app.globalData.configJson.travel_data || []),
travelCulture:(app.globalData.configJson.number_data||[]), travelCulture: (app.globalData.configJson.number_data || []),
SQSM:(app.globalData.configJson.city_data||[]), SQSM: (app.globalData.configJson.city_data || []),
func_data: (app.globalData.configJson.func_data||{}) func_data: (app.globalData.configJson.func_data || {})
}) })
}) })
} }
console.log(this.data) console.log(this.data)
}, },
// url跳转(不知道什么东西) // url跳转(不知道什么东西)
getUrlToPage () { getUrlToPage() {
commonApi._post("pbservice/Other/getClientConfig", { commonApi._post("pbservice/Other/getClientConfig", {
unique_key: "urltopage" unique_key: "urltopage"
}).then(res => { }).then(res => {
@ -612,78 +856,129 @@ Page({
}) })
}, },
getShowMore () { getShowMore() {
commonApi._post("multimedia/detail", {id: 2462}).then(res => { commonApi._post("multimedia/detail", {
id: 2462
}).then(res => {
if (res && res.data) { if (res && res.data) {
this.setData({ this.setData({
showMore: res.data.company_name ==1?true:false showMore: res.data.company_name == 1 ? true : false
}) })
} }
}) })
}, },
// --------------------banner 相关--------------------------- // --------------------banner 相关---------------------------
// 获取banner 和开屏广告 // 获取banner 和开屏广告
getBanner: function() { getBanner: function() {
let _this = this let _this = this
//全屏广告 //全屏广告
commonApi._post("adv/getAdv", {position: 2,type_id: 3}).then(res => { commonApi._post("adv/getAdv", {
position: 2,
type_id: 3
}).then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
let length = res.data.length let length = res.data.length
let num = Math.floor(Math.random() * length); let num = Math.floor(Math.random() * length);
this.setData({startList: res.data[num]}) this.setData({
startList: res.data[num]
})
// 图片 // 图片
if (this.data.startList.media_type) { if (this.data.startList.media_type) {
wx.hideTabBar() //这里隐藏了底部导航栏 wx.hideTabBar() //这里隐藏了底部导航栏
this.setData({showTime: true}) this.setData({
showTime: true
})
this.data.fullAdvTimer = setInterval(() => { this.data.fullAdvTimer = setInterval(() => {
_this.data.time-=0.5 _this.data.time -= 0.5
if (Number.isInteger(_this.data.time)) { if (Number.isInteger(_this.data.time)) {
_this.setData({time: _this.data.time}) _this.setData({
time: _this.data.time
})
} }
if (_this.data.time <= 0) { if (_this.data.time <= 0) {
_this.setData({opacity: _this.data.opacity - 0.3}) _this.setData({
opacity: _this.data.opacity - 0.3
})
} }
if (_this.data.time <= -1) { if (_this.data.time <= -1) {
clearInterval(_this.data.fullAdvTimer) clearInterval(_this.data.fullAdvTimer)
wx.showTabBar() //倒计时结束清除定时器显示导航栏 wx.showTabBar() //倒计时结束清除定时器显示导航栏
_this.setData({showFullAdv: false}) _this.setData({
showFullAdv: false
})
} }
}, 500) }, 500)
} else { } else {
// 视频 // 视频
} }
} else { } else {
this.setData({showFullAdv: false}) this.setData({
showFullAdv: false
})
} }
}) })
// 顶部banner // 顶部banner
commonApi._post("adv/getAdv", {position: 0,type_id: 3}).then(res => { commonApi._post("adv/getAdv", {
let resData = (res.data || []).map((v,index)=>{ position: 0,
return {...v, pagePoint: {classification: 'bigBanner', key_number: v.id}} type_id: 3
}).then(res => {
let resData = (res.data || []).map((v, index) => {
return {
...v,
pagePoint: {
classification: 'bigBanner',
key_number: v.id
}
}
})
this.setData({
banner: resData
}) })
this.setData({banner: resData})
}) })
// 专题banner // 专题banner
commonApi._post("adv/getAdv", {position: 6,type_id: 3}).then(res => { commonApi._post("adv/getAdv", {
let resData = (res.data || []).map((v,index)=>{ position: 6,
return {...v, pagePoint: {classification: 'specialBanner', key_number: v.id}} type_id: 3
}).then(res => {
let resData = (res.data || []).map((v, index) => {
return {
...v,
pagePoint: {
classification: 'specialBanner',
key_number: v.id
}
}
})
this.setData({
ztbanner: resData
}) })
this.setData({ztbanner:resData})
}) })
// 小banner // 小banner
commonApi._post("adv/getAdv", {position: 1,type_id: 3}).then(res => { commonApi._post("adv/getAdv", {
let resData = (res.data || []).map((v,index)=>{ position: 1,
return {...v, pagePoint: {classification: 'smallBanner', key_number: v.id}} type_id: 3
}).then(res => {
let resData = (res.data || []).map((v, index) => {
return {
...v,
pagePoint: {
classification: 'smallBanner',
key_number: v.id
}
}
})
this.setData({
xiaobanner: resData
}) })
this.setData({xiaobanner: resData})
}) })
//弹窗广告 //弹窗广告
commonApi._post("adv/getAdv", {position: 3,type_id: 3}).then(res => { commonApi._post("adv/getAdv", {
position: 3,
type_id: 3
}).then(res => {
if (res.data.length > 0) { if (res.data.length > 0) {
this.setData({ this.setData({
alertSwipeList: res.data || [], alertSwipeList: res.data || [],
@ -705,9 +1000,13 @@ Page({
if (this.data.isTest) return; if (this.data.isTest) return;
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
let source = e.currentTarget.dataset.source; let source = e.currentTarget.dataset.source;
if (source) { util.setGlobalPagePoint(source); } if (source) {
util.setGlobalPagePoint(source);
}
console.log(item) console.log(item)
if (item.pagePoint) { this.newPagePoint(item.pagePoint) } if (item.pagePoint) {
this.newPagePoint(item.pagePoint)
}
switch (item.jump_type) { switch (item.jump_type) {
case 0: case 0:
@ -790,7 +1089,7 @@ Page({
return; return;
}, },
newPagePoint (param) { newPagePoint(param) {
commonApi._post("browse/newBuryingPoint", { commonApi._post("browse/newBuryingPoint", {
uuid: app.globalData.uuid, uuid: app.globalData.uuid,
drive: "mini", drive: "mini",
@ -824,7 +1123,7 @@ Page({
} }
}, },
// 后台配置数据跳转 // 后台配置数据跳转
mainNavClick:function (e) { mainNavClick: function(e) {
let item = e.currentTarget.dataset.item let item = e.currentTarget.dataset.item
console.log(item) console.log(item)
if (item.pagePoint) { if (item.pagePoint) {
@ -835,13 +1134,13 @@ Page({
if (item.jump_type == "page") { if (item.jump_type == "page") {
if (item.page.mini) { if (item.page.mini) {
wx.navigateTo({ wx.navigateTo({
url: "/"+item.page.mini, url: "/" + item.page.mini,
}) })
return return
} }
if (item.page.tdata) { if (item.page.tdata) {
//sph 视频号 //sph 视频号
if (item.page.tdata.appid&&item.page.tdata.appid.indexOf("sph")>=0) { if (item.page.tdata.appid && item.page.tdata.appid.indexOf("sph") >= 0) {
// if (item.page.tdata.page) { // if (item.page.tdata.page) {
// wx.openChannelsActivity({ // wx.openChannelsActivity({
// finderUserName: item.page.tdata.appid, // 视频号的原始ID // finderUserName: item.page.tdata.appid, // 视频号的原始ID
@ -864,9 +1163,10 @@ Page({
return return
} }
if (item.page.tdata.ghid == "gh_b55e177a4069" || item.page.tdata.appid == 'wx4bb7b6050831f585') { if (item.page.tdata.ghid == "gh_b55e177a4069" || item.page.tdata.appid ==
'wx4bb7b6050831f585') {
wx.navigateTo({ wx.navigateTo({
url: "/"+item.page.tdata.page, url: "/" + item.page.tdata.page,
}) })
} else { } else {
@ -888,7 +1188,7 @@ Page({
setTimeout(() => { setTimeout(() => {
wx.showToast({ wx.showToast({
title: item.text, title: item.text,
icon:'none', icon: 'none',
duration: 2000, duration: 2000,
}) })
}, 200); }, 200);
@ -933,48 +1233,78 @@ Page({
typeId: 3, typeId: 3,
type: 1, // 返回数组 type: 1, // 返回数组
}).then(res => { }).then(res => {
console.log("resData",res.data.adv); console.log("resData", res.data.adv);
(res.data.adv || []).forEach(v=>{ v.pagePoint = {classification: 'flashSales', key_number: v.id} }); (res.data.adv || []).forEach(v => {
(res.data.list || []).forEach(v=>{ v.pagePoint = {classification: 'flashSales', key_number: v.id} }); v.pagePoint = {
classification: 'flashSales',
key_number: v.id
}
});
(res.data.list || []).forEach(v => {
v.pagePoint = {
classification: 'flashSales',
key_number: v.id
}
});
this.setData({xpth: res.data}) this.setData({
xpth: res.data
})
}) })
}, },
// 更换新品特惠 当即热门 // 更换新品特惠 当即热门
changeXpthIndex:function (e) { changeXpthIndex: function(e) {
let value = e.currentTarget.dataset.value let value = e.currentTarget.dataset.value
this.setData({xpthIndex:value}) this.setData({
xpthIndex: value
})
}, },
productGotoDetail: function(e) { productGotoDetail: function(e) {
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
let source = e.currentTarget.dataset.source; let source = e.currentTarget.dataset.source;
if (source) { util.setGlobalPagePoint(source); } if (source) {
if (item.pagePoint) { this.newPagePoint(item.pagePoint) } util.setGlobalPagePoint(source);
}
if (item.pagePoint) {
this.newPagePoint(item.pagePoint)
}
util.gotoDetail(item) util.gotoDetail(item)
}, },
// 热门推荐 // 热门推荐
getList: function() { getList: function() {
commonApi._post("product/get_product_by_tag_subject", { commonApi._post("product/get_product_by_tag_subject", {
tag_id: 85,offset: 0,limit: 5, tag_id: 85,
}).then(res=>{ offset: 0,
limit: 5,
}).then(res => {
let resData = res.data.list || [] let resData = res.data.list || []
resData.forEach(v=>{ resData.forEach(v => {
v.pagePoint = {classification: 'hot', key_number: v.id}; v.pagePoint = {
v.display_tags_arr = v.display_tags?v.display_tags.split(",") : [] classification: 'hot',
key_number: v.id
};
v.display_tags_arr = v.display_tags ? v.display_tags.split(",") : []
})
this.setData({
list: resData
}) })
this.setData({ list: resData})
}) })
}, },
// 回购 // 回购
getRepurchaseList:function () { getRepurchaseList: function() {
commonApi._post("repurchase/repurchase/getRepurchaseList", {}).then(res=>{ commonApi._post("repurchase/repurchase/getRepurchaseList", {}).then(res => {
(res.data || []).forEach(v=>{ (res.data || []).forEach(v => {
v.headimg = this.showImg(v.headimg) v.headimg = this.showImg(v.headimg)
v.pagePoint={classification: 'repurchase', key_number: v.product_id} v.pagePoint = {
classification: 'repurchase',
key_number: v.product_id
}
})
this.setData({
repurchaseList: res.data || []
}) })
this.setData({ repurchaseList: res.data || []})
}) })
}, },
onReachBottom: function() { onReachBottom: function() {
@ -989,13 +1319,27 @@ Page({
gotoDetail: function(e) { gotoDetail: function(e) {
let item = e.currentTarget.dataset.item; let item = e.currentTarget.dataset.item;
let source = e.currentTarget.dataset.source; let source = e.currentTarget.dataset.source;
if (source) { util.setGlobalPagePoint(source); } let index = e.currentTarget.dataset.index;
console.log(index)
if (index == 1) {
wx.navigateTo({
url: '/subPackages/foodNew/index?id=' + item.id
})
return;
}
if (source) {
util.setGlobalPagePoint(source);
}
commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id}) commonApi._post("repurchase/repurchase/recordClick", {
product_id: item.product_id
})
// item.id = item.type=='post'?item.product_id:item.scene_id // item.id = item.type=='post'?item.product_id:item.scene_id
if (item.pagePoint) { this.newPagePoint(item.pagePoint) } if (item.pagePoint) {
this.newPagePoint(item.pagePoint)
}
// util.gotoDetail(item); // util.gotoDetail(item);
util.gotoDetail(item.goods); util.gotoDetail(item);
}, },
pagePoint: function(e, type) { pagePoint: function(e, type) {
@ -1014,10 +1358,14 @@ Page({
}, },
//关闭全屏广告 //关闭全屏广告
closeFullAdv: function() { closeFullAdv: function() {
this.setData({showFullAdv: false}) this.setData({
showFullAdv: false
})
clearInterval(this.data.fullAdvTimer) clearInterval(this.data.fullAdvTimer)
if (!this.data.alertSwipeList.length > 0) { if (!this.data.alertSwipeList.length > 0) {
wx.showTabBar({animation: true}) wx.showTabBar({
animation: true
})
} }
}, },
// 是否静音 // 是否静音
@ -1043,15 +1391,17 @@ Page({
}) })
}, },
changeSimpleVal (e) { changeSimpleVal(e) {
let keyname = e.currentTarget.dataset.keyname; let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val; let val = e.currentTarget.dataset.val;
let param = {} let param = {}
param[keyname] = val param[keyname] = val
if (keyname == "cityIndex") { if (keyname == "cityIndex") {
let scrollIndex = val-2 let scrollIndex = val - 2
if (scrollIndex<0) { scrollIndex = 0 } if (scrollIndex < 0) {
param.scrollItem = "scrollItem-"+scrollIndex scrollIndex = 0
}
param.scrollItem = "scrollItem-" + scrollIndex
} }
this.setData(param) this.setData(param)
@ -1059,7 +1409,9 @@ Page({
}, },
onShow: function() { onShow: function() {
this.pagePoint({event: 'home_view'}, 1) this.pagePoint({
event: 'home_view'
}, 1)
// 修复 首页广告点击后返回首页 tabbar不显示 // 修复 首页广告点击后返回首页 tabbar不显示
if (this.data.showTime && !this.data.showFullAdv) { if (this.data.showTime && !this.data.showFullAdv) {
wx.showTabBar() wx.showTabBar()
@ -1072,11 +1424,16 @@ Page({
app.globalData.isCartBuy = false app.globalData.isCartBuy = false
}, },
goAIUrl () { goAIUrl() {
wx.switchTab({ wx.switchTab({
url: '/pages/pbService/aiHelpYou/index', url: '/pages/pbService/aiHelpYou/index',
}) })
}, },
goYjgl() {
wx.navigateTo({
url: '/pages/list/strategy/index'
})
},
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
@ -1158,17 +1515,18 @@ Page({
// Ai避高峰 // Ai避高峰
gotoUrls() { gotoUrls() {
// 判断是否登录 // 判断是否登录
var token = wx.getStorageSync("jstrip_token"), userId = wx.getStorageSync("jstrip_userid"); var token = wx.getStorageSync("jstrip_token"),
if(!token || !userId) { userId = wx.getStorageSync("jstrip_userid");
if (!token || !userId) {
let url = 'https://wlsjzx.zdhxwl.cn/kt_h5/index.html' let url = 'https://wlsjzx.zdhxwl.cn/kt_h5/index.html'
app.globalData.weburl = url; app.globalData.weburl = url;
wx.navigateTo({ wx.navigateTo({
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url), url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url),
}) })
}else { } else {
commonApi.user_post("uservice/user/userEncry").then(res => { commonApi.user_post("uservice/user/userEncry").then(res => {
if(res.code == 1) { if (res.code == 1) {
let url = 'https://wlsjzx.zdhxwl.cn/kt_h5/index.html?userEncry=' + res.data let url = 'https://wlsjzx.zdhxwl.cn/kt_h5/index.html?userEncry=' + res.data
app.globalData.weburl = url; app.globalData.weburl = url;

148
pages/index/index.wxml

@ -1,5 +1,6 @@
<!--index.wxml--> <!--index.wxml-->
<view class="bg" wx:if="{{!isTest}}"> <view class="bg" wx:if="{{!isTest}}">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/topImgs.gif" style="margin-left:0" mode="widthFix" style="position: absolute;top: 0;left: 0;width: 100vw;"></image>
<!-- 顶部banner --> <!-- 顶部banner -->
<view style="position:relative;z-index: 1;padding-top: 200rpx;"> <view style="position:relative;z-index: 1;padding-top: 200rpx;">
<view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px"> <view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px">
@ -63,23 +64,27 @@
</view> --> </view> -->
</view> </view>
<view class="ai-box" style="padding: 0 25rpx;box-sizing: border-box;" wx:if="{{mainTypeList.length>0}}"> <view class="small-box">
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/banniyou.gif"></image> <!-- <view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}">
<view class="ai-text">{{aiStr}}</view> <image class="small-bg" style="" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/swiperBg.png" mode="aspectFill"></image>
</view>
<view class="content-box">
<!-- 苏城环游记 todo-->
<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" circular> 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}}">
<image lazy-load style="" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
</view> -->
<view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}" style="border: 3rpx solid #E96B11;">
<!-- <image class="small-bg" style="" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/swiperBg.png" mode="aspectFill"></image> -->
<swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="smBannerIndex" circular indicator-dots indicator-color="rgba(156, 31, 35, .6)" indicator-active-color="#9C1F23">
<block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}" style="position: relative;">
<!-- 原 圆角77rpx,现改为13rpx --> <!-- 原 圆角77rpx,现改为13rpx -->
<image lazy-load style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image> <!-- <image lazy-load style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2025/smallBg.png"></image> -->
<image lazy-load style="" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
@ -87,6 +92,19 @@
<view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="index"></view> <view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="index"></view>
</view> --> </view> -->
</view> </view>
<view class="small-bottom">
<view class="ai-box" style="" wx:if="{{mainTypeList.length>0}}">
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/aiBgs.gif"></image>
<!-- <view class="ai-text">{{aiStr}}</view> -->
</view>
<image bind:tap="goYjgl" style="" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/yjgl.png" mode="aspectFill" class="yjgl"></image>
</view>
</view>
<view class="content-box">
<!-- 苏城环游记 todo-->
<!-- 限时特惠--新版--> <!-- 限时特惠--新版-->
<view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.hot_deals}}"> <view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.hot_deals}}">
@ -183,22 +201,6 @@
</view> </view>
<view class="small-swiper-box" wx:if="{{xiaobanner.length>0 && func_data.banner_mini}}">
<swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="smBannerIndex" circular>
<block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}" style="position: relative;">
<!-- 原 圆角77rpx,现改为13rpx -->
<!-- <image lazy-load style="position: absolute;left: 0;right: 0;top: 0;bottom: 0;" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/index2025/smallBg.png"></image> -->
<image lazy-load style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item>
</block>
</swiper>
<!-- <view class="dot-list com-flex sm-dot-list">
<view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="index"></view>
</view> -->
</view>
<!-- 公共服务 --> <!-- 公共服务 -->
<view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.service_public}}"> <view class="sale-road-boxes" style="margin-top:0;" wx:if="{{func_data.service_public}}">
<image lazy-load class="common-header-img" mode="widthFix" src="{{indexSeason.ggfw}}"></image> <image lazy-load class="common-header-img" mode="widthFix" src="{{indexSeason.ggfw}}"></image>
@ -211,6 +213,7 @@
<view class="ggfw-list" style="width:100%;margin-top: 16rpx;position: relative;z-index: 1;"> <view class="ggfw-list" style="width:100%;margin-top: 16rpx;position: relative;z-index: 1;">
<view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"> <view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image> <image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
<view>{{item.menu_name}}</view>
</view> </view>
</view> </view>
</view> </view>
@ -276,7 +279,7 @@
</scroll-view> --> </scroll-view> -->
<view class="big-image-box" style="height: 333rpx;"> <view class="big-image-box" style="height: 333rpx;">
<image style="border-radius: 0;" lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image> <image style="border-radius: 0;" lazy-load src="{{SQSM[cityIndex].icon}}" mode="heightFix" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image>
</view> </view>
</view> </view>
@ -298,7 +301,7 @@
<image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="hot-list" style="margin-top: 7rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}"> <!-- <view class="hot-list" style="margin-top: 7rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number"> <view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number">
<view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id"> <view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id">
<view class="hot-item"> <view class="hot-item">
@ -318,16 +321,85 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<!-- <view wx:if="{{listMore}}" class="more-btn-text" bindtap="getList">查看更多</view>
<view wx:else class="more-btn-text" bindtap="getList">暂无更多推荐</view> -->
</view>
<!-- Tab 切换 -->
<scroll-view scroll-x class="custom-tabs" enable-flex>
<view
wx:for="{{recommendType}}"
wx:key="id"
class="tab-btn {{activeIndex === index ? 'active' : ''}}"
bindtap="handleTabClick"
data-index="{{index}}"
>
{{ item.name }}
</view> </view>
</scroll-view>
<!-- 堆叠卡片轮播 -->
<view
class="stack-swiper"
bindtouchstart="handleTouchStart"
bindtouchend="handleTouchEnd"
>
<!--
直接从 cardStyles 数组中取样式
cardStyles[index] 对应第 index 个卡片的样式字符串
-->
<view
class="stack-item"
wx:for="{{recommendType}}"
wx:key="id"
style="{{cardStyles[index]}}"
bindtap="handleCardClick"
data-index="{{index}}"
>
<!-- 内容区域:只有当前选中的显示 -->
<view class="card-inner-border" style="opacity: {{index === activeIndex ? 1 : 0}}">
<view
class="product-item"
wx:for="{{item.list}}"
wx:for-item="pItem"
wx:for-index="pIndex"
wx:key="id"
bindtap="gotoDetail"
data-item="{{pItem}}"
data-index="{{index}}"
>
<!-- 图片 -->
<image class="product-img" src="{{pItem.headimg}}" mode="aspectFill"></image>
<!-- 内容 -->
<view class="product-content">
<!-- 标题 (多行省略) -->
<view class="title text-overflowRows">{{pItem.title}}</view>
<!-- 标签 -->
<view class="tags" wx:if="{{pItem.tagsArray}}">
<!-- 使用 wxs 处理字符串分割 -->
<view
class="tag-item text-overflow"
wx:for="{{pItem.tagsArray}}"
wx:for-item="tagItem"
wx:key="*this"
>
{{tagItem}}
</view>
</view>
<!-- 价格与按钮 -->
<view class="flex-between">
<view class="price">¥{{pItem.price / 100}}</view>
<view class="btn-img">立即购买</view>
</view>
</view>
</view>
<view class="see-more-link" bindtap="gotoPath" data-item="{{item}}">查看更多 >></view>
</view>
</view>
</view>
</view>
</view>
<!-- 广告弹窗 --> <!-- 广告弹窗 -->
<view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view> <view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view>
@ -415,7 +487,7 @@
<block wx:for="{{xiaobanner}}" wx:key="index"> <block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item data-item="{{item}}" style="position: relative;"> <swiper-item data-item="{{item}}" style="position: relative;">
<image lazy-load style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image> <image lazy-load style="border-radius:13rpx;" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>

316
pages/index/index.wxss

@ -5,13 +5,17 @@
min-height: 100vh; min-height: 100vh;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background-size: 100% auto; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-bottom: 200rpx; padding-bottom: 100rpx;
background-color:#F8E0C6; background-color: rgba(80, 84, 136, 1);
background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/topGifs.gif"); background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/bg.jpg");
}
.top-img {
position: absolute;
top: 0;
left: 0;
width: 100vw;
} }
.swiper{ .swiper{
display: block; display: block;
@ -71,7 +75,7 @@
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 26rpx 20rpx 30rpx; padding: 26rpx 28rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
/* background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) */ /* background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) */
} }
@ -103,7 +107,7 @@
border-radius: 20rpx; border-radius: 20rpx;
/* background: #FFEEAD; */ /* background: #FFEEAD; */
padding-top: 13rpx; padding-top: 13rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251127/971ccf61fe5446130501fb26ac7e8ffc.png"); /* background-image: url("https://static.ticket.sz-trip.com/uploads/20251127/971ccf61fe5446130501fb26ac7e8ffc.png"); */
background-size: 100% 100%; background-size: 100% 100%;
} }
.top-icon-item { .top-icon-item {
@ -154,27 +158,36 @@
.common-header-img{ .common-header-img{
width: 100%; width: 100%;
position: relative; position: relative;
margin-top: 25rpx;
} }
.small-swiper { .small-swiper {
height: 154rpx; height: 366.73rpx;
} }
.small-swiper image { .small-swiper image {
display: block; display: block;
width: 100%; width: 100%;
height: 154rpx; height: 366.73rpx;
} }
.small-swiper-box { .small-swiper-box {
margin: 50rpx 0; width: 306.73rpx;
width: 100%; height: 366.73rpx;
height: 154rpx;
border-radius: 20rpx; border-radius: 20rpx;
/* border-radius: 77rpx; */ /* border-radius: 77rpx; */
overflow: hidden; overflow: hidden;
margin-top: 33rpx; /* margin-top: 33rpx; */
position: relative; position: relative;
} }
.small-bg {
position: absolute;
top: 0;
left: 0;
width: 306.73rpx;
height: 366.73rpx;
z-index: 2000;
}
.sale-road-boxes { .sale-road-boxes {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -812,11 +825,15 @@
.ggfw-list .ggfw { .ggfw-list .ggfw {
width: 157.33rpx; width: 157.33rpx;
height: 130.67rpx; height: 130.67rpx;
/* margin-bottom: 23rpx; */ margin-bottom: 21rpx;
font-weight: 500;
font-size: 23rpx;
color: #FFF2E0;
text-align: center;
} }
.ggfw image{ .ggfw image{
width: 100%; width: 113.33rpx;
height: 100%; height: 113.33rpx;
} }
.six-box-new { .six-box-new {
@ -835,7 +852,6 @@
} }
.six-box-new .big-image-box image{ .six-box-new .big-image-box image{
width: 100%;
height: 100%; height: 100%;
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
} }
@ -1059,8 +1075,8 @@
} }
.ai-box{ .ai-box{
margin: 15rpx 0 40rpx; /* margin: 15rpx 0 40rpx; */
width: 100%; width: 373.33rpx;
position: relative; position: relative;
} }
.ai-text{ .ai-text{
@ -1137,3 +1153,263 @@
width: 100%; width: 100%;
} }
.small-box {
/* width: 100%; */
height: 366.73rpx;
display: flex;
justify-content: space-between;
margin: 30rpx;
}
.small-bottom {
display: flex;
flex-direction: column;
justify-content: space-between;
}
/* Tab */
.custom-tabs {
white-space: nowrap;
width: 100%;
height: 100rpx;
margin-top: 32rpx;
}
.tab-btn {
display: inline-block;
width: 200rpx;
height: 53rpx;
line-height: 53rpx;
text-align: center;
font-weight: 500;
font-size: 28rpx;
margin-right: 10rpx;
background-size: 100% 100%;
background-repeat: no-repeat;
transition: all 0.3s;
color: #111;
background-image: url('https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/hotBg.png');
background-size: 100% 100%;
}
.tab-btn.active {
font-weight: bold;
color: #E33929;
}
/* Stack Swiper */
.stack-swiper {
position: relative;
width: 700rpx;
height: 850rpx;
margin: 0 auto;
/* padding-right: 50rpx; */
box-sizing: border-box;
margin-left: -10rpx;
}
.stack-item {
position: absolute;
width: 630rpx;
height: 100%;
border-radius: 20rpx;
top: 0;
left: 10rpx;
/* 动画过渡 */
transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out, background-color 0.4s;
box-shadow: -4rpx 4rpx 16rpx rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.card-inner-border {
width: 100%;
height: 100%;
border-radius: 20rpx;
padding: 20rpx;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: space-between;
background-color: transparent;
transition: opacity 0.3s;
}
/* Content Demo */
.product-content-demo {
flex: 1;
display: flex;
flex-direction: column;
}
.demo-img {
width: 100%;
height: 350rpx;
background-color: #ddd;
border-radius: 16rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
justify-content: center;
color: #666;
font-size: 32rpx;
}
.demo-info {
flex: 1;
}
.demo-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.demo-tags text {
display: inline-block;
border: 1px solid #ff6b6b;
color: #ff6b6b;
font-size: 20rpx;
padding: 2rpx 10rpx;
border-radius: 8rpx;
margin-right: 10rpx;
}
.demo-price-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 30rpx;
}
.price {
color: #d43d3d;
font-size: 40rpx;
font-weight: bold;
}
.buy-btn {
background: linear-gradient(90deg, #ff6b6b, #e03e3e);
color: #fff;
padding: 10rpx 30rpx;
border-radius: 30rpx;
font-size: 26rpx;
}
.see-more-link {
text-align: center;
width: 220rpx; /* 3.03rem */
height: 50rpx; /* 0.7rem */
background: #FFF9F2;
border-radius: 25rpx; /* 0.35rem */
font-weight: bold;
font-size: 26rpx; /* 0.42rem */
color: #CE3B2B;
line-height: 50rpx;
margin: 0 0 20rpx auto;
display: block;
}
.yjgl {
width: 373.33rpx;
height: 133.33rpx;
}
.product-item {
width: 100%; /* 自动填满容器 */
height: 220rpx; /* 3rem ≈ 210-220rpx */
background: #FFF9F2;
border-radius: 14rpx; /* 0.2rem */
display: flex;
margin-bottom: 20rpx;
box-sizing: border-box;
padding: 10rpx; /* 稍微加点内边距 */
}
.product-img {
width: 200rpx; /* 3rem */
height: 200rpx; /* 3rem */
background: #F9EFD7;
border-radius: 14rpx; /* 0.2rem */
border: 1rpx solid #FAD29B;
margin-right: 14rpx; /* 0.19rem */
flex-shrink: 0; /* 防止图片被压缩 */
}
.product-content {
height: 200rpx; /* 3rem */
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
padding-right: 10rpx;
overflow: hidden; /* 防止内容溢出 */
}
.title {
font-weight: bold;
font-size: 30rpx; /* 0.42rem */
color: #000000;
line-height: 1.3;
}
/* 多行省略通用样式 */
.text-overflowRows {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2; /* 限制2行 */
overflow: hidden;
text-overflow: ellipsis;
}
.tags {
display: flex;
margin: 8rpx 0;
}
.tag-item {
line-height: 36rpx; /* 0.5rem */
border-radius: 8rpx; /* 0.1rem */
border: 1rpx solid #CE3B2B;
padding: 0 10rpx;
margin-right: 10rpx;
font-weight: 500;
font-size: 24rpx; /* 0.34rem */
color: #CE3B2B;
white-space: nowrap;
}
.flex-between {
display: flex;
justify-content: space-between;
align-items: flex-end; /* 底部对齐 */
}
.price {
font-weight: bold;
font-size: 32rpx; /* 0.42rem 稍微调大增加强调 */
color: #DD2723;
}
.btn-img {
width: 150rpx; /* 2.1rem */
height: 50rpx; /* 0.71rem */
line-height: 50rpx;
text-align: center;
font-weight: bold;
font-size: 24rpx; /* 0.34rem */
color: #F9EFD7;
/* 请确保背景图链接有效 */
background-image: url('https://static.ticket.sz-trip.com/jundaosuzhou/images/index2026/btnBg.png');
background-size: 100% 100%;
border-radius: 25rpx; /* 按钮圆角 */
}

9
pages/info/sceneProductInfo/index.js

@ -64,6 +64,8 @@ Page({
skuDays: 30, skuDays: 30,
advList: [], advList: [],
zzShow: true
}, },
/** /**
@ -77,9 +79,10 @@ Page({
} }
if(options.id) { if(options.id) {
let tempUrl = util.detailDomain+`/ScenicDetail?id=${options.id}` let tempUrl = util.detailDomain+`/ScenicDetail?id=${options.id}`
wx.navigateTo({ wx.redirectTo({
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl), url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl),
}) })
return
} }
if (options.retailId) { if (options.retailId) {
this.setData({ this.setData({
@ -272,7 +275,9 @@ Page({
}, },
onReady() {
this.setData({zzShow: false})
},
// 获取广告 // 获取广告
getAdv() { getAdv() {
commonApi._post("adv/getAdv", { commonApi._post("adv/getAdv", {

2
pages/info/sceneProductInfo/index.wxml

@ -372,3 +372,5 @@
</view> </view>
<code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}"> <code showModel="{{showQrCode}}" qrcode = "{{wxqrcode}}">
</code> </code>
<view class="zhezhao" wx:if="{{zzShow}}"></view>

8
pages/info/sceneProductInfo/index.wxss

@ -1083,3 +1083,11 @@ line-height: 93rpx;
.adv-swiper{ .adv-swiper{
height: 166.67rpx; height: 166.67rpx;
} }
.zhezhao {
width: 100vw;
height: 100vh;
position: fixed;
background-color: #fff;
z-index: 2000;
}

333
pages/pbService/web/index.js

@ -3,26 +3,80 @@ let app = getApp()
import commonApi from "../../../utils/https/common" import commonApi from "../../../utils/https/common"
import userApi from "../../../utils/https/user" import userApi from "../../../utils/https/user"
import https from "../../../utils/https.js" import https from "../../../utils/https.js"
Page({
/** Page({
* 页面的初始数据
*/
data: { data: {
webUrl:"", webUrl: "",
shareTitle: "", shareTitle: "",
shareUrl: "", shareUrl: "",
canSetData: true
cachedOptions: null,
isWaitingLogin: false,
}, },
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) { onLoad: function (options) {
// onLoad 只负责存参数,不执行任何跳转逻辑,防止和页面初始化冲突
console.log('onLoad options:', options);
this.data.cachedOptions = options;
},
onShow: function () {
// 将所有逻辑移到 onShow,确保页面加载完毕后再执行跳转
this.checkLoginAndLoad();
},
checkLoginAndLoad: function() {
// 1. 防白屏容错:检查参数
let options = this.data.cachedOptions;
if (!options || !options.weburl) {
setTimeout(() => { wx.navigateBack(); }, 100);
return;
}
let token = wx.getStorageSync('jstrip_token');
// 2. 有 Token:正常加载
if (token) {
// 如果是刚登录回来,或者页面还没加载过 URL
if (this.data.isWaitingLogin || !this.data.webUrl) {
console.log('已登录,开始加载页面');
this.data.isWaitingLogin = false;
this.handleUrlProcess();
}
return;
}
// 3. 无 Token:处理跳转
// 3.1 如果 isWaitingLogin 为 true,说明是刚从登录页返回(用户取消了登录)
if (this.data.isWaitingLogin) {
console.log('用户取消登录,返回上一页');
wx.navigateBack();
return;
}
// 3.2 第一次检测到未登录,跳转登录页
console.log('未登录,延时跳转登录页');
this.data.isWaitingLogin = true;
// ★关键修复★:使用 setTimeout 延迟跳转,解决 "navigateTo with an already exist webviewId" 报错
setTimeout(() => {
wx.navigateTo({
url: '/pages/login/index',
fail: (err) => {
console.error('跳转失败:', err);
this.data.isWaitingLogin = false; // 重置标记以便重试
}
});
}, 300); // 延迟 300ms 足够让页面初始化完成
},
handleUrlProcess: function () {
let options = this.data.cachedOptions;
// 双重检查
if (!options || !options.weburl) return;
let weburl = decodeURIComponent(options.weburl) let weburl = decodeURIComponent(options.weburl)
// weburl = 'https://test.m.cloud.sz-trip.com/petYou2024'
console.log('weburl',weburl)
// 获取路径参数
let webParam = {} let webParam = {}
let baseUrl = "" let baseUrl = ""
try { try {
@ -34,59 +88,42 @@ Page({
webParam[(parts[0])] = (parts[1]); webParam[(parts[0])] = (parts[1]);
}); });
} }
} catch (e) { console.log(e) }
} catch(e) {
console.log(e)
}
console.log(webParam)
let lowerUrl = weburl.toLowerCase() let lowerUrl = weburl.toLowerCase()
// 宠你有礼 市民卡授权
if (lowerUrl.indexOf('petyou2024') && webParam.cnylCode) {
commonApi._get("uservice/user/loginByCnyl", {
cnylCode: webParam.cnylCode
}).then(res => {
if(res.data && res.data.id && res.data.token) { // 此时 Token 肯定存在
wx.setStorageSync("jstrip_userid", res.data.id) let token = wx.getStorageSync('jstrip_token');
wx.setStorageSync("jstrip_token", res.data.token)
wx.setStorageSync("jstrip_userInfo", res.data)
weburl += '&token='+res.data.token // 1. 宠你有礼
if (lowerUrl.indexOf('petyou2024') != -1 && webParam.cnylCode) {
commonApi._get("uservice/user/loginByCnyl", { cnylCode: webParam.cnylCode })
.then(res => {
if (res.data && res.data.id && res.data.token) {
this.saveLoginInfo(res.data);
weburl += '&token=' + res.data.token
} }
}).finally(()=>{ }).finally(() => { this.setUrl(weburl) })
// this.setData({
// webUrl:weburl
// })
this.setUrl(weburl)
})
} }
// 遇见昆山 // 2. 遇见昆山
else if (lowerUrl.indexOf('couponAndKs') && webParam.ksCode) { else if (lowerUrl.indexOf('couponAndKs') != -1 && webParam.ksCode) {
commonApi._get("uservice/user/loginBykunshan", { commonApi._get("uservice/user/loginBykunshan", { code: webParam.ksCode })
code: webParam.ksCode .then(res => {
}).then(res => { if (res.data && res.data.id && res.data.token) {
if(res.data && res.data.id && res.data.token) { this.saveLoginInfo(res.data);
wx.setStorageSync("jstrip_userid", res.data.id) weburl += '&token=' + res.data.token
wx.setStorageSync("jstrip_token", res.data.token)
wx.setStorageSync("jstrip_userInfo", res.data)
weburl += '&token='+res.data.token
} }
}).finally(()=>{ }).finally(() => { this.setUrl(weburl) })
// this.setData({
// webUrl:weburl
// })
this.setUrl(weburl)
})
} }
// 君到苏州 加token // 3. 君到苏州
else if(lowerUrl.indexOf('m.cloud.sz-trip.com')!=-1) { else if (lowerUrl.indexOf('m.cloud.sz-trip.com') != -1) {
delete webParam.token delete webParam.token
delete webParam.lon delete webParam.lon
delete webParam.lat delete webParam.lat
weburl = baseUrl weburl = baseUrl
if(Object.keys(webParam).length>0) { if (Object.keys(webParam).length > 0) {
const newParamsArray = []; const newParamsArray = [];
for (let key in webParam) { for (let key in webParam) {
newParamsArray.push(`${key}=${(webParam[key])}`); newParamsArray.push(`${key}=${(webParam[key])}`);
@ -94,171 +131,77 @@ Page({
weburl = `${baseUrl}?${newParamsArray.join('&')}`; weburl = `${baseUrl}?${newParamsArray.join('&')}`;
} }
let token = wx.getStorageSync('jstrip_token') if (Object.keys(webParam).length > 0) {
if (token) { weburl += '&token=' + token
if (Object.keys(webParam).length>0) {
weburl += '&token='+token
} else { } else {
weburl += '?token='+token weburl += '?token=' + token
}
} }
let _this = this
try { this.handleLocationAndSetUrl(weburl, webParam, token);
let lonAndLat = (wx.getStorageSync('lonAndLat'))
if (lonAndLat && JSON.parse(lonAndLat)) {
lonAndLat = JSON.parse(lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} }
// 4. 其他
else {
this.setUrl(weburl) this.setUrl(weburl)
return
} else {
wx.getLocation({
type: 'gcj02',
success: (res) => {
let lonAndLat = JSON.stringify({lat: res.latitude,lon: res.longitude})
wx.setStorageSync('lonAndLat', lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} }
_this.setUrl(weburl)
}, },
fail: (err) => {
_this.setUrl(weburl) handleLocationAndSetUrl(weburl, webParam, token) {
} let that = this;
}) try {
} let lonAndLat = wx.getStorageSync('lonAndLat')
} catch(e) { let locObj = null;
this.setUrl(weburl) if (lonAndLat) {
} try { locObj = JSON.parse(lonAndLat); } catch(e) {}
// this.setUrl(weburl)
} else {
// this.setData({
// webUrl:weburl
// })
this.setUrl(weburl)
} }
// if(weburl.indexOf('m.cloud.sz-trip.com')!=-1){ if (locObj && locObj.lon && locObj.lat) {
// userApi.user_post("user/getMyInfo").then(res=>{ weburl = that.appendLocation(weburl, locObj.lon, locObj.lat, webParam, token);
// let weburl = weburl that.setUrl(weburl);
// if(weburl.indexOf('?')!=-1){ return;
// weburl += '&token='+res.data.token; }
// }
// else {
// weburl += '?token='+res.data.token
// }
// this.setData({
// info:res.data,
// webUrl:weburl
// })
// })
// }
// else if(weburl.indexOf('m.jszhwlpt.com')!=-1 || weburl.indexOf('wechat.b2c.zj-trip.net')!=-1){
// // 如果是去苏心游或者镇江的话
// userApi.user_post("user/getJumpThirdAppCode",{}).then(res=>{
// let weburl = weburl
// if(weburl.indexOf('?')!=-1){
// weburl += '&original_sys_name=jdsz&auth_code='+res.data;
// }
// else {
// weburl += '?original_sys_name=jdsz&auth_code='+res.data
// }
// this.setData({
// info:res.data,
// webUrl:weburl
// })
// })
// }
// else {
// } wx.getLocation({
}, type: 'gcj02',
handleMessage(data) { success: (res) => {
// this.setData({ let newLoc = { lat: res.latitude, lon: res.longitude };
// shareTitle:data.shareTitle, wx.setStorageSync('lonAndLat', JSON.stringify(newLoc));
// shareUrl:data.shareUrl weburl = that.appendLocation(weburl, newLoc.lon, newLoc.lat, webParam, token);
// }) that.setUrl(weburl);
console.log('打印22222',data);
}, },
fail: (err) => {
loginByCode () { console.log('定位失败');
// 市民卡 that.setUrl(weburl);
if(options && options.cnylCode) {
commonApi._post("uservice/user/loginByCnyl", {
cnylCode: options.cnylCode
}).then(res => {
if(res.data && res.data.id && res.data.token) {
https.set_logininfo(res);
} }
}) })
} catch (e) {
console.error(e);
that.setUrl(weburl);
} }
}, },
setUrl (url) { appendLocation(url, lon, lat, webParam, token) {
console.log(url) if (Object.keys(webParam).length > 0 || token) {
let that = this return url + `&lon=${lon}&lat=${lat}`;
if (this.data.canSetData) { } else {
this.data.canSetData = false return url + `?lon=${lon}&lat=${lat}`;
this.setData({
webUrl:url
})
setTimeout(() => {
that.data.canSetData = true
}, 1000);
} }
}, },
/** saveLoginInfo(data) {
* 生命周期函数--监听页面初次渲染完成 wx.setStorageSync("jstrip_userid", data.id)
*/ wx.setStorageSync("jstrip_token", data.token)
onReady: function () { wx.setStorageSync("jstrip_userInfo", data)
}, },
/** setUrl(url) {
* 生命周期函数--监听页面显示 console.log('设置webUrl:', url)
*/ if (!url) return;
onShow: function () { this.setData({ webUrl: url })
}, },
/** handleMessage(data) {},
* 生命周期函数--监听页面隐藏 loginByCode() {},
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () { onShareAppMessage: function () {
return { return {
title: this.data.shareTitle, title: this.data.shareTitle,
@ -266,7 +209,7 @@ Page({
} }
}, },
onShareTimeline: function() { onShareTimeline: function () {
return { return {
title: this.data.shareTitle, title: this.data.shareTitle,
path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`, path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`,

3
pages/user/order/list.wxml

@ -8,6 +8,7 @@
</view> </view>
<view class="types"> <view class="types">
<view class="type-item{{type?'':' active'}}" bindtap="changeType" data-type="">全部</view> <view class="type-item{{type?'':' active'}}" bindtap="changeType" data-type="">全部</view>
<!-- <view class="type-item{{type=='RESERVATION'?' active':''}}" bindtap="changeType" data-type="RESERVATION">抢票中</view> -->
<view class="type-item{{type=='WAIT_PAYMENT'?' active':''}}" bindtap="changeType" data-type="WAIT_PAYMENT">待付款</view> <view class="type-item{{type=='WAIT_PAYMENT'?' active':''}}" bindtap="changeType" data-type="WAIT_PAYMENT">待付款</view>
<view class="type-item{{type=='WAIT_CONFIRM'?' active':''}}" bindtap="changeType" data-type="WAIT_CONFIRM">待确认</view> <view class="type-item{{type=='WAIT_CONFIRM'?' active':''}}" bindtap="changeType" data-type="WAIT_CONFIRM">待确认</view>
<view class="type-item{{type=='WAIT_POST'?' active':''}}" bindtap="changeType" data-type="WAIT_POST">待发货</view> <view class="type-item{{type=='WAIT_POST'?' active':''}}" bindtap="changeType" data-type="WAIT_POST">待发货</view>
@ -21,7 +22,7 @@
<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.state_text}}</text>
</view> </view>
<view data-item="{{order}}" wx:for="{{item.order_product_list}}" wx:for-item="order"> <view data-item="{{order}}" wx:for="{{item.order_product_list}}" wx:for-item="order">
<view class="order-info" wx:if="{{!order.is_bind_agent}}"> <view class="order-info" wx:if="{{!order.is_bind_agent}}">

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

@ -3,101 +3,143 @@ import commonApi from "../../../../utils/https/common"
import userApi from "../../../../utils/https/user" import userApi from "../../../../utils/https/user"
import QRCode from '../../../../utils/weapp-qrcode.js' import QRCode from '../../../../utils/weapp-qrcode.js'
import util from '../../../../utils/util' import util from '../../../../utils/util'
let app = getApp(),timer let app = getApp(),
timer
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
id:null, id: null,
info:null, info: null,
orderState:app.globalData.orderState, orderState: app.globalData.orderState,
productState:app.globalData.productState, productState: app.globalData.productState,
product_model:null, product_model: null,
isRefund:false, isRefund: false,
feeInfoFlag:false, feeInfoFlag: false,
codeIndex:0, codeIndex: 0,
codeImgs:[], codeImgs: [],
minute:0, minute: 0,
second:0, second: 0,
cardTypes:{}, cardTypes: {},
cxr1:false, cxr1: false,
cxr1Text:'更多', cxr1Text: '更多',
sysm:false, sysm: false,
sysmText:'更多', sysmText: '更多',
sysm2:false, sysm2: false,
sysm2Text:'更多', sysm2Text: '更多',
imgLen:[], imgLen: [],
ids:[], ids: [],
isPost: false, // 有没有邮寄产品 isPost: false, // 有没有邮寄产品
showProgressPopup: false,
reversedProgressList: [] // 数据源
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function(options) {
this.setData({ this.setData({
id:options.id id: options.id
}) })
userApi.user_post("user/getCardTypeList").then(res=>{ userApi.user_post("user/getCardTypeList").then(res => {
let cardTypes = {}; let cardTypes = {};
res.data.map(item=>{ res.data.map(item => {
cardTypes[item.type]=item.title; cardTypes[item.type] = item.title;
}) })
this.setData({ this.setData({
cardTypes:cardTypes cardTypes: cardTypes
}) })
}) })
}, },
copy:function(e){ // 防止弹窗背景滚动
preventTouchMove() {
return;
},
// 关闭弹窗
closeProgressPopup() {
this.setData({
showProgressPopup: false
});
},
// 打开弹窗
openProgressPopup() {
this.setData({
showProgressPopup: true
});
},
copy: function(e) {
let code = e.currentTarget.dataset.num; let code = e.currentTarget.dataset.num;
wx.setClipboardData({ wx.setClipboardData({
data: code, data: code,
success: function (res) { success: function(res) {
wx.showToast({ wx.showToast({
title: '复制成功', title: '复制成功',
icon:'success' icon: 'success'
}) })
} }
}) })
}, },
getCodeImg:function(){ getCodeImg: function() {
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[],codeId=0,arr = []; let that = this,
this.data.info.order_product_list.forEach(qrcode=>{ sys = wx.getSystemInfoSync(),
qrcode.qrcode.map((item,index)=>{ radio = sys.screenWidth / 750,
qrcode = this.data.info.order_product_list[0].qrcode,
codeImgs = [],
codeId = 0,
arr = [];
this.data.info.order_product_list.forEach(qrcode => {
qrcode.qrcode.map((item, index) => {
console.log(qrcode.is_force_display_code); console.log(qrcode.is_force_display_code);
item.is_force_display_code = qrcode.is_force_display_code item.is_force_display_code = qrcode.is_force_display_code
console.log(item.is_force_display_code); console.log(item.is_force_display_code);
arr.push(index) arr.push(index)
this.setData({ this.setData({
imgLen:arr imgLen: arr
}) })
if(item.use_url&&item.use_code){ if (item.use_url && item.use_code) {
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}); 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
});
// if(codeImgs.length==qrcode.qrcode.length){ // if(codeImgs.length==qrcode.qrcode.length){
// that.setData({ // that.setData({
// codeImgs:codeImgs // codeImgs:codeImgs
// }) // })
// } // }
that.setData({ that.setData({
codeImgs:codeImgs codeImgs: codeImgs
}) })
} } else {
else {
console.log(item); console.log(item);
new QRCode('damocode'+codeId,{ new QRCode('damocode' + codeId, {
text: item.use_code, text: item.use_code,
width: 300 * radio, width: 300 * radio,
height: 300 * radio, height: 300 * radio,
padding:10, // 生成二维码四周自动留边宽度,不传入默认为0 padding: 10, // 生成二维码四周自动留边宽度,不传入默认为0
correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度 correctLevel: QRCode.CorrectLevel.H, // 二维码可辨识度
callback: (res) => { callback: (res) => {
console.log(res); console.log(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}); 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({ that.setData({
codeImgs:codeImgs codeImgs: codeImgs
}) })
} }
}) })
@ -109,59 +151,61 @@ Page({
console.log(this.data.imgLen); console.log(this.data.imgLen);
console.log(this.data.codeImgs); console.log(this.data.codeImgs);
}, },
prevCodeImg:function(){ prevCodeImg: function() {
let qrcode=this.data.codeImgs,codeIndex = this.data.codeIndex; let qrcode = this.data.codeImgs,
codeIndex = this.data.codeIndex;
console.log(codeIndex) console.log(codeIndex)
if(codeIndex==0){ if (codeIndex == 0) {
this.setData({ this.setData({
codeIndex:qrcode.length-1 codeIndex: qrcode.length - 1
}) })
} } else {
else {
this.setData({ this.setData({
codeIndex:codeIndex-1 codeIndex: codeIndex - 1
}) })
} }
console.log(codeIndex) console.log(codeIndex)
}, },
nextCodeImg:function(){ nextCodeImg: function() {
console.log(this.data.codeImgs); console.log(this.data.codeImgs);
let qrcode=this.data.codeImgs,codeIndex = this.data.codeIndex; let qrcode = this.data.codeImgs,
codeIndex = this.data.codeIndex;
codeIndex = codeIndex + 1; codeIndex = codeIndex + 1;
if(codeIndex==qrcode.length){ if (codeIndex == qrcode.length) {
codeIndex = 0; codeIndex = 0;
} }
this.setData({ this.setData({
codeIndex:codeIndex codeIndex: codeIndex
}) })
}, },
showFeeInfo:function(){ showFeeInfo: function() {
this.setData({ this.setData({
feeInfoFlag:!this.data.feeInfoFlag feeInfoFlag: !this.data.feeInfoFlag
}) })
}, },
close:function(){ close: function() {
let _this = this,info = _this.data.info; let _this = this,
info = _this.data.info;
wx.showModal({ wx.showModal({
title:'提示', title: '提示',
content:"确定取消吗", content: "确定取消吗",
success:function(res){ success: function(res) {
if(res.confirm){ if (res.confirm) {
commonApi.user_post("order/close",{ commonApi.user_post("order/close", {
order_id:info.order_id order_id: info.order_id
}).then(res=>{ }).then(res => {
if(res.code==1){ if (res.code == 1) {
wx.showToast({ wx.showToast({
title: '取消成功', title: '取消成功',
icon:'success' icon: 'success'
}) })
info.state = "CLOSED"; info.state = "CLOSED";
info.order_product_list.map(item=>{ info.order_product_list.map(item => {
item.state='CLOSED' item.state = 'CLOSED'
}) })
_this.setData({ _this.setData({
info:info info: info
}) })
} }
}) })
@ -169,27 +213,28 @@ Page({
} }
}) })
}, },
refund:function(){ refund: function() {
let _this = this,info = _this.data.info; let _this = this,
info = _this.data.info;
wx.showModal({ wx.showModal({
title:'提示', title: '提示',
content:"确定取消吗", content: "确定取消吗",
success:function(res){ success: function(res) {
if(res.confirm){ if (res.confirm) {
commonApi.user_post("order/refund",{ commonApi.user_post("order/refund", {
order_id:info.order_id order_id: info.order_id
}).then(res=>{ }).then(res => {
if(res.code==1){ if (res.code == 1) {
wx.showToast({ wx.showToast({
title: '取消成功', title: '取消成功',
icon:'success' icon: 'success'
}) })
info.state = "WAIT_REFUND"; info.state = "WAIT_REFUND";
info.order_product_list.map(item=>{ info.order_product_list.map(item => {
item.state='WAIT_REFUND' item.state = 'WAIT_REFUND'
}) })
_this.setData({ _this.setData({
info:info info: info
}) })
} }
}) })
@ -197,26 +242,28 @@ Page({
} }
}) })
}, },
daojishi:function(time){ daojishi: function(time) {
let now = new Date().getTime(); let now = new Date().getTime();
if(now>time){ if (now > time) {
clearTimeout(timer); clearTimeout(timer);
timer = null; timer = null;
util.back(); util.back();
return; return;
} }
let times = time - now,minute = Math.floor(times / (60 * 1000)),second = Math.round((times - minute * 60 * 1000) / 1000); let times = time - now,
minute = Math.floor(times / (60 * 1000)),
second = Math.round((times - minute * 60 * 1000) / 1000);
this.setData({ this.setData({
minute:util.formatNumber(minute), minute: util.formatNumber(minute),
second:util.formatNumber(second) second: util.formatNumber(second)
}) })
timer = setTimeout(()=>{ timer = setTimeout(() => {
this.daojishi(time); this.daojishi(time);
},1000) }, 1000)
}, },
// 查看苏康码 // 查看苏康码
gotoSku:function(){ gotoSku: function() {
commonApi.user_post("pbservice/Ztfw/sukangCode").then(res=>{ commonApi.user_post("pbservice/Ztfw/sukangCode").then(res => {
console.log(res) console.log(res)
app.globalData.weburl = res.data.url; app.globalData.weburl = res.data.url;
wx.navigateTo({ wx.navigateTo({
@ -225,64 +272,64 @@ Page({
return; return;
}) })
}, },
goDetail(e){ goDetail(e) {
console.log(e.currentTarget.dataset); console.log(e.currentTarget.dataset);
let item = e.currentTarget.dataset.set let item = e.currentTarget.dataset.set
// 组合产品 跳线路 // 组合产品 跳线路
if (item.compose_product_id) { if (item.compose_product_id) {
wx.navigateTo({ wx.navigateTo({
url: '/pages/info/roadInfo/index?id='+item.compose_product_id url: '/pages/info/roadInfo/index?id=' + item.compose_product_id
}) })
return return
} }
if (item.is_package == 1) { if (item.is_package == 1) {
wx.navigateTo({ wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id url: "/pages/info/postProductInfo/index?id=" + item.product_id
}) })
return return
} else if (item.is_package==2) { } else if (item.is_package == 2) {
wx.navigateTo({ wx.navigateTo({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id url: '/subPackages/goods/oneCardTour/info/index?id=' + item.scene_id
}); });
return return
} else if (item.is_package==3) { } else if (item.is_package == 3) {
wx.navigateTo({ wx.navigateTo({
url: '/subPackages/goods/memberCard/index?id='+item.product_id url: '/subPackages/goods/memberCard/index?id=' + item.product_id
}); });
return return
} }
if (item.product_model=='ticket') { if (item.product_model == 'ticket') {
wx.navigateTo({ wx.navigateTo({
url:"/pages/info/sceneProductInfo/index?id="+item.scene_id url: "/pages/info/sceneProductInfo/index?id=" + item.scene_id
}) })
}else if (item.product_model=='post') { } else if (item.product_model == 'post') {
wx.navigateTo({ wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id url: "/pages/info/postProductInfo/index?id=" + item.product_id
}) })
} }
}, },
showMsg(e){ showMsg(e) {
console.log(e.currentTarget.dataset); console.log(e.currentTarget.dataset);
let msg = e.currentTarget.dataset.msg let msg = e.currentTarget.dataset.msg
switch (msg) { switch (msg) {
case 'cxr1': case 'cxr1':
this.setData({ this.setData({
cxr1:!this.data.cxr1, cxr1: !this.data.cxr1,
cxr1Text:this.data.cxr1?'更多':'收起', cxr1Text: this.data.cxr1 ? '更多' : '收起',
}) })
break; break;
case 'sysm1': case 'sysm1':
this.setData({ this.setData({
sysm:!this.data.sysm, sysm: !this.data.sysm,
sysmText:this.data.sysm?'更多':'收起', sysmText: this.data.sysm ? '更多' : '收起',
}) })
break; break;
case 'sysm2': case 'sysm2':
this.setData({ this.setData({
sysm2:!this.data.sysm2, sysm2: !this.data.sysm2,
sysm2Text:this.data.sysm2?'更多':'收起', sysm2Text: this.data.sysm2 ? '更多' : '收起',
}) })
break; break;
default: default:
@ -292,19 +339,20 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () { onReady: function() {
}, },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function() {
commonApi.user_post("order/query",{ commonApi.user_post("order/query", {
order_id:this.data.id order_id: this.data.id
}).then(res=>{ }).then(res => {
if(res.data.create_time && res.data.auto_close_time && res.data.state=='UNPAID'){ if (res.data.create_time && res.data.auto_close_time && res.data.state == 'UNPAID') {
let time = (new Date(res.data.create_time.replace(/-/g,'/')).getTime() + Number(res.data.auto_close_time) * 1000); let time = (new Date(res.data.create_time.replace(/-/g, '/')).getTime() + Number(res
.data.auto_close_time) * 1000);
this.daojishi(time); this.daojishi(time);
} }
let proId = [] let proId = []
@ -312,48 +360,52 @@ Page({
proId.push(item.product_id) proId.push(item.product_id)
}) })
let state = "" let state = ""
res.data.order_product_list.map(order=>{ res.data.order_product_list.map(order => {
order.qrcode.map(item=>{ order.qrcode.map(item => {
item.stateText = app.globalData.codeState[item.state]; item.stateText = app.globalData.codeState[item.state];
}) })
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]; order.contacts_info = order.contacts_info ? JSON.parse(order
.contacts_info) : [];
state = state + order.state; state = state + order.state;
}) })
let reversedList = [...res.data.reservation_log].reverse();
this.setData({ this.setData({
isRefund:state.indexOf("REFUND")!=-1, isRefund: state.indexOf("REFUND") != -1,
info:res.data, info: res.data,
product_model:"ticket"||res.data.order_product_list[0].product_model, product_model: "ticket" || res.data.order_product_list[0].product_model,
ids: proId.join(","), ids: proId.join(","),
isPost: res.data.order_product_list.some(x=>x.product_model == 'post'), isPost: res.data.order_product_list.some(x => x.product_model == 'post'),
reversedProgressList: reversedList
}) })
console.log(res.data); console.log(res.data);
// debugger // debugger
console.log('ids',this.data.ids); console.log('ids', this.data.ids);
this.getCodeImg() this.getCodeImg()
// 获取行程规划 // 获取行程规划
let that = this; let that = this;
wx.getLocation({ wx.getLocation({
type: 'gcj02', type: 'gcj02',
success: function (r) { success: function(r) {
let ajaxes=[]; let ajaxes = [];
res.data.order_product_list.map(item=>{ res.data.order_product_list.map(item => {
ajaxes.push(commonApi.user_post("order/tripplan",{ ajaxes.push(commonApi.user_post("order/tripplan", {
point_type:"gd", point_type: "gd",
child_order_id:item.child_order_id, child_order_id: item.child_order_id,
lon:r.longitude, lon: r.longitude,
lat:r.latitude lat: r.latitude
})) }))
}) })
Promise.all(ajaxes).then(r=>{ Promise.all(ajaxes).then(r => {
console.log(r) console.log(r)
let orderInfo = that.data.info; let orderInfo = that.data.info;
r.map((item,index)=>{ r.map((item, index) => {
if(item && item.data && item.data.url){ if (item && item.data && item.data.url) {
orderInfo.order_product_list[index].btnUrl = item.data.url; orderInfo.order_product_list[index]
.btnUrl = item.data.url;
} }
}) })
that.setData({ that.setData({
info:orderInfo info: orderInfo
}) })
}) })
} }
@ -361,7 +413,7 @@ Page({
}) })
}, },
// 行程规划 // 行程规划
leadRoad:function(e){ leadRoad: function(e) {
let url = e.currentTarget.dataset.url; let url = e.currentTarget.dataset.url;
app.globalData.weburl = url; app.globalData.weburl = url;
wx.navigateTo({ wx.navigateTo({
@ -369,7 +421,7 @@ Page({
}) })
}, },
expandPost:function (e) { expandPost: function(e) {
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
let productList = this.data.info.order_product_list let productList = this.data.info.order_product_list
let item = productList[index] let item = productList[index]
@ -392,7 +444,7 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () { onHide: function() {
clearTimeout(timer) clearTimeout(timer)
timer = null timer = null
}, },
@ -400,21 +452,21 @@ Page({
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () { onUnload: function() {
}, },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function() {
}, },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () { onReachBottom: function() {
} }
}) })

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

@ -4,11 +4,23 @@
<view class="top-bg"></view> <view class="top-bg"></view>
<canvas wx:for="{{imgLen}}" class="code-img" style="position:absolute;z-index:-1;" canvas-id="damocode{{index}}"></canvas> <canvas wx:for="{{imgLen}}" class="code-img" style="position:absolute;z-index:-1;" canvas-id="damocode{{index}}"></canvas>
<view class="state-text" wx:if="{{info}}"> <view class="state-text" wx:if="{{info}}">
<view class="state-texts">
{{info.state_text}} {{info.state_text}}
<block wx-if="{{info.order_type == 'reservation' || info.order_type == 'reserve'}}">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/order/loading.gif"></image>
<view class="progress-box" catchtap="openProgressPopup">查看进度 ></view>
</block>
</view>
<navigator url="/pages/user/service/index" class="kefu-img"> <navigator url="/pages/user/service/index" class="kefu-img">
<image lazy-load src="https://static.ticket.sz-trip.com/jundaosuzhou/images/movieKefu.png" mode="widthFix"></image> <image lazy-load src="https://static.ticket.sz-trip.com/jundaosuzhou/images/movieKefu.png" mode="widthFix"></image>
</navigator> </navigator>
</view> </view>
<view class="order-text" wx-if="{{info.order_type == 'reservation' || info.order_type == 'reserve'}}">
<view wx-if="{{info.order_type == 'reservation'}}">
我们将于{{info.reservation_date}} 00:00为您预约抢票,最晚在{{info.reservation_date}}
09:30前告知抢票结果,请您耐心等待
</view>
</view>
<!-- <view class="code-box box" wx:if="{{info && codeImgs.length>0}}"> <!-- <view class="code-box box" wx:if="{{info && codeImgs.length>0}}">
<view bindtap="prevCodeImg" class="iconfont icon-you-copy"></view> <view bindtap="prevCodeImg" class="iconfont icon-you-copy"></view>
<view wx:for="{{info.order_product_list[0].qrcode}}" wx:if="{{codeIndex==index && codeImgs[codeIndex]}}"> <view wx:for="{{info.order_product_list[0].qrcode}}" wx:if="{{codeIndex==index && codeImgs[codeIndex]}}">
@ -315,3 +327,59 @@
<view class="mask-item"><text>订单实付</text><text>¥{{info.paid_money/100}}</text></view> <view class="mask-item"><text>订单实付</text><text>¥{{info.paid_money/100}}</text></view>
</view> </view>
</view> </view>
<!-- 自定义底部弹窗 -->
<!-- catchtouchmove 用于防止弹窗出现时底部页面还可以滚动 -->
<view class="custom-popup" wx:if="{{showProgressPopup}}" catchtouchmove="preventTouchMove">
<!-- 遮罩层 (点击关闭) -->
<view class="popup-mask" bindtap="closeProgressPopup"></view>
<!-- 弹窗内容容器 -->
<view class="popup-container">
<!-- 头部 -->
<view class="popup-header">
<view class="title">预订进度</view>
<!-- 关闭按钮 -->
<view class="close-btn" bindtap="closeProgressPopup">×</view>
</view>
<!-- 内容区 (可滚动) -->
<scroll-view scroll-y class="progress-content">
<view class="content-padding">
<!-- 列表循环 -->
<view class="timeline-item" wx:for="{{reversedProgressList}}" wx:key="index">
<!-- 左侧轴线 -->
<view class="timeline-left">
<!-- 连接线 -->
<view
class="line {{item.status == 1 && reversedProgressList[index+1].status == 1 ? 'active-line' : ''}}"
wx:if="{{index < reversedProgressList.length - 1}}"
></view>
<!-- 1. 抢票中 -->
<view class="icon-box processing" wx:if="{{item.status == 1 && item.remark == '抢票中'}}">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/order/loading.gif" class="loading-img" mode="aspectFit"></image>
</view>
<!-- 2. 其他已完成 (用CSS画对勾) -->
<view class="icon-box finished" wx:elif="{{item.status == 1}}">
<view class="css-checkmark"></view>
</view>
<!-- 3. 未完成 -->
<view class="icon-box pending" wx:else></view>
</view>
<!-- 右侧内容 -->
<view class="timeline-right">
<view class="item-title">{{ item.remark }}</view>
<view class="item-time" wx:if="{{item.execution_time}}">{{ item.execution_time }}</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>

214
pages/user/order/sceneOrderInfo/index.wxss

@ -19,6 +19,27 @@ page {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.progress-box {
width: 148rpx;
height: 41rpx;
border-radius: 20rpx;
border: 1rpx solid #FFFFFF;
line-height: 41rpx;
text-align: center;
box-sizing: border-box;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
.state-texts {
display: flex;
align-items: center;
}
.state-texts image {
width: 40rpx;
height: 40rpx;
margin: 0 14rpx;
}
.kefu-img{width: 85rpx;height: 85rpx;} .kefu-img{width: 85rpx;height: 85rpx;}
.kefu-img image{width: 85rpx;height: 85rpx;} .kefu-img image{width: 85rpx;height: 85rpx;}
.box { .box {
@ -383,3 +404,196 @@ page {
right: 0; right: 0;
bottom: 0; bottom: 0;
} }
/* --- 弹窗容器 --- */
.custom-popup {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 9999;
}
.popup-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
}
.popup-container {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
/* 调整:最大高度从 80% 降到 60%,更协调 */
max-height: 60vh;
min-height: 40vh;
background: #fff;
border-radius: 24rpx 24rpx 0 0;
display: flex;
flex-direction: column;
/* animation: slideUp 0.3s ease-out; */
padding-bottom: env(safe-area-inset-bottom); /* 适配iPhone底部黑条 */
}
@keyframes slideUp {
from { transform: translateY(100%); }
to { transform: translateY(0); }
}
/* --- 头部 --- */
.popup-header {
position: relative;
/* 调整:减小头部上下内边距 */
padding: 30rpx 0;
text-align: center;
flex-shrink: 0;
border-bottom: 1rpx solid #f5f5f5;
}
.popup-header .title {
/* 调整:标题字号 48 -> 36 */
font-size: 36rpx;
font-weight: bold;
color: #333;
}
.popup-header .close-btn {
position: absolute;
right: 20rpx;
top: 20rpx; /* 随 padding 调整 */
font-size: 50rpx; /* 60 -> 50 */
color: #999;
padding: 10rpx 20rpx;
line-height: 1;
}
/* --- 内容区 --- */
.progress-content {
flex: 1;
height: 0;
}
.content-padding {
padding: 30rpx 40rpx 50rpx;
}
.timeline-item {
display: flex;
min-height: 120rpx;
position: relative;
}
/* 左侧轴 */
.timeline-left {
width: 60rpx;
display: flex;
flex-direction: column;
align-items: center;
flex-shrink: 0;
position: relative;
}
/* 线条 */
.timeline-left .line {
position: absolute;
width: 2rpx;
background-color: #E5E5E5;
top: 36rpx;
height: 100%;
left: 50%;
transform: translateX(-50%);
z-index: 1;
}
.timeline-left .line.active-line {
background-color: #0B898E;
}
/* 图标容器通用 */
.icon-box {
margin-top: 10rpx;
z-index: 2;
background-color: #fff;
box-sizing: border-box;
}
/* 1. 灰色圆点 */
.icon-box.pending {
width: 32rpx;
height: 32rpx;
background-color: #E0E0E0; /* 颜色稍微深一点点 */
border-radius: 50%;
box-shadow: 0 0 0 6rpx #fff;
}
/* 2. 完成态 */
.icon-box.finished {
width: 32rpx;
height: 32rpx;
background-color: #0B898E;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 0 0 6rpx #fff;
}
/* 纯CSS画对勾 */
.css-checkmark {
width: 8rpx;
height: 14rpx;
border-bottom: 3rpx solid #fff; /* 4 -> 3 */
border-right: 3rpx solid #fff;
transform: rotate(45deg);
margin-bottom: 2rpx;
}
/* 3. 进行中 */
.icon-box.processing {
width: 36rpx;
height: 36rpx;
background: #0B898E;
border-radius: 50%;
box-shadow: 0 0 0 6rpx #fff;
margin-top: 8rpx;
display: flex;
align-items: center;
justify-content: center;
}
.loading-img {
width: 60%;
height: 60%;
}
/* 右侧文字 */
.timeline-right {
flex: 1;
padding-left: 24rpx;
padding-top: 4rpx;
padding-bottom: 40rpx;
}
.item-title {
font-size: 30rpx;
color: #333;
font-weight: 500;
margin-bottom: 10rpx;
}
.item-time {
font-size: 24rpx;
color: #999;
}
.order-text {
font-weight: 500;
font-size: 25rpx;
color: #FFFFFF;
padding: 0 32rpx;
}
Loading…
Cancel
Save