Bläddra i källkod

订单详情和支付成功页地址和电话反了

lgh 1 månad sedan
förälder
incheckning
fcc57cae95
7 ändrade filer med 32 tillägg och 24 borttagningar
  1. 0 3
      pages/index/index.vue
  2. 9 5
      pages/order/index.vue
  3. 5 4
      pages/order/orderDetail.vue
  4. 11 6
      pages/order/success.vue
  5. 5 4
      pages/user/index.vue
  6. 1 1
      request/index.js
  7. 1 1
      uni.scss

+ 0 - 3
pages/index/index.vue

@@ -183,9 +183,7 @@
 			}
 		},
 		onLoad() {
-
 			this.getData()
-
 		},
 		onShow() {
 			this.changeTabbar()
@@ -239,7 +237,6 @@
 					this.packagesEntity = res.packagesEntity
 					this.setData = this.packagesEntity[0]
 					this.configs = res.configs
-					console.log(res, 'res66666');
 
 				})
 			},

+ 9 - 5
pages/order/index.vue

@@ -37,7 +37,7 @@
                 </view>
               </view>
               <view class="order-middle-right flex-start" v-if="item.paymentStatus==='WAIT_PAYMENT'">
-                <view class="right-label fs24">应付款</view>
+                <view class="right-label fs24">应付款</view>
                 <view class="fs28 fw ml-6"> ¥{{ item.totalAmount }}</view>
               </view>
               <view class="order-middle-right" v-if="item.paymentStatus==='SHOOTING'">
@@ -141,7 +141,7 @@ export default {
         noMoreSize: 5, // 配置列表的总数量要大于等于5条才显示'-- END --'的提示
         textNoMore: '- 没有更多了 -'
       },
-      paymentStatus: 'WAIT_PAYMENT',
+      paymentStatus: '',
       tabLists: [
         {name: '全部', value: ''},
         {name: '待付款', value: 'WAIT_PAYMENT'},
@@ -210,16 +210,18 @@ export default {
               })
             } else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
               uni.showToast({
-                title: '用户取消了支付'
+                title: '用户取消了支付',
+                icon: 'none'
               })
             } else {
-              console.error('支付失败', res.err_msg);
+              console.error('支付失败', res.errMsg);
               // 处理支付失败的逻辑
             }
           }
       );
     },
     tabsChange(item) {
+      if(this.paymentStatus == item.value) return
       this.paymentStatus = item.value
       this.mescroll.resetUpScroll()
       this.mescroll.scrollTo(0, 300)
@@ -494,6 +496,8 @@ export default {
   color: white; /* 文字颜色 */
   font-weight: bold; /* 文字加粗 */
 }
-
+.btn{
+  border-radius: 36rpx;
+}
 
 </style>

+ 5 - 4
pages/order/orderDetail.vue

@@ -17,7 +17,7 @@
 					</view>
 					<view class="success_item flex aic">
 						<view class="label">收件人</view>
-						<text>{{ orderInfo.recipientName }}({{ orderInfo.contactPhone }})</text>
+						<text>{{ orderInfo.recipientName }}({{ orderInfo.contactPhone }})</text>
 					</view>
 					<view v-if="orderInfo.completedLink" class="success_item flex aic">
 						<view class="label">拍摄视频地址</view>
@@ -40,13 +40,13 @@
 					<text>套餐名称</text>
 					<view class="datas flex">
 						<text>{{ orderInfo.packageName }}</text>
-						<view class="copy">详情</view>
+						<!-- <view class="copy">详情</view> -->
 					</view>
 				</view>
 				<view class="detail_item flex aic jcsb">
 					<text>套餐内容</text>
 					<view class="datas flex">
-						<text>{{ orderInfo.quantity }}条 (每条15-20s)</text>
+						<text>{{ orderInfo.quantity }}条</text>
 					</view>
 				</view>
 				<view class="detail_item flex aic jcsb" v-if="orderInfo.paymentStatus!=='WAIT_PAYMENT'">
@@ -302,7 +302,8 @@
 							this.getData();
 						} else if (res.err_msg === 'get_brand_wcpay_request:cancel') {
 							uni.showToast({
-								title: '用户取消了支付'
+								title: '用户取消了支付',
+								icon: 'none'
 							});
 						} else {
 							console.error('支付失败', res.err_msg);

+ 11 - 6
pages/order/success.vue

@@ -14,14 +14,14 @@
           <view class="success_item flex jcsb aic">
             <view class="flex aic">
               <view class="label">收件地址</view>
-              <text class="bold">{{ orderInfo.contactPhone }}</text>
+              <text class="bold">{{ orderInfo.email }}</text>
             </view>
 <!--            <view class="success_btn" @click="copyText()">复制</view>-->
           </view>
 
           <view class="success_item flex aic">
             <view class="label">收件人</view>
-            <text>{{ orderInfo.recipientName }}({{orderInfo.email}})</text>
+            <text>{{ orderInfo.recipientName }}({{orderInfo.contactPhone}})</text>
           </view>
         </view>
       </view>
@@ -39,13 +39,13 @@
           <text>套餐名称</text>
           <view class="datas flex">
             <text>{{ orderInfo.packageName }}</text>
-            <view class="copy">详情</view>
+            <!-- <view class="copy">详情</view> -->
           </view>
         </view>
         <view class="detail_item flex aic jcsb">
           <text>套餐内容</text>
           <view class="datas flex">
-            <text>{{orderInfo.quantity}}条 (每条15-20s)</text>
+            <text>{{orderInfo.quantity}}条</text>
           </view>
         </view>
         <view class="detail_item flex aic jcsb">
@@ -70,7 +70,7 @@
       </view>
     </view>
     <view class="btns">
-      <view class="bind" @click="goOrderDetail">查看详情</view>
+      <view class="bind" :style="{ background: 'url(' + buybtnBg + ')' }" @click="goOrderDetail">查看详情</view>
       <view class="back" @click="goHome">返回首页</view>
     </view>
   </view>
@@ -94,6 +94,7 @@ export default {
         shootingRequirements:'',
         email:'',
       },
+      buybtnBg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_buy.png',
       bgImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/bg_top%403x.png",
       payImg: "https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/ic_paysuccess.png",
       successImg: 'https://ovp-shop.oss-cn-hangzhou.aliyuncs.com/static/9dshop/img_quekou.png'
@@ -284,10 +285,14 @@ export default {
     }
 
     .bind {
+      width: 100%;
+      height: 84rpx;
+      background-size: 100% 100% !important;
       color: #061714;
       margin-bottom: 32rpx;
       font-weight: 500rpx;
-      background: linear-gradient(140deg, #246AF1 0%, #2F98EF 100%);
+      font-weight: bold;
+      // background: linear-gradient(140deg, #246AF1 0%, #2F98EF 100%);
     }
 
     .back {

+ 5 - 4
pages/user/index.vue

@@ -6,9 +6,8 @@
     </view>
     <view class="news">
       <image :src="avatar"></image>
-      `
       <view v-if="realName" class="phone">{{ realName }}</view>
-      <view v-else class="phone" @click="toLogin()">点击登录</view>
+      <view v-else class="phone" @click="toLogin()">登录</view>
     </view>
     <view class="content">
       <view class="order-wrap">
@@ -42,7 +41,7 @@
         </view>
         <image class="more" :src="moreImg"></image>
       </view>
-      <view class="outline" @click="outLogin()">退出登录</view>
+      <!-- <view v-if="realName" class="outline" @click="outLogin()">退出登录</view> -->
     </view>
     <u-modal :show="serviceVisible" title="联系客服" :closeOnClickOverlay="true" @confirm="serviceVisible=false">
       <view class="slot-content">
@@ -123,11 +122,13 @@ export default {
       logout().then(res => {
         uni.removeStorageSync('token')
         uni.removeStorageSync('realName')
+        // const cleanUrl = window.location.pathname + window.location.hash;
+        // window.history.replaceState({}, '', cleanUrl);
         this.$router.push({
           path: '/pages/index/index'
         })
       })
-    }
+    },
   },
   created() {
 

+ 1 - 1
request/index.js

@@ -36,7 +36,7 @@ function requestHandle(obj) {
 					}
 					if (resReq.data.code === 500) {
 						uni.showToast({
-							title: msg || '服务器开小差',
+							title: resReq.data.msg || '服务器开小差',
 							icon: 'none'
 						})
 					}

+ 1 - 1
uni.scss

@@ -384,7 +384,7 @@ $color-orange: #FF6234;
   display: flex;
   justify-content: center;
   align-items: center;
-  border-radius: 36rpx;
+  // border-radius: 36rpx;
 }
 
 .btn1 {