Browse Source

feat: 支付成功页面增加功能按钮

Basil 3 years ago
parent
commit
98b068e0c2

+ 1 - 1
.env.production

@@ -1 +1 @@
1
-VITE_GLOB_API_URL = 'https://test.bjtdba.com'
1
+VITE_GLOB_API_URL = 'https://app.bjtdba.com'

+ 5 - 2
changelog.md

@@ -1,4 +1,7 @@
1
+- FEAT ShareID
2
+- FEAT 分享注册返回页 
1
 - FEAT 产品详情页产品图片调整为1:1
3
 - FEAT 产品详情页产品图片调整为1:1
2
 - FEAT 一键登录增加 Loading
4
 - FEAT 一键登录增加 Loading
3
-- FIX 每日签到提醒,改变每日提醒一次
4
-- FIX SKU 默认选择问题
5
+- FIX 每日签到提醒积分显示问题、改变每日提醒一次
6
+- FIX SKU 默认选择问题
7
+- FEAT 支付成功页面增加功能按钮

+ 2 - 2
src/apis/common.ts

@@ -110,7 +110,7 @@ export function getLocal() {
110
     uni.getLocation({
110
     uni.getLocation({
111
         type: 'wgs84',
111
         type: 'wgs84',
112
         success(res) {
112
         success(res) {
113
-            console.log(res)
113
+            // console.log(res)
114
             uni.setStorageSync(USER_LATITUDE, res.latitude)
114
             uni.setStorageSync(USER_LATITUDE, res.latitude)
115
             uni.setStorageSync(USER_LONGITUDE, res.longitude)
115
             uni.setStorageSync(USER_LONGITUDE, res.longitude)
116
             // getRegeo(res.latitude, res.longitude);
116
             // getRegeo(res.latitude, res.longitude);
@@ -146,7 +146,7 @@ export async function getRegeo(latitude: number, longitude: number) {
146
     const regeoRes = await amap.getRegeo({
146
     const regeoRes = await amap.getRegeo({
147
         location: '' + longitude + ',' + latitude + '',
147
         location: '' + longitude + ',' + latitude + '',
148
     })
148
     })
149
-    console.log(regeoRes.data.regeocode.addressComponent.city)
149
+    // console.log(regeoRes.data.regeocode.addressComponent.city)
150
 }
150
 }
151
 
151
 
152
 /**
152
 /**

+ 1 - 1
src/components/CXBAuthorize/CXBAuthorize.vue

@@ -50,7 +50,7 @@ const userStore = useUserStore()
50
 // })
50
 // })
51
 const setAuthStatus = () => {
51
 const setAuthStatus = () => {
52
   Routine.authorize().then(res => {
52
   Routine.authorize().then(res => {
53
-    console.log(res)
53
+    // console.log(res)
54
     if (res.isLogin == false) {
54
     if (res.isLogin == false) {
55
       // 去登录
55
       // 去登录
56
       uni.navigateTo({
56
       uni.navigateTo({

+ 40 - 3
src/components/CXBDialogSignIn/CXBDialogSIgnIn.vue

@@ -45,6 +45,7 @@ const emit = defineEmits({
45
 
45
 
46
 // const integral
46
 // const integral
47
 function getScoreText(day: number) {
47
 function getScoreText(day: number) {
48
+  console.log(day)
48
   let integral = 0
49
   let integral = 0
49
   switch (day) {
50
   switch (day) {
50
     case 0: {
51
     case 0: {
@@ -72,18 +73,44 @@ function getScoreText(day: number) {
72
       integral = 20
73
       integral = 20
73
       break;
74
       break;
74
     }
75
     }
76
+    // 7
75
     case 6: {
77
     case 6: {
76
       integral = 41
78
       integral = 41
77
       break;
79
       break;
78
     }
80
     }
81
+    case 7:
82
+    case 8:
83
+    case 9:
84
+    case 10:
85
+    case 11:
86
+    case 12:
87
+    case 14:
88
+    case 15:
89
+    case 16:
90
+    case 17:
91
+    case 18:
92
+    case 19:
93
+    case 22:
94
+    case 23:
95
+    case 24:
96
+    case 25:
97
+    case 26:
98
+    case 27:
99
+      case 28: {
100
+      integral = 3
101
+      break;
102
+    }
103
+    // 14
79
     case 13: {
104
     case 13: {
80
       integral = 71
105
       integral = 71
81
       break;
106
       break;
82
     }
107
     }
108
+    // 21
83
     case 20: {
109
     case 20: {
84
       integral = 131
110
       integral = 131
85
       break;
111
       break;
86
     }
112
     }
113
+    // 30
87
     case 29: {
114
     case 29: {
88
       integral = 191
115
       integral = 191
89
     }
116
     }
@@ -129,8 +156,8 @@ function handleSignInSucceedClose() {
129
     <div class="flex flex-col justify-center items-center h-full w-full gap-3">
156
     <div class="flex flex-col justify-center items-center h-full w-full gap-3">
130
       <div class="signBg flex flex-col justify-around items-center pt-20">
157
       <div class="signBg flex flex-col justify-around items-center pt-20">
131
         <div class="flex flex-col gap-3 w-75 h-75 pt-3">
158
         <div class="flex flex-col gap-3 w-75 h-75 pt-3">
132
-          <div class="flex gap-2 justify-center items-center  p-2" v-if="props.day <=6 ">
133
-            <template v-if="props.day > 0">
159
+          <div class="flex gap-2 justify-center items-center  p-2 ">
160
+            <template v-if="props.day > 0 && props.day <= 6">
134
 
161
 
135
               <SignRedPacket
162
               <SignRedPacket
136
                   v-for="item in props.day"
163
                   v-for="item in props.day"
@@ -140,6 +167,16 @@ function handleSignInSucceedClose() {
140
               />
167
               />
141
 
168
 
142
             </template>
169
             </template>
170
+            <template v-if="props.day > 0 && props.day > 6">
171
+
172
+              <SignRedPacket
173
+                  v-for="item in 6"
174
+                  :key="item"
175
+                  :day="item"
176
+                  :text="'已签'"
177
+              />
178
+
179
+            </template>
143
             <template v-if="(6 - props.day) > 0">
180
             <template v-if="(6 - props.day) > 0">
144
 
181
 
145
               <SignRedPacket
182
               <SignRedPacket
@@ -150,7 +187,7 @@ function handleSignInSucceedClose() {
150
             </template>
187
             </template>
151
           </div>
188
           </div>
152
           <div class=" flex mb-4 flex-col">
189
           <div class=" flex mb-4 flex-col">
153
-              <tempalte v-if="props.day in [7, 14, 21, 30]">
190
+              <tempalte v-if="props.day in [7, 14, 21, 30] && props.day > 6">
154
                 <SignInGiftBag
191
                 <SignInGiftBag
155
                     v-if="props.day == 7"
192
                     v-if="props.day == 7"
156
                     :day="7"
193
                     :day="7"

+ 1 - 1
src/components/FNavBar/use-nav-bar.ts

@@ -27,7 +27,7 @@ export function useNavBar(props: NavBarProps,
27
       right = systemInfo.screenWidth - menuButtonInfo.right
27
       right = systemInfo.screenWidth - menuButtonInfo.right
28
       left = menuButtonInfo.left
28
       left = menuButtonInfo.left
29
       top = menuTop
29
       top = menuTop
30
-      console.log(menuButtonInfo)
30
+      // console.log(menuButtonInfo)
31
       menuButtonWidth = systemInfo.screenWidth - (left + right)
31
       menuButtonWidth = systemInfo.screenWidth - (left + right)
32
     }
32
     }
33
     // #endif
33
     // #endif

+ 2 - 4
src/components/ProductCard/ProductCard.vue

@@ -40,11 +40,9 @@ function handleClick() {
40
     <image :src="item.thumb" mode="widthFix" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 6"></image>
40
     <image :src="item.thumb" mode="widthFix" :fade-in="true" class="rounded-t-lg  !w-full aspect-square" v-if="item.type == 6"></image>
41
 
41
 
42
     <div class="text-sm p-2 flex flex-col gap-1">
42
     <div class="text-sm p-2 flex flex-col gap-1">
43
-      <div v-if="item.type == 5" class="line-clamp-2">
44
-        {{item.store_name}}
43
+      <div v-if="item.type == 5" class="line-clamp-2" v-html="item.store_name">
45
       </div>
44
       </div>
46
-      <div v-if="item.type == 6" class="line-clamp-2">
47
-        {{item.name}}
45
+      <div v-if="item.type == 6" class="line-clamp-2" v-html="item.name">
48
       </div>
46
       </div>
49
       <div class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
47
       <div class="border border-solid border-1 border-red rounded flex text-xs items-center text-[#FE0032] w-fit">
50
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
48
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"

+ 1 - 1
src/libs/chat.js

@@ -64,7 +64,7 @@ Socket.prototype = {
64
 		});
64
 		});
65
 	},
65
 	},
66
 	onMessage: function(res) {
66
 	onMessage: function(res) {
67
-		console.log(JSON.parse(res.data), 'onMessage')
67
+		// console.log(JSON.parse(res.data), 'onMessage')
68
 		const {
68
 		const {
69
 			type,
69
 			type,
70
 			data = {}
70
 			data = {}

+ 4 - 4
src/libs/routine.ts

@@ -34,13 +34,13 @@ class Routine {
34
      */
34
      */
35
     getUserInfo() {
35
     getUserInfo() {
36
         let that = this, code = this.getUserCode();
36
         let that = this, code = this.getUserCode();
37
-        console.log(code)
37
+        // console.log(code)
38
         return new Promise((resolve, reject) => {
38
         return new Promise((resolve, reject) => {
39
             uni.getUserInfo({
39
             uni.getUserInfo({
40
                 lang: 'zh_CN',
40
                 lang: 'zh_CN',
41
                 success(user) {
41
                 success(user) {
42
                     if (code) user.code = code;
42
                     if (code) user.code = code;
43
-                    console.log(user)
43
+                    // console.log(user)
44
                     resolve({userInfo: user, isLogin: false});
44
                     resolve({userInfo: user, isLogin: false});
45
                 },
45
                 },
46
                 fail(res) {
46
                 fail(res) {
@@ -137,8 +137,8 @@ class Routine {
137
     authUserInfo(data: any) {
137
     authUserInfo(data: any) {
138
         return new Promise((resolve, reject) => {
138
         return new Promise((resolve, reject) => {
139
             authMp(data).then(res => {
139
             authMp(data).then(res => {
140
-                console.log('-----')
141
-                console.log(res)
140
+                // console.log('-----')
141
+                // console.log(res)
142
                 const time = res.expires_time = Cache.time()
142
                 const time = res.expires_time = Cache.time()
143
                 userStore.setUserInfo(res.userInfo)
143
                 userStore.setUserInfo(res.userInfo)
144
                 userStore.login(res.token, time)
144
                 userStore.login(res.token, time)

+ 1 - 1
src/libs/wechat.js

@@ -224,7 +224,7 @@ class AuthWechat {
224
 		return new Promise((resolve, reject) => {
224
 		return new Promise((resolve, reject) => {
225
 			let configDefault = {
225
 			let configDefault = {
226
 				fail(res) {
226
 				fail(res) {
227
-					console.log(res,11111);
227
+					// console.log(res,11111);
228
 					if (that.instance) return reject({
228
 					if (that.instance) return reject({
229
 						is_ready: true,
229
 						is_ready: true,
230
 						wx: that.instance
230
 						wx: that.instance

+ 2 - 2
src/pages/dacang/list/index.vue

@@ -145,9 +145,9 @@ onReachBottom(() => {
145
   state.currentPage += 1
145
   state.currentPage += 1
146
   loadList('page', (items) => {
146
   loadList('page', (items) => {
147
     uni.hideLoading()
147
     uni.hideLoading()
148
-    console.log(items)
148
+    // console.log(items)
149
     if (!items.length > 0) {
149
     if (!items.length > 0) {
150
-      console.log('没有更多了')
150
+      // console.log('没有更多了')
151
       state.status = 'noMore'
151
       state.status = 'noMore'
152
     }
152
     }
153
   })
153
   })

+ 1 - 1
src/pages/home/components/banner.vue

@@ -3,7 +3,7 @@ import {CDN_URL} from "~/config/app";
3
 const userStore = useUserStore()
3
 const userStore = useUserStore()
4
 
4
 
5
 function handleGuestMemberNew() {
5
 function handleGuestMemberNew() {
6
-  console.log(userStore.userInfo)
6
+  // console.log(userStore.userInfo)
7
   if (userStore.uid) {
7
   if (userStore.uid) {
8
     uni.navigateTo({
8
     uni.navigateTo({
9
       url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`
9
       url: `/pages/guest_member_new/index?is_merchant=${userStore.userInfo.is_merchant}`

+ 1 - 1
src/pages/home/components/navs.vue

@@ -87,7 +87,7 @@ onBeforeMount(() => {
87
 // function goTo()
87
 // function goTo()
88
 function handleItemClick(item: any) {
88
 function handleItemClick(item: any) {
89
   // console.log(item.key)
89
   // console.log(item.key)
90
-  console.log(item)
90
+  // console.log(item)
91
   switch (item.key) {
91
   switch (item.key) {
92
     case PLATFORM_NAME.DC: {
92
     case PLATFORM_NAME.DC: {
93
       const dacangStore = useDacangStore()
93
       const dacangStore = useDacangStore()

+ 3 - 3
src/pages/home/components/product-list.vue

@@ -31,7 +31,7 @@ function handleProductItemClick(
31
         & VipProductModel
31
         & VipProductModel
32
 ) {
32
 ) {
33
 
33
 
34
-  console.log(item)
34
+  // console.log(item)
35
 
35
 
36
   function navigateToDetail(params) {
36
   function navigateToDetail(params) {
37
     let otherDetailUrl = `/pages/store/product/other`
37
     let otherDetailUrl = `/pages/store/product/other`
@@ -120,7 +120,7 @@ function handleProductItemClick(
120
       },
120
       },
121
       // spreadUrl: item.coupon_share_url
121
       // spreadUrl: item.coupon_share_url
122
     }
122
     }
123
-    console.log(productParams)
123
+    // console.log(productParams)
124
     return navigateToDetail(encodeBase64(productParams))
124
     return navigateToDetail(encodeBase64(productParams))
125
     // uni.navigateTo({
125
     // uni.navigateTo({
126
     //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
126
     //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
@@ -165,7 +165,7 @@ function handleProductItemClick(
165
 
165
 
166
   // 抖音 9
166
   // 抖音 9
167
   if (item.type === 9) {
167
   if (item.type === 9) {
168
-    console.log(item)
168
+    // console.log(item)
169
     const productParams: Partial<IProductDetail> = {
169
     const productParams: Partial<IProductDetail> = {
170
       platform: item.type,
170
       platform: item.type,
171
       id: item.id,
171
       id: item.id,

+ 18 - 10
src/pages/home/index.vue

@@ -72,10 +72,15 @@ onShow(() => {
72
       state.all_yanglao = res.all_yanglao
72
       state.all_yanglao = res.all_yanglao
73
     })
73
     })
74
   }
74
   }
75
-  if (userStore.uid && state.isEject === 1) {
75
+
76
+
77
+})
78
+
79
+function checkSignIn() {
80
+  // if (userStore.uid && state.isEject === 1) {
76
     // 2 检查用户签到信息
81
     // 2 检查用户签到信息
77
     getNewSignInInfo().then(res => {
82
     getNewSignInInfo().then(res => {
78
-      console.log(res)
83
+      // console.log(res)
79
       const {today, day} = res
84
       const {today, day} = res
80
       state.signToday = today
85
       state.signToday = today
81
       if (today === 0) {
86
       if (today === 0) {
@@ -89,9 +94,8 @@ onShow(() => {
89
     }).catch(error => {
94
     }).catch(error => {
90
       console.error(error + '->GetNewsSignInInfo')
95
       console.error(error + '->GetNewsSignInInfo')
91
     })
96
     })
92
-  }
93
-
94
-})
97
+  // }
98
+}
95
 onLoad((option) => {
99
 onLoad((option) => {
96
   if (option && option.shareId) {
100
   if (option && option.shareId) {
97
     userStore.setShareId(option.shareId)
101
     userStore.setShareId(option.shareId)
@@ -99,7 +103,7 @@ onLoad((option) => {
99
   getIsShow()
103
   getIsShow()
100
   getLocal()
104
   getLocal()
101
   getHomeBanner().then(res => {
105
   getHomeBanner().then(res => {
102
-    console.log(res)
106
+    // console.log(res)
103
     state.banners = res
107
     state.banners = res
104
   })
108
   })
105
   // 加载地址数据
109
   // 加载地址数据
@@ -209,20 +213,24 @@ function getIsShow(){
209
   uni.getStorage({
213
   uni.getStorage({
210
     key: 'today',
214
     key: 'today',
211
     success: function(res) {
215
     success: function(res) {
216
+      // console.log(res.data)
217
+      // console.log('----')
212
       //成功的话 说明之前执行过,再判断时间是否是当天
218
       //成功的话 说明之前执行过,再判断时间是否是当天
219
+      // 如果不是当天更新
213
       if (res.data && res.data != new Date().toLocaleDateString()) {
220
       if (res.data && res.data != new Date().toLocaleDateString()) {
214
         // getApp().globalData.isEject = 0; //自定义要更改的变量 或者方法
221
         // getApp().globalData.isEject = 0; //自定义要更改的变量 或者方法
215
-        state.isEject = 0
216
-        uni.setStorageSync("today", new Date().toLocaleDateString()); //把新得日期更新到本地
217
-      }else{
218
-        // getApp().globalData.isEject = 1;  //自定义要更改的变量 或者方法
219
         state.isEject = 1
222
         state.isEject = 1
223
+        checkSignIn()
224
+        uni.setStorageSync("today", new Date().toLocaleDateString()); //把新得日期更新到本地
220
       }
225
       }
221
     },
226
     },
222
     fail: function(res) {
227
     fail: function(res) {
228
+      // console.log(res + 'FAIL...')
223
       //没有执行过的话 先存一下当前的执行时间
229
       //没有执行过的话 先存一下当前的执行时间
224
       // console.log(res);
230
       // console.log(res);
225
       state.isEject = 1
231
       state.isEject = 1
232
+      checkSignIn()
233
+
226
       // getApp().globalData.isEject = 0; //自定义要更改的变量 或者方法
234
       // getApp().globalData.isEject = 0; //自定义要更改的变量 或者方法
227
       let today = new Date().toLocaleDateString();
235
       let today = new Date().toLocaleDateString();
228
       uni.setStorageSync('today', today)
236
       uni.setStorageSync('today', today)

+ 2 - 2
src/pages/payment/index.vue

@@ -101,8 +101,8 @@ function handleConfirm() {
101
       OrderLists: state.orderList,
101
       OrderLists: state.orderList,
102
       type: 'tdbaspzf'
102
       type: 'tdbaspzf'
103
     },
103
     },
104
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
105
-    // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
104
+    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
105
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
106
     success(res) {
106
     success(res) {
107
       // 打开成功
107
       // 打开成功
108
       uni.showToast({
108
       uni.showToast({

+ 31 - 8
src/pages/payment/success.vue

@@ -1,29 +1,52 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
3
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
3
 import FNavBar from "~/components/FNavBar/FNavBar.vue";
4
+import FButton from "~/components/FButton/FButton.vue";
4
 
5
 
5
 const icon = 'https://cdn.bjtdba.com/vod/image/2023-09-21/20230921160115229.png'
6
 const icon = 'https://cdn.bjtdba.com/vod/image/2023-09-21/20230921160115229.png'
6
 function onClickLeft() {
7
 function onClickLeft() {
7
   uni.redirectTo({
8
   uni.redirectTo({
8
-    url: '/pages/my-integral/index'
9
+    // url: '/pages/my-integral/index'
10
+    url: '/pages/order/index'
11
+  })
12
+}
13
+function goHome() {
14
+  uni.switchTab({
15
+    url: '/pages/home/index'
9
   })
16
   })
10
 }
17
 }
11
 </script>
18
 </script>
12
 
19
 
13
 <template>
20
 <template>
14
 <!--<CXBBasePage>-->
21
 <!--<CXBBasePage>-->
15
-  <FNavBar
16
-      title="我的订单" :left-arrow="true" fixed placeholder z-index="999"
17
-      ex-class="bg-white w-screen"
18
-      @click-left="onClickLeft"
19
-  />
22
+<!--  <FNavBar-->
23
+<!--      title="我的订单" :left-arrow="true" fixed placeholder z-index="999"-->
24
+<!--      ex-class="bg-white w-screen"-->
25
+<!--      @click-left="onClickLeft"-->
26
+<!--  />-->
20
 
27
 
21
 
28
 
22
   <div class="flex flex-col h-screen w-screen items-center mt-20 pt-20">
29
   <div class="flex flex-col h-screen w-screen items-center mt-20 pt-20">
23
 
30
 
24
-    <image :src="icon" mode="widthFix" class="w-40"></image>
25
-    <div>支付成功</div>
31
+    <div class="flex justify-center items-center flex-col mb-15 gap-3">
32
+      <image :src="icon" mode="widthFix" class="w-40"></image>
33
+      <div class="text--xl font-bold">支付成功</div>
34
+    </div>
35
+
36
+
37
+    <div class="flex items-center justify-center gap-3">
38
+      <div class="text-[#fe0032] rounded border border-solid border-[#fe0032] w-30 py-2 text-center" @tap="onClickLeft">
39
+        查看订单
40
+
41
+      </div>
42
+      <div class="bg-[#fe0032]  rounded border border-solid border-[#fe0032] w-30 py-2 text-white text-center" @tap="goHome">
43
+        去首页
44
+      </div>
45
+    </div>
26
   </div>
46
   </div>
47
+
48
+
49
+
27
 <!--</CXBBasePage>-->
50
 <!--</CXBBasePage>-->
28
 </template>
51
 </template>
29
 
52
 

+ 3 - 3
src/pages/product/integral.vue

@@ -68,7 +68,7 @@ function handleScrollToLower() {
68
   state.currentPage += 1;
68
   state.currentPage += 1;
69
   loadList("page", (items) => {
69
   loadList("page", (items) => {
70
     if (!items.length > 0) {
70
     if (!items.length > 0) {
71
-      console.log("没有更多了");
71
+      // console.log("没有更多了");
72
       state.status = "noMore";
72
       state.status = "noMore";
73
       state.currentPage -= 1;
73
       state.currentPage -= 1;
74
     }
74
     }
@@ -76,7 +76,7 @@ function handleScrollToLower() {
76
 }
76
 }
77
 
77
 
78
 onReachBottom(() => {
78
 onReachBottom(() => {
79
-  console.log('到底了。。。')
79
+  // console.log('到底了。。。')
80
 
80
 
81
   handleScrollToLower()
81
   handleScrollToLower()
82
 
82
 
@@ -90,7 +90,7 @@ onPullDownRefresh(() => {
90
   })
90
   })
91
 })
91
 })
92
 function handleItemClick(item) {
92
 function handleItemClick(item) {
93
-  console.log(item)
93
+  // console.log(item)
94
   uni.navigateTo({
94
   uni.navigateTo({
95
     url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
95
     url: `/pages/store/product/detail?id=${item.product_id}&mer_id=148`
96
   })
96
   })

+ 50 - 12
src/pages/red-integral/index.vue

@@ -51,38 +51,68 @@ onLoad((options) => {
51
 // })
51
 // })
52
 const userType = computed(() => {
52
 const userType = computed(() => {
53
   const userRichType = userStore.userInfo?.user_rich_type
53
   const userRichType = userStore.userInfo?.user_rich_type
54
+  console.log(userStore.userInfo)
54
   const bangfu = userStore.userInfo.is_bangfu ? '帮扶中心 ' : ''
55
   const bangfu = userStore.userInfo.is_bangfu ? '帮扶中心 ' : ''
55
-
56
   // 创始人
56
   // 创始人
57
   if (userRichType == 3) {
57
   if (userRichType == 3) {
58
-    return bangfu + '创始人'
58
+    if (bangfu) {
59
+      return ['创始人', bangfu]
60
+    }
61
+    return ['创始人']
62
+    // return [].push()
59
   }
63
   }
60
   // 普通用户
64
   // 普通用户
61
   if (userRichType == 0) {
65
   if (userRichType == 0) {
62
-    return bangfu + '用户'
66
+    if (bangfu) {
67
+      return ['用户', bangfu]
68
+    }
69
+    return ['用户']
63
   }
70
   }
64
   // 会员
71
   // 会员
65
   if (userRichType == 1) {
72
   if (userRichType == 1) {
66
-    return bangfu + '会员'
73
+    if (bangfu) {
74
+      return ['会员', bangfu]
75
+    }
76
+    return ['会员']
77
+
67
   }
78
   }
68
   if (userRichType == 3) {
79
   if (userRichType == 3) {
69
-    return bangfu + '创始人'
80
+    if (bangfu) {
81
+      return ['创始人', bangfu]
82
+    }
83
+    return ['创始人']
70
   }
84
   }
71
   // 合伙人
85
   // 合伙人
72
   if (userRichType == 4) {
86
   if (userRichType == 4) {
73
-    return bangfu + 'VIP'
87
+    // return '高级会员'
88
+    if (bangfu) {
89
+      return ['VIP', bangfu]
90
+    }
91
+    return ['VIP']
74
   }
92
   }
75
   if (userRichType == 5) {
93
   if (userRichType == 5) {
76
-    return bangfu + '初始级合伙人'
94
+    if (bangfu) {
95
+      return ['初始级合伙人', bangfu]
96
+    }
97
+    return ['初始级合伙人']
77
   }
98
   }
78
   if (userRichType == 6) {
99
   if (userRichType == 6) {
79
-    return bangfu + '中级合伙人'
100
+    if (bangfu) {
101
+      return ['中级合伙人', bangfu]
102
+    }
103
+    return ['中级合伙人']
80
   }
104
   }
81
   if (userRichType == 7) {
105
   if (userRichType == 7) {
82
-    return bangfu + '高级合伙人'
106
+    if (bangfu) {
107
+      return ['高级合伙人', bangfu]
108
+    }
109
+    return ['高级合伙人']
83
   }
110
   }
84
   if (!userRichType) {
111
   if (!userRichType) {
85
-    return bangfu + '用户'
112
+    if (bangfu) {
113
+      return ['用户', bangfu]
114
+    }
115
+    return ['用户']
86
   }
116
   }
87
 })
117
 })
88
 
118
 
@@ -136,8 +166,16 @@ function handleImmediateWithdrawal() {
136
                   <div class="text-sm" v-if="userStore.userInfo">
166
                   <div class="text-sm" v-if="userStore.userInfo">
137
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
167
                     {{ userStore.userInfo.nickname ? userStore.userInfo.nickname : '登录' }}
138
                   </div>
168
                   </div>
139
-                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-fit h-5 justify-center items-center px-2">
140
-                    {{userType}}
169
+<!--                  <div class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-fit h-5 justify-center items-center px-2">-->
170
+<!--                    {{userType}}-->
171
+<!--                  </div>-->
172
+                  <div class="flex gap-1 items-center px-1">
173
+                    <div
174
+                        v-for="(item, index) in userType"
175
+                        :key="index"
176
+                        class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
177
+                      {{ item }}
178
+                    </div>
141
                   </div>
179
                   </div>
142
                 </div>
180
                 </div>
143
 
181
 

+ 2 - 2
src/pages/store/home/components/MerchantHeader.vue

@@ -160,7 +160,7 @@ function handleProductTypeChange(value) {
160
   emit('product-type-change', value)
160
   emit('product-type-change', value)
161
 }
161
 }
162
 watch(() => props.model, (val) => {
162
 watch(() => props.model, (val) => {
163
-  console.log(val)
163
+  // console.log(val)
164
   isCare.value = val.care
164
   isCare.value = val.care
165
 }, {
165
 }, {
166
   deep: true
166
   deep: true
@@ -191,7 +191,7 @@ function handleRelation() {
191
 }
191
 }
192
 
192
 
193
 function handleRemoveRelation() {
193
 function handleRemoveRelation() {
194
-  console.log('on....')
194
+  // console.log('on....')
195
   removeMyRelation({type: 10, type_id: props.model.mer_id}).then(res => {
195
   removeMyRelation({type: 10, type_id: props.model.mer_id}).then(res => {
196
     isCare.value = false
196
     isCare.value = false
197
     uni.showToast({
197
     uni.showToast({

+ 5 - 5
src/pages/store/home/index.vue

@@ -52,7 +52,7 @@ let productList = ref<any>([])
52
 const categoryList = ref<Array<MerchantCategoryModel>>()
52
 const categoryList = ref<Array<MerchantCategoryModel>>()
53
 
53
 
54
 onLoad((options: any) => {
54
 onLoad((options: any) => {
55
-  console.log(options)
55
+  // console.log(options)
56
   if (options && options.shareId) {
56
   if (options && options.shareId) {
57
     userStore.setShareId(options.shareId)
57
     userStore.setShareId(options.shareId)
58
   }
58
   }
@@ -199,7 +199,7 @@ function handleProductTypeChange(typeValue) {
199
   loadList('reload')
199
   loadList('reload')
200
 }
200
 }
201
 function handleOrderChange(priceType) {
201
 function handleOrderChange(priceType) {
202
-  console.log(priceType)
202
+  // console.log(priceType)
203
   state.priceType = priceType
203
   state.priceType = priceType
204
 
204
 
205
   state.params = {
205
   state.params = {
@@ -238,7 +238,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
238
     ...params,
238
     ...params,
239
     ...state.params
239
     ...state.params
240
   }).then(res => {
240
   }).then(res => {
241
-    console.log(res)
241
+    // console.log(res)
242
     if (res && res.pageInfo) {
242
     if (res && res.pageInfo) {
243
       state.triggered = false
243
       state.triggered = false
244
       if (action === 'page') {
244
       if (action === 'page') {
@@ -247,7 +247,7 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
247
       if (action === 'reload') {
247
       if (action === 'reload') {
248
         productList.value = res.pageInfo.list
248
         productList.value = res.pageInfo.list
249
       }
249
       }
250
-      console.log(res.pageInfo)
250
+      // console.log(res.pageInfo)
251
       state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
251
       state.totalPage = Math.ceil(res.pageInfo.total / state.pageSize);
252
       state.status = 'more'
252
       state.status = 'more'
253
 
253
 
@@ -289,7 +289,7 @@ function handleFavoriteChange() {
289
 function handleScrollToLower() {
289
 function handleScrollToLower() {
290
   state.status = 'loading';
290
   state.status = 'loading';
291
   state.currentPage += 1;
291
   state.currentPage += 1;
292
-  console.log(state.totalPage)
292
+  // console.log(state.totalPage)
293
   if (state.currentPage > state.totalPage) {
293
   if (state.currentPage > state.totalPage) {
294
     state.status = 'noMore';
294
     state.status = 'noMore';
295
   } else {
295
   } else {

+ 2 - 3
src/pages/store/product/detail.vue

@@ -90,7 +90,7 @@ onLoad((option: any) => {
90
   state.id = option.id
90
   state.id = option.id
91
   // state.id = 4858
91
   // state.id = 4858
92
   const fromShareId = option.shareID
92
   const fromShareId = option.shareID
93
-  console.log(fromShareId + '---share_id...')
93
+  // console.log(fromShareId + '---share_id...')
94
   // if (state.shareId) {
94
   // if (state.shareId) {
95
   if (fromShareId) {
95
   if (fromShareId) {
96
     userStore.setShareId(fromShareId)
96
     userStore.setShareId(fromShareId)
@@ -555,8 +555,7 @@ function handleShowCustomer() {
555
           <div class="flex font-bold flex items-center gap-1" v-if="detail && detail.store_name">
555
           <div class="flex font-bold flex items-center gap-1" v-if="detail && detail.store_name">
556
            <div class="flex bg-primary text-white rounded text-[10px] text-center">
556
            <div class="flex bg-primary text-white rounded text-[10px] text-center">
557
              <div class=" h-4 w-4 ">仓</div></div>
557
              <div class=" h-4 w-4 ">仓</div></div>
558
-            <div class=" justify-center items-center">
559
-              {{ detail.store_name }}
558
+            <div class=" justify-center items-center" v-html="detail.store_name">
560
             </div>
559
             </div>
561
           </div>
560
           </div>
562
           <div
561
           <div

+ 3 - 3
src/pages/third_party_binding/index.vue

@@ -19,7 +19,7 @@ onLoad(() => {
19
 
19
 
20
 function loadBindingState() {
20
 function loadBindingState() {
21
   getBindingState().then(res => {
21
   getBindingState().then(res => {
22
-    console.log(res)
22
+    // console.log(res)
23
     if (res) {
23
     if (res) {
24
       bindState.value = res
24
       bindState.value = res
25
     }
25
     }
@@ -87,8 +87,8 @@ function getUserInfo() {
87
           code: result.code,
87
           code: result.code,
88
           source: 'cxb'
88
           source: 'cxb'
89
         }).then(unionRes => {
89
         }).then(unionRes => {
90
-          console.log(userStore.userInfo)
91
-          console.log(unionRes)
90
+          // console.log(userStore.userInfo)
91
+          // console.log(unionRes)
92
           updateAccount(1, {
92
           updateAccount(1, {
93
             unionId: unionRes.unionid,
93
             unionId: unionRes.unionid,
94
             nickName: userStore.userInfo.nickname,
94
             nickName: userStore.userInfo.nickname,

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

@@ -10,7 +10,7 @@ const state = reactive({
10
 
10
 
11
 onLoad(() => {
11
 onLoad(() => {
12
   getAboutConfig().then(res => {
12
   getAboutConfig().then(res => {
13
-    console.log(res)
13
+    // console.log(res)
14
   })
14
   })
15
 })
15
 })
16
 </script>
16
 </script>

+ 46 - 13
src/pages/user/index.vue

@@ -144,7 +144,7 @@ onShow(async () => {
144
   }
144
   }
145
 
145
 
146
   totalOrderNumber().then(res => {
146
   totalOrderNumber().then(res => {
147
-    console.log(res)
147
+    // console.log(res)
148
     orderQuantity.value = res
148
     orderQuantity.value = res
149
     // orderQuantity
149
     // orderQuantity
150
   })
150
   })
@@ -234,39 +234,68 @@ function handleShowMyAllOrder(tab?: number) {
234
 
234
 
235
 const userType = computed(() => {
235
 const userType = computed(() => {
236
   const userRichType = userStore.userInfo?.user_rich_type
236
   const userRichType = userStore.userInfo?.user_rich_type
237
-  console.log(userStore.userInfo)
238
-  const bangfu = userStore.userInfo.is_bangfu ? '帮扶中心 ' : ''
237
+  // console.log(userStore.userInfo)
238
+  const bangfu = userStore.userInfo?.is_bangfu ? '帮扶中心 ' : ''
239
   // 创始人
239
   // 创始人
240
   if (userRichType == 3) {
240
   if (userRichType == 3) {
241
-    return bangfu + '创始人'
241
+    if (bangfu) {
242
+      return ['创始人', bangfu]
243
+    }
244
+    return ['创始人']
245
+    // return [].push()
242
   }
246
   }
243
   // 普通用户
247
   // 普通用户
244
   if (userRichType == 0) {
248
   if (userRichType == 0) {
245
-    return bangfu + '用户'
249
+    if (bangfu) {
250
+      return ['用户', bangfu]
251
+    }
252
+    return ['用户']
246
   }
253
   }
247
   // 会员
254
   // 会员
248
   if (userRichType == 1) {
255
   if (userRichType == 1) {
249
-    return bangfu + '会员'
256
+    if (bangfu) {
257
+      return ['会员', bangfu]
258
+    }
259
+    return ['会员']
260
+
250
   }
261
   }
251
   if (userRichType == 3) {
262
   if (userRichType == 3) {
252
-    return bangfu + '创始人'
263
+    if (bangfu) {
264
+      return ['创始人', bangfu]
265
+    }
266
+    return ['创始人']
253
   }
267
   }
254
   // 合伙人
268
   // 合伙人
255
   if (userRichType == 4) {
269
   if (userRichType == 4) {
256
     // return '高级会员'
270
     // return '高级会员'
257
-    return bangfu + 'VIP'
271
+    if (bangfu) {
272
+      return ['VIP', bangfu]
273
+    }
274
+    return ['VIP']
258
   }
275
   }
259
   if (userRichType == 5) {
276
   if (userRichType == 5) {
260
-    return bangfu + '初始级合伙人'
277
+    if (bangfu) {
278
+      return ['初始级合伙人', bangfu]
279
+    }
280
+    return ['初始级合伙人']
261
   }
281
   }
262
   if (userRichType == 6) {
282
   if (userRichType == 6) {
263
-    return bangfu + '中级合伙人'
283
+    if (bangfu) {
284
+      return ['中级合伙人', bangfu]
285
+    }
286
+    return ['中级合伙人']
264
   }
287
   }
265
   if (userRichType == 7) {
288
   if (userRichType == 7) {
266
-    return bangfu + '高级合伙人'
289
+    if (bangfu) {
290
+      return ['高级合伙人', bangfu]
291
+    }
292
+    return ['高级合伙人']
267
   }
293
   }
268
   if (!userRichType) {
294
   if (!userRichType) {
269
-    return bangfu + '用户'
295
+    if (bangfu) {
296
+      return ['用户', bangfu]
297
+    }
298
+    return ['用户']
270
   }
299
   }
271
 })
300
 })
272
 
301
 
@@ -339,10 +368,14 @@ function handleShowMyRulePage() {
339
                 {{ encodePhone(userStore.userInfo.phone) }}
368
                 {{ encodePhone(userStore.userInfo.phone) }}
340
               </div>
369
               </div>
341
             </div>
370
             </div>
371
+            <div class="flex gap-1 items-center px-1">
342
             <div
372
             <div
373
+                v-for="(item, index) in userType"
374
+                :key="index"
343
                 @click="handleShowMyRulePage"
375
                 @click="handleShowMyRulePage"
344
                 class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
376
                 class="flex rounded-full border border-solid border-1px border-yellow text-[12px] text-white w-12 h-5 justify-center items-center w-fit px-1">
345
-              {{ userType }}
377
+              {{ item }}
378
+            </div>
346
             </div>
379
             </div>
347
           </div>
380
           </div>
348
 
381
 

+ 3 - 3
src/pages/user/login/index.vue

@@ -49,12 +49,12 @@ async function handleWexinLogin() {
49
       fullScreen: true
49
       fullScreen: true
50
     },
50
     },
51
     success: result => {
51
     success: result => {
52
-      console.log(result)
52
+      // console.log(result)
53
       getUserUnionId({
53
       getUserUnionId({
54
         code: result.code,
54
         code: result.code,
55
         source: 'cxb'
55
         source: 'cxb'
56
       }).then(unionRes => {
56
       }).then(unionRes => {
57
-        console.log(unionRes)
57
+        // console.log(unionRes)
58
         // const shareId = Cache.get('SHARE_ID')
58
         // const shareId = Cache.get('SHARE_ID')
59
         let redirectPageObj: {page: string, type: 'page' | 'tab'}
59
         let redirectPageObj: {page: string, type: 'page' | 'tab'}
60
         if (Cache.get('SHARE_REDIRECT_PAGE')) {
60
         if (Cache.get('SHARE_REDIRECT_PAGE')) {
@@ -70,7 +70,7 @@ async function handleWexinLogin() {
70
           userStore.login(checkRes.token, checkRes.exp)
70
           userStore.login(checkRes.token, checkRes.exp)
71
           userStore.setUID(checkRes.user.uid)
71
           userStore.setUID(checkRes.user.uid)
72
           userStore.setUserInfo(checkRes.user)
72
           userStore.setUserInfo(checkRes.user)
73
-          console.log(checkRes)
73
+          // console.log(checkRes)
74
           uni.hideLoading();
74
           uni.hideLoading();
75
 
75
 
76
             uni.showToast({
76
             uni.showToast({

+ 1 - 1
src/stores/dacangStore.ts

@@ -6,7 +6,7 @@ export const useDacangStore = defineStore('dacangStore', {
6
     }),
6
     }),
7
     actions: {
7
     actions: {
8
         setClassify(classify: string) {
8
         setClassify(classify: string) {
9
-            console.log('class' + classify)
9
+            // console.log('class' + classify)
10
             this.currentClassify = classify
10
             this.currentClassify = classify
11
         },
11
         },
12
         loadList() {
12
         loadList() {