lhl 3 年之前
父节点
当前提交
fb477661c2
共有 100 个文件被更改,包括 5006 次插入6106 次删除
  1. 28 0
      .project
  2. 34 79
      api/index.js
  3. 4 4
      api/user.js
  4. 43 24
      api/wallet.js
  5. 11 2
      main.js
  6. 6 6
      manifest.json
  7. 57 96
      pages.json
  8. 0 408
      pages/category/mall.vue
  9. 359 0
      pages/coupon/couponList.vue
  10. 296 0
      pages/coupon/myCoupon.vue
  11. 270 0
      pages/index/bdzq.vue
  12. 356 431
      pages/index/index.vue
  13. 269 0
      pages/index/rxbd.vue
  14. 0 177
      pages/index/sign.vue
  15. 269 0
      pages/index/xfqzq.vue
  16. 0 353
      pages/index/yuyuechang.vue
  17. 0 442
      pages/money/jifen.vue
  18. 24 14
      pages/money/pay.vue
  19. 335 96
      pages/money/recharge.vue
  20. 237 116
      pages/money/wallet.vue
  21. 121 173
      pages/order/createOrder.vue
  22. 675 1388
      pages/order/order.vue
  23. 0 676
      pages/order/order1.vue
  24. 5 1
      pages/order/orderDetail.vue
  25. 24 33
      pages/product/product.vue
  26. 0 200
      pages/user/approve.vue
  27. 0 193
      pages/user/gzsq.vue
  28. 0 29
      pages/user/myfans.vue
  29. 456 405
      pages/user/myggz.vue
  30. 139 33
      pages/user/mygwjf.vue
  31. 482 0
      pages/user/myjf.vue
  32. 75 143
      pages/user/mytg.vue
  33. 31 21
      pages/user/mythq.vue
  34. 0 200
      pages/user/scoreAccumulate.vue
  35. 0 142
      pages/user/sqjl.vue
  36. 174 91
      pages/user/user.vue
  37. 185 82
      pages/user/withdrawal.vue
  38. 33 45
      pages/user/xfjfzz.vue
  39. 二进制
      static/icon/bd.png
  40. 二进制
      static/icon/c1.png
  41. 二进制
      static/icon/c2.png
  42. 二进制
      static/icon/c3.png
  43. 二进制
      static/icon/c4.png
  44. 二进制
      static/icon/c5.png
  45. 二进制
      static/icon/gn1.png
  46. 二进制
      static/icon/gn2.png
  47. 二进制
      static/icon/gn3.png
  48. 二进制
      static/icon/gn4.png
  49. 二进制
      static/icon/gn5.png
  50. 二进制
      static/icon/gn6.png
  51. 二进制
      static/icon/gn7.png
  52. 二进制
      static/icon/kp-loading.png
  53. 二进制
      static/icon/kp-more.png
  54. 二进制
      static/icon/kp-nomore.png
  55. 二进制
      static/icon/ms.png
  56. 二进制
      static/icon/xfq.png
  57. 二进制
      static/img/bd-bg.png
  58. 二进制
      static/img/bd-mbg.png
  59. 二进制
      static/img/jf-bg.png
  60. 二进制
      static/img/kp-bg-1.png
  61. 二进制
      static/img/kq-bg.png
  62. 二进制
      static/img/menber-bg.png
  63. 二进制
      static/img/my-kq-1.png
  64. 二进制
      static/img/my-kq.png
  65. 二进制
      static/img/myyue.png
  66. 二进制
      static/img/rx-mbg.png
  67. 二进制
      static/img/xf-bg.png
  68. 二进制
      static/img/xf-mbg.png
  69. 二进制
      static/img/xfq-bg.png
  70. 二进制
      static/img/yhq-mbg.png
  71. 0 0
      static/js/alipay.js
  72. 4 0
      static/js/dsbridge.js
  73. 2 1
      store/index.js
  74. 二进制
      unpackage/dist/build/h5/7-8-3.rar
  75. 二进制
      unpackage/dist/build/h5/h5.rar
  76. 2 2
      unpackage/dist/build/h5/index.html
  77. 二进制
      unpackage/dist/build/h5/static/icon/bd.png
  78. 二进制
      unpackage/dist/build/h5/static/icon/c1.png
  79. 二进制
      unpackage/dist/build/h5/static/icon/c2.png
  80. 二进制
      unpackage/dist/build/h5/static/icon/c3.png
  81. 二进制
      unpackage/dist/build/h5/static/icon/c4.png
  82. 二进制
      unpackage/dist/build/h5/static/icon/c5.png
  83. 二进制
      unpackage/dist/build/h5/static/icon/gn1.png
  84. 二进制
      unpackage/dist/build/h5/static/icon/gn2.png
  85. 二进制
      unpackage/dist/build/h5/static/icon/gn3.png
  86. 二进制
      unpackage/dist/build/h5/static/icon/gn4.png
  87. 二进制
      unpackage/dist/build/h5/static/icon/gn5.png
  88. 二进制
      unpackage/dist/build/h5/static/icon/gn6.png
  89. 二进制
      unpackage/dist/build/h5/static/icon/gn7.png
  90. 二进制
      unpackage/dist/build/h5/static/icon/kp-loading.png
  91. 二进制
      unpackage/dist/build/h5/static/icon/kp-more.png
  92. 二进制
      unpackage/dist/build/h5/static/icon/kp-nomore.png
  93. 二进制
      unpackage/dist/build/h5/static/icon/ms.png
  94. 二进制
      unpackage/dist/build/h5/static/icon/xfq.png
  95. 二进制
      unpackage/dist/build/h5/static/img/afternoon.4595b9a3.png
  96. 二进制
      unpackage/dist/build/h5/static/img/afternoon.png
  97. 二进制
      unpackage/dist/build/h5/static/img/afternoonicon.png
  98. 二进制
      unpackage/dist/build/h5/static/img/bargainBg.jpg
  99. 二进制
      unpackage/dist/build/h5/static/img/bd-bg.9e304271.png
  100. 二进制
      unpackage/dist/build/h5/static/img/bd-bg.png

+ 28 - 0
.project

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>hqshop</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.aptana.ide.core.unifiedBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.aptana.projects.webnature</nature>
+	</natures>
+	<filteredResources>
+		<filter>
+			<id>1657258962766</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
+</projectDescription>

+ 34 - 79
api/index.js

@@ -3,7 +3,7 @@ import {
 	upFilse
 } from '@/utils/request';
 
-// 促销商品
+// 热销
 export function groom4(data) {
 	return request({
 		url: '/api/groom/list/4',
@@ -11,7 +11,7 @@ export function groom4(data) {
 		data
 	});
 }
-// 精品推荐
+// 猜你喜欢
 export function groom1(data) {
 	return request({
 		url: '/api/groom/list/1',
@@ -37,117 +37,72 @@ export function loadIndexs(data) {
 	});
 }
 
-// 获取场次
-export function getChangCi(data) {
-	return request({
-		url: '/api/auction',
-		method: 'get',
-		data
-	});
-}
-
-// 预约
-export function subscribe(data) {
+// 设置支付密码http://sxg.frp.liuniu946.com/api/edit_pas
+export function transaction(data) {
 	return request({
-		url: '/api/subscribe',
+		url: '/api/edit_pas',
 		method: 'post',
 		data
 	});
 }
 
-// 进场
-export function advance(data) {
-	return request({
-		url: '/api/advance',
-		method: 'get',
-		data
-	});
-}
-
-// 场次价格区间
-export function section(data) {
+//api/examine
+export function upPz(data) {
 	return request({
-		url: '/api/section',
-		method: 'get',
+		url: '/api/examine',
+		method: 'post',
 		data
 	});
 }
-
-//购买预约商品
-export function purchase(data) {
+// getQr
+export function getQr(data) {
 	return request({
-		url: '/api/purchase',
+		url: '/api/brc',
 		method: 'get',
 		data
 	});
 }
 
-// 订单支付http://sxg.frp.liuniu946.com/api/zfpay?type=1&page=1&limit=10
-export function zfpay(data) {
-	return request({
-		url: '/api/zfpay',
-		method: 'post',
-		data
-	});
-}
-
-// 挂售http://sxg.frp.liuniu946.com/api/hanging_sale
-export function hanging_sale(data) {
-	return request({
-		url: '/api/hanging_sale',
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/upload',
 		method: 'post',
 		data
-	});
-}
+	})
+}
 
-//http://sxg.frp.liuniu946.com/api/auction/see_order?id=11
-export function see_order(data) {
+//getCouponList
+export function getCouponList(data) {
 	return request({
-		url: '/api/auction/see_order',
+		url: '/api/coupons',
 		method: 'get',
 		data
-	});
+	})
 }
-// 查看预约商品详情 http://sxg.frp.liuniu946.com/api/auction/product?id=103
-export function product(data) {
+
+export function getMyCoupons(data,type) {
 	return request({
-		url: '/api/auction/product',
+		url: '/api/coupons/user/' + type,
 		method: 'get',
 		data
-	});
+	})
 }
 
-// 设置支付密码http://sxg.frp.liuniu946.com/api/edit_pas
-export function transaction(data) {
+//领取优惠券
+export function lqyhq(data) {
 	return request({
-		url: '/api/edit_pas',
+		url: '/api/coupon/receive',
 		method: 'post',
 		data
-	});
+	})
 }
 
-//api/examine
-export function upPz(data) {
+// 观看广告奖励
+export function advertisement(data) {
 	return request({
-		url: '/api/examine',
-		method: 'post',
-		data
-	});
-}
-// getQr
-export function getQr(data) {
-	return request({
-		url: '/api/brc',
-		method: 'get',
-		data
-	});
-}
-
-//上传图片
-export function upload(data) {
-	return upFilse({
-		url: '/api/upload',
+		url: '/api/advertisement',
 		method: 'post',
 		data
 	})
-}
+}

+ 4 - 4
api/user.js

@@ -128,11 +128,11 @@ export function getSpreadPeople(data) {
 	})
 }
 
-// 购物积分互转
-export function gwjfhz(data) {
+// /api/user/accounts
+export function jfzz(data) {
 	return request({
-		url: '/api/points',
+		url: '/api/user/accounts',
 		method: 'post',
 		data
 	})
-}
+}

+ 43 - 24
api/wallet.js

@@ -115,30 +115,49 @@ export function pay_list(data) {
 		data
 	});
 }
-
-//获取购物积分详情
-export function sp_final_list(data) {
-	return request({
-		url: '/api/sp_final_list/list',
-		method: 'get',
-		data
-	});
-}
-
-//获取提货券详情
-export function top_ticket_list(data) {
-	return request({
-		url: '/api/top_ticket_list/list',
+
+
+//充值金额
+export function moneyChong(data){
+	return request({
+		url:'/api/recharge/index',
+		method:'get',
+		data
+	})
+}
+
+//贡献值查询
+export function getContributionList(data) {
+	return request({
+		url: '/api/contribution_list/list',
+		method: 'get',
+		data
+	})
+}
+
+//消费券查询
+export function getConsumptionList(data) {
+	return request({
+		url: '/api/consumption_list/list',
+		method: 'get',
+		data
+	})
+}
+
+//动态积分
+export function getDynamicIntegralList(data) {
+	return request({
+		url: '/api/dynamic_integral_list/list',
+		method: 'get',
+		data
+	})
+}
+
+//	积分列表
+export function integrallist(data) {
+	return request({
+		url: '/api/integral/list',
 		method: 'get',
 		data
 	});
-}
-
-//获取提货券详情
-export function aid_val_list(data) {
-	return request({
-		url: '/api/aid_val_list/list',
-		method: 'get',
-		data
-	});
-}
+}

+ 11 - 2
main.js

@@ -1,7 +1,12 @@
 import Vue from 'vue'
 import store from './store'
 import App from './App'
-import uView from 'uview-ui'
+import uView from 'uview-ui'
+// #ifdef H5
+import dsbridge from '@/static/js/dsbridge.js'
+import alipay from '@/static/js/alipay.js'
+// #endif
+
 Vue.use(uView)
 /**
  *  所有测试用数据均存放于根目录json.js
@@ -36,7 +41,11 @@ const prePage = ()=>{
 Vue.config.productionTip = false
 Vue.prototype.$fire = new Vue();
 Vue.prototype.$store = store;
-Vue.prototype.$api = {msg, prePage};
+Vue.prototype.$api = {msg, prePage};
+// #ifdef H5
+Vue.prototype.$dsbridge = dsbridge
+Vue.prototype.$alipay = alipay
+// #endif
 
 App.mpType = 'app'
 

+ 6 - 6
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "随心购",
-    "appid" : "__UNI__474F381",
+    "name" : "环球优购",
+    "appid" : "__UNI__6F780FC",
     "description" : "",
-    "versionName" : "1.3.3",
-    "versionCode" : 133,
+    "versionName" : "1.0.0",
+    "versionCode" : 100,
     "transformPx" : false,
     "app-plus" : {
         /* 5+App特有相关 */
@@ -134,7 +134,7 @@
     //     }
     // }
     "h5" : {
-        "title" : "商城",
+        "title" : "环球优购",
         "domain" : "",
         "router" : {
             "base" : "/index/",
@@ -143,7 +143,7 @@
         "devServer" : {
             "proxy" : {
                 "/api" : {
-                    "target" : "https://xxl.liuniu946.com", //请求的目标域名
+                    "target" : "http://yg.hqgjsmc.com", //请求的目标域名
                     "changeOrigin" : true,
                     // "secure": false,
                     "pathRewrite" : {}

+ 57 - 96
pages.json

@@ -5,29 +5,7 @@
 	"pages": [ {
 			"path": "pages/index/index",
 			"style": {
-				"app-plus": {
-					"titleNView": false
-				}
-			}
-		},
-		{
-				"path": "pages/category/mall",
-				"style": {
-					"app-plus": {
-						"titleNView": false
-					}
-				}
-			},
-		{
-			"path": "pages/index/yuyuechang",
-			"style": {
-				"navigationBarTitleText": ""
-			}
-		},
-		{
-			"path": "pages/product/new",
-			"style": {
-				"navigationBarTitleText": "新品",
+				"enablePullDownRefresh": true,
 				"app-plus": {
 					"titleNView": false
 				}
@@ -39,17 +17,6 @@
 				"navigationBarTitleText": "商品详情"
 			}
 		},
-		{
-			"path": "pages/index/sign",
-			"style": {
-				"navigationBarTitleText": "每日签到",
-				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
-				}
-			}
-		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -89,7 +56,6 @@
 				"navigationBarTitleText": "添加支付宝"
 			}
 		},
-
 		{
 			"path": "pages/collection/wx",
 			"style": {
@@ -284,18 +250,16 @@
 		{
 			"path": "pages/user/mytg",
 			"style": {
-				"navigationBarTitleText": "我的广",
+				"navigationBarTitleText": "我的广告值",
 				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
+					"titleNView": false
 				}
 			}
 		},
 		{
 			"path": "pages/user/mythq",
 			"style": {
-				"navigationBarTitleText": "我的提货券",
+				"navigationBarTitleText": "消费券",
 				"app-plus": {
 					"titleNView": false
 				}
@@ -304,7 +268,16 @@
 		{
 			"path": "pages/user/myggz",
 			"style": {
-				"navigationBarTitleText": "我的广告值",
+				"navigationBarTitleText": "贡献值",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/user/myjf",
+			"style": {
+				"navigationBarTitleText": "动态积分",
 				"app-plus": {
 					"titleNView": false
 				}
@@ -322,7 +295,7 @@
 		{
 			"path": "pages/user/xfjfzz",
 			"style": {
-				"navigationBarTitleText": "消费积分转账"
+				"navigationBarTitleText": "积分转账"
 
 			}
 		},
@@ -344,16 +317,10 @@
 				}
 			}
 		},
-		{
-			"path": "pages/user/gzsq",
-			"style": {
-				"navigationBarTitleText": "馆长申请"
-			}
-		},
 		{
 			"path": "pages/user/withdrawal",
 			"style": {
-				"navigationBarTitleText": "奖励提现"
+				"navigationBarTitleText": "积分提现"
 			}
 		},
 		{
@@ -373,44 +340,8 @@
 				"navigationBarTitleText": "我的卡卷"
 			}
 		},
-		{
-			"path": "pages/user/scoreAccumulate",
-			"style": {
-				"navigationBarTitleText": "积分明细"
-			}
-		},
-		{
-			"path": "pages/user/scoreAccumulate",
-			"style": {
-				"navigationBarTitleText": "积分明细"
-			}
-		},
-		{
-			"path": "pages/user/approve",
-			"style": {
-				"navigationBarTitleText": "实名认证",
-				"navigationBarBackgroundColor": "#ff0000",
-				"navigationBarTextStyle": "white"
-			}
-		},
-		{
-			"path": "pages/user/sqjl",
-			"style": {
-				"navigationBarTitleText": "申请记录"
-			}
-		},
 		{
 			"path": "pages/order/order",
-			"style": {
-				"navigationStyle": "custom",
-				"navigationBarTitleText": "",
-				"app-plus": {
-					"bounce": "none"
-				}
-			}
-		},
-		{
-			"path": "pages/order/order1",
 			"style": {
 				"navigationBarTitleText": "我的订单",
 				"app-plus": {
@@ -473,9 +404,7 @@
 			"style": {
 				"navigationBarTitleText": "我的钱包",
 				"app-plus": {
-					"titleNView": {
-						"type": "transparent"
-					}
+					"titleNView": false
 				}
 			}
 		},
@@ -550,13 +479,6 @@
 			"style": {
 				"navigationBarTitleText": "邀请好友"
 			}
-		},{
-			"path": "pages/money/jifen",
-			"style": {
-				"navigationBarTitleText": "",
-				"enablePullDownRefresh": false
-			}
-
 		},
 		{
 			"path": "pages/contract/agreement",
@@ -569,12 +491,51 @@
 			"style": {
 				"navigationBarTitleText": "隐私政策"
 			}
+		},
+		{
+			"path": "pages/coupon/couponList",
+			"style": {
+				"navigationBarTitleText": "领券中心"
+			}
+		},
+		{
+			"path": "pages/coupon/myCoupon",
+			"style": {
+				"navigationBarTitleText": "我的卡券"
+			}
+		},
+		{
+			"path": "pages/index/xfqzq",
+			"style": {
+				"navigationBarTitleText": "消费券专区",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/bdzq",
+			"style": {
+				"navigationBarTitleText": "爆品专区",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/index/rxbd",
+			"style": {
+				"navigationBarTitleText": "热销榜",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
 		}
 	],
 
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
-		"navigationBarTitleText": "uni-app",
+		"navigationBarTitleText": "环球优购",
 		"navigationBarBackgroundColor": "#FFFFFF",
 		"backgroundColor": "#f8f8f8"
 	},

+ 0 - 408
pages/category/mall.vue

@@ -1,408 +0,0 @@
-<template>
- 	<view class="center">
- 		<!-- 顶部logo and 搜索 start-->
- 		<!-- 这里是状态栏 -->
- 		<view class="status_bar"></view>
- 		<view class="top-search flex">
- 			<view class="top-logo">
- 				<image src="../../static/icon/logo.png" mode="widthFix"></image>
- 			</view>
- 			<view class="search-box flex" @click="clickSearch()">
- 				<image class="search" src="../../static/icon/search-h.png" mode=""></image>
- 				<view class="search-font">输入关键词搜索</view>
- 			</view>
- 		</view>
- 		<!-- 顶部logo and 搜索 end-->
- 		<view class="jg"></view>
- 		<!-- 轮播图 start -->
- 		<swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
- 			<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
- 				@click="bannerNavToUrl(item)">
- 				<image :src="item.pic" />
- 			</swiper-item>
- 		</swiper>
- 		<!-- 轮播图 end -->
- 		<view class="swiper-btm flex">
- 			<view class="btm-item flex">
- 				<image src="../../static/icon/index-gou.png" mode=""></image>
- 				<view class="">自用购物返利</view>
- 			</view>
- 			<view class="btm-item flex">
- 				<image src="../../static/icon/index-gou.png" mode=""></image>
- 				<view class="">分享好友赚钱</view>
- 			</view>
- 			<view class="btm-item flex">
- 				<image src="../../static/icon/index-gou.png" mode=""></image>
- 				<view class="">超值正品优惠</view>
- 			</view>
- 		</view>
- 		<!-- 商品列表 -->
- 		<view class="good-list">
- 			<view class="good flex" v-for="item in goodList" @click="navto('/pages/product/product?id=' + item.id)">
- 				<view class="good-img">
- 					<image :src="item.image" mode=""></image>
- 				</view>
- 				<view class="good-info flex">
- 					<view class="good-name clamp2">
- 						{{item.store_name}}
- 					</view>
- 					<view class="good-price">
- 						<view class="old-price" v-if="item.ot_price*1 > item.price*1">
- 							<text class="old-left">¥{{item.ot_price}}</text>
- 							<image src="../../static/icon/down.png" mode="widthFix"></image><text
- 								class="old-right">直降{{item.ot_price*1 - item.price*1}}元</text>
- 						</view>
- 						<view class="new-price flex">
- 							<view class="">
- 								¥{{item.price}}
- 							</view>
- 							<!-- <view class="good-tip">
-								1960提货券
-							</view> -->
- 						</view>
- 					</view>
- 				</view>
- 			</view>
- 		</view>
- 		<uni-load-more :status="loadingType"></uni-load-more>
- 	</view>
- </template>
-
- <script>
- 	import {
- 		tabbar1
- 	} from '@/utils/tabbar.js';
- 	import {
- 		loadIndexs
- 	} from '@/api/index.js';
- 	import {
- 		getProducts
- 	} from '@/api/product.js'
- 	import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
- 	export default {
- 		components: {
- 			uniCountdowns
- 		},
- 		data() {
- 			return {
- 				current: 0,
- 				tabbar: tabbar1,
- 				titleNViewBackground: '',
- 				swiperCurrent: 0,
- 				swiperLength: 0,
- 				dataList: '',
- 				carouselList: [], //轮播图列表
- 				text: ['恭喜黑白灰用户拼团成功¥353元!', '恭喜黑白灰用户拼团成功¥353元!'],
- 				stopTime: {
- 					stopTimeH: 0,
- 					stopTimeM: 24,
- 					stopTimeS: 59
- 				},
- 				bzb: 30,
- 				goodList: [],
- 				page: 1,
- 				limit: 10,
- 				loadingType: 'more'
- 			};
- 		},
- 		onLoad() {
- 			this.loadData();
- 			this.getProList()
- 		},
- 		onReachBottom() {
- 			this.getProList()
- 		},
- 		methods: {
- 			navto(url) {
- 				uni.navigateTo({
- 					url
- 				})
- 			},
- 			loadData() {
- 				loadIndexs({})
- 					.then(({
- 						data
- 					}) => {
- 						let goods = data.info;
- 						this.dataList = goods.bastList; //精品推荐
- 						this.carouselList = data.banner;
- 					})
- 					.catch(e => {});
- 			},
- 			goDetails(e) {
- 				console.log(e, '123456');
- 				uni.navigateTo({
- 					url: '/pages/index/messageInfo'
- 				});
- 			},
- 			nav(url) {
- 				uni.navigateTo({
- 					url,
- 					fail() {
- 						uni.switchTab({
- 							url
- 						});
- 					}
- 				});
- 			},
- 			//轮播图切换修改背景色
- 			swiperChange(e) {
- 				const index = e.detail.current;
- 				this.swiperCurrent = index;
- 				this.titleNViewBackground = this.carouselList[index].background;
- 			},
- 			// 點擊搜索框
- 			clickSearch() {
- 				uni.navigateTo({
- 					url: '/pages/product/search'
- 				});
- 			},
-
- 			//详情页
- 			navToDetailPage(item) {
- 				let id = item.id;
- 				uni.navigateTo({
- 					url: '/pages/product/product?id=' + id
- 				});
- 			},
- 			getProList() {
- 				let obj = this
- 				if (obj.loadingType == 'loading' || obj.loadingType == 'noMore') {
- 					return
- 				}
- 				obj.loadingType = 'loading'
- 				getProducts({
- 					page: obj.page,
- 					limit: obj.limit
- 				}).then(res => {
- 					obj.goodList = obj.goodList.concat(res.data)
- 					obj.page++
- 					if (obj.limit == res.data.length) {
- 						obj.loadingType = 'more'
- 					} else {
- 						obj.loadingType = 'noMore'
- 					}
- 				})
- 			}
- 		}
- 	};
- </script>
-
- <style lang="scss">
- 	page,
- 	.center {
- 		min-height: 100%;
- 		height: auto;
- 		background: #ededed;
- 	}
-
- 	// 顶部搜索
- 	.top-search {
- 		height: 80rpx;
- 		padding: 0 20rpx;
- 		background-color: #fff;
-
- 		.top-logo {
- 			width: 50rpx;
- 			// height: 50rpx;
- 			margin-right: 10rpx;
-
- 			image {
- 				width: 50rpx;
- 				// height: 50rpx;
- 			}
-
- 		}
-
- 		.search-box {
- 			justify-content: center;
- 			width: 698rpx;
- 			height: 60rpx;
- 			background: #EEEEEE;
- 			// box-shadow: 0px 10rpx 20rpx 0px rgba(4, 114, 69, 0.22);
- 			border-radius: 30rpx;
-
- 			.search {
- 				width: 34rpx;
- 				height: 34rpx;
- 			}
-
- 			.search-font {
- 				margin-left: 14rpx;
- 				font-size: 28rpx;
- 				font-family: PingFang SC;
- 				font-weight: 500;
- 				color: #CBCBCB;
- 			}
- 		}
- 	}
-
- 	// 顶部轮播图
- 	.top-swiper {
- 		width: 750rpx;
- 		height: 360rpx;
-
- 		// margin: 20rpx 0 0;
- 		image {
- 			width: 750rpx;
- 			height: 360rpx;
- 		}
- 	}
-
- 	.swiper-btm {
- 		height: 60rpx;
- 		width: 750rpx;
- 		background-color: #fff;
- 		margin-bottom: 20rpx;
- 		font-size: 21rpx;
- 		font-weight: 500;
- 		color: #333333;
-
- 		.btm-item {
- 			flex-grow: 1;
- 			justify-content: center;
-
- 			image {
- 				width: 25rpx;
- 				height: 25rpx;
- 				margin-right: 14rpx;
- 			}
- 		}
- 	}
-
- 	.jg {
- 		height: 20rpx;
- 		background-color: #fff;
- 	}
-
- 	.good-list {
- 		width: 750rpx;
- 		background: linear-gradient(0deg, #FFFFFF, #F8F8F8);
- 		padding: 30rpx 0;
-
- 		.good {
- 			width: 690rpx;
- 			height: 276rpx;
- 			background: #FFFFFF;
- 			box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
- 			border-radius: 10rpx;
- 			margin: auto;
- 			padding: 20rpx 15rpx;
- 			margin-bottom: 20rpx;
-
- 			&:last-of-type {
- 				margin-bottom: 0rpx;
- 			}
-
- 			.good-img {
- 				flex-shrink: 0;
- 				width: 236rpx;
- 				height: 236rpx;
- 				border-radius: 10rpx;
- 				margin-right: 22rpx;
-
- 				image {
- 					width: 236rpx;
- 					height: 236rpx;
- 					border-radius: 10rpx;
- 				}
- 			}
-
- 			.good-info {
- 				flex-grow: 1;
- 				height: 100%;
- 				flex-direction: column;
- 				justify-content: space-between;
- 				align-items: flex-start;
-
- 				.good-name {
- 					font-size: 32rpx;
- 					font-weight: bold;
- 					padding-top: 10rpx;
- 					color: #333333;
- 				}
-
- 				.good-price {
- 					width: 100%;
-
- 					image {
- 						width: 14rpx;
- 						margin: 0 6rpx 0 10rpx;
- 					}
-
- 					.old-price {
- 						.old-left {
- 							font-size: 26rpx;
- 							font-weight: 500;
- 							text-decoration: line-through;
- 							color: #999999;
- 						}
-
- 						.old-right {
- 							font-size: 24rpx;
- 							font-weight: bold;
- 							color: #B59467;
- 						}
- 					}
-
- 					.new-price {
- 						width: 100%;
- 						font-size: 36rpx;
- 						font-weight: bold;
- 						color: #FF4C4C;
- 						justify-content: space-between;
-
- 						.good-tip {
- 							display: inline-block;
- 							padding: 0 20rpx 0 17rpx;
- 							min-width: 160rpx;
- 							text-align: center;
- 							line-height: 40rpx;
- 							background: #303030;
- 							font-size: 24rpx;
- 							font-weight: 500;
- 							color: #F8DABA;
- 							border-radius: 10rpx;
- 							position: relative;
-
- 							&::before {
- 								content: '';
- 								display: inline-block;
- 								height: 17rpx;
- 								width: 17rpx;
- 								background-color: #fff;
- 								border-radius: 50%;
- 								position: absolute;
- 								top: 0;
- 								bottom: 0;
- 								left: -9rpx;
- 								margin: auto;
- 							}
-
- 							&::after {
- 								content: '';
- 								display: inline-block;
- 								height: 17rpx;
- 								width: 17rpx;
- 								background-color: #fff;
- 								border-radius: 50%;
- 								position: absolute;
- 								top: 0;
- 								bottom: 0;
- 								right: -9rpx;
- 								margin: auto;
- 							}
- 						}
- 					}
- 				}
- 			}
- 		}
-
- 	}
-
- 	.status_bar {
- 		height: var(--status-bar-height);
- 		width: 100%;
- 		background: #fff;
- 	}
- </style>

+ 359 - 0
pages/coupon/couponList.vue

@@ -0,0 +1,359 @@
+<template>
+	<view class="content">
+		<view class="top-wrap">
+			<image src="../../static/img/yhq-mbg.png" mode="widthFix" style="width: 750rpx;"></image>
+			<view class="my-yhq" @click="navTo('/pages/coupon/myCoupon')">
+				我的卡券
+			</view>
+		</view>
+		<scroll-view scroll-y="true" :style="{'height': height}" class="scroll-wrap">
+			<!-- 空白页 -->
+			<empty v-if="loaded === true && list.length === 0"></empty>
+			<view class="kq-wrap flex" v-for="item in list" :class="{'qw':item == 9}">
+				<!-- 普通背景 -->
+				<image src="../../static/img/kq-bg.png" mode="" class="kq-bg" v-if="item != 9"></image>
+				<!-- 抢完背景 -->
+				<image src="../../static/img/kp-bg-1.png" mode="" class="kq-bg" v-if="item == 9"></image>
+				<view class="kq-left flex">
+					<view class="left-val">
+						{{item.coupon_price}}
+					</view>
+					<view class="left-tit" v-if="item.use_min_price*1 > 0">
+						满{{item.use_min_price*1}}元使用
+					</view>
+					<view class="left-tit" v-else>
+						无门槛
+					</view>
+				</view>
+				<view class="kp-center flex">
+					<view class="center-tit clamp2">
+						{{item.title}}
+					</view>
+					<view class="center-time">
+						有效期至2020-0-10 23:59
+					</view>
+				</view>
+				<view class="kp-right flex">
+					<!-- 在抢 -->
+					<view class="right-loading flex" v-if="!item.used">
+						<image src="../../static/icon/kp-loading.png" mode=""></image>
+						<view class="loading-tit">
+							待领取
+						</view>
+						<!-- 	<view class="loading-val">
+							88%
+						</view> -->
+					</view>
+					<!-- 已领取 -->
+					<view class="right-more" v-if="item.used">
+						<image src="../../static/icon/kp-more.png" mode=""></image>
+					</view>
+					<!-- 已抢完 -->
+					<view class="right-nomore" v-if="item == 9">
+						<image src="../../static/icon/kp-nomore.png" mode=""></image>
+					</view>
+					<view class="right-btn" @click="lq(item)">
+						{{item.used ?'已领取':'立即领取'}}
+					</view>
+				</view>
+				
+			</view>
+	<uni-load-more :status="loadingType" v-if="!(list.length == 0 && loaded)">
+			</uni-load-more>
+		</scroll-view>
+
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
+	import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+	import {
+		getCouponList,
+		lqyhq
+	} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				height: '',
+				loadingType: 'more',
+				list: [],
+				loaded: false,
+				iconColor: 'red',
+				color: 'red',
+				page: 1,
+				limit: 10
+			}
+		},
+		components: {
+			empty,
+			uniLoadMore
+		},
+		onLoad() {
+			this.getCouponList()
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+			this.getCouponList()
+		},
+		onReady() {
+			var obj = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.scroll-wrap').boundingClientRect();
+					query.exec(function(res) {
+						obj.height = resu.windowHeight - res[0].top + 'px';
+					});
+					console.log(obj.height)
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			},
+			getCouponList() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getCouponList({
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					console.log(res)
+					obj.list = obj.list.concat(res.data)
+					obj.page++
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+					obj.loaded = true
+				})
+			},
+			lq(item) {
+				if (item.used) {
+					return
+				}
+				lqyhq({
+					couponId: item.id
+				}).then(res => {
+					console.log(res)
+					uni.showToast({
+						title: '领取成功',
+						duration: 2000
+					});
+					// let s = this.list.indexOf(item);
+					// this.list;
+					item.used = 1
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #ff4802;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.top-wrap {
+		width: 750rpx;
+		height: 574rpx;
+		position: relative;
+
+		image {
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+
+		.my-yhq {
+			width: 174rpx;
+			line-height: 54rpx;
+			background: #F4DE01;
+			border-radius: 27rpx 0px 0px 27rpx;
+			position: absolute;
+			top: 43rpx;
+			right: 0;
+			font-size: 28rpx;
+			font-weight: bold;
+			color: #FF4701;
+			text-align: center;
+		}
+	}
+
+
+	.kq-wrap {
+		width: 663rpx;
+		height: 176rpx;
+		margin: 0 auto 20rpx;
+		position: relative;
+
+		// padding: 20rpx;
+		.kq-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			width: 663rpx;
+			height: 176rpx;
+		}
+
+		.kq-left {
+			width: 180rpx;
+			height: 176rpx;
+			position: relative;
+			// background-color: #bfa;
+			flex-direction: column;
+			justify-content: center;
+			flex-shrink: 0;
+			color: #FEB100;
+
+			.left-val {
+				font-size: 60rpx;
+				font-weight: bold;
+
+				&::before {
+					content: '¥';
+					font-size: 38rpx;
+					font-weight: bold;
+				}
+			}
+
+			.left-tit {
+				font-size: 24rpx;
+				font-weight: 500;
+
+			}
+		}
+
+		.kp-center {
+			position: relative;
+			flex-direction: column;
+			height: 176rpx;
+			padding: 35rpx 20rpx 35rpx 0;
+			justify-content: space-between;
+			align-items: flex-start;
+			flex-grow: 1;
+
+			.center-tit {
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.center-time {
+				font-size: 22rpx;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+
+		.kp-right {
+			width: 155rpx;
+			height: 176rpx;
+			position: relative;
+			flex-direction: column;
+			justify-content: center;
+			flex-shrink: 0;
+
+			.right-loading {
+				width: 105rpx;
+				height: 105rpx;
+				position: relative;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+
+				image {
+					width: 105rpx;
+					height: 105rpx;
+					position: absolute;
+					top: 0;
+					left: 0;
+				}
+
+				.loading-tit {
+					font-size: 22rpx;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+
+				.loading-val {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+
+			.right-more,
+			.right-nomore {
+				width: 116rpx;
+				height: 87rpx;
+
+				image {
+					width: 116rpx;
+					height: 87rpx;
+				}
+			}
+
+			.right-btn {
+				width: 122rpx;
+				height: 31rpx;
+				background: #FFFFFF;
+				border-radius: 15rpx;
+				font-size: 20rpx;
+				font-weight: 400;
+				color: #E27A01;
+				line-height: 31rpx;
+				text-align: center;
+				margin-top: 10rpx;
+			}
+		}
+	}
+
+	// 抢完样式
+	.qw {
+		.kq-left {
+			color: #CDCBCE;
+		}
+
+		.kp-center {
+			.center-time {
+				color: #CDCBCE;
+			}
+
+			.center-tit {
+				color: #CDCBCE;
+			}
+		}
+
+		.kp-right {
+			.right-btn {
+				background: #B5B5B5;
+				color: #fff;
+			}
+		}
+	}
+
+	.scroll-wrap {
+		padding-bottom: 20rpx;
+		width: 663rpx;
+		margin: auto;
+	}
+</style>

+ 296 - 0
pages/coupon/myCoupon.vue

@@ -0,0 +1,296 @@
+<template>
+	<view class="content">
+		<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" 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" :style="{'height': height}">
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<view class="kp-item flex" :class="{'sy':tabCurrentIndex != 0}" v-for="item in tabItem.orderList"
+						:key="item.id">
+						<image src="../../static/img/my-kq-1.png" mode="" class="kp-bg" v-if="item._type != 2">
+						</image>
+						<image src="../../static/img/my-kq.png" mode="" class="kp-bg" v-if="item._type == 2">
+						</image>
+						<view class="kp-left flex">
+							<view class="left-val">
+								{{item.coupon_price}}
+							</view>
+						</view>
+						<view class="kp-right flex">
+							<view class="">
+								<view class="right-tit clamp2">
+									{{item.coupon_title}}
+								</view>
+								<view class="right-tip">
+									购物下单时自动抵扣
+								</view>
+							</view>
+							<view class="right-time">
+								有效期至:{{item._end_time}}
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+				<!-- 空白页 -->
+
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	import empty from '@/components/empty';
+	import {
+		getMyCoupons
+	} from '@/api/index.js'
+	
+	export default {
+		components: {
+			uniLoadMore,
+			empty
+		},
+		data() {
+			return {
+				height: '',
+				tabCurrentIndex: 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
+					},
+					{
+						state: 2,
+						text: '已使用',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						loaded: false
+					}
+				]
+			}
+		},
+		onLoad() {
+			this.getMyCoupons()
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+			var obj = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.swiper-box').boundingClientRect();
+					query.exec(function(res) {
+						obj.height = resu.windowHeight - res[0].top + 'px';
+					});
+				},
+				fail: res => {}
+			});
+		},
+		methods: {
+			getMyCoupons(type) {
+				let obj = this
+				let index = obj.tabCurrentIndex
+				let navitem = obj.navList[index]
+				if(type == 'tab' && navitem.loaded) {
+					return
+				}
+				if (navitem.loadingType == 'noMore' || navitem.loadingType == 'loading') {
+					return
+				}
+				navitem.loadingType = 'loading'
+				getMyCoupons({
+					pages: navitem.page,
+					limit: navitem.limit
+				}, navitem.state).then(({data}) => {
+					let da = data.map(e => {
+						e.coupon_price = +(e.coupon_price.replace(',', ''));
+						e.use_min_price = +e.use_min_price.replace(',', '');
+						return e
+					});
+					navitem.orderList = navitem.orderList.concat(da);
+					console.log(navitem.orderList);
+					navitem.page++;
+					if (navitem.limit == data.length) {
+						// 判断是否还有数据,有改为more,没有改为noMore
+						navitem.loadingType = 'more';
+						return;
+					}else {
+						navitem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navitem, 'loaded', true);
+				})
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+				this.getMyCoupons()
+			},
+			//swiper 切换
+			changeTab(e) {
+				console.log(e, 'eeeeeeeeeeeeeeeeee')
+				if (e.target.current > this.navList.length - 1) {
+					this.tabCurrentIndex = 0
+				} else {
+					this.tabCurrentIndex = e.target.current;
+				}
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: $page-color-base;
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		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: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: #FF4C4C;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #FF4C4C;
+				}
+			}
+		}
+	}
+
+	.swiper-box {
+		height: calc(100% - 40px);
+
+		.tab-content {
+			// padding: 25rpx 0px;
+			font-size: 28rpx;
+			color: #1b1b1b;
+		}
+	}
+
+	.kp-item {
+		width: 690rpx;
+		height: 240rpx;
+		margin: 0 auto 20rpx;
+		position: relative;
+
+		.kp-bg {
+			width: 690rpx;
+			height: 240rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+
+		.kp-left {
+			width: 221rpx;
+			height: 240rpx;
+			justify-content: center;
+			align-items: center;
+			position: relative;
+			flex-shrink: 0;
+
+			.left-val {
+				font-size: 90rpx;
+				font-weight: 400;
+				color: #FFFFFF;
+				text-shadow: 0px 10px 5px rgba(255, 125, 69, 0.3);
+
+				&::before {
+					content: '¥';
+					font-size: 40rpx;
+					font-weight: 400;
+					color: #FFFFFF;
+				}
+			}
+		}
+
+		.kp-right {
+			// width: 648rpx;
+			flex-grow: 1;
+			height: 240rpx;
+			position: relative;
+			// background: #000;
+			flex-direction: column;
+			justify-content: space-between;
+			padding: 40rpx;
+			align-items: flex-end;
+			text-align: right;
+
+			.right-tit {
+				font-size: 40rpx;
+				font-weight: 400;
+				color: #FFFFFF;
+			}
+
+			.right-tip {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #FFFFFF;
+			}
+
+			.right-time {
+				font-size: 20rpx;
+				font-weight: bold;
+				color: #FFFFFF;
+			}
+		}
+	}
+
+	.sy {
+		.kp-left {
+			.left-val {
+				text-shadow: 0px 10px 5px rgba(173, 173, 173, 0.3);
+			}
+		}
+
+	}
+</style>

+ 270 - 0
pages/index/bdzq.vue

@@ -0,0 +1,270 @@
+<template>
+	<view class="content">
+		<!-- #ifdef APP-PLUS -->
+		<view class="status_bar"></view>
+		<!-- #endif -->
+		<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="top-bg flex">
+			<image src="../../static/img/bd-mbg.png" mode=""></image>
+		</view>
+		<view class="bastgood-box">
+			<view class="bg-bg">
+
+			</view>
+			<view v-for="(item, index) in list" :key="item.id" class="guess-item">
+				<image :src="item.image"></image>
+				<view class="guess-box">
+					<view class="title clamp2">{{item.store_name}}</view>
+					<view class="info">
+						<view class="price-box flex">
+							<image src="../../static/icon/xfq.png" mode="widthFix"></image>
+							<view class="jiang">赠送积分{{item.give_integral*1}}个</view>
+						</view>
+						<view class="price">¥{{ item.price }}
+							<view class="yuanprice">¥{{item.ot_price*1}}</view>
+						</view>
+					</view>
+
+					<view class="btn" @click.stop="navTo('/pages/product/product?id=' + item.id + '&is_xf=0&is_bk=1')">
+						立即购买</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getProducts
+	} from '@/api/product.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more'
+			}
+		},
+		onLoad() {
+			this.getProducts()
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+			this.getProducts()
+		},
+		onReady() {
+
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			toBack() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			getProducts() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getProducts({
+					sid: 2,
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					console.log(res)
+					obj.list = obj.list.concat(res.data)
+					obj.page++
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #fff;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #ff6100;
+	}
+
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		background-color: #ff6100;
+		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;
+		}
+	}
+
+	.top-bg {
+		background: #ff6100;
+		justify-content: center;
+		align-items: center;
+		padding: 30rpx 0;
+
+		image {
+			width: 700rpx;
+			height: 350rpx;
+			border-radius: 20rpx;
+
+		}
+	}
+
+	.bastgood-box {
+		background-color: #ffffff;
+		position: relative;
+
+		.bg-bg {
+			position: absolute;
+			height: 380rpx;
+			width: 750rpx;
+			top: 0;
+			left: 0;
+			background: linear-gradient(180deg, #ff6100, #fff);
+		}
+
+		.guess-item {
+			display: flex;
+			width: 710rpx;
+			background: #ffffff;
+			box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			padding: 15rpx;
+			margin: 0rpx auto 20rpx;
+			position: relative;
+
+			image {
+				width: 236rpx;
+				height: 236rpx;
+				border-radius: 10rpx;
+			}
+
+			.guess-box {
+				padding: 12rpx 0 15rpx 24rpx;
+				width: 436rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.title {
+					font-size: 32rpx;
+					padding-left: 4rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					width: 368rpx;
+					line-height: 36rpx;
+				}
+
+				.price-box {
+					// margin-top: 76rpx;
+					justify-content: flex-start;
+
+					image {
+						width: 28rpx;
+					}
+
+					.jiang {
+						padding-left: 4rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #b59467;
+					}
+				}
+
+				.price {
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff1135;
+					display: flex;
+					align-items: center;
+
+					.yuanprice {
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #999999;
+						padding-left: 6rpx;
+					}
+				}
+
+				.btn {
+					width: 138rpx;
+					height: 52rpx;
+					background: #ff4c4c;
+					border-radius: 26rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ffffff;
+					line-height: 52rpx;
+					text-align: center;
+					position: absolute;
+					bottom: 25rpx;
+					right: 25rpx;
+				}
+			}
+		}
+	}
+</style>

+ 356 - 431
pages/index/index.vue

@@ -11,183 +11,187 @@
 		<!-- 顶部logo and 搜索 end-->
 		<view class="jg"></view>
 		<!-- 轮播图 start -->
-		<swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
-			<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
-				@click="bannerNavToUrl(item)">
-				<image :src="item.pic" />
-			</swiper-item>
-		</swiper>
+		<view class="swiper-wrap">
+			<swiper class="top-swiper" autoplay="true" duration="400" interval="5000" @change="swiperChange">
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
+					@click="bannerNavToUrl(item)">
+					<image :src="item.pic" />
+				</swiper-item>
+			</swiper>
+		</view>
 		<!-- 轮播图 end -->
-		<view class="swiper-btm flex">
-			<view class="btm-item flex">
-				<image src="../../static/icon/index-gou.png" mode=""></image>
-				<view class="">自用购物返利</view>
+		<view class="jg"></view>
+		<!-- 分类 start-->
+		<view class="cate-section flex">
+			<view class="cate-item flex" @click="nav('/pages/index/rxbd')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/c1.png" mode=""></image>
+				</view>
+				<view class="item-title">热销榜</view>
 			</view>
-			<view class="btm-item flex">
-				<image src="../../static/icon/index-gou.png" mode=""></image>
-				<view class="">分享好友赚钱</view>
+			<view class="cate-item flex" @click="goCp()">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/c2.png" mode=""></image>
+				</view>
+				<view class="item-title">环球国际</view>
 			</view>
-			<view class="btm-item flex">
-				<image src="../../static/icon/index-gou.png" mode=""></image>
-				<view class="">超值正品优惠</view>
+			<view class="cate-item flex" @click="openGg()">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/c3.png" mode=""></image>
+				</view>
+				<view class="item-title">视频领奖</view>
 			</view>
-		</view>
-		<!-- 预约 start-->
-		<view class="yuyue-wrap">
-			<view class="yuyue-top flex">
-				<image src="../../static/img/yuyue-top.png" mode="heightFix"></image>
+			<view class="cate-item flex" @click="nav('/pages/coupon/couponList')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/c4.png" mode=""></image>
+				</view>
+				<view class="item-title">领券中心</view>
 			</view>
-			<view class="yuyue-item" v-for="item in changCiList">
-				<view class="item-top">
-					<image src="../../static/img/yuyue.png" mode=""></image>
-					<view class="item-top-info flex">
-						<view class="">
-							{{item.name}}<text>/大家都在买</text>
-						</view>
-						<view class="goto">
-							GO>
-						</view>
-					</view>
+			<view class="cate-item flex" @click="nav('/pages/user/shareQrCode')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/c5.png" mode=""></image>
+				</view>
+				<view class="item-title">邀请有礼</view>
+			</view>
+		</view>
+		<!-- 分类 end-->
+		<!-- 专区 start -->
+		<view class="zq-wrap flex">
+			<view class="zq-item" @click="nav('/pages/index/xfqzq')">
+				<view class="zq-tit">
+					消费券专区
 				</view>
 				<view class="item-info flex">
-					<view class="item-img">
-						<image :src="item.image" mode=""></image>
-					</view>
-					<view class="item-val flex">
-						<view class="item-status">
-							{{!item.djs.over ? '距离预约结束': (!item.jcdjs.over?'距离开始进场':(!item.jsdjs.over?'活动进行中': '活动已结束'))}}
-						</view>
-						<view class="item-djs">
-							<!-- 预约倒计时 -->
-							<uni-countdown v-if="!item.djs.over" color="#C6914E" background-color="#F6EFDF"
-								:show-day="false" :day="item.djs.day" :hour="item.djs.hours" :minute="item.djs.minutes"
-								:second="item.djs.seconds"></uni-countdown>
-							<!-- 进场倒计时 -->
-							<uni-countdown v-if="item.djs.over && !item.jcdjs.over" color="#C6914E"
-								background-color="#F6EFDF" :show-day="false" :day="item.jcdjs.day"
-								:hour="item.jcdjs.hours" :minute="item.jcdjs.minutes" :second="item.jcdjs.seconds">
-							</uni-countdown>
-							<!-- 场次结束倒计时 -->
-							<uni-countdown v-if="item.jcdjs.over && !item.jsdjs.over" color="#C6914E"
-								background-color="#F6EFDF" :show-day="false" :day="item.jsdjs.day"
-								:hour="item.jsdjs.hours" :minute="item.jsdjs.minutes" :second="item.jsdjs.seconds">
-							</uni-countdown>
-							<!-- 第二天倒计时 -->
-							<uni-countdown v-if="item.jsdjs.over" color="#C6914E" background-color="#F6EFDF"
-								:show-day="false" :day="item.xcdjs.day" :hour="item.xcdjs.hours"
-								:minute="item.xcdjs.minutes" :second="item.xcdjs.seconds"></uni-countdown>
-							<!-- 							<view class="" v-if="item.jsdjs.over" style="color: #dc262b;">
-								活动已结束
-							</view> -->
-						</view>
-						<view class="item-base">
-							开始时间 {{item.radd_time}} 结束时间 {{item.rend_time }}
-						</view>
-						<view class="item-btn" @click="yuyue(item)"
-							:class="{'yuyue': item.sta == 1,'jcf': item.sta == 2 && !item.jsdjs.over }">
-							<!-- 	{{item.sta == 2 ? '立即进场': (item.djs.over ? '已结束': '立即预约')}} -->
-							<!-- {{item.sta == 2 ? '立即进场' : '立即预约'}} -->
-							{{item.str}}
-						</view>
+					<image src="../../static/img/xf-bg.png" mode=""></image>
+					<view class="info-tit">
+						<image src="../../static/icon/ms.png" mode="widthFix"></image>
 					</view>
-
 				</view>
 			</view>
-		</view>
-		<!-- 预约 end-->
-		<!-- 预约弹窗 start-->
-		<uni-popup ref="popupyy" type="bottom">
-			<view class="popupyy-wrap">
-				<view class="popupyy-top">
-					预约活动
-				</view>
-				<view class="popupyy-tit">
-					本次预约冻结广告值
+			<view class="zq-item bd" @click="nav('/pages/index/bdzq')">
+				<view class="zq-tit">
+					爆品专区
 				</view>
-				<view class="popupyy-val">
-					{{ yuyueInfo.advert }}
+				<view class="item-info flex">
+					<image src="../../static/img/bd-bg.png" mode=""></image>
+					<view class="info-tit">
+						<image src="../../static/icon/bd.png" mode="widthFix"></image>
+					</view>
 				</view>
-				<view class="" style="margin-top: 50rpx;">
-					消费积分不低于{{yuyueInfo.lowest }}
+			</view>
+		</view>
+		<!-- 专区 end -->
+		<!-- 商品列表 start -->
+		<view class="product-box">
+			<view class="product-tit flex">
+				<view class="hx">
+
 				</view>
-				<view class="" style="color: #FF4C4C;margin-top: 15rpx;">
-					广告值不低于{{yuyueInfo.minimum }}
+				<view class="tit">
+					猜您喜欢
 				</view>
-				<view class="popupyy-btn" @click="yuyueOk()">
-					确认预约
+				<view class="hx">
+
 				</view>
 			</view>
-		</uni-popup>
-		<!-- 预约弹窗 end-->
-		<!-- 预约成功弹窗 start-->
-		<uni-popup ref="popupyyok" type="center">
-			<view class="popupyyok-wrap">
-				<image src="../../static/img/yuyueok.png" mode="widthFix"></image>
-				<view class="" style="font-size: 35rpx;font-weight: bold;color: #333333;">
-					预约成功!
-				</view>
-				<view class="" style="padding: 20rpx 80rpx;color: #999999;font-size: 26rpx;">
-					恭喜您预约活动成功,请您调好闹钟,准时参与!
-				</view>
-				<view class="btn" @click="$refs.popupyyok.close()">
-					确定
+			<view class="hotgoods">
+				<view class="hotgoods-item" v-for="item in list" :key="item.id"
+					@click="nav('/pages/product/product?id=' + item.id)">
+					<view class="image-wrapper">
+						<image class="image" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="title clamp2">{{item.store_name}}</view>
+					<view class="hot-price">
+						<view class="price">
+							<text class="font-size-sm">¥</text>
+							{{ item.price * 1 }}
+						</view>
+						<view class="yuanPrice">{{ item.ot_price*1 }}</view>
+					</view>
 				</view>
 			</view>
-		</uni-popup>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</view>
+
 	</view>
 </template>
 
 <script>
-	import {
-		timeComputed
-	} from '@/utils/rocessor.js'
-	import {
-		tabbar1
-	} from '@/utils/tabbar.js';
 	import {
 		loadIndexs,
-		getChangCi,
-		subscribe,
-		advance
+		groom1,
+		advertisement
 	} from '@/api/index.js';
-	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
+	import {
+		getProducts
+	} from '@/api/product.js'
 	import {
 		mapState,
 		mapMutations
 	} from 'vuex';
 	export default {
-		components: {
-			uniCountdown
-		},
 		data() {
 			return {
-				current: 0,
-				tabbar: tabbar1,
-				titleNViewBackground: '',
-				swiperCurrent: 0,
-				swiperLength: 0,
 				dataList: '',
 				carouselList: [], //轮播图列表
-				changCiList: [],
-				yuyueInfo: {},
+				page: 1,
+				limit: 10,
+				list: [],
 				loadingType: 'more'
 			};
 		},
 		onLoad() {
 			this.loadData();
-
+			this.getProduct()
 		},
 		onShow() {
-			this.changCiList = []
-			this.getChangCi()
+			console.log(this.$dsbridge, 'dsbridge+++++++++++++')
 		},
 		onHide() {
-			this.changCiList = []
+
+		},
+		onReachBottom() {
+			this.getProduct()
 		},
 		computed: {
 			...mapState('user', ['userInfo'])
 		},
+		// 用户下拉刷新
+		async onPullDownRefresh() {
+			this.page = 1
+			this.loadingType = 'more'
+			this.list = []
+			await this.getProduct()
+			uni.stopPullDownRefresh()
+		},
 		methods: {
+			openGg() {
+				this.$dsbridge.call("fnAds.onShowRewardVideoAD", {}, function(result) {
+					// alert(result);
+					// 奖励状态返回
+					// if(result.event)
+					let res = JSON.parse(result)
+					if(res.event == 'onReward') {
+						
+						advertisement({
+							task:'1'
+						}).then(e => {
+							// alert('奖励已发放')
+							// uni.showToast({
+							// 	title:'奖励已发放',
+							// 	duration:2000
+							// });
+						}).catch(err => {
+						})
+					}
+				});
+			},
+			goCp() {
+				
+			},
+			swiperChange() {
+
+			},
 			loadData() {
 				loadIndexs({})
 					.then(({
@@ -199,12 +203,6 @@
 					})
 					.catch(e => {});
 			},
-			goDetails(e) {
-				console.log(e, '123456');
-				uni.navigateTo({
-					url: '/pages/index/messageInfo'
-				});
-			},
 			nav(url) {
 				uni.navigateTo({
 					url,
@@ -215,93 +213,34 @@
 					}
 				});
 			},
-			//轮播图切换修改背景色
-			swiperChange(e) {
-				const index = e.detail.current;
-				this.swiperCurrent = index;
-				this.titleNViewBackground = this.carouselList[index].background;
-			},
 			// 點擊搜索框
 			clickSearch() {
 				uni.navigateTo({
 					url: '/pages/product/search'
 				});
 			},
-
-			//详情页
-			navToDetailPage(item) {
-				let id = item.id;
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + id
-				});
-			},
-			// 打开预约弹窗
-			yuyue(item) {
-
-				if (item.sta == 2) {
-					// 进场
-					advance({
-						id: item.id
-					}).then(res => {
-						console.log(res)
-						uni.navigateTo({
-							url: '/pages/index/yuyuechang?id=' + item.id
-						})
-					})
-				} else {
-					this.yuyueInfo = item
-					this.$refs.popupyy.open()
-				}
-
-			},
-			// 确定预约
-			yuyueOk() {
+			// getProduct
+			getProduct() {
 				let obj = this
-				// 判断广告值
-				if (obj.yuyueInfo.minimum * 1 > obj.userInfo.aid_val * 1) {
-					return obj.$api.msg('您当前广告值不足')
-				}
-				// 判断消费账户
-				if (obj.yuyueInfo.lowest * 1 > obj.userInfo.now_money * 1) {
-					return obj.$api.msg('您当前消费账户不足')
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
 				}
-				subscribe({
-					id: obj.yuyueInfo.id
+				obj.loadingType = 'loading'
+				groom1({
+					page: obj.page,
+					limit: obj.limit
 				}).then(res => {
-					console.log(res, '确定预约')
-					// yuyueInfo
-					let s = obj.changCiList.indexOf(obj.yuyueInfo);
-					obj.changCiList[s].sta = 2;
-					obj.changCiList[s].str = '进入'
-					obj.$refs.popupyy.close()
-					obj.$refs.popupyyok.open()
-				})
-
-			},
-			// 获取场次信息
-			getChangCi() {
-				let obj = this
-				getChangCi({
-					page: 1,
-					limit: 100
-				}).then(res => {
-					console.log(res, '获取场次信息')
-
-					let arr = res.data.map(e => {
-						// 预约倒计时
-						e.djs = timeComputed(e.time)
-						// 进场倒计时
-						e.jcdjs = timeComputed(e.time + 600)
-						// 场次结束倒计时
-						e.jsdjs = timeComputed(e.e_time)
-						// 第二天预约倒计时
-						e.xcdjs = timeComputed(e.time + 86400)
-						return e
-					})
-					console.log(arr)
-					obj.changCiList = arr.reverse()
+					console.log(res)
+					obj.list = obj.list.concat(res.data.list)
+					obj.page++
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
 				})
 			}
+
 		}
 	};
 </script>
@@ -311,31 +250,21 @@
 	.center {
 		min-height: 100%;
 		height: auto;
-		background: #ededed;
+		background: #fff;
 	}
 
 	// 顶部搜索
 	.top-search {
 		height: 80rpx;
-		padding: 0 20rpx;
-		background-color: #fff;
-
-		.top-logo {
-			width: 50rpx;
-			// height: 50rpx;
-			margin-right: 10rpx;
-
-			image {
-				width: 48rpx;
-			}
-
-		}
+		// padding: 0 20rpx;
+		background-color: #f32b09;
+		justify-content: center;
 
 		.search-box {
 			justify-content: center;
-			width: 698rpx;
+			width: 700rpx;
 			height: 60rpx;
-			background: #EEEEEE;
+			background: #fff;
 			// box-shadow: 0px 10rpx 20rpx 0px rgba(4, 114, 69, 0.22);
 			border-radius: 30rpx;
 
@@ -355,17 +284,25 @@
 	}
 
 	// 顶部轮播图
-	.top-swiper {
+	.swiper-wrap {
 		width: 750rpx;
-		height: 360rpx;
+		background-color: #f32b09;
+
+		.top-swiper {
+			width: 700rpx;
+			height: 350rpx;
+			margin: auto;
+			border-radius: 20rpx;
 
-		// margin: 20rpx 0 0;
-		image {
-			width: 750rpx;
-			height: 360rpx;
+			image {
+				width: 700rpx;
+				height: 350rpx;
+				border-radius: 20rpx;
+			}
 		}
 	}
 
+
 	.swiper-btm {
 		height: 60rpx;
 		width: 750rpx;
@@ -389,243 +326,231 @@
 
 	.jg {
 		height: 20rpx;
-		background-color: #fff;
+		background-color: #f32b09;
 	}
 
-	.yuyue-wrap {
-		background-color: #fff;
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #f32b09;
+	}
 
-		.yuyue-top {
-			height: 117rpx;
+	// 分类
+	.cate-section {
+		justify-content: space-around;
+		background-color: #fff;
+		padding: 0rpx 0 30rpx;
+		background: #f32b09;
+
+		.cate-item {
+			flex-grow: 0;
+			width: 20%;
+			flex-direction: column;
+			text-align: center;
+			align-items: center;
 			justify-content: center;
 
-			image {
-				display: inline-block;
-				height: 31rpx;
-				margin: auto;
-			}
-		}
-
-		.yuyue-item {
-			width: 690rpx;
-			margin: auto;
-
-			.item-top {
-				width: 690rpx;
-				height: 80rpx;
-				border-radius: 18rpx;
-				// background-color: #bfa;
+			.img-wrapper {
+				width: 90rpx;
+				height: 90rpx;
+				border-radius: 20rpx;
 				position: relative;
 
 				image {
-					width: 690rpx;
-					height: 80rpx;
-					// position: relative;
-				}
-
-				.item-top-info {
-					width: 690rpx;
-					height: 80rpx;
+					width: 90rpx;
+					height: 90rpx;
 					position: absolute;
-					top: 0;
-					left: 0;
-					font-size: 33rpx;
-					font-weight: bold;
-					color: #C6914E;
-					padding-left: 35rpx;
-					padding-right: 25rpx;
-
-					text {
-						font-size: 22rpx;
-						font-weight: 500;
-						color: #C6914E;
-					}
-
-					.goto {
-						width: 60rpx;
-						line-height: 26rpx;
-						background: #C6914E;
-						border-radius: 12rpx;
-						font-size: 18rpx;
-						font-weight: 500;
-						color: #FFFFFF;
-						text-align: center;
-					}
+					left: 50%;
+					top: 50%;
+					transform: translate(-50%, -50%);
 				}
 			}
 
-			.item-info {
-				width: 690rpx;
-				height: 252rpx;
-				margin-top: -20rpx;
-				background: #FFFFFF;
-				box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-				border-radius: 0px 0px 20rpx 20rpx;
-				padding: 0 25rpx;
-				margin-bottom: 20rpx;
+			.item-title {
+				margin-top: 15rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		}
+	}
 
-				.item-img {
-					width: 134rpx;
-					height: 133rpx;
-					background-color: #999;
-					flex-shrink: 0;
+	// 专区
+	.zq-wrap {
+		height: 345rpx;
+		width: 750rpx;
+		background: linear-gradient(180deg, #f32b09, #fff);
 
-					image {
-						width: 134rpx;
-						height: 133rpx;
-					}
-				}
+		padding: 0 27rpx;
 
-				.item-val {
-					flex-grow: 1;
-					height: 100%;
-					// background-color: #009688;
-					position: relative;
-					flex-direction: column;
-					align-items: flex-start;
-					padding-left: 25rpx;
-					justify-content: center;
-
-					.item-djs {
-						margin: 20rpx 0;
-						height: 42rpx;
-					}
+		.zq-item {
+			width: 342rpx;
+			height: 300rpx;
+			background: linear-gradient(180deg, #fc2f40, #fb829e);
+			border-radius: 20rpx;
+			box-shadow: 0 0 10rpx rgba(0, 0, 0, 0.2);
+			position: relative;
 
-					.item-status {
-						font-size: 26rpx;
-						font-weight: bold;
-						color: #333333;
-					}
+			.zq-tit {
+				padding: 15rpx 0 0 20rpx;
+				font-size: 32rpx;
+				font-weight: bold;
+				font-style: italic;
+				color: #FFFFFF;
+			}
 
-					.item-base {
-						font-size: 25rpx;
-						font-weight: 500;
-						color: #666666;
-					}
+			.item-info {
+				position: absolute;
+				bottom: 8rpx;
+				left: 0;
+				right: 0;
+				margin: auto;
+				width: 324rpx;
+				height: 232rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
 
-					.item-btn {
-						width: 159rpx;
-						height: 59rpx;
-						line-height: 59rpx;
-						background: #CCCCCC;
-						border-radius: 10rpx;
-						position: absolute;
-						right: 0;
-						top: 0;
-						bottom: 0;
-						margin: auto;
-						text-align: center;
-					}
+				image {
+					width: 294rpx;
+					height: 160rpx;
+				}
 
-					.yuyue {
-						background-color: #303030;
-						color: #F8DABA;
-					}
+				.info-tit {
+					margin-top: 12rpx;
+					width: 189rpx;
+					height: 36rpx;
+
+					image {
+						width: 189rpx;
 
-					.jcf {
-						background-color: #f42b4e;
-						color: #fff;
 					}
 				}
-
 			}
 		}
+
+		.bd {
+
+			background: linear-gradient(180deg, #ff601a, #feba9d);
+		}
 	}
 
-	.popupyy-wrap {
-		width: 750rpx;
-		height: 745rpx;
-		background: #FFFFFF;
-		border-radius: 20rpx 20rpx 0px 0px;
-		text-align: center;
-		font-size: 32rpx;
-		color: #999999;
-		font-weight: 500;
-		padding-top: 60rpx;
+	.product-box {
+		margin-top: 20rpx;
+		background: #ffffff;
+		padding: 26rpx 20rpx 20rpx;
 
-		.popupyy-top {
-			font-size: 36rpx;
-			font-weight: 500;
-			color: #333333;
-			position: relative;
+		.product-tit {
+			justify-content: center;
 
-			&::before {
-				content: '';
-				width: 138rpx;
+			.hx {
+				width: 120rpx;
 				height: 1rpx;
-				background: #CBCBCB;
-				position: absolute;
-				top: 0;
-				bottom: 0;
-				left: 124rpx;
-				margin: auto;
+				background: #989898;
 			}
 
-			&::after {
-				content: '';
-				width: 138rpx;
-				height: 1rpx;
-				background: #CBCBCB;
-				position: absolute;
-				top: 0;
-				bottom: 0;
-				right: 124rpx;
-				margin: auto;
+			.tit {
+				margin: 0 70rpx;
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #363636;
 			}
 		}
+	}
 
-		.popupyy-tit {
-			font-size: 32rpx;
-			font-weight: 500;
-			color: #999999;
-			margin-top: 70rpx;
-		}
+	.hotgoods {
+		margin-top: 38rpx;
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		padding: 0 0 30rpx;
+		justify-content: space-between;
+
+		.hotgoods-item {
+			width: 345rpx;
+			background-color: #ffffff;
+			border-radius: 12rpx;
+
+			.image-wrapper {
+				width: 345rpx;
+				height: 345rpx;
+				border-radius: 3px;
+				overflow: hidden;
+				position: relative;
 
-		.popupyy-val {
-			font-size: 67rpx;
-			font-weight: bold;
-			color: #333333;
-			margin-top: 60rpx;
-		}
+				.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;
+				}
 
-		.popupyy-btn {
-			width: 680rpx;
-			line-height: 100rpx;
-			background: #303030;
-			border-radius: 10rpx;
-			font-size: 34rpx;
-			font-weight: 500;
-			color: #F8DABA;
-			margin: 20rpx auto 0;
-		}
-	}
+				.image {
+					width: 100%;
+					height: 100%;
+					opacity: 1;
+					border-radius: 12rpx 12rpx 0 0;
+				}
+			}
 
-	.popupyyok-wrap {
-		height: 707rpx;
-		width: 551rpx;
-		background-color: #fff;
-		border-radius: 20rpx;
-		text-align: center;
+			.title {
+				margin-top: 24rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
 
-		image {
-			width: 100%;
-		}
+			.hot-price {
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				padding: 14rpx 0 30rpx;
+
+				.hotPrice-box {
+					padding: 2rpx 6rpx;
+
+					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;
+				}
 
-		.btn {
-			width: 295rpx;
-			line-height: 69rpx;
-			border-radius: 34rpx;
-			background: #303030;
-			color: #F8DABA;
-			font-size: 35rpx;
-			color: #F8DABA;
-			margin: auto;
-		}
-	}
+				.price {
+					margin-left: 10rpx;
+					font-size: 40rpx;
+					color: #ff0000;
+					font-weight: 500;
+				}
 
-	.status_bar {
-		height: var(--status-bar-height);
-		width: 100%;
-		background: #fff;
+				.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;
+					}
+				}
+			}
+		}
 	}
 </style>

+ 269 - 0
pages/index/rxbd.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="content">
+		<!-- #ifdef APP-PLUS -->
+		<view class="status_bar"></view>
+		<!-- #endif -->
+
+		<view class="top-bg">
+			<image src="../../static/img/rx-mbg.png" mode="widthFix" style="width: 750rpx;"></image>
+			<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>
+		<view class="bastgood-box">
+			<view v-for="(item, index) in list" :key="index" class="guess-item">
+				<image :src="item.image"></image>
+				<view class="guess-box flex">
+					<view class="title clamp2">{{ item.store_name}}</view>
+					<view class="">
+						<view class="price-box flex" v-if="(item.ot_price*1 - item.price*1) > 0">
+							<view class="yuanprice">{{ item.ot_price*1 }}</view>
+							<image src="../../static/icon/down.png" mode=""></image>
+							<view class="jiang">直降{{ (item.ot_price*1 - item.price*1).toFixed(0) }}元</view>
+						</view>
+						<view class="price">¥{{ item.price*1}}</view>
+					</view>
+					<view class="btn" @click.stop="navTo('/pages/product/product?id='+ item.id)">
+						立即购买</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getProducts
+	} from '@/api/product.js'
+	import {
+		groom4
+	} from '@/api/index.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more'
+			}
+		},
+		onLoad() {
+			this.getProducts()
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+			this.getProducts()
+		},
+		onReady() {
+
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			toBack() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			getProducts() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				groom4({
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					console.log(res)
+					obj.list = obj.list.concat(res.data.list)
+					obj.page++
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+				})
+			}
+		}
+
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #fff;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.top-bg {
+		position: relative;
+		width: 750rpx;
+		height: 591rpx;
+
+		image {
+			width: 750rpx;
+			height: 591rpx;
+			position: absolute;
+		}
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		// background: #dcae6d;
+	}
+
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		// background-color:#dcae6d;
+		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;
+		}
+	}
+
+	.bastgood-box {
+		// margin-top: 20rpx;
+		background-color: #ffffff;
+		padding: 0rpx 0 40rpx;
+		// border-radius: 70rpx 70rpx 0 0;
+
+		.bast-bg {
+			width: 376rpx;
+			height: 34rpx;
+			margin: 0 auto;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.guess-item {
+			display: flex;
+			width: 710rpx;
+			background: #ffffff;
+			box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			// padding: 15rpx;
+			margin: 0 auto 20rpx;
+			position: relative;
+
+			image {
+				width: 236rpx;
+				height: 236rpx;
+				border-radius: 10rpx;
+			}
+
+			.guess-box {
+				padding: 12rpx 0 12rpx 24rpx;
+				width: 436rpx;
+				flex-direction: column;
+				justify-content: space-between;
+				align-items: flex-start;
+
+				.title {
+					font-size: 32rpx;
+					padding-left: 4rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					width: 368rpx;
+					line-height: 36rpx;
+				}
+
+				.price-box {
+					justify-content: flex-start;
+
+					.yuanprice {
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #999999;
+						padding-right: 6rpx;
+					}
+
+					image {
+						width: 16rpx;
+						height: 18rpx;
+					}
+
+					.jiang {
+						padding-left: 2rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #b59467;
+					}
+				}
+
+				.price {
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff1135;
+				}
+
+				.btn {
+					width: 138rpx;
+					height: 52rpx;
+					background: #FF4C4C;
+					border-radius: 26rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ffffff;
+					line-height: 52rpx;
+					text-align: center;
+					position: absolute;
+					bottom: 25rpx;
+					right: 25rpx;
+				}
+			}
+		}
+	}
+</style>

+ 0 - 177
pages/index/sign.vue

@@ -1,177 +0,0 @@
-<template>
-	<view>
-		<view class="title-box">
-			<view class=" title-conetnt  position-relative">
-				<view class="title-img"><image src="/static/img/img08.png" mode="aspectFit"></image></view>
-				<view class="title-content-box">
-					<view class="title-text">已连续签到</view>
-					<view class="title-day-text">
-						<text class="title-day">{{actionDay}}</text>
-						<text>天</text>
-					</view>
-					<view class="title-button" :class="{'signAction':signTrue}" @click="signTrue?'':integral()">{{signTrue?'已签到':'立即签到'}}</view>
-				</view>
-			</view>
-			<view class="title-tip"><text>共获得{{sum_integral}}积分,总签到{{allSign}}天</text></view>
-		</view>
-		<calendar class="sign-date-box" :checks="signList" checksClass="" :checkTextShow="true" checksIcon="/static/img/img07.png"></calendar>
-	</view>
-</template>
-
-<script>
-import calendar from '../../components/ss-calendar/ss-calendar.vue';
-import { signList, integral,signUser } from '@/api/functionalUnit.js';
-export default {
-	components: {
-		calendar
-	},
-	data() {
-		return {
-			money: '', //保存当前月份
-			year: '', //保存当前年份
-			day: '', //保存当前日期
-			signList: [] ,//签到日子列表
-			actionDay:0,//连续签到天数
-			allSign:0,//累计签到
-			sum_integral:0,//累计获得积分
-			signTrue:false,
-		};
-	},
-	onLoad() {
-		this.signUser();
-		this.getData();
-		this.loadList();
-	},
-	methods: {
-		// 获取当前时间
-		getData(current) {
-			const date = current ? new Date(current) : new Date();
-			this.year = date.getFullYear();//保存当前年份
-			this.month = date.getMonth() + 1;//保存当前月份
-			this.day = date.getDate();//保存当前日期
-		},
-		//获取签到用户信息
-		signUser(){
-			signUser({all:1}).then(({data}) => {
-				this.actionDay = data.sign_num;//连续签到天数
-				this.allSign = data.sum_sgin_day;//累计签到天数
-				this.sum_integral = data.sum_integral;//累计总积分
-			})
-		},
-		// 签到
-		integral() {
-			integral({})
-				.then(e => {
-					// 改为已签到
-					this.signTrue = true;
-					this.actionDay++;
-					// 保存签到成功
-					this.signList.push(this.day);
-					uni.showToast({
-						title: '签到成功',
-						duration: 2000,
-						position: 'top'
-					});
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 获取签到列表
-		loadList() {
-			let obj = this;
-			let present = this.day; //保存当前天数用于后续计算
-			let actionDay = 0; //用于计算活跃天数
-			let arr = []; //保存返回数组;
-			signList({
-				page: 1,
-				limit: 31
-			}).then(e => {
-				arr = e.data.map((e, ind) => {
-					let time = e.add_time.split('-');
-					let day = parseInt(time[2].replace(/^0/i, ''));
-					let year = time[0];
-					let month = +time[1];
-					if (obj.year == year && obj.month == month) {
-						return day;
-					}
-				});
-				this.signList = arr;
-				// 判断今天是否已经签到
-				if(arr[0]==this.day){
-					this.signTrue = true;
-				}
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-}
-.sign-date-box {
-	margin: 25rpx;
-	border-radius: 15rpx;
-	margin-top: -70rpx;
-}
-.title-box {
-	background-color: $base-color;
-	padding-top: 120rpx;
-	color: #ffffff;
-	height: 590rpx;
-	.title-conetnt {
-		height: 350rpx;
-		width: 350rpx;
-		margin: 0 auto;
-		text-align: center;
-		.title-img {
-			position: absolute;
-			top: 0;
-			left: 0;
-			height: 100%;
-			width: 100%;
-			image {
-				height: 100%;
-				width: 100%;
-			}
-		}
-		.title-content-box {
-			position: absolute;
-			width: 100%;
-			.title-day-text {
-				padding: 20rpx;
-				font-size: $font-base - 2rpx;
-				.title-day {
-					font-size: 60rpx;
-				}
-			}
-			.title-text {
-				font-size: 26rpx;
-				padding-top: 100rpx;
-			}
-			.title-button {
-				background-color: #fe7e51;
-				border-radius: 99rpx;
-				width: 200rpx;
-				height: 64rpx;
-				margin: 0 auto;
-				line-height: 64rpx;
-				text-align: center;
-				font-size: $font-base;
-				&.signAction{
-					background-color: $font-color-light;
-				}
-			}
-		}
-	}
-}
-.title-tip {
-	color: #ffffff;
-	font-size: $font-base - 2rpx;
-	padding-top: 20rpx;
-	text-align: center;
-	margin-top: -40rpx;
-}
-</style>

+ 269 - 0
pages/index/xfqzq.vue

@@ -0,0 +1,269 @@
+<template>
+	<view class="content">
+		<!-- #ifdef APP-PLUS -->
+		<view class="status_bar"></view>
+		<!-- #endif -->
+		<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="top-bg flex">
+			<image src="../../static/img/xf-mbg.png" mode=""></image>
+		</view>
+		<view class="bastgood-box">
+			<view class="bg-bg"></view>
+			<view v-for="(item, index) in list" :key="item.id" class="guess-item">
+				<image :src="item.image"></image>
+				<view class="guess-box">
+					<view class="title clamp2">{{item.store_name}}</view>
+					<view class="info">
+						<view class="price-box flex">
+							<image src="../../static/icon/xfq.png" mode="widthFix"></image>
+							<view class="jiang">可抵用消费券</view>
+						</view>
+						<view class="price">¥{{ item.price }}
+							<view class="yuanprice">¥{{item.ot_price*1}}</view>
+						</view>
+					</view>
+
+					<view class="btn" @click.stop="navTo('/pages/product/product?id='+ item.id + '&is_xf=1&is_bk=0')">
+						立即购买</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		getProducts
+	} from '@/api/product.js'
+	export default {
+		data() {
+			return {
+				page: 1,
+				limit: 10,
+				list: [],
+				loadingType: 'more'
+			}
+		},
+		onLoad() {
+			this.getProducts()
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+			this.getProducts()
+		},
+		onReady() {
+
+		},
+		methods: {
+			navTo(url) {
+				uni.navigateTo({
+					url
+				})
+			},
+			toBack() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			getProducts() {
+				let obj = this
+				if (obj.loadingType == 'noMore' || obj.loadingType == 'loading') {
+					return
+				}
+				obj.loadingType = 'loading'
+				getProducts({
+					sid: 4,
+					page: obj.page,
+					limit: obj.limit
+				}).then(res => {
+					console.log(res)
+					obj.list = obj.list.concat(res.data)
+					obj.page++
+					if (obj.limit == res.data.length) {
+						obj.loadingType = 'more'
+					} else {
+						obj.loadingType = 'noMore'
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+		height: auto;
+		min-height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #f32b09;
+	}
+
+	.top-bg {
+		background: #f32b09;
+		justify-content: center;
+		align-items: center;
+		padding: 30rpx 0;
+
+		image {
+			width: 700rpx;
+			height: 350rpx;
+			border-radius: 20rpx;
+
+		}
+	}
+
+	.bastgood-box {
+		background-color: #ffffff;
+		position: relative;
+
+		.bg-bg {
+			position: absolute;
+			height: 380rpx;
+			width: 750rpx;
+			top: 0;
+			left: 0;
+			background: linear-gradient(180deg, #f32b09, #fff);
+		}
+
+		.guess-item {
+			display: flex;
+			width: 710rpx;
+			background: #ffffff;
+			box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+			border-radius: 10rpx;
+			padding: 15rpx;
+			margin: 0rpx auto 20rpx;
+			position: relative;
+
+			image {
+				width: 236rpx;
+				height: 236rpx;
+				border-radius: 10rpx;
+			}
+
+			.guess-box {
+				padding: 12rpx 0 15rpx 24rpx;
+				width: 436rpx;
+				display: flex;
+				flex-direction: column;
+				justify-content: space-between;
+
+				.title {
+					font-size: 32rpx;
+					padding-left: 4rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					width: 368rpx;
+					line-height: 36rpx;
+				}
+
+				.price-box {
+					// margin-top: 76rpx;
+					justify-content: flex-start;
+
+					image {
+						width: 28rpx;
+					}
+
+					.jiang {
+						padding-left: 4rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: bold;
+						color: #b59467;
+					}
+				}
+
+				.price {
+					font-size: 36rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ff1135;
+					display: flex;
+					align-items: center;
+
+					.yuanprice {
+						font-size: 26rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						text-decoration: line-through;
+						color: #999999;
+						padding-left: 6rpx;
+					}
+				}
+
+				.btn {
+					width: 138rpx;
+					height: 52rpx;
+					background: #ff4c4c;
+					border-radius: 26rpx;
+					font-size: 26rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #ffffff;
+					line-height: 52rpx;
+					text-align: center;
+					position: absolute;
+					bottom: 25rpx;
+					right: 25rpx;
+				}
+			}
+		}
+	}
+
+	.body-title {
+		height: 80rpx;
+		text-align: center;
+		font-size: 35rpx;
+		background-color: #f32b09;
+		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;
+		}
+	}
+</style>

+ 0 - 353
pages/index/yuyuechang.vue

@@ -1,353 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-bg">
-			<image src="../../static/img/yuyue-top.jpg" mode="widthFix"></image>
-		</view>
-		<!-- <view class="changci-top flex">
-			<view class="djs-wrap flex">
-				倒计时: 
-				<uni-countdown
-					color="#C6914E"
-					background-color="#F6EFDF"
-					:show-day="false"
-					:day="0"
-					:hour="0"
-					:minute="0"
-					:second="0"
-				></uni-countdown>
-			</view>
-			<view class="user-info">
-				<view class="" style="text-align: right;">
-					消费账户:{{userInfo.now_money*1 || '0'}}
-				</view>
-				<view class="" style="text-align: right;">
-					广告值: {{userInfo.aid_val*1 || '0'}}
-				</view>
-			</view>
-		</view> -->
-		<view class="" v-for="item in area">
-			<view class="good-tit flex">
-				<view class="tit-left flex">
-					<image src="../../static/icon/red-tit.png" mode=""></image>{{item.name}}
-				</view>
-				<view class="tit-right">
-					挂售金额:{{item.low}} ~ {{ item.high }}
-				</view>
-			</view>
-			<view class="good-list flex" @click="(status==2 ||status==0) ?goumai(item): opentc()">
-				<image src="../../static/icon/red-gift.png" mode="widthFix" v-for="itemg in 35"></image>
-			</view>
-		</view>
-		<uni-popup ref="popupyyok" type="center">
-			<view class="popupyyok-wrap">
-				<image :src="good.image" mode="" @click.stop="goDetail()"></image>
-				<view class="clamp2" style="padding: 20rpx 80rpx;color: #999999;font-size: 26rpx;">
-					{{good.name}}
-				</view>
-				<view class="" style="font-size: 35rpx;font-weight: bold;color: #333333;">
-					{{good.actual_price}}
-				</view>
-				<view class="btn" @click.stop="(good.status == 1 || good.status == 0) ?zhifu(): goDetail()">
-					{{(good.status == 1 ||good.status == 0) ? '立即支付':'查看详情'}}
-				</view>
-			</view>
-		</uni-popup>
-		<uni-popup ref="uppass" type="center">
-			<view class="psw-wrapper">
-				<view class="psw-title">请输入支付密码</view>
-				<view class="psw-content">购买需支付消费积分</view>
-				<view class="psw-price">
-					{{good.actual_price}}
-				</view>
-				<view class="psw-jg"></view>
-				<view class="psw-paytype flex">
-					<view class="">
-						支付方式
-					</view>
-					<view class="">
-						消费积分
-					</view>
-				</view>
-				<input type="password" v-model="password" class="psw-ipt"/>
-				<view class="psw-btn">
-					<text @click="cancel">取消</text>
-					<text class="psw-qd" @click="pswQd">确定</text>
-				</view>
-			</view>
-		</uni-popup>
-	</view>
-</template>
-
-<script>
-	import {
-		section,
-		purchase,
-		zfpay,
-		see_order
-	} from '@/api/index.js'
-	import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	export default {
-		components: {
-			uniCountdown
-		},
-		data() {
-			return {
-				ccid: '',
-				area: [],
-				good: {},
-				status: 2, //1购买了商品2未购买商品
-				password: ''//交易密码
-			}
-		},
-		computed: {
-			...mapState('user', ['userInfo'])
-		},
-		onLoad(opt) {
-			this.ccid = opt.id
-			this.see_order()
-			this.section()
-		},
-		methods: {
-			see_order() {
-				let obj = this
-				see_order({
-					id: obj.ccid
-				}).then(res => {
-					console.log(res.data.status)
-					obj.status = res.data.status
-					if (res.data.status == 1) {
-						obj.good = res.data.order
-						obj.$refs.popupyyok.open()
-					}
-				})
-			},
-			section() {
-				let obj = this
-				section({
-					id: obj.ccid
-				}).then(res => {
-					console.log(res)
-					obj.area = res.data
-				})
-			},
-			goumai(item) {
-				let obj = this
-				purchase({
-					id: obj.ccid,
-					s_id: item.id
-				}).then(res => {
-					console.log(res)
-
-					obj.good = res.data
-					obj.good.status = 1
-					obj.$refs.popupyyok.open()
-				})
-			},
-			zhifu() {
-				let obj = this
-				// zfpay({
-				// 	order_id: obj.good.order_id
-				// }).then(res => {
-				// 	obj.$api.msg('支付成功')
-				// 	obj.$refs.popupyyok.close()
-				// })
-				obj.$refs.popupyyok.close()
-				obj.$refs.uppass.open()
-			},
-			opentc() {
-				let obj = this
-				obj.$refs.popupyyok.open()
-			},
-			goDetail() {
-				console.log(this.good)
-				uni.navigateTo({
-					url: '/pages/product/showpro?id=' + this.good.product_id
-				})
-			},
-			cancel() {
-				let obj = this
-				obj.$refs.uppass.close()
-			},
-			pswQd() {
-				let obj = this
-				zfpay({
-					order_id: obj.good.order_id,
-					pas: obj.password
-				}).then(res => {
-					obj.$api.msg('支付成功')
-					obj.$refs.uppass.close()
-				})
-				
-			},
-			tishi() {
-				return this.$api.msg('当前商品已售罄')
-			}
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.changci-top {
-		background-color: #fff;
-		padding: 0 25rpx;
-		height: 100rpx;
-
-		.djs-wrap {
-			padding-left: 25rpx;
-		}
-	}
-
-	.good-tit {
-		// margin-top: 20rpx;
-		background-color: #fff;
-		padding: 20rpx;
-
-		.tit-left {
-			flex-shrink: 0;
-
-			image {
-				height: 36rpx;
-				width: 36rpx;
-				border-radius: 50%;
-				margin-right: 10rpx;
-			}
-		}
-
-		.tit-right {
-			text-align: right;
-		}
-	}
-
-	.good-list {
-		flex-wrap: wrap;
-		background-color: #fff;
-		padding: 20rpx;
-
-		// justify-content: flex-start;
-		image {
-			width: 80rpx;
-			margin-left: 15rpx;
-		}
-
-	}
-
-	.popupyyok-wrap {
-		height: 707rpx;
-		width: 551rpx;
-		background-color: #fff;
-		border-radius: 20rpx;
-		text-align: center;
-
-		// position: relative;
-		image {
-			width: 100%;
-			height: 429rpx;
-			border-radius: 20rpx 20rpx 0 0;
-		}
-
-		.btn {
-			position: absolute;
-			bottom: 10rpx;
-			left: 0;
-			right: 0;
-			margin: auto;
-			width: 295rpx;
-			line-height: 69rpx;
-			border-radius: 34rpx;
-			background: #303030;
-			color: #F8DABA;
-			font-size: 35rpx;
-			color: #F8DABA;
-		}
-	}
-
-	.top-bg {
-		width: 750rpx;
-		margin-bottom: 20rpx;
-
-		image {
-			width: 100%;
-		}
-	}
-	.uppass-wrap {
-		width: 600rpx;
-		height: 300rpx;
-		background-color: #fff;
-		border-radius: 20rpx;
-		.up-tit {
-			line-height: 100rpx;
-			font-size: 32rpx;
-			font-weight: bold;
-			text-align: center;
-		}
-		.up-ipt {
-			border: 1px solid #000000;
-			display: block;
-			width: 400rpx;
-			background-color: #bfa;
-			height: 100rpx;
-			line-height: 100rpx;
-			font-size: 28rpx;
-			margin: auto;
-			margin-top: 20rpx;
-		}
-	}
-	.psw-wrapper {
-		width: 548rpx;
-		height: 548rpx;
-		background-color: #FFFFFF;
-		border-radius: 15rpx 15rpx;
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 40rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-		.psw-content {
-			width: 100%;
-			font-size: 32rpx;
-			text-align: center;
-		}
-		.psw-price {
-			font-weight: bold;
-			font-size: 68rpx;
-			text-align: center;
-			padding-top: 10rpx;
-		}
-		.psw-jg {
-			height: 1px;
-			width: 500rpx;
-			background-color: #eee;
-			margin: auto;
-		}
-		.psw-paytype {
-			justify-content: space-between;
-			padding: 10rpx 25rpx 30rpx;
-			font-size: 26rpx;
-		}
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-		.psw-btn text{
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-		.psw-qd {
-			color:#5771DF;
-		}
-	}
-</style>

+ 0 - 442
pages/money/jifen.vue

@@ -1,442 +0,0 @@
-<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/jifen.png" mode=""></image></view>
-			<view class="money-box">
-				<view class="money">{{ userInfo.brokerage_price }}</view>
-				<view>余额</view>
-			</view>
-			<view class="money-btn" @click="navto('/pages/money/withdrawal')">
-				兑换置换券
-				<!-- <text>></text> -->
-			</view>
-		</view>
-		<view class="info-box flex">
-			<view class="info-item">
-				<view class="info-font">累计收入</view>
-				<view class="info-num">{{recharge}}</view>
-			</view>
-			<view class="shu"></view>
-			<view class="info-item">
-				<view class="info-font">累计支出</view>
-				<view class="info-num">{{orderStatusSum}}</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: maxheight }" 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 v-if="item.status == 0" class="status">待发放</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 { spreadCommission, userBalance } from '@/api/wallet.js';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
-import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	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.maxheight = resu.windowHeight - res[0].top + 'px';
-					console.log('打印页面的剩余高度', _this.height);
-				});
-			},
-			fail: res => {}
-		});
-	},
-	data() {
-		return {
-			// 头部图高度
-			maxheight: '',
-			tabCurrentIndex: 0,
-			orderStatusSum: 0,
-			recharge: 0,
-			
-			navList: [
-				{
-					state: 0,
-					text: '收入',
-					loadingType: 'more',
-					orderList: [
-						{
-							title:'2233',
-							add_time:'2021-5-4',
-							number:22222
-						},
-						{
-							title:'2233',
-							add_time:'2021-5-4',
-							number:22222
-						},
-						{
-							title:'2233',
-							add_time:'2021-5-4',
-							number:22222
-						},
-						{
-							title:'2233',
-							add_time:'2021-5-4',
-							number:22222
-						}
-					],
-					page: 1, //当前页数
-					limit: 10 ,//每次信息条数
-					loaded: false
-				},
-				{
-					state: 1,
-					text: '支出',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 ,//每次信息条数
-					loaded: false
-				}
-			],
-			money: ''
-		};
-	},
-	onLoad(options) {},
-	onShow() {
-		this.loadData();
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		// 点击返回 我的页面
-		toBack() {
-			uni.navigateBack({});
-		},
-		//获取收入支出信息
-		async loadData(source) {
-			let obj = this;
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state + 3;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			spreadCommission(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					obj.recharge = data.income;
-					obj.orderStatusSum = data.expend;
-						console.log(data);
-					if (data.list.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data.list[0].list);
-						console.log(navItem.orderList);
-						navItem.page++;
-					}else {
-						navItem.loadingType = 'noMore';
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					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-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: 90rpx;
-	color: #ffffff;
-	text-align: center;
-	.money {
-		font-size: 72rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ffffff;
-	}
-	.text {
-		font-size: 30rpx;
-	}
-}
-.money-btn {
-	position: relative;
-	z-index: 2;
-	color: #ffffff;
-	padding-right: 50rpx;
-	text-align: right;
-	font-size: 30rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #FFFFFF;
-	text {
-		display: inline-block;
-		padding-left: 10rpx;
-	}
-}
-
-.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>

+ 24 - 14
pages/money/pay.vue

@@ -19,7 +19,12 @@
 				<view class="con"><text class="tit">支付宝支付</text></view>
 				<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
 			</view> -->
-			<!-- #endif -->
+			<!-- #endif -->
+			<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>
 			<view class="type-item" @click="changePayType(3)">
 				<text class="icon iconfont iconyue"></text>
 				<view class="con">
@@ -40,14 +45,8 @@ import { mapState } from 'vuex';
 export default {
 	data() {
 		return {
-			payType: 3, //支付类型
-			// #ifdef H5
-			payName: 'yue',
-			// #endif
-			// #ifdef MP-WEIXIN
-			payName: 'yue',
-			// #endif
-			payName: 'yue',
+			payType: 2, //支付类型
+			payName: 'alipay',
 			orderInfo: {},
 			money: 0.0, //订单金额
 			now_money: 0.0, //余额
@@ -78,7 +77,8 @@ export default {
 				orderkey: this.orderKey,
 				couponId: prepage.couponChecked.id, //优惠券编号
 				addressId: prepage.addressData.id, //地址编号
-				top_ticket: prepage.checkedPoints ? 1 : 0,
+				useIntegral: prepage.checkedPoints ? 1 : 0,
+				userConsumption: prepage.checkedconsumption ? 1: 0
 			}).then(({ data }) => {
 				// 获取支付金额
 				this.money = data.result.pay_price;
@@ -102,7 +102,7 @@ export default {
 				this.payName = 'weixin';
 			}
 			if (this.payType == 2) {
-				this.payName = 'ali';
+				this.payName = 'alipay';
 			}
 			if (this.payType == 3) {
 				this.payName = 'yue';
@@ -164,7 +164,15 @@ export default {
 						if(obj.payName == 'routine'){
 							wx.requestPayment(data);
 						}
-						// #endif
+						// #endif
+					
+						
+					}
+					if(obj.payName == 'alipay') {
+						// console.log(e.data.result.jsConfig.expend.pay_info,'e.data.result.jsConfig.expend.pay_info')
+						window.location.href=e.data.result.jsConfig.expend.pay_info
+						// this.$alipay
+						
 					}
 					uni.hideLoading();
 					obj.payLoding = false;
@@ -228,8 +236,10 @@ export default {
 				phone: prepage.addressData.phone, //联系人号码
 				couponId: prepage.couponChecked.id, //优惠券编号
 				addressId: prepage.addressData.id, //支付地址id
-				top_ticket: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
-				payType: 'yue', //支付类型  weixin-微信 yue-余额
+				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
+				userConsumption:  prepage.checkedconsumption ? 1: 0,
+				// payType: 'yue', //支付类型  weixin-微信 yue-余额
+				payType: obj.payName,
 				mark: prepage.desc, //备注
 				// #ifdef H5
 				from: obj.froms ? 'weixin' : 'H5', //来源

+ 335 - 96
pages/money/recharge.vue

@@ -1,101 +1,186 @@
 <template>
 	<view class="content">
-		<view class="row-box">
+		<view class="top_box">
+			<text class="yue-tit">当前余额:</text>
+			<text class="yue-num">¥{{ now_money | parseFloatNum }}</text>
+		</view>
+
+		<view class="line_box"></view>
+
+		<view class="cz_box">
+			<view class="cz_wrap">
+				<text class="cz_tit">¥</text>
+				<input class="cz_input" type="number" v-model="money" @focus="changeNum()" placeholder="请输入充值金额" placeholder-class="placeholder" />
+			</view>
+			<view class="zc_list_box">
+				<view class="zc_list_price" :class="{ seletPrice: seletNum == item.price }" @click="seletChange(item, index)" v-for="(item, index) in list" :key="index">
+					{{ item.price | parseFloatNum }}元
+				</view>
+			</view>
+		</view>
+		<!-- <view class="line_box"></view> -->
+
+		<!-- <view class="row-box">
 			<view class="title">充值金额</view>
 			<view class="row">
 				<text class="tit">¥</text>
 				<input class="input" type="number" v-model="money" placeholder="请输入充值金额" placeholder-class="placeholder" />
 			</view>
-		</view>
+		</view> -->
 
-		<view class="list">
-			<radio-group @change="tabRadio">
-				<!-- #ifdef APP-PLUS -->
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconzhifubao"></view>
-						<view class="title-box">
-							<view class="title"><text>支付宝充值</text></view>
-						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>微信充值</text></view>
-							<view class="node"><text>真实姓名(代勇明)</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color=" #5dbc7c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label>
-				<!-- #endif -->
-			</radio-group>
+		<!-- <view class="rechar-box">
+			<view class="rechar-title">注意事项</view>
+			<view class="rechar-text" v-for="(item, index) in zhuyi" :key="index">
+				<text>{{ index + 1 }}.{{item}}</text>
+			</view>
+		</view> -->
+		<view class="line_box"></view>
+		<!-- <view class="cz-type" @click.stop="changePayType('weixin')">
+			<view class="type-left">
+				<view class="icon iconfont iconweixin"></view>
+				<view class="tit">微信充值</view>
+			</view>
+			<view class="right" v-show="loaded"><radio value="weixin" color="#EB001C" :checked="type == 'weixin'" /></view>
+		</view> -->
+		<view class="cz-type" @click.stop="changePayType('alipay')">
+			<view class="type-left">
+				<view class="icon iconfont iconzhifubao"></view>
+				<view class="tit">支付宝充值</view>
+			</view>
+			<view class="right" v-show="loaded"><radio value="weixin" color="#EB001C" :checked="type == 'alipay'" /></view>
 		</view>
-		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</button>
+		<button class="add-btn up" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">立即充值</button>
 	</view>
 </template>
 
 <script>
 import { getMoneyStyle } from '@/utils/rocessor.js';
 // #ifdef H5
-import { rechargeWechat } from '@/api/wallet.js';
+import { rechargeWechat, rechargeIndex } from '@/api/wallet.js';
 // #endif
 // #ifdef MP
-import { rechargeRoutine } from '@/api/wallet.js';
+import { rechargeWechat, rechargeRoutine, rechargeIndex } from '@/api/wallet.js';
 // #endif
 import { mapState } from 'vuex';
+import { spreadCommission, userBalance,moneyChong } from '@/api/wallet.js';
 export default {
 	filters: {
-		getMoneyStyle
+		getMoneyStyle,
+		// 去处小数点后的0
+		parseFloatNum(clock) {
+			return parseFloat(clock);
+		}
 	},
 	data() {
-		return {
-			type: 'weixin',
+		return {
+			loaded:true,
+			type: 'alipay',
 			money: '', //充值金额
-			payLoding: false //是否加载中
+			payLoding: false ,//是否加载中
+			list: [
+				'300',
+				'200',
+				'150',
+				'100',
+				'50'
+			],
+			now_money:'',
+			seletNum: '300',	// 选中
+			zhuyi: [],
+			quota: '',	// 送的钱
+			typeText: 0,	// 0-微信 1-佣金
 		};
 	},
-	onLoad(options) {},
+	onLoad(options) {
+		this.loadData();
+	},
 	computed: {
 		// #ifdef H5
-		...mapState(['weichatObj'])
+		...mapState(['weichatObj', 'userInfo'])
+		// #endif
+		// #ifdef MP
+		...mapState(['userInfo'])
 		// #endif
 	},
-	methods: {
+	methods: {
+		//选择支付方式
+		changePayType(type) {
+			this.loaded = false
+			this.type = type
+			this.loaded = true
+		},
 		// 跳转
 		navTo(url) {
 			uni.navigateTo({
 				url: url
 			});
 		},
+		changeNum() {
+			this.seletNum = this.money = '';
+			console.log(this.seletNum, this.money);
+		},
+		seletChange(item, index) {
+			this.seletNum = item.price;
+			this.seletMoney = item.price;
+			this.money = item.price
+		},
 		// 切换选中对象
 		tabRadio(e) {
-			this.type = e;
+			this.type = e.detail.value;
+			if ( e.detail.value == 'weixin' ) {
+				this.typeText = 0
+			} else {
+				this.typeText = 1
+			}
 		},
+		// 充值金额
+		rechargeXuan(item) {
+			this.money = item.price;
+			this.quota = item.quota;
+		},
+		loadData() {
+			moneyChong({}).then(({data}) =>{
+				console.log(data,"123456789");
+				this.list = data.recharge_quota;
+			});
+			userBalance({}).then(({ data }) => {
+				this.now_money = data.now_money;
+			});
+		},
+
 		// 提交
 		confirm() {
 			let obj = this;
 			obj.payLoding = true;
+			if( !obj.money ) {
+				obj.$api.msg('请输入金额');
+				obj.payLoding = false;
+				return;
+			}
 			// #ifdef H5
-			rechargeWechat({ price: this.money, from: this.type })
-				.then(e => {
-					let da = e.data.data;
-					obj.weichatObj.chooseWXPay({
-						timestamp: da.timestamp,
-						nonceStr: da.nonceStr,
-						package: da.package,
-						signType: da.signType,
-						paySign: da.paySign,
-						success: function(res) {
-							uni.showToast({
-								title: '充值成功',
-								duration: 2000,
-								position: 'top'
-							});
-						}
-					});
+			rechargeWechat({
+				price: this.money,
+				type: '2' ,
+			}).then(e => {
+					// let da = e.data.data;
+					window.location.href=e.data.result.jsConfig.expend.pay_info
+					// obj.weichatObj.chooseWXPay({
+					// 	timestamp: da.timestamp,
+					// 	nonceStr: da.nonceStr,
+					// 	package: da.package,
+					// 	signType: da.signType,
+					// 	paySign: da.paySign,
+					// 	success: function(res) {
+					// 		uni.showToast({
+					// 			title: '充值成功',
+					// 			duration: 2000,
+					// 			position: 'top',
+					// 			success: function(res) {
+					// 				uni.navigateBack()
+					// 			}
+					// 		});
+					// 	}
+					// });
 					obj.payLoding = false;
 				})
 				.catch(e => {
@@ -114,13 +199,18 @@ export default {
 								signType: da.signType,
 								paySign: da.paySign,
 								success: function(res) {
-									uni.redirectTo({
-										url: '/pages/money/paySuccess'
+									uni.showToast({
+										title: '充值成功',
+										duration: 2000,
+										position: 'top',
+										success: function(res) {
+											uni.navigateBack()
+										}
 									});
 								},
-								
+
 							})
-					
+
 					obj.payLoding = false;
 				})
 				.catch(e => {
@@ -129,33 +219,6 @@ export default {
 				});
 			// #endif
 		},
-		//获取订单列表
-		loadData(source) {
-			console.log(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;
-			}
-			navItem.loadingType = 'loading';
-			setTimeout(() => {
-				let orderList = [];
-				orderList.forEach(item => {
-					navItem.orderList.push(item);
-				});
-				//loaded新字段用于表示数据加载完毕,如果为空可以显示空白页
-				this.$set(navItem, 'loaded', true);
-				//判断是否还有数据, 有改为 more, 没有改为noMore
-				navItem.loadingType = 'more';
-			}, 600);
-		}
 	}
 };
 </script>
@@ -163,26 +226,192 @@ export default {
 <style lang="scss">
 page {
 	height: 100%;
+	background: #ffffff;
+}
+.top_box {
+	padding: 20rpx 26rpx 20rpx 47rpx;
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+	.yue-tit {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+	}
+	.yue-num {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #ff6f0f;
+	}
+}
+
+.line_box {
+	width: 100%;
+	height: 20rpx;
+	background: #f8f8f8;
+}
+.cz_box {
+	padding: 40rpx 20rpx 20rpx;
+	.cz_wrap {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-bottom: 20rpx;
+		border-bottom: 1px solid #e6e6e6;
+		.cz_tit {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+		}
+		.cz_input {
+			text-align: right;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			// color: #BFBFBF;
+		}
+	}
+	.zc_list_box {
+		display: flex;
+		flex-wrap: wrap;
+		.zc_list_price {
+			width: 202rpx;
+			height: 60rpx;
+			background: #f0f0f0;
+			border-radius: 8rpx;
+			margin-top: 36rpx;
+			margin-right: 50rpx;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			&:nth-child(3n) {
+				margin-right: 0;
+			}
+		}
+		.seletPrice {
+			background: linear-gradient(143.2747deg, #ff6a00, #ee0979);
+			color: #ffffff;
+		}
+	}
+}
+.recha-box {
+	padding: 50rpx 30rpx 0;
+	display: flex;
+	flex-wrap: wrap;
+	.recha-frame {
+		width: 210rpx;
+		height: 181rpx;
+		border: 1px solid #dbdede;
+		border-radius: 20rpx;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		justify-content: center;
+		margin-right: 30rpx;
+		margin-bottom: 30rpx;
+		&:nth-child(3n) {
+			margin-right: 0;
+		}
+		.recha-top {
+			display: flex;
+			align-items: center;
+			.recha-img {
+				width: 64rpx;
+				height: 62rpx;
+			}
+			.recha-tit {
+				margin-left: 10rpx;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+		.recha-song {
+			margin-top: 20rpx;
+			font-size: $font-base;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff9900;
+		}
+	}
+	.select-frame {
+		border: 1px solid #ef041f;
+	}
 }
 
+.rechar-box {
+	padding: 30rpx 20rpx 0;
+	.rechar-title {
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+		margin-bottom: 10rpx;
+	}
+	.rechar-text {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+}
+.cz-type {
+	margin-top: 22rpx;
+	display: flex;
+	justify-content: space-between;
+	padding: 32rpx;
+	align-items: center;
+	.type-left {
+		display: flex;
+		align-items: center;
+		.icon {
+			height: 38rpx;
+			image {
+				width: 48rpx;
+				height: 38rpx;
+			}
+		}
+		.iconweixin {
+			color: #36cb59;
+		}
+		.tit {
+			margin-left: 12rpx;
+			font-size: 30rpx;
+			color: #333333;
+		}
+	}
+	.type-right {
+		image {
+			width: 36rpx;
+			height: 36rpx;
+		}
+	}
+}
 .add-btn {
 	&.modified {
-		color: $base-color;
+		
 	}
 	&.up {
-		background-color: $base-color;
 		color: #fff;
 	}
+	margin-top: 100rpx;
 	display: flex;
 	align-items: center;
 	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 0 auto;
-	margin-top: 30rpx;
-	font-size: $font-lg;
+	width: 604rpx;
+	height: 90rpx;
+	// border: 2rpx solid #F21F5D;
 	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #fff;
+	line-height: 90rpx;
+	text-align: center;
+	background-color: #ff4c4c;
 }
 .row-box {
 	margin-top: 30rpx;
@@ -229,9 +458,15 @@ page {
 		width: 100%;
 		height: 120rpx;
 		border-bottom: 1px solid $border-color-light;
+		padding-right: 25rpx;
 		.icon {
 			font-size: 48rpx;
 			padding-right: 20rpx;
+			display: flex;
+		}
+		.yongjing {
+			width: 48rpx;
+			height: 48rpx;
 		}
 		.iconweixin1 {
 			color: #18bf16;
@@ -259,6 +494,10 @@ page {
 }
 
 .active-bg {
-	background-color: $color-gray !important;
-}
-</style>
+	background: #999 !important;
+	color: #FFFFFF !important;
+}
+.iconzhifubao {
+			color: #08aaec;
+		}
+</style>

+ 237 - 116
pages/money/wallet.vue

@@ -1,47 +1,63 @@
 <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="text">可提现金额(元)</view>
-				<view class="money">{{ money | getMoneyStyle }}</view>
+				<view class="money">{{money | getMoneyStyle}}</view>
+				<view>我的余额</view>
 			</view>
-			<view class="moneyTx" @click="navto('/pages/money/recharge')">充值</view>
-			<view class="flex buttom-box">
-				<view class="buttom" @click="navto('/pages/money/recharge')">
-					<view class="icon"><image class="icon-img" src="/static/icon/i5.png" mode="aspectFit"></image></view>
-					<text>充值</text>
+			<view class="moneybtn-box">
+				<view class="money-btn">
+					
 				</view>
-				<view class="interval"></view>
-				<view class="buttom" @click="navto('/pages/money/withdrawal')">
-					<view class="icon"><image class="icon-img" src="/static/icon/i1.png" mode="aspectFit"></image></view>
-					<text>提现</text>
+				<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">{{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':maxheight+'px'}" class="swiper-box" duration="300" @change="changeTab">
+		<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 class="list-scroll-content" scroll-y @scrolltolower="loadData">
+				<scroll-view scroll-y="true" class="list-scroll-content" @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">
-							<view class="title">
-								<text>{{ item.title }}</text>
+					<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="time">
-								<text>{{ item.add_time }}</text>
+							<view class="money">
+								<view>{{ (item.pm == 0 ? '-' : '+') + item.number }}</view>
+								<view v-if="item.status == 0" class="status">待发放</view>
 							</view>
 						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
 					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
 				</scroll-view>
 			</swiper-item>
 		</swiper>
@@ -61,38 +77,37 @@ export default {
 		empty,
 		uniLoadMore
 	},
-	onReady() {
-		// 初始化获取页面宽度
-		uni.createSelectorQuery()
-			.select('.content')
-			.fields(
-				{
-					size: true
-				},
-				data => {
-					console.log(data);
-					console.log(Math.floor((data.width / 750) * 300));
-					// 保存头部高度
-					this.maxheight =data.height - Math.floor((data.width / 750) * 570);
-					console.log(this.maxheight);
-				}
-			)
-			.exec();
+	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: 0,
+				// 	text: '全部',
+				// 	loadingType: 'more',
+				// 	orderList: [],
+				// 	page: 1, //当前页数
+				// 	limit: 10 //每次信息条数
+				// },
 				{
 					state: 1,
 					text: '支出',
@@ -121,7 +136,12 @@ export default {
 			this.money = data.now_money;
 		});
 	},
-	methods: {
+	methods: {
+		toBack() {
+			uni.switchTab({
+				url: '/pages/user/user'
+			})
+		},
 		// 页面跳转
 		navto(e) {
 			uni.navigateTo({
@@ -130,6 +150,7 @@ export default {
 		},
 		//获取收入支出信息
 		async loadData(source) {
+			let obj = this
 			//这里是将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
@@ -153,20 +174,24 @@ export default {
 				state
 			)
 				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data[0].list);
-						console.log(navItem.orderList);
-						navItem.page++;
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
+					if (data.length > 0) {
+						data.forEach(item => {
+							console.log(item.list,'内部列表')
+							navItem.orderList = navItem.orderList.concat(item.list)
+						})
+						// navItem.orderList = navItem.orderList.concat(data[0].list);
+						console.log(navItem.orderList);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
 					this.$set(navItem, 'loaded', true);
 				})
 				.catch(e => {
@@ -189,70 +214,143 @@ export default {
 
 <style lang="scss">
 page {
-	background: #ffffff;
+	background: #f1f1f1;
 	height: 100%;
 }
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
 .content-money {
-	padding-bottom: 30rpx;
-	background: $page-color-base;
-	.moneyTx {
+	position: relative;
+	height: 480rpx;
+	.content-bg {
 		position: absolute;
-		top: 150rpx;
-		right: 0rpx;
-		width: 150rpx;
-		padding: 10rpx 30rpx;
-		border: 2px solid #ffffff;
-		border-top-left-radius: 99rpx;
-		border-bottom-left-radius: 99rpx;
-		color: #ffffff;
-		line-height: 1;
-		font-size: $font-base;
+		top: 0;
+		left: 0;
+		right: 0;
+		width: 750rpx;
+		height: 480rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
 	}
-	.buttom-box {
-		background-color: #ffffff;
+	.body-title {
+		height: 80rpx;
 		text-align: center;
-		margin: 0 30rpx;
-		padding: 20rpx 0;
-		border-radius: $border-radius-sm;
-		margin-top: -60rpx;
-		.buttom {
-			font-size: $font-lg;
-			flex-grow: 1;
+		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;
 		}
-		.interval {
-			width: 2px;
-			height: 60rpx;
-			background-color: #eeeeee;
+		.goback-box {
+			position: absolute;
+			left: 18rpx;
+			top: 0;
+			height: 80rpx;
+			display: flex;
+			align-items: center;
 		}
-		.icon {
-			height: 50rpx;
-			width: 48rpx;
-			margin: 0 auto;
-			.icon-img {
-				width: 100%;
-				height: 100%;
-			}
+
+		.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 {
-	background-color: $base-color;
-	padding-top: var(--status-bar-height);
-	height: 368rpx;
+	position: relative;
+	z-index: 2;
+    /* #ifdef H5 */
+    padding-top: 90rpx;
+    /* #endif */
 	color: #ffffff;
-	text-align: center;
-	.text {
-		padding-top: 147rpx;
-		font-size: $font-sm;
-	}
+	text-align: center;
+	/* #ifdef APP-PLUS */
+	height: 200rpx;
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	/* #endif */
+	
 	.money {
-		font-size: 56rpx;
+		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:0rpx 50rpx ;
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #FFFFFF;
+}
 
 .navbar {
+	margin-top: 20rpx;
 	display: flex;
-	height: 40px;
+	height: 88rpx;
 	padding: 0 5px;
 	background: #fff;
 	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
@@ -265,10 +363,10 @@ page {
 		align-items: center;
 		height: 100%;
 		font-size: 15px;
-		color: $font-color-dark;
+		color: #999999;
 		position: relative;
 		&.current {
-			color: $base-color;
+			color: #000;
 			&:after {
 				content: '';
 				position: absolute;
@@ -277,15 +375,16 @@ page {
 				transform: translateX(-50%);
 				width: 44px;
 				height: 0;
-				border-bottom: 2px solid $base-color;
+				border-bottom: 2px solid #fe5b38;
 			}
 		}
 	}
 }
-// 列表
-
+//列表
 .swiper-box {
-	padding-top: 10rpx;
+	.order-item:last-child {
+		margin-bottom: 60rpx;
+	}
 	.order-item {
 		padding: 20rpx 30rpx;
 		line-height: 1.5;
@@ -302,10 +401,15 @@ page {
 		.money {
 			color: #fd5b23;
 			font-size: $font-lg;
+			text-align: right;
+			.status {
+				color: $font-color-light;
+			}
 		}
 	}
 }
 .list-scroll-content {
+	background: #ffffff;
 	height: 100%;
 }
 .content {
@@ -314,4 +418,21 @@ page {
 		background-color: #ffffff;
 	}
 }
-</style>
+.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>

文件差异内容过多而无法显示
+ 121 - 173
pages/order/createOrder.vue


+ 675 - 1388
pages/order/order.vue

@@ -1,1389 +1,676 @@
-<template>
-	<view class="content">
-		<view class="order-title">
-			<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="roder-content">
-				<view class="left" :class="{ current: currentIndex === index }" :key="index"
-					v-for="(item, index) in maiList" @click="navGo(index)">{{ item.title }}</view>
-			</view>
-		</view>
-		<view class="navbar" v-show="currentIndex == 0">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index, 0)">
-				{{ item.text }}
-				<view class="dian" v-if="tabCurrentIndex != index && item.isnew == 2"></view>
-			</view>
-		</view>
-		<view class="navbar" v-show="currentIndex == 1">
-			<view v-for="(item, index) in navList1" :key="index" class="nav-item"
-				:class="{ current: tabCurrentIndex1 === index }" @click="tabClick(index, 1)">
-				{{ item.text }}
-				<view class="dian" v-if="tabCurrentIndex1 != index && item.isnew == 2"></view>
-			</view>
-		</view>
-
-		<swiper :current="currentAuto" class="swiper-box-one" duration="0" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex"
-				v-if="currentIndex == 0">
-				<scroll-view class="list-scroll-content" 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">
-						<view class="i-top b-b">
-							<text class="time">{{ item.order_id }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
-						</view>
-
-						<view class="goods-box-single">
-							<image class="goods-img" :src="item.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ item.name }}</text>
-								<text class="attr-box">x1</text>
-								<text class="price">{{ moneyNum(item.price) }}</text>
-							</view>
-						</view>
-
-						<view class="price-box" style="position: relative;">
-							<text style="display: inline-block;position: absolute;left: 20rpx;"
-								v-if="currentIndex == 0 && tabIndex == 2">{{item.update_time}}</text>
-							{{(currentIndex == 0 && tabItem.state == 3) ? '当前挂售价': '实付'}}
-							<text class="price"
-								v-if="currentIndex == 0 && tabItem.state == 3">{{ moneyNum(item.hanging_price) }}</text>
-							<text class="price" v-else>{{ moneyNum(item.actual_price) }}</text>
-						</view>
-						<view class="action-box b-t" v-if="item.stateTip == '待支付'"><button @click.stop="pay(item)"
-								class="action-btn recom">立即支付</button></view>
-						<view class="action-box b-t" v-if="item.stateTip == '待挂售'"><button @click.stop="gsell(item)"
-								class="action-btn recom">立即挂售</button></view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList1" :key="tabIndex"
-				v-if="currentIndex == 1">
-				<scroll-view class="list-scroll-content" 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">
-						<view class="i-top b-b">
-							<text class="time">{{ item.order_id ? item.order_id : item.order }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item.stateTip }}</text>
-						</view>
-						<view class="goods-box-single">
-							<image class="goods-img" :src="item.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp">{{ item.name }}</text>
-									<text class="price">{{ item.price | moneyNum }}</text>
-								</view>
-								<view class="row flex"><text class="attr-box">x1</text></view>
-							</view>
-						</view>
-
-						<view class="buy-box">
-							<view class="buy-info" v-if="item.status != 0 && item.status">
-								<view class="font">买家:</view>
-								<image class="avter" :src="item.avatar" mode=""></image>
-								<view class="buy-name">{{ item.nickname }}</view>
-								<view class="phone">{{ item.phone }}</view>
-							</view>
-							<view class="" style="padding-top: 5rpx;" v-if="item.status != 0 && item.status">
-								成交时间:{{item.update_time}}
-							</view>
-							<view v-if="!item.status">
-								<view class="buy-info">
-									<view class="font">挂售价格:{{ item.hanging_price }}</view>
-								</view>
-								<view class="buy-info">
-									<view class="font">挂售时间:{{ item.update_time }}</view>
-								</view>
-							</view>
-						</view>
-						<!-- <view class="upimg" v-if="item.status == 2 || item.status == 3">
-							<view class="up-tit">打款凭证:</view>
-							<view class="img-wrap" v-if="item.upload_image" @click="lookimg(item.upload_image)"><image :src="item.upload_image" mode=""></image></view>
-							<view class="" style="color: #0F253A;font-weight: bold;font-size: 26rpx;" v-else>买家未上传支付凭证</view>
-						</view> -->
-						<!-- <view class="action-box b-t" v-if="item.status == 1"><button @click.stop="orderPay(item)" class="action-btn recom">联系买家</button></view> -->
-						<!-- 						<view class="action-box b-t" v-if="item.status == 2">
-							<button @click.stop="orderPay(item)" class="action-btn recom">通过</button>
-						</view> -->
-						<!-- 						<view class="action-box b-t" v-if="!item.status">
-							<button @click.stop="cancel(item)" class="action-btn recom">取消挂售</button>
-						</view> -->
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-		<!-- 待支付支付弹窗 -->
-		<uni-popup ref="uppass" type="center">
-			<view class="psw-wrapper">
-				<view class="psw-title">请输入支付密码</view>
-				<view class="psw-content">购买需支付消费积分</view>
-				<view class="psw-price">
-					{{good.actual_price}}
-				</view>
-				<view class="psw-jg"></view>
-				<view class="psw-paytype flex">
-					<view class="">
-						支付方式
-					</view>
-					<view class="">
-						消费积分
-					</view>
-				</view>
-				<input type="password" v-model="password" class="psw-ipt" focus />
-				<view class="psw-btn">
-					<text @click="cancel">取消</text>
-					<text class="psw-qd" @click="pswQd">确定</text>
-				</view>
-			</view>
-		</uni-popup>
-		<uni-popup ref="gspass" type="center">
-			<view class="psw-wrapper" style="height: 350rpx;">
-				<view class="psw-title">请输入支付密码</view>
-				<input type="password" v-model="password" class="psw-ipt" />
-				<view class="psw-btn">
-					<text @click="cancelpass">取消</text>
-					<text class="psw-qd" @click="pswQdpass">确定</text>
-				</view>
-			</view>
-		</uni-popup>
-		<!-- <u-tabbar activeColor="#f42b4e" v-model="current" :list="tabbar" :mid-button="true"></u-tabbar> -->
-	</view>
-</template>
-
-<script>
-	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-	import empty from '@/components/empty';
-	import {
-		orderList,
-		orderCancel,
-		orderDel,
-		orderTake,
-		adopt,
-		user_auction_order,
-		seller,
-		cancel,
-		untreated
-	} from '@/api/order.js';
-	import {
-		tabbar
-	} from '@/utils/tabbar.js';
-	import {
-		zfpay,
-		hanging_sale
-	} from '@/api/index.js'
-	export default {
-		components: {
-			uniLoadMore,
-			empty
-		},
-		data() {
-			return {
-				good: {},
-				height: '', //第一层swiper高度
-				tabbar: tabbar,
-				current: 1, //底部tabar选中的icon对象
-				currentIndex: 0, //当前选中的第一级0为我要买单,1我要卖单
-				tabCurrentIndex: 0, //当前选中的第二级别我要买单选中项
-				tabCurrentIndex1: 0, //当前选中的第二级别我要卖单选中项
-				maiList: [{
-						title: '我的买单'
-					},
-					{
-						title: '我的卖单'
-					}
-				],
-				navList: [{
-						state: 0,
-						text: '已过期',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 1,
-						text: '待支付',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 3,
-						text: '待挂售',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				],
-				navList1: [{
-						state: 1,
-						text: '待支付',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 3,
-						text: '寄售中',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-
-				],
-				password: '',
-				gsgood: {}
-			};
-		},
-		computed: {
-			currentAuto() {
-				if (this.currentIndex == 0) {
-					return this.tabCurrentIndex;
-				}
-				if (this.currentIndex == 1) {
-					return this.tabCurrentIndex1;
-				}
-			}
-		},
-		onLoad(options) {
-			/**
-			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-			 * 替换onLoad下代码即可
-			 */
-			this.tabCurrentIndex = +options.state || 0;
-		},
-		onShow() {
-			this.loadData();
-			// this.upData();
-		},
-		// #ifdef APP-PLUS || H5
-		onBackPress(e) {
-			uni.switchTab({
-				url: '/pages/user/user'
-			});
-			return true;
-		},
-		// #endif
-		filters: {
-			moneyNum(value) {
-				return +value;
-			}
-		},
-		// 页面加载完获取swiper高度
-		onReady(res) {
-			var obj = this;
-			uni.getSystemInfo({
-				success: resu => {
-					const query = uni.createSelectorQuery();
-					query.select('.swiper-box-one').boundingClientRect();
-					query.exec(function(res) {
-						console.log(res, 'ddddddddddddd');
-						obj.height = resu.windowHeight - res[0].top + 'px';
-						console.log('打印页面的剩余高度', obj.height);
-					});
-				},
-				fail: res => {}
-			});
-		},
-		onHide() {
-			console.log('页面隐藏')
-			this.current = 1, //底部tabar选中的icon对象
-				this.currentIndex = 0, //当前选中的第一级0为我要买单,1我要卖单
-				this.tabCurrentIndex = 0, //当前选中的第二级别我要买单选中项
-				this.tabCurrentIndex1 = 0, //当前选中的第二级别我要卖单选中项
-				this.navList = [{
-						state: 0,
-						text: '已过期',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 1,
-						text: '待支付',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 3,
-						text: '待挂售',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					}
-				],
-				this.navList1 = [{
-						state: 1,
-						text: '待支付',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 3,
-						text: '寄售中',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-					{
-						state: 2,
-						text: '已完成',
-						loadingType: 'more',
-						orderList: [],
-						isnew: 1, //判断是否有新的订单
-						page: 1, //当前页数
-						limit: 10 //每次信息条数
-					},
-
-				]
-		},
-		methods: {
-			//顶部tab点击
-			tabClick(index, type) {
-				if (type == 0) {
-					this.tabCurrentIndex = index;
-				}
-				if (type == 1) {
-					this.tabCurrentIndex1 = index;
-				}
-			},
-			toBack() {
-				uni.switchTab({
-					url: '/pages/order/index'
-				});
-			},
-			navGo(index) {
-				this.currentIndex = index;
-				console.log(this.currentIndex, '点击');
-				this.loadData();
-			},
-			// 转换金额为数字
-			moneyNum(value) {
-				return +value;
-			},
-			upData() {
-				// untreated().then(({ data }) => {
-				// 	console.log(data);
-				// 	if(data.user.hanging != 0){
-				// 		this.navList[3].isnew = 2
-				// 	}
-				// 	if(data.user.hanging == 0){
-				// 		this.navList[3].isnew = 1
-				// 	}
-				// 	if(data.user.paid != 0){
-				// 		this.navList[1].isnew = 2
-				// 	}
-				// 	if(data.user.paid == 0){
-				// 		this.navList[1].isnew = 1
-				// 	}
-				// 	if(data.seller.reviewed != 0) {
-				// 		this.navList1[3].isnew = 2
-				// 	}
-				// 	if(data.seller.reviewed == 0) {
-				// 		this.navList1[3].isnew = 1
-				// 	} 
-				// });
-			},
-			// 查看大图
-			lookimg(src) {
-				console.log(src);
-				let arr = [src];
-				uni.previewImage({
-					current: src,
-					urls: arr
-				});
-			},
-			// 确认收货
-			orderTake(item, index) {
-				let obj = this;
-				uni.showModal({
-					title: '是否确认收货?',
-					success: () => {
-						orderTake({
-								uni: item.order_id
-							})
-							.then(e => {
-								obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-								uni.showToast({
-									title: '收货成功'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-					}
-				});
-			},
-			//跳转到订单详情
-			goToOrderDetail(e) {
-				uni.navigateTo({
-					url: '/pages/order/orderDetail?id=' + e.order_id
-				});
-			},
-			// 申请退款
-			orderRefund(e) {
-				uni.navigateTo({
-					url: '/pages/order/orderRefund?id=' + e.order_id
-				});
-			},
-			// 订单支付
-			pay(item) {
-				// uni.navigateTo({
-				// 	url: '/pages/hall/hallpay?ordid=' + item.order_id
-				// });
-				let obj = this
-				obj.good = item
-				obj.$refs.uppass.open()
-			},
-			gsell(item) {
-				console.log(item)
-				let obj = this
-				obj.gsgood = item
-				obj.$refs.gspass.open()
-			},
-			orderPay(e) {
-				adopt({
-					order_id: e.order_id
-				}).then(({
-					data
-				}) => {
-					console.log('1111');
-					this.loadData('reload');
-				});
-			},
-			//获取订单列表
-			loadData(source) {
-				//这里是将订单挂载到tab列表下
-				let index, navItem;
-				if (this.currentIndex == 0) {
-					index = this.tabCurrentIndex;
-					navItem = this.navList[index];
-				}
-				if (this.currentIndex == 1) {
-					index = this.tabCurrentIndex1;
-					navItem = this.navList1[index];
-				}
-
-				let state = navItem.state;
-				if (source == 'reload') {
-					navItem.orderList = [];
-					navItem.page = 1;
-					navItem.limit = 10;
-					navItem.loadingType = 'more';
-				}
-				if (source === 'tabChange' && navItem.loaded === true) {
-					//tab切换只有第一次需要加载数据
-					return;
-				}
-				if (navItem.loadingType === 'loading') {
-					//防止重复加载
-					return;
-				}
-				if (navItem.loadingType === 'noMore') {
-					//防止重复加载
-					return;
-				}
-				// 修改当前对象状态为加载中
-				navItem.loadingType = 'loading';
-				if (this.currentIndex == 0) {
-					user_auction_order({
-							type: state,
-							page: navItem.page,
-							limit: navItem.limit
-						})
-						.then(({
-							data
-						}) => {
-							let arr = data.map(e => {
-								console.log(state == 4);
-								if (state == 3) {
-									e.stateTip = '待挂售';
-									e.stateTipColor = '#fa436a';
-								} else {
-									let b = this.orderStateExp(e.status);
-									e.stateTip = b.stateTip;
-									e.stateTipColor = b.stateTipColor;
-								}
-								return e;
-							});
-							console.log(arr, '123456');
-							navItem.orderList = navItem.orderList.concat(arr);
-
-							// console.log(navItem.orderList);
-							navItem.page++;
-							if (navItem.limit == data.length) {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'more';
-								return;
-							} else {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'noMore';
-							}
-							uni.hideLoading();
-							this.$set(navItem, 'loaded', true);
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-				if (this.currentIndex == 1) {
-					seller({
-							type: state,
-							page: navItem.page,
-							limit: navItem.limit
-						})
-						.then(({
-							data
-						}) => {
-							console.log(data);
-							let arr = data.map(e => {
-								if (state == 4) {
-									e.stateTip = '售卖中';
-									e.stateTipColor = '#fa436a';
-								} else {
-									let b = this.orderStateExp(e.status);
-									e.stateTip = b.stateTip;
-									e.stateTipColor = b.stateTipColor;
-								}
-								return e;
-							});
-							navItem.orderList = navItem.orderList.concat(arr);
-
-							// console.log(navItem.orderList);
-							navItem.page++;
-							if (navItem.limit == data.length) {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'more';
-								return;
-							} else {
-								//判断是否还有数据, 有改为 more, 没有改为noMore
-								navItem.loadingType = 'noMore';
-							}
-							uni.hideLoading();
-							this.$set(navItem, 'loaded', true);
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-			},
-			//swiper 切换
-			changeTab(e) {
-				if (this.currentIndex == 0) {
-					this.tabCurrentIndex = e.target.current;
-				}
-				if (this.currentIndex == 1) {
-					this.tabCurrentIndex1 = e.target.current;
-				}
-				this.loadData('tabChange');
-			},
-
-			//删除订单
-			deleteOrder(index) {
-				uni.showLoading({
-					title: '请稍后'
-				});
-				setTimeout(() => {
-					this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-					uni.hideLoading();
-				}, 600);
-			},
-			//取消订单
-			cancelOrder(item) {
-				uni.showModal({
-					title: '订单取消',
-					content: '是否取消订单?',
-					success: e => {
-						if (e.confirm) {
-							uni.showLoading({
-								title: '请稍后'
-							});
-							orderCancel({
-									id: item.order_id
-								})
-								.then(e => {
-									uni.showToast({
-										title: '取消成功',
-										duration: 2000,
-										position: 'top'
-									});
-								})
-								.catch(e => {
-									console.log(e);
-								});
-							//取消订单后删除待付款中该项
-							let list = this.navList[this.tabCurrentIndex].orderList;
-							let index = list.findIndex(val => val.id === item.id);
-							index !== -1 && list.splice(index, 1);
-							uni.hideLoading();
-						}
-					}
-				});
-			},
-
-			//订单状态文字和颜色
-			orderStateExp(state) {
-				let stateTip = '',
-					stateTipColor = '#fa436a';
-				switch (+state) {
-					case 0:
-						stateTip = '已过期';
-						break;
-					case 1:
-						stateTip = '待支付';
-						break;
-					case 2:
-						stateTip = '已完成';
-						break;
-					case 3:
-						stateTip = '待挂售';
-						break;
-					case 4:
-						stateTip = '待挂售';
-						break;
-					case 9:
-						stateTip = '订单已关闭';
-						stateTipColor = '#909399';
-						break;
-
-						//更多自定义
-				}
-				return {
-					stateTip,
-					stateTipColor
-				};
-			},
-			cancel() {
-				let obj = this
-				obj.password = ''
-				obj.$refs.uppass.close()
-			},
-			cancelpass() {
-				let obj = this
-				obj.password = ''
-				obj.$refs.gspass.close()
-			},
-			pswQd() {
-				let obj = this
-				zfpay({
-					order_id: obj.good.order_id,
-					pas: obj.password
-				}).then(res => {
-					obj.$api.msg('支付成功')
-
-					obj.$refs.uppass.close()
-					obj.password = ''
-				})
-			},
-			pswQdpass() {
-				let obj = this
-				hanging_sale({
-					id: obj.gsgood.id,
-					pas: obj.password
-				}).then(res => {
-					obj.$api.msg('挂售成功')
-					let s = obj.navList[obj.tabCurrentIndex].orderList.indexOf(obj.gsgood);
-					obj.navList[obj.tabCurrentIndex].orderList.splice(s, 1);
-					obj.cancelpass()
-				})
-			}
-		}
-	};
-</script>
-
-<style lang="scss">
-	page,
-	.content {
-		background: $page-color-base;
-		height: 100%;
-	}
-
-	.order-title {
-		width: 750rpx;
-		height: 270rpx;
-		background: url(../../static/img/order99.png) repeat-x 0;
-		display: flex;
-		flex-direction: column;
-		// padding: 50rpx 0;
-		text-align: center;
-
-		.body-title {
-			height: 80rpx;
-			text-align: center;
-			font-size: 35rpx;
-			position: relative;
-
-			.header {
-				position: absolute;
-				left: 0;
-				top: 30rpx;
-				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: 30rpx;
-				height: 80rpx;
-				display: flex;
-				align-items: center;
-			}
-
-			.goback {
-				z-index: 100;
-				width: 34rpx;
-				height: 34rpx;
-			}
-		}
-
-		text {
-			margin: 30px 0;
-			font-size: 17px;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #ffffff;
-		}
-
-		.roder-content {
-			margin-top: 80rpx;
-			display: flex;
-			justify-content: space-around;
-
-			.left {
-				width: 168px;
-				height: 40px;
-				line-height: 40px;
-				border: 1px solid #ffffff;
-				border-radius: 5px;
-				text-align: center;
-				font-size: 15px;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #ffffff;
-				background: #dc262b;
-			}
-
-			.current {
-				color: #dc262b;
-				background: #ffffff;
-			}
-		}
-	}
-
-	.swiper-box {
-		background: red;
-	}
-
-	.list-scroll-content {
-		height: 100%;
-	}
-
-	.uni-swiper-item {
-		height: auto;
-	}
-
-	.navbar {
-		display: flex;
-		height: 40px;
-		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: $font-color-dark;
-			position: relative;
-
-			.dian {
-				position: absolute;
-				top: 20rpx;
-				right: 10rpx;
-				width: 8rpx;
-				height: 8rpx;
-				border-radius: 50%;
-				background-color: $base-color;
-			}
-
-			&.current {
-				color: $base-color;
-
-				&:after {
-					content: '';
-					position: absolute;
-					left: 50%;
-					bottom: 0;
-					transform: translateX(-50%);
-					width: 44px;
-					height: 0;
-					border-bottom: 2px solid $base-color;
-				}
-			}
-		}
-	}
-
-	.order-item {
-		display: flex;
-		flex-direction: column;
-		background: #fff;
-		margin-top: 16rpx;
-
-		.i-top {
-			display: flex;
-			align-items: center;
-			height: 80rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			position: relative;
-			padding: 0 30rpx;
-
-			.time {
-				flex: 1;
-			}
-
-			.state {
-				color: $base-color;
-			}
-
-			.del-btn {
-				padding: 10rpx 0 10rpx 36rpx;
-				font-size: $font-lg;
-				color: $font-color-light;
-				position: relative;
-
-				&:after {
-					content: '';
-					width: 0;
-					height: 30rpx;
-					border-left: 1px solid $border-color-dark;
-					position: absolute;
-					left: 20rpx;
-					top: 50%;
-					transform: translateY(-50%);
-				}
-			}
-		}
-
-		/* 多条商品 */
-		.goods-box {
-			height: 160rpx;
-			padding: 20rpx 0;
-			white-space: nowrap;
-
-			.goods-item {
-				width: 120rpx;
-				height: 120rpx;
-				display: inline-block;
-				margin-right: 24rpx;
-			}
-
-			.goods-img {
-				display: block;
-				width: 100%;
-				height: 100%;
-			}
-		}
-
-		/* 单条商品 */
-		.goods-box-single {
-			display: flex;
-			padding: 20rpx 30rpx;
-			background: #f7f7f7;
-
-			.goods-img {
-				display: block;
-				width: 120rpx;
-				height: 120rpx;
-			}
-
-			.right {
-				flex: 1;
-				display: flex;
-				flex-direction: column;
-				padding: 0 0 0 24rpx;
-				overflow: hidden;
-
-				.row {
-					margin-top: 10rpx;
-				}
-
-				.row_title {
-					padding: 5rpx 10rpx;
-					background-color: #dddddd;
-					border-radius: 10rpx;
-					font-size: 22rpx;
-					color: #ffffff;
-				}
-
-				.title {
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-					line-height: 1;
-					width: 80%;
-				}
-
-				.attr-box {
-					display: flex;
-					justify-content: flex-end;
-					font-size: $font-sm + 2rpx;
-					color: $font-color-light;
-				}
-
-				.price {
-					display: inline;
-					font-size: $font-base + 2rpx;
-					color: $font-color-dark;
-
-					&:before {
-						content: '¥';
-						font-size: $font-sm;
-					}
-				}
-			}
-		}
-
-		.buy-box {
-			padding: 10rpx 22rpx;
-			background-color: #ffffff;
-
-			.buy-info {
-				display: flex;
-				align-items: center;
-				margin-top: 20rpx;
-
-				.font {
-					font-size: 32rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-				}
-
-				.avter {
-					margin-left: 10rpx;
-					width: 46rpx;
-					height: 46rpx;
-					border-radius: 50%;
-				}
-
-				.buy-name {
-					margin-left: 10rpx;
-					font-size: 32rpx;
-					font-family: PingFang SC;
-					font-weight: bold;
-					color: #333333;
-				}
-
-				.phone {
-					margin-left: 12rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #999999;
-				}
-			}
-		}
-
-		.upimg {
-			padding-left: 20rpx;
-			padding-top: 10rpx;
-			padding-bottom: 10rpx;
-			display: flex;
-
-			.up-tit {
-				display: inline-block;
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #6d7c88;
-			}
-
-			.img-wrap {
-				width: 153rpx;
-				height: 152rpx;
-
-				border-radius: 20rpx;
-
-				image {
-					border-radius: 20rpx;
-					width: 153rpx;
-					height: 152rpx;
-					background-color: #ccc;
-				}
-			}
-		}
-
-		.price-box {
-			display: flex;
-			justify-content: flex-end;
-			align-items: baseline;
-			padding: 20rpx 30rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-light;
-
-			.num {
-				margin: 0 8rpx;
-				color: $font-color-dark;
-			}
-
-			.price {
-				font-size: $font-lg;
-				color: $font-color-dark;
-
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-
-		.action-box {
-			padding: 0 30rpx;
-			display: flex;
-			justify-content: flex-end;
-			align-items: center;
-			height: 100rpx;
-			position: relative;
-		}
-
-		.refuse {
-			margin: 0;
-			padding: 0;
-			width: 160rpx;
-			height: 60rpx;
-			border: 2rpx solid #ebebeb;
-			border-radius: 28rpx;
-			text-align: center;
-			line-height: 60rpx;
-			font-size: 26rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #999999;
-
-			&:after {
-				border-radius: 100px;
-			}
-
-			&.recom {
-				color: #999999;
-
-				&:after {
-					border-color: #999999;
-				}
-			}
-		}
-
-		.action-btn {
-			width: 160rpx;
-			height: 60rpx;
-			margin: 0;
-			margin-left: 24rpx;
-			padding: 0;
-			text-align: center;
-			line-height: 60rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-dark;
-			background: #fff;
-			border-radius: 100px;
-			border: 2rpx solid #fd3b39;
-			border-radius: 28px;
-
-			&:after {
-				border-radius: 100px;
-			}
-
-			&.recom {
-				color: $base-color;
-
-				&:after {
-					border-color: $base-color;
-				}
-			}
-
-			&.evaluate {
-				color: $color-yellow;
-
-				&:after {
-					border-color: $color-yellow;
-				}
-			}
-		}
-	}
-
-	/* load-more */
-	.uni-load-more {
-		display: flex;
-		flex-direction: row;
-		height: 80rpx;
-		align-items: center;
-		justify-content: center;
-	}
-
-	.uni-load-more__text {
-		font-size: 28rpx;
-		color: #999;
-	}
-
-	.uni-load-more__img {
-		height: 24px;
-		width: 24px;
-		margin-right: 10px;
-	}
-
-	.uni-load-more__img>view {
-		position: absolute;
-	}
-
-	.uni-load-more__img>view view {
-		width: 6px;
-		height: 2px;
-		border-top-left-radius: 1px;
-		border-bottom-left-radius: 1px;
-		background: #999;
-		position: absolute;
-		opacity: 0.2;
-		transform-origin: 50%;
-		animation: load 1.56s ease infinite;
-	}
-
-	.uni-load-more__img>view view:nth-child(1) {
-		transform: rotate(90deg);
-		top: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(2) {
-		transform: rotate(180deg);
-		top: 11px;
-		right: 0;
-	}
-
-	.uni-load-more__img>view view:nth-child(3) {
-		transform: rotate(270deg);
-		bottom: 2px;
-		left: 9px;
-	}
-
-	.uni-load-more__img>view view:nth-child(4) {
-		top: 11px;
-		left: 0;
-	}
-
-	.load1,
-	.load2,
-	.load3 {
-		height: 24px;
-		width: 24px;
-	}
-
-	.load2 {
-		transform: rotate(30deg);
-	}
-
-	.load3 {
-		transform: rotate(60deg);
-	}
-
-	.load1 view:nth-child(1) {
-		animation-delay: 0s;
-	}
-
-	.load2 view:nth-child(1) {
-		animation-delay: 0.13s;
-	}
-
-	.load3 view:nth-child(1) {
-		animation-delay: 0.26s;
-	}
-
-	.load1 view:nth-child(2) {
-		animation-delay: 0.39s;
-	}
-
-	.load2 view:nth-child(2) {
-		animation-delay: 0.52s;
-	}
-
-	.load3 view:nth-child(2) {
-		animation-delay: 0.65s;
-	}
-
-	.load1 view:nth-child(3) {
-		animation-delay: 0.78s;
-	}
-
-	.load2 view:nth-child(3) {
-		animation-delay: 0.91s;
-	}
-
-	.load3 view:nth-child(3) {
-		animation-delay: 1.04s;
-	}
-
-	.load1 view:nth-child(4) {
-		animation-delay: 1.17s;
-	}
-
-	.load2 view:nth-child(4) {
-		animation-delay: 1.3s;
-	}
-
-	.load3 view:nth-child(4) {
-		animation-delay: 1.43s;
-	}
-
-	@-webkit-keyframes load {
-		0% {
-			opacity: 1;
-		}
-
-		100% {
-			opacity: 0.2;
-		}
-	}
-
-	.swiper-box-one {
-		height: calc(100% - 175px);
-	}
-
-	.psw-wrapper {
-		width: 548rpx;
-		height: 548rpx;
-		background-color: #FFFFFF;
-		border-radius: 15rpx 15rpx;
-
-		.psw-title {
-			width: 100%;
-			font-size: 35rpx;
-			padding: 43rpx 0 40rpx;
-			text-align: center;
-			font-weight: 800;
-		}
-
-		.psw-content {
-			width: 100%;
-			font-size: 32rpx;
-			text-align: center;
-		}
-
-		.psw-price {
-			font-weight: bold;
-			font-size: 68rpx;
-			text-align: center;
-			padding-top: 10rpx;
-		}
-
-		.psw-jg {
-			height: 1px;
-			width: 500rpx;
-			background-color: #eee;
-			margin: auto;
-		}
-
-		.psw-paytype {
-			justify-content: space-between;
-			padding: 10rpx 25rpx 30rpx;
-			font-size: 26rpx;
-		}
-
-		.psw-ipt {
-			display: block;
-			background-color: #dce3ed;
-			height: 90rpx;
-			width: 464rpx;
-			padding-left: 30rpx;
-			margin: 0 auto;
-			font-size: 80rpx;
-		}
-
-		.psw-btn text {
-			display: inline-block;
-			text-align: center;
-			width: 50%;
-			padding-top: 29rpx;
-			font-size: 35rpx;
-		}
-
-		.psw-qd {
-			color: #5771DF;
-		}
-	}
+<template>
+	<view class="content">
+		<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" 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" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
+						<view class="i-top b-b">
+							<text class="time">{{ item._add_time }}</text>
+							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
+							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
+						</view>
+
+						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							</view>
+						</scroll-view>
+						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							<view class="right">
+								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
+								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
+							</view>
+						</view> -->
+						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
+							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
+							<view class="right">
+								<view class="flex-start">
+									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
+									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
+								</view>
+								<view class="row flex">
+									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
+									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
+								</view>
+							</view>
+						</view>
+
+						<view class="price-box">
+							共
+							<text class="num">{{ item.cartInfo.length }}</text>
+							件商品 邮费
+							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							实付款
+							<text class="price" v-if="item.use_integral != 0">{{ moneyNum(item.pay_price)}}</text>
+							<text class="price" v-if="item.use_integral == 0">{{ moneyNum(item.pay_price)}}</text>
+						</view>
+						<view class="action-box b-t" v-if="item.status != 5">
+							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
+							<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 == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
+						</view>
+					</view>
+
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
+export default {
+	components: {
+		uniLoadMore,
+		empty
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '待付款',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '待发货',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 2,
+					text: '待收货',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 3,
+					text: '待评价',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 4,
+					text: '已完成',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		/**
+		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+		 * 替换onLoad下代码即可
+		 */
+		this.tabCurrentIndex = +options.state;
+		// #ifndef MP
+		this.loadData();
+		// #endif
+		// #ifdef MP
+		if (options.state == 0) {
+			this.loadData();
+		}
+		// #endif
+	},
+	// #ifdef APP-PLUS || H5
+	onBackPress(e){
+		uni.switchTab({
+			url: '/pages/user/user',
+		});
+		return true;
+	},
+	// #endif
+	methods: {
+		// 转换金额为数字
+		moneyNum(value){
+				return +value;
+		},
+		// 确认收货
+		orderTake(item, index) {
+			let obj = this;
+			uni.showModal({
+				title: '是否确认收货?',
+				success: () => {
+					orderTake({
+						uni: item.order_id
+					})
+						.then(e => {
+							obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
+							uni.showToast({
+								title: '收货成功'
+							});
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				}
+			});
+		},
+		//跳转到订单详情
+		goToOrderDetail(e) {
+			uni.navigateTo({
+				url: '/pages/order/orderDetail?id=' + e.order_id
+			});
+		},
+		// 申请退款
+		orderRefund(e) {
+			uni.navigateTo({
+				url: '/pages/order/orderRefund?id=' + e.order_id
+			});
+		},
+		// 订单支付
+		orderPay(e) {
+			uni.navigateTo({
+				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
+			});
+		},
+		//获取订单列表
+		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';
+
+			orderList({
+				type: state,
+				page: navItem.page,
+				limit: navItem.limit
+			})
+				.then(({ data }) => {
+					let arr = data.map(e => {
+						let b = this.orderStateExp(e.status);
+						e.stateTip = b.stateTip;
+						e.stateTipColor = b.stateTipColor;
+						return e;
+					});
+					navItem.orderList = navItem.orderList.concat(arr);
+					// console.log(navItem.orderList);
+					navItem.page++;
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					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;
+		},
+		//删除订单
+		deleteOrder(index) {
+			uni.showLoading({
+				title: '请稍后'
+			});
+			setTimeout(() => {
+				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
+				uni.hideLoading();
+			}, 600);
+		},
+		//取消订单
+		cancelOrder(item) {
+			uni.showModal({
+				title: '订单取消',
+				content: '是否取消订单?',
+				success: e => {
+					if (e.confirm) {
+						uni.showLoading({
+							title: '请稍后'
+						});
+						orderCancel({ id: item.order_id })
+							.then(e => {
+								uni.showToast({
+									title: '取消成功',
+									duration: 2000,
+									position: 'top'
+								});
+							})
+							.catch(e => {
+								console.log(e);
+							});
+						//取消订单后删除待付款中该项
+						let list = this.navList[this.tabCurrentIndex].orderList;
+						let index = list.findIndex(val => val.id === item.id);
+						index !== -1 && list.splice(index, 1);
+						uni.hideLoading();
+					}
+				}
+			});
+		},
+
+		//订单状态文字和颜色
+		orderStateExp(state) {
+			let stateTip = '',
+				stateTipColor = '#fa436a';
+			switch (+state) {
+				case 0:
+					stateTip = '待付款';
+					break;
+				case 1:
+					stateTip = '待发货';
+					break;
+				case 2:
+					stateTip = '待收货';
+					break;
+				case 3:
+					stateTip = '待评价';
+					break;
+				case 4:
+					stateTip = '已完成';
+					stateTipColor = '#5dbc7c';
+					break;
+				case 9:
+					stateTip = '订单已关闭';
+					stateTipColor = '#909399';
+					break;
+
+				//更多自定义
+			}
+			return { stateTip, stateTipColor };
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+
+.swiper-box {
+	height: calc(100% - 40px);
+}
+.list-scroll-content {
+	height: 100%;
+}
+
+.navbar {
+	display: flex;
+	height: 40px;
+	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: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+
+.uni-swiper-item {
+	height: auto;
+}
+.order-item {
+	display: flex;
+	flex-direction: column;
+	padding-left: 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.i-top {
+		display: flex;
+		align-items: center;
+		height: 80rpx;
+		padding-right: 30rpx;
+		font-size: $font-base;
+		color: $font-color-dark;
+		position: relative;
+		.time {
+			flex: 1;
+		}
+		.state {
+			color: $base-color;
+		}
+		.del-btn {
+			padding: 10rpx 0 10rpx 36rpx;
+			font-size: $font-lg;
+			color: $font-color-light;
+			position: relative;
+			&:after {
+				content: '';
+				width: 0;
+				height: 30rpx;
+				border-left: 1px solid $border-color-dark;
+				position: absolute;
+				left: 20rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+	}
+	/* 多条商品 */
+	.goods-box {
+		height: 160rpx;
+		padding: 20rpx 0;
+		white-space: nowrap;
+		.goods-item {
+			width: 120rpx;
+			height: 120rpx;
+			display: inline-block;
+			margin-right: 24rpx;
+		}
+		.goods-img {
+			display: block;
+			width: 100%;
+			height: 100%;
+		}
+	}
+	/* 单条商品 */
+	.goods-box-single {
+		display: flex;
+		padding: 20rpx 0;
+		.goods-img {
+			display: block;
+			width: 120rpx;
+			height: 120rpx;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			padding: 0 30rpx 0 24rpx;
+			overflow: hidden;
+			.row{
+				margin-top: 10rpx;
+			}
+			.row_title{
+				padding:5rpx 10rpx;
+				background-color: #dddddd;
+				border-radius: 10rpx;
+				font-size: 22rpx;
+				color: #ffffff;
+			}
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				line-height: 1;
+				width: 80%;
+			}
+			.attr-box {
+				display: flex;
+				justify-content: flex-end;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+			}
+			.price {
+				display: inline;
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				&:before {
+					content: '';
+					font-size: $font-sm;
+					
+				}
+			}
+		}
+	}
+	.price-box {
+		display: flex;
+		justify-content: flex-end;
+		align-items: baseline;
+		padding: 20rpx 30rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-light;
+		.num {
+			margin: 0 8rpx;
+			color: $font-color-dark;
+		}
+		.price {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			&:before {
+				content: '';
+				font-size: $font-sm;
+				margin: 0 2rpx 0 8rpx;
+			}
+		}
+	}
+	.action-box {
+		display: flex;
+		justify-content: flex-end;
+		align-items: center;
+		height: 100rpx;
+		position: relative;
+		padding-right: 30rpx;
+	}
+	.action-btn {
+		width: 160rpx;
+		height: 60rpx;
+		margin: 0;
+		margin-left: 24rpx;
+		padding: 0;
+		text-align: center;
+		line-height: 60rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-dark;
+		background: #fff;
+		border-radius: 100px;
+		&:after {
+			border-radius: 100px;
+		}
+		&.recom {
+			color: $base-color;
+			&:after {
+				border-color: $base-color;
+			}
+		}
+		&.evaluate {
+			color: $color-yellow;
+			&:after {
+				border-color: $color-yellow;
+			}
+		}
+	}
+}
+
+/* load-more */
+.uni-load-more {
+	display: flex;
+	flex-direction: row;
+	height: 80rpx;
+	align-items: center;
+	justify-content: center;
+}
+
+.uni-load-more__text {
+	font-size: 28rpx;
+	color: #999;
+}
+
+.uni-load-more__img {
+	height: 24px;
+	width: 24px;
+	margin-right: 10px;
+}
+
+.uni-load-more__img > view {
+	position: absolute;
+}
+
+.uni-load-more__img > view view {
+	width: 6px;
+	height: 2px;
+	border-top-left-radius: 1px;
+	border-bottom-left-radius: 1px;
+	background: #999;
+	position: absolute;
+	opacity: 0.2;
+	transform-origin: 50%;
+	animation: load 1.56s ease infinite;
+}
+
+.uni-load-more__img > view view:nth-child(1) {
+	transform: rotate(90deg);
+	top: 2px;
+	left: 9px;
+}
+
+.uni-load-more__img > view view:nth-child(2) {
+	transform: rotate(180deg);
+	top: 11px;
+	right: 0;
+}
+
+.uni-load-more__img > view view:nth-child(3) {
+	transform: rotate(270deg);
+	bottom: 2px;
+	left: 9px;
+}
+
+.uni-load-more__img > view view:nth-child(4) {
+	top: 11px;
+	left: 0;
+}
+
+.load1,
+.load2,
+.load3 {
+	height: 24px;
+	width: 24px;
+}
+
+.load2 {
+	transform: rotate(30deg);
+}
+
+.load3 {
+	transform: rotate(60deg);
+}
+
+.load1 view:nth-child(1) {
+	animation-delay: 0s;
+}
+
+.load2 view:nth-child(1) {
+	animation-delay: 0.13s;
+}
+
+.load3 view:nth-child(1) {
+	animation-delay: 0.26s;
+}
+
+.load1 view:nth-child(2) {
+	animation-delay: 0.39s;
+}
+
+.load2 view:nth-child(2) {
+	animation-delay: 0.52s;
+}
+
+.load3 view:nth-child(2) {
+	animation-delay: 0.65s;
+}
+
+.load1 view:nth-child(3) {
+	animation-delay: 0.78s;
+}
+
+.load2 view:nth-child(3) {
+	animation-delay: 0.91s;
+}
+
+.load3 view:nth-child(3) {
+	animation-delay: 1.04s;
+}
+
+.load1 view:nth-child(4) {
+	animation-delay: 1.17s;
+}
+
+.load2 view:nth-child(4) {
+	animation-delay: 1.3s;
+}
+
+.load3 view:nth-child(4) {
+	animation-delay: 1.43s;
+}
+
+@-webkit-keyframes load {
+	0% {
+		opacity: 1;
+	}
+
+	100% {
+		opacity: 0.2;
+	}
+}
 </style>

+ 0 - 676
pages/order/order1.vue

@@ -1,676 +0,0 @@
-<template>
-	<view class="content">
-		<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" 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" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index" class="order-item">
-						<view class="i-top b-b">
-							<text class="time">{{ item._add_time }}</text>
-							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
-							<text v-if="item.status === 4" class="del-btn iconfont icondelete" @click="deleteOrder(index)"></text>
-						</view>
-
-						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
-							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
-								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							</view>
-						</scroll-view>
-						<!-- <view v-if="item.cartInfo.length === 1" class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-								<text class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x {{ goodsItem.cart_num }}</text>
-								<text class="price">{{ moneyNum(goodsItem.productInfo.price)}}</text>
-							</view>
-						</view> -->
-						<view class="goods-box-single" v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex">
-							<image class="goods-img" :src="goodsItem.productInfo.image" mode="scaleToFill"></image>
-							<view class="right">
-								<view class="flex-start">
-									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
-								</view>
-								<view class="row flex">
-									<text class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
-									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
-								</view>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.cartInfo.length }}</text>
-							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
-							实付款
-							<text class="price" v-if="item.use_integral != 0">{{ moneyNum(item.pay_price)}}</text>
-							<text class="price" v-if="item.use_integral == 0">{{ moneyNum(item.pay_price)}}</text>
-						</view>
-						<view class="action-box b-t" v-if="item.status != 5">
-							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
-							<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 == '未发货'" class="action-btn" @click.stop="orderRefund(item)">申请退款</button>
-						</view>
-					</view>
-
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '待付款',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '待发货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 2,
-					text: '待收货',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 3,
-					text: '待评价',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
-					text: '已完成',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				}
-			]
-		};
-	},
-
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-		this.tabCurrentIndex = +options.state;
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
-			this.loadData();
-		}
-		// #endif
-	},
-	// #ifdef APP-PLUS || H5
-	onBackPress(e){
-		uni.switchTab({
-			url: '/pages/user/user',
-		});
-		return true;
-	},
-	// #endif
-	methods: {
-		// 转换金额为数字
-		moneyNum(value){
-				return +value;
-		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
-			uni.showModal({
-				title: '是否确认收货?',
-				success: () => {
-					orderTake({
-						uni: item.order_id
-					})
-						.then(e => {
-							obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
-							uni.showToast({
-								title: '收货成功'
-							});
-						})
-						.catch(e => {
-							console.log(e);
-						});
-				}
-			});
-		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderDetail?id=' + e.order_id
-			});
-		},
-		// 申请退款
-		orderRefund(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
-			});
-		},
-		// 订单支付
-		orderPay(e) {
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
-			});
-		},
-		//获取订单列表
-		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';
-
-			orderList({
-				type: state,
-				page: navItem.page,
-				limit: navItem.limit
-			})
-				.then(({ data }) => {
-					let arr = data.map(e => {
-						let b = this.orderStateExp(e.status);
-						e.stateTip = b.stateTip;
-						e.stateTipColor = b.stateTipColor;
-						return e;
-					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					// console.log(navItem.orderList);
-					navItem.page++;
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					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;
-		},
-		//删除订单
-		deleteOrder(index) {
-			uni.showLoading({
-				title: '请稍后'
-			});
-			setTimeout(() => {
-				this.navList[this.tabCurrentIndex].orderList.splice(index, 1);
-				uni.hideLoading();
-			}, 600);
-		},
-		//取消订单
-		cancelOrder(item) {
-			uni.showModal({
-				title: '订单取消',
-				content: '是否取消订单?',
-				success: e => {
-					if (e.confirm) {
-						uni.showLoading({
-							title: '请稍后'
-						});
-						orderCancel({ id: item.order_id })
-							.then(e => {
-								uni.showToast({
-									title: '取消成功',
-									duration: 2000,
-									position: 'top'
-								});
-							})
-							.catch(e => {
-								console.log(e);
-							});
-						//取消订单后删除待付款中该项
-						let list = this.navList[this.tabCurrentIndex].orderList;
-						let index = list.findIndex(val => val.id === item.id);
-						index !== -1 && list.splice(index, 1);
-						uni.hideLoading();
-					}
-				}
-			});
-		},
-
-		//订单状态文字和颜色
-		orderStateExp(state) {
-			let stateTip = '',
-				stateTipColor = '#fa436a';
-			switch (+state) {
-				case 0:
-					stateTip = '待付款';
-					break;
-				case 1:
-					stateTip = '待发货';
-					break;
-				case 2:
-					stateTip = '待收货';
-					break;
-				case 3:
-					stateTip = '待评价';
-					break;
-				case 4:
-					stateTip = '已完成';
-					stateTipColor = '#5dbc7c';
-					break;
-				case 9:
-					stateTip = '订单已关闭';
-					stateTipColor = '#909399';
-					break;
-
-				//更多自定义
-			}
-			return { stateTip, stateTipColor };
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.content {
-	background: $page-color-base;
-	height: 100%;
-}
-
-.swiper-box {
-	height: calc(100% - 40px);
-}
-.list-scroll-content {
-	height: 100%;
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	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: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-
-.uni-swiper-item {
-	height: auto;
-}
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
-		display: flex;
-		align-items: center;
-		height: 80rpx;
-		padding-right: 30rpx;
-		font-size: $font-base;
-		color: $font-color-dark;
-		position: relative;
-		.time {
-			flex: 1;
-		}
-		.state {
-			color: $base-color;
-		}
-		.del-btn {
-			padding: 10rpx 0 10rpx 36rpx;
-			font-size: $font-lg;
-			color: $font-color-light;
-			position: relative;
-			&:after {
-				content: '';
-				width: 0;
-				height: 30rpx;
-				border-left: 1px solid $border-color-dark;
-				position: absolute;
-				left: 20rpx;
-				top: 50%;
-				transform: translateY(-50%);
-			}
-		}
-	}
-	/* 多条商品 */
-	.goods-box {
-		height: 160rpx;
-		padding: 20rpx 0;
-		white-space: nowrap;
-		.goods-item {
-			width: 120rpx;
-			height: 120rpx;
-			display: inline-block;
-			margin-right: 24rpx;
-		}
-		.goods-img {
-			display: block;
-			width: 100%;
-			height: 100%;
-		}
-	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
-		}
-		.right {
-			flex: 1;
-			display: flex;
-			flex-direction: column;
-			padding: 0 30rpx 0 24rpx;
-			overflow: hidden;
-			.row{
-				margin-top: 10rpx;
-			}
-			.row_title{
-				padding:5rpx 10rpx;
-				background-color: #dddddd;
-				border-radius: 10rpx;
-				font-size: 22rpx;
-				color: #ffffff;
-			}
-			.title {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				line-height: 1;
-				width: 80%;
-			}
-			.attr-box {
-				display: flex;
-				justify-content: flex-end;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				display: inline;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '';
-					font-size: $font-sm;
-					
-				}
-			}
-		}
-	}
-	.price-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: baseline;
-		padding: 20rpx 30rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-light;
-		.num {
-			margin: 0 8rpx;
-			color: $font-color-dark;
-		}
-		.price {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			&:before {
-				content: '';
-				font-size: $font-sm;
-				margin: 0 2rpx 0 8rpx;
-			}
-		}
-	}
-	.action-box {
-		display: flex;
-		justify-content: flex-end;
-		align-items: center;
-		height: 100rpx;
-		position: relative;
-		padding-right: 30rpx;
-	}
-	.action-btn {
-		width: 160rpx;
-		height: 60rpx;
-		margin: 0;
-		margin-left: 24rpx;
-		padding: 0;
-		text-align: center;
-		line-height: 60rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-		background: #fff;
-		border-radius: 100px;
-		&:after {
-			border-radius: 100px;
-		}
-		&.recom {
-			color: $base-color;
-			&:after {
-				border-color: $base-color;
-			}
-		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
-			}
-		}
-	}
-}
-
-/* load-more */
-.uni-load-more {
-	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
-	justify-content: center;
-}
-
-.uni-load-more__text {
-	font-size: 28rpx;
-	color: #999;
-}
-
-.uni-load-more__img {
-	height: 24px;
-	width: 24px;
-	margin-right: 10px;
-}
-
-.uni-load-more__img > view {
-	position: absolute;
-}
-
-.uni-load-more__img > view view {
-	width: 6px;
-	height: 2px;
-	border-top-left-radius: 1px;
-	border-bottom-left-radius: 1px;
-	background: #999;
-	position: absolute;
-	opacity: 0.2;
-	transform-origin: 50%;
-	animation: load 1.56s ease infinite;
-}
-
-.uni-load-more__img > view view:nth-child(1) {
-	transform: rotate(90deg);
-	top: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(2) {
-	transform: rotate(180deg);
-	top: 11px;
-	right: 0;
-}
-
-.uni-load-more__img > view view:nth-child(3) {
-	transform: rotate(270deg);
-	bottom: 2px;
-	left: 9px;
-}
-
-.uni-load-more__img > view view:nth-child(4) {
-	top: 11px;
-	left: 0;
-}
-
-.load1,
-.load2,
-.load3 {
-	height: 24px;
-	width: 24px;
-}
-
-.load2 {
-	transform: rotate(30deg);
-}
-
-.load3 {
-	transform: rotate(60deg);
-}
-
-.load1 view:nth-child(1) {
-	animation-delay: 0s;
-}
-
-.load2 view:nth-child(1) {
-	animation-delay: 0.13s;
-}
-
-.load3 view:nth-child(1) {
-	animation-delay: 0.26s;
-}
-
-.load1 view:nth-child(2) {
-	animation-delay: 0.39s;
-}
-
-.load2 view:nth-child(2) {
-	animation-delay: 0.52s;
-}
-
-.load3 view:nth-child(2) {
-	animation-delay: 0.65s;
-}
-
-.load1 view:nth-child(3) {
-	animation-delay: 0.78s;
-}
-
-.load2 view:nth-child(3) {
-	animation-delay: 0.91s;
-}
-
-.load3 view:nth-child(3) {
-	animation-delay: 1.04s;
-}
-
-.load1 view:nth-child(4) {
-	animation-delay: 1.17s;
-}
-
-.load2 view:nth-child(4) {
-	animation-delay: 1.3s;
-}
-
-.load3 view:nth-child(4) {
-	animation-delay: 1.43s;
-}
-
-@-webkit-keyframes load {
-	0% {
-		opacity: 1;
-	}
-
-	100% {
-		opacity: 0.2;
-	}
-}
-</style>

+ 5 - 1
pages/order/orderDetail.vue

@@ -68,8 +68,12 @@
 			<view class="input">-{{ item.coupon_price }}</view>
 		</view>
 		<view class="row b-b flex" v-if="item.use_integral > 0">
-			<text class="tit">提货券抵扣</text>
+			<text class="tit">积分抵扣</text>
 			<view class="input">-{{ item.use_integral }}</view>
+		</view>
+		<view class="row b-b flex" v-if="item.user_consumption > 0">
+			<text class="tit">消费券抵扣</text>
+			<view class="input">-{{ item.user_consumption }}</view>
 		</view>
 		<view class="row b-b flex">
 			<text class="tit ">实付</text>

+ 24 - 33
pages/product/product.vue

@@ -40,20 +40,7 @@
 				<!-- <text class="coupon-tip">7折</text> -->
 			</view>
 			<text class="title" v-if="goodsType == 0">{{ goodsObjact.store_name }}</text>
-			<view class="bot-row">
-				<text>快递: {{ goodsObjact.postage }}</text>
-				<text style="text-align: center;">销量: {{ goodsObjact.sales }}</text>
-				<text style="text-align: right;">{{ storeObjact.address | address }}</text>
-			</view>
 		</view>
-		<!-- <view class="c-list">
-			<view class="c-row b-b">
-				<text class="tit">赠送</text>
-				<view class="con">
-					<text class="selected-text">购买赠送<text class="num">200</text>艺金券</text>
-				</view>
-			</view>
-		</view> -->
 		<view class="c-list">
 			<view class="c-row b-b" @click="toggleSpec">
 				<text class="tit">购买数量</text>
@@ -113,9 +100,12 @@
 					<view class="">
 						收藏
 					</view>
+				</view>
+				<view class="buy-now">
+					<button type="primary" class=" action-btn no-border buy-now-btn" @click.stop="toggleSpec(2)" v-if="is_bk == 0 && is_xf ==0">加入购物车</button>
+					<button type="primary" class=" action-btn no-border  add-cart-btn" @click.stop="toggleSpec(1)">立即购买</button>
 				</view>
-				<!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click="toggleSpec(2)">加入购物车</button> -->
-				<button type="primary" class=" action-btn no-border  add-cart-btn" @click="toggleSpec(1)">立即购买</button>
+				
 			</view>
 			<!-- <view class="action-btn-group">
 				<button type="primary" class=" action-btn no-border  add-cart-btn" style="width: 750rpx;" @click="toggleSpec(1)">立即购买</button>
@@ -257,11 +247,19 @@ export default {
 				h: '', //时
 				i: '', //分
 				s: '' //秒
-			}
+			},
+			is_bk: 0,
+			is_xf: 0
 		};
 	},
 	async onLoad(options) {
-		let obj = this;
+		let obj = this;
+		if(options.is_bk) {
+			obj.is_bk = options.is_bk
+		}
+		if(options.is_xf) {
+			obj.is_xf = options.is_xf
+		}
 		//保存商品id
 		this.goodsid = options.id;
 		// 判断有无人邀请
@@ -485,7 +483,7 @@ export default {
 					if (obj.type == 1) {
 						// 跳转到支付页
 						uni.navigateTo({
-							url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj.goodsType
+							url: '/pages/order/createOrder?id=' + data.cartId + '&goodsType=' + obj.goodsType + '&is_xf=' + obj.is_xf + '&is_bk=' + obj.is_bk
 						});
 					}
 					if (obj.type == 2) {
@@ -1104,20 +1102,8 @@ page {
 	.action-btn-group {
 		display: flex;
 		height: 98rpx;
-		// border-radius: 100px;
 		overflow: hidden;
-		// margin-left: 20rpx;
-		position: relative;
-		// &:after {
-		// 	content: '';
-		// 	position: absolute;
-		// 	top: 50%;
-		// 	right: 50%;
-		// 	transform: translateY(-50%);
-		// 	height: 28rpx;
-		// 	width: 0;
-		// 	border-right: 1px solid rgba(255, 255, 255, 0.5);
-		// }
+		position: relative;
 		.shoucang {
 			width: 170rpx;
 			height: 100rpx;
@@ -1128,7 +1114,11 @@ page {
 				width: 36rpx;
 				height: 35rpx;
 			}
-			// box-shadow: 0px 0px 40px 0px rgba(50, 50, 52, 0.06);
+		}
+		.buy-now {
+			flex-grow: 1;
+			width: 580rpx;
+			display: flex;
 		}
 		.action-btn {
 			flex-shrink: 0;
@@ -1136,7 +1126,8 @@ page {
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			width: 580rpx;
+			// width: 580rpx;
+			flex-grow: 1;
 			height: 100%;
 			font-size: 34rpx;
 			padding: 0;

+ 0 - 200
pages/user/approve.vue

@@ -1,200 +0,0 @@
-<template>
-	<view class="content">
-		<view class="bgimg"><image class="img" src="https://zhibo.liuniu946.com/img/bgRz.png" mode="widthFix"></image></view>
-		<u-form class="user" :model="form" ref="uForm">
-			<u-form-item label="姓名"><u-input v-model="form.name" placeholder="请输入真实姓名" /></u-form-item>
-			<u-form-item label="身份证号" label-width="150"><u-input placeholder="请输入身份证号" v-model="form.card" /></u-form-item>
-		</u-form>
-		<view class="userBox">
-			<view class="title">上传人脸正面照片</view>
-			<view class="imgUp" @click.stop="upImg"><image class="img" :src="form.img || 'https://zhibo.liuniu946.com/img/upImgbg.png'" mode="scaleToFill"></image></view>
-		</view>
-		<button class="add-btn" @click="pushData('add')">提交</button>
-	</view>
-</template>
-
-<script>
-import { realName } from '@/api/set.js';
-export default {
-	data() {
-		return {
-			loding: false, //判断是否在点击中
-			form: {
-				name: '',
-				card: '',
-				img: ''
-			}
-		};
-	},
-	onLoad(option) {},
-	methods: {
-		upImg(e) {
-			console.log('上传图片');
-			const that = this;
-			uni.navigateTo({
-				url: '/pages/set/cropper',
-				events: {
-					imgCropped(event) {
-						console.log(event,"123456")
-						// 监听裁剪完成
-						// 返回的 event 中包含了已经裁剪好图片的base64编码字符串
-						// 你可以使用 <image :src="imgDataUrl" mode="aspectFit"></image> 组件来展示裁剪后的图片
-						// 或者你可以将该字符串通过接口上传给服务器用来保存
-						that.$nextTick(function() {
-							that.form.img = event.data;
-							console.log(that.form.img, '图片');
-						});
-					}
-				},
-				fail(e) {
-					console.log(e, '错误');
-				}
-			});
-		},
-		ToIndex() {
-			let obj = this;
-			let ur = uni.getStorageSync('present') || '/pages/index/index';
-			// 用于处理缓存bug
-			if (ur == 'pages/product/product') {
-				ur = '/pages/index/index';
-			}
-			uni.switchTab({
-				url: ur,
-				fail(e) {
-					uni.navigateTo({
-						url: ur,
-						fail(e) {
-							uni.navigateTo({
-								url: '/pages/index/index'
-							});
-						}
-					});
-				}
-			});
-		},
-		pushData() {
-			const da = this.form;
-			if (this.loding) {
-				return;
-			}
-			if (!da.name) {
-				uni.showModal({
-					title: '提示',
-					content: '请填写名称',
-					showCancel: false
-				});
-				return;
-			}
-			if (!da.card) {
-				uni.showModal({
-					title: '提示',
-					content: '请填写身份证',
-					showCancel: false
-				});
-				return;
-			}
-			if (!da.img) {
-				uni.showModal({
-					title: '提示',
-					content: '请选择图片',
-					showCancel: false
-				});
-				return;
-			}
-			const data = {
-				face_image: da.img.replace(/^data:image\/[a-z,A-Z]*;base64,/, ''),
-				real_name: da.name,
-				id_card: da.card
-			};
-			uni.showLoading({
-				title: '审核中',
-				mask: true
-			});
-			this.loding = true;
-			// 上传
-			realName(data)
-				.then(e => {
-					uni.showModal({
-						title: '提示',
-						content: '实名成功过',
-						showCancel: false,
-						success: res => {
-							uni.switchTab({
-								url: '/pages/index/index'
-							});
-						}
-					});
-					uni.hideLoading();
-					this.loding = false;
-					console.log(e);
-				})
-				.catch(e => {
-					this.$api.msg("审核失败")
-					this.loding = false;
-					console.log(e);
-					uni.hideLoading();
-				});
-		}
-	}
-};
-</script>
-
-<style lang="scss" scoped>
-.content {
-	height: 100%;
-	padding: 0 $page-row-spacing;
-}
-.add-btn {
-	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690rpx;
-	height: 80rpx;
-	margin: 60rpx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background: #ff0000;
-	border-radius: 10rpx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
-}
-.bgimg {
-	text-align: center;
-	width: 1200rpx;
-	margin-left: -260rpx;
-	height: 400rpx;
-	background: #ff0000;
-	border-bottom-right-radius: 999999rpx;
-	border-bottom-left-radius: 999999rpx;
-	.img {
-		width: 400rpx;
-		margin-top: 50rpx;
-	}
-}
-.user {
-	margin-top: -100rpx !important;
-	border-radius: 10rpx !important;
-	padding: 0 30rpx;
-}
-.userBox,
-.user {
-	box-shadow: 0px 2px 16px 1px rgba(89, 89, 89, 0.24) !important;
-	background-color: white !important;
-}
-.userBox {
-	margin-top: 20rpx;
-	padding: 30rpx;
-	.imgUp {
-		min-height: 100rpx;
-		text-align: center;
-		margin-top: 30rpx;
-		.img {
-			width: 300rpx;
-			height: 400rpx;
-		}
-	}
-}
-.imglist /deep/ * {
-	margin-left: auto !important;
-	margin-right: auto !important;
-}
-</style>

+ 0 - 193
pages/user/gzsq.vue

@@ -1,193 +0,0 @@
-<template>
-	<view class="content">
-		<view class="tab-wrapper">
-			<view class="itemx">
-				<view class="item-tit">公司名称:</view>
-				<input type="text" v-model="name" placeholder="请输入您的姓名" />
-			</view>
-			<view class="itemx">
-				<view class="item-tit">负责人姓名:</view>
-				<input type="text" v-model="phone" placeholder="请输入您的手机号" />
-			</view>
-			<view class="itemx">
-				<view class="item-tit">联系方式:</view>
-				<input type="text" v-model="phone" placeholder="请输入您的手机号" />
-			</view>
-			<view class="itemx">
-				<view class="item-tit">身份证号:</view>
-				<input type="text" v-model="area" placeholder="请输入店长区域" />
-			</view>
-		</view>
-		<view class="scsfz-wrap">
-			<image src="../../static/img/sfzzm.png" mode=""></image>
-			<view class="" style="padding-bottom: 33rpx;">
-				添加身份证正面
-			</view>
-			<image src="../../static/img/sfzzm.png" mode=""></image>
-			<view class="">
-				添加身份证反面
-			</view>
-		</view>
-		<view class="tab-wrapper" style="padding-top: 0;">
-			<view class="itemx">
-				<view class="item-tit">店铺地址:</view>
-				<input type="text" v-model="name" placeholder="请输入您的姓名" />
-			</view>
-			<view class="itemx"  style="height: 250rpx;">
-				<view class="item-tit">营业执照:</view>
-				<!-- <input type="text" v-model="name" placeholder="请输入您的姓名" /> -->
-				<image src="../../static/img/add.png" mode=""></image>
-			</view>
-		</view>
-		<view class="tab-wrapper" style="padding-top: 0;">
-			<view class="itemx"  style="height: 250rpx;">
-				<view class="item-tit">门店照片:</view>
-				<!-- <input type="text" v-model="name" placeholder="请输入您的姓名" /> -->
-				<image src="../../static/img/add.png" mode=""></image>
-			</view>
-		</view>
-		<view class="sq-xz" @click="dagou = !dagou">
-			<text class="sq-gou"  v-if="!dagou"></text>
-			<image src="../../static/icon/gou.png" mode="" class="sq-gou-g" v-else></image>
-			<text>我已阅读并同意</text><text @click.stop="lookXz" style="color: #375AFE;">《馆长申请须知》</text>
-		</view>
-		<view class="sq-btn" @click="subSq()">
-			提交申请
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				dagou: false,
-			}
-		},
-		methods: {
-			lookXz() {
-				this.$api.msg('瞅啥瞅!')
-			},
-			subSq() {
-				let obj = this
-				if(!obj.dagou) {
-					return this.$api.msg('打勾去啊,愣着干啥')
-				}
-				
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.tab-wrapper {
-		padding: 20rpx 30rpx;
-		// background-color: #f2f3f5;
-
-	}
-
-	.itemx {
-		margin: 0 auto;
-		width: 100%;
-		background-color: #fff !important;
-		height: 100rpx;
-		display: flex;
-		// width: 690px;
-		border: 1px #f4f4f4 solid;
-		image {
-			margin-top: 63rpx;
-			margin-left: 55rpx;
-			width: 160rpx;
-			height: 160rpx;
-		}
-		.code {
-			width: 150rpx;
-			flex-shrink: 0;
-			text-align: center;
-			font-size: 28rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #FF4C4C;
-			line-height: 100rpx;
-		}
-
-		.item-tit {
-			height: 100rpx;
-			line-height: 100rpx;
-			padding-left: 30rpx;
-			width: 220rpx;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #666666;
-			flex-shrink: 0;
-		}
-
-		input {
-			width: 530rpx;
-			padding-right: 20rpx;
-			height: 100rpx;
-			line-height: 100rpx;
-			font-size: 30rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #333333;
-		}
-	}
-
-	.scsfz-wrap {
-		width: 690rpx;
-		height: 673rpx;
-		background: #FFFFFF;
-		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
-		border-radius: 10rpx;
-		margin: 0 auto 20rpx;
-		font-size: 29rpx;
-		font-family: SourceHanSansCN;
-		font-weight: 400;
-		color: #B2B2B2;
-		text-align: center;
-		padding-top: 33rpx;
-		image {
-			display: block;
-			width: 354rpx;
-			height: 240rpx;
-			margin: auto;
-		}
-	}
-	.sq-btn {
-		width: 750rpx;
-		height: 98rpx;
-		line-height: 98rpx;
-		background: linear-gradient(0deg, rgba(60, 237, 237, 0.99), #04B8FF, #375AFE);
-		text-align: center;
-		font-size: 36rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #FFFFFF;
-	}
-	.sq-xz {
-		height: 32rpx;
-		line-height: 32rpx;
-		display: flex;
-		margin: 21rpx 0 75rpx 30rpx;
-		font-size: 24rpx;
-		font-family: PingFang SC;
-		font-weight: 500;
-		color: #0C1732;
-		.sq-gou {
-			display: inline-block;
-			width: 32rpx;
-			height: 32rpx;
-			border-radius: 50%;
-			border: 1px solid #999;
-			margin-right: 15rpx;
-		}
-		.sq-gou-g {
-			width: 32rpx;
-			height: 32rpx;
-			border-radius: 50%;
-			margin-right: 15rpx;
-		}
-	}
-</style>

+ 0 - 29
pages/user/myfans.vue

@@ -1,29 +0,0 @@
-<template>
-	<view class="content">
-		<view class="top-fan">
-			
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-		
-	}
-</script>
-
-<style lang="scss" scoped>
-	.top-fan {
-		width: 750rpx;
-		height: 336rpx;
-		background: linear-gradient(-41deg, rgba(60, 237, 237, 0.99), #04B8FF, #375AFE);
-	}
-</style>

+ 456 - 405
pages/user/myggz.vue

@@ -1,405 +1,456 @@
-<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/zhihuanjuan.png" mode=""></image></view>
-			<view class="money-box">
-				<view class="money">{{ userInfo.aid_val || '0' }}</view>
-				<view>广告值</view>
-			</view>
-			<!-- <view class="money-btn" @click="navto('/pages/money/recharge')">
-				兑换广告值
-				<text>></text>
-			</view> -->
-		</view>
-		<view class="info-box flex">
-			<view class="info-item">
-				<view class="info-font">累计收入</view>
-				<view class="info-num">{{recharge}}</view>
-			</view>
-			<view class="shu"></view>
-			<view class="info-item">
-				<view class="info-font">累计支出</view>
-				<view class="info-num">{{orderStatusSum}}</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: maxheight }" 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 v-if="item.status == 0" class="status">待发放</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 { aid_val_list, userBalance } from '@/api/wallet.js';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { mapState, mapMutations } from 'vuex';
-import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
-import empty from '@/uview-ui/components/u-empty/u-empty.vue';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	computed: {
-		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-	},
-	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.maxheight = resu.windowHeight - res[0].top + 'px';
-					console.log('打印页面的剩余高度', _this.height);
-				});
-			},
-			fail: res => {}
-		});
-	},
-	data() {
-		return {
-			// 头部图高度
-			maxheight: '',
-			tabCurrentIndex: 0,
-			orderStatusSum: 0,
-			recharge: 0,
-			navList: [
-				{
-					state: 2,
-					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();
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		// 点击返回 我的页面
-		toBack() {
-			uni.navigateBack({});
-		},
-		//获取收入支出信息
-		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' || navItem.loadingType == 'noMore') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			aid_val_list(
-				
-			)
-				.then(({ data }) => {
-					console.log(data);
-					obj.recharge = data.sr;
-					obj.orderStatusSum = data.zc;
-					obj.navList[0].orderList = data.zj
-					obj.navList[1].orderList = data.kc
-					navItem.loadingType = 'nomore';
-					navItem.loaded = true
-					uni.hideLoading();
-				})
-				.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: 20rpx;
-	color: #ffffff;
-	text-align: center;
-	.money {
-		font-size: 72rpx;
-		font-family: PingFang SC;
-		font-weight: bold;
-		color: #ffffff;
-	}
-	.text {
-		font-size: 30rpx;
-	}
-}
-.money-btn {
-	position: relative;
-	z-index: 2;
-	color: #ffffff;
-	padding-right: 50rpx;
-	text-align: right;
-	font-size: 30rpx;
-	font-family: PingFang SC;
-	font-weight: bold;
-	color: #FFFFFF;
-	text {
-		display: inline-block;
-		padding-left: 10rpx;
-	}
-}
-
-.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>
+<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/thq-bg.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.contribution || '0' }}</view>
+				<view>当前余额</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{sr}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{zc}}</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: maxheight }" 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 v-if="item.status == 0" class="status">待发放</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 {
+		userBalance,
+		getContributionList
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
+	import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		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.maxheight = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				sr: 0,
+				zc: 0,
+				navList: [{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						loaded: false
+					},
+					{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						loaded: false
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			// 点击返回 我的页面
+			toBack() {
+				uni.navigateBack({});
+			},
+			//获取收入支出信息
+			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' || navItem.loadingType == 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getContributionList({
+					page: navItem.page,
+					limit: navItem.limit,
+					pm: navItem.state
+				})
+					.then(({
+						data
+					}) => {
+						obj.sr = data.sr
+						obj.zc = data.zc
+						navItem.orderList = navItem.orderList.concat(data.list)
+						if(navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						}else {
+							navItem.loadingType = 'noMore'
+						}
+						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: 20rpx;
+		color: #ffffff;
+		text-align: center;
+		height: 250rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.money-btn {
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding-right: 50rpx;
+		text-align: right;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+
+		text {
+			display: inline-block;
+			padding-left: 10rpx;
+		}
+	}
+
+	.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>

+ 139 - 33
pages/user/mygwjf.vue

@@ -8,30 +8,75 @@
 				<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/yongjin-bg.png" mode=""></image>
+				<image src="../../static/img/jf-bg.png" mode=""></image>
 			</view>
-			<view class="money-box">
-				<view class="money">{{ userInfo.sp_final || '0' }}</view>
-				<view>购物积分</view>
-			</view>
-			<view class="money-btn flex">
-				<text @click.stop="navto('/pages/user/mygwjfhz')">购物积分转账</text>
-				<text @click.stop="navto('/pages/money/withdmoenys?type=shop')">兑换提货券</text>
+			<view class="my-jf">
+				<view class="jf-zz" @click.stop="navto('/pages/user/xfjfzz?type=1')">
+					积分转账
+				</view>
+				<view class="jf-zz jf-tx" @click.stop="navto('/pages/user/withdrawal?jftype=1')">
+					积分提现
+				</view>
+				<view class="jf-tit">
+					积分余额
+				</view>
+				<view class="jf-val">
+					{{userInfo.integral*1 || 0}}
+				</view>
+				<view class="jf-item-list flex">
+					<view class="jf-item">
+						<view class="item-val">
+							{{dsf || 0}}
+						</view>
+						<view class="item-tit">
+							待释放
+						</view>
+					</view>
+					<view class="jg">
+						
+					</view>
+					<view class="jf-item">
+						<view class="item-val">
+							{{jrsf|| 0}}
+						</view>
+						<view class="item-tit">
+							今日释放
+						</view>
+					</view>
+					<view class="jg">
+						
+					</view>
+					<view class="jf-item">
+						<view class="item-val">
+							{{sr || 0}}
+						</view>
+						<view class="item-tit">
+							累计收入
+						</view>
+					</view>
+					<view class="jg">
+						
+					</view>
+					<view class="jf-item">
+						<view class="item-val">
+							{{zc || 0}}
+						</view>
+						<view class="item-tit">
+							累计支出
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
-		<view class="info-box flex">
-			<view class="info-item">
-				<view class="info-font">累计收入</view>
-				<view class="info-num">{{recharge}}</view>
-			</view>
-			<view class="shu"></view>
-			<view class="info-item">
-				<view class="info-font">累计支出</view>
-				<view class="info-num">{{orderStatusSum}}</view>
-			</view>
+		<view class="status_bar">
+			<!-- 这里是状态栏 -->
+		</view>
+		<view class="" style="height: 20rpx;">
+			
 		</view>
 		<view class="navbar">
 			<view v-for="(item, index) in navList" :key="index" class="nav-item"
@@ -71,8 +116,8 @@
 
 <script>
 	import {
-		sp_final_list,
-		userBalance
+		userBalance,
+		integrallist
 	} from '@/api/wallet.js';
 	import {
 		getMoneyStyle
@@ -113,10 +158,12 @@
 				// 头部图高度
 				maxheight: '',
 				tabCurrentIndex: 0,
-				orderStatusSum: 0,
-				recharge: 0,
+				jrsf: 0,
+				dsf: 0,
+				zc: 0,
+				sr: 0,
 				navList: [{
-						state: 2,
+						state: 1,
 						text: '收入',
 						loadingType: 'more',
 						orderList: [],
@@ -125,7 +172,7 @@
 						loaded: false
 					},
 					{
-						state: 1,
+						state: 0,
 						text: '支出',
 						loadingType: 'more',
 						orderList: [],
@@ -170,18 +217,25 @@
 				// 修改当前对象状态为加载中
 				navItem.loadingType = 'loading';
 
-				sp_final_list()
+				integrallist({
+					page: navItem.page,
+					limit: navItem.limit,
+					pm: navItem.state
+				})
 					.then(({
 						data
 					}) => {
-						console.log(data);
-						obj.recharge = data.sr;
-						obj.orderStatusSum = data.zc;
-						obj.navList[0].orderList = data.zj
-						obj.navList[1].orderList = data.kc
-						navItem.loadingType = 'nomore';
+						obj.sr = data.sr
+						obj.zc = data.zc
+						obj.dsf = data.dsf
+						obj.jrsf = data.jrsf
+						navItem.orderList = navItem.orderList.concat(data.list)
+						if(navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						}else {
+							navItem.loadingType = 'noMore'
+						}
 						navItem.loaded = true
-						uni.hideLoading();
 					})
 					.catch(e => {
 						console.log(e);
@@ -448,4 +502,56 @@
 		right: 0;
 		margin: 0 auto;
 	}
+	.my-jf {
+		position: relative;
+		width: 670rpx;
+		height: 386rpx;
+		background: #FFFFFF;
+		box-shadow: 0px 0px 20rpx 0px rgba(50,50,52,0.0600);
+		border-radius: 20rpx;
+		margin: 44rpx auto 0;
+		text-align: center;
+		font-size: 28rpx;
+		font-weight: 500;
+		color: #181818;
+		.jf-zz {
+			width: 147rpx;
+			line-height: 50rpx;
+			text-align: center;
+			background: linear-gradient(90deg, #FF6F30, #FF7131);
+			border-radius: 7rpx 0px 0px 7rpx;
+			position: absolute;
+			top: 59rpx;
+			right: 0;
+			font-size: 27rpx;
+			font-weight: 400;
+			color: #FFFFFF;
+		}
+		.jf-tx {
+			top: 160rpx;
+		}
+		.jf-tit {
+			padding-top: 70rpx;
+		}
+		.jf-val {
+			font-size: 74rpx;
+			font-weight: bold;
+			color: #181818;
+			padding-top: 10rpx;
+		}
+		.jf-item-list {
+			position: absolute;
+			bottom: 30rpx;
+			height: 80rpx;
+			width: 670rpx;
+			.jf-item {
+				width: 25%;
+			}
+			.jg {
+				width: 1rpx;
+				height: 74rpx;
+				background: #DCDFE6;
+			}
+		}
+	}
 </style>

+ 482 - 0
pages/user/myjf.vue

@@ -0,0 +1,482 @@
+<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/jf-bg.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.contribution || '0' }}</view>
+				<view>当前余额</view>
+			</view>
+			<view class="moneybtn-box">
+				<view class="money-btn" @click="navto('/pages/user/withdrawal?jftype=2')">
+					动态积分提现
+				</view>
+				<view class="money-btn" @click="navto('/pages/user/xfjfzz?type=2')">
+					动态积分转账
+				</view>
+			</view>
+		</view>
+		<view class="info-box flex">
+			<view class="info-item">
+				<view class="info-font">累计收入</view>
+				<view class="info-num">{{sr}}</view>
+			</view>
+			<view class="shu"></view>
+			<view class="info-item">
+				<view class="info-font">累计支出</view>
+				<view class="info-num">{{zc}}</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: maxheight }" 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 v-if="item.status == 0" class="status">待发放</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 {
+		userBalance,
+		getDynamicIntegralList
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
+	import empty from '@/uview-ui/components/u-empty/u-empty.vue';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
+		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.maxheight = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				sr: 0,
+				zc: 0,
+				navList: [{
+						state: 1,
+						text: '收入',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						loaded: false
+					},
+					{
+						state: 0,
+						text: '支出',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						loaded: false
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			// 点击返回 我的页面
+			toBack() {
+				uni.navigateBack({});
+			},
+			//获取收入支出信息
+			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' || navItem.loadingType == 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				getDynamicIntegralList({
+					page: navItem.page,
+					limit: navItem.limit,
+					pm: navItem.state
+				})
+					.then(({
+						data
+					}) => {
+						obj.sr = data.sr
+						obj.zc = data.zc
+						navItem.orderList = navItem.orderList.concat(data.list)
+						if(navItem.limit == data.list.length) {
+							navItem.loadingType = 'more'
+						}else {
+							navItem.loadingType = 'noMore'
+						}
+						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;
+		/* #ifdef H5 */
+		padding-top: 70rpx;
+		/* #endif */
+		
+		color: #ffffff;
+		text-align: center;
+		/* #ifdef APP-PLUS */
+		height: 180rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		/* #endif */
+		
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.money-btn {
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		// padding-right: 50rpx;
+		text-align: right;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+
+		text {
+			display: inline-block;
+			padding-left: 10rpx;
+		}
+	}
+
+	.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;
+	}
+	.moneybtn-box {
+		display: flex;
+		justify-content: space-between;
+		position: relative;
+		z-index: 2;
+		color: #ffffff;
+		padding:0rpx 50rpx ;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+</style>

+ 75 - 143
pages/user/mytg.vue

@@ -1,24 +1,15 @@
 <template>
 	<view class="content">
 		<view class="content-money">
-			<view class="money-box">
-				<image class="tuiguang_bg" src="../../static/img/hinfo-bg.png"></image>
-				<view class="money-frame">
-					<view class="money_num">
-						{{userInfo.spread_count || '0'}}
-						<text class="money_ren">人</text>
-					</view>
-				</view>
+			<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="flex buttom-box">
-				<view class="buttom">
-					<view class="money">{{userInfo.team || 0}}</view>
-					<text class="text">团队人数</text>
-				</view>
-				<view class="buttom">
-					<view class="money">{{userInfo.user_dow || 0}}</view>
-					<text class="text">直推下级</text>
-				</view>
+			<view class="content-bg"><image src="../../static/img/zhihuanjuan.png" mode=""></image></view>
+			<view class="money-box">
+				<view class="money">{{ userInfo.aid_val || '0' }}</view>
+				<view>我的推广人数</view>
 			</view>
 		</view>
 		<view class="navbar">
@@ -220,147 +211,88 @@
 		background: #ffffff;
 		height: 100%;
 	}
-
+.status_bar {
+	height: var(--status-bar-height);
+	width: 100%;
+}
 	.content-money {
-		padding-bottom: 30rpx;
-		background: $page-color-base;
-
-		.buttom-box {
-			position: relative;
-			background-color: #ffffff;
-			text-align: center;
-			margin: 0 30rpx;
-			padding: 30rpx 0;
-			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
-			border-radius: $border-radius-sm;
-			margin-top: -60rpx;
-
-			.buttom {
-				flex-grow: 1;
+		position: relative;
+		height: 480rpx;
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+			image {
+				width: 100%;
+				height: 100%;
 			}
-
-			.money {
-
-				font-size: 32rpx;
+		}
+		.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: #f42b4e;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
 			}
-
-			.text {
-				padding-bottom: 26rpx;
-				font-size: 28rpx;
-				font-weight: 500;
-				color: #666666;
-
-				&.current {
-					border-bottom: 2px solid #f42b4e;
-				}
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
 			}
-
-			.icon {
-				height: 50rpx;
-				width: 48rpx;
-				margin: 0 auto;
-
-				.icon-img {
-					width: 100%;
-					height: 100%;
-				}
+	
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
 			}
 		}
 	}
 
 	.money-box {
-		// background: $base-color;
-		height: 380rpx;
+		position: relative;
+		z-index: 2;
+		
+		/* #ifdef H5 */
+		padding-top: 80rpx;
+		/* #endif */
 		color: #ffffff;
 		text-align: center;
-		font-size: 35rpx;
-		position: relative;
-
-		// padding-top: 60rpx;
-		.header {
-			position: absolute;
-			left: 0;
-			top: 0;
-			width: 100%;
-			height: 80rpx;
-			font-size: 36rpx;
-			font-weight: bold;
-			z-index: 99;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-		}
-
-		.goback-box {
-			position: absolute;
-			left: 29rpx;
-			top: 0;
-			height: 80rpx;
-			display: flex;
-			align-items: center;
-		}
-
-		.goback {
-			z-index: 100;
-			width: 34rpx;
-			height: 34rpx;
-		}
-
-		.tuiguang_bg {
-			width: 100%;
-			height: 400rpx;
-			position: relative;
-		}
-
-		.money_img {
-			width: 100%;
-			height: 120rpx;
-			text-align: center;
-			padding-top: 50rpx;
-			padding-bottom: 135rpx;
-
-			image {
-				width: 120rpx;
-				height: 120rpx;
-				border: 4rpx solid #FD5F6F;
-				border-radius: 50%;
-			}
-		}
-
-		.money-frame {
-			position: absolute;
-			top: 0;
-			width: 100%;
-			padding-top: 120rpx;
-			// left: 30rpx;
-			// height: 460rpx;
-			// display: flex;
-			// align-items: flex-start;
-			// flex-direction: column;
-			// justify-content: center;
-		}
-
-		.money_name {
-			width: 100%;
-			text-align: center;
-			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: bold;
-			color: #FFFFFF;
-
-		}
-
-		.money_num {
+		/* #ifdef APP-PLUS */
+		height: 250rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		/* #endif */
+		
+		.money {
 			font-size: 72rpx;
 			font-family: PingFang SC;
 			font-weight: bold;
-			color: #FFFFFF;
-
-			.money_ren {
-				font-size: 36rpx;
-			}
+			color: #ffffff;
+		}
+		.text {
+			font-size: 30rpx;
 		}
 	}
 

+ 31 - 21
pages/user/mythq.vue

@@ -4,12 +4,12 @@
 			<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/thq-bg.png" mode=""></image></view>
+			<view class="content-bg"><image src="../../static/img/xfq-bg.png" mode=""></image></view>
 			<view class="money-box">
-				<view class="money">{{ userInfo.top_ticket || '0' }}</view>
-				<view>提货券</view>
+				<view class="money">{{ userInfo.consumption || '0' }}</view>
+				<view>当前余额</view>
 			</view>
 			<!-- <view class="money-btn" @click="navto('/pages/money/withdmoenys?type=th')">
 				兑换广告值
@@ -19,12 +19,12 @@
 		<view class="info-box flex">
 			<view class="info-item">
 				<view class="info-font">累计收入</view>
-				<view class="info-num">{{recharge}}</view>
+				<view class="info-num">{{sr}}</view>
 			</view>
 			<view class="shu"></view>
 			<view class="info-item">
 				<view class="info-font">累计支出</view>
-				<view class="info-num">{{orderStatusSum}}</view>
+				<view class="info-num">{{zc}}</view>
 			</view>
 		</view>
 		<view class="navbar">
@@ -61,7 +61,7 @@
 </template>
 
 <script>
-import { top_ticket_list, userBalance } from '@/api/wallet.js';
+import { userBalance, getConsumptionList } from '@/api/wallet.js';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import { mapState, mapMutations } from 'vuex';
 import uniLoadMore from '@/uview-ui/components/u-loadmore/u-loadmore.vue';
@@ -96,11 +96,11 @@ export default {
 			// 头部图高度
 			maxheight: '',
 			tabCurrentIndex: 0,
-			orderStatusSum: 0,
-			recharge: 0,
+			zc: 0,
+			sr: 0,
 			navList: [
 				{
-					state: 2,
+					state: 1,
 					text: '收入',
 					loadingType: 'more',
 					orderList: [],
@@ -109,7 +109,7 @@ export default {
 					loaded: false
 				},
 				{
-					state: 1,
+					state: 0,
 					text: '支出',
 					loadingType: 'more',
 					orderList: [],
@@ -154,16 +154,21 @@ export default {
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			top_ticket_list()
+			getConsumptionList({
+				page: navItem.page,
+				limit: navItem.limit,
+				pm: navItem.state
+			})
 				.then(({ data }) => {
-					console.log(data);
-					obj.recharge = data.sr;
-					obj.orderStatusSum = data.zc;
-					obj.navList[0].orderList = data.zj
-					obj.navList[1].orderList = data.kc
-					navItem.loadingType = 'nomore';
+					obj.sr = data.sr
+					obj.zc = data.zc
+					navItem.orderList = navItem.orderList.concat(data.list)
+					if(navItem.limit == data.list.length) {
+						navItem.loadingType = 'more'
+					}else {
+						navItem.loadingType = 'noMore'
+					}
 					navItem.loaded = true
-					uni.hideLoading();
 				})
 				.catch(e => {
 					console.log(e);
@@ -282,8 +287,13 @@ page {
 }
 .money-box {
 	position: relative;
-	z-index: 2;
-	padding-top: 20rpx;
+	z-index: 2;
+	/* #ifdef H5 */
+	padding-top: 80rpx;
+	/* #endif */
+	/* #ifdef APP-PLUS */
+	padding-top: 20rpx;
+	/* #endif */
 	color: #ffffff;
 	text-align: center;
 	.money {

+ 0 - 200
pages/user/scoreAccumulate.vue

@@ -1,200 +0,0 @@
-<template>
-	<view class="content">
-		<!-- <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" 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" 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">
-							<view class="title">
-								<text>{{ item.mark }}</text>
-							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
-							</view>
-						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	
-import { integrallist } from '@/api/functionalUnit.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	components: {
-		empty,
-		uniLoadMore
-	},
-	onReady() {
-		
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-			],
-		};
-	},
-	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;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			integrallist(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data);
-						navItem.page++;
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					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: #ffffff;
-	height: 100%;
-}
-.navbar {
-	display: flex;
-	height: 40px;
-	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: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-// 列表
-
-.swiper-box {
-	height: calc(100% - 44px);
-	padding-top: 10rpx;
-	.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;
-		}
-	}
-}
-.list-scroll-content {
-	height: 100%;
-}
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
-	}
-}
-</style>

+ 0 - 142
pages/user/sqjl.vue

@@ -1,142 +0,0 @@
-<template>
-	<view class="content">
-		<view v-for="(item, index) in list" :key="index" class="order-item flex">
-			<view class="title-box flex_item">
-				<view class="title-avatar">
-					<image src="../../static/icon/sh-log.png"></image>
-				</view>
-				<view class="list_tpl">
-					<view class="title">
-						<view class="title-name ">我的好强儿</view>
-					</view>
-					<view class="time">
-						<text>2020-12-12</text>
-					</view>
-				</view>
-				<view class="money">
-					<text>未通过</text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				list: 10
-			}
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style lang="scss" scoped>
-	.content {
-		background-color: #fff;
-	}
-
-	.sq-item {
-		height: 118rpx;
-		border-top: 1px solid #F0F0F0;
-		width: 690rpx;
-		margin: auto;
-
-		&:first-of-type {
-			border-top: none;
-		}
-
-	}
-
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		height: 118rpx;
-		border-top: 1px solid #F0F0F0;
-		width: 690rpx;
-		margin: auto;
-
-		&:first-of-type {
-			border-top: none;
-		}
-
-		.title-box {
-			width: 100%;
-
-			.title-avatar {
-				flex-shrink: 0;
-				width: 55rpx;
-				height: 55rpx;
-				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: #333;
-			font-size: $font-lg;
-		}
-	}
-</style>

+ 174 - 91
pages/user/user.vue

@@ -5,8 +5,8 @@
 			<image src="../../static/user/user-top.png" mode=""></image>
 		</view>
 		<view class="user-set flex">
-			<view class="set-logo" @click="navTo('/pages/set/userinfo')">
-				<image src="../../static/user/user1.png" mode=""></image>
+			<view class="set-logo" >
+				<!-- <image src="../../static/user/user1.png" mode=""></image> -->
 			</view>
 			<!-- <view class="xx-logo"><image src="../../static/user/user2.png" mode=""></image></view> -->
 		</view>
@@ -15,85 +15,130 @@
 				<view class="user-name">
 					<image :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
 					<image src="../../static/error/missing-face.png" mode="" v-else></image>
-					<view class="gpai" v-if="userInfo.is_real">团队长</view>
 					<view class="user-font">
 						<view class="name clamp">{{ userInfo.nickname }}</view>
 						<view class="phone">{{ userInfo.phone }}</view>
 						<view class="phone" v-if="userInfo.uid">邀请码:{{ userInfo.uid }}</view>
 					</view>
 				</view>
-				<view class="kpi">今日KPI:{{userInfo.kpi|| 0}}</view>
+				<view class="kpi" v-if="userInfo && userInfo.level">
+					<image src="../../static/img/menber-bg.png" mode=""></image>
+					<view class="user-level">
+						V{{userInfo.level}}会员
+					</view>
+				</view>
 			</view>
-			<view class="info-right" @click="navTo('/pages/user/myxfjf')">
-				<image class="iright-icon" src="../../static/user/user3.png" mode=""></image>
-				<view class="iright-font">消费积分:{{ userInfo.now_money || 0}}</view>
+			<view class="flex">
+				<view class="info-right" @click="navTo('/pages/money/wallet')">
+					<image class="iright-icon" src="../../static/user/user3.png" mode=""></image>
+					<view class="iright-font">钱包余额:{{ userInfo.now_money || 0}}</view>
+				</view>
+				<view class="info-right" @click="navTo('/pages/money/recharge')">
+					<image class="iright-icon" src="../../static/user/user3.png" mode=""></image>
+					<view class="iright-font">充值钱包</view>
+				</view>
 			</view>
+			
 		</view>
 		<view class="main-box">
 			<view class="title flex">
 				<view class="title-left">
-					<image class="title-icon" src="../../static/user/user4.png" mode=""></image>
+					<!-- <image class="title-icon" src="../../static/user/user4.png" mode=""></image> -->
 					<view class="title-font">我的资产</view>
 				</view>
-				<image class="title-right" src="../../static/img/back.png" mode=""></image>
+				<!-- <image class="title-right" src="../../static/img/back.png" mode=""></image> -->
 			</view>
 			<view class="main flex">
+				<view class="item" @click="navTo('/pages/user/myjf')">
+					<view class="item-num">{{ userInfo.dynamic_integral*1 || 0}}</view>
+					<view class="item-font">动态积分</view>
+				</view>
+				<view class="jg">
+					
+				</view>
 				<view class="item" @click="navTo('/pages/user/mygwjf')">
-					<view class="item-num">{{ userInfo.sp_final || 0}}</view>
-					<view class="item-font">购物积分</view>
+					<view class="item-num">{{ userInfo.integral*1 || 0}}</view>
+					<view class="item-font">静态积分</view>
+				</view>
+				<view class="jg">
+					
 				</view>
 				<view class="item" @click="navTo('/pages/user/mythq')">
-					<view class="item-num">{{userInfo.top_ticket || 0}}</view>
-					<view class="item-font">提货券</view>
+					<view class="item-num">{{userInfo.consumption*1 || 0}}</view>
+					<view class="item-font">消费券</view>
+				</view>
+				<view class="jg">
+					
 				</view>
 				<view class="item" @click="navTo('/pages/user/myggz')">
-					<view class="item-num">{{userInfo.aid_val || 0}}</view>
-					<view class="item-font">广告值</view>
+					<view class="item-num">{{userInfo.contribution*1 || 0}}</view>
+					<view class="item-font">贡献值</view>
 				</view>
 			</view>
 		</view>
 		<view class="main-box">
-			<view class="title flex" @click="navTo('/pages/order/order1?state=0')">
+			<view class="title flex" @click="navTo('/pages/order/order?state=0')">
 				<view class="title-left">
-					<image class="title-icon" src="../../static/user/user5.png" mode=""></image>
+					<!-- <image class="title-icon" src="../../static/user/user5.png" mode=""></image> -->
 					<view class="title-font">我的订单</view>
 				</view>
 				<image class="title-right" src="../../static/img/back.png" mode=""></image>
 			</view>
 			<view class="main flex">
-				<view class="oitem" @click="navTo('/pages/order/order1?state=0')">
+				<view class="oitem" @click="navTo('/pages/order/order?state=0')">
 					<image class="oitem-image" src="../../static/user/user6.png" mode=""></image>
 					<view class="oitem-font">待付款</view>
 				</view>
-				<view class="oitem" @click="navTo('/pages/order/order1?state=1')">
+				<view class="oitem" @click="navTo('/pages/order/order?state=1')">
 					<image class="oitem-image" src="../../static/user/user7.png" mode=""></image>
 					<view class="oitem-font">待发货</view>
 				</view>
-				<view class="oitem" @click="navTo('/pages/order/order1?state=2')">
+				<view class="oitem" @click="navTo('/pages/order/order?state=2')">
 					<image class="oitem-image" src="../../static/user/user8.png" mode=""></image>
 					<view class="oitem-font">待收货</view>
 				</view>
-				<view class="oitem" @click="navTo('/pages/order/order1?state=3')">
+				<view class="oitem" @click="navTo('/pages/order/order?state=3')">
 					<image class="oitem-image" src="../../static/user/user9.png" mode=""></image>
 					<view class="oitem-font">已完成</view>
 				</view>
 			</view>
 		</view>
-		<uni-list class="tool-list">
-			<uni-list-item title="邀请有礼" @click="navTo('/pages/user/shareQrCode')" thumb="/static/user/user10.png">
-			</uni-list-item>
-			<uni-list-item title="我的推广" @click="navTo('/pages/user/mytg')" thumb="/static/icon/mytg.png">
-			</uni-list-item>
-			<uni-list-item title="支付密码" @click="navTo('/pages/money/moneyPwd')" thumb="/static/icon/g9.png">
-			</uni-list-item>
-			<uni-list-item title="登录密码" @click="navTo('/pages/set/password')" thumb="/static/icon/setpsw.png">
-			</uni-list-item>
-			<uni-list-item title="我的收藏" @click="navTo('/pages/user/favorites')" thumb="/static/user/user11.png">
-			</uni-list-item>
-			<uni-list-item title="收款方式" @click="navTo('/pages/collection/collection')" thumb="/static/user/user12.png">
-			</uni-list-item>
-			<uni-list-item title="客服中心" @click="openKf()" thumb="/static/user/user13.png"></uni-list-item>
-		</uni-list>
+		<view class="my-tools">
+					<view class="my-order">
+						<view class="order">我的功能</view>
+						<!-- <image src="../../static/img/xiangxia.png" mode="scaleToFill"></image> -->
+					</view>
+					<view class="tool flex">
+						<view class="tool-item" @click="navTo('/pages/user/mytg')">
+							<view class="tool-img"><image src="../../static/icon/gn1.png" mode=""></image></view>
+							<view class="tool-name">我的推广</view>
+						</view>
+						<view class="tool-item" @click="navTo('/pages/user/shareQrCode')">
+							<view class="tool-img"><image src="../../static/icon/gn2.png" mode=""></image></view>
+							<view class="tool-name">邀请有礼</view>
+						</view>
+						<view class="tool-item" @click="navTo('/pages/user/favorites')">
+							<view class="tool-img"><image src="../../static/icon/gn3.png" mode=""></image></view>
+							<view class="tool-name">我的收藏</view>
+						</view>
+						<view class="tool-item" @click="navTo('/pages/coupon/myCoupon')()">
+							<view class="tool-img"><image src="../../static/icon/gn4.png" mode=""></image></view>
+							<view class="tool-name">我的优惠券</view>
+						</view>
+						<view class="tool-item" @click="openKf()">
+							<view class="tool-img"><image src="../../static/icon/gn5.png" mode=""></image></view>
+							<view class="tool-name">客服中心</view>
+						</view>
+						<view class="tool-item" @click="navTo('/pages/set/address')">
+							<view class="tool-img"><image src="../../static/icon/gn6.png" mode=""></image></view>
+							<view class="tool-name">收货地址</view>
+						</view>
+						<view class="tool-item" @click="navTo('/pages/set/userinfo')">
+							<view class="tool-img"><image src="../../static/icon/gn7.png" mode=""></image></view>
+							<view class="tool-name">设置</view>
+						</view>
+					</view>
+				</view>
 		<view class="" style="height: 100rpx;">
 
 		</view>
@@ -115,27 +160,6 @@
 				</view>
 			</view>
 		</uni-popup>
-		<uni-popup ref="popupqd" type="center">
-			<view class="popup">
-				<view class="popup-dox">
-					<image class="popup-logo" src="../../static/img/sign-popup.png"></image>
-				</view>
-				<view class="popup-title">
-					获得
-					<text>{{ today_integral }}</text>
-					{{ today_type }}
-				</view>
-				<view class="popup-tip">
-					明天签到可得
-					<text>{{ tom_integral }}</text>
-					{{ tom_type }}
-				</view>
-				<view class="popup-btn" @click="closeQd">知道了</view>
-			</view>
-			<!-- <view class="close_icon" @click="close">
-				<image src="../../static/img/Close.png"></image>
-			</view> -->
-		</uni-popup>
 	</view>
 </template>
 <script>
@@ -250,26 +274,6 @@
 				)
 				.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'])
 		},
@@ -369,9 +373,6 @@
 					});
 				}
 			},
-			useTool(e) {
-				this.navTo(e.path);
-			},
 			// 签到弹窗
 			goQd() {
 				this.$refs.popupqd.open();
@@ -634,13 +635,30 @@
 			}
 
 			.kpi {
-				background: #f5eede;
-				border-radius: 30rpx 0px 0px 30rpx;
-				padding: 18rpx 24rpx;
-				font-size: 26rpx;
-				font-family: PingFang SC;
-				font-weight: bold;
-				color: #c6914e;
+				width: 178rpx;
+				height: 60rpx;
+				position: relative;
+				image {
+					position: absolute;
+					top: 0;
+					left: 0;
+					width: 178rpx;
+					height: 60rpx;
+				}
+				.user-level {
+					position: absolute;
+					top: 0;
+					right: 0;
+					height: 60rpx;
+					line-height: 60rpx;
+					width:120rpx;
+					// background-color: red;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #93794B;
+					text-align: right;
+					padding-right: 24rpx;
+				}
 			}
 		}
 
@@ -667,7 +685,7 @@
 
 	.user-set {
 		justify-content: flex-end;
-
+height: 100rpx;
 		view {
 			flex-shrink: 0;
 		}
@@ -682,7 +700,7 @@
 
 	.main-box {
 		margin: 20rpx auto 0;
-		width: 690rpx;
+		width: 710rpx;
 		background: #ffffff;
 		box-shadow: 0px 4rpx 14rpx 0px rgba(229, 229, 229, 0.46);
 		border-radius: 20rpx;
@@ -720,10 +738,14 @@
 
 		.main {
 			padding: 50rpx 0 30rpx;
-
+			.jg {
+				width: 1px;
+				height: 100rpx;
+				background: #EEEEEE;
+			}
 			.item {
 				padding-bottom: 20rpx;
-				width: 33%;
+				width: 25%;
 				display: flex;
 				flex-direction: column;
 				align-items: center;
@@ -778,4 +800,65 @@
 		text-align: center;
 		background-color: #f2d4ae;
 	}
+	.my-tools {
+			width: 710rpx;
+			// height: 418rpx;
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+			border-radius: 20rpx;
+			margin: 20rpx auto;
+			// background-color: red;
+			.my-order {
+				height: 73rpx;
+				width: 100%;
+				border-bottom: 2rpx solid #F5F5F5;
+				display: flex;
+				align-items: center;
+				justify-content: flex-start;
+			
+				.order {
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #333333;
+					margin-left: 36rpx;
+					margin-right: 520rpx;
+				}
+			
+				image {
+					width: 12rpx;
+					height: 22rpx;
+				}
+			}
+			.tool {
+				flex-wrap: wrap;
+				justify-content: flex-start;
+				align-items: center;
+				.tool-item {
+					width: 25%;
+					height: 160rpx;
+					// background-color: #bfa;
+					display: flex;
+					align-items: center;
+					flex-direction: column;
+					justify-content: center;
+					.tool-img {
+						width: 42rpx;
+						height: 42rpx;
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+					.tool-name {
+						padding-top: 20rpx;
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #333333;
+					}
+				}
+				
+			}
+		}
 </style>

+ 185 - 82
pages/user/withdrawal.vue

@@ -1,19 +1,15 @@
 <template>
 	<view class="content">
-		<!-- <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar> -->
+		<!-- <uni-notice-bar single="true" text="实际到账98%"></uni-notice-bar> -->
 		<view class="content-money">
-			<view class="flex1 ">
+			<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">可提现金额</text>
+					<text class="text">可提现积分</text>
 				</view>
-				<!-- <view class="interval"></view>
-				<view class="buttom">
-					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
-					<text class="text">待审核提现金额</text>
-				</view> -->
 			</view>
 		</view>
+
 		<view class="row-box">
 			<view class="title">提现金额</view>
 			<view class="row">
@@ -23,80 +19,95 @@
 				<view class="buttom" @click="withdrawal = money">全部提现</view>
 			</view>
 		</view>
-		<!-- #ifndef MP-WEIXIN -->
-		<view class="list" v-if="!weichatBsrowser">
+		<view class="list">
 			<radio-group @change="tabRadio">
-				<!-- <label>
+				<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.name">提现至支付宝</text>
-								<text v-else>请创建支付宝账号</text>
+								<text v-if="weixin_no">提现至微信</text>
+								<text v-else>请创建微信账号</text>
 							</view>
 							<view class="node">
-								<text v-if="aliData.name">真实姓名({{ aliData.name }})</text>
+								<text v-if="weixin_no">账号({{ weixin_no }})</text>
 							</view>
 						</view>
 						<view class="right">
-							<radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" />
+							<radio value="weixin" color="#c29963" :checked="type == 'weixin'" />
 						</view>
 					</view>
-				</label> -->
-				<!-- <label>
+				</label>
+				<label>
 					<view class="box">
-						<view class="icon iconfont">
-							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
-						</view>
+						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="bankData.payment">{{ bankData.bank + ' ' + bankData.payment }}</text>
-								<text v-else>请创建银行账号</text>
+								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
-								<text v-if="bankData.name">真实姓名({{ bankData.name }})</text>
+								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
 							</view>
 						</view>
 						<view class="right">
-							<radio value="bank" color="#5dbc7c" :checked="type == 'bank'" />
+							<radio value="alipay" color="#c29963" :checked="type == 'alipay'" />
 						</view>
 					</view>
-				</label> -->
+				</label>
 				<label>
 					<view class="box">
 						<view class="icon iconfont">
-							<image class="icon-img" src="/static/icon/trc.png" mode="aspectFit"></image>
+							<image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image>
 						</view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="wxData.payment">{{ wxData.payment }}</text>
-								<text v-else>请完善TRC20信息</text>
+								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-else>请创建银行账号</text>
 							</view>
 							<view class="node">
-								<text v-if="wxData.payment">账号({{ wxData.payment }})</text>
+								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
 							</view>
 						</view>
 						<view class="right">
-							<radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" />
+							<radio value="bank" color="#c29963" :checked="type == 'bank'" />
 						</view>
 					</view>
 				</label>
 			</radio-group>
 		</view>
-		<!-- #endif -->
+		<view class="row b-b" v-if="type == 'weixin'">
+			<text class="tit">微信账号</text>
+			<input class="input" type="text" v-model="weixin_no" 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_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">提交申请</button>
-		<button class="add-btn modified" @click="navTo('/pages/collection/collection')">账号管理</button>
+		<!-- <button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button> -->
 	</view>
 </template>
 
@@ -107,8 +118,17 @@
 	import {
 		extractCash,
 		extractBank,
-		pay_list
+		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: {
@@ -117,51 +137,74 @@
 		components: {
 			uniNoticeBar
 		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+		},
 		data() {
 			return {
-				type: 'weixin', //提现方式
+				weixin_no: '',
+				type: 'alipay', //提现方式
 				money: '0.00', //可提现金额
 				freeze: '0.0', //冻结金额
 				withdrawal: '', //提现金额
 				minPrice: '', //最少提现金额
 				aliData: {},
 				bankData: {},
-				wxData: {},
+				weixin: {},
+				alipay_code: '',
+				alipay_name: '',
+				bank_code: '',
+				bank_people: '',
+				bank_name: '',
 				// #ifdef H5
-				weichatBsrowser: false
+				weichatBsrowser: false,
 				// #endif
+				jftype: 0,
 			};
 		},
 		onLoad(options) {
+			if(options.jftype) {
+				this.jftype = options.jftype
+				if(options.jftype == 1) {
+					uni.setNavigationBarTitle({
+						title:'静态积分提现'
+					})
+				}
+				if(options.jftype == 2) {
+					uni.setNavigationBarTitle({
+						title:'动态积分提现'
+					})
+				}
+			}
 			// #ifdef H5
 			this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 			// #endif
+			if(this.jftype == 1) {
+				this.money = this.userInfo.integral
+			}
+			if(this.jftype == 2) {
+				this.money = this.userInfo.dynamic_integral
+			}
 			//加载提现信息
 			this.loadData();
-			// 加载提款账号信息
-			this.loadinfo();
+			// // 加载提款账号信息
+			// this.loadAli();
+			// this.loadBank();
+			
 		},
 		methods: {
-			//加载数据
-			async loadinfo(source) {
-				pay_list().then(({
-					data
-				}) => {
-					this.aliData = data.zfb;
-					this.bankData = data.bank;
-					this.wxData = data.wx
-					console.log(data);
-				});
-			},
+			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
 			// 加载余额信息
 			async loadData() {
+				
 				extractBank({}).then(({
 					data
 				}) => {
-					this.money = data.brokerage_price; //可提现余额
-					this.minPrice = data.minPrice; //最小提现
-					// this.freeze = data.inmoneyCount; //提现中的余额
+					console.log(data, 'data+++++++++')
+					this.minPrice = data.minPrice;
+					// this.money = data.brokerage_price
 				});
+				
 			},
 			// 跳转
 			navTo(url) {
@@ -178,24 +221,55 @@
 				let data = {
 					extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
 					money: this.withdrawal, //金额
-					money_type: 1 //0佣金1余额
+					type: this.jftype //0佣金1余额
 				};
-				console.log(this.type, this.wxData)
-				if (this.type == 'weixin') {
-					data.weixin = this.wxData.payment
+				if (this.withdrawal % 10 != 0) {
+					uni.showToast({
+						title: '提现金额为10的倍数',
+						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') {
-					data.name = this.aliData.name;
-					data.alipay_code = this.aliData.payment;
+					console.log('alipay');
+					data.name = this.alipay_name;
+					data.alipay_code = this.alipay_code;
 				}
 				if (this.type == 'bank') {
-					data.name = this.bankData.name;
-					data.bankname = this.bankData.bank;
-					data.cardnum = this.bankData.payment;
+					console.log('bank');
+					data.name = this.bank_people;
+					data.bankname = this.bank_name;
+					data.cardnum = this.bank_code;
 				}
-				console.log(data)
+				if(this.type == 'weixin') {
+					console.log('weixin');
+					data.weixin = this.weixin_no
+					
+				}
+
 				extractCash(data)
 					.then(e => {
+						this.loadData()
+						getUserInfo({})
+							.then(({
+								data
+							}) => {
+								this.setUserInfo(data);
+							})
+							.catch(e => {
+								console.log(e);
+							});
 						uni.showToast({
 							title: '提交成功',
 							duration: 2000,
@@ -218,20 +292,16 @@
 	.content-money {
 		padding: 30rpx 0;
 		background: #ffffff;
-
 	}
 
-	.flex1 {
+	.flex {
 		background-color: #ffffff;
 		text-align: center;
 		margin: 0 30rpx;
 		border-radius: $border-radius-sm;
-		display: flex;
-		justify-content: center;
 
 		.buttom {
 			font-size: $font-lg;
-			color: $font-color-dark;
 			width: 50%;
 		}
 
@@ -290,7 +360,7 @@
 			}
 
 			.buttom {
-				color: #dc262b;
+				color: $font-color-spec;
 				font-size: $font-base;
 			}
 		}
@@ -298,12 +368,12 @@
 
 	.add-btn {
 		&.modified {
-			color: #303030;
+			color: #ffffff;
 		}
 
 		&.up {
-			background: #303030;
-			color: #F8DABA;
+			background: linear-gradient(90deg, #bb9159, #e6c79d);
+			color: #fff;
 		}
 
 		display: flex;
@@ -315,6 +385,7 @@
 		margin-top: 30rpx;
 		font-size: $font-lg;
 		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
 	}
 
 	.list {
@@ -368,4 +439,36 @@
 		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;
+	}
 </style>

+ 33 - 45
pages/user/xfjfzz.vue

@@ -3,14 +3,15 @@
 		<view class="content-money">
 			<view class="flex">
 				<view class="buttom">
-					<view class="icon">{{ userInfo.now_money | getMoneyStyle }}</view>
+					<view class="icon" v-if="type== 1">{{ userInfo.integral | getMoneyStyle }}</view>
+					<view class="icon" v-if="type== 2">{{ userInfo.dynamic_integral | getMoneyStyle }}</view>
 					<text class="text">可转账余额</text>
 				</view>
 			</view>
 		</view>
 		<view class="row-box">
-			<view class="title">收款人手机号</view>
-			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人手机号"
+			<view class="title">收款人UID</view>
+			<view class="row"><input class="input" type="number" v-model="card" placeholder="请输入收款人UID"
 					placeholder-class="placeholder" /></view>
 		</view>
 		<view class="row-box">
@@ -19,22 +20,11 @@
 				<!-- <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 class="buttom" @click="withdrawal = userInfo.integral" v-if="type== 1">全部转账</view>
+				<view class="buttom" @click="withdrawal = userInfo.dynamic_integral" v-if="type== 2">全部转账</view>
 			</view>
 		</view>
-
 		<button class="add-btn up" :class="{ action: loding }" @click="!loding ? confirm() : ''">提交申请</button>
-		<button class="back-btn up" @click="boblack">返回</button>
-		<uni-popup ref="uppass" type="center">
-			<view class="psw-wrapper">
-				<view class="psw-title">请输入支付密码</view>
-				<input type="password" v-model="password" class="psw-ipt" />
-				<view class="psw-btn">
-					<text @click="cancel">取消</text>
-					<text class="psw-qd" @click="pswQd">确定</text>
-				</view>
-			</view>
-		</uni-popup>
 	</view>
 </template>
 
@@ -44,7 +34,7 @@
 	} from '@/utils/rocessor.js';
 	import {
 		getUserInfo,
-		transfer_accounts
+		jfzz
 	} from '@/api/user.js';
 	import {
 		mapMutations,
@@ -65,7 +55,7 @@
 				weichatBsrowser: false,
 				// #endif
 				loding: false,
-				type: 'xl'
+				type: 0
 			};
 		},
 		onLoad(options) {
@@ -76,6 +66,15 @@
 			if (options.type) {
 				this.type = options.type;
 				console.log(this.type);
+				if(this.type == 1) {
+					uni.setNavigationBarTitle({
+						title:'静态积分转账'
+					})
+				}else {
+					uni.setNavigationBarTitle({
+						title:'动态积分转账'
+					})
+				}
 			}
 		},
 		computed: {
@@ -112,42 +111,22 @@
 					});
 					return;
 				}
-				if (obj.card == obj.userInfo.phone) {
+				if (obj.card == obj.userInfo.uid) {
 					obj.loding = false;
 					uni.showModal({
 						title: '提示',
 						content: '不要输入自己的用户账号'
 					});
-				} else {
-					obj.$refs.uppass.open()
 					return
-					
-
 				}
-			},
-			boblack() {
-				uni.navigateBack({
-					fail() {
-						uni.switchTab({
-							url: '/pages/index/index'
-						})
-					}
-				})
-			},
-			cancel() {
-				this.$refs.uppass.close()
-				this.password = ''
-			},
-			pswQd() {
-				let obj = this
 				let data = {
-					phone: obj.card, //编号
-					money: obj.withdrawal ,//金额
-					pas: obj.password
+					uid: obj.card, //编号
+					price: obj.withdrawal ,//金额
+					type: obj.type
 				};
-				transfer_accounts(data)
+				jfzz(data)
 					.then(e => {
-
+				
 						// 允许按钮点击
 						obj.loding = false;
 						// 初始化提现金额
@@ -165,7 +144,16 @@
 						obj.loding = false;
 						console.log();
 					});
-			}
+			},
+			boblack() {
+				uni.navigateBack({
+					fail() {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}
+				})
+			},
 		}
 	};
 </script>

二进制
static/icon/bd.png


二进制
static/icon/c1.png


二进制
static/icon/c2.png


二进制
static/icon/c3.png


二进制
static/icon/c4.png


二进制
static/icon/c5.png


二进制
static/icon/gn1.png


二进制
static/icon/gn2.png


二进制
static/icon/gn3.png


二进制
static/icon/gn4.png


二进制
static/icon/gn5.png


二进制
static/icon/gn6.png


二进制
static/icon/gn7.png


二进制
static/icon/kp-loading.png


二进制
static/icon/kp-more.png


二进制
static/icon/kp-nomore.png


二进制
static/icon/ms.png


二进制
static/icon/xfq.png


二进制
static/img/bd-bg.png


二进制
static/img/bd-mbg.png


二进制
static/img/jf-bg.png


二进制
static/img/kp-bg-1.png


二进制
static/img/kq-bg.png


二进制
static/img/menber-bg.png


二进制
static/img/my-kq-1.png


二进制
static/img/my-kq.png


二进制
static/img/myyue.png


二进制
static/img/rx-mbg.png


二进制
static/img/xf-bg.png


二进制
static/img/xf-mbg.png


二进制
static/img/xfq-bg.png


二进制
static/img/yhq-mbg.png


文件差异内容过多而无法显示
+ 0 - 0
static/js/alipay.js


+ 4 - 0
static/js/dsbridge.js

@@ -0,0 +1,4 @@
+var bridge={default:this,call:function(b,a,c){var e="";"function"==typeof a&&(c=a,a={});a={data:void 0===a?null:a};if("function"==typeof c){var g="dscb"+window.dscb++;window[g]=c;a._dscbstub=g}a=JSON.stringify(a);if(window._dsbridge)e=_dsbridge.call(b,a);else if(window._dswk||-1!=navigator.userAgent.indexOf("_dsbridge"))e=prompt("_dsbridge="+b,a);return JSON.parse(e||"{}").data},register:function(b,a,c){c=c?window._dsaf:window._dsf;window._dsInit||(window._dsInit=!0,setTimeout(function(){bridge.call("_dsb.dsinit")},
+0));"object"==typeof a?c._obs[b]=a:c[b]=a},registerAsyn:function(b,a){this.register(b,a,!0)},hasNativeMethod:function(b,a){return this.call("_dsb.hasNativeMethod",{name:b,type:a||"all"})},disableJavascriptDialogBlock:function(b){this.call("_dsb.disableJavascriptDialogBlock",{disable:!1!==b})}};
+!function(){if(!window._dsf){var b={_dsf:{_obs:{}},_dsaf:{_obs:{}},dscb:0,dsBridge:bridge,close:function(){bridge.call("_dsb.closePage")},_handleMessageFromNative:function(a){var e=JSON.parse(a.data),b={id:a.callbackId,complete:!0},c=this._dsf[a.method],d=this._dsaf[a.method],h=function(a,c){b.data=a.apply(c,e);bridge.call("_dsb.returnValue",b)},k=function(a,c){e.push(function(a,c){b.data=a;b.complete=!1!==c;bridge.call("_dsb.returnValue",b)});a.apply(c,e)};if(c)h(c,this._dsf);else if(d)k(d,this._dsaf);
+else if(c=a.method.split("."),!(2>c.length)){a=c.pop();var c=c.join("."),d=this._dsf._obs,d=d[c]||{},f=d[a];f&&"function"==typeof f?h(f,d):(d=this._dsaf._obs,d=d[c]||{},(f=d[a])&&"function"==typeof f&&k(f,d))}}},a;for(a in b)window[a]=b[a];bridge.register("_hasJavascriptMethod",function(a,b){b=a.split(".");if(2>b.length)return!(!_dsf[b]&&!_dsaf[b]);a=b.pop();b=b.join(".");return(b=_dsf._obs[b]||_dsaf._obs[b])&&!!b[a]})}}();module.exports=bridge;

+ 2 - 1
store/index.js

@@ -1,13 +1,14 @@
 import Vue from 'vue'
 import Vuex from 'vuex'
 import user from './model/user'
+
 Vue.use(Vuex)
 
 const store = new Vuex.Store({
 	namespaced: true,
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL: 'https://xxl.liuniu946.com', //请求地址配置 
+		baseURL: 'http://yg.hqgjsmc.com', //请求地址配置 
 		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息
 		loginInterceptor: false, //是否打开强制登录

二进制
unpackage/dist/build/h5/7-8-3.rar


二进制
unpackage/dist/build/h5/h5.rar


+ 2 - 2
unpackage/dist/build/h5/index.html

@@ -1,2 +1,2 @@
-<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>商城</title><script>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><link rel=stylesheet href=/index/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.dd67a10a.js></script><script src=/index/static/js/index.08bc9d89.js></script></body></html>
+<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>环球优购</title><script>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><link rel=stylesheet href=/index/static/index.2772579d.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/index/static/js/chunk-vendors.ead01763.js></script><script src=/index/static/js/index.1ad2d78e.js></script></body></html>

二进制
unpackage/dist/build/h5/static/icon/bd.png


二进制
unpackage/dist/build/h5/static/icon/c1.png


二进制
unpackage/dist/build/h5/static/icon/c2.png


二进制
unpackage/dist/build/h5/static/icon/c3.png


二进制
unpackage/dist/build/h5/static/icon/c4.png


二进制
unpackage/dist/build/h5/static/icon/c5.png


二进制
unpackage/dist/build/h5/static/icon/gn1.png


二进制
unpackage/dist/build/h5/static/icon/gn2.png


二进制
unpackage/dist/build/h5/static/icon/gn3.png


二进制
unpackage/dist/build/h5/static/icon/gn4.png


二进制
unpackage/dist/build/h5/static/icon/gn5.png


二进制
unpackage/dist/build/h5/static/icon/gn6.png


二进制
unpackage/dist/build/h5/static/icon/gn7.png


二进制
unpackage/dist/build/h5/static/icon/kp-loading.png


二进制
unpackage/dist/build/h5/static/icon/kp-more.png


二进制
unpackage/dist/build/h5/static/icon/kp-nomore.png


二进制
unpackage/dist/build/h5/static/icon/ms.png


二进制
unpackage/dist/build/h5/static/icon/xfq.png


二进制
unpackage/dist/build/h5/static/img/afternoon.4595b9a3.png


二进制
unpackage/dist/build/h5/static/img/afternoon.png


二进制
unpackage/dist/build/h5/static/img/afternoonicon.png


二进制
unpackage/dist/build/h5/static/img/bargainBg.jpg


二进制
unpackage/dist/build/h5/static/img/bd-bg.9e304271.png


二进制
unpackage/dist/build/h5/static/img/bd-bg.png


部分文件因为文件数量过多而无法显示