From 0a35bf04a7f546ee582901fdf5991e837dfc181a Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Tue, 27 Aug 2024 09:57:16 +0800 Subject: [PATCH 1/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 --- pages.json | 29 +- static/css/base.css | 31 + static/js/CommonFunction.js | 51 +- static/js/request.js | 2 +- subPackages/hotelHomestay/hotelHomestay.vue | 273 +++++++ subPackages/ticketBooking/detail.vue | 714 ++++++++++++++++++ subPackages/ticketBooking/order.vue | 349 +++++++++ subPackages/ticketBooking/ticketBooking.vue | 191 +++++ .../uni-calendar/uni-calendar-item.vue | 2 +- 9 files changed, 1638 insertions(+), 4 deletions(-) create mode 100644 subPackages/hotelHomestay/hotelHomestay.vue create mode 100644 subPackages/ticketBooking/detail.vue create mode 100644 subPackages/ticketBooking/order.vue create mode 100644 subPackages/ticketBooking/ticketBooking.vue diff --git a/pages.json b/pages.json index 928cdeb..2076b1d 100644 --- a/pages.json +++ b/pages.json @@ -30,7 +30,34 @@ "root" : "subPackages", "pages": [ { - + "path" : "ticketBooking/ticketBooking", + "style" : + { + "navigationBarTitleText" : "门票预订", + "navigationStyle":"custom" + } + }, + { + "path" : "ticketBooking/detail", + "style" : + { + "navigationBarTitleText" : "景区详情" + } + }, + { + "path" : "ticketBooking/order", + "style" : + { + "navigationBarTitleText" : "门票预订" + } + }, + { + "path" : "hotelHomestay/hotelHomestay", + "style" : + { + "navigationBarTitleText" : "酒店民宿", + "navigationStyle":"custom" + } } ] } diff --git a/static/css/base.css b/static/css/base.css index 8b5ab4a..e609f7a 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -107,4 +107,35 @@ view { bottom: 26rpx; width: 67rpx; height: 67rpx; +} + +.flex{ + display: flex; +} +.flex-shrink-0{ + flex-shrink: 0; +} +.flex-1{ + flex: 1; +} +.flex-wrap{ + flex-wrap: wrap; +} +.w-full{ + width: 100%; +} +.w-1rpx{ + width: 1rpx; +} +.h-1rpx{ + height: 1rpx; +} +.relative{ + position: relative; +} +.absolute{ + position: absolute; +} +.flex-items-center{ + align-items: center; } \ No newline at end of file diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 18bf2a5..1c51388 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -65,7 +65,7 @@ Vue.prototype.showImg = img => { if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) { return img; } else { - return 'https://static.ticket.sz-trip.com' + img; + return 'https://tongli.sz-trip.com' + img; } } @@ -145,4 +145,53 @@ Vue.prototype.clickPhone = (phone) => { uni.makePhoneCall({ phoneNumber:phone }) +} + +//周几 +Vue.prototype.ShowDateDay = day => { + let stateTxt = ""; + switch (day) { + case 0: + stateTxt = '周日' + break; + case 1: + stateTxt = '周一' + break; + case 2: + stateTxt = '周二' + break; + case 3: + stateTxt = '周三' + break; + case 4: + stateTxt = '周四' + break; + case 5: + stateTxt = '周五' + break; + case 6: + stateTxt = '周六' + break; + } + return stateTxt +} + +Date.prototype.Format = function(fmt) +{ //author: meizz + var o = { + "Y+" : this.getFullYear(), //月份 + "M+" : this.getMonth()+1, //月份 + "d+" : this.getDate(), //日 + "h+" : this.getHours(), //小时 + "m+" : this.getMinutes(), //分 + "s+" : this.getSeconds(), //秒 + "q+" : Math.floor((this.getMonth()+3)/3), //季度 + "S" : this.getMilliseconds() //毫秒 + }; + if(/(y+)/.test(fmt)) + fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); + for(var k in o) + 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; } \ No newline at end of file diff --git a/static/js/request.js b/static/js/request.js index 9af8eeb..71ae807 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 || '41ba9f3e-1add-4d5c-ae47-330e0864ad56' + 'token': params.token || '2dd9b712-f118-41f6-b3a8-602e4fbb0ce3' }, success: res => { uni.hideLoading() diff --git a/subPackages/hotelHomestay/hotelHomestay.vue b/subPackages/hotelHomestay/hotelHomestay.vue new file mode 100644 index 0000000..41959d1 --- /dev/null +++ b/subPackages/hotelHomestay/hotelHomestay.vue @@ -0,0 +1,273 @@ + + + + + \ No newline at end of file diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue new file mode 100644 index 0000000..aa5caa9 --- /dev/null +++ b/subPackages/ticketBooking/detail.vue @@ -0,0 +1,714 @@ + + + + + diff --git a/subPackages/ticketBooking/order.vue b/subPackages/ticketBooking/order.vue new file mode 100644 index 0000000..1e7f058 --- /dev/null +++ b/subPackages/ticketBooking/order.vue @@ -0,0 +1,349 @@ + + + + + diff --git a/subPackages/ticketBooking/ticketBooking.vue b/subPackages/ticketBooking/ticketBooking.vue new file mode 100644 index 0000000..11bc7a4 --- /dev/null +++ b/subPackages/ticketBooking/ticketBooking.vue @@ -0,0 +1,191 @@ + + + + + \ No newline at end of file diff --git a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue index a54135e..4f3817d 100644 --- a/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue +++ b/uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue @@ -9,7 +9,7 @@ }" @click="choiceDate(weeks)"> - + + + + 姓名 + + + + 手机号 + + + + 选择地区 + + + + + + + + 详细地址 + + + + 设为默认 + + + + + + + + + + + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..922878f --- /dev/null +++ b/package-lock.json @@ -0,0 +1,11 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "ydui-district": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/ydui-district/-/ydui-district-1.1.0.tgz", + "integrity": "sha512-MBhvfaR5Gkn6MUmEnrH1A7IFB5igALuDgtIF+gz3dRwNwW9+KOmih7z+xZFfGluMsEbWaT7C3lWOckYsLZQnFg==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..e314e1f --- /dev/null +++ b/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "ydui-district": "^1.1.0" + } +} diff --git a/pages.json b/pages.json index 02700cc..48bd372 100644 --- a/pages.json +++ b/pages.json @@ -55,6 +55,24 @@ "navigationStyle": "custom" } }, + { + "path": "techan/detail", + "style": { + "navigationBarTitleText": "文创特产详情" + } + }, + { + "path": "techan/order", + "style": { + "navigationBarTitleText": "订单填写" + } + }, + { + "path": "techan/selfPickUpPoint", + "style": { + "navigationBarTitleText": "选择自提点" + } + }, { "path": "line/lineList", "style": { diff --git a/static/css/base.css b/static/css/base.css index e609f7a..39ffd6f 100644 --- a/static/css/base.css +++ b/static/css/base.css @@ -138,4 +138,7 @@ view { } .flex-items-center{ align-items: center; +} +.no-scrollbar::-webkit-scrollbar{ + display: none; } \ No newline at end of file diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue new file mode 100644 index 0000000..17e504b --- /dev/null +++ b/subPackages/techan/detail.vue @@ -0,0 +1,753 @@ + + + + + \ No newline at end of file diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue new file mode 100644 index 0000000..23c0d04 --- /dev/null +++ b/subPackages/techan/order.vue @@ -0,0 +1,1274 @@ + + + + + \ No newline at end of file diff --git a/subPackages/techan/selfPickUpPoint.vue b/subPackages/techan/selfPickUpPoint.vue new file mode 100644 index 0000000..e3784ef --- /dev/null +++ b/subPackages/techan/selfPickUpPoint.vue @@ -0,0 +1,245 @@ + + + + + diff --git a/subPackages/techan/techanList.vue b/subPackages/techan/techanList.vue index 46f2a29..1bb0560 100644 --- a/subPackages/techan/techanList.vue +++ b/subPackages/techan/techanList.vue @@ -48,7 +48,7 @@ }, goDetail(item) { uni.navigateTo({ - url: '/subPackages/feiyi/feiyiDetails?id=' + item.id + url: '/subPackages/techan/detail?id=' + item.id }) } }, diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue index aa5caa9..85c9c86 100644 --- a/subPackages/ticketBooking/detail.vue +++ b/subPackages/ticketBooking/detail.vue @@ -120,10 +120,10 @@ 选择时段 {{ item.start_time }}-{{ item.end_time }} - {{item.store < 10 ? (item.store === -1 ? '不可定' : item.store === 0 ? '无票' : '(余票' + item.store + ')') : '有票'}} + {{item.stock_number < 10 ? (item.stock_number === -1 ? '不可定' : item.stock_number === 0 ? '无票' : '(余票' + item.stock_number + ')') : '有票'}} @@ -267,11 +267,12 @@ getTimeStock(date) { this.Post({ specifications_id: this.skuInfo.id, - date: date + date: date, + token:'2dd9b712-f118-41f6-b3a8-602e4fbb0ce3', }, '/api/goods/getTimeStock').then(res => { if (res.data.length > 0) { this.timesArr = res.data || [] - this.seldTimeIndex = this.stockList.findIndex(item => item.store != 0) + this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0) } }) }, diff --git a/subPackages/ticketBooking/ticketBooking.vue b/subPackages/ticketBooking/ticketBooking.vue index 11bc7a4..5095551 100644 --- a/subPackages/ticketBooking/ticketBooking.vue +++ b/subPackages/ticketBooking/ticketBooking.vue @@ -46,7 +46,7 @@ } }, onShow() { - this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/8653c32761e01ee683505eddba1ae22b.png' + this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/a87488f6225789aa19dbb437671d388d.png' this.finished = false this.getList() // this.getHeadImg('piaowu')