Ver Fonte

5-20-user

lhl há 2 anos atrás
pai
commit
c15310fe0a

+ 299 - 182
api/user.js

@@ -1,183 +1,300 @@
-import request from '@/utils/request'
-
-
-//查看子点位
-export function lookSubpoints(data,id){
-	return request({
-		url:'/api/tree/children/'+id,
-		method:'get',
-		data
-	})
-}
-//查看自己的点位
-export function lookOneself(data){
-	return request({
-		url:'/api/tree/points',
-		method:'get',
-		data
-		
-	})
-}
-
-//绑定上级
-export function spread(data) {
-	return request({
-		url:'/api/user/spread',
-		method: 'post',
-		data
-	})
-}
-
-//我的推广
-export function myspread(data) {
-	return request({
-		url: '/api/spread/people',
-		method: 'POST',
-		data
-	});
-}
-
-// 订单统计信息
-export function orderData(data) {
-	return request({
-		url: '/api/order/data',
-		method: 'get',
-		data
-	});
-}
-
-// 获取用户信息
-export function getUserInfo(data) {
-	return request({
-		url: '/api/userinfo',
-		method: 'get',
-		data
-	});
-}
-// 获取用户信息
-export function userinfo(data) {
-	return request({
-		url: '/api/userinfo',
-		method: 'get',
-		data
-	});
-}
-
-// 用户分享图
-export function spreadBanner(data) {
-	return request({
-		url: '/api/spread/banner',
-		method: 'get',
-		data
-	});
-}
-
-// 获取地址列表
-export function getAddressList(data) {
-	return request({
-		url: '/api/address/list',
-		method: 'get',
-		data
-	});
-}
-// 修改地址
-export function addressEdit(data) {
-	return request({
-		url: '/api/address/edit',
-		method: 'post',
-		data
-	});
-}
-// 删除地址
-export function addressDel(data) {
-	return request({
-		url: '/api/address/del',
-		method: 'post',
-		data
-	});
-}
-// 设为默认地址
-export function setAddressDefault(data) {
-	return request({
-		url: '/api/address/default/set',
-		method: 'post',
-		data
-	});
-}
-// 购物车列表
-export function getCartList(data) {
-	return request({
-		url: '/api/cart/list',
-		method: 'get',
-		data
-	});
-}
-
-// 修改购物车数量
-export function getCartNum(data) {
-	return request({
-		url: '/api/cart/num',
-		method: 'post',
-		data
-	});
-}
-//删除购物车
-export function cartDel(data) {
-	return request({
-		url: '/api/cart/del',
-		method: 'post',
-		data
-	});
-}
-//获取收藏夹列表
-export function getcollectList(data) {
-	return request({
-		url: '/api/collect/user',
-		method: 'get',
-		data
-	});
-}
-// 取消收藏
-export function delcollect(data) {
-	return request({
-		url: '/api/collect/del',
-		method: 'post',
-		data
-	});
-}
-
-//积分转账
-export function transfer(data) {
-	return request({
-		url:'/api/trade',
-		method: 'post',
-		data
-	})
-}
-
-//余额转账
-export function yuetransfer(data) {
-	return request({
-		url:'/api/yue/trade',
-		method: 'post',
-		data
-	})
-}
-
-//现金转账
-export function cashtransfer(data) {
-	return request({
-		url:'/api/cash/trade',
-		method: 'post',
-		data
-	})
-}
-
-// 我的分红积分
-export function share(data) {
-	return request({
-		url:'/api/game',
-		method: 'get',
-		data
-	})
+import request from '@/utils/request'
+
+
+//查看子点位
+export function lookSubpoints(data, id) {
+	return request({
+		url: '/api/tree/children/' + id,
+		method: 'get',
+		data
+	})
+}
+//查看自己的点位
+export function lookOneself(data) {
+	return request({
+		url: '/api/tree/points',
+		method: 'get',
+		data
+
+	})
+}
+
+//绑定上级
+export function spread(data) {
+	return request({
+		url: '/api/user/spread',
+		method: 'post',
+		data
+	})
+}
+
+//我的推广
+export function myspread(data) {
+	return request({
+		url: '/api/spread/people',
+		method: 'POST',
+		data
+	});
+}
+
+// 订单统计信息
+export function orderData(data) {
+	return request({
+		url: '/api/order/data',
+		method: 'get',
+		data
+	});
+}
+
+// 获取用户信息
+export function getUserInfo(data) {
+	return request({
+		url: '/api/userinfo',
+		method: 'get',
+		data
+	});
+}
+// 获取用户信息
+export function userinfo(data) {
+	return request({
+		url: '/api/userinfo',
+		method: 'get',
+		data
+	});
+}
+
+// 用户分享图
+export function spreadBanner(data) {
+	return request({
+		url: '/api/spread/banner',
+		method: 'get',
+		data
+	});
+}
+
+// 获取地址列表
+export function getAddressList(data) {
+	return request({
+		url: '/api/address/list',
+		method: 'get',
+		data
+	});
+}
+// 修改地址
+export function addressEdit(data) {
+	return request({
+		url: '/api/address/edit',
+		method: 'post',
+		data
+	});
+}
+// 删除地址
+export function addressDel(data) {
+	return request({
+		url: '/api/address/del',
+		method: 'post',
+		data
+	});
+}
+// 设为默认地址
+export function setAddressDefault(data) {
+	return request({
+		url: '/api/address/default/set',
+		method: 'post',
+		data
+	});
+}
+// 购物车列表
+export function getCartList(data) {
+	return request({
+		url: '/api/cart/list',
+		method: 'get',
+		data
+	});
+}
+
+// 修改购物车数量
+export function getCartNum(data) {
+	return request({
+		url: '/api/cart/num',
+		method: 'post',
+		data
+	});
+}
+//删除购物车
+export function cartDel(data) {
+	return request({
+		url: '/api/cart/del',
+		method: 'post',
+		data
+	});
+}
+//获取收藏夹列表
+export function getcollectList(data) {
+	return request({
+		url: '/api/collect/user',
+		method: 'get',
+		data
+	});
+}
+// 取消收藏
+export function delcollect(data) {
+	return request({
+		url: '/api/collect/del',
+		method: 'post',
+		data
+	});
+}
+
+//积分转账
+export function transfer(data) {
+	return request({
+		url: '/api/trade',
+		method: 'post',
+		data
+	})
+}
+
+//余额转账
+export function yuetransfer(data) {
+	return request({
+		url: '/api/yue/trade',
+		method: 'post',
+		data
+	})
+}
+
+//现金转账
+export function cashtransfer(data) {
+	return request({
+		url: '/api/cash/trade',
+		method: 'post',
+		data
+	})
+}
+
+// 我的分红积分
+export function share(data) {
+	return request({
+		url: '/api/game',
+		method: 'get',
+		data
+	})
+}
+
+//用户修改信息
+export function edit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}
+
+// 申请入驻
+export function ssrz(data) {
+	return request({
+		url: '/api/enter/apply',
+		method: 'post',
+		data
+	});
+}
+
+// 绿卡记录
+export function greenList(data) {
+	return request({
+		url: '/api/green/list',
+		method: 'get',
+		data
+	});
+}
+
+//白积分记录
+export function getWhiteJf(data) {
+	return request({
+		url: '/api/white_integral/list',
+		method: 'get',
+		data
+	})
+}
+
+//绿积分记录
+export function getGreenJf(data) {
+	return request({
+		url: '/api/green_integral/list',
+		method: 'get',
+		data
+	})
+}
+
+//紫积分记录
+export function getPurpleJf(data) {
+	return request({
+		url: '/api/purple_integral/list',
+		method: 'get',
+		data
+	})
+}
+
+//商城积分
+export function GetIntegral(data) {
+	return request({
+		url: '/api/integral/list',
+		method: 'get',
+		data
+	})
+}
+
+//绿卡列表
+export function getGreenCardList(data) {
+	return request({
+		url: '/api/green/list',
+		method: 'get',
+		data
+	})
+}
+
+//文票记录
+export function getWenpiao(data) {
+	return request({
+		url: '/api/paper_ticket/list',
+		method: 'get',
+		data
+	})
+}
+
+//商家记录
+export function getShopIntegral(data) {
+	return request({
+		url: '/api/business_integral/list',
+		method: 'get',
+		data
+	})
+}
+
+// 绿卡赠送
+export function giveGreen(data) {
+	return request({
+		url: '/api/green/give',
+		method: 'post',
+		data
+	})
+}
+
+// 绿积分-->绿卡兑换比例
+export function getGreenBl(data) {
+	return request({
+		url: '/api/green/ratio',
+		method: 'get',
+		data
+	})
+}
+
+// 绿积分兑换绿卡
+export function exchangeGreen(data) {
+	return request({
+		url: '/api/green/exchange',
+		method: 'post',
+		data
+	})
 }

+ 92 - 92
manifest.json

@@ -1,93 +1,93 @@
-{
-    "name" : "喜嗨购",
-    "appid" : "__UNI__F0D4DD1",
-    "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
-    "transformPx" : false,
-    "app-plus" : {
-        /* 5+App特有相关 */
-        "usingComponents" : true,
-        "splashscreen" : {
-            "alwaysShowBeforeRender" : true,
-            "waiting" : true,
-            "autoclose" : true,
-            "delay" : 0
-        },
-        "modules" : {},
-        /* 模块配置 */
-        "distribute" : {
-            /* 应用发布信息 */
-            "android" : {
-                /* android打包配置 */
-                "permissions" : [
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
-                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
-                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
-                ],
-                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
-            },
-            "ios" : {
-                "idfa" : false
-            },
-            /* ios打包配置 */
-            "sdkConfigs" : {
-                "maps" : {},
-                "oauth" : {
-                    "weixin" : {
-                        "appid" : "",
-                        "appsecret" : "",
-                        "UniversalLinks" : ""
-                    }
-                }
-            }
-        }
-    },
-    /* SDK配置 */
-    "quickapp" : {},
-    /* 快应用特有相关 */
-    "mp-weixin" : {
-        /* 小程序特有相关 */
-        "usingComponents" : true,
-        "appid" : "",
-        "setting" : {
-            "urlCheck" : true
-        }
-    },
-    "h5" : {
-        "title" : "响亮商城",
-        "domain" : "",
-        "router" : {
-            "base" : "/index/",
-            "mode" : "hash"
-        },
-        "devServer" : {
-            "proxy" : {
-                "/api" : {
-                    // "target" : "http://lnpt.frp.liuniu946.com/api",
-                    "target" : "https://xl.liuniu946.com/api",
-                    // "changeOrigin": true,
-                    "pathRewrite" : {
-                        "/api" : "" // rewrite path
-                    }
-                }
-            }
-        },
-        "sdkConfigs" : {
-            "maps" : {
-                "qqmap" : {
-                    "key" : "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
-                }
-            }
-        }
-    }
+{
+	"name": "喜嗨购",
+	"appid": "__UNI__F0D4DD1",
+	"description": "",
+	"versionName": "1.0.0",
+	"versionCode": "100",
+	"transformPx": false,
+	"app-plus": {
+		/* 5+App特有相关 */
+		"usingComponents": true,
+		"splashscreen": {
+			"alwaysShowBeforeRender": true,
+			"waiting": true,
+			"autoclose": true,
+			"delay": 0
+		},
+		"modules": {},
+		/* 模块配置 */
+		"distribute": {
+			/* 应用发布信息 */
+			"android": {
+				/* android打包配置 */
+				"permissions": [
+					"<uses-feature android:name=\"android.hardware.camera\"/>",
+					"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+					"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+					"<uses-permission android:name=\"android.permission.CAMERA\"/>",
+					"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+					"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+					"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+					"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
+					"<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+					"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+					"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+					"<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+				],
+				"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"]
+			},
+			"ios": {
+				"idfa": false
+			},
+			/* ios打包配置 */
+			"sdkConfigs": {
+				"maps": {},
+				"oauth": {
+					"weixin": {
+						"appid": "",
+						"appsecret": "",
+						"UniversalLinks": ""
+					}
+				}
+			}
+		}
+	},
+	/* SDK配置 */
+	"quickapp": {},
+	/* 快应用特有相关 */
+	"mp-weixin": {
+		/* 小程序特有相关 */
+		"usingComponents": true,
+		"appid": "",
+		"setting": {
+			"urlCheck": true
+		}
+	},
+	"h5": {
+		"title": "响亮商城",
+		"domain": "",
+		"router": {
+			"base": "/index/",
+			"mode": "hash"
+		},
+		"devServer": {
+			"proxy": {
+				"/api": {
+					// "target" : "http://lnpt.frp.liuniu946.com/api",
+					"target": "http://xhg.frp.liuniu946.com/api",
+					// "changeOrigin": true,
+					"pathRewrite": {
+						"/api": "" // rewrite path
+					}
+				}
+			}
+		},
+		"sdkConfigs": {
+			"maps": {
+				"qqmap": {
+					"key": "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
+				}
+			}
+		}
+	}
 }

+ 645 - 592
pages.json

@@ -1,593 +1,646 @@
-{
-	"easycom": {
-		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
-	},
-	"pages": [{
-			"path": "pages/index/index",
-			"style": {
-				"navigationBarTitleText": "响亮商城",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/index/sign",
-			"style": {
-				"navigationBarTitleText": "天天领现金",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/shoping/list",
-			"style": {
-				"navigationBarTitleText": "店铺列表"
-				
-			}
-		},
-		{
-			"path": "pages/public/register",
-			"style": {
-				"navigationBarTitleText": "注册",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/user/jiedianDetails",
-			"style": {
-				"navigationBarTitleText": "节点团队",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-	 {
-			"path": "pages/public/login",
-			"style": {
-				"navigationBarTitleText": "登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/public/wxLogin",
-			"style": {
-				"navigationBarTitleText": "微信登录",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-
-		{
-			"path": "pages/public/forget",
-			"style": {
-				"navigationBarTitleText": "忘记密码",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/user/jiedian",
-			"style": {
-				"navigationBarTitleText": "我的节点"
-			}
-		},
-		{
-			"path": "pages/user/team",
-			"style": {
-				"navigationBarTitleText": "我的推广"
-			}
-		},
-		{
-			"path": "pages/user/cash",
-			"style": {
-				"navigationBarTitleText": "我的现金"
-			}
-		},
-		{
-			"path": "pages/money/withdmoenys",
-			"style": {
-				"navigationBarTitleText": "转账"
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/index",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "超值拼团"
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/detail",
-			"style": {
-				"navigationBarTitleText": "拼团列表",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/productCollage", //拼团商品
-			"style": {
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				},
-				"navigationBarTitleText": "商品详情"
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/inviteImg",
-			"style": {
-				"navigationBarTitleText": "拼团邀请图",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/product/groupBooking/productGroup",
-			"style": {
-				"navigationBarTitleText": "拼团详情展示",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		// {
-		// 	"path": "pages/product/groupBooking/groupdetails",
-		// 	"style": {
-		// 		"navigationBarTitleText": "拼团详情",
-		// 		"app-plus": {
-		// 			"titleNView": false
-		// 		}
-		// 	}
-		// },
-		{
-			"path": "pages/product/reply",
-			"style": {
-				"navigationBarTitleText": "商品评价",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/product",
-			"style": {
-				"navigationBarTitleText": "详情展示",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/product/seckill",
-			"style": {
-				"navigationBarTitleText": "限时秒杀"
-			}
-		},
-		{
-			"path": "pages/product/list",
-			"style": {
-				"enablePullDownRefresh": true,
-				"navigationBarTitleText": "商品列表"
-			}
-		},
-		{
-			"path": "pages/product/search",
-			"style": {
-				"enablePullDownRefresh": true,
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP || APP-PLUS
-				"app-plus": {
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "请输入关键字",
-							"disabled": false,
-							"placeholderColor": "#606266",
-							"align": "left"
-						},
-						"buttons": [{
-							"text": "搜索",
-							"fontSize": "14",
-							"color": "#303133",
-							"background": "rgba(0,0,0,0)",
-							"width": "40px"
-						}]
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "搜索"
-			}
-		},
-		{
-			"path": "pages/product/classify",
-			"style": {
-				"navigationStyle": "custom",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/set/set",
-			"style": {
-				"navigationBarTitleText": "设置"
-			}
-		},
-		{
-			"path": "pages/set/address",
-			"style": {
-				"navigationBarTitleText": "收货地址"
-			}
-		},
-		{
-			"path": "pages/set/addressManage",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		},
-		{
-			"path": "pages/set/phone",
-			"style": {
-				"navigationBarTitleText": "绑定手机号"
-			}
-		},
-		{
-			"path": "pages/set/user",
-			"style": {
-				"navigationBarTitleText": "绑定上级"
-			}
-		},
-		{
-			"path": "pages/set/password",
-			"style": {
-				"navigationBarTitleText": "修改密码"
-			}
-		},
-		{
-			"path": "pages/set/userinfo",
-			"style": {
-				"navigationBarTitleText": "修改资料"
-			}
-		}, {
-			"path": "pages/cart/cart",
-			"style": {
-				"navigationBarTitleText": "购物车"
-			}
-		},
-
-		{
-			"path": "pages/user/user",
-			"style": {
-				// #ifndef MP-WEIXIN
-				"navigationStyle": "custom",
-				// "app-plus": {
-				// 	"bounce": "none",
-				// 	"titleNView": {
-				// 		"type": "transparent",
-				// 		"buttons": [{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue60f",
-				// 				"fontSize": "24",
-				// 				"color": "#303133",
-				// 				"width": "46px",
-				// 				"background": "rgba(0,0,0,0)"
-				// 			},
-				// 			{
-				// 				"fontSrc": "/static/yticon.ttf",
-				// 				"text": "\ue744",
-				// 				"fontSize": "28",
-				// 				"color": "#303133",
-				// 				"background": "rgba(0,0,0,0)",
-				// 				"redDot": true
-				// 			}
-				// 		]
-				// 	}
-				// },
-				// #endif
-				"navigationBarTitleText": "个人中心"
-			}
-		},
-		{
-			"path": "pages/user/award",
-			"style": {
-				"navigationBarTitleText": "奖励明细",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/user/withdrawal",
-			"style": {
-				"navigationBarTitleText": "奖励提现"
-			}
-		},
-		{
-			"path": "pages/user/notice",
-			"style": {
-				"navigationBarTitleText": "通知"
-			}
-		},
-		{
-			"path": "pages/user/favorites",
-			"style": {
-				"navigationBarTitleText": "收藏夹"
-			}
-		}, {
-			"path": "pages/user/coupon",
-			"style": {
-				"navigationBarTitleText": "我的卡卷"
-			}
-		},
-		{
-			"path": "pages/user/scoreAccumulate",
-			"style": {
-				"navigationBarTitleText": "响亮积分明细"
-			}
-		},
-		{
-			"path": "pages/user/mygx",
-			"style": {
-				"navigationBarTitleText": "我的贡献"
-			}
-		},
-		{
-			"path": "pages/order/order",
-			"style": {
-				"navigationBarTitleText": "我的订单",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-
-		{
-			"path": "pages/order/expressInfo",
-			"style": {
-				"navigationBarTitleText": "快递详情"
-			}
-		},
-		{
-			"path": "pages/order/orderDetail",
-			"style": {
-				"navigationBarTitleText": "订单详情",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/order/evaluate",
-			"style": {
-				"navigationBarTitleText": "评论"
-			}
-		},
-		{
-			"path": "pages/order/orderRefund",
-			"style": {
-				"navigationBarTitleText": "申请退款"
-			}
-		},
-		{
-			"path": "pages/order/createOrder",
-			"style": {
-				"navigationBarTitleText": "创建订单"
-			}
-		}, {
-			"path": "pages/money/pay",
-			"style": {
-				"navigationBarTitleText": "支付"
-			}
-		},
-		{
-			"path": "pages/money/paySuccess",
-			"style": {
-				"navigationBarTitleText": "支付成功"
-			}
-		},
-		{
-			"path": "pages/money/wallet",
-			"style": {
-				"navigationBarTitleText": "我的钱包",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
-		{
-			"path": "pages/money/account",
-			"style": {
-				"navigationBarTitleText": "提现账号"
-			}
-		},
-		{
-			"path": "pages/money/withdrawal",
-			"style": {
-				"navigationBarTitleText": "提现"
-			}
-		},
-		{
-			"path": "pages/money/recharge",
-			"style": {
-				"navigationBarTitleText": "充值"
-			}
-		},
-		{
-			"path": "pages/category/category",
-			"style": {
-				// #ifdef APP-PLUS
-				"navigationStyle": "custom",
-				// #endif
-				// #ifndef MP
-				"app-plus": {
-					"bounce": "none",
-					"titleNView": {
-						"searchInput": {
-							"backgroundColor": "rgba(231, 231, 231,.7)",
-							"borderRadius": "16px",
-							"placeholder": "商品搜索",
-							"disabled": true,
-							"placeholderColor": "#606266",
-							"align": "left"
-						}
-					}
-				},
-				// #endif
-				"navigationBarTitleText": "分类"
-			}
-		},
-		{
-			"path": "pages/redirect/redirect",
-			"style": {
-				"navigationBarTitleText": "微信登录跳转页面",
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-			"path": "pages/category/business",
-			"style": {
-				"navigationBarTitleText": "商圈"
-			}
-		},
-		{
-			"path": "pages/game/game",
-			"style": {
-				"navigationBarTitleText": "游戏"
-				
-			}
-		},
-		{
-			"path": "pages/user/shareQrCode",
-			"style": {
-				"navigationBarTitleText": "邀请好友"
-			}
-		}
-	    ,{
-            "path" : "pages/game/gameDetail",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "打小怪兽"
-                // "enablePullDownRefresh": false
-            }
-            
-        }
-    ],
-	"subPackages": [{
-		"root": "pages/activity",
-		"name": "activity",
-		"pages": [{
-				"path": "goods_bargain/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "goods_bargain_details/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "bargain/index",
-				"style": {
-					"navigationBarTitleText": "砍价记录"
-				}
-			}
-		]
-	}],
-	"globalStyle": {
-		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "响亮商城",
-		"navigationBarBackgroundColor": "#FFFFFF",
-		"backgroundColor": "#f8f8f8",
-		//#ifdef H5
-		"navigationStyle": "custom"
-		//#endif
-	},
-	"tabBar": {
-		"color": "#666666",
-		"selectedColor": "#f65067",
-		"borderStyle": "black",
-		"backgroundColor": "#ffffff",
-		"list": [{
-				"pagePath": "pages/index/index",
-				"iconPath": "static/tabBar/tab-home.png",
-				"selectedIconPath": "static/tabBar/tab-home-current.png",
-				"text": "首页"
-			},
-			{
-				"pagePath": "pages/category/business",
-				"iconPath": "static/tabBar/tab-cate.png",
-				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "商圈"
-			},
-			{
-				"pagePath": "pages/game/game",
-				"iconPath": "static/tabBar/tab-cate.png",
-				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "游戏"
-			},
-			{
-				"pagePath": "pages/cart/cart",
-				"iconPath": "static/tabBar/tab-cart.png",
-				"selectedIconPath": "static/tabBar/tab-cart-current.png",
-				"text": "购物车"
-			},
-			{
-				"pagePath": "pages/user/user",
-				"iconPath": "static/tabBar/tab-my.png",
-				"selectedIconPath": "static/tabBar/tab-my-current.png",
-				"text": "我的"
-			}
-		]
-	}
+{
+	"easycom": {
+		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
+	},
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "喜嗨购",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/sign",
+			"style": {
+				"navigationBarTitleText": "天天领现金",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/shoping/list",
+			"style": {
+				"navigationBarTitleText": "店铺列表"
+
+			}
+		},
+		{
+			"path": "pages/public/register",
+			"style": {
+				"navigationBarTitleText": "注册",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/jiedianDetails",
+			"style": {
+				"navigationBarTitleText": "节点团队",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/login",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/public/wxLogin",
+			"style": {
+				"navigationBarTitleText": "微信登录",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+
+		{
+			"path": "pages/public/forget",
+			"style": {
+				"navigationBarTitleText": "忘记密码",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/jiedian",
+			"style": {
+				"navigationBarTitleText": "我的节点"
+			}
+		},
+		{
+			"path": "pages/user/team",
+			"style": {
+				"navigationBarTitleText": "我的推广"
+			}
+		},
+		{
+			"path": "pages/user/cash",
+			"style": {
+				"navigationBarTitleText": "我的现金"
+			}
+		},
+		{
+			"path": "pages/user/whiteJf",
+			"style": {
+				"navigationBarTitleText": "白积分"
+			}
+		},
+		{
+			"path": "pages/user/greenJf",
+			"style": {
+				"navigationBarTitleText": "绿积分"
+			}
+		},
+		{
+			"path": "pages/user/purpleJf",
+			"style": {
+				"navigationBarTitleText": "紫积分"
+			}
+		},
+		{
+			"path": "pages/user/mallJf",
+			"style": {
+				"navigationBarTitleText": "商城积分"
+			}
+		},
+		{
+			"path": "pages/user/shopJf",
+			"style": {
+				"navigationBarTitleText": "商家积分"
+			}
+		},
+		{
+			"path": "pages/user/wenpiao",
+			"style": {
+				"navigationBarTitleText": "文票"
+			}
+		},
+		{
+			"path": "pages/user/greenChange",
+			"style": {
+				"navigationBarTitleText": "绿卡兑换"
+			}
+		},
+		{
+			"path": "pages/money/withdmoenys",
+			"style": {
+				"navigationBarTitleText": "转账"
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/index",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "超值拼团"
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/detail",
+			"style": {
+				"navigationBarTitleText": "拼团列表",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/productCollage", //拼团商品
+			"style": {
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				},
+				"navigationBarTitleText": "商品详情"
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/inviteImg",
+			"style": {
+				"navigationBarTitleText": "拼团邀请图",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/product/groupBooking/productGroup",
+			"style": {
+				"navigationBarTitleText": "拼团详情展示",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		// {
+		// 	"path": "pages/product/groupBooking/groupdetails",
+		// 	"style": {
+		// 		"navigationBarTitleText": "拼团详情",
+		// 		"app-plus": {
+		// 			"titleNView": false
+		// 		}
+		// 	}
+		// },
+		{
+			"path": "pages/product/reply",
+			"style": {
+				"navigationBarTitleText": "商品评价",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/product",
+			"style": {
+				"navigationBarTitleText": "详情展示",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/product/seckill",
+			"style": {
+				"navigationBarTitleText": "限时秒杀"
+			}
+		},
+		{
+			"path": "pages/product/list",
+			"style": {
+				"enablePullDownRefresh": true,
+				"navigationBarTitleText": "商品列表"
+			}
+		},
+		{
+			"path": "pages/product/search",
+			"style": {
+				"enablePullDownRefresh": true,
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP || APP-PLUS
+				"app-plus": {
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "请输入关键字",
+							"disabled": false,
+							"placeholderColor": "#606266",
+							"align": "left"
+						},
+						"buttons": [{
+							"text": "搜索",
+							"fontSize": "14",
+							"color": "#303133",
+							"background": "rgba(0,0,0,0)",
+							"width": "40px"
+						}]
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "搜索"
+			}
+		},
+		{
+			"path": "pages/product/classify",
+			"style": {
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/set/set",
+			"style": {
+				"navigationBarTitleText": "设置"
+			}
+		},
+		{
+			"path": "pages/set/address",
+			"style": {
+				"navigationBarTitleText": "收货地址"
+			}
+		},
+		{
+			"path": "pages/set/addressManage",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/set/phone",
+			"style": {
+				"navigationBarTitleText": "绑定手机号"
+			}
+		},
+		{
+			"path": "pages/set/user",
+			"style": {
+				"navigationBarTitleText": "绑定上级"
+			}
+		},
+		{
+			"path": "pages/set/password",
+			"style": {
+				"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "pages/set/userinfo",
+			"style": {
+				"navigationBarTitleText": "修改资料"
+			}
+		}, {
+			"path": "pages/cart/cart",
+			"style": {
+				"navigationBarTitleText": "购物车"
+			}
+		},
+
+		{
+			"path": "pages/user/user",
+			"style": {
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// "app-plus": {
+				// 	"bounce": "none",
+				// 	"titleNView": {
+				// 		"type": "transparent",
+				// 		"buttons": [{
+				// 				"fontSrc": "/static/yticon.ttf",
+				// 				"text": "\ue60f",
+				// 				"fontSize": "24",
+				// 				"color": "#303133",
+				// 				"width": "46px",
+				// 				"background": "rgba(0,0,0,0)"
+				// 			},
+				// 			{
+				// 				"fontSrc": "/static/yticon.ttf",
+				// 				"text": "\ue744",
+				// 				"fontSize": "28",
+				// 				"color": "#303133",
+				// 				"background": "rgba(0,0,0,0)",
+				// 				"redDot": true
+				// 			}
+				// 		]
+				// 	}
+				// },
+				// #endif
+				"navigationBarTitleText": "个人中心"
+			}
+		},
+		{
+			"path": "pages/user/award",
+			"style": {
+				"navigationBarTitleText": "奖励明细",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/withdrawal",
+			"style": {
+				"navigationBarTitleText": "奖励提现"
+			}
+		},
+		{
+			"path": "pages/user/notice",
+			"style": {
+				"navigationBarTitleText": "通知"
+			}
+		},
+		{
+			"path": "pages/user/favorites",
+			"style": {
+				"navigationBarTitleText": "收藏夹"
+			}
+		}, {
+			"path": "pages/user/coupon",
+			"style": {
+				"navigationBarTitleText": "我的卡卷"
+			}
+		},
+		{
+			"path": "pages/user/scoreAccumulate",
+			"style": {
+				"navigationBarTitleText": "响亮积分明细"
+			}
+		},
+		{
+			"path": "pages/user/mygx",
+			"style": {
+				"navigationBarTitleText": "我的贡献"
+			}
+		},
+		{
+			"path": "pages/order/order",
+			"style": {
+				"navigationBarTitleText": "我的订单",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+
+		{
+			"path": "pages/order/expressInfo",
+			"style": {
+				"navigationBarTitleText": "快递详情"
+			}
+		},
+		{
+			"path": "pages/order/orderDetail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "pages/order/evaluate",
+			"style": {
+				"navigationBarTitleText": "评论"
+			}
+		},
+		{
+			"path": "pages/order/orderRefund",
+			"style": {
+				"navigationBarTitleText": "申请退款"
+			}
+		},
+		{
+			"path": "pages/order/createOrder",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		}, {
+			"path": "pages/money/pay",
+			"style": {
+				"navigationBarTitleText": "支付"
+			}
+		},
+		{
+			"path": "pages/money/paySuccess",
+			"style": {
+				"navigationBarTitleText": "支付成功"
+			}
+		},
+		{
+			"path": "pages/money/wallet",
+			"style": {
+				"navigationBarTitleText": "我的钱包",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/money/account",
+			"style": {
+				"navigationBarTitleText": "提现账号"
+			}
+		},
+		{
+			"path": "pages/money/withdrawal",
+			"style": {
+				"navigationBarTitleText": "提现"
+			}
+		},
+		{
+			"path": "pages/money/recharge",
+			"style": {
+				"navigationBarTitleText": "充值"
+			}
+		},
+		{
+			"path": "pages/category/category",
+			"style": {
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
+				"app-plus": {
+					"bounce": "none",
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "商品搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
+						}
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "分类"
+			}
+		},
+		{
+			"path": "pages/redirect/redirect",
+			"style": {
+				"navigationBarTitleText": "微信登录跳转页面",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/category/business",
+			"style": {
+				"navigationBarTitleText": "商圈"
+			}
+		},
+		{
+			"path": "pages/game/game",
+			"style": {
+				"navigationBarTitleText": "游戏"
+
+			}
+		},
+		{
+			"path": "pages/user/shareQrCode",
+			"style": {
+				"navigationBarTitleText": "邀请好友"
+			}
+		},
+		{
+			"path": "pages/user/myGreenCard",
+			"style": {
+				"navigationBarTitleText": "我的绿卡"
+			}
+		},
+		{
+			"path": "pages/user/joinShop",
+			"style": {
+				"navigationBarTitleText": "商家入驻"
+			}
+		},
+		{
+			"path": "pages/game/gameDetail",
+			"style": {
+				"navigationBarTitleText": "打小怪兽"
+				// "enablePullDownRefresh": false
+			}
+
+		}
+	],
+	"subPackages": [{
+		"root": "pages/activity",
+		"name": "activity",
+		"pages": [{
+				"path": "goods_bargain/index",
+				"style": {
+					"navigationStyle": "custom"
+						// #ifdef MP
+						,
+					"navigationBarTextStyle": "#fff"
+					// #endif
+				}
+			},
+			{
+				"path": "goods_bargain_details/index",
+				"style": {
+					"navigationStyle": "custom"
+						// #ifdef MP
+						,
+					"navigationBarTextStyle": "#fff"
+					// #endif
+				}
+			},
+			{
+				"path": "bargain/index",
+				"style": {
+					"navigationBarTitleText": "砍价记录"
+				}
+			}
+		]
+	}],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "响亮商城",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8",
+		//#ifdef H5
+		"navigationStyle": "custom"
+		//#endif
+	},
+	"tabBar": {
+		"color": "#666666",
+		"selectedColor": "#f65067",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/category/category",
+				"iconPath": "static/tabBar/cate.png",
+				"selectedIconPath": "static/tabBar/cate-action.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/game/game",
+				"iconPath": "static/tabBar/game.png",
+				"selectedIconPath": "static/tabBar/game-action.png",
+				"text": "游戏"
+			},
+			{
+				"pagePath": "pages/cart/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
+			},
+			{
+				"pagePath": "pages/user/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
+			}
+		]
+	}
 }

+ 599 - 554
pages/cart/cart.vue

@@ -1,555 +1,600 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<view v-if="!hasLogin || empty === true" class="empty">
-			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
-			<view v-if="hasLogin" class="empty-tips">
-				空空如也
-				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛></navigator>
-			</view>
-			<view v-else class="empty-tips">
-				空空如也
-				<view class="navigator" @click="navToLogin">去登陆></view>
-			</view>
-		</view>
-		<view v-else>
-			<!-- 购物车头部 -->
-			<view class="cart-hand flex">
-				<view class="hand-tit">
-					购物车共
-					<text>{{ ' ' + cartList.length }} 件</text>
-					商品
-				</view>
-				<view class="hand-btn" @click="clearCart()">清空购物车</view>
-			</view>
-			<!-- 列表 -->
-			<view class="cart-list">
-				<block v-for="(item, index) in cartList" :key="item.id">
-					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
-						<view class="image-wrapper">
-							<image
-								:src="item.productInfo.image"
-								:class="[item.loaded]"
-								mode="aspectFill"
-								lazy-load
-								@load="onImageLoad('cartList', index)"
-								@error="onImageError('cartList', index)"
-							></image>
-							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
-						</view>
-						<view class="item-right">
-							<text class="clamp title">{{ item.productInfo.store_name }}</text>
-							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
-							<text class="price">¥{{ item.productInfo.price }}</text>
-							<!-- <uni-number-box
-								class="step"
-								:min="1"
-								:max="item.productInfo.stock"
-								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
-								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
-								:isMin="item.cart_num === 1"
-								:index="index"
-								@eventChange="numberChange"
-							></uni-number-box> -->
-							<view class="munbox flex">
-								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item, index)"></image>
-								<input type="number" :value="item.cart_num" disabled />
-								<image src="../../static/icon/add.png" mode="" @click="add(item)"></image>
-							</view>
-						</view>
-						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
-					</view>
-				</block>
-			</view>
-			<!-- 底部菜单栏 -->
-			<view class="action-section">
-				<view class="checkbox">
-					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
-					<!-- <view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view> -->
-				</view>
-				<view class="total-box">
-					<text class="price">¥{{ total }}</text>
-					<!-- <text class="coupon">
-						已优惠
-						<text>74.35</text>
-						元
-					</text> -->
-				</view>
-				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
-			</view>
-		</view>
-		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
-	</view>
-</template>
-
-<script>
-import weixinObj from '@/plugin/jweixin-module/index.js';
-import { getCartList, getCartNum, cartDel } from '@/api/user.js';
-import { mapState } from 'vuex';
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-import { tabbar } from '@/utils/tabbar.js';
-export default {
-	components: {
-		uniNumberBox
-	},
-	data() {
-		return {
-			tabbar: tabbar,
-			current: 3,
-			total: 0, //总价格
-			allChecked: false, //全选状态  true|false
-			empty: false, //空白页现实  true|false
-			cartList: []
-		};
-	},
-	onShow() {
-		// 只有登录时才加载数据
-		if (this.hasLogin) {
-			this.loadData();
-		}
-		weixinObj.hideAllNonBaseMenuItem();
-	},
-	watch: {
-		//显示空白页
-		cartList(e) {
-			let empty = e.length === 0 ? true : false;
-			if (this.empty !== empty) {
-				this.empty = empty;
-			}
-		}
-	},
-	computed: {
-		...mapState('user', ['hasLogin'])
-	},
-	methods: {
-		reduce(item, index) {
-			if (item.cart_num == 1) {
-				uni.showModal({
-					content: '删除该商品?',
-					success: e => {
-						if (e.confirm) {
-							this.deleteCartItem(index);
-						}
-					}
-				});
-			} else {
-				item.cart_num--;
-				this.newNumberChange(item);
-			}
-		},
-		add(item) {
-			console.log(item);
-			if (item.productInfo.stock > item.cart_num) {
-				item.cart_num++;
-				this.newNumberChange(item);
-			} else {
-				return;
-			}
-		},
-		//请求数据
-		async loadData() {
-			let obj = this;
-			getCartList({})
-				.then(function(e) {
-					// 获取当前购物车物品增加数量
-					let nub = obj.cartList.length;
-					// 获取之前对象数组
-					let aArray = obj.cartList.reverse();
-					// 获取返回数据对象数组
-					let bArray = e.data.valid.reverse();
-					obj.cartList = bArray
-						.map((item, ind) => {
-							// 设置返回数据默认为勾选状态
-							item.checked = true;
-							// 获取相同数组之前对象的数据
-							let carlist = aArray[ind];
-							// 判断之前是否已经加载完毕
-							if (carlist && carlist.loaded == 'loaded') {
-								item.loaded = 'loaded';
-							}
-							return item;
-						})
-						.reverse();
-					obj.calcTotal(); //计算总价
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//监听image加载完成
-		onImageLoad(key, index) {
-			// 修改载入完成后图片class样式
-			this.$set(this[key][index], 'loaded', 'loaded');
-		},
-		//监听image加载失败
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 跳转到登录页
-		navToLogin() {
-			// 保存地址
-			saveUrl();
-			// 登录拦截
-			interceptor();
-		},
-		//选中状态处理
-		check(type, index) {
-			if (type === 'item') {
-				this.cartList[index].checked = !this.cartList[index].checked;
-			} else {
-				const checked = !this.allChecked;
-				const list = this.cartList;
-				list.forEach(item => {
-					item.checked = checked;
-				});
-				this.allChecked = checked;
-			}
-			this.calcTotal(type);
-		},
-		//数量
-		numberChange(data) {
-			let arr = this.cartList[data.index];
-			arr.cart_num = data.number;
-			getCartNum({ id: arr.id, number: data.number })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-			this.calcTotal();
-		},
-		newNumberChange(item) {
-			getCartNum({ id: item.id, number: item.cart_num })
-				.then(e => {
-					console.log(e);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-			this.calcTotal();
-		},
-		//删除
-		deleteCartItem(index) {
-			let list = this.cartList;
-			let row = list[index];
-			let id = row.id;
-			cartDel({
-				ids: id
-			});
-			this.cartList.splice(index, 1);
-			uni.hideLoading();
-			this.calcTotal();
-		},
-		//清空
-		clearCart() {
-			uni.showModal({
-				content: '清空购物车?',
-				success: e => {
-					if (e.confirm) {
-						let st = this.cartList.map(e => {
-							return e.id;
-						});
-						cartDel({
-							ids: st.join(',')
-						}).then(e => {
-							console.log(e);
-						});
-						this.cartList = [];
-					}
-				}
-			});
-		},
-		//计算总价
-		calcTotal() {
-			let list = this.cartList;
-			if (list.length === 0) {
-				this.empty = true;
-				return;
-			}
-			let total = 0;
-			let checked = true;
-			list.forEach(item => {
-				if (item.checked === true) {
-					total += item.productInfo.price * item.cart_num;
-				} else if (checked === true) {
-					checked = false;
-				}
-			});
-			this.allChecked = checked;
-			this.total = Number(total.toFixed(2));
-		},
-		//创建订单
-		createOrder() {
-			let list = this.cartList;
-			let goodsData = [];
-			list.forEach(item => {
-				if (item.checked) {
-					goodsData.push(item.id);
-				}
-			});
-
-			uni.navigateTo({
-				url: '/pages/order/createOrder?id=' + goodsData.join(',')
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.container {
-	padding-bottom: 134rpx;
-	background-color: $page-color-base;
-	/* 空白页 */
-	.empty {
-		position: fixed;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100vh;
-		padding-bottom: 100rpx;
-		display: flex;
-		justify-content: center;
-		flex-direction: column;
-		align-items: center;
-		background: #fff;
-		.emptyImg {
-			width: 300rpx;
-			height: 250rpx;
-			margin-bottom: 30rpx;
-		}
-		.empty-tips {
-			display: flex;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-disabled;
-			.navigator {
-				color: #f65067;
-				margin-left: 16rpx;
-			}
-		}
-	}
-}
-/* 购物车列表项 */
-.cart-item {
-	width: 710rpx;
-	height: 210rpx;
-	background: #ffffff;
-	box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
-	border-radius: 10rpx;
-	margin: 20rpx auto;
-
-	display: flex;
-	position: relative;
-	padding: 30rpx 26rpx 30rpx 80rpx;
-	.image-wrapper {
-		width: 150rpx;
-		height: 150rpx;
-		flex-shrink: 0;
-		position: relative;
-		image {
-			border-radius: 8rpx;
-		}
-	}
-	.checkbox {
-		position: absolute;
-		top: 0;
-		bottom: 0;
-		left: -65rpx;
-		margin: auto 0;
-		height: 50rpx;
-		z-index: 8;
-		font-size: 44rpx;
-		line-height: 1;
-		padding: 4rpx;
-		color: $font-color-disabled;
-		background: #fff;
-		border-radius: 50px;
-	}
-	.item-right {
-		display: flex;
-		flex-direction: column;
-		flex: 1;
-		overflow: hidden;
-		position: relative;
-		padding-left: 30rpx;
-		.munbox {
-			width: 144rpx;
-			height: 44rpx;
-			position: absolute;
-			bottom: 0;
-			right: 0;
-			input {
-				display: inline-block;
-				text-align: center;
-			}
-			image {
-				flex-shrink: 0;
-				width: 44rpx;
-				height: 44rpx;
-			}
-		}
-		.title,
-		.price {
-			font-size: $font-base + 2rpx;
-			color: $font-color-dark;
-			height: 40rpx;
-			line-height: 40rpx;
-		}
-		.attr {
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-			height: 50rpx;
-			line-height: 50rpx;
-
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #999999;
-		}
-		.price {
-			// height: 50rpx;
-			// line-height: 50rpx;
-			padding-top: 20rpx;
-			font-size: 34rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ff4c4c;
-		}
-		.step {
-			margin-top: 20rpx;
-		}
-		.title {
-			font-size: 34rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-	}
-	.del-btn {
-		padding: 4rpx 10rpx;
-		font-size: 34rpx;
-		height: 50rpx;
-		color: $font-color-light;
-	}
-}
-/* 底部栏 */
-.action-section {
-	/* #ifdef H5 */
-	margin-bottom: 100rpx;
-	/* #endif */
-	position: fixed;
-	left: 30rpx;
-	bottom: 30rpx;
-	z-index: 95;
-	display: flex;
-	align-items: center;
-	width: 690rpx;
-	height: 100rpx;
-	padding: 0 30rpx;
-	background: rgba(255, 255, 255, 0.9);
-	box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
-	border-radius: 16rpx;
-	.checkbox {
-		height: 52rpx;
-		position: relative;
-		.icon-checked-box {
-			border-radius: 50rpx;
-			background-color: #ffffff;
-			width: 52rpx;
-			height: 100%;
-			position: relative;
-			z-index: 5;
-			font-size: 53rpx;
-			line-height: 1;
-			color: $font-color-light;
-		}
-		.icon-checked {
-			color: $base-color;
-		}
-	}
-	.clear-btn {
-		position: absolute;
-		left: 26rpx;
-		top: 0;
-		z-index: 4;
-		width: 0;
-		height: 52rpx;
-		line-height: 52rpx;
-		padding-left: 38rpx;
-		font-size: $font-base;
-		color: #fff;
-		background: $font-color-disabled;
-		border-radius: 0 50px 50px 0;
-		opacity: 0;
-		transition: 0.2s;
-		&.show {
-			opacity: 1;
-			width: 120rpx;
-		}
-	}
-	.total-box {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		text-align: right;
-		padding-right: 40rpx;
-
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-		}
-		.coupon {
-			font-size: $font-sm;
-			color: $font-color-light;
-			text {
-				color: $font-color-dark;
-			}
-		}
-	}
-	.confirm-btn {
-		padding: 0 38rpx;
-		margin: 0;
-		border-radius: 100px;
-		height: 76rpx;
-		line-height: 76rpx;
-		font-size: $font-base + 2rpx;
-		background: $base-color;
-	}
-}
-/* 复选框选中状态 */
-.action-section .checkbox.checked,
-.cart-item .checkbox.checked {
-	color: $base-color;
-}
-.cart-hand {
-	width: 750rpx;
-	height: 88rpx;
-	background: #ffffff;
-	font-size: 30rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #333333;
-	line-height: 88rpx;
-	padding-left: 28rpx;
-	padding-right: 26rpx;
-	.hand-tit {
-		text {
-			color: #ff4c4c;
-		}
-	}
-	.hand-btn {
-		width: 164rpx;
-		height: 62rpx;
-		border: 2rpx solid #ff4c4c;
-		border-radius: 31rpx;
-		font-size: 26rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ff4c4c;
-		line-height: 62rpx;
-		text-align: center;
-	}
-}
+<template>
+	<view class="container">
+		<!-- 空白页 -->
+		<view v-if="!hasLogin || empty === true" class="empty">
+			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+			<view v-if="hasLogin" class="empty-tips">
+				空空如也
+				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛>
+				</navigator>
+			</view>
+			<view v-else class="empty-tips">
+				空空如也
+				<view class="navigator" @click="navToLogin">去登陆></view>
+			</view>
+		</view>
+		<view v-else>
+			<!-- 购物车头部 -->
+			<view class="cart-hand flex">
+				<view class="hand-tit">
+					购物车共
+					<text>{{ ' ' + cartList.length }} 件</text>
+					商品
+				</view>
+				<view class="hand-btn" @click="clearCart()">清空购物车</view>
+			</view>
+			<!-- 列表 -->
+			<view class="cart-list">
+				<block v-for="(item, index) in cartList" :key="item.id">
+					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+						<view class="image-wrapper">
+							<image :src="item.productInfo.image" :class="[item.loaded]" mode="aspectFill" lazy-load
+								@load="onImageLoad('cartList', index)" @error="onImageError('cartList', index)"></image>
+							<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }"
+								@click="check('item', index)"></view>
+						</view>
+						<view class="item-right">
+							<text class="clamp title">{{ item.productInfo.store_name }}</text>
+							<text class="attr">{{ item.productInfo.attrInfo.suk }}</text>
+							<text class="price">¥{{ item.productInfo.price }}</text>
+							<!-- <uni-number-box
+								class="step"
+								:min="1"
+								:max="item.productInfo.stock"
+								:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
+								:isMax="item.cart_num >= item.productInfo.stock ? true : false"
+								:isMin="item.cart_num === 1"
+								:index="index"
+								@eventChange="numberChange"
+							></uni-number-box> -->
+							<view class="munbox flex">
+								<image src="../../static/icon/reduce.png" mode="" @click="reduce(item, index)"></image>
+								<input type="number" :value="item.cart_num" disabled />
+								<image src="../../static/icon/add.png" mode="" @click="add(item)"></image>
+							</view>
+						</view>
+						<!-- <text class="del-btn iconfont iconclose" @click="deleteCartItem(index)"></text> -->
+					</view>
+				</block>
+			</view>
+			<!-- 底部菜单栏 -->
+			<view class="action-section">
+				<view class="checkbox">
+					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')"
+						:class="{ 'icon-checked': allChecked }"></view>
+					<!-- <view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view> -->
+				</view>
+				<view class="total-box">
+					<text class="price">¥{{ total }}</text>
+					<!-- <text class="coupon">
+						已优惠
+						<text>74.35</text>
+						元
+					</text> -->
+				</view>
+				<button type="primary" class="no-border confirm-btn" @click="createOrder">去结算</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import weixinObj from '@/plugin/jweixin-module/index.js';
+	import {
+		getCartList,
+		getCartNum,
+		cartDel
+	} from '@/api/user.js';
+	import {
+		mapState
+	} from 'vuex';
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	import {
+		tabbar
+	} from '@/utils/tabbar.js';
+	export default {
+		components: {
+			uniNumberBox
+		},
+		data() {
+			return {
+				tabbar: tabbar,
+				current: 3,
+				total: 0, //总价格
+				allChecked: false, //全选状态  true|false
+				empty: false, //空白页现实  true|false
+				cartList: []
+			};
+		},
+		onShow() {
+			// 只有登录时才加载数据
+			if (this.hasLogin) {
+				this.loadData();
+			}
+			weixinObj.hideAllNonBaseMenuItem();
+		},
+		watch: {
+			//显示空白页
+			cartList(e) {
+				let empty = e.length === 0 ? true : false;
+				if (this.empty !== empty) {
+					this.empty = empty;
+				}
+			}
+		},
+		computed: {
+			...mapState('user', ['hasLogin'])
+		},
+		methods: {
+			reduce(item, index) {
+				if (item.cart_num == 1) {
+					uni.showModal({
+						content: '删除该商品?',
+						success: e => {
+							if (e.confirm) {
+								this.deleteCartItem(index);
+							}
+						}
+					});
+				} else {
+					item.cart_num--;
+					this.newNumberChange(item);
+				}
+			},
+			add(item) {
+				console.log(item);
+				if (item.productInfo.stock > item.cart_num) {
+					item.cart_num++;
+					this.newNumberChange(item);
+				} else {
+					return;
+				}
+			},
+			//请求数据
+			async loadData() {
+				let obj = this;
+				getCartList({})
+					.then(function(e) {
+						// 获取当前购物车物品增加数量
+						let nub = obj.cartList.length;
+						// 获取之前对象数组
+						let aArray = obj.cartList.reverse();
+						// 获取返回数据对象数组
+						let bArray = e.data.valid.reverse();
+						obj.cartList = bArray
+							.map((item, ind) => {
+								// 设置返回数据默认为勾选状态
+								item.checked = true;
+								// 获取相同数组之前对象的数据
+								let carlist = aArray[ind];
+								// 判断之前是否已经加载完毕
+								if (carlist && carlist.loaded == 'loaded') {
+									item.loaded = 'loaded';
+								}
+								return item;
+							})
+							.reverse();
+						obj.calcTotal(); //计算总价
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+			},
+			//监听image加载完成
+			onImageLoad(key, index) {
+				// 修改载入完成后图片class样式
+				this.$set(this[key][index], 'loaded', 'loaded');
+			},
+			//监听image加载失败
+			onImageError(key, index) {
+				this[key][index].image = '/static/error/errorImage.jpg';
+			},
+			// 跳转到登录页
+			navToLogin() {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			},
+			//选中状态处理
+			check(type, index) {
+				if (type === 'item') {
+					this.cartList[index].checked = !this.cartList[index].checked;
+				} else {
+					const checked = !this.allChecked;
+					const list = this.cartList;
+					list.forEach(item => {
+						item.checked = checked;
+					});
+					this.allChecked = checked;
+				}
+				this.calcTotal(type);
+			},
+			//数量
+			numberChange(data) {
+				let arr = this.cartList[data.index];
+				arr.cart_num = data.number;
+				getCartNum({
+						id: arr.id,
+						number: data.number
+					})
+					.then(e => {
+						console.log(e);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+				this.calcTotal();
+			},
+			newNumberChange(item) {
+				getCartNum({
+						id: item.id,
+						number: item.cart_num
+					})
+					.then(e => {
+						console.log(e);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+				this.calcTotal();
+			},
+			//删除
+			deleteCartItem(index) {
+				let list = this.cartList;
+				let row = list[index];
+				let id = row.id;
+				cartDel({
+					ids: id
+				});
+				this.cartList.splice(index, 1);
+				uni.hideLoading();
+				this.calcTotal();
+			},
+			//清空
+			clearCart() {
+				uni.showModal({
+					content: '清空购物车?',
+					success: e => {
+						if (e.confirm) {
+							let st = this.cartList.map(e => {
+								return e.id;
+							});
+							cartDel({
+								ids: st.join(',')
+							}).then(e => {
+								console.log(e);
+							});
+							this.cartList = [];
+						}
+					}
+				});
+			},
+			//计算总价
+			calcTotal() {
+				let list = this.cartList;
+				if (list.length === 0) {
+					this.empty = true;
+					return;
+				}
+				let total = 0;
+				let checked = true;
+				list.forEach(item => {
+					if (item.checked === true) {
+						total += item.productInfo.price * item.cart_num;
+					} else if (checked === true) {
+						checked = false;
+					}
+				});
+				this.allChecked = checked;
+				this.total = Number(total.toFixed(2));
+			},
+			//创建订单
+			createOrder() {
+				let list = this.cartList;
+				let goodsData = [];
+				list.forEach(item => {
+					if (item.checked) {
+						goodsData.push(item.id);
+					}
+				});
+
+				uni.navigateTo({
+					url: '/pages/order/createOrder?id=' + goodsData.join(',')
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.container {
+		padding-bottom: 134rpx;
+		background-color: $page-color-base;
+
+		/* 空白页 */
+		.empty {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100vh;
+			padding-bottom: 100rpx;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+			background: #fff;
+
+			.emptyImg {
+				width: 300rpx;
+				height: 250rpx;
+				margin-bottom: 30rpx;
+			}
+
+			.empty-tips {
+				display: flex;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-disabled;
+
+				.navigator {
+					color: #f65067;
+					margin-left: 16rpx;
+				}
+			}
+		}
+	}
+
+	/* 购物车列表项 */
+	.cart-item {
+		width: 710rpx;
+		height: 210rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 10rpx 0rpx rgba(0, 0, 0, 0.1);
+		border-radius: 10rpx;
+		margin: 20rpx auto;
+
+		display: flex;
+		position: relative;
+		padding: 30rpx 26rpx 30rpx 80rpx;
+
+		.image-wrapper {
+			width: 150rpx;
+			height: 150rpx;
+			flex-shrink: 0;
+			position: relative;
+
+			image {
+				border-radius: 8rpx;
+			}
+		}
+
+		.checkbox {
+			position: absolute;
+			top: 0;
+			bottom: 0;
+			left: -65rpx;
+			margin: auto 0;
+			height: 50rpx;
+			z-index: 8;
+			font-size: 44rpx;
+			line-height: 1;
+			padding: 4rpx;
+			color: $font-color-disabled;
+			background: #fff;
+			border-radius: 50px;
+		}
+
+		.item-right {
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			overflow: hidden;
+			position: relative;
+			padding-left: 30rpx;
+
+			.munbox {
+				width: 144rpx;
+				height: 44rpx;
+				position: absolute;
+				bottom: 0;
+				right: 0;
+
+				input {
+					display: inline-block;
+					text-align: center;
+				}
+
+				image {
+					flex-shrink: 0;
+					width: 44rpx;
+					height: 44rpx;
+				}
+			}
+
+			.title,
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.attr {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+				height: 50rpx;
+				line-height: 50rpx;
+
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.price {
+				// height: 50rpx;
+				// line-height: 50rpx;
+				padding-top: 20rpx;
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ff4c4c;
+			}
+
+			.step {
+				margin-top: 20rpx;
+			}
+
+			.title {
+				font-size: 34rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.del-btn {
+			padding: 4rpx 10rpx;
+			font-size: 34rpx;
+			height: 50rpx;
+			color: $font-color-light;
+		}
+	}
+
+	/* 底部栏 */
+	.action-section {
+		/* #ifdef H5 */
+		margin-bottom: 100rpx;
+		/* #endif */
+		position: fixed;
+		left: 30rpx;
+		bottom: 30rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		width: 690rpx;
+		height: 100rpx;
+		padding: 0 30rpx;
+		background: rgba(255, 255, 255, 0.9);
+		box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+		border-radius: 16rpx;
+
+		.checkbox {
+			height: 52rpx;
+			position: relative;
+
+			.icon-checked-box {
+				border-radius: 50rpx;
+				background-color: #ffffff;
+				width: 52rpx;
+				height: 100%;
+				position: relative;
+				z-index: 5;
+				font-size: 53rpx;
+				line-height: 1;
+				color: $font-color-light;
+			}
+
+			.icon-checked {
+				color: $base-color;
+			}
+		}
+
+		.clear-btn {
+			position: absolute;
+			left: 26rpx;
+			top: 0;
+			z-index: 4;
+			width: 0;
+			height: 52rpx;
+			line-height: 52rpx;
+			padding-left: 38rpx;
+			font-size: $font-base;
+			color: #fff;
+			background: $font-color-disabled;
+			border-radius: 0 50px 50px 0;
+			opacity: 0;
+			transition: 0.2s;
+
+			&.show {
+				opacity: 1;
+				width: 120rpx;
+			}
+		}
+
+		.total-box {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			text-align: right;
+			padding-right: 40rpx;
+
+			.price {
+				font-size: $font-lg;
+				color: $font-color-dark;
+			}
+
+			.coupon {
+				font-size: $font-sm;
+				color: $font-color-light;
+
+				text {
+					color: $font-color-dark;
+				}
+			}
+		}
+
+		.confirm-btn {
+			padding: 0 38rpx;
+			margin: 0;
+			border-radius: 100px;
+			height: 76rpx;
+			line-height: 76rpx;
+			font-size: $font-base + 2rpx;
+			background: $base-color;
+		}
+	}
+
+	/* 复选框选中状态 */
+	.action-section .checkbox.checked,
+	.cart-item .checkbox.checked {
+		color: $base-color;
+	}
+
+	.cart-hand {
+		width: 750rpx;
+		height: 88rpx;
+		background: #ffffff;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		line-height: 88rpx;
+		padding-left: 28rpx;
+		padding-right: 26rpx;
+
+		.hand-tit {
+			text {
+				color: #ff4c4c;
+			}
+		}
+
+		.hand-btn {
+			width: 164rpx;
+			height: 62rpx;
+			border: 2rpx solid #ff4c4c;
+			border-radius: 31rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff4c4c;
+			line-height: 62rpx;
+			text-align: center;
+		}
+	}
 </style>

+ 319 - 318
pages/category/business.vue

@@ -1,319 +1,320 @@
-<template>
-	<view class="center">
-		<!-- <view class="search-top">
-			<view class="search flex">
-				<view class="shop-name clamp">椒江区</view>
-				<image class="shop-jt" src="../../static/icon/dsjh.png" mode=""></image>
-				<view class="input-box flex">
-					<view class=" input-content flex">
-						<image src="../../static/icon/search-h.png" mode="" class="" style="width: 32rpx;height: 32rpx;">
-						</image>
-						<view class="input"><input type="text" value="输入关键字搜索" /></view>
-					</view>
-				</view>
-				<view class="search-tit" @click.stop="clickSearch">
-					搜索
-				</view>
-			</view>
-			<view class="shop">
-				<view class="shop-title">
-					<view class="shop-item">
-						<view class="sitem-font">智能排序</view>
-						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-					</view>
-					<view class="shop-item">
-						<view class="sitem-font">位置距离</view>
-						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-					</view>
-					<view class="shop-item">
-						<view class="sitem-font">折扣优惠</view>
-						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-					</view>
-					<view class="shop-item">
-						<view class="sitem-font">筛选</view>
-						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<!-- <view class="jg" style="height: 180rpx;">
-			
-		</view>
-		<view class="shop">
-			<view class="shop-main flex" v-for="(item, index) in 100" :key="index">
-				<image class="main-left" src="../../static/index/index13.png" mode=""></image>
-				<view class="main-right flex">
-					<view class="shopm-info">
-						<view class="shopm-title">
-							<view class="shopmt-font clamp">李家烤肉11111111111111111111111111111111111111111111</view>
-							<view class="shopmt-good">荐</view>
-						</view>
-						<view class="address">椒江区市府大道200号</view>
-						<view class="shopmt-tip">消费最高可得10%积分</view>
-					</view>
-					<view class="right">
-						<view class="mright-top">
-							<image class="mrt-image" src="../../static/index/index10.png" mode=""></image>
-							<view class="mrt-font">距离0.3KM</view>
-						</view>
-						<view class="mright-bottom">
-							<image class="mrb-item" src="../../static/index/index14.png" mode=""></image>
-							<image class="mrb-item" src="../../static/index/index11.png" mode=""></image>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<view class="kong">
-			<u-empty mode="data" text="敬请期待"></u-empty>
-		</view>
-		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
-	</view>
-</template>
-
-<script>
-	import {
-		tabbar
-	} from '@/utils/tabbar.js';
-	export default {
-		data() {
-			return {
-				tabbar: tabbar,
-				current: 1
-			};
-		},
-	};
-</script>
-
-<style lang="less">
-	.kong {
-		height: 100vh;
-	}
-	.search-top {
-		position: fixed;
-		top: 0;
-		z-index: 99;
-	}
-	.search {
-		justify-content: flex-start;
-		padding: 10rpx 32rpx 20rpx;
-		align-items: center;
-		background-color: #fff;
-
-		.address {
-			width: 32rpx;
-			height: 38rpx;
-		}
-
-		.shop-name {
-			height: 38rpx;
-			position: relative;
-			top: -4rpx;
-			z-index: 100;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #666;
-			padding-left: 10rpx;
-		}
-
-		.shop-jt {
-			margin-left: 8rpx;
-			width: 16rpx;
-			height: 10rpx;
-		}
-
-		.input-box {
-			margin-left: 10rpx;
-			position: relative;
-			z-index: 99;
-			width: 520rpx;
-			height: 60rpx;
-			// background: rgba(255, 255, 255, 0.4);
-			border-radius: 30rpx;
-
-			.input-content {
-				position: relative;
-				z-index: 11;
-				// border-radius: 99rpx;
-				flex-grow: 1;
-				padding: 5rpx 30rpx;
-				background: #F6F6F6;
-
-				.iconsearch {
-					font-size: 50rpx;
-					color: #ffffff;
-				}
-
-				.input {
-					margin-left: 19rpx;
-					flex-grow: 1;
-					color: #666;
-					background: #F6F6F6;
-
-					input {
-						font-size: 28rpx;
-					}
-				}
-			}
-
-			.input-button {
-				padding-left: 20rpx;
-				// font-size: $font-base;
-				height: 100%;
-			}
-		}
-
-		.search-tit {
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #666666;
-			flex-shrink: 0;
-			padding-left: 10rpx;
-		}
-	}
-
-	.shop {
-		// margin-top: 20rpx;
-		background: #ffffff;
-		padding: 0 12rpx;
-
-		.shop-title {
-			padding: 30rpx 0 20rpx;
-			display: flex;
-			align-items: center;
-			border-bottom: 1px solid #e3e6e7;
-
-			.shop-item {
-				width: 25%;
-				display: flex;
-				align-items: center;
-				justify-content: center;
-
-				.sitem-font {
-					font-size: 26rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #333333;
-				}
-
-				.jt-down {
-					width: 10rpx;
-					height: 8rpx;
-					margin-left: 12rpx;
-				}
-			}
-		}
-
-		.shop-main {
-			padding: 32rpx 18rpx 0 12rpx;
-			align-items: flex-start;
-			justify-content: flex-start;
-
-			.main-left {
-				width: 180rpx;
-				height: 180rpx;
-				border-radius: 10rpx;
-			}
-
-			.main-right {
-				width: 500rpx;
-				justify-content: space-between;
-				align-items: flex-start;
-				margin-left: 20rpx;
-				padding: 13rpx 0 35rpx;
-				border-bottom: 1px solid #eaeced;
-
-				.shopm-info {
-					max-width: 60%;
-					line-height: 1;
-
-					.shopm-title {
-						display: flex;
-						justify-content: flex-start;
-
-						.shopmt-font {
-							font-size: 34rpx;
-							font-family: PingFang SC;
-							font-weight: bold;
-							color: #333333;
-						}
-
-						.shopmt-good {
-							margin-left: 6rpx;
-							width: 30rpx;
-							height: 30rpx;
-							border: 1px solid #ff4c4c;
-							border-radius: 5rpx;
-							font-size: 20rpx;
-							font-family: PingFang SC;
-							font-weight: 500;
-							color: #ff4c4c;
-							text-align: center;
-							line-height: 30rpx;
-						}
-					}
-
-					.address {
-						margin-top: 16rpx;
-						font-size: 24rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #666666;
-					}
-
-					.shopmt-tip {
-						position: relative;
-						margin-top: 52rpx;
-						padding: 8rpx;
-						background: #fcf3f0;
-						border-radius: 16rpx 16rpx 16rpx 0px;
-						font-size: 20rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						color: #ff440d;
-					}
-				}
-
-				.right {
-					height: 100%;
-					margin-top: 5rpx;
-					display: flex;
-					flex-direction: column;
-
-					.mright-top {
-						display: flex;
-						justify-content: flex-end;
-						align-items: center;
-
-						.mrt-image {
-							width: 20rpx;
-							height: 28rpx;
-						}
-
-						.mrt-font {
-							margin-left: 8rpx;
-							font-size: 22rpx;
-							font-family: PingFang SC;
-							font-weight: 500;
-							color: #666666;
-						}
-					}
-
-					.mright-bottom {
-						margin-top: 80rpx;
-						display: flex;
-						justify-content: flex-end;
-
-						.mrb-item {
-							width: 46rpx;
-							height: 46rpx;
-							margin-left: 14rpx;
-						}
-					}
-				}
-			}
-		}
-	}
+<template>
+	<view class="center">
+		<!-- <view class="search-top">
+			<view class="search flex">
+				<view class="shop-name clamp">椒江区</view>
+				<image class="shop-jt" src="../../static/icon/dsjh.png" mode=""></image>
+				<view class="input-box flex">
+					<view class=" input-content flex">
+						<image src="../../static/icon/search-h.png" mode="" class="" style="width: 32rpx;height: 32rpx;">
+						</image>
+						<view class="input"><input type="text" value="输入关键字搜索" /></view>
+					</view>
+				</view>
+				<view class="search-tit" @click.stop="clickSearch">
+					搜索
+				</view>
+			</view>
+			<view class="shop">
+				<view class="shop-title">
+					<view class="shop-item">
+						<view class="sitem-font">智能排序</view>
+						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+					</view>
+					<view class="shop-item">
+						<view class="sitem-font">位置距离</view>
+						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+					</view>
+					<view class="shop-item">
+						<view class="sitem-font">折扣优惠</view>
+						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+					</view>
+					<view class="shop-item">
+						<view class="sitem-font">筛选</view>
+						<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
+					</view>
+				</view>
+			</view>
+		</view> -->
+		<!-- <view class="jg" style="height: 180rpx;">
+			
+		</view>
+		<view class="shop">
+			<view class="shop-main flex" v-for="(item, index) in 100" :key="index">
+				<image class="main-left" src="../../static/index/index13.png" mode=""></image>
+				<view class="main-right flex">
+					<view class="shopm-info">
+						<view class="shopm-title">
+							<view class="shopmt-font clamp">李家烤肉11111111111111111111111111111111111111111111</view>
+							<view class="shopmt-good">荐</view>
+						</view>
+						<view class="address">椒江区市府大道200号</view>
+						<view class="shopmt-tip">消费最高可得10%积分</view>
+					</view>
+					<view class="right">
+						<view class="mright-top">
+							<image class="mrt-image" src="../../static/index/index10.png" mode=""></image>
+							<view class="mrt-font">距离0.3KM</view>
+						</view>
+						<view class="mright-bottom">
+							<image class="mrb-item" src="../../static/index/index14.png" mode=""></image>
+							<image class="mrb-item" src="../../static/index/index11.png" mode=""></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view> -->
+		<view class="kong">
+			<u-empty mode="data" text="敬请期待"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		tabbar
+	} from '@/utils/tabbar.js';
+	export default {
+		data() {
+			return {
+				tabbar: tabbar,
+				current: 1
+			};
+		},
+	};
+</script>
+
+<style lang="less">
+	.kong {
+		height: 100vh;
+	}
+
+	.search-top {
+		position: fixed;
+		top: 0;
+		z-index: 99;
+	}
+
+	.search {
+		justify-content: flex-start;
+		padding: 10rpx 32rpx 20rpx;
+		align-items: center;
+		background-color: #fff;
+
+		.address {
+			width: 32rpx;
+			height: 38rpx;
+		}
+
+		.shop-name {
+			height: 38rpx;
+			position: relative;
+			top: -4rpx;
+			z-index: 100;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666;
+			padding-left: 10rpx;
+		}
+
+		.shop-jt {
+			margin-left: 8rpx;
+			width: 16rpx;
+			height: 10rpx;
+		}
+
+		.input-box {
+			margin-left: 10rpx;
+			position: relative;
+			z-index: 99;
+			width: 520rpx;
+			height: 60rpx;
+			// background: rgba(255, 255, 255, 0.4);
+			border-radius: 30rpx;
+
+			.input-content {
+				position: relative;
+				z-index: 11;
+				// border-radius: 99rpx;
+				flex-grow: 1;
+				padding: 5rpx 30rpx;
+				background: #F6F6F6;
+
+				.iconsearch {
+					font-size: 50rpx;
+					color: #ffffff;
+				}
+
+				.input {
+					margin-left: 19rpx;
+					flex-grow: 1;
+					color: #666;
+					background: #F6F6F6;
+
+					input {
+						font-size: 28rpx;
+					}
+				}
+			}
+
+			.input-button {
+				padding-left: 20rpx;
+				// font-size: $font-base;
+				height: 100%;
+			}
+		}
+
+		.search-tit {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+			flex-shrink: 0;
+			padding-left: 10rpx;
+		}
+	}
+
+	.shop {
+		// margin-top: 20rpx;
+		background: #ffffff;
+		padding: 0 12rpx;
+
+		.shop-title {
+			padding: 30rpx 0 20rpx;
+			display: flex;
+			align-items: center;
+			border-bottom: 1px solid #e3e6e7;
+
+			.shop-item {
+				width: 25%;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+
+				.sitem-font {
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+				}
+
+				.jt-down {
+					width: 10rpx;
+					height: 8rpx;
+					margin-left: 12rpx;
+				}
+			}
+		}
+
+		.shop-main {
+			padding: 32rpx 18rpx 0 12rpx;
+			align-items: flex-start;
+			justify-content: flex-start;
+
+			.main-left {
+				width: 180rpx;
+				height: 180rpx;
+				border-radius: 10rpx;
+			}
+
+			.main-right {
+				width: 500rpx;
+				justify-content: space-between;
+				align-items: flex-start;
+				margin-left: 20rpx;
+				padding: 13rpx 0 35rpx;
+				border-bottom: 1px solid #eaeced;
+
+				.shopm-info {
+					max-width: 60%;
+					line-height: 1;
+
+					.shopm-title {
+						display: flex;
+						justify-content: flex-start;
+
+						.shopmt-font {
+							font-size: 34rpx;
+							font-family: PingFang SC;
+							font-weight: bold;
+							color: #333333;
+						}
+
+						.shopmt-good {
+							margin-left: 6rpx;
+							width: 30rpx;
+							height: 30rpx;
+							border: 1px solid #ff4c4c;
+							border-radius: 5rpx;
+							font-size: 20rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #ff4c4c;
+							text-align: center;
+							line-height: 30rpx;
+						}
+					}
+
+					.address {
+						margin-top: 16rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #666666;
+					}
+
+					.shopmt-tip {
+						position: relative;
+						margin-top: 52rpx;
+						padding: 8rpx;
+						background: #fcf3f0;
+						border-radius: 16rpx 16rpx 16rpx 0px;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #ff440d;
+					}
+				}
+
+				.right {
+					height: 100%;
+					margin-top: 5rpx;
+					display: flex;
+					flex-direction: column;
+
+					.mright-top {
+						display: flex;
+						justify-content: flex-end;
+						align-items: center;
+
+						.mrt-image {
+							width: 20rpx;
+							height: 28rpx;
+						}
+
+						.mrt-font {
+							margin-left: 8rpx;
+							font-size: 22rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #666666;
+						}
+					}
+
+					.mright-bottom {
+						margin-top: 80rpx;
+						display: flex;
+						justify-content: flex-end;
+
+						.mrb-item {
+							width: 46rpx;
+							height: 46rpx;
+							margin-left: 14rpx;
+						}
+					}
+				}
+			}
+		}
+	}
 </style>

+ 883 - 822
pages/index/index.vue

@@ -1,823 +1,884 @@
-<template>
-	<view class="container">
-		<view class="carousel-section">
-			<!-- 背景色区域 -->
-			<view class="bg"><image src="../../static/index/index13.png" mode=""></image></view>
-			<!-- 标题栏和状态栏占位符 -->
-			<view class="titleNview-placing"></view>
-			<!-- 搜素栏 -->
-			<view class="search flex">
-				<image src="../../static/index/index09.png" class="address"></image>
-				<!-- <view class="shop-name clamp" @click.stop="canChange == 0?nav('/pages/shoping/list'):''">{{ storeInfo.name }}</view> -->
-				<view class="shop-name clamp">椒江区</view>
-				<image class="shop-jt" src="../../static/index/index07.png" mode=""></image>
-				<view class="input-box flex" @click.stop="clickSearch">
-					<view class=" input-content flex">
-						<view class="iconfont iconsearch"></view>
-						<view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
-					</view>
-				</view>
-			</view>
-			<swiper class="carousel" autoplay="true" duration="400" interval="5000" @change="swiperChange" :indicator-dots="true" indicator-active-color="#FFFFFF">
-				<!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
-				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
-					<image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
-				</swiper-item>
-			</swiper>
-		</view>
-		<view class="navbar">
-			<view class="navbar-box flex">
-				<view class="navbar-item" @click="navTo('/pages/product/list')">
-					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
-					<view class="nitem-font">全部商品</view>
-				</view>
-				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
-					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
-					<view class="nitem-font">邀请有礼</view>
-				</view>
-				<view class="navbar-item" @click="navTo('/pages/index/sign')">
-					<image class="nitem-image" src="../../static/index/index05.png" mode=""></image>
-					<view class="nitem-font">天天领红包</view>
-				</view>
-				<view class="navbar-item" @click="navTo('')">
-					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
-					<view class="nitem-font">积分商城</view>
-				</view>
-				<view class="navbar-item" @click="navTo('')">
-					<image class="nitem-image" src="../../static/index/index01.png" mode=""></image>
-					<view class="nitem-font">话费充值</view>
-				</view>
-			</view>
-		</view>
-		<view class="product-box" v-if="bastList.length != 0">
-			<view class="product-title">
-				<image class="pt-image" src="../../static/index/index15.png" mode=""></image>
-				<view class="pt-title">会员礼包</view>
-			</view>
-			<view class="hotgoods">
-				<view class="hotgoods-item" v-for="item in bastList" :key="item.id" @click="navToDetailPage(item)">
-					<view class="image-wrapper">
-						<image class="image-bg" src="../../static/img/libao-bg.png" mode=""></image>
-						<image class="image" :src="item.image" mode="scaleToFill"></image>
-					</view>
-					<view class="title clamp2">{{ item.store_name }}</view>
-					<view class="hot-price">
-						<view class="hotPrice-box">会员价</view>
-						<view class="price">
-							<text class="font-size-sm">¥</text>
-							{{ item.price * 1 }}
-						</view>
-						<view class="yuanPrice">{{ item.ot_price }}</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="shop" v-if="shoplist.length != 0">
-			<view class="shop-title">
-				<view class="shop-item">
-					<view class="sitem-font">智能排序</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">位置距离</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">折扣优惠</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-				<view class="shop-item">
-					<view class="sitem-font">筛选</view>
-					<image class="jt-down" src="../../static/index/index06.png" mode=""></image>
-				</view>
-			</view>
-		</view>
-		<view class="shop-main flex" v-for="(item, index) in shoplist" :key="index">
-			<image class="main-left" src="../../static/index/index13.png" mode=""></image>
-			<view class="main-right flex">
-				<view class="shopm-info">
-					<view class="shopm-title">
-						<view class="shopmt-font clamp">李家烤肉11111111111111111111111111111111111111111111</view>
-						<view class="shopmt-good">荐</view>
-					</view>
-					<view class="address">椒江区市府大道200号</view>
-					<view class="shopmt-tip">消费最高可得10%积分</view>
-				</view>
-				<view class="right">
-					<view class="mright-top">
-						<image class="mrt-image" src="../../static/index/index10.png" mode=""></image>
-						<view class="mrt-font">距离0.3KM</view>
-					</view>
-					<view class="mright-bottom">
-						<image class="mrb-item" src="../../static/index/index14.png" mode=""></image>
-						<image class="mrb-item" src="../../static/index/index11.png" mode=""></image>
-					</view>
-				</view>
-			</view>
-		</view>
-		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
-	</view>
-</template>
-
-<script>
-import { lookSubpoints, lookOneself } from '../../api/user.js';
-import seckill from '../../components/seckill/seckill.vue';
-import { loadIndexs } from '@/api/index.js';
-import { getUserInfo, spread } from '@/api/user.js';
-import { setCoupons } from '@/api/functionalUnit.js';
-import { getBargainList } from '@/api/product.js';
-import { interceptor } from '@/utils/loginUtils';
-import { mapState, mapMutations } from 'vuex';
-import { tabbar } from '@/utils/tabbar.js';
-// #ifdef H5
-import { weixindata, shareLoad } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	components: {
-		seckill
-	},
-	data() {
-		return {
-			tabbar: tabbar,
-			current: 0,
-			shareShow: false, //分享海报
-			pageProportion: 0, //保存页面基于750宽度的比例
-			swiperHeight: 0,
-			checkid: 0,
-			titleNViewBackground: '',
-			longitude: 0, //经度
-			latitude: 0, //纬度
-			swiperCurrent: 0,
-			swiperLength: 0,
-			carouselList: [], //轮播列表
-			bastList: [], //会员礼包
-			shoplist: [], //商店列表
-			page: 1,
-			limit: 5
-		};
-	},
-	computed: {
-		...mapState(['loginInterceptor', 'baseURL']),
-		...mapState('user', ['hasLogin', 'userInfo'])
-	},
-	onLoad: function(option) {
-		this.getaddress();
-		// #ifdef MP
-		if (option.scene) {
-			// 存储小程序邀请人
-			uni.setStorage({
-				key: 'spread_code',
-				data: option.scene
-			});
-		}
-		// #endif
-		// #ifdef H5
-		this.IndexShare();
-		//#endif
-	},
-	onShow: function() {
-		// 判断是否强制登录
-		if (!this.hasLogin) {
-			// 登录拦截
-			interceptor();
-		}
-		this.loadData();
-		this.getBargainList();
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData();
-	},
-	// #ifndef MP
-	// 监听导航栏输入框点击事件
-	onNavigationBarSearchInputClicked(e) {
-		//跳转到搜索页面
-		this.clickSearch();
-	},
-	//点击导航栏 buttons 时触发
-	onNavigationBarButtonTap(e) {
-		const index = e.index;
-		if (index === 0) {
-			this.$api.msg('点击了扫描');
-		} else if (index === 1) {
-			// #ifdef APP-PLUS
-			const pages = getCurrentPages();
-			const page = pages[pages.length - 1];
-			const currentWebview = page.$getAppWebview();
-			currentWebview.hideTitleNViewButtonRedDot({
-				index
-			});
-			// #endif
-			uni.navigateTo({
-				url: '/pages/user/notice'
-			});
-		}
-	},
-	// #endif
-	methods: {
-		...mapMutations(['setLat', 'setLon']),
-		// #ifdef H5
-		IndexShare() {
-			let obj = this;
-			let pages = getCurrentPages();
-			// 获取当前页面
-			let page = pages[pages.length - 1];
-			let path = '#/' + page.route + '?';
-			// 保存传值
-			for (let i in page.options) {
-				path += i + '=' + page.options[i] + '&';
-			}
-			console.log(obj.Path);
-			// 保存邀请人
-			path += 'spread=' + this.userInfo.uid;
-			let data = {
-				link: this.baseURL + '/index/' + path,
-				title: this.userInfo.nickname + '邀请您进入响亮商城',
-				desc: '欢迎加入响亮商城',
-				imgUrl: 'https://xl.liuniu946.com/index/static/img/logo.jpg'
-			};
-			console.log(data, '分享数据');
-			shareLoad(data);
-		},
-		// #endif
-		getaddress() {
-			console.log('dizhi+++++++++++');
-			let obj = this;
-			// uni.getLocation({
-			// 	type: 'gcj02',
-			// 	success: res => {
-			// 		console.log(res, 123456);
-			// 		obj.setLat(res.latitude);
-			// 		obj.setLon(res.longitude);
-			// 	},
-			// 	fail: err => {
-			// 		console.log(err, 'shi+++++++++++++++');
-			// 		openMap().then(e => {
-			// 			this.getaddress();
-			// 		});
-			// 	}
-			// });
-			weixindata().then(wxOjb => {
-				console.log(wxOjb, '获取微信');
-				wxOjb.getLocation({
-					type: 'gcj02',
-					success: res => {
-						console.log(res, 123456);
-						obj.setLat(res.latitude);
-						obj.setLon(res.longitude);
-					},
-					fail: err => {
-						console.log(err, 'shi+++++++++++++++');
-						openMap().then(e => {
-							this.getaddress();
-						});
-					}
-				});
-			});
-		},
-		//砍价商品推荐详情页
-		navToDetailPages(item) {
-			let id = item.product_id;
-			//let type = 2;
-
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		navTo(url) {
-			if (url == '') {
-				this.$api.msg('暂未开通,敬请期待');
-			} else {
-				uni.navigateTo({
-					url
-				});
-			}
-		},
-		openSubscribe: function(e) {
-			let page = e;
-			// #ifndef MP
-			uni.navigateTo({
-				url: page
-			});
-			// #endif
-			// #ifdef MP
-			uni.showLoading({
-				title: '正在加载'
-			});
-			openBargainSubscribe()
-				.then(res => {
-					uni.hideLoading();
-					uni.navigateTo({
-						url: page
-					});
-				})
-				.catch(err => {
-					uni.hideLoading();
-				});
-			// #endif
-		},
-		getBargainList() {
-			let that = this;
-
-			getBargainList({
-				page: that.page,
-				limit: that.limit
-			})
-				.then(function(res) {
-					that.$set(that, 'bargainlist', res.data.slice(0, 2));
-				})
-				.catch(res => {
-					console.log(res, 'getBargainList');
-				});
-		},
-		Mask() {
-			this.MaskShow = false;
-			this.shareShow = true;
-			uni.setStorage({
-				key: 'FirstEntry',
-				data: true,
-				success: function() {
-					console.log(uni.getStorageSync('FirstEntry'), 'Mask');
-				}
-			});
-		},
-		Toshare() {
-			if (this.userInfo == '') {
-				getUserInfo({})
-					.then(({ data }) => {
-						this.setUserInfo(data);
-						this.userInfo = data;
-					})
-					.catch(e => {});
-			} else {
-				this.shareShow = false;
-				uni.navigateTo({
-					url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
-				});
-			}
-		},
-		Tocancel() {
-			this.shareShow = false;
-		},
-		// 监听切换事件
-		listChange(e) {
-			this.checkid = e.detail.current;
-		},
-		// 點擊搜索框
-		clickSearch() {
-			uni.navigateTo({
-				url: '/pages/product/search'
-			});
-		},
-		// 点击触发领取优惠券
-		setCoupons(item) {
-			// 判断是否已经领取了优惠券
-			let obj = this;
-			uni.showModal({
-				title: '领取提示',
-				content: '是否领取优惠券',
-				success(e) {
-					if (e.confirm) {
-						setCoupons({
-							couponId: item.id
-						}).then(e => {
-							item.is_use = true;
-							uni.showToast({
-								title: '领取成功',
-								type: 'top',
-								duration: 2000
-							});
-						});
-					}
-				}
-			});
-		},
-		//商品种类切换
-		change(item) {
-			let id = item;
-			this.checkid = id;
-			if (this.checkid == 1) {
-				// console.log(1);
-				this.detail = this.selected_detail;
-			} else if (this.checkid == 2) {
-				// console.log(2);
-				this.detail = this.new_product;
-			} else {
-				this.detail = this.cheap_good;
-			}
-		},
-		// 监听图片加载完成
-		onImageError(key, index) {
-			this[key][index].image = '/static/error/errorImage.jpg';
-		},
-		// 请求载入数据
-		async loadData() {
-			loadIndexs({})
-				.then(({ data }) => {
-					let goods = data.info;
-					this.carouselList = data.banner;
-					this.swiperLength = this.carouselList.length;
-					this.bastList = data.giftInfo; //会员礼包
-					uni.stopPullDownRefresh();
-				})
-				.catch(e => {
-					uni.stopPullDownRefresh();
-				});
-		},
-		//轮播图切换修改背景色
-		swiperChange(e) {
-			const index = e.detail.current;
-			this.swiperCurrent = index;
-			this.titleNViewBackground = this.carouselList[index].background;
-		},
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id + '&isVip=1'
-			});
-		},
-
-		// 轮播图跳转
-		bannerNavToUrl(item) {
-			// #ifdef H5
-				console.log(item.wap_url.indexOf('http'), 'banner');
-			if (item.wap_url.indexOf('http') >= 0) {
-				window.location.href = item.wap_url;
-			}
-			// #endif
-			//测试数据没有写id,用title代替
-			uni.navigateTo({
-				url: item.wap_url
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.carousel-section {
-	position: relative;
-	padding-top: 10px;
-	.bg {
-		position: absolute;
-		top: 0;
-		left: 0;
-		width: 750rpx;
-		height: 378rpx;
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-	.titleNview-placing {
-		height: var(--status-bar-height);
-		box-sizing: content-box;
-	}
-	.search {
-		justify-content: flex-start;
-		padding: 10rpx 32rpx 20rpx;
-		align-items: center;
-		.address {
-			width: 32rpx;
-			height: 38rpx;
-		}
-		.shop-name {
-			height: 38rpx;
-			position: relative;
-			top: -4rpx;
-			z-index: 100;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-			padding-left: 10rpx;
-		}
-		.shop-jt {
-			margin-left: 8rpx;
-			width: 16rpx;
-			height: 10rpx;
-		}
-		.input-box {
-			margin-left: 10rpx;
-			position: relative;
-			z-index: 99;
-			width: 520rpx;
-			height: 60rpx;
-			background: rgba(255, 255, 255, 0.4);
-			border-radius: 30rpx;
-			.input-content {
-				position: relative;
-				z-index: 11;
-				border-radius: 99rpx;
-				flex-grow: 1;
-				padding: 5rpx 30rpx;
-				background: rgba(255, 255, 255, 0.4);
-				.iconsearch {
-					font-size: 50rpx;
-					color: #ffffff;
-				}
-				.input {
-					margin-left: 19rpx;
-					flex-grow: 1;
-					color: #ffffff;
-					input {
-						font-size: 28rpx;
-
-						color: #ffffff;
-					}
-				}
-			}
-			.input-button {
-				padding-left: 20rpx;
-				font-size: $font-base;
-				height: 100%;
-			}
-		}
-	}
-}
-.carousel {
-	position: relative;
-	z-index: 3;
-	width: 100%;
-	height: 360rpx;
-	.carousel-item {
-		width: 100%;
-		height: 100%;
-		padding: 0 28rpx;
-		overflow: hidden;
-	}
-	image {
-		width: 100%;
-		height: 100%;
-		border-radius: $border-radius-sm;
-	}
-}
-.navbar {
-	position: relative;
-	z-index: 2;
-	margin-top: -200rpx;
-	width: 750rpx;
-	height: 462rpx;
-	background: #ffffff;
-	border-radius: 40rpx;
-	.navbar-box {
-		padding-top: 250rpx;
-		.navbar-item {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			width: 20%;
-			.nitem-image {
-				width: 98rpx;
-				height: 98rpx;
-			}
-			.nitem-font {
-				margin-top: 22rpx;
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #000000;
-			}
-		}
-	}
-}
-.product-box {
-	margin-top: 20rpx;
-	background: #ffffff;
-	padding: 26rpx 30rpx 20rpx;
-	.product-title {
-		display: flex;
-		align-items: center;
-		.pt-image {
-			width: 36rpx;
-			height: 36rpx;
-		}
-		.pt-title {
-			margin-left: 8rpx;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-		.pt-tip {
-			margin-left: 16rpx;
-			font-size: 20rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #95a0b1;
-		}
-	}
-	.hotgoods {
-		margin-top: 38rpx;
-		width: 100%;
-		display: flex;
-		flex-wrap: wrap;
-		padding: 0 0 30rpx;
-
-		.hotgoods-item {
-			width: 48%;
-			background-color: #ffffff;
-			border-radius: 12rpx;
-			&:nth-child(2n + 1) {
-				margin-right: 24rpx;
-			}
-			.image-wrapper {
-				width: 100%;
-				height: 330rpx;
-				border-radius: 3px;
-				overflow: hidden;
-				position: relative;
-				.image-bg {
-					position: absolute;
-					top: 0;
-					left: 0;
-					right: 0;
-					bottom: 0;
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-					z-index: 2;
-				}
-				.image {
-					width: 100%;
-					height: 100%;
-					opacity: 1;
-					border-radius: 12rpx 12rpx 0 0;
-				}
-			}
-			.title {
-				margin-top: 24rpx;
-				font-size: 28rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #333333;
-			}
-			.hot-price {
-				display: flex;
-				justify-content: flex-start;
-				align-items: center;
-				padding: 14rpx 0 30rpx;
-				.hotPrice-box {
-					width: 70rpx;
-					height: 28rpx;
-					background: linear-gradient(90deg, #c79a4c, #f9df7f);
-					border-radius: 5rpx;
-					text-align: center;
-					line-height: 28rpx;
-					font-size: 20rpx;
-					font-family: Source Han Sans CN;
-					font-weight: 400;
-					color: #ffffff;
-				}
-				.price {
-					margin-left: 10rpx;
-					font-size: 40rpx;
-					color: #ff0000;
-					font-weight: 500;
-				}
-				.yuanPrice {
-					margin-left: 10rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					text-decoration: line-through;
-					color: #999999;
-				}
-				.cart-icon {
-					image {
-						width: 44rpx;
-						height: 44rpx;
-					}
-				}
-			}
-		}
-	}
-}
-.shop {
-	margin-top: 20rpx;
-	background: #ffffff;
-	padding: 0 12rpx;
-	.shop-title {
-		padding: 30rpx 0 20rpx;
-		display: flex;
-		align-items: center;
-		border-bottom: 1px solid #e3e6e7;
-		.shop-item {
-			width: 25%;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			.sitem-font {
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #333333;
-			}
-			.jt-down {
-				width: 10rpx;
-				height: 8rpx;
-				margin-left: 12rpx;
-			}
-		}
-	}
-}
-.shop-main {
-	padding: 32rpx 18rpx 0 12rpx;
-	align-items: flex-start;
-	justify-content: flex-start;
-	.main-left {
-		width: 180rpx;
-		height: 180rpx;
-		border-radius: 10rpx;
-	}
-	.main-right {
-		width: 500rpx;
-		justify-content: space-between;
-		align-items: flex-start;
-		margin-left: 20rpx;
-		padding: 13rpx 0 35rpx;
-		border-bottom: 1px solid #eaeced;
-		.shopm-info {
-			max-width: 60%;
-			line-height: 1;
-			.shopm-title {
-				display: flex;
-				justify-content: flex-start;
-				.shopmt-font {
-					font-size: 34rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #333333;
-				}
-				.shopmt-good {
-					margin-left: 6rpx;
-					width: 30rpx;
-					height: 30rpx;
-					border: 1px solid #ff4c4c;
-					border-radius: 5rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #ff4c4c;
-					text-align: center;
-					line-height: 30rpx;
-				}
-			}
-			.address {
-				margin-top: 16rpx;
-				font-size: 24rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #666666;
-			}
-			.shopmt-tip {
-				position: relative;
-				display: inline-block;
-				flex-grow: 0;
-				margin-top: 52rpx;
-				padding: 8rpx;
-				background: #fcf3f0;
-				border-radius: 16rpx 16rpx 16rpx 0px;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #ff440d;
-			}
-		}
-		.right {
-			height: 100%;
-			margin-top: 5rpx;
-			display: flex;
-			flex-direction: column;
-			.mright-top {
-				display: flex;
-				justify-content: flex-end;
-				align-items: center;
-				.mrt-image {
-					width: 20rpx;
-					height: 28rpx;
-				}
-				.mrt-font {
-					margin-left: 8rpx;
-					font-size: 22rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #666666;
-				}
-			}
-			.mright-bottom {
-				margin-top: 80rpx;
-				display: flex;
-				justify-content: flex-end;
-				.mrb-item {
-					width: 46rpx;
-					height: 46rpx;
-					margin-left: 14rpx;
-				}
-			}
-		}
-	}
-}
+<template>
+	<view class="container">
+		<view class="carousel-section">
+			<!-- 背景色区域 -->
+			<view class="bg">
+				<image src="../../static/index/index13.png" mode=""></image>
+			</view>
+			<!-- 标题栏和状态栏占位符 -->
+			<view class="titleNview-placing"></view>
+			<!-- 搜素栏 -->
+			<view class="search flex">
+				<!-- <image src="../../static/index/index09.png" class="address"></image> -->
+				<!-- <view class="shop-name clamp" @click.stop="canChange == 0?nav('/pages/shoping/list'):''">{{ storeInfo.name }}</view> -->
+				<!-- <view class="shop-name clamp">椒江区</view> -->
+				<!-- <image class="shop-jt" src="../../static/index/index07.png" mode=""></image> -->
+				<view class="input-box flex" @click.stop="clickSearch">
+					<view class=" input-content flex">
+						<view class="iconfont iconsearch"></view>
+						<view class="input"><input type="text" disabled value="输入关键字搜索" /></view>
+					</view>
+				</view>
+			</view>
+			<swiper class="carousel" autoplay="true" duration="400" interval="5000" :indicator-dots="true"
+				indicator-active-color="#FFFFFF">
+				<!-- <swiper class="carousel" autoplay="true" duration="400" interval="5000"> -->
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item">
+					<image :src="item.pic" mode="aspectFill" @click="bannerNavToUrl(item)"></image>
+				</swiper-item>
+			</swiper>
+		</view>
+		<view class="navbar">
+			<view class="navbar-box flex">
+				<view class="navbar-item" @click="navTo('/pages/product/list')">
+					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
+					<view class="nitem-font">全部商品</view>
+				</view>
+				<view class="navbar-item" @click="navTo('')">
+					<image class="nitem-image" src="../../static/index/index04.png" mode=""></image>
+					<view class="nitem-font">公司介绍</view>
+				</view>
+				<view class="navbar-item" @click="$refs.popupkf.open()">
+					<image class="nitem-image" src="../../static/index/index16.png" mode=""></image>
+					<view class="nitem-font">联系客服</view>
+				</view>
+
+				<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
+					<image class="nitem-image" src="../../static/index/index02.png" mode=""></image>
+					<view class="nitem-font">邀请有礼</view>
+				</view>
+			</view>
+		</view>
+		<view class="product-box" v-if="bastList.length != 0">
+			<view class="cnxh">
+				<view class="hx">
+
+				</view>
+				<view class="">
+					猜你喜欢
+				</view>
+				<view class="hx">
+
+				</view>
+			</view>
+			<view class="hotgoods">
+				<view class="hotgoods-item" v-for="item in bastList" :key="item.id" @click="navToDetailPage(item)">
+					<view class="image-wrapper">
+						<image class="image-bg" src="../../static/img/libao-bg.png" mode=""></image>
+						<image class="image" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="title clamp2">{{ item.store_name }}</view>
+					<view class="hot-price">
+						<view class="hotPrice-box">会员价</view>
+						<view class="price">
+							<text class="font-size-sm">¥</text>
+							{{ item.price * 1 }}
+						</view>
+						<view class="yuanPrice">{{ item.ot_price }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 客服 -->
+		<uni-popup ref="popupkf" type="center">
+			<view class="popup-box">
+				<view class="img">
+					<image src="../../static/img/img009.png" mode=""></image>
+				</view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image src="../../static/img/img010.png" mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="kfClose()">取消</view>
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		lookSubpoints,
+		lookOneself
+	} from '../../api/user.js';
+	import seckill from '../../components/seckill/seckill.vue';
+	import {
+		loadIndexs
+	} from '@/api/index.js';
+	import {
+		getUserInfo,
+		spread
+	} from '@/api/user.js';
+	import {
+		setCoupons
+	} from '@/api/functionalUnit.js';
+	import {
+		getBargainList,
+		getProducts
+	} from '@/api/product.js';
+	import {
+		interceptor
+	} from '@/utils/loginUtils';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		tabbar
+	} from '@/utils/tabbar.js';
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
+	import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+	export default {
+		components: {
+			seckill
+		},
+		data() {
+			return {
+				text: '',
+				tabbar: tabbar,
+				current: 0,
+				shareShow: false, //分享海报
+				pageProportion: 0, //保存页面基于750宽度的比例
+				swiperHeight: 0,
+				checkid: 0,
+				titleNViewBackground: '',
+				longitude: 0, //经度
+				latitude: 0, //纬度
+				swiperCurrent: 0,
+				swiperLength: 0,
+				carouselList: [], //轮播列表
+				bastList: [], //会员礼包
+				shoplist: [], //商店列表
+				page: 1,
+				limit: 5,
+				bargainlist: []
+			};
+		},
+		computed: {
+			...mapState(['loginInterceptor', 'baseURL']),
+			...mapState('user', ['hasLogin', 'userInfo'])
+		},
+		onLoad: function(option) {
+			this.getaddress();
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			// #endif
+			// #ifdef H5
+			this.IndexShare();
+			//#endif
+		},
+		onShow: function() {
+			// 判断是否强制登录
+			// if (!this.hasLogin) {
+			// 	// 登录拦截
+			// 	interceptor();
+			// }
+			this.loadData();
+			this.getProduct()
+			// this.getBargainList();
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loadData();
+		},
+		// #ifndef MP
+		// 监听导航栏输入框点击事件
+		onNavigationBarSearchInputClicked(e) {
+			//跳转到搜索页面
+			this.clickSearch();
+		},
+		//点击导航栏 buttons 时触发
+		onNavigationBarButtonTap(e) {
+			const index = e.index;
+			if (index === 0) {
+				this.$api.msg('点击了扫描');
+			} else if (index === 1) {
+				// #ifdef APP-PLUS
+				const pages = getCurrentPages();
+				const page = pages[pages.length - 1];
+				const currentWebview = page.$getAppWebview();
+				currentWebview.hideTitleNViewButtonRedDot({
+					index
+				});
+				// #endif
+				uni.navigateTo({
+					url: '/pages/user/notice'
+				});
+			}
+		},
+		// #endif
+		methods: {
+			...mapMutations(['setLat', 'setLon']),
+			kfClose() {
+				this.$refs.popupkf.close()
+			},
+			// 复制
+			comfirm(text) {
+				console.log(text);
+				const result = uniCopy(text);
+				if (result === false) {
+					uni.showToast({
+						title: '不支持'
+					});
+				} else {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none'
+					});
+				}
+				this.$refs.popupkp.close();
+			},
+			// #ifdef H5
+			IndexShare() {
+				let obj = this;
+				let pages = getCurrentPages();
+				// 获取当前页面
+				let page = pages[pages.length - 1];
+				let path = '#/' + page.route + '?';
+				// 保存传值
+				for (let i in page.options) {
+					path += i + '=' + page.options[i] + '&';
+				}
+				console.log(obj.Path);
+				// 保存邀请人
+				path += 'spread=' + this.userInfo.uid;
+				let data = {
+					link: this.baseURL + '/index/' + path,
+					title: this.userInfo.nickname + '邀请您进入响亮商城',
+					desc: '欢迎加入响亮商城',
+					imgUrl: 'https://xl.liuniu946.com/index/static/img/logo.jpg'
+				};
+				console.log(data, '分享数据');
+				shareLoad(data);
+			},
+			// #endif
+			getaddress() {
+				console.log('dizhi+++++++++++');
+				let obj = this;
+				// uni.getLocation({
+				// 	type: 'gcj02',
+				// 	success: res => {
+				// 		console.log(res, 123456);
+				// 		obj.setLat(res.latitude);
+				// 		obj.setLon(res.longitude);
+				// 	},
+				// 	fail: err => {
+				// 		console.log(err, 'shi+++++++++++++++');
+				// 		openMap().then(e => {
+				// 			this.getaddress();
+				// 		});
+				// 	}
+				// });
+				weixindata().then(wxOjb => {
+					console.log(wxOjb, '获取微信');
+					wxOjb.getLocation({
+						type: 'gcj02',
+						success: res => {
+							console.log(res, 123456);
+							obj.setLat(res.latitude);
+							obj.setLon(res.longitude);
+						},
+						fail: err => {
+							console.log(err, 'shi+++++++++++++++');
+							openMap().then(e => {
+								this.getaddress();
+							});
+						}
+					});
+				});
+			},
+			//砍价商品推荐详情页
+			navToDetailPages(item) {
+				let id = item.product_id;
+				//let type = 2;
+
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id
+				});
+			},
+			navTo(url) {
+				if (url == '') {
+					this.$api.msg('暂未开通,敬请期待');
+				} else {
+					uni.navigateTo({
+						url
+					});
+				}
+			},
+			openSubscribe: function(e) {
+				let page = e;
+				// #ifndef MP
+				uni.navigateTo({
+					url: page
+				});
+				// #endif
+				// #ifdef MP
+				uni.showLoading({
+					title: '正在加载'
+				});
+				openBargainSubscribe()
+					.then(res => {
+						uni.hideLoading();
+						uni.navigateTo({
+							url: page
+						});
+					})
+					.catch(err => {
+						uni.hideLoading();
+					});
+				// #endif
+			},
+			getBargainList() {
+				let that = this;
+
+				getBargainList({
+						page: that.page,
+						limit: that.limit
+					})
+					.then(function(res) {
+						that.$set(that, 'bargainlist', res.data.slice(0, 2));
+						console.log(that.bargainlist)
+					})
+					.catch(res => {
+						console.log(res, 'getBargainList');
+					});
+			},
+			Mask() {
+				this.MaskShow = false;
+				this.shareShow = true;
+				uni.setStorage({
+					key: 'FirstEntry',
+					data: true,
+					success: function() {
+						console.log(uni.getStorageSync('FirstEntry'), 'Mask');
+					}
+				});
+			},
+			Toshare() {
+				if (this.userInfo == '') {
+					getUserInfo({})
+						.then(({
+							data
+						}) => {
+							this.setUserInfo(data);
+							this.userInfo = data;
+						})
+						.catch(e => {});
+				} else {
+					this.shareShow = false;
+					uni.navigateTo({
+						url: '/pages/user/shareQrCode?spread=' + this.userInfo.uid
+					});
+				}
+			},
+			Tocancel() {
+				this.shareShow = false;
+			},
+			// 监听切换事件
+			listChange(e) {
+				this.checkid = e.detail.current;
+			},
+			// 點擊搜索框
+			clickSearch() {
+				uni.navigateTo({
+					url: '/pages/product/search'
+				});
+			},
+			// 点击触发领取优惠券
+			setCoupons(item) {
+				// 判断是否已经领取了优惠券
+				let obj = this;
+				uni.showModal({
+					title: '领取提示',
+					content: '是否领取优惠券',
+					success(e) {
+						if (e.confirm) {
+							setCoupons({
+								couponId: item.id
+							}).then(e => {
+								item.is_use = true;
+								uni.showToast({
+									title: '领取成功',
+									type: 'top',
+									duration: 2000
+								});
+							});
+						}
+					}
+				});
+			},
+			//商品种类切换
+			change(item) {
+				let id = item;
+				this.checkid = id;
+				if (this.checkid == 1) {
+					// console.log(1);
+					this.detail = this.selected_detail;
+				} else if (this.checkid == 2) {
+					// console.log(2);
+					this.detail = this.new_product;
+				} else {
+					this.detail = this.cheap_good;
+				}
+			},
+			// 监听图片加载完成
+			onImageError(key, index) {
+				this[key][index].image = '/static/error/errorImage.jpg';
+			},
+			// 请求载入数据
+			async loadData() {
+				loadIndexs({})
+					.then(({
+						data
+					}) => {
+						let goods = data.info;
+						this.carouselList = data.banner;
+						console.log(this.carouselList, 'this.carouselList++++++++')
+						this.swiperLength = this.carouselList.length;
+						// this.bastList = data.giftInfo; //会员礼包
+						uni.stopPullDownRefresh();
+					})
+					.catch(e => {
+						uni.stopPullDownRefresh();
+					});
+			},
+			//轮播图切换修改背景色
+			swiperChange(e) {
+				const index = e.detail.current;
+				this.swiperCurrent = index;
+				this.titleNViewBackground = this.carouselList[index].background;
+			},
+			//详情页
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id + '&isVip=1'
+				});
+			},
+
+			// 轮播图跳转
+			bannerNavToUrl(item) {
+				// #ifdef H5
+				console.log(item.wap_url.indexOf('http'), 'banner');
+				if (item.wap_url.indexOf('http') >= 0) {
+					window.location.href = item.wap_url;
+				}
+				// #endif
+				//测试数据没有写id,用title代替
+				uni.navigateTo({
+					url: item.wap_url
+				});
+			},
+			getProduct() {
+				getProducts().then(res => {
+					console.log(res.data)
+					this.bastList = res.data
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.carousel-section {
+		position: relative;
+		padding-top: 10px;
+
+		.bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 750rpx;
+			height: 378rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.titleNview-placing {
+			height: var(--status-bar-height);
+			box-sizing: content-box;
+		}
+
+		.search {
+			justify-content: flex-start;
+			padding: 10rpx 32rpx 20rpx;
+			align-items: center;
+
+			.address {
+				width: 32rpx;
+				height: 38rpx;
+			}
+
+			.shop-name {
+				height: 38rpx;
+				position: relative;
+				top: -4rpx;
+				z-index: 100;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+				padding-left: 10rpx;
+			}
+
+			.shop-jt {
+				margin-left: 8rpx;
+				width: 16rpx;
+				height: 10rpx;
+			}
+
+			.input-box {
+				margin-left: 10rpx;
+				position: relative;
+				z-index: 99;
+				width: 700rpx;
+				height: 60rpx;
+				background: rgba(255, 255, 255, 0.4);
+				border-radius: 30rpx;
+
+				.input-content {
+					position: relative;
+					z-index: 11;
+					border-radius: 99rpx;
+					flex-grow: 1;
+					padding: 5rpx 30rpx;
+					background: rgba(255, 255, 255, 0.4);
+
+					.iconsearch {
+						font-size: 50rpx;
+						color: #ffffff;
+					}
+
+					.input {
+						margin-left: 19rpx;
+						flex-grow: 1;
+						color: #ffffff;
+
+						input {
+							font-size: 28rpx;
+
+							color: #ffffff;
+						}
+					}
+				}
+
+				.input-button {
+					padding-left: 20rpx;
+					font-size: $font-base;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.carousel {
+		position: relative;
+		z-index: 3;
+		width: 100%;
+		height: 360rpx;
+
+		.carousel-item {
+			width: 100%;
+			height: 100%;
+			padding: 0 28rpx;
+			overflow: hidden;
+		}
+
+		image {
+			width: 100%;
+			height: 100%;
+			border-radius: $border-radius-sm;
+		}
+	}
+
+	.navbar {
+		position: relative;
+		z-index: 2;
+		margin-top: -200rpx;
+		width: 750rpx;
+		height: 462rpx;
+		background: #ffffff;
+		border-radius: 40rpx;
+
+		.navbar-box {
+			padding-top: 250rpx;
+
+			.navbar-item {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				width: 25%;
+
+				.nitem-image {
+					width: 98rpx;
+					height: 98rpx;
+				}
+
+				.nitem-font {
+					margin-top: 22rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #000000;
+				}
+			}
+		}
+	}
+
+	.product-box {
+		margin-top: 20rpx;
+		background: #ffffff;
+		padding: 26rpx 30rpx 20rpx;
+
+		.product-title {
+			display: flex;
+			align-items: center;
+
+			.pt-image {
+				width: 36rpx;
+				height: 36rpx;
+			}
+
+			.pt-title {
+				margin-left: 8rpx;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.pt-tip {
+				margin-left: 16rpx;
+				font-size: 20rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #95a0b1;
+			}
+		}
+
+		.hotgoods {
+			margin-top: 38rpx;
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			padding: 0 0 30rpx;
+
+			.hotgoods-item {
+				width: 48%;
+				background-color: #ffffff;
+				border-radius: 12rpx;
+
+				&:nth-child(2n + 1) {
+					margin-right: 24rpx;
+				}
+
+				.image-wrapper {
+					width: 100%;
+					height: 330rpx;
+					border-radius: 3px;
+					overflow: hidden;
+					position: relative;
+
+					.image-bg {
+						position: absolute;
+						top: 0;
+						left: 0;
+						right: 0;
+						bottom: 0;
+						width: 100%;
+						height: 100%;
+						opacity: 1;
+						border-radius: 12rpx 12rpx 0 0;
+						z-index: 2;
+					}
+
+					.image {
+						width: 100%;
+						height: 100%;
+						opacity: 1;
+						border-radius: 12rpx 12rpx 0 0;
+					}
+				}
+
+				.title {
+					margin-top: 24rpx;
+					font-size: 28rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #333333;
+				}
+
+				.hot-price {
+					display: flex;
+					justify-content: flex-start;
+					align-items: center;
+					padding: 14rpx 0 30rpx;
+
+					.hotPrice-box {
+						width: 70rpx;
+						height: 28rpx;
+						background: linear-gradient(90deg, #c79a4c, #f9df7f);
+						border-radius: 5rpx;
+						text-align: center;
+						line-height: 28rpx;
+						font-size: 20rpx;
+						font-family: Source Han Sans CN;
+						font-weight: 400;
+						color: #ffffff;
+					}
+
+					.price {
+						margin-left: 10rpx;
+						font-size: 40rpx;
+						color: #ff0000;
+						font-weight: 500;
+					}
+
+					.yuanPrice {
+						margin-left: 10rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #999999;
+					}
+
+					.cart-icon {
+						image {
+							width: 44rpx;
+							height: 44rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+
+		.img {
+			position: relative;
+			top: -56rpx;
+			left: 0;
+			width: 522rpx;
+			height: 132rpx;
+			display: flex;
+			justify-content: center;
+
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 450rpx;
+				height: 132rpx;
+			}
+		}
+
+		.mian {
+			margin-top: -44rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+
+				.title {}
+
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+
+					font-size: 32rpx;
+					color: #605128;
+				}
+
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
+		}
+
+	}
+
+	.cnxh {
+		text-align: center;
+		font-size: 30rpx;
+		font-weight: 500;
+		color: #363636;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		padding: 20rpx 0;
+
+		.hx {
+			width: 120rpx;
+			height: 1rpx;
+			background: #989898;
+			margin: 0 40rpx;
+		}
+	}
 </style>

+ 453 - 259
pages/money/withdrawal.vue

@@ -1,260 +1,454 @@
-<template>
-	<view class="content">
-		<view class="content-money">
-			<view class="flex ">
-				<view class="buttom">
-					<view class="icon">{{ money | getMoneyStyle }}</view>
-					<text class="text">可转换金额</text>
-				</view>
-			</view>
-		</view>
-		<view class="row-box">
-			<view class="title">转换金额</view>
-			<view class="row">
-				<text class="tit">¥</text>
-				<input class="input" type="number" v-model="withdrawal" placeholder="请输入消费券数量" placeholder-class="placeholder" />
-				<view class="buttom" @click="withdrawal = money">全部转换</view>
-			</view>
-		</view>
-		<button class="add-btn up" @click="confirm">提交申请</button>
-		<view class="tip" v-if="withdrawal != 0">
-			实际到账{{ realmoney }}现金,{{ gy }}响亮积分
-		</view>
-	</view>
-</template>
-
-<script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { exchangeCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type: 'weixin', //提现方式
-			money: '0.00', //可提现金额
-			withdrawal: '', //提现金额
-			aliData: {},
-			bankData: {},
-			// #ifdef H5
-			weichatBsrowser: false
-			// #endif
-		};
-	},
-	onLoad(options) {
-		// #ifdef H5
-		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
-		// #endif
-		//加载提现信息
-		this.loadData();
-		// 加载提款账号信息
-		this.loadAli();
-		this.loadBank();
-	},
-	computed:{
-		realmoney() {
-			return (this.withdrawal * 0.7).toFixed(2) * 1
-		},
-		gy() {
-			return (this.withdrawal * 0.3).toFixed(2) * 1
-		}
-	},
-	methods: {
-		// 更新数据
-		dataUp(){
-			this.loadAli();
-			this.loadBank();
-		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
-			});
-		},
-		// 加载余额信息
-		async loadData() {
-			extractBank({}).then(({ data }) => {
-				this.money = data.commissionCount;//可提现余额
-				this.minPrice = data.minPrice;//最小提现
-			});
-		},
-		// 跳转
-		navTo(url) {
-			uni.navigateTo({
-				url: url
-			});
-		},
-		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
-		// 提交
-		confirm() {
-			let data = {
-				money: this.withdrawal, //金额
-			}
-			exchangeCash(data)
-				.then(e => {
-					uni.showToast({
-						title: '提交成功',
-						duration: 2000,
-						position: 'top'
-					});
-				})
-				.catch(e => {
-					console.log();
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-.content-money {
-	padding: 30rpx 0;
-	background: #ffffff;
-}
-.flex {
-	background-color: #ffffff;
-	text-align: center;
-	margin: 0 30rpx;
-	border-radius: $border-radius-sm;
-	.buttom {
-		width: 100%;
-		text-align: center;
-		font-size: $font-lg;
-	}
-	.interval {
-		width: 2px;
-		height: 60rpx;
-		background-color: #eeeeee;
-	}
-	.icon {
-		background-size: 100%;
-		font-size: 42rpx;
-		color: $font-color-dark;
-		font-weight: bold;
-		background-repeat: no-repeat;
-		background-position: center;
-	}
-	.text {
-		color: $font-color-light;
-	}
-}
-
-.row-box {
-	margin-top: 30rpx;
-	padding: 20rpx 30rpx;
-	background: #fff;
-	.title {
-		font-size: $font-base + 2rpx;
-		color: $font-color-dark;
-	}
-	.row {
-		display: flex;
-		align-items: center;
-		position: relative;
-		height: 80rpx;
-		.tit {
-			flex-shrink: 0;
-			width: 40rpx;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.input {
-			flex: 1;
-			font-size: 30rpx;
-			color: $font-color-dark;
-		}
-		.iconlocation {
-			font-size: 36rpx;
-			color: $font-color-light;
-		}
-
-		.buttom {
-			color: $font-color-spec;
-			font-size: $font-base;
-		}
-	}
-}
-.add-btn {
-	&.modified {
-		color: $base-color;
-	}
-	&.up {
-		background-color: $base-color;
-		color: #fff;
-	}
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-
-.list {
-	padding-left: 30rpx;
-	margin-top: 30rpx;
-	background-color: #ffffff;
-	.box {
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: 120rpx;
-		border-bottom: 1px solid $border-color-light;
-		.icon {
-			font-size: 48rpx;
-			padding-right: 20rpx;
-			.icon-img {
-				height: 50rpx;
-				width: 50rpx;
-			}
-		}
-		.iconweixin1 {
-			color: #18bf16;
-		}
-		.iconzhifubao {
-			color: #08aaec;
-		}
-		.title-box {
-			flex-grow: 1;
-			text-align: left;
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-base;
-			}
-			.node {
-				font-size: $font-sm;
-				color: $font-color-light;
-			}
-		}
-	}
-}
-.tip {
-	padding: 20rpx 40rpx;
-	color: #FD3B39;
-}
-/deep/ .uni-radio-input {
-	width: 45rpx;
-	height: 45rpx;
-}
+<template>
+	<view class="content">
+		<!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
+		<view class="content-money">
+			<view class="flex " style="width: 750rpx;justify-content: space-around;margin-left: 0;">
+				<view class="buttom">
+					<view class="icon">{{ money | getMoneyStyle }}</view>
+					<text class="text">可提现{{showType}}</text>
+				</view>
+			</view>
+		</view>
+
+		<view class="row-box">
+			<view class="title">提现金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" placeholder="请输入提现金额"
+					placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部提现</view>
+			</view>
+		</view>
+		<!-- #ifndef MP-WEIXIN -->
+		<view class="list">
+			<radio-group @change="tabRadio">
+				<!-- <label>
+					<view class="box">
+						<view class="icon iconfont iconweixin1"></view>
+						<view class="title-box">
+							<view class="title"><text>提现至微信</text></view>
+						</view>
+						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
+					</view>
+				</label> -->
+				<label>
+					<view class="box">
+						<view class="icon iconfont iconzhifubao"></view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
+							</view>
+							<view class="node">
+								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right">
+							<radio value="alipay" color="#ff0060" :checked="type == 'alipay'" />
+						</view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon iconfont">
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
+						</view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-else>请创建银行账号</text>
+							</view>
+							<view class="node">
+								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right">
+							<radio value="bank" color="#ff0060" :checked="type == 'bank'" />
+						</view>
+					</view>
+				</label>
+			</radio-group>
+		</view>
+		<!-- #endif -->
+		<view class="row b-b" v-if="type == 'alipay'">
+			<text class="tit">支付宝账号</text>
+			<input class="input" type="text" v-model="alipay_code" placeholder="请输入支付宝账号"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'alipay'">
+			<text class="tit">支付宝姓名</text>
+			<input class="input" type="text" v-model="alipay_name" placeholder="请输入支付宝姓名"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">银行卡号</text>
+			<input class="input" type="text" v-model="bank_code" placeholder="请输入银行卡号"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">姓名</text>
+			<input class="input" type="text" v-model="bank_people" placeholder="请输入银行卡姓名"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b" v-if="type == 'bank'">
+			<text class="tit">所属银行</text>
+			<input class="input" type="text" v-model="bank_name" placeholder="请输入所属银行"
+				placeholder-class="placeholder" />
+		</view>
+		<button class="add-btn up" @click="confirm" :class="{'loading': load}">提交申请</button>
+		<!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
+	</view>
+</template>
+
+<script>
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		extractCash,
+		extractBank,
+		aliInfo,
+		bankInfo
+	} from '@/api/wallet.js';
+	import {
+		orderData,
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			uniNoticeBar
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		data() {
+			return {
+				load: true,
+				showType: '',
+				from: '',
+				type: 'alipay', //提现方式
+				money: '0.00', //可提现金额
+				freeze: '0.0', //冻结金额
+				withdrawal: '', //提现金额
+				minPrice: '', //最少提现金额
+				aliData: {},
+				bankData: {},
+				alipay_code: '',
+				alipay_name: '',
+				bank_code: '',
+				bank_people: '',
+				bank_name: '',
+				// #ifdef H5
+				weichatBsrowser: false
+				// #endif
+			};
+		},
+		onLoad(options) {
+			// #ifdef H5
+			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+			// #endif
+			if (options.type) {
+				this.from = options.type
+				if (this.from == 'purple') {
+					this.showType = '紫积分'
+				}
+				if (this.from == 'shop') {
+					this.showType = '商家积分'
+				}
+			}
+			//加载提现信息
+			this.loadData();
+			// // 加载提款账号信息
+			// this.loadAli();
+			// this.loadBank();
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			// 加载余额信息
+			async loadData() {
+				let obj = this
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						console.log(data)
+						this.setUserInfo(data);
+						if (obj.from == 'purple') {
+							obj.money = data.purple_integral
+						}
+						if (obj.from == 'shop') {
+							obj.money = data.business_integral
+						}
+						obj.load = false
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				if (this.load) {
+					return
+				}
+				let data = {
+					extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
+					money: this.withdrawal, //金额
+					type: this.from == 'purple' ? 1 : 2 //0佣金1余额  1紫积分 2商家积分
+				};
+				if (this.withdrawal % 100 != 0) {
+					uni.showToast({
+						title: '提现金额为100的倍数',
+						duration: 2000,
+						mask: false,
+						icon: 'none'
+					});
+					return;
+				}
+				if (this.withdrawal < this.minPrice) {
+					uni.showToast({
+						title: '提现金额不可少于' + this.minPrice,
+						duration: 2000,
+						mask: false,
+						icon: 'none'
+					});
+					return;
+				}
+				if (this.type == 'alipay') {
+					console.log('alipay');
+					data.name = this.alipay_name;
+					data.alipay_code = this.alipay_code;
+				}
+				if (this.type == 'bank') {
+					data.name = this.bank_people;
+					data.bankname = this.bank_name;
+					data.cardnum = this.bank_code;
+				}
+				this.load = true
+				extractCash(data)
+					.then(e => {
+						this.loadData()
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+					})
+					.catch(e => {
+						this.load = false
+						console.log();
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
+	}
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
+			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
+		}
+
+		.text {
+			color: $font-color-light;
+		}
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: #ff0060;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.add-btn {
+		&.modified {
+			color: #ffffff;
+		}
+
+		&.up {
+			background: linear-gradient(90deg, #ff0060, #ff0060);
+			color: #fff;
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30upx;
+		height: 110upx;
+		background: #fff;
+
+		.tit {
+			flex-shrink: 0;
+			width: 250upx;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30upx;
+			color: $font-color-dark;
+		}
+
+		.iconlocation {
+			font-size: 36upx;
+			color: $font-color-light;
+		}
+	}
+
+	.tip {
+		padding: 20rpx;
+		color: #fd3b39;
+	}
+
+	.loading {
+		background: #999;
+	}
 </style>

+ 807 - 784
pages/product/product.vue

@@ -1,785 +1,808 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 标题 -->
-		<product-content :goodsObjact="goodsObjact"></product-content>
-		<view class="c-list">
-			<view class="c-row b-b" @click="toggleSpec">
-				<text class="tit">购买数量</text>
-				<view class="con">
-					<text class="selected-text">{{ goodsNumber }}</text>
-				</view>
-				<text class="iconfont iconenter"></text>
-			</view>
-			<view class="c-row b-b">
-				<text>每购买一个送{{goodsObjact.give_integral}}响亮积分</text>
-			</view>
-		</view>
-		<!-- 拼货时间及优惠 -->
-		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
-		<!-- 猜你喜欢 -->
-		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
-		<!-- 评价 -->
-		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list"></estimate>
-		<!-- 规格信息 -->
-		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
-		<!-- 图文详情 -->
-		<content-text :description="description"></content-text>
-		<!-- 底部高度撑开 -->
-		<view class="contentBottomHeight"></view>
-		<!-- 底部操作菜单 -->
-		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
-		<!-- 规格-模态层弹窗 -->
-		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer attr-content" @click.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="actionImage"></image>
-					<view class="right">
-						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
-						<text class="price">¥{{ actionPrice }}</text>
-						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
-						<!-- <view class="selected" v-if="goodsType == 0">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view> -->
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<view class="flex">
-					<view>购买数量</view>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view>
-				<button class="btn" @click.stop="buy">确定</button>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import uniNumberBox from '@/components/uni-number-box.vue';
-import { goodsDetail, cartAdd } from '@/api/product.js';
-import { mapState } from 'vuex';
-import store from '@/store/index.js';
-import { orderData, userinfo } from '@/api/user.js';
-import { saveUrl } from '@/utils/loginUtils.js';
-// #ifdef H5
-import { weixindata, shareLoad } from '@/utils/wxAuthorized';
-// #endif
-// 头部轮播图
-import topSwiper from './common/topSwiper.vue';
-// 标题
-import productContent from './common/productContent.vue';
-// 到货时间及优惠
-import discounts from './common/discounts.vue';
-// 规格信息
-import freshDetail from './common/freshDetail.vue';
-// 图文详情
-import contentText from './common/contentText.vue';
-// 底部按钮
-import productBottom from './common/productBottom.vue';
-// 猜你喜欢
-import guessLike from './common/guessLike.vue';
-// 评价
-import estimate from './common/estimate.vue';
-export default {
-	components: {
-		uniNumberBox,
-		guessLike,
-		topSwiper,
-		productContent,
-		discounts,
-		freshDetail,
-		contentText,
-		productBottom,
-		estimate
-	},
-	data() {
-		return {
-			goodsStore: 0, //选中库存
-			specList: [],
-			buys_show: true,
-			buys_shows: false,
-			specSelected: [], //选中的分类
-			specClass: 'none', //显示隐藏弹窗
-			many: 1, //1是单规格  2是多规格
-			reply: '', //评论
-			list: '', //商品详情的数据
-			type: 1, //默认支付方式add为
-			goodsType: 0,
-			goodsNumber: 1, //购买数量
-			goodsid: '', //商品id
-			description: '', //商品描述
-			goodsObjact: {
-				percent: 1
-			}, //保存商品数据
-			//图片循环
-			imgList: [],
-			// 对比对象
-			actionPrice: 0, //默认选中商品价格
-			actionImage: '', //默认选中图片
-			good_list: '', //猜你喜欢列表
-			goodsNumberMax: 0, //最大可购买数量
-			// 倒计时数据保存
-			seckillObj: {
-				stopTime: 0, //结束时间
-				stop: false, //是否结束
-				stopTimeH: 0, //小时
-				stopTimeM: 0, //分钟
-				stopTimeS: 0, //秒钟
-				stopTimeD: 0, //天
-				upTime: 0 //更新组件内部组件用
-			},
-			// 拼团数据保存
-			pink: {
-				id: '', //拼团编号
-				uid: '', //用户编号
-				people: '', //拼团人数
-				price: '', //拼团价格
-				stop_time: '', //拼团结束时间
-				nickname: '', //团长昵称
-				avatar: '', //团长头像
-				count: '', //拼团剩余人数
-				h: '', //时
-				i: '', //分
-				s: '' //秒
-			},
-			userInfo: '',
-			isVip: '0'
-		};
-	},
-	filters: {
-		parseIntTo(percent) {
-			percent = +percent * 100;
-			if (percent % 1 === 0) {
-				return percent;
-			} else {
-				percent = percent.toFixed(1);
-				return percent;
-			}
-		}
-	},
-	async onLoad(options) {
-		let obj = this;
-		userinfo({})
-			.then(({ data }) => {
-				obj.userInfo = data;
-				console.log(data,"123456")
-			})
-		//保存商品id
-		this.goodsid = options.id;
-		this.goodsType = options.type;
-		// 判断有无人邀请
-		if (options.spread) {
-			// 存储邀请人
-			uni.setStorageSync('spread', options.spread);
-		}
-		if (options.isVip) {
-			obj.isVip = options.isVip;
-		}
-		console.log(obj.isVip, 'vip');
-		saveUrl();
-		this.goodsDetail();
-		// 注册邀请信息
-		// #ifdef H5
-		let bool = uni.getStorageSync('weichatBrowser') || '';
-		if (bool) {
-			weixindata();
-		}
-		// #endif
-	},
-	computed: {
-		...mapState(['weichatObj', 'baseURL', 'urlFile'])
-	},
-	// 分享
-	// onShareAppMessage(options) {
-	// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
-	// 	let pages = getCurrentPages(); //获取加载的页面
-	// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-	// 	let url = currentPage.route; //当前页面url
-	// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-	// 	let shareObj = {
-	// 		title: this.goodsObjact.store_name,
-	// 		desc: obj.goodsObjact.store_info,
-	// 		path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
-	// 		imageUrl: this.goodsObjact.image,
-	// 		success: function(res) {
-	// 			// 转发成功之后的回调
-	// 			if (res.errMsg == 'shareAppMessage:ok') {
-	// 			}
-	// 		},
-	// 		fail: function() {
-	// 			// 转发失败之后的回调
-	// 			if (res.errMsg == 'shareAppMessage:fail cancel') {
-	// 				// 用户取消转发
-	// 			} else if (res.errMsg == 'shareAppMessage:fail') {
-	// 				// 转发失败,其中 detail message 为详细失败信息
-	// 			}
-	// 		}
-	// 	};
-
-	// 	return shareObj;
-	// },
-	methods: {
-		//选择规格
-		selectSpec(item, arr, ind) {
-			arr.attr_value.forEach(function(e) {
-				e.check = false;
-			});
-			item.check = true;
-			let obj = this;
-			obj.specSelected[ind] = item.attr;
-			let str = obj.specSelected.join(',');
-			// 获取当前选中的对象
-			if (obj.productValue[str]) {
-				obj.buys_show = true;
-				obj.buys_shows = false;
-				obj.actionPrice = obj.productValue[str].price;
-				obj.goodsNumberMax = obj.productValue[str].stock;
-				obj.actionImage = obj.productValue[str].image;
-				obj.uniqueId = obj.productValue[str].unique;
-				obj.goodsStore = obj.productValue[str].stock;
-			} else {
-				(obj.buys_show = false), (obj.buys_shows = true);
-			}
-			if (obj.goodsStore == 0) {
-				obj.buys_show = false;
-				obj.buys_shows = true;
-			}
-			obj.specSelected[ind] = item.attr;
-		},
-		// 打開彈窗
-		specOPne(type = 1) {
-			let obj = this;
-			obj.specClass = 'show';
-			obj.type = type;
-		},
-		//规格弹窗开关
-		toggleSpec(str) {
-			if (this.specClass === 'show') {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			} else if (this.specClass === 'none') {
-				this.specClass = 'show';
-			}
-			// 保存当前购买类型
-			this.type = str;
-		},
-		//领取优惠券
-		Getcoupon() {
-			uni.navigateTo({
-				url: '/pages/coupon/getcoupon'
-			});
-		},
-		// 购买数量变化
-		numberChange(e) {
-			this.goodsNumber = e.number;
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 保存分享人id链接
-			let url = window.location.href + '&spread=' + this.userInfo.uid;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace(/[\?,&]from=singlemessage/g, '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function(e) {
-						console.log(e);
-					}
-				};
-				console.log(data, '分享');
-				shareLoad(data);
-			}
-		},
-		// #endif
-		//详情页
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: '/pages/product/product?id=' + id
-			});
-		},
-		// 跳转页面
-		navTo(url) {
-			uni.navigateTo({
-				url: '/pages/product/reply?id=' + this.goodsid
-			});
-		},
-		//加入购物车
-		Addcar(item) {
-			let obj = this;
-			cartAdd({
-				cartNum: '1', //商品数量
-				uniqueId: '', //商品标签
-				new: 0, //商品是否新增加到购物车1为不加入0为加入
-				mer_id: '',
-				productId: item.id //商品编号
-			})
-				.then(function(e) {
-					uni.showToast({
-						title: '成功加入购物车',
-						type: 'top',
-						duration: 500,
-						icon: 'none'
-					});
-
-					obj.goodsDetail();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		goodsDetail() {
-			let obj = this;
-			// 获取普通商品信息
-			goodsDetail({}, this.goodsid).then(function({ data }) {
-				obj.list = data;
-				obj.good_list = data.good_list; //保存猜你喜欢列表
-				obj.reply = data.reply; //保存评论列表
-				let goods = data.storeInfo;
-				obj.goodsObjact = goods;
-				if (obj.goodsObjact.description != null) {
-					obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-				} //小程序商品详情图超出屏幕问题
-				obj.imgList = goods.slider_image; //保存轮播图
-				obj.specList = data.productAttr; //保存分类列表
-				if (Array.isArray(data.productValue) != true) {
-					obj.many = 2;
-					obj.specList = data.productAttr; //保存产品属性
-					obj.productValue = data.productValue; //保存属性值
-					obj.specSelected = []; //初始化默认选择对象
-					for (let i = 0; i < obj.specList.length; i++) {
-						// 设置默认数据
-						let attrValue = obj.specList[i].attr_value[0];
-						attrValue.check = true;
-						obj.specSelected.push(attrValue.attr);
-					}
-					let str = obj.specSelected.join(',');
-					console.log(str, 'str');
-					// 设置默认值
-					obj.actionPrice = obj.productValue[str].price;
-					obj.goodsNumberMax = obj.productValue[str].stock;
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodsStore = obj.productValue[str].quota;
-				} else {
-					obj.many = 1;
-					obj.productValue = data.productValue; //保存分类查询数据
-					obj.actionPrice = goods.price; //保存默认选中商品价格
-					obj.actionImage = goods.image_base; //保存默认选中商品图片
-					obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
-				}
-				obj.shopId = data.mer_id; //保存商店id
-				// #ifdef H5
-				obj.shareDate();
-				// #endif
-			});
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 保存分享人id链接
-			let url = window.location.href + '&spread=' + this.userInfo.uid;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace(/[\?,&]from=singlemessage/g, '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function(e) {
-						console.log(e);
-					}
-				};
-				shareLoad(data);
-			}
-		},
-		// #endif
-		// 立即购买
-		buy() {
-			let obj = this;
-			console.log(obj.userInfo);
-			if (obj.userInfo.lock_spread_user == null) {
-				if (obj.userInfo.unlock_spread_user == null) {
-					uni.showModal({
-						title: '提示',
-						content: '您未绑定或锁定邀请人,无法购买会员礼包,是否前往绑定关系',
-						success: function(res) {
-							if (res.confirm) {
-								console.log('用户点击确定');
-								uni.navigateTo({
-									url: '/pages/set/user'
-								});
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-					return;
-				} else {
-					uni.showModal({
-						title: '提示',
-						content: '已锁定邀请人:' + obj.userInfo.unlock_spread_user.phone + '购买商品后将绑定关系',
-						success: function(res) {
-							if (res.confirm) {
-								obj.buy1();
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
-					return;
-				}
-			}
-			// 创建传值对象
-			let data = {
-				cartNum: obj.goodsNumber, //商品数量
-				new: 1,
-				productId: obj.goodsid, //商品编号
-				uniqueId: obj.uniqueId
-			};
-
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			cartAdd(data)
-				.then(function(e) {
-					let da = e.data;
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
-						});
-					}
-					if (obj.type == 2) {
-						uni.showToast({
-							title: '成功加入购物车',
-							type: 'top',
-							duration: 2000,
-							icon: 'none'
-						});
-						obj.goodsDetail();
-					}
-					obj.toggleSpec();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		buy1() {
-			let obj = this;
-			let data = {
-				cartNum: obj.goodsNumber, //商品数量
-				new: 1,
-				productId: obj.goodsid, //商品编号
-				uniqueId: obj.uniqueId
-			};
-
-			if (obj.type == 2) {
-				data.new = 0;
-			}
-			cartAdd(data)
-				.then(function(e) {
-					let da = e.data;
-					if (obj.type == 1) {
-						// 跳转到支付页
-						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + da.cartId
-						});
-					}
-					if (obj.type == 2) {
-						uni.showToast({
-							title: '成功加入购物车',
-							type: 'top',
-							duration: 2000,
-							icon: 'none'
-						});
-						obj.goodsDetail();
-					}
-					obj.toggleSpec();
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 阻止触发上级事件
-		stopPrevent() {}
-	}
-};
-</script>
-
-<style lang="scss">
-/*  弹出层 */
-.popup {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	z-index: 99;
-
-	&.show {
-		display: block;
-		.mask {
-			animation: showPopup 0.2s linear both;
-		}
-		.layer {
-			animation: showLayer 0.2s linear both;
-		}
-	}
-	&.hide {
-		.mask {
-			animation: hidePopup 0.2s linear both;
-		}
-		.layer {
-			animation: hideLayer 0.2s linear both;
-		}
-	}
-	&.none {
-		display: none;
-	}
-	.mask {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		min-height: 30vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-		.btn {
-			height: 66rpx;
-			line-height: 66rpx;
-			border-radius: 100rpx;
-			// background: $uni-color-primary;
-			background: #FF4C4C;
-			font-size: $font-base + 2rpx;
-			color: #fff;
-			margin: 30rpx auto 20rpx;
-		}
-	}
-	@keyframes showPopup {
-		0% {
-			opacity: 0;
-		}
-		100% {
-			opacity: 1;
-		}
-	}
-	@keyframes hidePopup {
-		0% {
-			opacity: 1;
-		}
-		100% {
-			opacity: 0;
-		}
-	}
-	@keyframes showLayer {
-		0% {
-			transform: translateY(120%);
-		}
-		100% {
-			transform: translateY(0%);
-		}
-	}
-	@keyframes hideLayer {
-		0% {
-			transform: translateY(0);
-		}
-		100% {
-			transform: translateY(120%);
-		}
-	}
-}
-/* 规格选择弹窗 */
-.attr-content {
-	padding: 10rpx 30rpx;
-	.a-t {
-		display: flex;
-		image {
-			width: 170rpx;
-			height: 170rpx;
-			flex-shrink: 0;
-			border-radius: 8rpx;
-		}
-		.right {
-			display: flex;
-			flex-direction: column;
-			padding-left: 24rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-base;
-			line-height: 42rpx;
-			.good-name {
-				padding-top: 20rpx;
-				max-width: 320rpx;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #1d2023;
-				line-height: 42rpx;
-				margin-bottom: 15rpx;
-			}
-			.price {
-				font-size: 60rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #ff6f0f;
-				// font-size: $font-lg;
-				// color: $uni-color-primary;
-				// margin-bottom: 10rpx;
-			}
-			.selected-text {
-				margin-right: 10rpx;
-			}
-		}
-	}
-	.attr-list {
-		display: flex;
-		flex-direction: column;
-		font-size: $font-base + 2rpx;
-		color: $font-color-base;
-		padding-top: 30rpx;
-		padding-left: 10rpx;
-	}
-	.item-list {
-		padding: 20rpx 0 0;
-		display: flex;
-		flex-wrap: wrap;
-		.tit {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			// margin-left: 10rpx;
-			margin-right: 20rpx;
-			margin-bottom: 20rpx;
-			border-radius: 100rpx;
-			min-width: 60rpx;
-			height: 60rpx;
-			padding: 0 20rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-		}
-		.selected {
-			background: #FCEFF1;
-			border: 1px solid #EF041F;
-			color: #EF041F;
-		}
-	}
-}
-
-//默认商品底部高度
-.goodsBottom {
-	height: 160rpx;
-}
-page {
-	background: #f0f0f0;
-}
-//秒杀、拼团底部高度
-.contentBottomHeight {
-	height: 110rpx;
-}
-//默认商品底部高度
-.goodsBottom {
-	height: 160rpx;
-}
-/deep/ .iconenter {
-	font-size: $font-base + 2rpx;
-	color: #888;
-}
-/deep/ .con_image {
-	width: 130rpx;
-	height: 130rpx;
-	display: inline-block;
-	padding: 15rpx;
-	image {
-		width: 100%;
-		height: 100%;
-	}
-}
-/* 商品详情中限制图片大小 */
-/deep/ .rich-img {
-	width: 100% !important;
-	height: auto;
-}
-.c-list {
-	margin-top: 20rpx;
-	font-size: $font-sm + 2rpx;
-	color: $font-color-base;
-	background: #fff;
-	.c-row {
-		display: flex;
-		align-items: center;
-		padding: 20rpx 30rpx;
-		position: relative;
-	}
-	.tit {
-		width: 140rpx;
-	}
-	.con {
-		flex: 1;
-		color: $font-color-dark;
-		.selected-text {
-			margin-right: 10rpx;
-		}
-	}
-	.bz-list {
-		height: 40rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		text {
-			display: inline-block;
-			margin-right: 30rpx;
-		}
-	}
-	.con-list {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		color: $font-color-dark;
-		line-height: 40rpx;
-	}
-	.red {
-		color: $uni-color-primary;
-	}
-}
-
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 标题 -->
+		<product-content :goodsObjact="goodsObjact"></product-content>
+		<view class="c-list">
+			<view class="c-row b-b" @click="toggleSpec">
+				<text class="tit">购买数量</text>
+				<view class="con">
+					<text class="selected-text">{{ goodsNumber }}</text>
+				</view>
+				<text class="iconfont iconenter"></text>
+			</view>
+			<view class="c-row b-b">
+				<text>每购买一个送{{goodsObjact.give_integral}}响亮积分</text>
+			</view>
+		</view>
+		<!-- 拼货时间及优惠 -->
+		<!-- <discounts @clickCoupon="Getcoupon" :Info="goodsObjact.store_info" :showCoupon="true"></discounts> -->
+		<!-- 猜你喜欢 -->
+		<!-- <guess-like @Addcar='Addcar' @clickNavTo='navToDetailPage' :goodList = 'good_list||[]'></guess-like> -->
+		<!-- 评价 -->
+		<estimate @navTo="navTo('/pages/product/reply?id=' + goodsid)" v-if="reply" :reply="reply" :list="list">
+		</estimate>
+		<!-- 规格信息 -->
+		<fresh-detail :goodsObjact="goodsObjact"></fresh-detail>
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<product-bottom @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid" @specOPne="specOPne"></product-bottom>
+		<!-- 规格-模态层弹窗 -->
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer attr-content" @click.stop="stopPrevent">
+				<view class="a-t">
+					<image :src="actionImage"></image>
+					<view class="right">
+						<view class="good-name clamp">{{ goodsObjact.store_name }}</view>
+						<text class="price">¥{{ actionPrice }}</text>
+						<!-- <text class="stock">库存:{{ goodsObjact.stock }}件</text> -->
+						<!-- <view class="selected" v-if="goodsType == 0">
+							已选:
+							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
+						</view> -->
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>{{ item.attr_name }}</text>
+					<view class="item-list">
+						<text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
+							:class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<view class="flex">
+					<view>购买数量</view>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
+							@eventChange="numberChange"></uni-number-box>
+					</view>
+				</view>
+				<button class="btn" @click.stop="buy">确定</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniNumberBox from '@/components/uni-number-box.vue';
+	import {
+		goodsDetail,
+		cartAdd
+	} from '@/api/product.js';
+	import {
+		mapState
+	} from 'vuex';
+	import store from '@/store/index.js';
+	import {
+		orderData,
+		userinfo
+	} from '@/api/user.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		weixindata,
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// 头部轮播图
+	import topSwiper from './common/topSwiper.vue';
+	// 标题
+	import productContent from './common/productContent.vue';
+	// 到货时间及优惠
+	import discounts from './common/discounts.vue';
+	// 规格信息
+	import freshDetail from './common/freshDetail.vue';
+	// 图文详情
+	import contentText from './common/contentText.vue';
+	// 底部按钮
+	import productBottom from './common/productBottom.vue';
+	// 猜你喜欢
+	import guessLike from './common/guessLike.vue';
+	// 评价
+	import estimate from './common/estimate.vue';
+	export default {
+		components: {
+			uniNumberBox,
+			guessLike,
+			topSwiper,
+			productContent,
+			discounts,
+			freshDetail,
+			contentText,
+			productBottom,
+			estimate
+		},
+		data() {
+			return {
+				goodsStore: 0, //选中库存
+				specList: [],
+				buys_show: true,
+				buys_shows: false,
+				specSelected: [], //选中的分类
+				specClass: 'none', //显示隐藏弹窗
+				many: 1, //1是单规格  2是多规格
+				reply: '', //评论
+				list: '', //商品详情的数据
+				type: 1, //默认支付方式add为
+				goodsType: 0,
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				description: '', //商品描述
+				goodsObjact: {
+					percent: 1
+				}, //保存商品数据
+				//图片循环
+				imgList: [],
+				// 对比对象
+				actionPrice: 0, //默认选中商品价格
+				actionImage: '', //默认选中图片
+				good_list: '', //猜你喜欢列表
+				goodsNumberMax: 0, //最大可购买数量
+				// 倒计时数据保存
+				seckillObj: {
+					stopTime: 0, //结束时间
+					stop: false, //是否结束
+					stopTimeH: 0, //小时
+					stopTimeM: 0, //分钟
+					stopTimeS: 0, //秒钟
+					stopTimeD: 0, //天
+					upTime: 0 //更新组件内部组件用
+				},
+				// 拼团数据保存
+				pink: {
+					id: '', //拼团编号
+					uid: '', //用户编号
+					people: '', //拼团人数
+					price: '', //拼团价格
+					stop_time: '', //拼团结束时间
+					nickname: '', //团长昵称
+					avatar: '', //团长头像
+					count: '', //拼团剩余人数
+					h: '', //时
+					i: '', //分
+					s: '' //秒
+				},
+				userInfo: '',
+				isVip: '0'
+			};
+		},
+		filters: {
+			parseIntTo(percent) {
+				percent = +percent * 100;
+				if (percent % 1 === 0) {
+					return percent;
+				} else {
+					percent = percent.toFixed(1);
+					return percent;
+				}
+			}
+		},
+		async onLoad(options) {
+			let obj = this;
+			userinfo({})
+				.then(({
+					data
+				}) => {
+					obj.userInfo = data;
+					console.log(data, "123456")
+				})
+			//保存商品id
+			this.goodsid = options.id;
+			this.goodsType = options.type;
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			if (options.isVip) {
+				obj.isVip = options.isVip;
+			}
+			console.log(obj.isVip, 'vip');
+			saveUrl();
+			this.goodsDetail();
+			// 注册邀请信息
+			// #ifdef H5
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				weixindata();
+			}
+			// #endif
+		},
+		computed: {
+			...mapState(['weichatObj', 'baseURL', 'urlFile'])
+		},
+		// 分享
+		// onShareAppMessage(options) {
+		// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
+		// 	let pages = getCurrentPages(); //获取加载的页面
+		// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+		// 	let url = currentPage.route; //当前页面url
+		// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+		// 	let shareObj = {
+		// 		title: this.goodsObjact.store_name,
+		// 		desc: obj.goodsObjact.store_info,
+		// 		path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+		// 		imageUrl: this.goodsObjact.image,
+		// 		success: function(res) {
+		// 			// 转发成功之后的回调
+		// 			if (res.errMsg == 'shareAppMessage:ok') {
+		// 			}
+		// 		},
+		// 		fail: function() {
+		// 			// 转发失败之后的回调
+		// 			if (res.errMsg == 'shareAppMessage:fail cancel') {
+		// 				// 用户取消转发
+		// 			} else if (res.errMsg == 'shareAppMessage:fail') {
+		// 				// 转发失败,其中 detail message 为详细失败信息
+		// 			}
+		// 		}
+		// 	};
+
+		// 	return shareObj;
+		// },
+		methods: {
+			//选择规格
+			selectSpec(item, arr, ind) {
+				arr.attr_value.forEach(function(e) {
+					e.check = false;
+				});
+				item.check = true;
+				let obj = this;
+				obj.specSelected[ind] = item.attr;
+				let str = obj.specSelected.join(',');
+				// 获取当前选中的对象
+				if (obj.productValue[str]) {
+					obj.buys_show = true;
+					obj.buys_shows = false;
+					obj.actionPrice = obj.productValue[str].price;
+					obj.goodsNumberMax = obj.productValue[str].stock;
+					obj.actionImage = obj.productValue[str].image;
+					obj.uniqueId = obj.productValue[str].unique;
+					obj.goodsStore = obj.productValue[str].stock;
+				} else {
+					(obj.buys_show = false), (obj.buys_shows = true);
+				}
+				if (obj.goodsStore == 0) {
+					obj.buys_show = false;
+					obj.buys_shows = true;
+				}
+				obj.specSelected[ind] = item.attr;
+			},
+			// 打開彈窗
+			specOPne(type = 1) {
+				let obj = this;
+				obj.specClass = 'show';
+				obj.type = type;
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 保存当前购买类型
+				this.type = str;
+			},
+			//领取优惠券
+			Getcoupon() {
+				uni.navigateTo({
+					url: '/pages/coupon/getcoupon'
+				});
+			},
+			// 购买数量变化
+			numberChange(e) {
+				this.goodsNumber = e.number;
+			},
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.goodsObjact.image, // 分享图标
+						desc: obj.goodsObjact.store_info,
+						title: obj.goodsObjact.store_name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					console.log(data, '分享');
+					shareLoad(data);
+				}
+			},
+			// #endif
+			//详情页
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id
+				});
+			},
+			// 跳转页面
+			navTo(url) {
+				uni.navigateTo({
+					url: '/pages/product/reply?id=' + this.goodsid
+				});
+			},
+			//加入购物车
+			Addcar(item) {
+				let obj = this;
+				cartAdd({
+						cartNum: '1', //商品数量
+						uniqueId: '', //商品标签
+						new: 0, //商品是否新增加到购物车1为不加入0为加入
+						mer_id: '',
+						productId: item.id //商品编号
+					})
+					.then(function(e) {
+						uni.showToast({
+							title: '成功加入购物车',
+							type: 'top',
+							duration: 500,
+							icon: 'none'
+						});
+
+						obj.goodsDetail();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			goodsDetail() {
+				let obj = this;
+				// 获取普通商品信息
+				goodsDetail({}, this.goodsid).then(function({
+					data
+				}) {
+					obj.list = data;
+					obj.good_list = data.good_list; //保存猜你喜欢列表
+					obj.reply = data.reply; //保存评论列表
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.slider_image; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					if (Array.isArray(data.productValue) != true) {
+						obj.many = 2;
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str');
+						// 设置默认值
+						obj.actionPrice = obj.productValue[str].price;
+						obj.goodsNumberMax = obj.productValue[str].stock;
+						obj.actionImage = obj.productValue[str].image;
+						obj.uniqueId = obj.productValue[str].unique;
+						obj.goodsStore = obj.productValue[str].quota;
+					} else {
+						obj.many = 1;
+						obj.productValue = data.productValue; //保存分类查询数据
+						obj.actionPrice = goods.price; //保存默认选中商品价格
+						obj.actionImage = goods.image_base; //保存默认选中商品图片
+						obj.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+					}
+					obj.shopId = data.mer_id; //保存商店id
+					// #ifdef H5
+					obj.shareDate();
+					// #endif
+				});
+			},
+			// #ifdef H5
+			// 加载微信html5页面分享方法
+			shareDate() {
+				let obj = this;
+				// 保存分享人id链接
+				let url = window.location.href + '&spread=' + this.userInfo.uid;
+				// 判断是否微信浏览器
+				let bool = uni.getStorageSync('weichatBrowser') || '';
+				if (bool) {
+					// 过滤微信强制添加的链接地址
+					url = url.replace(/[\?,&]from=singlemessage/g, '');
+					let data = {
+						link: url, // 分享链接
+						imgUrl: obj.goodsObjact.image, // 分享图标
+						desc: obj.goodsObjact.store_info,
+						title: obj.goodsObjact.store_name,
+						success: function(e) {
+							console.log(e);
+						}
+					};
+					shareLoad(data);
+				}
+			},
+			// #endif
+			// 立即购买
+			buy() {
+				let obj = this;
+				// 创建传值对象
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					new: 1,
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.uniqueId
+				};
+
+				if (obj.type == 2) {
+					data.new = 0;
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							obj.goodsDetail();
+						}
+						obj.toggleSpec();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			buy1() {
+				let obj = this;
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					new: 1,
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.uniqueId
+				};
+
+				if (obj.type == 2) {
+					data.new = 0;
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						if (obj.type == 1) {
+							// 跳转到支付页
+							uni.navigateTo({
+								url: '/pages/order/createOrder?id=' + da.cartId
+							});
+						}
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							obj.goodsDetail();
+						}
+						obj.toggleSpec();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 阻止触发上级事件
+			stopPrevent() {}
+		}
+	};
+</script>
+
+<style lang="scss">
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
+		}
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
+		}
+
+		&.none {
+			display: none;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
+		}
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 30vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				height: 66rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				// background: $uni-color-primary;
+				background: #FF4C4C;
+				font-size: $font-base + 2rpx;
+				color: #fff;
+				margin: 30rpx auto 20rpx;
+			}
+		}
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
+		}
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
+		}
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
+		}
+	}
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 10rpx 30rpx;
+
+		.a-t {
+			display: flex;
+
+			image {
+				width: 170rpx;
+				height: 170rpx;
+				flex-shrink: 0;
+				border-radius: 8rpx;
+			}
+
+			.right {
+				display: flex;
+				flex-direction: column;
+				padding-left: 24rpx;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-base;
+				line-height: 42rpx;
+
+				.good-name {
+					padding-top: 20rpx;
+					max-width: 320rpx;
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #1d2023;
+					line-height: 42rpx;
+					margin-bottom: 15rpx;
+				}
+
+				.price {
+					font-size: 60rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff6f0f;
+					// font-size: $font-lg;
+					// color: $uni-color-primary;
+					// margin-bottom: 10rpx;
+				}
+
+				.selected-text {
+					margin-right: 10rpx;
+				}
+			}
+		}
+
+		.attr-list {
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base + 2rpx;
+			color: $font-color-base;
+			padding-top: 30rpx;
+			padding-left: 10rpx;
+		}
+
+		.item-list {
+			padding: 20rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+
+			.tit {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				// margin-left: 10rpx;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+				border-radius: 100rpx;
+				min-width: 60rpx;
+				height: 60rpx;
+				padding: 0 20rpx;
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.selected {
+				background: #FCEFF1;
+				border: 1px solid #EF041F;
+				color: #EF041F;
+			}
+		}
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	page {
+		background: #f0f0f0;
+	}
+
+	//秒杀、拼团底部高度
+	.contentBottomHeight {
+		height: 110rpx;
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	/deep/ .iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
+	}
+
+	/deep/ .con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+
+	.c-list {
+		margin-top: 20rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-base;
+		background: #fff;
+
+		.c-row {
+			display: flex;
+			align-items: center;
+			padding: 20rpx 30rpx;
+			position: relative;
+		}
+
+		.tit {
+			width: 140rpx;
+		}
+
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+
+		.bz-list {
+			height: 40rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+
+			text {
+				display: inline-block;
+				margin-right: 30rpx;
+			}
+		}
+
+		.con-list {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			color: $font-color-dark;
+			line-height: 40rpx;
+		}
+
+		.red {
+			color: $uni-color-primary;
+		}
+	}
 </style>

+ 221 - 207
pages/public/register.vue

@@ -1,208 +1,222 @@
-<template>
-	<view class="container">
-		<view class="status_bar"><!-- 这里是状态栏 --></view>
-		<view class="loginTitle">欢迎注册响亮商城</view>
-		<view class="loginText">请认真填写个人信息</view>
-		<view class="login-box">
-			<view class="username">账号</view>
-			<input class="input-box" type="text" v-model="phone" placeholder="请输入邮箱/电话" />
-		</view>
-		<view class="login-box">
-			<view class="username">验证码</view>
-			<view class="flex">
-				<input class="input-box" type="number" v-model="code" placeholder="请输入验证码" />
-				<view class="code" @click="verification">{{ countDown == 0 ? '获取验证码' : countDown }}</view>
-			</view>
-		</view>
-		<view class="login-box">
-			<view class="username">登录密码</view>
-			<input class="input-box" type="password" v-model="loginPass" placeholder="请输入登录密码" />
-		</view>
-		<!-- <view class="login-box">
-			<view class="username">交易密码</view>
-			<input class="input-box" type="password" v-model="payPass" placeholder="请输入6位数的交易密码" />
-		</view> -->
-		<view class="login-box">
-			<view class="username">邀请码</view>
-			<input class="input-box" type="text" v-model="invitation" placeholder="请输入邀请码" />
-		</view>
-		<view class="login" @click="register">注册</view>
-	</view>
-</template>
-
-<script>
-import { register, verify } from '@/api/login.js';
-export default {
-	data() {
-		return {
-			phone: '', //用户
-			loginPass: '', //密码
-			payPass: '',
-			invitation: '', //邀请码
-			code: '', //验证码
-			time: '', //保存倒计时对象
-			countDown: 0 //倒计时
-		};
-	},
-	onLoad() {
-		// 获取扫码邀请人id
-		this.invitation = uni.getStorageSync('spread') || '';
-	},
-	watch: {
-		// 监听倒计时
-		countDown(i) {
-			if (i == 0) {
-				clearInterval(this.time);
-			}
-		}
-	},
-	methods: {
-		// 注册
-		register() {
-			let obj = this;
-			if (obj.phone == '') {
-				obj.$api.msg('请输入账号');
-				return;
-			}
-			if (!/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(obj.phone) && (!/(^1[3|4|5|6|7|8|9][0-9]{9}$)/.test(this.phone))) {
-				obj.$api.msg('请输入正确的邮箱或手机');
-				return;
-			}
-			if (obj.loginPass == '') {
-				obj.$api.msg('请输入登录密码');
-				return;
-			}
-			if (obj.code == '') {
-				obj.$api.msg('请输入验证码');
-				return;
-			}
-			// if (obj.invitation == '') {
-			// 	obj.$api.msg('请输入邀请码');
-			// 	return;
-			// }
-			register({
-				account: obj.phone, //账号
-				captcha: obj.code, //验证码
-				password: obj.loginPass,
-				trade_password: obj.payPass,
-				spread: obj.invitation
-			}).then(function(e) {
-				uni.showToast({
-					title: '注册成功',
-					duration: 2000,
-					position: 'top',
-					icon: 'none'
-				});
-				setTimeout(function() {
-					uni.navigateTo({
-						url: '/pages/public/login'
-					});
-				}, 1000);
-			});
-			//调用注册接口,成功跳转登录页
-		},
-		//发送验证码
-		verification() {
-			let obj = this;
-			if (this.phone == '') {
-				this.$api.msg('请输入账号');
-				return;
-			}
-			if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+(\.([a-zA-Z]{2,4}))+$/.test(obj.phone) && (!/(^1[3|4|5|6|7|8|9][0-9]{9}$)/.test(this.phone))) {
-				obj.$api.msg('请输入正确的账号');
-				return;
-			}
-			// 判断是否在倒计时
-			if (obj.countDown > 0) {
-				return false;
-			} else {
-				obj.countDown = 60;
-				obj.time = setInterval(() => {
-					obj.countDown--;
-				}, 1000);
-				//调用验证码接口
-				verify({
-					phone: obj.phone,
-					type: 'register'
-				})
-					.then(({ data }) => {
-						uni.showToast({
-							title: '验证码已发送',
-							duration: 2000,
-							position: 'top',
-							icon: 'none'
-						});
-					})
-					.catch(err => {
-						console.log(err);
-					});
-			}
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	min-height: 100%;
-	background-color: #ffffff;
-
-	.container {
-		width: 100%;
-		padding: 10% 60rpx 0rpx 60rpx;
-	}
-}
-.status_bar {
-	height: var(--status-bar-height);
-	width: 100%;
-}
-.loginTitle {
-	font-weight: bold;
-	color: #333333;
-	font-size: 58rpx;
-	padding-bottom: 25rpx;
-}
-
-.loginText {
-	font-weight: 500;
-	color: #333333;
-	font-size: 34rpx;
-}
-
-.login-box {
-	padding-top: 70rpx;
-	.username {
-		padding-bottom: 25rpx;
-		font-weight: 500;
-		color: #333333;
-		font-size: 32rpx;
-	}
-}
-
-.login {
-	background: #5dbc7c;
-	margin-top: 20rpx;
-	color: #ffffff;
-	text-align: center;
-	padding: 26rpx 0rpx;
-	border-radius: 50rpx;
-	margin-top: 60rpx;
-}
-.code {
-	background: #5dbc7c;
-	color: #ffffff;
-	border-radius: 10rpx;
-	font-weight: 500;
-	color: #ffffff;
-	font-size: 26rpx;
-	padding: 12rpx 19rpx;
-}
-// /* input 样式 */
-// .input-placeholder {
-// 	color: #ffffff;
-// }
-
-// .placeholder {
-// 	color: #ffffff;
-// }
+<template>
+	<view class="container">
+		<view class="status_bar">
+			<!-- 这里是状态栏 -->
+		</view>
+		<view class="loginTitle">欢迎注册喜嗨购商城</view>
+		<view class="loginText">请认真填写个人信息</view>
+		<view class="login-box">
+			<view class="username">账号</view>
+			<input class="input-box" type="text" v-model="phone" placeholder="请输入邮箱/电话" />
+		</view>
+		<view class="login-box">
+			<view class="username">验证码</view>
+			<view class="flex">
+				<input class="input-box" type="number" v-model="code" placeholder="请输入验证码" />
+				<view class="code" @click="verification">{{ countDown == 0 ? '获取验证码' : countDown }}</view>
+			</view>
+		</view>
+		<view class="login-box">
+			<view class="username">登录密码</view>
+			<input class="input-box" type="password" v-model="loginPass" placeholder="请输入登录密码" />
+		</view>
+		<!-- <view class="login-box">
+			<view class="username">交易密码</view>
+			<input class="input-box" type="password" v-model="payPass" placeholder="请输入6位数的交易密码" />
+		</view> -->
+		<view class="login-box">
+			<view class="username">邀请码</view>
+			<input class="input-box" type="text" v-model="invitation" placeholder="请输入邀请码" />
+		</view>
+		<view class="login" @click="register">注册</view>
+	</view>
+</template>
+
+<script>
+	import {
+		register,
+		verify
+	} from '@/api/login.js';
+	export default {
+		data() {
+			return {
+				phone: '', //用户
+				loginPass: '', //密码
+				payPass: '',
+				invitation: '', //邀请码
+				code: '', //验证码
+				time: '', //保存倒计时对象
+				countDown: 0 //倒计时
+			};
+		},
+		onLoad() {
+			// 获取扫码邀请人id
+			this.invitation = uni.getStorageSync('spread') || '';
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		methods: {
+			// 注册
+			register() {
+				let obj = this;
+				if (obj.phone == '') {
+					obj.$api.msg('请输入账号');
+					return;
+				}
+				if (!/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(obj.phone) && (!
+						/(^1[3|4|5|6|7|8|9][0-9]{9}$)/.test(this.phone))) {
+					obj.$api.msg('请输入正确的邮箱或手机');
+					return;
+				}
+				if (obj.loginPass == '') {
+					obj.$api.msg('请输入登录密码');
+					return;
+				}
+				if (obj.code == '') {
+					obj.$api.msg('请输入验证码');
+					return;
+				}
+				// if (obj.invitation == '') {
+				// 	obj.$api.msg('请输入邀请码');
+				// 	return;
+				// }
+				register({
+					account: obj.phone, //账号
+					captcha: obj.code, //验证码
+					password: obj.loginPass,
+					trade_password: obj.payPass,
+					spread: obj.invitation
+				}).then(function(e) {
+					uni.showToast({
+						title: '注册成功',
+						duration: 2000,
+						position: 'top',
+						icon: 'none'
+					});
+					setTimeout(function() {
+						uni.navigateTo({
+							url: '/pages/public/login'
+						});
+					}, 1000);
+				});
+				//调用注册接口,成功跳转登录页
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					this.$api.msg('请输入账号');
+					return;
+				}
+				if (!/^([a-zA-Z]|[0-9])(\w|\-|\.)+@[a-zA-Z0-9]+(\.([a-zA-Z]{2,4}))+$/.test(obj.phone) && (!
+						/(^1[3|4|5|6|7|8|9][0-9]{9}$)/.test(this.phone))) {
+					obj.$api.msg('请输入正确的账号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: 'register'
+						})
+						.then(({
+							data
+						}) => {
+							uni.showToast({
+								title: '验证码已发送',
+								duration: 2000,
+								position: 'top',
+								icon: 'none'
+							});
+						})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		min-height: 100%;
+		background-color: #ffffff;
+
+		.container {
+			width: 100%;
+			padding: 10% 60rpx 0rpx 60rpx;
+		}
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.loginTitle {
+		font-weight: bold;
+		color: #333333;
+		font-size: 58rpx;
+		padding-bottom: 25rpx;
+	}
+
+	.loginText {
+		font-weight: 500;
+		color: #333333;
+		font-size: 34rpx;
+	}
+
+	.login-box {
+		padding-top: 70rpx;
+
+		.username {
+			padding-bottom: 25rpx;
+			font-weight: 500;
+			color: #333333;
+			font-size: 32rpx;
+		}
+	}
+
+	.login {
+		background: #5dbc7c;
+		margin-top: 20rpx;
+		color: #ffffff;
+		text-align: center;
+		padding: 26rpx 0rpx;
+		border-radius: 50rpx;
+		margin-top: 60rpx;
+	}
+
+	.code {
+		background: #5dbc7c;
+		color: #ffffff;
+		border-radius: 10rpx;
+		font-weight: 500;
+		color: #ffffff;
+		font-size: 26rpx;
+		padding: 12rpx 19rpx;
+	}
+
+	// /* input 样式 */
+	// .input-placeholder {
+	// 	color: #ffffff;
+	// }
+
+	// .placeholder {
+	// 	color: #ffffff;
+	// }
 </style>

+ 300 - 92
pages/set/userinfo.vue

@@ -1,93 +1,301 @@
-<template>
-	<view class="content">
-		<view class="row b-b">
-			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="name" placeholder="修改昵称" placeholder-class="placeholder" />
-		</view>
-		<button class="add-btn" @click="confirm">提交</button>
-	</view>
-</template>
-
-<script>
-import { mapState } from 'vuex';
-import { userEdit } from '@/api/set.js';
-export default {
-	data() {
-		return {
-			name: ''
-		};
-	},
-
-	computed: {
-		...mapState('user', ['userInfo'])
-	},
-	onShow(option) {
-		this.name = this.userInfo.nickname + '';
-	},
-	methods: {
-		switchChange(e) {
-			this.addressData.default = e.value;
-		},
-		confirm() {
-			userEdit({ nickname: this.name, avatar: this.userInfo.avatar })
-				.then(e => {
-					this.$api.msg('修改成功');
-					setTimeout(()=> {
-						uni.switchTab({
-							url:'/pages/user/user'
-						});
-					}, 1000);
-					console.log(e);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-	padding-top: 16upx;
-}
-
-.row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
-
-	.tit {
-		flex-shrink: 0;
-		width: 120upx;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
-	.input {
-		flex: 1;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
-	}
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690upx;
-	height: 80upx;
-	margin: 60upx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
+<template>
+	<!-- 	<view class="container">
+		<uni-list>
+		    <uni-list-item title="个人资料" @click="navTo('/pages/set/userinfo')" ></uni-list-item>
+			<uni-list-item title="修改密码" @click="navTo('/pages/set/password')" ></uni-list-item>
+		    <uni-list-item title="实名认证" @click="navTo('/pages/set/phone')" ></uni-list-item>
+		    <uni-list-item title="收货地址" @click="navTo('/pages/set/address')" ></uni-list-item>
+		</uni-list>
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="消息推送" :switch-checked='true' :show-switch="true" :show-arrow="false" switch-color='#5dbc7c'  @switchChange='switchChange'> 
+			</uni-list-item>
+		</uni-list>
+		
+		<uni-list class="margin-t-20">
+		    <uni-list-item title="清除缓存" ></uni-list-item>
+		    <uni-list-item title="检查更新" >
+				<template slot="right">
+					当前版本 1.0.3
+				</template>
+			</uni-list-item>
+		</uni-list>
+		<view class="list-cell log-out-btn" @click="toLogout">
+			<text class="cell-tit">退出登录</text>
+		</view>
+	</view> -->
+	<view class="container">
+		<view class="row b-b flex jg">
+			<text class="tit">头像</text>
+			<image :src="userInfo.avatar" @click="imgsub"></image>
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">昵称</text>
+			<input class="input" v-model="userInfo.nickname" type="text" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">邀请码</text>
+			<input class="input" v-model="userInfo.uid" type="text" disabled="true" placeholder-class="placeholder"
+				style="color: #999;" />
+		</view>
+		<!-- v-if="agents!=''" -->
+		<!-- <view class="row b-b flex" v-if="!Array.isArray(userInfo.agent)">
+		<text class="tit">代理区域</text>
+		<view class="agents" style="color: #999;text-align: right;">
+			<view class="agent" v-for="(item,index) in userInfo.agent" :key="index">
+			{{item}}	
+			</view>
+		</view>
+	</view> -->
+		<view class="row b-b flex" v-if="userInfo.account || userInfo.phone">
+			<text class="tit">用户账号</text>
+			<input class="input" v-model="userInfo.account || userInfo.phone" type="number" disabled="true"
+				placeholder-class="placeholder" />
+		</view>
+		<view class="submit-box flex">
+			<view class="submit" @click="edit">确认修改</view>
+			<view class="submit dl" @click="toLogout">退出登录</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	// import uniList from "@/components/uni-list/uni-list.vue"
+	// import uniListItem from "@/components/uni-list-item/uni-list-item.vue"
+	// import { logout } from '@/api/set.js';
+	// import {  
+	//     mapMutations  
+	// } from 'vuex';
+	// export default {
+	// 	components: {
+	// 		uniList,uniListItem
+	// 	},
+	// 	data() {
+	// 		return {
+
+	// 		};
+	// 	},
+	// 	methods:{
+	// 		...mapMutations('user',['logout']),
+	// 		navTo(url){
+	// 			uni.navigateTo({
+	// 				url:url
+	// 			})
+	// 		},
+	// 		//退出登录
+	// 		toLogout(){
+	// 			let obj = this;
+	// 			uni.showModal({
+	// 			    content: '确定要退出登录么',
+	// 			    success: (e)=>{
+	// 			    	if(e.confirm){
+	// 						logout({}).then((e) => {
+	// 							uni.navigateBack();
+	// 						}).catch((e) => {
+	// 							console.log(e);
+	// 						})
+	// 			    		obj.logout();
+	// 			    	}
+	// 			    }
+	// 			});
+	// 		},
+	// 		//switch切换触发方法
+	// 		switchChange(e){
+	// 			console.log(e);
+	// 			let statusTip = e.value ? '打开': '关闭';
+	// 			this.$api.msg(`${statusTip}消息推送`);
+	// 		},
+
+	// 	}
+	// }
+	import uniList from '@/components/uni-list/uni-list.vue';
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		logout
+	} from '@/api/set.js';
+
+	import {
+		edit
+	} from '@/api/user.js';
+	import {
+		upload
+	} from '@/api/order.js'
+	export default {
+		components: {
+			uniList,
+			uniListItem
+		},
+		data() {
+			return {
+				userInfo: {},
+				pics: [],
+			};
+		},
+		onLoad() {
+			this.userInfo = uni.getStorageSync('userInfo') || '';
+			console.log(this.userInfo)
+		},
+		methods: {
+			...mapMutations('user', ['logout']),
+			//退出登录
+			toLogout() {
+				let obj = this;
+				uni.showModal({
+					content: '确定要退出登录么',
+					success: e => {
+						if (e.confirm) {
+							logout({}).then(e => {
+									obj.logout();
+									uni.switchTab({
+										url: '/pages/index/index'
+									})
+								})
+								.catch(e => {
+									console.log(e);
+								});
+						}
+					}
+				});
+			},
+			imgsub() {
+				let obj = this
+				console.log('上传头像')
+				// this.$util.uploadImageOne('upload/image', function(res) {
+				// 	console.log('------',res);
+				// 	this.pics.push(res.data.pathreplace(/http:\/\/mer.crmeb.net/,'https://hy.liuniu946.com'));
+				// 	// obj.userInfo.avatar = res.data.path.replace(/http:\/\/mer.crmeb.net/,'http://zccy.frp.liuniu946.com')
+				// 	obj.$set(this, 'pics', this.pics);
+				// 	obj.$set(this, 'extract_pic', this.pics[0])
+				// });
+				// uploads({
+				// 	filename: ''
+				// }).then(data => {
+				// 	console.log("data",data);
+				// 	this.userInfo.avatar = data[0].url;
+				// })
+				upload({
+					filename: ''
+				}).then(res => {
+					console.log(res[0].url)
+					obj.userInfo.avatar = res[0].url
+					// console.log(obj.userInfo.avatar)
+				});
+
+			},
+			edit() {
+				const that = this;
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				})
+				edit({
+					avatar: this.userInfo.avatar,
+					nickname: this.userInfo.nickname
+				}).then(e => {
+					uni.hideLoading()
+					that.$api.msg('修改成功');
+					setTimeout(() => {
+						uni.switchTab({
+							url: '/pages/user/user'
+						});
+					}, 1000);
+				}).catch(e => {
+					console.log(e);
+					that.$api.msg('修改失败');
+				})
+			}
+		}
+	};
+</script>
+
+<style lang='scss'>
+	/* page{
+		background: $page-color-base;
+	}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	} */
+	page {
+		background-color: #f3f3f3;
+		min-height: 100%;
+
+		.container {
+			height: 100%;
+
+		}
+	}
+
+	.row {
+		background-color: #fff;
+		padding: 42rpx 25rpx;
+		font-size: 30rpx;
+		color: #333333;
+
+		image {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+		}
+
+		.input {
+			text-align: right;
+			color: #333333;
+		}
+	}
+
+	.submit-box {
+		display: flex;
+		flex-direction: column;
+		padding-top: 157rpx;
+
+		.submit {
+			margin: 40rpx auto;
+			width: 560rpx;
+			background-color: #ff4c4b;
+			color: #FFFFFF;
+			text-align: center;
+			padding: 26rpx 0rpx;
+			border-radius: 50rpx;
+		}
+
+		.dl {
+			background-color: #FFFFFF;
+			color: #ff4c4b;
+		}
+	}
+
+	.jg {
+		margin-bottom: 20rpx;
+	}
 </style>

+ 173 - 0
pages/user/greenChange.vue

@@ -0,0 +1,173 @@
+<template>
+	<view class="content">
+		<view class="tab flex">
+			<view class="tab-name">
+				可用于兑换的绿积分:
+			</view>
+			<view class="tab-val">
+				{{userInfo.green_integral || '0'}}
+			</view>
+		</view>
+		<view class="tab flex">
+			<view class="tab-name">
+				兑换比例:
+			</view>
+			<view class="tab-val">
+				{{bl}}:1
+			</view>
+		</view>
+		<view class="tab flex">
+			<view class="tab-name">
+				可兑换绿卡数量:
+			</view>
+			<view class="tab-val">
+				{{could}}
+			</view>
+		</view>
+		<view class="tab flex">
+			<view class="tab-name">
+				申请兑换绿卡数量:
+			</view>
+			<input type="number" class="tab-val" placeholder="请输入兑换绿卡数量" placeholder-style="font-size:28rpx;"
+				v-model="changeNum">
+			<!-- <view class="tab-val">
+				{{sqss}}
+			</view> -->
+		</view>
+		<view class="sub" :class="{'loading': load}" @click="exchangeGreen">
+			立即兑换
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getGreenBl,
+		getUserInfo,
+		exchangeGreen
+	} from '@/api/user.js'
+	export default {
+		data() {
+			return {
+				bl: 0,
+				load: true,
+				changeNum: '',
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+
+			this.getGreenBl()
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		computed: {
+			...mapState('user', ['userInfo']),
+			could() {
+				if (this.userInfo.green_integral == 0) {
+					return 0
+				} else {
+					return Math.floor(this.userInfo.green_integral / this.bl)
+				}
+			},
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo']),
+			getGreenBl() {
+				getGreenBl().then(res => {
+					console.log(res)
+					this.bl = res.data.bl
+					this.getUserInfo()
+				})
+			},
+			getUserInfo() {
+				let obj = this
+				getUserInfo().then(res => {
+					obj.setUserInfo(res.data)
+					obj.load = false
+				})
+			},
+			exchangeGreen() {
+				let obj = this
+				if (obj.load) {
+					return
+				}
+				if (obj.changeNum == '') {
+					return obj.$api.msg('请输入兑换绿卡数量')
+				}
+				if (obj.userInfo.green_integral == 0) {
+					return obj.$api.msg('您的绿积分不足')
+				}
+				if (obj.changeNum * 1 > obj.could) {
+					return obj.$api.msg('您的绿积分不足')
+				}
+				obj.load = true
+				exchangeGreen({
+					num: obj.changeNum
+				}).then(({
+					data
+				}) => {
+					console.log(data)
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+					obj.getGreenBl()
+					// obj.load = false
+				}).catch(err => {
+					obj.load = false
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.tab {
+		font-size: 32rpx;
+		font-weight: 500;
+		color: #333333;
+		line-height: 110rpx;
+		border-bottom: 1px solid #eee;
+		width: 710rpx;
+		margin: auto;
+
+		.tab-name {
+			flex-shrink: 0;
+		}
+
+		.tab-val {
+			flex-grow: 1;
+			text-align: right;
+			font-size: 48rpx;
+			font-weight: bold;
+		}
+	}
+
+	.sub {
+		width: 670rpx;
+		line-height: 88rpx;
+		background: #FF4C4C;
+		border-radius: 10rpx;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+		text-align: center;
+		margin: 60rpx auto 0;
+	}
+
+	.loading {
+		background: #999;
+	}
+</style>

+ 465 - 0
pages/user/greenJf.vue

@@ -0,0 +1,465 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">绿积分</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.green_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<view class="moneybtn-box">
+				<view class="money-btn">
+
+				</view>
+				<view class="money-btn" @click="navto('/pages/user/greenChange')">
+					兑换绿卡 >
+				</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{recharge || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getGreenJf,
+		getUserInfo
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getGreenJf({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 233 - 0
pages/user/joinShop.vue

@@ -0,0 +1,233 @@
+<template>
+	<view class="content">
+		<view class="jg"></view>
+		<view class="tab">
+			<view class="tab-item flex">
+				<view class="item-name">店铺名称</view>
+				<input type="text" placeholder="请输入店铺名称" class="item-val" v-model="merchant_name">
+			</view>
+			<view class="tab-item flex">
+				<view class="item-name">联系人:</view>
+				<input type="text" placeholder="请输入联系人" class="item-val" v-model="link_user">
+			</view>
+			<view class="tab-item flex">
+				<view class="item-name">联系手机:</view>
+				<input type="text" placeholder="请输入联系手机" class="item-val" v-model="link_tel">
+			</view>
+			<view class="tab-item flex">
+				<view class="item-name">省市区:</view>
+				<pickerAddress class="item-val" :class="{'nosz': addressDetail == ''}" @change="onCityClick">
+					{{addressDetail||'请选择地址'}}
+				</pickerAddress>
+			</view>
+			<view class="tab-item flex">
+				<view class="item-name">详细地址:</view>
+				<input type="text" placeholder="请输入详细地址" class="item-val" v-model="address">
+			</view>
+			<view class="up-img flex" style="justify-content: flex-start;">
+				<view class="item-name">商户证书:</view>
+				<image :src="charter" mode="" @click="imgsub" v-if="charter"></image>
+				<image src="../../static/img/add.png" mode="" @click="imgsub" v-else></image>
+			</view>
+		</view>
+		<view class="sub" @click="sub" :class="{'hui': load}">
+			申请入驻
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		upload
+	} from '@/api/order.js'
+	import {
+		ssrz
+	} from '@/api/user.js'
+	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+	export default {
+		components: {
+			pickerAddress,
+		},
+		data() {
+			return {
+				ssq: [],
+				addressDetail: '',
+				address: '',
+				merchant_name: '',
+				link_user: '',
+				link_tel: '',
+				charter: '',
+				load: false
+			}
+		},
+		methods: {
+			imgsub() {
+				let obj = this
+				console.log('上传头像')
+				upload({
+					filename: ''
+				}).then(res => {
+					console.log(res[0].url)
+					obj.charter = res[0].url
+				});
+
+			},
+			bindIndustryChange(e) {
+				this.industry = this.industryList[e.detail.value]
+			},
+			//职称选择
+			handleTap2(name) {
+				this.$refs[name].show()
+			},
+			//职称选择
+			handleChange2(item) {},
+			//职称选择
+			handleConfirm2(item) {
+				let obj = this;
+				obj.doctor_level = item.item.name;
+				obj.level_id = item.item.id;
+				console.log(obj.doctor_level, obj.level_id)
+			},
+			// 选中城市切换
+			// 选中城市切换
+			onCityClick({
+				data
+			}) {
+				console.log(data)
+				this.ssq = data
+				this.addressDetail = data.join(' ');
+			},
+			// 发布
+			sub() {
+				let obj = this
+				if (obj.load) {
+					return
+				}
+				if (obj.merchant_name == '') {
+					return obj.$api.msg('请输入店铺名称')
+				}
+				if (obj.link_user == '') {
+					return obj.$api.msg('请输入联系人')
+				}
+				if (obj.link_tel == '') {
+					return obj.$api.msg('请输入联系电话')
+				}
+				if (obj.addressDetail == '') {
+					return obj.$api.msg('请选择省市区')
+				}
+				if (obj.address == '') {
+					return obj.$api.msg('请输入详细地址')
+				}
+				if (obj.charter == '') {
+					return obj.$api.msg('请上传商户证书')
+				}
+				obj.load = true
+				ssrz({
+					address: obj.address,
+					merchant_name: obj.merchant_name,
+					link_user: obj.link_user,
+					link_tel: obj.link_tel,
+					charter: obj.charter,
+					province: obj.ssq[0],
+					city: obj.ssq[1],
+					district: obj.ssq[2]
+				}).then(res => {
+					obj.load = false
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+				}).catch(err => {
+					obj.load = false
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.place {
+		color: #999;
+	}
+
+	.jg {
+		height: 20rpx;
+	}
+
+	.tab {
+		width: 690rpx;
+		margin: auto;
+		border-radius: 10px;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+
+		.tab-item {
+			padding: 0 20rpx;
+			font-size: 30rpx;
+			align-items: flex-start;
+			line-height: 100rpx;
+			border-bottom: 1px #F0F0F0 solid;
+
+			image {
+				height: 160rpx;
+				width: 160rpx;
+			}
+
+			&:last-of-type {
+				border-bottom: none;
+			}
+
+			.item-name {
+				flex-shrink: 0;
+				width: 220rpx;
+				color: #333333;
+			}
+
+			.item-val {
+				display: inline-block;
+				flex-grow: 1;
+				text-align: left;
+				line-height: 100rpx;
+				height: 100rpx;
+			}
+
+			.nosz {
+				color: #999;
+			}
+		}
+	}
+
+	.sub {
+		text-align: center;
+		width: 560rpx;
+		line-height: 80rpx;
+		background: #fc4141;
+		border-radius: 40rpx;
+		color: #fff;
+		font-size: 30rpx;
+		font-weight: 500;
+		margin: 80rpx auto 0;
+	}
+
+	.up-img {
+		justify-content: flex-start;
+		align-items: flex-start;
+		padding: 28rpx 20rpx;
+		font-size: 30rpx;
+
+		.item-name {
+			flex-shrink: 0;
+			width: 220rpx;
+			color: #333333;
+		}
+
+		image {
+			width: 160rpx;
+			height: 160rpx;
+		}
+	}
+
+	.hui {
+		background-color: #999;
+	}
+</style>

+ 475 - 0
pages/user/mallJf.vue

@@ -0,0 +1,475 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">商城积分</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<!-- <view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=yue')">
+					易货券转账
+				</view>
+				<view class="money-btn" @click="navto('/pages/money/recharge')">
+					易货券充值
+				</view>
+			</view> -->
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{sr || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{zc || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		GetIntegral,
+		getUserInfo
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				zc: 0,
+				sr: 0,
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				GetIntegral({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+						this.zc = data.zc
+						this.sr = data.sr
+						navItem.orderList = navItem.orderList.concat(data.list)
+						navItem.page++
+						if (navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						} else {
+							navItem.loadingType = 'noMore'
+						}
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 238 - 0
pages/user/myGreenCard.vue

@@ -0,0 +1,238 @@
+<template>
+	<view class="content">
+		<view class="" style="height: 20rpx;"></view>
+		<empty v-if="list.length === 0 && loaded"></empty>
+		<view class="green-card-wrap" v-for="(gitem,gindex) in list" :key="gindex">
+			<image :src="'../../static/img/green' +((gitem.id+1)%5) + '.png'" mode="" class="card-bg"></image>
+			<view class="card-info flex">
+				<image :src="'../../static/img/ginfo' +((gitem.id+1)%5) + '.png'" mode="" class="info-img"></image>
+				<view class="info-detail">
+					<view class="card-name">
+						通行绿卡
+					</view>
+					<!-- 1买 2赠 -->
+					<view class="card-from">
+						来源:{{gitem.type == 1?'绿积分兑换': '赠送获得'}}
+					</view>
+					<view class="card-time">
+						获得时间:{{gitem.create_time}}
+					</view>
+				</view>
+				<view class="card-btn-wrap flex" v-if="gitem.status == 0 && gitem.type == 1">
+					<view class="card-btn" @click="openZs(gitem)">
+						转赠
+					</view>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+		<uni-popup ref="popup" type="center">
+			<view class="zs-wrap">
+				<view class="zs-tit">
+					赠送绿卡
+				</view>
+				<view class="zs-uid flex">
+					<view class="to-uid">
+						赠送对象UID:
+					</view>
+					<input type="number" v-model="toUid" placeholder="请输入赠送对象UID">
+				</view>
+				<view class="zs-btns">
+					<view class="zs-btn" @click="closeZs">
+						取消
+					</view>
+					<view class="zs-btn" style="color: #ff567f;" @click="giveGreen()">
+						赠送
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		getGreenCardList,
+		giveGreen
+	} from '@/api/user.js'
+	import empty from '@/components/empty';
+	export default {
+		components: {
+			empty
+		},
+		data() {
+			return {
+				zsItem: {},
+				toUid: '',
+				loaded: false,
+				list: [],
+				page: 1,
+				limit: 10,
+				loadingType: 'more'
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+			this.getGreenCardList()
+		},
+		onReachBottom() {
+			this.getGreenCardList()
+		},
+		onReady() {
+
+		},
+		methods: {
+			getGreenCardList() {
+				let obj = this
+				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getGreenCardList().then(res => {
+					console.log(res)
+
+					obj.list = obj.list.concat(res.data.data)
+					obj.page++
+					if (obj.limi == res.data.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+					obj.loaded = true
+				})
+			},
+			giveGreen() {
+
+				let obj = this
+				console.log(obj.zsItem)
+				if (obj.toUid == '') {
+					return obj.$api.msg('请输入赠送对象UID')
+				}
+				giveGreen({
+					id: obj.zsItem.id,
+					uid: obj.toUid
+				}).then(res => {
+					this.closeZs()
+					uni.showToast({
+						title: '赠送成功',
+						duration: 2000,
+						position: 'top'
+					});
+					let s = obj.list.indexOf(obj.zsItem);
+					obj.list.splice(s, 1);
+				})
+			},
+			closeZs() {
+				this.$refs.popup.close()
+			},
+			openZs(item) {
+				this.zsItem = item
+				this.$refs.popup.open()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.green-card-wrap {
+		width: 700rpx;
+		height: 184rpx;
+		margin: 0 auto 20rpx;
+		position: relative;
+
+		.card-bg {
+			width: 700rpx;
+			height: 184rpx;
+		}
+
+		.card-info {
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 700rpx;
+			height: 184rpx;
+			padding: 0 35rpx;
+
+			.info-img {
+				width: 112rpx;
+				height: 112rpx;
+			}
+
+			.info-detail {
+				flex-grow: 1;
+				padding-left: 30rpx;
+				color: #FFFFFF;
+				font-size: 24rpx;
+				font-weight: 500;
+
+				.card-name {
+					font-size: 36rpx;
+					font-weight: bold;
+
+				}
+
+				.card-from {}
+
+				.card-time {}
+			}
+
+			.card-btn-wrap {
+				width: 132rpx;
+				height: 100%;
+
+
+				.card-btn {
+					width: 132rpx;
+					height: 53rpx;
+					background: #FFFFFF;
+					border-radius: 27rpx;
+					font-size: 26rpx;
+					font-weight: 500;
+					text-align: center;
+					line-height: 53rpx;
+					color: #ff567f;
+				}
+			}
+		}
+	}
+
+	.zs-wrap {
+		width: 600rpx;
+		height: 300rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+		text-align: center;
+		position: relative;
+
+		.zs-tit {
+			font-size: 32rpx;
+			font-weight: bold;
+			padding: 40rpx 0 50rpx;
+		}
+
+		.zs-uid {
+			font-size: 28rpx;
+			padding: 0 40rpx;
+
+			.to-uid {
+				flex-shrink: 0;
+			}
+		}
+
+		.zs-btns {
+			width: 100%;
+			display: flex;
+			position: absolute;
+			bottom: 0;
+			height: 80rpx;
+			font-size: 32rpx;
+			line-height: 80rpx;
+
+			.zs-btn {
+				width: 50%;
+			}
+		}
+	}
+</style>

+ 475 - 0
pages/user/purpleJf.vue

@@ -0,0 +1,475 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">紫积分</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.purple_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<view class="moneybtn-box">
+				<view class="money-btn">
+					<!-- 					易货券转账 -->
+				</view>
+				<view class="money-btn" @click="navto('/pages/money/withdrawal?type=purple')">
+					紫积分提现 >
+				</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{sr || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{zc || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getPurpleJf,
+		getUserInfo
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				zc: 0,
+				sr: 0,
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getPurpleJf({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+						this.zc = data.zc
+						this.sr = data.sr
+						navItem.orderList = navItem.orderList.concat(data.list)
+						navItem.page++
+						if (navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						} else {
+							navItem.loadingType = 'noMore'
+						}
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 465 - 0
pages/user/shopJf.vue

@@ -0,0 +1,465 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">商家积分</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.green_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<view class="moneybtn-box">
+				<view class="money-btn">
+
+				</view>
+				<view class="money-btn" @click="navto('/pages/money/withdrawal?type=shop')">
+					{{userInfo.is_merchant == 1? '提现 >': ''}}
+				</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{recharge || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getShopIntegral,
+		getUserInfo
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getShopIntegral({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 857 - 823
pages/user/user.vue

@@ -1,824 +1,858 @@
-<template>
-	<view class="container">
-		<view class="vheigh"></view>
-		<view class="user-top">
-			<image src="../../static/img/user-top-bg.png" mode="" class="user-top-bg"></image>
-			<view class="user-info" @click="navTo('/pages/set/set')">
-				<image class="avtar" :src="userInfo.avatar" mode=""></image>
-				<view class="name">{{ userInfo.nickname }}</view>
-				<view class="phone">{{ userInfo.phone }}</view>
-				<view class="phone" @click.stop="navTo('/pages/index/index')" v-if="userInfo.unlock_spread_user">已到邀请人{{userInfo.unlock_spread_user.phone}}下是否购买会员礼包绑定关系</view>
-				<view class="phone" v-if="userInfo.lock_spread_user">邀请人{{userInfo.lock_spread_user.phone}}</view>
-				<view class="vip-box" v-if="userInfo.level > 0">
-					<view class="vip" >{{ userInfo.level_info.name }}</view>
-				</view>
-			</view>
-			<view class="sy-box flex">
-				<view class="sy-item" @click="navTo('/pages/money/wallet')">
-					<view class="sy-item-name">易货券</view>
-					<view class="sy-item-val">{{ userInfo.now_money  || '0.00' }}</view>
-				</view>
-				<view class="jg"></view>
-				<view class="sy-item" @click="navTo('/pages/user/scoreAccumulate')">
-					<view class="sy-item-name">响亮积分</view>
-					<view class="sy-item-val">{{ userInfo.integral || '0.00' }}</view>
-				</view>
-				<view class="jg"></view>
-				<view class="sy-item" @click="navTo('/pages/user/cash')">
-					<view class="sy-item-name">现金</view>
-					<view class="sy-item-val">{{ userInfo.cash }}</view>
-				</view>
-			</view>
-		</view>
-		<view class="item-box">
-			<view class="order-section">
-				<view class="order-item" @click="navTo('/pages/user/award')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon"><image class="icon-img" src="/static/icon/myyj.png" mode="aspectFit"></image></view>
-					<text>消费补贴券</text>
-				</view>
-				<view class="order-item" @click="navTo('')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon"><image class="icon-img" src="/static/icon/myqb.png" mode="aspectFit"></image></view>
-					<text>公益基金</text>
-				</view>
-				<view class="order-item" @click="navTo('/pages/user/mygx')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon"><image class="icon-img" src="/static/icon/mygx.png" mode="aspectFit"></image></view>
-					<text>分红积分</text>
-				</view>
-				<view class="order-item" @click="navTo('/pages/user/jiedian')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon"><image class="icon-img" src="/static/icon/myjd.png" mode="aspectFit"></image></view>
-					<text>我的节点</text>
-				</view>
-			</view>
-		</view>
-		<!-- 订单 -->
-		<view class="item-box item-box-b">
-			<view class="box-title flex ">
-				<view class="title"><text>我的订单</text></view>
-				<view class="link" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"><text class="iconfont iconenter"></text></view>
-			</view>
-			<view class="order-section">
-				<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover" :hover-stay-time="50">
-					<view class=" icon position-relative">
-						<image class="icon-img" src="/static/icon/i1.png" mode="aspectFit"></image>
-						<view class="corner" v-if="orderInfo.unpaid_count > 0">
-							<text>{{ orderInfo.unpaid_count }}</text>
-						</view>
-					</view>
-					<text>待付款</text>
-				</view>
-				<view class="order-item" @click="navTo('/pages/order/order?state=1')" hover-class="common-hover" :hover-stay-time="50">
-					<view class=" icon position-relative">
-						<image class="icon-img" src="/static/icon/i2.png" mode="aspectFit"></image>
-						<view class="corner" v-if="orderInfo.unshipped_count > 0">
-							<text>{{ orderInfo.unshipped_count }}</text>
-						</view>
-					</view>
-					<text>待发货</text>
-				</view>
-				<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon position-relative">
-						<image class="icon-img" src="/static/icon/i3.png" mode="aspectFit"></image>
-						<view class="corner" v-if="orderInfo.received_count > 0">
-							<text>{{ orderInfo.received_count }}</text>
-						</view>
-					</view>
-					<text>待收货</text>
-				</view>
-				<view class="order-item" @click="navTo('/pages/order/order?state=4')" hover-class="common-hover" :hover-stay-time="50">
-					<view class="icon position-relative">
-						<image class="icon-img" src="/static/icon/i4.png" mode="aspectFit"></image>
-						<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
-							<text>{{ orderInfo.complete_count }}</text>
-						</view> -->
-					</view>
-					<text>已完成</text>
-				</view>
-			</view>
-		</view>
-		<!--  -->
-		<view class="btm-box flex" @click="navTo('/pages/user/team')">
-			<image src="../../static/icon/mytg.png" mode="widthFix" class="left-img"></image>
-			<view class="">我的推广</view>
-			<image src="../../static/icon/goto.png" mode="widthFix" class="right-img"></image>
-		</view>
-		<view class="btm-box flex" @click="navTo('/pages/user/shareQrCode')">
-			<image src="../../static/icon/tghb.png" mode="widthFix" class="left-img"></image>
-			<view class="">推广海报</view>
-			<image src="../../static/icon/goto.png" mode="widthFix" class="right-img"></image>
-		</view>
-		<view class="btm-box flex" @click="navTo('/pages/set/address')">
-			<image src="../../static/icon/shdz.png" mode="widthFix" class="left-img"></image>
-			<view class="">收货地址</view>
-			<image src="../../static/icon/goto.png" mode="widthFix" class="right-img"></image>
-		</view>
-		<view class="btm-box flex" @click="kfOpen">
-			<image src="../../static/icon/kf.png" mode="widthFix" class="left-img"></image>
-			<view class="">客服</view>
-			<image src="../../static/icon/goto.png" mode="widthFix" class="right-img"></image>
-		</view>
-		<view class="btm-box flex" @click="navTo('/pages/set/phone')">
-			<image src="../../static/icon/bdsj.png" mode="widthFix" class="left-img"></image>
-			<view class="">绑定手机</view>
-			<image src="../../static/icon/goto.png" mode="widthFix" class="right-img"></image>
-		</view>
-		<view class="btm" style="height: 44px;"></view>
-		<!-- 客服 -->
-		<uni-popup ref="popupkf" type="center">
-			<view class="popup-box">
-				<view class="img">
-					<image src="../../static/img/img009.png" mode=""></image>
-				</view>
-				<view class="mian">
-					<view class="delivery">
-						<view class="title">已经为您定制专属客服</view>
-						<image src="../../static/img/img010.png" mode=""></image>
-					</view>
-					<view class="nocancel">客服VX:{{ text }}</view>
-					<view class="comfirm-box">
-						<view class="cancel" @click="kfClose()">取消</view>
-						<view class="comfirm" @click="comfirm(text)">复制微信</view>
-					</view>
-				</view>
-			</view>
-		</uni-popup>
-		<u-tabbar activeColor="#EE0979" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar>
-	</view>
-</template>
-<script>
-import { mapState, mapMutations } from 'vuex';
-import uniList from '@/components/uni-list/uni-list.vue';
-import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import { orderData, userinfo } from '@/api/user.js';
-import { saveUrl, interceptor } from '@/utils/loginUtils.js';
-import { tabbar } from '@/utils/tabbar.js';
-import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
-let startY = 0,
-	moveY = 0,
-	pageAtTop = true;
-export default {
-	components: {
-		uniList,
-		uniListItem
-	},
-	data() {
-		return {
-			text: '',
-			tabbar: tabbar,
-			current: 4,
-			coverTransform: 'translateY(0px)',
-			coverTransition: '0s',
-			moving: false,
-			userDowm: 0, //卡片升级专属高度
-			userMaxDowm: 0 //卡片最高高度
-		};
-	},
-	onShow() {
-		this.loadBaseData();
-		// 判断是否已经登录
-		if (this.hasLogin) {
-			this.loadBaseData();
-		}
-	},
-	onReady() {
-		// 初始化获取页面宽度
-		uni.createSelectorQuery()
-			.select('.container')
-			.fields(
-				{
-					size: true
-				},
-				data => {
-					// 计算最多下拉的高度
-					this.userDowm = Math.floor((data.width / 750) * 185);
-					// 计算最大触发修改高度事件
-					this.userMaxDowm = Math.floor((data.width / 750) * 250);
-				}
-			)
-			.exec();
-	},
-	// #ifndef MP
-	// onNavigationBarButtonTap(e) {
-	// 	const index = e.index;
-	// 	if (index === 0) {
-	// 		this.navTo('/pages/set/set');
-	// 	} else if (index === 1) {
-	// 		// #ifdef APP-PLUS
-	// 		const pages = getCurrentPages();
-	// 		const page = pages[pages.length - 1];
-	// 		const currentWebview = page.$getAppWebview();
-	// 		currentWebview.hideTitleNViewButtonRedDot({
-	// 			index
-	// 		});
-	// 		// #endif
-	// 		uni.navigateTo({
-	// 			url: '/pages/user/notice'
-	// 		});
-	// 	}
-	// },
-	// #endif
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-		// 加载初始数据
-		loadBaseData() {
-			userinfo({})
-				.then(({ data }) => {
-					this.setUserInfo(data);
-					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-					orderData({})
-						.then(({ data }) => {
-							this.setOrderInfo(data);
-						})
-						.catch(e => {
-							this.setOrderInfo({
-								complete_count: 0, //完成
-								received_count: 0, //待收货
-								unshipped_count: 0, //待发货
-								order_count: 0, //订单总数
-								unpaid_count: 0 //待付款
-							});
-						});
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		/**
-		 * 统一跳转接口,拦截未登录路由
-		 * navigator标签现在默认没有转场动画,所以用view
-		 */
-		navTo(url) {
-			if(url == ''){
-				this.$api.msg('敬请期待')
-			}
-			if (!this.hasLogin) {
-				// 保存地址
-				saveUrl();
-				// 登录拦截
-				interceptor();
-			} else {
-				uni.navigateTo({
-					url,
-					fail() {
-						uni.switchTab({
-							url
-						});
-					}
-				});
-			}
-		},
-
-		/**
-		 *  会员卡下拉和回弹
-		 *  1.关闭bounce避免ios端下拉冲突
-		 *  2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
-		 *    transition设置0.1秒延迟,让css来过渡这段空窗期
-		 *  3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
-		 */
-		coverTouchstart(e) {
-			// console.log(e);
-			if (pageAtTop === false) {
-				return;
-			}
-
-			this.coverTransition = 'transform .1s linear';
-			startY = e.touches[0].clientY;
-		},
-		coverTouchmove(e) {
-			// console.log(e);
-			moveY = e.touches[0].clientY;
-			let moveDistance = moveY - startY;
-			let maxDowm = this.userMaxDowm;
-			let Dowm = this.userDowm;
-			if (moveDistance < 0) {
-				this.moving = false;
-				return;
-			}
-			this.moving = true;
-			if (moveDistance >= Dowm && moveDistance < maxDowm) {
-				moveDistance = Dowm;
-			}
-
-			if (moveDistance > 0 && moveDistance <= Dowm) {
-				this.coverTransform = `translateY(${moveDistance}px)`;
-			}
-		},
-		coverTouchend() {
-			if (this.moving === false) {
-				return;
-			}
-			this.moving = false;
-			this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
-			this.coverTransform = 'translateY(0px)';
-		},
-		kfOpen() {
-			this.$refs.popupkf.open()
-		},
-		kfClose() {
-			this.$refs.popupkf.close()
-		},
-		comfirm(text) {
-			console.log(text);
-			const result = uniCopy(text);
-			if (result === false) {
-				uni.showToast({
-					title: '不支持'
-				});
-			} else {
-				uni.showToast({
-					title: '复制成功',
-					icon: 'none'
-				});
-			}
-			this.$refs.popup.close();
-		},
-	}
-};
-</script>
-<style lang="scss">
-page {
-	height: 100%;
-}
-
-%flex-center {
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-}
-
-%section {
-	display: flex;
-	justify-content: space-around;
-	align-content: center;
-	background: #fff;
-	border-radius: 10rpx;
-}
-
-.container {
-	height: 100%;
-	background-color: $page-color-base;
-}
-
-.content-box {
-	height: 100%;
-}
-
-.vheigh {
-	height: var(--status-bar-height);
-	background-color: $base-color;
-}
-
-.user-section {
-	height: 435rpx;
-	padding: 15rpx 30rpx 0;
-	position: relative;
-
-	.bg {
-		position: absolute;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		background-color: $base-color;
-	}
-}
-
-.user-info-box {
-	height: 180rpx;
-	color: white;
-	display: flex;
-	align-items: center;
-	justify-content: space-between;
-	position: relative;
-	z-index: 1;
-
-	.detail {
-		height: 130rpx;
-
-		.portrait-box {
-			height: 100%;
-
-			.portrait {
-				width: 130rpx;
-				height: 100%;
-				border: 5rpx solid #fff;
-				border-radius: 50%;
-			}
-		}
-
-		.info-box {
-			margin-left: 20rpx;
-			line-height: 1.5;
-
-			.username {
-				font-size: $font-lg + 6rpx;
-				height: 100%;
-			}
-		}
-	}
-
-	.config {
-		font-size: 48rpx;
-		height: 130rpx;
-
-		.setting {
-			margin-right: 51rpx;
-		}
-	}
-}
-
-.vip-card-box {
-	display: flex;
-	flex-direction: column;
-	color: #f7d680;
-	height: 240rpx;
-	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
-	border-radius: 16rpx 16rpx 0 0;
-	overflow: hidden;
-	position: relative;
-	padding: 20rpx 24rpx;
-
-	.card-bg {
-		position: absolute;
-		top: 20rpx;
-		right: 0;
-		width: 380rpx;
-		height: 260rpx;
-	}
-
-	.b-btn {
-		position: absolute;
-		right: 20rpx;
-		top: 16rpx;
-		width: 132rpx;
-		height: 40rpx;
-		text-align: center;
-		line-height: 40rpx;
-		font-size: 22rpx;
-		color: #36343c;
-		border-radius: 20px;
-		background: linear-gradient(left, #f9e6af, #ffd465);
-		z-index: 1;
-	}
-
-	.tit {
-		font-size: $font-base + 2rpx;
-		color: #f7d680;
-		margin-bottom: 28rpx;
-
-		.iconfont {
-			color: #f6e5a3;
-			margin-right: 16rpx;
-		}
-	}
-
-	.e-b {
-		font-size: $font-sm;
-		color: #d8cba9;
-		margin-top: 10rpx;
-	}
-}
-
-.cover-container {
-	background: $page-color-base;
-	margin-top: -150rpx;
-	padding: 0 30rpx;
-	position: relative;
-	background: #f5f5f5;
-	padding-bottom: 20rpx;
-
-	.arc {
-		position: absolute;
-		left: 0;
-		top: -34rpx;
-		width: 100%;
-		height: 36rpx;
-	}
-}
-
-.tj-sction {
-	@extend %section;
-
-	.tj-item {
-		@extend %flex-center;
-		flex-direction: column;
-		height: 140rpx;
-		font-size: $font-sm;
-		color: #75787d;
-	}
-
-	.num {
-		font-size: $font-lg;
-		color: $font-color-dark;
-		margin-bottom: 8rpx;
-	}
-}
-
-.item-box {
-	width: 708rpx;
-	height: 163rpx;
-	background: #fff;
-	border-radius: 28rpx;
-	background-color: white;
-	margin: -40rpx auto 30rpx;
-	position: relative;
-
-	// margin-top: 20rpx;
-	.box-title {
-		line-height: 1;
-		padding: 30rpx;
-
-		.title {
-			font-size: $font-lg;
-			font-weight: bold;
-		}
-
-		.link {
-			font-size: $font-base - 2rpx;
-			color: $font-color-light;
-		}
-	}
-
-	.order-section {
-		@extend %section;
-		padding: 28rpx 0;
-
-		.order-item {
-			@extend %flex-center;
-			width: 120rpx;
-			height: 120rpx;
-			border-radius: 10rpx;
-			font-size: $font-sm;
-			color: $font-color-dark;
-		}
-
-		.iconfont {
-			font-size: 48rpx;
-			margin-bottom: 18rpx;
-			color: #fa436a;
-		}
-
-		.icon-shouhoutuikuan {
-			font-size: 44rpx;
-		}
-
-		.icon {
-			height: 50rpx;
-			width: 48rpx;
-			margin-bottom: 18rpx;
-			background-size: 100%;
-			background-repeat: no-repeat;
-			background-position: center;
-
-			.icon-img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-}
-
-.history-section {
-	// padding: 30rpx 0 0;
-	margin-top: 20rpx;
-	background: #fff;
-	border-radius: 10rpx;
-
-	.sec-header {
-		display: flex;
-		align-items: center;
-		font-size: $font-base;
-		color: $font-color-dark;
-		line-height: 40rpx;
-		margin-left: 30rpx;
-		padding-top: 30rpx;
-
-		.iconfont {
-			font-size: 44rpx;
-			color: $color-red;
-			margin-right: 16rpx;
-			line-height: 40rpx;
-		}
-	}
-
-	.h-list {
-		white-space: nowrap;
-		padding: 30rpx 30rpx 0;
-
-		.h-list-image {
-			display: inline-block;
-			width: 160rpx;
-			height: 160rpx;
-			margin-right: 20rpx;
-			border-radius: 10rpx;
-		}
-	}
-}
-
-.user-top {
-	height: 564rpx;
-	position: relative;
-
-	.user-top-bg {
-		width: 750rpx;
-		height: 564rpx;
-		// width: 100%;
-		// position: absolute;
-	}
-	.user-info {
-		width: 750rpx;
-		position: absolute;
-		top: 50rpx;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-		.avtar {
-			width: 134rpx;
-			height: 134rpx;
-			border-radius: 50%;
-		}
-		.name {
-			margin-top: 10rpx;
-			font-size: 39rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FFFFFF;
-		}
-		.phone {
-			margin-top: 8rpx;
-			font-size: 29rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FFFFFF;
-		}
-		.vip-box {
-			margin-top: 10rpx;
-			display: flex;
-			align-items: center;
-			line-height: 1;
-			.vip {
-				padding: 6rpx 16rpx;
-				text-align: center;
-				border-radius: 24rpx;
-				font-size: 20rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #FFFFFF;
-				margin-right: 10rpx;
-			}
-		}
-	}
-
-	.sy-box {
-		position: absolute;
-		bottom: 30rpx;
-		height: 148rpx;
-		width: 750rpx;
-
-		// background-color: #bfa;
-		.sy-item {
-			width: 30%;
-			flex-grow: 1;
-			text-align: center;
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #ffffff;
-
-			.sy-item-val {
-				font-size: 39rpx;
-			}
-		}
-
-		.jg {
-			width: 2rpx;
-			height: 68rpx;
-			background-color: #fff;
-		}
-	}
-}
-
-.item-box-b {
-	width: 710rpx;
-	height: 221rpx;
-	background: #ffffff;
-	margin: 20rpx auto 60rpx;
-}
-
-.btm-box {
-	width: 706rpx;
-	height: 104rpx;
-	background: #ffffff;
-	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-	border-radius: 28rpx;
-	margin: 20rpx auto;
-	position: relative;
-	padding: 0 33rpx 0 24rpx;
-	font-size: 29rpx;
-	font-weight: bold;
-	color: #5d5d5d;
-	.left-img {
-		width: 40rpx;
-	}
-	.right-img {
-		width: 14rpx;
-	}
-	view {
-		flex-grow: 1;
-		padding-left: 12rpx;
-	}
-}
-.popup-box {
-		width: 522rpx;
-		height: 605rpx;
-		background-color: #ffffff;
-		border-radius: 20rpx;
-		position: relative;
-
-		.img {
-			position: relative;
-			top: -56rpx;
-			left: 0;
-			width: 522rpx;
-			height: 132rpx;
-			display: flex;
-			justify-content: center;
-
-			image {
-				border-radius: 20rpx 20rpx 0 0;
-				width: 450rpx;
-				height: 132rpx;
-			}
-		}
-
-		.mian {
-			margin-top: -44rpx;
-			display: flex;
-			flex-direction: column;
-			align-items: center;
-			// padding: 32rpx 32rpx;
-			background-color: #ffffff;
-			border-radius: 0 0 20rpx 20rpx;
-			text-align: center;
-
-			.delivery {
-				font-size: 40rpx;
-				color: #333333;
-				display: flex;
-				align-items: center;
-				flex-direction: column;
-
-				.title {}
-
-				image {
-					margin-top: 48rpx;
-					width: 172rpx;
-					height: 160rpx;
-				}
-			}
-
-			.nocancel {
-				font-size: 32rpx;
-				color: #333333;
-				margin-top: 14rpx;
-			}
-
-			.comfirm-box {
-				margin-top: 52rpx;
-				display: flex;
-				// margin-bottom: 32rpx;
-
-				// justify-content: space-around;
-				.cancel {
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					width: 197rpx;
-					height: 74rpx;
-					border: 1px solid #dcc786;
-					border-radius: 38rpx;
-
-					font-size: 32rpx;
-					color: #605128;
-				}
-
-				.comfirm {
-					margin-left: 32rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-					width: 197rpx;
-					height: 74rpx;
-					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
-					border-radius: 38px;
-					font-size: 32rpx;
-					color: #605128;
-				}
-			}
-		}
-	}
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<!-- 用户头像设置 -->
+		<view class="user-wrap">
+			<view class="user-left">
+				<image :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
+				<image src="../../static/error/missing-face.png" mode="" v-else></image>
+			</view>
+			<view class="user-center">
+				<view class="user-name clamp2">
+					{{userInfo.nickname || '游客'}}
+				</view>
+				<view class="user-phone" v-if="userInfo.uid">
+					邀请码:{{userInfo.uid}}
+				</view>
+				<view class="user-phone" v-if="userInfo.uid" @click="navTo('/pages/user/wenpiao')">
+					文票:{{userInfo.paper_ticket || '0'}}
+				</view>
+			</view>
+			<view class="user-right" @click="navTo('/pages/set/userinfo')">
+				<image src="../../static/user/user-set.png" mode=""></image>
+			</view>
+		</view>
+		<!-- 账户数据 -->
+		<view class=" user-sj">
+			<image src="../../static/user/user-bg.png" mode="" class="bg"></image>
+			<view class="info-top">
+				账户
+			</view>
+			<view class="info-info">
+				<view class="info-item" @click="navTo('/pages/user/whiteJf')">
+					<view class="item-val">
+						{{userInfo.white_integral || '0'}}
+					</view>
+					<view class="item-tit">
+						白积分
+					</view>
+				</view>
+				<view class="info-item" @click="navTo('/pages/user/greenJf')">
+					<view class="item-val">
+						{{userInfo.green_integral || '0'}}
+					</view>
+					<view class="item-tit">
+						绿积分
+					</view>
+				</view>
+				<view class="info-item" @click="navTo('/pages/user/purpleJf')">
+					<view class="item-val">
+						{{userInfo.purple_integral || '0'}}
+					</view>
+					<view class="item-tit">
+						紫积分
+					</view>
+				</view>
+				<view class="info-item" @click="navTo('/pages/user/mallJf')">
+					<view class="item-val">
+						{{userInfo.integral || '0'}}
+					</view>
+					<view class="item-tit">
+						商城积分
+					</view>
+				</view>
+				<view class="info-item" @click="navTo('/pages/user/shopJf')">
+					<view class="item-val">
+						{{userInfo.business_integral || '0'}}
+					</view>
+					<view class="item-tit">
+						商家积分
+					</view>
+				</view>
+				<view class="info-item" @click="navTo('/pages/user/myGreenCard')">
+					<view class="item-val">
+						{{greenNum || '0'}}
+					</view>
+					<view class="item-tit">
+						绿卡
+					</view>
+				</view>
+			</view>
+		</view>
+		<image src="../../static/img/sq-rz.png" mode="widthFix"
+			style="width: 691rpx;display: block;margin:0rpx auto 20rpx;" @click="navTo('/pages/user/joinShop')">
+		</image>
+		<!-- 订单 -->
+		<view class="item-box item-box-b">
+			<view class="box-title flex ">
+				<view class="title"><text>我的订单</text></view>
+				<view class="link" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"><text
+						class="iconfont iconenter"></text></view>
+			</view>
+			<view class="order-section">
+				<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"
+					:hover-stay-time="50">
+					<view class=" icon position-relative">
+						<image class="icon-img" src="/static/icon/i1.png" mode="aspectFit"></image>
+						<view class="corner" v-if="orderInfo.unpaid_count > 0">
+							<text>{{ orderInfo.unpaid_count }}</text>
+						</view>
+					</view>
+					<text>待付款</text>
+				</view>
+				<view class="order-item" @click="navTo('/pages/order/order?state=1')" hover-class="common-hover"
+					:hover-stay-time="50">
+					<view class=" icon position-relative">
+						<image class="icon-img" src="/static/icon/i2.png" mode="aspectFit"></image>
+						<view class="corner" v-if="orderInfo.unshipped_count > 0">
+							<text>{{ orderInfo.unshipped_count }}</text>
+						</view>
+					</view>
+					<text>待发货</text>
+				</view>
+				<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover"
+					:hover-stay-time="50">
+					<view class="icon position-relative">
+						<image class="icon-img" src="/static/icon/i3.png" mode="aspectFit"></image>
+						<view class="corner" v-if="orderInfo.received_count > 0">
+							<text>{{ orderInfo.received_count }}</text>
+						</view>
+					</view>
+					<text>待收货</text>
+				</view>
+				<view class="order-item" @click="navTo('/pages/order/order?state=4')" hover-class="common-hover"
+					:hover-stay-time="50">
+					<view class="icon position-relative">
+						<image class="icon-img" src="/static/icon/i4.png" mode="aspectFit"></image>
+						<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
+							<text>{{ orderInfo.complete_count }}</text>
+						</view> -->
+					</view>
+					<text>已完成</text>
+				</view>
+			</view>
+		</view>
+		<uni-list class="tool-list">
+			<uni-list-item v-if="userInfo.clerk_type == 1" title="券码核销" @click="shao()" thumb="/static/user/user1.png">
+			</uni-list-item>
+			<uni-list-item v-if="userInfo.clerk_type == 1" title="核销历史" @click="navTo('/pages/user/hxjl')"
+				thumb="/static/user/user2.png"></uni-list-item>
+			<uni-list-item title="我的推广" @click="navTo('/pages/user/team')" thumb="/static/user/user01.png">
+			</uni-list-item>
+			<uni-list-item title="邀请海报" @click="navTo('/pages/user/shareQrCode')" thumb="/static/user/user02.png">
+			</uni-list-item>
+			<uni-list-item title="收货地址" @click="navTo('/pages/set/address')" thumb="/static/user/user03.png">
+			</uni-list-item>
+			<uni-list-item title="我的收藏" @click="navTo('/pages/user/favorites')" thumb="/static/user/user04.png">
+			</uni-list-item>
+		</uni-list>
+		<view class="btm" style="height: 44px;"></view>
+		<!-- 客服 -->
+		<uni-popup ref="popupkf" type="center">
+			<view class="popup-box">
+				<view class="img">
+					<image src="../../static/img/img009.png" mode=""></image>
+				</view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image src="../../static/img/img010.png" mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="kfClose()">取消</view>
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import uniList from '@/components/uni-list/uni-list.vue';
+	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+	import {
+		orderData,
+		userinfo,
+		greenList
+	} from '@/api/user.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	import {
+		tabbar
+	} from '@/utils/tabbar.js';
+	import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+	let startY = 0,
+		moveY = 0,
+		pageAtTop = true;
+	export default {
+		components: {
+			uniList,
+			uniListItem
+		},
+		data() {
+			return {
+				greenNum: 0,
+				text: '',
+				tabbar: tabbar,
+				current: 4,
+				coverTransform: 'translateY(0px)',
+				coverTransition: '0s',
+				moving: false,
+				userDowm: 0, //卡片升级专属高度
+				userMaxDowm: 0 //卡片最高高度
+			};
+		},
+		onShow() {
+			this.loadBaseData();
+			// 判断是否已经登录
+			if (this.hasLogin) {
+				this.loadBaseData();
+				this.getGreenList()
+			}
+		},
+		onReady() {
+			// 初始化获取页面宽度
+			uni.createSelectorQuery()
+				.select('.container')
+				.fields({
+						size: true
+					},
+					data => {
+						// 计算最多下拉的高度
+						this.userDowm = Math.floor((data.width / 750) * 185);
+						// 计算最大触发修改高度事件
+						this.userMaxDowm = Math.floor((data.width / 750) * 250);
+					}
+				)
+				.exec();
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			// 绿卡记录
+			getGreenList() {
+				greenList({
+
+				}).then(res => {
+					console.log('greenList', res)
+					this.greenNum = res.data.count
+				})
+			},
+			// 加载初始数据
+			loadBaseData() {
+				userinfo({})
+					.then(({
+						data
+					}) => {
+						this.setUserInfo(data);
+						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+						orderData({})
+							.then(({
+								data
+							}) => {
+								this.setOrderInfo(data);
+							})
+							.catch(e => {
+								this.setOrderInfo({
+									complete_count: 0, //完成
+									received_count: 0, //待收货
+									unshipped_count: 0, //待发货
+									order_count: 0, //订单总数
+									unpaid_count: 0 //待付款
+								});
+							});
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			/**
+			 * 统一跳转接口,拦截未登录路由
+			 * navigator标签现在默认没有转场动画,所以用view
+			 */
+			navTo(url) {
+				if (url == '') {
+					this.$api.msg('敬请期待')
+				}
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						fail() {
+							uni.switchTab({
+								url
+							});
+						}
+					});
+				}
+			},
+
+			/**
+			 *  会员卡下拉和回弹
+			 *  1.关闭bounce避免ios端下拉冲突
+			 *  2.由于touchmove事件的缺陷(以前做小程序就遇到,比如20跳到40,h5反而好很多),下拉的时候会有掉帧的感觉
+			 *    transition设置0.1秒延迟,让css来过渡这段空窗期
+			 *  3.回弹效果可修改曲线值来调整效果,推荐一个好用的bezier生成工具 http://cubic-bezier.com/
+			 */
+			coverTouchstart(e) {
+				// console.log(e);
+				if (pageAtTop === false) {
+					return;
+				}
+
+				this.coverTransition = 'transform .1s linear';
+				startY = e.touches[0].clientY;
+			},
+			coverTouchmove(e) {
+				// console.log(e);
+				moveY = e.touches[0].clientY;
+				let moveDistance = moveY - startY;
+				let maxDowm = this.userMaxDowm;
+				let Dowm = this.userDowm;
+				if (moveDistance < 0) {
+					this.moving = false;
+					return;
+				}
+				this.moving = true;
+				if (moveDistance >= Dowm && moveDistance < maxDowm) {
+					moveDistance = Dowm;
+				}
+
+				if (moveDistance > 0 && moveDistance <= Dowm) {
+					this.coverTransform = `translateY(${moveDistance}px)`;
+				}
+			},
+			coverTouchend() {
+				if (this.moving === false) {
+					return;
+				}
+				this.moving = false;
+				this.coverTransition = 'transform 0.3s cubic-bezier(.21,1.93,.53,.64)';
+				this.coverTransform = 'translateY(0px)';
+			},
+			kfOpen() {
+				this.$refs.popupkf.open()
+			},
+			kfClose() {
+				this.$refs.popupkf.close()
+			},
+			comfirm(text) {
+				console.log(text);
+				const result = uniCopy(text);
+				if (result === false) {
+					uni.showToast({
+						title: '不支持'
+					});
+				} else {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none'
+					});
+				}
+				this.$refs.popup.close();
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	%flex-center {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	%section {
+		display: flex;
+		justify-content: space-around;
+		align-content: center;
+		background: #fff;
+		border-radius: 10rpx;
+	}
+
+	.container {
+		height: 100%;
+		background-color: $page-color-base;
+	}
+
+	.content-box {
+		height: 100%;
+	}
+
+	.vheigh {
+		height: var(--status-bar-height);
+		background-color: $base-color;
+	}
+
+	.user-section {
+		height: 435rpx;
+		padding: 15rpx 30rpx 0;
+		position: relative;
+
+		.bg {
+			position: absolute;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			background-color: $base-color;
+		}
+	}
+
+	.user-info-box {
+		height: 180rpx;
+		color: white;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		z-index: 1;
+
+		.detail {
+			height: 130rpx;
+
+			.portrait-box {
+				height: 100%;
+
+				.portrait {
+					width: 130rpx;
+					height: 100%;
+					border: 5rpx solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			.info-box {
+				margin-left: 20rpx;
+				line-height: 1.5;
+
+				.username {
+					font-size: $font-lg + 6rpx;
+					height: 100%;
+				}
+			}
+		}
+
+		.config {
+			font-size: 48rpx;
+			height: 130rpx;
+
+			.setting {
+				margin-right: 51rpx;
+			}
+		}
+	}
+
+	.vip-card-box {
+		display: flex;
+		flex-direction: column;
+		color: #f7d680;
+		height: 240rpx;
+		background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8));
+		border-radius: 16rpx 16rpx 0 0;
+		overflow: hidden;
+		position: relative;
+		padding: 20rpx 24rpx;
+
+		.card-bg {
+			position: absolute;
+			top: 20rpx;
+			right: 0;
+			width: 380rpx;
+			height: 260rpx;
+		}
+
+		.b-btn {
+			position: absolute;
+			right: 20rpx;
+			top: 16rpx;
+			width: 132rpx;
+			height: 40rpx;
+			text-align: center;
+			line-height: 40rpx;
+			font-size: 22rpx;
+			color: #36343c;
+			border-radius: 20px;
+			background: linear-gradient(left, #f9e6af, #ffd465);
+			z-index: 1;
+		}
+
+		.tit {
+			font-size: $font-base + 2rpx;
+			color: #f7d680;
+			margin-bottom: 28rpx;
+
+			.iconfont {
+				color: #f6e5a3;
+				margin-right: 16rpx;
+			}
+		}
+
+		.e-b {
+			font-size: $font-sm;
+			color: #d8cba9;
+			margin-top: 10rpx;
+		}
+	}
+
+	.cover-container {
+		background: $page-color-base;
+		margin-top: -150rpx;
+		padding: 0 30rpx;
+		position: relative;
+		background: #f5f5f5;
+		padding-bottom: 20rpx;
+
+		.arc {
+			position: absolute;
+			left: 0;
+			top: -34rpx;
+			width: 100%;
+			height: 36rpx;
+		}
+	}
+
+	.tj-sction {
+		@extend %section;
+
+		.tj-item {
+			@extend %flex-center;
+			flex-direction: column;
+			height: 140rpx;
+			font-size: $font-sm;
+			color: #75787d;
+		}
+
+		.num {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 8rpx;
+		}
+	}
+
+	.item-box {
+		width: 708rpx;
+		height: 163rpx;
+		background: #fff;
+		border-radius: 28rpx;
+		background-color: white;
+		margin: -40rpx auto 30rpx;
+		position: relative;
+
+		// margin-top: 20rpx;
+		.box-title {
+			line-height: 1;
+			padding: 30rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.order-section {
+			@extend %section;
+			padding: 28rpx 0;
+
+			.order-item {
+				@extend %flex-center;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+				font-size: $font-sm;
+				color: $font-color-dark;
+			}
+
+			.iconfont {
+				font-size: 48rpx;
+				margin-bottom: 18rpx;
+				color: #fa436a;
+			}
+
+			.icon-shouhoutuikuan {
+				font-size: 44rpx;
+			}
+
+			.icon {
+				height: 50rpx;
+				width: 48rpx;
+				margin-bottom: 18rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				background-position: center;
+
+				.icon-img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.history-section {
+		// padding: 30rpx 0 0;
+		margin-top: 20rpx;
+		background: #fff;
+		border-radius: 10rpx;
+
+		.sec-header {
+			display: flex;
+			align-items: center;
+			font-size: $font-base;
+			color: $font-color-dark;
+			line-height: 40rpx;
+			margin-left: 30rpx;
+			padding-top: 30rpx;
+
+			.iconfont {
+				font-size: 44rpx;
+				color: $color-red;
+				margin-right: 16rpx;
+				line-height: 40rpx;
+			}
+		}
+
+		.h-list {
+			white-space: nowrap;
+			padding: 30rpx 30rpx 0;
+
+			.h-list-image {
+				display: inline-block;
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+
+
+
+	.item-box-b {
+		width: 710rpx;
+		height: 221rpx;
+		background: #ffffff;
+		margin: 20rpx auto 60rpx;
+	}
+
+
+
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+
+		.img {
+			position: relative;
+			top: -56rpx;
+			left: 0;
+			width: 522rpx;
+			height: 132rpx;
+			display: flex;
+			justify-content: center;
+
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 450rpx;
+				height: 132rpx;
+			}
+		}
+
+		.mian {
+			margin-top: -44rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+
+				.title {}
+
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+
+					font-size: 32rpx;
+					color: #605128;
+				}
+
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
+		}
+
+	}
+
+	.tool-list {
+		width: 690rpx;
+		margin: auto;
+		margin-top: 20rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+	}
+
+	.user-sj {
+		width: 728rpx;
+		height: 448rpx;
+		position: relative;
+		margin: auto;
+		font-size: 32rpx;
+		font-weight: bold;
+		color: #FFFFFF;
+
+		.bg {
+			width: 728rpx;
+			height: 448rpx;
+		}
+
+		.info-top {
+			position: absolute;
+			height: 100rpx;
+			top: 0;
+			line-height: 120rpx;
+			padding-left: 52rpx;
+		}
+
+		.info-info {
+			position: absolute;
+			top: 100rpx;
+			width: 100%;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: flex-start;
+			height: 325rpx;
+			padding: 0 30rpx;
+
+			.info-item {
+				width: 33%;
+				height: 50%;
+				text-align: center;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+
+				.item-val {
+					margin-bottom: 32rpx;
+				}
+
+				.item-tit {}
+			}
+		}
+
+	}
+
+	.user-wrap {
+		display: flex;
+		padding: 80rpx 35rpx 20rpx 30rpx;
+
+		.user-left {
+			flex-shrink: 0;
+			width: 143rpx;
+			height: 143rpx;
+
+			image {
+				width: 143rpx;
+				height: 143rpx;
+			}
+		}
+
+		.user-center {
+			flex-grow: 1;
+			padding: 0 20rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+
+			.user-name {
+				font-size: 34rpx;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.user-phone {
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+
+		.user-right {
+			width: 44rpx;
+			height: 40rpx;
+			flex-shrink: 0;
+
+			image {
+				width: 44rpx;
+				height: 40rpx;
+			}
+		}
+	}
 </style>

+ 466 - 0
pages/user/wenpiao.vue

@@ -0,0 +1,466 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">文票</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.green_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<!-- <view class="moneybtn-box">
+				<view class="money-btn">
+
+				</view>
+				<view class="money-btn" >
+					提现 >
+				</view>
+			</view> -->
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{recharge || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{orderStatusSum || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.title }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getGreenJf,
+		getUserInfo,
+		getWenpiao
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getWenpiao({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

+ 475 - 0
pages/user/whiteJf.vue

@@ -0,0 +1,475 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">白积分</view>
+			</view>
+			<view class="content-bg">
+				<image src="../../static/img/myyue.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{userInfo.white_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<!-- <view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=yue')">
+					易货券转账
+				</view>
+				<view class="money-btn" @click="navto('/pages/money/recharge')">
+					易货券充值
+				</view>
+			</view> -->
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{sr || 0}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{zc || 0}}</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view>
+						<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
+							<view class="title-box">
+								<view class="title">
+									<text>{{ item.mark }}</text>
+								</view>
+								<view class="time">
+									<text>{{ item.add_time }}</text>
+								</view>
+							</view>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"
+						v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getWhiteJf,
+		getUserInfo
+	} from '@/api/user.js'
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.height = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				zc: 0,
+				sr: 0,
+				height: '',
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				orderStatusSum: 0,
+				recharge: 0,
+				navList: [{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户余额
+			getUserInfo({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+				this.setUserInfo(data);
+			});
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user',
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getWhiteJf({
+						page: navItem.page,
+						limit: navItem.limit,
+						pm: navItem.state
+					})
+					.then(({
+						data
+					}) => {
+						this.zc = data.zc
+						this.sr = data.sr
+						navItem.orderList = navItem.orderList.concat(data.list)
+						navItem.page++
+						if (navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						} else {
+							navItem.loadingType = 'noMore'
+						}
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f1f1f1;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.info-box {
+		width: 670rpx;
+		height: 186rpx;
+		background: #ffffff;
+		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+		border-radius: 20rpx;
+		margin: -100rpx auto 0;
+		position: relative;
+		z-index: 2;
+
+		.info-item {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			line-height: 1;
+
+			.info-font {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+
+			.info-num {
+				margin-top: 30rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #181818;
+			}
+		}
+
+		.shu {
+			width: 2rpx;
+			height: 74rpx;
+			background: #dcdfe6;
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 70rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	//列表
+	.swiper-box {
+		.order-item:last-child {
+			margin-bottom: 60rpx;
+		}
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+				text-align: right;
+
+				.status {
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		background: #ffffff;
+		height: 100%;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.btn-box {
+		width: 674rpx;
+		height: 88rpx;
+		background: linear-gradient(0deg, #2e58ff, #32c6ff);
+		border-radius: 44rpx;
+		font-size: 36rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ffffff;
+		text-align: center;
+		line-height: 88rpx;
+		position: fixed;
+		bottom: 48rpx;
+		left: 0;
+		right: 0;
+		margin: 0 auto;
+	}
+</style>

BIN
static/img/ginfo0.png


BIN
static/img/ginfo1.png


BIN
static/img/ginfo2.png


BIN
static/img/ginfo3.png


BIN
static/img/ginfo4.png


BIN
static/img/green0.png


BIN
static/img/green1.png


BIN
static/img/green2.png


BIN
static/img/green3.png


BIN
static/img/green4.png


BIN
static/img/libao-bg.png


BIN
static/img/sq-rz.png


BIN
static/index/index16.png


BIN
static/tabBar/cate-action.png


BIN
static/tabBar/cate.png


BIN
static/tabBar/game-action.png


BIN
static/tabBar/game.png


BIN
static/user/user-bg.png


BIN
static/user/user-set.png


BIN
static/user/user01.png


BIN
static/user/user02.png


BIN
static/user/user03.png


BIN
static/user/user04.png