Browse Source

Merge branch 'master' of http://123.60.98.226:3000/chenkainan/flavorOfTimeSz

# Conflicts:
#	pages.json
#	static/js/request.js
dev
chenkainan 4 months ago
parent
commit
6dc1ff1482
  1. 2
      pages/user/user.vue
  2. 4
      static/js/request.js
  3. 4
      subPackages/techan/detail.vue
  4. 6
      subPackages/techan/index.vue
  5. 65
      subPackages/techan/order.vue

2
pages/user/user.vue

@ -10,7 +10,7 @@
class="headImg" v-else></image> class="headImg" v-else></image>
</view> </view>
<view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view> <view class="username" v-if="userInfo.nickname">{{userInfo.nickname}}</view>
<view class="username" v-else>请登录/注册 ></view> <view class="username" >请登录/注册 ></view>
</view> </view>
<view class="top-right" v-if="userInfo.nickname"> <view class="top-right" v-if="userInfo.nickname">
个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image> 个人信息 <image src="https://static.ticket.sz-trip.com/tongli/images/user/rightIcon1.png" mode=""></image>

4
static/js/request.js

@ -2,6 +2,10 @@ import Vue from 'vue';
import store from '@/store'; import store from '@/store';
// 定义 API URL // 定义 API URL
<<<<<<< HEAD
=======
// const DEV_API_URL = 'https://api.cloud.sz-trip.com';
>>>>>>> f0f6523fe7690c25b235c63518b27786424d6afb
const DEV_API_URL = 'https://swsz.api.js-dyyj.com'; const DEV_API_URL = 'https://swsz.api.js-dyyj.com';
const PROD_API_URL = 'https://swsz.api.js-dyyj.com'; const PROD_API_URL = 'https://swsz.api.js-dyyj.com';
const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL; const NEWAPIURL = process.env.NODE_ENV === 'development' ? DEV_API_URL : PROD_API_URL;

4
subPackages/techan/detail.vue

@ -80,7 +80,7 @@
</uni-badge> </uni-badge>
</view> </view>
<uni-popup ref="popup" type="bottom" @change="changPopShow" style="position: relative;z-index: 50;"> <uni-popup ref="popup" type="bottom" @change="changPopShow" :safe-area="false" style="position: relative;z-index: 99;">
<view class="popup-content" v-if="sku.length>0"> <view class="popup-content" v-if="sku.length>0">
<view style="padding: 0rpx 39rpx 50rpx 39rpx;"> <view style="padding: 0rpx 39rpx 50rpx 39rpx;">
<view @click="closePopup" style="padding: 31rpx 0 0 639rpx;width: 50rpx;height: 80rpx;"> <view @click="closePopup" style="padding: 31rpx 0 0 639rpx;width: 50rpx;height: 80rpx;">
@ -521,7 +521,7 @@
.btn-list { .btn-list {
position: fixed; position: fixed;
z-index: 9999; z-index: 50;
bottom: 0; bottom: 0;
width: 750rpx; width: 750rpx;
height: 140rpx; height: 140rpx;

6
subPackages/techan/index.vue

@ -17,7 +17,7 @@
<scroll-view class="type-container" scroll-x="true" scroll-with-animation="true" enable-flex> <scroll-view class="type-container" scroll-x="true" scroll-with-animation="true" enable-flex>
<view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)"> <view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
<view class="img-container" > <view class="img-container" >
<image :src="item.image"></image> <image :src="showImg(item.image)"></image>
</view> </view>
<view class="type-name">{{item.name}}</view> <view class="type-name">{{item.name}}</view>
</view> </view>
@ -207,7 +207,7 @@
<view class="type-container typedata-container"> <view class="type-container typedata-container">
<view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)"> <view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
<view class="img-container" > <view class="img-container" >
<image :src="item.image"></image> <image :src="showImg(item.image)"></image>
</view> </view>
<view class="type-name">{{item.name}}</view> <view class="type-name">{{item.name}}</view>
</view> </view>
@ -230,7 +230,7 @@
statusBarHeight: 0, statusBarHeight: 0,
headImg: "https://cgc.js-dyyj.com/uploads/20250513/f8b255f965efcd71b6843e4b72c3f1f3.png", headImg: "https://cgc.js-dyyj.com/uploads/20250513/f8b255f965efcd71b6843e4b72c3f1f3.png",
type_pid: 20, type_pid: 646,
typeParam: [], typeParam: [],
typeIndex: 0, typeIndex: 0,
list:[], list:[],

65
subPackages/techan/order.vue

@ -42,7 +42,7 @@
<!-- 自提 --> <!-- 自提 -->
<view v-if="info.is_user_post!=1"> <view v-if="info.is_user_post!=1">
<view class="pickself" > <view class="pickself" >
<navigator :url="`/subPackages/techan/selfPickUpPoint?pickupId=${info.pickupAddress.id}&goodsId=${info.sInfo.id}`"> <navigator :url="`/subPackages/techan/selfPickUpPoint?pickupId=${info.pickupAddress.id}&goodsId=${info.pInfo.id}`">
<view class="pickpoint"> <view class="pickpoint">
<view class="flex-shrink-0">自提点</view> <view class="flex-shrink-0">自提点</view>
<view class="pickpointAddress"> <view class="pickpointAddress">
@ -105,15 +105,15 @@
<!-- 优惠券 --> <!-- 优惠券 -->
<view @click="goOrderCoupon" class="tickets-box flex-between"> <view @click="goOrderCoupon" class="tickets-container flex-between" v-if="!isShoppingCart">
<view class="order-title">优惠券</view> <view class="order-title">优惠券</view>
<view class="coupon-btn" v-if="coupon==''"> <view class="coupon-btn" v-if="coupon==''">
<view class="select">选择优惠券</view> <view class="select">选择优惠券</view>
<uni-icons style="height: 42rpx;" color="#999999" type="right" size="18"></uni-icons> <uni-icons style="height: 42rpx;" color="#999999" type="right" size="18"></uni-icons>
</view> </view>
<div class="coupon-price" v-else> <div class="coupon-price" v-else>
<span v-if="coupon.percent == 0">-{{coupon.discounts/100}}</span> <span v-if="coupon.activity.fold == 0">-{{coupon.activity.money/100}}</span>
<span v-else>-{{coupon.percent}}%</span> <span v-else>-{{coupon.activity.fold*10}}%</span>
<span style="margin:0 31rpx 0 8rpx;color: #6C7A94;">></span> <span style="margin:0 31rpx 0 8rpx;color: #6C7A94;">></span>
</div> </div>
</view> </view>
@ -203,16 +203,25 @@ export default {
popShow: false, // 穿 popShow: false, // 穿
addressTitle: '添加收货地址' addressTitle: '添加收货地址',
isShoppingCart: false,
}; };
}, },
onLoad() { onLoad(options) {
if (options.isShoppingCart) {
this.isShoppingCart = options.isShoppingCart
}
this.$store.commit("choseCoupon", ""); this.$store.commit("choseCoupon", "");
this.handleOrderGoods() this.handleOrderGoods()
}, },
onShow() { onShow() {
this.coupon = this.$store.state.user.coupon if (!this.isShoppingCart) {
this.coupon = this.$store.state.user.coupon
}
// //
uni.$on("updateDataByConnect",this.getDataByConnect) uni.$on("updateDataByConnect",this.getDataByConnect)
@ -234,10 +243,11 @@ export default {
uni.navigateBack(); uni.navigateBack();
return return
} }
// use_type 0 1 3
// is_post 1 2 1
orderList.forEach(v=>{ orderList.forEach(v=>{
v.is_post = v.sInfo.is_post || "1" // v.is_post = v.sInfo.use_type==0?1:v.sInfo.use_type==1?2:3 //
v.is_user_post = v.sInfo.is_post==2?2:"1" // v.is_user_post = v.sInfo.use_type==1?2:1 //
v.pickupAddress = {} // v.pickupAddress = {} //
v.contacts = null // v.contacts = null //
v.post = null // v.post = null //
@ -298,9 +308,6 @@ export default {
}); });
}, },
getPost() { getPost() {
return
let tempList = [] let tempList = []
this.orderList.forEach(v=>{ this.orderList.forEach(v=>{
if( v.sInfo.contacts && v.is_user_post == 1) { if( v.sInfo.contacts && v.is_user_post == 1) {
@ -419,19 +426,18 @@ export default {
} }
this.allprice = allPrice + postPrice this.allprice = allPrice + postPrice
if (this.coupon) { if (this.coupon) {
if (this.coupon.percent == 0) { if (this.coupon.activity.fold == 0) {
if (this.coupon.discounts>allPrice) { if (this.coupon.activity.money>allPrice) {
price =postPrice price =0
}else{ }else{
price = allPrice + postPrice - (this.coupon.discounts) price = allPrice - (this.coupon.activity.money)
} }
} else{ } else{
// bug price = allPrice - allPrice * (this.coupon.activity.fold*10/100)
price = (allPrice + postPrice) - (allPrice * this.coupon.percent/100)
} }
} else { } else {
price = allPrice + postPrice price = allPrice
} }
return price < 0 ? 0 : (price/100).toFixed(2) return price < 0 ? 0 : (price/100).toFixed(2)
}, },
@ -1140,4 +1146,23 @@ view {
padding-bottom: 12rpx; padding-bottom: 12rpx;
min-height: fit-content; min-height: fit-content;
} }
.tickets-container {
width: 698rpx;
background: #fff;
height: 120rpx;
margin: 22rpx auto 0;
.order-title {
margin: 31rpx 0 31rpx 30rpx;
font-size: 31rpx;
font-family: PingFang SC;
font-weight: bold;
color: #000000;
}
.coupon-price {
color:#DD0000;
font-size: 30rpx;
font-weight: bold;
}
}
</style> </style>
Loading…
Cancel
Save