xuhaolan 2 gadi atpakaļ
vecāks
revīzija
22efd56b58
100 mainītis faili ar 10829 papildinājumiem un 6350 dzēšanām
  1. 4 0
      .hbuilderx/launch.json
  2. 306 182
      api/user.js
  3. BIN
      appbase/1080.png
  4. BIN
      appbase/480.png
  5. BIN
      appbase/720.png
  6. 2 0
      appbase/cartinfo.txt
  7. BIN
      appbase/down.png
  8. BIN
      appbase/lgo.png
  9. BIN
      appbase/logo2.png
  10. BIN
      appbase/xhg.keystore
  11. 73 15
      manifest.json
  12. 549 592
      pages.json
  13. 597 554
      pages/cart/cart.vue
  14. 319 318
      pages/category/business.vue
  15. 32 16
      pages/game/game.vue
  16. 185 73
      pages/game/gameDetail.vue
  17. 888 822
      pages/index/index.vue
  18. 43 0
      pages/index/jieshao.vue
  19. 78 116
      pages/money/pay.vue
  20. 19 14
      pages/money/wallet.vue
  21. 46 39
      pages/money/withdmoenys.vue
  22. 453 259
      pages/money/withdrawal.vue
  23. 0 173
      pages/order/createOrder.vue
  24. 1 1
      pages/order/order.vue
  25. 447 620
      pages/product/list.vue
  26. 808 784
      pages/product/product.vue
  27. 341 288
      pages/public/login.vue
  28. 221 207
      pages/public/register.vue
  29. 300 92
      pages/set/userinfo.vue
  30. 173 0
      pages/user/greenChange.vue
  31. 477 0
      pages/user/greenJf.vue
  32. 245 0
      pages/user/joinShop.vue
  33. 478 0
      pages/user/mallJf.vue
  34. 238 0
      pages/user/myGreenCard.vue
  35. 478 0
      pages/user/purpleJf.vue
  36. 496 0
      pages/user/shopJf.vue
  37. 384 354
      pages/user/team.vue
  38. 870 823
      pages/user/user.vue
  39. 478 0
      pages/user/wenpiao.vue
  40. 478 0
      pages/user/whiteJf.vue
  41. 279 0
      pages/user/yuezz.vue
  42. BIN
      static/game/微信.lnk
  43. BIN
      static/img/game01.png
  44. BIN
      static/img/game02.png
  45. BIN
      static/img/game03.png
  46. BIN
      static/img/game04.png
  47. BIN
      static/img/game05.png
  48. BIN
      static/img/ginfo0.png
  49. BIN
      static/img/ginfo1.png
  50. BIN
      static/img/ginfo2.png
  51. BIN
      static/img/ginfo3.png
  52. BIN
      static/img/ginfo4.png
  53. BIN
      static/img/green0.png
  54. BIN
      static/img/green1.png
  55. BIN
      static/img/green2.png
  56. BIN
      static/img/green3.png
  57. BIN
      static/img/green4.png
  58. BIN
      static/img/libao-bg.png
  59. BIN
      static/img/sq-rz.png
  60. BIN
      static/index/index16.png
  61. BIN
      static/index/js01.png
  62. BIN
      static/index/js02.png
  63. BIN
      static/index/js03.png
  64. BIN
      static/index/js04.png
  65. BIN
      static/index/js05.png
  66. BIN
      static/index/js06.png
  67. BIN
      static/index/xhgLogo.png
  68. BIN
      static/tabBar/cate-action.png
  69. BIN
      static/tabBar/cate.png
  70. BIN
      static/tabBar/game-action.png
  71. BIN
      static/tabBar/game.png
  72. BIN
      static/user/user-bg.png
  73. BIN
      static/user/user-set.png
  74. BIN
      static/user/user01.png
  75. BIN
      static/user/user02.png
  76. BIN
      static/user/user03.png
  77. BIN
      static/user/user04.png
  78. 8 8
      store/index.js
  79. BIN
      unpackage/cache/apk/__UNI__F0D4DD1_cm.apk
  80. 1 0
      unpackage/cache/apk/apkurl
  81. 0 0
      unpackage/cache/apk/cmManifestCache.json
  82. 3 0
      unpackage/cache/certdata
  83. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/google-keystore.keystore
  84. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-hdpi.png
  85. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xhdpi.png
  86. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xxhdpi.png
  87. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xxxhdpi.png
  88. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-hdpi.png
  89. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-xhdpi.png
  90. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-xxhdpi.png
  91. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappchooselocation.js
  92. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniapperror.png
  93. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappes6.js
  94. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappopenlocation.js
  95. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniapppicker.js
  96. 6 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappquill.js
  97. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappquillimageresize.js
  98. 0 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappscan.js
  99. BIN
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappsuccess.png
  100. 25 0
      unpackage/cache/wgt/__UNI__F0D4DD1/__uniappview.html

+ 4 - 0
.hbuilderx/launch.json

@@ -2,6 +2,10 @@
   // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
     "version": "0.0",
     "configurations": [{
+     	"app-plus" : 
+     	{
+     		"launchtype" : "remote"
+     	},
      	"default" : 
      	{
      		"launchtype" : "remote"

+ 306 - 182
api/user.js

@@ -1,183 +1,307 @@
-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 yueXhg(data) {
+	return request({
+		url: '/api/dow_user',
+		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
+	})
 }

BIN
appbase/1080.png


BIN
appbase/480.png


BIN
appbase/720.png


+ 2 - 0
appbase/cartinfo.txt

@@ -0,0 +1,2 @@
+证书别名: com.xhg.inc
+证书密码: 112233

BIN
appbase/down.png


BIN
appbase/lgo.png


BIN
appbase/logo2.png


BIN
appbase/xhg.keystore


+ 73 - 15
manifest.json

@@ -2,8 +2,8 @@
     "name" : "喜嗨购",
     "appid" : "__UNI__F0D4DD1",
     "description" : "",
-    "versionName" : "1.0.0",
-    "versionCode" : "100",
+    "versionName" : "1.0.7",
+    "versionCode" : 107,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -14,25 +14,27 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Payment" : {},
+            "OAuth" : {}
+        },
         /* 模块配置 */
         "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.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<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.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>"
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>"
                 ],
                 "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
             },
@@ -44,10 +46,66 @@
                 "maps" : {},
                 "oauth" : {
                     "weixin" : {
-                        "appid" : "",
-                        "appsecret" : "",
+                        "appid" : "wx7ecea7b3999ee88c",
+                        "appsecret" : "9c9329c67378aec194c48f259afbda9e",
+                        "UniversalLinks" : ""
+                    }
+                },
+                "geolocation" : {},
+                "payment" : {
+                    "alipay" : {
+                        "__platform__" : [ "ios", "android" ]
+                    },
+                    "weixin" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appid" : "wx7ecea7b3999ee88c",
                         "UniversalLinks" : ""
                     }
+                },
+                "push" : {},
+                "share" : {},
+                "speech" : {},
+                "statics" : {},
+                "ad" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            },
+            "splashscreen" : {
+                "androidStyle" : "default",
+                "android" : {
+                    "hdpi" : "appbase/480.png",
+                    "xhdpi" : "appbase/720.png",
+                    "xxhdpi" : "appbase/1080.png"
                 }
             }
         }
@@ -64,7 +122,7 @@
         }
     },
     "h5" : {
-        "title" : "响亮商城",
+        "title" : "喜嗨购",
         "domain" : "",
         "router" : {
             "base" : "/index/",
@@ -74,7 +132,7 @@
             "proxy" : {
                 "/api" : {
                     // "target" : "http://lnpt.frp.liuniu946.com/api",
-                    "target" : "http://xhg.frp.liuniu946.com/api",
+                    "target" : "http://xhg.duolio.cn/api",
                     // "changeOrigin": true,
                     "pathRewrite" : {
                         "/api" : "" // rewrite path

+ 549 - 592
pages.json

@@ -1,593 +1,550 @@
-{
-	"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/money/wallet",
+			"style": {
+				"navigationBarTitleText": "我的余额",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/user/yuezz",
+			"style": {
+				"navigationBarTitleText": "余额转账"
+			}
+		},
+		{
+			"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": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "我的推广"
+			}
+		},
+		{
+			"path": "pages/user/cash",
+			"style": {
+				"navigationBarTitleText": "我的现金"
+			}
+		},
+		{
+			"path": "pages/user/whiteJf",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "白积分"
+			}
+		},
+		{
+			"path": "pages/user/greenJf",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "绿积分"
+			}
+		},
+		{
+			"path": "pages/user/purpleJf",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "紫积分"
+			}
+		},
+		{
+			"path": "pages/user/mallJf",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "商城积分"
+			}
+		},
+		{
+			"path": "pages/user/shopJf",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "商家积分"
+			}
+		},
+		{
+			"path": "pages/user/wenpiao",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "文票"
+			}
+		},
+		{
+			"path": "pages/user/greenChange",
+			"style": {
+				"navigationBarTitleText": "绿卡兑换"
+			}
+		},
+		{
+			"path": "pages/money/withdmoenys",
+			"style": {
+				"navigationBarTitleText": "转账"
+			}
+		},
+		{
+			"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",
+				// #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/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": "打小怪兽"
+			}
+
+		}
+	    ,{
+            "path" : "pages/index/jieshao",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "公司介绍",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+    ],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "喜嗨购",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8"
+	},
+	"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": "我的"
+			}
+		]
+	}
 }

+ 597 - 554
pages/cart/cart.vue

@@ -1,555 +1,598 @@
-<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 {
+		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();
+			}
+		},
+		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>

+ 32 - 16
pages/game/game.vue

@@ -1,14 +1,15 @@
 <template>
 	<view class="center">
 		<view class="box" v-for="(item,index) in gameList " >
-			<!-- <view class="box-title">
-				{{item.name}}
-			</view> -->
+			
 			<view class="game-box" @click="goGame(item.id,index)">
+				<view class="box-title">
+					怪兽名称:{{item.name}}
+				</view>
 				<image :src="'../../static/img/game0'+(index%5+1)+'.png'" mode=""></image>
-				<view class="game-box-content">{{item.add_time}}
+				<view class="game-box-content">开打时间
 					<view class="game-box-content1">
-						{{item.end_time}}
+						每天{{item.add_time}}
 					</view>
 				</view>
 			</view>
@@ -72,8 +73,15 @@
 		},
 		onShow() {
 			getGame().then(res => {
-				console.log(res, 'res');
+				// console.log(res, 'res');
 				this.gameList = res.data.data
+				res.data.data.forEach(e=>{
+					// this.end_time = 
+				 var end = 	e.add_time.split(' ')
+				 e.add_time = end[1]
+					
+				})
+				
 			})
 		},
 		methods: {
@@ -93,11 +101,7 @@
 		padding: 0;
 		margin: 20rpx;
 	}
-	.box-title{
-		display: flex;
-		font-size: 28rpx;
-		font-weight: 500;
-	}
+
 	.game-box {
 		position: relative;
 		// margin: 10rpx;
@@ -109,6 +113,18 @@
 			height: 100%;
 
 		}
+		.box-title{
+			font-family:Cursive;
+			font-weight: 500;
+			position: absolute;
+			z-index: 99;
+			top: 120rpx;
+			left: 60rpx;
+			display: flex;
+			color: #FFFFFF;
+			font-size: 40rpx;
+			font-weight: 500;
+		}
 	}
 
 
@@ -117,11 +133,11 @@
 		left: 60rpx;
 		line-height: 40rpx;
 		position: absolute;
-		font-size: 24rpx;
+		font-size: 26rpx;
 		font-weight: 500;
 		color: #8F6AFD;
-		padding-left: 10rpx;
-		width: 500rpx;
+		padding-left: 20rpx;
+		width: 340rpx;
 		height: 40rpx;
 		background: #FFFFFF;
 		border-radius: 27rpx;
@@ -134,11 +150,11 @@
 			top: 0;
 			line-height: 40rpx;
 			text-align: center;
-			width: 270rpx;
+			width: 200rpx;
 			height: 40rpx;
 			background: #754AF0;
 			border-radius: 27rpx;
-			font-size: 24rpx;
+			font-size: 26rpx;
 			font-weight: 500;
 			color: #FFFFFF;
 		}

+ 185 - 73
pages/game/gameDetail.vue

@@ -3,20 +3,34 @@
 		<view class="game-top-bg">
 			<image src="../../static/game/game06.png" mode=""></image>
 			<view class="game-top-time">
-				第{{guaishouList.stage}}期&nbsp;立即预约结束仅剩 <span>{{hour.day}}</span>天<span>{{hour.hours}}</span>时<span>{{hour.minutes}}</span>分<span>{{hour.seconds}}</span>秒
+				第{{guaishouList.stage}}期
+
+				<view class="yueyue" v-if="isGb">
+					&nbsp;&nbsp;距离打怪
+					<span>{{state==0?'开始':'结束'}}</span>
+					仅剩
+					<span>{{hour.day}}</span>天<span>{{hour.hours}}</span>时<span>{{hour.minutes}}</span>分<span>{{hour.seconds}}</span>秒
+				</view>
+				<view class="yueyue" style="margin-left: 200rpx;" v-else>
+					已结束
+				</view>
+
 			</view>
 			<view class="game-top-xl">
-				<view class="xl">
+				<view class="xl" v-if="guaishouList.number!=guaishouList.money*1">
 					血量值:&nbsp;{{guaishouList.number}}/{{guaishouList.money*1}}
 				</view>
+				<view class="xl" v-else>
+					打怪成功!
+				</view>
 				<view class="xl-t">
 					<!-- 血量进度条 暂未开发! -->
 					<!-- <prog value= "80"></prog> -->
 					<!-- change进度条变化时候触发 -->
-					<bing-progress change="change" :value="getJd" width="474rpx" noActiveColor="#EB97E4"
-						infoColor="#fff" :isActiveCircular="false" barBorderRadius="20px" :disabled="true"
-						infoContent="value" infoEndText="%" handleWidth="0" infoFontSize="20rpx" strokeWidth="31rpx"
-						:continuous="true" :subContinuous="true" infoAlign="center" activeColor="#D461CD">
+					<bing-progress change="change" :value="getJd" width="474rpx" noActiveColor="#EB97E4" infoColor="#fff"
+						:isActiveCircular="false" barBorderRadius="20px" :disabled="true" infoContent="value"
+						infoEndText="%" handleWidth="0" infoFontSize="26px" strokeWidth="34rpx" :continuous="true"
+						:subContinuous="true" infoAlign="center" activeColor="#D461CD">
 					</bing-progress>
 
 				</view>
@@ -25,7 +39,7 @@
 				<image :src="'../../static/game/reb0'+(index%5+1)+'.png'" mode=""></image>
 			</view>
 			<view class="id">
-				作战Id:{{guaishouList.id}}-期数Id:{{guaishouList.stage}}
+				名称:{{guaishouList.name}}&nbsp&nbsp&nbsp期数Id:{{guaishouList.stage}}
 			</view>
 			<view class="gl">
 				<image src="../../static/game/game08.png" mode=""></image>
@@ -41,29 +55,29 @@
 		</view>
 		<view class="u-table">
 			<view class="column">
-				<view class="table-box">
+				<view class="table-box" @click="navTo('../user/whiteJf')">
 					<view class="table-img">
 						<image src="../../static/game/game04.png" mode=""></image>
 					</view>
 					<view class="table-title">
 						<view class="table-top">
-							200
+							{{userInfo.white_integral*1}}
 						</view>
 						<view class="table-top">
-							积分
+							积分
 						</view>
 					</view>
 				</view>
-				<view class="table-box">
+				<view class="table-box" @click="navTo('../user/purpleJf')">
 					<view class="table-img">
 						<image src="../../static/game/game05.png" mode=""></image>
 					</view>
 					<view class="table-title">
 						<view class="table-top">
-							200
+							{{userInfo.purple_integral*1}}
 						</view>
 						<view class="table-top">
-							积分
+							阳光积分
 						</view>
 					</view>
 				</view>
@@ -73,29 +87,29 @@
 			<view class="bb">
 			</view>
 			<view class="column">
-				<view class="table-box">
+				<view class="table-box" @click="navTo('../user/myGreenCard')">
 					<view class="table-img">
 						<image src="../../static/game/game03.png" mode=""></image>
 					</view>
 					<view class="table-title">
 						<view class="table-top">
-							200
+							{{greenDe}}
 						</view>
 						<view class="table-top">
 							绿卡
 						</view>
 					</view>
 				</view>
-				<view class="table-box">
+				<view class="table-box" @click="navTo('../money/wallet')">
 					<view class="table-img">
 						<image src="../../static/game/game02.png" mode=""></image>
 					</view>
 					<view class="table-title">
 						<view class="table-top">
-							200
+							{{userInfo.now_money*1}}
 						</view>
 						<view class="table-top">
-							绿积分
+							余额
 						</view>
 					</view>
 				</view>
@@ -175,7 +189,7 @@
 				</view>
 			</view>
 		</uni-popup> -->
-<!-- 		<uni-popup ref="popupPass" type="center">
+		<!-- 		<uni-popup ref="popupPass" type="center">
 			<!-- <view class="yue-box">
 				<view class="yue-tit">
 					请输入交易密码
@@ -184,25 +198,33 @@
 					<input type="password" v-model="passWord" focus placeholder="请填写交易密码">
 				</view>
 				<!-- numberChange购买数量变化   goodsNumberMax最大可购买数 -->
-				<!-- <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
+		<!-- <uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax"
 					@eventChange="numberChange"></uni-number-box> -->
-				<!-- <view class="yue-content">
+		<!-- <view class="yue-content">
 					请填写积分数量
 				</view> -->
-				<!-- <view class="comfirm-box">
+		<!-- <view class="comfirm-box">
 					<view class="cancel" @click="quxiaoPass()">取消</view>
 					<view class="comfirm" @click="quirePass(passWord)">确定</view>
 				</view>
 			</view> -->
-	<!-- 	</uni-popup> --> 
+		<!-- 	</uni-popup> -->
 	</view>
 </template>
 
 <script>
+	import {
+		greenList,
+		userinfo
+	} from '@/api/user.js'
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
 	import {
 		getTime,
 		timeComputed,
-		
+
 	} from '@/utils/rocessor.js'
 	import {
 		getGameDetail,
@@ -216,7 +238,13 @@
 		},
 		data() {
 			return {
-				index:0,
+				state: 0, //活动状态
+				xuhaolan: 1690,
+				name: '',
+				isGb: true,
+				goodsNumberMin: 1,
+				greenDe: 0, //绿积分
+				index: 0,
 				timer: '',
 				hour: {},
 				guaishouList: [], //怪兽详情
@@ -227,7 +255,7 @@
 				hong: 0,
 				zi: 0,
 				goodsNumberMax: 1000, //最大可购买数
-				goodsNumber: 0, //购买数量
+				goodsNumber: 1, //购买数量
 				number: 8,
 				bianhua: 0, //变化
 				xiaoguaishou: '',
@@ -251,12 +279,16 @@
 			};
 		},
 		computed: {
-			// ...mapState('user', ['hasLogin', 'userInfo']),
+			...mapState('user', ['hasLogin', 'userInfo']),
 			getJd() {
 				return (this.guaishouList.number / this.guaishouList.money * 1) * 100
 			}
 		},
+		// beforeDestroy() {
+		// 	clearInterval(this.timer)
+		// },
 		onLoad(option) {
+			console.log(this.userInfo, 'userInfo');
 			// this.xiaoguaishou = this.imageList[option.id].image
 			this.uid = option.id
 			this.index = option.index
@@ -271,14 +303,57 @@
 			}, 6)
 		},
 		onShow() {
+			this.getDTime()
+			this.jtDg()
+			// this.getDetail()
 			if (this.timer) {
 				clearInterval(this.timer)
 			}
+			// let getTimes = uni.getStorageSync('time')
+			// this.isGb !=getTimes
+			// // uni.clearStorage('time')
+			// console.log(getTimes, 'uni.setStorageSync');
+
+
+			this.getGreen()
+			this.getUerInfo()
+
 		},
 		methods: {
-			getDetail(){
-				getGameDetail({	id: this.uid}).then(res=>{
+			//监听打怪状态
+			jtDg() {
+				console.log(this.xuhaolan == this.guaishouList.money * 1, '2323');
+
+			},
+			...mapMutations('user', ['setUserInfo']),
+			getUerInfo() {
+				userinfo({})
+					.then(({
+						data
+					}) => {
+						this.setUserInfo(data);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			getGreen() {
+				greenList().then(res => {
+					this.greenDe = res.data.count
+					// console.log(res, '率积分');
+				})
+			},
+			getDetail() {
+				getGameDetail({
+					id: this.uid
+				}).then(res => {
 					this.guaishouList = res.data
+					console.log(res.data, 'res.data');
 				})
 			},
 			//计算倒计时
@@ -288,32 +363,35 @@
 					id: this.uid
 				}).then(res => {
 					this.guaishouList = res.data
+					console.log(res, 'res');
+					if (this.guaishouList.number == this.guaishouList.money * 1) {
+						this.$api.msg('打怪成功!')
+					}
 					this.bianhua = 3000
-
-
-
+					//当前时间
+					let dqTime = Math.round(new Date().getTime()/1000).toString();
+					
+					console.log(dqTime,'if()');
+					//开始事件
+					let add_time = res.data.add_time
+					if(dqTime >= add_time){
+						this.state = 1
+					}
+					// this.getDTime()
 					//获取结束时间
 					let endTime = res.data.end_time
 					// console.log(endTime, 'this.guaishouList.end_time');
 					//开启倒计时
-					this.timer = setInterval(getShijian, 1000)
+					obj.timer = setInterval(getShijian, 1000)
 
 					function getShijian() {
-						//获取当前时间
-						// let newTime =new Date()
-						// //时间差
-						// let times = (endTime*1000-newTime)
-						// console.log(times,'times');
-						// let t = parseInt(times / 60 / 60 % 24)
-						// this.hour = t < 10 ? '0' + t : t
-						// let m = parseInt(t / 60 % 60);
-						// this.m = m < 10 ? '0' + m : m;
-						// let s = parseInt(m % 60);
-						// this.s= s < 10 ? '0' + s : s;
-						// console.log(this.hour,this.m,this.s,'getShijian');
 						let da = timeComputed(endTime * 1000)
 						obj.hour = da
-						// console.log(da,'getShijian')
+						Object.values(obj.hour).forEach(e => {})
+						if (obj.hour.day == 0 && obj.hour.hours == 0 && obj.hour.minutes == 0 && obj.hour
+							.seconds == 0) {
+							obj.isGb = false
+						}
 					}
 
 				})
@@ -353,20 +431,26 @@
 			//抢购数量确认
 			quire() {
 				console.log(this.goodsNumber, 'this.goodsNumber');
-				
+
 				this.$refs.popupYue.close()
 				// this.$refs.popupButton.open()
 				//投注
 				getPurchase({
 					//众筹场次id
-					id:this.uid,
-					price:this.goodsNumber
+					id: this.uid,
+					price: this.goodsNumber
 					//投注额度
-				}).then(res=>{
-					console.log(res,'投注信息');
+				}).then(res => {
+					console.log(res, '投注信息');
+
+					uni.showToast({
+						title: '投注成功',
+						duration: 2000
+					});
+					this.getUerInfo()
 					this.getDetail()
 				})
-				
+
 			},
 			//预约界面使用
 			comfirm() {
@@ -378,12 +462,24 @@
 				this.$refs.popup.close()
 			},
 
-			//点击预约
+			//点击抢购
 			yue() {
 				console.log('asda');
-				this.$refs.popupYue.open()
-				
-				
+				if (this.isGb == false) {
+					this.$refs.popupYue.close()
+					// uni.showModal({
+					// 	title:"活动已结束!"
+					// })
+					// uni.showLoading({
+					// 	title:"活动已结束!"
+					// })
+					this.$api.msg("活动已结束!")
+				} else {
+					this.$refs.popupYue.open()
+				}
+				// this.$refs.popupYue.open()
+
+
 			}
 
 		}
@@ -421,16 +517,21 @@
 		padding-left: 100rpx;
 		position: absolute;
 		top: 30rpx;
-		left: 40rpx;
-		width: 670rpx;
+		left: 20rpx;
+		width: 710rpx;
 		height: 50rpx;
 		background: #000000;
 		opacity: 0.61;
 		border-radius: 25rpx;
-		font-size: 26rpx;
+		font-size: 32rpx;
 		font-weight: 500;
 		color: #fff;
 
+		.yueyue {
+			margin-left: 10rpx;
+			display: inline-block;
+		}
+
 		span {
 			width: 42rpx;
 			height: 42rpx;
@@ -447,7 +548,7 @@
 
 		// line-height: 75rpx;
 		.xl {
-			font-size: 28rpx;
+			font-size: 34rpx;
 			font-weight: 500;
 			color: #FFFFFF;
 		}
@@ -478,17 +579,17 @@
 	.id {
 		text-align: center;
 		position: absolute;
-		top: 490rpx;
-		left: 255rpx;
-		width: 240rpx;
-		height: 40rpx;
+		top: 475rpx;
+		left: 210rpx;
+		width: 340rpx;
+		height: 60rpx;
 		background: #000000;
 		opacity: 0.64;
 		border-radius: 20rpx;
-		font-size: 20rpx;
+		font-size: 32rpx;
 		font-weight: bold;
 		color: #FFFFFF;
-		line-height: 40rpx;
+		line-height: 60rpx;
 	}
 
 	.gl {
@@ -505,10 +606,10 @@
 	}
 
 	.edu {
-		margin: 20rpx 225rpx;
-		width: 302rpx;
+		margin: 20rpx 190rpx;
+		width: 370rpx;
 		height: 50rpx;
-		font-size: 24rpx;
+		font-size: 30rpx;
 		font-weight: 500;
 		color: #FFFFFF;
 		background: #1B1E2F;
@@ -530,6 +631,9 @@
 	}
 
 	.u-table {
+		display: flex;
+		flex-direction: column;
+		justify-content: space-around;
 		margin: 20rpx 30rpx;
 		width: 688rpx;
 		height: 309rpx;
@@ -557,14 +661,18 @@
 		}
 
 		.column {
+
 			display: flex;
-			justify-content: space-between;
+			align-items: center;
+			justify-content: space-around;
+
 		}
 
 		.table-box {
-			align-items: center;
+			margin-left: 70rpx;
+			width: 50%;
 			display: flex;
-			padding: 44rpx 76rpx;
+			align-items: center;
 
 			.table-img {
 				width: 65rpx;
@@ -578,11 +686,15 @@
 
 			.table-title {
 
-				margin-left: 30rpx;
+				padding-left: 15rpx;
 				display: flex;
 				flex-direction: column;
 
 				.table-top {
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+					width: 180rpx;
 					font-size: 30rpx;
 					font-weight: bold;
 					color: #333333;

+ 888 - 822
pages/index/index.vue

@@ -1,823 +1,889 @@
-<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/category/category')">
+					<image class="nitem-image" src="../../static/index/index03.png" mode=""></image>
+					<view class="nitem-font">全部商品</view>
+				</view>
+				<view class="navbar-item" @click="navTo('/pages/index/jieshao')">
+					<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: 'x18258617070',
+				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,
+						fail() {
+							uni.switchTab({
+								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>

+ 43 - 0
pages/index/jieshao.vue

@@ -0,0 +1,43 @@
+<template>
+	<view class="content">
+		<view class="img">
+			<image src="../../static/index/js01.png" mode=""></image>
+		</view>
+		<view class="img">
+			<image src="../../static/index/js02.png" mode=""></image>
+		</view>
+		<view class="img">
+			<image src="../../static/index/js03.png" mode=""></image>
+		</view>
+		<view class="img">
+			<image src="../../static/index/js04.png" mode=""></image>
+		</view>
+		<view class="img">
+			<image src="../../static/index/js05.png" mode=""></image>
+		</view>
+		<view class="img">
+			<image src="../../static/index/js06.png" mode=""></image>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				
+			};
+		}
+	}
+</script>
+
+<style lang="scss">
+.img{
+	width: 750rpx;
+	height: 420rpx;
+	image{
+		width: 100%;
+		height: 100%;
+	}
+}
+</style>

+ 78 - 116
pages/money/pay.vue

@@ -5,7 +5,8 @@
 			<text class="price">{{ money }}</text>
 		</view>
 		<view class="pay-type-list">
-			<view class="type-item b-b" @click="changePayType(1)">
+			<!-- v-if="ispg == 'android'" -->
+			<view class="type-item b-b"  @click="changePayType(1)">
 				<text class="icon iconfont iconweixin"></text>
 				<view class="con">
 					<text class="tit">微信支付</text>
@@ -13,13 +14,11 @@
 				</view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 1"></radio></label>
 			</view>
-			<!-- #ifdef APP-PLUS -->
-			<view class="type-item b-b" @click="changePayType(2)">
+			<!-- <view class="type-item b-b" @click="changePayType(2)">
 				<text class="icon iconfont iconzhifubao"></text>
 				<view class="con"><text class="tit">支付宝支付</text></view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
-			</view>
-			<!-- #endif -->
+			</view> -->
 			<view class="type-item" @click="changePayType(3)">
 				<text class="icon iconfont iconyue"></text>
 				<view class="con">
@@ -28,22 +27,6 @@
 				</view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 3"></radio></label>
 			</view>
-			<view class="type-item" @click="changePayType(5)">
-				<image class="cash-icon" src="../../static/icon/mygx.png" mode=""></image>
-				<view class="con">
-					<text class="tit">现金支付</text>
-					<text>可用现金 {{ userInfo.cash }}</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 5"></radio></label>
-			</view>
-			<view class="type-item" @click="changePayType(4)" v-if="isP == 1">
-				<text class="icon iconfont iconyue"></text>
-				<view class="con">
-					<text class="tit">拼团积分</text>
-					<text>可用余额 {{ userInfo.pink_integral }}</text>
-				</view>
-				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 4"></radio></label>
-			</view>
 		</view>
 		<text class="mix-btn" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</text>
 	</view>
@@ -52,21 +35,13 @@
 <script>
 import { balance } from '@/api/wallet.js';
 import { createOrderkey, computedOrderkey, orderPay } from '@/api/order.js';
-import { mapState, mapMutations } from 'vuex';
-import { orderData, userinfo } from '@/api/user.js';
-// #ifdef H5
-import weixinObj from '@/plugin/jweixin-module/index.js';
-// #endif
+import { mapState } from 'vuex';
+import { isIOS } from '@/utils/platform.js';
 export default {
 	data() {
 		return {
 			payType: 1, //支付类型
-			// #ifdef H5
-			payName: 'weixin',
-			// #endif
-			// #ifdef MP-WEIXIN
 			payName: 'weixin',
-			// #endif
 			orderInfo: {},
 			money: 0.0, //订单金额
 			now_money: 0.0, //余额
@@ -78,19 +53,18 @@ export default {
 			froms: '', //保存h5中数据来源对象
 			// #endif
 			pinkid: '', //保存拼团商品id
-			isP: 0
+			ispg: '' //是否是苹果
 		};
 	},
 	computed: {
 		// #ifdef H5
-		...mapState(['weichatObj']),
-		...mapState('user', ['userInfo'])
+		...mapState(['weichatObj'])
 		// #endif
 	},
 	onLoad(options) {
-		if (options.isP) {
-			this.isP = options.isP;
-		}
+		console.log(options,'options');
+		this.ispg = uni.getSystemInfoSync().platform;
+		console.log(this.ispg);
 		if (options.type == 1) {
 			this.type = 1;
 			this.orderId = options.ordid;
@@ -108,7 +82,6 @@ export default {
 				this.money = data.result.pay_price;
 			});
 		}
-		this.getUserInfo();
 		// 保存pinkid
 		if (options.pinkid) {
 			this.pinkid = options.pinkid;
@@ -120,16 +93,6 @@ export default {
 		});
 	},
 	methods: {
-		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-		getUserInfo() {
-			userinfo({})
-				.then(({ data }) => {
-					this.setUserInfo(data);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
 		//选择支付方式
 		changePayType(type) {
 			this.payType = type;
@@ -142,12 +105,6 @@ export default {
 			if (this.payType == 3) {
 				this.payName = 'yue';
 			}
-			if (this.payType == 4) {
-				this.payName = 'pink_integral';
-			}
-			if (this.payType == 5) {
-				this.payName = 'cash';
-			}
 		},
 		// 支付金额
 		orderMoneyPay() {
@@ -174,22 +131,10 @@ export default {
 							obj.$api.msg(msg);
 						}
 					}
-					if (obj.payName == 'pink_integral' && e.data.status == 'SUCCESS') {
-						if (e.status == 200) {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					}
-					if (obj.payName == 'cash' && e.data.status == 'SUCCESS') {
-						if (e.status == 200) {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					}
+					//#ifndef APP-PLUS
 					if (obj.payName == 'weixin' || obj.payName == 'routine') {
 						let da = e.data.result.jsConfig;
+						console.log(da,'支付打印');
 						let data = {
 							// #ifdef H5
 							timestamp: da.timestamp,
@@ -212,7 +157,7 @@ export default {
 						};
 						// #ifdef H5
 						if (obj.payName == 'weixin') {
-							weixinObj.chooseWXPay(data);
+							obj.weichatObj.chooseWXPay(data);
 						}
 						// #endif
 						// #ifdef MP-WEIXIN
@@ -221,6 +166,59 @@ export default {
 						}
 						// #endif
 					}
+					// #endif
+					//#ifdef APP-PLUS
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						let da = e.data.result.jsConfig;
+						console.log('--da--', da);
+						let data = {
+							appid: da.appid,
+							noncestr: da.noncestr,
+							package: da.package,
+							partnerid: da.partnerid,
+							prepayid: da.prepayid,
+							timestamp: da.timestamp,
+							sign: da.sign
+						};
+						console.log('--data--', data);
+						uni.requestPayment({
+							provider: 'wxpay',
+							orderInfo: data,
+							success(res) {
+								console.log(res);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+								obj.paySuccessTo();
+							},
+							fail(res) {
+								console.log(res, '失败');
+							}
+						});
+					}
+					if (obj.payName == 'ali') {
+						const url = e.data.result.jsConfig;
+						console.log(url, 'url');
+						uni.requestPayment({
+							provider: 'alipay',
+							orderInfo: url,
+							success: res => {
+								console.log(res);
+								uni.showToast({
+									title: '支付成功',
+									duration: 2000
+								});
+								obj.paySuccessTo();
+							},
+							fail: e => {
+								console.log(e);
+							},
+							complete: () => {}
+						});
+						obj.payLoding = false;
+					}
+					//#endif
 					uni.hideLoading();
 					obj.payLoding = false;
 				})
@@ -241,36 +239,7 @@ export default {
 		//确认支付
 		confirm: async function() {
 			let obj = this;
-			uni.showLoading({
-				title: '支付中',
-				mask: true
-			});
-			// 判断是否拼团积分不足
-			if (obj.payName == 'pink_integral' && +obj.userInfo.pink_integral < obj.money) {
-				uni.showModal({
-					title: '提示',
-					content: '拼团积分不足!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				uni.hideLoading();
-				return;
-			}
-			// 判断是否拼团积分不足
-			if (obj.payName == 'cash' && +obj.userInfo.cash < obj.money) {
-				uni.showModal({
-					title: '提示',
-					content: '现金不足!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				uni.hideLoading();
-				return;
-			}
+			
 			// 判断是否余额不足
 			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
 				uni.showModal({
@@ -281,9 +250,12 @@ export default {
 					fail: () => {},
 					complete: () => {}
 				});
-				uni.hideLoading();
 				return;
 			}
+			uni.showLoading({
+				title: '支付中',
+				mask: true
+			});
 			// 支付中
 			obj.payLoding = true;
 			// #ifdef H5
@@ -322,8 +294,7 @@ export default {
 				// #ifdef APP-PLUS
 				from: 'app', //来源
 				// #endif
-				shipping_type: prepage.tabCurrentIndex + 1, //提货方式 1 快递 2自提
-				store_id: prepage.tabCurrentIndex == 1 ? prepage.shopAddress.id : '',
+				shipping_type: 1 //提货方式 1 快递 2自提
 			};
 			// 判断是否拼团商品
 			if (obj.pinkid) {
@@ -332,6 +303,7 @@ export default {
 			// 生成订单
 			createOrderkey(data, obj.orderKey)
 				.then(({ data, status, msg }) => {
+					console.log(status);
 					// 判断是否支付失败
 					if (data.status == 'ORDER_EXIST') {
 						uni.showModal({
@@ -347,13 +319,7 @@ export default {
 					obj.orderId = data.result.orderId;
 					// 判断是否为余额支付
 					if (obj.payName == 'yue') {
-						if (status == 200 && data.status == 'SUCCESS') {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					} else if (obj.payName == 'cash') {
-						if (status == 200 && data.status == 'SUCCESS') {
+						if (status == 200) {
 							obj.paySuccessTo();
 						} else {
 							obj.$api.msg(msg);
@@ -366,7 +332,7 @@ export default {
 				.catch(e => {
 					uni.hideLoading();
 					obj.payLoding = false;
-					console.log(e);
+					console.log(e, '123456789');
 				});
 		}
 	}
@@ -413,11 +379,7 @@ export default {
 		font-size: 30upx;
 		position: relative;
 	}
-	.cash-icon {
-		width: 100rpx;
-		height: 52rpx;
-		padding-right: 50rpx;
-	}
+
 	.icon {
 		width: 100upx;
 		font-size: 52upx;
@@ -461,4 +423,4 @@ export default {
 .clickbg {
 	background-color: $color-gray !important;
 }
-</style>
+</style>

+ 19 - 14
pages/money/wallet.vue

@@ -4,20 +4,21 @@
 			<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 class="header">我的余额</view>
 			</view>
 			<view class="content-bg"><image src="../../static/img/myyue.png" mode=""></image></view>
 			<view class="money-box">
 				<view class="money">{{money | getMoneyStyle}}</view>
-				<view>我的易货券</view>
+				<view>我的余额</view>
 			</view>
 			<view class="moneybtn-box">
+				<!-- <view class="money-btn" @click="navto('/pages/money/recharge')">
+					充值
+				</view> -->
 				<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">
@@ -169,19 +170,22 @@ export default {
 				state
 			)
 				.then(({ data }) => {
-					console.log(data,'1');
-					console.log(JSON.stringify(data),'2')
+					// console.log(data[0],'1');
+					// console.log(JSON.stringify(data),'2')
 					
-					obj.recharge = data.income;
-					obj.orderStatusSum = data.expend;
-					if (data.list.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data.list[0].list);
-						console.log(navItem.orderList);
+					// obj.recharge = data.income;
+					// obj.orderStatusSum = data.expend;
+					if (data[0].list.length > 0) {
+						console.log(data[0].list,'data.list[0]');
+						navItem.orderList = navItem.orderList.concat(data[0].list);
+						console.log(navItem.orderList,'navItem.orderList');
 						navItem.page++;
 					}else {
 						navItem.loadingType = 'noMore';
+						console.log('还有税局2');
 					}
-					if (navItem.limit == data.list[0].list.length) {
+					if (navItem.limit == data[0].list.length) {
+						console.log(navItem.limit == data[0].list.length,'还有税局');
 						//判断是否还有数据, 有改为 more, 没有改为noMore
 						navItem.loadingType = 'more';
 						return;
@@ -331,6 +335,7 @@ page {
 	color: #ffffff;
 	padding:20rpx 50rpx ;
 	font-size: 30rpx;
+	margin-top: -40rpx;
 	font-family: PingFang SC;
 	font-weight: bold;
 	color: #FFFFFF;

+ 46 - 39
pages/money/withdmoenys.vue

@@ -3,8 +3,8 @@
 		<view class="content-money">
 			<view class="flex" v-if="type == 'xl'">
 				<view class="buttom">
-					<view class="icon">{{ userInfo.integral | getMoneyStyle }}</view>
-					<text class="text">可用响亮积分</text>
+					<view class="icon">{{ userInfo.business_integral | getMoneyStyle }}</view>
+					<text class="text">可用喜嗨积分</text>
 				</view>
 			</view>
 			<view class="flex" v-if="type == 'yue'">
@@ -13,28 +13,28 @@
 					<text class="text">可用余额</text>
 				</view>
 			</view>
-			<view class="flex" v-if="type == 'cash'">
+			<!-- <view class="flex" v-if="type == 'cash'">
 				<view class="buttom">
 					<view class="icon">{{ userInfo.cash | getMoneyStyle }}</view>
 					<text class="text">可用现金</text>
 				</view>
-			</view>
+			</view> -->
 		</view>
 		<view class="row-box">
-			<view class="title">收款人手机号</view>
-			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人手机号" placeholder-class="placeholder" /></view>
+			<view class="title">收款人ID</view>
+			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人ID" placeholder-class="placeholder" /></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" v-if="type == 'xl'" @click="withdrawal = userInfo.integral">全部转账</view>
+				<view class="buttom" v-if="type == 'xl'" @click="withdrawal = userInfo.business_integral">全部转账</view>
 				<view class="buttom" v-if="type == 'yue'" @click="withdrawal = userInfo.now_money">全部转账</view>
 				<view class="buttom" v-if="type == 'cash'" @click="withdrawal = userInfo.cash">全部转账</view>
 			</view>
 		</view>
-		<view class="tip" v-if="withdrawal != 0 && type == 'xl'">实际转入{{ realmoney }}响亮积分,{{ gy }}响亮积分流入公益池</view>
+		<!-- <view class="tip" v-if="withdrawal != 0 && type == 'xl'">实际转入{{ realmoney }}响亮积分,{{ gy }}响亮积分流入公益池</view> -->
 
 		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">提交申请</button>
 	</view>
@@ -42,7 +42,7 @@
 
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { getUserInfo, transfer, yuetransfer, cashtransfer } from '@/api/user.js';
+import { getUserInfo, transfer, yuetransfer, cashtransfer,yueXhg } from '@/api/user.js';
 import { mapMutations, mapState } from 'vuex';
 export default {
 	filters: {
@@ -97,9 +97,9 @@ export default {
 				});
 		},
 		// 切换选中对象
-		tabRadio(e) {
-			this.type = e.detail.value;
-		},
+		// tabRadio(e) {
+		// 	this.type = e.detail.value;
+		// },
 		// 提交
 		confirm() {
 			let obj = this;
@@ -108,7 +108,7 @@ export default {
 				obj.loding = false;
 				uni.showModal({
 					title: '提示',
-					content: '转账金额不为0'
+					content: '转账金额不为0'
 				});
 				return;
 			}
@@ -119,13 +119,15 @@ export default {
 					content: '不要输入自己的用户账号'
 				});
 			} else {
-				let data = {
-					to_user_account: obj.card, //编号
-					num: obj.withdrawal //金额
-				};
+			console.log(obj.type,'type');
 				if (obj.type == 'xl') {
-					transfer(data)
+					yueXhg({
+					phone: obj.card, //编号
+					money: obj.withdrawal ,//金额
+					type:2
+				})
 						.then(e => {
+							console.log('输入了');
 							// 允许按钮点击
 							obj.loding = false;
 							// 初始化提现金额
@@ -144,28 +146,13 @@ export default {
 						});
 				}
 				if (obj.type == 'yue') {
-					yuetransfer(data)
-						.then(e => {
-							// 允许按钮点击
-							obj.loding = false;
-							// 初始化提现金额
-							obj.withdrawal = '';
-							uni.showToast({
-								title: '提交成功',
-								duration: 2000,
-								position: 'top'
-							});
-							obj.dataUp();
-						})
-						.catch(e => {
-							obj.$api.msg(e.msg);
-							obj.loding = false;
-							console.log();
-						});
-				}
-				if (obj.type == 'cash') {
-					cashtransfer(data)
+					yueXhg({
+					phone: obj.card, //编号
+					money: obj.withdrawal ,//金额
+					type:1
+				})
 						.then(e => {
+							console.log('输入了');
 							// 允许按钮点击
 							obj.loding = false;
 							// 初始化提现金额
@@ -183,6 +170,26 @@ export default {
 							console.log();
 						});
 				}
+				// if (obj.type == 'cash') {
+				// 	cashtransfer(data)
+				// 		.then(e => {
+				// 			// 允许按钮点击
+				// 			obj.loding = false;
+				// 			// 初始化提现金额
+				// 			obj.withdrawal = '';
+				// 			uni.showToast({
+				// 				title: '提交成功',
+				// 				duration: 2000,
+				// 				position: 'top'
+				// 			});
+				// 			obj.dataUp();
+				// 		})
+				// 		.catch(e => {
+				// 			obj.$api.msg(e.msg);
+				// 			obj.loding = false;
+				// 			console.log();
+				// 		});
+				// }
 			}
 		}
 	}

+ 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>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 173
pages/order/createOrder.vue


+ 1 - 1
pages/order/order.vue

@@ -58,7 +58,7 @@
 							<button v-if="item._status._title == '未支付'" @click.stop="orderPay(item)" class="action-btn recom">立即支付</button>
 							<button v-if="item._status._title == '待评价'" class="action-btn">评价</button>
 							<button v-if="item._status._title == '待收货'" @click.stop="orderTake(item, index)" class="action-btn">确认收货</button>
-							<button v-if="item._status._title == '未发货' && item.is_gift != 1" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
+							<!-- <button v-if="item._status._title == '未发货' && item.is_gift != 1" class="action-btn" @click.stop="orderRefund(item)">申请退款</button> -->
 						</view>
 					</view>
 

+ 447 - 620
pages/product/list.vue

@@ -1,621 +1,448 @@
-<template>
-	<view class="content">
-		<view class="navbar" :style="{ position: headerPosition, top: headerTop }">
-			<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">综合排序</view>
-			<view class="nav-item" :class="{ current: filterIndex === 1 }" @click="tabClick(1)">
-				<text>销量优先</text>
-				<view class="p-box">
-					<text :class="{ active: numberOrder === 1 && filterIndex === 1 }" class="iconfont iconfold"></text>
-					<text :class="{ active: numberOrder === 2 && filterIndex === 1 }" class="iconfont iconfold xia"></text>
-				</view>
-			</view>
-			<view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
-				<text>价格</text>
-				<view class="p-box">
-					<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="iconfont iconfold"></text>
-					<text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="iconfont iconfold xia"></text>
-				</view>
-			</view>
-			<text class="cate-item iconfont iconapps" @click="toggleCateMask('show')"></text>
-		</view>
-		<view class="goods-list">
-			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
-				<view class="image-wrapper">
-					<image :src="item.image" mode="aspectFill"></image>
-					<view class="fanli" v-if="item.give_integral != 0">
-						<view class="fanli-bg"><image src="../../static/img/index-fanl.png" mode=""></image></view>
-						<view class="fanli-font flex">
-							<view class="font-left">获得响亮积分</view>
-							<view class="font-right">{{ item.give_integral * 1 }}</view>
-						</view>
-					</view>
-				</view>
-				<text class="title clamp">{{ item.store_name }}</text>
-				<view class="price-box">
-					<text class="price">{{ item.price }}</text>
-					<text>已售 {{ item.sales }}</text>
-				</view>
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
-
-		<view class="cate-mask" :class="cateMaskState === 0 ? 'none' : cateMaskState === 1 ? 'show' : ''" @click="toggleCateMask">
-			<view class="cate-content">
-				<scroll-view scroll-y class="left-aside">
-					<view v-for="item in cateList" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click.stop="tabtap(item)">{{ item.cate_name }}</view>
-				</scroll-view>
-				<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
-					<view v-for="item in cateList" :key="item.id" class="s-list" :id="'main-' + item.id">
-						<text class="s-item">{{ item.cate_name }}</text>
-						<view class="t-list ">
-							<view @click.stop="changeCate(titem)" class="t-item" v-for="titem in item.children" :key="titem.id">
-								<image :src="titem.pic"></image>
-								<text>{{ titem.cate_name }}</text>
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-			</view>
-			<!-- <view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
-				<scroll-view scroll-y class="cate-list">
-					<view v-for="item in cateList" :key="item.id">
-						<view class="cate-item b-b two">{{ item.cate_name }}</view>
-						<view v-for="tItem in item.children" :key="tItem.id" class="cate-item b-b" :class="{ active: tItem.id == cateId }" @click="changeCate(tItem)">
-							{{ tItem.cate_name }}
-						</view>
-					</view>
-				</scroll-view>
-			</view> -->
-		</view>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getProducts } from '@/api/product.js';
-import { getCategoryList } from '@/api/product.js';
-export default {
-	components: {
-		uniLoadMore
-	},
-	data() {
-		return {
-			currentId: '',
-			tabScrollTop: 0,
-			cateMaskState: 0, //分类面板展开状态
-			headerPosition: 'fixed',
-			headerTop: '0px',
-			loadingType: 'more', //加载更多状态
-			filterIndex: 0, //查询类型
-			numberOrder: 0, //1 销量从低到高 2销量从高到低
-			limit: 6, //每次加载数据条数
-			page: 1, //当前页数
-			cateId: 0, //已选三级分类id
-			priceOrder: 0, //1 价格从低到高 2价格从高到低
-			cateList: [], //分类列表
-			goodsList: [] //商品列表
-		};
-	},
-
-	onLoad(options) {
-		// #ifdef H5
-		// this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
-		// #endif
-		this.cateId = options.tid;
-		this.loadCateList(options.fid, options.sid);
-		this.loadData();
-	},
-	onPageScroll(e) {
-		//兼容iOS端下拉时顶部漂移
-		if (e.scrollTop >= 0) {
-			this.headerPosition = 'fixed';
-		} else {
-			this.headerPosition = 'absolute';
-		}
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData('refresh');
-	},
-	//监听页面是否滚动到底部加载更多
-	onReachBottom() {
-		this.loadData();
-	},
-	methods: {
-		//加载分类
-		async loadCateList(fid, sid) {
-			let obj = this;
-			getCategoryList({}).then(function(e) {
-				obj.cateList = e.data.filter(e => {
-					return e.id != 1;
-				});
-				obj.currentId = obj.cateList[0].id
-				console.log(obj.cateList, '123456789');
-			});
-		},
-		//一级分类点击
-		tabtap(item) {
-			console.log(item);
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			// 获取当前点击的id
-			this.currentId = item.id;
-			console.log(item.top);
-			this.tabScrollTop = item.top;
-			console.log(this.tabScrollTop);
-		},
-		//右侧栏滚动
-		asideScroll(e) {
-			// 判断有没有初始化页面高度对象数据
-			if (!this.sizeCalcState) {
-				this.calcSize();
-			}
-			let scrollTop = e.detail.scrollTop;
-			let box = 0; //列表包裹框高度初始化
-			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
-			// 查询当前页面对象
-			let view = uni.createSelectorQuery().select('.content');
-			view.fields(
-				{
-					id: true,
-					dataset: true,
-					rect: true,
-					size: true,
-					scrollOffset: true
-				},
-				function(e) {
-					// 保存包裹框高度
-					box = e.height;
-				}
-			).exec();
-			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
-			let tabs = this.cateList.filter(item =>( item.top-10) <= scrollTop).reverse();
-			if (tabs.length > 0) {
-				// 判断是否已经到达滚轮底部
-				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
-					this.currentId = this.cateList[this.cateList.length - 1].id;
-				} else {
-					this.currentId = tabs[0].id;
-				}
-			}
-		},
-		//计算右侧栏每个tab的高度等信息
-		calcSize() {
-			let h = 0;
-			this.cateList.forEach(item => {
-				let view = uni.createSelectorQuery().select('#main-' + item.id);
-				view.fields(
-					{
-						size: true
-					},
-					data => {
-						item.top = h;
-						h += data.height;
-						item.bottom = h;
-					}
-				).exec();
-			});
-			this.sizeCalcState = true;
-		},
-		//加载商品 ,带下拉刷新和上滑加载
-		async loadData(type = 'add', loading) {
-			let obj = this;
-			let data = {
-				page: obj.page,
-				limit: obj.limit,
-				sid: obj.cateId //分类id
-			};
-			//没有更多直接返回
-			if (type === 'add') {
-				if (obj.loadingType === 'nomore') {
-					return;
-				}
-				obj.loadingType = 'loading';
-			} else {
-				obj.loadingType = 'more';
-			}
-			if (type === 'refresh') {
-				// 清空数组
-				obj.goodsList = [];
-				obj.page = 1;
-			}
-			if (this.filterIndex == 1) {
-				console.log(obj.salesOrder);
-				data.salesOrder = obj.numberOrder == 1 ? 'asc' : 'desc';
-			}
-			if (this.filterIndex == 2) {
-				console.log(obj.priceOrder);
-				data.priceOrder = obj.priceOrder == 1 ? 'asc' : 'desc';
-			}
-			getProducts(data).then(function(e) {
-				console.log(e.data);
-				let arr = e.data.filter(info => {
-					return info.cate_id != 2;
-				});
-				obj.goodsList = obj.goodsList.concat(arr);
-				//判断是否还有下一页,有是more  没有是nomore
-				if (obj.limit == e.data.length) {
-					obj.page++;
-					obj.loadingType = 'more';
-				} else {
-					obj.loadingType = 'nomore';
-				}
-				if (type === 'refresh') {
-					if (loading == 1) {
-						uni.hideLoading();
-					} else {
-						uni.stopPullDownRefresh();
-					}
-				}
-			});
-		},
-		//筛选点击
-		tabClick(index) {
-			// 防止重复点击综合排序
-			if (this.filterIndex === 0 && this.filterIndex === index) {
-				return;
-			}
-			this.filterIndex = index;
-			// 判断是否为销量优先
-			if (index === 1) {
-				this.numberOrder = this.numberOrder === 1 ? 2 : 1;
-			}
-			// 判断是否为价格优先
-			if (index === 2) {
-				this.priceOrder = this.priceOrder === 1 ? 2 : 1;
-			}
-			// 初始化页数
-			this.page = 1;
-			// 初始化数组
-			uni.pageScrollTo({
-				duration: 300,
-				scrollTop: 0
-			});
-			this.loadData('refresh', 1);
-			uni.showLoading({
-				title: '正在加载'
-			});
-		},
-		//显示分类面板
-		toggleCateMask(type) {
-			let timer = type === 'show' ? 10 : 300;
-			let state = type === 'show' ? 1 : 0;
-			this.cateMaskState = 2;
-			setTimeout(() => {
-				this.cateMaskState = state;
-			}, timer);
-		},
-		//分类点击
-		changeCate(item) {
-			this.cateId = item.id;
-			// 显示右侧分类
-			this.toggleCateMask();
-			// 滚轮返回顶部
-			uni.pageScrollTo({
-				duration: 300,
-				scrollTop: 0
-			});
-			// 初始化查询页数
-			this.page = 1;
-			// 重新加载数据
-			this.loadData('refresh', 1);
-			uni.showLoading({
-				title: '正在加载'
-			});
-		},
-		//详情
-		navToDetailPage(item) {
-			let id = item.id;
-			uni.navigateTo({
-				url: `/pages/product/product?id=${id}`
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-}
-.content {
-	padding-top: 96rpx;
-}
-
-.navbar {
-	position: fixed;
-	left: 0;
-	top: var(--window-top);
-	display: flex;
-	width: 100%;
-	height: 80rpx;
-	background: #fff;
-	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 30rpx;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: #ff4c4c;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 150rpx;
-				height: 0;
-				border-bottom: 4rpx solid #ff4c4c;
-			}
-		}
-	}
-	.p-box {
-		display: flex;
-		flex-direction: column;
-		.iconfont {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 30rpx;
-			height: 14rpx;
-			line-height: 1;
-			margin-left: 4rpx;
-			font-size: 26rpx;
-			color: #888;
-			&.active {
-				color: $base-color;
-			}
-		}
-		.xia {
-			transform: scaleY(-1);
-		}
-	}
-	.cate-item {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		width: 80rpx;
-		position: relative;
-		font-size: 44rpx;
-		&:after {
-			content: '';
-			position: absolute;
-			left: 0;
-			top: 50%;
-			transform: translateY(-50%);
-			border-left: 1px solid #ddd;
-			width: 0;
-			height: 36rpx;
-		}
-	}
-}
-
-/* 分类 */
-.cate-mask {
-	position: fixed;
-	left: 0;
-	top: var(--window-top);
-	bottom: 0;
-	width: 100%;
-	background: rgba(0, 0, 0, 0);
-	z-index: 95;
-	transition: 0.3s;
-
-	.cate-content {
-		width: 630rpx;
-		height: 100%;
-		background: #fff;
-		float: right;
-		transform: translateX(100%);
-		transition: 0.3s;
-		display: flex;
-		.left-aside {
-			flex-shrink: 0;
-			width: 200rpx;
-			height: 100%;
-			background-color: #fff;
-		}
-		.f-item {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 100%;
-			height: 100rpx;
-			font-size: 28rpx;
-			color: $font-color-base;
-			position: relative;
-			&.active {
-				color: $base-color;
-				background: #f8f8f8;
-				&:before {
-					content: '';
-					position: absolute;
-					left: 0;
-					top: 50%;
-					transform: translateY(-50%);
-					height: 36rpx;
-					width: 8rpx;
-					background-color: $base-color;
-					border-radius: 0 4px 4px 0;
-					opacity: 0.8;
-				}
-			}
-		}
-		
-		.right-aside {
-			flex: 1;
-			overflow: hidden;
-			padding-left: 20rpx;
-			padding-right: 20rpx;
-		}
-		.s-item {
-			display: flex;
-			align-items: center;
-			height: 70rpx;
-			padding-top: 8rpx;
-			font-size: 28rpx;
-			color: $font-color-dark;
-		}
-		.t-list {
-			display: flex;
-			flex-wrap: wrap;
-			border-radius: 15rpx;
-			width: 100%;
-			background: #fff;
-			padding-top: 12rpx;
-			&:after {
-				content: '';
-				flex: 99;
-				height: 0;
-			}
-		}
-		.t-item {
-			flex-shrink: 0;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-			flex-direction: column;
-			width: 171rpx;
-			font-size: 26rpx;
-			color: #666;
-			padding-bottom: 20rpx;
-		
-			image {
-				width: 140rpx;
-				height: 140rpx;
-			}
-		}
-	}
-	&.none {
-		display: none;
-	}
-	&.show {
-		background: rgba(0, 0, 0, 0.4);
-
-		.cate-content {
-			transform: translateX(0);
-		}
-	}
-}
-.cate-list {
-	display: flex;
-	flex-direction: column;
-	height: 100%;
-	.cate-item {
-		display: flex;
-		align-items: center;
-		height: 90rpx;
-		padding-left: 30rpx;
-		font-size: 28rpx;
-		color: #555;
-		position: relative;
-	}
-	.two {
-		height: 64rpx;
-		color: #303133;
-		font-size: 30rpx;
-		background: #f8f8f8;
-	}
-	.active {
-		color: $base-color;
-	}
-}
-
-/* 商品列表 */
-.goods-list {
-	display: flex;
-	flex-wrap: wrap;
-	padding: 0 30rpx;
-	background: #fff;
-	.goods-item {
-		display: flex;
-		flex-direction: column;
-		width: 48%;
-		padding-bottom: 40rpx;
-		&:nth-child(2n + 1) {
-			margin-right: 4%;
-		}
-	}
-	.image-wrapper {
-		width: 100%;
-		height: 330rpx;
-		border-radius: 3px;
-		overflow: hidden;
-		position: relative;
-		image {
-			width: 100%;
-			height: 100%;
-			opacity: 1;
-		}
-		.fanli {
-			position: absolute;
-			bottom: 0;
-			left: 0;
-			width: 344rpx;
-			height: 96rpx;
-			.fanli-bg {
-				position: absolute;
-				bottom: 0;
-				left: 0;
-				width: 344rpx;
-				height: 96rpx;
-			}
-			.fanli-font {
-				position: relative;
-				z-index: 10;
-				color: #ffffff;
-				height: 96rpx;
-				align-items: flex-end;
-				padding: 36rpx 10rpx 10rpx;
-				.font-left {
-					width: 226rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #ffffff;
-				}
-				.font-right {
-					width: 118rpx;
-					text-align: center;
-					font-size: 36rpx;
-					font-family: Microsoft YaHei;
-					font-weight: bold;
-					color: #ffffff;
-				}
-			}
-		}
-	}
-	.title {
-		font-size: $font-lg;
-		color: $font-color-dark;
-		line-height: 80rpx;
-	}
-	.price-box {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		padding-right: 10rpx;
-		font-size: 24rpx;
-		color: $font-color-light;
-	}
-	.price {
-		font-size: $font-lg;
-		color: #ff4c4c;
-		line-height: 1;
-		&:before {
-			content: '¥';
-			font-size: 26rpx;
-		}
-	}
-}
+<template>
+	<view class="content">
+		<view class="navbar" :style="{ position: headerPosition, top: headerTop }">
+			<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">综合排序</view>
+			<view class="nav-item" :class="{ current: filterIndex === 1 }" @click="tabClick(1)">
+				<text>销量优先</text>
+				<view class="p-box">
+					<text :class="{ active: numberOrder === 1 && filterIndex === 1 }" class="iconfont iconfold"></text>
+					<text :class="{ active: numberOrder === 2 && filterIndex === 1 }"
+						class="iconfont iconfold xia"></text>
+				</view>
+			</view>
+			<view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
+				<text>价格</text>
+				<view class="p-box">
+					<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="iconfont iconfold"></text>
+					<text :class="{ active: priceOrder === 2 && filterIndex === 2 }"
+						class="iconfont iconfold xia"></text>
+				</view>
+			</view>
+			<text class="cate-item iconfont iconapps" @click="toggleCateMask('show')"></text>
+		</view>
+		<view class="goods-list">
+			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
+				<view class="image-wrapper">
+					<image :src="item.image" mode="aspectFill"></image>
+				</view>
+				<text class="title clamp">{{ item.title }}</text>
+				<view class="price-box">
+					<text class="price">{{ item.price }}</text>
+					<text>已售 {{ item.sales }}</text>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+
+		<view class="cate-mask" :class="cateMaskState === 0 ? 'none' : cateMaskState === 1 ? 'show' : ''"
+			@click="toggleCateMask">
+			<view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
+				<scroll-view scroll-y class="cate-list">
+					<view v-for="item in cateList" :key="item.id">
+						<view class="cate-item b-b two">{{ item.cate_name }}</view>
+						<view v-for="tItem in item.children" :key="tItem.id" class="cate-item b-b"
+							:class="{ active: tItem.id == cateId }" @click="changeCate(tItem)">
+							{{ tItem.cate_name }}
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import {
+		getProducts
+	} from '@/api/product.js';
+	import {
+		getCategoryList
+	} from '@/api/product.js';
+	export default {
+		components: {
+			uniLoadMore
+		},
+		data() {
+			return {
+				cateMaskState: 0, //分类面板展开状态
+				headerPosition: 'fixed',
+				headerTop: '0px',
+				loadingType: 'more', //加载更多状态
+				filterIndex: 0, //查询类型
+				numberOrder: 0, //1 销量从低到高 2销量从高到低
+				limit: 6, //每次加载数据条数
+				page: 0, //当前页数
+				cateId: 0, //已选三级分类id
+				priceOrder: 0, //1 价格从低到高 2价格从高到低
+				cateList: [], //分类列表
+				goodsList: [] //商品列表
+			};
+		},
+
+		onLoad(options) {
+			// #ifdef H5
+			this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
+			// #endif
+			this.cateId = options.tid;
+			this.loadCateList(options.fid, options.sid);
+			this.loadData();
+		},
+		onPageScroll(e) {
+			//兼容iOS端下拉时顶部漂移
+			if (e.scrollTop >= 0) {
+				this.headerPosition = 'fixed';
+			} else {
+				this.headerPosition = 'absolute';
+			}
+		},
+		//下拉刷新
+		onPullDownRefresh() {
+			this.loadData('refresh');
+		},
+		//监听页面是否滚动到底部加载更多
+		onReachBottom() {
+			this.loadData();
+		},
+		methods: {
+			//加载分类
+			async loadCateList(fid, sid) {
+				let obj = this;
+				getCategoryList({}).then(function(e) {
+					console.log(e);
+					e.data.forEach(function(e) {
+						if (e.id == fid) {
+							obj.cateList = e.children;
+							return;
+						}
+					});
+					console.log(obj.cateList);
+				});
+			},
+			//加载商品 ,带下拉刷新和上滑加载
+			async loadData(type = 'add', loading) {
+				let obj = this;
+				let data = {
+					page: obj.page,
+					limit: obj.limit,
+					sid: obj.cateId //分类id
+				};
+				//没有更多直接返回
+				if (type === 'add') {
+					if (obj.loadingType === 'nomore') {
+						return;
+					}
+					obj.loadingType = 'loading';
+				} else {
+					obj.loadingType = 'more';
+				}
+				if (type === 'refresh') {
+					// 清空数组
+					obj.goodsList = [];
+					obj.page = 1
+				}
+				if (this.filterIndex == 1) {
+					console.log(obj.salesOrder);
+					data.salesOrder = obj.numberOrder == 1 ? 'asc' : 'desc';
+				}
+				if (this.filterIndex == 2) {
+					console.log(obj.priceOrder);
+					data.priceOrder = obj.priceOrder == 1 ? 'asc' : 'desc';
+				}
+				getProducts(data).then(function(e) {
+					console.log(e.data);
+					obj.goodsList = obj.goodsList.concat(e.data);
+					//判断是否还有下一页,有是more  没有是nomore
+					if (obj.limit == e.data.length) {
+						obj.page++
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'nomore'
+					}
+					if (type === 'refresh') {
+						if (loading == 1) {
+							uni.hideLoading();
+						} else {
+							uni.stopPullDownRefresh();
+						}
+					}
+				});
+			},
+			//筛选点击
+			tabClick(index) {
+				// 防止重复点击综合排序
+				if (this.filterIndex === 0 && this.filterIndex === index) {
+					return;
+				}
+				this.filterIndex = index;
+				// 判断是否为销量优先
+				if (index === 1) {
+					this.numberOrder = this.numberOrder === 1 ? 2 : 1;
+				}
+				// 判断是否为价格优先
+				if (index === 2) {
+					this.priceOrder = this.priceOrder === 1 ? 2 : 1;
+				}
+				// 初始化页数
+				this.page = 1;
+				// 初始化数组
+				uni.pageScrollTo({
+					duration: 300,
+					scrollTop: 0
+				});
+				this.loadData('refresh', 1);
+				uni.showLoading({
+					title: '正在加载'
+				});
+			},
+			//显示分类面板
+			toggleCateMask(type) {
+				let timer = type === 'show' ? 10 : 300;
+				let state = type === 'show' ? 1 : 0;
+				this.cateMaskState = 2;
+				setTimeout(() => {
+					this.cateMaskState = state;
+				}, timer);
+			},
+			//分类点击
+			changeCate(item) {
+				this.cateId = item.id;
+				// 显示右侧分类
+				this.toggleCateMask();
+				// 滚轮返回顶部
+				uni.pageScrollTo({
+					duration: 300,
+					scrollTop: 0
+				});
+				// 初始化查询页数
+				this.page = 1
+				// 重新加载数据
+				this.loadData('refresh', 1);
+				uni.showLoading({
+					title: '正在加载'
+				});
+			},
+			//详情
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: `/pages/product/product?id=${id}`
+				});
+			},
+			stopPrevent() {}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: $page-color-base;
+	}
+
+	.content {
+		padding-top: 96rpx;
+	}
+
+	.navbar {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		display: flex;
+		width: 100%;
+		height: 80rpx;
+		background: #fff;
+		box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 30rpx;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 120rpx;
+					height: 0;
+					border-bottom: 4rpx solid $base-color;
+				}
+			}
+		}
+
+		.p-box {
+			display: flex;
+			flex-direction: column;
+
+			.iconfont {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 30rpx;
+				height: 14rpx;
+				line-height: 1;
+				margin-left: 4rpx;
+				font-size: 26rpx;
+				color: #888;
+
+				&.active {
+					color: $base-color;
+				}
+			}
+
+			.xia {
+				transform: scaleY(-1);
+			}
+		}
+
+		.cate-item {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			width: 80rpx;
+			position: relative;
+			font-size: 44rpx;
+
+			&:after {
+				content: '';
+				position: absolute;
+				left: 0;
+				top: 50%;
+				transform: translateY(-50%);
+				border-left: 1px solid #ddd;
+				width: 0;
+				height: 36rpx;
+			}
+		}
+	}
+
+	/* 分类 */
+	.cate-mask {
+		position: fixed;
+		left: 0;
+		top: var(--window-top);
+		bottom: 0;
+		width: 100%;
+		background: rgba(0, 0, 0, 0);
+		z-index: 95;
+		transition: 0.3s;
+
+		.cate-content {
+			width: 630rpx;
+			height: 100%;
+			background: #fff;
+			float: right;
+			transform: translateX(100%);
+			transition: 0.3s;
+		}
+
+		&.none {
+			display: none;
+		}
+
+		&.show {
+			background: rgba(0, 0, 0, 0.4);
+
+			.cate-content {
+				transform: translateX(0);
+			}
+		}
+	}
+
+	.cate-list {
+		display: flex;
+		flex-direction: column;
+		height: 100%;
+	
+	.cate-item {
+			display: flex;
+			align-items: center;
+			height: 90rpx;
+			padding-left: 30rpx;
+			font-size: 28rpx;
+			color: #555;
+			position: relative;
+		}
+
+		.two {
+			height: 64rpx;
+			color: #303133;
+			font-size: 30rpx;
+			background: #f8f8f8;
+		}
+
+		.active {
+			color: $base-color;
+		}
+	}
+
+	/* 商品列表 */
+	.goods-list {
+		display: flex;
+		flex-wrap: wrap;
+		padding: 0 30rpx;
+		background: #fff;
+
+		.goods-item {
+			display: flex;
+			flex-direction: column;
+			width: 48%;
+			padding-bottom: 40rpx;
+
+			&:nth-child(2n + 1) {
+				margin-right: 4%;
+			}
+		}
+
+		.image-wrapper {
+			width: 100%;
+			height: 330rpx;
+			border-radius: 3px;
+			overflow: hidden;
+
+			image {
+				width: 100%;
+				height: 100%;
+				opacity: 1;
+			}
+		}
+
+		.title {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			line-height: 80rpx;
+		}
+
+		.price-box {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding-right: 10rpx;
+			font-size: 24rpx;
+			color: $font-color-light;
+		}
+
+		.price {
+			font-size: $font-lg;
+			color: $uni-color-primary;
+			line-height: 1;
+
+			&:before {
+				content: '¥';
+				font-size: 26rpx;
+			}
+		}
+	}
 </style>

+ 808 - 784
pages/product/product.vue

@@ -1,785 +1,809 @@
-<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.white_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;
+					console.log(obj.goodsObjact,'obj.goodsObjact');
+					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>

+ 341 - 288
pages/public/login.vue

@@ -6,239 +6,271 @@
 		<view class="loginTitle"><text>登录</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img03.png"></image></view>
-				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" /></view>
+				<view class="login_img">
+					<image src="/static/icon/img03.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" />
+				</view>
 			</view>
 			<view class="login_input flex">
-				<view class="login_img"><image src="/static/icon/img04.png"></image></view>
-				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" /></view>
+				<view class="login_img">
+					<image src="/static/icon/img04.png"></image>
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="passward" focus
+						placeholder="请输入密码" /></view>
 			</view>
 			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">登录</button></view>
-			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true" hover-class="none" @click="register">注册</button></view>
-			<navigator url="./forget"><view class="forget">忘记密码</view></navigator>
+			<view><button type="green" class="uni-button uni-button-green uni-button-green-plain" plain="true"
+					hover-class="none" @click="register">注册</button></view>
+			<navigator url="./forget">
+				<view class="forget">忘记密码</view>
+			</navigator>
 			<view class="flex other">
 				<view class="fenge"></view>
 				<view class="qita">其他方式登录</view>
 				<view class="fenge"></view>
 			</view>
 			<!-- #ifndef APP-PLUS -->
-					<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png"></image></view>
-					<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-					<!-- #endif -->
-					<!-- #ifdef APP-PLUS -->
-					<block v-if="!is_ios">
-						<view class="weixin" @click="wecahtLogin"><image src="/static/img/img05.png" mode="scaleToFill"></image></view>
-						<view class="weixin_text" @click="wecahtLogin">微信登录</view>
-					</block>
-					<block v-else>
-						<view class="ios_login flex" @click="wecahtLogin('weixin')">
-							<text class="iconfont iconweixin"></text>
-							<text class="weixin_text">微信登录</text>
-						</view>
-						<view v-if='is_apple_login' class="ios_login flex" @click="wecahtLogin('apple')">
-							<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
-							<text class="weixin_text">通过Apple登录</text>
-						</view>
-					</block>
-					<!-- #endif -->
-				</view>
+			<view class="weixin" @click="wecahtLogin">
+				<image src="/static/img/img05.png"></image>
 			</view>
+			<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+			<!-- #endif -->
+			<!-- #ifdef APP-PLUS -->
+			<block v-if="!is_ios">
+				<view class="weixin" @click="wecahtLogin('weixin')">
+					<image src="/static/img/img05.png" mode="scaleToFill"></image>
+				</view>
+				<view class="weixin_text" @click="wecahtLogin('weixin')">微信登录</view>
+			</block>
+			<block v-else>
+				<view class="ios_login flex" @click="wecahtLogin('weixin')">
+					<text class="iconfont iconweixin"></text>
+					<text class="weixin_text">微信登录</text>
+				</view>
+				<view v-if='is_apple_login' class="ios_login flex" @click="wecahtLogin('apple')">
+					<image class="loginIcon" src="/static/icon/appleIcon.png" mode=" scaleToFill"></image>
+					<text class="weixin_text">通过Apple登录</text>
+				</view>
+			</block>
+			<!-- #endif -->
+		</view>
+	</view>
 </template>
 
 <script>
-import { mapMutations } from 'vuex';
-import { login} from '@/api/login.js';
-import { getUserInfo} from '@/api/user.js';
-// #ifdef APP-PLUS
-// applelogin接口需要开发编写,基础项目中可能没有
-import { applelogin } from '@/api/set.js';
-// loginWx接口需要开发编写,基础项目中可能没有
-import { loginWx } from '@/api/login.js';
-// #endif
-// #ifdef H5
-import { loginWinxin } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	data() {
-		return {
-			username: '',
-			passward: '',
-			// #ifdef APP-PLUS
-			is_ios: false ,//判断是否为ios手机
-			is_apple_login:false,//是否有ios授权登录功能
-			// #endif
-		};
-	},
-	onLoad() {
-		let obj = this;
-		// #ifdef APP-PLUS
-		let system = uni.getStorageSync('platform');
-		// 判断是否为ios
-		if (system == 'ios') {
-			obj.is_ios = true;
-		}
-		uni.getSystemInfo({
-			success(e) {
-				if(+e.system.split('.')[0]>=13){
-					obj.is_apple_login=true;
-				}
-			}
-		})
-		// #endif
-	},
-	methods: {
-		...mapMutations('user', ['setUserInfo', 'login']),
-		// 微信登录
-		wecahtLogin(type) {
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		login
+	} from '@/api/login.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	// #ifdef APP-PLUS
+	// applelogin接口需要开发编写,基础项目中可能没有
+	import {
+		applelogin
+	} from '@/api/set.js';
+	// loginWx接口需要开发编写,基础项目中可能没有
+	import {
+		loginWx
+	} from '@/api/login.js';
+	// #endif
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	export default {
+		data() {
+			return {
+				username: '',
+				passward: '',
+				// #ifdef APP-PLUS
+				is_ios: false, //判断是否为ios手机
+				is_apple_login: false, //是否有ios授权登录功能
+				// #endif
+			};
+		},
+		onLoad() {
 			let obj = this;
-			// #ifdef H5
-			let weichatBrowser = uni.getStorageSync('weichatBrowser');
-			if (weichatBrowser) {
-				loginWinxin();
-			}
-			// #endif
 			// #ifdef APP-PLUS
-			uni.login({
-				provider: type,
+			let system = uni.getStorageSync('platform');
+			// 判断是否为ios
+			if (system == 'ios') {
+				obj.is_ios = true;
+			}
+			uni.getSystemInfo({
 				success(e) {
-					uni.getUserInfo({
-						provider: type,
-						success(es) {
-							if(type==='weixin'){
-								loginWx(es.userInfo)
-									.then(e => {
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
+					if (+e.system.split('.')[0] >= 13) {
+						obj.is_apple_login = true;
+					}
+				}
+			})
+			// #endif
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			// 微信登录
+			wecahtLogin(type) {
+				console.log(type,'123456');
+				let obj = this;
+				// #ifdef H5
+				let weichatBrowser = uni.getStorageSync('weichatBrowser');
+				if (weichatBrowser) {
+					loginWinxin();
+				}
+				// #endif
+				// #ifdef APP-PLUS
+				uni.login({
+					provider: type,
+					success(e) {
+						uni.getUserInfo({
+							provider: type,
+							success(es) {
+								if (type === 'weixin') {
+								console.log(es,'123456789');
+									loginWx(es.userInfo)
+										.then(e => {
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+												//成功跳转首页
+												uni.switchTab({
+													url: '/pages/index/index'
+												});
 											});
-										});
-									})
-									.catch(e => {
-										console.log(e);
-										uni.showModal({
-											content: JSON.stringify(e),
-											success() {},
-											fail() {}
-										});
-									});
-							}
-							if(type==='apple'){
-								console.log(es.userInfo);
-								applelogin({
-									account: es.userInfo.openId,
-								})
-									.then(function(e) {
-										console.log(e,'token')
-										uni.setStorageSync('token', e.data.token);
-										getUserInfo({}).then(e => {
-											obj.login();
-											// 保存返回用户数据
-											obj.setUserInfo(e.data);
-											//成功跳转首页
-											uni.switchTab({
-												url: '/pages/index/index'
+										})
+										.catch(e => {
+											console.log(e);
+											uni.showModal({
+												content: JSON.stringify(e),
+												success() {},
+												fail() {}
 											});
 										});
-										
-									})
-									.catch(function(e) {
-										console.log(e);
-									});
-							}
-							
-						},
-						fail(es) {
-							uni.showModal({
-								content: JSON.stringify(es),
-								success() {
-									// obj.login();
-									// // 保存返回用户数据
-									// obj.setUserInfo(e.data);
-									// //成功跳转首页
-									// uni.switchTab({
-									// 	url: '/pages/index/index'
-									// });
 								}
-							});
-						}
-					});
-				},
-				fail(e) {
-					uni.showModal({
-						title: '提示',
-						content: JSON.stringify(e),
-						showCancel: false
-					});
-				}
-			});
-			// #endif
-		},
-		//登录
-		async toLogin() {
-			let obj = this;
-			obj.logining = true;
-			if (obj.username == '') {
-				obj.$api.msg('请输入手机号');
-				return;
-			}
-			if (obj.passward == '') {
-				obj.$api.msg('请输入密码');
-				return;
-			}
-			login({
-				account: obj.username,
-				password: obj.passward
-			})
-				.then(function(e) {
-					uni.setStorageSync('token', e.data.token);
-					obj.$store.commit('hasLogin', true);
-					getUserInfo({}).then(e => {
-						obj.login();
-						// 保存返回用户数据
-						obj.setUserInfo(e.data);
-						let ur = uni.getStorageSync('present')|| '/pages/index/index';
-						//成功跳转首页
-						uni.switchTab({
-							url: ur,
-							fail(e) {
-								uni.navigateTo({
-									url: ur,
-									fail(e) {
-										uni.navigateTo({
-											url: '/pages/index/index',
+								if (type === 'apple') {
+									console.log(es.userInfo);
+									applelogin({
+											account: es.userInfo.openId,
+										})
+										.then(function(e) {
+											console.log(e, 'token')
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+
+												//成功跳转首页
+												uni.switchTab({
+													url: '/pages/index/index'
+												});
+											});
+
+										})
+										.catch(function(e) {
+											console.log(e);
+											uni.showModal({
+												content: JSON.stringify(e),
+										  success() {},
+												fail() {}
+											});
 										});
+								}
+							},
+							fail(es) {
+								uni.showModal({
+									content: JSON.stringify(es),
+									success() {
+										// obj.login();
+										// // 保存返回用户数据
+										// obj.setUserInfo(e.data);
+										// //成功跳转首页
+										// uni.switchTab({
+										// 	url: '/pages/index/index'
+										// });
 									}
 								});
 							}
 						});
+					},
+					fail(e) {
+						uni.showModal({
+							title: '提示',
+							content: JSON.stringify(e),
+							showCancel: false
+						});
+					}
+				});
+				// #endif
+			},
+			//登录
+			async toLogin() {
+				let obj = this;
+				obj.logining = true;
+				if (obj.username == '') {
+					obj.$api.msg('请输入手机号');
+					return;
+				}
+				if (obj.passward == '') {
+					obj.$api.msg('请输入密码');
+					return;
+				}
+				login({
+						account: obj.username,
+						password: obj.passward
+					})
+					.then(function(e) {
+						uni.setStorageSync('token', e.data.token);
+						obj.$store.commit('hasLogin', true);
+						getUserInfo({}).then(e => {
+							obj.login();
+							// 保存返回用户数据
+							obj.setUserInfo(e.data);
+							let ur = uni.getStorageSync('present') || '/pages/index/index';
+							//成功跳转首页
+							uni.switchTab({
+								url: ur,
+								fail(e) {
+									uni.navigateTo({
+										url: ur,
+										fail(e) {
+											uni.navigateTo({
+												url: '/pages/index/index',
+											});
+										}
+									});
+								}
+							});
+						});
+					})
+					.catch(function(e) {
+						console.log(e);
 					});
-				})
-				.catch(function(e) {
-					console.log(e);
+			},
+			//跳转注册页
+			register() {
+				uni.navigateTo({
+					url: `/pages/public/register`
 				});
-		},
-		//跳转注册页
-		register() {
-			uni.navigateTo({
-				url: `/pages/public/register`
-			});
-		},
-		// 后退
-		navBack() {
-			uni.navigateBack();
+			},
+			// 后退
+			navBack() {
+				uni.navigateBack();
+			}
 		}
-	}
-};
+	};
 </script>
 
 <style lang="scss">
 	/* #ifdef APP-PLUS */
-	
+
 	.ios_login {
 		width: 260rpx;
 		border-radius: 12rpx;
@@ -248,17 +280,19 @@ export default {
 		padding: 10rpx;
 		background-color: #212121;
 		color: #ffffff;
+
 		.loginIcon {
 			width: 50rpx;
 			height: 50rpx;
 		}
+
 		.weixin_text {
 			line-height: 1;
 			margin-left: 20rpx;
 			color: #ffffff !important;
 		}
 	}
-	
+
 	/* #endif */
 	.ios_login {
 		width: 350rpx;
@@ -270,117 +304,136 @@ export default {
 		background-color: #212121;
 		color: #ffffff;
 		font-size: 32rpx;
+
 		.loginIcon {
 			font-size: 35rpx;
 			width: 35rpx;
 			height: 35rpx;
 		}
+
 		.weixin_text {
 			line-height: 1;
 			margin-left: 20rpx;
 			color: #ffffff !important;
 		}
 	}
-	
-page {
-	height: 100%;
-}
-.container {
-	width: 100%;
-	height: 100%;
-	background-size: 100%;
-}
-.container_text {
-	width: 100%;
-	height: 500rpx;
-	top: 0rpx;
-	.banner-img {
+
+	page {
+		height: 100%;
+	}
+
+	.container {
 		width: 100%;
 		height: 100%;
+		background-size: 100%;
 	}
-}
-.login_text {
-	margin: auto 30rpx;
-	position: relative;
-	padding: 100rpx 102rpx;
-	background-color: #ffffff;
-	margin-top: -180rpx;
-	border-radius: 20rpx;
-	.login_input {
-		border-bottom: 1px solid #f0f0f0;
-		margin-bottom: 65rpx;
-		.login_img image {
-			height: 35rpx;
-			width: 29rpx;
-			margin-right: 20rpx;
+
+	.container_text {
+		width: 100%;
+		height: 500rpx;
+		top: 0rpx;
+
+		.banner-img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.login_text {
+		margin: auto 30rpx;
+		position: relative;
+		padding: 100rpx 102rpx;
+		background-color: #ffffff;
+		margin-top: -180rpx;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 65rpx;
+
+			.login_img image {
+				height: 35rpx;
+				width: 29rpx;
+				margin-right: 20rpx;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 470rpx;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+			}
+		}
+
+		.other {
+			margin-top: 60rpx;
+
+			.fenge {
+				width: 30%;
+				height: 2rpx;
+				background-color: #eeeeee;
+			}
+
+			.qita {
+				font-size: 28rpx;
+				color: #999999;
+			}
 		}
-		.uni-input {
-			text-align: left;
-			width: 470rpx;
-			font-size: 28rpx !important;
+
+		.weixin {
+			width: 75rpx;
+			height: 75rpx;
+			margin: 25rpx auto;
 		}
-		.login_name {
-			color: #333333;
+
+		.weixin image {
+			width: 100%;
+			height: 100%;
 		}
-	}
 
-	.other {
-		margin-top: 60rpx;
-		.fenge {
-			width: 30%;
-			height: 2rpx;
-			background-color: #eeeeee;
+		.weixin_text {
+			text-align: center;
+			font-size: 28rpx;
+			color: #999999;
 		}
-		.qita {
+
+		.forget {
 			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
 			color: #999999;
 		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+		}
+
+		.uni-button-green-plain {
+			border: 1px solid #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: #5dbc7c;
+			background-color: #ffffff;
+		}
+
+		.uni-button {
+			height: 85rpx;
+			line-height: 85rpx;
+		}
 	}
-	.weixin {
-		width: 75rpx;
-		height: 75rpx;
-		margin: 25rpx auto;
-	}
-	.weixin image {
+
+	.loginTitle {
+		position: absolute;
+		top: 250rpx;
 		width: 100%;
-		height: 100%;
-	}
-	.weixin_text {
 		text-align: center;
-		font-size: 28rpx;
-		color: #999999;
-	}
-	.forget {
-		font-size: 28rpx;
-		width: 100%;
-		text-align: right;
-		color: #999999;
-	}
-
-	.uni-button-green {
-		color: #ffffff;
-		background-color: #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-	}
-	.uni-button-green-plain {
-		border: 1px solid #5dbc7c;
-		margin: 40rpx 10rpx;
-		border-radius: 50rpx;
-		color: #5dbc7c;
-		background-color: #ffffff;
-	}
-	.uni-button {
-		height: 85rpx;
-		line-height: 85rpx;
+		color: white;
+		font-size: 40rpx;
 	}
-}
-.loginTitle {
-	position: absolute;
-	top: 250rpx;
-	width: 100%;
-	text-align: center;
-	color: white;
-	font-size: 40rpx;
-}
 </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>

+ 477 - 0
pages/user/greenJf.vue

@@ -0,0 +1,477 @@
+<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
+					}) => {
+						obj.zc = data.zc
+						obj.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'
+						}
+						obj.$set(navItem, 'loaded', true);
+						// 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;
+		/* #ifdef APP-PLUS */
+		padding-top: 30rpx;
+
+		/* #endif */
+		.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>

+ 245 - 0
pages/user/joinShop.vue

@@ -0,0 +1,245 @@
+<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('上传头像')
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album', 'camera'], //从相册选择、摄像头
+						success: function(res) {
+									obj.charter = res.tempFilePaths[0]
+									console.log(obj.charter,'obj.charter');
+								}
+				})
+				upload({
+					filename: ''
+				}).then(res => {
+					console.log(res[0].url, '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
+					});
+					uni.switchTab({
+						url:'./user'
+					})
+				}).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>

+ 478 - 0
pages/user/mallJf.vue

@@ -0,0 +1,478 @@
+<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=xl')">
+					商城积分转账
+				</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
+					}) => {
+						obj.zc = data.zc
+						obj.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'
+						}
+						obj.$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;
+		/* #ifdef APP-PLUS */
+		padding-top: 30rpx;
+
+		/* #endif */
+		.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>

+ 478 - 0
pages/user/purpleJf.vue

@@ -0,0 +1,478 @@
+<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
+					}) => {
+						obj.zc = data.zc
+						obj.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'
+						}
+						obj.$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;
+		/* #ifdef APP-PLUS */
+		padding-top: 30rpx;
+		/* #endif */
+		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>

+ 496 - 0
pages/user/shopJf.vue

@@ -0,0 +1,496 @@
+<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.business_integral | getMoneyStyle}}</view>
+				<view>当前余额</view>
+			</view>
+			<view class="moneybtn-box">
+				
+			</view>
+			
+			<view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/money/withdmoenys?type=xl')">
+					喜嗨积分转账
+				</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 ,//每次信息条数
+						loaded: false
+					},
+					{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 ,//每次信息条数
+						loaded: false
+					}
+				],
+				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) {
+				console.log('hao lan da sha bi')
+				let obj = this
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				console.log(state,'state');
+				console.log(source,navItem.loaded,'+++++++++++++++++')
+				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
+					}) => {
+						console.log(data,'data++++++++++')
+						obj.zc = data.zc
+						obj.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'
+						}
+						obj.$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%;
+	}
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding: 20rpx 50rpx;
+		margin-top: -40rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+
+	.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>

+ 384 - 354
pages/user/team.vue

@@ -1,355 +1,385 @@
-<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/promotion-bg.png" mode=""></image></view>
-			<view class="money-box">
-				<view class="money">{{ all }}</view>
-				<view>我的推广人数</view>
-			</view>
-		</view>
-		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" :style="{ height: maxheight }" scroll-y @scrolltolower="loadData">
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
-						<view class="title-box flex_item">
-							<view class="title-avatar"><image :src="item.avatar"></image></view>
-							<view class="list_tpl">
-								<view class="title">
-									<view class="title-name clamp">{{ item.nickname }}</view>
-								</view>
-								<view class="time">
-									<text>{{ item.time }}</text>
-								</view>
-							</view>
-							<view class="money">
-								<text>{{ item.self_achievement == null ? '未购买' : item.self_achievement + '元' }}</text>
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-<script>
-import { myspread } from '@/api/user.js';
-import { mapState, mapMutations } from 'vuex';
-export default {
-	onReady(res) {
-		var _this = this;
-		uni.getSystemInfo({
-			success: resu => {
-				const query = uni.createSelectorQuery();
-				query.select('.swiper-box').boundingClientRect();
-				query.exec(function(res) {
-					_this.maxheight = resu.windowHeight - res[0].top + 'px';
-					console.log('打印页面的剩余高度', _this.height);
-				});
-			},
-			fail: res => {}
-		});
-	},
-	data() {
-		return {
-			// 头部图高度
-			maxheight: '',
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '直接推荐',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			],
-			all: '',
-			list: '',
-		};
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	onLoad(options) {},
-	onShow() {
-		this.loadData();
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		//获取收入支出信息
-		async loadData(source) {
-			//这里是将订单挂载到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;
-			}
-			if (navItem.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-			myspread({
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					console.log(data);
-					this.all = data.total;
-					if (data.list.length > 0) {
-						this.list = data.list;
-						navItem.orderList = navItem.orderList.concat(data.list);
-						navItem.page++;
-					}
-					this.$nextTick(function() {
-						if (navItem.limit == data.list.length) {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							navItem.loadingType = 'more';
-							return;
-						} else {
-							//判断是否还有数据, 有改为 more, 没有改为noMore
-							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;
-		},
-		// 点击返回 我的页面
-		toBack() {
-			uni.switchTab({
-				url: '/pages/user/user'
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: #f8f8f8;
-	height: 100%;
-}
-.status_bar {
-	height: var(--status-bar-height);
-	width: 100%;
-	background: #5dbc7c;
-}
-.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;
-		}
-	}
-}
-
-.money-box {
-	position: relative;
-	z-index: 2;
-	padding-top: 90rpx;
-	color: #ffffff;
-	text-align: center;
-	.money {
-		font-size: 72rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ffffff;
-	}
-	.text {
-		font-size: 30rpx;
-	}
-}
-
-.order-item {
-	padding: 20rpx 30rpx;
-	line-height: 1.5;
-
-	.title-box {
-		width: 100%;
-
-		.title-avatar {
-			flex-shrink: 0;
-			width: 100rpx;
-			height: 100rpx;
-			margin-right: 25rpx;
-			border-radius: 100%;
-			image {
-				width: 100%;
-				height: 100%;
-				border-radius: 100%;
-			}
-		}
-
-		.list_tpl {
-			width: 85%;
-
-			.title {
-				display: flex;
-				justify-content: flex-start;
-				font-size: $font-lg;
-				color: $font-color-base;
-				overflow: hidden; //超出的文本隐藏
-				text-overflow: ellipsis; //溢出用省略号显示
-				white-space: nowrap;
-				line-height: 1;
-				text-align: center;
-				.title-name {
-					max-width: 40%;
-				}
-				.dl {
-					margin-left: 10rpx;
-					width: 93rpx;
-					height: 32rpx;
-					border-radius: 16rpx;
-					image {
-						width: 93rpx;
-						height: 32rpx;
-						border-radius: 16rpx;
-					}
-				}
-				.class {
-					display: inline-block;
-					margin-left: 10rpx;
-					padding: 6rpx;
-					text-align: center;
-					border: 1px solid #2e58ff;
-					border-radius: 16rpx;
-					font-size: 20rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #2e58ff;
-				}
-			}
-
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-	}
-
-	.money {
-		width: 50%;
-		text-align: right;
-		color: #db1935;
-		font-size: $font-lg;
-	}
-}
-.yeji {
-	position: relative;
-	margin: -72rpx auto 0;
-	width: 690rpx;
-	height: 143rpx;
-	background: #ffffff;
-	box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
-	border-radius: 10rpx;
-	display: flex;
-	align-items: center;
-
-	.yeji-a {
-		width: 50%;
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-
-		.yeji-top {
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-
-		.yeji-buttom {
-			font-size: 42rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #333333;
-		}
-	}
-
-	.border {
-		width: 1rpx;
-		height: 51rpx;
-		background: #dddddd;
-	}
-}
+<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/promotion-bg.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ all }}</view>
+				<view>我的推广人数</view>
+			</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: maxheight }" class="swiper-box" duration="300"
+			@change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" :style="{ height: maxheight }" scroll-y
+					@scrolltolower="loadData">
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box flex_item">
+							<view class="title-avatar">
+								<image :src="item.avatar"></image>
+							</view>
+							<view class="list_tpl">
+								<view class="title">
+									<view class="title-name clamp">{{ item.nickname }}</view>
+								</view>
+								<view class="time">
+									<text>{{ item.time }}</text>
+								</view>
+							</view>
+							<!-- <view class="money">
+								<text>{{ item.self_achievement == null ? '未购买' : item.self_achievement + '元' }}</text>
+							</view> -->
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+<script>
+	import {
+		myspread
+	} from '@/api/user.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	export default {
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						_this.maxheight = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '直接推荐',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}],
+				all: '',
+				list: '',
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到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;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				myspread({
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						console.log(data);
+						this.all = data.total;
+						if (data.list.length > 0) {
+							this.list = data.list;
+							navItem.orderList = navItem.orderList.concat(data.list);
+							navItem.page++;
+						}
+						this.$nextTick(function() {
+							if (navItem.limit == data.list.length) {
+								//判断是否还有数据, 有改为 more, 没有改为noMore
+								navItem.loadingType = 'more';
+								return;
+							} else {
+								//判断是否还有数据, 有改为 more, 没有改为noMore
+								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;
+			},
+			// 点击返回 我的页面
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user'
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f8f8f8;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #5dbc7c;
+	}
+
+	.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;
+			}
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 90rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+
+		.title-box {
+			width: 100%;
+
+			.title-avatar {
+				flex-shrink: 0;
+				width: 100rpx;
+				height: 100rpx;
+				margin-right: 25rpx;
+				border-radius: 100%;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 100%;
+				}
+			}
+
+			.list_tpl {
+				width: 85%;
+
+				.title {
+					display: flex;
+					justify-content: flex-start;
+					font-size: $font-lg;
+					color: $font-color-base;
+					overflow: hidden; //超出的文本隐藏
+					text-overflow: ellipsis; //溢出用省略号显示
+					white-space: nowrap;
+					line-height: 1;
+					text-align: center;
+
+					.title-name {
+						max-width: 40%;
+					}
+
+					.dl {
+						margin-left: 10rpx;
+						width: 93rpx;
+						height: 32rpx;
+						border-radius: 16rpx;
+
+						image {
+							width: 93rpx;
+							height: 32rpx;
+							border-radius: 16rpx;
+						}
+					}
+
+					.class {
+						display: inline-block;
+						margin-left: 10rpx;
+						padding: 6rpx;
+						text-align: center;
+						border: 1px solid #2e58ff;
+						border-radius: 16rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #2e58ff;
+					}
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+		}
+
+		.money {
+			width: 50%;
+			text-align: right;
+			color: #db1935;
+			font-size: $font-lg;
+		}
+	}
+
+	.yeji {
+		position: relative;
+		margin: -72rpx auto 0;
+		width: 690rpx;
+		height: 143rpx;
+		background: #ffffff;
+		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+		border-radius: 10rpx;
+		display: flex;
+		align-items: center;
+
+		.yeji-a {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			.yeji-top {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.yeji-buttom {
+				font-size: 42rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.border {
+			width: 1rpx;
+			height: 51rpx;
+			background: #dddddd;
+		}
+	}
 </style>

+ 870 - 823
pages/user/user.vue

@@ -1,824 +1,871 @@
-<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">
+		<!-- #ifdef APP-PLUS -->
+		<view class="vheigh"></view>
+		<!-- #endif -->
+
+		<!-- 用户头像设置 -->
+		<view class="user-wrap">
+			<view class="user-left">
+				<image :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
+				<image src="../../static/index/xhgLogo.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')"
+			v-if="userInfo && userInfo.is_merchant == 0">
+		</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/set/password')" thumb="/static/index/index14.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() {
+				console.log(this.userInfo);
+				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: #fff;
+	}
+
+	.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 {
+			overflow: hidden;
+			flex-shrink: 0;
+			border-radius: 50%;
+			
+			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>

+ 478 - 0
pages/user/wenpiao.vue

@@ -0,0 +1,478 @@
+<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.paper_ticket | 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
+					}) => {
+						console.log(data,'data')
+						obj.zc = data.zc
+						obj.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'
+						}
+						obj.$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;
+		/* #ifdef APP-PLUS */
+		padding-top: 30rpx;
+
+		/* #endif */
+		.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>

+ 478 - 0
pages/user/whiteJf.vue

@@ -0,0 +1,478 @@
+<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;
+		/* #ifdef APP-PLUS */
+		padding-top: 30rpx;
+
+		/* #endif */
+		.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>

+ 279 - 0
pages/user/yuezz.vue

@@ -0,0 +1,279 @@
+<template>
+ 	<view class="content">
+ 		<view class="content-money">
+ 			<view class="flex">
+ 				<view class="buttom">
+ 					<view class="icon">{{ userInfo.now_money | getMoneyStyle }}</view>
+ 					<text class="text">可转金额</text>
+ 				</view>
+ 			</view>
+ 		</view>
+ 		<view class="name" v-if="name != ''">
+ 			用户昵称:{{name}}
+ 		</view>
+		<view class="item-wrap" style="padding: 0 20rpx;background-color: #fff;">
+			<u-form ref="uForm" class="item">
+				<u-form-item label-width='150' label="用户编号"><u-input type="text" v-model="card" @blur="userName"/></u-form-item>
+				<u-form-item label-width='150' label="支付密码"><u-input type="password" v-model="password" /></u-form-item>
+			</u-form>
+		</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 = userInfo.now_money">全部转账</view>
+ 			</view>
+ 		</view>
+ 		
+ 		<button class="add-btn up" :class="{'action':loding}" @click="!loding?confirm():''">转入</button>
+ 	</view>
+ </template>
+ 
+ <script>
+ import { getMoneyStyle } from '@/utils/rocessor.js';
+ import { getUserInfo,transfer,nickname } from '@/api/user.js';
+ import { mapMutations,mapState } from 'vuex';
+ export default {
+ 	filters: {
+ 		getMoneyStyle
+ 	},
+ 	data() {
+ 		return {
+ 			money: '0.00', //可提现金额
+ 			withdrawal: '', //提现金额
+ 			password:'',//支付密码
+ 			card:'',//转账卡号
+ 			name:'',
+ 			// #ifdef H5
+ 			weichatBsrowser: false,
+ 			// #endif
+ 			loding:false,
+ 		};
+ 	},
+ 	onLoad(options) {
+ 		// #ifdef H5
+ 		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+ 		// #endif
+ 		this.dataUp();
+ 	},
+ 	computed: {
+ 		...mapState('user', ['userInfo']) 
+ 	},
+ 	methods: {
+ 		...mapMutations('user', ['setUserInfo', 'login']),
+ 		// 更新数据
+ 		dataUp(){
+ 			let obj = this;
+ 			getUserInfo({}).then((e) => {
+ 				obj.login();
+ 				// 保存返回用户数据
+ 				obj.setUserInfo(e.data);
+ 			}).catch((e) => {
+ 				console.log(e);
+ 			})
+ 		},
+ 		// 切换选中对象
+ 		tabRadio(e) {
+ 			this.type = e.detail.value;
+ 		},
+ 		userName() {
+ 			if(this.card != ''){
+ 				nickname({uid:this.card}).then(data => {
+ 					this.name = data.msg
+ 				}).catch(err => {
+					this.$api.msg('请确认用户编号是否正确')
+				})
+ 			}
+ 			console.log(this.card)
+ 		},
+ 		// 提交
+ 		confirm() {
+ 			let obj = this;
+ 			obj.loding = true;
+ 			if(obj.withdrawal == 0){
+ 				obj.loding = false;
+ 				uni.showModal({
+ 					title:"提示",
+ 					content:"转账金额不要为0"
+ 				})
+ 				return;
+ 			}
+ 			if(obj.card == obj.userInfo.uid){
+ 				obj.loding = false;
+ 				uni.showModal({
+ 					title:"提示",
+ 					content:"不要输入自己的用户编号"
+ 				})
+ 			}else{
+ 				
+ 				let data = {
+ 					to_uid:obj.card, //编号
+ 					pass: obj.password, //交易密码
+ 					merber: obj.withdrawal //金额
+ 				}
+ 				transfer(data)
+ 					.then(e => {
+ 						// 允许按钮点击
+ 						obj.loding = false;
+ 						// 初始化提现金额
+ 						obj.withdrawal = ''
+ 						uni.showToast({
+ 							title: '提交成功',
+ 							duration: 2000,
+ 							position: 'top'
+ 						});
+ 						obj.dataUp();
+ 					})
+ 					.catch(e => {
+ 						obj.$api.msg(e.msg)
+ 						obj.loding = false;
+ 						console.log();
+ 					});
+ 			}
+ 			
+ 		}
+ 	}
+ };
+ </script>
+ 
+ <style lang="scss">
+ page {
+ 	height: 100%;
+ }
+ .content-money {
+ 	padding: 30rpx 0;
+ 	background: #ffffff;
+ }
+ 
+.item{
+ 	padding: 0 $page-row-spacing;
+ 	background-color: #FFFFFF;
+	
+ }
+ .flex {
+ 	background-color: #ffffff;
+ 	text-align: center;
+ 	margin: 0 30rpx;
+ 	border-radius: $border-radius-sm;
+ 	justify-content: center;
+ 	.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: $base-color;
+ 			font-size: $font-base;
+ 		}
+ 	}
+ }
+ .add-btn {
+ 	background: $base-color;
+ 	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;
+ 	color: #fff;
+ 	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+ }
+ .name {
+ 	background: #fff;
+ 	padding: 30rpx;
+ }
+ .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;
+ }
+ </style>
+ 

BIN
static/game/微信.lnk


BIN
static/img/game01.png


BIN
static/img/game02.png


BIN
static/img/game03.png


BIN
static/img/game04.png


BIN
static/img/game05.png


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/index/js01.png


BIN
static/index/js02.png


BIN
static/index/js03.png


BIN
static/index/js04.png


BIN
static/index/js05.png


BIN
static/index/js06.png


BIN
static/index/xhgLogo.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


+ 8 - 8
store/index.js

@@ -6,20 +6,20 @@ import user from './model/user'
 import axios from 'axios'
 //将axios挂载在vue原型链上
 // Vue.prototype.$axios = axios;
-Vue.prototype.$axios =axios
+Vue.prototype.$axios = axios
 Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://xhg.frp.liuniu946.com',//请求地址配置 
+		baseURL: 'http://xhg.duolio.cn', //请求地址配置 
 		// baseURL:'http://lnpt.frp.liuniu946.com/',//请求地址配置 
-		urlFile:'/index',//项目部署所在文件夹
+		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息
-		loginInterceptor:false,//是否打开强制登录
+		loginInterceptor: false, //是否打开强制登录
 		// #ifdef H5 || MP-WEIXIN
-		weichatInfo:{},//保存微信注册信息
-		weichatObj:'',//微信对象
+		weichatInfo: {}, //保存微信注册信息
+		weichatObj: '', //微信对象
 		// #endif
 		latitude: '',
 		longitude: '',
@@ -40,10 +40,10 @@ const store = new Vuex.Store({
 			state.longitude = provider
 		},
 	},
-	modules:{
+	modules: {
 		user
 	},
 	actions: {}
 })
 
-export default store
+export default store

BIN
unpackage/cache/apk/__UNI__F0D4DD1_cm.apk


+ 1 - 0
unpackage/cache/apk/apkurl

@@ -0,0 +1 @@
+https://ide.dcloud.net.cn/build/download/277ef340-dbf9-11ec-a05c-d3690009dd81

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/apk/cmManifestCache.json


+ 3 - 0
unpackage/cache/certdata

@@ -0,0 +1,3 @@
+andrCertfile=D:/六牛项目/xihaigou/xihaigou/appbase/xhg.keystore
+andrCertAlias=com.xhg.inc
+andrCertPass=7IwuiYJfyRjKKTfhI7sjzw==

BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/google-keystore.keystore


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-hdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xhdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xxhdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/icon-android-xxxhdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-hdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-xhdpi.png


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/.manifest/splash-android-xxhdpi.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappchooselocation.js


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/__uniapperror.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappes6.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappopenlocation.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniapppicker.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 6 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappquill.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappquillimageresize.js


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappscan.js


BIN
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappsuccess.png


+ 25 - 0
unpackage/cache/wgt/__UNI__F0D4DD1/__uniappview.html

@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var __UniViewStartTime__ = Date.now();
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+    <title>View</title>
+    <link rel="stylesheet" href="view.css" />
+  </head>
+
+  <body>
+    <div id="app"></div>
+    <script src="__uniappes6.js"></script>
+    <script src="view.umd.min.js"></script>
+    <script src="app-view.js"></script>
+  </body>
+
+</html>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels