Quellcode durchsuchen

feat:提交代码,修改反馈问题

longzhicheng vor 1 Jahr
Ursprung
Commit
a41d58f53a

+ 1 - 1
src/apis/user.ts

@@ -128,7 +128,7 @@ enum API {
128 128
 	/**
129 129
 	 * 第三方账号接触绑定状态
130 130
 	 */
131
-	 UNBIND_ACCOUNT = 'api/user/unbindAccount',
131
+	 UNBIND_ACCOUNT = '/api/user/unbindAccount',
132 132
 
133 133
     /**
134 134
      * 邀请好友分享图片分类接口

+ 1 - 2
src/pages/order-confirm/index.vue

@@ -202,9 +202,8 @@
202 202
 	function payment(createOrderData : CreateOrderRequest) {
203 203
 		uni.showLoading({
204 204
 			title: '加载中',
205
-			mask: false,
205
+			mask: true,
206 206
 		})
207
-
208 207
 		if (createOrderData.mer_id == '148') {
209 208
 			orderCreate(createOrderData).then((res) => {
210 209
 				if (res) {

+ 1 - 1
src/pages/order/components/AllItemList.vue

@@ -143,7 +143,7 @@ onUnmounted(() => {
143 143
   <div class="p-3 flex flex-col">
144 144
     <div v-if="state.list.length > 0" class="flex flex-col gap-3">
145 145
       <div v-for="(orderItem, index) in state.list" :key="index">
146
-		  
146
+		  {{orderItem.source}}
147 147
        <OrderItem :receivegoods="0" :order-item="orderItem" v-if="orderItem.source == 7" />
148 148
 		<OtherOrderItem :item="orderItem" v-else />
149 149
       </div>

+ 30 - 9
src/pages/order/components/OrderItem.vue

@@ -82,9 +82,26 @@ function getStatusText(orderItem: OrderListModel) {
82 82
 }
83 83
 
84 84
 function handleHeaderClick() {
85
-  uni.navigateTo({
86
-    url: `/subPages/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
87
-  })
85
+	let _item  = props.orderItem.merchant
86
+	
87
+	if(_item.mer_name=='复购区'){
88
+		uni.navigateTo({
89
+		  url: `/subPages/pages/quick-fuc/repurchase`
90
+		})
91
+	}else if(_item.mer_name=='会员专区'){
92
+		uni.navigateTo({
93
+		  url: `/subPages/pages/quick-fuc/vip`
94
+		})
95
+	}else if(_item.mer_name=='精彩生活'){
96
+		uni.navigateTo({
97
+		  url: `/subPages/pages/quick-fuc/life`
98
+		})
99
+	}else{
100
+		uni.navigateTo({
101
+			url: `/subPages/pages/quick-fuc/store?id=${_item.mer_id}&title=${_item.mer_name}`
102
+		})
103
+	}
104
+  
88 105
 }
89 106
 
90 107
 /**
@@ -216,13 +233,17 @@ function handleProductItemClick(
216 233
 
217 234
 function handeRefund(orderItem) {
218 235
   console.log('售后详情', orderItem);
219
-  uni.showToast({
220
-  	title:'请联系客服!'
221
-  })
222
-  // uni.navigateTo({
236
+  if(orderItem.merchant.mer_name!='会员专区'){
237
+	  uni.navigateTo({
238
+	    url: `/subPages/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
239
+	  })
240
+  }else {
241
+	 uni.showToast({
242
+	 	title:'请联系客服!',
243
+	 	icon:'none'
244
+	 }) 
245
+  }
223 246
 
224
-  //   url: `/subPages/pages/refund/option?detail=${encodeBase64(orderItem)}&from=${props.tabValue}`
225
-  // })
226 247
 }
227 248
 
228 249
 function handeDetail(orderItem: any) {

+ 19 - 3
src/pages/order/components/RefundOrderItem.vue

@@ -72,9 +72,25 @@ function getStatusText(orderItem) {
72 72
 }
73 73
 
74 74
 function handleHeaderClick() {
75
-  uni.navigateTo({
76
-    url: `/subPages/pages/store/home/index?id=${props.orderItem.merchant.mer_id}`
77
-  })
75
+	
76
+	let _item  = props.orderItem.merchant
77
+	if(_item.mer_name=='复购区'){
78
+		uni.navigateTo({
79
+		  url: `/subPages/pages/quick-fuc/repurchase`
80
+		})
81
+	}else if(_item.mer_name=='会员专区'){
82
+		uni.navigateTo({
83
+		  url: `/subPages/pages/quick-fuc/vip`
84
+		})
85
+	}else if(_item.mer_name=='精彩生活'){
86
+		uni.navigateTo({
87
+		  url: `/subPages/pages/quick-fuc/life`
88
+		})
89
+	}else{
90
+		uni.navigateTo({
91
+			url: `/subPages/pages/quick-fuc/store?id=${_item.mer_id}&title=${_item.mer_name}`
92
+		})
93
+	}
78 94
 }
79 95
 
80 96
 /**

+ 18 - 14
src/pages/third_party_binding/index.vue

@@ -6,7 +6,7 @@ import {getUpdateAccount} from "~/apis/auth.api";
6 6
 
7 7
 const zfbImage = CDN_URL + '/static/assets/zfb_sf_220908.png'
8 8
 const wxImage = CDN_URL + '/static/assets/wx_sf_220908.png'
9
-
9
+const defaultHeadImg = ref('https://cdn.bjtdba.com/vod/image/2025-01-20/20250120125206881.png')
10 10
 const bindState = ref([])
11 11
 import {useUserStore} from "~/stores/userStore";
12 12
 const userList=ref([])
@@ -19,15 +19,17 @@ onLoad(() => {
19 19
 
20 20
 function loadBindingState() {
21 21
   getBindingState().then(res => {
22
-     console.log('loadBindingState==',res)
23 22
     if (res) {
24 23
       bindState.value = res
25
-    }
24
+    }else{
25
+		bindState.value = []
26
+	}
27
+	console.log("===getBindingState",res);
26 28
   }).catch(error => {
27
-    uni.showToast({
28
-      title: error,
29
-      icon: 'none'
30
-    })
29
+    // uni.showToast({
30
+    //   title: error,
31
+    //   icon: 'none'
32
+    // })
31 33
   })
32 34
 }
33 35
 
@@ -41,7 +43,7 @@ function getBindState(type:any) {
41 43
 
42 44
 function updateAccount(type, info: {unionId: string, nickName: string, avatarUrl: string}) {
43 45
   uni.showLoading({
44
-    title: '绑定中',
46
+    title: '授权中',
45 47
     icon: 'none'
46 48
   })
47 49
   getUpdateAccount({
@@ -52,7 +54,7 @@ function updateAccount(type, info: {unionId: string, nickName: string, avatarUrl
52 54
     avater: info.avatarUrl
53 55
   }).then(res => {
54 56
       uni.showToast({
55
-        title: '绑定成功',
57
+        title: '授权成功',
56 58
         icon: "none"
57 59
       })
58 60
     loadBindingState()
@@ -108,6 +110,8 @@ function getUserInfo() {
108 110
         console.log(error)
109 111
       }
110 112
     });
113
+  }else{
114
+	  unbindAccount()
111 115
   }
112 116
 }
113 117
 
@@ -128,17 +132,17 @@ function getUserInfo() {
128 132
            @tap="getUserInfo"
129 133
            :class="getBindState('1') ? 'text-red' : 'text-gray border-gray'"
130 134
       >
131
-        {{ getBindState('1') ? '已授权' : '去授权' }}
135
+        {{ getBindState('1') ? '解除授权' : '去授权' }}
132 136
       </div>
133 137
 	
134 138
     </div>
135 139
 	<view class="item-line"></view>
136 140
 	
137
-	<view class="flex flex-col" v-for="(item,index) in userList">
141
+	<view class="flex flex-col" v-for="(item,index) in bindState">
138 142
 		<view class="user-info-content">
139
-				  <image class="user-icon" src="" mode="aspectFill"></image>
140
-				  <text class="user-nick-name">地方大师傅</text>
141
-				  <view class="un-bind-btn">解除绑定</view>
143
+				  <image class="user-icon" :src="item.avater?item.avater:defaultHeadImg" mode="aspectFill"></image>
144
+				  <text class="user-nick-name">{{item.nickname}}</text>
145
+				  <!-- <view class="un-bind-btn" @click="unbindAccount">解除绑定</view> -->
142 146
 		</view>
143 147
 		<view v-if="index !=userList.length-1" class="item-line"></view>
144 148
 	</view>

+ 1 - 1
src/pages/user/index.vue

@@ -212,7 +212,7 @@
212 212
 			
213 213
 			 if (item.text === '幸福小店') {
214 214
 				uni.showToast({
215
-					title:'功能升级中',
215
+					title:'功能开发中',
216 216
 					icon:'none',
217 217
 				})
218 218
 				return

+ 1 - 18
src/pages/user/login/index.vue

@@ -58,6 +58,7 @@ async function handleWexinLogin() {
58 58
 
59 59
   await uni.showLoading({
60 60
     title: '登录中',
61
+	mask:true,
61 62
   })
62 63
   uni.login({
63 64
     provider: 'weixin',
@@ -65,38 +66,22 @@ async function handleWexinLogin() {
65 66
       fullScreen: true,
66 67
     },
67 68
     success: (result) => {
68
-      // console.log(result)
69 69
       getUserUnionId({
70 70
         code: result.code,
71 71
         source: 'cxb',
72 72
       }).then((unionRes) => {
73
-        console.log(111111, unionRes)
74
-        // const shareId = Cache.get('SHARE_ID')
75
-        // 存储openid
76
-        // userStore.setOpenid(unionRes.openid)
77 73
         let redirectPageObj: { page: string; type: 'page' | 'tab' }
78 74
         if (Cache.get('SHARE_REDIRECT_PAGE'))
79 75
           redirectPageObj = JSON.parse(Cache.get('SHARE_REDIRECT_PAGE'))
80
-
81
-        // if (shareId) {
82
-        // params.share_id = shareId
83
-        // params = Object.assign({}, params, { shareId })
84
-        // }
85 76
         wechatCheck(unionRes.openid).then((checkRes) => {
86 77
           userStore.login(checkRes.token, checkRes.exp)
87 78
           userStore.setUID(checkRes.user.uid)
88 79
           userStore.setUserInfo(checkRes.user)
89
-          // console.log(checkRes)
90
-          uni.hideLoading()
91
-          console.log('我存在吗111', redirectPageObj)
92 80
           uni.showToast({
93 81
             title: '登录成功',
94 82
           }).then(() => {
95 83
             setTimeout(() => {
96
-              console.log('我存在吗222', redirectPageObj)
97
-
98 84
               if (redirectPageObj) {
99
-                console.log('我存在吗333', redirectPageObj)
100 85
                 if (redirectPageObj.type === 'page') {
101 86
                   return uni.reLaunch({
102 87
                     url: redirectPageObj.page,
@@ -109,8 +94,6 @@ async function handleWexinLogin() {
109 94
                 }
110 95
               }
111 96
               else {
112
-                console.log('我是key>>>aaa', state.key)
113
-
114 97
                 switch (state.key) {
115 98
                   case '10': {
116 99
                     uni.switchTab({

+ 20 - 5
src/pages/user/login/other-phone.vue

@@ -51,6 +51,7 @@
51 51
 	import { getUserUnionId } from "~/apis/user";
52 52
 	const userStore = useUserStore()
53 53
 	const pageStore = usePageStoreWidthOut()
54
+	
54 55
 	const state = reactive({
55 56
 		phone: '',
56 57
 		code: '',
@@ -58,6 +59,7 @@
58 59
 		pwd: '',
59 60
 		isAuthVerify: false,
60 61
 		buttonText: '获取验证码',
62
+		isCanClick:true
61 63
 	})
62 64
 	const currentIndex = ref(0)
63 65
 	const showPage = ref(false)
@@ -173,11 +175,18 @@
173 175
 				icon: 'none'
174 176
 			})
175 177
 		}
176
-
178
+      if(!state.isCanClick){
179
+			return
180
+		}
181
+		state.isCanClick =false
177 182
 		let params = {
178 183
 			phone: state.phone,
179 184
 			password: state.pwd,
180 185
 		}
186
+		uni.showLoading({
187
+			title: '登录中',
188
+			mask:true,
189
+		});
181 190
 		authPwdLogin({
182 191
 			...params
183 192
 		}).then(authRes => {
@@ -217,6 +226,7 @@
217 226
 
218 227
 		}).catch((errorMsg) => {
219 228
 			console.log(errorMsg)
229
+			state.isCanClick =true
220 230
 			uni.showToast({
221 231
 				title: errorMsg,
222 232
 				icon: 'none'
@@ -224,8 +234,14 @@
224 234
 		})
225 235
 	}
226 236
 	function handleLogin() {
237
+		
238
+		if(!state.isCanClick){
239
+			return
240
+		}
241
+		state.isCanClick =false
227 242
 		uni.showLoading({
228
-			title: '登录中'
243
+			title: '登录中',
244
+			mask:true,
229 245
 		});
230 246
 		const shareId = Cache.get('SHARE_ID')
231 247
 
@@ -247,7 +263,6 @@
247 263
 			userStore.login(authRes.token, authRes.exp)
248 264
 			userStore.setUID(authRes.user.uid)
249 265
 			userStore.setUserInfo(authRes.user)
250
-			uni.hideLoading();
251 266
 			uni.showToast({
252 267
 				title: '登录成功',
253 268
 				icon: 'none'
@@ -277,9 +292,9 @@
277 292
 				}
278 293
 			}, 200)
279 294
 
280
-
281 295
 		}).catch((errorMsg) => {
282
-			console.log(errorMsg)
296
+			uni.hideLoading();
297
+			state.isCanClick =true
283 298
 			uni.showToast({
284 299
 				title: errorMsg,
285 300
 				icon: 'none'

+ 3 - 1
src/subPages/pages/income/index.vue

@@ -33,10 +33,11 @@
33 33
 					<view class="item-in">
34 34
 						<text class="item-title">{{item.mark?item.mark:'推荐奖'}}</text>
35 35
 						<text class="item-des">{{item.title}}</text>
36
+						<text class="item-date" v-if="item.sett_time">结算时间:{{item.sett_time}}</text>
36 37
 						<text class="item-date">创建时间:{{item.create_time}}</text>
37 38
 					</view>
38 39
 					<view class="item-in">
39
-						<text :class="item.status==0?'item-des-x':'item-des'">{{item.status==0?'未结算':'已结算'}}</text>
40
+						<text :class="item.status==0?'item-des-x':'item-des'">{{item.status_name}}</text>
40 41
 						<text class="item-num">{{item.money}}</text>
41 42
 					</view>
42 43
 				</view>
@@ -123,6 +124,7 @@ style:
123 124
 		display: flex;
124 125
 		flex-direction: column;
125 126
 		min-height: 100VH;
127
+		padding-bottom: 40rpx;
126 128
 		background-color: #f8f8f8;
127 129
 		box-sizing: border-box;
128 130
 

+ 15 - 3
src/subPages/pages/order/detail.vue

@@ -218,9 +218,21 @@ function handleRemindTheDelivery() {
218 218
 }
219 219
 
220 220
 function handeRefund() {
221
-  uni.navigateTo({
222
-    url: `/subPages/pages/refund/option?detail=${encodeBase64(detail.value)}`
223
-  })
221
+	uni.showToast({
222
+		title:'请联系客服!',
223
+		icon:'none'
224
+	})
225
+	if( detail.value.merchant.mer_name!='会员专区'){
226
+		 uni.navigateTo({
227
+		   url: `/subPages/pages/refund/option?detail=${encodeBase64(detail.value)}`
228
+		 })
229
+	}else {
230
+		 uni.showToast({
231
+		 	title:'请联系客服!',
232
+		 	icon:'none'
233
+		 }) 
234
+	}
235
+ 
224 236
 }
225 237
 
226 238
 function handleClipboard() {

+ 47 - 48
src/subPages/pages/refund/detail.vue

@@ -30,6 +30,7 @@ function refundDetail(id: any) {
30 30
     console.log(res)
31 31
     state.detail = res
32 32
     // res.status = -1
33
+	console.log("===res.status",res.refund_status);
33 34
     //三步骤
34 35
     if (res.refund_type == 1) {
35 36
       if (res.status == 0) {
@@ -80,7 +81,6 @@ onShow(() => {
80 81
   if (state.refund_id) {
81 82
     refundDetail(state.refund_id)
82 83
     refundWlList(state.refund_id)
83
-
84 84
   }
85 85
 })
86 86
 const getStatusshow = computed(() => {
@@ -121,41 +121,45 @@ const getshowKd = computed(() => {
121 121
 const getStatusText = computed(() => {
122 122
   // 商家已处理
123 123
   // 退款成功, 系统已退款
124
-  if (state.detail.refund_status) {
125
-    const status = state.detail.refund_status
126
-    // const status = -1
127
-    //待审核
128
-    if (status == 0) {
129
-      return ['审核中', '售后申请已提交,请耐心等待']
130
-    }
131
-
132
-    // 待退货
133
-    if (status == 1) {
134
-      return ['待退货', '72小时内未寄回,将自动取消申请']
135
-    }
136
-    // 待收货
137
-    if (status == 2) {
138
-      return ['退货中', '商品已寄出,请等待商家处理']
139
-    }
140
-    // 已退款
141
-    if (status == 3 || status == 5) {
142
-      return ['退款成功', '退货服务已完成,如有疑问请联系商家']
143
-
144
-    }
145
-    // 超时
146
-    if (status == 6) {
147
-      return ['超时未发货,申请已取消', '因您超时未发货,申请已自动取消,若有问题请联系商家']
148
-
149
-    }
150
-    //退款失败
151
-    if (status == -1 && state.detail.refund_type == 1) {
152
-      return ['退款失败', '退款失败,请联系商家', '查看失败原因']
153
-    }
154
-    // 审核未通过
155
-    if (status == -1 && state.detail.refund_type == 2) {
156
-      return ['审核未通过', '您的售后申请未通过,若有问题请联系商家', '查看原因']
157
-
158
-    }
124
+  
125
+  console.log("=== state.detail.refund_status", state.detail.refund_status);
126
+  // if (state.detail.refund_status) {
127
+  
128
+  // }
129
+  const status = state?.detail?.refund_status
130
+  
131
+  // const status = -1
132
+  //待审核
133
+  if (status == 0) {
134
+    return ['审核中', '售后申请已提交,请耐心等待']
135
+  }
136
+  
137
+  // 待退货
138
+  if (status == 1) {
139
+    return ['待退货', '72小时内未寄回,将自动取消申请']
140
+  }
141
+  // 待收货
142
+  if (status == 2) {
143
+    return ['退货中', '商品已寄出,请等待商家处理']
144
+  }
145
+  // 已退款
146
+  if (status == 3 || status == 5) {
147
+    return ['退款成功', '退货服务已完成,如有疑问请联系商家']
148
+  
149
+  }
150
+  // 超时
151
+  if (status == 6) {
152
+    return ['超时未发货,申请已取消', '因您超时未发货,申请已自动取消,若有问题请联系商家']
153
+  
154
+  }
155
+  //退款失败
156
+  if (status == -1 && state.detail.refund_type == 1) {
157
+    return ['退款失败', '退款失败,请联系商家', '查看失败原因']
158
+  }
159
+  // 审核未通过
160
+  if (status == -1 && state.detail.refund_type == 2) {
161
+    return ['审核未通过', '您的售后申请未通过,若有问题请联系商家', '查看原因']
162
+  
159 163
   }
160 164
 
161 165
 })
@@ -287,12 +291,12 @@ const statustext = computed(() => {
287 291
 })
288 292
 </script>
289 293
 <template>
290
-  <div v-if="getStatusText != undefined">
294
+  <div  >
291 295
     <div class="px-3 pt-3 relative h-full"
292 296
       v-if="state.detail.refund_status == -1 || state.detail.refund_status == 4 || state.detail.refund_status == 6">
293 297
       <div class="bg-white  rounded-lg p-3 flex justify-center items-center ">
294 298
         <div class="w-full">
295
-          <div class="items-center">
299
+          <div class="items-center"  v-if="getStatusText">
296 300
             <div class="flex items-center font-bold gap-2 text-sm mb-3 w-full">
297 301
               <div class="flex-1 flex items-center gap-2 ">
298 302
                 <div class="line-clamp-1 text_font ">
@@ -313,7 +317,7 @@ const statustext = computed(() => {
313 317
       </div>
314 318
     </div>
315 319
     <div class="top-bg relative" v-else>
316
-      <div class="text-white p-3">
320
+      <div class="text-white p-3" v-if="getStatusText">
317 321
         <div class="text-md">{{ getStatusText[0] }}</div>
318 322
         <div class="text-[12px] text-gray-50">{{ getStatusText[1] }}</div>
319 323
       </div>
@@ -499,9 +503,9 @@ const statustext = computed(() => {
499 503
           <div class="flex items-center f-hairline-bottom  pb-3 px-3">
500 504
             <div class="flex items-center font-bold gap-2 text-sm w-full">
501 505
               <div class="flex-1 flex items-center gap-2 ">
502
-                <image :src="state.detail.merchant.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
506
+                <image :src="state.detail?.merchant?.mer_avatar" mode="widthFix" class="w-4 h-4"></image>
503 507
                 <div class="line-clamp-1">
504
-                  {{ state.detail.merchant.mer_name }}
508
+                  {{ state.detail?.merchant?.mer_name }}
505 509
                 </div>
506 510
               </div>
507 511
 
@@ -559,26 +563,21 @@ const statustext = computed(() => {
559 563
               <div class="flex justify-between">
560 564
                 <div>订单编号</div>
561 565
                 <div class="flex gap-2">
562
-                  <div class="text-gray-400">{{ state.detail.order.order_sn }}</div>
566
+                  <div class="text-gray-400">{{ state.detail?.order?.order_sn }}</div>
563 567
                   <div @click="handleClipboard">复制</div>
564 568
                 </div>
565 569
               </div>
566 570
               <div class="flex justify-between">
567 571
                 <div>申请时间</div>
568
-                <div class="text-gray-400">{{ state.detail.create_time }}</div>
572
+                <div class="text-gray-400">{{ state.detail?.create_time }}</div>
569 573
               </div>
570 574
               <!-- <div class="flex justify-between">
571 575
                 <div>备注说明</div>
572 576
                 <div class="text-gray-400">{{ state.detail.mark ? state.detail.mark : '暂无说明' }}</div>
573 577
               </div> -->
574
-
575 578
             </div>
576
-
577 579
           </div>
578
-
579 580
         </div>
580
-
581
-
582 581
       </div>
583 582
     </div>
584 583
     <!-- 查看失效原因 -->