Browse Source

Merge branch 'master' into dev_delivery

dev_delivery
jiazhipeng 6 days ago
parent
commit
4e57c15616
  1. 6
      pages.json
  2. 20
      pages/coupon/coupon.vue
  3. 6
      subPackages/order/cartOrder.vue
  4. 63
      subPackages/techan/cartOrder.vue
  5. 5
      subPackages/techan/cartOrder1.vue
  6. 5
      subPackages/techan/detail.vue
  7. 52
      subPackages/techan/order.vue
  8. 119
      subPackages/user/rewardsCenter.vue

6
pages.json

@ -87,6 +87,12 @@
"style" : {
"navigationBarTitleText" : "视频"
}
},
{
"path":"user/rewardsCenter",
"style" : {
"navigationBarTitleText" : "兑换中心"
}
},
{
"path": "ticket/index",

20
pages/coupon/coupon.vue

@ -10,6 +10,10 @@
</view>
</view>
<view class="goRewards" @click="gotoPath('/subPackages/user/rewardsCenter')">
前往<text style="color: #6A8A27;">兑换中心</text> >
</view>
<CustomTabBar :currentTab="1" />
</view>
</template>
@ -95,4 +99,20 @@
}
}
}
.goRewards{
width: 400rpx;
height: 80rpx;
background: #FFFFFF;
border-radius: 40rpx;
font-weight: 500;
font-size: 31rpx;
color: #000000;
margin: 0 auto;
position: fixed;
bottom: 180rpx;
text-align: center;
line-height: 80rpx;
left: calc( 50% - 200rpx );
}
</style>

6
subPackages/order/cartOrder.vue

@ -91,7 +91,11 @@
<view class="other-info">
<view class="flex-between">
<view>运费:</view>
<view>{{item.post/100}}</view>
<view>
<text style="color: #a1a1a1;text-decoration: line-through;padding-right: 10rpx;"
v-if="item.postDiscount>0">{{item.postPrice/100}}</text>
<text>{{item.post/100}}</text>
</view>
</view>
<!-- <view class="flex-between" style="align-items: flex-start;">
<view class="flex-shrink-0">收货人信息:</view>

63
subPackages/techan/cartOrder.vue

@ -91,7 +91,9 @@
运费
</view>
<view style="font-weight: 500;" >
{{!info.post?'免邮':info.post/100}}
<text style="color: #a1a1a1;text-decoration: line-through;padding-right: 10rpx;"
v-if="info.postDiscount>0">{{info.postPrice/100}}</text>
<text>{{!info.post?'免邮':info.post/100}}</text>
</view>
</view>
@ -323,25 +325,56 @@ export default {
})
let param = []
let consignee_id = null
tempList.forEach(v=>{
param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
// param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
param.push({
type: v.pInfo.type,
product_id: v.pInfo.id,
sku_id: v.sInfo.id,
product_num: v.sInfo.buyNum,
use_type: 1,
post: v.contacts.id,
consignee_id: v.contacts.id,
})
consignee_id = v.contacts.id
})
let data = JSON.stringify(param);
//
// console.log(data);
this.flag = false;
Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
if (res) {
console.log("promise" ,res)
for(let i=0;i<tempList.length;i++) {
tempList[i].post = res[i].data.price;
}
// this.flag = false;
// Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
// if (res) {
// console.log("promise" ,res)
// for(let i=0;i<tempList.length;i++) {
// tempList[i].post = res[i].data.price;
// }
// }
// }).finally(()=>{this.flag = true;})
//
if (consignee_id && param.length>0) {
let data = {
product_list: param,
consignee_id:consignee_id
};
this.Post({
method: 'POST',
data: JSON.stringify(data),
consignee_id:consignee_id
},"/api/order/get_post_price_new").then(res=>{
let resData = res.data || []
resData.forEach((x,i) => {
tempList[i].post = x.price - x.discount_price
tempList[i].postPrice = x.price
tempList[i].postDiscount = x.discount_price
})
this.$forceUpdate()
})
}
}).finally(()=>{this.flag = true;})
},
plus(sku) {
this.$nextTick(() => {
this.$store.commit("choseCoupon","");
@ -490,6 +523,8 @@ export default {
} else {
param.use_type = 1
param.post = info.contacts.id
param.postPrice = param.postPrice
param.postDiscount = param.postDiscount
}
}
if (info.user_select_type == 2) {

5
subPackages/techan/cartOrder1.vue

@ -251,6 +251,7 @@ export default {
if (tempList.length<=0) {return}
let param = []
let consignee_id = null
tempList.forEach(v=>{
v.post = 0;
param.push({
@ -265,9 +266,9 @@ export default {
})
})
let data = JSON.stringify(param);
//
// console.log(data);
this.flag = false;
// this.flag = false;
Promise.all(param.map(v=>_this.Post({...v},"/api/order/getExpressPrice"))).then(res=>{
if (res) {

5
subPackages/techan/detail.vue

@ -38,11 +38,12 @@
<text class="present-price">{{ info.price / 100 }}</text>
/
</view>
<view >
<text v-if="supplierInfo" style="padding-right: 8rpx;">全店满{{supplierInfo.sill_money}}包邮 |</text>
<view>
<text v-if="supplierInfo&&supplierInfo.sill_money>0" style="padding-right: 8rpx;">全店满{{supplierInfo.sill_money/100||0}}包邮 |</text>
<text>已售{{info.sales_number || 0}}</text>
</view>
</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="tag no-scrollbar" v-if="info.delivery_method">

52
subPackages/techan/order.vue

@ -497,24 +497,56 @@ export default {
})
let param = []
let consignee_id = null
tempList.forEach(v=>{
v.post = 0;
param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
// param.push({sku_id: v.sInfo.id, num: v.sInfo.buyNum, consignee_id:v.contacts.id})
param.push({
type: v.pInfo.type,
product_id: v.pInfo.id,
sku_id: v.sInfo.id,
product_num: v.sInfo.buyNum,
use_type: 1,
post: v.contacts.id,
consignee_id: v.contacts.id,
})
consignee_id = v.contacts.id
})
let data = JSON.stringify(param);
//
// console.log(data);
this.flag = false;
// this.flag = false;
Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
if (res) {
console.log("promise" ,res)
for(let i=0;i<tempList.length;i++) {
tempList[i].post = res[i].data.price;
}
// Promise.all(param.map(v=>_this.Post({...v},"/api/order/get_post_price"))).then(res=>{
// if (res) {
// console.log("promise" ,res)
// for(let i=0;i<tempList.length;i++) {
// tempList[i].post = res[i].data.price;
// }
// }
// }).finally(()=>{this.flag = true;})
//
if (consignee_id && param.length>0) {
let data = {
product_list: param,
consignee_id:consignee_id
};
this.Post({
method: 'POST',
data: JSON.stringify(data),
consignee_id:consignee_id
},"/api/order/get_post_price_new").then(res=>{
let resData = res.data || []
resData.forEach((x,i) => {
tempList[i].post = x.price - x.discount_price
tempList[i].postPrice = x.price
tempList[i].postDiscount = x.discount_price
})
this.$forceUpdate()
})
}
}).finally(()=>{this.flag = true;})
},
//

119
subPackages/user/rewardsCenter.vue

@ -0,0 +1,119 @@
<template>
<view class="bg">
<view class="popupBox">
<view class="name">请输入卡密兑换</view>
<input type="text" v-model="password">
<view class="btns" @click="submitPassword">
立即兑换
</view>
</view>
<image class="bottom-img" src="https://static.ticket.sz-trip.com/uploads/20251014/e935f1d616f992dc05c702ba763cece2.png"></image>
</view>
</template>
<script>
export default {
data() {
return {
password:''
}
},
onShow() {
},
methods: {
submitPassword() {
console.log('提交的兑换码',this.password);
let that = this
that.password = that.password.trim()
if (that.password== '') {
uni.showToast({
title: '请输入优惠券领取卡号',
icon: 'none'
})
return
}
that.Post({
key: that.password
}, "/api/coupon/get_coupon").then((res) => {
console.log(res.code);
if (res.code == 200) {
uni.showToast({
title: '兑换成功',
icon: 'none'
})
} else{
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
that.password = ''
},
}
}
</script>
<style lang="scss" scoped>
.bg {
min-height: 100vh;
background: #EDF5DC;
position: relative;
padding-top: 94rpx;
}
.bottom-img{
position: absolute;
bottom: 0;
right: 0;
width: 591.33rpx;
height: 535.27rpx;
z-index: 1;
}
.popupBox {
height: 862rpx;
width: 708.67rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251014/24a49d4a15b1b9a1270253d7a68cfd9e.png");
background-size: 100% 100%;
position: relative;
z-index: 2;
padding-top: 174rpx;
margin: 0 auto;
}
.popupBox .name {
font-weight: bold;
font-size: 36rpx;
color: #6A8A2D;
text-align: center;
margin-bottom: 59rpx;
}
.popupBox input {
width: 433rpx;
height: 80rpx;
background: #F7F7F7;
border-radius: 13rpx;
border: 1px solid #CCCCCC;
margin: 0 auto;
text-align: center;
}
.popupBox .btns {
width: 400rpx;
height: 80rpx;
background: #6A8A2D;
border-radius: 40rpx;
font-weight: 500;
font-size: 31rpx;
color: #FFFFFF;
text-align: center;
line-height: 80rpx;
margin: 264rpx auto 0;
}
</style>
Loading…
Cancel
Save