hmp 4 năm trước cách đây
mục cha
commit
a4bde557ad
42 tập tin đã thay đổi với 3798 bổ sung1092 xóa
  1. 12 3
      assets/colorui/app.scss
  2. 27 3
      assets/http/api.js
  3. 1 0
      components/mp-uploadImg/mp-uploadImg.vue
  4. 19 2
      components/toast/toast.vue
  5. 3 0
      manifest.json
  6. 347 407
      pages.json
  7. 1 1
      pages/activity/comps/card.vue
  8. 4 5
      pages/activity/comps/item.vue
  9. 0 4
      pages/activity/detail.vue
  10. 5 2
      pages/bill/billDetail.vue
  11. 4 1
      pages/index/index.vue
  12. 25 31
      pages/login/login.vue
  13. 36 30
      pages/login/register.vue
  14. 52 8
      pages/member/add.vue
  15. 6 1
      pages/member/member.vue
  16. 23 5
      pages/my-bills/bills-detail.vue
  17. 153 37
      pages/my-bills/comps/balance-bills.vue
  18. 45 33
      pages/my-bills/comps/bills.vue
  19. 1 1
      pages/my-bills/comps/channel-point-bill.vue
  20. 132 32
      pages/my-bills/comps/point-bills.vue
  21. 354 0
      pages/publish/publish-old.vue
  22. 198 275
      pages/publish/publish.vue
  23. 32 22
      pages/shop-info/shop-info.vue
  24. 301 0
      pages/shop-info/u-city-select.vue
  25. 84 106
      pages/statistics/statistics.vue
  26. 624 22
      pages/test/test.vue
  27. 125 20
      pages/test/test2/test2.vue
  28. 3 3
      pages/userBank/userBank.vue
  29. 160 0
      pages/withdraw/detail.vue
  30. 139 33
      pages/withdraw/withdraw.vue
  31. 647 0
      pagesGoods/pages/menu/menu.vue
  32. 130 0
      pagesGoods/pages/menu/sku.vue
  33. BIN
      static/bank/bank.png
  34. BIN
      static/icon/ALIPAY.png
  35. BIN
      static/icon/UNIONPAY.png
  36. BIN
      static/icon/apple.png
  37. BIN
      static/icon/discount.png
  38. BIN
      static/icon/wx.png
  39. BIN
      static/icon/zk.png
  40. 66 0
      uni.scss
  41. 38 1
      utils/global.js
  42. 1 4
      utils/mixin.js

+ 12 - 3
assets/colorui/app.scss

@@ -2,9 +2,6 @@
 	color: $base-color;
 }
 
-
-
-
 .hoverClass{
 	opacity: 0.9;
 	background-color: #ebebeb;
@@ -214,6 +211,18 @@
 	margin-bottom: 50rpx;
 }
 
+.text-warn{
+	color: #ff9900;
+}
+
+.text-success{
+	color: #19be6b;
+}
+
+.text-error{
+	color: #fa3534;
+}
+
 /* ==========text-cut=========== */
 .btnCss {
 		border: none;

+ 27 - 3
assets/http/api.js

@@ -134,9 +134,12 @@ const statistics={
 
 
 const withdraw={
-	submit:p => http.post('common/withdrawrec/withdraw',p),
-	payOrder:p => http.get('payment/payOrder/YEE_PAY/USER_WITHDRAW',{params:p}),
+	userPointWithdraw:p => http.post('shop/userPointWithdraw',p),
+	userBalanceWithdraw:p => http.post('shop/userBalanceWithdraw',p),
+	pointPayOrder:p => http.get('withdraw/YEE_PAY_WITHDRAW/POINT_WITHDRAW',{params:p}),
+	balancePayOrder:p => http.get('withdraw/YEE_PAY_WITHDRAW/BALANCE_WITHDRAW',{params:p}),
 	list:p => http.get("ldt_bills/withdrawrec/list", {params:p}),
+	detail:p => http.get("ldt_bills/withdrawrec/detail", {params:p}),
 }
 
 const ocr={
@@ -154,6 +157,19 @@ const yeepay={
 	withdrawCardQuery:p => http.get("yeepay/withdrawCardQuery", {params:p}),
 }
 
+const goods={
+	list:p => http.get('goods/getGoodsList', {params: p}),
+	remove:p => http.post("ldt_goods/goods/remove?ids="+p),
+	submit: p => http.post('ldt_goods/goods/submit', p),
+}
+
+
+const goodsCategory={
+	list:p => http.get('ldt_goods/goodscategory/list', {params: p}),
+	submit: p => http.post('ldt_goods/goodscategory/submit', p),
+	remove:p => http.post("ldt_goods/goodscategory/remove?ids="+p),
+}
+
 const goodsbills = {
 	list: p => http.get("ldt_bills/goodsbills/list", {
 		params: p
@@ -163,11 +179,16 @@ const goodsbills = {
 	}),
 }
 
+
 const area={
 	province: p => http.get('blade-system/region/lazy-tree?parentCode=00', {params: p}),
 	list:p => http.get('blade-system/region/lazy-tree', {params: p}),
 }
 
+const shopTrade={
+	balanceQuery: p => http.get('shopTrade/balanceQuery', {params: p}),
+}
+
 
 
 
@@ -192,6 +213,9 @@ export const api={
 	withdraw,
 	ocr,
 	yeepay,
+	goods,
+	goodsCategory,
 	goodsbills,
-	area
+	area,
+	shopTrade
 }

+ 1 - 0
components/mp-uploadImg/mp-uploadImg.vue

@@ -52,6 +52,7 @@
 					success: (res) => {
 						if (res.confirm) {
 							_this.imgList.splice(index, 1)
+							_this.$emit('delImg',this.imgList)
 						}
 					}
 				})

+ 19 - 2
components/toast/toast.vue

@@ -1,12 +1,12 @@
 <template>
 	<view :style="{zIndex: zIndex}" class="container">
 		<block v-for="message in messageQueue" :key="message.id">
-			<view :class="[message.animation, backgroundClass(message)]" class="message">
+			<view :style="message.type === 'toast'?'background-color: #555;color: #FFFFFF;':''" :class="[message.animation, backgroundClass(message)]" class="message">
 				<text v-if="message.type === 'info'" class="bm-icon info">&#xe671;</text>
 				<text v-if="message.type === 'success'" class="bm-icon success">&#xe62f;</text>
 				<text v-if="message.type === 'warn'" class="bm-icon warn">&#xe671;</text>
 				<text v-if="message.type === 'error'" class="bm-icon error">&#xe630;</text>
-				<text>{{message.content}}</text>
+				<text  :style="message.type === 'toast'?'font-size: 24rpx':''">{{message.content}}</text>
 			</view>
 		</block>
 	</view>
@@ -44,6 +44,23 @@
 			}
 		},
 		methods: {
+			/**
+			 * 展示普通提示信息
+			 * @param {Object} content
+			 */
+			toast(arg) {
+				const message = {
+					type: 'toast'
+				}
+				if (typeof arg === 'object' && arg) {
+					message.content = arg.content
+					message.duration = arg.duration
+					message.background = arg.background
+				} else if(typeof arg === 'string') {
+					message.content = arg
+				}
+				this.fadeIn(message)
+			},
 			/**
 			 * 展示普通提示信息
 			 * @param {Object} content

+ 3 - 0
manifest.json

@@ -51,6 +51,9 @@
 	/* 小程序特有相关 */
 	"mp-weixin": {
 		"appid": "wx2db9c41e85d5a4fc",
+		"optimization" : {
+		    "subPackages" : true
+		},
 		"setting": {
 			"urlCheck": false,
 			"es6": true,

+ 347 - 407
pages.json

@@ -2,423 +2,363 @@
 	"easycom": {
 		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
 	},
-	"pages": [ 
-		{
-		    "path" : "pages/login/account-login",
-		    "style" :                                                                                    
-		    {
-				"navigationStyle":"custom",
-		        "enablePullDownRefresh": false
-		    }
+	"pages": [{
+			"path": "pages/login/account-login",
+			"style": {
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": false
+			}
 		},
 		{
 			"path": "pages/index/index",
 			"style": {
-				"navigationStyle":"custom",
+				"navigationStyle": "custom",
 				"navigationBarTitleText": "联兑通商户版"
 			}
-		}
-        ,{
-            "path" : "pages/login/login",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/card/card",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "卡包",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/bill/bill",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的账单",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/bill/billDetail",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "账单详情",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/publish/publish",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "发起活动",
-				"navigationStyle":"custom",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/publish/detail",
-		    "style" :                                                                                    
-		    {
-				"navigationStyle":"custom",
-		        "navigationBarTitleText": "活动详情",
-		        "enablePullDownRefresh": false
-		    }
-		}
-		,{
-		    "path" : "pages/activity/activity",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "活动列表",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        ,{
-            "path" : "pages/member/member",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "会员中心",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/member/detail",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "会员详情",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        ,{
-            "path" : "pages/login/forget",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/login/register",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "注册账号",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/shop-info/shop-info",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false,
-				"usingComponents":{
+		}, {
+			"path": "pages/login/login",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/card/card",
+			"style": {
+				"navigationBarTitleText": "卡包",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/bill/bill",
+			"style": {
+				"navigationBarTitleText": "我的账单",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/bill/billDetail",
+			"style": {
+				"navigationBarTitleText": "账单详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/publish/publish",
+			"style": {
+				"navigationBarTitleText": "发起活动",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/publish/detail",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "活动详情",
+				"enablePullDownRefresh": false
+			}
+		}, {
+			"path": "pages/activity/activity",
+			"style": {
+				"navigationBarTitleText": "活动列表",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/member/member",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "会员中心",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/member/detail",
+			"style": {
+				"navigationBarTitleText": "会员详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/login/forget",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/login/register",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "注册账号",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/shop-info/shop-info",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false,
+				"usingComponents": {
 					"ocr-navigator": "plugin://ocr-plugin/ocr-navigator"
 				}
-            }
-        }
-        ,{
-            "path" : "pages/member/add",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "创建会员中心",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/webView/webView",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-		,{
-		    "path" : "pages/userBank/userBank",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "银行卡",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-		,{
-		    "path" : "pages/userBank/add",
-		    "style" :                                                                                    
-		    {
-		        "navigationBarTitleText": "添加银行卡",
-		        "enablePullDownRefresh": false
-		    }
-		    
-		}
-        ,{
-            "path" : "pages/login/updatePassworf",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "修改密码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/checkstand/pay-qrcode",
-            "style" :                                                                                    
-            {
+			}
+		}, {
+			"path": "pages/member/add",
+			"style": {
+				"navigationBarTitleText": "创建会员中心",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/webView/webView",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/userBank/userBank",
+			"style": {
+				"navigationBarTitleText": "银行卡",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/userBank/add",
+			"style": {
+				"navigationBarTitleText": "添加银行卡",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/login/updatePassworf",
+			"style": {
+				"navigationBarTitleText": "修改密码",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/checkstand/pay-qrcode",
+			"style": {
 				"navigationBarTextStyle": "white",
 				"navigationBarBackgroundColor": "#EF9944",
-                "navigationBarTitleText": "收款码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/pay/pay",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "扫码收款",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/image-cropper/image-cropper",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "图片裁剪",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/material-download/material-download",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择模板",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/material-download/createPoster",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "生成付款码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/test/test",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "测试",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/chooseLable/chooseLable",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择标签",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/login/submit-success",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "提交成功",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/withdraw/withdraw",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "提现",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/withdraw/select-bank",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择银行",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/pay/pay-result",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "收款结果",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/activity/detail",
-            "style" :                                                                                    
-            {
-				"navigationStyle":"custom",
-                "navigationBarTitleText": "活动详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/statistics/statistics",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "数据统计",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/statistics/pointBillStatistics",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "应收统计",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/card/feedback",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "用户反馈",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/withdraw/records",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "提现记录",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/material-download/createOrderPoster",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "生成点餐码",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/flow/flow",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "审核流程",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/my-bills/my-bills",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "我的账单",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/my-bills/bills-detail",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "账单详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/feedback/feedback",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "用户反馈",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/order/order",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "订单中心",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/order/detail",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "订单详情",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/test/test1",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/choose-list/choose-list",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "选择数据",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-        ,{
-            "path" : "pages/test/test2/test2",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "test",
-                "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
+				"navigationBarTitleText": "收款码",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/pay/pay",
+			"style": {
+				"navigationBarTitleText": "扫码收款",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/image-cropper/image-cropper",
+			"style": {
+				"navigationBarTitleText": "图片裁剪",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/material-download/material-download",
+			"style": {
+				"navigationBarTitleText": "选择模板",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/material-download/createPoster",
+			"style": {
+				"navigationBarTitleText": "生成付款码",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/test/test",
+			"style": {
+				"navigationBarTitleText": "测试",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/chooseLable/chooseLable",
+			"style": {
+				"navigationBarTitleText": "选择标签",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/login/submit-success",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "提交成功",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/withdraw/withdraw",
+			"style": {
+				"navigationBarTitleText": "积分提现",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/withdraw/select-bank",
+			"style": {
+				"navigationBarTitleText": "选择银行",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/pay/pay-result",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "收款结果",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/activity/detail",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "活动详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/statistics/statistics",
+			"style": {
+				"navigationBarTitleText": "数据统计",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/statistics/pointBillStatistics",
+			"style": {
+				"navigationBarTitleText": "应收统计",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/card/feedback",
+			"style": {
+				"navigationBarTitleText": "用户反馈",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/withdraw/records",
+			"style": {
+				"navigationBarTitleText": "提现记录",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/material-download/createOrderPoster",
+			"style": {
+				"navigationBarTitleText": "生成点餐码",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/flow/flow",
+			"style": {
+				"navigationBarTitleText": "审核流程",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my-bills/my-bills",
+			"style": {
+				"navigationBarTitleText": "我的账单",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/my-bills/bills-detail",
+			"style": {
+				"navigationBarTitleText": "账单详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/feedback/feedback",
+			"style": {
+				"navigationBarTitleText": "用户反馈",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/order/order",
+			"style": {
+				"navigationBarTitleText": "订单中心",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/order/detail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/test/test1",
+			"style": {
+				"navigationBarTitleText": "",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/choose-list/choose-list",
+			"style": {
+				"navigationBarTitleText": "选择数据",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/test/test2/test2",
+			"style": {
+				"navigationBarTitleText": "test",
+				"enablePullDownRefresh": false
+			}
+
+		}, {
+			"path": "pages/withdraw/detail",
+			"style": {
+				"navigationBarTitleText": "提现详情",
+				"enablePullDownRefresh": false
+			}
+
+		}
+	],
+	"subPackages": [{
+		"root": "pagesGoods",
+		"pages": [{
+				"path": "pages/menu/menu",
+				"style": {
+					"navigationBarTitleText": "菜单管理"
+				}
+			},
+			{
+				"path": "pages/menu/sku",
+				"style": {
+					"navigationBarTitleText": "商品属性"
+				}
+			}
+		]
+	}],
+	"preloadRule": {
+		"pages/index/index": {
+			"network": "all",
+			"packages": ["pagesGoods"]
+		}
+	},
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",

+ 1 - 1
pages/activity/comps/card.vue

@@ -35,7 +35,7 @@
 				</view>
 				<view v-else style="position: absolute;right: 10rpx;bottom: 10rpx;font-size: 26rpx;">
 					<view class="center" style="color: #EF9944;">
-						<u-icon name="coupon" color="#ff7001" size="30"></u-icon>
+						<image style="width: 36rpx;height: 36rpx;" src="@/static/icon/zk.png" mode=""></image>
 						<text style="margin-left: 6rpx;">{{item.discount * 10}}折</text>
 					</view>
 				</view>

+ 4 - 5
pages/activity/comps/item.vue

@@ -70,21 +70,20 @@
 				}
 				if (this.item.value==0) {
 					//自己发起的活动
-					params.launchId=this.vuex_shopId || '-1',
+					params.launchId=this.vuex_shopId || null,
 					params.launchType=this.$global.SHOP
 					res=await this.$api.activity.list(params)
 				}
 				if (this.item.value==1) {
 					//可参加的活动
-					//该商场发布的活动或者该商场下的商户发布的活动
-					params.mallId=this.vuex_mallId || '-1'
-					params.launchId=this.vuex_shopId || '-1',
+					params.mallId=this.vuex_mallId || null
+					params.launchId=this.vuex_shopId || null,
 					params.launchType=this.$global.SHOP
 					res=await this.$api.activity.getCanJoinActivity(params)
 				}
 				if (this.item.value==2) {
 					// 已参加的活动
-					params.joinId=this.vuex_shopId || '-1'
+					params.joinId=this.vuex_shopId || null
 					params.joinType=this.$global.SHOP
 					res=await this.$api.joinRecord.joined(params)
 				}

+ 0 - 4
pages/activity/detail.vue

@@ -42,10 +42,6 @@
 				<u-icon name="clock" color="#EF9944"></u-icon>
 				<text class="margin-left-10">结束时间:{{detail.endTime}}</text>
 			</view>
-			<view class="data" style="margin-top: 30rpx;">
-				<u-icon name="grid" color="#EF9944"></u-icon>
-				<text class="margin-left-10">活动分类:{{detail.labelKey}}</text>
-			</view>
 			<view class="data" style="margin-top: 30rpx;">
 				<u-icon name="coupon" color="#EF9944"></u-icon>
 				<text class="margin-left-10">活动折扣:{{detail.discount * 10}} 折</text>

+ 5 - 2
pages/bill/billDetail.vue

@@ -43,9 +43,10 @@
 						<text class="strong" style="margin-left: 50rpx;">¥ {{billDetail.pointValue?billDetail.pointValue:0}}</text>
 					</view>
 				</view> -->
+				
 				<view class="item">
 					<text>联营折扣</text>
-					<text style="color: #000;">{{billDetail.discount==-1 || billDetail.discount==0?'无折扣': $digital.floatMul(billDetail.discount , 10) +'折'}}</text>
+					<text style="color: #000;">{{billDetail.discount==-1 || billDetail.discount==0 || billDetail.discount==1?'无折扣': $digital.floatMul(billDetail.discount , 10) +'折'}}</text>
 				</view>
 				<view class="item">
 					<text>交易状态</text>
@@ -57,7 +58,9 @@
 				</view>
 				<view class="item">
 					<text>支付方式</text>
-					<text>{{billDetail.payWay}}</text>
+					<text v-if="billDetail.payWay=='WECHAT'">微信支付</text>
+					<text v-if="billDetail.payWay=='ALIPAY'">支付宝支付</text>
+					<text v-if="billDetail.payWay=='APPLEPAY'">银联支付</text>
 				</view>
 				<view class="item">
 					<text>交易单号</text>

+ 4 - 1
pages/index/index.vue

@@ -41,7 +41,7 @@
 							<text>{{statistic.todayCharge || 0}}</text>
 						</view>
 						<view class="">
-							<text>总资产</text>
+							<text>总收益</text>
 							<text>{{statistic.totalValue || 0}}</text>
 						</view>
 					</view>
@@ -244,6 +244,9 @@
 				this.getStatistic()
 			},
 			getStatistic() {
+				if (this.$isEmpty(this.vuex_merchantNo)) {
+					return
+				}
 				this.$api.shop.statistic({
 					shopId: this.shopId
 				}).then(res => {

+ 25 - 31
pages/login/login.vue

@@ -43,6 +43,8 @@
 			</view>
 		</view>
 
+		<toast ref="toast" ></toast>
+		<loading ref="loading" type="3"/>
 		<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
 	</view>
 </template>
@@ -67,7 +69,7 @@
 				rules: {
 					phone: [{
 						required: true,
-						message: '请输入号',
+						message: '请输入手机号',
 						trigger: ['change', 'blur'],
 					}],
 					code: [{
@@ -90,10 +92,10 @@
 			login() {
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
-						this.$dialog.showLoading('登录中..')
+						this.$refs.loading.showLoading('登录中..')
 						setTimeout(()=>{
 							this.doLogin()
-						},500)
+						},300)
 					}
 				});
 			},
@@ -107,12 +109,11 @@
 				let res=await this.$api.accout.phoneLogin(params)
 				this.cacheToken(res.data)
 				uni.setStorageSync("phone",this.form.phone)
-				uni.navigateTo({
+				uni.reLaunch({
 					url:'/pages/index/index'
 				})
-				this.$u.toast('登录成功')
-				console.log(res);
-				return
+				this.$refs.loading.hide()
+				this.$refs.toast.info('登录成功')
 			},
 			cacheToken(data){
 				let tokenInfo={
@@ -132,33 +133,26 @@
 			// 获取验证码
 			getCode() {
 				if (this.$isEmpty(this.form.phone)) {
-					this.$u.toast('请输入手机号')
+					this.$refs.toast.error('请输入手机号')
 					return
 				}
 				if (this.$refs.uCode.canGetCode) {
-					// 模拟向后端请求验证码
-					uni.showLoading({
-						title: '正在获取验证码',
-						mask: true
-					})
-					setTimeout(() => {
-						let params={
-							phone:this.form.phone
+					let params={
+						phone:this.form.phone
+					}
+					let p=this.$u.queryParams(params)
+					this.$api.sms.send(p).then(res=>{
+						if (res.data.success) {
+							this.$cache.put('smsId',res.data.id)
+							this.$refs.toast.info('验证码已发送')
+							// 通知验证码组件内部开始倒计时
+						}else{
+							this.$u.toast(res.data);
 						}
-						let p=this.$u.queryParams(params)
-						this.$api.sms.send(p).then(res=>{
-							if (res.data.success) {
-								this.$cache.put('smsId',res.data.id)
-								this.$u.toast('验证码已发送');
-								// 通知验证码组件内部开始倒计时
-							}else{
-								this.$u.toast(res.data);
-							}
-							this.$refs.uCode.start();
-						})
-					}, 200);
+						this.$refs.uCode.start();
+					})
 				} else {
-					this.$u.toast('倒计时结束后再发送');
+					this.$refs.toast.warn('倒计时结束后再发送')
 				}
 			},
 		}
@@ -228,8 +222,8 @@
 				justify-content: center;
 				align-items: center;
 				image {
-					width: 140rpx;
-					height: 140rpx;
+					width: 120rpx;
+					height: 120rpx;
 				}
 			}
 

+ 36 - 30
pages/login/register.vue

@@ -45,7 +45,9 @@
 				</view> -->
 			</view>
 		</view>
-
+			
+		<toast ref="toast" ></toast>
+		<loading ref="loading" type="3"/>
 		<u-verification-code seconds="60" ref="uCode" @change="codeChange"></u-verification-code>
 	</view>
 </template>
@@ -118,9 +120,9 @@
 					this.$cache.put('promotionCode', params.promotionCode)
 					return
 				}
-				if (this.$isNotEmpty(options.promotionCode)) {
-					//获取小程序码的参数
-					this.$cache.put('promotionCode', options.promotionCode)
+				if (this.$isNotEmpty(options.scene)) {
+					let salesmanId=decodeURIComponent(options.scene)
+					salesmanId && this.$cache.put('salesmanId',salesmanId)
 				}
 			}
 			
@@ -142,16 +144,27 @@
 				this.codeTips = text;
 			},
 			async register() {
-				let p = {
+				let params = {
 					phone: this.form.phone,
 					secret: md5Libs.md5(this.form.password),
 					smsId: this.$cache.get('smsId'),
 					value: this.form.code,
 				}
-				this.$api.accout.register(p).then(res => {
+				if (this.$cache.get('promotionCode')) {
+					params.agentId=this.$cache.get('promotionCode')
+				}
+				
+				if (this.$cache.get('salesmanId')) {
+					params.salesmanId=this.$cache.get('salesmanId')
+				}
+				this.$api.accout.register(params).then(res => {
 					if (res.success) {
-						uni.navigateTo({
-							url: "/pages/shop-info/shop-info?phone=" + this.form.phone
+						this.$dialog.showModal('注册成功',false).then(()=>{
+							this.$cache.remove('promotionCode')
+							this.$cache.remove('salesmanId')
+							uni.reLaunch({
+								url:"/pages/login/account-login",
+							})
 						})
 					}
 				})
@@ -159,34 +172,27 @@
 			// 获取验证码
 			getCode() {
 				if (this.$isEmpty(this.form.phone)) {
-					this.$u.toast('请输入手机号')
+					this.$refs.toast.info('请输入手机号')
 					return
 				}
 				if (this.$refs.uCode.canGetCode) {
 					// 模拟向后端请求验证码
-					uni.showLoading({
-						title: '正在获取验证码',
-						mask: true
-					})
-					setTimeout(() => {
-						let params = {
-							phone: this.form.phone
+					let params = {
+						phone: this.form.phone
+					}
+					let p = this.$u.queryParams(params)
+					this.$api.sms.send(p).then(res => {
+						if (res.data.success) {
+							this.$cache.put('smsId', res.data.id)
+							this.$refs.toast.info('验证码已发送')
+							// 通知验证码组件内部开始倒计时
+						} else {
+							this.$u.toast(res.data);
 						}
-						let p = this.$u.queryParams(params)
-						this.$api.sms.send(p).then(res => {
-							if (res.data.success) {
-								this.$cache.put('smsId', res.data.id)
-								this.$u.toast('验证码已发送');
-								// 通知验证码组件内部开始倒计时
-							} else {
-								this.$u.toast(res.data);
-							}
-							this.$refs.uCode.start();
-						})
-						uni.hideLoading()
-					}, 200);
+						this.$refs.uCode.start();
+					})
 				} else {
-					this.$u.toast('倒计时结束后再发送');
+					this.$refs.toast.info('倒计时结束后再发送')
 				}
 			},
 		}

+ 52 - 8
pages/member/add.vue

@@ -25,9 +25,6 @@
 									</view>
 								</view>
 							</u-slider>
-							<!-- <u-slider v-model="value"  ></u-slider> -->
-							<!-- <u-input height="60" @click="show=!show" disabled :border="true" :clearable="false"
-								v-model="form.consumeOnePoint" placeholder="请选择返利比例" /> -->
 						</view>
 					</u-form-item>
 					<u-form-item label="消费1元赠送" :border-bottom="false">
@@ -63,11 +60,17 @@
 				<text>提交代表已同意</text>
 				<text style="color: #3099F1;">会员中心规则说明</text>
 			</view>
-			<view @click="submit" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
+			<view @click="confirmShow=true" class="cu-btn bg-color round" style="width: 70%;height: 90rpx;font-size: 36rpx;">
 				提交
 			</view>
 		</view>
-
+		<u-modal :mask-close-able="true" v-model="confirmShow" @confirm="confirm" :confirm-text="isHigh?'重新设置':'确认'" confirm-color="#EF9944">
+			<view class="slot-content">
+				<text class="text-lg text-bold">消费1元赠送 {{form.consumeOnePoint}} 积分</text>
+				<text class="text-lg text-bold">积分折合 {{pointsValue}} 元</text>
+				<text v-if="isHigh" class="text-red margin-top-20 text-sm">*赠送积分价值高于系统风险阈值!</text>
+			</view>
+		</u-modal>
 		<u-select confirm-color="#EF9944" v-model="show" :list="list"></u-select>
 	</view>
 </template>
@@ -76,8 +79,12 @@
 	export default {
 		data() {
 			return {
+				type:'',
+				
+				isHigh:false,
 				value:1,
 				show:false,
+				confirmShow:false,
 				list: [{
 						value: '0.01',
 						label: '10%'
@@ -92,16 +99,42 @@
 					}
 				],
 				form:{
-					consumeOnePoint:'0.01'
+					consumeOnePoint:'5'
 				}
 			}
 		},
+		computed:{
+			pointsValue(){
+				let data=this.$digital.floatMul( this.form.consumeOnePoint,(this.value / 100))
+				if (data>0.3) {
+					this.isHigh=true
+				}else{
+					this.isHigh=false
+				}
+				return data
+			}
+		},
+		onLoad(options) {
+			this.type=options.type || ''
+			if (this.$isNotEmpty(this.type)) {
+				uni.setNavigationBarTitle({
+					title:'更改规则'
+				})
+			}
+		},
 		methods: {
-			submit(){
+			confirm(){
 				if (this.$isEmpty(this.form.consumeOnePoint)) {
 					this.$u.toast('请输入积分规则')
 					return
 				}
+				this.confirmShow=false
+				if (!this.isHigh) {
+					this.submit()
+				}
+			},
+			
+			submit(){
 				let id=this.vuex_shopId
 				let params={
 					id,
@@ -111,7 +144,7 @@
 				}
 				this.$api.shop.submit(params).then(res=>{
 					if (res.success) {
-						this.$dialog.showModal('创建成功',false).then(res=>{
+						this.$dialog.showModal('操作成功',false).then(res=>{
 							uni.redirectTo({
 								url:"/pages/member/member"
 							})
@@ -131,6 +164,17 @@
 </style>
 
 <style lang="scss">
+	
+	.slot-content{
+		font-size: 28rpx;
+		padding: 40rpx 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+		line-height: 50rpx;
+	}
+	
 	.bold {
 		font-size: 34rpx;
 		color: #1C1C1C;

+ 6 - 1
pages/member/member.vue

@@ -31,7 +31,7 @@
 					</view>
 					<view class="u-m-t-50 u-flex u-col-center u-row-center">
 						<text class="u-font-24 u-m-r-20">规则:消费 1 元赠送 {{detail.sendPointUnit}} 积分</text>
-						<view class="cu-btn bg-white sm round" @click="showPopup=true" style="padding: 10rpx 20rpx;">
+						<view class="cu-btn bg-white sm round" @click="changeRule" style="padding: 10rpx 20rpx;">
 							更改规则
 						</view>
 					</view>
@@ -149,6 +149,11 @@
 			this.fetchMemberInfo()
 		},
 		methods: {
+			changeRule(){
+				uni.navigateTo({
+					url:"./add?type='change'"
+				})
+			},
 			back(){
 				uni.reLaunch({
 					url:"/pages/index/index"

+ 23 - 5
pages/my-bills/bills-detail.vue

@@ -2,8 +2,23 @@
 	<view>
 		<block v-if="type=='all'">
 			<view class="top">
-				<image style="border-radius: 50%;" :src="billDetail.avatar?billDetail.avatar:'/static/icon/avatar.png'" mode="aspectFit"></image>
-				<text class="title">{{billDetail.nickName?billDetail.nickName:'微信用户'}}</text>
+				<image v-if="$isNotEmpty(billDetail.avatar)" style="border-radius: 50%;" :src="billDetail.avatar" ></image>
+				<block v-else>
+					<image v-if="billDetail.payWay=='WECHAT'" style="border-radius: 50%;" src="@/static/icon/wx.png" ></image>
+					<image v-else-if="billDetail.payWay=='ALIPAY'" style="border-radius: 50%;" src="@/static/icon/ALIPAY.png" ></image>
+					<image v-else-if="billDetail.payWay=='UNIONPAY'" style="border-radius: 50%;" src="@/static/icon/UNIONPAY.png" ></image>
+					<image v-else-if="billDetail.payWay=='APPLEPAY'" style="border-radius: 50%;" src="@/static/icon/apple.png" ></image>
+					<image v-else style="border-radius: 50%;" src="@/static/icon/avatar.png" ></image>
+				</block>
+				
+				<text class="title" v-if="$isNotEmpty(billDetail.nickName)">{{billDetail.nickName}}</text>
+				<view v-else class="title">
+					<text v-if="billDetail.payWay=='WECHAT'">微信用户</text>
+					<text v-else-if="billDetail.payWay=='ALIPAY'">支付宝用户</text>
+					<text v-else-if="billDetail.payWay=='UNIONPAY'">银联用户</text>
+					<text v-else-if="billDetail.payWay=='APPLEPAY'">苹果用户</text>
+					<text v-else>用户昵称</text>
+				</view>
 				<view class="data">
 					<view class="price plus text-base text-bold" style="padding: 0;">
 						<block v-if="$isNotEmpty(billDetail.receiveNumTotal)">{{billDetail.receiveNumTotal}}</block>
@@ -22,7 +37,7 @@
 				</view>
 				<view class="item">
 					<text>联营折扣</text>
-					<text style="color: #000;">{{billDetail.discount==-1 || billDetail.discount==0?'无折扣': $digital.floatMul(billDetail.discount , 10) +'折'}}</text>
+					<text style="color: #000;">{{billDetail.discount==-1 || billDetail.discount==0|| billDetail.discount==1?'无折扣': $digital.floatMul(billDetail.discount , 10) +'折'}}</text>
 				</view>
 				<view class="item">
 					<text>现金支付</text>
@@ -58,7 +73,10 @@
 				</view>
 				<view class="item">
 					<text>支付方式</text>
-					<text>{{billDetail.payWay}}</text>
+					<text v-if="billDetail.payWay=='WECHAT'">微信支付</text>
+					<text v-if="billDetail.payWay=='ALIPAY'">支付宝支付</text>
+					<text v-if="billDetail.payWay=='UNIONPAY'">银联支付</text>
+					<text v-if="billDetail.payWay=='APPLEPAY'">苹果支付</text>
 				</view>
 				<view class="item">
 					<text>交易单号</text>
@@ -69,7 +87,7 @@
 		
 		<block v-if="current==1">
 			<view class="top">
-				<image :src="billDetail.channelLogo?billDetail.channelLogo:'/static/icon/avatar.png'" mode="aspectFit"></image>
+				<image :src="billDetail.channelLogo?billDetail.channelLogo:'/static/icon/avatar.png'" ></image>
 				<text class="title">{{billDetail.channelName}}</text>
 				<view class="data">
 					<image src="@/static/icon/points-value.png" mode="aspectFit"></image>

+ 153 - 37
pages/my-bills/comps/balance-bills.vue

@@ -1,23 +1,25 @@
 <template>
-	<view class="" style="height: 100vh;">
+	<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
+		@init="mescrollInit">
 		<view class="head_box u-flex u-row-center u-col-center">
 			<view class="card-box">
 				<view class="card-head u-flex u-col-center">
 					<view class="card-title u-m-r-10">可提现金额(元)</view>
 					<view class="u-iconfont uicon-eye" style="color: #fff;font-size: 50rpx;"></view>
 				</view>
-				<view class="money-num u-p-t-50">{{dataInfo.balance}}</view>
+				<view class="money-num u-p-t-50">{{dataInfo.availableNum}}</view>
 
 				<view class="padding-top-40 text-white text-df">
-					<text class="price">总收益:{{dataInfo.totalBalance}}</text>
-					<text class="margin-left-30 price">今日收益:{{dataInfo.todayBalance}}</text>
+					<text class="price">总收益:{{dataInfo.totalNum}}</text>
+					<text class="margin-left-30 price">今日收益:{{dataInfo.todayNum}}</text>
 				</view>
-				<button @click="$jump('/pages/withdraw/withdraw')" class="u-reset-button withdraw-btn">提现</button>
+				<button @click="jump" class="u-reset-button withdraw-btn">结算</button>
 			</view>
 		</view>
 
-		<view @click.stop="showTime = true" class="flex justify-between" style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
-			
+		<view @click.stop="showTime = true" class="flex justify-between"
+			style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
+
 			<view class="flex">
 				<view class="bg-white cu-btn round margin-30 sm">
 					<text>{{defaultTime}}</text>
@@ -25,13 +27,12 @@
 				</view>
 				<!-- <view  class="total-box">收入¥0.00 支出¥0.00</view> -->
 			</view>
-			
+
 			<!-- <view class="center margin-right-30">
 				统计
 				<text class="cuIcon-right"></text>
 			</view> -->
 		</view>
-
 		<scroll-view scroll-x class="bg-white nav">
 			<view class="flex text-center">
 				<view class="cu-item flex-sub" :class="index==stateCurrent?'text-base cur text-xl text-bold ':'text-lg'"
@@ -55,33 +56,70 @@
 		</u-sticky>
 
 		<view v-show="stateCurrent==0" class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
-			<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
-				@init="mescrollInit">
-				<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex" v-for="(item,index) in list" :key="index">
-					<view class="area1">
-						<image :src="item.avatar?item.avatar:'/static/icon/avatar.png'" mode=""></image>
-						<view>
-							<text>{{item.nickName || '用户支付'}}</text>
-							<text>{{item.createTime}}</text>
-						</view>
+			<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex"
+				v-for="(item,index) in list" :key="index">
+				<view class="area1">
+					<image v-if="$isNotEmpty(item.avatar)" :src="item.avatar"></image>
+					<block v-else>
+						<image v-if="item.payWay=='WECHAT'" src="@/static/icon/wx.png"></image>
+						<image v-else-if="item.payWay=='ALIPAY'" src="@/static/icon/ALIPAY.png"></image>
+						<image v-else-if="item.payWay=='UNIONPAY'" src="@/static/icon/UNIONPAY.png"></image>
+						<image v-else-if="item.payWay=='APPLEPAY'" src="@/static/icon/apple.png"></image>
+						<image v-else src="@/static/icon/avatar.png"></image>
+					</block>
+
+					<view>
+						<text v-if="$isNotEmpty(item.nickName)">{{item.nickName}}</text>
+						<block v-else>
+							<text v-if="item.payWay=='WECHAT'">微信用户</text>
+							<text v-else-if="item.payWay=='ALIPAY'">支付宝用户</text>
+							<text v-else-if="item.payWay=='UNIONPAY'">银联用户</text>
+							<text v-else-if="item.payWay=='APPLEPAY'">苹果用户</text>
+							<text v-else>用户昵称</text>
+						</block>
+						<text>{{item.createTime}}</text>
 					</view>
-					<view class="area2">
-						<text>{{item.discount==-1 || item.discount==0?'无折扣':item.discount +'折'}}</text>
+				</view>
+				<view class="area2">
+					<text>{{item.discount==-1 || item.discount==0 || item.discount==1?'无折扣':item.discount +'折'}}</text>
+				</view>
+				<view class="area3">
+					<text class="text-base price plus">{{item.receiveNumYp || 0}}</text>
+				</view>
+			</navigator>
+		</view>
+
+		<view v-show="stateCurrent==1" class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
+			<navigator :url="'/pages/withdraw/detail?id='+item.id" class="card u-border-bottom"
+				v-for="(item,index) in list" :key="index">
+				<view class="left">
+					<view class="margin-bottom-20 flex">
+						<text class="text-bold" style="font-size: 32rpx;">余额结算</text>
+					</view>
+					<text class="desc">{{item.createTime}}</text>
+				</view>
+				<view class="right center text-base">
+					<view v-if="item.withdrawStatus == 'DONE'" class="value" style="margin-bottom: 10rpx;">
+						<text>-</text>
+						<text class="" style="margin: 0 4rpx;">{{item.price}}</text>
+						<text class="text-sm">元</text>
 					</view>
-					<view class="area3">
-						<text class="text-base price plus">{{item.receiveNumYp || 0}}</text>
+					<view v-else class="text-sm">
+						<text v-if="item.withdrawStatus == 'WAITING'" class="text-warn"
+							style="font-size: 26rpx;margin-left: 10rpx;">处理中</text>
+						<text v-if="item.withdrawStatus == 'FAIL'" class="text-error"
+							style="font-size: 26rpx;margin-left: 10rpx;">结算失败</text>
+						<text v-if="item.withdrawStatus == 'FAIL'" @click.stop="toast(item.failReason)"
+							class="cuIcon-question text-error u-m-l-4"></text>
 					</view>
-				</navigator>
-			</mescroll>
-		</view>
-		
-		<view class="center flex-direction" style="width: 100%;margin-top: 180rpx;" v-show="stateCurrent==1">
-			<u-empty text="暂无数据" src="/static/icon/empty5.png" icon-size="260"></u-empty>
+				</view>
+			</navigator>
 		</view>
-		
-		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params"  @confirm="confirmTime">
+
+		<toast ref="toast"></toast>
+		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params" @confirm="confirmTime">
 		</u-picker>
-	</view>
+	</mescroll>
 </template>
 
 <script>
@@ -92,10 +130,10 @@
 		},
 		props: {
 			type: Number,
-			dataInfo:Object
 		},
 		data() {
 			return {
+				dataInfo: {},
 				stateCurrent: 0, //默认
 				statusList: [{
 						name: '收入',
@@ -141,11 +179,27 @@
 		},
 		created() {
 			this.defaultTime = this.$dateTime.format(new Date(), 'YYYY-mm')
+			this.queryBalance()
 		},
 		methods: {
-			queryBalance(){
-				this.$api.yeepay.queryBalance({merchant:this.vuex_merchantNo}).then(res=>{
-					console.log(res);
+			toast(msg) {
+				console.log(msg);
+				this.$refs.toast.toast(msg)
+			},
+			jump() {
+				let params = {
+					type: 'BALANCE_WITHDRAW',
+					canWithDraw: this.dataInfo.availableNum,
+				}
+				uni.navigateTo({
+					url: "/pages/withdraw/withdraw" + this.$u.queryParams(params)
+				})
+			},
+			queryBalance() {
+				this.$api.shopTrade.balanceQuery({
+					shopId: this.vuex_shopId
+				}).then(res => {
+					this.dataInfo = res.data
 				})
 			},
 			mescrollInit(mescroll) {
@@ -159,14 +213,34 @@
 				this.defaultTime = e.year + '-' + e.month
 				this.mescroll.resetUpScroll();
 			},
-			upCallback(mescroll) {
+			fetchOutcome(mescroll) {
+				let params = {
+					current: mescroll.num,
+					size: mescroll.size,
+					ownerype: '商户',
+					ownerId: this.vuex_shopId,
+					type: 'BALANCE_WITHDRAW'
+				}
+				try {
+					this.$api.withdraw.list(params).then(res => {
+						let data = res.data.records
+						let total = res.data.total
+						mescroll.endBySize(data.length, total);
+						if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list = this.list.concat(data); //追加新数据
+					})
+				} catch (e) {
+					this.mescroll.endErr()
+				}
+			},
+			fetchIncome(mescroll) {
 				console.log("balance");
 				let params = {
 					receiveId: this.vuex_shopId,
 					current: mescroll.num,
 					size: mescroll.size,
 					payStatus: this.$global.PAY_STATUS.SUCCESS,
-					billType:'price'
+					billType: 'price'
 				}
 				if (this.defaultTime) {
 					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
@@ -185,6 +259,13 @@
 					this.mescroll.endErr()
 				}
 			},
+			upCallback(mescroll) {
+				if (this.stateCurrent == 0) {
+					this.fetchIncome(mescroll)
+				} else {
+					this.fetchOutcome(mescroll)
+				}
+			},
 			downCallback() {
 				setTimeout(() => {
 					this.mescroll.resetUpScroll();
@@ -316,4 +397,39 @@
 		font-weight: 500;
 		color: #999999;
 	}
+
+	.card {
+		display: flex;
+		justify-content: space-between;
+		background-color: #FFFFFF;
+		padding: 30rpx 50rpx;
+
+		.desc {
+			color: #b2b2b2;
+			font-size: 24rpx;
+			font-weight: 400;
+		}
+
+		.left {
+			display: flex;
+			flex-direction: column;
+
+			.title {
+				font-size: 32rpx;
+				color: #2a2a2a;
+			}
+		}
+
+		.right {
+			display: flex;
+			flex-direction: column;
+
+			.value {
+				text-align: right;
+				font-size: 36rpx;
+				color: #FF9447;
+			}
+
+		}
+	}
 </style>

+ 45 - 33
pages/my-bills/comps/bills.vue

@@ -1,27 +1,28 @@
 <template>
-	<view class="" style="height: 100vh;">
+	<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
+		@init="mescrollInit">
 		<view class="head_box u-flex u-row-center u-col-center">
 			<view class="card-box">
 				<view class="card-head u-flex u-col-center">
 					<view class="card-title u-m-r-10">总资产(元)</view>
 					<view class="u-iconfont uicon-eye" style="color: #fff;font-size: 50rpx;"></view>
 				</view>
-				<view class="money-num u-p-t-50">{{dataInfo.totalAssets}}</view>
-		
+				<view class="money-num u-p-t-50">{{dataInfo.totalAssets || 0}}</view>
+
 				<view class="padding-top-40 text-white text-df">
-					<text class="price">总收益:{{dataInfo.totalRevenue}}</text>
-					<text class="margin-left-30 price">今日收益:{{dataInfo.todayRevenue}}</text>
+					<text class="price">总收益:{{dataInfo.totalRevenue || 0}}</text>
+					<text class="margin-left-30 price">今日收益:{{dataInfo.todayRevenue || 0}}</text>
 				</view>
 			</view>
 		</view>
-		
-		<view  class="flex justify-between" style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
+
+		<view class="flex justify-between" style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
 			<view class="flex" @click.stop="showTime = true">
 				<view class="bg-white cu-btn round margin-30 sm">
 					<text>{{defaultTime}}</text>
 					<text class="cuIcon-triangledownfill text-gray" style="font-size: 50rpx;"></text>
 				</view>
-				<view class="total-box">收入¥0.00 支出¥0.00</view>
+				<!-- <view class="total-box">收入¥0.00 支出¥0.00</view> -->
 			</view>
 			<view @click="$jump('/pages/statistics/statistics')" class="center margin-right-30">
 				统计
@@ -41,31 +42,44 @@
 				</view>
 			</view>
 		</view>
+		<view class="bg-white safe-area-inset-bottom" style="height: 100%;">
 
-		<view class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
-			<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
-				@init="mescrollInit">
-				<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex" v-for="(item,index) in list" :key="index">
-					<view class="area1">
-						<image :src="item.avatar?item.avatar:'/static/icon/avatar.png'" mode=""></image>
-						<view>
-							<text>{{item.nickName || '用户支付'}}</text>
-							<text>{{item.createTime}}</text>
-						</view>
-					</view>
-					<view class="area2">
-						<text>{{item.discount==-1 || item.discount==0?'无折扣':item.discount +'折'}}</text>
-					</view>
-					<view class="area3">
-						<text class="text-base price" v-if="$isNotEmpty(item.receiveNumTotal)">{{item.receiveNumTotal}}</text>
-						<text class="text-base price" v-else>{{item.cost || 0}}</text>
+			<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex"
+				v-for="(item,index) in list" :key="index">
+				<view class="area1">
+					<image v-if="$isNotEmpty(item.avatar)" :src="item.avatar"></image>
+					<block v-else>
+						<image v-if="item.payWay=='WECHAT'" src="@/static/icon/wx.png"></image>
+						<image v-else-if="item.payWay=='ALIPAY'" src="@/static/icon/ALIPAY.png"></image>
+						<image v-else-if="item.payWay=='UNIONPAY'" src="@/static/icon/UNIONPAY.png"></image>
+						<image v-else-if="item.payWay=='APPLEPAY'" src="@/static/icon/apple.png"></image>
+						<image v-else src="@/static/icon/avatar.png"></image>
+					</block>
+					<view>
+						<text v-if="$isNotEmpty(item.nickName)">{{item.nickName}}</text>
+						<block v-else>
+							<text v-if="item.payWay=='WECHAT'">微信用户</text>
+							<text v-else-if="item.payWay=='ALIPAY'">支付宝用户</text>
+							<text v-else-if="item.payWay=='UNIONPAY'">银联用户</text>
+							<text v-else-if="item.payWay=='APPLEPAY'">苹果用户</text>
+							<text v-else>用户昵称</text>
+						</block>
+						<text>{{item.createTime}}</text>
 					</view>
-				</navigator>
-			</mescroll>
+				</view>
+				<view class="area2">
+					<text>{{item.discount==-1 || item.discount==0 || item.discount==1?'无折扣':item.discount +'折'}}</text>
+				</view>
+				<view class="area3">
+					<text class="text-base price"
+						v-if="$isNotEmpty(item.receiveNumTotal)">{{item.receiveNumTotal}}</text>
+					<text class="text-base price" v-else>{{item.cost || 0}}</text>
+				</view>
+			</navigator>
 		</view>
-		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params"  @confirm="confirmTime">
+		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params" @confirm="confirmTime">
 		</u-picker>
-	</view>
+	</mescroll>
 </template>
 
 <script>
@@ -76,7 +90,7 @@
 		},
 		props: {
 			type: Number,
-			dataInfo:Object
+			dataInfo: Object
 		},
 		data() {
 			return {
@@ -146,9 +160,7 @@
 					payStatus: this.$global.PAY_STATUS.SUCCESS,
 				}
 				if (this.defaultTime) {
-					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
-				} else {
-					params.createTime = this.$dateTime.format(new Date())
+					params.format = this.defaultTime
 				}
 				try {
 					this.$api.bills.list(params).then(res => {

+ 1 - 1
pages/my-bills/comps/channel-point-bill.vue

@@ -1,5 +1,5 @@
 <template>
-	<view class="" style="height: 100vh;">
+	<view class="" >
 		<view class="head_box u-flex u-row-center u-col-center">
 			<view class="card-box">
 				<view class="card-head u-flex u-col-center">

+ 132 - 32
pages/my-bills/comps/point-bills.vue

@@ -1,5 +1,6 @@
 <template>
-	<view class="" style="height: 100vh;">
+	<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
+		@init="mescrollInit">
 		<view class="head_box u-flex u-row-center u-col-center">
 			<view class="card-box">
 				<view class="card-head u-flex u-col-center">
@@ -12,12 +13,13 @@
 					<text class="price">总收益:{{dataInfo.totalPoint}}</text>
 					<text class="margin-left-30 price">今日收益:{{dataInfo.todayPoint}}</text>
 				</view>
-				<button  @click="$jump('/pages/withdraw/withdraw')" class="u-reset-button withdraw-btn">提现</button>
+				<button @click="jump" class="u-reset-button withdraw-btn">提现</button>
 			</view>
 		</view>
 
-		<view @click.stop="showTime = true" class="flex justify-between" style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
-			
+		<view @click.stop="showTime = true" class="flex justify-between"
+			style="font-size: 24rpx;color: #666666;background-color: #f6f6f6;">
+
 			<view class="flex">
 				<view class="bg-white cu-btn round margin-30 sm">
 					<text>{{defaultTime}}</text>
@@ -25,7 +27,7 @@
 				</view>
 				<!-- <view class="total-box">收入¥0.00 支出¥0.00</view> -->
 			</view>
-			
+
 			<!-- <view class="center margin-right-30">
 				统计
 				<text class="cuIcon-right"></text>
@@ -53,34 +55,56 @@
 				</view>
 			</view>
 		</u-sticky>
-		<view v-show="stateCurrent==0"  class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
-			<mescroll :down="downOption" :up="upOption" @up="upCallback" :fixed="false" @down="downCallback"
-				@init="mescrollInit">
-				<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex" v-for="(item,index) in list" :key="index">
-					<view class="area1">
-						<image :src="item.avatar?item.avatar:'/static/icon/avatar.png'" mode=""></image>
-						<view>
-							<text>{{item.nickName || '用户支付'}}</text>
-							<text>{{item.createTime}}</text>
-						</view>
+		<view v-show="stateCurrent==0" class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
+			<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex"
+				v-for="(item,index) in list" :key="index">
+				<view class="area1">
+					<image :src="item.avatar?item.avatar:'/static/icon/avatar.png'" mode=""></image>
+					<view>
+						<text>{{item.nickName || '用户支付'}}</text>
+						<text>{{item.createTime}}</text>
 					</view>
-					<view class="area2">
-						<text>{{item.discount==-1 || item.discount==0?'无折扣':item.discount +'折'}}</text>
+				</view>
+				<view class="area2">
+					<text>{{item.discount==-1 || item.discount==0?'无折扣':item.discount +'折'}}</text>
+				</view>
+				<view class="area3">
+					<text class="text-base price plus">{{item.balanceNum || 0}}</text>
+				</view>
+			</navigator>
+		</view>
+
+		<view v-show="stateCurrent==1" class="bg-white safe-area-inset-bottom tabsClass" style="height: 100%;">
+			<navigator :url="'/pages/withdraw/detail?id='+item.id" class="card u-border-bottom"
+				v-for="(item,index) in list" :key="index">
+				<view class="left">
+					<view class="margin-bottom-20 flex">
+						<text class="text-bold" style="font-size: 32rpx;">积分提现</text>
 					</view>
-					<view class="area3">
-						<text class="text-base price plus">{{item.balanceNum || 0}}</text>
+					<text class="desc">{{item.createTime}}</text>
+				</view>
+				<view class="right center text-base">
+					<view v-if="item.withdrawStatus == 'DONE'" class="value" style="margin-bottom: 10rpx;">
+						<text>-</text>
+						<text class="" style="margin: 0 4rpx;">{{item.price}}</text>
+						<text class="text-sm">元</text>
 					</view>
-				</navigator>
-			</mescroll>
-		</view>
-		
-		<view class="center flex-direction" style="width: 100%;margin-top: 180rpx;" v-show="stateCurrent==1">
-			<u-empty text="暂无数据" src="/static/icon/empty5.png" icon-size="260"></u-empty>
+					<view v-else class="text-sm">
+						<text v-if="item.withdrawStatus == 'WAITING'" class="text-warn"
+							style="font-size: 26rpx;margin-left: 10rpx;">处理中</text>
+						<text v-if="item.withdrawStatus == 'FAIL'" class="text-error"
+							style="font-size: 26rpx;margin-left: 10rpx;">提现失败</text>
+						<text v-if="item.withdrawStatus == 'FAIL'" @click.stop="toast(item.failReason)"
+							class="cuIcon-question text-error u-m-l-4"></text>
+					</view>
+				</view>
+			</navigator>
 		</view>
-		
-		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params"  @confirm="confirmTime">
+
+		<toast ref="toast"></toast>
+		<u-picker confirm-color="#EF9944" v-model="showTime" mode="time" :params="params" @confirm="confirmTime">
 		</u-picker>
-	</view>
+	</mescroll>
 </template>
 
 <script>
@@ -91,7 +115,7 @@
 		},
 		props: {
 			type: Number,
-			dataInfo:Object
+			dataInfo: Object
 		},
 		data() {
 			return {
@@ -142,6 +166,18 @@
 			this.defaultTime = this.$dateTime.format(new Date(), 'YYYY-mm')
 		},
 		methods: {
+			toast(msg) {
+				this.$refs.toast.toast(msg)
+			},
+			jump() {
+				let params = {
+					type: 'POINT_WITHDRAW',
+					canWithDraw: this.dataInfo.point,
+				}
+				uni.navigateTo({
+					url: "/pages/withdraw/withdraw" + this.$u.queryParams(params)
+				})
+			},
 			mescrollInit(mescroll) {
 				this.mescroll = mescroll
 			},
@@ -153,14 +189,13 @@
 				this.defaultTime = e.year + '-' + e.month
 				this.mescroll.resetUpScroll();
 			},
-			upCallback(mescroll) {
-				console.log("balance");
+			fetchIncome(mescroll) {
 				let params = {
 					receiveId: this.vuex_shopId,
 					current: mescroll.num,
 					size: mescroll.size,
 					payStatus: this.$global.PAY_STATUS.SUCCESS,
-					billType:'balanceNum'
+					billType: 'balanceNum'
 				}
 				if (this.defaultTime) {
 					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
@@ -179,6 +214,34 @@
 					this.mescroll.endErr()
 				}
 			},
+			fetchOutcome(mescroll) {
+				let params = {
+					current: mescroll.num,
+					size: mescroll.size,
+					ownerype: '商户',
+					ownerId: this.vuex_shopId,
+					type: 'POINT_WITHDRAW'
+				}
+				try {
+					this.$api.withdraw.list(params).then(res => {
+						let data = res.data.records
+						let total = res.data.total
+						mescroll.endBySize(data.length, total);
+						if (mescroll.num == 1) this.list = []; //如果是第一页需手动制空列表
+						this.list = this.list.concat(data); //追加新数据
+					})
+				} catch (e) {
+					this.mescroll.endErr()
+				}
+
+			},
+			upCallback(mescroll) {
+				if (this.stateCurrent == 0) {
+					this.fetchIncome(mescroll)
+				} else {
+					this.fetchOutcome(mescroll)
+				}
+			},
 			downCallback() {
 				setTimeout(() => {
 					this.mescroll.resetUpScroll();
@@ -310,4 +373,41 @@
 		font-weight: 500;
 		color: #999999;
 	}
+
+
+
+	.card {
+		display: flex;
+		justify-content: space-between;
+		background-color: #FFFFFF;
+		padding: 30rpx 50rpx;
+
+		.desc {
+			color: #b2b2b2;
+			font-size: 24rpx;
+			font-weight: 400;
+		}
+
+		.left {
+			display: flex;
+			flex-direction: column;
+
+			.title {
+				font-size: 32rpx;
+				color: #2a2a2a;
+			}
+		}
+
+		.right {
+			display: flex;
+			flex-direction: column;
+
+			.value {
+				text-align: right;
+				font-size: 36rpx;
+				color: #FF9447;
+			}
+
+		}
+	}
 </style>

+ 354 - 0
pages/publish/publish-old.vue

@@ -0,0 +1,354 @@
+<template>
+	<view>
+		<my-bar title="发布活动" :transparent="transparent">
+			<view slot="content" class="publish" @click="cropperSelect()">
+				<block v-if="!form.poster">
+					<u-icon name="photo" size="100" color="#cecece"></u-icon>
+					<text>上传活动封面</text>
+				</block>
+				<image :src="form.poster" style="height: 380rpx;" v-else mode="heightFix"></image>
+			</view>
+		</my-bar>
+
+		<view class="clock">
+			<!-- <view class="cu-btn round sm" style="background-color: #dcdcdc;">
+				<u-icon name="clock"></u-icon>
+				<text class="margin-left-10">设置响应倒计时</text>
+			</view>
+			<view class="tips">
+				<text>*</text>
+				<text>如未在限定时间内响应,系统默认自动推送给旗下商户。</text>
+			</view> -->
+		</view>
+
+		<view class="form">
+			<u-form :model="form" :error-type="['message']" :rules="rules" ref="uForm" label-width="140">
+				<u-form-item prop="title" label="标题" left-icon="bookmark">
+					<u-input v-model="form.title" placeholder="请输入标题" />
+				</u-form-item>
+				<u-form-item prop="supplyPrice" label-width="200" label="活动折扣" left-icon="rmb-circle">
+					<u-input v-model="form.discount" placeholder="请输入活动折扣(如:输入9,表示9折)" />
+				</u-form-item>
+				<u-form-item @click="showCheckBox" label-width="200" label="行业类目" left-icon="grid">
+					<view @click="checkboxShow=true" class="flex justify-between ">
+						<view class="u-flex u-flex-wrap">
+							<view v-if="!checkboxList.some((i)=>{return i.checked==true})" style="color: #c0c4cc;">请选择
+							</view>
+							<view v-for="(item, index) in checkboxList" :key="index">
+								<view v-if="item.checked" style="margin-right: 10rpx;">{{ item.dictKey }}</view>
+							</view>
+						</view>
+						<view>
+							<u-icon name="arrow-right" color="#737373"></u-icon>
+						</view>
+					</view>
+				</u-form-item>
+
+				<u-form-item prop="beginTime" label="开始时间" left-icon="clock" label-width="180">
+					<u-input type="select" @click="timeShow=true;timeType=1" v-model="form.beginTime"
+						placeholder="请选择开始时间" />
+				</u-form-item>
+				<u-form-item prop="endTime" label="结束时间" left-icon="clock" label-width="180">
+					<u-input type="select" @click="timeShow=true;timeType=2" v-model="form.endTime"
+						placeholder="请选择结束时间" />
+				</u-form-item>
+			</u-form>
+		</view>
+
+		<view class="form">
+			<u-form label-position="top" label-width="160">
+				<u-form-item label-width="200" label="活动详情" left-icon="coupon">
+					<u-input type="area" height="200" v-model="form.intro" placeholder="请输入活动详情" />
+				</u-form-item>
+			</u-form>
+		</view>
+
+		<view class="center" style="margin: 50rpx 0;">
+			<view @click="publish" class="flex flex-direction" style="width: 94%;">
+				<view class="radius cu-btn btn-bg-color" style="height: 90rpx;">
+					提交审核
+				</view>
+				<view class="text-center margin-top-20">
+					<text>提交即表示同意</text>
+					<text class="btn-color" @click="protocol">《联兑通商家联营协议》</text>
+				</view>
+			</view>
+		</view>
+
+		<u-popup v-model="checkboxShow" mode="bottom" height="50%" border-radius="12">
+			<view class="padding-30">
+				<u-checkbox-group>
+					<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in checkboxList"
+						:key="index" :name="index">
+						{{ item.dictKey }}
+					</u-checkbox>
+				</u-checkbox-group>
+			</view>
+		</u-popup>
+
+		<cropper ref="cropper" selWidth="800rpx" selHeight="400rpx" @upload="cropperCondirm" :avatarSrc="form.pic"
+			avatarStyle="width:100vw;height:100vw;">
+		</cropper>
+		<u-picker confirm-color="#EF9944" v-model="timeShow" mode="time" @confirm="timeConfirm" :params="params">
+		</u-picker>
+	</view>
+</template>
+
+<script>
+	import myBar from "@/components/my-bar.vue"
+	export default {
+		components: {
+			myBar
+		},
+		data() {
+			return {
+				transparent: 0,
+				form: {
+					poster: '',
+					title: '',
+					discount: '',
+					labelKey: '',
+					beginTime: '',
+					endTime: '',
+					intro: '',
+					launchType: this.$global.SHOP,
+					launchId: this.vuex_shopId,
+					mallId: this.vuex_mallId,
+
+					labelParentIds: '',
+					labelJson: '',
+					labelKey: '',
+					labelValue: '',
+					processDefinitionId: ''
+				},
+
+				checkboxShow: false,
+				timeShow: false,
+				timeType: 1,
+				params: {
+					year: true,
+					month: true,
+					day: true,
+					hour: true,
+					minute: true,
+					second: true
+				},
+				checkboxList: [],
+
+
+				rules: {
+					title: [{
+						required: true,
+						message: '请输入标题',
+						trigger: ['blur', 'change']
+					}],
+					beginTime: [{
+						required: true,
+						message: '请选择开始时间',
+						trigger: 'change',
+					}],
+					endTime: [{
+						required: true,
+						message: '请选择结束时间',
+						trigger: 'change',
+					}],
+					discount: [{
+						required: true,
+						message: '请输入建议供应价',
+						trigger: ['blur', 'change']
+					}],
+
+					//裁剪框宽度
+					rectWidth: 200,
+					//裁剪框高度
+					rectHeight: 200
+				}
+			}
+		},
+		onPageScroll(obj) {
+			this.transparent = obj.scrollTop * 0.006;
+		},
+		onReady() {
+			this.getElInfo()
+			this.$refs.uForm.setRules(this.rules);
+		},
+		onLoad() {
+			uni.$on('uAvatarCropper', (path) => {
+				this.$api.uploadFile(path).then(res => {
+					this.form.poster = res.data.link
+				})
+			})
+
+			this.form.launchId = this.vuex_shopId
+			this.form.mallId = this.vuex_mallId
+
+			this.getTagSelect()
+			this.getProcessDefinitionId()
+		},
+		methods: {
+			//获取发布活动流程id
+			getProcessDefinitionId() {
+				let params = {
+					category: 'flow_4',
+					mode: 1
+				}
+				this.$api.flow.getProcessDefinitionId(params).then(res => {
+					this.form.processDefinitionId = res.data.records[0].id
+					if (this.$isEmpty(this.form.processDefinitionId)) {
+						this.$dialog.showModalAndBack("系统错误,获取流程主键失败")
+						return
+					}
+				})
+			},
+			protocol() {
+				uni.navigateTo({
+					url: "/pages/webView/webView?url=" + this.$global.publishActivity
+				})
+			},
+			async getElInfo() {
+				let rectInfo = await this.$u.getRect('.publish');
+				let scale = rectInfo.height / rectInfo.width
+				this.rectWidth = parseInt(this.$u.sys().windowWidth - 20)
+				this.rectHeight = parseInt(this.rectWidth * scale)
+			},
+			//图片裁剪
+			cropperSelect() {
+				let params = {
+					destWidth: this.rectWidth,
+					destHeight: this.rectHeight,
+					rectWidth: this.rectWidth,
+					rectHeight: this.rectHeight,
+					fileType: 'jpg',
+				}
+				console.log(params);
+				uni.navigateTo({
+					url: "../image-cropper/image-cropper" + this.$u.queryParams(params)
+				})
+			},
+			//显示多选框
+			showCheckBox() {
+				this.checkboxShow = true
+			},
+			//时间回调
+			timeConfirm(e) {
+				console.log(e);
+				let date = e.year + '-' + e.month + '-' + e.day + ' ' + e.hour + ':' + e.minute + ':' + e.second
+				if (this.timeType == 1) {
+					this.form.beginTime = date
+				} else {
+					this.form.endTime = date
+				}
+			},
+			//获取多选的标签
+			getTagSelect() {
+				let params = {
+					current: 1,
+					size: 50,
+					code: 'business_label',
+					parentId: '1430415753412112385'
+				}
+				this.$api.dict.getTagSelect(params).then(res => {
+					res.data.forEach(item => {
+						item.checked = false
+					})
+					this.checkboxList = res.data
+				})
+			},
+			//多选确认
+			checkboxChange(e) {
+				this.checkboxList[e.name].checked = e.value
+				this.$forceUpdate()
+			},
+			//确认发布
+			publish() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						this.doPublish()
+					} else {
+						console.log('验证失败');
+					}
+				});
+			},
+			doPublish() {
+				if (!this.form.poster) {
+					this.$u.toast('请上传封面图')
+					return
+				}
+				let tmpList = this.checkboxList.filter(item => item.checked == true)
+				let labelParentIds = new Set(tmpList.map(item => item.parentId))
+				this.form.labelParentIds = Array.from(new Set(tmpList.map(item => item.parentId))).join(',')
+				this.form.labelJson = JSON.stringify(tmpList)
+				this.form.labelKey = tmpList.map(item => item.dictKey).join(',')
+				this.form.labelValue = tmpList.map(item => item.id).join(',')
+				if (!this.form.labelValue) {
+					this.$u.toast('请选择行业类目')
+					return
+				}
+				let params = this.$u.deepClone(this.form)
+				params.discount = this.$digital.floatMul(this.form.discount, 0.1)
+
+				this.$api.activity.publish(params).then(res => {
+					if (res.success) {
+						let params = {
+							path: '/pages/index/index',
+							title: '活动发布成功,请耐心等待审核'
+						}
+						uni.redirectTo({
+							url: '/pages/login/submit-success?params=' + JSON.stringify(params)
+						})
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.publish {
+		overflow: hidden;
+		border-radius: 10rpx;
+		height: 380rpx;
+		background-color: #f2f2f2;
+		position: absolute;
+		bottom: 20rpx;
+		left: 0;
+		right: 0;
+		width: 92%;
+		margin: 0 auto -120rpx;
+
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+
+		text {
+			font-size: 26rpx;
+			color: #797979;
+		}
+	}
+
+	.clock {
+		background-color: #FFFFFF;
+		// height: 230rpx;
+		height: 130rpx;
+		padding-bottom: 20rpx;
+
+		display: flex;
+		flex-direction: column;
+		justify-content: flex-end;
+		align-items: center;
+
+		.tips {
+			margin-top: 10rpx;
+			font-size: 24rpx;
+			color: #FF9447;
+		}
+	}
+
+	.form {
+		margin-top: 15rpx;
+		background-color: #FFFFFF;
+		padding: 30rpx;
+		border-radius: 10rpx;
+	}
+</style>

+ 198 - 275
pages/publish/publish.vue

@@ -1,349 +1,272 @@
-<template>
-	<view>
-		<my-bar title="发布活动" :transparent="transparent">
-			<view slot="content" class="publish" @click="cropperSelect()">
-				<block v-if="!form.poster">
-					<u-icon name="photo" size="100" color="#cecece"></u-icon>
-					<text>上传活动封面</text>
-				</block>
-				<image :src="form.poster" style="height: 380rpx;" v-else mode="heightFix"></image>
-			</view>
-		</my-bar>
-
-		<view class="clock">
-			<!-- <view class="cu-btn round sm" style="background-color: #dcdcdc;">
-				<u-icon name="clock"></u-icon>
-				<text class="margin-left-10">设置响应倒计时</text>
-			</view>
-			<view class="tips">
-				<text>*</text>
-				<text>如未在限定时间内响应,系统默认自动推送给旗下商户。</text>
-			</view> -->
+	<template>
+	<view class="margin-20">
+		<view @click="cropperSelect()" v-if="$isEmpty(form.poster)" class="cover center"
+			style="flex-direction: column;">
+			<text class="cuIcon-roundaddfill text-base" style="font-size: 70rpx;"></text>
+			<text style="margin-top: 10rpx;">请上传活动封面</text>
+		</view>
+		<view @click="cropperSelect()" v-else class="center">
+			<image class="shadow" mode="aspectFill" style="height: 340rpx;width: 95%;border-radius: 12rpx;" :src="form.poster">
+			</image>
 		</view>
+		<view class="content">
+			<view class="margin-top-10">
+				<text class="cuIcon-titles" style="color: #EF9944;"></text>
+				<text class="title">活动主题</text>
+				<view class="solid-bottom" style="padding: 20rpx 0;">
+					<u-input v-model="form.title" placeholder-style="color: #d8d8d8;" placeholder="请输入活动主题" />
+				</view>
+			</view>
 
-		<view class="form">
-			<u-form :model="form" :error-type="['message']" :rules="rules" ref="uForm" label-width="140">
-				<u-form-item prop="title" label="标题" left-icon="bookmark">
-					<u-input v-model="form.title" placeholder="请输入标题" />
-				</u-form-item>
-				<u-form-item prop="supplyPrice" label-width="200" label="活动折扣" left-icon="rmb-circle">
-					<u-input v-model="form.discount" placeholder="请输入活动折扣(如:输入9,表示9折)" />
-				</u-form-item>
-				<u-form-item  @click="showCheckBox" label-width="200" label="行业类目" left-icon="grid">
-					<view @click="checkboxShow=true" class="flex justify-between ">
-						<view class="u-flex u-flex-wrap">
-							<view v-if="!checkboxList.some((i)=>{return i.checked==true})" style="color: #c0c4cc;">请选择</view>
-							<view v-for="(item, index) in checkboxList" :key="index" >
-								<view v-if="item.checked" style="margin-right: 10rpx;">{{ item.dictKey }}</view>
+			<view class="margin-top-30">
+				<view class="title margin-left-10">
+					<text>活动折扣</text>
+					<text class="text-sm text-base margin-left-10" style="font-weight: 400;">({{desc}})</text>
+				</view>
+				<view class="solid-bottom" style="padding:60rpx 40rpx">
+					<u-slider height="10" v-model="value" active-color="#EF9944" :use-slot="true">
+						<view class="">
+							<view class="">
+								<view class="badge-button" style="display: flex;">
+									<text>{{value / 10}}</text>
+								</view>
 							</view>
 						</view>
-						<view>
-							<u-icon name="arrow-right" color="#737373"></u-icon>
-						</view>
-					</view>
-				</u-form-item>
-
-				<u-form-item prop="beginTime" label="开始时间" left-icon="clock" label-width="180">
-					<u-input type="select" @click="timeShow=true;timeType=1" v-model="form.beginTime"
-						placeholder="请选择开始时间" />
-				</u-form-item>
-				<u-form-item prop="endTime" label="结束时间" left-icon="clock" label-width="180">
-					<u-input type="select" @click="timeShow=true;timeType=2" v-model="form.endTime"
-						placeholder="请选择结束时间" />
-				</u-form-item>
-			</u-form>
-		</view>
-
-		<view class="form">
-			<u-form label-position="top" label-width="160">
-				<u-form-item label-width="200" label="活动详情" left-icon="coupon">
-					<u-input type="area" height="200" v-model="form.intro" placeholder="请输入活动详情" />
-				</u-form-item>
-			</u-form>
-		</view>
+					</u-slider>
+				</view>
+			</view>
 
-		<view class="center" style="margin: 50rpx 0;">
-			<view @click="publish" class="flex flex-direction" style="width: 94%;">
-				<view class="radius cu-btn btn-bg-color" style="height: 90rpx;">
-					提交审核
+			<view class="margin-top-30">
+				<text class="title margin-left-10">活动时间</text>
+				<view class="solid-bottom flex" style="padding: 20rpx 0;">
+					<u-input input-align="center" placeholder-style="color: #d8d8d8;" disabled
+						@click="timeShow=true;timeType=1" v-model="form.beginTime" placeholder="开始时间" />
+					<view class="center" style="padding: 0 50rpx;">至</view>
+					<u-input input-align="center" placeholder-style="color: #d8d8d8;" disabled
+						@click="timeShow=true;timeType=2" v-model="form.endTime" placeholder="结束时间" />
 				</view>
-				<view class="text-center margin-top-20">
-					<text>提交即表示同意</text>
-					<text class="btn-color" @click="protocol">《联兑通商家联营协议》</text>
+			</view>
+
+			<view class="margin-top-30">
+				<text class="title margin-left-10">活动详情</text>
+				<view class="" style="padding: 20rpx 0;">
+					<u-input :custom-style="{'lineHeight':'46rpx'}" maxlength="150" :clearable="false"
+						input-align="left" :border="true" border-color="#f4f4f4" placeholder-style="color: #d8d8d8;"
+						height="400" type="textarea" placeholder="请输入活动详情" v-model="form.intro" />
+					<view class="text-right text-sm text-gray padding-right-20" style="margin-top: -40rpx;">
+						<text>{{form.intro.length}}/150</text>
+					</view>
 				</view>
 			</view>
 		</view>
 
-		<u-popup v-model="checkboxShow" mode="bottom" height="50%" border-radius="12">
-			<view class="padding-30">
-				<u-checkbox-group>
-					<u-checkbox @change="checkboxChange" v-model="item.checked" v-for="(item, index) in checkboxList"
-						:key="index" :name="index">
-						{{ item.dictKey }}
-					</u-checkbox>
-				</u-checkbox-group>
+
+		<view class="center flex-direction" style="margin: 60rpx;">
+			<view class="text-center margin-bottom-20 text-gray text-sm">
+				<text>提交即表示同意</text>
+				<text class="btn-color" @click="protocol">《联兑通商家联营协议》</text>
+			</view>
+			<view @click="publish" class="cu-btn flex  text-lg btn-bg-color radius"
+				style="padding: 42rpx 0;width: 100%;">
+				提交审核
 			</view>
-		</u-popup>
+		</view>
 
-		<cropper ref="cropper" selWidth="800rpx" selHeight="400rpx" @upload="cropperCondirm" :avatarSrc="form.pic"
-			avatarStyle="width:100vw;height:100vw;">
-		</cropper>
-		<u-picker confirm-color="#EF9944" v-model="timeShow" mode="time" @confirm="timeConfirm" :params="params"></u-picker>
+		<toast ref="toast"></toast>
+		<u-picker confirm-color="#EF9944" v-model="timeShow" mode="time" @confirm="timeConfirm" :params="params">
+		</u-picker>
 	</view>
 </template>
 
 <script>
-	import myBar from "@/components/my-bar.vue"
 	export default {
-		components: {
-			myBar
-		},
+		components: {},
 		data() {
 			return {
-				transparent: 0,
+				desc: '',
+				value: 90,
+
 				form: {
 					poster: '',
 					title: '',
 					discount: '',
-					labelKey:'',
 					beginTime: '',
 					endTime: '',
 					intro: '',
-					launchType:this.$global.SHOP,
-					launchId:this.vuex_shopId,
-					mallId:this.vuex_mallId,
-					
-					labelParentIds:'',
-					labelJson:'',
-					labelKey:'',
-					labelValue:'',
-					processDefinitionId:''
+					launchType: this.$global.SHOP,
+					launchId: this.vuex_shopId,
+					mallId: this.vuex_mallId,
+					processDefinitionId: ''
 				},
-
-				checkboxShow: false,
+				//发布时间
 				timeShow: false,
-				timeType: 1,
+				timeType: 0,
 				params: {
 					year: true,
 					month: true,
 					day: true,
-					hour: true,
-					minute: true,
-					second: true
+					hour: false,
+					minute: false,
+					second: false
 				},
-				checkboxList: [],
-
-
-				rules: {
-					title: [{
-						required: true,
-						message: '请输入标题',
-						trigger: ['blur', 'change']
-					}],
-					beginTime: [{
-						required: true,
-						message: '请选择开始时间',
-						trigger: 'change',
-					}],
-					endTime: [{
-						required: true,
-						message: '请选择结束时间',
-						trigger: 'change',
-					}],
-					discount: [{
-						required: true,
-						message: '请输入建议供应价',
-						trigger: ['blur', 'change']
-					}],
-					
-					//裁剪框宽度
-					rectWidth:200,
-					//裁剪框高度
-					rectHeight:200
-				}
-			}
-		},
-		onPageScroll(obj) {
-			this.transparent = obj.scrollTop * 0.006;
-		},
-		onReady() {
-			this.getElInfo()
-			this.$refs.uForm.setRules(this.rules);
+				//裁剪框宽度
+				rectWidth: 200,
+				//裁剪框高度
+				rectHeight: 200
+			};
 		},
 		onLoad() {
-			uni.$on('uAvatarCropper',(path)=>{
-				this.$api.uploadFile(path).then(res=>{
-					this.form.poster=res.data.link
-				})
-			})
-			
-			this.form.launchId=this.vuex_shopId
-			this.form.mallId=this.vuex_mallId
-			
-			this.getTagSelect()
+			this.init()
+			this.calcDiscount()
+			this.getCropperInfo()
 			this.getProcessDefinitionId()
 		},
+		watch:{
+			value(){
+				this.calcDiscount()
+			}
+		},
 		methods: {
-			//获取发布活动流程id
-			getProcessDefinitionId(){
-				let params={
-					category:'flow_4',
-					mode:1
-				}
-				this.$api.flow.getProcessDefinitionId(params).then(res=>{
-					this.form.processDefinitionId=res.data.records[0].id
-					if (this.$isEmpty(this.form.processDefinitionId)) {
-						this.$dialog.showModalAndBack("系统错误,获取流程主键失败")
-						return
-					}
-				})
+			calcDiscount() {
+				let data = this.value / 100
+				this.form.discount = data == 0 ? 1 : this.value / 100
+				this.desc = data == 0 || data == 1 ? '无折扣' : (this.value / 10) + '折'
 			},
-			protocol(){
-				uni.navigateTo({
-					url: "/pages/webView/webView?url=" + this.$global.publishActivity
-				})
-			},
-			async getElInfo() {
-				let rectInfo = await this.$u.getRect('.publish');
-				let scale=rectInfo.height/rectInfo.width
-				this.rectWidth=parseInt(this.$u.sys().windowWidth - 20)  
-				this.rectHeight=parseInt(this.rectWidth * scale)
-			},
-			//图片裁剪
-		   cropperSelect(){
-				let params={
-					destWidth:this.rectWidth,
-					destHeight:this.rectHeight,
-					rectWidth:this.rectWidth,
-					rectHeight:this.rectHeight,
-					fileType: 'jpg',
+			isCorrectDiscount() {
+				let data = parseFloat(this.form.discount)
+				if (Number.isFinite(data) && data >= 0.1 && data <= 1) {
+					return true
 				}
-				uni.navigateTo({
-					url:"../image-cropper/image-cropper"+this.$u.queryParams(params)
-				})
+				return false
 			},
-			//显示多选框
-			showCheckBox() {
-				this.checkboxShow = true
-			},
-			//时间回调
 			timeConfirm(e) {
 				console.log(e);
-				let date = e.year + '-' + e.month + '-' + e.day+ ' ' + e.hour+ ':' + e.minute+ ':' + e.second
+				let date = e.year + '-' + e.month + '-' + e.day
 				if (this.timeType == 1) {
 					this.form.beginTime = date
 				} else {
 					this.form.endTime = date
 				}
 			},
-			//获取多选的标签
-			getTagSelect(){
-				let params = {
-					current:1,
-					size:50,
-					code:'business_label',
-					parentId:'1430415753412112385'
-				}
-				this.$api.dict.getTagSelect(params).then(res => {
-					res.data.forEach(item => {
-						item.checked = false
-					})
-					this.checkboxList = res.data
-				})
-			},
-			//多选确认
-			checkboxChange(e) {
-				this.checkboxList[e.name].checked = e.value
-				this.$forceUpdate()
-			},
-			//确认发布
 			publish() {
-				this.$refs.uForm.validate(valid => {
-					if (valid) {
-						this.doPublish()
-					} else {
-						console.log('验证失败');
-					}
-				});
-			},
-			doPublish() {
-				if (!this.form.poster) {
-					this.$u.toast('请上传封面图')
+				if (!this.form.title) {
+					this.$refs.toast.warn('请上传活动封面')
+					return
+				}
+
+				if (!this.form.title) {
+					this.$refs.toast.warn('请输入活动标题')
+					return
+				}
+				if (!this.form.discount) {
+					this.$refs.toast.warn('请输入活动折扣')
+					return
+				}
+
+				if (!this.form.beginTime) {
+					this.$refs.toast.warn('请选择活动开始时间')
+					return
+				}
+				if (!this.form.endTime) {
+					this.$refs.toast.warn('请选择活动结束时间')
 					return
 				}
-				let tmpList = this.checkboxList.filter(item => item.checked == true)
-				let labelParentIds= new Set(tmpList.map(item=>item.parentId))
-				this.form.labelParentIds=Array.from(new Set(tmpList.map(item=>item.parentId))).join(',')
-				this.form.labelJson=JSON.stringify(tmpList)
-				this.form.labelKey = tmpList.map(item=>item.dictKey).join(',')
-				this.form.labelValue = tmpList.map(item=>item.id).join(',')
-				this.form.discount=this.$digital.floatMul(this.form.discount,0.1)
-				if (!this.form.labelValue) {
-					this.$u.toast('请选择行业类目')
+				if (!this.form.intro) {
+					this.$refs.toast.warn('请输入活动详情')
 					return
 				}
-				this.$api.activity.publish(this.form).then(res=>{
+				let params=this.$u.deepClone(this.form)
+				params.beginTime=this.$dateTime.format(new Date(params.beginTime))
+				params.endTime=this.$dateTime.format(new Date(params.endTime))
+				this.$api.activity.publish(params).then(res => {
 					if (res.success) {
-						let params={
-							path:'/pages/index/index',
-							title:'活动发布成功,请耐心等待审核'
+						let params = {
+							path: '/pages/index/index',
+							title: '活动发布成功,请耐心等待审核'
 						}
 						uni.redirectTo({
-							url:'/pages/login/submit-success?params='+JSON.stringify(params)
+							url: '/pages/login/submit-success?params=' + JSON.stringify(params)
 						})
 					}
 				})
-			}
+			},
+			protocol() {
+				uni.navigateTo({
+					url: "/pages/webView/webView?url=" + this.$global.publishActivity
+				})
+			},
+			//获取发布活动流程id
+			getProcessDefinitionId() {
+				let params = {
+					category: 'flow_4',
+					mode: 1
+				}
+				this.$api.flow.getProcessDefinitionId(params).then(res => {
+					this.form.processDefinitionId = res.data.records[0].id
+					if (this.$isEmpty(this.form.processDefinitionId)) {
+						this.$dialog.showModalAndBack("系统错误,获取流程主键失败")
+						return
+					}
+				})
+			},
+			init() {
+				uni.$on('uAvatarCropper', (path) => {
+					this.$api.uploadFile(path).then(res => {
+						this.form.poster = res.data.link
+					})
+				})
+				this.form.launchId = this.vuex_shopId
+				this.form.mallId = this.vuex_mallId
+			},
+			async getCropperInfo() {
+				let scale = 360 / 620
+				this.rectWidth = parseInt(this.$u.sys().windowWidth - 40)
+				this.rectHeight = parseInt(this.rectWidth * scale)
+			},
+			//图片裁剪
+			cropperSelect() {
+				let params = {
+					destWidth: this.rectWidth,
+					destHeight: this.rectHeight,
+					rectWidth: this.rectWidth,
+					rectHeight: this.rectHeight,
+					fileType: 'jpg',
+				}
+				console.log(params);
+				uni.navigateTo({
+					url: "/pages/image-cropper/image-cropper" + this.$u.queryParams(params)
+				})
+			},
 		}
-	}
+	};
 </script>
 
-<style lang="scss" scoped>
-	.publish {
-		overflow: hidden;
-		border-radius: 10rpx;
-		height: 380rpx;
-		background-color: #f2f2f2;
-		position: absolute;
-		bottom: 20rpx;
-		left: 0;
-		right: 0;
-		width: 92%;
-		margin: 0 auto -120rpx;
-
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		flex-direction: column;
 
-		text {
-			font-size: 26rpx;
-			color: #797979;
-		}
+<style lang="scss" scoped>
+	.cover {
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		height: 340rpx;
 	}
 
-	.clock {
+	.content {
+		margin-top: 20rpx;
 		background-color: #FFFFFF;
-		// height: 230rpx;
-		height: 130rpx;
-		padding-bottom: 20rpx;
-
-		display: flex;
-		flex-direction: column;
-		justify-content: flex-end;
-		align-items: center;
+		border-radius: 20rpx;
+		padding: 20rpx 30rpx;
 
-		.tips {
-			margin-top: 10rpx;
-			font-size: 24rpx;
-			color: #FF9447;
+		.title {
+			color: #010101;
+			font-size: 30rpx;
 		}
 	}
 
-	.form {
-		margin-top: 15rpx;
-		background-color: #FFFFFF;
-		padding: 30rpx;
+	.badge-button {
+		padding: 14rpx 16rpx;
+		background-color: $base-color;
+		color: #fff;
 		border-radius: 10rpx;
+		font-size: 22rpx;
+		line-height: 1;
 	}
 </style>

+ 32 - 22
pages/shop-info/shop-info.vue

@@ -66,7 +66,7 @@
 						</view>
 						<view class="border">
 							<u-form-item label="商户联系人手机号" prop="personTel" label-width="250">
-								<u-input placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
+								<u-input disabled placeholder="请输入联系方式" v-model="form.personTel" type="number"></u-input>
 							</u-form-item>
 						</view>
 						<view class="border">
@@ -286,11 +286,11 @@
 			</view>
 			<scroll-view v-if="!$isEmpty(mallList)" style="padding-top: 110rpx;height: 100%;" :scroll-y="true">
 				<view @click="selectMall(item)" hover-class="hoverClass"
-					:class="{'solid-bottom':bankCodeList.length!=(index+1)}  " class="text-center padding-30"
+					:class="{'solid-bottom':mallList.length!=(index+1)}  " class="text-center padding-30"
 					v-for="(item,index) in mallList" :key="index">
 					<text>{{item.mallName}}</text>
 				</view>
-				<u-divider fontSize="24" v-if="bankCodeList.length>=8" height="80">只显示8条数据,其余数据请搜索</u-divider>
+				<u-divider fontSize="24" v-if="mallList.length>=8" height="80">只显示8条数据,其余数据请搜索</u-divider>
 			</scroll-view>
 			<u-empty v-else name="search"></u-empty>
 		</u-popup>
@@ -314,20 +314,24 @@
 		</u-popup>
 		<u-select confirm-color="#EF9944" v-model="mallAreaShow" label-name="name" value-name="id" mode="single-column" :list="mallAreaList"
 			@confirm="mallAreaConfirm"></u-select>
-		<u-picker confirm-color="#EF9944" @confirm="regionConfirm" v-model="regionShow" mode="region"></u-picker>
+		<!-- 地区 -->
+		<!-- <u-picker confirm-color="#EF9944" @confirm="regionConfirm" v-model="regionShow" mode="region"></u-picker> -->
+		<city-select :defaultRegion="defaultRegion" v-model="regionShow" @city-change="regionConfirm"></city-select>
 		<!-- <u-select v-model="bankCodeShow"  :list="bankCodeList" @confirm="bankTypeConfirm"></u-select> -->
 		<u-select confirm-color="#EF9944" v-model="bankAccountTypeShow" :list="bankAccountTypeList" @confirm="bankAccountTypeConfirm">
 		</u-select>
 		<toast ref="toast"></toast>
-		<loading ref="loading" type="3" theme="2" />
+		<loading ref="loading" type="3"  />
 	</view>
 </template>
 
 <script>
+	import citySelect from './u-city-select.vue';
 	import mpUploadImg from "@/components/mp-uploadImg/mp-uploadImg.vue"
 	import uploadImg from "@/components/uploadimg/uploadImg.vue"
 	export default {
 		components: {
+			citySelect,
 			uploadImg,
 			mpUploadImg
 		},
@@ -741,6 +745,7 @@
 				mallAreaLabel: '',
 				//所在地区
 				regionShow: false,
+				defaultRegion:[],	
 				//门店地址
 				shopAddress: '',
 				step: 1,
@@ -891,8 +896,10 @@
 			},
 			//所在地区
 			regionConfirm(e) {
-				this.form.location = e.province.label + "-" + e.city.label + "-" + e.area.label
-				this.form.locationCode = e.province.value + "0000," + e.city.value + "00," + e.area.value
+				this.form.location=e.location
+				this.form.locationCode=e.locationCode
+				// this.form.location = e.province.label + "-" + e.city.label + "-" + e.area.label
+				// this.form.locationCode = e.province.value + "0000," + e.city.value + "00," + e.area.value
 			},
 			//具体地址
 			chooseAddress() {
@@ -943,7 +950,8 @@
 						id: res.data.mallId
 					})).data.mallName
 				}
-
+				console.log(this.form.location.split('-'));
+				this.defaultRegion=this.form.location.split('-')
 				this.imgList = this.$isNotEmpty(this.form.shopPic) ? this.form.shopPic.split(",") : []
 				this.$refs.mpUploadCover.changeImgList([this.form.cover])
 				this.$refs.mpUploadImg.changeImgList(this.imgList)
@@ -1085,7 +1093,6 @@
 				console.log(data,"data******");
 				if (data.type==0) {
 					//身份证正面
-					this.OCRBiziIdCardInfo = data.detail
 					this.auditForm.addr=data.address.text
 					this.auditForm.gender=data.gender.text
 					this.auditForm.idCard=data.id.text
@@ -1095,15 +1102,13 @@
 					this.form.personName = data.name.text
 					this.auditForm.contactLicenceNo = data.id.text
 				}else{
-					this.OCRBiziIdCardInfo.validDate = data.valid_date.text
 					this.auditForm.validDate = data.valid_date.text
 				}
 				this.$api.uploadFile(data.image_path).then(res=>{
 					if (data.type==0) {
 						//正面
 						this.auditForm.idCardFront=res.data.link
-					}
-					if (data.type==1) {
+					}else{
 						//反面
 						this.auditForm.idCardContrary=res.data.link
 					}
@@ -1170,6 +1175,7 @@
 			async fetchMallList() {
 				let params = {
 					name: this.mallKeyWord,
+					auditStatus:'PASS',
 					size: 20
 				}
 				let res = await this.$api.mall.list(params)
@@ -1192,6 +1198,7 @@
 				this.form.mallAreaId = e[0].value
 			},
 			async submit() {
+				let _this=this
 				await this.$mpi.subscribe(this.$tmplIds)
 
 				if (this.$isEmpty(this.auditForm.idCardFront)) {
@@ -1219,9 +1226,9 @@
 				if (this.$cache.get('promotionCode')) {
 					this.form.agenter = this.$cache.get('promotionCode')
 				}
-				this.$dialog.showLoading("资料提交中..")
+				
+				this.$refs.loading.showLoading('资料提交中..')
 
-				await this.initAgenterInfo()
 				this.initAuditInfo()
 				await this.getOpenId()
 
@@ -1231,15 +1238,18 @@
 				}
 				this.$cache.put('shopAuditInfo', params)
 				this.$api.shop.submitAudit(params).then(res => {
-					if (res.success == true) {
-						this.$cache.remove('promotionCode')
-						this.$cache.remove('shopAuditInfo')
-						this.doReSubmit()
-						this.jump()
-					}
-					uni.hideLoading()
+					setTimeout(()=>{
+						if (res.success == true) {
+							_this.$cache.remove('shopAuditInfo')
+							_this.doReSubmit()
+							_this.jump()
+						}
+						_this.$refs.loading.hide()
+					},300)
 				}).catch(err => {
-					uni.hideLoading()
+					setTimeout(()=>{
+						_this.$refs.loading.hide()
+					},300)
 				})
 			},
 			jump() {

+ 301 - 0
pages/shop-info/u-city-select.vue

@@ -0,0 +1,301 @@
+<template>
+	<u-popup v-model="value" mode="bottom" :popup="false" :mask="true" :closeable="true" :safe-area-inset-bottom="true"
+		close-icon-color="#ffffff" :z-index="uZIndex" :maskCloseAble="maskCloseAble" @close="close">
+		<u-tabs active-color="#FF9447" v-if="value" :list="genTabsList" :is-scroll="true" :current="tabsIndex"
+			@change="tabsChange" ref="tabs"></u-tabs>
+		<view class="area-box">
+			<view class="u-flex" :class="{ 'change':isChange }">
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group>
+								<u-cell-item v-for="(item,index) in provinces" :title="item.label" :arrow="false"
+									:index="index" :key="index" @click="provinceChange(item,index)">
+									<text v-if="isChooseP&&province==index" class="cuIcon-check text-bold"></text>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group v-if="isChooseP">
+								<u-cell-item v-for="(item,index) in citys" :title="item.label" :arrow="false"
+									:index="index" :key="index" @click="cityChange(item,index)">
+									<text v-if="isChooseC&&city==index" class="cuIcon-check text-bold"></text>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+
+				<view class="area-item">
+					<view class="u-padding-10 u-bg-gray" style="height: 100%;">
+						<scroll-view :scroll-y="true" style="height: 100%">
+							<u-cell-group v-if="isChooseC">
+								<u-cell-item v-for="(item,index) in areas" :title="item.label" :arrow="false"
+									:index="index" :key="index" @click="areaChange(item,index)">
+									<text v-if="isChooseA&&area==index" class="cuIcon-check text-bold"></text>
+								</u-cell-item>
+							</u-cell-group>
+						</scroll-view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</u-popup>
+</template>
+
+<script>
+	/**
+	 * city-select 省市区级联选择器
+	 * @property {String Number} z-index 弹出时的z-index值(默认1075)
+	 * @property {Boolean} mask-close-able 是否允许通过点击遮罩关闭Picker(默认true)
+	 * @property {String} default-region 默认选中的地区,中文形式
+	 * @property {String} default-code 默认选中的地区,编号形式
+	 */
+	export default {
+		name: 'u-city-select',
+		props: {
+			// 通过双向绑定控制组件的弹出与收起
+			value: {
+				type: Boolean,
+				default: false
+			},
+			// 默认显示的地区,可传类似["河北省", "秦皇岛市", "北戴河区"]
+			defaultRegion: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 默认显示地区的编码,defaultRegion和areaCode同时存在,areaCode优先,可传类似["13", "1303", "130304"]
+			areaCode: {
+				type: Array,
+				default () {
+					return [];
+				}
+			},
+			// 是否允许通过点击遮罩关闭Picker
+			maskCloseAble: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出的z-index值
+			zIndex: {
+				type: [String, Number],
+				default: 0
+			}
+		},
+		data() {
+			return {
+				cityValue: "",
+				isChooseP: false, //是否已经选择了省
+				province: 0, //省级下标
+				provinces: [],
+				isChooseC: false, //是否已经选择了市
+				city: 0, //市级下标
+				citys: [],
+				isChooseA: false, //是否已经选择了区
+				area: 0, //区级下标
+				areas: [],
+				tabsIndex: 0,
+
+				//接口city数据
+				cityList: [],
+			}
+		},
+		mounted() {
+			this.init();
+		},
+		computed: {
+			isChange() {
+				return this.tabsIndex > 1;
+			},
+			genTabsList() {
+				let tabsList = [{
+					name: "请选择"
+				}];
+				if (this.isChooseP) {
+					tabsList[0]['name'] = this.provinces[this.province]['label'];
+					tabsList[1] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseC) {
+					tabsList[1]['name'] = this.citys[this.city]['label'];
+					tabsList[2] = {
+						name: "请选择"
+					};
+				}
+				if (this.isChooseA) {
+					tabsList[2]['name'] = this.areas[this.area]['label'];
+				}
+				return tabsList;
+			},
+			uZIndex() {
+				// 如果用户有传递z-index值,优先使用
+				return this.zIndex ? this.zIndex : this.$u.zIndex.popup;
+			}
+		},
+		methods: {
+			init() {
+				this.getProvince()
+				if (this.areaCode.length == 3) {
+					this.setProvince("", this.areaCode[0]);
+					this.setCity("", this.areaCode[1]);
+					this.setArea("", this.areaCode[2]);
+				} else if (this.defaultRegion.length == 3) {
+					this.setProvince(this.defaultRegion[0], "");
+					this.setCity(this.defaultRegion[1], "");
+					this.setArea(this.defaultRegion[2], "");
+				};
+			},
+			async getProvince() {
+				let provinces = (await this.$api.area.province()).data
+				this.provinces = []
+				provinces.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.provinces.push(obj)
+				})
+				this.getCity(this.provinces[0].value)
+			},
+			async getCity(code) {
+				let params = {
+					parentCode: code
+				}
+				let citys = (await this.$api.area.list(params)).data
+				this.citys = []
+				citys.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.citys.push(obj)
+				})
+				this.getArea(this.citys[0].value)
+			},
+			async getArea(code) {
+				let params = {
+					parentCode: code
+				}
+				let areas = (await this.$api.area.list(params)).data
+				this.areas = []
+				areas.forEach(item => {
+					let obj = {
+						hasChildren:item.hasChildren,
+						label: item.title,
+						value: item.value
+					}
+					this.areas.push(obj)
+				})
+			},
+			setProvince(label = "", value = "") {
+				console.log(label);
+				this.provinces.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.provinceChange(v, k);
+					}
+				})
+			},
+			setCity(label = "", value = "") {
+				this.citys.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.cityChange(v, k);
+					}
+				})
+			},
+			setArea(label = "", value = "") {
+				this.areas.map((v, k) => {
+					if (value ? v.value == value : v.label == label) {
+						this.isChooseA = true;
+						this.area = k;
+					}
+				})
+			},
+			close() {
+				this.$emit('input', false);
+			},
+			tabsChange(index) {
+				this.tabsIndex = index;
+			},
+			async provinceChange(item, index) {
+				if (!item.hasChildren) {
+					let result={
+						location:item.label,
+						locationCode:item.value+'0000'
+					}
+					this.$emit('city-change', result);
+					this.close();
+					return
+				}
+				this.isChooseP = true;
+				this.isChooseC = false;
+				this.isChooseA = false;
+				this.province = index;
+				this.getCity(item.value)
+				this.tabsIndex = 1;
+				
+			},
+			cityChange(item, index) {
+				if (!item.hasChildren) {
+					let result={
+						location:item.label,
+						locationCode:item.value+'00'
+					}
+					this.$emit('city-change', result);
+					this.close();
+					return
+				}
+				this.isChooseC = true;
+				this.isChooseA = false;
+				this.city = index;
+				this.getArea(item.value)
+				this.tabsIndex = 2;
+			},
+			areaChange(item, index) {
+				this.isChooseA = true;
+				this.area = index;
+				let result = {};
+				result.province = this.provinces[this.province];
+				result.city = this.citys[this.city];
+				result.area = this.areas[this.area];
+				let data={
+					location:result.province.label+'-'+result.city.label+'-'+result.area.label,
+					locationCode:result.province.value+'0000,'+result.city.value+'00,'+result.area.value,
+				}
+				this.$emit('city-change', data);
+				this.close();
+			}
+		}
+
+	}
+</script>
+<style lang="scss">
+	.area-box {
+		width: 100%;
+		overflow: hidden;
+		height: 800rpx;
+
+		>view {
+			width: 150%;
+			transition: transform 0.3s ease-in-out 0s;
+			transform: translateX(0);
+
+			&.change {
+				transform: translateX(-33.3333333%);
+			}
+		}
+
+		.area-item {
+			width: 33.3333333%;
+			height: 800rpx;
+		}
+	}
+</style>

+ 84 - 106
pages/statistics/statistics.vue

@@ -23,36 +23,42 @@
 				<text>暂无数据</text>
 			</view>
 		</view>
-
-		<view class="card2">
+		
+		
+		<view class="bg-white safe-area-inset-bottom" style="height: 100%;">
 			<mescroll-body :height="height" ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"
 				:down="downOption" :up="upOption">
-				<view class="title">收入记录</view>
-				<view class="item" hover-class="hoverClass" v-for="(item,index) in list" :key="index">
+				<view style="font-size: 34rpx;font-weight: 800;padding: 40rpx 40rpx 20rpx">收入记录</view>
+				<navigator :url="'/pages/my-bills/bills-detail?id='+item.id+'&type=all'" class="u-border-bottom flex" v-for="(item,index) in list" :key="index">
 					<view class="area1">
-						<view class="item-padding">
-							<image :src="item.avatar?item.avatar:'/static/icon/avatar.png'" style="border-radius: 50%;" mode="aspectFit"></image>
-							<view class="">
-								<text>{{item.nickName || '用户支付'}}</text>
-								<text>{{item.createTime}}</text>
-							</view>
+						<image v-if="$isNotEmpty(item.avatar)"  :src="item.avatar" ></image>
+						<block v-else>
+							<image v-if="item.payWay=='WECHAT'"  src="@/static/icon/wx.png" ></image>
+							<image v-else-if="item.payWay=='ALIPAY'"  src="@/static/icon/ALIPAY.png" ></image>
+							<image v-else-if="item.payWay=='UNIONPAY'"  src="@/static/icon/UNIONPAY.png" ></image>
+							<image v-else-if="item.payWay=='APPLEPAY'"  src="@/static/icon/apple.png" ></image>
+							<image v-else  src="@/static/icon/avatar.png" ></image>
+						</block>
+						<view>
+							<text  v-if="$isNotEmpty(item.nickName)">{{item.nickName}}</text>
+							<block v-else >
+								<text v-if="item.payWay=='WECHAT'">微信用户</text>
+								<text v-else-if="item.payWay=='ALIPAY'">支付宝用户</text>
+								<text v-else-if="item.payWay=='UNIONPAY'">银联用户</text>
+								<text v-else-if="item.payWay=='APPLEPAY'">苹果用户</text>
+								<text v-else>用户昵称</text>
+							</block>
+							<text>{{item.createTime}}</text>
 						</view>
 					</view>
-					<view class="area2 text-area" style="width: 15%;">
-						<view class="item-padding">
-							<text>{{item.discount==-1 || item.discount==0?'无折扣':item.discount +'折'}}</text>
-						</view>
+					<view class="area2">
+						<text>{{item.discount==-1 || item.discount==0 || item.discount==1?'无折扣':item.discount +'折'}}</text>
 					</view>
-					<view class="area3 text-area u-p-r-20" style="width: 30%;">
-						<view class="item-padding"
-							style="flex:1;text-align: right;font-size: 34rpx;color: #F39248;">
-							+¥{{item.cost || 0}}</view>
+					<view class="area3">
+						<text class="text-base price" v-if="$isNotEmpty(item.receiveNumTotal)">{{item.receiveNumTotal}}</text>
+						<text class="text-base price" v-else>{{item.cost || 0}}</text>
 					</view>
-				</view>
-				<view class="empty" style="margin-top: 80rpx;" v-if="$isEmpty(list)">
-					<image src="/static/icon/empty5.png" mode="widthFix"></image>
-					<text>暂无数据</text>
-				</view>
+				</navigator>
 			</mescroll-body>
 		</view>
 		<u-picker v-model="showTime" mode="time" :params="params"  @confirm="confirmTime">
@@ -81,18 +87,14 @@
 				showTime: false,
 				params: {
 					year: true,
-					month: true,
 				},
-
-				upOption: {
-					empty: {
-						use: false
-					}
-				}
+				downOption:{
+					use:false
+				},
 			}
 		},
 		onLoad() {
-			this.defaultTime = this.$dateTime.format(new Date(), 'YYYY-mm')
+			this.defaultTime = this.$dateTime.format(new Date(), 'YYYY')
 			this.getData()
 		},
 		methods: {
@@ -118,7 +120,7 @@
 				}
 			},
 			confirmTime(e) {
-				this.defaultTime = e.year + '-' + e.month
+				this.defaultTime = e.year
 				this.getData()
 				this.downCallback()
 			},
@@ -130,9 +132,7 @@
 					payStatus:this.$global.PAY_STATUS.SUCCESS
 				}
 				if (this.defaultTime) {
-					params.createTime = this.$dateTime.format(new Date(this.defaultTime))
-				} else {
-					params.createTime = this.$dateTime.format(new Date())
+					params.format = this.defaultTime
 				}
 
 				try {
@@ -224,82 +224,60 @@
 			}
 		}
 	}
-
-	.card2 {
-		margin-top: 30rpx;
-		background-color: #FFFFFF;
-
-		.title {
-			font-size: 34rpx;
-			font-weight: 800;
-			padding: 40rpx 40rpx 20rpx;
-		}
-
-		.area-padding {
-			padding: 40rpx 0 20rpx;
-		}
-
-		.text-area {
+	.area1 {
+		$img-width: 70rpx;
+		width: 54%;
+		display: flex;
+		height: 120rpx;
+		justify-content: center;
+		align-items: center;
+	
+		image {
 			display: flex;
-			justify-content: flex-start;
 			align-items: center;
+			justify-content: center;
+			width: $img-width;
+			height: $img-width;
+			border-radius: 50%;
 		}
-
-		.area1 {
-			padding-left: 30rpx;
-			width: 55%;
-
-			view:first-child {
-				display: flex;
-
-				image {
-					width: 80rpx;
-					height: 80rpx
-				}
-
-				view {
-					padding-left: 15rpx;
-					padding-bottom: 5rpx;
-					display: flex;
-					flex-direction: column;
-
-					text:first-child {
-						font-size: 32rpx;
-						padding-bottom: 10rpx;
-						color: #000;
-					}
-
-					text:last-child {
-						font-size: 22rpx;
-						color: #888888;
-					}
-				}
-			}
-		}
-
-		.area2 {
-			width: 25%;
-		}
-
-		.area3 {
-			width: 20%;
-		}
-
-		.item-padding {
-			padding: 20rpx 0;
-		}
-
-		.item {
-			padding: 5rpx;
+	
+		view {
+			width: calc(100% - $img-width);
 			display: flex;
-			border-bottom: 1rpx solid #DDDDDD;
+			flex-direction: column;
+			justify-content: space-between;
+			margin-left: 10rpx;
 		}
-
-		.item:last-child {
-			border: none;
+	
+		text:first-child {
+			margin-bottom: 8rpx;
 		}
-
-
-
+	
+		text:last-child {
+			margin-top: 8rpx;
+			color: #999;
+		}
+	}
+	
+	.area2 {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		text-align: center;
+		width: 22%;
+		margin-top: 10rpx;
+		font-weight: 300;
+		color: #666;
+	}
+	
+	.area3 {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 24%;
+		font-size: 32rpx;
+		margin-top: 10rpx;
 	}
+	
+	
 </style>

+ 624 - 22
pages/test/test.vue

@@ -1,32 +1,634 @@
 <template>
-	<view class="">
-		<button @click="cityShow=!cityShow">打开</button>
-		<city-select v-model="cityShow" @city-change="cityChange"></city-select>
+	<view class="u-wrap ">
+		<view class="flex bg-white" style="padding: 30rpx 10rpx;">
+			<view class="" style="width: 20%;">
+				<u-button @click="operateCategory(null)" size="mini" type="warning" plain
+					class=" text-sm text-red flex text-bold">
+					<text>添加分类</text>
+					<text class="cuIcon-add u-m-l-4 center"></text>
+				</u-button>
+			</view>
+
+			<view @click="operateGoods(null)" class="center bg-white" style="width: 80%;color: #007AFF;">
+				<text class="cuIcon-roundadd margin-right-10"></text>
+				<text>添加【{{goodsList[current].goodsCategory.name}}】分类下商品</text>
+			</view>
+		</view>
+		<view class="u-menu-wrap">
+			<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop">
+				<view v-for="(item,index) in goodsList" :key="index" class="u-tab-item"
+					:class="[current==index ? 'u-tab-item-active' : '']" :data-current="index"
+					@tap.stop="swichMenu(index)">
+					<view class="">
+						<text class="u-line-1 u-m-r-4" :style="!item.goodsCategory.showStatus?'text-decoration: line-through;color: #bababa':''">{{item.goodsCategory.name}}</text>
+						<u-icon color="#EF9944" @click="operateCategory(item.goodsCategory)" name="edit-pen-fill">
+						</u-icon>
+					</view>
+				</view>
+			</scroll-view>
+			<block v-for="(item,index) in goodsList" :key="index">
+				<scroll-view scroll-y class="right-box" v-if="current==index">
+					<view class="page-view">
+						<view class="class-item">
+							<view class="item-title">
+								<text>{{item.goodsCategory.name}}</text>
+							</view>
+							<view class="item-container">
+								<view class="thumb-box"  v-for="(goods, index1) in item.goods" :key="index1">
+									<image @click="$util.preview(goods.image)" class="item-menu-image"
+										:src="goods.image" mode=""></image>
+									<view class="item-content">
+										<view class="name flex justify-between ">
+											<view class="text-cut-1 " style="width: 75%;">
+												<text>{{goods.name}}</text>
+											</view>
+											<view class="text-red text-sm" @click="operateGoods(goods)">
+												<text>编辑</text>
+												<text class="cuIcon-edit u-m-l-2"></text>
+											</view>
+										</view>
+										<view class="tips">
+											<view class="text-cut-1 " style="width: 75%;">
+												{{ goods.description}}
+											</view>
+											
+											<view class="text-blue text-sm" @click="operateGoods(goods)">
+												<text>规格</text>
+												<text class="cuIcon-goods u-m-l-2"></text>
+											</view>
+										</view>
+										<view class="price_and_action">
+											<text class="price">¥{{ goods.defaultPrice / 100 }}</text>
+											<text v-if="!goods.isSell" class="margin-left-20 text-sm text-red">已下架</text>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</block>
+		</view>
+
+
+		<!-- 分类 -->
+		<u-popup borderRadius="12" v-model="categoryShow" mode="center" width="80%">
+			<view class="center padding-30 flex-direction">
+				<text class="text-center  text-lg" v-text="categoryEdit?'修改分类':'添加分类'"></text>
+				<view class="margin-top-30">
+					<u-form :model="categoryForm" ref="uForm" label-width="140">
+						<u-form-item label="分类名称">
+							<u-input :clearable="false" v-model="categoryForm.name" />
+						</u-form-item>
+						<u-form-item label="显示顺序">
+							<u-number-box v-model="categoryForm.displayOrder" ::min="1" :max="100"></u-number-box>
+						</u-form-item>
+						<u-form-item label="是否显示">
+							<view class="center" style="justify-content: flex-start;">
+								<u-switch active-color="#FF9447" v-model="categoryForm.showStatus" active-value="1"
+									inactive-value="0"></u-switch>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="center " style="margin-top: 60rpx;width: 100%;justify-content: space-around;">
+					<block v-if="categoryEdit">
+						<view @click="deleteCategory" class="cu-btn  flex  text-lg line-red radius"
+							style="padding: 40rpx 0;width: 46%;">
+							删除
+						</view>
+						<view @click="submitCategory" class="cu-btn  flex  text-lg bg-base radius"
+							style="padding: 40rpx 0;width: 46%;">
+							确认
+						</view>
+					</block>
+					<view v-else @click="submitCategory" class="cu-btn  flex  text-lg bg-base radius"
+						style="padding: 40rpx 0;width: 90%;">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 商品 -->
+		<u-popup borderRadius="12" v-model="goodsShow" mode="center" width="90%">
+			<view class="bg-white center  flex-direction" style="padding: 30rpx 20rpx;">
+				<text class="text-center text-bold text-lg" v-text="goodsEdit?'修改商品':'添加商品'"></text>
+				<view class="margin-top-10">
+					<u-form :error-type="['toast']" :model="goodsForm" ref="uGoodsForm" label-width="160">
+						<u-form-item prop="image" :required="true" label="商品图片" label-position="top">
+							<view class="" style="margin-top: -40rpx;margin-bottom: -20rpx;">
+								<mp-upload-img ref="mpUploadImg" @delImg="delGoodsImg" @click='uploadGoodsImg'
+									:count="1" col="3"></mp-upload-img>
+							</view>
+						</u-form-item>
+						<u-form-item :required="true" label="所在分类">
+							<u-input :clearable="false" disabled placeholder-style="color:#d8d8d8"
+								v-model="goodsForm.goodsCategoryName" />
+						</u-form-item>
+						<u-form-item :required="true" label="商品名称" prop="name">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8" v-model="goodsForm.name" />
+						</u-form-item>
+						<u-form-item  :required="true" label="商品单价">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8" v-model="price" />
+							<text slot="right">元</text>
+						</u-form-item>
+						<u-form-item label="显示顺序">
+							<u-number-box v-model="goodsForm.displayOrder" ::min="1" :max="100"></u-number-box>
+						</u-form-item>
+						<u-form-item label="是否在卖">
+							<view class="center" style="justify-content: flex-start;">
+								<u-switch active-color="#FF9447" v-model="goodsForm.isSell" active-value="1"
+									inactive-value="0"></u-switch>
+							</view>
+						</u-form-item>
+						<u-form-item label="商品描述">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8"
+								v-model="goodsForm.description" placeholder="请输入商品描述" />
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="center " style="margin-top: 60rpx;width: 100%;justify-content: space-around;">
+					<block v-if="goodsEdit">
+						<view @click="deleteGoods" class="cu-btn  flex  text-lg line-red radius"
+							style="padding: 40rpx 0;width: 46%;">
+							删除
+						</view>
+						<view @click="submitGoods" class="cu-btn  flex  text-lg bg-base radius"
+							style="padding: 40rpx 0;width: 46%;">
+							确认
+						</view>
+					</block>
+					<view v-else @click="submitGoods" class="cu-btn  flex  text-lg bg-base radius"
+						style="padding: 40rpx 0;width: 90%;">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
+
+		<toast ref="toast"></toast>
 	</view>
 </template>
 
 <script>
-import citySelect from './u-city-select.vue';
-export default {
-	components: {
-		citySelect
-	},
-	data() {
-		return {
-			cityShow:false
-		};
-	},
-	onLoad() {
-		
-	},
-	methods:{
-		cityChange(e){
-			console.log(e);
+	import mpUploadImg from "@/components/mp-uploadImg/mp-uploadImg.vue"
+	export default {
+		components: {
+			mpUploadImg
+		},
+		data() {
+			return {
+				goodsList: [],
+
+				//分类
+				operateCategoryItem: {},
+				categoryEdit: false,
+				categoryShow: false,
+				categoryForm: {
+					id: '',
+					shopId: '',
+					name: '',
+					displayOrder: 1,
+					//是否显示
+					showStatus: 1,
+				},
+
+				//商品 begin
+				imgList: [],
+				price: 0,
+				operateGoodsItem: {},
+				goodsEdit: false,
+				goodsShow: false,
+				goodsForm: {
+					id: '',
+					shopId: '',
+					goodsCategoryName: '',
+					name: '',
+					displayOrder: 1,
+					defaultPrice: 0,
+					isSell: 1,
+					image: '',
+					description: null
+				},
+				goodsRules: {
+					image: [{
+						required: true,
+						message: '请上传商品图片',
+						trigger: ['blur', 'change']
+					}],
+					name: [{
+						required: true,
+						message: '请输入商品名称',
+						trigger: ['blur', 'change']
+					}],
+				},
+				//商品 end
+
+				
+				// 菜单
+				scrollTop: 0, //tab标题的滚动条位置
+				current: 0, // 预设当前项的值
+				menuHeight: 0, // 左边菜单的高度
+				menuItemHeight: 0, // 左边菜单item的高度
+			}
+		},
+		onLoad() {
+			this.getGoodsList()
+		},
+		onReady() {
+			this.$refs.uGoodsForm.setRules(this.goodsRules);
+		},
+		methods: {
+			getGoodsList() {
+				let params = {
+					shopId: this.vuex_shopId
+				}
+				this.$api.goods.list(params).then(res => {
+					this.goodsList = res.data
+				})
+			},
+
+			//分类 begin
+			operateCategory(item) {
+				this.operateCategoryItem = item
+				this.categoryShow = true
+				if (this.$isEmpty(item)) {
+					//添加分类
+					this.reSetCategoryForm()
+					this.categoryEdit = false
+					return
+				}
+				//修改分类
+				this.categoryEdit = true
+				this.$util.objectCoppy(this.categoryForm, item)
+			},
+			async submitCategory() {
+				if (this.$isEmpty(this.categoryForm.name)) {
+					this.$u.toast('请输入类目名称!')
+					return
+				}
+				
+				if (!this.categoryEdit) {
+					let flag = this.goodsList.some(item => item.goodsCategory.name == this.categoryForm.name)
+					if (flag) {
+						this.$u.toast('已有该名称的类目!')
+						return
+					}
+				}
+				
+				this.categoryForm.shopId = this.vuex_shopId
+				let res = await this.$api.goodsCategory.submit(this.categoryForm)
+				if (res.success) {
+					this.$u.toast('操作成功')
+					this.getGoodsList()
+					this.categoryShow = false
+				}
+			},
+			deleteCategory() {
+				this.$dialog.showModal('确定删除该分类?').then(() => {
+					this.$api.goodsCategory.remove(this.operateCategoryItem.id).then(res => {
+						if (res.success) {
+							this.$u.toast('删除成功')
+							this.current = 0
+							this.categoryShow = false
+							this.getGoodsList()
+						}
+					})
+				})
+			},
+			reSetCategoryForm(){
+				this.categoryForm={
+					id: '',
+					shopId: '',
+					name: '',
+					displayOrder: 1,
+					//是否显示
+					showStatus: 1,
+				}
+			},
+			//分类 end
+
+			//商品begin
+			uploadGoodsImg(e){
+				this.goodsForm.image=e[0]
+			},
+			operateGoods(item) {
+				this.goodsForm.goodsCategoryName = this.goodsList[this.current].goodsCategory.name
+				this.operateGoodsItem = item
+				this.goodsShow = true
+				if (this.$isEmpty(item)) {
+					//添加商品
+					this.reSetGoodsData()
+					this.goodsEdit = false
+					return
+				}
+				//修改商品
+				this.price = item.defaultPrice / 100
+				this.imgList = [item.image]
+				this.$refs.mpUploadImg.changeImgList(this.imgList)
+				
+				this.goodsEdit = true
+				this.$util.objectCoppy(this.goodsForm, item)
+			},
+			delGoodsImg(item) {
+				this.imgList = item[0]
+				this.goodsForm.image=this.imgList
+			},
+			reSetGoodsData(){
+				this.price=0
+				this.imgList=[]
+				this.$refs.mpUploadImg.changeImgList(this.imgList)
+				let goodsCategoryName=this.goodsForm.goodsCategoryName
+				this.goodsForm={
+					id: '',
+					shopId: '',
+					goodsCategoryName,
+					name: '',
+					displayOrder: 1,
+					defaultPrice: 0,
+					isSell: 1,
+					image: '',
+					description: null
+				}
+			},
+			submitGoods() {
+				this.$refs.uGoodsForm.validate(valid => {
+					if (valid) {
+						this.goodsForm.defaultPrice=this.price * 100
+						if (this.$isEmpty(this.goodsForm.defaultPrice)) {
+							this.$u.toast('请输入商品单价')
+							return
+						}
+						this.doSubmitGoods()
+						
+					} else {
+						console.log('验证失败');
+					}
+				});
+			},
+			async doSubmitGoods(){
+				this.goodsForm.shopId = this.vuex_shopId
+				let res = await this.$api.goods.submit(this.goodsForm)
+				if (res.success) {
+					this.$u.toast('操作成功')
+					this.getGoodsList()
+					this.goodsShow = false
+				}
+			},
+			deleteGoods() {
+				this.$dialog.showModal('确定删除该商品?').then(() => {
+					this.$api.goods.remove(this.operateGoodsItem.id).then(res => {
+						if (res.success) {
+							this.$u.toast('删除成功')
+							this.goodsShow = false
+							this.getGoodsList()
+						}
+					})
+				})
+			},
+			//商品end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+			//菜单 begin
+			// 点击左边的栏目切换
+			async swichMenu(index) {
+				if (index == this.current) return;
+				this.current = index;
+				// 如果为0,意味着尚未初始化
+				if (this.menuHeight == 0 || this.menuItemHeight == 0) {
+					await this.getElRect('menu-scroll-view', 'menuHeight');
+					await this.getElRect('u-tab-item', 'menuItemHeight');
+				}
+				// 将菜单菜单活动item垂直居中
+				this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
+			},
+			// 获取一个目标元素的高度
+			getElRect(elClass, dataVal) {
+				new Promise((resolve, reject) => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('.' + elClass).fields({
+						size: true
+					}, res => {
+						// 如果节点尚未生成,res值为null,循环调用执行
+						if (!res) {
+							setTimeout(() => {
+								this.getElRect(elClass);
+							}, 10);
+							return;
+						}
+						this[dataVal] = res.height;
+					}).exec();
+				})
+			}
+			// 菜单end
 		}
 	}
-};
 </script>
 
 <style lang="scss" scoped>
-	
-</style>
+	.u-wrap {
+		height: calc(100vh);
+		/* #ifdef H5 */
+		height: calc(100vh - var(--window-top));
+		/* #endif */
+		display: flex;
+		flex-direction: column;
+	}
+
+	.u-menu-wrap {
+		flex: 1;
+		display: flex;
+		overflow: hidden;
+	}
+
+	.u-tab-view {
+		width: 200rpx;
+		height: 100%;
+	}
+
+	.u-tab-item {
+		height: 110rpx;
+		background: #f6f6f6;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 26rpx;
+		color: #444;
+		font-weight: 400;
+		line-height: 1;
+	}
+
+	.u-tab-item-active {
+		position: relative;
+		color: #000;
+		font-size: 30rpx;
+		font-weight: 600;
+		background: #fff;
+	}
+
+	.u-tab-item-active::before {
+		content: "";
+		position: absolute;
+		border-left: 4px solid $u-type-primary;
+		height: 32rpx;
+		left: 0;
+		top: 39rpx;
+	}
+
+	.u-tab-view {
+		height: 100%;
+	}
+
+	.right-box {
+		background-color: rgb(250, 250, 250);
+	}
+
+	.page-view {
+		padding: 16rpx;
+	}
+
+	.class-item {
+		margin-bottom: 30rpx;
+		background-color: #fff;
+		padding: 16rpx;
+		border-radius: 8rpx;
+	}
+
+	.item-title {
+		font-size: 26rpx;
+		color: $u-main-color;
+		font-weight: bold;
+	}
+
+	.item-container {
+		display: flex;
+		flex-wrap: wrap;
+
+		.thumb-box {
+			width: 100%;
+			display: flex;
+			padding: 20rpx 0;
+			border-bottom: 1rpx solid #EEEEEE;
+
+			.item-menu-image {
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 8rpx;
+			}
+
+			.item-content {
+				width: calc(100% - 180rpx);
+			}
+
+
+			.name {
+				font-size: $font-size-base;
+				margin-bottom: 10rpx;
+			}
+
+			.tips {
+				width: 100%;
+				height: 40rpx;
+				display: flex;
+				justify-content: space-between;
+				line-height: 40rpx;
+				white-space: nowrap;
+				font-size: $font-size-sm;
+				color: $text-color-assist;
+				margin-bottom: 10rpx;
+			}
+
+			.price_and_action {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				margin-top: 30rpx;
+
+				.price {
+					font-size: $font-size-base;
+					font-weight: 600;
+				}
+
+				.btn-group {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					position: relative;
+
+					.btn {
+						background-color: $base-color;
+						padding: 0 20rpx;
+						box-sizing: border-box;
+						font-size: $font-size-sm;
+						height: 44rpx;
+						line-height: 44rpx;
+
+						&.property_btn {
+							border-radius: 24rpx;
+						}
+
+						&.add_btn,
+						&.reduce_btn {
+							color: #FFFFFF;
+							border: $base-color;
+							padding: 0;
+							width: 44rpx;
+							border-radius: 44rpx;
+						}
+					}
+
+					.dot {
+						position: absolute;
+						background-color: #ffffff;
+						border: 1px solid $color-primary;
+						color: $color-primary;
+						font-size: $font-size-sm;
+						width: 36rpx;
+						height: 36rpx;
+						line-height: 36rpx;
+						text-align: center;
+						border-radius: 100%;
+						right: -12rpx;
+						top: -10rpx;
+					}
+
+					.number {
+						width: 44rpx;
+						height: 44rpx;
+						line-height: 44rpx;
+						text-align: center;
+					}
+				}
+			}
+		}
+
+		.thumb-box:last-child {
+			border: none;
+		}
+	}
+</style>

+ 125 - 20
pages/test/test2/test2.vue

@@ -1,37 +1,142 @@
 <template>
 	<view class="">
-		<view class="cover center" style="flex-direction: column;">
-			<text class="cuIcon-roundaddfill text-base" style="font-size: 80rpx;"></text>
-			<text style="margin-top: 10rpx;">请上传活动封面</text>
+		<view class="top">
+			<image  style="border-radius: 50%;" src="../../../static/icon/pay-success.png" ></image>
+			<text class="margin-top-20">提现成功</text>
+			<view class="data">
+				<view class="price reduce text-base text-bold" style="padding: 0;">
+					50
+				</view>
+			</view>
+		</view>
+		
+		<view class="card">
+			<view class="item">
+				<text>提现状态</text>
+				<text>提现成功</text>
+			</view>
+			<view class="item" v-if="billDetail.jsStatus">
+				<text>提现时间</text>
+				<text>2021-10-25 11:20:19</text>
+			</view>
+			<view class="item">
+				<text>提现金额</text>
+				<text>2</text>
+			</view>
+			<view class="item">
+				<text>提现服务费</text>
+				<text>0.1</text>
+			</view>
+			<view class="item">
+				<text>提现手续费</text>
+				<text>1</text>
+			</view>
+			<view class="item">
+				<text>实际到账</text>
+				<text>1</text>
+			</view>
+			<view class="item">
+				<text>提现银行</text>
+				<text>梁汉强</text>
+			</view>
+			<view class="item">
+				<text>提现账号</text>
+				<text>6236683140002387688</text>
+			</view>
+			<view class="item">
+				<text>失败原因</text>
+				<text>商户账户余额不足以扣除手续费</text>
+			</view>
+		</view>
+		
+		<view class="question">
+			<text>联系客服</text>
+			<text class="cuIcon-right" style="margin-top: 5rpx;"></text>
 		</view>
 	</view>
 </template>
 
 <script>
 export default {
-	components:{
-	},
+	name: '',
 	data() {
 		return {
-			form:{
-				title:''
-			}
+			
 		};
-	},
-	onLoad() {
-		
-	},
-	methods:{
-		
 	}
 };
 </script>
 
-<style lang="scss" scoped>
-	.cover{
+<style scoped lang="scss">
+	.top {
+		padding: 80rpx 0 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+	
+		image {
+			width: 120rpx;
+			height: 120rpx;
+		}
+	
+		.title {
+			color: #000;
+			padding-top: 15rpx;
+			font-size: 32rpx;
+		}
+	
+		.data {
+			padding-top: 30rpx;
+			display: flex;
+	
+			image {
+				width: 40rpx;
+				height: 40rpx;
+			}
+	
+			view {
+				padding-left: 20rpx;
+	
+				text:first-child {
+					color: #000;
+					font-size: 38rpx;
+				}
+	
+				text:last-child {
+					font-size: 32rpx;
+					padding-left: 20rpx;
+				}
+			}
+		}
+	}
+	
+	.card {
+		margin-top: 50rpx;
+		padding: 20rpx 30rpx;
 		background-color: #FFFFFF;
-		border-radius: 20rpx;
-		margin: 20rpx;
-		padding: 100rpx;
+		
+		.item{
+			padding: 20rpx 0;
+			font-size: 28rpx;
+			color: #888888;
+			margin: 0 20rpx;
+			display: flex;
+			justify-content: space-between;
+		}
+	}
+	
+	.question{
+		color: #888888;
+		background-color: #FFFFFF;
+		margin-top: 20rpx;
+		margin-bottom: 50rpx;
+		padding: 20rpx 50rpx;
+		display: flex;
+		justify-content: space-between;
+	}
+	.strong{
+		font-weight: bold;
+		color: #000;
 	}
-</style>
+</style>

+ 3 - 3
pages/userBank/userBank.vue

@@ -2,13 +2,13 @@
 	<view>
 		<view @click="add(item.id)" style="position: relative;" hover-class="none" v-for="(item,index) in bankList"
 			:key="index" class="card card_bg">
-			<!-- 			<view @click.stop="del(item.id)" style="position: absolute;right: 10rpx;top: 10rpx;">
+			<view @click.stop="del(item.id)" style="position: absolute;right: 10rpx;top: 10rpx;">
 				<u-icon name="close-circle" color="#fff" size="40"></u-icon>
-			</view> -->
+			</view>
 
 			<view class="top center" style="justify-content: flex-start;">
 				<view class="center margin-top-10">
-					<image :src="'/static/bank/'+item.bankCode+'.png'"></image>
+					<image :src="'/static/bank/'+'DEF'+'.png'"></image>
 				</view>
 				<view class="">
 					<text class="bankType">{{item.bankName}}</text>

+ 160 - 0
pages/withdraw/detail.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="">
+		<view class="top">
+			<image v-if="detail.withdrawStatus=='DONE'" style="border-radius: 50%;" src="@/static/icon/pay-success.png" ></image>
+			<image v-if="detail.withdrawStatus=='FAIL'" style="border-radius: 50%;" src="@/static/icon/pay-fail.png" ></image>
+			<image v-if="detail.withdrawStatus=='WAITING'" style="border-radius: 50%;" src="@/static/icon/pay-handel.png" ></image>
+			<text class="margin-top-20" v-if="detail.withdrawStatus=='WAITING'">处理中</text>
+			<text class="margin-top-20" v-if="detail.withdrawStatus=='FAIL'">提现失败</text>
+			<text class="margin-top-20" v-if="detail.withdrawStatus=='DONE'">提现成功</text>
+			<view class="data">
+				<view class="price reduce text-base text-bold" style="padding: 0;">
+					{{detail.price}}
+				</view>
+			</view>
+		</view>
+		<view class="card">
+			<view class="item">
+				<text>提现状态</text>
+				<text class="text-warn" v-if="detail.withdrawStatus=='WAITING'">处理中</text>
+				<text class="text-red" v-if="detail.withdrawStatus=='FAIL'">提现失败</text>
+				<text class="text-success" v-if="detail.withdrawStatus=='DONE'">提现成功</text>
+			</view>
+			<view class="item">
+				<text>提现时间</text>
+				<text>{{detail.createTime}}</text>
+			</view>
+			<view class="item">
+				<text>提现金额</text>
+				<text>{{detail.price}}</text>
+			</view>
+			<view class="item">
+				<text>提现服务费</text>
+				<text>{{detail.platformFee}}</text>
+			</view>
+			<view class="item">
+				<text>提现手续费</text>
+				<text>{{detail.fee}}</text>
+			</view>
+			<view class="item">
+				<text>实际到账</text>
+				<text>{{detail.receiveAmount || '0.00'}}</text>
+			</view>
+			<view class="item">
+				<text>提现银行</text>
+				<text>{{detail.receiverAccountName}}</text>
+			</view>
+			<view class="item">
+				<text>提现账号</text>
+				<text>{{detail.receiverAccountNo}}</text>
+			</view>
+			<view class="item"  v-if="detail.withdrawStatus=='FAIL'">
+				<text style="width: 30%;">失败原因</text>
+				<text class="text-cut-2 text-right">{{detail.failReason}}</text>
+			</view>
+		</view>
+		
+		<button open-type="contact" class="question btnCss" style="padding: 5rpx 50rpx;font-size: 28rpx;">
+			<text>联系客服</text>
+			<text class="cuIcon-right" style="margin-top: 5rpx;"></text>
+		</button>
+	</view>
+</template>
+
+<script>
+export default {
+	name: '',
+	data() {
+		return {
+			detail:{}
+		};
+	},
+	onLoad(options) {
+		this.fetchDetail(options.id)
+	},
+	methods:{
+		fetchDetail(id){
+			let params={
+				id
+			}
+			this.$api.withdraw.detail(params).then(res=>{
+				this.detail=res.data
+			})
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+	.top {
+		padding: 80rpx 0 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		flex-direction: column;
+	
+		image {
+			width: 120rpx;
+			height: 120rpx;
+		}
+	
+		.title {
+			color: #000;
+			padding-top: 15rpx;
+			font-size: 32rpx;
+		}
+	
+		.data {
+			padding-top: 30rpx;
+			display: flex;
+	
+			image {
+				width: 40rpx;
+				height: 40rpx;
+			}
+	
+			view {
+				padding-left: 20rpx;
+	
+				text:first-child {
+					color: #000;
+					font-size: 38rpx;
+				}
+	
+				text:last-child {
+					font-size: 32rpx;
+					padding-left: 20rpx;
+				}
+			}
+		}
+	}
+	
+	.card {
+		margin-top: 50rpx;
+		padding: 20rpx 30rpx;
+		background-color: #FFFFFF;
+		
+		.item{
+			padding: 20rpx 0;
+			font-size: 28rpx;
+			color: #888888;
+			margin: 0 20rpx;
+			display: flex;
+			justify-content: space-between;
+		}
+	}
+	
+	.question{
+		color: #888888;
+		background-color: #FFFFFF;
+		margin-top: 20rpx;
+		margin-bottom: 50rpx;
+		padding: 20rpx 50rpx;
+		display: flex;
+		justify-content: space-between;
+	}
+	.strong{
+		font-weight: bold;
+		color: #000;
+	}
+</style>

+ 139 - 33
pages/withdraw/withdraw.vue

@@ -23,39 +23,36 @@
 			</view>
 		</navigator>
 		<view class="card">
-			<text class="title">提现金额</text>
+			<text class="title" v-if="type==withdrawType.BALANCE_WITHDRAW">结算金额</text>
+			<text class="title" v-else>提现金额</text>
 
 			<view class="input">
 				<text class="text-price center  text-bold" style="font-size: 60rpx;"></text>
 				<view @click="show" class="margin-left-20 center"
 					style="width: 60%;justify-content: flex-start;color: #ff9900;">
 					<text class="text-xl" v-text="withdrawAmount"></text>
-					<view class="cusor"></view>
+					<view class="cusor" v-if="type==withdrawType.POINT_WITHDRAW"></view>
 				</view>
-				<view @click="allWithdraw" class="center margin-bottom-10 margin-left-20">
+				<view  v-if="type==withdrawType.POINT_WITHDRAW" @click="allWithdraw" class="center margin-bottom-10 margin-left-20">
 					<view class="cu-btn withdraw-btn sm round center">
 						<text>全部提现</text>
 					</view>
 				</view>
 			</view>
-
 			<view class="canWithdraw">
-				可提现金额
-				<text class="text-price margin-left-20" style="font-size: 34rpx;">{{canWithDraw}}</text>
-			</view>
-			<view class="rate">
-				<view class="item">
-					<text>服务费</text>
-					<text class="text-price">0.10</text>
+				<text class="text-base text-sm " style="margin-bottom: 20rpx;">* 到账金额以实际为准</text>
+				<view class="" style="font-weight: 300;">
+					<text v-if="type==withdrawType.BALANCE_WITHDRAW">可结算金额</text>
+					<text v-else >可提现金额</text>
+					<text class="price margin-left-20" style="font-size: 32rpx;">{{canWithDraw}}</text>
 				</view>
-				<view class="item">
-					<view class="">
-						<text>费率</text>
-						<text @click="rateShow=true" class="cuIcon-question margin-left-10 text-lg"></text>
-					</view>
-					<text class="">0.05%</text>
+				
+				<view class="margin-top-10" style="font-weight: 300;" v-if="type=='withdraw'">
+					<text>费率</text>
+					<text @click="rateShow=true" class="cuIcon-question margin-left-10 text-lg"></text>
 				</view>
 			</view>
+	
 		</view>
 
 		<u-popup v-model="rateShow" :mask-close-able="false" mode="center" height="40%" width="76%" borderRadius="20"
@@ -80,8 +77,8 @@
 			</view>
 		</u-popup>
 
-		<amountInput :maxNumber="canWithDraw" ref="amountInput" confirmText="确认提现" btnColor="#ff9900" @change="change"
-			@confirm="withdrawConfirm"></amountInput>
+		<amountInput :maxNumber="canWithDraw" ref="amountInput" :confirmText="type==withdrawType.BALANCE_WITHDRAW?'确认结算':'确认提现'" btnColor="#ff9900" @change="change"
+			@confirm="debounceWithdraw"></amountInput>
 
 		<u-modal :mask-close-able="true" confirm-text="确定提现" @confirm="doWithdraw" v-model="passwordShow" title="提示">
 			<view class="slot-content" style="padding: 20rpx;">
@@ -89,6 +86,7 @@
 			</view>
 		</u-modal>
 		<toast ref="toast"></toast>
+		<loading ref="loading" type="3"/>
 	</view>
 </template>
 
@@ -101,6 +99,11 @@
 		},
 		data() {
 			return {
+				//提现的id
+				withdrawId:'',
+				//默认积分提现
+				withdrawType:this.$global.WITHDRAW_TYPE,
+				type:this.$global.WITHDRAW_TYPE.POINT_WITHDRAW,
 				rateShow: false,
 				bank: {},
 				//可提现
@@ -110,11 +113,13 @@
 				//提现密码
 				withdrawPassword: '',
 				passwordShow: false,
+				count:0,
 			};
 		},
-		onLoad() {
+		onLoad(options) {
 			this.fetchCardList()
-			this.fetchShopDetail()
+			this.init(options)
+			this.fetchBillsInfo()
 		},
 		onShow() {
 			if (this.canReset) {
@@ -131,7 +136,6 @@
 					return this.$util.dealAccountNo(data)
 				}
 			},
-
 			dealBankCodeType() {
 				return data => {
 					return this.$getBankCodeType(data)
@@ -139,6 +143,36 @@
 			}
 		},
 		methods: {
+			async fetchBillsInfo() {
+				let params = {
+					shopId: this.vuex_shopId
+				}
+				let res=await this.$api.shop.shopBillsInfo(params)
+				let dataInfo = res.data
+				if (this.type==this.$global.WITHDRAW_TYPE.BALANCE_WITHDRAW) {
+					this.canWithDraw=dataInfo.balance
+					this.withdrawAmount=this.canWithDraw
+					this.$refs.amountInput.initialMoney(this.withdrawAmount)
+				}else if (this.type==this.$global.WITHDRAW_TYPE.POINT_WITHDRAW) {
+					this.canWithDraw=dataInfo.point
+				}
+			},
+			init(options){
+				this.type=options.type
+				
+				if (this.type==this.$global.WITHDRAW_TYPE.BALANCE_WITHDRAW) {
+					uni.setNavigationBarTitle({
+						title:'余额结算'
+					})
+					return
+				}
+				if (this.type==this.$global.WITHDRAW_TYPE.POINT_WITHDRAW) {
+					uni.setNavigationBarTitle({
+						title:'积分提现'
+					})
+					return
+				}
+			},
 			async fetchShopDetail() {
 				let params = {
 					id: this.vuex_shopId
@@ -163,19 +197,69 @@
 				}
 			},
 			show() {
-				this.$refs.amountInput.show()
+				if (this.type==this.$global.WITHDRAW_TYPE.POINT_WITHDRAW) {
+					this.$refs.amountInput.show()
+				}else{
+					this.$refs.toast.info('不可修改结算金额')
+				}
 			},
 			//全部提现
 			allWithdraw() {
 				this.withdrawAmount = this.canWithDraw
 				this.$refs.amountInput.initialMoney(this.withdrawAmount)
 			},
-			withdrawConfirm() {
+			//防抖提现
+			debounceWithdraw() {
+				if (this.isFirst) {
+					this.withdrawConfirm()
+					this.isFirst = false
+				} else {
+					this.$u.debounce(this.withdrawConfirm, 500)
+				}
+			},
+			async withdrawConfirm() {
 				if (this.$isEmpty(this.bank)) {
 					this.$u.toast('请选择银行')
 					return
 				}
-				this.$refs.toast.warn('业务暂未开通')
+				let params={
+					ownerType:'商户',
+					ownerId:this.vuex_shopId,
+					price:this.withdrawAmount,
+					bankAccountType:this.bank.bankCardType,
+					bankCode:this.bank.bankCode,
+					receiverAccountName:this.bank.accountName,
+					receiverAccountNo:this.bank.accountNo,
+					userBankId:this.bank.bindCardId,
+					receiveType:'REAL_TIME'
+				}
+				let res={}
+				if (this.type==this.$global.WITHDRAW_TYPE.POINT_WITHDRAW) {
+					res=await this.$api.withdraw.userPointWithdraw(params)
+				}
+				
+				if (this.type==this.$global.WITHDRAW_TYPE.BALANCE_WITHDRAW) {
+					res=await this.$api.withdraw.userBalanceWithdraw(params)
+				}
+				if (this.$isEmpty(res.data)) {
+					this.$refs.toast.error('操作失败')
+				}
+				let payOrderParams={
+					orderId:res.data,
+					orderType:'orderType'
+				}
+				let resp={}
+				if (this.type==this.$global.WITHDRAW_TYPE.POINT_WITHDRAW) {
+					resp=await this.$api.withdraw.pointPayOrder(payOrderParams)
+				}
+				if (this.type==this.$global.WITHDRAW_TYPE.BALANCE_WITHDRAW) {
+					resp=await this.$api.withdraw.balancePayOrder(payOrderParams)
+				}
+				if (resp.success && this.$isNotEmpty(resp.data)) {
+					this.withdrawId=resp.data
+					this.$refs.loading.showLoading('处理中')
+					this.check()
+				}
 			},
 			doWithdraw() {
 				if (this.$isEmpty(this.withdrawPassword)) {
@@ -184,7 +268,27 @@
 					return
 				}
 				console.log(md5Libs.md5(this.withdrawPassword));
-			}
+			},
+			check(){
+				let _this=this
+				let timer= setInterval(async ()=>{
+					_this.count++
+					let params={
+						id:_this.withdrawId
+					}
+					let res=await _this.$api.withdraw.detail(params)
+					if (res.data && res.data.withdrawStatus == 'DONE') {
+						this.fetchBillsInfo()
+						this.$refs.toast.info('操作成功')
+						_this.$refs.loading.hide()
+						clearInterval(timer)
+					}
+					if (_this.count == 15) {
+						_this.$refs.loading.hide()
+						clearInterval(timer)
+					}
+				},1000)
+			},
 		}
 	};
 </script>
@@ -243,7 +347,7 @@
 		.btn {
 			padding: 16rpx 38rpx;
 			background-color: #FFE6CD;
-			color: #EF9944;
+			color: $base-color;
 		}
 	}
 
@@ -269,16 +373,18 @@
 
 			.withdraw-btn {
 				background-color: #FFFFFF;
-				color: #EE9230;
-				border: 1rpx solid #EE9230;
-				height: 54rpx;
-				width: 180rpx;
+				color: $base-color;
+				border: 1rpx solid $base-color;
+				height: 52rpx;
+				width: 170rpx;
 				font-size: 28rpx;
 				line-height: 54rpx;
 			}
 		}
 
 		.canWithdraw {
+			flex-direction: column;
+			display: flex;
 			margin-top: 24rpx;
 			color: #252525;
 		}
@@ -305,7 +411,7 @@
 	}
 
 	.submit-btn {
-		background-color: #EE9230;
+		background-color: $base-color;
 		color: #FFFFFF;
 		border-radius: 10rpx;
 	}
@@ -341,7 +447,7 @@
 		width: 6rpx;
 		border-radius: 20rpx;
 		height: 60%;
-		background-color: #ff9900;
+		background-color: $base-color;
 		animation: blink 1200ms infinite ease-in-out;
 	}
 

+ 647 - 0
pagesGoods/pages/menu/menu.vue

@@ -0,0 +1,647 @@
+<template>
+	<view class="u-wrap ">
+		<view class="flex bg-white" style="padding: 30rpx 10rpx;">
+			<view class="" style="width: 20%;">
+				<u-button @click="operateCategory(null)" size="mini" type="warning" plain
+					class=" text-sm text-red flex text-bold">
+					<text>添加分类</text>
+					<text class="cuIcon-add u-m-l-4 center"></text>
+				</u-button>
+			</view>
+
+			<view @click="operateGoods(null)" class="center bg-white" style="width: 80%;color: #007AFF;">
+				<text class="cuIcon-roundadd margin-right-10"></text>
+				<text>添加【{{goodsList[current].goodsCategory.name}}】分类下商品</text>
+			</view>
+		</view>
+		<view class="u-menu-wrap">
+			<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop">
+				<view v-for="(item,index) in goodsList" :key="index" class="u-tab-item"
+					:class="[current==index ? 'u-tab-item-active' : '']" :data-current="index"
+					@tap.stop="swichMenu(index)">
+					<view class="">
+						<text class="u-line-1 u-m-r-4"
+							:style="!item.goodsCategory.showStatus?'text-decoration: line-through;color: #bababa':''">{{item.goodsCategory.name}}</text>
+						<u-icon color="#EF9944" @click="operateCategory(item.goodsCategory)" name="edit-pen-fill">
+						</u-icon>
+					</view>
+				</view>
+			</scroll-view>
+			<block v-for="(item,index) in goodsList" :key="index">
+				<scroll-view scroll-y class="right-box" v-if="current==index">
+					<view class="page-view">
+						<view class="class-item">
+							<view class="item-title">
+								<text>{{item.goodsCategory.name}}</text>
+							</view>
+							<view class="item-container">
+								<view class="thumb-box" v-for="(goods, index1) in item.goods" :key="index1">
+									<image @click="$util.preview(goods.image)" class="item-menu-image"
+										:src="goods.image" mode=""></image>
+									<view class="item-content">
+										<view class="name flex justify-between ">
+											<view class="text-cut-1 " style="width: 75%;">
+												<text>{{goods.name}}</text>
+											</view>
+											<view class="text-red text-sm" @click="operateGoods(goods)">
+												<text>编辑</text>
+												<text class="cuIcon-edit u-m-l-2"></text>
+											</view>
+										</view>
+										<view class="tips">
+											<view class="text-cut-1 " style="width: 75%;">
+												{{ goods.description}}
+											</view>
+
+											<view class="text-blue text-sm" @click="operateSku(goods)">
+												<text>规格</text>
+												<text class="cuIcon-goods u-m-l-2"></text>
+											</view>
+										</view>
+										<view class="price_and_action">
+											<text class="price">¥{{ goods.defaultPrice / 100 }}</text>
+											<text v-if="!goods.isSell"
+												class="margin-left-20 text-sm text-red">已下架</text>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</block>
+		</view>
+
+
+		<!-- 分类 -->
+		<u-popup borderRadius="12" v-model="categoryShow" mode="center" width="80%">
+			<view class="center padding-30 flex-direction">
+				<text class="text-center  text-lg" v-text="categoryEdit?'修改分类':'添加分类'"></text>
+				<view class="margin-top-30">
+					<u-form :model="categoryForm" ref="uForm" label-width="140">
+						<u-form-item label="分类名称">
+							<u-input :clearable="false" v-model="categoryForm.name" />
+						</u-form-item>
+						<u-form-item label="显示顺序">
+							<u-number-box v-model="categoryForm.displayOrder" ::min="1" :max="100"></u-number-box>
+						</u-form-item>
+						<u-form-item label="是否显示">
+							<view class="center" style="justify-content: flex-start;">
+								<u-switch active-color="#FF9447" v-model="categoryForm.showStatus" active-value="1"
+									inactive-value="0"></u-switch>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="center " style="margin-top: 60rpx;width: 100%;justify-content: space-around;">
+					<block v-if="categoryEdit">
+						<view @click="deleteCategory" class="cu-btn  flex  text-lg line-red radius"
+							style="padding: 40rpx 0;width: 46%;">
+							删除
+						</view>
+						<view @click="submitCategory" class="cu-btn  flex  text-lg bg-base radius"
+							style="padding: 40rpx 0;width: 46%;">
+							确认
+						</view>
+					</block>
+					<view v-else @click="submitCategory" class="cu-btn  flex  text-lg bg-base radius"
+						style="padding: 40rpx 0;width: 90%;">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 商品 -->
+		<u-popup borderRadius="12" v-model="goodsShow" mode="center" width="90%">
+			<view class="bg-white center  flex-direction" style="padding: 30rpx 20rpx;">
+				<text class="text-center text-bold text-lg" v-text="goodsEdit?'修改商品':'添加商品'"></text>
+				<view class="margin-top-10">
+					<u-form :error-type="['toast']" :model="goodsForm" ref="uGoodsForm" label-width="160">
+						<u-form-item prop="image" :required="true" label="商品图片" label-position="top">
+							<view class="" style="margin-top: -40rpx;margin-bottom: -20rpx;">
+								<mp-upload-img ref="mpUploadImg" @delImg="delGoodsImg" @click='uploadGoodsImg'
+									:count="1" col="3"></mp-upload-img>
+							</view>
+						</u-form-item>
+						<u-form-item :required="true" label="所在分类">
+							<u-input :clearable="false" disabled placeholder-style="color:#d8d8d8"
+								v-model="goodsForm.goodsCategoryName" />
+						</u-form-item>
+						<u-form-item :required="true" label="商品名称" prop="name">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8" v-model="goodsForm.name" />
+						</u-form-item>
+						<u-form-item :required="true" label="商品单价">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8" v-model="price" />
+							<text slot="right">元</text>
+						</u-form-item>
+						<u-form-item label="显示顺序">
+							<u-number-box v-model="goodsForm.displayOrder" ::min="1" :max="100"></u-number-box>
+						</u-form-item>
+						<u-form-item label="是否在卖">
+							<view class="center" style="justify-content: flex-start;">
+								<u-switch active-color="#FF9447" v-model="goodsForm.isSell" active-value="1"
+									inactive-value="0"></u-switch>
+							</view>
+						</u-form-item>
+						<u-form-item label="商品描述">
+							<u-input :clearable="false" placeholder-style="color:#d8d8d8"
+								v-model="goodsForm.description" placeholder="请输入商品描述" />
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="center " style="margin-top: 60rpx;width: 100%;justify-content: space-around;">
+					<block v-if="goodsEdit">
+						<view @click="deleteGoods" class="cu-btn  flex  text-lg line-red radius"
+							style="padding: 40rpx 0;width: 46%;">
+							删除
+						</view>
+						<view @click="submitGoods" class="cu-btn  flex  text-lg bg-base radius"
+							style="padding: 40rpx 0;width: 46%;">
+							确认
+						</view>
+					</block>
+					<view v-else @click="submitGoods" class="cu-btn  flex  text-lg bg-base radius"
+						style="padding: 40rpx 0;width: 90%;">
+						确认
+					</view>
+				</view>
+			</view>
+		</u-popup>
+
+		<toast ref="toast"></toast>
+	</view>
+</template>
+
+<script>
+	import mpUploadImg from "@/components/mp-uploadImg/mp-uploadImg.vue"
+	export default {
+		components: {
+			mpUploadImg
+		},
+		data() {
+			return {
+				goodsList: [],
+
+				//分类
+				operateCategoryItem: {},
+				categoryEdit: false,
+				categoryShow: false,
+				categoryForm: {
+					id: '',
+					shopId: '',
+					name: '',
+					displayOrder: 1,
+					//是否显示
+					showStatus: 1,
+				},
+
+				//商品 begin
+				imgList: [],
+				price: 0,
+				operateGoodsItem: {},
+				goodsEdit: false,
+				goodsShow: false,
+				goodsForm: {
+					id: '',
+					shopId: '',
+					goodsCategoryName: '',
+					name: '',
+					displayOrder: 1,
+					defaultPrice: 0,
+					isSell: 1,
+					image: '',
+					description: null
+				},
+				goodsRules: {
+					image: [{
+						required: true,
+						message: '请上传商品图片',
+						trigger: ['blur', 'change']
+					}],
+					name: [{
+						required: true,
+						message: '请输入商品名称',
+						trigger: ['blur', 'change']
+					}],
+				},
+				//商品 end
+
+
+				// 菜单
+				scrollTop: 0, //tab标题的滚动条位置
+				current: 0, // 预设当前项的值
+				menuHeight: 0, // 左边菜单的高度
+				menuItemHeight: 0, // 左边菜单item的高度
+			}
+		},
+		onLoad() {
+			this.getGoodsList()
+		},
+		onReady() {
+			this.$refs.uGoodsForm.setRules(this.goodsRules);
+		},
+		methods: {
+			getGoodsList() {
+				let params = {
+					shopId: this.vuex_shopId
+				}
+				this.$api.goods.list(params).then(res => {
+					this.goodsList = res.data
+				})
+			},
+
+			//分类 begin
+			operateCategory(item) {
+				this.operateCategoryItem = item
+				this.categoryShow = true
+				if (this.$isEmpty(item)) {
+					//添加分类
+					this.reSetCategoryForm()
+					this.categoryEdit = false
+					return
+				}
+				//修改分类
+				this.categoryEdit = true
+				this.$util.objectCoppy(this.categoryForm, item)
+			},
+			async submitCategory() {
+				if (this.$isEmpty(this.categoryForm.name)) {
+					this.$u.toast('请输入类目名称!')
+					return
+				}
+
+				if (!this.categoryEdit) {
+					let flag = this.goodsList.some(item => item.goodsCategory.name == this.categoryForm.name)
+					if (flag) {
+						this.$u.toast('已有该名称的类目!')
+						return
+					}
+				}
+
+				this.categoryForm.shopId = this.vuex_shopId
+				let res = await this.$api.goodsCategory.submit(this.categoryForm)
+				if (res.success) {
+					this.$u.toast('操作成功')
+					this.getGoodsList()
+					this.categoryShow = false
+				}
+			},
+			deleteCategory() {
+				this.$dialog.showModal('确定删除该分类?').then(() => {
+					this.$api.goodsCategory.remove(this.operateCategoryItem.id).then(res => {
+						if (res.success) {
+							this.$u.toast('删除成功')
+							this.current = 0
+							this.categoryShow = false
+							this.getGoodsList()
+						}
+					})
+				})
+			},
+			reSetCategoryForm() {
+				this.categoryForm = {
+					id: '',
+					shopId: '',
+					name: '',
+					displayOrder: 1,
+					//是否显示
+					showStatus: 1,
+				}
+			},
+			//分类 end
+
+			//商品begin
+			uploadGoodsImg(e) {
+				this.goodsForm.image = e[0]
+			},
+			operateGoods(item) {
+				this.goodsForm.goodsCategoryName = this.goodsList[this.current].goodsCategory.name
+				this.operateGoodsItem = item
+				this.goodsShow = true
+				if (this.$isEmpty(item)) {
+					//添加商品
+					this.reSetGoodsData()
+					this.goodsEdit = false
+					return
+				}
+				//修改商品
+				this.price = item.defaultPrice / 100
+				this.imgList = [item.image]
+				this.$refs.mpUploadImg.changeImgList(this.imgList)
+
+				this.goodsEdit = true
+				this.$util.objectCoppy(this.goodsForm, item)
+			},
+			delGoodsImg(item) {
+				this.imgList = item[0]
+				this.goodsForm.image = this.imgList
+			},
+			reSetGoodsData() {
+				this.price = 0
+				this.imgList = []
+				this.$refs.mpUploadImg.changeImgList(this.imgList)
+				let goodsCategoryName = this.goodsForm.goodsCategoryName
+				this.goodsForm = {
+					id: '',
+					shopId: '',
+					goodsCategoryName,
+					name: '',
+					displayOrder: 1,
+					defaultPrice: 0,
+					isSell: 1,
+					image: '',
+					description: null
+				}
+			},
+			submitGoods() {
+				this.$refs.uGoodsForm.validate(valid => {
+					if (valid) {
+						this.goodsForm.defaultPrice = this.price * 100
+						if (this.$isEmpty(this.goodsForm.defaultPrice)) {
+							this.$u.toast('请输入商品单价')
+							return
+						}
+						this.doSubmitGoods()
+
+					} else {
+						console.log('验证失败');
+					}
+				});
+			},
+			async doSubmitGoods() {
+				this.goodsForm.shopId = this.vuex_shopId
+				let res = await this.$api.goods.submit(this.goodsForm)
+				if (res.success) {
+					this.$u.toast('操作成功')
+					this.getGoodsList()
+					this.goodsShow = false
+				}
+			},
+			deleteGoods() {
+				this.$dialog.showModal('确定删除该商品?').then(() => {
+					this.$api.goods.remove(this.operateGoodsItem.id).then(res => {
+						if (res.success) {
+							this.$u.toast('删除成功')
+							this.goodsShow = false
+							this.getGoodsList()
+						}
+					})
+				})
+			},
+			//商品end
+			
+			//商品属性begin
+			operateSku(goods){
+				let params={
+					goodsName:goods.name,
+					goodsId:goods.id
+				}
+				uni.navigateTo({
+					url:"/pagesGoods/pages/menu/sku"+this.$u.queryParams(params),
+				})
+			},
+
+			//商品属性end
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+			//菜单 begin
+			// 点击左边的栏目切换
+			async swichMenu(index) {
+				if (index == this.current) return;
+				this.current = index;
+				// 如果为0,意味着尚未初始化
+				if (this.menuHeight == 0 || this.menuItemHeight == 0) {
+					await this.getElRect('menu-scroll-view', 'menuHeight');
+					await this.getElRect('u-tab-item', 'menuItemHeight');
+				}
+				// 将菜单菜单活动item垂直居中
+				this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
+			},
+			// 获取一个目标元素的高度
+			getElRect(elClass, dataVal) {
+				new Promise((resolve, reject) => {
+					const query = uni.createSelectorQuery().in(this);
+					query.select('.' + elClass).fields({
+						size: true
+					}, res => {
+						// 如果节点尚未生成,res值为null,循环调用执行
+						if (!res) {
+							setTimeout(() => {
+								this.getElRect(elClass);
+							}, 10);
+							return;
+						}
+						this[dataVal] = res.height;
+					}).exec();
+				})
+			}
+			// 菜单end
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.u-wrap {
+		height: calc(100vh);
+		/* #ifdef H5 */
+		height: calc(100vh - var(--window-top));
+		/* #endif */
+		display: flex;
+		flex-direction: column;
+	}
+
+	.u-menu-wrap {
+		flex: 1;
+		display: flex;
+		overflow: hidden;
+	}
+
+	.u-tab-view {
+		width: 200rpx;
+		height: 100%;
+	}
+
+	.u-tab-item {
+		height: 110rpx;
+		background: #f6f6f6;
+		box-sizing: border-box;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		font-size: 26rpx;
+		color: #444;
+		font-weight: 400;
+		line-height: 1;
+	}
+
+	.u-tab-item-active {
+		position: relative;
+		color: #000;
+		font-size: 30rpx;
+		font-weight: 600;
+		background: #fff;
+	}
+
+	.u-tab-item-active::before {
+		content: "";
+		position: absolute;
+		border-left: 4px solid $u-type-primary;
+		height: 32rpx;
+		left: 0;
+		top: 39rpx;
+	}
+
+	.u-tab-view {
+		height: 100%;
+	}
+
+	.right-box {
+		background-color: rgb(250, 250, 250);
+	}
+
+	.page-view {
+		padding: 16rpx;
+	}
+
+	.class-item {
+		margin-bottom: 30rpx;
+		background-color: #fff;
+		padding: 16rpx;
+		border-radius: 8rpx;
+	}
+
+	.item-title {
+		font-size: 26rpx;
+		color: $u-main-color;
+		font-weight: bold;
+	}
+
+	.item-container {
+		display: flex;
+		flex-wrap: wrap;
+
+		.thumb-box {
+			width: 100%;
+			display: flex;
+			padding: 20rpx 0;
+			border-bottom: 1rpx solid #EEEEEE;
+
+			.item-menu-image {
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 8rpx;
+			}
+
+			.item-content {
+				width: calc(100% - 180rpx);
+			}
+
+
+			.name {
+				font-size: $font-size-base;
+				margin-bottom: 10rpx;
+			}
+
+			.tips {
+				width: 100%;
+				height: 40rpx;
+				display: flex;
+				justify-content: space-between;
+				line-height: 40rpx;
+				white-space: nowrap;
+				font-size: $font-size-sm;
+				color: $text-color-assist;
+				margin-bottom: 10rpx;
+			}
+
+			.price_and_action {
+				width: 100%;
+				display: flex;
+				align-items: center;
+				margin-top: 30rpx;
+
+				.price {
+					font-size: $font-size-base;
+					font-weight: 600;
+				}
+
+				.btn-group {
+					display: flex;
+					justify-content: space-between;
+					align-items: center;
+					position: relative;
+
+					.btn {
+						background-color: $base-color;
+						padding: 0 20rpx;
+						box-sizing: border-box;
+						font-size: $font-size-sm;
+						height: 44rpx;
+						line-height: 44rpx;
+
+						&.property_btn {
+							border-radius: 24rpx;
+						}
+
+						&.add_btn,
+						&.reduce_btn {
+							color: #FFFFFF;
+							border: $base-color;
+							padding: 0;
+							width: 44rpx;
+							border-radius: 44rpx;
+						}
+					}
+
+					.dot {
+						position: absolute;
+						background-color: #ffffff;
+						border: 1px solid $color-primary;
+						color: $color-primary;
+						font-size: $font-size-sm;
+						width: 36rpx;
+						height: 36rpx;
+						line-height: 36rpx;
+						text-align: center;
+						border-radius: 100%;
+						right: -12rpx;
+						top: -10rpx;
+					}
+
+					.number {
+						width: 44rpx;
+						height: 44rpx;
+						line-height: 44rpx;
+						text-align: center;
+					}
+				}
+			}
+		}
+
+		.thumb-box:last-child {
+			border: none;
+		}
+	}
+</style>

+ 130 - 0
pagesGoods/pages/menu/sku.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="">
+		<view class="">
+			<view class="" style="padding: 20rpx 30rpx;">
+				<u-form :model="form" ref="uForm" label-width="140">
+					<u-form-item label="商品名称">
+						<u-input v-model="form.goodsName" />
+					</u-form-item>
+					<u-form-item label="商品属性">
+						<u-input v-model="form.category" :select-open="goodsPropertyShow" type="select" @click="goodsPropertyShow=true"/>
+					</u-form-item>
+					<u-form-item label="重置价格" v-if="form.category == '大小'">
+						<view class="flex justify-between" >
+							<u-input v-model="form.rebasePrice" />
+							<text>元</text>
+						</view>
+					</u-form-item>
+				</u-form>
+				<view @click="addInput" class="text-right text-blue " style="padding: 30rpx 10rpx;">
+					<text class="cuIcon-roundadd u-m-r-4"></text>
+					<text>添加可选项</text>
+				</view>
+				
+				<view style="position: relative;" class="u-border flex"
+					v-for="(item,index) in inputList" :key="index">
+					<view class="" style="width: 70%;">
+						<u-form :model="form" ref="uForm" label-width="140">
+							<u-form-item label="可选项">
+								<u-input v-model="item.propertyOption" />
+							</u-form-item>
+							<u-form-item :border-bottom="false" label="额外价格">
+								<view class="flex">
+									<u-input v-model="item.extraPrice" />
+									<text>元</text>
+								</view>
+							</u-form-item>
+						</u-form>
+					</view>
+				
+					<view class="center" style="width: 30%;" @click="activeIndex = index">
+						<view class=" margin-left-20 text-base" v-if="activeIndex == index">
+							<text class="cuIcon-roundcheckfill " style="font-size: 40rpx;"></text>
+							<text class="text-sm margin-left-10">默认</text>
+						</view>
+						<view v-else @click="activeIndex = index"></view>
+					</view>
+					<text @click="delInput(index)" v-if="inputList.length>1"
+						style="position: absolute;right: 20rpx;top: 20rpx;font-size: 30rpx;"
+						class="text-lg cuIcon-delete text-red"></text>
+				</view>
+			</view>
+			
+			
+		</view>
+		<view class="center" style="margin-top: 40rpx;">
+			<view @click="submit" class="cu-btn  flex  text-lg btn-bg-color radius"
+				style="padding: 46rpx 0;width: 90%;">
+				确认
+			</view>
+		</view>
+		
+		<u-select @confirm="propertyConfirm" v-model="goodsPropertyShow" :list="goodsPropertyList"></u-select>
+		<toast ref="toast" ></toast>
+	</view>
+</template>
+<script>
+	export default {
+		name: '',
+		data() {
+			return {
+				goodsPropertyShow:false,
+				goodsPropertyList:[],
+				form:{
+					shopId:'',
+					goodsName:'',
+					goodsId:'',
+					category:'',
+					propertyOption:'',
+					isDefault:false,
+					rebasePrice:'',
+					extraPrice:''
+				},
+				
+				activeIndex: 0,
+				inputList: [{
+					propertyOption: '',
+					extraPrice: ''
+				}]
+			};
+		},
+		onLoad(options) {
+			this.goodsPropertyList=this.$global.goodsPropertyList
+			this.form.goodsName=options.goodsName
+			this.form.goodsId=options.goodsId
+		},
+		methods: {
+			propertyConfirm(e){
+				this.form.category=e[0].value
+			},
+			
+			delInput(index) {
+				this.inputList.splice(index, 1)
+			},
+			addInput() {
+				let obj = {
+					propertyOption: '',
+					extraPrice: ''
+				}
+				this.inputList.push(obj)
+			},
+			submit() {
+				let formList=[]
+				this.inputList.forEach((item,index)=>{
+					let obj=this.$u.deepClone(this.form)
+					obj.propertyOption=item.propertyOption
+					obj.extraPrice=item.extraPrice
+					obj.isDefault=this.activeIndex==index
+					formList.push(obj)
+				})
+				console.log(formList);
+			},
+		}
+	};
+</script>
+
+<style>
+	page {
+		background-color: #FFFFFF;
+	}
+</style>

BIN
static/bank/bank.png


BIN
static/icon/ALIPAY.png


BIN
static/icon/UNIONPAY.png


BIN
static/icon/apple.png


BIN
static/icon/discount.png


BIN
static/icon/wx.png


BIN
static/icon/zk.png


+ 66 - 0
uni.scss

@@ -8,3 +8,69 @@ $uni-color-warning: #f0ad4e;
 $uni-color-error: #dd524d;
 
 
+/* 颜色变量 */
+/* 行为相关颜色 */
+$color-primary: #FF9447;
+$color-success: #4cd964;
+$color-warning: #FAB714;
+$color-error: #D12E32;
+
+/* 文字基本颜色 */
+$text-color-base: #5A5B5C; //基本色
+$text-color-assist: #919293; //辅助色
+$text-color-black: #3B3C3E; //黑
+$text-color-grey: #878889; //灰
+$text-color-white: #ffffff; //白
+
+/* 背景颜色 */
+$bg-color: #F1F8FA;
+$bg-color-grey: #F5F5F5;
+$bg-color-primary: #E8EACF;
+
+/* 边框颜色 */
+$border-color:#e2e2e2;
+
+/* 尺寸变量 */
+
+/* 文字尺寸 */
+$font-size-sm:24rpx;
+$font-size-base:28rpx;
+$font-size-lg:32rpx;
+
+/* 图片尺寸 */
+$img-size-sm:40rpx;
+$img-size-base:52rpx;
+$img-size-lg:80rpx;
+
+/* Border Radius */
+$border-radius-sm: 4rpx;
+$border-radius-base: 6rpx;
+$border-radius-lg: 12rpx;
+$border-radius-circle: 50%;
+
+/* 水平间距 */
+$spacing-row-sm: 10px;
+$spacing-row-base: 20rpx;
+$spacing-row-lg: 30rpx;
+
+/* 垂直间距 */
+$spacing-col-sm: 8rpx;
+$spacing-col-base: 16rpx;
+$spacing-col-lg: 24rpx;
+
+/* 透明度 */
+$opacity-disabled: 0.3; // 组件禁用态的透明度
+
+/* 文章场景相关 */
+$color-title: #2C405A; // 文章标题颜色
+$font-size-title:40rpx;
+$color-subtitle: #555555; // 二级标题颜色
+$font-size-subtitle:36rpx;
+$color-paragraph: #3F536E; // 文章段落颜色
+$font-size-paragraph:30rpx;
+
+$box-shadow: 0 20rpx 20rpx -20rpx rgba($color: #333, $alpha: 0.1);
+
+
+
+

+ 38 - 1
utils/global.js

@@ -54,10 +54,47 @@ let global = {
 		CANCEL:'取消付款'
 	},
 	
+	
+	WITHDRAW_TYPE:{
+		BALANCE_WITHDRAW:'BALANCE_WITHDRAW',//商家扫描用户的付款码支付
+		POINT_WITHDRAW:'POINT_WITHDRAW',
+	},
+	
 	flow_prefix:{
 		shop:'appShop-'
-	}
+	},
+	
+	
+	goodsProperty:{
+		"大小":"大小",
+		"温度":"温度",
+		"甜度":"甜度",
+		"口味":"口味",
+		"加料":"加料",
+	},
 	
+	goodsPropertyList: [
+		{
+			value: '大小',
+			label: '大小'
+		},
+		{
+			value: '温度',
+			label: '温度'
+		},
+		{
+			value: '甜度',
+			label: '甜度'
+		},
+		{
+			value: '口味',
+			label: '口味'
+		},
+		{
+			value: '加料',
+			label: '加料'
+		}
+	],
 	
 }
 

+ 1 - 4
utils/mixin.js

@@ -31,14 +31,11 @@ let page = {
 			'pages/login/forget',
 			'pages/login/register',
 			'pages/login/account-login',
-			'pages/shop-info/shop-info',
 			'pages/webView/webView',
 			'pages/login/submit-success',
 			'pages/test/test',
 			'pages/chooseLable/chooseLable',
-			'pages/withdraw/withdraw',
-			'pages/withdraw/select-bank',
-			'pages/pay/pay',
+			'pages/shop-info/shop-info',
 		]
 		if (!WHiTE_LIST.includes(currentPage)) {
 			if (!this.$cache.get('phone')) {