chenkainan 4 months ago
parent
commit
8f29eeec83
  1. 7
      pages/cart/cart.vue
  2. 2
      pages/coupon/coupon.vue
  3. 2
      static/js/CommonFunction.js
  4. 3
      static/js/request.js
  5. 2
      subPackages/food/detail.vue
  6. 2
      subPackages/order/orderCoupon.vue
  7. 882
      subPackages/order/orderDetail.vue
  8. 25
      subPackages/order/trades.vue
  9. 2
      subPackages/ticket/detail.vue

7
pages/cart/cart.vue

@ -3,7 +3,7 @@
<view class="no-cart" v-if="cartList.length<=0"> <view class="no-cart" v-if="cartList.length<=0">
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
<view style="padding:50rpx 0 67rpx">购物车为空</view> <view style="padding:50rpx 0 67rpx">购物车为空</view>
<view class="no-cart-btn">去逛逛</view> <view class="no-cart-btn" @click="goIndex">去逛逛</view>
</view> </view>
<template v-else> <template v-else>
<view class="del-all" @click="delAll()">全部删除</view> <view class="del-all" @click="delAll()">全部删除</view>
@ -125,6 +125,11 @@
this.getList() this.getList()
}, },
methods: { methods: {
goIndex() {
uni.switchTab({
url: '/pages/index/index'
})
},
getList () { getList () {
this.Post({},"/api/cart/get_list").then(res=>{ this.Post({},"/api/cart/get_list").then(res=>{
let resData = (res.data ||[]) let resData = (res.data ||[])

2
pages/coupon/coupon.vue

@ -36,7 +36,7 @@
this.Post({ this.Post({
limit: 100, limit: 100,
page: 1, page: 1,
class_id: 143, class_id: 146,
type: 2, type: 2,
}, '/api/multimedia/media_list').then(res => { }, '/api/multimedia/media_list').then(res => {
if (res) { if (res) {

2
static/js/CommonFunction.js

@ -258,7 +258,7 @@ Vue.prototype.gotoDetailByType = item => {
} }
switch (item.type){ switch (item.type){
case 'line': case 'line':
url = '/subPackages/line/lineDetail?id=' + item.id url = '/subPackages/line/lineDetail?id=' + (item.id || item.product_id)
break; break;
case 'hotel': case 'hotel':
url = '/subPackages/homestay/detail?id=' + (item.scene_id || item.id) url = '/subPackages/homestay/detail?id=' + (item.scene_id || item.id)

3
static/js/request.js

@ -41,7 +41,8 @@ Vue.prototype.NEWAPIURL = '/api';
Vue.prototype.Post = (params = {}, apiurl) => { Vue.prototype.Post = (params = {}, apiurl) => {
// const token = getToken() || '0caa10fc-6d65-4d9c-8e57-b344be3fc526'; // 君到苏州 // const token = getToken() || '0caa10fc-6d65-4d9c-8e57-b344be3fc526'; // 君到苏州
const token = getToken() || 'a090644d-2bdb-4807-833b-bb5bc2182ac5' // 时味苏州 // const token = getToken() || 'a090644d-2bdb-4807-833b-bb5bc2182ac5' // 时味苏州测试token
const token = getToken()
if (token) { if (token) {
params.token = token; params.token = token;
} }

2
subPackages/food/detail.vue

@ -602,7 +602,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 44rpx; width: 60rpx;
image{ image{
width: 44rpx; width: 44rpx;
height: 42rpx; height: 42rpx;

2
subPackages/order/orderCoupon.vue

@ -24,7 +24,7 @@
{{item.get_date.slice(0,10)}}-{{item.end_time.slice(0,10)}}可用 {{item.get_date.slice(0,10)}}-{{item.end_time.slice(0,10)}}可用
</view> </view>
</view> </view>
<image class="selected" v-if="item.selected" @click="selectCoupon(item,index)" :src="showImg('/uploads/20241104/f304eab8fe780e63507c9a43c5135cb7.png')" mode=""></image> <image class="selected" v-if="item.selected" @click="selectCoupon(item,index)" src="https://static.ticket.sz-trip.com/shiweisuzhou/images/order/selectCoupon.png" mode=""></image>
<view v-else class="yuan" @click="selectCoupon(item,index)"></view> <view v-else class="yuan" @click="selectCoupon(item,index)"></view>
</view> </view>
<!-- 分割线 --> <!-- 分割线 -->

882
subPackages/order/orderDetail.vue

File diff suppressed because it is too large

25
subPackages/order/trades.vue

@ -30,7 +30,7 @@
</view> </view>
<!-- 订单列表 --> <!-- 订单列表 -->
<view class="trade-list" v-if="list.length > 0"> <view class="trade-list" v-if="list.length > 0">
<view v-for="(item, key) in list" :key="item.id" class="trade-items" v-if="showItem(item)" <view v-for="(item, key) in list" :key="item.order_id" class="trade-items" v-if="showItem(item)"
@click="() => choseType(item)"> @click="() => choseType(item)">
<view class="trade-item-head"> <view class="trade-item-head">
<view class="trade-item-head-tid">订单编号:{{ item.order_id }}</view> <view class="trade-item-head-tid">订单编号:{{ item.order_id }}</view>
@ -53,7 +53,7 @@
</view> </view>
<view class="trade-item-info"> <view class="trade-item-info">
合计 合计
<text>{{ item.total_money / 100 }}</text> <text>{{ item.paid_money / 100 }}</text>
</view> </view>
<view class="trade-item-btns"> <view class="trade-item-btns">
<view @click.stop="() => refund(item.order_id, key)" v-if="['WAIT_POST','WAIT_USE','PAID'].includes(item.state)"> <view @click.stop="() => refund(item.order_id, key)" v-if="['WAIT_POST','WAIT_USE','PAID'].includes(item.state)">
@ -187,9 +187,9 @@ export default {
this.orderId = id; this.orderId = id;
this.Post({ this.Post({
order_id: id, order_id: id,
type: "miniprogram", pay_platform: "miniprogram",
platform: 'miniprogram' pay_method: 'abc'
}, '/api/pay/unify') }, '/api/order/pay')
.then(res => { .then(res => {
if (res.data) { if (res.data) {
uni.requestPayment({ uni.requestPayment({
@ -199,19 +199,8 @@ export default {
signType: res.data.signType, signType: res.data.signType,
timeStamp: res.data.timeStamp, timeStamp: res.data.timeStamp,
success: () => { success: () => {
const templateIds = [ this.resetList();
// 退 this.getList();
'hRZoiEES2BWtKb6Xgsnn8khLQH9un5j_11qu0bwlhfE',
//
'YyTCUIYBnrj9CyKks8cOjNX_Rk8a4yVdswMP-zXVbhc'
];
uni.requestSubscribeMessage({
tmplIds: templateIds,
complete: () => {
this.resetList();
this.getList();
}
});
} }
}); });
} }

2
subPackages/ticket/detail.vue

@ -882,7 +882,7 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
width: 44rpx; width: 60rpx;
image{ image{
width: 44rpx; width: 44rpx;
height: 42rpx; height: 42rpx;

Loading…
Cancel
Save