jiazhipeng 7 months ago
parent
commit
4875771e5c
  1. 4
      package-lock.json
  2. 12
      pages.json
  3. 44
      pages/index/index.vue
  4. 2
      static/js/CommonFunction.js
  5. 47
      subPackages/order/trades.vue
  6. 4
      subPackages/venue/venueList.vue
  7. 7
      subPackages/venue/venueOrder.vue
  8. 59
      subPackages/video/video.vue

4
package-lock.json

@ -1,6 +1,8 @@
{ {
"requires": true, "name": "changshu_wechat",
"version": "1.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true,
"dependencies": { "dependencies": {
"moment": { "moment": {
"version": "2.30.1", "version": "2.30.1",

12
pages.json

@ -132,6 +132,12 @@
"navigationBarTitleText": "全部订单" "navigationBarTitleText": "全部订单"
} }
}, },
{
"path": "order/detail",
"style": {
"navigationBarTitleText": "订单详情"
}
},
{ {
"path": "order/orderPay", "path": "order/orderPay",
"style": { "style": {
@ -157,6 +163,12 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
},
{
"path": "video/video",
"style": {
"navigationBarTitleText": "视频"
}
} }
] ]
}], }],

44
pages/index/index.vue

@ -87,7 +87,7 @@
<view class="hot-box"> <view class="hot-box">
<view class="hot-column" v-for="(column, index) in 2" :key="index"> <view class="hot-column" v-for="(column, index) in 2" :key="index">
<view v-for="(item,index) in getColumnItems(index)" :key="index" class="hot-item" @click="gotoDetailByTypeToJdsz(item)"> <view v-for="(item,index) in getColumnItems(index)" :key="index" class="hot-item" @click="gotoHotDetail(item)">
<view class="image-container"> <view class="image-container">
<image :src="showImgs(item.headimg || item.head_img || item.post_url)" mode="widthFix" class="hot-img"></image> <image :src="showImgs(item.headimg || item.head_img || item.post_url)" mode="widthFix" class="hot-img"></image>
<image src="https://static.ticket.sz-trip.com/changshu/images/index/play.png" mode="" class="play-img" v-if="typeIndex == 5"></image> <image src="https://static.ticket.sz-trip.com/changshu/images/index/play.png" mode="" class="play-img" v-if="typeIndex == 5"></image>
@ -252,12 +252,12 @@
} }
], ],
hotType: [ hotType: [
{title: '景点', id: '616'}, {title: '景点', id: '25'},
{title: '活动', id: '617'}, {title: '活动', id: '617'},
{title: '文创', id: '618'}, {title: '文创', id: '26'},
{title: '非遗', id: '619'}, {title: '非遗', id: '619'},
{title: '线路', id: '620'}, {title: '线路', id: '27'},
{title: '视频', id: '128'} {title: '视频', id: '18'}
], ],
typeIndex: 0, typeIndex: 0,
hotList: [], hotList: [],
@ -442,27 +442,26 @@
getHotList() { getHotList() {
if(this.typeIndex == 1) { if(this.typeIndex == 1) {
this.Post({ this.Post({
apiType: 'jdsz', date: '',
page_no: this.pageNo, offset: this.hotList.length,
page_num: this.limit limit:this.limit,
type_id: 7,
}, '/api/pbservice/Actcalendar/getActList').then(res => { }, '/api/pbservice/Actcalendar/getActList').then(res => {
if(res) { if(res) {
if(res.data.rows.length < this.limit) this.isLoading = true if(res.data.rows.length < this.limit) this.isLoading = true
this.hotList = this.hotList.concat(res.data.rows) this.hotList = this.hotList.concat(res.data.rows)
this.pageNo++
} }
}) })
}else if(this.typeIndex == 5) { }else if(this.typeIndex == 5) {
// //
this.Post({ this.Post({
apiType: 'jdsz', tag_id: this.hotType[this.typeIndex].id,
class_id: this.hotType[this.typeIndex].id,
page: this.pageNo, page: this.pageNo,
limit: this.limit, limit: this.limit,
}, '/api/multimedia/media_list').then(res => { }, '/api/multimedia/getMultimediaListByTag').then(res => {
if(res) { if(res) {
if(res.data.data.length < this.limit) this.isLoading = true if(res.data.length < this.limit) this.isLoading = true
this.hotList = this.hotList.concat(res.data.data) this.hotList = this.hotList.concat(res.data)
this.pageNo++ this.pageNo++
} }
}) })
@ -472,13 +471,28 @@
tag_id: this.hotType[this.typeIndex].id, tag_id: this.hotType[this.typeIndex].id,
offset: this.hotList.length, offset: this.hotList.length,
limit: this.limit, limit: this.limit,
}, '/api/product/get_product_by_tag').then(res => { }, '/api/scene/get_scene_by_tag_partners').then(res => {
if(res) { if(res) {
if(res.data.list.length < this.limit) this.isLoading = true if(res.data.list.length < this.limit) this.isLoading = true
this.hotList = this.hotList.concat(res.data.list) 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)
}
} }
} }
} }

2
static/js/CommonFunction.js

@ -295,7 +295,7 @@ Vue.prototype.checkIsLoginJdsz = () => {
// 跳转君到苏州详情 // 跳转君到苏州详情
Vue.prototype.gotoDetailByTypeToJdsz = item => { Vue.prototype.gotoDetailByTypeToJdsz = item => {
let httpUrl = 'https://m.cloud.sz-trip.com/' let httpUrl = 'https://test.m.cloud.sz-trip.com/'
let url = '' let url = ''
// 酒景套餐 // 酒景套餐

47
subPackages/order/trades.vue

@ -45,7 +45,7 @@
合计 合计
<text>{{ item.pay_money / 100 }}</text> <text>{{ item.pay_money / 100 }}</text>
</view> </view>
<view class="trade-item-btns"> <view class="trade-item-btns" v-if="item.client_id != 'jdsz'">
<view @click.stop="() => refund(item.order_id, key)" v-if="item.status == 'PAYMENT_SUCCESSFULLY'">申请退款</view> <view @click.stop="() => refund(item.order_id, key)" v-if="item.status == 'PAYMENT_SUCCESSFULLY'">申请退款</view>
<view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.status == 'WAIT_PAYMENT'">关闭订单</view> <view @click.stop="() => closeOrder(item.order_id, item)" v-if="item.status == 'WAIT_PAYMENT'">关闭订单</view>
<view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view> <view @click.stop="confirmpost(item.order_id, key)" v-if="item.postFlag">确认收货</view>
@ -328,6 +328,51 @@ export default {
}); });
}, },
choseType(item) { 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({ uni.navigateTo({
url:'/subPackages/order/detail?id='+item.order_id url:'/subPackages/order/detail?id='+item.order_id
}); });

4
subPackages/venue/venueList.vue

@ -7,7 +7,7 @@
</view> </view>
</view> </view>
<view class="item" v-for="(item,index) in list" :key="index" :style="{backgroundImage: 'url('+showImg(item.image)+')'}"> <navigator :url="'/subPackages/venue/venueDetail?id='+item.id" class="item" v-for="(item,index) in list" :key="index" :style="{backgroundImage: 'url('+showImg(item.image)+')'}">
<view> <view>
<view class="point"></view> <view class="point"></view>
<view class="content"> <view class="content">
@ -16,7 +16,7 @@
<view class="btn">立即预约 ></view> <view class="btn">立即预约 ></view>
</view> </view>
</view> </view>
</view> </navigator>
</view> </view>
</template> </template>

7
subPackages/venue/venueOrder.vue

@ -14,7 +14,8 @@
<view class="info flex-column"> <view class="info flex-column">
<view class="flex-between"> <view class="flex-between">
<view class="title text-overflow">{{orderInfo.skuInfo.title}}</view> <view class="title text-overflow">{{orderInfo.skuInfo.title}}</view>
<view class="price">{{(stockList[stockIndex].money * buyNum) / 100 }}</view> <view class="price" v-if="stockIndex != null">{{(stockList[stockIndex].money * buyNum) / 100 }}</view>
<view class="price" v-else>{{(dateList[dateIndex].money * buyNum) / 100 }}</view>
<view style="display: flex;"> <view style="display: flex;">
<view class="btn" @click="changeBuyNum(-1)">-</view> <view class="btn" @click="changeBuyNum(-1)">-</view>
<view class="num">{{buyNum}}</view> <view class="num">{{buyNum}}</view>
@ -141,8 +142,8 @@
specifications_id: this.orderInfo.skuInfo.id, specifications_id: this.orderInfo.skuInfo.id,
num: this.buyNum, num: this.buyNum,
date: this.dateList[this.dateIndex].date, date: this.dateList[this.dateIndex].date,
start_time: this.stockList[this.stockIndex].start_time || '', start_time: this.stockIndex != null ? this.stockList[this.stockIndex].start_time : '',
end_time: this.stockList[this.stockIndex].end_time || '', end_time: this.stockIndex != null ? this.stockList[this.stockIndex].end_time : '',
reserve_mobile: this.phone, reserve_mobile: this.phone,
} }
goods.push(param) goods.push(param)

59
subPackages/video/video.vue

@ -0,0 +1,59 @@
<template>
<view class="bg">
<video :src="showImg(src)" controls class="myVideo" :poster="showImg(poster)"></video>
<view class="title">
{{title}}
</view>
</view>
</template>
<script>
export default {
data() {
return {
src: '',
poster: '',
title: ''
}
},
onLoad(option) {
const item = JSON.parse(decodeURIComponent(option.item));
this.src = item.multimedia_url
this.poster = item.head_img
this.title = item.title
},
onReady() {
uni.setNavigationBarTitle({
title: this.title
})
}
}
</script>
<style scoped lang="scss">
.bg {
width: 100%;
height: 100vh;
position: relative;
}
.myVideo {
width: 100%;
height: 100vh;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.title {
width: 699rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 29rpx;
color: #FFFFFF;
position: fixed;
left: 28rpx;
bottom: 140rpx;
}
</style>
Loading…
Cancel
Save