diff --git a/pages/component/calendarTheatre/index.js b/pages/component/calendarTheatre/index.js index a08d93e..3a4bcdf 100644 --- a/pages/component/calendarTheatre/index.js +++ b/pages/component/calendarTheatre/index.js @@ -80,15 +80,19 @@ Component({ dayNums = new Date(nextYear, nextMonth, 0).getDate(); } arrLen = startWeek + dayNums; + console.log(this.data.dates) for (let i = 0; i < arrLen; i++) { if (i >= startWeek) { + num = i - startWeek + 1; let date =util.formatDate(new Date(year +'/' + (month + 1) +'/' + num)); + let day = this.properties.datelist.find(x=>x.date==date) obj = { isToday: '' + year + (month + 1) + num, dateNum: num, weight: 5, - date:date + date:date, + haveStock: day?day.haveStock:false } } else { obj = {}; @@ -101,6 +105,8 @@ Component({ this.setData({ dateArr: dateArr }) + + console.log(dateArr) let nowDate = new Date(); let nowYear = nowDate.getFullYear(); diff --git a/pages/component/calendarTheatre/index.wxml b/pages/component/calendarTheatre/index.wxml index 0c84684..02fa0a2 100644 --- a/pages/component/calendarTheatre/index.wxml +++ b/pages/component/calendarTheatre/index.wxml @@ -15,6 +15,9 @@ {{item.dateNum}} + + · + \ No newline at end of file diff --git a/pages/component/calendarTheatre/index.wxss b/pages/component/calendarTheatre/index.wxss index a3d0095..6d5f88d 100644 --- a/pages/component/calendarTheatre/index.wxss +++ b/pages/component/calendarTheatre/index.wxss @@ -72,6 +72,11 @@ padding-right: 0.6rem; .date-head.disable { color: #999; } +.date-dot-tip{ + font-size: 40rpx; + line-height: 26rpx; + color: #D62828; +} .date-tip { font-size: 24rpx; line-height: 26rpx; diff --git a/pages/info/showInfo/index.wxml b/pages/info/showInfo/index.wxml index acf357a..7cd98ef 100644 --- a/pages/info/showInfo/index.wxml +++ b/pages/info/showInfo/index.wxml @@ -6,11 +6,11 @@ - + {{info.title}} - {{item}} + {{item}} 演出时间:{{info.subtitle}} @@ -82,10 +82,10 @@ 推荐演出 - + - + {{item.title}} diff --git a/pages/info/showInfo/index.wxss b/pages/info/showInfo/index.wxss index 1ad32cd..8007d4d 100644 --- a/pages/info/showInfo/index.wxss +++ b/pages/info/showInfo/index.wxss @@ -756,18 +756,21 @@ margin-right: 29rpx; display: flex; /* justify-content: space-between; */ align-items: center; - flex-wrap: wrap; + flex-wrap: nowrap; + width: 100%; + overflow-x: auto; + overflow-y: hidden; } .proitem{ - width: 213rpx; - margin-right: 15rpx; + width: 227rpx; + margin-right: 10rpx; } .proitem:last-of-type{ margin-right: 0; } .item-hd image{ - width: 213rpx; - height: 273rpx; + width: 227rpx; + height: 200rpx; background: #D1D7CB; border-radius: 13rpx; } diff --git a/pages/list/theatre/index.wxss b/pages/list/theatre/index.wxss index 5fded7d..e78d75e 100644 --- a/pages/list/theatre/index.wxss +++ b/pages/list/theatre/index.wxss @@ -53,8 +53,8 @@ page{ justify-content: space-between; } .item image { - width: 187rpx; - height: 240rpx; + width: 227rpx; + height: 200rpx; background: #D1D7CB; border-radius: 13rpx; margin-right: 30rpx; @@ -104,12 +104,12 @@ page{ font-weight: 500; font-size: 31rpx; color: #000; - margin-bottom: 32rpx; + margin-bottom: 9rpx; } .info .subtitle { font-size: 24rpx; color: #999999; - margin-bottom: 19rpx; + margin-bottom: 9rpx; } diff --git a/pages/order/show/index.js b/pages/order/show/index.js index 309b28d..5817c23 100644 --- a/pages/order/show/index.js +++ b/pages/order/show/index.js @@ -95,6 +95,7 @@ Page({ }, // 初始化日期 initDate () { + let _this = this // 设置90天日期 let dateArr = [] let now = new Date().getTime() @@ -110,6 +111,10 @@ Page({ // 默认选中第一天 let param = {currentTarget: {dataset: {date: 0}}} this.changeDate(param) + // console.log(dateArr) + setTimeout(() => { + this.setPriceCalendar() + }, 500); }, // 选择日期 @@ -273,6 +278,32 @@ Page({ // }) }, + + + setPriceCalendar () { + let _this = this + let skus = this.data.product.sku || [] + wx.showLoading() + Promise.all(skus.map(x=>commonApi.user_post("product/product_date_price", { + start_date: _this.data.dateArr[0].date, + end_date: _this.data.dateArr[this.data.dateArr.length-1].date, + sku_id: x.id + }))).then((res)=>{ + let timData = res.map(v=>v.data) + + _this.data.dateArr.forEach((item,i)=>{ + item.haveStock = timData.some(x=>x[i].stock>0) + }) + console.log(_this.data.dateArr) + _this.setData({ + dateArr: _this.data.dateArr + }) + }).finally(()=>{ + wx.hideLoading(); + }) + + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/pages/pbService/web/index.js b/pages/pbService/web/index.js index 606ae97..68aa73e 100644 --- a/pages/pbService/web/index.js +++ b/pages/pbService/web/index.js @@ -1,6 +1,8 @@ // pages/pbService/web/index.js let app = getApp() +import commonApi from "../../../utils/https/common" import userApi from "../../../utils/https/user" +import https from "../../../utils/https.js" Page({ /** @@ -16,10 +18,52 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - options.weburl = decodeURIComponent(options.weburl) - // if(options.weburl.indexOf('m.cloud.sz-trip.com')!=-1){ + let weburl = decodeURIComponent(options.weburl) + weburl = 'https://test.m.cloud.sz-trip.com/petYou2024?cnylCode=oK7OHccT' + console.log(weburl) + // 获取路径参数 + let webParam = {} + try { + let paramStr = weburl.split('?')[1] + if (paramStr) { + paramStr.split('&').forEach((param) => { + let parts = param.split('='); + webParam[(parts[0])] = (parts[1]); + }); + } + + } catch(e) { + console.log(e) + } + console.log(webParam) + 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) { + wx.setStorageSync("jstrip_userid", res.data.id) + wx.setStorageSync("jstrip_token", res.data.token) + wx.setStorageSync("jstrip_userInfo", res.data) + + weburl += '&token='+res.data.token + } + }).finally(()=>{ + this.setData({ + webUrl:weburl + }) + }) + } else { + this.setData({ + webUrl:weburl + }) + } + + // if(weburl.indexOf('m.cloud.sz-trip.com')!=-1){ // userApi.user_post("user/getMyInfo").then(res=>{ - // let weburl = options.weburl + // let weburl = weburl // if(weburl.indexOf('?')!=-1){ // weburl += '&token='+res.data.token; // } @@ -32,10 +76,10 @@ Page({ // }) // }) // } - // else if(options.weburl.indexOf('m.jszhwlpt.com')!=-1 || options.weburl.indexOf('wechat.b2c.zj-trip.net')!=-1){ + // 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 = options.weburl + // let weburl = weburl // if(weburl.indexOf('?')!=-1){ // weburl += '&original_sys_name=jdsz&auth_code='+res.data; // } @@ -49,9 +93,7 @@ Page({ // }) // } // else { - this.setData({ - webUrl:options.weburl - }) + // } }, handleMessage(data) { @@ -61,6 +103,20 @@ Page({ // }) console.log('打印22222',data); }, + + loginByCode () { + // 市民卡 + 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); + } + }) + } + }, + /** * 生命周期函数--监听页面初次渲染完成 */ diff --git a/project.private.config.json b/project.private.config.json index 3284060..b5b645b 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -6,6 +6,27 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/pbService/web/index", + "pathName": "pages/pbService/web/index", + "query": "weburl=https%253A%252F%252Fm.cloud.sz-trip.com%252FpetYou2024%253FcnylCode%253D123456=", + "launchMode": "default", + "scene": null + }, + { + "name": "pages/pbService/web/index", + "pathName": "pages/pbService/web/index", + "query": "https%3A%2F%2Fm.cloud.sz-trip.com%2FpetYou2024%3FcnylCode%3D123456", + "launchMode": "default", + "scene": null + }, + { + "name": "pages/pbService/web/index", + "pathName": "pages/pbService/web/index", + "query": "weburl=https%253A%252F%252Fm.cloud.sz-trip.com%252FaiPlay", + "launchMode": "default", + "scene": null + }, { "name": "pages/info/showInfo/index", "pathName": "pages/info/showInfo/index",