时味苏州
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

977 lines
22 KiB

<template>
<view class="bg bg-padding">
<view class="topBox" >
<!-- <image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/topIcon.png" class="topIcon"></image> -->
<view class="flex-between w-full" style="padding-right: 13rpx;" @click="gotoProfile">
<view class="flex-center" style="position: relative;">
<view class="avatar-box">
<image :src="showImg(userInfo.avatar)" mode="aspectFill" class="headImg" v-if="userInfo.avatar"></image>
<image src="https://static.ticket.sz-trip.com/yandu/images/user/grxx.png" mode="aspectFill"
class="headImg" v-else></image>
</view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view>
</view>
<view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</view>
</view>
<view class="orderBox">
<view class="points-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/e0bd2f24b25ad41d78524d567797408f.png"></image>
<view class="flex-1 w-1rpx">可用积分<text class="points-num">{{userInfo.score||0}}</text></view>
<view class="points-btn" @click="gotoPath('/subPackages/pointsMall/index')">兑换商品</view>
</view>
<view class="my-order">
<navigator :url="'/subPackages/order/trades'" class="moreBox flex-between">
我的订单
<span class="flex-between">
全部订单
<image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>
</span>
</navigator>
<view class="flex-around" style="margin-top: 20rpx;flex-wrap: wrap;justify-content: flex-start;">
<view class="orderItem" v-for="(item,index) in orderList" :key="index" @click="goTrades(item)">
<img :src="item.src" alt="">
<view>{{item.title}}</view>
</view>
</view>
<!-- 待付款轮播 -->
<!-- <swiper class="my-swipe" :autoplay="3000" indicator-color="white" v-if="dfkList && dfkList.length>0" circular>
<swiper-item v-for="(item,index) in dfkList" :key="item.id">
<div class="dfkBox" @click="goToOrderDetail(item)">
<image :src="showImg(item.order_child[0].specifications_image)" mode="aspectFill"></image>
<div class="contentBox">
<div style="width:300rpx;">
<div style="font-size: 27rpx;margin-bottom: 10rpx;">等待付款 </div>
<div style="display: flex;color: #8A8A8A;font-size: 27rpx;">剩余时间:<uni-countdown class="countdown" @timeup="timeup(index)" :show-day="false" :hour="differTimeList[index].slice(0,2)" :minute="differTimeList[index].slice(3,5)" :second="differTimeList[index].slice(6,8)"/></div>
</div>
<div class="orderBtn" @click.stop="setOrderId(item.order_id)">去支付</div>
</div>
</div>
</swiper-item>
</swiper> -->
</view>
</view>
</view>
<view class="cygj">
<view v-for="(item,index) in cyList" :key="index"
@click="gotoUrl(item,index)" v-if="item.isShow">
<!-- <button id="contact" class="cyItem flex-between" open-type="contact" bindcontact="handleContact" session-from="sessionFrom" v-if="index == 2">
<view class="flex-center">
<img src="https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png" class="headIcon">
联系我们
</view>
<img src="https://static.ticket.sz-trip.com/dongtai/images/user/rightIcon-gray.png" class="rightIcon">
</button> -->
<view class="cyItem flex-between">
<view class="flex-center">
<img :src="item.src" class="headIcon">
{{item.title}}
</view>
<img src="https://static.ticket.sz-trip.com/yandu/images/user/rightIcon-gray.png" class="rightIcon">
</view>
</view>
</view>
<!-- 用户推荐 -->
<view class="recommend-box" v-if="hotList.length>0">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/83982f331fb3ee8b084c313645dcabe1.png" mode="aspectFill" class="rmtj-img" ></image>
<view class="new-hot-box hot-box" >
<view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)">
<image :src="item.headimg" mode="aspectFill"></image>
<view class="hot-content">
<view class="title text-overflowRows">{{item.title}}</view>
<view class="price">{{item.price / 100}}</view>
</view>
</view>
</view>
</view>
<!-- 旅游咨询弹框 -->
<uni-popup ref="popup" type="center">
<view class="consult-popup">
即将拨打客服电话
<view class="consult-subtitle">服务时间:周一至周五<br>8:30-11:30,14:30-18:00</view>
<view class="consult-btns">
<view @click="$refs.popup.close()">取消</view>
<view @click="clickPhone('0515-69186109')">确定</view>
</view>
</view>
</uni-popup>
<uni-popup ref="kfpopup" type="bottom" :safe-area="false">
<view class="kf-popup-content">
<!-- 标题栏 -->
<view class="popup-header">
<text class="title">联系我们</text>
<text class="close-icon" @click="$refs.kfpopup.close()">×</text>
</view>
<!-- 内容区域 -->
<view class="popup-body">
<!-- 电话咨询 -->
<view class="contact-item" @click="clickPhone('0512-80822586')">
<view class="info">
<text class="label">电话咨询</text>
<text class="detail">0512-80822586</text>
</view>
<view class="arrow">
<image style="width: 100%;height: 100%;" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250911/a58432ad47582207f9f03ac31a6e2d98.png"></image>
</view>
</view>
<!-- 在线客服 -->
<button class="concat-btn" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="contact-item">
<view class="info">
<text class="label">在线客服</text>
<text class="detail">工作时间: 9:00-18:00</text>
</view>
<view class="arrow">
<image style="width: 100%;height: 100%;" mode="aspectFill" src="https://static.ticket.sz-trip.com/uploads/20250911/11761e83954ecb845a8c9ea26e95c6e0.png"></image>
</view>
</view>
</button>
</view>
</view>
</uni-popup>
<CustomTabBar :currentTab="4" />
</view>
</template>
<script>
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {
CustomTabBar
},
data() {
return {
dfkList: [],
differTimeList: [],
nowDateTime: '', //当前时间秒数
userInfo: {},
orderList: [{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfki.png',
title: '待付款',
status: 'WAIT_PAYMENT'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dfh.png',
title: '待发货',
status: 'WAIT_POST'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dcx.png',
title: '待使用/出行',
status: 'WAIT_USE'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/dsh.png',
title: '待收货',
status: 'WAIT_DELIVERY'
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/tksh.png',
title: '退款/售后',
status: 'NEED_REFUND'
},
],
cyList: [
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhq.png',
title: '优惠券',
path: '/subPackages/user/coupon',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/cxr.png',
title: '出行人',
path: '/subPackages/user/travelerList?showType=0',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/lxkf.png',
title: '联系我们',
path: '',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shdz.png',
title: '收货地址',
path: '/subPackages/user/travelerList?showType=1',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/shhx.png',
title: '商户核销',
path: '',
isShow: true,
webUrl: "https://supplier-h5.sutenong.com",
},
{
src: 'https://static.ticket.sz-trip.com/uploads/20250922/0bfef414c1349797436a78663aac75a3.png',
title: '企业采购核销兑换',
path: '/subPackages/rewards/index',
isShow: true,
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhxy.png',
title: '用户协议',
path: '/subPackages/user/privacyInfo?id=9',
isShow: true
},
{
src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yszc.png',
title: '隐私管理',
path: '/subPackages/user/privacyInfo?id=12',
isShow: true
}
],
hotList: [],
}
},
onReady () {
this.getHotList()
},
onShow() {
// 根据token获取个人信息
// this.Post({
// token: ''
// },'/api/uservice/user/getMyInfo').then(res => {
// this.$store.commit('changeUserInfo', res.data);
// })
this.Post({}, "/api/uservice/user/getMyInfo").then(res => {
if (res.data) {
let info = res.data;
info.token = JSON.parse(uni.getStorageSync('userInfo')).token || this.$store.state.user.userInfo.token
this.$store.commit('changeUserInfo', info)
this.userInfo = info
uni.setStorageSync('isFlag', true)
}
console.log(this.userInfo)
})
// this.dfkList = []
// this.nowDateTime = parseInt(new Date().getTime() / 1000)
// this.Post({}, "/api/user/userInfo").then((res) => {
// if (res.data) {
// this.userInfo = res.data;
// // this.getDfk()
// // 是否展示商户核销
// this.Post({},'/api/merchants/is_merchant').then(res => {
// this.cyList[6].isShow = res.data
// })
// }
// });
},
// 导航栏点击事件
onTabItemTap() {
this.qdTracker('navButtonClick', {buttonName: '我的', buttonSort: '3'})
},
methods: {
// 个人信息或登录
gotoProfile() {
// 有token去个人信息,没有去登录
if(this.userInfo.token) {
uni.navigateTo({
url: '/subPackages/user/profile'
})
}else {
uni.navigateTo({
url: '/pages/login/login'
})
}
},
timeup(index) {
// return this.dfkList.splice(index,1)
},
setOrderId(id) {
let that = this;
that.orderId = id;
that.Post({
order_id: id,
pay_method: 'WEIXIN',
pay_platform: "MINI",
},
'/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
});
}
});
},
// 待付款
getDfk() {
this.differTimeList = []
let params = {
offset: this.dfkList.length,
limit: 10,
status: 'WAIT_PAYMENT',
}
this.Post(params, '/api/order/orderList').then(res => {
this.isLoading = false
if (res) {
this.dfkList = [...this.dfkList, ...res.data]
this.dfkList.forEach(item => {
// 获取时间差,订单关闭时间-当前时间,若存在即展示倒计时differTimeList
let del;
if (moment(item.close_time).diff(moment()) > 0) {
del = moment.utc(moment(item.close_time).diff(moment())).format('HH:mm:ss')
} else {
del = '00:00:00'
}
this.differTimeList.push(del)
})
console.log(this.differTimeList);
console.log('this.differTimeList:' + this.differTimeList[0].slice(0, 2))
}
})
},
goToOrderDetail(item) {
uni.navigateTo({
url: '/subPackages/order/detail?id=' + item.order_id
});
},
getChild(list) {
let arr = []
for (let i = 0; i < list.length; i++) {
if (list[i].product_model == "ticket") {
console.log(list[i]);
arr.push(list[i])
break
}
}
console.log(arr);
if (arr.length > 0) {
return arr[0]
} else {
return list[0]
}
},
goCoupon() {
uni.navigateTo({
url: "/subPackages/user/coupon",
});
},
goKeFu() {
uni.navigateTo({
url: "/subPackages/publicservices/ServiceOnline",
});
},
// open(){
// this.$refs.popup.open('center')
// },
gotoUrl(item, index) {
if (index == 2) {
this.$refs.kfpopup.open()
return;
}
if (index == 4) {
uni.navigateTo({
url:'/subPackages/webPage/webPage?url='+item.webUrl
})
return
}
uni.navigateTo({
url: item.path
})
},
qidai() {
uni.showToast({
title: '功能建设中...',
icon: 'none'
})
},
goTrades(item) {
if (item) {
uni.navigateTo({
url: "/subPackages/order/trades?type=" + item.title,
});
} else {
uni.navigateTo({
url: "/subPackages/order/trades",
});
}
},
//判断是否关注公众号
isGz(item) {
this.$refs.pop.openPop(
'https://yjks.oss-cn-shanghai.aliyuncs.com/uploads/20230517/db9eb60e0abfea8be1075b406fefe551.jpg');
// this.Post({}, '/api/wechat/getSubcribeInfo').then(res => {
// if (res.data) {
// uni.navigateTo({
// url:'/subPackages/webPage/webPage?url='+'https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzU2NjQwNTYxNg==#wechat_redirect'
// })
// } else {
// console.log(this.$refs.pop);
// }
// });
},
getHotList() {
this.Post({
tag_id: this.envPropObj.use_recommend_tag_id,
offset: this.hotList.length,
limit: 4,
order: "sales_number"
},'/api/product/get_product_by_tag').then(res => {
this.hotList = res.data.list || []
})
},
}
}
</script>
<style scoped lang="scss">
::v-deep .uni-countdown {
font-size: 20px !important;
::v-deep .uni-countdown__splitor {
font-size: 20px !important;
}
}
.bg {
min-height: 100vh;
overflow-x: hidden;
background-color: #EDF5DC;
}
.topBox {
width: 750rpx;
height: fit-content;
box-sizing: border-box;
background-image: url('https://static.ticket.sz-trip.com/uploads/20250917/ac38f61a85632aa2d946c08a9e76e109.png');
background-size: 100% 100%;
padding: 210rpx 26.5rpx 0rpx 26.5rpx;
position: relative;
.topIcon {
width: 734.67rpx;
height: 538rpx;
position: absolute;
top: 0;
right: 0;
}
.avatar-box {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
overflow: hidden;
background: #FFFFFF;
}
.headImg {
width: 100%;
height: 100%;
}
.username {
margin-left: 20rpx;
font-size: 40rpx;
color: #000000;
}
.top-right {
font-weight: 500;
font-size: 25rpx;
color: #100E0E;
image {
width: 11.33rpx;
height: 20rpx;
margin-left: 18rpx;
}
}
}
.points-box{
width: 100%;
height: 133rpx;
background: linear-gradient(90deg, #FCE2C1, #F0BD90);
border-radius: 20rpx;
padding: 18rpx 26rpx 72rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
display: flex;
align-items: center;
image{
width: 24.67rpx;
height: 26.67rpx;
flex-shrink: 0;
}
.flex-1{
padding: 0 12rpx;
margin-top: -8rpx;
display: flex;
align-items: baseline;
}
.points-num{
font-weight: 500;
font-size: 32rpx;
color: #000000;
}
.points-btn{
width: 133rpx;
height: 43rpx;
background: #FCE2C1;
border-radius: 21rpx;
font-weight: 500;
font-size: 25rpx;
color: #6E3D1D;
text-align: center;
line-height: 43rpx;
}
}
.my-order{
width: 100%;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: -53rpx;
height: 266rpx;
}
.orderBox {
width: 100%;
// background: #FFFFFF;
// box-shadow: 0rpx 0rpx 23rpx 0rpx rgba(80, 80, 80, 0.12);
border-radius: 13rpx;
margin: 30rpx auto 0;
position: relative;
.moreBox {
height: 84rpx;
margin: auto;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
padding: 0 13rpx 0 26rpx;
span {
font-weight: 500;
font-size: 25rpx;
color: #100E0E;
box-sizing: border-box;
image {
width: 11.33rpx;
height: 20rpx;
margin-left: 18rpx;
}
}
}
.orderItem {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
color: #111111;
width: 20%;
text-align: center;
img {
width: 62rpx;
height: 62rpx;
margin-bottom: 20rpx;
}
}
.orderItem:nth-child(n+6) {
margin-top: 28rpx;
}
}
.lxwm {
width: 696rpx;
height: 447rpx;
background: #FFFFFF;
box-shadow: 0px 4rpx 12rpx 0px rgba(150, 149, 149, 0.3);
border-radius: 20rpx;
margin: auto;
padding: 27rpx 19rpx 0 19rpx;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
.midBox {
padding: 26rpx 43rpx 21rpx 44rpx;
box-sizing: border-box;
img {
width: 265rpx;
height: 252rpx;
border-radius: 15rpx;
}
}
.botBox {
padding: 0 30rpx 0 51rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
}
.cygj {
width: 697rpx;
background: #FFFFFF;
border-radius: 20rpx;
margin: 30rpx auto 0;
padding: 0 27rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
.cyItem {
height: 106rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #D8D8D8;
.headIcon {
width: 42rpx;
height: 42rpx;
margin-right: 15rpx;
}
.rightIcon {
width: 20rpx;
height: 20rpx;
}
}
.cyItem:last-child {
border: none;
}
}
.my-swipe {
// width: 100%;
margin: 0 30rpx;
margin-top: 37.3rpx;
}
swiper {
height: 111rpx !important;
}
.dfkBox {
width: 100%;
height: 111rpx;
background: #F7F7F7;
margin: 0 auto 30.64rpx;
// padding: 0.25rem;
display: flex;
}
.dfkBox image {
width: 137rpx;
height: 111rpx;
border-radius: 13rpx;
flex-shrink: 0;
// margin-right: 16.7rpx;
}
.dfkBox .contentBox {
padding-left: 5rpx;
padding-right: 5rpx;
height: 111rpx;
width: 100%;
display: flex;
justify-content: space-around;
align-items: center;
}
// .van-count-down{
// font-size: 0.39rem;
// font-family: PingFang SC;
// font-weight: 400;
// color: #FB6E4D;
// }
.orderBtn {
width: 152rpx;
height: 56rpx;
background: linear-gradient(270deg, #FC5109, #FDC43A);
;
border-radius: 28rpx;
text-align: center;
line-height: 56rpx;
font-size: 27rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
// margin-left: 50rpx;
// margin-right: 20rpx;
}
#contact {
-webkit-tap-highlight-color: transparent;
background-color: rgba(0, 0, 0, 0);
border-radius: 0;
box-sizing: border-box;
color: transparent;
cursor: pointer;
overflow: hidden;
padding: 0;
position: relative;
text-align: center;
text-decoration: none;
border: transparent 0px solid;
display: flex;
align-items: center;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #000000;
}
button::after {
border: none;
background-color: rgba(0, 0, 0, 0);
}
.more {
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, .5);
position: fixed;
top: 0;
left: 0;
display: flex;
flex-direction: column;
justify-content: space-around;
align-items: center;
image {
width: 646rpx;
height: 959rpx;
}
img {
width: 80rpx;
height: 80rpx;
}
}
.consult-popup {
width: 487rpx;
height: 367rpx;
background: #F0F0F0;
border-radius: 20rpx;
padding: 65rpx 0 23rpx;
font-weight: bold;
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;
font-size: 32rpx;
color: #71B580;
line-height: 54rpx;
}
view:first-child {
border-right: 1rpx solid #D8D8D8;
color: #000000;
}
}
}
/* 弹窗内容容器 */
.kf-popup-content {
width: 100%;
background-color: #fff;
border-top-left-radius: 16px;
border-top-right-radius: 16px;
overflow: hidden;
.popup-header {
display: flex;
justify-content: center;
align-items: center;
padding: 16px;
position: relative;
border-bottom: 1px solid #f5f5f5;
}
.title {
font-size: 18px;
font-weight: bold;
}
.close-icon {
position: absolute;
right: 16px;
font-size: 20px;
color: #999;
}
/* 弹窗内容区 */
.popup-body {
padding: 10px 0;
}
/* 联系项样式 */
.contact-item {
display: flex;
align-items: center;
padding: 16px 20px;
border-bottom: 1px solid #f5f5f5;
}
.info {
flex: 1;
}
.label {
font-size: 16px;
display: block;
margin-bottom: 4px;
}
.detail {
font-size: 14px;
color: #666;
}
.arrow {
width: 20px;
height: 20px;
color: #ccc;
font-size: 18px;
}
}
.concat-btn{
/* 清除默认背景和边框 */
background: none;
border: none;
padding: 0;
margin: 0;
/* 清除默认圆角 */
border-radius: 0;
/* 清除默认文字样式 */
color: inherit;
font-size: inherit;
line-height: inherit;
/* 清除点击效果灰色背景 */
-webkit-tap-highlight-color: transparent;
text-align: left;
}
.recommend-box{
width: 100%;
padding: 66rpx 26.5rpx 0;
.rmtj-img{
width: 222rpx;
height: 31.33rpx;
display: block;
margin: 0 auto;
}
.hot-box {
margin-top: 40rpx;
display: flex;
justify-content: space-between;
&.new-hot-box{
flex-wrap: wrap;
.hot-adv{
width: 340rpx;
height: 490rpx;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 16rpx;
}
}
.hot-item {
width: 334rpx;
height: 497rpx;
background: #FFFFFF;
border-radius: 20rpx;
overflow: hidden;
margin-bottom: 26rpx;
image {
width: 334.67rpx;
height: 342rpx;
}
.hot-content {
height: 155rpx;
padding: 6rpx 12rpx 20rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
.title {
font-weight: 500;
font-size: 29rpx;
color: #000000;
}
.price {
font-weight: 500;
font-size: 33rpx;
color: #C3282E;
margin-top: 15rpx;
&:before{
content:"";
font-size: 29rpx;
}
&:after{
content:"";
font-size: 29rpx;
color: #999999;
}
}
}
}
}
}
</style>