From 24fef20608116de5dd15e6b4b09cea766aeb6f94 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Fri, 30 Aug 2024 15:44:54 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=85=92=E5=BA=97=E6=B0=91=E5=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 18 + static/js/CommonFunction.js | 9 + static/js/request.js | 2 +- subPackages/hotelHomestay/detail.vue | 761 ++++++++++++++++++++ subPackages/hotelHomestay/hotelHomestay.vue | 45 +- subPackages/hotelHomestay/order.vue | 600 +++++++++++++++ subPackages/hotelHomestay/policy.vue | 110 +++ subPackages/techan/detail.vue | 16 +- subPackages/techan/order.vue | 52 +- subPackages/ticketBooking/detail.vue | 15 +- subPackages/ticketBooking/order.vue | 203 +++++- subPackages/ticketBooking/ticketBooking.vue | 17 +- 12 files changed, 1779 insertions(+), 69 deletions(-) create mode 100644 subPackages/hotelHomestay/detail.vue create mode 100644 subPackages/hotelHomestay/order.vue create mode 100644 subPackages/hotelHomestay/policy.vue diff --git a/pages.json b/pages.json index 26f6596..06f7c7c 100644 --- a/pages.json +++ b/pages.json @@ -138,6 +138,24 @@ "navigationStyle": "custom" } }, + { + "path": "hotelHomestay/detail", + "style": { + "navigationBarTitleText": "酒店详情" + } + }, + { + "path": "hotelHomestay/policy", + "style": { + "navigationBarTitleText": "设施/政策" + } + }, + { + "path": "hotelHomestay/order", + "style": { + "navigationBarTitleText": "酒店民宿" + } + }, { "path": "food/taocanDetail", "style": { diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index cb001e9..72df1a0 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -195,4 +195,13 @@ Date.prototype.Format = function(fmt) if(new RegExp("("+ k +")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); return fmt; +} + +// 获取最大优惠券 params:{money:100,sku_ids:1,2} +Vue.prototype.getMaxCoupon = async function (param) { + let res = await this.Post(param, "/api/coupon/use_max_coupon_list") + if (res.code == 1 && res.data.id) { + this.$store.commit("choseCoupon",res.data); + } + return res.data } \ No newline at end of file diff --git a/static/js/request.js b/static/js/request.js index e71d867..77bb1d5 100644 --- a/static/js/request.js +++ b/static/js/request.js @@ -16,7 +16,7 @@ Vue.prototype.Post = (params, apiurl) => { data: params || {}, header: params.header || { 'content-type': 'application/json', - 'token': params.token || '2dd9b712-f118-41f6-b3a8-602e4fbb0ce3' + 'token': params.token || '75895d8b-1804-42e1-8be8-bfdaa9574a5f' }, success: res => { uni.hideLoading() diff --git a/subPackages/hotelHomestay/detail.vue b/subPackages/hotelHomestay/detail.vue new file mode 100644 index 0000000..94cb777 --- /dev/null +++ b/subPackages/hotelHomestay/detail.vue @@ -0,0 +1,761 @@ + + + + + diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue index e99754f..210c7a3 100644 --- a/subPackages/hotelHomestay/hotelHomestay.vue +++ b/subPackages/hotelHomestay/hotelHomestay.vue @@ -9,10 +9,10 @@ - + - + @@ -22,11 +22,12 @@ {{item.title}} - - 盐都精选 - 盐都精选 + + + {{tag}} + - + {{showPrice(item.price)}} @@ -39,7 +40,7 @@ - 没有更多数据了 + @@ -59,20 +60,17 @@ headImg:null, navList: [], actNavIndex: 0, - type_id: 9,//演出票务的景点分类id + type_id: 11,//酒店分类id } }, onShow() { this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/8653c32761e01ee683505eddba1ae22b.png' this.finished = false - this.list = [ - {id:1, title:'景点名称景点名称景点名称 景点名称', - address:'景点名称景点名称景点名称 景点名称景点名称景点名称景点名称 景点名称',price:10000, - image:'https://tongli.sz-trip.com/uploads/20240826/a87488f6225789aa19dbb437671d388d.png', - } - ] // this.getHeadImg('piaowu') }, + onReady() { + this.getList() + }, onLoad(options) { let that = this uni.getSystemInfo({ @@ -107,10 +105,11 @@ // 根据景点标签获取景点列表 getList(){ this.Post({ - tag_id: this.navList[this.actNavIndex].id, - offset: this.list.length, - limit: 10 - },'https://yjdtadmin.sz-trip.com/api/scenic/getScenicByTagId').then(res => { + scenic_type_id: this.type_id,offset: this.list.length,limit: 10, + lon: uni.getStorageSync('location').lon || '120', + lat: uni.getStorageSync('location').lat || '30', + }, + '/api/Scenic/getScenicByType').then(res => { this.list = [...this.list, ...res.data]; if (res.data.length < 10) { this.finished = true @@ -123,9 +122,9 @@ this.Post({ type: 4, id: item.id - }, 'https://yjdtadmin.sz-trip.com/api/scenic/collect').then(res => { - if (res.code == 200) { - uni.showToast({title: res.msg}) + }, '/api/scenic/collect').then(res => { + if (res.code == 1) { + uni.showToast({title: res.msg,icon:'none'}) if (item.is_collect == 1) { item.is_collect = 0 } else { @@ -213,6 +212,8 @@ .tag-container{ display: flex; + flex-wrap: nowrap; + overflow-x: auto; .tag{ background: rgba(205,233,209,0.3); border-radius: 7rpx 5rpx 5rpx 7rpx; @@ -224,11 +225,13 @@ color: #4E7956; text-align: center; margin-right: 12rpx; + flex-shrink: 0; } } .priceBox{ + width: 120rpx; .price{ font-family: PingFang SC; font-weight: bold; diff --git a/subPackages/hotelHomestay/order.vue b/subPackages/hotelHomestay/order.vue new file mode 100644 index 0000000..36c859d --- /dev/null +++ b/subPackages/hotelHomestay/order.vue @@ -0,0 +1,600 @@ + + + + + diff --git a/subPackages/hotelHomestay/policy.vue b/subPackages/hotelHomestay/policy.vue new file mode 100644 index 0000000..3c4dbb8 --- /dev/null +++ b/subPackages/hotelHomestay/policy.vue @@ -0,0 +1,110 @@ + + + + + diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue index 45f62e3..f6232d8 100644 --- a/subPackages/techan/detail.vue +++ b/subPackages/techan/detail.vue @@ -31,7 +31,7 @@ 选择: - {{sku[productIndex].title}} + {{sku[productIndex].title || '暂无可选规格'}} @@ -181,7 +181,7 @@ '/api/goods/getSpecificationsByGoodsId' ).then(res => { if (res) { - this.sku = res.data; + this.sku = res.data || []; } }); }, @@ -218,6 +218,14 @@ this.$refs.popup.close() }, openPop() { + if (!this.sku||this.sku.length<=0) { + uni.showToast({ + title:'暂无可选规格', + icon:'none' + }) + return + } + if (!this.popShow) { this.$refs.popup.open() } else { @@ -227,8 +235,8 @@ order(item) { let goods = this.sku[this.productIndex] goods.buyNum = this.buyNum - uni.setStorageSync('order', JSON.stringify(goods)); //规格 - uni.setStorageSync('info', JSON.stringify(this.info)); //商品 + uni.setStorageSync('teChanOrder', JSON.stringify(goods)); //规格 + uni.setStorageSync('teChanInfo', JSON.stringify(this.info)); //商品 uni.navigateTo({ url: '/subPackages/techan/order' }); diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue index 5967d60..04d00ae 100644 --- a/subPackages/techan/order.vue +++ b/subPackages/techan/order.vue @@ -117,7 +117,7 @@ - + 优惠券 请选择 @@ -233,8 +233,8 @@ export default { }, onLoad() { this.$store.commit("choseCoupon", ""); - this.info = JSON.parse(uni.getStorageSync('order')); - this.detail = JSON.parse(uni.getStorageSync('info')); + this.info = JSON.parse(uni.getStorageSync('teChanOrder')); + this.detail = JSON.parse(uni.getStorageSync('teChanInfo')); if (!this.info) { uni.navigateBack(); return @@ -257,6 +257,15 @@ export default { }, onUnload(){ uni.$off("updateDataByConnect",this.getDataByConnect) + }, + onReady () { + this.$nextTick(()=>{ + setTimeout(()=>{ + this.getMaxCouponData() + },1000) + }) + + }, methods: { getContacts() { @@ -409,7 +418,7 @@ export default { } } else{ - price = ((this.info.money) * this.info.buyNum + postPrice) - (((this.info.money) * this.info.buyNum + postPrice) * this.coupon.percent) + price = ((this.info.money) * this.info.buyNum + postPrice) - (((this.info.money) * this.info.buyNum + postPrice) * this.coupon.percent/100) } } else { price = (this.info.money) * this.info.buyNum + postPrice @@ -441,7 +450,7 @@ export default { }); return; } - if (!this.IsTel(this.pickupPerson)) { + if (!this.IsTel(this.pickupPerson.phone)) { uni.showToast({ title: '请输入自提人手机号', icon: 'none' @@ -462,7 +471,6 @@ export default { if (this.sendType == 2) { goodsItem.extract_id = this.pickupAddress.id; - goodsItem.contact_id = this.pickupPerson.id; } else if (this.sendType == 1){ goodsItem.consignee_id = this.contacts.id } @@ -473,9 +481,8 @@ export default { coupon: this.coupon ? this.coupon.id : "", remark: this.remark, is_post: this.info.is_post, - reserve_name: this.reserve_name, - reserve_phone: this.reserve_phone, - reserve_idcard: this.reserve_idcard + reserve_name: this.pickupPerson.name, + reserve_phone: this.pickupPerson.phone, }; this.Post( { @@ -484,6 +491,8 @@ export default { }, '/api/order/place' ).then(res => { + uni.removeStorageSync('teChanOrder') + uni.removeStorageSync('teChanInfo') if (res.code == 1) { this.Post( { @@ -523,6 +532,15 @@ export default { } }, + // 获取最大优惠券 + async getMaxCouponData () { + let param = {money:this.allprice,sku_ids:this.info.id} + let res = await this.getMaxCoupon(param) + if (res.id) { + this.coupon = res + } + } + } @@ -801,20 +819,20 @@ view { } } .btn-list { - width: 750rpx; + width: 100%; height: 166rpx; background: #ffffff; box-shadow: 0rpx -3rpx 9rpx 1rpx rgba(227, 229, 232, 0.5); display: flex; position: fixed; bottom: 0; - padding: 20rpx 50rpx; + padding: 20rpx 20rpx; align-items: center; justify-content: space-between; .btn { width: 294rpx; height: 88rpx; - background: linear-gradient(90deg, #F84A56, #FF9834); + background: #F84A56; border-radius: 43rpx; text-align: center; line-height: 88rpx; @@ -829,14 +847,14 @@ view { display: flex; align-items: center; .text { - font-size: 28rpx; + font-size: 29rpx; font-family: PingFangSC-Regular, PingFang SC; - font-weight: 400; - color: #393b3e; + font-weight: 500; + color: #333; } .price { margin-left: 15rpx; - font-size: 48rpx; + font-size: 36rpx; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #fc5109; @@ -844,7 +862,7 @@ view { content: '¥'; display: inline-block; color: #fc5109; - font-size: 24rpx; + font-size: 36rpx; } } .post-text { diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue index dcb288e..8d01116 100644 --- a/subPackages/ticketBooking/detail.vue +++ b/subPackages/ticketBooking/detail.vue @@ -25,7 +25,7 @@ 营业时间 - {{info.times_list_info.start}}-{{info.times_list_info.end}} + {{info.open_description}} @@ -44,8 +44,8 @@ - 门票预定 - + 门票预定 + {{ item.title }} @@ -76,7 +76,7 @@ - 景点简介 + 介绍 @@ -321,7 +321,12 @@ let orderSkuIndex = this.selectGoods.specifications.findIndex(v=>v.id == that.skuInfo.id) let item = this.selectGoods.specifications.splice(orderSkuIndex, 1)[0]; // 将购买的数据放在第一位 item.buyNum = 1 - item.selPeople = [{}] + item.selPeople = [ + { + id:null,id_number:null,name:null, + tel:null,user_id:null,age:null, + }, + ] this.selectGoods.specifications.unshift(item); let param = { diff --git a/subPackages/ticketBooking/order.vue b/subPackages/ticketBooking/order.vue index f859be2..3c3b400 100644 --- a/subPackages/ticketBooking/order.vue +++ b/subPackages/ticketBooking/order.vue @@ -28,17 +28,30 @@ - - {{skuItem.title}} - - 123 - 点击添加出行人信息 + + + + + {{skuItem.title}} + + + 出行人1 + {{person.name}} + + 点击添加出行人信息 + - - + + + 合计: + {{ 10 }} + + + 立即购买 + @@ -50,7 +63,8 @@ 添加出行人 - + @@ -91,9 +105,10 @@ buyNum: 0, - addressList: [], - currentPerson: {}, - addressSelect: {}, + addressList: [], // 出行人列表 + currentPerson: {}, // 列表当前要设置的出行人 用地址引用直接修改 + currentPersonIds: [], // 当前门票的所有出行人 + addressSelect: {}, // 出行人弹窗选择的人 } }, @@ -129,9 +144,15 @@ }, // 选择出行人 - showAddressPopUp (person) { - person.id = 1 + showAddressPopUp (person,personList) { this.currentPerson = person + this.currentPersonIds = [] + personList.forEach(v=>{ + if (v.id) { + this.currentPersonIds.push(v.id) + } + }) + if (person.id) { this.addressSelect = person } else { @@ -151,6 +172,7 @@ if (confirm) { // 赋值 this.currentPerson.id = this.addressSelect.id + this.currentPerson.name = this.addressSelect.name this.currentPerson.id_number = this.addressSelect.id_number this.currentPerson.tel = this.addressSelect.tel this.currentPerson.user_id = this.addressSelect.user_id @@ -164,7 +186,16 @@ this.$forceUpdate(); }, seldThisAddress(item){ - this.addressSelect = item + if (this.addressSelect.id == item.id) { + this.addressSelect = {} + } else { + if (this.currentPersonIds.includes(item.id)&&item.id!=this.currentPerson.id) { + return + } else { + this.addressSelect = item + } + } + }, @@ -214,9 +245,15 @@ // this.$toast("本产品单笔限购"+this.max_num+"份") // } if (Array.isArray(skuItem.selPeople)) { - skuItem.selPeople.push({}) + skuItem.selPeople.push({ + id:null,id_number:null,name:null, + tel:null,user_id:null,age:null, + }) } else { - skuItem.selPeople = [{}] + skuItem.selPeople = [{ + id:null,id_number:null,name:null, + tel:null,user_id:null,age:null, + }] } }, @@ -290,6 +327,79 @@ }) }, + + order() { + let use_date = this.allSeldDate[this.seldDateIndex].date + let start_time =this.timesArr[this.seldTimeIndex].start_time + let end_time = this.timesArr[this.seldTimeIndex].end_time + let goods = [] + + + // 设置参数 + console.log(this.pInfo) + this.pInfo.specifications.forEach(sku=>{ + if (sku.buyNum != sku.selPeople.length) { + uni.showToast({ + title:'请选择出行人', + icon:'none' + }) + } + if (sku.buyNum>=1) { + let param = { + specifications_id: sku.id, + num: sku.buyNum, + contact_id: sku.selPeople.filter(v=>v.id).map(v=>v.id), + date: use_date, + start_time: start_time, + end_time: end_time, + } + goods.push(param) + } + }) + console.log(goods) + + + let data = { + goods: goods, + coupon: this.coupon ? this.coupon.id : "", + // reserve_name: this.reserve_name, + // reserve_phone: this.reserve_phone + // remark: this.remark + } + console.log('data数据',data); + this.Post({ + method: 'POST', + data: JSON.stringify(data) + }, '/api/order/place').then(res => { + if (res.code == 200) { + console.log(res.data.order_id); + let order_id = res.data.order_id + this.$store.commit("changeOrderInfo", null); + this.$store.commit("choseCoupon", ""); + this.Post({ + order_id: order_id, + type: "miniprogram", + platform: 'miniprogram' + }, '/api/pay/unify').then(res => { + if (res.data) { + uni.requestPayment({ + nonceStr: res.data.nonceStr, + package: res.data.package, + paySign: res.data.paySign, + signType: res.data.signType, + timeStamp: res.data.timeStamp, + complete() { + uni.navigateTo({ + url: '/subPackages/order/trades' + }) + } + }) + } + }) + } + }) + } + } } @@ -574,6 +684,11 @@ .popup-item.active{ background-image: linear-gradient(135deg, #9EE4FE, #7FD491); } + .popup-item.disabled{ + .item-top { + background-color: #999; + } + } } .button { @@ -592,4 +707,60 @@ } } + +.btn-list { + width: 750rpx; + height: 166rpx; + background: #ffffff; + box-shadow: 0rpx -3rpx 9rpx 1rpx rgba(227, 229, 232, 0.5); + display: flex; + position: fixed; + bottom: 0; + padding: 20rpx 50rpx; + align-items: center; + justify-content: space-between; + .btn { + width: 294rpx; + height: 88rpx; + background: linear-gradient(90deg, #F84A56, #FF9834); + border-radius: 43rpx; + text-align: center; + line-height: 88rpx; + + font-size: 36rpx; + font-family: PingFang SC; + font-weight: 500; + color: #FFFFFF; + + } + .price-box { + display: flex; + align-items: center; + .text { + font-size: 28rpx; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #393b3e; + } + .price { + margin-left: 15rpx; + font-size: 48rpx; + font-family: PingFangSC-Regular, PingFang SC; + font-weight: 400; + color: #fc5109; + &:before { + content: '¥'; + display: inline-block; + color: #fc5109; + font-size: 24rpx; + } + } + .post-text { + margin-left: 15rpx; + color: #fc5109; + font-size: 24rpx; + } + } +} + diff --git a/subPackages/ticketBooking/ticketBooking.vue b/subPackages/ticketBooking/ticketBooking.vue index dfbbc8d..27d9b3c 100644 --- a/subPackages/ticketBooking/ticketBooking.vue +++ b/subPackages/ticketBooking/ticketBooking.vue @@ -18,7 +18,12 @@ {{item.address}} - {{showPrice(item.price)}} + + + {{showPrice(item.price)}} + @@ -42,15 +47,17 @@ finished: false, headImg:null, - type_id: 10,//演出票务的景点分类id + type_id: 10,//景点分类id } }, onShow() { this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/a87488f6225789aa19dbb437671d388d.png' this.finished = false - this.getList() // this.getHeadImg('piaowu') }, + onReady() { + this.getList() + }, onLoad(options) { let that = this uni.getSystemInfo({ @@ -173,12 +180,12 @@ color: #F02A2A; text-align: right; } - .price::before{ + .price-money::before{ content: '¥'; color: #F02A2A; font-size: 24rpx; } - .price::after{ + .price-money::after{ content: '起'; color: #999; font-size: 24rpx; From 3ef4d554eb7eb5156df4236f7fe7d02fd6956818 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Mon, 2 Sep 2024 09:22:38 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- subPackages/hotelHomestay/detail.vue | 8 ++-- subPackages/hotelHomestay/hotelHomestay.vue | 10 ++-- subPackages/hotelHomestay/order.vue | 2 +- subPackages/ticketBooking/detail.vue | 5 +- subPackages/ticketBooking/order.vue | 51 +++++++-------------- 5 files changed, 28 insertions(+), 48 deletions(-) diff --git a/subPackages/hotelHomestay/detail.vue b/subPackages/hotelHomestay/detail.vue index 94cb777..55db99d 100644 --- a/subPackages/hotelHomestay/detail.vue +++ b/subPackages/hotelHomestay/detail.vue @@ -90,7 +90,7 @@ {{item.price/100}} - 预定 + 预订 @@ -290,8 +290,8 @@ }) }) - // this.sku = data - this.sku = [...data,...data,...data,...data] + this.sku = data + // this.sku = [...data,...data,...data,...data] }) }, // 收藏 @@ -486,7 +486,7 @@ flex-wrap: nowrap; overflow-x: auto; .tag{ - border-radius: 5rpx 4rpx 4rpx 5rpx; + border-radius: 5rpx; border: 1px solid #71B580; padding: 7rpx 14rpx; diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue index 210c7a3..555d66a 100644 --- a/subPackages/hotelHomestay/hotelHomestay.vue +++ b/subPackages/hotelHomestay/hotelHomestay.vue @@ -27,13 +27,13 @@ {{tag}} - - {{showPrice(item.price)}} - + 距您约602m - 立即预定 + + {{showPrice(item.price)}} + @@ -222,7 +222,7 @@ padding: 4rpx 14rpx; font-weight: 500; font-size: 25rpx; - color: #4E7956; + color: #5BA06A; text-align: center; margin-right: 12rpx; flex-shrink: 0; diff --git a/subPackages/hotelHomestay/order.vue b/subPackages/hotelHomestay/order.vue index 36c859d..bed8400 100644 --- a/subPackages/hotelHomestay/order.vue +++ b/subPackages/hotelHomestay/order.vue @@ -57,7 +57,7 @@ - 预定信息 + 预订信息 姓名需与证件一致 diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue index 8d01116..677ab2e 100644 --- a/subPackages/ticketBooking/detail.vue +++ b/subPackages/ticketBooking/detail.vue @@ -340,13 +340,10 @@ timesArr: this.timesArr, seldTimeIndex: this.seldTimeIndex, } - + uni.setStorageSync('ticketOrder', JSON.stringify(param)); // that.gotoBuy(pInfo, sInfo); uni.navigateTo({ url:'/subPackages/ticketBooking/order', - success() { - uni.$emit("updateDataByConnect", {msgType:'updateTicketBookingOrder',data:param}) - } }) }, diff --git a/subPackages/ticketBooking/order.vue b/subPackages/ticketBooking/order.vue index 3c3b400..be8d58f 100644 --- a/subPackages/ticketBooking/order.vue +++ b/subPackages/ticketBooking/order.vue @@ -114,32 +114,32 @@ }, onLoad(options) { // this.getList(); - - uni.$on("updateDataByConnect",this.getDataByConnect) + this.initPageData() }, onShow() { this.getAddressList() - this.handlePageData() }, onUnload () { - uni.$off("updateDataByConnect",this.getDataByConnect) }, methods: { - getDataByConnect(data) { - if (data.msgType == "updateTicketBookingOrder") { - uni.setStorageSync('tempData', JSON.stringify(data.data)); + initPageData () { + let data = uni.getStorageSync('ticketOrder'); + try{ + data = JSON.parse(data) + this.pInfo = data.pInfo + this.sInfo = data.sInfo + this.minSeldDate=data.minSeldDate + this.maxSeldDate = data.maxSeldDate + this.calendarParam = data.calendarParam + this.allSeldDate = data.allSeldDate + this.seldDateIndex = data.seldDateIndex + this.timesArr = data.timesArr + this.seldTimeIndex = data.seldTimeIndex - // this.pInfo = data.data.pInfo - // this.sInfo = data.data.sInfo - // this.minSeldDate=data.data.minSeldDate - // this.maxSeldDate = data.data.maxSeldDate - // this.calendarParam = data.data.calendarParam - // this.allSeldDate = data.data.allSeldDate - // this.seldDateIndex = data.data.seldDateIndex - // this.timesArr = data.data.timesArr - // this.seldTimeIndex = data.data.seldTimeIndex + } catch(e){ + console.log(e) } }, @@ -199,24 +199,7 @@ }, - handlePageData () { - let data = uni.getStorageSync('tempData'); - try{ - data = JSON.parse(data) - this.pInfo = data.pInfo - this.sInfo = data.sInfo - this.minSeldDate=data.minSeldDate - this.maxSeldDate = data.maxSeldDate - this.calendarParam = data.calendarParam - this.allSeldDate = data.allSeldDate - this.seldDateIndex = data.seldDateIndex - this.timesArr = data.timesArr - this.seldTimeIndex = data.seldTimeIndex - - } catch(e){ - console.log(e) - } - }, + // 减少数量 From a76435be0ddf9035545c134e370b40e9aca62341 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Mon, 2 Sep 2024 11:41:24 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B8=B8=E8=AE=B0=E6=94=BB=E7=95=A5?= =?UTF-8?q?=E3=80=81=E6=B4=BB=E5=8A=A8=E6=97=A5=E5=8E=86=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages.json | 28 +++ pages/index/index.vue | 2 +- subPackages/eventCalendar/detail.vue | 214 ++++++++++++++++++ subPackages/eventCalendar/eventCalendar.vue | 7 +- subPackages/hotelHomestay/detail.vue | 10 +- subPackages/hotelHomestay/hotelHomestay.vue | 2 +- subPackages/hotelHomestay/order.vue | 3 +- subPackages/line/detail.vue | 184 +++++++++++++++ subPackages/line/lineList.vue | 7 +- subPackages/order/orderCoupon.vue | 2 +- subPackages/techan/detail.vue | 14 +- subPackages/travelGuide/detail.vue | 200 +++++++++++++++++ subPackages/travelGuide/travelGuide.vue | 234 ++++++++++++++++++++ 13 files changed, 899 insertions(+), 8 deletions(-) create mode 100644 subPackages/eventCalendar/detail.vue create mode 100644 subPackages/line/detail.vue create mode 100644 subPackages/travelGuide/detail.vue create mode 100644 subPackages/travelGuide/travelGuide.vue diff --git a/pages.json b/pages.json index 04d8f2a..80afdf0 100644 --- a/pages.json +++ b/pages.json @@ -87,6 +87,12 @@ "navigationStyle": "custom" } }, + { + "path": "line/detail", + "style": { + "navigationBarTitleText": "线路详情" + } + }, { "path": "eventCalendar/eventCalendar", "style": { @@ -94,6 +100,12 @@ "navigationStyle": "custom" } }, + { + "path": "eventCalendar/detail", + "style": { + "navigationBarTitleText": "活动详情" + } + }, { "path": "service/service", "style": { @@ -156,6 +168,21 @@ "navigationBarTitleText": "酒店民宿" } }, + { + "path" : "travelGuide/travelGuide", + "style" : + { + "navigationBarTitleText": "游记攻略", + "navigationStyle": "custom" + } + }, + { + "path" : "travelGuide/detail", + "style" : + { + "navigationBarTitleText": "攻略详情" + } + }, { "path": "food/taocanDetail", "style": { @@ -204,6 +231,7 @@ "navigationBarTitleText" : "个人收藏" } } + ] }], "tabBar": { diff --git a/pages/index/index.vue b/pages/index/index.vue index 7316443..aeea83a 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -186,7 +186,7 @@ { img: 'https://static.ticket.sz-trip.com/yandu/images/index/jdmp.png', text: '游记攻略', - path: '' + path: '/subPackages/travelGuide/travelGuide' }, { img: 'https://static.ticket.sz-trip.com/yandu/images/index/jdmp.png', diff --git a/subPackages/eventCalendar/detail.vue b/subPackages/eventCalendar/detail.vue new file mode 100644 index 0000000..d2508b4 --- /dev/null +++ b/subPackages/eventCalendar/detail.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/subPackages/eventCalendar/eventCalendar.vue b/subPackages/eventCalendar/eventCalendar.vue index 8802b86..064873a 100644 --- a/subPackages/eventCalendar/eventCalendar.vue +++ b/subPackages/eventCalendar/eventCalendar.vue @@ -52,7 +52,7 @@ - + {{item.title}} @@ -356,6 +356,11 @@ this.getList() } }, + viewDetail (item) { + uni.navigateTo({ + url:'/subPackages/eventCalendar/detail?id='+item.id + }) + }, } } diff --git a/subPackages/hotelHomestay/detail.vue b/subPackages/hotelHomestay/detail.vue index 55db99d..4b45b96 100644 --- a/subPackages/hotelHomestay/detail.vue +++ b/subPackages/hotelHomestay/detail.vue @@ -413,9 +413,16 @@ .collect{ position: absolute; + width: 51rpx; + height: 51rpx; right: 36rpx; top: 36rpx; font-size: 23rpx; + background: rgba(0, 0, 0, 0.5); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; image{ width: 36rpx; height: 36rpx; @@ -716,7 +723,8 @@ border-radius: 13rpx; padding: 20rpx; margin-top: 26rpx; - max-height: 600rpx; + max-height: 800rpx; + overflow-y: auto; .pop-detail-title{ font-family: PingFang SC; font-weight: 500; diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue index 555d66a..90850ba 100644 --- a/subPackages/hotelHomestay/hotelHomestay.vue +++ b/subPackages/hotelHomestay/hotelHomestay.vue @@ -13,7 +13,7 @@ - + diff --git a/subPackages/hotelHomestay/order.vue b/subPackages/hotelHomestay/order.vue index bed8400..0bf6ef4 100644 --- a/subPackages/hotelHomestay/order.vue +++ b/subPackages/hotelHomestay/order.vue @@ -470,7 +470,8 @@ border-radius: 13rpx; padding: 20rpx; margin-top: 26rpx; - max-height: 600rpx; + max-height: 800rpx; + overflow-y: auto; .pop-detail-title{ font-family: PingFang SC; font-weight: 500; diff --git a/subPackages/line/detail.vue b/subPackages/line/detail.vue new file mode 100644 index 0000000..56b9867 --- /dev/null +++ b/subPackages/line/detail.vue @@ -0,0 +1,184 @@ + + + + + diff --git a/subPackages/line/lineList.vue b/subPackages/line/lineList.vue index ec98905..eb54a3c 100644 --- a/subPackages/line/lineList.vue +++ b/subPackages/line/lineList.vue @@ -2,7 +2,7 @@ - + @@ -45,6 +45,11 @@ } }) }, + viewDetail (item) { + uni.navigateTo({ + url:'/subPackages/line/detail?id='+item.id + }) + }, }, onReachBottom() { setTimeout(() => { diff --git a/subPackages/order/orderCoupon.vue b/subPackages/order/orderCoupon.vue index 242f487..9b08ece 100644 --- a/subPackages/order/orderCoupon.vue +++ b/subPackages/order/orderCoupon.vue @@ -46,7 +46,7 @@ - + 暂无优惠券 diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue index f6232d8..bebee17 100644 --- a/subPackages/techan/detail.vue +++ b/subPackages/techan/detail.vue @@ -1,7 +1,19 @@