diff --git a/package-lock.json b/package-lock.json index cf2f3c9..5bd6968 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,8 @@ { - "requires": true, + "name": "changshu_wechat", + "version": "1.0.0", "lockfileVersion": 1, + "requires": true, "dependencies": { "moment": { "version": "2.30.1", diff --git a/pages.json b/pages.json index a70d0b4..f586df6 100644 --- a/pages.json +++ b/pages.json @@ -132,6 +132,12 @@ "navigationBarTitleText": "全部订单" } }, + { + "path": "order/detail", + "style": { + "navigationBarTitleText": "订单详情" + } + }, { "path": "order/orderPay", "style": { @@ -157,6 +163,12 @@ "navigationBarTitleText": "", "enablePullDownRefresh": false } + }, + { + "path": "video/video", + "style": { + "navigationBarTitleText": "视频" + } } ] }], diff --git a/pages/index/index.vue b/pages/index/index.vue index 6185a41..df0a478 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -87,7 +87,7 @@ - + @@ -252,12 +252,12 @@ } ], hotType: [ - {title: '景点', id: '616'}, + {title: '景点', id: '25'}, {title: '活动', id: '617'}, - {title: '文创', id: '618'}, + {title: '文创', id: '26'}, {title: '非遗', id: '619'}, - {title: '线路', id: '620'}, - {title: '视频', id: '128'} + {title: '线路', id: '27'}, + {title: '视频', id: '18'} ], typeIndex: 0, hotList: [], @@ -442,27 +442,26 @@ getHotList() { if(this.typeIndex == 1) { this.Post({ - apiType: 'jdsz', - page_no: this.pageNo, - page_num: this.limit + date: '', + offset: this.hotList.length, + limit:this.limit, + type_id: 7, }, '/api/pbservice/Actcalendar/getActList').then(res => { if(res) { if(res.data.rows.length < this.limit) this.isLoading = true this.hotList = this.hotList.concat(res.data.rows) - this.pageNo++ } }) }else if(this.typeIndex == 5) { // 视频 this.Post({ - apiType: 'jdsz', - class_id: this.hotType[this.typeIndex].id, + tag_id: this.hotType[this.typeIndex].id, page: this.pageNo, limit: this.limit, - }, '/api/multimedia/media_list').then(res => { + }, '/api/multimedia/getMultimediaListByTag').then(res => { if(res) { - if(res.data.data.length < this.limit) this.isLoading = true - this.hotList = this.hotList.concat(res.data.data) + if(res.data.length < this.limit) this.isLoading = true + this.hotList = this.hotList.concat(res.data) this.pageNo++ } }) @@ -472,13 +471,28 @@ tag_id: this.hotType[this.typeIndex].id, offset: this.hotList.length, limit: this.limit, - }, '/api/product/get_product_by_tag').then(res => { + }, '/api/scene/get_scene_by_tag_partners').then(res => { if(res) { if(res.data.list.length < this.limit) this.isLoading = true this.hotList = this.hotList.concat(res.data.list) } }) } + }, + gotoHotDetail(item) { + if(this.typeIndex == 1) { + // 活动 + uni.navigateTo({ + url:'/subPackages/eventCalendar/detail?id='+item.id + }) + }else if(this.typeIndex == 5) { + // 视频 + uni.navigateTo({ + url: '/subPackages/video/video?item=' + encodeURIComponent(JSON.stringify(item)) + }) + }else { + this.gotoDetailByTypeToJdsz(item) + } } } } diff --git a/static/js/CommonFunction.js b/static/js/CommonFunction.js index 689fc6b..038490e 100644 --- a/static/js/CommonFunction.js +++ b/static/js/CommonFunction.js @@ -295,7 +295,7 @@ Vue.prototype.checkIsLoginJdsz = () => { // 跳转君到苏州详情 Vue.prototype.gotoDetailByTypeToJdsz = item => { - let httpUrl = 'https://m.cloud.sz-trip.com/' + let httpUrl = 'https://test.m.cloud.sz-trip.com/' let url = '' // 酒景套餐 diff --git a/subPackages/order/trades.vue b/subPackages/order/trades.vue index fd759a5..0f88d57 100644 --- a/subPackages/order/trades.vue +++ b/subPackages/order/trades.vue @@ -45,7 +45,7 @@ 合计¥ {{ item.pay_money / 100 }} - + 申请退款 关闭订单 确认收货 @@ -328,6 +328,51 @@ export default { }); }, choseType(item) { + // 判断是否是君到苏州来源,如果是君到苏州就跳到君到苏州订单详情,目前只支持景点、邮寄、演出和线路 + if(item.client_id == 'jdsz') { + // 如果是君到苏州的需要先拿到君到苏州token,获取订单详情去判断产品类型 + this.checkIsLoginJdsz().then(res => { + if(res) { + uni.request({ + method: 'POST', + url: this.JDSZAPIURL + '/api/order/query', + header: { + 'content-type': 'application/json', + 'token': res + }, + data: { + order_id: item.order_id + }, + success: resTwo => { + let data = resTwo.data.data + let httpUrl = 'https://m.cloud.sz-trip.com/' + let url = '' + // 根据类型跳转到不同的订单详情页面 + switch (data.order_product_list[0].product_model){ + case 'ticket': // 景点 + url = httpUrl + 'TicketOrderDetail?isKunshan=1&order_id=' + data.order_id + '&token=' + res + break; + case 'post': // 邮寄 + url = httpUrl + 'CulturalCreationOrderDetail?isKunshan=1&order_id=' + data.order_id + '&token=' + res + break; + case 'show': // 演出 + url = httpUrl + 'TicketOrderDetail?isKunshan=1&order_id=' + data.order_id + '&token=' + res + break; + case 'line': // 线路 + url = httpUrl + 'LineOrderDetail?isKunshan=1&order_id=' + data.order_id + '&token=' + res + break; + default: + break; + } + uni.navigateTo({ + url: '/subPackages/webPage/webPage?url=' + encodeURIComponent(url) + }); + } + }) + } + }) + return; + } uni.navigateTo({ url:'/subPackages/order/detail?id='+item.order_id }); diff --git a/subPackages/venue/venueList.vue b/subPackages/venue/venueList.vue index 3202b0f..2f88270 100644 --- a/subPackages/venue/venueList.vue +++ b/subPackages/venue/venueList.vue @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ 立即预约 > - + diff --git a/subPackages/venue/venueOrder.vue b/subPackages/venue/venueOrder.vue index c3622f1..953cf1d 100644 --- a/subPackages/venue/venueOrder.vue +++ b/subPackages/venue/venueOrder.vue @@ -14,7 +14,8 @@ {{orderInfo.skuInfo.title}} - {{(stockList[stockIndex].money * buyNum) / 100 }} + {{(stockList[stockIndex].money * buyNum) / 100 }} + {{(dateList[dateIndex].money * buyNum) / 100 }} - {{buyNum}} @@ -141,8 +142,8 @@ specifications_id: this.orderInfo.skuInfo.id, num: this.buyNum, date: this.dateList[this.dateIndex].date, - start_time: this.stockList[this.stockIndex].start_time || '', - end_time: this.stockList[this.stockIndex].end_time || '', + start_time: this.stockIndex != null ? this.stockList[this.stockIndex].start_time : '', + end_time: this.stockIndex != null ? this.stockList[this.stockIndex].end_time : '', reserve_mobile: this.phone, } goods.push(param) diff --git a/subPackages/video/video.vue b/subPackages/video/video.vue new file mode 100644 index 0000000..aa8fbdc --- /dev/null +++ b/subPackages/video/video.vue @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file