Browse Source

积分商城

dev_delivery
jiazhipeng 4 weeks ago
parent
commit
53a98443a6
  1. 24
      pages.json
  2. 32
      pages/user/user.vue
  3. 11
      static/js/CommonFunction.js
  4. 4
      subPackages/order/orderDetail.vue
  5. 34
      subPackages/pointsMall/detail.vue
  6. 146
      subPackages/pointsMall/index.vue
  7. 6
      subPackages/pointsMall/order.vue
  8. 277
      subPackages/pointsMall/record.vue
  9. 133
      subPackages/pointsMall/searchResult.vue
  10. 90
      subPackages/rewards/exchange.vue
  11. 199
      subPackages/rewards/index.vue
  12. 844
      subPackages/rewards/order.vue
  13. 14
      subPackages/search/result.vue

24
pages.json

@ -403,6 +403,30 @@
"style" : { "style" : {
"navigationBarTitleText" : "下单" "navigationBarTitleText" : "下单"
} }
},
{
"path" : "pointsMall/record",
"style" : {
"navigationBarTitleText" : "积分明细"
}
},
{
"path" : "rewards/index",
"style" : {
"navigationBarTitleText" : "企业福利-使用中心"
}
},
{
"path" : "rewards/order",
"style" : {
"navigationBarTitleText" : "企业福利-使用中心"
}
},
{
"path" : "rewards/exchange",
"style" : {
"navigationBarTitleText" : "企业福利-使用中心"
}
} }
] ]

32
pages/user/user.vue

@ -20,7 +20,7 @@
<view class="orderBox"> <view class="orderBox">
<view class="points-box"> <view class="points-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250917/e0bd2f24b25ad41d78524d567797408f.png"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250917/e0bd2f24b25ad41d78524d567797408f.png"></image>
<view class="flex-1 w-1rpx">可用积分<text class="points-num">300</text></view> <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 class="points-btn" @click="gotoPath('/subPackages/pointsMall/index')">兑换商品</view>
</view> </view>
<view class="my-order"> <view class="my-order">
@ -79,7 +79,7 @@
</view> </view>
<!-- 用户推荐 --> <!-- 用户推荐 -->
<view class="recommend-box"> <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> <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 class="new-hot-box hot-box" >
<view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)"> <view v-for="(item,index) in hotList" :key="index" class="hot-item" @click="gotoDetailByType(item)">
@ -218,6 +218,13 @@
isShow: true, isShow: true,
webUrl: "https://supplier-h5.sutenong.com", 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', src: 'https://static.ticket.sz-trip.com/shiweisuzhou/images/user/yhxy.png',
title: '用户协议', title: '用户协议',
@ -245,10 +252,19 @@
// },'/api/uservice/user/getMyInfo').then(res => { // },'/api/uservice/user/getMyInfo').then(res => {
// this.$store.commit('changeUserInfo', res.data); // 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.userInfo = (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo'))) || this.$store.state.user.userInfo || {}
console.log(this.userInfo)
uni.setStorageSync('isFlag', true)
// this.dfkList = [] // this.dfkList = []
// this.nowDateTime = parseInt(new Date().getTime() / 1000) // this.nowDateTime = parseInt(new Date().getTime() / 1000)
// this.Post({}, "/api/user/userInfo").then((res) => { // this.Post({}, "/api/user/userInfo").then((res) => {
@ -416,12 +432,12 @@
getHotList() { getHotList() {
this.Post({ this.Post({
// tag_id: 648, tag_id: this.envPropObj.use_recommend_tag_id,
offset: this.hotList.length, offset: this.hotList.length,
limit: 4, limit: 4,
order: "sales_number" order: "sales_number"
},'/api/product/get_product_by_type').then(res => { },'/api/product/get_product_by_tag').then(res => {
this.hotList = res.data.list this.hotList = res.data.list || []
}) })
}, },

11
static/js/CommonFunction.js

@ -1,6 +1,17 @@
// 获取路径参数 // 获取路径参数
import Vue from "vue"; import Vue from "vue";
// 全局变量 切换测试/正式
Vue.prototype.envPropObj = {
// 测试环境
// 我的-为您推荐 标签id
use_recommend_tag_id: 684,
// 积分商城-每日精选
score_daily_recommend: 679,
// 积分商城-分类-全部
score_type_all: 680,
}
// 格式化富文本 // 格式化富文本
Vue.prototype.formateRichText = str => { Vue.prototype.formateRichText = str => {
if (!str) return ""; if (!str) return "";

4
subPackages/order/orderDetail.vue

@ -358,6 +358,10 @@
<view class="subtitle flex-between"> <view class="subtitle flex-between">
<span>优惠券</span>-{{info.preference_money / 100}} <span>优惠券</span>-{{info.preference_money / 100}}
</view> </view>
<view class="subtitle flex-between" v-if="info.total_score_amount">
<span>积分</span>-{{info.total_score_amount}}</span>
</view>
<view class="subtitle flex-between"> <view class="subtitle flex-between">
<span>实付金额</span> <span>实付金额</span>
<view class="price">{{info.paid_money / 100}}</view> <view class="price">{{info.paid_money / 100}}</view>

34
subPackages/pointsMall/detail.vue

@ -28,10 +28,10 @@
<view class="price-box " style="padding-bottom: 27rpx;"> <view class="price-box " style="padding-bottom: 27rpx;">
<view class="flex flex-between" style="font-weight: 500;font-size: 24rpx;color: #666666;"> <view class="flex flex-between" style="font-weight: 500;font-size: 24rpx;color: #666666;">
<view > <view >
<text class="present-price">{{ info.price / 100 }}</text> <text class="present-price">{{ info.score_price}}</text>
/ /
</view> </view>
<view>{{info.sales_number || 0}}</view> <view>{{info.sales || 0}}</view>
</view> </view>
<view class="title text-overflowRows">{{ info.title }}</view> <view class="title text-overflowRows">{{ info.title }}</view>
<view class="title text-overflowRows" style="font-weight: 500;font-size: 24rpx;color: #999999;">{{ info.subtitle }}</view> <view class="title text-overflowRows" style="font-weight: 500;font-size: 24rpx;color: #999999;">{{ info.subtitle }}</view>
@ -67,7 +67,7 @@
限制{{info.display_tags.split(',').join(' | ')}} 限制{{info.display_tags.split(',').join(' | ')}}
</view> </view>
<view class="price-box supplier-box" style="margin-top: 20rpx;" v-if="supplierInfo"> <!-- <view class="price-box supplier-box" style="margin-top: 20rpx;" v-if="supplierInfo">
<image v-if="supplierInfo.headimg" class="supplier-image" :src="supplierInfo.headimg"></image> <image v-if="supplierInfo.headimg" class="supplier-image" :src="supplierInfo.headimg"></image>
<view class="supplier-content"> <view class="supplier-content">
<view class="text-overflowRows">{{supplierInfo.shop_name}}</view> <view class="text-overflowRows">{{supplierInfo.shop_name}}</view>
@ -80,7 +80,7 @@
<view class="supplier-btn" @click="goShopDetail(supplierInfo.id)"> <view class="supplier-btn" @click="goShopDetail(supplierInfo.id)">
进店 进店
</view> </view>
</view> </view> -->
<view class="price-box info-box-query" id="box2" style="margin-top: 20rpx;"> <view class="price-box info-box-query" id="box2" style="margin-top: 20rpx;">
<view class="pro-title">产品详情</view> <view class="pro-title">产品详情</view>
@ -92,26 +92,28 @@
<view class="btn-list" > <view class="btn-list" >
<view class="left-box flex-between"> <view class="left-box flex-between">
<view class="img-box" v-if="supplierInfo" @click="goShopDetail(supplierInfo.id)"> <!-- <view class="img-box" v-if="supplierInfo" @click="goShopDetail(supplierInfo.id)">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/ead79154bae29fde0cd05b41539a1a74.png" mode="aspectFill"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250820/ead79154bae29fde0cd05b41539a1a74.png" mode="aspectFill"></image>
<view class="text">店铺</view> <view class="text">店铺</view>
</view> </view> -->
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom"> <button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="img-box"> <view class="img-box">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/194e12115940d2c67619a2d1fd9120c3.png" mode="aspectFill"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250820/194e12115940d2c67619a2d1fd9120c3.png" mode="aspectFill"></image>
<view class="text">客服</view> <view class="text">客服</view>
</view> </view>
</button> </button>
<view class="img-box" style="position: relative;" @click="goCartPage()"> <!-- <view class="img-box" style="position: relative;" @click="goCartPage()">
<image src="https://static.ticket.sz-trip.com/uploads/20250820/17eeecf12ba9fdc56bce3b84fd5fb45f.png" mode="aspectFill"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250820/17eeecf12ba9fdc56bce3b84fd5fb45f.png" mode="aspectFill"></image>
<view class="text">购物车</view> <view class="text">购物车</view>
<view class="cartNum" v-if="cartNum">{{cartNum}}</view> <view class="cartNum" v-if="cartNum">{{cartNum}}</view>
</view> </view> -->
</view> </view>
<view class="btn-post"> <view class="btn-post">
<view class="left-btn-buy" @click="openPop(true)">加入购物车</view> <!-- <view class="left-btn-buy" @click="openPop(true)">加入购物车</view> -->
<view class="right-btn-buy" @click="openPop(false)">立即购买</view> <view style="border-radius: 20rpx;" class="right-btn-buy" @click="openPop(false)">
{{info.score_price}}兑换
</view>
</view> </view>
</view> </view>
@ -125,7 +127,7 @@
<view class="bottom-productImg"> <view class="bottom-productImg">
<img :src="showImg(sku[productIndex].headimg)" alt=""> <img :src="showImg(sku[productIndex].headimg)" alt="">
<view class="right-content"> <view class="right-content">
<view class="bottom-productPrice com-price">{{(sku[productIndex].price||0)/100}}</view> <view class="bottom-productPrice com-price">{{(sku[productIndex].price_text||0)}}</view>
<view class="bottom-content">已选择{{sku[productIndex].sku_name}}</view> <view class="bottom-content">已选择{{sku[productIndex].sku_name}}</view>
</view> </view>
</view> </view>
@ -647,7 +649,7 @@
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1); box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 30rpx 26rpx 0 ; padding: 23rpx 26rpx 0 50rpx;
.left-box { .left-box {
display: flex; display: flex;
@ -914,11 +916,11 @@
border-radius: 20rpx 0rpx 0rpx 20rpx; border-radius: 20rpx 0rpx 0rpx 20rpx;
} }
.right-btn-buy{ .right-btn-buy{
width: 200rpx; width: 467rpx;
height: 75rpx; height: 87rpx;
line-height: 75rpx;
background: #6A8A27; background: #6A8A27;
border-radius: 0rpx 20rpx 20rpx 0rpx; border-radius: 20rpx;
line-height: 87rpx;
} }
} }
.add-cart-icon{ .add-cart-icon{

146
subPackages/pointsMall/index.vue

@ -7,7 +7,7 @@
<image class="point-image" src="https://static.ticket.sz-trip.com/uploads/20250917/9969ed1c37123ae8b29533a9981d2a6f.png"></image> <image class="point-image" src="https://static.ticket.sz-trip.com/uploads/20250917/9969ed1c37123ae8b29533a9981d2a6f.png"></image>
</view> </view>
<view> <view>
<view>已连签{{cuntinue_days}}</view> <view>已连签{{continue_days}}</view>
<view class="sub-text">连续签到可获得更多积分断签后重新累积</view> <view class="sub-text">连续签到可获得更多积分断签后重新累积</view>
</view> </view>
@ -15,15 +15,17 @@
<view class="day-sign-item" v-for="(item,i) in daySign" :key="i"> <view class="day-sign-item" v-for="(item,i) in daySign" :key="i">
<view class="day-sign-points">+{{item.score}}</view> <view class="day-sign-points">+{{item.score}}</view>
<view :class="['line','line'+i,i==lastSign?'last-line':'',i<lastSign?'active':'']"> <view :class="['line','line'+i,i==lastSign?'last-line':'',i<lastSign?'active':'']">
<view class="dot"></view> <view class="dot">
<uni-icons v-if="i<=lastSign" type="checkmarkempty" size="7" color="#fff"></uni-icons>
</view>
<view class="last-sign" v-if="i==lastSign"></view> <view class="last-sign" v-if="i==lastSign"></view>
</view> </view>
</view> </view>
</view> </view>
<view class="rule-area"> <view class="rule-area">
<view class="rule-btn">积分规则</view> <view class="rule-btn" @click="$refs.rulePop.open()">积分规则</view>
<view class="rule-btn" style="margin-top: 26rpx;">积分明细</view> <view class="rule-btn" style="margin-top: 26rpx;" @click="gotoPath('/subPackages/pointsMall/record')">积分明细</view>
</view> </view>
<view class="sign-btn" v-if="isSign">已签到</view> <view class="sign-btn" v-if="isSign">已签到</view>
@ -38,7 +40,9 @@
<view></view> <view></view>
</view> </view>
<view class="jx-box no-scrollbar"> <scroll-view class="jx-box no-scrollbar" style="height: 500rpx;"
enable-flex scroll-x scroll-with-animation :show-scrollbar="false"
@scrolltolower="getJXList">
<view class="jx-item" v-for="(item,i) in JXList" :key="i" @click="gotoDetail(item)"> <view class="jx-item" v-for="(item,i) in JXList" :key="i" @click="gotoDetail(item)">
<image class="jx-head-image" :src="showImg(item.headimg)" mode="aspectFill"></image> <image class="jx-head-image" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="jx-content" > <view class="jx-content" >
@ -52,11 +56,12 @@
</view> </view>
</view> </view>
</view> </view>
</view> </scroll-view>
<view class="flex"> <view class="flex">
<scroll-view class="type-box no-scrollbar" :scroll-into-view="scrollView" <scroll-view class="type-box no-scrollbar" :scroll-into-view="scrollView"
enable-flex scroll-x scroll-with-animation :show-scrollbar="false"> enable-flex scroll-x scroll-with-animation :show-scrollbar="false"
>
<view :id="`scroll${i}`" :class="['type-item',typeIndex==i?'active':'']" v-for="(type,i) in typeList" <view :id="`scroll${i}`" :class="['type-item',typeIndex==i?'active':'']" v-for="(type,i) in typeList"
:key="i" @click="changeType(item,i)"> :key="i" @click="changeType(item,i)">
{{type.name}} {{type.name}}
@ -74,7 +79,7 @@
<image class="jx-head-image" :src="showImg(item.headimg)" mode="aspectFill"></image> <image class="jx-head-image" :src="showImg(item.headimg)" mode="aspectFill"></image>
<view class="jx-content" > <view class="jx-content" >
<view class="title text-overflowRows">{{item.title}}</view> <view class="title text-overflowRows">{{item.title}}</view>
<view style="font-weight: 500;font-size: 24rpx;color: #999999;">已兑14100</view> <view style="font-weight: 500;font-size: 24rpx;color: #999999;">已兑{{item.sales}}</view>
<view class="flex-between"> <view class="flex-between">
<view class="flex-between"> <view class="flex-between">
<text class="price" style="padding-right: 6rpx;">{{item.score_price}}</text> <text class="price" style="padding-right: 6rpx;">{{item.score_price}}</text>
@ -93,6 +98,21 @@
<view class="sign-content" v-if="todayRecord">+{{todayRecord.score}}</view> <view class="sign-content" v-if="todayRecord">+{{todayRecord.score}}</view>
</view> </view>
</uni-popup> </uni-popup>
<uni-popup ref="rulePop" type="bottom" mask-background-color="rgba(0,0,0,0.6)" :safe-area="false">
<view class="rulePop" v-if="scoreRule">
<view @click="$refs.rulePop.close()" class="close-pop">
<uni-icons type="closeempty" size="20"></uni-icons>
</view>
<view class="content" >
<view v-html="scoreRule.rule_desc"></view>
<view style="width: 100%;height: 140rpx;"></view>
</view>
<!-- <view class="btn-box">
<view class="btn" @click="$refs.rulePop.close()">完成</view>
</view> -->
</view>
</uni-popup>
</view> </view>
</template> </template>
@ -102,7 +122,7 @@
return { return {
isSign: false, isSign: false,
totalScore: 0, totalScore: 0,
cuntinue_days: 0, continue_days: 0,
// 7 0-6 // 7 0-6
lastSign: -1, lastSign: -1,
daySign: [], daySign: [],
@ -110,13 +130,19 @@
JXList: [], JXList: [],
JXPage: 1,
typeIndex:0, typeIndex:0,
scrollView: "scroll0", scrollView: "scroll0",
typeList: [ typeList: [
{name:"分类",id:"680",}, {name:"分类",id:"",},
], ],
prodList: [], prodList: [],
scoreRule: null,
page: 1,
finish: false,
} }
}, },
onReady () { onReady () {
@ -125,12 +151,15 @@
this.getJXList() this.getJXList()
this.getTypeList() this.getTypeList()
this.getProdListByType() this.getProdListByType()
this.getRule(2)
}, },
methods: { methods: {
// //
signUp () { signUp () {
this.Post({method:"POST"},"/api/user_sign/sign").then(res => { this.Post({method:"POST"},"/api/user_sign/sign").then(res => {
this.$refs.signPop.open() this.$refs.signPop.open()
this.getSignList()
this.getScore()
}) })
}, },
// //
@ -141,12 +170,13 @@
let todayRecordIndex = res.data.days.findIndex(day => day.date === today) let todayRecordIndex = res.data.days.findIndex(day => day.date === today)
let todayRecord = res.data.days[todayRecordIndex] let todayRecord = res.data.days[todayRecordIndex]
this.isSign = todayRecord.is_sign; this.isSign = todayRecord.is_sign;
this.cuntinue_days = res.data.cuntinue_days; this.continue_days = res.data.continue_days;
this.todayRecord = todayRecord; this.todayRecord = todayRecord;
let startIndex = 0 let startIndex = 0
if (this.cuntinue_days<=3) { console.log(this.continue_days)
startIndex = todayRecordIndex - this.cuntinue_days if (this.continue_days<=3) {
this.lastSign = this.cuntinue_days-1 startIndex = todayRecordIndex - this.continue_days
this.lastSign = this.continue_days-1
} else { } else {
startIndex = 4; startIndex = 4;
this.lastSign = 3 this.lastSign = 3
@ -161,20 +191,30 @@
}) })
}, },
getRule (id) {
this.Post({id: id},"/api/sweepstakes/sweepstakes_act/getActInfo").then(res => {
this.scoreRule = res.data
})
},
// //
getJXList(){ getJXList(){
this.Post({ this.Post({
tag_id: 679, tag_id: this.envPropObj.score_daily_recommend,
offset: 0, page: this.JXPage,
limit: 10, limit: 10,
},'/api/score_goods_sku_price/index').then(res => { },'/api/score_goods_sku_price/index').then(res => {
this.JXList = res.data.data this.JXList = [...this.JXList,...res.data.data]
if (res.data.data.length > 0) {
this.JXPage++
}
}) })
}, },
// //
getTypeList () { getTypeList () {
this.Post({pid: 680},'/api/product/tag_list').then(res => { this.Post({pid: this.envPropObj.score_type_all},'/api/product/tag_list').then(res => {
this.typeList = [ this.typeList = [
{name:"全部",id:"",}, {name:"全部",id:"",},
...res.data ...res.data
@ -189,16 +229,25 @@
this.typeIndex = index; this.typeIndex = index;
let i = (index-1)>0?(index-1):0; let i = (index-1)>0?(index-1):0;
this.scrollView = "scroll"+i; this.scrollView = "scroll"+i;
this.prodList = [];
this.finish = false;
this.page = 1;
this.getProdListByType() this.getProdListByType()
}, },
getProdListByType () { getProdListByType () {
this.Post({ this.Post({
tag_id: this.typeList[this.typeIndex].id, tag_id: this.typeList[this.typeIndex].id,
offset: 0, page: this.page,
limit: 10, limit: 10,
},'/api/score_goods_sku_price/index').then(res => { },'/api/score_goods_sku_price/index').then(res => {
this.prodList = res.data.data this.prodList = [...this.prodList,...res.data.data]
if (res.data.current_page<res.data.last_page) {
this.page++
this.finish = false;
} else {
this.finish = true;
}
}) })
}, },
@ -209,6 +258,11 @@
}, },
}, },
onReachBottom() {
setTimeout(()=>{
if (!this.finish) this.getProdListByType()
},1000)
}
} }
</script> </script>
@ -275,6 +329,12 @@
height: 20rpx; height: 20rpx;
background: #FFF0B3; background: #FFF0B3;
border-radius: 50%; border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
z-index: 2;
line-height: 0;
} }
&.line0{ &.line0{
width: 55%; width: 55%;
@ -368,10 +428,11 @@
position: relative; position: relative;
} }
.jx-box{ .jx-box{
padding: 22rpx 0 80rpx; padding: 22rpx 0;
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow-x: auto; overflow-x: auto;
box-sizing: border-box;
} }
.jx-item{ .jx-item{
width: 253rpx; width: 253rpx;
@ -523,4 +584,47 @@
position: absolute; position: absolute;
} }
} }
.rulePop{
height: 70vh;
box-sizing: border-box;
width: 750rpx;
position: relative;
padding: 60rpx 40rpx 0;
background: white;
.btn-box{
position: fixed;
width: 100%;
bottom: 0;
left: 0;
right: 0;
height: 120rpx;
padding: 20rpx 20rpx 0;
background: #f5f5f5;
.btn{
width: 100%;
height: 67rpx;
background: linear-gradient(-90deg, #FB2A54, #FF773D);
border-radius: 33rpx;
font-weight: bold;
font-size: 31rpx;
color: #fff;
text-align: center;
line-height: 67rpx;
}
}
.close-pop{
width: 34rpx;
height: 34rpx;
top: 20rpx;
right: 20rpx;
position: absolute;
}
.content{
width: 100%;height: 100%;overflow-y: auto;overflow-x: hidden;
}
}
</style> </style>

6
subPackages/pointsMall/order.vue

@ -721,6 +721,7 @@ export default {
// //
order() { order() {
let goods = []; let goods = [];
let score_amount = 0;
for(let info of this.orderList) { for(let info of this.orderList) {
let param = { let param = {
type: info.pInfo.type, type: info.pInfo.type,
@ -761,6 +762,8 @@ export default {
param.post = info.delivery.id param.post = info.delivery.id
} }
} }
score_amount+= info.sInfo.buyNum* info.sInfo.score;
goods.push(param) goods.push(param)
} }
@ -775,7 +778,10 @@ export default {
let data = { let data = {
product_list: goods, product_list: goods,
order_type: "score",
score_amount:score_amount,
coupon_id: this.coupon ? this.coupon.id : null, coupon_id: this.coupon ? this.coupon.id : null,
}; };
this.Post( this.Post(

277
subPackages/pointsMall/record.vue

@ -0,0 +1,277 @@
<template>
<view class="bg">
<view class="score-card">
<view>积分余额</view>
<view class="score-num">
<text style="padding-right: 6rpx;">{{totalScore}}</text>
<image class="point-image" src="https://static.ticket.sz-trip.com/uploads/20250917/9969ed1c37123ae8b29533a9981d2a6f.png"></image>
</view>
<view class="refresh-btn" @click="getScore()">
<image src="https://static.ticket.sz-trip.com/uploads/20250922/718a9f118e60af19c927d72335615121.png"></image>
刷新
</view>
</view>
<!-- 选项卡区域 -->
<view class="tab-bar">
<view :class="['tab-item',activeType==0]" @click="changeType(0)">积分收支明细</view>
<view :class="['tab-item',activeType==1]" @click="changeType(1)">积分使用记录</view>
</view>
<!-- 积分列表区域 -->
<view class="score-list" v-if="activeType==0">
<view class="list-item" v-for="(item, index) in record" :key="index" @click="goOrder(item)">
<image v-if="item.type=='score_pay'" class="item-icon" src="https://static.ticket.sz-trip.com/uploads/20250922/1288379124c94892f6ac7a461337da46.png" mode="aspectFit"></image>
<image v-else-if="item.type=='score_refund'" class="item-icon" src="https://static.ticket.sz-trip.com/uploads/20250922/191fb92720719ec2ce03256389480188.png" mode="aspectFit"></image>
<image v-else class="item-icon" src="https://static.ticket.sz-trip.com/uploads/20250922/0f95e2a13d6e6d947b9c8721f9d01017.png" mode="aspectFit"></image>
<view class="item-left flex-between" >
<view class="item-info">
<text class="item-name">{{ item.memo }}</text>
<text class="item-time" v-if="item.order">订单编号{{ item.order.order_id }}</text>
<text class="item-time">{{ item.createtime }}</text>
</view>
<text class="item-score" :class="item.wallet > 0 ? 'plus' : 'minus'">{{ item.wallet > 0 ? '+' + item.wallet : item.wallet }}</text>
</view>
</view>
</view>
<view class="score-list" v-if="activeType==1" >
<view class="list-item" v-for="(item, index) in useRecord" :key="index" @click="goOrder(item)">
<!-- 积分下单 -->
<image class="item-icon" src="https://static.ticket.sz-trip.com/uploads/20250922/1288379124c94892f6ac7a461337da46.png" mode="aspectFit"></image>
<view class="item-left flex-between" >
<view class="item-info">
<text class="item-name">{{ item.memo }}</text>
<text class="item-time" v-if="item.order">订单编号{{ item.order.order_id }}</text>
<text class="item-time">{{ item.createtime }}</text>
</view>
<text class="item-score" :class="item.wallet > 0 ? 'plus' : 'minus'">{{ item.wallet > 0 ? '+' + item.wallet : item.wallet }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
activeType: 0,
totalScore: 0,
typeIndex: 0,
record: [],
useRecord: [],
finish: false,
page: 1,
}
},
onReady () {
this.getScore()
this.getScoreRecord(true)
},
methods: {
//
getScore() {
this.Post({},"/api/uservice/user/getMyInfo").then(res=>{
this.totalScore = res.data.score
})
},
getScoreRecord () {
this.Post({page:this.page},"/api/uservice/user/getScoreChangeLog").then(res=>{
let wallet_logs = res.data.wallet_logs.data;
let expend_logs = res.data.expend_logs.data;
wallet_logs.forEach(v=>{
if (v.ext) {v.order = JSON.parse(v.ext)}
})
expend_logs.forEach(v=>{
if (v.ext) {v.order = JSON.parse(v.ext)}
})
this.record = [...this.record,...wallet_logs];
this.useRecord = [...this.useRecord,...expend_logs]
this.page++
})
},
changeType (index) {
if (index == this.activeType) {
return
}
this.activeType = index;
},
goOrder (item) {
if (item.order) {
uni.navigateTo({ url: `/subPackages/order/orderDetail?id=${item.order.order_id}` });
}
},
},
onReachBottom() {
setTimeout(() => {
this.getScoreRecord()
},1000)
}
}
</script>
<style lang="scss" scoped>
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
}
.bg{
width: 750rpx;
min-height: 100vh;
background: #FFFFFF;
}
.point-image{
width: 26rpx;
height: 26rpx;
}
.score-card {
width: 750rpx;
height: 200rpx;
background: linear-gradient(-90deg, #FCE2C1, #F0BD90);
font-weight: 500;
font-size: 27rpx;
color: #6E3D1D;
padding: 26rpx;
position: relative;
.score-num {
font-weight: 500;
font-size: 53rpx;
color: #000000;
margin-top: 34rpx;
display: flex;
align-items: center;
}
.refresh-btn {
width: 134rpx;
height: 40rpx;
background: #F8D6B1;
border-radius: 20rpx 0rpx 0rpx 20rpx;
font-weight: 500;
font-size: 24rpx;
color: #6E3D1D;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 23rpx 0 20rpx;
position: absolute;
top: 26rpx;
right: 0;
image{
width: 26.67rpx;
height: 26.67rpx;
}
}
}
.tab-bar {
display: flex;
border-bottom: 2rpx solid #D8D8D8;
height: 109rpx;
line-height: 109rpx;
font-weight: 500;
font-size: 31rpx;
color: #000000;
display: flex;
align-items: center;
.tab-item {
flex: 1;
text-align: center;
position: relative;
&.true {
font-weight: bold;
}
&.true::after{
content: "1";
width: 67rpx;
height: 7rpx;
background: #FB2A54;
border-radius: 3rpx;
bottom: 19rpx;
left: calc(50% - 34rpx);
position: absolute;
font-size: 0;
}
}
}
.score-list {
width: 100%;
background-color: #fff;
border-radius: 16rpx;
overflow: hidden;
padding-left: 26rpx;
}
.list-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.item-left {
display: flex;
align-items: center;
flex: 1;
width: 100rpx;
border-bottom: 2rpx solid #f5f5f5;
padding: 33rpx 30rpx 33rpx 0;
}
.item-icon {
width: 33.33rpx;
height: 33.33rpx;
margin-right: 26rpx;
flex-shrink: 0;
}
.item-info {
display: flex;
flex-direction: column;
}
.item-name {
font-size: 28rpx;
color: #333;
}
.item-time {
font-size: 24rpx;
color: #999;
margin-top: 5rpx;
}
.item-score {
font-size: 28rpx;
}
.plus {
color: #FB2A54;
}
.minus {
color: #000000;;
}
</style>

133
subPackages/pointsMall/searchResult.vue

@ -6,17 +6,10 @@
<input type="text" class="input" placeholder="请输入关键字" v-model="keywords" @confirm="search" /> <input type="text" class="input" placeholder="请输入关键字" v-model="keywords" @confirm="search" />
<div class="btn" @click="search()">搜索</div> <div class="btn" @click="search()">搜索</div>
</div> </div>
<!-- <view class="common-box">
<view class="common-types com-flex-tao">
<view @click="setType(index)" v-for="(item, index) in typeList" :key="item.id"
:class="['common-type', typeIndex == index ? 'active' : '']">
{{ item.name }}
</view>
</view>
</view> -->
</view> </view>
<div class="search-list"> <div class="search-list">
<view @click="gotoDetailByType(item.ext)" v-for="(item, key) in list" :key="item.id" class="search-item"> <view @click="gotoDetail(item)" v-for="(item, key) in list" :key="item.id" class="search-item">
<view class="img" style="position: relative;"> <view class="img" style="position: relative;">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image> <image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
<!-- <view class="hover-use-type" v-if="item.ext.type=='post'&&item.ext.delivery_method"> <!-- <view class="hover-use-type" v-if="item.ext.type=='post'&&item.ext.delivery_method">
@ -35,11 +28,12 @@
<text v-if="item.ext.address">{{item.ext.address}}</text> <text v-if="item.ext.address">{{item.ext.address}}</text>
<text v-else-if="item.ext.scene_address">{{item.ext.scene_address}}</text> <text v-else-if="item.ext.scene_address">{{item.ext.scene_address}}</text>
</view> --> </view> -->
<view class="bottom"> <view class="bottom flex-between">
<view class="price ticlet-price"> <view class="price ticlet-price">
{{item.score_price}} {{item.score_price}}
</view> </view>
</view> </view>
<view class="btn">兑换</view>
</view> </view>
</view> </view>
</view> </view>
@ -56,27 +50,11 @@
name: "Search", name: "Search",
data() { data() {
return { return {
typeList: [
{name: '全部', type: ''}, page: 1,
{name: '游玩', type: 'ticket'},
{name: '民宿', type: 'hotel'},
{name: '线路', type: 'line'},
{name: '农产品', type: 'post'},
],
typeIndex: 0,
showMore: true, showMore: true,
list: [], list: [],
keywords: "", keywords: "",
types: {
'goods': "商品",
// 'scenic': "",
'article': "文章",
'activity':'活动'
},
deliveryMethod: {
"1":"邮寄","2":"自提", "3":"配送"
},
options: {} options: {}
} }
}, },
@ -86,16 +64,12 @@
this.getList() this.getList()
}, },
methods: { methods: {
setType(index) {
if (this.typeIndex!==index) {
this.typeIndex = index;
this.list = []
this.getList()
}
},
search() { search() {
this.pushHis(this.keywords); this.pushHis(this.keywords);
this.list = []; this.list = [];
this.page = 1;
this.showMore = true;
this.getList(); this.getList();
}, },
pushHis(keywords) { pushHis(keywords) {
@ -110,28 +84,24 @@
uni.setStorageSync('tz_trip_jf_keyowrds',JSON.stringify(history)) uni.setStorageSync('tz_trip_jf_keyowrds',JSON.stringify(history))
}, },
gotoDetail(item) { gotoDetail(item) {
uni.navigateTo({
url:`/subPackages/pointsMall/detail?id=${item.id}&type=score`
})
}, },
getList() { getList() {
this.Post({ this.Post({
name: this.keywords, keyword: this.keywords,
offset: this.list.length, page: this.page,
type: this.typeList[this.typeIndex].type,
limit: 10,
lon: uni.getStorageSync('location').lon || '120',
lat: uni.getStorageSync('location').lat || '36',
}, '/api/score_goods_sku_price/index').then(res => { }, '/api/score_goods_sku_price/index').then(res => {
console.log(res) console.log(res)
let resData = res.data.data || [] let resData = res.data.data || []
// resData.forEach(v=>{
// if (v.ext.delivery_method) {
// v.ext.delivery_method_str = this.getDeliveryMethodStr(v.ext.delivery_method)
// }
// })
this.list = [...this.list, ...resData]; this.list = [...this.list, ...resData];
this.showMore = true this.showMore = true
if (res.data.length<10) { if (res.data.length<10) {
this.showMore = false this.showMore = false
} else {
this.page++
this.showMore = true
} }
}) })
} }
@ -189,25 +159,28 @@
.search-list { .search-list {
padding: 26rpx 30rpx; padding: 26rpx 30rpx;
background: #F7F7F7; background: #F7F7F7;
display: flex;
justify-content: space-between;
flex-wrap: wrap;
} }
.search-item { .search-item {
width: 100%; width: 334.67rpx;
height: 200rpx; height: 500rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 13rpx; border-radius: 13rpx;
display: flex; display: flex;
margin-bottom: 26rpx; margin-bottom: 26rpx;
flex-direction: column;
.img { .img {
width: 200rpx; width: 334.67rpx;
height: 200rpx; height: 334.67rpx;
background: #87CD93; border-radius: 13rpx 13rpx 0;
border-radius: 13rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.content { .content {
padding:13rpx 20rpx; padding:10rpx 12rpx 12rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
@ -220,49 +193,25 @@
color: #000000; color: #000000;
width: 100%; width: 100%;
} }
.distance {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
flex: 1;
width: 100%;
padding-right: 10rpx;
image{
width: 26rpx;
height: 26rpx;
flex-shrink: 0;
}
text{
flex: 1;
width: 1rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 26rpx;
line-height: 26rpx;
}
}
.price { .price {
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: bold;
font-size: 33.33rpx; font-size: 24rpx;
color: #C3282E; color: #FB2A54;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
} }
.price::before{ .btn{
content: '¥'; width: 93rpx;
font-size: 24rpx; height: 47rpx;
} background: #FB2A54;
.ticlet-price::after{ border-radius: 23rpx;
content: '起'; font-weight: bold;
font-size: 24rpx; font-size: 28rpx;
color: #999999; color: #FFFFFF;
text-align: center;
line-height: 47rpx;
} }
} }

90
subPackages/rewards/exchange.vue

@ -0,0 +1,90 @@
<template>
<view class="exchange-page">
<view class="title">请输入兑换码</view>
<input
class="input"
type="text"
placeholder="请输入"
v-model.trim="exchangeCode"
/>
<view class="error-message" v-if="showError">{{ errorMessage }}</view>
<button :class="['submit-btn',exchangeCode.trim().length>0?'active':'']" @click="submit">提交</button>
</view>
</template>
<script>
export default {
data() {
return {
exchangeCode: '', //
showError: false, //
errorMessage: '兑换码已使用/兑换码错误' //
};
},
methods: {
submit() {
//
if (!this.exchangeCode) {
uni.showToast({
title: '请输入兑换码',
icon: 'none'
});
return;
}
//
this.showError = true;
uni.showToast({
title:"兑换成功",
icon:"success"
})
}
}
};
</script>
<style lang="scss" scoped>
.exchange-page {
display: flex;
flex-direction: column;
align-items: center;
padding: 40px;
.title {
font-size: 18px;
color: #007AFF;
margin-bottom: 20px;
}
.input {
width: 100%;
height: 40px;
border: 1px solid #CCCCCC;
border-radius: 4px;
padding: 0 10px;
box-sizing: border-box;
}
.error-message {
font-size: 14px;
color: #FF0000;
margin-top: 10px;
}
.submit-btn {
width: 100px;
height: 36px;
background-color: #CCCCCC;
color: #FFFFFF;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 14px;
margin-top: 20px;
&.active{
background-color: #FF0000;
}
}
}
</style>

199
subPackages/rewards/index.vue

@ -0,0 +1,199 @@
<template>
<view class="bg">
<!-- 标签栏 -->
<view class="tab-bar">
<view v-for="(type,i) in coupons" :key="i" :class="['tab-item',activeType==i]"
@click="switchTab(i)">{{type.statusText}}</view>
</view>
<div class="search-list">
<view @click="goDetail(item)" v-for="(item, key) in list" :key="item.id" class="search-item">
<view class="img" style="position: relative;">
<image class="img" :src="showImg(item.headimg)" mode="aspectFill"></image>
</view>
<view class="content">
<view class="title text-overflowRows">
{{item.title}}
</view>
<view class="subtitle text-overflowRows">{{item.title}}</view>
</view>
</view>
<view class="no-data-zhanwei" v-if="list.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">暂无数据</view>
</view>
<view style="width: 100%;height: 200rpx;"></view>
</div>
<!-- 前往兑换中心按钮 -->
<view class="exchange-btn-container">
<view class="exchange-btn" @click="gotoPath('/subPackages/rewards/exchange')">前往兑换中心</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
activeType: 0, //
coupons: [
{ status: 0, statusText: '待使用', },
{ status: 1, statusText: '已使用', },
{ status: 2, statusText: '已失效', }
],
list: [],
finished: false,
};
},
onReady () {
this.getHotList()
},
methods: {
switchTab(tab) {
this.finished = false;
this.list = []
this.activeType = tab;
this.getHotList()
},
getHotList() {
this.Post({
offset: this.list.length,
limit: 10,
order: "sales_number"
},'/api/product/get_product_by_type').then(res => {
this.list = [...this.list, ...res.data.list]
if(res.data.list.length < 10) this.finished = true
})
},
goDetail (item) {
uni.navigateTo({
url:`/subPackages/rewards/order?id=${item.id}`
})
},
},
onReachBottom() {
setTimeout(() => {
if(!this.finished) this.getHotList()
},1000)
}
};
</script>
<style lang="scss" scoped>
.bg{
width: 750rpx;
min-height: 100vh;
background: #FFFFFF;
display: flex;
flex-direction: column;
.tab-bar {
display: flex;
border-bottom: 2rpx solid #D8D8D8;
height: 109rpx;
line-height: 109rpx;
font-weight: 500;
font-size: 31rpx;
color: #000000;
display: flex;
align-items: center;
flex-shrink: 0;
.tab-item {
flex: 1;
text-align: center;
position: relative;
&.true {
font-weight: bold;
}
&.true::after{
content: "1";
width: 67rpx;
height: 7rpx;
background: #FB2A54;
border-radius: 3rpx;
bottom: 19rpx;
left: calc(50% - 34rpx);
position: absolute;
font-size: 0;
}
}
}
.search-list {
padding: 26rpx 30rpx;
flex: 1;
height: 100rpx;
}
.search-item {
width: 100%;
height: 200rpx;
background: #FFFFFF;
border-radius: 13rpx;
display: flex;
margin-bottom: 26rpx;
.img {
width: 200rpx;
height: 200rpx;
background: #87CD93;
border-radius: 13rpx;
flex-shrink: 0;
}
.content {
padding:13rpx 20rpx;
display: flex;
flex-direction: column;
flex: 1;
}
.title {
font-family: PingFang SC;
font-weight: bold;
font-size: 31rpx;
color: #000000;
width: 100%;
}
.subtitle{
font-weight: 500;
font-size: 24rpx;
color: #999999;
margin-top: 20rpx;
}
}
.list-common-empty{
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin: 26rpx 0;
}
.list-common-empty-tip{
color:#999;
}
.exchange-btn-container {
position: fixed;
bottom: 20px;
left: 0;
right: 0;
display: flex;
justify-content: center;
.exchange-btn {
padding: 8px 20px;
background-color: #ff0000;
color: #fff;
border-radius: 20px;
font-size: 15px;
}
}
}
</style>

844
subPackages/rewards/order.vue

@ -0,0 +1,844 @@
<template>
<view class="bg">
<view class="box">
<!-- 循环子订单 -->
<view v-for="(item,index) in orderChildList" :key="index">
<!-- 核销码 景点自提 -->
<view class="product-box" v-if="item.isQrcode && item.qrcode.length > 0">
<swiper class="qrcode-box" :circular="false" previous-margin="100rpx" next-margin="100rpx"
:duration="800" :current="item.current" @change="swiperChange($event,item)">
<swiper-item v-for="(qrItem, qrIndex) in item.qrcode" :key="qrIndex" class="flex-center">
<view class="qrcode-item flex-column">
<view class="qrcode-title">{{item.sku_name}}</view>
<image :src="qrItem.qrcodeimg" style="width: 300rpx;height: 300rpx;" mode="aspectFill">
</image>
<canvas :id="'qrcodeT'+qrItem.use_code+qrIndex"
:canvas-id="'qrcodeT'+qrItem.use_code+qrIndex"
style="width:150px;height:150px;z-index: -20;bottom: -500px;position: absolute;"></canvas>
<view class="qrcode-subtitle">
核销码:{{qrItem.use_code}}</view>
<view class="complete-text flex-center" v-if="qrItem.state > 0">
<view class="flex-center" v-if="qrItem.state == 1">
已核销
</view>
<view class="flex-center" v-else>
已失效
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- 景点商品详情 -->
<view class="product-box" v-if="item.product_model == 'ticket'">
<view class="title" @click="item.type=item.product_model;gotoDetailByType(item)">
{{item.product_title}}
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/rightIcon.png"
class="rightIcon"></image>
</view>
<view class="subtitle" v-if="item.use_date && item.is_package != 1"><span>出行时间</span>{{item.use_date}}</view>
<view class="subtitle" v-if="item.scene_detail.open_time">
<span>开放时间</span>{{item.scene_detail.open_time}}
</view>
<view class="lines"></view>
<view class="skutitle flex-between">
<view>{{item.sku_name}}</view>
</view>
</view>
<view class="product-box" v-if="item.product_model == 'ticket'">
<view class="title" >使用说明</view>
<view class="content" v-html="formateRichText(item.sku_model.book_info)"></view>
</view>
<!-- 邮寄自提商品详情 -->
<view class="product-box" v-if="item.product_model == 'post'&&item.is_bsamecity!=1">
<view class="good-box">
<image :src="item.product_img" mode="aspectFill"
@click="item.type=item.product_model;gotoDetailByType(item)"></image>
<view class="flex-column">
<span class="good-title text-overflowRows">{{item.product_title}}</span>
<span class="good-subtitle">{{item.sku_name}}</span>
</view>
<view class="flex-column">
<!-- <span class="good-title">{{item.product_price / 100}}</span> -->
<span class="good-title"></span>
<span class="good-subtitle">x{{item.product_num}}</span>
</view>
</view>
<!-- 自提信息 -->
<view style="margin-top: 30rpx;padding-top: 30rpx;border-top: 1rpx solid #D8D8D8;" v-if="item.product_model == 'post' && item.pickup_shop_id > 0">
<view class="title">自提信息</view>
<view class="pick-box flex-between">
<view class="pick-title">
<view style="display: flex;align-items: center;">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/location.png"
mode=""></image>
{{item.pickup_shop_info.title}}
</view>
<view class="pick-subtitle" style="padding: 20rpx 0 0 50rpx;">
{{item.pickup_shop_info.address}}
</view>
</view>
<view class="pick-subtitle flex-center">
<view v-if="item.pickup_shop_info.tel" @click="clickPhone(item.pickup_shop_info.tel)">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/phone.png"
mode=""></image>
电话
</view>
<view style="margin-left: 35rpx;"
v-if="item.pickup_shop_info.lon && item.pickup_shop_info.lat"
@click="openLocation(item.pickup_shop_info.lat,item.pickup_shop_info.lon)">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/navigation.png"
mode=""></image>
导航
</view>
</view>
</view>
</view>
</view>
</view>
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="kefu-box">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/kefu.png"></image>
联系客服
</view>
</button>
</view>
</view>
</template>
<script>
import QRCode from '@/static/js/weapp-qrcode.js'
export default {
data() {
return {
orderId: '',
info: {},
orderChildList: [],
lineQrcodeList: [],
lineNum: 0,
current: 0,
postInfo: {}
}
},
onLoad(option) {
this.orderId = option.id
this.orderId = "28182509221509291873"
this.getDetail()
},
methods: {
//
async getDetail() {
try {
const res = await this.Post({
order_id: this.orderId
}, '/api/order/query');
this.info = res.data;
this.orderChildList = res.data.order_product_list;
this.processOrderData(this.orderChildList);
} catch (error) {
console.error('获取订单详情失败:', error);
}
},
processOrderData(orderList) {
let groups = {};
orderList.forEach(item => {
//
if (['ticket'].includes(item.product_model)) {
item.isQrcode = true;
//
item.remainNum = 0;
// index
item.current = 0;
//
item.qrcode = [{use_code: 123}]
item.qrcode.forEach((qrItem, qrIndex) => {
if (qrItem.state === 0) {
item.remainNum += 1;
}
this.getCodeImg(qrItem, qrIndex);
});
}
});
this.deliveryList = Object.values(groups);
if (this.deliveryList.length>0 && this.deliveryList[0].goods[0]) {
let goods0 = this.deliveryList[0].goods[0]
this.deliveryInfo = this.deliveryList[0].goods[0]
}
console.log(this.deliveryList, this.deliveryInfo)
},
//
getCodeImg(item, index) {
new QRCode('qrcodeT' + item.use_code + index, {
text: item.use_code,
width: 150,
height: 150,
padding: 2,
colorDark: 'rgb(0,0,0)',
colorLight: 'rgb(255,255,255)',
correctLevel: QRCode.CorrectLevel.M, //
callback: res => {
this.$set(item, 'qrcodeimg', res.path);
this.$forceUpdate();
}
});
},
//
swiperChange(e, item) {
let {
current,
source
} = e.detail;
//current
if (source === 'autoplay' || source === 'touch') {
item.current = current;
}
this.$forceUpdate()
},
//线
swiperChanges(e) {
let {
current,
source
} = e.detail;
//current
if (source === 'autoplay' || source === 'touch') {
this.current = current;
}
this.$forceUpdate()
},
//
clickCopy() {
uni.setClipboardData({
data: this.info.order_id, //
success: () => {
//
uni.showToast({
title: '复制成功',
icon: 'none'
});
}
});
},
callPhone(tel) {
let _this = this
uni.showActionSheet({
itemList: [tel, '呼叫'],
success: function(res) {
_this.clickPhone(tel)
}
});
},
goMap(item) {
if (!item.scene_detail.lon && !item.scene_detail.lat) {
uni.showToast({
title: '暂未配置地理位置',
icon: 'none'
})
return
}
uni.openLocation({
latitude: Number(item.scene_detail.lat),
longitude: Number(item.scene_detail.lon),
name: item.scene_detail.title,
address: item.scene_detail.address,
success: function() {
console.log('success');
}
});
},
}
}
</script>
<style lang="scss" scoped>
.bg {
width: 750rpx;
overflow-x: hidden;
min-height: 100vh;
background-color: #F7F7F7;
padding-bottom: 100rpx;
}
.box {
position: relative;
padding: 0 26rpx;
.product-box {
padding: 28rpx 28rpx 46rpx;
margin-bottom: 22rpx;
background: #FFFFFF;
border-radius: 20rpx;
.title {
font-weight: bold;
font-size: 36rpx;
color: #000000;
display: flex;
align-items: center;
.rightIcon {
width: 17.33rpx;
height: 29.33rpx;
margin-left: 25rpx;
}
}
.subtitle {
font-weight: 500;
font-size: 27rpx;
color: #000000;
margin-top: 18rpx;
span {
color: #666666;
min-width: 125rpx;
}
}
.mask-btn {
width: fit-content;
line-height: 53rpx;
background: #F8F9FA;
border-radius: 11rpx;
border: 1px solid #999999;
padding: 0 15rpx;
margin: 10rpx 0 0 auto;
flex-shrink: 0;
}
.lines {
width: 643rpx;
height: 1rpx;
background: #D8D8D8;
margin: 33rpx 0;
}
.skutitle {
font-weight: 500;
font-size: 27rpx;
color: #000000;
span {
margin-right: 60rpx;
}
}
.price {
font-weight: bold;
font-size: 34rpx;
color: #C3282E;
}
.price::before {
font-size: 24rpx;
content: '¥';
}
.copy {
width: 93rpx;
height: 37rpx;
border-radius: 11rpx;
border: 1rpx solid #515150;
font-weight: 500;
font-size: 22rpx;
color: #515150;
margin-left: 30rpx;
image {
width: 22rpx;
height: 23.33rpx;
}
}
.pick-box {
margin-top: 50rpx;
.pick-title {
font-weight: bold;
font-size: 31rpx;
color: #222222;
width: 500rpx;
image {
width: 33.33rpx;
height: 33.33rpx;
margin-right: 18rpx;
}
}
.pick-subtitle {
font-weight: 500;
font-size: 24rpx;
color: #666666;
image {
width: 56rpx;
height: 56rpx;
margin-bottom: 10rpx;
display: block;
}
&>view {
display: flex;
flex-direction: column;
align-items: center;
}
}
}
.hotel-title {
font-weight: bold;
font-size: 31rpx;
color: #222222;
margin-top: 30rpx;
}
.order-time {
height: 107rpx;
.time {
display: flex;
font-family: PingFang SC;
font-size: 24rpx;
color: #000000;
align-items: center;
}
}
.cal-day {
background: #F2F2F2;
border-radius: 17rpx;
padding: 5rpx 16rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #000000;
}
.address-container {
width: 525rpx;
height: 107rpx;
border-radius: 20rpx;
padding: 25rpx 20rpx 25rpx 33rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
color: #000000;
background-color: #F2F2F2;
background-image: url('https://static.ticket.sz-trip.com/shiweisuzhou/images/homestay/mapBg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
image {
width: 30rpx;
height: 30rpx;
}
.tip {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #333333;
}
.address-title {
width: 400rpx;
}
}
.phone-container {
width: 93rpx;
height: 107rpx;
background: #F2F2F2;
border-radius: 20rpx;
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #333333;
image {
width: 30rpx;
height: 30rpx;
}
.tip {
font-family: PingFang SC;
font-weight: 500;
font-size: 24rpx;
color: #333333;
}
}
}
.kefu-box {
height: 96rpx;
background: #FFFFFF;
border-radius: 20rpx;
padding-left: 27rpx;
display: flex;
align-items: center;
font-weight: 500;
font-size: 31rpx;
color: #000000;
image {
width: 44rpx;
height: 44rpx;
margin-right: 14rpx;
}
}
.good-box {
display: flex;
image {
width: 140rpx;
height: 140rpx;
border-radius: 13rpx;
}
&>view {
height: 140rpx;
justify-content: space-between;
padding-bottom: 14rpx;
margin-left: 18rpx;
width: 371rpx;
}
&>view:last-child {
margin-left: auto;
width: fit-content;
text-align: right;
}
.good-title {
font-weight: bold;
font-size: 27rpx;
color: #000000;
}
.good-subtitle {
font-weight: 500;
font-size: 24rpx;
color: #666666;
}
}
}
button {
padding: 0;
}
button::after {
border: none;
background-color: rgba(0, 0, 0, 0);
}
//
.qrcode-remain {
font-weight: bold;
font-size: 29rpx;
color: #000000;
text-align: center;
span {
width: 60rpx;
text-align: center;
color: #C3282E;
display: inline-block;
}
}
.qrcode-box {
height: 456rpx;
display: flex;
align-items: center;
margin-top: 32rpx;
.qrcode-item {
width: 467rpx !important;
height: 456rpx !important;
background: #FFFFFF;
box-shadow: 0rpx 0rpx 33rpx 0rpx rgba(102, 102, 102, 0.2);
border-radius: 20rpx;
padding: 25rpx 0;
justify-content: space-between;
align-items: center;
position: relative;
image {
width: 300rpx;
height: 300rpx;
}
.qrcode-title {
font-weight: bold;
font-size: 32rpx;
color: #000000;
}
.qrcode-subtitle {
font-weight: 500;
font-size: 27rpx;
color: #888888;
}
.complete-text {
position: absolute;
width: 300rpx;
height: 300rpx;
left: 0;
top: 0;
right: 0;
bottom: 0;
margin: auto;
background: rgba(0, 0, 0, .5);
view {
width: 200rpx;
height: 200rpx;
background: #FFFFFF;
border-radius: 100rpx;
font-weight: bold;
font-size: 36rpx;
color: #000000;
}
}
}
}
.swiper-point {
height: 63rpx;
view {
width: 11rpx;
height: 11rpx;
background: #D3E8A7;
border-radius: 50%;
}
view:not(:first-child) {
margin-left: 13rpx;
}
.swiper-points {
background: #6A8A2D;
}
}
.swiper-prompt {
font-weight: 500;
font-size: 29rpx;
color: #C3282E;
text-align: center;
margin-bottom: 45rpx;
}
//
footer {
width: 750rpx;
height: 167rpx;
position: fixed;
bottom: 0;
display: flex;
align-items: center;
background-color: #fff;
border-top: 10rpx solid #F7F7F7;
padding: 0 26rpx;
.bottom-price {
font-weight: 500;
font-size: 24rpx;
color: #000000;
span {
font-weight: bold;
font-size: 40rpx;
color: #DC2525;
}
span::before {
content: '¥';
font-size: 24rpx;
}
}
.btn-box {
margin-left: auto;
display: flex;
.btn {
width: 213rpx;
line-height: 71rpx;
background: #F8F9FA;
border-radius: 11rpx;
border: 1rpx solid #999999;
text-align: center;
margin-right: 14rpx;
font-weight: 500;
font-size: 31rpx;
color: #111111;
}
.btn:last-of-type {
margin-right: 0;
}
.pay-btn {
height: 73rpx;
background: #6A8A2D;
border: none;
color: #FFFFFF;
}
}
}
//
.mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 1000;
display: flex;
align-items: flex-end;
justify-content: center;
}
.mask-bg {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.mask-content {
width: 100%;
padding: 28rpx 0;
border-radius: 20rpx 20rpx 0 0;
background: white;
height: 70%;
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;
height: 80rpx;
position: absolute;
bottom: -100rpx;
left: 0;
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;
padding-bottom: 60rpx;
position: relative;
z-index: 1;
}
.line {
width: 1rpx;
height: 100%;
background: #CCCCCC;
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;
background: #CCCCCC;
border-radius: 50%;
position: relative;
}
.express-item-icons {
background: #D3E8A7;
}
.childStatus {
text-align: right;
font-size: 27rpx;
color: #6A8A27;
margin-top: 10rpx;
}
</style>

14
subPackages/search/result.vue

@ -16,7 +16,7 @@
</view> </view>
</view> </view>
<div class="search-list"> <div class="search-list">
<view @click="gotoDetailByType(item.ext)" v-for="(item, key) in list" :key="item.id" class="search-item"> <view @click="gotoDetail(item)" v-for="(item, key) in list" :key="item.id" class="search-item">
<view class="img" style="position: relative;"> <view class="img" style="position: relative;">
<image class="img" :src="showImg(item.ext.headimg)" mode="aspectFill"></image> <image class="img" :src="showImg(item.ext.headimg)" mode="aspectFill"></image>
<view class="hover-use-type" v-if="item.ext.type=='post'&&item.ext.delivery_method"> <view class="hover-use-type" v-if="item.ext.type=='post'&&item.ext.delivery_method">
@ -29,7 +29,7 @@
</view> </view>
<view class="flex-between"> <view class="flex-between" v-if="item.type!='travels'">
<view class="distance text-overflow" > <view class="distance text-overflow" >
<image v-if="item.ext.address||item.ext.scene_address" :src="showImg('https://static.ticket.sz-trip.com/uploads/20250619/0e16bffb0cd3648faa47879d0d532842.png')" class="icon-tip"></image> <image v-if="item.ext.address||item.ext.scene_address" :src="showImg('https://static.ticket.sz-trip.com/uploads/20250619/0e16bffb0cd3648faa47879d0d532842.png')" class="icon-tip"></image>
<text v-if="item.ext.address">{{item.ext.address}}</text> <text v-if="item.ext.address">{{item.ext.address}}</text>
@ -62,6 +62,7 @@
{name: '民宿', type: 'hotel'}, {name: '民宿', type: 'hotel'},
{name: '线路', type: 'line'}, {name: '线路', type: 'line'},
{name: '农产品', type: 'post'}, {name: '农产品', type: 'post'},
{name: '文章', type: 'travels'},
], ],
typeIndex: 0, typeIndex: 0,
showMore: true, showMore: true,
@ -110,7 +111,14 @@
uni.setStorageSync('tz_trip_keyowrds',JSON.stringify(history)) uni.setStorageSync('tz_trip_keyowrds',JSON.stringify(history))
}, },
gotoDetail(item) { gotoDetail(item) {
console.log(item)
if (item.type == "travels") {
uni.navigateTo({
url:`/subPackages/letter/detail?id=${item.ext.id}`
})
return
}
this.gotoDetailByType(item.ext)
}, },
getList() { getList() {
this.Post({ this.Post({

Loading…
Cancel
Save