jiazhipeng 12 months ago
parent
commit
2215de7070
  1. 49
      pages.json
  2. 22
      pages/index/index.vue
  3. 15
      static/css/base.css
  4. 5
      store/modules/user.js
  5. 102
      subPackages/eventCalendar/detail.vue
  6. 230
      subPackages/leyou/detail.vue
  7. 153
      subPackages/leyou/index.vue
  8. 328
      subPackages/line/detail.vue
  9. 16
      subPackages/line/lineList.vue
  10. 575
      subPackages/line/order.vue
  11. 777
      subPackages/line/orders.vue
  12. 18
      subPackages/notice/noticeDetail.vue
  13. 25
      subPackages/notice/noticeList.vue
  14. 105
      subPackages/novelty/detail.vue
  15. 470
      subPackages/order/detail.vue
  16. 147
      subPackages/user/getCoupon.vue
  17. 59
      subPackages/video/video.vue

49
pages.json

@ -89,14 +89,26 @@
{
"path": "line/lineList",
"style": {
"navigationBarTitleText": "",
"navigationBarTitleText": "特色体验",
"navigationStyle": "custom"
}
},
{
"path": "line/detail",
"style": {
"navigationBarTitleText": "线路详情"
"navigationBarTitleText": "特色体验"
}
},
{
"path": "line/order",
"style": {
"navigationBarTitleText": "特色体验"
}
},
{
"path": "line/orders",
"style": {
"navigationBarTitleText": "特色体验"
}
},
{
@ -229,6 +241,13 @@
"navigationBarTitleText": "优惠券"
}
},
{
"path": "user/getCoupon",
"style": {
"navigationBarTitleText": "领券中心",
"navigationStyle": "custom"
}
},
{
"path": "user/collect",
"style": {
@ -299,6 +318,32 @@
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "leyou/index",
"style": {
"navigationBarTitleText": "乐游同里"
}
},
{
"path": "leyou/detail",
"style": {
"navigationBarTitleText": "乐游同里详情",
"navigationStyle": "custom"
}
},
{
"path": "video/video",
"style": {
"navigationBarTitleText": "视频"
}
},
{
"path": "novelty/detail",
"style": {
"navigationBarTitleText": "同里新鲜事",
"navigationStyle": "custom"
}
}
]
}],

22
pages/index/index.vue

@ -30,7 +30,7 @@
</view>
<view class="notice-bottom flex-between">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/menpiao.png" mode="" @click="gotoPath(navList[0].path)"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/menpiao.png" mode="" @click="gotoPath('/subPackages/ticketBooking/ticketBooking')"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/ditu.png" mode=""></image>
</view>
</view>
@ -97,7 +97,7 @@
</view>
</view>
<!-- 游记攻略 -->
<!-- 同里新鲜事 -->
<view>
<view class="title-box flex-between">
<image :src="showImg(homeUi.yjgl)" mode=""></image>
@ -105,7 +105,7 @@
<view class="strategy-box">
<view v-for="(num,nums) in 2" :key="nums">
<view v-for="(item,index) in strategyList" :key="index" class="strategy-item" v-if="index % 2 === nums" @click="goCalendarDetail(item)">
<view v-for="(item,index) in strategyList" :key="index" class="strategy-item" v-if="index % 2 === nums" @click="gotoPath('/subPackages/novelty/detail?id='+item.id)">
<image class="strategy-image" :src="showImg(item.image)" mode="widthFix"></image>
<view class="strategy-content">
<view class="strategy-title">{{item.title}}</view>
@ -117,6 +117,9 @@
<view class="strategy-more" @click="strategyMore" v-show="showMore">查看更多</view>
</view>
<!-- 领券中心 -->
<image src="https://static.ticket.sz-trip.com/tongli/images/index/getCoupon.png" @click="gotoPath('/subPackages/user/getCoupon')" class="couponImg"></image>
</view>
</template>
@ -130,7 +133,7 @@
{
img: 'https://static.ticket.sz-trip.com/tongli/images/index/lytl.png',
text: '乐游同里',
path: '/subPackages/ticketBooking/ticketBooking'
path: '/subPackages/leyou/index'
},
{
img: 'https://static.ticket.sz-trip.com/tongli/images/index/hdrl.png',
@ -140,7 +143,7 @@
{
img: 'https://static.ticket.sz-trip.com/tongli/images/index/tsty.png',
text: '特色体验',
path: '/subPackages/food/foodList'
path: '/subPackages/line/lineList'
},
{
img: 'https://static.ticket.sz-trip.com/tongli/images/index/jdms.png',
@ -739,4 +742,13 @@
font-size: 27rpx;
color: #248BAA;
}
.couponImg {
position: fixed;
right: 27rpx;
bottom: 38rpx;
width: 94rpx;
height: 105.33rpx;
z-index: 100;
}
</style>

15
static/css/base.css

@ -142,4 +142,19 @@ view {
}
.font-bold{
font-weight: bold;
}
.topLeft {
width: 60rpx;
height: 60rpx;
background: rgba(0, 0, 0, .4);
border-radius: 50%;
position: absolute;
left: 26rpx;
top: 98rpx;
z-index: 2;
}
.topLeft .iconfont {
font-size: 40rpx;
color: #fff;
}

5
store/modules/user.js

@ -4,6 +4,7 @@ export default {
userInfo: {}, //保存用户登录信息,
toPath: "", //要跳转过去的页面,
foodInfo:"", //美食套餐信息
lineInfo: "", // 线路
},
coupon: "",//下单选择优惠券
// 类似 vue 里的 mothods(同步方法)
@ -31,5 +32,9 @@ export default {
choseCoupon(state, data) {
state.coupon = data
},
// 线路下单
changeLineInfo(state, data){
state.lineInfo = data
}
}
}

102
subPackages/eventCalendar/detail.vue

@ -1,42 +1,55 @@
<template>
<view class="bg">
<view class="swipe-box" v-if="info.images">
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000" circular indicator-dots indicator-color="rgba(255,255,255,.5)"
<view class="swipe-box" v-if="info.image">
<!-- <swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000" circular indicator-dots indicator-color="rgba(255,255,255,.5)"
indicator-active-color="#fff" @change="swiperChange">
<swiper-item v-for="(item, index) in info.images.split(',')" :key="item.id">
<view class="swiper-item">
<image class="item-img" :src="showImg(item)" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
</swiper> -->
<view class="swiper-pointer">
<!-- <view class="swiper-pointer">
{{swiperCurrent}}/{{info.images.split(',').length}}
</view>
</view> -->
<view class="collect" style="right: 100rpx;" @click.stop="collect()">
<!-- <view class="collect" style="right: 100rpx;" @click.stop="collect()">
<image src="https://tongli.sz-trip.com/uploads/20240829/9dbb80cafe8375bd6d5c96fccb617962.png" v-if="info.is_collect"></image>
<image src="https://tongli.sz-trip.com/uploads/20240826/564af778708591f5de29174d3b14bbff.png" v-else></image>
</view> -->
<!-- 内容 -->
<view style="position: relative;z-index: 2;display: flex;">
<image :src="showImg(info.image)" class="swipe-headImg" mode="aspectFill"></image>
<view class="swipe-content flex-between">
<view class="swipe-title text-overflowRows">
{{info.title}}
</view>
<view class="swipe-subtitle">
<view class="text-overflow">地址{{info.address}}</view>
<view class="text-overflow" v-if="info.start_time && info.end_time">时间{{info.start_time}} - {{info.end_time}}</view>
</view>
</view>
</view>
<!-- 底图和分享按钮 -->
<image :src="showImg(info.image)" class="swipe-img"></image>
<view class="collect" >
<button open-type="share" @click="share" class="share-btn"></button>
<image src="https://tongli.sz-trip.com/uploads/20240902/8eb614e4ea41db655a4e6da2cc0ca954.png"></image>
</view>
</view>
<view class="common-container info-container">
<view class="info-title text-overflowRows">{{info.title}}</view>
<view class="text-overflow" style="padding: 40rpx 0 16rpx;">地址{{info.address}}</view>
<view class="text-overflow" v-if="info.start_time && info.end_time">时间{{info.start_time}} - {{info.end_time}}</view>
</view>
<view class="common-container detail-container">
<view class="" id="cpts" v-html="formateRichText(info.detail)"></view>
</view>
<!-- <view class="common-container info-container">
<view class="info-title text-overflowRows">{{info.title}}</view>
<view class="text-overflow" style="padding: 40rpx 0 16rpx;">地址{{info.address}}</view>
<view class="text-overflow" v-if="info.start_time && info.end_time">时间{{info.start_time}} - {{info.end_time}}</view>
</view> -->
<view class="common-container detail-container">
<view class="detail-title">详情</view>
<view class="" id="cpts" v-html="formateRichText(info.detail)"></view>
</view>
</view>
</template>
@ -112,8 +125,45 @@
}
.swipe-box {
height: 867rpx;
height: 309rpx;
position: relative;
padding: 38rpx 0 0 26rpx;
.swipe-headImg {
width: 138rpx;
height: 212rpx;
border-radius: 7rpx;
}
.swipe-content {
width: 445rpx;
height: 212rpx;
margin-left: 25rpx;
padding: 8rpx 0;
flex-direction: column;
align-items: start;
.swipe-title {
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
.swipe-subtitle {
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
}
}
.swipe-img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
filter: blur(3px);
}
.swiper-item-num {
width: 90rpx;
@ -214,11 +264,21 @@
}
.detail-container{
.detail-title{
font-weight: bold;
font-size: 33rpx;
color: #000000;
margin-bottom: 25rpx;
}
width: 100%;
padding: 28rpx;
padding: 35rpx 26rpx;
border-radius: 20rpx;
position: relative;
margin-top: -30rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #333333;
color: #000;
}
</style>

230
subPackages/leyou/detail.vue

@ -0,0 +1,230 @@
<template>
<view class="bg scroll" v-if="detail.list_images" :style="{backgroundImage: 'url('+showImg(detail.list_images.split(',')[0])+')'}">
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<view class="content">
<view class="title">{{detail.title}}</view>
<view class="subtitle">{{detail.subtitle}}</view>
<view class="notice" v-if="detail.open_description">
<uni-notice-bar showIcon scrollable single :text="detail.open_description" color="#fff"
background-color="rgba(255, 255, 255, .26)" speed="50"></uni-notice-bar>
</view>
</view>
<!-- 音视频 -->
<view class="box">
<view>景点解说</view>
<view>
<view v-for="(item,index) in detail.multimedia" :key="index" class="item" @click="play(item,index)">
<image :src="showImg(item.head_img)" mode="aspectFill" class="item-img"></image>
<view class="item-title text-overflow">{{item.title}}</view>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/sound.png" class="item-icon" v-if="item.type == 'audio' && !item.status"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/pause.png" class="item-icon" v-if="item.type == 'audio' && item.status"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/index/play.png" class="item-icon" v-if="item.type == 'video'"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {},
audio: null,
isPlayIndex: null
}
},
onLoad(option) {
this.Post({
id: option.id
}, '/api/scenic/getScenicById').then(res => {
if (res.data.flag == 0) {
uni.showToast({
title: '商品不存在或已下架',
icon: 'none'
})
setTimeout(() => {
this.goBack()
}, 2000)
}
res.data.multimedia.map(item => {
item.type = item.multimedia_url.includes('mp3') ? 'audio' : 'video'
item.status = false //
})
this.detail = res.data
});
},
onShow() {
this.isPlayIndex = null
},
onHide() {
if(this.audio){
//
this.audio.destroy()
}
},
onUnload() {
if(this.audio){
//
this.audio.destroy()
}
},
methods: {
//
play(item,index) {
if(item.type == 'audio') {
//
if(this.audio && this.audio.src == this.showImg(item.multimedia_url)) {
// true false
if(this.audio.paused) {
this.audio.play()
}else {
this.audio.pause()
}
}else {
// audio
if(this.audio) {
//
this.detail.multimedia[this.isPlayIndex].status = false
this.audio.stop(); //
this.audio = null;
}
//
this.audio = uni.createInnerAudioContext();
this.audio.src = this.showImg(item.multimedia_url)
this.audio.play()
}
if(this.audio) {
this.audio.onEnded(() => {
//
item.status = false
});
}
this.isPlayIndex = index
item.status = !item.status
}else {
uni.navigateTo({
url: '/subPackages/video/video?item=' + encodeURIComponent(JSON.stringify(item))
})
}
}
}
}
</script>
<style scoped lang="scss">
.bg {
width: 100vw;
height: 100vh;
background-size: auto 100%;
animation: scroll 10s infinite;
overflow: hidden;
background-repeat: no-repeat;
}
@keyframes scroll {
0% {
background-position: 0%;
}
100% {
background-position: -1000px;
}
/* 500px 是背景图片宽度的一半 */
}
.content {
width: 670rpx;
position: absolute;
top: 235rpx;
left: 40rpx;
.title {
font-weight: 500;
font-size: 48rpx;
color: #FFFFFF;
}
.subtitle {
margin-top: 35rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
}
.notice {
margin-top: 35rpx;
height: 80rpx;
border-radius: 33rpx;
overflow: hidden;
}
}
.box {
position: absolute;
bottom: 79rpx;
width: 100%;
padding-left: 42rpx;
&>view:first-child {
font-weight: 500;
font-size: 37rpx;
color: #FFFFFF;
padding-left: 12rpx;
}
&>view:last-child {
overflow-x: scroll;
overflow-y: hidden;
font-weight: bold;
font-size: 31rpx;
color: #FFFFFF;
display: flex;
margin-top: 28rpx;
}
&>view:last-child::-webkit-scrollbar {
display: none;
}
.item {
width: 206rpx;
height: 254rpx;
background: rgba(255, 255, 255, .4);
border-radius: 20rpx;
margin-right: 20rpx;
padding: 8rpx;
flex-shrink: 0;
position: relative;
.item-img {
width: 190rpx;
height: 190rpx;
border-radius: 13rpx;
}
.item-title {
width: 190rpx;
font-weight: bold;
font-size: 31rpx;
color: #FFFFFF;
text-align: center;
}
.item-icon {
position: absolute;
width: 46rpx;
height: 46rpx;
top: 80rpx;
left: 80rpx;
}
}
}
</style>

153
subPackages/leyou/index.vue

@ -0,0 +1,153 @@
<template>
<view class="bg">
<swiper class="swiper-box" :circular="true" previous-margin="0" next-margin="70rpx" :duration="800"
:current="current" @change="swiperChange">
<swiper-item v-for="(item, index) in list" :key="index" class="swiper-item">
<view class="swiper-item" :class="['swiper-item', {'active': index == current}]">
<image :src="showImg(item.image)" mode="aspectFill" class="swiper-img"></image>
<view class="content">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="tags" v-if="item.label">
<view class="tag" v-for="(tagItem, tagIndex) in item.label.split(',').slice(0,2)" :key="tagIndex">{{tagItem}}</view>
</view>
<view class="address text-overflowRows" v-if="item.address">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/location.png" mode=""></image>
{{item.address}}
</view>
<navigator :url="'/subPackages/leyou/detail?id='+item.id" class="btn">
查看更多 >
</navigator>
</view>
</view>
</swiper-item>
</swiper>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
current: 0,
}
},
onShow() {
this.getList()
},
methods: {
getList() {
https://tlgz.sz-trip.com?scenic_type_id=11&offset=0&limit=10&lon=120&lat=30&token=96035795-fe93-4db8-8cf3-aeabbdb4e8c4
this.Post({
scenic_type_id: 12,
offset: 0,
limit: 100
},'/api/Scenic/getScenicByType').then(res => {
this.list = res.data
})
},
//
swiperChange(e) {
let {
current,
source
} = e.detail;
//current
if (source === 'autoplay' || source === 'touch') {
this.current = current;
}
},
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
padding: 40rpx 0 0 40rpx;
}
.swiper-box {
height: 1267rpx;
.swiper-item {
width: 640rpx;
height: 1267rpx;
border-radius: 27rpx;
position: relative;
.swiper-img {
width: 100%;
height: 100%;
border-radius: 27rpx;
position: absolute;
left: 0;
transform: scale(0.9);
}
.active {
width: 640rpx;
height: 1267rpx;
.swiper-img {
transform: scale(1);
}
}
.content {
position: absolute;
width: 530rpx;
left: 40rpx;
bottom: 50rpx;
.title {
font-weight: 500;
font-size: 44rpx;
color: #FFFFFF;
}
.tags {
display: flex;
margin-top: 28rpx;
.tag {
line-height: 47rpx;
border-radius: 8rpx;
border: 1rpx solid #FFFFFF;
padding: 0 12rpx;
margin-right: 20rpx;
font-weight: 500;
font-size: 27rpx;
color: #FFFFFF;
}
}
.address {
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin-top: 28rpx;
image {
width: 30.67rpx;
height: 36.67rpx;
vertical-align: middle;
margin-right: 10rpx;
}
}
.btn {
width: 253rpx;
line-height: 73rpx;
background: rgba(255, 255, 255, .26);
border-radius: 37rpx;
text-align: center;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
margin-top: 28rpx;
}
}
}
}
</style>

328
subPackages/line/detail.vue

@ -1,7 +1,7 @@
<template>
<view class="bg">
<view class="swipe-box">
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000" circular indicator-dots indicator-color="rgba(255,255,255,.5)"
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000" circular indicator-color="rgba(255,255,255,.5)"
indicator-active-color="#fff" @change="swiperChange">
<swiper-item v-for="(item, index) in info.list_images.split(',')" :key="item.id">
<view class="swiper-item">
@ -10,43 +10,98 @@
</swiper-item>
</swiper>
<view class="swiper-pointer">
{{swiperCurrent}}/{{info.list_images.split(',').length}}
</view>
<view class="collect" @click.stop="collect()">
<!-- <view class="collect" @click.stop="collect()">
<image src="https://tongli.sz-trip.com/uploads/20240829/9dbb80cafe8375bd6d5c96fccb617962.png" v-if="info.is_collect"></image>
<image src="https://tongli.sz-trip.com/uploads/20240826/564af778708591f5de29174d3b14bbff.png" v-else></image>
</view>
</view> -->
</view>
<view class="common-container info-container">
<view class="info-title text-overflowRows">{{info.title}}</view>
<view class="top-box">
<view class="top-price">{{info.low_money / 100}}</view>
<view class="top-title">{{info.title}}</view>
</view>
<view class="scroll-all-box" id="menus" v-if="info">
<view :class="'scroll-menus' + (fixed ? ' fixed-menus' : '')">
<view :class="'scroll-menu-item' + (type == 1 ? ' active' : '')" @click="changeMenu(1)">费用说明</view>
<view :class="'scroll-menu-item' + (type == 2 ? ' active' : '')" @click="changeMenu(2)">预定须知</view>
<view :class="'scroll-menu-item' + (type == 3 ? ' active' : '')" @click="changeMenu(3)">产品详情</view>
</view>
<view class="common-container detail-container">
<view class="" id="cpts" v-html="formateRichText(info.feature_content)"></view>
<view style="height: 85rpx" v-if="fixed"></view>
<view class="info-box" id="box1">
<view class="info-title">费用说明</view>
<view class="info-content" v-html="formateRichText(info.price_content)"></view>
</view>
<view class="info-box" id="box2">
<view class="info-title">预定须知</view>
<view class="info-content" v-html="formateRichText(info.reserve_content)"></view>
</view>
<view class="info-box" id="box3">
<view class="info-title">产品详情</view>
<view class="info-content" v-html="formateRichText(info.special_content)"></view>
</view>
</view>
<view class="fixed-bottom">
<view class="flex-between">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="flex-column">
<img src="https://static.ticket.sz-trip.com/dongtai/images/index/kefu.png" alt="" />
客服
</view>
</button>
</view>
<view class="btn" @tap="order">立即预订</view>
</view>
</view>
</template>
<script>
const device = uni.getSystemInfoSync();
const ratio = device.windowWidth / 750;
export default {
data() {
return {
id: null,
swiperCurrent: 1,
info: {list_images:''},
top: 0,
fixed: false,
type: 0,
down: false,
}
},
onShow(options) {
onShow() {
},
onLoad(options) {
this.id = options.id;
this.getInfo();
let rect = uni.getMenuButtonBoundingClientRect();
this.top = (rect.top - device.statusBarHeight) * 2 + rect.height + device.statusBarHeight;
},
onPageScroll(e){
let query = uni.createSelectorQuery()
query.select("#menus").boundingClientRect(res => {
    if(res.top < 0){
this.fixed = true
}else{
this.fixed = false
}
}).exec()
if (this.down) {
return
}else{
this.down = true
for(let i = 1; i < 4; i++) {
query.select("#box" + i).boundingClientRect(res => {
if(res.top < 0) {
this.type = i
}
}).exec()
}
this.down = false
}
},
methods: {
swiperChange (e) {
@ -59,9 +114,29 @@
uni.showToast({title: '商品不存在或已下架',icon: 'none'})
setTimeout(() => {this.goBack()}, 2000)
}
res.data.goods_new_tag = (res.data.goods_new_tag ? res.data.goods_new_tag.split(',') : []).splice(0, 2);
this.info = res.data;
});
},
changeMenu(e) {
this.down = true
let index = e;
let that = this
const query = uni.createSelectorQuery(); //
query.select('#box' + index).boundingClientRect(); //toViewid
query.selectViewport().scrollOffset(); //
query.exec(function (res) {
let scrollTop = res[0].top + res[1].scrollTop - 110 * ratio - that.top;
uni.pageScrollTo({
scrollTop: scrollTop + 4,
duration: 0
});
that.type = index
setTimeout(()=>{
that.down = false
},1000)
});
},
//
collect() {
this.Post({type: 6,id: this.id},'/api/scenic/collect').then(res => {
@ -71,8 +146,12 @@
}
});
},
//
order() {
uni.navigateTo({
url: "/subPackages/line/order?id=" + this.info.id
})
}
}
}
</script>
@ -83,28 +162,13 @@
}
.bg{
min-height: 100vh;
background: #F8F8F8;
background: #F7F7F7;
padding-bottom: 200rpx;
}
.swipe-box {
height: 867rpx;
height: 413rpx;
position: relative;
.swiper-item-num {
width: 90rpx;
height: 40rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 20rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
text-align: center;
line-height: 40rpx;
position: absolute;
right: 30rpx;
bottom: 50rpx;
}
.collect{
position: absolute;
@ -123,62 +187,180 @@
height: 36rpx;
}
}
.swiper-pointer{
position: absolute;
right: 36rpx;
bottom: 80rpx;
background: rgba(22,22,22,0.5);
border-radius: 23rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
padding: 6rpx 14rpx;
}
}
.swiper {
height: 867rpx;
height: 413rpx;
position: relative;
.swiper-item {
width: 100%;
height: 867rpx;
height: 413rpx;
.item-img {
width: 750rpx;
height: 867rpx;
}
.item-img.pop-swiper-image{
height: 347rpx;
border-radius: 13rpx;
height: 413rpx;
}
}
}
.common-container{
background: white;
width: 100%;
.top-box {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
position: relative;
margin: -30rpx auto 0;
padding: 27rpx 42rpx 37rpx;
.top-price {
font-weight: bold;
font-size: 40rpx;
color: #F02A2A;
}
.top-price::before {
font-size: 32rpx;
content: '¥';
}
.top-price::after {
font-size: 24rpx;
color: rgba(102, 102, 102, 1);
content: '起';
}
.top-title {
font-weight: bold;
font-size: 31rpx;
color: #000000;
margin-top: 15rpx;
}
}
.scroll-all-box {
margin: 24rpx 0;
.scroll-menus {
padding: 0 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 29rpx;
color: #333;
height: 84rpx;
border-bottom: 1rpx solid #d9d9d9;
.scroll-menu-item {
position: relative;
line-height: 84rpx;
}
.scroll-menu-item.active::after {
content: '1';
font-size: 0;
display: block;
position: absolute;
width: 46rpx;
height: 6rpx;
border-radius: 3rpx;
background: #248BAA;
left: 50%;
margin-left: -23rpx;
bottom: 0rpx;
}
}
.fixed-menus {
position: fixed;
top: 0;
left: 0;
right: 0;
background: white;
z-index: 1;
}
.info-box {
padding: 20rpx 40rpx;
.info-title {
font-size: 35rpx;
font-weight: bold;
color: #000;
}
.info-content {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 22rpx 14rpx;
margin-top: 20rpx;
}
}
}
.fixed-bottom {
width: 750rpx;
height: 152rpx;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6,0,1,0.1);
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 26rpx 0 48rpx;
box-sizing: border-box;
font-size: 23rpx;
font-family: PingFangSC;
font-weight: 400;
color: #666666;
img {
width: 48rpx;
height: 48rpx;
}
.btn {
width: 254rpx;
height: 77rpx;
background: linear-gradient(270deg, #FC5109, #FC930A);
border-radius: 39rpx;
text-align: center;
line-height: 77rpx;
font-size: 32rpx;
font-family: PingFangSC;
font-weight: 500;
color: #FFFFFF;
}
}
.info-container{
padding: 34rpx 25rpx;
width: 100%;
font-family: PingFang SC;
font-weight: bold;
font-size: 35rpx;
color: #000000;
margin-bottom: 21rpx;
#contact {
-webkit-tap-highlight-color: transparent;
background-color: rgba(0, 0, 0, 0);
border-radius: 0;
box-sizing: border-box;
color: transparent;
cursor: pointer;
display: inline-block;
font-size: 0;
line-height: 35rpx;
margin-left: 0;
margin-right: 0;
overflow: hidden;
padding-left: 0;
padding-right: 0;
position: relative;
text-align: center;
text-decoration: none;
border: transparent 0px solid;
font-size: 23rpx;
font-family: PingFangSC;
font-weight: 400;
color: #666666;
}
.detail-container{
width: 100%;
padding: 28rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 28rpx;
color: #333333;
button::after {
border: none;
background-color: rgba(0, 0, 0, 0);
}
</style>

16
subPackages/line/lineList.vue

@ -1,7 +1,9 @@
<template>
<view class="bg">
<span class="iconfont topLeft" @click="goBack">&#xe660;</span>
<img :src="showImg('/uploads/20240826/97282395bdd31e0b1fe20e5356cc4fc4.png')" class="topImg" />
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<img :src="showImg(headImg)" class="topImg" />
<view class="item" v-for="item in list" :key="item.id" @click="viewDetail(item)">
<image class="img" :src="showImg(item.image)" mode=""></image>
<view class="content">
@ -24,9 +26,11 @@
return {
list:[], //
finished: false,
headImg: ''
}
},
onReady() {
this.getHeadImg('line').then(res => {this.headImg = res})
this.getList()
},
methods: {
@ -70,14 +74,6 @@
padding-bottom: 26rpx;
}
.topLeft {
position: absolute;
left: 26rpx;
top: 101rpx;
font-size: 40rpx;
z-index: 2;
}
.topImg {
width: 750rpx;
height: 440rpx;

575
subPackages/line/order.vue

@ -0,0 +1,575 @@
<template>
<view class="bg">
<view class="date-all-box">
<view class="month-box">
<view @click="changeMonth(index)" :class="'month-item' + (monthIndex == index ? ' active' : '')"
v-for="(item, index) in months" :key="index" v-if="emptyList[index].isShow">
{{ item }}
</view>
</view>
<view class="day-header">
<view class="day-header-item"></view>
<view class="day-header-item"></view>
<view class="day-header-item"></view>
<view class="day-header-item"></view>
<view class="day-header-item"></view>
<view class="day-header-item"></view>
<view class="day-header-item"></view>
</view>
<view class="day-box" v-if="selectDate">
<view class="day-item" v-for="(item, index) in emptyList[monthIndex].empty" :key="index">
<view class="date-item-in">
<view class="date-num"></view>
<view class="date-price-place"></view>
</view>
</view>
<view
:class="'day-item' + (selectDate['selectMonth'] == months[monthIndex] && selectDate['selectDate'] == index + 1 ? ' active' : '')"
v-for="(item, index) in emptyList[monthIndex].days" :key="index"
>
<view class="date-item-in" @click="selectDateFun(index + 1)">
<view
:class="
'date-num' + (prices[months[monthIndex] + '-' + (index + 1)] && prices[months[monthIndex] + '-' + (index + 1)].product_price != null ? ' active' : '')
"
>
{{ index + 1 >= 10 ? index + 1 : '0' + (index + 1) }}
</view>
<view
class="price"
v-if="
prices[months[monthIndex] + '-' + (index + 1)] &&
prices[months[monthIndex] + '-' + (index + 1)].product_price != null &&
prices[months[monthIndex] + '-' + (index + 1)].store != null
"
>
{{ prices[months[monthIndex] + '-' + (index + 1)].m_price / 100 }}
</view>
<view class="date-price-place" v-else-if="prices[months[monthIndex] + '-' + (index + 1)] && prices[months[monthIndex] + '-' + (index + 1)].store == 0">
售罄
</view>
<view class="date-price-place" v-else></view>
</view>
</view>
</view>
</view>
<view class="box" v-for="(item, index) in sku" :key="index">
<view class="box-top">
<view class="box-title">{{ item.title }}</view>
<view class="box-tip text-overflow">{{ item.sku_type_info }}</view>
<view :class="'iconfont' + (nums[index] == 0 ? ' disable' : '')" @click="minus(index)">-</view>
<view class="number">{{ nums[index] }}</view>
<view :class="'iconfont' + (nums[index] == selectDate['info'][index].store ? ' disable' : '')" @click="add(index)">+</view>
</view>
<view class="single-price" v-if="selectDate">{{ selectDate['info'][index].money / 100 }}</view>
</view>
<view class="fixed-bottom">
<text class="fixed-text">合计</text>
<view class="price">¥{{ totalPrice() / 100 }}</view>
<view class="btn" @tap="order">下一步</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
id: '',
months: [],
monthIndex: 0,
productInfo: null,
sku: [],
nums: [],
selectDate: null,
price: 0,
prices: {},
emptyList: [
{
empty: 0,
days: 0,
isShow: false
},
{
empty: 0,
days: 0,
isShow: false
},
{
empty: 0,
days: 0,
isShow: false
},
{
empty: 0,
days: 0,
isShow: false
},
{
empty: 0,
days: 0,
isShow: false
},
{
empty: 0,
days: 0,
isShow: false
}
],
years: []
}
},
onLoad(option) {
this.id = option.id
this.getSku()
this.initDate()
},
methods: {
//
order() {
let selectDate = this.selectDate;
let sku = this.sku;
let nums = this.nums;
let allNum = 0;
if (!selectDate) {
uni.showToast({
title: '请先选择日期',
icon: 'none'
});
return;
}
sku.map((item, index) => {
item.num = nums[index];
allNum = allNum + nums[index];
item.price = selectDate.info[index].money;
});
if (allNum == 0) {
uni.showToast({
title: '至少选择一个规格',
icon: 'none'
});
return;
}
let data = {
sku: sku,
selectDate: selectDate,
price: this.totalPrice()
}
this.$store.commit('changeLineInfo',data)
uni.navigateTo({
url: '/subPackages/line/orders'
})
},
//
minus(index) {
if (!this.selectDate) {
uni.showToast({
title: '请先选择出行日期',
icon: 'none'
});
return;
}
let nums = this.nums;
if (nums[index] == 0) {
return;
}
nums[index] = nums[index] - 1;
this.nums = nums
this.$forceUpdate()
},
//
add(index) {
if (!this.selectDate) {
uni.showToast({
title: '请先选择出行日期',
icon: 'none'
});
return;
}
let nums = this.nums;
let sku = this.sku;
if (this.selectDate.info[index].store == nums[index]) {
uni.showToast({
title: '无库存',
icon: 'none'
});
return;
}
nums[index] = nums[index] + 1;
this.nums = nums
this.$forceUpdate()
},
//
changeMonth(index) {
this.monthIndex = index
},
//
selectDateFun(item) {
//
let selectMonth = this.months[this.monthIndex];
if (!selectMonth) {
return;
}
let info = this.prices[selectMonth + '-' + item];
if (info && info.product_price && info.product_price !== null && info.store != 0) {
info.selectMonth = selectMonth;
info.selectDate = item;
this.selectDate = info;
}
},
//
getSku() {
this.Post({
goods_id: this.id
},'/api/goods/getSpecificationsByGoodsId').then(res => {
let nums = [];
res.data.map((item) => {
nums.push(0);
});
this.sku = res.data,
this.nums = nums
})
},
//
totalPrice() {
let selectDate = this.selectDate;
let nums = this.nums;
let price = 0;
nums.map((num, index) => {
price = price + num * selectDate.info[index].money;
});
return price
},
initDate() {
let today = new Date();
let month = today.getMonth() + 1;
this.months[0] = today.getMonth() + 1
for (let i = 1; i < 6; i++) {
this.months[i] = (month + i) % 12 == 0 ? 12 : (month + i) % 12
}
let year1 = today.getFullYear();
let year2 = this.months[0] < this.months[1] ? year1 : year1 + 1
let year3 = this.months[1] < this.months[2] ? year2 : year2 + 1
let year4 = this.months[2] < this.months[3] ? year3 : year3 + 1
let year5 = this.months[3] < this.months[4] ? year4 : year4 + 1
let year6 = this.months[4] < this.months[5] ? year5 : year5 + 1
this.years = [year1,year2,year3,year4,year5,year6]
for (let i = 0; i < 6; i++) {
this.emptyList[i].empty = this.getMonthDays(this.months[i], this.years[i])[1]
this.emptyList[i].days = this.getMonthDays(this.months[i], this.years[i])[0]
}
//
this.Post({
goods_id: this.id,
start_date: this.formatDate(today),
end_date: this.years[5] + '-' + this.months[5] + '-' + this.emptyList[5].days
},'/api/goods/getStoreByMonth').then(res => {
let data = res.data
for (let i = 0; i < 6; i++) {
this.emptyList[i].isShow = data[i].store > 0 ? true : false
}
})
let selectDate;
let selectMonth;
this.Post({
goods_id: this.id,
start_date: this.formatDate(today),
end_date: this.years[5] + '-' + this.months[5] + '-' + this.emptyList[5].days
},'/api/goods/get_product_sku_price_by_date').then(res => {
let prices = {};
res.data.map((item) => {
//
for (let i = 0; i < item.info.length; i++) {
for (let j = i + 1; j < item.info.length; j++) {
if (item.info[i].sku_info.id > item.info[j].sku_info.id) {
[item.info[i], item.info[j]] = [item.info[j], item.info[i]];
}
}
}
let store = 0;
item.info.map((i) => {
store = store + i.store;
});
item.store = store;
if (item.store != 0) {
let date = item.date.split('-').splice(1, 2);
let newDate = [];
date.map((d) => {
d = parseInt(d);
newDate.push(d);
});
if (!selectDate) {
selectDate = newDate[1];
selectMonth = newDate[0];
}
prices[newDate.join('-')] = item;
}
});
this.prices = prices
if (!selectDate) {
return;
}
let info = prices[selectMonth + '-' + selectDate];
info.selectMonth = selectMonth;
info.selectDate = selectDate;
this.selectDate = info;
this.monthIndex = this.emptyList.findIndex(i => i.isShow == true)
})
},
//
getMonthDays(month, year) {
let date = new Date(year + '/' + month + '/01').getDay();
if (month == 2) {
if ((year % 100 !== 0 && year % 4 == 0) || year % 400 == 0) {
return [29, date];
} else {
return [28, date];
}
} else if ((month < 8 && month % 2 == 1) || (month >= 8 && month % 2 == 0)) {
return [31, date];
} else {
return [30, date];
}
},
formatDate(date){
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
return [year, month, day].join('-');
}
}
}
</script>
<style lang="scss" scoped>
.bg {
background: #f6f6f6;
padding-bottom: 200rpx;
}
.date-all-box {
margin: 0 25rpx;
.month-box {
padding: 0 20rpx;
height: 116rpx;
display: flex;
border-bottom: 1rpx solid #ccc;
align-items: center;
.month-item {
margin-right: 70rpx;
font-size: 33rpx;
color: #000;
font-weight: 500;
line-height: 116rpx;
position: relative;
white-space: nowrap;
}
.month-item.active::after {
content: '1';
display: block;
font-size: 0;
position: absolute;
left: 0;
right: 0;
height: 8rpx;
background: #248BAA;
border-radius: 4rpx;
bottom: 0;
}
}
.day-header {
padding-top: 40rpx;
line-height: 45rpx;
font-size: 29rpx;
color: #000;
display: flex;
align-items: center;
flex-wrap: wrap;
margin-bottom: 50rpx;
.day-header-item {
width: calc(690rpx / 7);
text-align: center;
flex-shrink: 0;
}
}
.day-box {
display: flex;
align-items: center;
font-size: 35rpx;
flex-wrap: wrap;
color: #999;
.day-item {
width: calc(690rpx / 7);
text-align: center;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 30rpx;
.date-item-in {
width: 98rpx;
display: flex;
align-items: center;
justify-content: space-around;
flex-direction: column;
height: 98rpx;
.date-num {
line-height: 40rpx;
}
.date-num.active {
color: #000;
}
.price {
font-size: 23rpx;
color: #F84A56;
line-height: 20rpx;
}
.price::after {
content: '起';
font-size: 17rpx;
}
.date-price-place {
height: 20rpx;
}
}
}
.day-item.active {
.date-item-in {
background: #248BAA;
color: #fff;
border-radius: 7rpx;
.price {
color: #fff;
}
.date-num {
color: #fff;
}
}
}
}
}
.box {
background: white;
margin: 25rpx;
background: #ffffff;
border-radius: 9rpx;
padding: 35rpx 20rpx;
.box-top {
display: flex;
justify-content: space-between;
align-items: center;
line-height: 50rpx;
font-size: 28rpx;
color: #666;
.box-title {
font-size: 31rpx;
color: #000;
}
.box-tip {
flex: 1;
margin-left: 30rpx;
}
.iconfont {
color: #000;
font-size: 34rpx;
width: 50rpx;
text-align: center;
}
.iconfont.disable {
color: #666;
}
.number {
width: 67rpx;
height: 50rpx;
background: #f0f0f0;
border-radius: 7rpx;
text-align: center;
margin: 0 23rpx;
}
}
.single-price {
font-size: 33rpx;
color: #d62828;
text-align: right;
margin-top: 20rpx;
}
.single-price::before {
content: '¥';
font-size: 24rpx;
margin-right: 4rpx;
}
}
.fixed-bottom {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 148rpx;
background: white;
display: flex;
justify-content: space-between;
align-items: center;
padding-left: 26rpx;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
z-index: 999;
.fixed-text {
flex-shrink: 0;
font-size: 29rpx;
}
.price {
flex: 1;
font-size: 36rpx;
color: #F84A56;
font-weight: 500;
}
.btn {
width: 293rpx;
text-align: center;
line-height: 87rpx;
background: linear-gradient(-90deg, #F84A56, #FF9834);
border-radius: 43rpx;
color: #fff;
font-size: 36rpx;
font-weight: 500;
margin-left: 30rpx;
}
}
</style>

777
subPackages/line/orders.vue

@ -0,0 +1,777 @@
<template>
<view class="bg">
<view class="top-box" v-if="product">
<view class="product-title">{{ product.title }}</view>
<view class="product-date">{{ selectDate.date }}</view>
<view class="product-num">
<text class="product-text" v-for="(item, index) in sku" :key="index">{{ item.title }}x{{ item.num }}</text>
</view>
</view>
<view class="user-box">
<view class="user-box-title">出行人信息</view>
<!-- <view v-for="(skuItem, skuIndex) in sku" :key="skuIndex">
<view class="user-item" v-for="(item, index) in skuItem.num" :key="index">
<text class="user-item-text">{{ skuItem.title }}</text>
<view v-if="linkmans[skuIndex][index]" class="user-info">
<text style="margin-right: 30rpx">{{ linkmans[skuIndex][index].name }}</text>
<text>{{ linkmans[skuIndex][index].tel }}</text>
</view>
<img @tap="showLinkman(skuIndex)" v-if="linkmans[skuIndex][index]" src="https://static.ticket.sz-trip.com/dongtai/images/index/edit.png" class="icon-bianji1" />
<view @tap="showLinkman(skuIndex)" v-else class="add-btn">
+ 添加
</view>
</view>
</view> -->
<view class="user-item">
<text class="user-item-text">姓名</text>
<input type="number" v-model="reserve_name" placeholder="输入您的姓名" class="user-input"/>
</view>
<view class="user-item">
<text class="user-item-text">手机号</text>
<input type="number" v-model="reserve_phone" placeholder="输入您的手机号" maxlength="11" class="user-input"/>
<uni-icons type="closeempty" size="20" @click="reserve_phone = ''" v-if="reserve_phone!= ''" style="margin-left: 30rpx;"></uni-icons>
</view>
<!-- <view class="user-item" style="border-bottom: none">
<text class="user-item-text">订单备注</text>
<input type="text" v-model="remark" placeholder="选填" class="user-input"/>
</view> -->
</view>
<navigator :url="'/subPackages/order/orderCoupon?allprice='+ price + '&sku_ids='+ sku_ids.toString()" class="coupon-box flex-between">
<text>优惠券</text>
<view style="display: flex;align-items: center;">
<view class="add-btn" v-if="!coupon">请选择</view>
<view style="display: flex;align-items: center;color: #FC5109;" v-if="coupon && coupon.CouponActivity">
<view>-{{coupon.CouponActivity.discounts/100}}</view>
</view>
<img src="https://static.ticket.sz-trip.com/changyoutaihu/images/user/rightIcon.png" class="icon-coupon">
</view>
</navigator>
<!-- <view class="xy-box">
<view class="quan flex-center" @click="clickXy">
<view class="quan-seld" v-if="xySeld"></view>
</view>
<view style="margin-left: 20rpx;">
请您仔细阅读<span @click="openXz">线路标准退预定须知</span>点击去支付即代表您已阅读条款内容
</view>
</view> -->
<view class="fixed-bottom">
<view class="order-all-price">
合计
<text class="order-all-text">
¥{{ priceTotal() / 100 }}
</text>
</view>
<view class="order-btn" @tap="order">去支付</view>
</view>
<!-- 协议弹框 -->
<!-- <uni-popup ref="popup" type="bottom" :safe-area="false">
<view class="xzPopup">
<view v-html="formateRichText(product.reserve_content)"></view>
<img src="https://static.ticket.sz-trip.com/taihu/images/scenic/cha.png" @click="closePopup">
</view>
</uni-popup> -->
<!-- 添加出行人弹窗 -->
<uni-popup ref="peoplePopup" type="bottom" backgroundColor="#F4F4F4">
<view class="people-popup">
<view class="popup-top">
<view class="top flex-between">
<text class="text-overflow" @click="changePeoplePopup('close')"></text>
<text class="confirm" @click="changePeoplePopup('')">确定</text>
</view>
</view>
<navigator url="/subPackages/user/myContactsAdd?type=add" class="button">添加出行人</navigator>
<view class="popup-list" v-if="peopleList.length>0">
<view class="popup-item" v-for="(item,index) in peopleList" :key="index">
<view class="item-top flex-between">
<navigator :url="`/subPackages/user/myContactsAdd?type=edit&id=${item.id}`"><img
src="https://static.ticket.sz-trip.com/taizhou/images/detail/edit.png" class="editImg">
</navigator>
<view class="name">{{ item.name }}</view>
<view class="subtitle">
<view class="mobile">手机号 {{ item.tel }}</view>
<view class="idCard">{{ item.document_type_text }} {{ item.id_number }}</view>
</view>
<view class="status" :class="item.is_seld?'statuss':'noSelect'"
@click="seldThisPeople(item, index)">
<img src="https://static.ticket.sz-trip.com/taihu/images/user/dui.png"
v-if="item.is_seld" class="selectImg">
</view>
</view>
<view class="item-site" @click="changeDefaultPeople(item,index)">
<view class="flex-around" v-if="item.is_default==1">
<view></view>
</view>
<view v-else></view>
设为默认出行人
</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
product: this.$store.state.user.lineInfo.product,
sku: this.$store.state.user.lineInfo.sku,
selectDate: this.$store.state.user.lineInfo.selectDate,
linkmans: [],
sku_ids: '',
price: this.$store.state.user.lineInfo.price,
skuIndex: null,
coupon: '',
reserve_name: '',
reserve_phone: '',
reserve_mobile: '',
remark: '',
peopleList: [],
linkmanList: [],
xySeld: false
}
},
onReady() {
//
this.$store.commit("choseCoupon", "");
//
this.reserve_phone = JSON.parse(uni.getStorageSync('userInfo')).mobile
this.Post({
goods_id: this.sku[0].goods_id
},'/api/goods/getGoodDetail').then(res => {
this.product = res.data
})
let linkmans = [];
let sku_ids = [];
this.sku.map((item) => {
let num = Number(item.num);
linkmans.push(new Array(num));
sku_ids.push(item.id);
});
this.linkmans = linkmans
this.sku_ids = sku_ids
},
onShow() {
this.coupon = this.$store.state.user.coupon
console.log('传过来的优惠券',this.coupon);
// this.getPeople()
},
methods: {
//
clickXy() {
this.xySeld = !this.xySeld
},
openXz() {
this.$refs.popup.open('bottom')
},
closePopup() {
this.$refs.popup.close()
},
//
order() {
let flag = true
let product_list = [];
this.sku.map((item, index) => {
if(item.num > 0) {
// let linkman = this.linkmans[index].filter(i => i);
// if(linkman.length < item.num) {
// flag = false
// uni.showToast({
// title: '',
// icon: 'none'
// });
// return;
// }
// let pId = []
// linkman.map(lItem => {
// pId.push(lItem.id)
// })
product_list.push({
product_id: this.product.id,
specifications_id: item.id,
num: item.num,
// contact_id: pId,
date: this.selectDate.date
});
}
})
if(!this.idChinaName(this.reserve_name)) {
flag = false
uni.showToast({
title: '请输入联系人',
icon: 'none'
});
return;
}
if(!this.IsTel(this.reserve_phone)) {
flag = false
uni.showToast({
title: '请输入联系方式',
icon: 'none'
});
return;
}
// if(!this.xySeld) {
// flag = false
// uni.showToast({
// title: '',
// icon: 'none'
// });
// return;
// }
if(flag){
let data = {
goods: product_list,
coupon: this.coupon ? this.coupon.id : null,
reserve_name: this.reserve_name,
reserve_phone: this.reserve_phone
};
this.Post({
data: JSON.stringify(data),
method: 'POST',
},'/api/order/place').then(res => {
console.log(res)
if(res.code == 1) {
let order_id = res.data.order_id
this.$store.commit("changeLineInfo", 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'
})
}
})
}
})
}
})
}
},
//
priceTotal() {
let price = 0
if(this.coupon) {
if (this.coupon.percent == 0) {
price = this.price - this.coupon.CouponActivity.discounts
} else{
price = this.price - (this.price * this.coupon.CouponActivity.percent/100)
}
}else {
price = this.price
}
return price < 0 ? 0 : price
},
//
getPeople() {
this.Post({
offset: 0,
limit: 100
},'/api/user/contactList').then(res => {
this.peopleList = res.data
this.reserve_mobile = this.peopleList[0].tel
//
if(this.linkmanList.length > 0){
for (let i = 0; i < this.linkmanList.length; i++) {
for (let j = 0; j < this.peopleList.length; j++) {
if(this.peopleList[j].id == this.linkmanList[i].id){
this.linkmanList[i] = this.peopleList[j]
this.peopleList[j].is_seld = true
this.linkmanList[i].is_seld = true
}
}
}
this.$forceUpdate()
}
})
},
//
changeDefaultPeople(item, index) {
if (item.is_default == 1) {
return
}
this.Post({
is_default: 1,
name: item.name,
tel: item.tel,
id: item.id,
id_number: item.id_number,
idcard_type: item.idcard_type
},'/api/user/editContact').then(res => {
if(res.code == 200){
uni.showToast({
title: '设置成功',
icon: 'none'
});
for (let item of this.peopleList) item.is_default = 0
this.peopleList[index].is_default = 1
}
this.$forceUpdate()
})
},
//
showLinkman(skuIndex) {
this.skuIndex = skuIndex
this.peopleList.map(item => {
if(item.is_seld && item.is_sku != this.sku[this.skuIndex].id) {
item.is_disable = true
}else {
item.is_disable = false
}
})
this.$refs.peoplePopup.open('bottom')
this.$forceUpdate()
},
//
seldThisPeople(item,index) {
let num = 0
let list = []
if(item.is_seld && item.is_disable) {
uni.showToast({
title: '该联系人已选择为其他规格',
icon: 'none'
});
return;
}
this.linkmans[this.skuIndex] = []
this.peopleList.map(items => {
if(items.id == item.id) {
items.is_seld = !items.is_seld
}
if(items.is_seld && !items.is_disable) {
num++;
items.is_sku = this.sku[this.skuIndex].id
this.linkmans[this.skuIndex].push(items)
}
if(items.is_seld) {
this.linkmanList.push(item)
}
})
if(num > this.sku[this.skuIndex].num) {
item.is_seld = false
this.linkmans[this.skuIndex].splice(this.linkmans[this.skuIndex].findIndex(i => i.id == item.id),1)
uni.showToast({
title: '该规格最多只能选择'+this.sku[this.skuIndex].num+'个出行人',
icon: 'none'
});
return;
}
this.$forceUpdate()
console.log(this.peopleList,this.linkmans)
},
//
changePeoplePopup(type,confirm) {
this.$refs.peoplePopup.close()
this.$forceUpdate()
}
}
}
</script>
<style lang="scss" scoped>
.bg {
background: #f6f6f6;
padding-bottom: 200rpx;
min-height: 100vh;
}
.top-box {
padding: 30rpx 47rpx;
color: #333333;
font-size: 28rpx;
border-bottom: 1rpx solid #ccc;
.product-title {
color: #000000;
font-size: 33rpx;
font-weight: 500;
line-height: 47rpx;
margin-bottom: 30rpx;
}
.product-num {
margin-top: 30rpx;
.product-text {
margin-right: 50rpx;
}
}
}
.user-box {
margin: 25rpx;
background: #ffffff;
border-radius: 9rpx;
.user-box-title {
// border-bottom: 1rpx solid #ccc;
line-height: 113rpx;
font-size: 33rpx;
color: #000;
font-weight: bold;
padding: 0 20rpx;
}
.user-item {
margin: 0 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
height: 126rpx;
border-top: 1rpx solid #B8B8B8;
.user-item-text{
flex-shrink: 0;
font-size: 31rpx;
color: #000;
font-weight: bold;
margin-right: 20rpx;
}
.user-info {
font-size: 27rpx;
margin-right: 20rpx;
flex: 1;
text-align: left;
}
.icon-bianji1 {
width: 36rpx;
height: 36rpx;
margin-right: 10rpx;
}
.add-btn {
display: flex;
width: 140rpx;
height: 57rpx;
border: 1rpx solid #333333;
border-radius: 29rpx;
box-sizing: border-box;
justify-content: center;
align-items: center;
font-size: 28rpx;
color: #000;
}
.user-input {
flex: 1;
font-size: 29rpx;
display: block;
text-align: right;
}
.icon-coupon{
width: 20rpx;
height: 20rpx;
margin-left: 15rpx;
}
}
}
.people-popup {
padding: 26rpx;
min-height: 800rpx;
.top-box {
height: 80rpx;
.top {
position: fixed;
left: 0;
right: 0;
color: #000;
height: 80rpx;
font-size: 0;
overflow: hidden;
padding: 0 26rpx;
text {
text-align: left;
font-size: 30rpx;
font-weight: 400;
color: #000000;
}
.confirm {
font-weight: 400;
color: #000000;
}
}
}
.popup-list {
height: 666rpx;
overflow: scroll;
.popup-item {
border-radius: 12rpx;
padding: 0 20rpx;
margin-top: 24rpx;
font-size: 24rpx;
color: #333333;
font-weight: 400;
background-color: #FFFFFF;
.item-top {
padding: 20rpx 12rpx;
img {
color: #666666;
width: 40rpx;
height: 40rpx;
}
.name {
font-size: 30rpx;
color: #000000;
margin: 0 20rpx;
overflow: hidden;
text {
color: #999999;
margin: 0 20rpx;
}
.tag {
border-radius: 8rpx;
text-align: center;
color: #333333;
font-size: 20rpx;
padding: 6rpx 15rpx;
background-color: #FFC825;
}
}
.com-flex-start {
margin: 0 0 30rpx;
}
.subtitle {
font-weight: 400;
flex: 1;
text-align: left;
.mobile {
margin-bottom: 36rpx;
}
}
.status {
width: 40rpx;
height: 40rpx;
line-height: 40rpx;
border-radius: 50%;
text-align: center;
box-sizing: border-box;
img {
width: 27rpx;
height: 21rpx;
}
}
.statuss {
background: linear-gradient(90deg, #FA2B66, #FF9834);
border: none;
}
.noSelect {
border: 1rpx solid #999999;
}
}
.item-site {
color: #666666;
display: flex;
align-items: center;
padding: 36rpx 0;
view {
width: 23rpx;
height: 23rpx;
margin-right: 10rpx;
border: 1rpx solid #999999;
border-radius: 50%;
view {
width: 8rpx;
height: 8rpx;
background: #000000;
border-radius: 50%;
margin: auto;
}
}
}
}
}
.button {
font-size: 30rpx;
font-weight: 400;
color: #000000;
text-align: center;
width: 100%;
height: 80rpx;
line-height: 80rpx;
background-color: #FFFFFF;
border-radius: 60rpx;
}
}
.fixed-bottom {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: 113rpx;
background: white;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 26rpx;
box-sizing: border-box;
box-shadow: 0px 0px 16rpx 0px rgba(6, 0, 1, 0.1);
z-index: 1;
.order-all-price {
flex: 1;
font-size: 29rpx;
color: #333;
font-weight: 500;
.order-all-text {
flex: 1;
font-size: 36rpx;
color: #F84A56;
}
}
.order-btn {
width: 293rpx;
background: linear-gradient(90deg, #F84A56, #FF9834);
border-radius: 43rpx;
text-align: center;
line-height: 87rpx;
color: #fff;
font-size: 36rpx;
font-weight: 500;
margin-left: 30rpx;
}
}
.xy-box {
width: 658rpx;
margin: 36rpx auto 0;
font-size: 27rpx;
font-family: PingFangSC;
font-weight: 400;
color: #999999;
display: flex;
span {
color: #FEB419;
}
.quan {
min-width: 23rpx;
min-height: 23rpx;
max-width: 23rpx;
max-height: 23rpx;
border: 1px solid #999999;
border-radius: 50%;
.quan-seld {
width: 12rpx;
height: 12rpx;
background: #FEB419;
border-radius: 50%;
}
}
}
.xzPopup {
width: 750rpx;
padding: 33rpx 26rpx 20rpx;
box-sizing: border-box;
background-color: #FFFFFF;
position: relative;
height: 1200rpx;
overflow-y: scroll;
view {
padding: 0 20rpx;
box-sizing: border-box;
margin-top: 35rpx;
}
img {
width: 32rpx;
height: 32rpx;
position: absolute;
top: 33rpx;
right: 27rpx;
}
}
.coupon-box {
height: 113rpx;
background: #FFFFFF;
border-radius: 13rpx;
font-weight: bold;
font-size: 31rpx;
color: #000000;
padding: 0 20rpx;
margin: 0 20rpx;
.add-btn {
width: 153rpx;
line-height: 40rpx;
background: #EE3E3B;
border-radius: 9rpx;
text-align: center;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
}
.icon-coupon{
width: 20rpx;
height: 20rpx;
margin-left: 15rpx;
}
}
</style>

18
subPackages/notice/noticeDetail.vue

@ -1,8 +1,10 @@
<template>
<view class="bg">
<span class="iconfont topLeft" @click="goBack">&#xe660;</span>
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<view class="topBox" :style="{backgroundImage: 'url(https://static.ticket.sz-trip.com/yandu/images/notice/detailBg.png)', backgroundSize: 'cover'}">
<view class="topBox" :style="{backgroundImage: 'url(https://static.ticket.sz-trip.com/tongli/images/notice/detailBgs.png)', backgroundSize: 'cover'}">
<view>{{detail.title}}</view>
<view style="font-weight: 500;font-size: 24rpx;margin-top: 22rpx;">{{detail.create_time.slice(0,10)}}</view>
</view>
@ -32,19 +34,11 @@
.bg {
width: 750rpx;
min-height: 100vh;
background: url('https://static.ticket.sz-trip.com/yandu/images/notice/noticeBg.png') no-repeat bottom;
background: url('https://static.ticket.sz-trip.com/tongli/images/notice/noticeBg.png') no-repeat bottom;
background-size: 100% auto;
background-color: #F7F7F7;
}
.topLeft {
position: absolute;
left: 26rpx;
top: 101rpx;
font-size: 40rpx;
z-index: 2;
}
.topBox {
width: 750rpx;
height: 432rpx;
@ -60,7 +54,7 @@
background: #FFFFFF;
border-radius: 13rpx;
margin: -28rpx auto 0;
padding: 48rpx 21rpx 98rpx;
padding: 48rpx 21rpx 50rpx;
position: relative;
}
</style>

25
subPackages/notice/noticeList.vue

@ -1,8 +1,10 @@
<template>
<view class="bg">
<span class="iconfont topLeft" @click="goBack">&#xe660;</span>
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<image src="https://static.ticket.sz-trip.com/yandu/images/notice/topImg.png" mode="" class="topImg"></image>
<image :src="showImg(headImg)" mode="" class="topImg"></image>
<view class="type-box">
<view v-for="(item,index) in typeList" :key="index" :class="{'active': index == typeIndex}" @click="typeIndex=index;getList()">{{item.title}}</view>
@ -38,10 +40,12 @@
}
],
typeIndex: 0,
list: []
list: [],
headImg: ''
}
},
onShow() {
this.getHeadImg('notice').then(res => {this.headImg = res})
this.getList()
},
methods: {
@ -64,17 +68,9 @@
padding-bottom: 100rpx;
}
.topLeft {
position: absolute;
left: 26rpx;
top: 101rpx;
font-size: 40rpx;
z-index: 2;
}
.topImg {
width: 750rpx;
height: 432rpx;
height: 440rpx;
}
.type-box {
@ -86,7 +82,7 @@
font-size: 32rpx;
color: #000000;
display: flex;
margin: -34rpx auto 0;
margin: -39rpx auto 0;
overflow: hidden;
position: relative;
@ -97,7 +93,8 @@
}
.active {
background: linear-gradient(90deg, #9EE4FE, #7FD491);
color: #fff;
background: #248BAA;
}
}

105
subPackages/novelty/detail.vue

@ -0,0 +1,105 @@
<template>
<view class="bg">
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<swiper class="swiper" :autoplay="true" :interval="3000" :duration="1000" circular indicator-dots indicator-color="rgba(255,255,255,.5)"
indicator-active-color="#fff" v-if="detail.images">
<swiper-item v-for="(item, index) in detail.images.split(',')" :key="item.id">
<view class="swiper-item">
<image class="item-img" :src="showImg(item)" mode="aspectFill"></image>
</view>
</swiper-item>
</swiper>
<view class="topBox">
<view class="title text-overflowRows">{{detail.title}}</view>
<view class="name">
<image src="https://static.ticket.sz-trip.com/tongli/images/index/noveltyUser.png" mode=""></image>
{{detail.author}}
</view>
</view>
<view class="content" v-html="formateRichText(detail.content)"></view>
</view>
</template>
<script>
export default {
data() {
return {
detail: {}
}
},
onLoad(option) {
this.Post({id: option.id},'/api/article/getArticleById').then(res => {
if (res.data.flag == 0) {
uni.showToast({title: '文章不存在或已下架',icon: 'none'})
setTimeout(() => {this.goBack()}, 2000)
}
this.detail = res.data;
});
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
min-height: 100vh;
background: #F7F7F7;
padding-bottom: 100rpx;
}
.swiper {
height: 500rpx;
.swiper-item {
width: 100%;
height: 500rpx;
.item-img {
width: 750rpx;
height: 500rpx;
}
}
}
.topBox {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding: 22rpx 48rpx 34rpx 26rpx;
margin: 26rpx auto 0;
.title {
font-weight: bold;
font-size: 35rpx;
color: #000000;
}
.name {
font-weight: 500;
font-size: 25rpx;
color: #666666;
display: flex;
align-items: center;
margin-top: 35rpx;
image {
width: 23.33rpx;
height: 23.33rpx;
margin-right: 12rpx;
}
}
}
.content {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 42rpx auto 0;
padding: 36rpx 28rpx;
}
</style>

470
subPackages/order/detail.vue

@ -9,10 +9,10 @@
<!-- 待支付时会显示自动取消时间 -->
<view v-if="info.status=='WAIT_PAYMENT'" class="close-time">订单将在{{info.close_time.slice(-8)}}自动取消</view>
<!-- 待退款 -->
<view v-if="info.status=='WAIT_REFUND'" class="close-time">系统将在1-7个工作日内原路退回您的原支付账户</view>
<!-- 退款完成 -->
<view v-if="info.status=='REFUND_SUCCESS'" class="close-time">您的退款金额已退还到您的原支付账户</view>
</view>
@ -54,11 +54,11 @@
<view class="swiper-prompt">左右滑动核销其他二维码</view>
</view>
<!-- 子订单里info.order_child[0].goods_genre景点ticket酒店hotel美食food邮寄自提pgoods -->
<!-- 子订单里info.order_child[0].goods_genre景点ticket酒店hotel美食food邮寄自提pgoods线路line -->
<view :style="{margin: isQrcode ? '0' : '-66rpx auto 0'}" v-if="info.order_child">
<!-- 景点订单 -->
<view v-if="info.order_child[0].goods_genre == 'ticket'">
<view v-if="['ticket', 'line'].includes(info.order_child[0].goods_genre)">
<!-- 景点详情 -->
<view class="scenic-detail">
<view>
@ -100,231 +100,248 @@
</view>
</view>
<!-- 出行人 -->
<view class="novice-box" v-if="item.contact_name">
<!-- 景点出行人 -->
<view class="novice-box"
v-if="info.order_child[0].contact_name && info.order_child[0].goods_genre == 'ticket'">
出行人
<view v-for="(item,index) in info.order_child" :key="index" class="novice-item">
<view class="novice-title">{{item.specifications_name}}</view>
<view class="novice-subtitle">
<view class="novice-subtitle" v-if="item.contact_name">
<span>姓名</span>{{item.contact_name}}
</view>
<view class="novice-subtitle">
<view class="novice-subtitle" v-if="item.id_number">
<span>身份证</span>{{item.id_number}}
</view>
</view>
</view>
</view>
<!-- 邮寄自提订单 -->
<view v-if="info.order_child[0].goods_genre == 'pgoods'">
<view class="shipping-address" v-if="info.order_child[0].consignee_id">
收货地址
<view>{{info.order_child[0].consignee.name}} {{info.order_child[0].consignee.tel}}</view>
<view class="text-overflowRows">{{info.order_child[0].consignee.address}}</view>
<!-- 线路出行人 -->
<view class="novice-box" v-if="info.reserve_name && info.order_child[0].goods_genre == 'line'">
出行人
<view class="novice-item">
<view class="novice-subtitle" v-if="info.reserve_name">
<span>姓名</span>{{info.reserve_name}}
</view>
<view class="novice-subtitle" v-if="info.reserve_phone">
<span>手机号</span>{{info.reserve_phone}}
</view>
</view>
</view>
</view>
</view>
<!-- 产品详情 -->
<view class="pgoods-detail">
商家名称
<view class="pgoods-product" v-for="(item,index) in info.order_child" :key="index">
<image :src="showImg(item.specifications_image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column">
<view class="product-title">{{item.goods_title}}</view>
<view class="product-subtitle flex-between">
{{item.specifications_name}}
<span>x{{item.num}}</span>
</view>
<!-- 邮寄自提订单 -->
<view v-if="info.order_child[0].goods_genre == 'pgoods'">
<view class="shipping-address" v-if="info.order_child[0].consignee_id">
收货地址
<view>{{info.order_child[0].consignee.name}} {{info.order_child[0].consignee.tel}}</view>
<view class="text-overflowRows">{{info.order_child[0].consignee.address}}</view>
</view>
<!-- 产品详情 -->
<view class="pgoods-detail">
商家名称
<view class="pgoods-product" v-for="(item,index) in info.order_child" :key="index">
<image :src="showImg(item.specifications_image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column">
<view class="product-title">{{item.goods_title}}</view>
<view class="product-subtitle flex-between">
{{item.specifications_name}}
<span>x{{item.num}}</span>
</view>
</view>
</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
</view>
</view>
<!-- 自提信息 -->
<view class="pickup-box" v-if="info.order_child[0].contact_id && info.order_child[0].extract_id">
自提信息
<view class="pickup-user">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/user.png" class="picker-img">
</image>
<view>{{info.order_child[0].contact.name}}</view>
<view>{{info.order_child[0].contact.tel}}</view>
</view>
<view class="pickup-address">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/location.png" class="picker-img"
style="margin-top: 6rpx;"></image>
<!-- 自提信息 -->
<view class="pickup-box" v-if="info.order_child[0].contact_id && info.order_child[0].extract_id">
自提信息
<view class="pickup-user">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/user.png" class="picker-img">
</image>
<view>{{info.order_child[0].contact.name}}</view>
<view>{{info.order_child[0].contact.tel}}</view>
<view>
<view class="picker-shopName">{{info.order_child[0].extract.extract_name}}</view>
<view class="picker-shopAddress">{{info.order_child[0].extract.detail_addr}}</view>
</view>
<view class="pickup-address">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/location.png"
class="picker-img" style="margin-top: 6rpx;"></image>
<view>
<view class="picker-shopName">{{info.order_child[0].extract.extract_name}}</view>
<view class="picker-shopAddress">{{info.order_child[0].extract.detail_addr}}</view>
<view class="pickup-icon flex-center">
<view @click="clickPhone(info.order_child[0].extract.mobile)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png" mode="">
</image>
电话
</view>
<view class="pickup-icon flex-center">
<view @click="clickPhone(info.order_child[0].extract.mobile)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png" mode="">
</image>
电话
</view>
<view
@click="openLocation(info.order_child[0].extract.lat,info.order_child[0].extract.lon)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png"
mode=""></image>
导航
</view>
<view @click="openLocation(info.order_child[0].extract.lat,info.order_child[0].extract.lon)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png" mode="">
</image>
导航
</view>
</view>
</view>
</view>
</view>
<!-- 美食 -->
<view v-if="info.order_child[0].goods_genre == 'food'">
<view class="pgoods-detail">
购买信息
<view class="pgoods-product" style="border-bottom: none;">
<image :src="showImg(foodInfo.image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column">
<view class="product-title">{{foodInfo.title}}</view>
<view class="product-subtitle flex-between">
<view class="product-tags" v-if="foodInfo.specifications_new_tag">
<view v-for="(item,index) in foodInfo.specifications_new_tag.split(',').slice(0,3)"
:key="index">{{item}}</view>
</view>
<span>x{{info.order_child[0].num}}</span>
<!-- 美食 -->
<view v-if="info.order_child[0].goods_genre == 'food'">
<view class="pgoods-detail">
购买信息
<view class="pgoods-product" style="border-bottom: none;">
<image :src="showImg(foodInfo.image)" mode="aspectFill" class="product-img"></image>
<view class="product-content flex-column">
<view class="product-title">{{foodInfo.title}}</view>
<view class="product-subtitle flex-between">
<view class="product-tags" v-if="foodInfo.specifications_new_tag">
<view v-for="(item,index) in foodInfo.specifications_new_tag.split(',').slice(0,3)"
:key="index">{{item}}</view>
</view>
<span>x{{info.order_child[0].num}}</span>
</view>
</view>
<view class="food-name flex-between">
{{info.order_child[0].contact_name}}
<span>{{info.order_child[0].phone}}</span>
</view>
</view>
<view class="food-name flex-between">
{{info.order_child[0].contact_name}}
<span>{{info.order_child[0].phone}}</span>
</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
</view>
</view>
<view class="shop-detail">
商家信息
<view class="shop-name">店铺名称</view>
<view class="shop-info">
<view>
<view style="margin-top: 23rpx; display: flex;" v-if="info.order_child[0].goods_data.open_description">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/time.png"
class="shop-time"></image>
<view>
<view class="shop-title">营业时间</view>
<view class="shop-subtitle">{{info.order_child[0].goods_data.open_description}}</view>
</view>
<view class="shop-detail">
商家信息
<view class="shop-name">店铺名称</view>
<view class="shop-info">
<view>
<view style="margin-top: 23rpx; display: flex;"
v-if="info.order_child[0].goods_data.open_description">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/time.png"
class="shop-time"></image>
<view>
<view class="shop-title">营业时间</view>
<view class="shop-subtitle">{{info.order_child[0].goods_data.open_description}}</view>
</view>
</view>
</view>
<view>
<view class="flex-center" style="margin-top: 23rpx;">
<view style="display: flex;">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/location.png"
class="shop-time"></image>
<view style="width: 420rpx;">
<view class="shop-title text-overflow">
{{info.order_child[0].goods_data.address}}
</view>
<view class="shop-subtitle" v-if="info.order_child[0].goods_data.distance">
距您约{{info.order_child[0].goods_data.distance > 1000 ? (info.order_child[0].goods_data.distance / 1000).toFixed(2) + 'km' : info.order_child[0].goods_data.distance + 'm'}}
</view>
<view>
<view class="flex-center" style="margin-top: 23rpx;">
<view style="display: flex;">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/location.png"
class="shop-time"></image>
<view style="width: 420rpx;">
<view class="shop-title text-overflow">
{{info.order_child[0].goods_data.address}}
</view>
<view class="shop-subtitle" v-if="info.order_child[0].goods_data.distance">
距您约{{info.order_child[0].goods_data.distance > 1000 ? (info.order_child[0].goods_data.distance / 1000).toFixed(2) + 'km' : info.order_child[0].goods_data.distance + 'm'}}
</view>
</view>
</view>
<view class="shop-icon">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png"
@click="clickPhone(info.order_child[0].goods_data.tel)"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png"
@click="openLocation(info.order_child[0].goods_data.tengxun_map.lat,info.order_child[0].goods_data.tengxun_map.lon)"></image>
</view>
<view class="shop-icon">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/phone.png"
@click="clickPhone(info.order_child[0].goods_data.tel)"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigations.png"
@click="openLocation(info.order_child[0].goods_data.tengxun_map.lat,info.order_child[0].goods_data.tengxun_map.lon)">
</image>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 酒店 -->
<view v-if="info.order_child[0].goods_genre == 'hotel'">
<view class="hotel-detail">
入住信息
<view class="hotel-title">{{info.order_child[0].goods_title}}</view>
<!-- 酒店 -->
<view v-if="info.order_child[0].goods_genre == 'hotel'">
<view class="hotel-detail">
入住信息
<view class="hotel-title">{{info.order_child[0].goods_title}}</view>
<view class="hotel-date">
<view>
{{(info.order_child[0].start_date).slice(5)}}
<span>{{ShowDateDay(new Date(info.order_child[0].start_date).getDay())}}入住</span>
</view>
<view class="hotel-days">{{calDate(info.order_child[0].start_date, info.order_child[0].end_date)}}</view>
<view class="use-date">
{{info.order_child[0].end_date.slice(5)}}
<span>{{ShowDateDay(new Date(info.order_child[0].end_date).getDay())}}离店</span>
</view>
<view class="hotel-date">
<view>
{{(info.order_child[0].start_date).slice(5)}}
<span>{{ShowDateDay(new Date(info.order_child[0].start_date).getDay())}}入住</span>
</view>
<view class="flex-between" style="margin-top: 30rpx;">
<view class="hotel-address flex-between">
<view class="address text-overflowRows">{{info.order_child[0].scenic_data.address}}</view>
<view class="address-image" @click="openLocation(info.order_child[0].scenic_data.tengxun_map.lat,info.order_child[0].scenic_data.tengxun_map.lon)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigation.png"></image>
<view>地图</view>
</view>
</view>
<view class="hotel-phone flex-center" @click="clickPhone(info.order_child[0].scenic_data.tel)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/hotelPhone.png"></image>
<view>电话</view>
</view>
<view class="hotel-days">{{calDate(info.order_child[0].start_date, info.order_child[0].end_date)}}
</view>
<view class="hotel-skuName flex-between">
<view class="text-overflow">{{info.order_child[0].specifications_name}}</view>
<view class="flex-between">
<view>{{info.order_child[0].money / 100}}</view>
<view>x{{info.order_child[0].num}}</view>
</view>
<view class="use-date">
{{info.order_child[0].end_date.slice(5)}}
<span>{{ShowDateDay(new Date(info.order_child[0].end_date).getDay())}}离店</span>
</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
<view class="flex-between" style="margin-top: 30rpx;">
<view class="hotel-address flex-between">
<view class="address text-overflowRows">{{info.order_child[0].scenic_data.address}}</view>
<view class="address-image"
@click="openLocation(info.order_child[0].scenic_data.tengxun_map.lat,info.order_child[0].scenic_data.tengxun_map.lon)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/navigation.png"></image>
<view>地图</view>
</view>
</view>
<view class="hotel-phone flex-center" @click="clickPhone(info.order_child[0].scenic_data.tel)">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/hotelPhone.png"></image>
<view>电话</view>
</view>
</view>
<view class="hotel-skuName flex-between">
<view class="text-overflow">{{info.order_child[0].specifications_name}}</view>
<view class="flex-between">
<view>{{info.order_child[0].money / 100}}</view>
<view>x{{info.order_child[0].num}}</view>
</view>
</view>
<view class="hotel-information">
预订信息
<view><span>房间数</span>{{info.order_child[0].num}}</view>
<view><span>入住姓名</span>{{info.reserve_name}}</view>
<view><span>联系电话</span>{{info.reserve_phone}}</view>
<!-- 商品价格 -->
<view class="public-price">
<view class="flex-between">
商品总额<span>{{info.money / 100}}</span>
</view>
<view class="flex-between" v-if="info.discounts">
优惠券<span>-{{info.discounts / 100}}</span>
</view>
<view class="flex-between">
实付金额<span style="font-size: 35rpx;color: #EE3E3B;">{{info.pay_money / 100}}</span>
</view>
</view>
</view>
<view class="hotel-information">
预订信息
<view><span>房间数</span>{{info.order_child[0].num}}</view>
<view><span>入住姓名</span>{{info.reserve_name}}</view>
<view><span>联系电话</span>{{info.reserve_phone}}</view>
</view>
</view>
<!-- 订单信息 -->
@ -333,7 +350,7 @@
<view class="order-subtitle" style="display: flex;align-items: center;">
<span>订单账号</span>{{info.order_id}}
<view class="copy flex-around" @click="clickCopy">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/copy.png" class="copy-img"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/order/copy.png" class="copy-img"></image>
复制
</view>
</view>
@ -347,7 +364,7 @@
<!-- 联系客服 -->
<view class="kefu-box" @click="$refs.popup.open()">
<image src="https://static.ticket.sz-trip.com/yandu/images/order/kefu.png" mode="" class="kefu-img"></image>
<image src="https://static.ticket.sz-trip.com/tongli/images/order/kefu.png" mode="" class="kefu-img"></image>
联系客服
</view>
@ -375,17 +392,19 @@
<view class="btn pay-btn" v-if="info.status == 'WAIT_PAYMENT'" @click="setOrderId(info.order_id)">
立即支付
</view>
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'" @click="openMask()">
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'"
@click="openMask()">
快递查询
</view>
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'" @click="confirmGoods()">
<view class="btn" v-if="info.status == 'POST' && info.order_child[0].goods_genre == 'pgoods'"
@click="confirmGoods()">
确认收货
</view>
</view>
</footer>
<!-- 快递详情 -->
<view class="mask" v-if="maskShow">
<view class="mask-bg" @click="maskShow = false"></view>
@ -405,7 +424,7 @@
</view>
</view>
</view>
<!-- 客服弹框 -->
<uni-popup ref="popup" type="center">
<view class="consult-popup">
@ -472,8 +491,9 @@
})
}
//
if (['ticket', 'food'].includes(this.info.order_child[0].goods_genre) || (this.info.order_child[0].contact_id && this.info.order_child[0].extract_id)) {
// 线
if (['ticket', 'food', 'line'].includes(this.info.order_child[0].goods_genre) || (this.info
.order_child[0].contact_id && this.info.order_child[0].extract_id)) {
if (['PAYMENT_SUCCESSFULLY', 'WAIT_REFUND', 'REFUND_SUCCESS', 'WAIT_COMMENT', 'COMPLETED']
.includes(this.info.status)) {
this.isQrcode = true
@ -542,7 +562,7 @@
},
//
gotoDetail() {
// info.order_child[0].goods_genretickethotelfoodpgoods
// info.order_child[0].goods_genretickethotelfoodpgoods线line
let url = ''
switch (this.info.order_child[0].goods_genre) {
case 'ticket':
@ -557,6 +577,9 @@
case 'pgoods':
url = '/subPackages/techan/detail?id=' + this.info.order_child[0].goods_id
break;
case 'line':
url = '/subPackages/line/detail?id=' + this.info.order_child[0].goods_id
break;
default:
break;
}
@ -652,10 +675,10 @@
this.Post({
child_order_id: this.info.order_child[0].child_id
}, '/api/order/getExpress').then(res => {
if (res.data.length > 0){
if (res.data.length > 0) {
this.postInfo = res.data.reverse()
this.maskShow = true
}else {
} else {
uni.showToast({
title: '暂未查询到物流信息,请联系客服',
icon: 'none'
@ -1100,7 +1123,7 @@
color: #000000;
margin-bottom: 40rpx;
}
.shop-detail {
width: 697rpx;
height: auto;
@ -1198,7 +1221,7 @@
font-size: 24rpx;
color: #000000;
}
.hotel-address {
width: 533rpx;
height: 107rpx;
@ -1207,27 +1230,27 @@
background-color: #E8F6EB;
border-radius: 20rpx;
padding: 22rpx 18rpx;
.address {
width: 398rpx;
font-weight: 500;
font-size: 27rpx;
color: #000000;
}
.address-image {
font-weight: 500;
font-size: 24rpx;
color: #333333;
text-align: center;
image {
width: 30.67rpx;
height: 30.67rpx;
}
}
}
.hotel-phone {
width: 93rpx;
height: 107rpx;
@ -1237,14 +1260,14 @@
font-size: 24rpx;
color: #333333;
flex-direction: column;
image {
width: 30.67rpx;
height: 30.67rpx;
margin-bottom: 8rpx;
}
}
.hotel-skuName {
font-weight: 500;
font-size: 27rpx;
@ -1253,17 +1276,17 @@
border-top: 1rpx solid #D8D8D8;
border-bottom: 1rpx solid #D8D8D8;
margin-top: 34rpx;
&>view:first-child {
width: 400rpx;
}
&>view:last-child {
width: 140rpx;
}
}
}
.hotel-information {
width: 697rpx;
height: auto;
@ -1274,13 +1297,13 @@
font-weight: bold;
font-size: 36rpx;
color: #000000;
view {
font-weight: 500;
font-size: 27rpx;
margin-top: 30rpx;
}
span {
display: inline-block;
width: 140rpx;
@ -1335,10 +1358,10 @@
width: 93rpx;
height: 37rpx;
border-radius: 11rpx;
border: 1rpx solid #71B580;
border: 1rpx solid #248BAA;
font-weight: 500;
font-size: 22rpx;
color: #71B580;
color: #248BAA;
margin-left: 30rpx;
.copy-img {
@ -1426,7 +1449,7 @@
}
}
}
//
.mask {
position: fixed;
@ -1440,7 +1463,7 @@
align-items: flex-end;
justify-content: center;
}
.mask-bg {
position: fixed;
left: 0;
@ -1448,7 +1471,7 @@
top: 0;
bottom: 0;
}
.mask-content {
width: 100%;
padding: 28rpx 0;
@ -1458,13 +1481,13 @@
position: relative;
overflow-y: auto;
}
.mask-content .icon-close {
position: absolute;
right: 20rpx;
top: 20rpx;
}
.mask-content .close-btn {
background-image: url("https://static.ticket.sz-trip.com/taizhou/images/close.png");
width: 80rpx;
@ -1475,24 +1498,24 @@
right: 0;
margin: auto;
}
.mask-title {
font-size: 36rpx;
font-weight: bold;
padding-left: 37rpx;
}
.mask-content .iconfont {
position: absolute;
right: 30rpx;
top: 20rpx;
}
.express-all {
margin: 40rpx;
position: relative;
}
.express-item {
display: flex;
justify-content: space-between;
@ -1500,8 +1523,8 @@
position: relative;
z-index: 1;
}
.line {
width: 1rpx;
height: 100%;
@ -1509,24 +1532,24 @@
position: absolute;
left: 13rpx;
}
.express-info {
width: 600rpx;
font-size: 26rpx;
line-height: 40rpx;
color: #999;
}
.express-info.active {
color: #000;
}
.express-time {
font-size: 22rpx;
color: #666;
margin-top: 10rpx;
}
.express-item-icon {
width: 27rpx;
height: 27rpx;
@ -1534,11 +1557,11 @@
border-radius: 50%;
position: relative;
}
.express-item-icons {
background: #71B580;
}
.consult-popup {
width: 487rpx;
height: 367rpx;
@ -1549,18 +1572,18 @@
font-size: 32rpx;
color: #000000;
text-align: center;
.consult-subtitle {
font-weight: 500;
font-size: 27rpx;
color: #333333;
margin-top: 43rpx;
}
.consult-btns {
display: flex;
margin-top: 75rpx;
view {
width: 50%;
font-weight: bold;
@ -1568,6 +1591,7 @@
color: #71B580;
line-height: 54rpx;
}
view:first-child {
border-right: 1rpx solid #D8D8D8;
color: #000000;

147
subPackages/user/getCoupon.vue

@ -0,0 +1,147 @@
<template>
<view class="bg">
<view class="topLeft flex-center">
<span class="iconfont" @click="goBack">&#xe660;</span>
</view>
<img :src="showImg(headImg)" class="topImg" />
<view v-for="(item,index) in list" :key="index" class="item">
<view class="item-left">
<view>{{item.discounts / 100}}</view>
<view>{{item.min_limit / 100}}可用</view>
</view>
<view class="item-right flex-column">
<view>{{item.discounts / 100}}元优惠券</view>
<view class="subtitle text-overflow">有效期{{item.open_time.slice(0,10)}}-{{item.end_time.slice(0,10)}}</view>
<view class="flex-between">
<view class="subtitle" @click="note = item.note;$refs.popupRule.open()">使用规则 ></view>
<view class="btn" @click="getCoupon(item.id)">立即领取</view>
</view>
</view>
</view>
<uni-popup ref="popupRule" type="center">
<view class="rule-box" >
{{note}}
</view>
</uni-popup>
</view>
</template>
<script>
export default {
data() {
return {
list:[],
headImg: '',
note: ''
}
},
onReady() {
this.getHeadImg('line').then(res => {this.headImg = res})
},
onShow() {
this.getList()
},
methods: {
getList() {
this.Post({
tag_id: 2
},'/api/coupon/getTagCouponActList').then(res => {
this.list = res.data
})
},
//
getCoupon(id) {
this.Post({
ids: id
},'/api/coupon/getCouponsByActivityIds').then(res => {
if(res.code == 1) {
uni.showToast({
title: '优惠券领取成功!',
icon: 'none'
});
}
})
}
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
background: #FFFFFF;
padding-bottom: 200rpx;
}
.topImg {
width: 100%;
height: 440rpx;
}
.item {
width: 696.67rpx;
height: 200rpx;
background-image: url('https://static.ticket.sz-trip.com/tongli/images/index/couponBg.png');
background-size: 100% 100%;
margin: 27rpx auto 0;
padding: 0 20rpx 0 50rpx;
display: flex;
justify-content: space-between;
.item-left {
padding: 45rpx 0 29rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
font-weight: 500;
font-size: 27rpx;
color: #FFFFFF;
text-align: center;
&>view:first-child {
font-weight: bold;
font-size: 57rpx;
color: #FFFFFF;
}
&>view:first-child::before {
font-size: 32rpx;
content: '¥';
}
}
.item-right {
width: 410rpx;
height: 200rpx;
padding: 25rpx 0 20rpx;
font-weight: bold;
font-size: 32rpx;
color: #111111;
justify-content: space-between;
.subtitle {
font-weight: 400;
font-size: 25rpx;
color: #333333;
}
.btn {
width: 140rpx;
line-height: 51rpx;
background: linear-gradient(0deg, #FC5109, #FC930A);
border-radius: 25rpx;
text-align: center;
font-weight: 500;
font-size: 27rpx;
color: #FFFFFF;
}
}
}
.rule-box {
width: 70vw;
padding: 20rpx;
background-color: #fff;
}
</style>

59
subPackages/video/video.vue

@ -0,0 +1,59 @@
<template>
<view class="bg">
<video :src="showImg(src)" controls class="myVideo" :poster="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