diff --git a/pages/component/newCalendar/index.wxml b/pages/component/newCalendar/index.wxml
index 15ed6c6..7c6ad5a 100644
--- a/pages/component/newCalendar/index.wxml
+++ b/pages/component/newCalendar/index.wxml
@@ -1,67 +1,71 @@
-
-
-
-
-
- 上一月
- 上一周
-
-
- {{year}}年 {{month}}月
-
-
- 下一月
- 下一周
-
-
-
+
+
+
+
+
+ {{year}}年 {{month}}月
+
+
+
+
+ 上一月
+ 上一周
+
+
+ 下一月
+ 下一周
+
+
+
+
+
+
+
+
+
+
+ {{item}}
+
+
+
+ {{item.date}}
+
+
+
+
+
+
+
+
+ {{item.date}}
+ 休
+
+
+ {{ item.isHoliday.name}}
+ {{ item.day}}
+
+
+
+
+
+
+
+ {{item.date}}
+
+
+
+
+
+
-
-
-
-
-
- {{item}}
-
-
-
- {{item.date}}
-
-
-
-
-
-
-
-
- {{item.date}}
- 休
-
-
- {{ item.isHoliday.name}}
- {{ item.day}}
-
-
-
-
-
-
-
- {{item.date}}
-
-
-
-
-
-
\ No newline at end of file
diff --git a/pages/component/newCalendar/index.wxss b/pages/component/newCalendar/index.wxss
index 204501b..8243b1e 100644
--- a/pages/component/newCalendar/index.wxss
+++ b/pages/component/newCalendar/index.wxss
@@ -1,7 +1,28 @@
/* components/xx-calendar/xx-calendar.wxss */
page{
- /* background: #F0B643; */
- background: #F2F2F2;
+ background: #FFFBF3;
+}
+.bigBg {
+ background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/calendar2026/bigCalss.png");
+ background-size: 100% 100%;
+ width: 750rpx;
+ height: 893rpx;
+ padding-top: 70rpx;
+ box-sizing: border-box;
+ position: relative;
+ z-index: 2;
+ margin-top: 756rpx;
+}
+.smallBg {
+ background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/calendar2026/smallCal.png");
+ background-size: 100% 100%;
+ width: 740.67rpx;
+ height: 478rpx;
+ padding-top: 103rpx;
+ box-sizing: border-box;
+ position: relative;
+ z-index: 2;
+ margin-top: 756rpx;
}
/* 头部样式start */
.title-wrap{
@@ -29,7 +50,7 @@ page{
display: flex;
justify-content: space-between;
align-items: center;
- margin: 0 22rpx;
+ margin: 0 50rpx;
}
.change-date image{
width: 50rpx;
@@ -38,10 +59,9 @@ page{
display: flex;
}
.year-mouth{
- margin: 0 60rpx;
- font-weight: bold;
- font-size: 35rpx;
- color: #000;
+ font-weight: 600;
+ font-size: 36rpx;
+ color: #EF1C24;
}
.week{
width: 100%;
@@ -59,13 +79,13 @@ page{
/* 日期区域样式start */
.date-wrap{
/* height: 500rpx; */
- width: 697rpx;
+ width: 650rpx;
margin: 0 auto;
- background-color: #fff;
+ background-color: none;
display: flex;
flex-wrap: wrap;
border-radius: 20rpx;
- margin-top: -144rpx;
+ margin-top: -165rpx;
position: relative;
}
.mouth-date{
@@ -75,7 +95,7 @@ page{
align-items: center;
width: calc(100% / 7);
/* border-bottom: 1rpx solid rgb(229, 234, 235); */
- padding-top: 10rpx;
+ /* padding-top: 10rpx; */
}
.last-mouth text,.next-mouth text{
opacity: 0;
@@ -108,16 +128,18 @@ page{
display: flex;
flex-direction: column;
align-items: center;
- margin-bottom: 10rpx;
+ margin-bottom: 5rpx;
padding-bottom: 8rpx;
}
.mouth-date .active{
- background-color: #0B898E !important;
+ background-color: #FFF168 !important;
+ border: 3rpx solid #EF1C24;
+ box-sizing: border-box;
}
.mouth-date .active text{
- color: #fff !important;
+ color: #00A4FA !important;
}
@@ -170,9 +192,9 @@ page{
}
.footer image {
- width: 20rpx;
- height: 20rpx;
- margin: 12rpx auto 20rpx;
+ width: 34rpx;
+ height: 34rpx;
+ margin: 0 auto 20rpx;
}
.arrow-left{
@@ -188,11 +210,17 @@ page{
transform: rotate(-90deg)
}
.next, .prev {
- display: flex;
- align-items: baseline;
- font-size: 27rpx;
+ width: 128rpx;
+ liine-height: 43rpx;
+ text-align: center;
+ background: #FFF168;
+ border-radius: 21rpx 21rpx 21rpx 21rpx;
+ border: 3rpx solid #EF1C24;
font-weight: 500;
- color: #000;
+ font-size: 27rpx;
+ color: #000000;
+ margin-left: 30rpx;
+ display: inline-block;
}
.next image, .prev image {
width: 20rpx;
diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js
index 61a8f2f..0db670d 100644
--- a/pages/list/activitynew/index.js
+++ b/pages/list/activitynew/index.js
@@ -30,7 +30,8 @@ Page({
movieAreas:[],
movieArea:0,
defaultDate: "2020-3-31",
- startDay: "sunday"
+ startDay: "sunday",
+ showDate: ""
},
/**
@@ -43,14 +44,19 @@ Page({
})
this.getMovieArea()
let d = new Date();
- let month = d.getMonth() + 1,
- day = d.getDate();
- month = month > 10 ? month : ("0" + month);
- day = day >= 10 ? day : ("0" + day);
- this.setData({
- selectDay: d.getTime(),
- date: d.getFullYear() + "-" + month + "-" + day
- })
+ let year = d.getFullYear();
+ let month = d.getMonth() + 1;
+ let day = d.getDate();
+ // 接口用的格式 2026-02-09
+ let apiDate = [year, month > 9 ? month : '0' + month, day > 9 ? day : '0' + day].join('-');
+ // 显示用的格式 2026年2月9日
+ let showDateStr = `${year}年${month}月${day}日`;
+
+ this.setData({
+ selectDay: d.getTime(),
+ date: apiDate,
+ showDate: showDateStr // 赋值给显示变量
+ })
this.getWeekDay();
commonApi._post("pbservice/Other/getSuzhouAreas").then(res => {
res.data.unshift({
@@ -82,10 +88,16 @@ Page({
})
})
},
+ formatChineseDate(dateStr) {
+ if (!dateStr) return "";
+ let d = typeof dateStr === 'object' ? dateStr : new Date(dateStr.replace(/-/g, '/'));
+ return `${d.getFullYear()}年${d.getMonth() + 1}月${d.getDate()}日`;
+ },
selectDate: function (e) {
console.log(e.detail);
this.setData({
date: e.detail,
+ showDate: this.formatChineseDate(e.detail),
pageNo: 1,
list: [],
total: 1,
@@ -197,23 +209,30 @@ Page({
},
// 点击修改日期
changeDate: function (e) {
- let times = e.currentTarget.dataset.times,
- d = new Date(times);
- let month = d.getMonth() + 1,
- day = d.getDate();
- month = month > 10 ? month : ('0' + month);
- day = day > 10 ? day : ('0' + day);
- this.setData({
- selectDay: times,
- date: d.getFullYear() + "-" + month + "-" + day,
- list: [],
- pageNo: 1,
- total: 1,
- moreFlag: true,
- isYL: false
- })
- this.getList();
- },
+ let times = e.currentTarget.dataset.times,
+ d = new Date(times);
+ let month = d.getMonth() + 1,
+ day = d.getDate();
+ let monthStr = month > 10 ? month : ('0' + month);
+ let dayStr = day > 10 ? day : ('0' + day);
+
+ // 接口格式
+ let apiDate = d.getFullYear() + "-" + monthStr + "-" + dayStr;
+ // 中文格式
+ let cnDate = `${d.getFullYear()}年${month}月${day}日`;
+
+ this.setData({
+ selectDay: times,
+ date: apiDate,
+ showDate: cnDate, // 【新增】同步更新显示日期
+ list: [],
+ pageNo: 1,
+ total: 1,
+ moreFlag: true,
+ isYL: false
+ })
+ this.getList();
+ },
getList: function () {
let list = this.data.list;
if (this.data.isYL) {
@@ -403,6 +422,7 @@ setCity(e){
total: 1,
moreFlag: true,
date:null,
+ // showDate: "",
isYL: this.data.type == 4 ? false: true,
selectDay: null
diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml
index 3bc3226..4faa51a 100644
--- a/pages/list/activitynew/index.wxml
+++ b/pages/list/activitynew/index.wxml
@@ -1,6 +1,6 @@
-
+
@@ -19,6 +19,7 @@
搜索
+ 当日活动 {{showDate}}
全部
景区活动
@@ -103,14 +104,14 @@
离我最近
价格最低
-
+
-
+
- {{item.name || item.title}}
-
- {{item.begin_date}}—{{item.end_date}}
+ {{item.name || item.title}}
+
+ {{item.begin_date}}—{{item.end_date}}
{{item.from_platform}}
diff --git a/pages/list/activitynew/index.wxss b/pages/list/activitynew/index.wxss
index 3aa9a67..f1c9656 100644
--- a/pages/list/activitynew/index.wxss
+++ b/pages/list/activitynew/index.wxss
@@ -5,6 +5,10 @@ page {
/* 节假日花样 */
/* background: #CEEDDB; */
}
+.top-img {
+ position: absolute;
+ width: 750rpx;
+}
.types {
/* justify-content: space-between; */
background: #fff;
@@ -122,8 +126,8 @@ background: rgba(11, 137, 142, .1);
z-index: 1;
}
.top-fixed-box {
- background: #FFF;
- width: 697rpx;
+ /* background: #FFF; */
+ width: 750rpx;
margin: 0 auto;
border-radius: 20rpx 20rpx 0 0;
margin-top: 20rpx;
@@ -134,7 +138,7 @@ background: rgba(11, 137, 142, .1);
.activity-list {
width: 697rpx;
/* padding: 0 24rpx; */
- background: #0B898E;
+ /* background: #0B898E; */
min-height:1300rpx;
margin: 0 auto;
}
@@ -197,27 +201,27 @@ background: rgba(11, 137, 142, .1);
font-size: 27rpx;
}
.activity-item {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 10rpx 22rpx;
- /* padding: 27rpx 22rpx; */
+ margin: 30rpx auto;
position: relative;
+ width: 697rpx;
+ border-radius: 27rpx 27rpx 27rpx 27rpx;
+ background-color: #fff;
}
.end-mask {
position: absolute;
/* 产品需求24/5/20 已结束就是盖在图片上,按此需求调整 */
- left: 22rpx;
+ left: 0;
/* right: 30rpx; */
/* top: 27rpx; */
text-align: center;
- width: 320rpx;
- height: 220rpx;
- line-height: 220rpx;
+ width: 697rpx;
+ height: 411rpx;
+ line-height: 411rpx;
z-index: 1;
background:rgba(0, 0, 0, 0.5);
color:#fff;
- border-radius: 10rpx;
+ border-radius: 27rpx;
+ top: 0;
}
.activity-item-out {
box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1);
@@ -226,9 +230,9 @@ background: rgba(11, 137, 142, .1);
background: white;
}
.activity-item image {
- width: 320rpx;
- height: 220rpx;
- border-radius: 10rpx;
+ width: 697rpx;
+ height: 411rpx;
+ border-radius: 27rpx 27rpx 27rpx 27rpx;
flex-shrink: 0;
overflow: hidden;
}
@@ -243,20 +247,20 @@ background: rgba(11, 137, 142, .1);
display: flex;
flex-direction: column;
justify-content: space-between;
- /* font-size: 23rpx;
- color: #999; */
flex: 1;
- min-height: 220rpx;
- /* margin-right: 28rpx; */
+ height: 141rpx;
+ font-weight: 400;
font-size: 24rpx;
- color: #666;
+ color: #999999;
+ padding: 20rpx 26rpx 26rpx;
+ box-shadow: 0rpx 4rpx 7rpx 0rpx rgba(0,0,0,0.05);
+ box-sizing: border-box;
+ border-radius: 0rpx 0rpx 27rpx 27rpx;
}
.activity-title {
- font-weight: 500;
- font-size: 31rpx;
- line-height: 45rpx;
- color: #000;
- /* color: #333; */
+ font-weight: 600;
+ font-size: 32rpx;
+ color: #000000;
}
.movie-types {
@@ -304,7 +308,8 @@ background: rgba(11, 137, 142, .1);
border-radius: 30rpx;
height: 60rpx;
/* background: #ededed; */
- background-color: rgba(204,204,204, .3);
+ background: #FFFFFF;
+ border: 3rpx solid #EB0000;
margin-bottom: 0;
font-size: 26rpx;
z-index: 9;
@@ -323,8 +328,8 @@ background: rgba(11, 137, 142, .1);
width: 110rpx;
flex-shrink: 0;
line-height: 40rpx;
- border-left: 1rpx solid #ccc;
- color: #0B898E;
+ /* border-left: 1rpx solid #ccc; */
+ color: #EF1C24;
/* 节假日花样 */
/* color: #DE4126; */
}
@@ -348,35 +353,31 @@ flex-shrink: 0;
font-weight: 500;
display: flex;
overflow-x: scroll;
- padding: 31rpx 30rpx 30rpx;
+ padding: 31rpx 0rpx 30rpx;
position: relative;
z-index: 9;
align-items: center;
-
+ border-bottom: 2rpx solid rgba(0,0,0,0.1);
}
.types-item {
- border: 1px solid #999999;
- border-radius: 27rpx;
- height: 53rpx;
- padding: 0 25rpx;
+ /* border: 1px solid #999999; */
+ /* border-radius: 27rpx; */
+ margin: 0 30rpx;
display: inline-block;
- line-height: 53rpx;
- margin-right: 13rpx;
+ /* margin-right: 13rpx; */
flex-shrink: 0;
/* border: 1px solid #FFC987; */
}
.types-item-active {
- /* padding: 0 79rpx; */
- padding: 0 25rpx;
- height: 57rpx;
- /* 节假日花样 */
- /* height: 91.33rpx; */
- line-height: 57rpx;
+ margin: 0 30rpx;
display: inline-block;
- background: #0B898E;
- color: #FFFFFF;
+ /* background: #0B898E; */
+ /* color: #FFFFFF; */
+ font-weight: 600;
+ font-size: 27rpx;
+ color: #000000;
border-radius: 27rpx;
- margin-right: 13rpx;
+ position: relative;
flex-shrink: 0;
/* 节假日花样 */
/* background-image: url("https://static.ticket.sz-trip.com/uploads/20240606/f4ff3a7f81b4be3508592f656e207497.png"); */
@@ -393,6 +394,17 @@ flex-shrink: 0;
1px 1px 0 white;
background-image: url("https://static.ticket.sz-trip.com/uploads/20250421/48ce52adb4044d6b91bbce05047695a5.png"); */
}
+.types-item-active::after {
+ content: '';
+ width: 100%;
+ height: 8rpx;
+ background: #EF1C24;
+ border-radius: 5rpx 5rpx 5rpx 5rpx;
+ position: absolute;
+ left: 0;
+ bottom: -33rpx;
+ z-index: 100;
+}
/* 不显示滚动条 */
.types-box::-webkit-scrollbar {
display: none;
@@ -403,4 +415,17 @@ flex-shrink: 0;
position: absolute;
right: 0;
z-index: 2;
+}
+
+.date-text {
+ font-weight: 600;
+ font-size: 33rpx;
+ color: #000000;
+ margin: 20rpx 30rpx 0;
+}
+.date-text text {
+ font-weight: 400;
+ font-size: 24rpx;
+ color: #999999;
+ margin-left: 10rpx;
}
\ No newline at end of file
diff --git a/pages/pbService/web/index.js b/pages/pbService/web/index.js
index 5eb5336..4a5458a 100644
--- a/pages/pbService/web/index.js
+++ b/pages/pbService/web/index.js
@@ -7,26 +7,26 @@ import https from "../../../utils/https.js"
Page({
data: {
webUrl: "",
- shareTitle: "",
- shareUrl: "",
+ shareTitle: "", // 给一个默认标题
+ shareUrl: "", // 暂时没用到,可以用 currentUrl 替代更清晰
+ currentShareUrl: "", // 【新增】用于存储 H5 传回来的最新 URL
+ currentShareImg: "", // 【新增】用于存储 H5 传回来的分享图片
cachedOptions: null,
isWaitingLogin: false,
},
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);
@@ -35,9 +35,7 @@ Page({
let token = wx.getStorageSync('jstrip_token');
- // 2. 有 Token:正常加载
if (token) {
- // 如果是刚登录回来,或者页面还没加载过 URL
if (this.data.isWaitingLogin || !this.data.webUrl) {
console.log('已登录,开始加载页面');
this.data.isWaitingLogin = false;
@@ -46,37 +44,32 @@ Page({
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; // 重置标记以便重试
+ this.data.isWaitingLogin = false;
}
});
- }, 300); // 延迟 300ms 足够让页面初始化完成
+ }, 300);
},
handleUrlProcess: function () {
+ // ... (你的原有逻辑保持不变) ...
let options = this.data.cachedOptions;
- // 双重检查
if (!options || !options.weburl) return;
let weburl = decodeURIComponent(options.weburl)
-
let webParam = {}
let baseUrl = ""
try {
@@ -91,11 +84,8 @@ Page({
} catch (e) { console.log(e) }
let lowerUrl = weburl.toLowerCase()
-
- // 此时 Token 肯定存在
let token = wx.getStorageSync('jstrip_token');
- // 1. 宠你有礼
if (lowerUrl.indexOf('petyou2024') != -1 && webParam.cnylCode) {
commonApi._get("uservice/user/loginByCnyl", { cnylCode: webParam.cnylCode })
.then(res => {
@@ -105,7 +95,6 @@ Page({
}
}).finally(() => { this.setUrl(weburl) })
}
- // 2. 遇见昆山
else if (lowerUrl.indexOf('couponAndKs') != -1 && webParam.ksCode) {
commonApi._get("uservice/user/loginBykunshan", { code: webParam.ksCode })
.then(res => {
@@ -115,9 +104,7 @@ Page({
}
}).finally(() => { this.setUrl(weburl) })
}
- // 3. 君到苏州
else if (lowerUrl.indexOf('m.cloud.sz-trip.com') != -1) {
-
delete webParam.token
delete webParam.lon
delete webParam.lat
@@ -139,13 +126,13 @@ Page({
this.handleLocationAndSetUrl(weburl, webParam, token);
}
- // 4. 其他
else {
this.setUrl(weburl)
}
},
handleLocationAndSetUrl(weburl, webParam, token) {
+ // ... (你的原有逻辑保持不变) ...
let that = this;
try {
let lonAndLat = wx.getStorageSync('lonAndLat')
@@ -180,6 +167,7 @@ Page({
},
appendLocation(url, lon, lat, webParam, token) {
+ // ... (你的原有逻辑保持不变) ...
if (Object.keys(webParam).length > 0 || token) {
return url + `&lon=${lon}&lat=${lat}`;
} else {
@@ -188,6 +176,7 @@ Page({
},
saveLoginInfo(data) {
+ // ... (你的原有逻辑保持不变) ...
wx.setStorageSync("jstrip_userid", data.id)
wx.setStorageSync("jstrip_token", data.token)
wx.setStorageSync("jstrip_userInfo", data)
@@ -199,20 +188,49 @@ Page({
this.setData({ webUrl: url })
},
- handleMessage(data) {},
+ // 1. 【修改】处理 H5 传来的消息
+ handleMessage(e) {
+ console.log('接收到 H5 消息:', e.detail);
+ if (e.detail && e.detail.data) {
+ const dataArr = e.detail.data;
+ // 取最后一条消息(通常是最新的状态)
+ const lastMsg = dataArr[dataArr.length - 1];
+
+ if (lastMsg.type === 'share') {
+ this.setData({
+ shareTitle: lastMsg.title || this.data.shareTitle,
+ currentShareUrl: lastMsg.url,
+ currentShareImg: lastMsg.imgUrl || ""
+ });
+ }
+ }
+ },
+
loginByCode() {},
- onShareAppMessage: function () {
+ // 2. 【修改】分享给好友
+ onShareAppMessage: function (options) {
+ // 优先使用 H5 传回来的 URL,其次使用 webViewUrl (微信自动捕获的),最后兜底使用初始 webUrl
+ let shareLink = this.data.currentShareUrl || options.webViewUrl || this.data.webUrl;
+
+ console.log('分享好友 URL:', shareLink);
+
return {
title: this.data.shareTitle,
- path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`,
+ path: `/pages/pbService/web/index?weburl=${encodeURIComponent(shareLink)}`,
+ imageUrl: this.data.currentShareImg || "" // 如果 H5 传了封面图就用,没有就默认截图
}
},
+ // 3. 【修改】分享到朋友圈
onShareTimeline: function () {
+ let shareLink = this.data.currentShareUrl || this.data.webUrl;
+ console.log('分享朋友圈 URL:', shareLink);
+
return {
title: this.data.shareTitle,
- path: `/pages/pbService/web/index?weburl=${encodeURIComponent(this.data.webUrl)}`,
+ query: `weburl=${encodeURIComponent(shareLink)}`,
+ imageUrl: this.data.currentShareImg || ""
}
}
})
diff --git a/project.private.config.json b/project.private.config.json
index cecb42b..bb646c9 100644
--- a/project.private.config.json
+++ b/project.private.config.json
@@ -6,12 +6,19 @@
"condition": {
"miniprogram": {
"list": [
+ {
+ "name": "pages/list/activitynew/index",
+ "pathName": "pages/list/activitynew/index",
+ "query": "",
+ "scene": null,
+ "launchMode": "default"
+ },
{
"name": "pages/info/postProductInfo/index",
"pathName": "pages/info/postProductInfo/index",
"query": "id=464726",
- "scene": null,
- "launchMode": "default"
+ "launchMode": "default",
+ "scene": null
},
{
"name": "pages/info/roadInfo/index",
diff --git a/utils/filter.wxs b/utils/filter.wxs
index 1e7865f..7264d65 100644
--- a/utils/filter.wxs
+++ b/utils/filter.wxs
@@ -5,10 +5,10 @@ var formateRichText = function(str) {
// 处理img标签
var reg = getRegExp("![]()