Ver código fonte

接口对接&修改bug

Alex 1 ano atrás
pai
commit
31b29b2ddb
100 arquivos alterados com 3801 adições e 1990 exclusões
  1. 5 7
      api/config.js
  2. 4 6
      api/upload.js
  3. 26 15
      components/common-dialog.vue
  4. 23 8
      components/pageScroll/index.vue
  5. 2 1
      manifest.json
  6. 8 4
      pages-home/components/BookListItem.vue
  7. 151 0
      pages-home/components/SubmitConfirm.vue
  8. 339 322
      pages-home/pages/book-order.vue
  9. 12 4
      pages-home/pages/order-success.vue
  10. 34 7
      pages-home/pages/scaned-book.vue
  11. 7 3
      pages-mine/components/address-card.vue
  12. 12 3
      pages-mine/components/book-list.vue
  13. 13 13
      pages-mine/components/category-popup.vue
  14. 15 15
      pages-mine/components/detail-book-item.vue
  15. 135 0
      pages-mine/components/order-actions.vue
  16. 43 51
      pages-mine/components/order-item.vue
  17. 141 0
      pages-mine/components/order-return-actions.vue
  18. 142 0
      pages-mine/components/order-return-item.vue
  19. 45 48
      pages-mine/components/order-timeline.vue
  20. 20 2
      pages-mine/components/return-notice.vue
  21. 206 0
      pages-mine/components/select-book-item.vue
  22. 176 0
      pages-mine/mixin/btnAction.js
  23. 31 7
      pages-mine/pages/address/add-or-update.vue
  24. 116 108
      pages-mine/pages/address/list.vue
  25. 161 122
      pages-mine/pages/apply-return.vue
  26. 249 58
      pages-mine/pages/apply.vue
  27. 176 0
      pages-mine/pages/cashier-desk.vue
  28. 414 133
      pages-mine/pages/complaint.vue
  29. 122 67
      pages-mine/pages/order-detail.vue
  30. 45 43
      pages-mine/pages/order-page.vue
  31. 101 0
      pages-mine/pages/pay-success.vue
  32. 224 0
      pages-mine/pages/return-detail.vue
  33. 246 0
      pages-mine/pages/return-select.vue
  34. 101 46
      pages-mine/pages/wallet.vue
  35. 61 68
      pages-mine/pages/withdraw-detail.vue
  36. 35 44
      pages-mine/pages/withdraw.vue
  37. BIN
      pages-mine/static/pay-success.png
  38. BIN
      pages-mine/static/pay1.png
  39. BIN
      pages-mine/static/pay2.png
  40. 28 66
      pages.json
  41. 7 2
      pages/home/components/BookItem.vue
  42. 14 6
      pages/home/components/InputIsbn.vue
  43. 6 6
      pages/home/components/notScanned.vue
  44. 10 13
      pages/home/index.vue
  45. 1 1
      pages/login/index.vue
  46. 0 158
      pages/mall/classify.vue
  47. 1 1
      pages/mall/components/card.vue
  48. 1 1
      pages/mall/components/collection.vue
  49. 1 1
      pages/mall/components/goods.vue
  50. 0 502
      pages/mall/shopping-cart.vue
  51. 56 26
      pages/mine/index.vue
  52. 35 0
      static/css/common.scss
  53. BIN
      static/img/barcode.png
  54. BIN
      static/img/kefu.png
  55. BIN
      static/img/logo2.png
  56. BIN
      static/img/logo3.png
  57. BIN
      static/img/logo_hui.png
  58. BIN
      static/img/quesheng.png
  59. BIN
      static/img/step1.png
  60. BIN
      static/img/step2.png
  61. BIN
      static/img/step3.png
  62. BIN
      static/nav/mine-order-1.png
  63. BIN
      static/nav/mine-order-2.png
  64. BIN
      static/nav/mine-order-3.png
  65. BIN
      static/nav/mine-order-4.png
  66. BIN
      static/nav/mine-order-5.png
  67. BIN
      static/nodata/collection.png
  68. BIN
      static/nodata/fans.png
  69. BIN
      static/nodata/news.png
  70. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map
  71. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map
  72. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map
  73. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/common-dialog.js.map
  74. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/img-swiper.js.map
  75. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/loadmore.js.map
  76. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/dial-nav.js.map
  77. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/label-count.js.map
  78. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-search.js.map
  79. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-top-search.js.map
  80. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/no-data.js.map
  81. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/pageScroll/index.js.map
  82. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/search/search.js.map
  83. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/select-reason.js.map
  84. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/tag.js.map
  85. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/components/title-operate.js.map
  86. 0 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/border-success.js.map
  87. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookItem.js.map
  88. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookListItem.js.map
  89. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/PickupTimePicker.js.map
  90. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/SubmitConfirm.js.map
  91. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/book-order.js.map
  92. 0 1
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/border-success.js.map
  93. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/order-success.js.map
  94. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/scaned-book.js.map
  95. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/apply-reason.js.map
  96. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/back-goods.js.map
  97. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/back-status.js.map
  98. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/select-goods-pop.js.map
  99. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/select-item.js.map
  100. 0 0
      unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/express/list.js.map

+ 5 - 7
api/config.js

@@ -28,9 +28,7 @@ export const UVIEWUI_HTTP_CONFIG = {
 
 // 此处配置请求拦截器
 export const httpRequest = (config) => {
-	console.log('请求拦截器>>>>>', config);
 	const token = uni.getStorageSync('token');
-	console.log('token>>>>>', token);
 	config.header.Authorization = token ? `Bearer ${token}` : ''
 	return config;
 }
@@ -39,7 +37,7 @@ export const httpRequest = (config) => {
 export const httpResponse = (res) => {
 	return new Promise(function(resolve, reject) {
 		if (res.statusCode == 200) {
-			console.log('成功>>>>');
+			console.log('成功>>>>', res.data);
 			if (res.data.code == 0) {
 				uni.showToast({
 					icon: 'none',
@@ -51,8 +49,8 @@ export const httpResponse = (res) => {
 				console.log('接口未登录>>>>401');
 				// 未登录
 				uni.removeStorageSync('token');
-				uni.navigateTo({
-					url: '/pages/login/index'
+				uni.switchTab({
+					url: '/pages/home/index'
 				})
 				return reject(res.data);
 			}
@@ -61,8 +59,8 @@ export const httpResponse = (res) => {
 		if (res.statusCode == 401) {
 			console.log('未登录>>>>');
 			// 未登录
-			uni.navigateTo({
-				url: '/pages/login/index'
+			uni.switchTab({
+				url: '/pages/home/index'
 			})
 			uni.removeStorageSync('token');
 			return reject(res.data);

+ 4 - 6
api/upload.js

@@ -29,9 +29,7 @@ export const UVIEWUI_HTTP_CONFIG = {
 
 // 此处配置请求拦截器
 export const httpRequest = (config) => {
-	console.log('请求拦截器>>>>>',config);
 	const token = uni.getStorageSync('token');
-	console.log('token>>>>>',token);
 	config.header = {
 		token: token
 	}
@@ -54,8 +52,8 @@ export const httpResponse = (res) => {
 				console.log('接口未登录>>>>401');
 				// 未登录
 				uni.removeStorageSync('token');
-				uni.navigateTo({
-					url:'/pages/login/index'
+				uni.switchTab({
+					url: '/pages/home/index'
 				})
 				return reject(res.data);
 			}
@@ -64,8 +62,8 @@ export const httpResponse = (res) => {
 		if (res.statusCode == 401) {
 			console.log('未登录>>>>');
 			// 未登录
-			uni.navigateTo({
-				url:'/pages/login/index'
+			uni.switchTab({
+				url: '/pages/home/index'
 			})
 			uni.removeStorageSync('token');
 			return reject(res.data);

+ 26 - 15
components/common-dialog.vue

@@ -1,5 +1,5 @@
 <template>
-    <u-popup v-model="showPopup" @close="closePopup" mode="center" border-radius="20">
+    <u-popup v-model="showPopup" @close="closePopup" mode="center" border-radius="20" :width="width">
         <view class="dialog-content">
             <!-- 标题 -->
             <view v-if="title" class="dialog-title">{{ title }}</view>
@@ -10,7 +10,7 @@
             </view>
 
             <!-- 按钮区域 -->
-            <view class="dialog-footer" :class="{ 'single-btn': !showCancel }">
+            <view class="dialog-footer" :class="{ 'single-btn': !showCancel }" v-if="showFooter" width="90%">
                 <button v-if="showCancel" class="cancel-btn" @click="handleCancel">{{ cancelText }}</button>
                 <button class="confirm-btn" @click="handleConfirm">{{ confirmText }}</button>
             </view>
@@ -21,6 +21,11 @@
 <script>
 export default {
     props: {
+        // 弹窗宽度
+        width: {
+            type: String,
+            default: '580rpx'
+        },
         // 弹窗标题
         title: {
             type: String,
@@ -40,6 +45,11 @@ export default {
         cancelText: {
             type: String,
             default: '取消'
+        },
+        // 是否显示底部按钮
+        showFooter: {
+            type: Boolean,
+            default: true
         }
     },
     data() {
@@ -68,7 +78,6 @@ export default {
 
 <style lang="scss">
 .dialog-content {
-    width: 580rpx;
     background: #FFFFFF;
     border-radius: 20rpx;
     overflow: hidden;
@@ -78,21 +87,21 @@ export default {
         color: #333333;
         text-align: center;
         padding: 30rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
+        font-family: PingFang SC;
+        font-weight: bold;
     }
 
     .dialog-body {
         padding: 0 40rpx;
         text-align: center;
-		line-height: 48rpx;
+        line-height: 48rpx;
     }
 
     .dialog-footer {
         display: flex;
-		gap: 30rpx;
-		padding: 30rpx;
-		padding-bottom: 40rpx;
+        gap: 30rpx;
+        padding: 30rpx;
+        padding-bottom: 40rpx;
 
         button {
             flex: 1;
@@ -101,9 +110,10 @@ export default {
             font-size: 32rpx;
             border: none;
             margin: 0;
-			&::after{
-				border: none;
-			}
+
+            &::after {
+                border: none;
+            }
 
             &.cancel-btn {
                 background-color: #F5F5F5;
@@ -117,11 +127,12 @@ export default {
         }
 
         &.single-btn {
-			display: flex;
-			justify-content: center;
+            display: flex;
+            justify-content: center;
+
             .confirm-btn {
                 flex: 1;
-				max-width: 280rpx;
+                max-width: 280rpx;
             }
         }
     }

+ 23 - 8
components/pageScroll/index.vue

@@ -17,7 +17,7 @@
 
         <!-- 加载更多 -->
         <view class="load-more" v-if="dataList.length > 0">
-            <u-divider bg-color="#F5F5F5">{{ hasMore ? '加载中...' : '我是有底线的' }}</u-divider>
+            <u-divider :bg-color="bgColor">{{ hasMore ? '加载中...' : '我是有底线的' }}</u-divider>
         </view>
     </scroll-view>
 </template>
@@ -34,6 +34,10 @@ export default {
         }
     },
     props: {
+        bgColor: {
+            type: String,
+            default: '#F5F5F5'
+        },
         url: {
             type: String,
             required: true,
@@ -49,14 +53,24 @@ export default {
         },
         emptyText: {
             type: String,
+        },
+        params: {
+            type: Object,
+            default: {}
+        },
+        immediate: {
+            type: Boolean,
+            default: true
         }
     },
     onLoad() {
-        this.loadData()
+        if (this.immediate) {
+            this.loadData()
+        }
     },
     methods: {
         // 加载数据
-        async loadData(isRefresh = false) {
+        async loadData(isRefresh = false, params = {}) {
             if (isRefresh) {
                 this.page = 1
                 this.hasMore = true
@@ -65,7 +79,7 @@ export default {
 
             this.loading = true
             try {
-                const res = await this.fetchBookList()
+                const res = await this.fetchBookList(params)
 
                 if (isRefresh) {
                     this.dataList = res.list
@@ -90,14 +104,15 @@ export default {
         },
 
         // 模拟获取数据
-        fetchBookList() {
+        fetchBookList(params = {}) {
             return new Promise((resolve) => {
                 uni.showLoading({
                     title: '加载中...',
                 })
                 uni.$u.http.get(this.url, {
                     pageSize: this.pageSize,
-                    pageNum: this.page
+                    pageNum: this.page,
+                    ...params
                 }).then(res => {
                     resolve({
                         list: res.rows,
@@ -119,13 +134,13 @@ export default {
         async onRefresh() {
             if (this.loading) return
             this.isRefreshing = true
-            await this.loadData(true)
+            await this.loadData(true, this.params)
         },
 
         // 上拉加载更多
         async onLoadMore() {
             if (this.loading || !this.hasMore) return
-            await this.loadData()
+            await this.loadData(false, this.params)
         },
     }
 }

+ 2 - 1
manifest.json

@@ -116,7 +116,8 @@
         "usingComponents" : true,
         "permission" : {},
 		//小程序隐私协议
-		"__usePrivacyCheck__": true
+		"__usePrivacyCheck__": true,
+		"lazyCodeLoading": "requiredComponents"
     },
     "mp-alipay" : {
         "usingComponents" : true,

+ 8 - 4
pages-home/components/BookListItem.vue

@@ -9,7 +9,7 @@
                 <text>回收价:</text>
                 <text class="price">¥{{ book.recycleMoney }}</text>
             </view>
-            <view class="action-btn" :class="statusMap[book.status]">
+            <view class="action-btn" :class="statusMap[book.status]" @click="handleAction">
                 <u-icon name="plus" size="16" v-if="book.status == 2"></u-icon>
                 <text style="margin-left:6rpx">{{ getStatusText(book.status) }}</text>
             </view>
@@ -53,9 +53,13 @@ export default {
             }
             return statusKey[key] || key
         },
-        updateCheckbox(value) {
-            this.$set(this.book, 'selected', value)
-            this.$emit('checked', this.book)
+        updateCheckbox({ value }) {
+            this.$nextTick(() => {
+                this.$emit('checked', { book: this.book, checked: value })
+            })
+        },
+        handleAction() {
+            this.$emit('action', this.book)
         }
     }
 }

+ 151 - 0
pages-home/components/SubmitConfirm.vue

@@ -0,0 +1,151 @@
+<template>
+    <u-popup v-model="showPopup" @close="closePopup" mode="center" border-radius="20" :width="width">
+        <view class="submit-confirm">
+            <view class="icon-wrapper">
+                <image src="/static/tabbar/home2.png" class="tip-icon"></image>
+                <text class="tip-text">温馨提示</text>
+            </view>
+
+            <view class="content">
+                <view>目前回收订单在包裹签收后<span class="highlight">15天内</span>完成品相审核与打款,审核时效内<span class="highlight">勿催~</span>
+                </view>
+                <view class="mt-20">为避免混单,影响审核到账时间,您需核对订单书籍,<span class="highlight">自行打包</span>后,交给取件员(<span
+                        class="highlight">包装上备注书嗨+物流单号</span>)。如随意放置包裹导致订单书籍遗失,平台概不负责。</view>
+                <view class="mt-20"><span
+                        class="highlight">卖书运费(不含包装费)由书嗨承担</span>,我们会安排京东、德邦或顺丰上门取件(不支持自寄和到付件),不需要您垫付运费。</view>
+            </view>
+
+            <view class="footer">
+                <button class="cancel-btn" @click="handleCancel">取消</button>
+                <button class="confirm-btn" :disabled="countdown > 0" @click="handleConfirm">
+                    确定提交{{ countdown > 0 ? `(${countdown}s)` : '' }}
+                </button>
+            </view>
+        </view>
+    </u-popup>
+</template>
+
+<script>
+export default {
+    props: {
+        width: {
+            type: String,
+            default: '92%'
+        }
+    },
+    data() {
+        return {
+            showPopup: false,
+            countdown: 15
+        }
+    },
+    methods: {
+        openPopup() {
+            this.showPopup = true
+            this.startCountdown()
+        },
+        closePopup() {
+            this.showPopup = false
+            this.countdown = 15
+        },
+        handleConfirm() {
+            this.$emit('confirm')
+            this.closePopup()
+        },
+        handleCancel() {
+            this.$emit('cancel')
+            this.closePopup()
+        },
+        startCountdown() {
+            this.countdown = 15
+            const timer = setInterval(() => {
+                if (this.countdown > 0) {
+                    this.countdown--
+                } else {
+                    clearInterval(timer)
+                }
+            }, 1000)
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.submit-confirm {
+    background: #FFFFFF;
+    border-radius: 20rpx;
+    overflow: hidden;
+    padding: 30rpx;
+
+    .icon-wrapper {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        margin-bottom: 20rpx;
+
+        .tip-icon {
+            width: 48rpx;
+            height: 48rpx;
+            margin-right: 10rpx;
+        }
+
+        .tip-text {
+            font-family: Source Han Sans CN;
+            font-weight: bold;
+            font-size: 36rpx;
+            color: #37C148;
+        }
+    }
+
+    .content {
+        padding: 0 10rpx;
+        font-size: 32rpx;
+        color: #333333;
+        line-height: 48rpx;
+        view{
+            font-size: 32rpx;
+        }
+        .highlight {
+            color: #FF0000;
+        }
+    }
+
+    .mt-20 {
+        margin-top: 20rpx;
+    }
+
+    .footer {
+        display: flex;
+        gap: 30rpx;
+        margin-top: 30rpx;
+        padding: 0 10rpx;
+
+        button {
+            flex: 1;
+            height: 88rpx;
+            line-height: 88rpx;
+            font-size: 32rpx;
+            border: none;
+            border-radius: 10rpx;
+
+            &::after {
+                border: none;
+            }
+
+            &.cancel-btn {
+                background-color: #F5F5F5;
+                color: #333333;
+            }
+
+            &.confirm-btn {
+                background-color: #38C148;
+                color: #FFFFFF;
+
+                &:disabled {
+                    opacity: 0.7;
+                }
+            }
+        }
+    }
+}
+</style>

+ 339 - 322
pages-home/pages/book-order.vue

@@ -1,330 +1,347 @@
 <template>
-	<view class="book-order">
-		<!-- 取货地址部分 -->
-		<view class="section-card">
-			<view class="flex-a flex-j-b mb-20" @click="handleAddress" v-if="defaultAddr.id">
-				<image src="../static/adderss.png" style="width:40rpx;height: 40rpx;"></image>
-				<view class="flex-d flex-1 ml-24" style="margin-right: 90rpx;">
-					<view class="flex-a flex-j-b  mb-10">
-						<view :style="titleStyle">发货人:{{ defaultAddr.name }}</view>
-						<view :style="titleStyle">{{ defaultAddr.mobile }}</view>
-					</view>
-					<view :style="titleStyle">地址:{{ defaultAddr.fullAddress }}</view>
-				</view>
-				<u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
-			</view>
-
-			<view class="flex-a flex-j-b" @click="handleAddress" v-else>
-				<view class="flex-a">
-					<u-icon name="plus-circle-fill" :size="48" color="#38C148" top="2"></u-icon>
-					<view :style="titleStyle" class="ml-10 font-30">取货地址</view>
-					<text class="u-required">*</text>
-				</view>
-
-				<view class="flex-a">
-					<view :style="titleStyle" class="ml-10">请添加</view>
-					<u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
-				</view>
-			</view>
-
-			<view class="free-pickup mb-20 mt-20">
-				<view class="pickup-title">免费上门取货</view>
-				<view class="pickup-desc">书嗨将预约指定快递上门取件,邮费由书嗨承担</view>
-			</view>
-			<view class="flex-a flex-j-b time-card" style="padding:0 10rpx" @click="showTimePicker = true">
-				<view class="flex-a">
-					<view :style="titleStyle" class="ml-10 font-28">取件时间</view>
-					<text class="u-required">*</text>
-				</view>
-
-				<view class="flex-a">
-
-					<view v-if="selectedTime.day" :style="titleStyle" class="ml-10">{{ selectedTime.day }}
-						{{ selectedTime.time }}
-					</view>
-					<view v-else :style="titleStyle" class="ml-10">请选择快递上门取件时间</view>
-					<u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
-				</view>
-			</view>
-		</view>
-
-		<!-- 快递备注部分 -->
-		<view class="section-card">
-			<view class="flex-a flex-j-b mb-20" @click="showExpressPicker">
-				<view class="flex-a">
-					<view :style="titleStyle" class="font-28">快递备注</view>
-				</view>
-
-				<view class="flex-a">
-					<view :style="titleStyle" class="ml-10">{{ submitData.expressDelivery || '请选择' }}</view>
-					<u-icon name="arrow-right" :size="28" color="#666" top="3"></u-icon>
-				</view>
-			</view>
-			<view class="express-desc">请从【顺丰】或【京东】中选择可正常收寄的快递,如您不选择,则由系统根据区域情况自动分配</view>
-		</view>
-
-		<!-- 书籍列表 -->
-		<view class="book-list">
-			<book-item v-for="book in books" :key="book.id" :book="book"></book-item>
-		</view>
-
-		<!-- 底部栏 -->
-		<view class="bottom-bar">
-			<view class="agreement">
-				<u-checkbox v-model="agreed" shape="circle">
-					<text class="agreement-text">我已阅读并同意</text>
-					<text class="agreement-link">《书嗨用户协议》</text>
-				</u-checkbox>
-			</view>
-			<view class="order-summary">
-				<view class="total">
-					共<text class="price">{{ totalBooks }}</text>件 预估回收价
-					<text class="price">¥{{ totalPrice }}</text>
-				</view>
-				<u-button type="primary" @click="submitOrder" :custom-style="{ margin: 0 }">提交订单</u-button>
-			</view>
-		</view>
-
-		<!-- 添加快递选择器 -->
-		<u-picker v-model="showPicker" mode="selector" :range="expressList" @confirm="onExpressConfirm"
-			@cancel="showPicker = false" range-key="name"></u-picker>
-
-		<pickup-time-picker :show.sync="showTimePicker" @confirm="onTimeConfirm"></pickup-time-picker>
-	</view>
+    <view class="book-order">
+        <!-- 取货地址部分 -->
+        <view class="section-card">
+            <view class="flex-a flex-j-b mb-20" @click="handleAddress" v-if="defaultAddr.id">
+                <image src="../static/adderss.png" style="width:40rpx;height: 40rpx;"></image>
+                <view class="flex-d flex-1 ml-24" style="margin-right: 90rpx;">
+                    <view class="flex-a flex-j-b  mb-10">
+                        <view :style="titleStyle">发货人:{{ defaultAddr.name }}</view>
+                        <view :style="titleStyle">{{ defaultAddr.mobile }}</view>
+                    </view>
+                    <view :style="titleStyle">地址:{{ defaultAddr.fullAddress }}</view>
+                </view>
+                <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
+            </view>
+
+            <view class="flex-a flex-j-b" @click="handleAddress" v-else>
+                <view class="flex-a">
+                    <u-icon name="plus-circle-fill" :size="48" color="#38C148" top="2"></u-icon>
+                    <view :style="titleStyle" class="ml-10 font-30">取货地址</view>
+                    <text class="u-required">*</text>
+                </view>
+
+                <view class="flex-a">
+                    <view :style="titleStyle" class="ml-10">请添加</view>
+                    <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
+                </view>
+            </view>
+
+            <view class="free-pickup mb-20 mt-20">
+                <view class="pickup-title">免费上门取货</view>
+                <view class="pickup-desc">书嗨将预约指定快递上门取件,邮费由书嗨承担</view>
+            </view>
+            <view class="flex-a flex-j-b time-card" style="padding:0 10rpx" @click="showTimePicker = true">
+                <view class="flex-a">
+                    <view :style="titleStyle" class="ml-10 font-28">取件时间</view>
+                    <text class="u-required">*</text>
+                </view>
+
+                <view class="flex-a">
+
+                    <view v-if="selectedTime.day" :style="titleStyle" class="ml-10">{{ selectedTime.day }}
+                        {{ selectedTime.time }}
+                    </view>
+                    <view v-else :style="titleStyle" class="ml-10">请选择快递上门取件时间</view>
+                    <u-icon name="arrow-right" :size="28" color="#666" top="4"></u-icon>
+                </view>
+            </view>
+        </view>
+
+        <!-- 快递备注部分 -->
+        <view class="section-card">
+            <view class="flex-a flex-j-b mb-20" @click="showExpressPicker">
+                <view class="flex-a">
+                    <view :style="titleStyle" class="font-28">快递备注</view>
+                </view>
+
+                <view class="flex-a">
+                    <view :style="titleStyle" class="ml-10">{{ submitData.expressDelivery || '请选择' }}</view>
+                    <u-icon name="arrow-right" :size="28" color="#666" top="3"></u-icon>
+                </view>
+            </view>
+            <view class="express-desc">请从【顺丰】或【京东】中选择可正常收寄的快递,如您不选择,则由系统根据区域情况自动分配</view>
+        </view>
+
+        <!-- 书籍列表 -->
+        <view class="book-list">
+            <book-item v-for="book in books" :key="book.id" :book="book"></book-item>
+        </view>
+
+        <!-- 底部栏 -->
+        <view class="bottom-bar">
+            <view class="agreement">
+                <u-checkbox v-model="agreed" shape="circle">
+                    <text class="agreement-text">我已阅读并同意</text>
+                    <text class="agreement-link">《书嗨用户协议》</text>
+                </u-checkbox>
+            </view>
+            <view class="order-summary">
+                <view class="total">
+                    共<text class="price">{{ totalBooks }}</text>件 预估回收价
+                    <text class="price">¥{{ totalPrice }}</text>
+                </view>
+                <u-button type="primary" @click="submitOrder" :custom-style="{ margin: 0 }">提交订单</u-button>
+            </view>
+        </view>
+
+        <!-- 添加快递选择器 -->
+        <u-picker v-model="showPicker" mode="selector" :range="expressList" @confirm="onExpressConfirm"
+            @cancel="showPicker = false" range-key="name"></u-picker>
+
+        <pickup-time-picker :show.sync="showTimePicker" @confirm="onTimeConfirm"></pickup-time-picker>
+
+        <submit-confirm ref="submitConfirmDialog" @confirm="handleConfirmSubmit"></submit-confirm>
+    </view>
 </template>
 
 <script>
-	import bookItem from '@/pages-home/components/BookItem.vue'
-	import pickupTimePicker from '@/pages-home/components/PickupTimePicker.vue'
-
-	export default {
-		components: {
-			bookItem,
-			pickupTimePicker
-		},
-		data() {
-			return {
-				titleStyle: {
-					'font-family': 'PingFang SC',
-					'font-weight': 400,
-					color: '#333333',
-				},
-				agreed: false,
-				books: [],
-
-				showPicker: false,
-				expressList: [],
-				showTimePicker: false,
-				selectedTime: {},
-				defaultAddr: {},
-
-				submitData: {
-					expressDelivery: '',
-					"orderId": "",
-					"addressId": "",
-					"schedulePickupStartTime": "",
-					"schedulePickupEndTime": "",
-					"expressDelivery": "",
-					"remark": ""
-				}
-			}
-		},
-		computed: {
-			totalBooks() {
-				return this.books.reduce((sum, book) => sum + (book.num || 1), 0)
-			},
-			totalPrice() {
-				return this.books.reduce((sum, book) => sum + book.recycleMoney * (book.num || 1), 0).toFixed(2)
-			}
-		},
-		methods: {
-			//时间选择
-			onTimeConfirm(data) {
-				this.selectedTime = data
-				//格式化提交数据的时间
-				let date = this.$u.timeFormat(data.date, 'yyyy-mm-dd')
-				let times = data.time.split('-')
-
-				this.submitData.schedulePickupStartTime = `${date} ${times[0]}`
-				this.submitData.schedulePickupEndTime = `${date} ${times[1]}`
-				console.log(date, this.submitData, 'data')
-			},
-
-			//打开快递选择器
-			showExpressPicker() {
-				this.showPicker = true
-			},
-			//确认选择快递  
-			onExpressConfirm(e) {
-				if (!e.length) return
-				let item = this.expressList[e[0]]
-				this.submitData.expressDelivery = item.name
-				this.showPicker = false
-			},
-			//添加或者选择地址
-			handleAddress() {
-				uni.navigateTo({
-					url: `/pages-mine/pages/address/list?id=${this.defaultAddr.id}&isSelect=1`
-				})
-			},
-
-			calculateTotal() {
-				this.totalBooks = this.books.reduce((sum, book) => sum + book.quantity, 0)
-				this.totalPrice = this.books
-					.reduce((sum, book) => sum + book.quantity * parseFloat(book.price), 0)
-					.toFixed(2)
-			},
-			submitOrder() {
-				if (!this.agreed) {
-					this.$u.toast('请先同意用户协议')
-					return
-				}
-				// 处理订单提交
-				uni.$u.http.post('/token/order/submitOrder', this.submitData).then(res => {
-					if (res.code == 200) {
-						uni.navigateTo({
-							url: "/pages-home/pages/order-success"
-						})
-					} else {
-						uni.showToast({
-							title: res.msg,
-							icon: 'none'
-						})
-					}
-				})
-			},
-			//获取默认地址 /api/token/user/address/getDefault
-			getDefaultAddress() {
-				uni.$u.http.get('/token/user/address/getDefault').then(res => {
-					if (res.code == 200) {
-						this.defaultAddr = res.data
-						this.submitData.addressId = this.defaultAddr.id
-					}
-				})
-			},
-			//获取当前用户未提交订单 /api/token/order/lastOrder
-			getLastOrder() {
-				uni.$u.http.get('/token/order/lastOrder').then(res => {
-					if (res.code == 200) {
-						this.books = res.data ? res.data.orderDetailList.map(v => {
-								v.orderId = res.data.orderId
-								return v
-							}) : [],
-
-							this.submitData.orderId = this.books[0].orderId
-					}
-				})
-			},
-			//获取预提交订单
-			getPreSubmitOrder() {
-				let orderId = uni.getStorageSync('orderId')
-				uni.$u.http.get('/token/order/preSubmit?orderId=' + orderId).then(res => {
-					this.submitData.orderId = orderId
-					this.defaultAddr = res.data.defaultAddress
-					this.submitData.addressId = this.defaultAddr.id
-
-					this.books = res.data.orderDetailList
-					this.expressList = res.data.expressTypes.map(v => ({
-						name: v
-					}))
-				})
-			},
-
-		},
-		mounted() {
-			this.getPreSubmitOrder()
-
-			uni.$on('selectAddr', (item) => {
-				if (item.id) {
-					this.defaultAddr = item
-					this.submitData.addressId = this.defaultAddr.id
-				}
-			})
-		}
-	}
+import bookItem from '@/pages-home/components/BookItem.vue'
+import pickupTimePicker from '@/pages-home/components/PickupTimePicker.vue'
+import SubmitConfirm from '@/pages-home/components/SubmitConfirm.vue'
+
+export default {
+    components: {
+        bookItem,
+        pickupTimePicker,
+        SubmitConfirm
+    },
+    data() {
+        return {
+            titleStyle: {
+                'font-family': 'PingFang SC',
+                'font-weight': 400,
+                color: '#333333',
+            },
+            agreed: false,
+            books: [],
+
+            showPicker: false,
+            expressList: [],
+            showTimePicker: false,
+            selectedTime: {},
+            defaultAddr: {},
+
+            submitData: {
+                expressDelivery: '',
+                "orderId": "",
+                "addressId": "",
+                "schedulePickupStartTime": "",
+                "schedulePickupEndTime": "",
+                "expressDelivery": "",
+                "remark": ""
+            }
+        }
+    },
+    computed: {
+        totalBooks() {
+            return this.books.reduce((sum, book) => sum + (book.num || 1), 0)
+        },
+        totalPrice() {
+            return this.books.reduce((sum, book) => sum + book.recycleMoney, 0).toFixed(2)
+        }
+    },
+    methods: {
+        //时间选择
+        onTimeConfirm(data) {
+            this.selectedTime = data
+            //格式化提交数据的时间
+            let date = this.$u.timeFormat(data.date, 'yyyy-mm-dd')
+            let times = data.time.split('-')
+
+            this.submitData.schedulePickupStartTime = `${date} ${times[0]}`
+            this.submitData.schedulePickupEndTime = `${date} ${times[1]}`
+            console.log(date, this.submitData, 'data')
+        },
+
+        //打开快递选择器
+        showExpressPicker() {
+            this.showPicker = true
+        },
+        //确认选择快递  
+        onExpressConfirm(e) {
+            if (!e.length) return
+            let item = this.expressList[e[0]]
+            this.submitData.expressDelivery = item.name
+            this.showPicker = false
+        },
+        //添加或者选择地址
+        handleAddress() {
+            uni.navigateTo({
+                url: `/pages-mine/pages/address/list?id=${this.defaultAddr.id}&isSelect=1`
+            })
+        },
+
+        calculateTotal() {
+            this.totalBooks = this.books.reduce((sum, book) => sum + book.quantity, 0)
+            this.totalPrice = this.books
+                .reduce((sum, book) => sum + book.quantity * parseFloat(book.price), 0)
+                .toFixed(2)
+        },
+        submitOrder() {
+            if (!this.selectedTime.day) {
+                this.$u.toast('请选择取件时间')
+                return
+            }
+            if (!this.agreed) {
+                this.$u.toast('请先同意用户协议')
+                return
+            }
+            // 显示确认弹窗
+            this.$refs.submitConfirmDialog.openPopup()
+        },
+        
+        // 确认提交订单
+        handleConfirmSubmit() {
+            // 处理订单提交
+            uni.$u.http.post('/token/order/submitOrder', this.submitData).then(res => {
+                if (res.code == 200) {
+                    uni.navigateTo({
+                        url: "/pages-home/pages/order-success"
+                    })
+                    uni.removeStorageSync('selectAddr')
+                } else {
+                    uni.showToast({
+                        title: res.msg,
+                        icon: 'none'
+                    })
+                }
+            })
+        },
+        //获取默认地址 /api/token/user/address/getDefault
+        getDefaultAddress() {
+            uni.$u.http.get('/token/user/address/getDefault').then(res => {
+                if (res.code == 200) {
+                    this.defaultAddr = res.data
+                    this.submitData.addressId = this.defaultAddr.id
+                }
+            })
+        },
+        //获取当前用户未提交订单 /api/token/order/lastOrder
+        getLastOrder() {
+            uni.$u.http.get('/token/order/lastOrder').then(res => {
+                if (res.code == 200) {
+                    this.books = res.data?.orderDetailList ? res.data.orderDetailList?.map(v => {
+                        v.orderId = res.data.orderId
+                        return v
+                    }) : [],
+
+                        this.submitData.orderId = this.books[0].orderId
+                }
+            })
+        },
+        //获取预提交订单
+        getPreSubmitOrder() {
+            let orderId = uni.getStorageSync('orderId')
+            uni.$u.http.get('/token/order/preSubmit?orderId=' + orderId).then(res => {
+                this.submitData.orderId = orderId
+                this.defaultAddr = res.data.defaultAddress
+                this.submitData.addressId = this.defaultAddr.id
+
+                this.books = res.data.orderDetailList
+                this.expressList = res.data.expressTypes.map(v => ({
+                    name: v
+                }))
+            })
+        },
+
+    },
+    mounted() {
+        this.getPreSubmitOrder()
+    },
+
+    onShow() {
+        let selectAddr = uni.getStorageSync('selectAddr')
+        if (selectAddr) {
+            this.defaultAddr = selectAddr
+            this.submitData.addressId = selectAddr.id
+        }
+    },
+}
 </script>
 
 <style lang="scss">
-	.book-order {
-		min-height: 100vh;
-		background: #f5f5f5;
-		padding: 20rpx 30rpx;
-		padding-bottom: calc(env(safe-area-inset-bottom) + 190rpx);
-	}
-
-	.section-card {
-		background: #fff;
-		margin-bottom: 20rpx;
-		padding: 30rpx;
-		border-radius: 10rpx;
-		box-sizing: border-box;
-	}
-
-	.u-required {
-		color: #FF0000;
-		margin-left: 8rpx;
-	}
-
-	.time-card {
-		height: 80rpx;
-		background: #F8F8F8;
-		border-radius: 10rpx;
-	}
-
-	.free-pickup {
-		.pickup-title {
-			font-weight: bold;
-			font-size: 28rpx;
-			color: #333333;
-			margin-bottom: 10rpx;
-		}
-
-		.pickup-desc {
-			font-family: PingFang SC;
-			font-weight: 400;
-			font-size: 28rpx;
-			color: #999999;
-		}
-	}
-
-	.express-desc {
-		font-size: 24rpx;
-		color: #666;
-		line-height: 1.4;
-	}
-
-	.bottom-bar {
-		position: fixed;
-		bottom: env(safe-area-inset-bottom);
-		left: 0;
-		right: 0;
-		background: #fff;
-		padding: 20rpx 30rpx;
-
-		.agreement {
-			font-family: PingFang SC;
-			font-weight: 500;
-			font-size: 28rpx;
-			color: #333333;
-
-			&-link {
-				color: #07c160;
-			}
-		}
-
-		.order-summary {
-			display: flex;
-			justify-content: space-between;
-			align-items: center;
-			font-family: PingFang SC;
-			font-weight: 500;
-			font-size: 28rpx;
-			color: #999999;
-
-			.price {
-				color: #ff0000;
-				margin: 0 10rpx;
-			}
-		}
-	}
+.book-order {
+    min-height: 100vh;
+    background: #f5f5f5;
+    padding: 20rpx 30rpx;
+    padding-bottom: calc(env(safe-area-inset-bottom) + 190rpx);
+}
+
+.section-card {
+    background: #fff;
+    margin-bottom: 20rpx;
+    padding: 30rpx;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+}
+
+.u-required {
+    color: #FF0000;
+    margin-left: 8rpx;
+}
+
+.time-card {
+    height: 80rpx;
+    background: #F8F8F8;
+    border-radius: 10rpx;
+}
+
+.free-pickup {
+    .pickup-title {
+        font-weight: bold;
+        font-size: 28rpx;
+        color: #333333;
+        margin-bottom: 10rpx;
+    }
+
+    .pickup-desc {
+        font-family: PingFang SC;
+        font-weight: 400;
+        font-size: 28rpx;
+        color: #999999;
+    }
+}
+
+.express-desc {
+    font-size: 24rpx;
+    color: #666;
+    line-height: 1.4;
+}
+
+.bottom-bar {
+    position: fixed;
+    bottom: 0;
+    left: 0;
+    right: 0;
+    background: #fff;
+    padding: 20rpx 30rpx;
+    padding-bottom: env(safe-area-inset-bottom);
+
+    .agreement {
+        font-family: PingFang SC;
+        font-weight: 500;
+        font-size: 28rpx;
+        color: #333333;
+
+        &-link {
+            color: #07c160;
+        }
+    }
+
+    .order-summary {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        font-family: PingFang SC;
+        font-weight: 500;
+        font-size: 28rpx;
+        color: #999999;
+
+        .price {
+            color: #ff0000;
+            margin: 0 10rpx;
+        }
+    }
+}
 </style>

+ 12 - 4
pages-home/pages/order-success.vue

@@ -4,8 +4,10 @@
 		<text class="success-title">订单提交成功</text>
 		<text class="success-message">您的订单已提交,书嗨稍后将安排快递上门取书!</text>
 		<view class="button-group">
-			<u-button class="notify-button" :custom-style="{borderColor: '#07c160',width:'235rpx',
-            color: '#07c160'}" type="default" @click="notifyStatusChange">状态变更通知</u-button>
+            <u-button class="notify-button" :custom-style="{borderColor: '#07c160',width:'235rpx',
+            color: '#07c160'}" type="default" @click="goHome">返回首页</u-button>
+			<!-- <u-button class="notify-button" :custom-style="{borderColor: '#07c160',width:'235rpx',
+            color: '#07c160'}" type="default" @click="notifyStatusChange">状态变更通知</u-button> -->
 			<u-button :custom-style="{background: '#07c160',width:'235rpx',
             color: '#ffffff'}" class="view-order-button" type="primary" @click="viewOrder">查看订单</u-button>
 		</view>
@@ -20,8 +22,14 @@
 				console.log('状态变更通知')
 			},
 			viewOrder() {
-				// 处理查看订单逻辑
-				console.log('查看订单')
+				uni.navigateTo({
+					url: "/pages-mine/pages/order-page?status=-1"
+				})
+			},
+			goHome() {
+				uni.switchTab({
+					url: "/pages/home/index"
+				})
 			}
 		}
 	}

+ 34 - 7
pages-home/pages/scaned-book.vue

@@ -15,16 +15,15 @@
 
         <!-- 书籍列表 -->
         <page-scroll :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty emptyText="您暂未扫过书籍">
-            <u-checkbox-group v-model="checkedIds">
-                <view class="book-list">
-                    <BookListItem v-for="book in bookList" :key="book.isbn" :book="book" :isEditMode="isEditMode" />
-                </view>
-            </u-checkbox-group>
+            <view class="book-list">
+                <BookListItem v-for="book in bookList" :key="book.isbn" :book="book" :isEditMode="isEditMode"
+                    @action="handleAction" @checked="handleChecked" />
+            </view>
         </page-scroll>
 
         <!-- 删除确认弹窗 -->
         <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
-            <text>确定删除这本图书吗?</text>
+            <text>确定删除选中图书吗?</text>
         </common-dialog>
     </view>
 </template>
@@ -52,6 +51,35 @@ export default {
         this.$refs.pageRef?.loadData(true)
     },
     methods: {
+        handleChecked({ book, checked }) {
+            this.$nextTick(() => {
+                let item = this.bookList.find(item => item.isbn === book.isbn)
+                let index = this.bookList.findIndex(item => item.isbn === book.isbn)
+                item.selected = checked
+                this.$set(this.bookList, index, item)
+
+                this.isAllSelected = this.bookList.every(item => item.selected)
+                console.log(this.bookList, 'this.isAllSelected')
+            })
+        },
+        handleAction(book) {
+            if (book.status == 2) {
+                uni.$u.http.get('/token/order/addScanToOrder?isbn=' + book.isbn).then(res => {
+                    if (res.code === 200) {
+                        uni.showToast({
+                            title: '加入成功',
+                            icon: 'success'
+                        })
+                        this.$refs.pageRef?.loadData(true)
+                    } else {
+                        uni.showToast({
+                            title: res.msg,
+                            icon: 'none'
+                        })
+                    }
+                })
+            }
+        },
         handleUpdateList(data) {
             this.bookList = data.map(v => {
                 v.selected = false
@@ -70,7 +98,6 @@ export default {
         // 切换全选
         toggleSelectAll() {
             const newValue = !this.isAllSelected
-            console.log(newValue, 'newValue')
             this.bookList.forEach(book => book.selected = newValue)
         },
 

+ 7 - 3
pages-mine/components/address-card.vue

@@ -77,9 +77,13 @@
 
 			//更新地址
 			updateAddress() {
-				uni.navigateTo({
-					url: '/pages-mine/pages/address/add-or-update?id=' + this.address.id
-				})
+				if (!this.isSelect) {
+					uni.navigateTo({
+						url: '/pages-mine/pages/address/add-or-update?id=' + this.address.id
+					})
+				} else {
+					this.$emit('tapItem', this.address)
+				}
 			},
 
 			onDefaultChange(value) {

+ 12 - 3
pages-mine/components/book-list.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="book-list">
         <view class="header-info flex-a flex-j-b mb-20">
-            <text class="common-title">共20本</text>
+            <text class="common-title">共{{ totalNum }}本</text>
             <view class="common-text" @click="showRules">
                 <text class="mr-10">卖书审核规则</text>
                 <u-icon name="question-circle-fill" size="36" top="4rpx" color="#333"></u-icon>
@@ -9,11 +9,11 @@
         </view>
 
         <detail-book-item :book="item" v-for="(item, index) in books" :key="index"
-            v-if="isExpanded || (index < 3 && !isExpanded)"></detail-book-item>
+            v-if="isExpanded || (index < 3 && !isExpanded)" :isReturn="isReturn"></detail-book-item>
 
 
         <!-- 添加底部展开/收起按钮 -->
-        <view class="expand-btn" @click="toggleExpand">
+        <view class="expand-btn" @click="toggleExpand" v-if="books.length > 3">
             <text>{{ isExpanded ? '收起' : '查看全部' }}</text>
             <u-icon :name="isExpanded ? 'arrow-up' : 'arrow-down'" size="24" color="#666"></u-icon>
         </view>
@@ -22,6 +22,7 @@
 
 <script>
 import detailBookItem from './detail-book-item.vue';
+
 export default {
     components: {
         detailBookItem
@@ -36,6 +37,14 @@ export default {
         books: {
             type: Array,
             default: () => []
+        },
+        totalNum: {
+            type: Number,
+            default: 0
+        },
+        isReturn: {
+            type: Boolean,
+            default: false
         }
     },
     methods: {

+ 13 - 13
pages-mine/components/category-popup.vue

@@ -33,29 +33,21 @@ export default {
     data() {
         return {
             showPopup: false,
-            categories: [
-                { label: '买书', value: 'buy_book' },
-                { label: '提现', value: 'withdraw' },
-                { label: '退款', value: 'refund' },
-                { label: '工单收入', value: 'work_income' },
-                { label: '自寄运费补贴', value: 'shipping_subsidy' },
-                { label: '自寄运费补款', value: 'shipping_supplement' },
-                { label: '分享收入', value: 'share_income' },
-                { label: '合伙人收入', value: 'partner_income'},
-                { label: '退回邮费', value: 'return_postage' }
-            ],
+            categories: [],
             selectedCategories: []
         }
     },
     watch: {
         show(newVal) {
             this.showPopup = newVal
+            newVal && this.getDict()
         },
         showPopup(newVal) {
             if (!newVal) {
                 this.$emit('update:show', false)
             }
-        }
+        },
+
     },
     methods: {
         toggleSelect(item) {
@@ -75,7 +67,15 @@ export default {
         close() {
             this.showPopup = false
             this.$emit('update:show', false)
-        }
+        },
+        //根据code获取字典 user_account_change_type
+        getDict(code = 'user_account_change_type') {
+            uni.$u.http.get('/token/common/getDictOptions?type=' + code).then(res => {
+                if (res.code === 200) {
+                    this.categories = res.data.map(item => ({ label: item.dictLabel, value: item.dictValue }))
+                }
+            })
+        },
     }
 }
 </script>

+ 15 - 15
pages-mine/components/detail-book-item.vue

@@ -10,44 +10,44 @@
                         <text class="kmdb tag-text" v-if="book.maxNum > 1">可卖多本</text>
                     </view>
 
-                    <view class="flex flex-j-b flex-a-c mt-20">
-                        <view class="book-price">预估价: ¥{{ book.recycleMoney }}</view>
+                    <view class="flex flex-j-b flex-a-c mt-20" v-if="!isReturn">
+                        <view class="book-price">预估价: ¥{{ book.expectMoney }}</view>
                     </view>
                 </view>
                 <view v-if="isReturn" class="book-price">退回信息</view>
                 <template v-else>
-                    <view class="book-price" v-if="book.auditList && book.auditList.length">审核信息</view>
+                    <view class="book-price" v-if="book.auditCommentList && book.auditCommentList.length">审核信息</view>
                     <view v-else class="book-price">暂无审核信息</view>
                 </template>
             </view>
             <view class="delete-btn">
-                <text>×{{ book.num }}</text>
+                <text>×{{ book.num || book.refundNum }}</text>
             </view>
         </view>
         <view class="mt-10" style="padding-left: 150rpx;">
             <view class="audit-info" v-if="isReturn">
-                <view class="audit-item" v-for="(audit, index) in book.auditList" :key="index">
-                    <view class="audit-reason" v-if="audit.auditReason">
-                        原因:{{ audit.auditReason }}
+                <view class="audit-item" v-for="(comment, index) in book.commentCom" :key="index">
+                    <view class="audit-reason" v-if="comment">
+                        原因:{{ comment }}
                     </view>
                 </view>
             </view>
             <template v-else>
-                <view class="audit-info" v-if="book.auditList && book.auditList.length">
-                    <view class="audit-item" v-for="(audit, index) in book.auditList" :key="index">
+                <view class="audit-info" v-if="book.auditCommentList && book.auditCommentList.length">
+                    <view class="audit-item" v-for="(audit, index) in book.auditCommentList" :key="index">
                         <view class="flex-a w100">
                             <view class="flex-a flex-1">
                                 <view class="common-text-2 mr-16">第{{ index + 1 }}本</view>
-                                <view class="audit-status"
-                                    :class="audit.status === '良好' ? 'status-good' : 'status-bad'">
-                                    {{ audit.status }}
+                                <view class="audit-status" :class="audit.sts == 1 ? 'status-good' : 'status-bad'">
+                                    {{ audit.sts == 1 ? '良好' : '不良' }}
                                 </view>
                             </view>
-                            <view class="audit-price flex-1"><text class="common-text-2">审核:</text> ¥{{ audit.price }}
+                            <view class="audit-price flex-1"><text class="common-text-2">审核:</text> ¥{{ audit.sts == 1 ?
+                                book.recyclePrice||0 : 0 }}
                             </view>
                         </view>
-                        <view class="audit-reason" v-if="audit.auditReason">
-                            原因:{{ audit.auditReason }}
+                        <view class="audit-reason" v-if="audit.com">
+                            原因:{{ audit.com }}
                         </view>
                     </view>
                 </view>

+ 135 - 0
pages-mine/components/order-actions.vue

@@ -0,0 +1,135 @@
+<template>
+    <view class="order-container" style="width: 100%;" :class="{ 'large-size': size === 'large' }">
+        <view class="order-actions">
+            <!-- 未提交 -->
+            <button v-if="status === 0" class="action-btn" @click.stop="handleAction('submit')">提交订单</button>
+
+            <!-- 待初审 -->
+            <template v-if="status === 2">
+                <view class="flex-row w-full" style="display: flex;justify-content: space-between;">
+                    <button class="action-btn info-btn" @click.stop="handleAction('cancel')">取消订单</button>
+                    <view class="flex-row">
+                        <button class="action-btn plain" @click.stop="handleAction('editAddress')">修改地址</button>
+                        <button v-if="item.canReport == 1" class="action-btn"
+                            @click.stop="handleAction('report')">一键上报</button>
+                    </view>
+                </view>
+            </template>
+
+            <!-- 待取件 -->
+            <button v-if="status === 3 && item.canReport == 1" class="action-btn"
+                @click.stop="handleAction('report')">一键上报</button>
+
+            <!-- 待审核 -->
+            <template v-if="status === 8">
+                <button class="action-btn" @click.stop="handleAction('remindAudit')"
+                    v-if="item.canNotice == 1">提醒审核</button>
+                <button class="action-btn plain" v-if="item.canComplaints == 1"
+                    @click.stop="handleAction('complaint')">订单投诉</button>
+
+            </template>
+
+            <!-- 待到款 -->
+            <button v-if="status === 10" class="action-btn" @click.stop="handleAction('complaint')">订单投诉</button>
+
+            <!-- 已完成 -->
+            <template v-if="status === 11">
+                <button class="action-btn plain" v-if="item.canComplaints == 1"
+                    @click.stop="handleAction('complaint')">订单投诉</button>
+                <button v-if="showCompensation" class="action-btn"
+                    @click.stop="handleAction('compensation')">卖亏补差</button>
+            </template>
+        </view>
+        <u-action-sheet v-model="showReportSheet" :list="actionList" @close="showReportSheet = false"
+            @click="handleReportSelect" cancelText="取消" :mask-close-able="false" :safe-area-inset-bottom="true" />
+    </view>
+</template>
+
+<script>
+
+export default {
+    name: 'OrderActions',
+    props: {
+        status: {
+            type: Number,
+            required: true
+        },
+        order: {
+            type: Object,
+            default: () => ({})
+        },
+        size: {
+            type: String,
+            default: 'normal'
+        }
+    },
+    methods: {
+        handleAction(type) {
+            this.$emit('action', {
+                type,
+                order: this.order
+            })
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-actions {
+    display: flex;
+    justify-content: flex-end;
+    gap: 10px;
+    padding: 10px 0;
+    width: 100%;
+
+    .w-full {
+        width: 100%;
+    }
+
+    .action-btn {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        min-width: 166rpx;
+        height: 60rpx;
+        line-height: 60rpx;
+        border-radius: 10rpx;
+        font-size: 28rpx;
+        background-color: #38C148;
+        color: #ffffff;
+        cursor: pointer;
+        margin: 0;
+        border: 0;
+        max-width: 200rpx;
+
+        &::after {
+            border: 0;
+        }
+
+        &+.action-btn {
+            margin-left: 16rpx;
+        }
+
+        &.info-btn {
+            background-color: #DBDBDB;
+            color: #ffffff;
+        }
+
+        &.plain {
+            border: 1px solid #38C148;
+            color: #38C148;
+            background-color: #fff;
+        }
+    }
+}
+
+.large-size {
+    .order-actions {
+        .action-btn {
+            max-width: 200rpx;
+            height: 80rpx;
+            line-height: 80rpx;
+        }
+    }
+}
+</style>

+ 43 - 51
pages-mine/components/order-item.vue

@@ -2,37 +2,39 @@
     <view class="order-item" @click="goToDetail">
         <!-- 订单头部 -->
         <view class="order-header">
-            <text class="common-text-2 font-30">卖书编号:{{ order.orderNo }}</text>
-            <text class="order-status" :style="{ color: statusColorMap[order.status] }">{{ statusTextMap[order.status]
-                }}</text>
+            <text class="common-text-2 font-30">卖书编号:{{ order.orderId }}</text>
+
+
+            <text v-if="order.cancelStatus == 1 || order.status == -1" class="order-status" style="color: #FF000C">已取消</text>
+            <text v-else class="order-status" style="color: #FF000C">{{ statusText }}</text>
         </view>
 
         <!-- 书籍列表 - 改为横向滚动 -->
         <scroll-view scroll-x class="book-scroll" :show-scrollbar="false" enhanced>
             <view class="book-list">
-                <image v-for="(book, index) in order.books" :key="index" :src="book.cover" class="book-cover"
+                <image v-for="(book, index) in order.detailCoverList" :key="index" :src="book" class="book-cover"
                     mode="aspectFill" />
             </view>
         </scroll-view>
 
         <!-- 订单信息 -->
         <view class="flex-a flex-j-b mb-20">
-            <text class="common-text">提交时间:{{ order.submitTime }}</text>
-            <text class="common-title">共{{ order.books.length }}本</text>
+            <text class="common-text" v-if="order.orderTime">提交时间:{{ order.orderTime || '-' }}</text>
+            <text class="common-title">共{{ order.totalNum || order.canRefundNum }}本</text>
         </view>
 
         <!-- 底部按钮 -->
-        <view class="order-actions" v-if="getActions(order.status).length > 0">
-		
-            <u-button v-for="(action, index) in getActions(order.status)" :key="index" :type="action.type" size="mini"
-                :plain="action.plain" class="action-btn" @click.stop="handleAction(action.action)" :customStyle="customStyle">{{ action.text }}</u-button>
-        </view>
+        <order-actions :order="order" :status="order.status" @action="handleAction" @success="handleSuccess" />
     </view>
 </template>
 
 <script>
+import OrderActions from '@/pages-mine/components/order-actions.vue'
 export default {
     name: 'order-item',
+    components: {
+        OrderActions
+    },
     props: {
         order: {
             type: Object,
@@ -43,53 +45,48 @@ export default {
             default: false
         }
     },
+    computed: {
+        statusText() {
+            console.log(this.order.status, 'status')
+            return this.statusTextMap[this.order.status]
+        }
+    },
     data() {
         return {
             statusTextMap: {
-                'pending_review': '待初审',
-                'cancelled': '已取消',
-                'pending_audit': '待审核',
-            },
-            statusColorMap: {
-                'pending_review': '#FF5B5B',
-                'cancelled': '#999999',
-                'pending_audit': '#FF5B5B',
-            },
-            customStyle: {
-                height: '60rpx',
-                borderRadius: '10rpx',
-                width: '170rpx',
-                fontSize: '28rpx',
+                '0': '待提交',
+                '1': '已删除',
+                '2': '待初审',
+                '3': '待取件',
+                "4": '初审未通过',
+                "5": '已揽件',
+                "6": '已签收',
+                "7": '物流签收',
+                '8': '待审核',
+                '9': '审核中',
+                '10': '待到款',
+                '11': '已完成',
             }
         }
     },
     methods: {
-        getActions(status) {
-            const actionMap = {
-                'pending_review': [
-                    { text: '取消交易', type: 'info', plain: true, action: 'cancel' },
-                    { text: '投诉上报', type: 'primary', plain: true, action: 'report' },
-                    { text: '修改地址', type: 'primary', plain: false, action: 'editAddress' }
-                ],
-                'pending_audit': [
-                    { text: '提醒审核', type: 'primary', plain: false, action: 'remind' }
-                ]
-            }
-            return actionMap[status] || []
-        },
         goToDetail() {
             if (this.isReturn) {
                 uni.navigateTo({
-                    url: `/pages-mine/pages/apply?id=${this.order.orderNo}`
+                    url: `/pages-mine/pages/apply?orderId=${this.order.orderId}`
                 })
             } else {
                 uni.navigateTo({
-                    url: `/pages-mine/pages/order-detail?id=${this.order.orderNo}`
+                    url: `/pages-mine/pages/order-detail?orderId=${this.order.orderId}`
                 })
             }
         },
-        handleAction(action) {
-            this.$emit(action, this.order)
+        handleAction(data) {
+            this.$emit('action', data)
+        },
+        handleSuccess() {
+            console.log('handleSuccess')
+            this.$emit('success')
         }
     }
 }
@@ -100,12 +97,13 @@ export default {
     background: #FFFFFF;
     border-radius: 12rpx;
     padding: 30rpx;
-	margin-bottom: 20rpx;
+    margin-bottom: 20rpx;
 
     .order-header {
         display: flex;
         justify-content: space-between;
         align-items: center;
+
         .order-status {
             font-size: 28rpx;
         }
@@ -121,21 +119,15 @@ export default {
             display: inline-flex;
             padding-right: 20rpx; // 为最后一张图片添加右边距
             gap: 20rpx;
+
             .book-cover {
                 width: 132rpx;
-                height: 185rpx;
+                height: 132rpx;
                 border-radius: 10rpx;
                 flex-shrink: 0; // 防止图片被压缩
             }
         }
     }
-
-    .order-actions {
-        display: flex;
-        justify-content: flex-end;
-        gap: 12rpx;
-        margin-top: 30rpx;
-    }
 }
 
 // 隐藏滚动条

+ 141 - 0
pages-mine/components/order-return-actions.vue

@@ -0,0 +1,141 @@
+<template>
+    <view class="order-container" style="width: 100%;" :class="{ 'large-size': size === 'large' }">
+        <view class="order-return-actions">
+            <button v-if="status == 0" class="action-btn" @click.stop="handleAction('pay')">去付款</button>
+
+            <!-- 待初审 -->
+            <template v-if="status == 2 || status == 1">
+                <button class="action-btn" @click.stop="handleAction('cancel')">取消退回</button>
+            </template>
+
+            <!-- 待取件 -->
+            <button v-if="status === 2" class="action-btn" @click.stop="handleAction('confirm')">确认收货</button>
+        </view>
+    </view>
+</template>
+
+<script>
+
+export default {
+    name: 'OrderActions',
+    props: {
+        status: {
+            type: Number,
+            required: true
+        },
+        order: {
+            type: Object,
+            default: () => ({})
+        },
+        size: {
+            type: String,
+            default: 'normal'
+        }
+    },
+    methods: {
+        handleAction(type) {
+            if (type == 'pay') {
+                //先校验支付参数
+                if (this.order.orderId) {
+                    uni.$u.http.post('/token/order/refundGoPay', {
+                        refundOrderId: this.order.orderId
+                    }).then(res => {
+                        if (res.code == 200) {
+                            //如果有微信订单,则跳转去微信支付
+                            if (res.data.prepayId) {
+                                uni.requestPayment({
+                                    timeStamp: res.data.timeStamp,
+                                    nonceStr: res.data.nonceStr,
+                                    package: `prepay_id=${res.data.prepayId}`,
+                                    signType: res.data.signType,
+                                    paySign: res.data.paySign,
+                                    provider: 'wxpay',
+                                    success: (res) => {
+                                        console.log(res)
+                                        //支付成功之后,跳转支付成功页面
+                                        uni.navigateTo({
+                                            url: `/pages-mine/pages/pay-success?orderId=${this.order.orderId}`
+                                        })
+                                    },
+                                    fail: (err) => {
+                                        console.log(err)
+                                    }
+                                })
+                            } else {
+                                uni.navigateTo({
+                                    url: `/pages-mine/pages/cashier-desk?id=${res.data.refundOrderId}`
+                                })
+                            }
+                        }
+                    })
+                }
+            } else {
+                this.$emit('action', {
+                    type,
+                    order: this.order
+                })
+            }
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-return-actions {
+    display: flex;
+    justify-content: flex-end;
+    gap: 10px;
+    padding: 10px 0;
+    width: 100%;
+
+    .w-full {
+        width: 100%;
+    }
+
+    .action-btn {
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        min-width: 160rpx;
+        height: 60rpx;
+        line-height: 60rpx;
+        border-radius: 10rpx;
+        font-size: 28rpx;
+        background-color: #38C148;
+        color: #ffffff;
+        cursor: pointer;
+        margin: 0;
+        border: 0;
+        max-width: 200rpx;
+
+        &::after {
+            border: 0;
+        }
+
+        &+.action-btn {
+            margin-left: 16rpx;
+        }
+
+        &.info-btn {
+            background-color: #DBDBDB;
+            color: #ffffff;
+        }
+
+        &.plain {
+            border: 1px solid #38C148;
+            color: #38C148;
+            background-color: #fff;
+        }
+    }
+}
+
+.large-size {
+    .order-return-actions {
+        .action-btn {
+            max-width: 200rpx;
+            height: 80rpx;
+            line-height: 80rpx;
+        }
+    }
+}
+</style>

+ 142 - 0
pages-mine/components/order-return-item.vue

@@ -0,0 +1,142 @@
+<template>
+    <view class="order-return-item" @click="goToDetail">
+        <!-- 订单头部 -->
+        <view class="order-header">
+            <text class="common-text-2 font-30">卖书编号:{{ order.orderId }}</text>
+            <text class="order-status" style="color: #FF000C" v-if="showAction">{{ statusTextMap[order.status]
+                }}</text>
+
+            <template v-else>
+                <text class="order-status" style="color: #FF000C" v-if="!order.restTime">已超时</text>
+                <view class="time-container" style="min-width: 220rpx;" v-else>
+                    <u-count-down class="time" :timestamp="order.restTime" separator="zh" separator-size="28"
+                        separator-color="#FF0000" color="#FF0000" bg-color="transparent" :show-seconds="false"
+                        :show-days="false"></u-count-down>
+                    <text class="order-status" style="color: #FF000C">超时</text>
+                </view>
+            </template>
+        </view>
+
+        <!-- 书籍列表 - 改为横向滚动 -->
+        <scroll-view scroll-x class="book-scroll" :show-scrollbar="false" enhanced>
+            <view class="book-list">
+                <image v-for="(book, index) in order.detailCoverList" :key="index" :src="book" class="book-cover"
+                    mode="aspectFill" />
+            </view>
+        </scroll-view>
+
+        <!-- 订单信息 -->
+        <view class="flex-a flex-j-b mb-20">
+            <text class="common-text">提交时间:{{ order.orderTime || '-' }}</text>
+            <text class="common-title">共{{ order.canRefundNum || order.totalNum }}本</text>
+        </view>
+
+        <!-- 底部按钮 -->
+        <order-return-actions :order="order" :status="order.status" @action="handleAction" v-if="showAction" />
+    </view>
+</template>
+
+<script>
+import OrderReturnActions from '@/pages-mine/components/order-return-actions.vue'
+export default {
+    name: 'order-return-item',
+    components: {
+        OrderReturnActions
+    },
+    props: {
+        order: {
+            type: Object,
+            required: true
+        },
+        showAction: {
+            type: Boolean,
+            default: true
+        }
+    },
+    data() {
+        return {
+            // 0-创建(待付款) 1-已付款 2-已推送 3-已发货 4-已签收 5-已完成 6-已取消 7-超时取消
+            statusTextMap: {
+                '0': '待付款',
+                '1': '待发货',
+                '2': '已推送',
+                '3': '已发货',
+                '4': '已签收',
+                "5": '已完成',
+                "6": '已取消',
+                "7": '超时取消',
+            }
+        }
+    },
+    methods: {
+        goToDetail() {
+            if (this.showAction) {
+                uni.navigateTo({
+                    url: `/pages-mine/pages/return-detail?orderId=${this.order.orderId}`
+                })
+            } else {
+                if (this.order.restTime) {
+                    uni.navigateTo({
+                        url: `/pages-mine/pages/apply?orderId=${this.order.orderId}`
+                    })
+                } else {
+                    uni.showToast({
+                        title: '已超时',
+                        icon: 'none'
+                    })
+                }
+            }
+        },
+        handleAction(data) {
+            this.$emit('action', data)
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-return-item {
+    background: #FFFFFF;
+    border-radius: 12rpx;
+    padding: 30rpx;
+    margin-bottom: 20rpx;
+
+    .order-header {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+
+        .order-status {
+            font-size: 28rpx;
+        }
+    }
+
+    // 修改图片滚动区域样式
+    .book-scroll {
+        width: 100%;
+        white-space: nowrap;
+        margin: 30rpx 0 20rpx 0;
+
+        .book-list {
+            display: inline-flex;
+            padding-right: 20rpx; // 为最后一张图片添加右边距
+            gap: 20rpx;
+
+            .book-cover {
+                width: 132rpx;
+                height: 132rpx;
+                border-radius: 10rpx;
+                flex-shrink: 0; // 防止图片被压缩
+            }
+        }
+    }
+}
+
+// 隐藏滚动条
+::-webkit-scrollbar {
+    display: none;
+    width: 0;
+    height: 0;
+    color: transparent;
+}
+</style>

+ 45 - 48
pages-mine/components/order-timeline.vue

@@ -1,27 +1,28 @@
 <template>
     <view class="timeline-section">
         <view class="time-info" @click="toggleExpand" v-if="!isExpanded">
-            <text>下拉查看更多</text>
+            <text>点击查看更多</text>
             <u-icon :name="isExpanded ? 'arrow-up' : 'arrow-down'" size="24" color="#333333"></u-icon>
         </view>
 
-        <view class="time-info-expanded" v-else  @click="toggleExpand">
+        <view class="time-info-expanded" v-else @click="toggleExpand">
             <u-icon name="arrow-up" size="36" color="#333333"></u-icon>
         </view>
 
         <view class="timeline-content" :class="{ 'collapsed': !isExpanded }">
             <view class="timeline-list">
-                <view class="timeline-item" v-for="(item, index) in timelineData" :key="index">
+                <view class="timeline-item" v-for="(item, index) in logVoList" :key="index">
                     <view class="timeline-dot"></view>
                     <view class="timeline-info">
-                        <view class="status">{{ item.status }}</view>
-                        <view class="time" v-if="item.time">{{ item.time }}</view>
-                        <view class="desc" v-if="item.desc">{{ item.desc }}</view>
+                        <view class="status" v-if="!isReturn">{{ statusTextMap[item.status] }}</view>
+                        <view class="status" v-else>{{ statusTextMap2[item.status] }}</view>
+                        <view class="time" v-if="item.createTime">{{ item.createTime }}</view>
+                        <view class="desc" v-if="item.description">{{ item.description }}</view>
                         <!-- 快递单号 -->
                         <view class="express-no" v-if="item.expressNo">
                             <text>{{ item.expressNo }}</text>
                             <image src="../static/copy.png" style="width: 42rpx;height:42rpx;margin-left: 20rpx;"
-                            @click.stop="copyExpressNo(item.expressNo)"></image>
+                                @click.stop="copyExpressNo(item.expressNo)"></image>
                         </view>
                         <!-- 物流信息 -->
                         <view class="express-info" v-if="item.expressInfo">
@@ -37,52 +38,47 @@
 <script>
 export default {
     name: 'order-timeline',
+    props: {
+        logVoList: {
+            type: Array,
+            default: () => []
+        },
+        isReturn: {
+            type: Boolean,
+            default: false
+        }
+    },
     data() {
         return {
             isExpanded: false,
-            timelineData: [
-                {
-                    status: '已到款',
-                    time: '2024-10-25 12:00:15',
-                    desc: '品相审核不通过的书籍可以在审核后48小时之内申请退回,逾期不予退回。(寄单不含快递费可以免费申请退回,后续订单不含快递费需要支付运费退回。)'
-                },
-                {
-                    status: '审核成功',
-                    time: '2024-10-25 12:00:15'
-                },
-                {
-                    status: '待审核',
-                    desc: '毕业季订单繁忙,预计订单包裹签收15天完成书籍审核并支付书款,请您耐心等待~'
-                },
-                {
-                    status: '快递取件',
-                    expressNo: 'SF313996799456',
-                    expressInfo: '暂无物流信息'
-                },
-                {
-                    status: '待取件',
-                    desc: '书籍平台已为您安排【顺丰标快】,请您注意查看三方来电'
-                },
-                {
-                    status: '初审成功',
-                    time: '2024-10-25 12:00:15'
-                },
-                {
-                    status: '待初审',
-                    desc: '取件时间:2024-10-28 09:00-10:00\n预约取件时间前20分钟内将完成订单审核,请您留意初审结果。如初审通过请您准备好快件,并等待订单信息。感谢您的配合。'
-                },
-                {
-                    status: '回收订单提交',
-                    time: '2024-10-25 12:00:15'
-                }
-            ]
-        }
-    },
-    computed: {
-        currentStatus() {
-            return this.timelineData[0]?.status || ''
+            statusTextMap: {
+                '0': '待提交',
+                '1': '已删除',
+                '2': '待初审',
+                '3': '待取件',
+                "4": '初审未通过',
+                "5": '已揽件',
+                "6": '已签收',
+                "7": '物流签收',
+                '8': '待审核',
+                '9': '审核中',
+                '10': '待到款',
+                '11': '已完成',
+            },
+
+            statusTextMap2: {
+                '0': '待付款',
+                '1': '待发货',
+                '2': '已推送',
+                '3': '已发货',
+                '4': '已签收',
+                "5": '已完成',
+                "6": '已取消',
+                "7": '超时取消',
+            }
         }
     },
+   
     methods: {
         toggleExpand() {
             this.isExpanded = !this.isExpanded
@@ -117,6 +113,7 @@ export default {
             margin-left: 4rpx;
         }
     }
+
     .time-info-expanded {
         position: absolute;
         bottom: 40rpx;

+ 20 - 2
pages-mine/components/return-notice.vue

@@ -1,19 +1,37 @@
 <template>
     <!-- 添加退回提示区域 -->
-    <view class="return-notice">
+    <view class="return-notice" @click="handleReturn">
         <view class="notice-content">
             <view class="title-row">
                 <text class="title">退回不通过书籍</text>
                 <text class="tag">首次免费退</text>
             </view>
             <view class="countdown">
-                您需要在<text class="time">3天05小时16分52秒</text>内处理
+                您需要在
+                <u-count-down class="time" :timestamp="orderInfo.restTime" separator="zh" separator-size="28" separator-color="#FF0000" color="#FF0000" bg-color="transparent"></u-count-down>
+                内处理
             </view>
         </view>
         <u-icon name="arrow-right" size="28" color="#999"></u-icon>
     </view>
 </template>
 
+<script>
+export default {
+    props: {
+        orderInfo: {
+            type: Object,
+            default: {}
+        }
+    },
+    methods: {
+        handleReturn() {
+            this.$emit('close')
+        }
+    }
+}
+</script>
+
 <style lang="scss" scoped>
 // 添加新的样式
 .return-notice {

+ 206 - 0
pages-mine/components/select-book-item.vue

@@ -0,0 +1,206 @@
+<template>
+    <view class="book-item">
+        <view class="book-info">
+            <image class="book-cover" :src="book.cover" mode="aspectFill" />
+            <view class="book-detail">
+                <view class="top-info">
+                    <view class="book-title">{{ book.bookName }}</view>
+                    <view class="book-tags">
+                        <text class="tzs tag-text" v-if="book.suit == 1">套装书</text>
+                        <text class="kmdb tag-text" v-if="book.maxNum > 1">可卖多本</text>
+                    </view>
+
+                    <view class="flex flex-j-b flex-a-c mt-20">
+                        <view class="book-price">预估价: ¥{{ book.expectMoney }}</view>
+                    </view>
+                </view>
+                <view v-if="isReturn" class="book-price">退回信息</view>
+                <template v-else>
+                    <view class="book-price" v-if="book.auditCommentList && book.auditCommentList.length">审核信息</view>
+                    <view v-else class="book-price">暂无审核信息</view>
+                </template>
+            </view>
+            <view class="delete-btn">
+                <text>×{{ book.auditCommentList.length }}</text>
+            </view>
+        </view>
+        <view class="mt-10" style="padding-left: 150rpx;">
+            <view class="audit-info" v-if="isReturn">
+                <view class="audit-item" v-for="(audit, index) in book.auditCommentList" :key="index">
+                    <view class="audit-reason" v-if="audit.com">
+                        原因:{{ audit.com }}
+                    </view>
+                </view>
+            </view>
+            <template v-else>
+                <view class="audit-info" v-if="book.auditCommentList && book.auditCommentList.length">
+                    <view class="audit-item" v-for="(audit, index) in book.auditCommentList" :key="index">
+                        <view class="flex-a w100">
+                            <view class="flex-a flex-1">
+                                <view class="common-text-2 mr-16">第{{ index + 1 }}本</view>
+                                <view class="audit-status" :class="audit.sts == 1 ? 'status-good' : 'status-bad'">
+                                    {{ audit.com }}
+                                </view>
+                            </view>
+                            <view class="audit-price">
+                                <u-checkbox shape="circle" :name="book.id + '-' + index" v-model="audit.isSelected"
+                                    @change="(e) => handleSelect(e, { index, isbn: book.isbn })"></u-checkbox>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </template>
+        </view>
+    </view>
+</template>
+
+<script>
+import commonDialog from '@/components/common-dialog.vue';
+export default {
+    components: {
+        commonDialog
+    },
+    props: {
+        book: {
+            type: Object,
+            required: true
+        },
+        isReturn: {
+            type: Boolean,
+            default: false
+        },
+        modelValue: {
+            type: Boolean,
+            default: false
+        }
+    },
+    methods: {
+        handleSelect(e, { index, isbn }) {
+            this.$emit('select', { checked: e.value, index, isbn })
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.book-item {
+    background: #FFFFFF;
+    margin-bottom: 30rpx;
+    border-radius: 10rpx;
+
+    .tag-text {
+        font-family: Source Han Sans CN;
+        font-weight: 400;
+        font-size: 24rpx;
+        color: #FFFFFF;
+    }
+
+    .tzs {
+        width: 91rpx;
+        height: 30rpx;
+        background: linear-gradient(263deg, #98E05F, #0DE3AC);
+        border-radius: 2rpx;
+        padding: 4rpx 10rpx;
+        margin-right: 10rpx;
+    }
+
+    .kmdb {
+        width: 117rpx;
+        height: 30rpx;
+        background: linear-gradient(263deg, #F7CB6B, #FBA980);
+        border-radius: 2rpx;
+        padding: 4rpx 10rpx;
+        margin-right: 10rpx;
+    }
+
+    .book-info {
+        display: flex;
+        position: relative;
+
+        .book-cover {
+            width: 140rpx;
+            height: 196rpx;
+            border-radius: 8rpx;
+        }
+
+        .book-detail {
+            flex: 1;
+            margin-left: 20rpx;
+            display: flex;
+            flex-direction: column;
+            justify-content: space-between;
+
+            :v-deep .u-number-input {
+                background: #F9F9F9 !important;
+                border-radius: 6rpx;
+            }
+
+            .book-title {
+                max-width: 400rpx;
+                font-size: 28rpx;
+                color: #333;
+                line-height: 1.4;
+                margin-bottom: 20rpx;
+                display: -webkit-box;
+                -webkit-box-orient: vertical;
+                -webkit-line-clamp: 2;
+                overflow: hidden;
+                font-family: Source Han Sans CN;
+                font-weight: 400;
+            }
+
+            .book-price {
+                font-family: Source Han Sans CN;
+                font-weight: 400;
+                font-size: 24rpx;
+                color: #999999;
+            }
+        }
+
+        .delete-btn {
+            position: absolute;
+            right: 0;
+            top: -10rpx;
+            padding: 10rpx;
+        }
+    }
+
+    .audit-info {
+        min-height: 60rpx;
+        background: #FAFAFA;
+        border-radius: 10rpx;
+        padding: 12rpx 20rpx;
+        box-sizing: border-box;
+
+        .audit-item {
+            margin-bottom: 6rpx;
+            font-size: 24rpx;
+            line-height: 42rpx;
+        }
+
+        .audit-status {
+            margin-right: 20rpx;
+
+            &.status-good {
+                color: #67C23A;
+            }
+
+            &.status-bad {
+                color: #F56C6C;
+            }
+        }
+
+        .audit-price {
+            color: #F56C6C;
+        }
+
+        .audit-reason {
+            font-size: 26rpx;
+            color: #999;
+            font-weight: 400;
+            font-family: PingFang SC;
+            margin-top: 6rpx;
+        }
+    }
+}
+</style>

+ 176 - 0
pages-mine/mixin/btnAction.js

@@ -0,0 +1,176 @@
+export default {
+    data() {
+        return {
+            actionList: [],
+            showReportSheet: false,
+            order: {}
+        }
+    },
+    onShow() {
+        let selectEditAddr = uni.getStorageSync('selectEditAddr')
+        if (selectEditAddr.id) {
+            this.handleAddressSubmit(selectEditAddr.id)
+        }
+    },
+    methods: {
+        //操作成功之后的回调
+        successFeedback() {
+            uni.$emit('btnActionSuccess')
+        },
+
+        //修改地址
+        handleAddressSubmit(addressId) {
+            const params = {
+                orderId: this.order.orderId,
+                addressId
+            }
+            uni.$u.http.post('/token/order/modifyAddress', params).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({
+                        title: '地址修改成功',
+                        icon: 'none'
+                    })
+                    this.$emit('success')
+                    this.successFeedback()
+                    uni.removeStorageSync('selectEditAddr')
+                } else {
+                    uni.showToast({
+                        title: res.msg,
+                        icon: 'none'
+                    })
+                }
+            }).finally(() => {
+                uni.removeStorageSync('selectEditAddr')
+                uni.hideLoading()
+            })
+        },
+        //根据code获取字典 /token/common/getDictOptions
+        getDict(code) {
+            return uni.$u.http.get('/token/common/getDictOptions?type=' + code)
+        },
+        //获取一键上报的选项 code user_report_options
+        getReportOptions() {
+            this.getDict('user_report_options').then(res => {
+                if (res.code === 200) {
+                    this.actionList = res.data.map(item => ({
+                        text: item.dictLabel,
+                        value: item.dictValue
+                    }))
+                }
+            })
+        },
+        //一键上报相关操作
+        handleReportSelect(index) {
+            this.showReportSheet = false
+            let reason = this.actionList[index].value
+            if (this.actionList[index]?.isCancel) {
+                this.submitCancel(reason)
+            } else {
+                this.submitReport(reason)
+            }
+        },
+        submitReport(reason) {
+            const params = {
+                orderId: this.order.orderId,
+                reason: reason
+            }
+            uni.$u.http.post('/token/order/userReport', params).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({
+                        title: '一键上报已上报给管理员',
+                        icon: 'none'
+                    })
+                    this.$emit('success')
+                    this.successFeedback()
+                }
+            })
+        },
+
+        //订单取消字典 order_cancel_reason_user
+        getCancelReason() {
+            this.getDict('order_cancel_reason_user').then(res => {
+                if (res.code === 200) {
+                    this.actionList = res.data.map(item => ({
+                        text: item.dictLabel,
+                        value: item.dictValue,
+                        isCancel: true
+                    }))
+                }
+            })
+        },
+
+        // 订单操作方法
+        handleAction({ type, order }) {
+            console.log('handleAction', type, order)
+            this.order = order
+            switch (type) {
+                case 'submit':
+                    uni.navigateTo({
+                        url: "/pages-home/pages/book-order"
+                    })
+                    uni.setStorageSync('orderId', this.order.orderId)
+                    break
+                case 'editAddress':
+                    uni.navigateTo({
+                        url: `/pages-mine/pages/address/list?id=${this.order.addressId}&isSelect=1&editAddress=1`
+                    })
+                    break
+                case 'cancel':
+                    this.showReportSheet = true
+                    this.getCancelReason()
+                    break
+                case 'report':
+                    this.showReportSheet = true
+                    this.getReportOptions()
+                    break
+                case 'remindAudit':
+                    this.submitRemindAudit()
+                    break
+                case 'complaint':
+                    uni.navigateTo({
+                        url: `/pages-mine/pages/complaint?orderId=${this.order.orderId}`
+                    })
+                    break
+                case 'compensation':
+                    this.$emit('compensation', this.order)
+                    break
+            }
+        },
+
+        submitCancel(reason) {
+            const params = {
+                orderId: this.order.orderId,
+                reason: reason
+            }
+            uni.$u.http.post('/token/order/userCancel', params).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({
+                        title: '您的订单已取消',
+                        icon: 'none'
+                    })
+                    this.$emit('success')
+                    this.successFeedback()
+                }
+            })
+        },
+
+        //提醒审核
+        submitRemindAudit() {
+            uni.$u.http.post('/api/token/order/urgeOrder', {
+                orderId: this.order.orderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({
+                        title: '已提醒给管理员进行加急审核',
+                        icon: 'none'
+                    })
+                } else {
+                    uni.showToast({
+                        title: res.msg,
+                        icon: 'none'
+                    })
+                }
+            })
+        },
+    }
+}

+ 31 - 7
pages-mine/pages/address/add-or-update.vue

@@ -1,7 +1,7 @@
 <template>
     <view class="page">
         <view class="form">
-            <u-form :model="form" ref="form" label-width="180rpx">
+            <u-form :model="form" ref="form" label-width="180rpx" :error-type="['toast']">
                 <u-form-item label="收货人">
                     <u-input v-model="form.name" placeholder="请输入收货人姓名" />
                 </u-form-item>
@@ -52,6 +52,23 @@ export default {
                 "mobile": "",
                 "defaultFlag": 0
             },
+            // 表单校验规则
+            rules: {
+                name: [{
+                    required: true,
+                    message: '请输入收货人姓名',
+                    trigger: ['change', 'blur'],
+                }],
+                mobile: [{
+                    required: true,
+                    message: '请输入手机号',
+                    trigger: ['change', 'blur'],
+                }, {
+                    pattern: /^1[3-9]\d{9}$/,
+                    message: '请输入正确的手机号',
+                    trigger: ['change', 'blur'],
+                }],
+            },
             // 省市区
             selAddressCodes: [],
             dataList: [],
@@ -92,13 +109,20 @@ export default {
 
         // 提交表单
         submit() {
-            let path = this.form.id ? '/token/user/address/update' : '/token/user/address/add'
-            uni.$u.http.post(path, this.form).then(res => {
-                if (res.code == 200) {
-                    uni.showToast('操作成功');
-                    uni.navigateBack();
+            this.$refs.form.validate().then(valid => {
+                if (valid) {
+                    let path = this.form.id ? '/token/user/address/update' : '/token/user/address/add'
+                    uni.$u.http.post(path, this.form).then(res => {
+                        if (res.code == 200) {
+                            uni.showToast({
+                                title: '操作成功',
+                                icon: 'success'
+                            });
+                            uni.navigateBack();
+                        }
+                    })
                 }
-            })
+            });
         },
         // 编辑
         getAddressDetail(id) {

+ 116 - 108
pages-mine/pages/address/list.vue

@@ -1,117 +1,125 @@
 <template>
-	<view class="page">
-		<NoData v-if="!loading&&list.length<1"></NoData>
-		<view class="list" v-else>
-			<AddressCard v-for="item in list" :key="item.id" :address="item" :selected="item.id==selectId"
-				@delete="deletePopup" @success="getAddressList" @tapItem="handleSelectAddr" :isSelect="isSelect">
-			</AddressCard>
-		</view>
-		<view class="bottom-fixed-con">
-			<u-button class="flex-1" type="primary"
-				@click="$u.route({ url: '/pages-mine/pages/address/add-or-update' })">
-				<text>添加地址</text>
-			</u-button>
-		</view>
+    <view class="page">
+        <NoData v-if="!loading && list.length < 1"></NoData>
+        <view class="list" v-else>
+            <AddressCard v-for="item in list" :key="item.id" :address="item" :selected="item.id == selectId"
+                @delete="deletePopup" @success="getAddressList" @tapItem="handleSelectAddr" :isSelect="isSelect">
+            </AddressCard>
+        </view>
+        <view class="bottom-fixed-con">
+            <u-button class="flex-1" type="primary"
+                @click="$u.route({ url: '/pages-mine/pages/address/add-or-update' })">
+                <text>添加地址</text>
+            </u-button>
+        </view>
 
-		<common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
-			<text>确定删除此地址信息吗?</text>
-		</common-dialog>
-	</view>
+        <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
+            <text>确定删除此地址信息吗?</text>
+        </common-dialog>
+    </view>
 </template>
 
 <script>
-	import AddressCard from '@/pages-mine/components/address-card.vue';
-	import commonDialog from '@/components/common-dialog.vue';
-	export default {
-		components: {
-			AddressCard,
-			commonDialog
-		},
-		data() {
-			return {
-				selectId: '',
-				deleteId: '', //要删除的id
-				isBack: false,
-				loading: false,
-				list: [],
-				options: [{
-						text: '设为默认',
-						style: {
-							backgroundColor: '#22ac38'
-						}
-					},
-					{
-						text: '删除',
-						style: {
-							backgroundColor: '#dd524d'
-						}
-					}
-				],
-				isSelect: false, //是否是选择地址
-			};
-		},
-		onLoad(ops) {
-			if (ops.id) {
-				this.selectId = ops.id
-				this.isSelect = ops.isSelect
-			}
-		},
-		onShow(ops) {
-			this.getAddressList();
-		},
-		methods: {
-			//选择地址
-			handleSelectAddr(item) {
-				uni.$emit('selectAddr', item)
-				uni.navigateBack({
-					delta: 1
-				})
-			},
-			//打开删除弹窗
-			deletePopup(id) {
-				this.deleteId = id
-				this.$refs.deleteDialog?.openPopup()
-			},
-			// 删除
-			confirmDelete() {
-				uni.$u.http.post(`/token/user/address/remove/${this.deleteId}`).then((res) => {
-					if (res.code == 200) {
-						this.$u.toast(`删除成功`);
-						this.getAddressList()
-					}
-				})
-			},
-			// 设为默认
-			setDefaultAddress({
-				id
-			}) {
-				uni.$u.http.post(`/token/user/address/setDefault/${id}`).then(res => {
-					if (res.code == 200) {
-						uni.showToast({
-							icon: "none",
-							title: "设置默认地址成功"
-						})
-						this.getAddressList()
-					} else {
-						uni.showToast(res.msg)
-					}
-				})
-			},
-			getAddressList() {
-				this.loading = true;
-				uni.$u.http.get('/token/user/address/list?content=' + '').then(res => {
-					if (res.code == 200) {
-						this.list = res.data;
-					}
-				}).finally(() => this.loading = false)
-			}
-		},
-	};
+import AddressCard from '@/pages-mine/components/address-card.vue';
+import commonDialog from '@/components/common-dialog.vue';
+export default {
+    components: {
+        AddressCard,
+        commonDialog
+    },
+    data() {
+        return {
+            selectId: '',
+            deleteId: '', //要删除的id
+            isBack: false,
+            loading: false,
+            editAddress: 0,
+            list: [],
+            options: [{
+                text: '设为默认',
+                style: {
+                    backgroundColor: '#22ac38'
+                }
+            },
+            {
+                text: '删除',
+                style: {
+                    backgroundColor: '#dd524d'
+                }
+            }
+            ],
+            isSelect: false, //是否是选择地址
+        };
+    },
+    onLoad(ops) {
+        if (ops.id) {
+            this.selectId = ops.id
+            this.isSelect = ops.isSelect
+            this.editAddress = ops.editAddress || 0
+        }
+    },
+    onShow(ops) {
+        this.getAddressList();
+    },
+    methods: {
+        //选择地址
+        handleSelectAddr(item) {
+            if (this.editAddress == 1) {
+                uni.$emit('selectEditAddr', item)
+                uni.setStorageSync('selectEditAddr', item)
+            } else {
+                uni.$emit('selectAddr', item)
+                uni.setStorageSync('selectAddr', item)
+            }
+            uni.navigateBack({
+                delta: 1
+            })
+        },
+        //打开删除弹窗
+        deletePopup(id) {
+            this.deleteId = id
+            this.$refs.deleteDialog?.openPopup()
+        },
+        // 删除
+        confirmDelete() {
+            uni.$u.http.post(`/token/user/address/remove/${this.deleteId}`).then((res) => {
+                if (res.code == 200) {
+                    this.$u.toast(`删除成功`);
+                    this.getAddressList()
+                }
+            })
+        },
+        // 设为默认
+        setDefaultAddress({
+            id
+        }) {
+            uni.$u.http.post(`/token/user/address/setDefault/${id}`).then(res => {
+                if (res.code == 200) {
+                    uni.showToast({
+                        icon: "none",
+                        title: "设置默认地址成功"
+                    })
+                    this.getAddressList()
+                } else {
+                    uni.showToast(res.msg)
+                }
+            })
+        },
+        getAddressList() {
+            this.loading = true;
+            uni.$u.http.get('/token/user/address/list?content=' + '').then(res => {
+                if (res.code == 200) {
+                    this.list = res.data;
+                }
+            }).finally(() => this.loading = false)
+        }
+    },
+};
 </script>
 
 <style lang="scss" scoped>
-	.list {
-		padding: 20rpx 30rpx 180rpx;
-		box-sizing: border-box;
-	}
+.list {
+    padding: 20rpx 30rpx 180rpx;
+    box-sizing: border-box;
+}
 </style>

+ 161 - 122
pages-mine/pages/apply-return.vue

@@ -1,135 +1,174 @@
 <template>
-	<view class="order-page">
-		<!-- 标签页 -->
-		<view class="tabs-wrapper">
-			<u-tabs :list="tabList" :current="currentTab" @change="handleTabChange" :is-scroll="false"
-				active-color="#38C148" bar-width="60"></u-tabs>
-		</view>
+    <view class="order-page">
+        <!-- 标签页 -->
+        <view class="tabs-wrapper">
+            <u-tabs :list="tabList" :current="currentTab" @change="handleTabChange" :is-scroll="false"
+                active-color="#38C148" bar-width="60"></u-tabs>
+        </view>
 
-		<!-- 订单列表 -->
-		<page-scroll :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty url="/token/order/scanLogs">
-			<view v-if="orderList.length > 0" class="pad-20">
-				<order-item isReturn v-for="order in orderList" :key="order.orderNo" :order="order" @cancel="handleCancel"
-					@report="handleReport" @editAddress="handleEditAddress" @remind="handleRemind"></order-item>
-			</view>
-		</page-scroll>
-	</view>
+        <!-- 订单列表 -->
+        <page-scroll v-if="currentTab == 0" :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty
+            url="/token/order/refundOrderList" :immediate="false">
+            <view v-if="orderList.length > 0" class="pad-20">
+                <order-return-item v-for="order in orderList" :key="order.orderId" :order="order"
+                    @action="handleAction"></order-return-item>
+            </view>
+        </page-scroll>
+
+
+        <page-scroll v-if="currentTab == 1" :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty
+            url="/token/order/canRefundOrderList" :immediate="false">
+            <view v-if="orderList.length > 0" class="pad-20">
+                <order-return-item v-for="order in orderList" :key="order.orderId" :order="order"
+                    :showAction="false" @click="handleItemClick(order)"></order-return-item>
+            </view>
+        </page-scroll>
+
+        <common-dialog ref="dialog" :title="dialogTitle" @confirm="handleConfirm">{{ dialogContent }}</common-dialog>
+    </view>
 </template>
 
 <script>
-	import OrderItem from '../components/order-item.vue'
-	import pageScroll from '@/components/pageScroll/index.vue'
+import pageScroll from '@/components/pageScroll/index.vue'
+import OrderReturnItem from '../components/order-return-item.vue'
+import CommonDialog from '@/components/common-dialog.vue'
+
+export default {
+    components: {
+        pageScroll,
+        OrderReturnItem,
+        CommonDialog
+    },
+    data() {
+        return {
+            tabList: [{
+                name: '已申请'
+            },
+            {
+                name: '可退回'
+            },
+            ],
+            currentTab: 0,
+            orderList: [],
+            requestUrl: '/token/order/refundOrderList',
+            refundUrl: '/token/order/refundOrderList',
+            canRefundUrl: '/token/order/canRefundOrderList',
+            dialogTitle: '提示',
+            dialogContent: '',
+            actionType: '',
+            orderInfo: {} // 订单信息
+        }
+    },
+    onLoad(options) {
+        // 如果有传入状态,切换到对应tab
+        this.refreshList()
+    },
+    onShow(){
+        this.refreshList()
+    },
+    methods: {
+        refreshList() {
+            this.requestUrl = this.currentTab == 0 ? this.refundUrl : this.canRefundUrl
+            this.$refs.pageRef?.loadData(true)
+        },
+        handleTabChange(index) {
+            this.currentTab = index
+            this.$nextTick(() => {
+                this.$refs.pageRef?.loadData(true)
+            })
+        },
+
+        handleUpdateList(list) {
+            this.orderList = list
+            console.log(this.orderList, 'list')
+        },
+
+        //操作按钮
+        handleAction({ type, order }) {
+            this.actionType = type
+            this.orderInfo = order
+            console.log(type, order, 'action')
+            switch (type) {
+                case 'cancel':
+                    this.dialogContent = '确定取消退回?'
+                    this.$refs.dialog?.openPopup()
+                    break;
+                case 'confirm':
+                    this.dialogContent = '确定收货?'
+                    this.$refs.dialog?.openPopup()
+                    break;
+            }
+        },
+
+        //取消退回
+        handleCancel() {
+            let { refundOrderId, orderId } = this.orderInfo
+            uni.$u.http.post('/token/order/refundOrderCancel', {
+                refundOrderId: orderId || refundOrderId,
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('取消退回成功')
+                    this.$refs.pageRef.loadData(true)
+                } else {
+                    uni.$u.toast(res.msg)
+                }
+            })
+        },
 
-	export default {
-		components: {
-			OrderItem,
-			pageScroll
-		},
-		data() {
-			return {
-				tabList: [{
-						name: '已申请'
-					},
-					{
-						name: '可退回'
-					},
-				],
-				currentTab: 0,
-				orderList: [],
-			}
-		},
-		onLoad(options) {
-			// 如果有传入状态,切换到对应tab
-			if (options.status) {
-				const index = this.tabList.findIndex(tab => tab.value === options.status)
-				if (index !== -1) {
-					this.currentTab = index
-				}
-			}
-			this.loadOrders(true)
-		},
-		methods: {
-			// 加载订单 
-			loadOrders(bool = false) {
-				this.$refs.pageRef?.loadData(bool)
-			},
+        //确认收货
+        handleConfirmReceipt() {
+            let { refundOrderId, orderId } = this.orderInfo
+            uni.$u.http.post('/token/order/refundOrderFinish', {
+                refundOrderId: orderId || refundOrderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('确认收货成功')
+                    this.$refs.pageRef.loadData(true)
+                } else {
+                    uni.$u.toast(res.msg)
+                }
+            })
+        },
 
-			handleTabChange(index) {
-				this.currentTab = index
-				this.page = 1
-				this.loadOrders(true)
-			},
+        //弹窗确认按钮
+        handleConfirm() {
+            console.log('confirm')
+            switch (this.actionType) {
+                case 'cancel':
+                    this.handleCancel()
+                    break;
+                case 'confirm':
+                    this.handleConfirmReceipt()
+                    break;
+            }
+        },
 
-			handleUpdateList(list) {
-				this.orderList = list.map(item => {
-					return {
-						orderNo: '54631435441',
-						status: 'pending_review',
-						submitTime: '2024-12-06 15:00:00',
-						books: [{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							},
-							{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							},
-							{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							},
-							{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							},
-							{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							},
-							{
-								cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-							}
-						]
-					}
-				})
-			},
-			// 订单操作方法
-			handleCancel(order) {
-				uni.showModal({
-					title: '提示',
-					content: '确定要取消该订单吗?',
-					success: (res) => {
-						if (res.confirm) {
-							// 调用取消订单接口
-						}
-					}
-				})
-			},
-			handleReport(order) {
-				uni.navigateTo({
-					url: `/pages/order/report?orderNo=${order.orderNo}`
-				})
-			},
-			handleEditAddress(order) {
-				uni.navigateTo({
-					url: `/pages/order/address?orderNo=${order.orderNo}`
-				})
-			},
-			handleRemind(order) {
-				uni.showToast({
-					title: '已提醒审核',
-					icon: 'none'
-				})
-			}
-		}
-	}
+        handleItemClick(order) {
+            // 从可退回tab点击时,带上fromCanReturn参数
+            if (this.currentTab === 1) {
+                uni.navigateTo({
+                    url: `/pages-mine/pages/return-detail?orderId=${order.orderId}`
+                })
+            } else {
+                uni.navigateTo({
+                    url: `/pages-mine/pages/return-detail?orderId=${order.orderId}`
+                })
+            }
+        }
+    }
+}
 </script>
 
 <style lang="scss" scoped>
-	.order-page {
-		min-height: 100vh;
-		background-color: #F5F5F5;
+.order-page {
+    min-height: 100vh;
+    background-color: #F5F5F5;
 
-		.tabs-wrapper {
-			position: sticky;
-			top: 0;
-			z-index: 99;
-			background: #FFFFFF;
-		}
-	}
+    .tabs-wrapper {
+        position: sticky;
+        top: 0;
+        z-index: 99;
+        background: #FFFFFF;
+    }
+}
 </style>

+ 249 - 58
pages-mine/pages/apply.vue

@@ -29,7 +29,7 @@
         <view class="common-card flex-a flex-j-b mb-20" style="padding: 30rpx;" @click="selectBooks">
             <text class="required">选择退回书籍</text>
             <view class="flex-a">
-                <text class="common-text-2 font-26">请选择</text>
+                <text class="common-text-2 font-26">{{ length ? `已选择${length}本` : '请选择' }}</text>
                 <u-icon name="arrow-right" size="32" color="#666666"></u-icon>
             </view>
         </view>
@@ -39,88 +39,202 @@
             <view class="common-title mb-20"> <text>订单编号: {{ orderId }}</text></view>
 
             <!-- 书籍列表 -->
-            <detail-book-item :book="item" v-for="(item, index) in bookItems" isReturn :key="index" />
+            <select-book-item :book="item" v-for="(item, index) in bookItems" isReturn :key="index" />
         </view>
 
-        <view class="common-card" style="padding: 30rpx;" @click="selectBooks">
+        <view class="common-card" style="padding: 30rpx;">
             <view class="flex-a flex-j-b mb-20">
                 <text class="common-text-2 font-30">退回邮费:</text>
-                <text class="common-title" style="color: #FF0000;">首次免费退回/¥33.00</text>
+                <text class="common-title" style="color: #FF0000;">{{ returnFee }}</text>
             </view>
             <view class="common-card flex-a flex-j-b" style="background: #fafafa;">
                 <text class="common-text-2">书籍数量</text>
-                <text class="common-text-2">3</text>
+                <text class="common-text-2">{{ length }}</text>
             </view>
         </view>
 
         <view class="bottom-fixed-con">
-            <u-button type="primary">确认退回</u-button>
+            <u-button type="primary" @click="handleConfirm">确认退回</u-button>
         </view>
+
+        <CommonDialog ref="commonDialog" :title="dialogTitle" :showCancel="false">
+            {{ dialogContent }}
+        </CommonDialog>
+
+        <CommonDialog ref="returnDialog" title="退回不通过书籍" :showFooter="false" width="88%">
+            <view class="flex-a flex-j-b">
+                <button class="confirm-btn plain" @click="handleApplyBack">我要取回</button>
+                <button class="confirm-btn plain" @click="handleRecycleWare">仓库循环处理</button>
+            </view>
+            <view class="button-bottom" @click="handleRecycle">
+                <text style="font-size: 32rpx;font-weight: bold;">按纸价回收</text>
+                <text style="margin-top: 2px;">补贴 ¥{{ orderInfo.basicRecycleMoney || 0 }} 到余额</text>
+            </view>
+        </CommonDialog>
+
+        <CommonDialog ref="recycleDialog" title="是否按纸价回收" @confirm="handleRecycleConfirm">
+            补贴 ¥{{ orderInfo.basicRecycleMoney || 0 }} 到余额
+        </CommonDialog>
+        <CommonDialog ref="recycleWare" title="是否仓库循环处理" @confirm="handleRecycleWareConfirm">
+            感谢您对环保事业的支持,仓库将循环处理
+        </CommonDialog>
     </view>
 </template>
 
 <script>
 import OrderItem from '../components/order-item.vue'
-import detailBookItem from '../components/detail-book-item.vue';
+import selectBookItem from '../components/select-book-item.vue';
+import commonDialog from '../../components/common-dialog.vue';
+import CommonDialog from '../../components/common-dialog.vue';
 
 export default {
     components: {
         OrderItem,
-        detailBookItem
+        selectBookItem,
+        commonDialog,
+        CommonDialog
+    },
+    onLoad(options) {
+        this.isOnLoad = true
+        if (options.orderId) {
+            this.orderId = options.orderId
+            this.getOrderInfo(this.orderId)
+        }
     },
-
     data() {
         return {
             defaultAddr: {},
-            orderId: '54631435441',
-            bookItems: [
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    auditList: [
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                    ]
-                },
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    auditList: [
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                    ]
-                },
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    auditList: [
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '良好', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                    ]
-                },
-            ]
+            orderId: '',
+            bookItems: [],
+            returnFee: 0,
+            length: 0,
+            isOnLoad: true,
+            orderInfo: {},
+            dialogTitle: '提示',
+            dialogContent: '无此书或品相良好的书籍不需要退回。'
         }
     },
 
     methods: {
-        addAddress() {
-            // 添加地址逻辑
+        //确认退回
+        handleConfirm() {
+            // 检查是否有"无此书"的审核原因
+            const hasNoSuchBook = this.bookItems.some(book =>
+                book.auditCommentList.some(audit => audit.com === '无此书')
+            );
+
+            if (hasNoSuchBook) {
+                this.dialogContent = '无此书或品相良好的书籍不需要退回。';
+                this.$refs.commonDialog.openPopup();
+                return;
+            }
+
+            // 验证地址是否已选择
+            if (!this.defaultAddr.id) {
+                uni.showToast({
+                    title: '请选择退回地址',
+                    icon: 'none'
+                });
+                return;
+            }
+
+            // 验证是否选择了书籍
+            if (!this.bookItems.length) {
+                uni.showToast({
+                    title: '请选择需要退回的书籍',
+                    icon: 'none'
+                });
+                return;
+            }
+
+            // 打开退回选项对话框
+            this.$refs.returnDialog?.openPopup();
+        },
+
+        //我要取回 - 提交退回申请
+        handleApplyBack() {
+            // 构建请求参数
+            const detailList = this.bookItems.map(book => ({
+                isbn: book.isbn,
+                num: book.auditCommentList.length
+            }));
+
+            const params = {
+                orderId: this.orderId,
+                addressId: this.defaultAddr.id,
+                detailList: detailList
+            };
+
+            // 发起请求
+            uni.showLoading({
+                title: '提交中...'
+            });
+
+            uni.$u.http.post('/token/order/submitRefundOrder', params)
+                .then(res => {
+                    if (res.code === 200) {
+                        if (res.data.firstOrder == 1) {
+                            // 提交成功后
+                            this.dialogContent = '提交成功'
+                            this.$refs.commonDialog.openPopup()
+                            uni.removeStorageSync('selectAddr')
+                        } else {
+                            //跳转去付款页面
+                            uni.navigateTo({
+                                url: `/pages-mine/pages/cashier-desk?id=${res.data.refundOrderId}`
+                            })
+                        }
+                    } else {
+                        uni.showToast({
+                            title: res.msg || '提交失败',
+                            icon: 'none'
+                        });
+                    }
+                })
+                .finally(() => {
+                    uni.hideLoading();
+                });
+        },
+
+        //仓库循环处理
+        handleRecycleWare() {
+            this.$refs.recycleWare?.openPopup()
+        },
+
+        //仓库循环处理确认
+        handleRecycleWareConfirm() {
+            uni.$u.http.post('/token/order/notNeed', {
+                orderId: this.orderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast(`已补贴 ${this.orderInfo.basicRecycleMoney || 0} 到余额`)
+                    uni.navigateBack()
+                }
+            })
+        },
+
+        //纸价回收
+        handleRecycle() {
+            this.$refs.recycleDialog?.openPopup()
         },
 
+        //纸价回收确认
+        handleRecycleConfirm() {
+            uni.$u.http.post('/token/order/basicRecycle', {
+                orderId: this.orderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('纸价回收成功')
+                    uni.navigateBack()
+                }
+            })
+        },
+
+        // 选择书籍页面
         selectBooks() {
-            // 选择书籍逻辑
+            uni.navigateTo({
+                url: `/pages-mine/pages/return-select?orderId=${this.orderId}`
+            })
         },
 
         //添加或者选择地址
@@ -130,14 +244,78 @@ export default {
             })
         },
 
-    },
-    mounted() {
-        uni.$on('selectAddr', (item) => {
-            if (item.id) {
-                this.defaultAddr = item
+        //计算退回邮费
+        calculateReturnFee() {
+            // 如果是首单,显示免费退回
+            if (this.orderInfo.firstOrder == 1) {
+                return '首次免费退回';
             }
-        })
-    }
+
+            const bookCount = this.length;
+            // 如果没有选择书籍,返回0
+            if (bookCount === 0) {
+                return '¥0.00';
+            }
+
+            // 小于4本是5元,超出4本的,在5元的基础上一本加1
+            const baseFee = 5;
+            const extraBooks = Math.max(0, bookCount - 4);
+            const totalFee = baseFee + extraBooks;
+
+            return `¥${totalFee.toFixed(2)}`;
+        },
+
+        //获取订单信息
+        getOrderInfo(orderId) {
+            if (!this.isOnLoad) {
+                return
+            }
+            uni.$u.http.get('/token/order/getOrderDetail?orderId=' + orderId).then(res => {
+                if (res.code === 200) {
+                    this.isOnLoad = false
+                    this.orderInfo = res.data
+
+                    let length = 0
+                    // 过滤出已审核不良的书籍,作为默认选择的书籍
+                    this.bookItems = res.data.detailVoList.filter(book => {
+                        let list = book.auditCommentList.filter(audit => audit.sts === 3 && audit.com !== '无此书')
+                        list.forEach((audit, index) => {
+                            audit.isSelected = true
+                        })
+                        book.auditCommentList = list
+                        length += list.length
+                        return list.length > 0
+                    })
+
+                    this.length = length
+                    this.returnFee = this.calculateReturnFee()
+
+                    uni.setStorageSync('selectedReturnBooks', {
+                        selectedBooks: this.bookItems,
+                        returnFee: this.returnFee,
+                        length: this.length
+                    })
+                }
+            })
+        },
+        //获取选中的书籍
+        getSelectedBooks() {
+            let selectedReturnBooks = uni.getStorageSync('selectedReturnBooks')
+            if (selectedReturnBooks) {
+                this.bookItems = selectedReturnBooks.selectedBooks || []
+                this.returnFee = selectedReturnBooks.returnFee || 0
+                this.length = selectedReturnBooks.length || 0
+            }
+        },
+    },
+    onShow() {
+        if (!this.isOnLoad) {
+            this.getSelectedBooks()
+        }
+
+        //选择的地址信息
+        this.defaultAddr = uni.getStorageSync('selectAddr') || {}
+    },
 }
 </script>
 
@@ -162,4 +340,17 @@ export default {
         }
     }
 }
+.button-bottom {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin: 30rpx 0;
+    background-color: #38C148;
+    color: #ffffff;
+    font-size: 24rpx;
+    line-height: 32rpx;
+    padding: 16rpx 0;
+    border-radius: 10rpx;
+}
 </style>

+ 176 - 0
pages-mine/pages/cashier-desk.vue

@@ -0,0 +1,176 @@
+<template>
+    <view class="cashier-desk">
+        <view class="view-top">
+        </view>
+        <view class="payment-methods">
+            <u-radio-group v-model="formData.payType" @change="radioGroupChange">
+                <view class="payment-item">
+                    <view class="left">
+                        <image src="../static/pay1.png" class="payment-icon"></image>
+                        <text>微信支付</text>
+                    </view>
+                    <u-radio active-color="#38C148" name="1" />
+                </view>
+                <view class="payment-item">
+                    <view class="left">
+                        <image src="../static/pay2.png" class="payment-icon"></image>
+                        <text>余额支付(余额{{ baseInfo.restMoney || 0 }})</text>
+                    </view>
+                    <u-radio active-color="#38C148" name="2" />
+                </view>
+
+                <view class="payment-item">
+                    <view class="left">
+                        <image src="../static/pay2.png" class="payment-icon"></image>
+                        <text>组合支付</text>
+                    </view>
+                    <u-radio active-color="#38C148" name="3" />
+                </view>
+            </u-radio-group>
+        </view>
+
+        <view class="total">
+            <text>总计</text>
+            <text class="amount">¥ {{ baseInfo.expressMoney || 0 }}</text>
+        </view>
+
+        <button class="confirm-btn" @click="onConfirmPayment">确认支付</button>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            totalAmount: 7.00,
+            formData: {
+                payType: '1',
+                refundOrderId: ''
+            },
+            baseInfo: {}
+        }
+    },
+    onLoad(options) {
+        if (options.id) {
+            this.formData.refundOrderId = options.id
+            this.getBaseInfo(options.id)
+        }
+    },
+    methods: {
+        //获取基本信息
+        getBaseInfo(refundOrderId) {
+            uni.$u.http.post('/token/order/refundGoPay', {
+                refundOrderId
+            }).then(res => {
+                if (res.code === 200) {
+                    this.baseInfo = res.data
+                }
+            })
+        },
+
+        onConfirmPayment() {
+            uni.showLoading({
+                title: '支付处理中'
+            })
+            uni.$u.http.post('/token/order/refundOrderPay', this.formData).then(res => {
+                if (res.code == 200) {
+                    if (res.data.needPay == 1) {
+                        // TODO: 调用支付接口
+                        uni.requestPayment({
+                            timeStamp: res.data.timeStamp,
+                            nonceStr: res.data.nonceStr,
+                            package: `prepay_id=${res.data.prepayId}`,
+                            signType: res.data.signType,
+                            paySign: res.data.paySign,
+                            provider: 'wxpay',
+                            success: (res) => {
+                                //支付成功之后,跳转支付成功页面
+                                uni.navigateTo({
+                                    url: `/pages-mine/pages/pay-success?orderId=${this.formData.refundOrderId}`
+                                })
+                            },
+                            fail: (err) => {
+                                console.log(err)
+                            }
+                        })
+                    } else {
+                        //支付成功之后,跳转支付成功页面
+                        uni.navigateTo({
+                            url: `/pages-mine/pages/pay-success?orderId=${this.formData.refundOrderId}`
+                        })
+                    }
+                }
+            })
+        },
+
+        radioGroupChange(e) {
+            console.log(e);
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.cashier-desk {
+    min-height: 100vh;
+    background-color: #f5f5f5;
+
+    .view-top {
+        background: #38C148;
+        height: 160rpx;
+        width: 100%;
+    }
+
+    .payment-methods {
+        background-color: #ffffff;
+        border-radius: 16rpx;
+        margin-bottom: 20rpx;
+        margin: 30rpx;
+        margin-top: -40px;
+
+        .payment-item {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            padding: 30rpx;
+            border-bottom: 1px solid #f5f5f5;
+
+            &:last-child {
+                border-bottom: none;
+            }
+
+            .left {
+                display: flex;
+                align-items: center;
+                gap: 20rpx;
+
+                .payment-icon {
+                    width: 40rpx;
+                    height: 40rpx;
+                }
+            }
+        }
+    }
+
+    .total {
+        background-color: #ffffff;
+        border-radius: 16rpx;
+        padding: 30rpx;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        margin-bottom: 20rpx;
+
+        .amount {
+            color: #ff0000;
+            font-size: 32rpx;
+        }
+    }
+
+    .confirm-btn {
+        width: 90%;
+        margin-left: 5%;
+        margin-top: 100rpx;
+    }
+}
+</style>

+ 414 - 133
pages-mine/pages/complaint.vue

@@ -1,141 +1,422 @@
 <template>
-	<view class="complaint-page">
-		<!-- 表单区域 -->
-		<view class="form-block">
-			<!-- 投诉原因 -->
-			<view class="form-item flex-a">
-				<view class="common-text-2 required">投诉原因</view>
-				<view class="input-wrapper flex-1" @click="showReasonPicker">
-					<text class="placeholder" v-if="!complaintReason">请选择投诉原因</text>
-					<text v-else>{{ complaintReason }}</text>
-					<u-icon name="arrow-right" color="#333" size="32" top="3rpx"></u-icon>
-				</view>
-			</view>
-		</view>
-
-		<view class="form-block">
-			<!-- 联系方式 -->
-			<view class="form-item flex-a" style="padding:14rpx 0">
-				<view class="common-text-2 required">联系方式</view>
-				<u-input class="flex-1" input-align="right" placeholder-style="color:#999;font-size:28rpx;"
-					v-model="phone" placeholder="请输入联系方式" :border="false" type="number" maxlength="11"></u-input>
-			</view>
-		</view>
-
-		<view class="common-text-2 required mb-20">投诉说明</view>
-		<view class="form-block" style="padding: 20rpx;">
-			<!-- 投诉说明 -->
-			<u-input v-model="description" type="textarea" placeholder="请描述投诉情况,有助于客服更快处理" :height="200"
-				:border="false"></u-input>
-		</view>
-
-		<!-- 图片上传 -->
-		<view class="common-text-2 required mb-20">上传凭证(最多3张)</view>
-
-		<u-upload class="upload-image" :fileList="fileList" @afterRead="afterRead" @delete="deletePic" :maxCount="3"
-			:previewFullImage="true" uploadText="点击上传"></u-upload>
-
-		<!-- 底部按钮 -->
-		<view class="bottom-fixed-con">
-			<u-button type="primary" @click="submitComplaint">提交</u-button>
-		</view>
-
-		<!-- 投诉原因选择器 -->
-		<u-picker v-model="showPicker" mode="selector" :range="reasonList" @confirm="confirmReason"
-			@cancel="showPicker = false"></u-picker>
-	</view>
+    <view class="complaint-page">
+        <template v-if="complaintInfo.complaintsStatus == 1">
+            <!-- 处理状态展示 -->
+            <view class="status-block" v-if="complaintInfo.disposeLogList && complaintInfo.disposeLogList.length">
+                <view class="status-title">书嗨处理</view>
+                <view class="time">--</view>
+
+                <view class="status-info">
+                    <view class="info-row">
+                        <text class="label">处理状态:</text>
+                        <text class="value status-text">{{ complaintStatusText }}</text>
+                    </view>
+                    <view class="info-row">
+                        <text class="label">平台回复:</text>
+                        <text class="value">{{ complaintInfo.description || '暂无' }}</text>
+                    </view>
+                </view>
+            </view>
+
+            <!-- 处理记录时间轴 -->
+            <view class="complaint-records">
+                <!-- 我的投诉 -->
+                <view class="complaint-item" v-for="(item, index) in complaintInfo.disposeLogList" :key="index">
+                    <view class="complaint-header">
+                        <view class="header-main">
+                            <text class="title">{{ item.userType == 1 ? '我的投诉' : '客服回复' }}</text>
+                            <text class="time">{{ item.createTime }}</text>
+                        </view>
+                    </view>
+                    <view class="complaint-content">
+                        <view class="info-row" v-if="item.reason">
+                            <text class="label">投诉原因:</text>
+                            <text class="value">{{ item.reason }}</text>
+                        </view>
+                        <view class="info-row" v-if="item.contactNumber">
+                            <text class="label">联系方式:</text>
+                            <text class="value">{{ item.contactNumber }}</text>
+                        </view>
+                        <view class="info-row">
+                            <text class="label">投诉说明:</text>
+                            <text class="value">{{ item.description }}</text>
+                        </view>
+                        <view class="info-row image-list" v-if="item.imgList && item.imgList.length">
+                            <text class="label">上传凭证:</text>
+                            <view class="images">
+                                <image v-for="(img, imgIndex) in item.imgList" :key="imgIndex" :src="img"
+                                    mode="aspectFill" @click="previewImage(item.imgList, imgIndex)">
+                                </image>
+                            </view>
+                        </view>
+                    </view>
+                </view>
+            </view>
+        </template>
+
+        <!-- 新投诉表单,仅在status为1时显示 -->
+        <template v-else>
+            <!-- 表单区域 -->
+            <view class="form-block">
+                <!-- 投诉原因 -->
+                <view class="form-item flex-a">
+                    <view class="common-text-2 required">投诉原因</view>
+                    <view class="input-wrapper flex-1" @click="showReasonPicker">
+                        <text class="placeholder" v-if="!complaintReason">请选择投诉原因</text>
+                        <text v-else>{{ complaintReason }}</text>
+                        <u-icon name="arrow-right" color="#333" size="32" top="3rpx"></u-icon>
+                    </view>
+                </view>
+            </view>
+
+            <view class="form-block">
+                <!-- 联系方式 -->
+                <view class="form-item flex-a" style="padding:14rpx 0">
+                    <view class="common-text-2 required">联系方式</view>
+                    <u-input class="flex-1" input-align="right" placeholder-style="color:#999;font-size:28rpx;"
+                        v-model="phone" placeholder="请输入联系方式" :border="false" type="number" maxlength="11"></u-input>
+                </view>
+            </view>
+
+            <view class="common-text-2 required mb-20">投诉说明</view>
+            <view class="form-block" style="padding: 20rpx;">
+                <!-- 投诉说明 -->
+                <u-input v-model="description" type="textarea" placeholder="请描述投诉情况,有助于客服更快处理" :height="200"
+                    :border="false"></u-input>
+            </view>
+
+            <!-- 图片上传 -->
+            <view class="common-text-2 required mb-20">上传凭证(最多3张)</view>
+
+            <u-upload class="upload-image" :fileList="fileList" @on-choose-complete="afterRead" @delete="deletePic"
+                :maxCount="3" :auto-upload="false" :previewFullImage="true" uploadText="点击上传"
+                @on-uploaded="onUploaded"></u-upload>
+
+            <!-- 底部按钮 -->
+            <view class="bottom-fixed-con">
+                <u-button type="primary" @click="submitComplaint">提交</u-button>
+            </view>
+
+            <!-- 投诉原因选择器 -->
+            <u-picker v-model="showPicker" mode="selector" :range="reasonList" @confirm="confirmReason"
+                @cancel="showPicker = false"></u-picker>
+        </template>
+    </view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				complaintReason: '',
-				phone: '',
-				description: '',
-				fileList: [],
-				showPicker: false,
-				reasonList: ['价格问题', '质量问题', '服务态度', '其他问题']
-			}
-		},
-		methods: {
-			showReasonPicker() {
-				this.showPicker = true
-			},
-			confirmReason(e) {
-				this.complaintReason = e.value[0]
-				this.showPicker = false
-			},
-			afterRead(event) {
-				const {
-					file
-				} = event
-				this.fileList.push({
-					url: file.url,
-					status: 'success',
-					message: '上传成功'
-				})
-			},
-			deletePic(event) {
-				this.fileList.splice(event.index, 1)
-			},
-			submitComplaint() {
-				if (!this.complaintReason) {
-					return uni.$u.toast('请选择投诉原因')
-				}
-				if (!this.phone) {
-					return uni.$u.toast('请输入联系方式')
-				}
-				if (!this.description) {
-					return uni.$u.toast('请输入投诉说明')
-				}
-				// TODO: 提交投诉信息
-				uni.$u.toast('投诉上报已上报给管理员')
-			}
-		}
-	}
+import ENV_CONFIG from '@/.env.js'
+// api前缀
+const env = ENV_CONFIG[process.env.ENV_TYPE || 'dev'];
+export default {
+    data() {
+        return {
+            complaintReason: '',
+            phone: '',
+            description: '',
+            fileList: [],
+            showPicker: false,
+            reasonList: [],
+            orderId: '',
+            complaintInfo: {
+                status: 1,
+                platformReply: '',
+                disposeLogList: []
+            }
+        }
+    },
+    computed: {
+        complaintStatusText() {
+            const status = this.complaintInfo.complaintsStatus;
+            const statusMap = {
+                "0": '未投诉过',
+                "1": '待处理',
+                "2": '处理中',
+                "3": '已完结'
+            };
+            return statusMap[status] || '未知状态';
+        }
+    },
+    onLoad(ops) {
+        if (ops.orderId) {
+            this.orderId = ops.orderId
+            this.getComplaintInfo()
+        }
+        this.getComplaintsOptions()
+    },
+    methods: {
+        // 获取投诉信息
+        getComplaintInfo() {
+            uni.$u.http.get(`/token/order/getComplaintsInfo?orderId=${this.orderId}&type=1`)
+                .then(res => {
+                    if (res.code === 200) {
+                        this.complaintInfo = res.data
+                    }
+                })
+        },
+        //根据code获取字典 /token/common/getDictOptions
+        getDict(code) {
+            return uni.$u.http.get('/token/common/getDictOptions?type=' + code)
+        },
+        //获取投诉选项 complaints_options
+        getComplaintsOptions() {
+            this.getDict('complaints_options').then(res => {
+                if (res.code === 200) {
+                    this.reasonList = res.data.map(item => item.dictLabel)
+                }
+            })
+        },
+
+        showReasonPicker() {
+            this.showPicker = true
+        },
+        confirmReason(e) {
+            this.complaintReason = this.reasonList[e[0]]
+            this.showPicker = false
+        },
+        onUploaded(lists, name) {
+            console.log(lists, name, 'xx111x')
+        },
+        afterRead(lists) {
+            // 先检查token是否存在
+            const token = uni.getStorageSync('token');
+
+            const uploadTasks = lists.map(item => {
+                return new Promise((resolve, reject) => {
+                    console.log(item, env.apiUrl + `/api/token/order/complaintUpload/${this.orderId}`, 'xx111x')
+                    uni.uploadFile({
+                        url: env.apiUrl + `/api/token/order/complaintUpload/${this.orderId}`,
+                        filePath: item.url,
+                        name: 'file',
+                        header: {
+                            Authorization: 'Bearer ' + token
+                        },
+                        success: (res) => {
+                            const result = JSON.parse(res.data);
+                            if (result.code === 200 && result.data) {
+                                resolve(result.data);
+                            } else {
+                                uni.$u.toast(result.msg || '上传失败');
+                                reject(new Error(result.msg || '上传失败'));
+                            }
+                        },
+                        fail: (err) => {
+                            uni.$u.toast('上传失败');
+                            reject(err);
+                        }
+                    });
+                });
+            });
+
+            Promise.all(uploadTasks).then(results => {
+                this.uploadSuccessList = results.flat();
+                this.fileList = lists;
+                console.log(this.fileList, 'xx111x', results)
+            }).catch(err => {
+                console.error('Upload failed:', err);
+            });
+        },
+        deletePic(event) {
+            this.fileList.splice(event.index, 1)
+        },
+        submitComplaint() {
+            if (!this.complaintReason) {
+                return uni.$u.toast('请选择投诉原因')
+            }
+            if (!this.phone) {
+                return uni.$u.toast('请输入联系方式')
+            }
+            if (!this.description) {
+                return uni.$u.toast('请输入投诉说明')
+            }
+
+            // 准备投诉数据
+            const complaintData = {
+                orderId: this.orderId,
+                reason: this.complaintReason,
+                description: this.description,
+                contactNumber: this.phone,
+                fileUrls: this.uploadSuccessList
+            }
+
+            // 提交投诉
+            uni.$u.http.post('/token/order/addComplaints', complaintData)
+                .then(res => {
+                    if (res.code === 200) {
+                        uni.$u.toast('投诉上报已上报给管理员')
+                        // 返回订单页
+                        setTimeout(() => {
+                            uni.navigateBack({
+                                delta: 1
+                            })
+                        }, 1500)
+                    } else {
+                        uni.$u.toast(res.msg || '提交失败')
+                    }
+                })
+        },
+        // 图片预览
+        previewImage(urls, current) {
+            uni.previewImage({
+                urls: urls,
+                current: current
+            });
+        }
+    }
+}
 </script>
 
 <style lang="scss">
-	.complaint-page {
-		min-height: 100vh;
-		background: #F8F8F8;
-		padding: 20rpx;
-		padding-bottom: 120rpx;
-
-		.form-block {
-			background: #FFFFFF;
-			border-radius: 12rpx;
-			padding: 0 30rpx;
-			margin-bottom: 20rpx;
-		}
-
-		.required::before {
-			content: '*';
-			color: #FF5B5B;
-			margin-right: 4rpx;
-		}
-
-		.form-item {
-			padding: 30rpx 0;
-
-			.input-wrapper {
-				display: flex;
-				justify-content: flex-end;
-				align-items: center;
-				font-size: 28rpx;
-				color: #333;
-
-				.placeholder {
-					color: #999;
-				}
-			}
-		}
-	}
-
-	::v-deep .upload-image {
-		.u-list-item {
-			background: #ffffff;
-		}
-	}
+.complaint-page {
+    min-height: 100vh;
+    background: #F8F8F8;
+    padding: 20rpx;
+    padding-bottom: 120rpx;
+
+    .status-block {
+        background: #FFFFFF;
+        border-radius: 12rpx;
+        padding: 30rpx;
+        margin-bottom: 20rpx;
+
+        .status-title {
+            font-size: 32rpx;
+            font-weight: 600;
+            color: #222;
+        }
+
+        .divider {
+            height: 2rpx;
+            background: #EEEEEE;
+            margin: 20rpx 0;
+        }
+
+        .status-info {
+            .info-row {
+                display: flex;
+                font-size: 28rpx;
+                line-height: 48rpx;
+
+                .label {
+                    color: #333;
+                    min-width: 140rpx;
+                }
+
+                .value {
+                    color: #333;
+                    flex: 1;
+                }
+
+                .status-text {
+                    color: #FF5B5B;
+                }
+            }
+        }
+    }
+
+    .complaint-records {
+        .complaint-item {
+            background: #FFFFFF;
+            border-radius: 12rpx;
+            padding: 30rpx;
+            margin-bottom: 20rpx;
+
+            .complaint-header {
+                margin-bottom: 24rpx;
+
+                .header-main {
+                    display: flex;
+                    flex-direction: column;
+                    gap: 8rpx;
+
+                    .title {
+                        font-size: 32rpx;
+                        font-weight: 600;
+                        color: #222222;
+                    }
+
+                    .time {
+                        font-size: 26rpx;
+                        color: #999;
+                    }
+                }
+            }
+
+            .complaint-content {
+                .info-row {
+                    display: flex;
+                    margin-bottom: 16rpx;
+                    font-size: 28rpx;
+                    line-height: 1.5;
+
+                    .label {
+                        color: #333;
+                        white-space: nowrap;
+                    }
+
+                    .value {
+                        color: #333;
+                        flex: 1;
+                    }
+                }
+
+                .image-list {
+                    .label {
+                        display: block;
+                        font-size: 28rpx;
+                        color: #333;
+                        margin-bottom: 16rpx;
+                    }
+
+                    .images {
+                        display: flex;
+                        flex-wrap: wrap;
+                        gap: 20rpx;
+
+                        image {
+                            width: 140rpx;
+                            height: 140rpx;
+                            border-radius: 8rpx;
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    .form-block {
+        background: #FFFFFF;
+        border-radius: 12rpx;
+        padding: 0 30rpx;
+        margin-bottom: 20rpx;
+    }
+
+    .required::before {
+        content: '*';
+        color: #FF5B5B;
+        margin-right: 4rpx;
+    }
+
+    .form-item {
+        padding: 30rpx 0;
+
+        .input-wrapper {
+            display: flex;
+            justify-content: flex-end;
+            align-items: center;
+            font-size: 28rpx;
+            color: #333;
+
+            .placeholder {
+                color: #999;
+            }
+        }
+    }
+}
+
+.upload-image {
+    .u-list-item {
+        background: #ffffff !important;
+    }
+}
 </style>

+ 122 - 67
pages-mine/pages/order-detail.vue

@@ -1,28 +1,32 @@
 <template>
     <view class="order-detail">
         <!-- 时间轴组件 -->
-        <order-timeline></order-timeline>
-        <return-notice></return-notice>
+        <order-timeline :logVoList="orderInfo.logVoList"></order-timeline>
+
+        <!-- orderInfo.firstOrder == 1 &&  -->
+        <return-notice :orderInfo="orderInfo" v-if="orderInfo.restTime" @close="handleReturn"></return-notice>
         <!-- 书籍列表组件 -->
-        <book-list :books="bookList"></book-list>
+        <book-list :books="bookList" :totalNum="orderInfo.totalNum"></book-list>
 
         <!-- 收入信息区块 -->
         <view class="info-block">
             <view class=" flex-a flex-j-b">
                 <text class="common-title font-32">卖书收入:</text>
-                <text class="common-text" style="color: #FF0000;">待审核 / ¥33.00</text>
+                <text class="common-text" style="color: #FF0000;" v-if="orderInfo.finalMoney">¥{{
+                    orderInfo.finalMoney }}</text>
+                <text class="common-text" style="color: #FF0000;" v-else>待审核</text>
             </view>
             <view class="desc-bg">
                 <view class="flex-a flex-j-b">
                     <text class="common-text-2 font-26">书籍数量:</text>
-                    <text class="common-text font-26">3</text>
+                    <text class="common-text font-26">{{ orderInfo.totalNum }}</text>
                 </view>
                 <view class="flex-a flex-j-b">
                     <view class="common-text-2 font-26">
                         预估书款:
                         <u-icon name="question-circle-fill" color="#333333" size="36"></u-icon>
                     </view>
-                    <text class="common-text-2 font-26">¥29.70</text>
+                    <text class="common-text-2 font-26">¥{{ orderInfo.expectMoney }}</text>
                 </view>
             </view>
         </view>
@@ -30,7 +34,7 @@
         <view class="info-block">
             <view class=" flex-a flex-j-b">
                 <text class="common-title font-32">卖书编号:</text>
-                <view class="common-text-2 font-26 flex-a">465676768878
+                <view class="common-text-2 font-26 flex-a">{{ orderInfo.orderId }}
                     <image src="../static/copy.png" style="width: 42rpx;height:42rpx;margin-left: 20rpx;"
                         @click="copyOrderNo"></image>
                 </view>
@@ -38,7 +42,7 @@
             <view class="desc-bg">
                 <view class="flex-a flex-j-b">
                     <view class="common-text-2 font-26">快递备注:</view>
-                    <text class="common-text font-26">京东</text>
+                    <text class="common-text font-26">{{ orderInfo.expressDelivery || '-' }}</text>
                 </view>
             </view>
         </view>
@@ -46,15 +50,15 @@
         <!-- 地址信息区块 -->
         <view class="info-block">
             <view class=" flex-a flex-j-b">
-                <text class="common-title font-32" style="width: 400rpx;">发货地址:</text>
+                <text class="common-title font-32" style="width: 220rpx;">发货地址:</text>
 
-                <view class="flex-d flex-j-e">
+                <view class="flex-d flex-j-e flex-1">
                     <view class="common-text-2 font-26 mb-12">
-                        <text>张三</text>
-                        <text class="ml-40">151666666666</text>
+                        <text>{{ orderInfo.sendName }}</text>
+                        <text class="ml-40">{{ orderInfo.sendMobile }}</text>
                     </view>
                     <text class="common-text" style="line-height: 42rpx;">
-                        这里显示详细地址过长会显示省略号这里显示详细地址过长会显示省略号这里显示详细地址过长会显示省略号
+                        {{ orderInfo.sendAddress }}
                     </text>
                 </view>
             </view>
@@ -63,15 +67,32 @@
         <!-- 底部操作栏 -->
         <view class="bottom-fixed-con detail-bottom flex-d">
             <service-promise></service-promise>
-            <view class="flex-a flex-j-b pad-20" style="width: 100%;">
-                <u-button type="info">取消订单</u-button>
-
-                <view class="flex">
-                    <u-button type="primary" plain @click="toComplaint">投诉上报</u-button>
-                    <u-button type="primary" class="ml-20">修改地址</u-button>
-                </view>
+            <view class="flex-a" style="width: 100%;padding: 0 30rpx;">
+                <order-actions size="large" :order="orderInfo" :status="orderInfo.status" @action="handleAction"
+                    style="width: 100%;" @success="getOrderInfo"></order-actions>
             </view>
         </view>
+
+        <u-action-sheet v-model="showReportSheet" :list="actionList" @close="showReportSheet = false"
+            @click="handleReportSelect" cancelText="取消" :mask-close-able="false" :safe-area-inset-bottom="true" />
+
+        <CommonDialog ref="returnDialog" title="退回不通过书籍" :showFooter="false" @confirm="handleReturnConfirm" width="88%">
+            <view class="flex-a flex-j-b">
+                <button class="confirm-btn plain" @click="handleApplyBack">我要取回</button>
+                <button class="confirm-btn plain" @click="handleRecycleWare">仓库循环处理</button>
+            </view>
+            <view class="button-bottom" @click="handleRecycle">
+                <text style="font-size: 32rpx;font-weight: bold;">按纸价回收</text>
+                <text style="margin-top: 2px;">补贴 ¥{{ orderInfo.basicRecycleMoney || 0 }} 到余额</text>
+            </view>
+        </CommonDialog>
+
+        <CommonDialog ref="recycleDialog" title="是否按纸价回收" @confirm="handleReturnConfirm">
+            补贴 ¥{{ orderInfo.basicRecycleMoney || 0 }} 到余额
+        </CommonDialog>
+        <CommonDialog ref="recycleWare" title="是否仓库循环处理" @confirm="handleRecycleWareConfirm">
+            感谢您对环保事业的支持,仓库将循环处理
+        </CommonDialog>
     </view>
 </template>
 
@@ -80,72 +101,92 @@ import OrderTimeline from '../components/order-timeline.vue'
 import BookList from '../components/book-list.vue'
 import ReturnNotice from '../components/return-notice.vue';
 import ServicePromise from '../components/service-promise.vue';
+import btnAction from '../mixin/btnAction';
+import OrderActions from '../components/order-actions.vue';
+import CommonDialog from '@/components/common-dialog.vue';
 
 export default {
+    mixins: [btnAction],
     components: {
         OrderTimeline,
         BookList,
         ReturnNotice,
-        ServicePromise
+        ServicePromise,
+        OrderActions,
+        CommonDialog
     },
     data() {
         return {
-            bookList: [
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    auditList: [
-                        { status: '良好', price: '32.20' },
-                        { status: '不通过', price: '32.20', auditReason: '原因:笔记杂乱/习题做完' },
-                        { status: '良好', price: '32.20' },
-                    ]
-                },
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    maxNum: 5,
-                    auditList: [
-                        { status: '良好', price: '32.20' },
-                        { status: '良好', price: '32.20' },
-                        { status: '良好', price: '32.20' },
-                    ]
-                },
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                },
-                {
-                    cover: 'https://img3.doubanio.com/lpic/s1076932.jpg',
-                    bookName: '这里是书本名称bu换行',
-                    recycleMoney: '32.20',
-                    num: 2,
-                    suit: 1,
-                    maxNum: 5
-                }
-            ]
+            bookList: [],
+            // 订单信息
+            orderInfo: {},
+            orderId: ''
+        }
+    },
+    onLoad(options) {
+        if (options.orderId) {
+            this.orderId = options.orderId
+            this.getOrderInfo(options.orderId)
         }
     },
     methods: {
         copyOrderNo() {
             uni.setClipboardData({
-                data: '465676768878',
+                data: this.orderInfo.orderId,
                 success: () => {
                     uni.$u.toast('复制成功')
                 }
             })
         },
-        toComplaint() {
+        //获取订单信息
+        getOrderInfo() {
+            uni.$u.http.get('/token/order/getOrderDetail?orderId=' + this.orderId).then(res => {
+                if (res.code === 200) {
+                    this.orderInfo = res.data
+                    this.bookList = res.data.detailVoList
+                }
+            })
+        },
+        handleReturn() {
+            console.log('退回不通过书籍');
+            this.$refs.returnDialog?.openPopup()
+        },
+        //仓库循环处理
+        handleRecycleWare() {
+            this.$refs.recycleWare?.openPopup()
+        },
+        //仓库循环处理确认
+        handleRecycleWareConfirm() {
+            console.log('仓库循环处理确认');
+            uni.$u.http.post('/token/order/notNeed', {
+                orderId: this.orderInfo.orderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast(`已补贴 ${this.orderInfo.basicRecycleMoney || 0} 到余额`)
+                    this.getOrderInfo(this.orderInfo.orderId)
+                }
+            })
+        },
+        //纸价回收
+        handleRecycle() {
+            this.$refs.recycleDialog?.openPopup()
+        },
+        //纸价回收确认
+        handleRecycleConfirm() {
+            uni.$u.http.post('/token/order/basicRecycle', {
+                orderId: this.orderInfo.orderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('纸价回收成功')
+                    this.getOrderInfo(this.orderInfo.orderId)
+                }
+            })
+        },
+        //我要取回
+        handleApplyBack() {
+            console.log(this.orderInfo, 'xxxxx')
             uni.navigateTo({
-                url: '/pages-mine/pages/complaint'
+                url: `/pages-mine/pages/apply?orderId=${this.orderInfo.orderId}`
             })
         }
     }
@@ -172,11 +213,25 @@ export default {
         border-radius: 10rpx;
     }
 
-    .detail-bottom{
+    .detail-bottom {
         flex-direction: column;
         padding-left: 0;
         padding-right: 0;
         padding-top: 0;
     }
 }
+
+.button-bottom {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin: 30rpx 0;
+    background-color: #38C148;
+    color: #ffffff;
+    font-size: 24rpx;
+    line-height: 32rpx;
+    padding: 16rpx 0;
+    border-radius: 10rpx;
+}
 </style>

+ 45 - 43
pages-mine/pages/order-page.vue

@@ -7,40 +7,51 @@
         </view>
 
         <!-- 订单列表 -->
-        <page-scroll :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty url="/token/order/scanLogs">
+        <page-scroll :page-size="12" @updateList="handleUpdateList" ref="pageRef" slotEmpty
+            url="/token/order/getMyOrderList" :params="params" :immediate="false">
             <view v-if="orderList.length > 0" class="pad-20">
-                <order-item v-for="order in orderList" :key="order.orderNo" :order="order" @cancel="handleCancel"
-                    @report="handleReport" @editAddress="handleEditAddress" @remind="handleRemind"></order-item>
+                <order-item v-for="order in orderList" :key="order.orderNo" :order="order"
+                    @action="handleAction" @success="handleSuccess"></order-item>
             </view>
         </page-scroll>
+
+        <u-action-sheet v-model="showReportSheet" :list="actionList" @close="showReportSheet = false"
+            @click="handleReportSelect" cancelText="取消" :mask-close-able="false" :safe-area-inset-bottom="true" />
     </view>
 </template>
 
 <script>
 import OrderItem from '../components/order-item.vue'
 import pageScroll from '@/components/pageScroll/index.vue'
+import mixin from '../mixin/btnAction.js'
 
 export default {
+    mixins: [mixin],
     components: {
         OrderItem,
-        pageScroll
+        pageScroll,
     },
     data() {
         return {
             tabList: [{
-                name: '全部'
+                name: '全部',
+                status: "-1"
             },
             {
-                name: '待初审'
+                name: '待初审',
+                status: "2"
             },
             {
-                name: '待取件'
+                name: '待取件',
+                status: "3"
             },
             {
-                name: '待审核'
+                name: '待审核',
+                status: "8"
             },
             {
-                name: '待到款'
+                name: '待到款',
+                status: "10"
             }
             ],
             currentTab: 0,
@@ -48,55 +59,46 @@ export default {
             isRefreshing: false,
             page: 1,
             pageSize: 10,
-            hasMore: true
+            hasMore: true,
+            params: {}
         }
     },
     onLoad(options) {
         // 如果有传入状态,切换到对应tab
         if (options.status) {
-            this.currentTab = options.status * 1
+            this.currentTab = this.tabList.findIndex(item => item.status === options.status)
+            this.params.status = options.status
+        } else {
+            this.currentTab = 0
         }
-        this.loadOrders(true)
+        this.loadOrders(true, this.params)
+
+        uni.$on('btnActionSuccess', () => {
+            this.loadOrders(true, this.params)
+        })
     },
+    
+    onUnload() {
+        uni.$off('btnActionSuccess')
+    },
+    
     methods: {
-        // 加载订单 
-        loadOrders(bool = false) {
-            this.$refs.pageRef?.loadData(bool)
+        loadOrders(bool = false, params = {}) {
+            this.$refs.pageRef?.loadData(bool, params);
+        },
+
+        handleSuccess() {
+            this.loadOrders(true, this.params)
         },
 
         handleTabChange(index) {
             this.currentTab = index
-            this.page = 1
-            this.loadOrders(true)
+            this.params.status = this.tabList[index].status
+            this.loadOrders(true, this.params)
         },
 
         handleUpdateList(list) {
-            this.orderList = list.map(item => {
-                return {
-                    orderNo: '54631435441',
-                    status: 'pending_review',
-                    submitTime: '2024-12-06 15:00:00',
-                    books: [{
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    },
-                    {
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    },
-                    {
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    },
-                    {
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    },
-                    {
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    },
-                    {
-                        cover: 'https://shuhi.oss-cn-qingdao.aliyuncs.com/20241206/08ea280b-8627-4525-9e31-ed25cdce9094.jpg'
-                    }
-                    ]
-                }
-            })
+            this.orderList = list
         },
         // 订单操作方法
         handleCancel(order) {

+ 101 - 0
pages-mine/pages/pay-success.vue

@@ -0,0 +1,101 @@
+<template>
+    <view class="pay-success">
+        <view class="success-icon">
+            <image src="../static/pay-success.png" mode="aspectFit"></image>
+        </view>
+        <view class="success-title">支付成功</view>
+        <view class="success-desc">您发书籍将邮寄,请坐等快递</view>
+        <view class="action-buttons">
+            <button class="btn-return" @click="handleReturn">返回首页</button>
+            <button class="btn-view" @click="handleViewOrder">查看订单</button>
+        </view>
+    </view>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            orderId:''
+        }
+    },
+    onLoad(options){
+        this.orderId = options.orderId
+    },
+    methods: {
+        handleReturn() {
+            uni.switchTab({
+                url: '/pages/home/index'
+            })
+        },
+        handleViewOrder() {
+            uni.navigateTo({
+                url: '/pages-mine/pages/return-detail?orderId=' + this.orderId
+            })
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.pay-success {
+    min-height: 100vh;
+    background: #fff;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding-top: 120rpx;
+
+    .success-icon {
+        width: 160rpx;
+        height: 160rpx;
+        margin-bottom: 40rpx;
+
+        image {
+            width: 100%;
+            height: 100%;
+        }
+    }
+
+    .success-title {
+        font-size: 36rpx;
+        font-weight: 500;
+        color: #333;
+        margin-bottom: 20rpx;
+    }
+
+    .success-desc {
+        font-size: 28rpx;
+        color: #999;
+        margin-bottom: 80rpx;
+    }
+
+    .action-buttons {
+        display: flex;
+        gap: 30rpx;
+        padding: 0 40rpx;
+        width: 100%;
+        box-sizing: border-box;
+
+        button {
+            flex: 1;
+            height: 88rpx;
+            border-radius: 10rpx;
+            font-size: 32rpx;
+            display: flex;
+            align-items: center;
+            justify-content: center;
+
+            &.btn-return {
+                background: #f5f5f5;
+                color: #666;
+            }
+
+            &.btn-view {
+                background: #07c160;
+                color: #fff;
+            }
+        }
+    }
+}
+</style>

+ 224 - 0
pages-mine/pages/return-detail.vue

@@ -0,0 +1,224 @@
+<template>
+    <view class="order-detail">
+        <!-- 时间轴组件 -->
+        <order-timeline :logVoList="orderInfo.logVoList" isReturn></order-timeline>
+        <!-- 书籍列表组件 -->
+        <book-list :books="bookList" :totalNum="orderInfo.totalNum" isReturn></book-list>
+
+        <!-- 收入信息区块 -->
+        <view class="info-block">
+            <view class=" flex-a flex-j-b">
+                <text class="common-title font-32">退回邮费:</text>
+                <text class="common-text" style="color: #FF0000;font-weight: 600;">{{
+                    orderInfo.expressMoney ? `¥${orderInfo.expressMoney}` : '首单免费退回' }}</text>
+            </view>
+            <view class="desc-bg">
+                <view class="flex-a flex-j-b">
+                    <text class="common-text-2 font-26">书籍数量:</text>
+                    <text class="common-text font-26">{{ orderInfo.totalNum }}</text>
+                </view>
+            </view>
+        </view>
+        <!-- 订单信息区块 -->
+        <view class="info-block">
+            <view class=" flex-a flex-j-b">
+                <text class="common-title font-32">卖书编号:</text>
+                <view class="common-text-2 font-26 flex-a">{{ orderInfo.orderId || '-' }}
+                    <image src="../static/copy.png" style="width: 42rpx;height:42rpx;margin-left: 20rpx;"
+                        @click="copyOrderNo"></image>
+                </view>
+            </view>
+            <view class="desc-bg">
+                <view class="flex-a flex-j-b">
+                    <view class="common-text-2 font-26">退回编号:</view>
+                    <text class="common-text font-26">{{ orderInfo.refundOrderId || '-' }}</text>
+                    <image src="../static/copy.png" style="width: 42rpx;height:42rpx;margin-left: 20rpx;"
+                        @click="copyRefundNo"></image>
+                </view>
+            </view>
+        </view>
+
+        <!-- 地址信息区块 -->
+        <view class="info-block">
+            <view class=" flex-a flex-j-b">
+                <text class="common-title font-32" style="width: 220rpx;">收货地址:</text>
+
+                <view class="flex-d flex-j-e flex-1">
+                    <view class="common-text-2 font-26 mb-12">
+                        <text>{{ orderInfo.receiveName }}</text>
+                        <text class="ml-40">{{ orderInfo.receiveMobile }}</text>
+                    </view>
+                    <text class="common-text" style="line-height: 42rpx;">
+                        {{ orderInfo.receiveAddress }}
+                    </text>
+                </view>
+            </view>
+        </view>
+
+        <!-- 底部操作栏 -->
+        <view class="bottom-fixed-con detail-bottom flex-d">
+            <service-promise></service-promise>
+            <view class="flex-a" style="width: 100%;padding: 0 30rpx;">
+                <order-return-actions :order="orderInfo" :status="orderInfo.status" @action="handleAction"
+                    style="width: 100%;" size="large"></order-return-actions>
+            </view>
+        </view>
+
+        <!-- 弹窗 -->
+        <common-dialog ref="dialog" :title="dialogTitle" @confirm="handleConfirm">{{dialogContent}}</common-dialog>
+    </view>
+</template>
+
+<script>
+import OrderTimeline from '../components/order-timeline.vue'
+import BookList from '../components/book-list.vue'
+import ServicePromise from '../components/service-promise.vue';
+import OrderReturnActions from '../components/order-return-actions.vue';
+import CommonDialog from '@/components/common-dialog.vue';
+
+export default {
+    components: {
+        OrderTimeline,
+        BookList,
+        ServicePromise,
+        OrderReturnActions,
+        CommonDialog
+    },
+    data() {
+        return {
+            bookList: [],
+            // 订单信息
+            orderInfo: {},
+            // 弹窗
+            dialogTitle: '提示',
+            dialogContent: '',
+            actionType: '',
+            orderId: '',
+            fromCanReturn: false // 新增:标记是否从可退回tab进入
+        }
+    },
+    onLoad(options) {
+        if (options.orderId) {
+            this.orderId = options.orderId
+            this.fromCanReturn = options.fromCanReturn === 'true' // 新增:记录来源
+            this.getOrderInfo(options.orderId)
+        }
+    },
+    methods: {
+        copyOrderNo() {
+            uni.setClipboardData({
+                data: this.orderInfo.orderId,
+                success: () => {
+                    uni.$u.toast('复制成功')
+                }
+            })
+        },
+        //复制退回编号
+        copyRefundNo() {
+            uni.setClipboardData({
+                data: this.orderInfo.refundOrderId,
+                success: () => {
+                    uni.$u.toast('复制成功')
+                }
+            })
+        },
+
+        //获取订单信息
+        getOrderInfo() {
+            uni.$u.http.get('/token/order/getRefundOrderDetail?refundOrderId=' + this.orderId).then(res => {
+                if (res.code === 200) {
+                    this.orderInfo = res.data
+                    this.bookList = res.data.detailVoList
+                }
+            })
+        },
+
+        //操作按钮
+        handleAction({ type, order }) {
+            console.log(type, 'action')
+            this.actionType = type
+            switch (type) {
+                case 'cancel':
+                    this.dialogContent = '确定取消退回?'
+                    this.$refs.dialog?.openPopup()
+                    break;
+                case 'confirm':
+                    this.dialogContent = '确定收货?'
+                    this.$refs.dialog?.openPopup()
+                    break;
+            }
+        },
+
+        //取消退回
+        handleCancel() {
+            console.log('cancel')
+            uni.$u.http.post('/token/order/refundOrderCancel', {
+                refundOrderId: this.orderInfo.refundOrderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('取消退回成功')
+                    this.getOrderInfo()
+                } else {
+                    uni.$u.toast(res.msg)
+                }
+            })
+        },
+
+        //确认收货
+        handleConfirmReceipt() {
+            uni.$u.http.post('/token/order/refundOrderFinish', {
+                refundOrderId: this.orderInfo.refundOrderId
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.$u.toast('确认收货成功')
+                    this.getOrderInfo()
+                } else {
+                    uni.$u.toast(res.msg)
+                }
+            })
+        },
+
+        //弹窗确认按钮
+        handleConfirm() {
+            console.log('confirm')
+            switch (this.actionType) {
+                case 'cancel':
+                    this.handleCancel()
+                    break;
+                case 'confirm':
+                    this.handleConfirmReceipt()
+                    break;
+            }
+        },
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-detail {
+    min-height: 100vh;
+    background: #f8f8f8;
+    padding-bottom: 230rpx;
+
+    .desc-bg {
+        background: #fafafa;
+        padding: 20rpx 30rpx;
+        border-radius: 10rpx;
+        margin-top: 20rpx;
+    }
+
+    .info-block {
+        background: #FFFFFF;
+        padding: 30rpx;
+        margin: 30rpx;
+        border-radius: 10rpx;
+    }
+
+    .detail-bottom {
+        flex-direction: column;
+        padding-left: 0;
+        padding-right: 0;
+        padding-top: 0;
+    }
+}
+</style>

+ 246 - 0
pages-mine/pages/return-select.vue

@@ -0,0 +1,246 @@
+<template>
+    <view class="order-detail">
+        <!-- 书籍列表组件 -->
+        <view class="book-list">
+            <view class="header-info flex-a flex-j-b mb-20">
+                <text class="common-title">卖书编号:{{ orderInfo.orderId }}</text>
+            </view>
+
+            <select-book-item :book="item" v-for="(item, index) in bookList" :key="index"
+                @select="handleSelectBook"></select-book-item>
+        </view>
+
+        <!-- 收入信息区块 -->
+        <view class="common-card" style="padding: 30rpx;margin: 30rpx;" @click="selectBooks">
+            <view class="flex-a flex-j-b mb-20">
+                <text class="common-text-2 font-30">退回邮费:</text>
+                <text class="common-title" style="color: #FF0000;">{{ returnFee }}</text>
+            </view>
+            <view class="common-card flex-a flex-j-b" style="background: #fafafa;">
+                <text class="common-text-2">书籍数量</text>
+                <text class="common-text-2">{{ selectedBooks.length }}</text>
+            </view>
+        </view>
+
+        <!-- 底部操作栏 -->
+        <view class="bottom-fixed-con detail-bottom flex-d">
+            <view class="flex-a" style="width: 100%;padding: 0 30rpx;">
+                <u-checkbox v-model="isAllSelected" @change="handleSelectAll">全选</u-checkbox>
+                <button class="confirm-btn" style="width:400rpx;margin-left: 100rpx;"
+                    @click="handleConfirm">确认选择</button>
+            </view>
+        </view>
+    </view>
+</template>
+
+<script>
+import OrderTimeline from '../components/order-timeline.vue'
+import BookList from '../components/book-list.vue'
+import CommonDialog from '@/components/common-dialog.vue';
+import selectBookItem from '../components/select-book-item.vue';
+
+export default {
+    components: {
+        OrderTimeline,
+        BookList,
+        CommonDialog,
+        selectBookItem
+    },
+    data() {
+        return {
+            bookList: [],
+            orderInfo: {},
+            isAllSelected: false
+        }
+    },
+    computed: {
+        selectedBooks() {
+            // 计算选中的书籍列表
+            let selected = [];
+            this.bookList.forEach(book => {
+                book.auditCommentList.forEach(audit => {
+                    if (audit.isSelected) {
+                        selected.push({ ...book, selectedAudit: audit });
+                    }
+                });
+            });
+            return selected;
+        },
+        returnFee() {
+            // 如果是首单,显示免费退回
+            if (this.orderInfo.firstOrder == 1) {
+                return '首次免费退回';
+            }
+
+            const bookCount = this.selectedBooks.length;
+            // 如果没有选择书籍,返回0
+            if (bookCount === 0) {
+                return '¥0.00';
+            }
+
+            // 5本以内收费4元,超过5本每本加收1元
+            const baseFee = 5;
+            const extraBooks = Math.max(0, bookCount - 4);
+            const totalFee = baseFee + extraBooks;
+
+            return `¥${totalFee.toFixed(2)}`;
+        }
+    },
+    onLoad(options) {
+        if (options.orderId) {
+            this.getOrderInfo(options.orderId)
+        }
+    },
+    methods: {
+        copyOrderNo() {
+            uni.setClipboardData({
+                data: this.orderInfo.orderId,
+                success: () => {
+                    uni.$u.toast('复制成功')
+                }
+            })
+        },
+        //获取订单信息
+        getOrderInfo(orderId) {
+            uni.$u.http.get('/token/order/getOrderDetail?orderId=' + orderId).then(res => {
+                if (res.code === 200) {
+                    this.orderInfo = res.data
+                    let selectedReturnBooks = uni.getStorageSync('selectedReturnBooks')
+                    let selectedBooks = selectedReturnBooks.selectedBooks || []
+
+                    this.bookList = res.data.detailVoList.filter(book => {
+                        let selectedBook = selectedBooks.find(selectedBook => selectedBook.isbn === book.isbn)
+
+                        let list = book.auditCommentList.filter(audit => audit.sts === 3)
+                            .sort((a, b) => {
+                                if (a.com === '无此书' && b.com !== '无此书') return 1;
+                                if (a.com !== '无此书' && b.com === '无此书') return -1;
+                                return 0;
+                            });
+                        list.forEach((audit, index) => {
+                            audit.isSelected = selectedBook?.auditCommentList[index]?.isSelected || false
+                        })
+                        book.auditCommentList = list
+                        return list.length > 0
+                    })
+                    this.isAllSelected = this.bookList.every(book =>
+                        book.auditCommentList.every(audit => audit.isSelected)
+                    );
+                }
+            })
+        },
+        //选择书籍
+        handleSelectBook({ checked, index, isbn }) {
+            let found = false;
+            let updatedBook = null;
+
+            this.bookList = this.bookList.map(book => {
+                if (book.isbn === isbn) {
+                    const updatedAuditList = book.auditCommentList.map((audit, idx) => {
+                        if (idx === index) {
+                            found = true;
+                            return { ...audit, isSelected: checked };
+                        }
+                        return audit;
+                    });
+                    updatedBook = { ...book, auditCommentList: updatedAuditList };
+                    return updatedBook;
+                }
+                return book;
+            });
+
+            if (found) {
+                // 检查是否所有书籍都被选中
+                this.isAllSelected = this.bookList.every(book =>
+                    book.auditCommentList.every(audit => audit.isSelected)
+                );
+            }
+        },
+        //全选
+        handleSelectAll({ value }) {
+            this.isAllSelected = value;
+            this.bookList = this.bookList.map(book => ({
+                ...book,
+                auditCommentList: book.auditCommentList.map(audit => ({
+                    ...audit,
+                    isSelected: value
+                }))
+            }));
+        },
+        //确认选择
+        handleConfirm() {
+            if (this.selectedBooks.length === 0) {
+                uni.$u.toast('请选择要退回的书籍');
+                return;
+            }
+            //筛选出来选中的书籍
+            let selectedBooks = this.bookList.filter(book => {
+                let list = book.auditCommentList.filter(audit => audit.isSelected)
+                if (list.length > 0) {
+                    book.auditCommentList = list
+                    return book
+                }
+            })
+            console.log(selectedBooks, 'xxxx');
+            // 存储选中的书籍到本地
+            uni.setStorageSync('selectedReturnBooks', { selectedBooks, returnFee: this.returnFee, length: this.selectedBooks.length });
+
+            // 返回上一页
+            uni.navigateBack({
+                delta: 1
+            });
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.order-detail {
+    min-height: 100vh;
+    background: #f8f8f8;
+    padding-bottom: 230rpx;
+
+    .desc-bg {
+        background: #fafafa;
+        padding: 20rpx 30rpx;
+        border-radius: 10rpx;
+        margin-top: 20rpx;
+    }
+
+    .info-block {
+        background: #FFFFFF;
+        padding: 30rpx;
+        margin: 30rpx;
+        border-radius: 10rpx;
+    }
+
+    .detail-bottom {
+        flex-direction: column;
+        padding-left: 0;
+        padding-right: 0;
+        padding-top: 0;
+    }
+}
+
+.button-bottom {
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+    margin: 30rpx 0;
+    background-color: #38C148;
+    color: #ffffff;
+    font-size: 24rpx;
+    line-height: 32rpx;
+    padding: 16rpx 0;
+    border-radius: 10rpx;
+}
+
+.book-list {
+    background: #FFFFFF;
+    padding: 20rpx 30rpx;
+    margin: 30rpx;
+    border-radius: 10rpx;
+    box-sizing: border-box;
+}
+</style>

+ 101 - 46
pages-mine/pages/wallet.vue

@@ -4,18 +4,18 @@
         <view class="balance-card">
             <view class="card-header">
                 <text>我的余额</text>
-                <view class="detail-link" @click="goToDetail">
+                <view class="detail-link" @click="handleWithdrawDetail">
                     提现明细
                     <u-icon name="arrow-right" color="#FFFFFF" size="26" top="4rpx"></u-icon>
                 </view>
             </view>
 
             <view class="amount flex-c">
-                <text class="number">¥ 30.00</text>
+                <text class="number">¥ {{ restMoney }}</text>
             </view>
 
             <view class="balance-info  flex-c">
-                (可用余额¥20.00 提现中¥10.00)
+                (可用余额¥{{ canUseMoney }} 提现中¥{{ freezeMoney }})
             </view>
 
             <view class="flex-c">
@@ -35,20 +35,24 @@
                 </view>
             </view>
 
-            <view class="detail-list">
-                <view class="detail-item" v-for="(item, index) in detailList" :key="index">
-                    <view class="item-left">
-                        <text class="title">{{ item.title }}</text>
-                        <text class="time">{{ item.time }}</text>
-                    </view>
-                    <view class="item-right">
-                        <text :class="['amount', item.amount > 0 ? 'income' : 'expense']">
-                            {{ item.amount > 0 ? '+' : '-' }}{{ Math.abs(item.amount).toFixed(2) }}
-                        </text>
-                        <text class="status">{{ item.status }}</text>
+            <page-scroll @updateList="handleUpdateList" ref="pageRef" slotEmpty url="/token/user/accountChangeList"
+                :immediate="false" bgColor="#ffffff">
+                <view class="detail-list">
+                    <view class="detail-item" v-for="(item, index) in detailList" :key="index"
+                        @click="goToDetail(item)">
+                        <view class="item-left">
+                            <text class="title">{{ item.title }}</text>
+                            <text class="time">{{ item.createTime }}</text>
+                        </view>
+                        <view class="item-right">
+                            <text :class="['amount', item.changeMoney > 0 ? 'income' : 'expense']">
+                                {{ item.changeMoney }}
+                            </text>
+                            <text class="status" v-if="item.desc">{{ item.desc }}</text>
+                        </view>
                     </view>
                 </view>
-            </view>
+            </page-scroll>
         </view>
 
         <!-- 分类选择弹窗 -->
@@ -58,59 +62,110 @@
 
 <script>
 import CategoryPopup from '../components/category-popup.vue'
+import pageScroll from '@/components/pageScroll/index.vue'
 export default {
     components: {
-        CategoryPopup
+        CategoryPopup,
+        pageScroll
     },
     data() {
         return {
             showCategoryPopup: false,
-            detailList: [{
-                title: '微信提现',
-                time: '2021.2.25 10:48:32',
-                amount: -36.00,
-                status: '提现中'
-            },
-            {
-                title: '微信提现',
-                time: '2021.2.25 10:48:32',
-                amount: -36.00,
-                status: '提现完成'
-            },
-            {
-                title: '微信提现',
-                time: '2021.2.25 10:48:32',
-                amount: -36.00,
-                status: '提现完成'
-            },
-            {
-                title: '合伙人收入',
-                time: '2021.2.25 10:48:32',
-                amount: 100.00,
-                status: ''
+            restMoney: '0.00',
+            freezeMoney: '0.00',
+            canUseMoney: '0.00',
+            detailList: [],
+            otherParams: {
+                queryTypes: ''
             }
-            ]
         }
     },
+    onLoad() {
+        this.getWithdrawInfo()
+        this.$refs.pageRef.loadData(true, { queryTypes: '' })
+    },
     methods: {
+        async getWithdrawInfo() {
+            try {
+                const res = await uni.$u.http.get('/token/user/accountInfo')
+                if (res.code === 200) {
+                    const { userId, restMoney, freezeMoney, canUseMoney } = res.data
+                    this.restMoney = restMoney
+                    this.freezeMoney = freezeMoney
+                    this.canUseMoney = canUseMoney
+                }
+            } catch (e) {
+                console.error('获取提现信息失败:', e)
+            }
+        },
+        // 分类选择
         onCategoryConfirm(selectedCategories) {
             console.log('选中的分类:', selectedCategories)
-            // 这里处理分类筛选逻辑
+            this.otherParams.queryTypes = selectedCategories.join(',')
+            this.$refs.pageRef.loadData(true, this.otherParams)
         },
-        goToDetail() {
-            uni.navigateTo({
-                url: '/pages-mine/pages/withdraw-detail'
-            })
+        goToDetail(item) {
+            if (item.desc == '待确认收款') {
+                uni.$u.http.post('/token/user/withdrawConfirm', {
+                    orderNo: item.orderNo
+                }).then(res => {
+                    if (res.code === 200) {
+                        this.handleConfirmReceipt(res.data)
+                    }
+                }).catch(err => {
+                    uni.showToast({
+                        title: err.message || '确认失败',
+                        icon: 'none'
+                    });
+                });
+            }
         },
         handleWithdraw() {
             uni.navigateTo({
                 url: '/pages-mine/pages/withdraw'
             })
         },
+        handleWithdrawDetail() {
+            uni.navigateTo({
+                url: '/pages-mine/pages/withdraw-detail'
+            })
+        },
         toggleFilter() {
             // 实现筛选功能
             this.showCategoryPopup = !this.showCategoryPopup
-        }
+        },
+        // 更新列表
+        handleUpdateList(data) {
+            this.detailList = data
+        },
+        //执行微信确认收款操作
+        handleConfirmReceipt(data) {
+            if (wx.canIUse('requestMerchantTransfer')) {
+                wx.requestMerchantTransfer({
+                    mchId: data.mchId,
+                    appId: data.appId,
+                    package: data.packageStr,
+                    success: (res) => {
+                        // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
+                        uni.showToast({
+                            title: '确认收款成功',
+                            icon: 'none'
+                        })
+                        // 刷新列表和余额信息
+                        this.getWithdrawInfo();
+                        this.$refs.pageRef.loadData(true, this.otherParams);
+                    },
+                    fail: (res) => {
+                        console.log('fail:', res);
+                    },
+                });
+            } else {
+                wx.showModal({
+                    content: '你的微信版本过低,请更新至最新版本。',
+                    showCancel: false,
+                });
+            }
+        },
     }
 }
 </script>

+ 61 - 68
pages-mine/pages/withdraw-detail.vue

@@ -1,91 +1,84 @@
 <template>
     <view class="withdraw-detail">
         <!-- 列表区域 -->
-        <scroll-view scroll-y class="detail-list" @scrolltolower="loadMore" refresher-enabled
-            :refresher-triggered="isRefreshing" @refresherrefresh="onRefresh">
-            <view class="detail-item" v-for="(item, index) in detailList" :key="index">
-                <view class="item-left">
-                    <text class="title">{{ item.title }}</text>
-                    <text class="time">{{ item.time }}</text>
+        <page-scroll @updateList="handleUpdateList" ref="pageRef" slotEmpty url="/token/user/withdrawList">
+            <view class="detail-list">
+                <view class="detail-item" v-for="(item, index) in detailList" :key="index" @click="goToDetail(item)">
+                    <view class="item-left">
+                        <text class="title">{{ item.title }}</text>
+                    <text class="time">{{ item.createTime }}</text>
                 </view>
                 <view class="item-right">
-                    <text class="amount">-{{ item.amount.toFixed(2) }}</text>
-                    <text class="status">{{ item.status }}</text>
+                    <text class="amount">-{{ item.changeMoney }}</text>
+                    <text class="status">{{ item.desc }}</text>
+                </view>
                 </view>
             </view>
-
-            <!-- 加载更多 -->
-            <view class="load-more" v-if="detailList.length > 0">
-                <text v-if="hasMore">加载更多</text>
-                <text v-else>我是有底线哒</text>
-            </view>
-        </scroll-view>
+        </page-scroll>
     </view>
 </template>
 
 <script>
+import PageScroll from '@/components/pageScroll/index.vue'
 export default {
+    components: {
+        PageScroll
+    },
     data() {
         return {
-            page: 1,
-            pageSize: 10,
-            isRefreshing: false,
-            hasMore: true,
-            detailList: [
-                {
-                    title: '微信提现',
-                    time: '2021.2.25 10:48:32',
-                    amount: 36.00,
-                    status: '提现中'
-                },
-                {
-                    title: '微信提现',
-                    time: '2021.2.25 10:48:32',
-                    amount: 36.00,
-                    status: '提现完成'
-                },
-                {
-                    title: '微信提现',
-                    time: '2021.2.25 10:48:32',
-                    amount: 36.00,
-                    status: '提现完成'
-                },
-                {
-                    title: '微信提现',
-                    time: '2021.2.25 10:48:32',
-                    amount: 36.00,
-                    status: '提现完成'
-                }
-            ]
+            detailList: []
         }
     },
-    onLoad() {
-        this.loadData()
+    onLoad(){
+        this.$refs.pageRef?.loadData(true)
     },
     methods: {
-        // 加载数据
-        async loadData() {
-            // 实际开发时替换为接口调用
-            setTimeout(() => {
-                // 模拟数据加载
-                this.hasMore = this.page < 3
-                this.isRefreshing = false
-            }, 500)
+        handleUpdateList(data) {
+            this.detailList = data
         },
-
-        // 下拉刷新
-        onRefresh() {
-            this.isRefreshing = true
-            this.page = 1
-            this.loadData()
+        goToDetail(item) {
+            if (item.desc == '待确认收款') {
+                uni.$u.http.post('/token/user/withdrawConfirm', {
+                    orderNo: item.orderNo
+                }).then(res => {
+                    if (res.code === 200) {
+                        this.handleConfirmReceipt(res.data)
+                    }
+                }).catch(err => {
+                    uni.showToast({
+                        title: err.message || '确认失败',
+                        icon: 'none'
+                    });
+                });
+            }
+        },
+        //执行微信确认收款操作
+        handleConfirmReceipt(data) {
+            if (wx.canIUse('requestMerchantTransfer')) {
+                wx.requestMerchantTransfer({
+                    mchId: data.mchId,
+                    appId: data.appId,
+                    package: data.packageStr,
+                    success: (res) => {
+                        // res.err_msg将在页面展示成功后返回应用时返回ok,并不代表付款成功
+                        uni.showToast({
+                            title: '确认收款成功',
+                            icon: 'none'
+                        })
+                        // 刷新列表
+                        this.$refs.pageRef.loadData(true);
+                    },
+                    fail: (res) => {
+                        console.log('fail:', res);
+                    },
+                });
+            } else {
+                wx.showModal({
+                    content: '你的微信版本过低,请更新至最新版本。',
+                    showCancel: false,
+                });
+            }
         },
-
-        // 加载更多
-        loadMore() {
-            if (!this.hasMore) return
-            this.page++
-            this.loadData()
-        }
     }
 }
 </script>

+ 35 - 44
pages-mine/pages/withdraw.vue

@@ -2,11 +2,11 @@
     <view class="withdraw-page">
         <!-- 微信账户信息 -->
         <view class="wechat-account">
-            <image class="avatar" src="../static/t11.png" mode="aspectFill"></image>
+            <image class="avatar" :src="userInfo.imgPath" mode="aspectFill"></image>
             <view class="account-info">
-                <text class="nickname">{{ userInfo.nickname || '这里是微信昵称' }}</text>
+                <text class="nickname">{{ userInfo.nickName }}</text>
                 <text class="amount">可提现金额:</text>
-                <text class="amount-number">¥{{ availableAmount }}</text>
+                <text class="amount-number">¥{{ userInfo.restMoney }}</text>
             </view>
         </view>
 
@@ -50,21 +50,14 @@ export default {
         return {
             userInfo: {
                 avatar: '',
-                nickname: ''
+                nickname: '',
+                restMoney: ''
             },
-            availableAmount: '360.08',
             withdrawAmount: '',
-            minAmount: 0.3,
-            maxAmount: 200
         }
     },
-    computed: {
-        canWithdraw() {
-            const amount = Number(this.withdrawAmount)
-            return amount >= this.minAmount &&
-                amount <= this.maxAmount &&
-                amount <= Number(this.availableAmount)
-        }
+    onLoad() {
+        this.getUserInfo()
     },
     methods: {
         // 输入金额
@@ -77,44 +70,42 @@ export default {
                 }
             }
         },
+        //获取用户信息
+        getUserInfo() {
+            uni.$u.http.get('/token/user/withdrawInfo').then(res => {
+                if (res.code === 200) {
+                    this.userInfo = res.data
+                }
+            })
+        },
 
         // 全部提现
         withdrawAll() {
-            this.withdrawAmount = this.availableAmount
+            this.withdrawAmount = this.userInfo.restMoney
         },
 
         // 提交提现
         async submitWithdraw() {
-            if (!this.canWithdraw) return
-
-            try {
-                uni.showLoading({
-                    title: '提交中...',
-                    mask: true
-                })
-
-                // 这里调用提现接口
-                await this.$u.api.withdrawAjax({
-                    amount: this.withdrawAmount
-                })
-
-                uni.showToast({
-                    title: '提现申请成功',
-                    icon: 'success'
-                })
-
-                setTimeout(() => {
-                    uni.navigateBack()
-                }, 1500)
-
-            } catch (error) {
-                uni.showToast({
-                    title: error.message || '提现失败',
-                    icon: 'none'
-                })
-            } finally {
+            uni.showLoading({
+                title: '提交中...',
+                mask: true
+            })
+
+            // 这里调用提现接口
+            uni.$u.http.post('/token/user/withdrawApply', {
+                money: this.withdrawAmount
+            }).then(res => {
+                if (res.code === 200) {
+                    uni.showToast({ title: '提现申请成功', icon: 'success' })
+                    setTimeout(() => {
+                        uni.navigateBack()
+                    }, 1500)
+                } else {
+                    uni.showToast({ title: res.msg, icon: 'none' })
+                }
+            }).finally(() => {
                 uni.hideLoading()
-            }
+            })
         }
     }
 }

BIN
pages-mine/static/pay-success.png


BIN
pages-mine/static/pay1.png


BIN
pages-mine/static/pay2.png


+ 28 - 66
pages.json

@@ -2,9 +2,7 @@
     "easycom": {
         "^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
     },
-    // 主包
     "pages": [
-        //首页
         {
             "path": "pages/home/index",
             "style": {
@@ -12,31 +10,13 @@
                 "navigationStyle": "custom"
             }
         },
-        // 商城
         {
             "path": "pages/mall/index",
             "style": {
                 "navigationBarTitleText": "书嗨",
-                "enablePullDownRefresh": true // 开启下拉刷新
+                "enablePullDownRefresh": true
             }
         },
-        // 购物车页
-        {
-            "path": "pages/mall/shopping-cart",
-            "style": {
-                "navigationBarTitleText": "购物车",
-                "enablePullDownRefresh": true // 开启下拉刷新
-            }
-        },
-        // 分类页
-        {
-            "path": "pages/mall/classify",
-            "style": {
-                "navigationBarTitleText": "分类"
-                // "enablePullDownRefresh": true // 开启下拉刷新
-            }
-        },
-        // 我的
         {
             "path": "pages/mine/index",
             "style": {
@@ -45,126 +25,106 @@
                 "navigationBarTextStyle": "white"
             }
         },
-        // 通用搜索页
         {
             "path": "pages/search",
             "style": {
                 "navigationBarTitleText": "搜索商品"
             }
         },
-        // 搜索结果页
         {
             "path": "pages/search-result",
             "style": {
                 "navigationBarTitleText": ""
             }
         },
-        // 登录页
         {
             "path": "pages/login/index",
             "style": {
                 "navigationBarTitleText": "登录"
             }
         },
-        // 欢迎页,不需要时放在最后
         {
             "path": "pages/start-page"
         }
     ],
-    // 副包
     "subPackages": [
         {
-            // 电商副包
             "root": "pages-mall",
             "pages": [
-                // 专区页面
                 {
                     "path": "pages/zone/zone",
                     "style": {
                         "navigationBarTitleText": "专区",
-                        "enablePullDownRefresh": true // 开启下拉刷新
+                        "enablePullDownRefresh": true
                     }
                 },
-                // 商品详情
                 {
                     "path": "pages/goods/detail",
                     "style": {
                         "navigationBarTitleText": "商品详情"
-                        // "enablePullDownRefresh": true // 开启下拉刷新
                     }
                 },
-                // 提交订单
                 {
                     "path": "pages/order/submit",
                     "style": {
                         "navigationBarTitleText": "提交订单"
                     }
                 },
-                // 支付页
                 {
                     "path": "pages/order/pay",
                     "style": {
                         "navigationBarTitleText": "确认支付"
                     }
                 },
-                // 支付结果页
                 {
                     "path": "pages/order/pay-result",
                     "style": {
                         "navigationBarTitleText": "支付成功"
                     }
                 },
-                // 订单列表页
                 {
                     "path": "pages/order/list",
                     "style": {
                         "navigationBarTitleText": "我的订单",
-                        "enablePullDownRefresh": true // 开启下拉刷新
+                        "enablePullDownRefresh": true
                     }
                 },
-                // 订单详情页
                 {
                     "path": "pages/order/detail",
                     "style": {
                         "navigationBarTitleText": "订单详情"
                     }
                 },
-                // 售后列表
                 {
                     "path": "pages/after-sales/list",
                     "style": {
                         "navigationBarTitleText": "我的售后"
                     }
                 },
-                // 申请售后
                 {
                     "path": "pages/after-sales/apply",
                     "style": {
                         "navigationBarTitleText": "申请售后"
                     }
                 },
-                // 售后状态
                 {
                     "path": "pages/after-sales/apply-status",
                     "style": {
                         "navigationBarTitleText": "售后详情"
                     }
                 },
-                // 售后状态
                 {
                     "path": "pages/after-sales/success",
                     "style": {
                         "navigationBarTitleText": "售后"
                     }
                 },
-                // 退款详情
                 {
                     "path": "pages/after-sales/back",
                     "style": {
                         "navigationBarTitleText": "退款详情"
                     }
                 },
-                // 物流详情
                 {
                     "path": "pages/order/express",
                     "style": {
@@ -174,24 +134,20 @@
             ]
         },
         {
-            // 个人中心副包
             "root": "pages-mine",
             "pages": [
-                // 收获地址
                 {
                     "path": "pages/address/list",
                     "style": {
                         "navigationBarTitleText": "收货地址"
                     }
                 },
-                // 收获地址新增/修改
                 {
                     "path": "pages/address/add-or-update",
                     "style": {
                         "navigationBarTitleText": "地址更新"
                     }
                 },
-                // 设置
                 {
                     "path": "pages/setting",
                     "style": {
@@ -216,6 +172,18 @@
                         "navigationBarTitleText": "卖书订单详情"
                     }
                 },
+                {
+                    "path": "pages/return-detail",
+                    "style": {
+                        "navigationBarTitleText": "退回订单详情"
+                    }
+                },
+                {
+                    "path": "pages/return-select",
+                    "style": {
+                        "navigationBarTitleText": "申请退回"
+                    }
+                },
                 {
                     "path": "pages/apply-return",
                     "style": {
@@ -257,6 +225,18 @@
                     "style": {
                         "navigationBarTitleText": "提现"
                     }
+                },
+                {
+                    "path": "pages/cashier-desk",
+                    "style": {
+                        "navigationBarTitleText": "收银台"
+                    }
+                },
+                {
+                    "path": "pages/pay-success",
+                    "style": {
+                        "navigationBarTitleText": "支付成功"
+                    }
                 }
             ]
         },
@@ -295,18 +275,13 @@
             ]
         }
     ],
-    // 分包预载配置
     "preloadRule": {},
-    // 全局配置
     "globalStyle": {
-        // 全局自定义导航栏
         "navigationBarTitleText": "书嗨",
         "navigationBarBackgroundColor": "#fff",
         "navigationBarTextStyle": "black",
-        // "navigationStyle": "custom",
-        "backgroundColor": "#fff" //下拉出口背景色
+        "backgroundColor": "#fff"
     },
-    // tabbar配置
     "tabBar": {
         "color": "#999",
         "selectedColor": "#22ac38",
@@ -317,18 +292,6 @@
                 "iconPath": "/static/tabbar/home.png",
                 "selectedIconPath": "/static/tabbar/home2.png"
             },
-            {
-                "text": "分类",
-                "pagePath": "pages/mall/classify",
-                "iconPath": "/static/tabbar/fenlei.png",
-                "selectedIconPath": "/static/tabbar/fenlei2.png"
-            },
-            {
-                "text": "购物车",
-                "pagePath": "pages/mall/shopping-cart",
-                "iconPath": "/static/tabbar/cart.png",
-                "selectedIconPath": "/static/tabbar/cart2.png"
-            },
             {
                 "text": "我的",
                 "pagePath": "pages/mine/index",
@@ -337,6 +300,5 @@
             }
         ]
     },
-    // 启动模式配置
     "condition": {}
 }

+ 7 - 2
pages/home/components/BookItem.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="book-item">
 		<view class="book-info">
-			<image class="book-cover" :src="book.cover" mode="aspectFill" />
+			<u-image width="140rpx" height="196rpx" :src="book.cover" mode="aspectFill" />
 			<view class="book-detail">
 				<view class="top-info">
 					<view class="book-title">{{ book.bookName }}</view>
@@ -12,7 +12,7 @@
 				</view>
 
 				<view class="flex flex-j-b flex-a-c">
-					<view class="book-price">回收价: ¥{{ book.recycleMoney }}</view>
+					<view class="book-price">回收价: ¥{{ recycleMoney }}</view>
 					<u-number-box class="number-box" bg-color="#38c148" color="#ffffff" v-model="book.num" :min="1"
 						:max="book.maxNum||40" @blur="onQuantityChange" @minus="addReduceNum(-1)"
 						@plus="addReduceNum(1)"></u-number-box>
@@ -44,6 +44,11 @@
 		data() {
 			return {}
 		},
+		computed: {
+		    recycleMoney() {
+		        return  (this.book.recyclePrice * (this.book.num || 1)).toFixed(2)
+		    }
+		},
 		methods: {
 			onDelete() {
 				this.$refs.deleteDialog.openPopup()

+ 14 - 6
pages/home/components/InputIsbn.vue

@@ -1,10 +1,10 @@
 <template>
-	<u-popup v-model="showPopup" @close="closePopup" @open="openPopup" mode="center" border-radius="20" width ="85%">
+	<u-popup v-model="showPopup" @close="closePopup" @open="openPopup" mode="center" border-radius="20" width="85%">
 		<view class="popup-content">
 			<view class="popup-title">请输入图书ISBN编码</view>
 			<view class="desc-text">请输入不含“-”符号的13位或10位ISBN编码</view>
-			<image src="/static/img/barcode.png" alt="ISBN Barcode" style="height:200rpx;margin-bottom: 20rpx"
-				mode="heightFix" />
+			<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/barcode.png" alt="ISBN Barcode"
+				style="height:200rpx;margin-bottom: 20rpx" mode="heightFix" />
 			<u-input v-model="isbn" placeholder="在此输入ISBN编码" class="popup-input" input-align="center"
 				:custom-style="{'border-radius': '10rpx',height:'80rpx'}" border />
 			<view class="buttons">
@@ -25,6 +25,7 @@
 		},
 		methods: {
 			openPopup() {
+				this.isbn = '';
 				this.showPopup = true;
 			},
 			closePopup() {
@@ -35,8 +36,15 @@
 				this.closePopup();
 			},
 			submit() {
+				if (!this.isbn) {
+					uni.showToast({
+						title: '请输入ISBN编码',
+						icon: 'none'
+					});
+					return;
+				}
 				// Handle ISBN submission
-				console.log('Submitted ISBN:', this.isbn);
+				this.$emit('submit', this.isbn)
 				this.closePopup();
 			},
 		},
@@ -76,12 +84,12 @@
 				font-size: 32rpx;
 				border-radius: 10rpx;
 				border: none;
-				
+
 				&:first-child {
 					background-color: #F5F5F5;
 					color: #333333;
 				}
-				
+
 				&:last-child {
 					background-color: #38C148;
 					color: #FFFFFF;

+ 6 - 6
pages/home/components/notScanned.vue

@@ -6,10 +6,10 @@
 		<!-- 第一步 -->
 		<view class="step-box">
 			<view class="flex-a">
-				<image src="/static/img/step1.png" class="step-img"></image>
+				<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/step1.png" class="step-img"></image>
 				<view class="flex-col flex-1">
 					<view class="step-icon-wrap">
-						<image src="/static/img/logo2.png" class="logo-icon"></image>
+						<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo2.png" class="logo-icon"></image>
 						<text class="step-text">第一步</text>
 					</view>
 					<view class="step-title">扫描ISBN</view>
@@ -36,13 +36,13 @@
 			<view class="flex-a">
 				<view class="flex-col flex-1">
 					<view class="step-icon-wrap">
-						<image src="/static/img/logo2.png" class="logo-icon"></image>
+						<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo2.png" class="logo-icon"></image>
 						<text class="step-text">第二步</text>
 					</view>
 					<view class="step-title">等待快递取书</view>
 					<view class="step-desc">寄书邮费由书嗨承担</view>
 				</view>
-				<image src="/static/img/step2.png" class="step-img"></image>
+				<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/step2.png" class="step-img"></image>
 			</view>
 
 		</view>
@@ -50,10 +50,10 @@
 		<!-- 第三步 -->
 		<view class="step-box">
 			<view class="flex-a">
-				<image src="/static/img/step3.png" class="step-img"></image>
+				<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/step3.png" class="step-img"></image>
 				<view class="flex-col flex-1">
 					<view class="step-icon-wrap">
-						<image src="/static/img/logo2.png" class="logo-icon"></image>
+						<image src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo2.png" class="logo-icon"></image>
 						<text class="step-text">第三步</text>
 					</view>
 					<view class="step-title">审核到账</view>

+ 10 - 13
pages/home/index.vue

@@ -40,7 +40,7 @@
             </view>
         </view>
 
-        <InputIsbn ref="isbnPopup" />
+        <InputIsbn ref="isbnPopup" @submit="checkBookISBN" />
         <!-- 套装书说明弹窗 -->
         <CommonDialog ref="setBookDialog" title="套装书说明" :showCancel="false">
             <text>套装书(ISBN码相同的系列书箱)只需扫描其中一册,扫码价即套装价。打包时请把所有单册统在一起或放在一个袋子里寄出。</text>
@@ -130,7 +130,7 @@ export default {
             return this.bookList.reduce((sum, book) => sum + (book.num || 1), 0)
         },
         totalPrice() {
-            return this.bookList.reduce((sum, book) => sum + book.recycleMoney * (book.num || 1), 0).toFixed(2)
+            return this.bookList.reduce((sum, book) => sum + book.recyclePrice * (book.num || 1), 0).toFixed(2)
         }
     },
     onPageScroll(e) {
@@ -141,14 +141,6 @@ export default {
     methods: {
         //提交
         onNext() {
-            if (this.totalPrice < 30) {
-                uni.showToast({
-                    title: '预估价格需满30元才能回收',
-                    icon: 'none'
-                })
-                return
-            }
-
             let orderId = this.bookList[0].orderId
             //预提交
             uni.$u.http.get('/token/order/preSubmit?orderId=' + orderId).then(res => {
@@ -164,6 +156,11 @@ export default {
                             title: res.msg
                         })
                     }
+                } else {
+                    uni.showToast({
+                        icon: 'none',
+                        title: res.msg
+                    })
                 }
             })
         },
@@ -222,7 +219,7 @@ export default {
         getLastOrder() {
             uni.$u.http.get('/token/order/lastOrder').then(res => {
                 if (res.code == 200) {
-                    this.bookList = res.data ? res.data.orderDetailList.map(v => {
+                    this.bookList = res.data?.orderDetailList ? res.data.orderDetailList.map(v => {
                         v.orderId = res.data.orderId
                         return v
                     }) : []
@@ -247,7 +244,7 @@ export default {
             this.$refs.isbnPopup.openPopup()
         }
     },
-    mounted() {
+    onShow() {
         setTimeout(() => {
             this.getLastOrder()
         }, 300)
@@ -350,7 +347,7 @@ export default {
 
     .next-btn {
         margin: 0;
-        width: 208rpx;
+        margin-left: 20rpx;
     }
 }
 

+ 1 - 1
pages/login/index.vue

@@ -2,7 +2,7 @@
 	<view class="page">
 		<!-- logo -->
 		<view class="logo-wrap" v-if="pageStatus == 'home' || pageStatus == 'getWxRole'">
-			<image mode="aspectFit" class="logo" src="../../static/img/logo.png"></image>
+			<image mode="aspectFit" class="logo" src="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo.png"></image>
 			<!-- <u-image width="300" height="300" src="../../static/img/logo.png" mode="aspectFit"></u-image> -->
 			<!-- <view class="app-name">书嗨</view> -->
 		</view>

+ 0 - 158
pages/mall/classify.vue

@@ -1,158 +0,0 @@
-<template>
-	<!-- 自定义导航栏-->
-	<view class="page" :style="{height:windowHeight}">
-		<!-- 侧栏 -->
-		<scroll-view class="aside" scroll-y="true">
-			<view
-				class="item acea-row row-center-wrapper"
-				:class="categoryDivindex === sideIndex ? 'on' : ''"
-				v-for="(item, categoryDivindex) in classifyList"
-				:key="categoryDivindex"
-				@click="changeSide(categoryDivindex)"
-			>
-				{{ item.name }}
-			</view>
-		</scroll-view>
-		<!-- 主内容 -->
-		<scroll-view class="conter" scroll-y="true">
-			<view v-if="classifyList[sideIndex]">
-				<view class="title">{{ classifyList[sideIndex].name }}</view>
-				<view class="list">
-					<view class="item" v-for="(child, childIndex) in classifyList[sideIndex].children" :key="childIndex" @click="goGoodsList(child)">
-						<!-- <u-image height="120rpx" width="120rpox" mode="widthFix" :src="child.pic"></u-image> -->
-						<view class="name">{{ child.name }}</view>
-					</view>
-				</view>
-				<NoData height="50vh" v-if="classifyList[sideIndex].children.length==0"></NoData>
-			</view>
-		</scroll-view>
-	</view>
-</template>
-<script>
-export default {
-	data() {
-		const app = getApp();
-		return {
-			windowHeight:app.globalData.windowHeight + 'px',
-			// 分类数据
-			classifyList: [],
-			// 分类索引
-			sideIndex: 0,
-			// 传参id
-			queryClassifyId: ''
-		};
-	},
-	onLoad(options) {
-		if (options.id) {
-			this.queryClassifyId = options.id;
-		}
-		this.getClassifyList();
-	},
-	methods: {
-		// 动态切换分类
-		changeClassifyById() {
-			let nowClassifyIndex = 0;
-			if (!this.queryClassifyId) return;
-			this.classifyList.forEach((item, index) => {
-				if (item.id === this.queryClassifyId) nowClassifyIndex = index;
-			});
-			if (nowClassifyIndex !== this.navActive) {
-				this.changeSide(index);
-			}
-		},
-
-		// 查询分类列表
-		getClassifyList() {
-			this.$u.api.getCateListAjax().then(({code,data})=>{
-				if(code==1){
-					this.classifyList = data;
-				}
-			}).catch();
-			// this.changeClassifyById();
-		},
-
-		// 切换分类
-		changeSide(index) {
-			this.sideIndex = index;
-		},
-
-		// 跳转商品列表页
-		goGoodsList(child) {
-			this.$u.route('/pages/search-result', { cateInfo: encodeURIComponent(JSON.stringify(child)) });
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-
-	.page {
-		display: flex;
-		justify-content: space-between;
-		align-items: flex-start;
-		background: $app-theme-bg-color;
-		// background-color: red;
-		.aside {
-			width: 270rpx;
-			background: $app-theme-bg-gray-color;
-			height: 100%;
-			.item {
-				height: 100rpx;
-				// line-height: 100rpx;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				text-align: center;
-				font-size: 28rpx;
-				font-weight: 500;
-				color: $app-theme-text-black-color;
-				transition: all 0.3s ease-in-out;
-				box-sizing: border-box;
-				padding: 0 20rpx;
-				&.on {
-					color: #fff;
-					position: relative;
-					background-color: $app-theme-color;
-					transition: all 0.3s ease-in-out;
-				}
-			}
-		}
-		.conter {
-			padding-left: 20rpx;
-			box-sizing: border-box;
-			height: 100%;
-			.title {
-				font-size: 36rpx;
-				font-weight: bold;
-				// color: $app-theme-color;
-				padding: 30rpx 0;
-				border-bottom: 1rpx solid $app-theme-border-color;
-			}
-			.list {
-				display: flex;
-				justify-content: flex-start;
-				align-items: flex-start;
-				flex-wrap: wrap;
-				.item {
-					// width: 120rpx;
-					margin:20rpx 15rpx 0;
-					// &:nth-child(3n) {
-					// 	margin-right: 0;
-					// }
-					.picture {
-					}
-					.name {
-						font-size: 32rpx;
-						color: $app-theme-color;
-						text-align: center;
-						margin-top: 12rpx;
-						padding: 10rpx 20rpx;
-						border: 1rpx solid $app-theme-color;
-						border-radius: 2em;
-					}
-				}
-			}
-		}
-	}
-
-</style>

+ 1 - 1
pages/mall/components/card.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="goodsCard"  @click="goGoodsDetail(data)">
 		<view class="pic">
-			<u-image width="360rpx" height="360rpx" mode="aspectFit" :src="data.cover" error-icon="../../../static/img/quesheng.png"></u-image>
+			<u-image width="360rpx" height="360rpx" mode="aspectFit" :src="data.cover" error-icon="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/quesheng.png"></u-image>
 		</view>
 		<view class="inner">
 			<view class="title">{{ data.title }}</view>

+ 1 - 1
pages/mall/components/collection.vue

@@ -1,7 +1,7 @@
 <template>
 		<view class="goodsItem" @click="goGoodsDetail(data)">
 			<view class="list_left">
-				<image :src="data.cover" mode="aspectFit" error-icon="../../../static/img/quesheng.png"></image>
+				<image :src="data.cover" mode="aspectFit" error-icon="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/quesheng.png"></image>
 				<view class="xiajia" v-if="data.goods_status==2">
 					已下架
 				</view>

+ 1 - 1
pages/mall/components/goods.vue

@@ -2,7 +2,7 @@
 		<view class="goodsItem" @click="goGoodsDetail(data)">
 			<view class="list_left">
 				<!-- <image :src="data.cover" mode="aspectFit"></image>  width="360rpx" height="360rpx"-->
-				<u-image class="goods_img" width="170rpx" height="170rpx" mode="aspectFit" :src="data.cover" error-icon="../../../static/img/quesheng.png"></u-image>
+				<u-image class="goods_img" width="170rpx" height="170rpx" mode="aspectFit" :src="data.cover" error-icon="https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/quesheng.png"></u-image>
 			</view>
 			<view class="list_right">
 				<view class="goods_title shu-elip-2">{{ data.title }}</view>

+ 0 - 502
pages/mall/shopping-cart.vue

@@ -1,502 +0,0 @@
-<template>
-	<view class="cartbox">
-		<view class="topEditOpar" v-if="goodsList.length>0">
-			<!-- <view class="">
-				有心仪的宝贝,快去下单吧~
-			</view> -->
-			<view class="text opartxt" @click="isEdit = !isEdit">
-				{{isEdit?'完成':'管理'}}
-			</view>
-		</view>
-		<NoData v-if="finish&&goodsList.length<1"></NoData>
-		<view class="scrollbox" v-else>
-			<!-- 购物车列表 -->
-			<view class="cart-list">
-				<view class="item" v-for="(goods, index) in goodsList" :key="index">
-					<u-icon class="delIcon" name="trash" color="#999" @click.stop="delCartGoods(goods.id,index)"></u-icon>
-					<view class="left">
-						<u-checkbox shape="circle" active-color="#ed3f14" icon-size="16" :disabled="goods.status==2&&!isEdit"
-							v-model="goods.checked"></u-checkbox>
-					</view>
-					<view class="right" @click.stop="goGoodsDetail(goods.goods_id)">
-						<view class="chuo" v-if="goods.status==2">
-							已下架
-						</view>
-						<view class="img">
-							<image :src="goods.goods.cover" mode=""></image>
-						</view>
-						<view class="info">
-							<view class="title">{{ goods.goods.title }}</view>
-							<!-- <view class="sku">{{ goods.difference }}</view> -->
-							<u-tag :text="goods.difference" type="info" />
-							<view class="operate">
-								<view class="price">
-									<text>¥</text>
-									<text>{{ goods.amount }}</text>
-								</view>
-								<view class="num">
-									<u-number-box v-model="goods.nums" :min="1" :max="5" :disabled-input="true"
-										@minus="e=>changeNums(e,goods.id)" @plus="e=>changeNums(e,goods.id)"></u-number-box>
-								</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-
-		<!-- 底部按钮 -->
-		<view class="bottom_opar" v-if="isEdit">
-			<view class="check">
-				<u-checkbox shape="circle" active-color="#ed3f14" icon-size="16" v-model="checkAllStauts"
-					@change="checkAllGoods">全选</u-checkbox>
-				<!-- <text>全选</text> -->
-			</view>
-			<view class="right">
-				
-				<view class="soldOutBtn" v-if="isJiesuanBtn">
-					删除
-				</view>
-				<view class="buyBtn" v-else @click="delCarts">
-					删除({{ goodsList.filter(item => item.checked).length }})
-				</view>
-			</view>
-		</view>
-		<view class="bottom_opar" v-else>
-			<view class="check">
-				<u-checkbox shape="circle"  active-color="#ed3f14" icon-size="16" v-model="checkAllStauts"
-					@change="checkAllGoods">全选</u-checkbox>
-				<!-- <text>全选</text> -->
-			</view>
-			<view class="right">
-				<view class="price">
-					<text>合计:</text>
-					<text>¥</text>
-					<text>{{ parseFloat(totalPrice).toFixed(2) }}</text>
-				</view>
-				<!-- <u-button type="primary" :disabled="isJiesuanBtn" @click="goPayResult">
-					去结算({{ goodsList.filter(item => item.checked).length }})
-				</u-button> -->
-				
-				<view class="soldOutBtn" v-if="isJiesuanBtn">
-					去结算
-				</view>
-				<view class="buyBtn" v-else @click="goPayResult">
-					去结算({{ goodsList.filter(item => item.checked).length }})
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	var _self;
-	export default {
-		data() {
-			return {
-				isEdit:false,
-				// showJiesuan:false,
-				showRecommend: false, //是否显示推荐商品
-				loading: false,
-				page: 1,
-				finish: false,
-				totalPrice: 0,
-				checkAllStauts: false,
-				goodsList: [],
-
-				isBiangeng: false,
-				pullDown: false,
-			};
-		},
-		computed: {
-			checkAll() {
-				let newList = this.goodsList;
-				if(!this.isEdit){
-					// 编辑状态
-					newList = this.goodsList.filter(item=>item.status==1)
-				}
-				this.totalPrice = 0;
-				if (newList.length < 1) {
-					this.checkAllStauts = false;
-					return;
-				}
-				newList.map(item => (item.checked ? (this.totalPrice += Number(item.amount) * item.nums) : 0));
-				if (newList.filter(item => item.checked).length == newList.length) {
-					this.checkAllStauts = true;
-				} else {
-					this.checkAllStauts = false;
-				}
-			},
-			canBuyGoods(){
-				return this.goodsList.filter(item=>item.status==1)
-			},
-			isJiesuanBtn() {
-				return this.goodsList.filter(item => item.checked).length <= 0;
-			},
-		},
-		onLoad() {
-			_self = this;
-		},
-		onPullDownRefresh() {
-			this.pullDown = true;
-			this.reData();
-		},
-		onShow() {
-			this.reData();
-		},
-		onReachBottom() {
-			console.log('滚动到底部')
-			// this.getData();
-			this.getCartList();
-		},
-		methods: {
-			reData(){
-				this.finish = false;
-				this.loading = false;
-				this.page = 1;
-				this.getCartList();
-			},
-			// 批量删除
-			delCarts(){
-				let selItems = this.goodsList.filter(item => item.checked);
-				if(selItems.length>0){
-					let ids = selItems.map(e=>e.id);
-					_self.delCartGoods(ids.toString());
-				}
-			},
-			// 删除
-			delCartGoods(id, index) {
-				console.log('>>>>>', id);
-				uni.showModal({
-					title: '提示',
-					content: '确认要删除选择的商品吗?',
-					success: function(res) {
-						if (res.confirm) {
-							_self.$u.api.delCartGoodsAjax(id).then(({code, data,msg}) => {
-								if (code == 1) {
-									_self.$u.toast(msg)
-									if(_self.isEdit){
-										_self.reData();
-										return;
-									}
-									if(index||index==0){
-										_self.goodsList.splice(index, 1);
-									}
-									
-								}
-							}).catch(() => {})
-						}
-					}
-				});
-			},
-			changeNums(e, id) {
-				uni.showLoading();
-				this.$u.api.updateCartNumsAjax({
-					cart_id: id,
-					nums: e.value
-				}).then(({
-					code,
-					data
-				}) => {
-					console.log(code, data)
-					uni.hideLoading();
-				}).catch(() => {
-					uni.hideLoading();
-				})
-			},
-			checkAllGoods() {
-				if (this.checkAllStauts) {
-					this.goodsList.forEach(item => (item.checked = false));
-				} else {
-					this.goodsList.forEach(item => (item.checked = true));
-				}
-				this.$forceUpdate();
-			},
-			goGoodsDetail(id) {
-				uni.navigateTo({
-					url: '/pages-mall/pages/goods/detail?goodsId=' + id
-				});
-			},
-			goPayResult() {
-				// goodsList.filter(item => item.checked).length<=0
-				let orderInfos = [];
-				let cartIds = [];
-				_self.goodsList.forEach(e => {
-					if (e.checked) {
-						cartIds.push(e.id);
-						orderInfos.push({
-							id: e.goods_id,
-							cover: e.goods.cover,
-							isbn: '',
-							price_selling: e.amount,
-							publish: '',
-							title: e.goods.title,
-							nums: e.nums,
-							selectdSku: {
-								id: e.sku_id,
-								difference: e.difference,
-								price_selling: e.amount,
-							},
-						})
-					}
-				})
-				console.log(orderInfos);
-
-				uni.navigateTo({
-					url: '/pages-mall/pages/order/submit?cartIds=' + cartIds.toString() + '&orderInfo=' + encodeURIComponent(
-						JSON.stringify(orderInfos))
-				});
-			},
-			getCartList() {
-				if (this.finish) return false;
-				if (this.loading) return false;
-				this.loading = true;
-				this.$u.api.getCartListAjax().then(({
-					code,
-					data
-				}) => {
-					if (this.pullDown) {
-						uni.stopPullDownRefresh();
-						this.pullDown = false;
-					}
-					this.isBiangeng = true;
-					console.log(code, data)
-					this.loading = false;
-					let returnData = data.data;
-					if (code == 1) {
-						if (data.last_page <= data.current_page) {
-							this.finish = true;
-						}
-						returnData.forEach(e => {
-							e.checked = false;
-						})
-						if (data.current_page == 1) {
-							this.goodsList = returnData;
-						} else {
-							this.goodsList = this.goodsList.concat(returnData);
-						}
-						this.page++;
-						console.log(this.goodsList);
-					} else {
-						this.finish = true;
-					}
-				}).catch(() => {
-					this.loading = false;
-					this.finish = true;
-				})
-			},
-			
-			// nextPage(e){
-			// 	if(this.finish){
-			// 		/* 已滚动到底部,不继续加载 */
-			// 		return false;
-			// 	}
-			// 	console.log(e);
-			// 	this.page++;
-			// 	this.getUserCouponList();
-			// },
-		}
-	};
-</script>
-
-<style lang="scss" scoped>
-	.topOpar{
-		height: 80rpx;
-		text-align: right;
-		background-color: $app-theme-light-color;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding: 0 30rpx;
-		margin-bottom: 20rpx;
-	}
-	.cartbox {
-		height: 100vh;
-		background: $app-theme-bg-gray-color;
-		padding-top: 20rpx;
-	}
-
-	.scrollbox {
-		// height: 100%;
-		padding-bottom: 100rpx;
-		box-sizing: border-box;
-	}
-
-	/deep/.u-icon {
-		display: flex !important;
-	}
-
-	.delIcon {
-		position: absolute;
-		top: 10rpx;
-		right: 10rpx;
-	}
-
-	.cart-list {
-		.item {
-			display: flex;
-			align-items: center;
-			background-color: $app-theme-bg-color;
-			padding: 30rpx 24rpx 30rpx 24rpx;
-			border-bottom: 1rpx solid $app-theme-border-color;
-			position: relative;
-
-			.left {
-				display: flex;
-				align-items: center;
-				width: 46rpx;
-			}
-
-			.right {
-				width: calc(100% - 46rpx);
-				display: flex;
-				align-items: center;
-				position: relative;
-
-				.img {
-					width: 160rpx;
-					height: 160rpx;
-					margin-right: 20rpx;
-
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-
-				.info {
-					width: 418rpx;
-
-					.title {
-						font-size: 28rpx;
-						font-family: PingFang-SC-Regular, PingFang-SC;
-						font-weight: 400;
-						color: $app-theme-text-black-color;
-						padding-bottom: 16rpx;
-					}
-
-					.sku {
-						font-size: 22rpx;
-						font-family: PingFang-SC-Regular, PingFang-SC;
-						font-weight: 400;
-						background: $app-theme-bg-gray-color;
-						border-radius: 2px;
-						color: $app-theme-card-gray-deep-color;
-						padding: 4rpx 16rpx;
-					}
-
-					.operate {
-						padding-top: 30rpx;
-						display: flex;
-						align-items: center;
-						justify-content: space-between;
-
-						.price {
-							text:nth-child(1) {
-								font-size: 24rpx;
-								font-family: PingFangSC-Medium, PingFang SC;
-								font-weight: 500;
-								color: $app-theme-text-money-color;
-							}
-
-							text:nth-child(2) {
-								font-size: 36rpx;
-								font-family: PingFangSC-Regular, PingFang SC;
-								font-weight: 400;
-								color: $app-theme-text-money-color;
-							}
-						}
-
-						.num {}
-					}
-				}
-			}
-		}
-	}
-
-	.bottom_opar {
-		position: fixed;
-		bottom: 0;
-		left: 0;
-		width: 100%;
-		background-color: $app-theme-bg-color;
-		height: 100rpx;
-		z-index: $app-zIndex-fixed;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-		.check {
-			padding-left: 30rpx;
-			display: flex;
-			align-items: center;
-
-			text {
-				font-size: 28rpx;
-				font-weight: 400;
-				color: $app-theme-text-black-color;
-			}
-		}
-
-		.right {
-			display: flex;
-			align-items: center;
-			.price {
-				margin-right: 54rpx;
-				text:nth-child(1) {
-					font-size: 28rpx;
-					font-family: PingFangSC-Regular, PingFang SC;
-					font-weight: 400;
-					color: $app-theme-text-black-color;
-				}
-
-				text:nth-child(2) {
-					font-size: 24rpx;
-					font-family: PingFangSC-Medium, PingFang SC;
-					font-weight: 500;
-					color: $app-theme-text-money-color;
-				}
-
-				text:nth-child(3) {
-					font-size: 36rpx;
-					font-family: PingFangSC-Regular, PingFang SC;
-					font-weight: 400;
-					color: $app-theme-text-money-color;
-				}
-			}
-		}
-
-	}
-	.topEditOpar{
-		display: flex;
-		padding: 10rpx 20rpx;
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		text-align: center;
-		.text{
-			flex: 1;
-			text-align: right;
-			font-weight: bold;
-			font-size: 32rpx;
-		}
-		.opartxt{
-			color: $app-theme-deep-color;
-		}
-	}
-	
-	.chuo{
-		position: absolute;
-		width: 90rpx;
-		height: 90rpx;
-		border-radius: 50%;
-		color: #fff;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		background-color: rgba(0, 0, 0, .5);
-		top: 40rpx;
-		left: 40rpx;
-		transform: rotate(30deg);
-		font-size: 24rpx;
-	}
-</style>

+ 56 - 26
pages/mine/index.vue

@@ -4,33 +4,33 @@
         <view class="user-info">
             <view class="user-header" @tap="handleUpdateUserInfo">
                 <view class="user-avatar">
-                    <image class="avatar" :src="userInfo.imgPath || '/static/img/logo3.png'" mode="aspectFill"></image>
+                    <image class="avatar" :src="userInfo.imgPath || 'https://shuhi.oss-cn-qingdao.aliyuncs.com/mini/logo3.png'" mode="aspectFill"></image>
                 </view>
                 <view class="user-detail">
                     <view class="nickname">{{ userInfo.nickName }}</view>
-                    <view class="user-tag" v-if="userInfo.labels">{{ userInfo.labels }}</view>
+                    <view class="user-tag" v-for="(tag, index) in userInfo.tags" :key="index">{{ tag }}</view>
                 </view>
             </view>
 
             <!-- 用户数据 -->
             <view class="user-data">
-                <view class="data-item">
-                    <view class="amount">{{ userInfo.restMoney || 0 }}</view>
+                <view class="data-item" @click="navigateToTool('/pages-mine/pages/wallet')">
+                    <view class="amount">{{ userInfo.accountMoney || 0 }}</view>
                     <view class="label">我的钱包</view>
                 </view>
                 <view class="data-item">
-                    <view class="amount">{{ userInfo.couponCount || 0 }}</view>
+                    <view class="amount">{{ userInfo.couponNum || 0 }}</view>
                     <view class="label">优惠券</view>
-                    <view class="badge" v-if="userInfo.availableCoupons">{{ userInfo.availableCoupons }}张可领</view>
+                    <view class="badge" v-if="userInfo.couponNum">{{ userInfo.couponNum }}张可领</view>
                 </view>
                 <view class="data-item">
-                    <view class="amount">{{ userInfo.points || 0 }}</view>
+                    <view class="amount">{{ userInfo.point || 0 }}</view>
                     <view class="label">我的积分</view>
                 </view>
             </view>
         </view>
 
-        <!-- 卖书订 -->
+        <!-- 卖书订 -->
         <view class="order-section">
             <view class="section-header">
                 <text>卖书订单</text>
@@ -44,6 +44,7 @@
                     @click="navigateToOrder(item.path)">
                     <image class="type-icon" :src="'/pages-mine/static/' + item.icon" mode="aspectFit"></image>
                     <text>{{ item.name }}</text>
+                    <view class="badge" v-if="item.badge">{{ item.badge }}</view>
                 </view>
             </view>
         </view>
@@ -67,27 +68,34 @@ export default {
     data() {
         return {
             userInfo: {
-                avatar: '',
-                nickname: '这里是微信昵称.',
-                tag: '合伙人',
-                balance: '26.00',
-                couponCount: '66',
-                availableCoupons: '99',
-                points: '3630'
+                userId: 0,
+                openid: '',
+                imgPath: '',
+                nickName: '这里是微信昵称.',
+                mobile: '',
+                tags: [],
+                accountMoney: 0,
+                couponNum: 0,
+                point: 0,
+                firstAuditNum: 0,
+                pickUpNum: 0,
+                auditNum: 0,
+                payNum: 0,
+                refundNum: 0
             },
             orderTypes: [
-                { name: '待初审', icon: '1.png', path: '/pages-mine/pages/order-page?status=1' },
-                { name: '待取件', icon: '2.png', path: '/pages-mine/pages/order-page?status=2' },
-                { name: '待审核', icon: '3.png', path: '/pages-mine/pages/order-page?status=3' },
-                { name: '待到款', icon: '4.png', path: '/pages-mine/pages/order-page?status=4' },
-                { name: '申请退回', icon: '5.png', path: '/pages-mine/pages/apply-return' }
+                { name: '待初审', icon: '1.png', badge: 0,key:"firstAuditNum", path: '/pages-mine/pages/order-page?status=2' },
+                { name: '待取件', icon: '2.png', badge: 0,key:"pickUpNum", path: '/pages-mine/pages/order-page?status=3' },
+                { name: '待审核', icon: '3.png', badge: 0,key:"auditNum", path: '/pages-mine/pages/order-page?status=8' },
+                { name: '待到款', icon: '4.png', badge: 0,key:"payNum", path: '/pages-mine/pages/order-page?status=10' },
+                { name: '申请退回', icon: '5.png', badge: 0,key:"refundNum", path: '/pages-mine/pages/apply-return' }
             ],
             tools: [
                 { name: '消息通知', icon: 't1.png', path: '/pages-mine/pages/notice' },
-                { name: '我的收藏', icon: 't2.png', path: '/pages/tools/collection' },
-                { name: '我的足迹', icon: 't3.png', path: '/pages/tools/footprint' },
+                { name: '我的收藏', icon: 't2.png', path: '' },
+                { name: '我的足迹', icon: 't3.png', path: '' },
                 { name: '我的地址', icon: 't4.png', path: '/pages-mine/pages/address/list' },
-                { name: '我的优惠券', icon: 't5.png', path: '/pages/tools/coupon' },
+                { name: '我的优惠券', icon: 't5.png', path: '' },
                 { name: '联系客服', icon: 't6.png', path: '/pages/tools/service' },
                 { name: '意见反馈', icon: 't7.png', path: '/pages-mine/pages/feedback' },
                 { name: '到货提醒', icon: 't8.png', path: '/pages/tools/arrival-notice' },
@@ -109,7 +117,7 @@ export default {
         //查看全部订单
         viewAllOrders() {
             uni.navigateTo({
-                url: '/pages-mine/pages/order-page'
+                url: '/pages-mine/pages/order-page?status=-1'
             })
         },
         //跳转订单
@@ -120,6 +128,10 @@ export default {
         },
         //跳转工具
         navigateToTool(path) {
+			if(!path) return uni.showToast({
+				title:"开发中...",
+				icon:"none"
+			})
             uni.navigateTo({
                 url: path
             })
@@ -130,9 +142,13 @@ export default {
                 console.log(res)
                 if (res.code == 200) {
                     this.userInfo = res.data
+
+                    this.orderTypes.forEach(item => {
+                        item.badge = this.userInfo[item.key]
+                    })
                 }
             })
-        }
+        },
     },
     onShow() {
         let token = uni.getStorageSync('token')
@@ -198,6 +214,7 @@ export default {
                     background: linear-gradient(-90deg, #272321, #4B4542);
                     border-radius: 4rpx;
                     margin-top: 8rpx;
+                    margin-right: 10rpx;
                 }
             }
         }
@@ -268,6 +285,19 @@ export default {
 
             .type-item {
                 text-align: center;
+                position: relative;
+                .badge {
+                    position: absolute;
+                    top: -15rpx;
+                    right: -6px;
+                    padding: 0 10rpx;
+                    font-size: 20rpx;
+                    line-height: 30rpx;
+                    height: 30rpx;
+                    background: #f56c6c;
+                    color: #fff;
+                    border-radius: 15rpx 15rpx 15rpx 0rpx;
+                }
 
                 .type-icon {
                     width: 60rpx;
@@ -276,7 +306,7 @@ export default {
                 }
 
                 text {
-                    font-size: 24rpx;
+                    font-size: 26rpx;
                     color: #333;
                 }
             }

+ 35 - 0
static/css/common.scss

@@ -427,4 +427,39 @@ view {
         width: 100%;
         flex: 1;
     }
+}
+
+
+button {
+    flex: 1;
+    height: 88rpx;
+    line-height: 88rpx;
+    font-size: 32rpx;
+    border: none;
+    margin: 0;
+
+    & + button {
+        margin-left: 14px;
+    }
+
+    &::after {
+        border: none;
+    }
+
+    &.cancel-btn {
+        background-color: #F5F5F5;
+        color: #333333;
+    }
+
+    &.confirm-btn {
+        background-color: #38C148;
+        color: #FFFFFF;
+
+
+        &.plain {
+            background-color: #ffffff;
+            color: #38C148;
+            border: 2rpx solid #38C148;
+        }
+    }
 }

BIN
static/img/barcode.png


BIN
static/img/kefu.png


BIN
static/img/logo2.png


BIN
static/img/logo3.png


BIN
static/img/logo_hui.png


BIN
static/img/quesheng.png


BIN
static/img/step1.png


BIN
static/img/step2.png


BIN
static/img/step3.png


BIN
static/nav/mine-order-1.png


BIN
static/nav/mine-order-2.png


BIN
static/nav/mine-order-3.png


BIN
static/nav/mine-order-4.png


BIN
static/nav/mine-order-5.png


BIN
static/nodata/collection.png


BIN
static/nodata/fans.png


BIN
static/nodata/news.png


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/main.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/runtime.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/common/vendor.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/common-dialog.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/img-swiper.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/loadmore.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/dial-nav.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/nav/label-count.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-search.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/navbar/navbar-top-search.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/no-data.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/pageScroll/index.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/search/search.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/select-reason.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/tag.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/components/title-operate.js.map


+ 0 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/border-success.js.map

@@ -1 +0,0 @@
-{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,sBAAI,CAAC,C","file":"pages-home/border-success.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages-home/border-success.vue'\ncreatePage(Page)"],"sourceRoot":""}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookItem.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/BookListItem.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/PickupTimePicker.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/components/SubmitConfirm.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/book-order.js.map


+ 0 - 1
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/border-success.js.map

@@ -1 +0,0 @@
-{"version":3,"sources":["uni-app:///main.js"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,sBAAI,CAAC,C","file":"pages-home/pages/border-success.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pages-home/pages/border-success.vue'\ncreatePage(Page)"],"sourceRoot":""}

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/order-success.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-home/pages/scaned-book.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/apply-reason.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/back-goods.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/back-status.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/select-goods-pop.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/after-sales/select-item.js.map


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 0
unpackage/dist/dev/.sourcemap/mp-weixin/pages-mall/components/express/list.js.map


Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff