Basil 2 anos atrás
pai
commit
181b5fa617

+ 1 - 0
components.d.ts

@@ -19,6 +19,7 @@ declare module '@vue/runtime-core' {
19
     CXBEmpty: typeof import('./src/components/CXBEmpty/CXBEmpty.vue')['default']
19
     CXBEmpty: typeof import('./src/components/CXBEmpty/CXBEmpty.vue')['default']
20
     CXBNotLoginButton: typeof import('./src/components/CXBNotLoginButton/CXBNotLoginButton.vue')['default']
20
     CXBNotLoginButton: typeof import('./src/components/CXBNotLoginButton/CXBNotLoginButton.vue')['default']
21
     CXBPhoneLoginButton: typeof import('./src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue')['default']
21
     CXBPhoneLoginButton: typeof import('./src/components/CXBPhoneLoginButton/CXBPhoneLoginButton.vue')['default']
22
+    CXBPrivacyPopup: typeof import('./src/components/CXBPrivacyPopup/CXBPrivacyPopup.vue')['default']
22
     CXBSkuPopup: typeof import('./src/components/CXBSkuPopup/CXBSkuPopup.vue')['default']
23
     CXBSkuPopup: typeof import('./src/components/CXBSkuPopup/CXBSkuPopup.vue')['default']
23
     CXBUserINdexHeader: typeof import('./src/components/CXBUserIndexHeader/CXBUserINdexHeader.vue')['default']
24
     CXBUserINdexHeader: typeof import('./src/components/CXBUserIndexHeader/CXBUserINdexHeader.vue')['default']
24
     CXBYaojinTag: typeof import('./src/components/CXBYaojinTag/CXBYaojinTag.vue')['default']
25
     CXBYaojinTag: typeof import('./src/components/CXBYaojinTag/CXBYaojinTag.vue')['default']

+ 48 - 2
src/App.vue

@@ -1,18 +1,64 @@
1
 <script setup lang="ts">
1
 <script setup lang="ts">
2
-import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
2
+import { onLaunch, onShow, onHide, onReady } from "@dcloudio/uni-app";
3
 import {useAddressStore} from "~/stores/addressStore";
3
 import {useAddressStore} from "~/stores/addressStore";
4
+import {useGlobalData} from "@uni-helper/uni-use";
4
 const addressStore = useAddressStore()
5
 const addressStore = useAddressStore()
5
-
6
+const that = this
7
+const privacyData = uni.getStorageSync('PRIVACY')
6
 onLaunch(() => {
8
 onLaunch(() => {
7
   console.log("App Launch");
9
   console.log("App Launch");
10
+  // that.globalData = {
11
+  //   privacyContractName: '' ,
12
+  //   showPrivacy: false,
13
+  // }
14
+  wx.getPrivacySetting({
15
+    success(res) {
16
+      console.log('是否需要授权:', res.needAuthorization, '隐私协议的名称为:', res.privacyContractName);
17
+      if (res.needAuthorization) {
18
+        uni.setStorageSync('PRIVACY', { privacyContractName: res.privacyContractName, showPrivacy: true})
19
+        // that.globalData.privacyContractName = res.privacyContractName
20
+        // that.globalData.showPrivacy = true
21
+        // globalData.privacyContractName = res.privacyContractName;
22
+        // app.globalDatashowPrivacy = true;
23
+      } else {
24
+        // globalData.showPrivacy = false;
25
+        // this.globalData.showPrivacy = false
26
+        uni.setStorageSync('PRIVACY', { privacyContractName: res.privacyContractName, showPrivacy: false})
27
+
28
+      }
29
+    }
30
+  });
8
 });
31
 });
32
+// useGlobalData()
9
 onShow(() => {
33
 onShow(() => {
34
+
10
   console.log("App Show");
35
   console.log("App Show");
11
   addressStore.getCurrentAddress()
36
   addressStore.getCurrentAddress()
12
 });
37
 });
13
 onHide(() => {
38
 onHide(() => {
14
   console.log("App Hide");
39
   console.log("App Hide");
15
 });
40
 });
41
+onReady(() => {
42
+  const app = getApp()
43
+  app.globalData = {
44
+    privacyContractName: '', //隐私协议的名字
45
+    showPrivacy: false //控制隐私弹窗显隐
46
+  }
47
+
48
+
49
+  // const that = this;
50
+  // wx.getPrivacySetting({
51
+  //   success(res) {
52
+  //     console.log('是否需要授权:', res.needAuthorization, '隐私协议的名称为:', res.privacyContractName);
53
+  //     if (res.needAuthorization) {
54
+  //       globalData.privacyContractName = res.privacyContractName;
55
+  //       app.globalDatashowPrivacy = true;
56
+  //     } else {
57
+  //       globalData.showPrivacy = false;
58
+  //     }
59
+  //   }
60
+  // });
61
+})
16
 </script>
62
 </script>
17
 <style lang="scss">
63
 <style lang="scss">
18
 @import 'nutui-uniapp/styles/index';
64
 @import 'nutui-uniapp/styles/index';

+ 22 - 3
src/apis/user.ts

@@ -83,6 +83,8 @@ enum API {
83
 
83
 
84
     // 评论列表
84
     // 评论列表
85
     GET_REPLY_LIST = '/api/reply/list',
85
     GET_REPLY_LIST = '/api/reply/list',
86
+    // 删除评论
87
+    DEL_REPLY_LIST = '/api/reply/delreply',
86
     // java 我的邀请
88
     // java 我的邀请
87
     SELECT_USER_INVITE_PROFIT = '/gateway/userCenter_service/userInviteService/selectUserInviteProfit',
89
     SELECT_USER_INVITE_PROFIT = '/gateway/userCenter_service/userInviteService/selectUserInviteProfit',
88
     // PHP 我的邀请
90
     // PHP 我的邀请
@@ -166,9 +168,21 @@ enum API {
166
     SPREAD_NUMBER = '/gateway/userCenter_service/userShareProductService/spreadNumber',
168
     SPREAD_NUMBER = '/gateway/userCenter_service/userShareProductService/spreadNumber',
167
 
169
 
168
     // 分享二维码图片
170
     // 分享二维码图片
169
-    SPREAD_IMAGE = '/api/user/spread_image?type=wechat'
170
-}
171
+    SPREAD_IMAGE = '/api/user/spread_image?type=wechat',
172
+
173
+    // 绑定微信小程序关系
174
+    XCX_BANDING = '/api/entropy/xcx_banding',
171
 
175
 
176
+}
177
+// 绑定微信小程序关系
178
+export function xcxBanding(params: { mer_id: string, share_id: string }) {
179
+    return defHttp.get({
180
+        url: API.XCX_BANDING,
181
+        data: {
182
+            ...params
183
+        }
184
+    })
185
+}
172
 /**
186
 /**
173
  * 生成用户图片
187
  * 生成用户图片
174
  * @param params
188
  * @param params
@@ -435,7 +449,12 @@ export function deleteCartItem(cart_id: any[]) {
435
         }
449
         }
436
     })
450
     })
437
 }
451
 }
438
-
452
+// 删除评论
453
+export function removeReply(reply_id: string) {
454
+    return defHttp.post({
455
+        url: `${API.DEL_REPLY_LIST}/${reply_id}`,
456
+    })
457
+}
439
 /**
458
 /**
440
  * 获取我的评价(评论)
459
  * 获取我的评价(评论)
441
  */
460
  */

+ 164 - 0
src/components/CXBPrivacyPopup/CXBPrivacyPopup.vue

@@ -0,0 +1,164 @@
1
+<template>
2
+
3
+
4
+  <view class="privacy" v-if="data.showPrivacy">
5
+    <view class="content">
6
+      <view class="title">隐私保护指引</view>
7
+      <view class="des">
8
+        在使用当前小程序服务之前,请仔细阅读
9
+        <text class="link" @click="openPrivacyContract">{{ data.privacyContractName }}</text>
10
+        。如果你同意{{ data.privacyContractName }},请点击“同意”开始使用。
11
+      </view>
12
+      <view class="btns">
13
+        <button class="item " @click="exitMiniProgram">拒绝</button>
14
+        <button id="agree-btn" class="item agree" open-type="agreePrivacyAuthorization" @agreeprivacyauthorization="handleAgreePrivacyAuthorization">同意</button>
15
+      </view>
16
+    </view>
17
+  </view>
18
+</template>
19
+
20
+<script setup lang="ts">
21
+const data = reactive({
22
+  privacyContractName: '',
23
+  showPrivacy: false
24
+})
25
+const privacyData = uni.getStorageSync('PRIVACY')
26
+
27
+if (privacyData) {
28
+  setTimeout(() => {
29
+    data.privacyContractName = privacyData.privacyContractName
30
+    data.showPrivacy = privacyData.showPrivacy
31
+    // this.showPrivacy = getApp().globalData.showPrivacy;
32
+    // this.privacyContractName = getApp().globalData.privacyContractName;
33
+  }, 500);
34
+}
35
+
36
+// 同意隐私协议
37
+function handleAgreePrivacyAuthorization() {
38
+  // const that = this;
39
+  wx.requirePrivacyAuthorize({
40
+    success: res => {
41
+      data.showPrivacy = false;
42
+      uni.setStorageSync('PRIVACY', {
43
+        privacyContractName: data.privacyContractName,
44
+        showPrivacy: false
45
+      })
46
+      // getApp().globalData.showPrivacy = false;
47
+    }
48
+  });
49
+}
50
+
51
+watch(() => data.showPrivacy, (val) => {
52
+  val ? uni.hideTabBar() : uni.showTabBar()
53
+  // watch(() => state.isShowSignIn, (val) => {
54
+  //   val ? uni.hideTabBar() : uni.showTabBar()
55
+  // })
56
+})
57
+// 拒绝隐私协议
58
+function exitMiniProgram() {
59
+  const that = this;
60
+  uni.showModal({
61
+    content: '如果拒绝,我们将无法获取您的信息, 包括手机号、位置信息、相册等该小程序十分重要的功能,您确定要拒绝吗?',
62
+    success: res => {
63
+      if (res.confirm) {
64
+        that.showPrivacy = false;
65
+        uni.exitMiniProgram({
66
+          success: () => {
67
+            console.log('退出小程序成功');
68
+          }
69
+        });
70
+      }
71
+    }
72
+  });
73
+}
74
+// 跳转协议页面
75
+function openPrivacyContract() {
76
+  wx.openPrivacyContract({
77
+    fail: () => {
78
+      uni.showToast({
79
+        title: '网络错误',
80
+        icon: 'error'
81
+      });
82
+    }
83
+  });
84
+}
85
+
86
+</script>
87
+
88
+<style lang="scss" scoped>
89
+.privacy {
90
+  position: fixed;
91
+  top: 0;
92
+  right: 0;
93
+  bottom: 0;
94
+  left: 0;
95
+  background: rgba(0, 0, 0, 0.5);
96
+  z-index: 9999999;
97
+  display: flex;
98
+  align-items: center;
99
+  justify-content: center;
100
+  .content {
101
+    width: 85vw;
102
+    padding: 50rpx;
103
+    box-sizing: border-box;
104
+    background: #fff;
105
+    border-radius: 16rpx;
106
+    .title {
107
+      text-align: center;
108
+      color: #333;
109
+      font-weight: bold;
110
+      font-size: 34rpx;
111
+    }
112
+    .des {
113
+      font-size: 26rpx;
114
+      color: #666;
115
+      margin-top: 40rpx;
116
+      text-align: justify;
117
+      line-height: 1.6;
118
+      .link {
119
+        color: #F94032;
120
+        text-decoration: underline;
121
+      }
122
+    }
123
+    .btns {
124
+      margin-top: 60rpx;
125
+      display: flex;
126
+      justify-content: space-between;
127
+      .item {
128
+        justify-content: space-between;
129
+        width: 244rpx;
130
+        height: 80rpx;
131
+        display: flex;
132
+        align-items: center;
133
+        justify-content: center;
134
+        border-radius: 16rpx;
135
+        box-sizing: border-box;
136
+        border: none;
137
+        border: 1px solid #ccc;
138
+
139
+      }
140
+      .reject {
141
+        background: #f4f4f5;
142
+        color: #909399;
143
+      }
144
+      .agree {
145
+        background: #F94032;
146
+        color: #fff;
147
+      }
148
+    }
149
+  }
150
+}
151
+button {
152
+  margin: 0;
153
+  padding: 0;
154
+  outline: none;
155
+  border-radius: 0;
156
+  background-color: transparent;
157
+  line-height: inherit;
158
+}
159
+button::after {
160
+  border: none;
161
+}
162
+
163
+
164
+</style>

+ 1 - 0
src/manifest.json

@@ -50,6 +50,7 @@
50
     "quickapp" : {},
50
     "quickapp" : {},
51
     /* 小程序特有相关 */
51
     /* 小程序特有相关 */
52
     "mp-weixin" : {
52
     "mp-weixin" : {
53
+        "__usePrivacyCheck__": true, //隐私政策
53
         "appid" : "wxfb755febdb800f23",
54
         "appid" : "wxfb755febdb800f23",
54
         "setting" : {
55
         "setting" : {
55
             "urlCheck" : false
56
             "urlCheck" : false

Diferenças do arquivo suprimidas por serem muito extensas
+ 1 - 1
src/pages.json


+ 3 - 0
src/pages/home/components/navs.vue

@@ -95,6 +95,9 @@ function handleItemClick(item: any) {
95
       uni.switchTab({
95
       uni.switchTab({
96
         url: '/pages/dacang/list/index'
96
         url: '/pages/dacang/list/index'
97
       })
97
       })
98
+      // uni.navigateTo({
99
+      //   url: '/pagesC/goods_details/index?id=4858'
100
+      // })
98
       break;
101
       break;
99
     }
102
     }
100
     // 会员专区
103
     // 会员专区

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

@@ -30,6 +30,7 @@ function handleProductItemClick(
30
         & VipProductModel
30
         & VipProductModel
31
 ) {
31
 ) {
32
 
32
 
33
+  console.log(item)
33
 
34
 
34
   function navigateToDetail(params) {
35
   function navigateToDetail(params) {
35
     let otherDetailUrl = `/pages/store/product/other`
36
     let otherDetailUrl = `/pages/store/product/other`
@@ -44,7 +45,7 @@ function handleProductItemClick(
44
     })
45
     })
45
   }
46
   }
46
   // 京东
47
   // 京东
47
-  if (item.type === 6) {
48
+  if (item.type == 6) {
48
     // productParams.id = item.skuId
49
     // productParams.id = item.skuId
49
     const productParams: Partial<IProductDetail> = {
50
     const productParams: Partial<IProductDetail> = {
50
       platform: item.type,
51
       platform: item.type,
@@ -64,7 +65,7 @@ function handleProductItemClick(
64
     return navigateToDetail(encodeBase64(productParams))
65
     return navigateToDetail(encodeBase64(productParams))
65
   }
66
   }
66
   // 淘宝
67
   // 淘宝
67
-  if (item.type === 5) {
68
+  if (item.type == 5) {
68
     const productParams: Partial<IProductDetail> = {
69
     const productParams: Partial<IProductDetail> = {
69
       platform: item.type,
70
       platform: item.type,
70
       id: item.id,
71
       id: item.id,
@@ -90,7 +91,7 @@ function handleProductItemClick(
90
   }
91
   }
91
 
92
 
92
   // 拼多多
93
   // 拼多多
93
-  if (item.type === 1) {
94
+  if (item.type == 1) {
94
     const productParams: Partial<IProductDetail> = {
95
     const productParams: Partial<IProductDetail> = {
95
       platform: item.type,
96
       platform: item.type,
96
       id: item.id,
97
       id: item.id,
@@ -108,6 +109,7 @@ function handleProductItemClick(
108
       },
109
       },
109
       // spreadUrl: item.coupon_share_url
110
       // spreadUrl: item.coupon_share_url
110
     }
111
     }
112
+    console.log(productParams)
111
     return navigateToDetail(encodeBase64(productParams))
113
     return navigateToDetail(encodeBase64(productParams))
112
     // uni.navigateTo({
114
     // uni.navigateTo({
113
     //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`
115
     //   url: `/pages/store/product/other?platform=${item.type}&id=${item.id}&allowance=${item.commission}`

+ 3 - 0
src/pages/home/index.vue

@@ -12,6 +12,7 @@ import {useUserStore} from "~/stores/userStore";
12
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
12
 import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
13
 import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
13
 import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
14
 import {CDN_URL} from "~/config/app";
14
 import {CDN_URL} from "~/config/app";
15
+import CXBPrivacyPopup from "~/components/CXBPrivacyPopup/CXBPrivacyPopup.vue";
15
 // import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
16
 // import CXBDialogSIgnIn from "~/components/CXBDialogSignIn/CXBDialogSIgnIn.vue";
16
 // import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
17
 // import CXBDialogSIgnInSucceed from "~/components/CXBDialogSignInSucceed/CXBDialogSIgnInSucceed.vue";
17
 const userStore = useUserStore()
18
 const userStore = useUserStore()
@@ -210,6 +211,8 @@ function handleBannerClick(item) {
210
       @confirm="state.isShowSignIn = false"
211
       @confirm="state.isShowSignIn = false"
211
       @close="state.isShowSignIn = false"
212
       @close="state.isShowSignIn = false"
212
   />
213
   />
214
+
215
+  <CXBPrivacyPopup />
213
 </template>
216
 </template>
214
 <style>
217
 <style>
215
 page {
218
 page {

+ 138 - 13
src/pages/my-reply/index.vue

@@ -1,31 +1,156 @@
1
-<template>
2
-    <div v-if="list && list.length > 0"></div>
3
-    <div v-else>
4
-      <CXBEmpty />
5
-    </div>
6
-</template>
7
 <script setup lang="ts">
1
 <script setup lang="ts">
8
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
2
 import CXBBasePage from "~/components/CXBBasePage/CXBBasePage.vue";
9
-import {getMyReply} from "~/apis/user";
3
+import {getMyReply, removeReply} from "~/apis/user";
10
 import type {ReplyModel} from "~/apis/model/replyModel";
4
 import type {ReplyModel} from "~/apis/model/replyModel";
11
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
5
 import CXBEmpty from "~/components/CXBEmpty/CXBEmpty.vue";
6
+import {CDN_URL} from "~/config/app";
7
+import dayjs from "dayjs";
8
+const deleteIcon = CDN_URL + '/static/assets/search_del_220616.png'
9
+
12
 const list = ref<Array<ReplyModel>>()
10
 const list = ref<Array<ReplyModel>>()
13
 onLoad((options)=> {
11
 onLoad((options)=> {
12
+
13
+  loadList('reload')
14
+} )
15
+const state = reactive({
16
+  isDel: false,
17
+
18
+  currentPage: 1,
19
+  pageSize: 10,
20
+  totalPage: 1,
21
+
22
+  status: "noMore"
23
+})
24
+
25
+function loadList(action: 'page' | 'reload', callback?: (items) => void) {
26
+  const params = {
27
+    page: state.currentPage,
28
+    limit: state.pageSize
29
+  }
30
+
31
+  if (action === 'reload') {
32
+    params.page = 1
33
+  }
14
   getMyReply({
34
   getMyReply({
15
-    page: 1,
16
-    limit: 10
35
+    page: state.currentPage,
36
+    limit: state.pageSize
17
   }).then(res => {
37
   }).then(res => {
18
-    console.log(res)
19
-    list.value = res.list
38
+    if (action === 'page') {
39
+      list.value = list.value.concat(res.list)
40
+    }
41
+    if (action === 'reload') {
42
+      list.value = res.list
43
+    }
44
+    state.totalPage = Math.ceil(res.count / state.pageSize);
45
+    state.status = 'more'
46
+    if (callback) {
47
+      callback(res.list)
48
+    }
20
   })
49
   })
21
-} )
50
+
51
+}
52
+
53
+function handleScrollToLower() {
54
+  state.status = 'loading';
55
+  state.currentPage += 1;
56
+  // console.log(state.totalPage)
57
+  if (state.currentPage > state.totalPage) {
58
+    state.status = 'noMore';
59
+  } else {
60
+    setTimeout(() => {
61
+      loadList('page')
62
+    }, 300)
63
+  }
64
+}
65
+onReachBottom(() => {
66
+  handleScrollToLower()
67
+
68
+})
69
+onPullDownRefresh(() => {
70
+  loadList('reload', items => {
71
+    setTimeout(() => {
72
+      uni.stopPullDownRefresh()
73
+    }, 300)
74
+  })
75
+})
76
+
77
+
78
+function handleRemove(item: any) {
79
+  uni.showModal({
80
+    content: '确定删除?',
81
+    success: function (res) {
82
+      if (res.confirm) {
83
+        removeReply(item.reply_id).then(res => {
84
+          uni.showToast({
85
+            title: '删除成功',
86
+            icon: 'none'
87
+          })
88
+        }).catch(error => {
89
+          uni.showToast({
90
+            title: error,
91
+            icon: "none"
92
+          })
93
+        })
94
+      }
95
+    }
96
+  })
97
+}
22
 </script>
98
 </script>
99
+
100
+<template>
101
+    <div v-if="list && list.length > 0">
102
+      <div v-for="(item, index) in list" :key="index" class="text-[12px] p-3 f-hairline-bottom flex flex-col gap-3">
103
+        <div class="flex justify-between">
104
+          <div class="flex gap-3 items-center">
105
+            <div>
106
+              <image :src="item.avatar" mode="widthFix" class="rounded-full w-10 h-10"></image>
107
+            </div>
108
+            <div class="flex flex-col">
109
+              <div>
110
+                {{ item.nickname }}
111
+              </div>
112
+              <div class="text-gray-500">
113
+                {{ dayjs(item.create_time).format('YYYY-MM-DD')}}
114
+              </div>
115
+            </div>
116
+          </div>
117
+          <image
118
+              @click="handleRemove(item)"
119
+              :src="deleteIcon"
120
+              mode="widthFix" class="w-3 h-3"></image>
121
+        </div>
122
+        <div>
123
+          {{ item.comment }}
124
+        </div>
125
+
126
+        <div class="flex flex-wrap  gap-3" v-if="item.pics !==''">
127
+          <div v-for="(pic, picIndex) in item.pics.split(',')" :key="picIndex" v-if="item.pics.split(',').length">
128
+            <image :src="pic" model="widthFix" class="w-20 h-20"></image>
129
+          </div>
130
+        </div>
131
+
132
+      </div>
133
+      <div class=" flex justify-center items-center text-[12px] text-gray-500" >
134
+        <div v-if="state.status === 'loading'">
135
+          加载中...
136
+        </div>
137
+        <div v-if="state.status === 'noMore'">
138
+          没有更多了~
139
+        </div>
140
+      </div>
141
+    </div>
142
+    <div v-else>
143
+      <CXBEmpty />
144
+    </div>
145
+</template>
23
 <style>
146
 <style>
24
 page {
147
 page {
25
   background: #f8f8f8;
148
   background: #f8f8f8;
26
 }
149
 }
27
 </style>
150
 </style>
28
-<route lang="yaml">
151
+<route lang="yaml" >
29
 style:
152
 style:
30
   navigationBarTitleText: 我的评价
153
   navigationBarTitleText: 我的评价
154
+  enablePullDownRefresh: true
155
+
31
 </route>
156
 </route>

+ 55 - 0
src/pages/my-reply/test.json

@@ -0,0 +1,55 @@
1
+{
2
+  "status": 200,
3
+  "message": "success",
4
+  "data": {
5
+    "count": 2,
6
+    "list": [
7
+      {
8
+        "reply_id": "131",
9
+        "uid": "395",
10
+        "mer_id": "323",
11
+        "order_product_id": "3188",
12
+        "unique": null,
13
+        "product_id": "1296",
14
+        "product_type": "0",
15
+        "product_score": "4",
16
+        "service_score": "3",
17
+        "postage_score": "3",
18
+        "rate": "3.3",
19
+        "comment": "dd",
20
+        "pics": "",
21
+        "create_time": "2023-09-22 10:39:39",
22
+        "merchant_reply_content": null,
23
+        "merchant_reply_time": null,
24
+        "is_del": "0",
25
+        "is_reply": "0",
26
+        "is_virtual": "0",
27
+        "nickname": "炸",
28
+        "avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20210425\/d63bd2aeace508eb83b6fe9194d704b0.png"
29
+      },
30
+      {
31
+        "reply_id": "133",
32
+        "uid": "395",
33
+        "mer_id": "322",
34
+        "order_product_id": "3031",
35
+        "unique": null,
36
+        "product_id": "1637",
37
+        "product_type": "0",
38
+        "product_score": "5",
39
+        "service_score": "5",
40
+        "postage_score": "5",
41
+        "rate": "5.0",
42
+        "comment": "很好,不错,值得推荐",
43
+        "pics": "https:\/\/cdn.bjtdba.com\/chuxubao\/images\/2023-09-22\/9c637202309221100057712.png",
44
+        "create_time": "2023-09-22 11:00:10",
45
+        "merchant_reply_content": null,
46
+        "merchant_reply_time": null,
47
+        "is_del": "0",
48
+        "is_reply": "0",
49
+        "is_virtual": "0",
50
+        "nickname": "炸",
51
+        "avatar": "https:\/\/app.bjtdba.com\/uploads\/def\/20210425\/d63bd2aeace508eb83b6fe9194d704b0.png"
52
+      }
53
+    ]
54
+  }
55
+}

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

@@ -201,7 +201,7 @@ function handleShowDetail(orderItem) {
201
 
201
 
202
 
202
 
203
 
203
 
204
-    <div @tap.stop="handleShowOrderDetail(orderItem)">
204
+    <div @tap.stop="handleShowDetail(orderItem)">
205
         <div v-for="(orderProduct, orderProductIndex) in orderItem.refundProduct" :key="orderProductIndex">
205
         <div v-for="(orderProduct, orderProductIndex) in orderItem.refundProduct" :key="orderProductIndex">
206
           <div class="flex py-2 gap-3">
206
           <div class="flex py-2 gap-3">
207
             <div class="flex-1 flex gap-2">
207
             <div class="flex-1 flex gap-2">

+ 5 - 0
src/pages/product/integral.vue

@@ -56,6 +56,11 @@ function loadList(action: 'page' | 'reload', callback?: (items) => void) {
56
       title: error,
56
       title: error,
57
       icon: 'none'
57
       icon: 'none'
58
     })
58
     })
59
+    if (error == '请登录') {
60
+      uni.navigateTo({
61
+        url: '/pages/user/login/index'
62
+      })
63
+    }
59
   })
64
   })
60
 }
65
 }
61
 function handleScrollToLower() {
66
 function handleScrollToLower() {

+ 13 - 5
src/pages/refund/detail.vue

@@ -77,7 +77,6 @@ function handleHeaderClick() {
77
 </script>
77
 </script>
78
 <template>
78
 <template>
79
 
79
 
80
-  <div class="" v-if="state.detail">
81
     <div class=" ">
80
     <div class=" ">
82
       <div class="top-bg relative">
81
       <div class="top-bg relative">
83
         <div class="text-white p-3">
82
         <div class="text-white p-3">
@@ -86,12 +85,17 @@ function handleHeaderClick() {
86
         </div>
85
         </div>
87
 
86
 
88
         <div class="p-3">
87
         <div class="p-3">
89
-          <div class="bg-white rounded-lg h-18 flex justify-center items-center ">
88
+          <div class="bg-white rounded-lg h-18 flex justify-center items-center w-full ">
90
             <div class="w-full">
89
             <div class="w-full">
91
-              <nut-steps :current="state.currentStep" progress-dot>
90
+              <nut-steps :current="state.currentStep" progress-dot  v-if="state.detail.status == -1">
92
                 <nut-step title="退款申请"></nut-step>
91
                 <nut-step title="退款申请"></nut-step>
93
                 <nut-step title="商家处理"></nut-step>
92
                 <nut-step title="商家处理"></nut-step>
94
-                <nut-step :title="state.detail.status == -1 ? '退款失败' : '退款成功'"></nut-step>
93
+                <nut-step title="退款失败"></nut-step>
94
+              </nut-steps>
95
+              <nut-steps :current="state.currentStep" progress-dot  v-else>
96
+                <nut-step title="退款申请"></nut-step>
97
+                <nut-step title="商家处理"></nut-step>
98
+                <nut-step title="退款成功"></nut-step>
95
               </nut-steps>
99
               </nut-steps>
96
             </div>
100
             </div>
97
 
101
 
@@ -193,7 +197,6 @@ function handleHeaderClick() {
193
       </div>
197
       </div>
194
 
198
 
195
     </div>
199
     </div>
196
-  </div>
197
 </template>
200
 </template>
198
 
201
 
199
 <route lang="yaml">
202
 <route lang="yaml">
@@ -214,4 +217,9 @@ page {
214
   --nut-steps-base-title-font-size: 12px;
217
   --nut-steps-base-title-font-size: 12px;
215
   background: #f8f8f8;
218
   background: #f8f8f8;
216
 }
219
 }
220
+.nut-step-title {
221
+  min-width: 100rpx;
222
+  width: 100rpx;
223
+  text-align: center;
224
+}
217
 </style>
225
 </style>

+ 2 - 1
src/pages/refund/drawback.vue

@@ -91,7 +91,8 @@ function handleSubmit() {
91
         refundApply(state.orderId.toString(), formData).then(res => {
91
         refundApply(state.orderId.toString(), formData).then(res => {
92
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
92
           // {"status":200,"message":"申请退款成功","data":{"refund_order_id":"671"}}
93
           uni.showToast({
93
           uni.showToast({
94
-            title: '申请退款成功'
94
+            title: '申请退款成功',
95
+            icon: 'none'
95
           })
96
           })
96
           setTimeout(() => {
97
           setTimeout(() => {
97
             uni.navigateTo({
98
             uni.navigateTo({

+ 6 - 2
src/pages/refund/index.vue

@@ -106,7 +106,7 @@ function onClickLeft() {
106
       ex-class="bg-white w-screen"
106
       ex-class="bg-white w-screen"
107
       @click-left="onClickLeft"
107
       @click-left="onClickLeft"
108
   />
108
   />
109
-  <div class="fixed top-18 bg-white w-full z-2">
109
+  <div class="fixed top-18 bg-white w-screen z-2">
110
     <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
110
     <nut-tabs v-model="state.tabvalue" class="bg-white" @change="handleTabChange">
111
       <nut-tab-pane title="全部"></nut-tab-pane>
111
       <nut-tab-pane title="全部"></nut-tab-pane>
112
       <nut-tab-pane title="退款中"></nut-tab-pane>
112
       <nut-tab-pane title="退款中"></nut-tab-pane>
@@ -126,7 +126,9 @@ function onClickLeft() {
126
       </div>
126
       </div>
127
     </div>
127
     </div>
128
   </div>
128
   </div>
129
-  <CXBEmpty v-else/>
129
+  <div class="flex h-full flex-col pt-50" v-else>
130
+    <CXBEmpty />
131
+  </div>
130
 
132
 
131
 </template>
133
 </template>
132
 <route lang="yaml">
134
 <route lang="yaml">
@@ -148,4 +150,6 @@ page {
148
 .nut-tab-pane {
150
 .nut-tab-pane {
149
   display: none !important;
151
   display: none !important;
150
 }
152
 }
153
+
154
+
151
 </style>
155
 </style>

+ 4 - 4
src/pages/search/index.vue

@@ -444,16 +444,16 @@ function handleProductItemClick(
444
   }
444
   }
445
 
445
 
446
   // 拼多多
446
   // 拼多多
447
-  if (item.type === 1) {
447
+  if (item.type == 1) {
448
     const productParams: Partial<IProductDetail> = {
448
     const productParams: Partial<IProductDetail> = {
449
       platform: item.type,
449
       platform: item.type,
450
       id: item.id,
450
       id: item.id,
451
       title: item.name,
451
       title: item.name,
452
       featured: [item.thumb],
452
       featured: [item.thumb],
453
       allowance: item.commission,
453
       allowance: item.commission,
454
-      salePrice: item.price,
454
+      salePrice: item.market_price,
455
       // 原价
455
       // 原价
456
-      price: item.market_price,
456
+      price: item.price,
457
       coupon: {
457
       coupon: {
458
         amount: item.coupon_money
458
         amount: item.coupon_money
459
         // amount: item.coupon_money[0].discount,
459
         // amount: item.coupon_money[0].discount,
@@ -515,7 +515,7 @@ function handleProductItemClick(
515
       allowance: item.commission,
515
       allowance: item.commission,
516
       salePrice: item.price,
516
       salePrice: item.price,
517
       // 原价
517
       // 原价
518
-      price: item.market_price,
518
+      price: item.price,
519
       // coupon: {
519
       // coupon: {
520
       //   amount: item.coupon_money
520
       //   amount: item.coupon_money
521
       // },
521
       // },

+ 1 - 1
src/pages/store/home/components/MerchantProductCard.vue

@@ -57,7 +57,7 @@ const is148Merchant = computed(() => {
57
       <div class="line-clamp-2">
57
       <div class="line-clamp-2">
58
         {{item.store_name}}
58
         {{item.store_name}}
59
       </div>
59
       </div>
60
-      <div class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
60
+      <div v-if="!is148Merchant" class="border border-solid border-1 border-red rounded flex text-auto items-center text-[#FE0032] w-fit">
61
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
61
         <image src="https://cdn.bjtdba.com/vod/image/2023-09-15/20230915160858609.png"
62
                mode="widthFix" class="!w-8.5"></image>
62
                mode="widthFix" class="!w-8.5"></image>
63
         <div class="px-2 flex items-center jusitify-center text-xs">
63
         <div class="px-2 flex items-center jusitify-center text-xs">

+ 14 - 4
src/pages/store/product/detail.vue

@@ -6,7 +6,7 @@ import FCell from "~/components/FCell/FCell.vue";
6
 import type {SkuModel} from "~/apis/model/product.model";
6
 import type {SkuModel} from "~/apis/model/product.model";
7
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
7
 import CXBSkuPopup from "~/components/CXBSkuPopup/CXBSkuPopup.vue";
8
 import {createShopping} from "~/apis/order.api";
8
 import {createShopping} from "~/apis/order.api";
9
-import {getAgentInfo, getCartCount, relation, removeMyRelation} from "~/apis/user";
9
+import {getAgentInfo, getCartCount, relation, removeMyRelation, xcxBanding} from "~/apis/user";
10
 import {
10
 import {
11
   DyProductModel,
11
   DyProductModel,
12
   JdProductModel,
12
   JdProductModel,
@@ -32,6 +32,8 @@ const userStore = useUserStore()
32
 const shareShowTips = ref(false)
32
 const shareShowTips = ref(false)
33
 const state = reactive({
33
 const state = reactive({
34
   id: '',
34
   id: '',
35
+  // 推荐人绑定id
36
+  shareId: '',
35
   // 是否收藏
37
   // 是否收藏
36
   isRelation: false,
38
   isRelation: false,
37
   indicatorDots: true,
39
   indicatorDots: true,
@@ -56,7 +58,6 @@ const state = reactive({
56
   flag: '1',
58
   flag: '1',
57
   isNew: '0',
59
   isNew: '0',
58
   cartNum: 1,
60
   cartNum: 1,
59
-
60
   cartCount: NaN,
61
   cartCount: NaN,
61
 })
62
 })
62
 const detail: any = ref(null)
63
 const detail: any = ref(null)
@@ -86,7 +87,7 @@ onLoad((option: any) => {
86
   // const id = '4858'
87
   // const id = '4858'
87
   state.id = option.id
88
   state.id = option.id
88
   // state.id = 4858
89
   // state.id = 4858
89
-
90
+  state.shareId = option.shareID
90
 
91
 
91
   getRecommendList({
92
   getRecommendList({
92
     page: 1,
93
     page: 1,
@@ -99,14 +100,23 @@ onLoad((option: any) => {
99
 
100
 
100
 function loadProductDetail() {
101
 function loadProductDetail() {
101
   getProductDetail(state.id).then(res => {
102
   getProductDetail(state.id).then(res => {
102
-    // console.log(res)
103
+    console.log(res)
103
     detail.value = res
104
     detail.value = res
105
+
104
     if (res && res.mer_id && res.mer_id === '148') {
106
     if (res && res.mer_id && res.mer_id === '148') {
105
       if (detail.value && detail.value.price ) {
107
       if (detail.value && detail.value.price ) {
106
         detail.value.price = detail.value.price * 30
108
         detail.value.price = detail.value.price * 30
107
       }
109
       }
108
     }
110
     }
109
     state.isRelation = res.isRelation
111
     state.isRelation = res.isRelation
112
+    if (res.merchant_type == 2) {
113
+      xcxBanding({
114
+        mer_id: res.mer_id,
115
+        share_id: state.shareId
116
+      }).then(res => {
117
+        console.info(res)
118
+      })
119
+    }
110
     // if (detail.value.mer_id === '148') {
120
     // if (detail.value.mer_id === '148') {
111
     // }
121
     // }
112
     uni.hideLoading()
122
     uni.hideLoading()

+ 0 - 1
src/pages/store/product/other.vue

@@ -120,7 +120,6 @@ function loadProductDetail(product: Partial<IProductDetail>) {
120
         // allowance:
120
         // allowance:
121
       })
121
       })
122
 
122
 
123
-      console.log(res)
124
       if (res.coupon_start_time > 0) {
123
       if (res.coupon_start_time > 0) {
125
         mergeProductDetail({
124
         mergeProductDetail({
126
           coupon: {
125
           coupon: {

+ 13 - 12
src/pages/user/login/index.vue

@@ -169,26 +169,27 @@ function onClickLeft() {
169
       <div class="bg-primary text-white rounded-md py-3 gap-2 flex justify-center items-center"
169
       <div class="bg-primary text-white rounded-md py-3 gap-2 flex justify-center items-center"
170
            @tap="handleWexinLogin"
170
            @tap="handleWexinLogin"
171
       >
171
       >
172
-        <image
173
-            src="https://test.bjtdba.com/applet/static/home/22fbc30945610a32c3b048fb1704b1e.png" mode="widthFix"
174
-            class="w-8 h-8"
175
-        ></image>
176
-        <div>微信授权登录</div>
172
+<!--        <image-->
173
+<!--            src="https://test.bjtdba.com/applet/static/home/22fbc30945610a32c3b048fb1704b1e.png" mode="widthFix"-->
174
+<!--            class="w-8 h-8"-->
175
+<!--        ></image>-->
176
+        <div>一键登录</div>
177
       </div>
177
       </div>
178
 
178
 
179
-      <CXBPhoneLoginButton :text="'微信绑定手机号登录'"/>
180
-      <div class="text-xs text-gray flex flex-col justify-center items-center">
181
-        <div>
182
-          登录代表您同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span
183
-            class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>
184
-        </div>
185
-      </div>
179
+      <CXBPhoneLoginButton :text="'手机号快捷登录'"/>
180
+<!--      <div class="text-xs text-gray flex flex-col justify-center items-center">-->
181
+<!--        <div>-->
182
+<!--          登录代表您同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span-->
183
+<!--            class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>-->
184
+<!--        </div>-->
185
+<!--      </div>-->
186
       <navigator url="/pages/user/login/other-phone"
186
       <navigator url="/pages/user/login/other-phone"
187
           class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm">
187
           class="bg-white rounded-md py-3 gap-2 flex justify-center items-center text-sm">
188
         <div>其他手机号登录</div>
188
         <div>其他手机号登录</div>
189
       </navigator>
189
       </navigator>
190
     </div>
190
     </div>
191
     <CXBNotLoginButton :key="state.key"/>
191
     <CXBNotLoginButton :key="state.key"/>
192
+
192
   </div>
193
   </div>
193
 
194
 
194
 </template>
195
 </template>

+ 6 - 6
src/pages/user/login/other-phone.vue

@@ -22,12 +22,12 @@
22
     <div class="flex w-full">
22
     <div class="flex w-full">
23
       <div class="p-3 w-full">
23
       <div class="p-3 w-full">
24
         <nut-button type="primary" @click="handleLogin" block :disabled="!isFormVerify">登录</nut-button>
24
         <nut-button type="primary" @click="handleLogin" block :disabled="!isFormVerify">登录</nut-button>
25
-        <div class="text-xs text-gray flex flex-col justify-center items-center p-3">
26
-          <div>
27
-            登录代表您同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span
28
-              class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>
29
-          </div>
30
-        </div>
25
+<!--        <div class="text-xs text-gray flex flex-col justify-center items-center p-3">-->
26
+<!--          <div>-->
27
+<!--            我已阅读并同意<span class="text-red text-xs" @click="handleViewXieyi(2)">《注册协议》</span>和<span-->
28
+<!--              class="text-red text-xs" @click="handleViewXieyi(1)">《隐私协议》</span>-->
29
+<!--          </div>-->
30
+<!--        </div>-->
31
 
31
 
32
       </div>
32
       </div>
33
 
33
 

+ 36 - 0
src/pagesC/goods_details/index.vue

@@ -0,0 +1,36 @@
1
+<script setup lang="ts">
2
+onLoad((option) => {
3
+  if (option && option.id) {
4
+    uni.redirectTo({
5
+      url: `/pages/store/product/detail?id=${option.id}&shareID=${option.shareID}`
6
+    })
7
+  } else {
8
+    uni.switchTab({
9
+      url: '/page/home/index'
10
+    })
11
+  }
12
+})
13
+</script>
14
+
15
+<style>
16
+page {
17
+  background-color: #f8f8f8;
18
+}
19
+button {
20
+  margin: 0;
21
+  padding: 0;
22
+  outline: none;
23
+  border-radius: 0;
24
+  background-color: transparent;
25
+  line-height: inherit;
26
+}
27
+
28
+button::after {
29
+  border: none;
30
+}
31
+
32
+</style>
33
+<route lang="yaml">
34
+style:
35
+  navigationBarTitleText: 商品详情
36
+</route>

+ 1 - 0
vite.config.ts

@@ -37,6 +37,7 @@ export default defineConfig({
37
         UniPages({
37
         UniPages({
38
             routeBlockLang: 'yaml',
38
             routeBlockLang: 'yaml',
39
             minify: true,
39
             minify: true,
40
+            subPackages: ['src/pagesC']
40
         }),
41
         }),
41
         UnoCSS(),
42
         UnoCSS(),
42
         // https://github.com/antfu/unplugin-auto-import
43
         // https://github.com/antfu/unplugin-auto-import