hwq 3 years ago
parent
commit
36a994706d
100 changed files with 6292 additions and 3552 deletions
  1. 4 0
      .hbuilderx/launch.json
  2. 0 66
      api/functionalUnit.js
  3. 49 12
      api/index.js
  4. 108 0
      api/jdr.js
  5. 55 26
      api/order.js
  6. 0 186
      api/product.js
  7. 16 0
      api/user.js
  8. 21 8
      api/wallet.js
  9. 21 0
      components/more/uni-load-more.vue
  10. 3 4
      components/seckill/seckill.vue
  11. 224 0
      components/uni-nav-bar/uni-nav-bar.vue
  12. 156 0
      components/uni-search-bar/uni-search-bar.vue
  13. 25 0
      components/uni-status-bar/uni-status-bar.vue
  14. 88 91
      components/wangding-pickerAddress/wangding-pickerAddress.vue
  15. 23 0
      components/xw-empty/xw-empty.vue
  16. 243 0
      components/zhilin-picker/zhilin-picker.vue
  17. 31 23
      manifest.json
  18. 77 45
      pages.json
  19. 0 267
      pages/activity/bargain/index.vue
  20. 0 172
      pages/activity/goods_bargain/index.vue
  21. 0 726
      pages/activity/goods_bargain_details/index.vue
  22. 207 0
      pages/index/card.vue
  23. 199 0
      pages/index/cardDetail.vue
  24. 64 79
      pages/index/index.vue
  25. 73 0
      pages/index/info.vue
  26. 474 0
      pages/index/yydb.vue
  27. 646 0
      pages/index/yypz.vue
  28. 389 0
      pages/jdr/center.vue
  29. 221 0
      pages/jdr/evaluate.vue
  30. 520 0
      pages/jdr/order.vue
  31. 51 34
      pages/money/account.vue
  32. 13 14
      pages/money/balance.vue
  33. 56 143
      pages/money/pay.vue
  34. 47 49
      pages/money/paySuccess.vue
  35. 33 11
      pages/money/recharge.vue
  36. 12 13
      pages/money/wallet.vue
  37. 28 72
      pages/money/withdrawal.vue
  38. 0 165
      pages/order/createOrder.vue
  39. 59 230
      pages/order/evaluate.vue
  40. 369 430
      pages/order/order.vue
  41. 88 0
      pages/order/success.vue
  42. 13 18
      pages/public/register.vue
  43. 199 230
      pages/public/wxLogin.vue
  44. 4 6
      pages/set/userinfo.vue
  45. 288 2
      pages/user/becomeVip.vue
  46. 437 156
      pages/user/coupon.vue
  47. 3 2
      pages/user/extension.vue
  48. 158 0
      pages/user/mycardDetail.vue
  49. 223 243
      pages/user/shareQrCode.vue
  50. 178 23
      pages/user/user.vue
  51. BIN
      static/icon/user2.png
  52. BIN
      static/icon/user3.png
  53. BIN
      static/icon/user4.png
  54. BIN
      static/icon/user5.png
  55. BIN
      static/img/cardTop.png
  56. BIN
      static/img/cardbg.png
  57. BIN
      static/img/cardbottom.png
  58. BIN
      static/img/dbbg.png
  59. BIN
      static/img/img29.png
  60. BIN
      static/img/img43.png
  61. BIN
      static/img/jh1.png
  62. BIN
      static/img/jh2.png
  63. BIN
      static/img/jh3.png
  64. BIN
      static/img/jrzxbg.png
  65. BIN
      static/img/logo.png
  66. BIN
      static/img/order1.png
  67. BIN
      static/img/order2.png
  68. BIN
      static/img/order3.png
  69. BIN
      static/img/order4.png
  70. BIN
      static/img/order5.png
  71. BIN
      static/img/order6.png
  72. BIN
      static/img/order7.png
  73. BIN
      static/img/order8.png
  74. BIN
      static/img/order9.png
  75. BIN
      static/img/popup.png
  76. BIN
      static/img/success.png
  77. BIN
      static/tabBar/tab-cart-current.png
  78. BIN
      static/tabBar/tab-cart.png
  79. BIN
      static/tabBar/tab-cate-current.png
  80. BIN
      static/tabBar/tab-cate.png
  81. BIN
      static/tabBar/tab-home-current.png
  82. BIN
      static/tabBar/tab-home.png
  83. BIN
      static/tabBar/tab-my-current.png
  84. BIN
      static/tabBar/tab-my.png
  85. 6 6
      store/index.js
  86. 0 0
      unpackage/dist/build/.automator/mp-weixin/.automator.json
  87. 4 0
      unpackage/dist/build/mp-weixin/app.js
  88. 72 0
      unpackage/dist/build/mp-weixin/app.json
  89. 3 0
      unpackage/dist/build/mp-weixin/app.wxss
  90. 0 0
      unpackage/dist/build/mp-weixin/common/main.js
  91. 0 0
      unpackage/dist/build/mp-weixin/common/main.wxss
  92. 2 0
      unpackage/dist/build/mp-weixin/common/runtime.js
  93. 0 0
      unpackage/dist/build/mp-weixin/common/vendor.js
  94. 0 0
      unpackage/dist/build/mp-weixin/components/empty.js
  95. 0 0
      unpackage/dist/build/mp-weixin/components/empty.json
  96. 1 0
      unpackage/dist/build/mp-weixin/components/empty.wxml
  97. 1 0
      unpackage/dist/build/mp-weixin/components/empty.wxss
  98. 0 0
      unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.js
  99. 6 0
      unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.json
  100. 1 0
      unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.wxml

+ 4 - 0
.hbuilderx/launch.json

@@ -10,6 +10,10 @@
      	{
      		"launchtype" : "remote"
      	},
+     	"mp-weixin" : 
+     	{
+     		"launchtype" : "remote"
+     	},
      	"type" : "uniCloud"
      }
     ]

+ 0 - 66
api/functionalUnit.js

@@ -1,66 +0,0 @@
-import request from '@/utils/request'
-
-//获取优惠券列表
-export function getCouponsList(data,types) {
-	//优惠券状态 0全部 1未使用 2已使用
-	return request({
-		url: '/api/coupons/user/'+types,
-		method: 'get',
-		data
-	});
-}
-
-//领取优惠券
-export function setCoupons(data) {
-	return request({
-		url: '/api/coupon/receive',
-		method: 'post',
-		data
-	});
-}
-
-//获取可使用优惠券
-export function couponsOrder(data,price) {
-	return request({
-		url: '/api/coupons/order/'+price,
-		method: 'get',
-		data
-	});
-}
-
-
-//	积分列表
-export function integrallist(data) {
-	return request({
-		url: '/api/integral/list',
-		method: 'get',
-		data
-	});
-}
-
-
-// 获取签到列表
-export function signList(data) {
-	return request({
-		url: '/api/sign/list',
-		method: 'get',
-		data
-	});
-}
-// 点击签到
-export function integral(data) {
-	return request({
-		url: '/api/sign/integral',
-		method: 'post',
-		data
-	});
-}
-
-// 签到信息
-export function signUser(data) {
-	return request({
-		url: '/api/sign/user',
-		method: 'post',
-		data
-	});
-}

+ 49 - 12
api/index.js

@@ -1,36 +1,73 @@
 import request from '@/utils/request'
 
-// 促销商品
-export function groom4(data) {
+// 获取首页信息
+export function loadIndexs(data) {
 	return request({
-		url: '/api/groom/list/4',
+		url: '/api/index',
 		method: 'get',
 		data
 	});
 }
-// 精品推荐
-export function groom1(data) {
+
+// 获取陪诊代办信息
+export function cate(data) {
 	return request({
-		url: '/api/groom/list/1',
+		url: '/api/diagnosis/cate',
 		method: 'get',
 		data
 	});
 }
-// 新品首发
-export function groom3(data) {
+
+// 获取陪诊服务
+export function service(data) {
 	return request({
-		url: '/api/groom/list/3',
+		url: '/api/diagnosis/service',
 		method: 'get',
 		data
 	});
 }
 
-// 获取首页信息
-export function loadIndexs(data) {
+// 获取医院列表 
+export function getHospitalList(data) {
 	return request({
-		url: '/api/index',
+		url: '/hospital/index/getHospitalList',
 		method: 'get',
 		data
 	});
 }
 
+// 获取文章列表
+export function articleList(data, id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 文章详情
+export function details(data, id) {
+	return request({
+		url: '/api/article/details/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 基础价格/api/user/equity
+export function basics(data) {
+	return request({
+		url: '/api/basics',
+		method: 'get',
+		data
+	});
+}
+
+// 是否优惠
+export function equity(data) {
+	return request({
+		url: '/api/user/equity',
+		method: 'get',
+		data
+	});
+}

+ 108 - 0
api/jdr.js

@@ -0,0 +1,108 @@
+import request from '@/utils/request'
+// 接单大厅
+export function order_receiving_hall(data) {
+	return request({
+		url: '/api/diagnosis/order_receiving_hall',
+		method: 'get',
+		data
+	});
+}
+
+// 接单
+export function order_receiving(data, id) {
+	return request({
+		url: '/api/diagnosis/order_receiving/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 接单员订单
+export function receiving_list(data) {
+	return request({
+		url: '/api/diagnosis/receiving_list',
+		method: 'get',
+		data
+	});
+}
+
+// 取消接单 
+export function discard_orde(data, id) {
+	return request({
+		url: '/api/diagnosis/discard_orde/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 提交完成 
+export function submit(data, id) {
+	return request({
+		url: '/api/diagnosis/submit/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 优惠卡列表
+export function cardlist(data) {
+	return request({
+		url: '/api/card/list',
+		method: 'get',
+		data
+	});
+}
+
+// 优惠卡详情
+export function carddetails(data, id) {
+	return request({
+		url: '/api/card/details/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 公众号购买优惠券
+export function wechat(data) {
+	return request({
+		url: '/api/card/wechat',
+		method: 'post',
+		data
+	});
+}
+
+// 小程序购买优惠券
+export function routine(data) {
+	return request({
+		url: '/api/card/routine',
+		method: 'post',
+		data
+	});
+}
+
+// 优惠券列表
+export function getCouponsList(data) {
+	return request({
+		url: '/api/card/user_card',
+		method: 'get',
+		data
+	});
+}
+
+// 激活优惠券
+export function use_card(data) {
+	return request({
+		url: '/api/card/use_card',
+		method: 'post',
+		data
+	});
+}
+
+// 我的优惠券详情
+export function user_card_details(data, id) {
+	return request({
+		url: '/api/card/user_card_details/' + id,
+		method: 'get',
+		data
+	});
+}

+ 55 - 26
api/order.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-import {upFilse} from '@/utils/request'
+import {
+	upFilse
+} from '@/utils/request'
 // 订单确认
 export function confirm(data) {
 	return request({
@@ -8,23 +10,7 @@ export function confirm(data) {
 		data
 	});
 }
-//获取可使用优惠券
-export function couponsOrder(data,price) {
-	return request({
-		url: '/api/coupons/order/'+price,
-		method: 'get',
-		data
-	});
-}
-//获取优惠券列表
-export function getCouponsList(data,types) {
-	//优惠券状态 0全部 1未使用 2已使用
-	return request({
-		url: '/api/coupons/user/'+types,
-		method: 'get',
-		data
-	});
-}
+
 //提交评论
 export function order_comment(data) {
 	return request({
@@ -60,24 +46,24 @@ export function upload(data) {
 // 订单列表
 export function orderList(data) {
 	return request({
-		url: '/api/order/list',
+		url: '/api/diagnosis/order_list',
 		method: 'get',
 		data
 	});
 }
 // 订单详细
-export function orderDetail(data,orderid) {
+export function orderDetail(data, orderid) {
 	return request({
-		url: '/api/order/detail/'+orderid,
+		url: '/api/diagnosis/details/' + orderid,
 		method: 'get',
 		data
 	});
 }
 
 // 取消订单
-export function orderCancel(data) {
+export function orderCancel(data, id) {
 	return request({
-		url: '/api/order/cancel',
+		url: '/api/diagnosis/cancel_order/' + id,
 		method: 'post',
 		data
 	});
@@ -127,9 +113,9 @@ export function orderPay(data) {
 }
 
 // 创建订单
-export function createOrderkey(data,key) {
+export function createOrderkey(data) {
 	return request({
-		url: '/api/order/create/'+key,
+		url: '/api/diagnosis/create',
 		method: 'post',
 		data
 	});
@@ -138,9 +124,52 @@ export function createOrderkey(data,key) {
 // 统计订单金额
 export function computedOrderkey(data) {
 	return request({
-		url: '/api/order/computed/'+data.orderkey,
+		url: '/api/order/computed/' + data.orderkey,
+		method: 'post',
+		data
+	});
+}
+
+// 成为接单员
+export function apply(data) {
+	return request({
+		url: '/api/user/apply',
+		method: 'post',
+		data
+	});
+}
+
+export function Diagnosisconfirm(data) {
+	return request({
+		url: '/api/diagnosis/confirm',
+		method: 'get',
+		data
+	});
+}
+
+// 申请售后
+export function after_sales(data, id) {
+	return request({
+		url: '/api/diagnosis/after_sales/' + id,
+		method: 'post',
+		data
+	});
+}
+
+// 确认完成
+export function confirmation(data, id) {
+	return request({
+		url: '/api/diagnosis/confirmation/' + id,
 		method: 'post',
 		data
 	});
 }
 
+// 修改用户信息
+export function edit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}

+ 0 - 186
api/product.js

@@ -1,186 +0,0 @@
-import request from '@/utils/request'
-
-// 获取商品列表
-export function getProducts(data) {
-	// 	{
-	// 参数名称	是否必须	示例	备注
-	// sid			否			二级分类编号
-	// cid			否			一级分类编号(!)
-	// keyword		否			搜索
-	// priceOrder	否			价格排序
-	// salesOrder	否			销量排序
-	// news			否			是否新品
-	// page			否			分页参数起始值
-	// limit		否			分页数步长值
-	// }
-	return request({
-		url: '/api/products',
-		method: 'get',
-		data
-	});
-}
-// 获取商品详情
-export function goodsDetail(data, id) {
-	return request({
-		url: '/api/product/detail/' + id,
-		method: 'get',
-		data
-	});
-}
-
-// 砍价列表
-export function getBargainList(data) {
-	return request({
-		url: '/api/bargain/list',
-		method: 'get',
-		data
-	});
-}
-// 加入购物车
-export function cartAdd(data) {
-	return request({
-		url: '/api/cart/add',
-		method: 'post',
-		data
-	});
-}
-
-// 收藏商品
-export function collectAdd(data) {
-	return request({
-		url: '/api/collect/add',
-		method: 'post',
-		data
-	});
-}
-
-// 取消收藏商品
-export function collectDel(data) {
-	return request({
-		url: '/api/collect/del',
-		method: 'post',
-		data
-	});
-}
-
-// 获取搜搜关键字
-export function searchKeyword(data) {
-	return request({
-		url: '/api/search/keyword',
-		method: 'get',
-		data
-	});
-}
-
-// 获取热门分类信息
-export function groomList(data,type) {
-	// 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
-	return request({
-		url: '/api/groom/list/'+type,
-		method: 'get',
-		data
-	});
-}
-
-
-// 获取秒杀商品详细
-export function seckillGoods(data,id) {
-	return request({
-		url: '/api/seckill/detail/'+id,
-		method: 'get',
-		data
-	});
-}
-
-// 获取拼团商品详细
-export function groupGoods(data,id) {
-	return request({
-		url: '/api/combination/detail/'+id,
-		method: 'get',
-		data
-	});
-}
-
-
-// 获取商品分类
-export function getCategoryList(data) {
-	return request({
-		url: '/api/category',
-		method: 'get',
-		data
-	});
-}
-
-
-// 获取拼团列表
-export function getCombinationList(data) {
-	return request({
-		url: '/api/combination/list',
-		method: 'get',
-		data
-	});
-}
-
-//取消拼团
-export function getCombinationLisRemove(data,id) {
-	return request({
-		url: '/api/combination/remove'+id,
-		method: 'get',
-		data
-	});
-}
-
-//拼团开团页面数据
-export function getCombinationLisPink(data,id) {
-	return request({
-		url: '/api/combination/pink/'+id,
-		method: 'get',
-		data
-	});
-}
-
-// 获取拼团海报
-export function getCombinationPoster(data) {
-	return request({
-		url: '/api/combination/poster',
-		method: 'post',
-		data
-	});
-}
-
-
-// 获取秒杀分类
-export function getSeckillClass(data) {
-	return request({
-		url: '/api/seckill/index',
-		method: 'get',
-		data
-	});
-}
-// 获取秒杀列表
-export function getSeckillList(data,id) {
-	return request({
-		url: '/api/seckill/list/'+id,
-		method: 'get',
-		data
-	});
-}
-
-
-// 产品评价数量和好评度
-export function reply_config(data,id) {
-	return request({
-		url: '/api/reply/config/'+id,
-		method: 'get',
-		data
-	});
-}
-// 获取产品评论
-export function reply_list(data,id) {
-	return request({
-		url: '/api/reply/list/'+id,
-		method: 'get',
-		data
-	});
-}
-

+ 16 - 0
api/user.js

@@ -101,4 +101,20 @@ export function delcollect(data) {
 	});
 }
 
+// 推广的人数
+export function getSpreadPeople(data) {
+	return request({
+		url: '/api/spread/people',
+		method: 'post',
+		data
+	})
+}
 
+// 申请列表
+export function user_apply(data) {
+	return request({
+		url: '/api/user/user_apply',
+		method: 'get',
+		data
+	})
+}

+ 21 - 8
api/wallet.js

@@ -1,9 +1,9 @@
 import request from '@/utils/request'
 
 // 获取用户消费记录
-export function spreadCommission(data,state) {
+export function spreadCommission(data, state) {
 	return request({
-		url: '/api/spread/commission/'+state,
+		url: '/api/spread/commission/' + state,
 		method: 'get',
 		data
 	});
@@ -58,7 +58,7 @@ export function rechargeRoutine(data) {
 // 获取提现支付宝账号
 export function aliInfo(data) {
 	return request({
-		url: '/api/ali/info',
+		url: '/api/auction/pay_list',
 		method: 'get',
 		data
 	});
@@ -79,16 +79,14 @@ export function setAliInfo(data) {
 		data
 	});
 }
-//保存默认银行卡账号
-export function setBankInfo(data) {
+export function setInfo(data) {
 	return request({
-		url: '/api/bank/edit',
+		url: '/api/auction/pay',
 		method: 'post',
 		data
 	});
 }
 
-
 // 账户余额
 export function balance(data) {
 	return request({
@@ -98,5 +96,20 @@ export function balance(data) {
 	});
 }
 
+// 余额记录
+export function moneyList(data) {
+	return request({
+		url: '/api/now_money/list',
+		method: 'get',
+		data
+	});
+}
 
-
+// 佣金记录
+export function brokerageList(data) {
+	return request({
+		url: '/api/brokerage/list',
+		method: 'get',
+		data
+	});
+}

File diff suppressed because it is too large
+ 21 - 0
components/more/uni-load-more.vue


+ 3 - 4
components/seckill/seckill.vue

@@ -31,7 +31,6 @@
 
 <script>
 import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import { getSeckillList, getSeckillClass } from '@/api/product.js';
 import { timeComputed } from '@/utils/rocessor.js';
 export default {
 	components: {
@@ -140,10 +139,10 @@ export default {
 		// 计算倒计时时间
 		timeComputed(da) {
 			let obj = this;
-			let stopTime = timeComputed(da)
-			obj.stopTimeH =stopTime.hours;
+			let stopTime = timeComputed(da);
+			obj.stopTimeH = stopTime.hours;
 			obj.stopTimeM = stopTime.minutes;
-			obj.stopTimeS =stopTime.seconds;
+			obj.stopTimeS = stopTime.seconds;
 		}
 	}
 };

+ 224 - 0
components/uni-nav-bar/uni-nav-bar.vue

@@ -0,0 +1,224 @@
+<template>
+	<view class="uni-navbar">
+		<view :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }" :style="{ 'background-color': backgroundColor }"
+		 class="uni-navbar__content">
+			<uni-status-bar v-if="statusBar" />
+			<view :style="{ color: color,backgroundColor: backgroundColor }" class="uni-navbar__header uni-navbar__content_view">
+				<view @tap="onClickLeft" class="uni-navbar__header-btns uni-navbar__header-btns-left uni-navbar__content_view">
+					<view class="uni-navbar__content_view" v-if="leftIcon.length">
+						<uni-icons :color="color" :type="leftIcon" size="32" />
+					</view>
+					<view :class="{ 'uni-navbar-btn-icon-left': !leftIcon.length }" class="uni-navbar-btn-text uni-navbar__content_view"
+					 v-if="leftText.length">
+						<text :style="{ color: color, fontSize: '14px' }">{{ leftText }}</text>
+					</view>
+					<slot name="left" />
+				</view>
+				<view class="uni-navbar__header-container uni-navbar__content_view">
+					<view class="uni-navbar__header-container-inner uni-navbar__content_view" v-if="title.length">
+						<text class="uni-nav-bar-text" :style="{color: color }">{{ title }}</text>
+					</view>
+					<!-- 标题插槽 -->
+					<slot />
+				</view>
+				<view :class="title.length ? 'uni-navbar__header-btns-right' : ''" @tap="onClickRight" class="uni-navbar__header-btns uni-navbar__content_view">
+					<view class="uni-navbar__content_view" v-if="rightIcon.length">
+						<uni-icons :color="color" :type="rightIcon" size="32" />
+					</view>
+					<!-- 优先显示图标 -->
+					<view class="uni-navbar-btn-text uni-navbar__content_view" v-if="rightText.length && !rightIcon.length">
+						<text class="uni-nav-bar-right-text">{{ rightText }}</text>
+					</view>
+					<slot name="right" />
+				</view>
+			</view>
+		</view>
+		<view class="uni-navbar__placeholder" v-if="fixed">
+			<uni-status-bar v-if="statusBar" />
+			<view class="uni-navbar__placeholder-view" />
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniStatusBar from "../uni-status-bar/uni-status-bar.vue";
+	import uniIcons from "../uni-icons/uni-icons.vue";
+
+	export default {
+		name: "UniNavBar",
+		components: {
+			uniStatusBar,
+			uniIcons
+		},
+		props: {
+			title: {
+				type: String,
+				default: ""
+			},
+			leftText: {
+				type: String,
+				default: ""
+			},
+			rightText: {
+				type: String,
+				default: ""
+			},
+			leftIcon: {
+				type: String,
+				default: ""
+			},
+			rightIcon: {
+				type: String,
+				default: ""
+			},
+			fixed: {
+				type: [Boolean, String],
+				default: false
+			},
+			color: {
+				type: String,
+				default: "#000000"
+			},
+			backgroundColor: {
+				type: String,
+				default: "#FFFFFF"
+			},
+			statusBar: {
+				type: [Boolean, String],
+				default: false
+			},
+			shadow: {
+				type: [String, Boolean],
+				default: false
+			},
+			border: {
+				type: [String, Boolean],
+				default: true
+			}
+		},
+        mounted() {
+          if(uni.report && this.title !== '') {
+              uni.report('title', this.title)
+          }
+        },
+		methods: {
+			onClickLeft() {
+				this.$emit("clickLeft");
+			},
+			onClickRight() {
+				this.$emit("clickRight");
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	$nav-height: 44px;
+	.uni-nav-bar-text {
+		/* #ifdef APP-PLUS */
+		font-size: 34rpx;
+		/* #endif */
+		/* #ifndef APP-PLUS */
+		font-size: $uni-font-size-lg;
+		/* #endif */
+	}
+	.uni-nav-bar-right-text {
+		font-size: $uni-font-size-base;
+	}
+
+	.uni-navbar {
+		width: 750rpx;
+	}
+
+	.uni-navbar__content {
+		position: relative;
+		width: 750rpx;
+		background-color: $uni-bg-color;
+		overflow: hidden;
+	}
+
+	.uni-navbar__content_view {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		align-items: center;
+		flex-direction: row;
+		// background-color: #FFFFFF;
+	}
+
+	.uni-navbar__header {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		width: 750rpx;
+		height: $nav-height;
+		line-height: $nav-height;
+		font-size: 16px;
+		// background-color: #ffffff;
+	}
+
+	.uni-navbar__header-btns {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-wrap: nowrap;
+		width: 120rpx;
+		padding: 0 6px;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.uni-navbar__header-btns-left {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		width: 150rpx;
+		justify-content: flex-start;
+	}
+
+	.uni-navbar__header-btns-right {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		width: 150rpx;
+		padding-right: 30rpx;
+		justify-content: flex-end;
+	}
+
+	.uni-navbar__header-container {
+		flex: 1;
+	}
+
+	.uni-navbar__header-container-inner {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex: 1;
+		align-items: center;
+		justify-content: center;
+		font-size: $uni-font-size-base;
+	}
+
+
+	.uni-navbar__placeholder-view {
+		height: $nav-height;
+	}
+
+	.uni-navbar--fixed {
+		position: fixed;
+		z-index: 998;
+	}
+
+	.uni-navbar--shadow {
+		/* #ifndef APP-NVUE */
+		box-shadow: 0 1px 6px #ccc;
+		/* #endif */
+	}
+
+	.uni-navbar--border {
+		border-bottom-width: 1rpx;
+		border-bottom-style: solid;
+		border-bottom-color: $uni-border-color;
+	}
+</style>

+ 156 - 0
components/uni-search-bar/uni-search-bar.vue

@@ -0,0 +1,156 @@
+<template>
+	<view class="uni-searchbar">
+		<view :style="{borderRadius:radius+'px',backgroundColor: bgColor}" class="uni-searchbar__box" @click="searchClick">
+			<!-- #ifdef MP-ALIPAY -->
+			<view class="uni-searchbar__box-icon-search">
+				<uni-icons color="#999999" size="18" type="search" />
+			</view>
+			<!-- #endif -->
+			<!-- #ifndef MP-ALIPAY -->
+			<uni-icons color="#999999" class="uni-searchbar__box-icon-search" size="18" type="search" />
+			<!-- #endif -->
+			<input v-if="show" :focus="focus" :placeholder="placeholder" :maxlength="maxlength" class="uni-searchbar__box-search-input"
+			 confirm-type="search" type="text" :value="value" @input="$emit('input', $event.target.value)" @blur="blur"/>
+			<text v-else class="uni-searchbar__text-placeholder">{{ placeholder }}</text>
+			<view v-if="show && (clearButton==='always'||clearButton==='auto'&&value!=='')" class="uni-searchbar__box-icon-clear" @click="clear">
+				<uni-icons color="#999999" class="" size="24" type="clear" />
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import uniIcons from "../uni-icons/uni-icons.vue";
+	export default {
+		name: "UniSearchBar",
+		components: {
+			uniIcons
+		},
+		props: {
+			placeholder: {
+				type: String,
+				default: "请输入搜索内容"
+			},
+			radius: {
+				type: [Number, String],
+				default: 5
+			},
+			clearButton: {
+				type: String,
+				default: "auto"
+			},
+			cancelButton: {
+				type: String,
+				default: "auto"
+			},
+			cancelText: {
+				type: String,
+				default: '取消'
+			},
+			bgColor: {
+				type: String,
+				default: "#F8F8F8"
+			},
+			maxlength: {
+				type: [Number, String],
+				default: 100
+			},
+			value: {
+				type: String,
+			}
+		},
+		data() {
+			return {
+				show: this.value?true:false,
+				focus: false
+			}
+		},
+		methods: {
+			searchClick() {
+				if (this.show) {
+					return
+				}
+				this.show = true;
+				this.focus = true;
+			},
+			clear() {
+				this.$emit("input", '')
+				setTimeout(()=>{
+					this.show = false
+				}, 0)
+			},
+			blur(){
+				this.focus = false
+				if(!this.value) this.show = false
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	$uni-searchbar-height: 36px;
+
+	.uni-searchbar {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		position: relative;
+		padding: $uni-spacing-col-base;
+		background-color: $uni-bg-color;
+	}
+
+	.uni-searchbar__box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		box-sizing: border-box;
+		/* #endif */
+		overflow: hidden;
+		position: relative;
+		flex: 1;
+		justify-content: center;
+		flex-direction: row;
+		align-items: center;
+		height: $uni-searchbar-height;
+		padding: 5px 8px 5px 0px;
+		border-width: 0.5px;
+		border-style: solid;
+		border-color: $uni-border-color;
+	}
+
+	.uni-searchbar__box-icon-search {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		width: 32px;
+		justify-content: center;
+		align-items: center;
+		color: $uni-text-color-placeholder;
+	}
+
+	.uni-searchbar__box-search-input {
+		flex: 1;
+		font-size: $uni-font-size-base;
+		color: $uni-text-color;
+	}
+
+	.uni-searchbar__box-icon-clear {
+		align-items: center;
+		line-height: 24px;
+		padding-left: 5px;
+	}
+
+	.uni-searchbar__text-placeholder {
+		font-size: $uni-font-size-base;
+		color: $uni-text-color-placeholder;
+		margin-left: 5px;
+	}
+
+	.uni-searchbar__cancel {
+		padding-left: 10px;
+		line-height: $uni-searchbar-height;
+		font-size: 14px;
+		color: $uni-text-color;
+	}
+</style>

+ 25 - 0
components/uni-status-bar/uni-status-bar.vue

@@ -0,0 +1,25 @@
+<template>
+	<view :style="{ height: statusBarHeight }" class="uni-status-bar">
+		<slot />
+	</view>
+</template>
+
+<script>
+	var statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
+	export default {
+		name: 'UniStatusBar',
+		data() {
+			return {
+				statusBarHeight: statusBarHeight
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.uni-status-bar {
+		width: 750rpx;
+		height: 20px;
+		// height: var(--status-bar-height);
+	}
+</style>

+ 88 - 91
components/wangding-pickerAddress/wangding-pickerAddress.vue

@@ -1,103 +1,100 @@
 <template>
-	<picker @change="bindPickerChange" @columnchange="columnchange" :range="array" range-key="name" :value="value" mode="multiSelector">
-		<slot></slot>
-	</picker>
+	<picker @change="bindPickerChange" @columnchange="columnchange" :range="array" range-key="name" :value="value" mode="multiSelector"><slot></slot></picker>
 </template>
 
 <script>
-	import AllAddress from './data.js'
-	let selectVal = ['','',''];
-	
-	export default {
-		data() {
-			return{
-				value: [0,0,0],
-				array: [],
-				index: 0
-			}
-		},
-		created() {
-			this.initSelect()
-		},
-		methods:{
-			// 初始化地址选项
-			initSelect() {
-				this.updateSourceDate() // 更新源数据
+import AllAddress from './data.js';
+let selectVal = ['', '', ''];
+
+export default {
+	data() {
+		return {
+			value: [0, 0, 0],
+			array: [],
+			index: 0
+		};
+	},
+	created() {
+		this.initSelect();
+	},
+	methods: {
+		// 初始化地址选项
+		initSelect() {
+			this.updateSourceDate() // 更新源数据
 				.updateAddressDate() // 更新结果数据
-				.$forceUpdate()  // 触发双向绑定
-			},
-			// 地址控件改变控件
-			columnchange(d) {
-				this.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引
+				.$forceUpdate(); // 触发双向绑定
+		},
+		// 地址控件改变控件
+		columnchange(d) {
+			this.updateSelectIndex(d.detail.column, d.detail.value) // 更新选择索引
 				.updateSourceDate() // 更新源数据
 				.updateAddressDate() // 更新结果数据
-				.$forceUpdate()  // 触发双向绑定
-			},
-			
-			/**
-			 * 更新源数据
-			 * */
-			updateSourceDate() {
-				this.array = []
-				this.array[0] = AllAddress.map(obj => {
-					return {
-						name: obj.name
-					}
-				})
-				this.array[1] = AllAddress[this.value[0]].city.map(obj => {
-					return {
-						name: obj.name
-					}
-				})
-				this.array[2] = AllAddress[this.value[0]].city[this.value[1]].area.map(obj => { 
-					return {
-						name: obj
-					}
-				})
-				return this
-			},
-			
-			/**
-			 * 更新索引
-			 * */
-			updateSelectIndex(column, value){
-				let arr = JSON.parse(JSON.stringify(this.value)) 
-				arr[column] = value
-				if(column === 0 ) {
-					arr[1] = 0
-					arr[2] = 0
-				}
-				if(column === 1 ) {
-					arr[2] = 0
-				}
-				this.value = arr
-				return this
-			},
-			
-			/**
-			 * 更新结果数据 
-			 * */
-			updateAddressDate() {
-				selectVal[0] = this.array[0][this.value[0]].name
-				selectVal[1] = this.array[1][this.value[1]].name 
-				selectVal[2] = this.array[2][this.value[2]].name 
-				return this
-			},
-			
-			/**
-			 * 点击确定
-			 * */
-			bindPickerChange(e) {
-				this.$emit('change', {
-					index: this.value,
-					data: selectVal
-				})
-				return this
+				.$forceUpdate(); // 触发双向绑定
+		},
+
+		/**
+		 * 更新源数据
+		 * */
+		updateSourceDate() {
+			this.array = [];
+			this.array[0] = AllAddress.map(obj => {
+				return {
+					name: obj.name
+				};
+			});
+			this.array[1] = AllAddress[this.value[0]].city.map(obj => {
+				return {
+					name: obj.name
+				};
+			});
+			this.array[2] = AllAddress[this.value[0]].city[this.value[1]].area.map(obj => {
+				return {
+					name: obj
+				};
+			});
+			console.log(this.array, '地址');
+			return this;
+		},
+
+		/**
+		 * 更新索引
+		 * */
+		updateSelectIndex(column, value) {
+			let arr = JSON.parse(JSON.stringify(this.value));
+			arr[column] = value;
+			if (column === 0) {
+				arr[1] = 0;
+				arr[2] = 0;
 			}
-			
+			if (column === 1) {
+				arr[2] = 0;
+			}
+			this.value = arr;
+			return this;
+		},
+
+		/**
+		 * 更新结果数据
+		 * */
+		updateAddressDate() {
+			selectVal[0] = this.array[0][this.value[0]].name;
+			selectVal[1] = this.array[1][this.value[1]].name;
+			selectVal[2] = this.array[2][this.value[2]].name;
+			return this;
+		},
+
+		/**
+		 * 点击确定
+		 * */
+		bindPickerChange(e) {
+			this.$emit('change', {
+				index: this.value,
+				data: selectVal
+			});
+			return this;
 		}
 	}
+};
 </script>
 
-<style>
-</style>
+<style></style>

File diff suppressed because it is too large
+ 23 - 0
components/xw-empty/xw-empty.vue


+ 243 - 0
components/zhilin-picker/zhilin-picker.vue

@@ -0,0 +1,243 @@
+<template>
+	<view class="zhilin-picker">
+		<uni-popup ref="popup" type="top" @change="popupChange">
+			<uni-nav-bar @clickLeft="clickLeft" @clickRight="tapOK" rightText="确定" left-icon="closeempty" :title="title" :border="null"></uni-nav-bar>
+			<view class="usb"><uni-search-bar v-if="showSearch" :radius="100" cancelButton="none" v-model="searchVal"></uni-search-bar></view>
+			<view class="main" v-if="list.length">
+				<scroll-view scroll-y="true" @scrolltolower="lower" :lower-threshold="1">
+					<view class="scroll-view-item flex" v-for="(v, i) in list" :key="i" @tap="tapItem(v.id, v.name, v)" :class="selected.indexOf(v.id) > -1 ? 'selected' : null">
+						<view>
+							<view>{{ v.name }}</view>
+							<text class="detail_address">{{ v.province }}{{ v.city }}{{ v.district }}{{ v.detail_address }}</text>
+						</view>
+						<view><icon v-show="selected.indexOf(v.id) > -1" type="success_no_circle" size="22" /></view>
+					</view>
+					<view v-if="showBottom" class="isBottom">已经到底啦~</view>
+					<view v-if="!showBottom" class="isBottom">下拉刷新~</view>
+				</scroll-view>
+				<view class="loadingBox" v-show="loading"><uni-load-more status="loading"></uni-load-more></view>
+			</view>
+			<view v-else class="empty"><xw-empty text="暂无选项" textColor="#777777"></xw-empty></view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+import uniPopup from '../uni-popup/uni-popup.vue';
+import uniNavBar from '../uni-nav-bar/uni-nav-bar.vue';
+import xwEmpty from '../xw-empty/xw-empty.vue';
+import uniSearchBar from '../uni-search-bar/uni-search-bar.vue';
+import uniLoadMore from '../more/uni-load-more.vue';
+export default {
+	name: 'zhilin-select',
+	components: {
+		uniPopup,
+		uniNavBar,
+		xwEmpty,
+		uniSearchBar,
+		uniLoadMore
+	},
+	props: {
+		title: {
+			type: String,
+			default: '请选择'
+		},
+		value: {
+			type: Boolean,
+			required: true
+		},
+		data: {
+			type: Array,
+			required: true
+		},
+		multiple: {
+			type: Boolean,
+			default: false
+		},
+		showSearch: {
+			type: Boolean,
+			default: false
+		},
+		searchInput: Function,
+		initSelected: Array
+	},
+	data() {
+		return {
+			list: [],
+			selected: [],
+			showBottom: false,
+			loading: false,
+			searchVal: ''
+		};
+	},
+	created() {
+		this.dataInit();
+	},
+	watch: {
+		value(n, o) {
+			if (n) this.$refs.popup.open();
+			else this.$refs.popup.close();
+		},
+		data(n, o) {
+			this.loading = false;
+			this.showBottom = false;
+			this.dataInit();
+		},
+		searchVal() {
+			this.$emit('searchInput', this.searchVal);
+			this.inputSearch();
+		},
+		initSelected(n) {
+			this.selected = n;
+		}
+	},
+	methods: {
+		lower: function(e) {
+			this.showBottom = true;
+			this.$emit('shua');
+		},
+		dataInit() {
+			this.list = this.data;
+		},
+		clickLeft() {
+			this.$emit('input', false);
+		},
+		tapItem(val, name, v) {
+			console.log(val, name, v);
+			if (this.multiple) {
+				let idx = this.selected.indexOf(val);
+				if (idx == -1) {
+					this.selected.push(val);
+				} else {
+					this.selected.splice(idx, 1);
+				}
+			} else {
+				this.selected = [val, name, v.city, v.city_id, v.district, v.district_id, v.province, v.province_id];
+			}
+			this.$emit('change', this.selected.join());
+		},
+		tapOK() {
+			if (this.selected.join() == '' && this.list != '') {
+				this.$api.msg('请先点击医院列表选择医院!');
+				return;
+			}
+			this.$emit('input', false);
+			this.$emit('confirm', this.selected.join());
+		},
+		popupChange(e) {
+			this.$emit('input', e.show);
+		},
+		inputSearch() {
+			let val = this.searchVal;
+			if (this.searchInput) {
+				this.loading = true;
+				this.searchInput(val);
+				return;
+			}
+			this.showBottom = false;
+			if (this.list == '') {
+			} else {
+				this.list = this.list.map((v, i) => ({
+					label: v,
+					value: v
+				}));
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.zhilin-picker {
+	font-size: 28rpx;
+
+	uni-popup /deep/ .uni-popup {
+		width: 750rpx;
+		background: #fff;
+		height: 1056rpx;
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+		z-index: 999 !important;
+	}
+
+	uni-popup {
+		.usb {
+			padding: 0 32rpx;
+			background: #fff;
+		}
+	}
+}
+
+.main {
+	height: calc(800rpx - 192rpx);
+	flex: 1;
+	position: relative;
+	background: #fff;
+	scroll-view {
+		height: 100%;
+		.scroll-view-item {
+			box-sizing: border-box;
+			padding: 18rpx 44rpx !important;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			min-height: 80rpx;
+			&.selected {
+				background: rgba(0, 122, 255, 0.1);
+			}
+			uni-text {
+				width: 85%;
+			}
+		}
+
+		.isBottom {
+			display: flex;
+			justify-content: center;
+			color: #777;
+			position: relative;
+			padding: 18rpx 44rpx;
+			font-size: 24rpx;
+
+			&::after {
+				content: '';
+				position: absolute;
+				bottom: 10rpx;
+				width: 60rpx;
+				height: 4rpx;
+				left: 50%;
+				transform: translateX(-51%);
+				background: #777;
+			}
+		}
+	}
+
+	.loadingBox {
+		height: 100%;
+		width: 100%;
+		position: absolute;
+		top: 0;
+		left: 0;
+		background: rgba(255, 255, 255, 0.7);
+		z-index: 2;
+
+		uni-load-more {
+			display: flex;
+			justify-content: center;
+			position: absolute;
+			width: 100%;
+			top: 35%;
+			left: 50%;
+			transform: translate(-50%);
+		}
+	}
+}
+.detail_address {
+	color: #969696;
+	font-size: 24rpx;
+	padding-top: 10rpx;
+}
+.empty {
+	background: #fff;
+}
+</style>

+ 31 - 23
manifest.json

@@ -1,6 +1,6 @@
 {
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
+    "name" : "陪诊",
+    "appid" : "__UNI__5C1AC10",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",
@@ -58,7 +58,7 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        "appid" : "",
+        "appid" : "wxacf03f73a8fb0f1d",
         "setting" : {
             "urlCheck" : true
         }
@@ -82,24 +82,32 @@
     //         }
     //     }
     // }
-	"h5" : {
-	        "title" : "商城",
-	        "domain" : "",
-	        "router" : {
-	            "base" : "/index/",
-	            "mode" : "hash"
-	        },
-	        "devServer" : {
-	            "proxy" : {
-	                "/api" : {
-	                    "target" : "http://zccy.frp.liuniu946.com", //请求的目标域名
-	                    "changeOrigin" : true,
-	                    // "secure": false,
-	                    "pathRewrite" : {
-	                                                // "^/api": "/"
-	                                        }
-	                }
-	            }
-	        }
-	    }  
+    "h5" : {
+        "title" : "商城",
+        "domain" : "",
+        "router" : {
+            "base" : "/index/",
+            "mode" : "hash"
+        },
+        "devServer" : {
+            "proxy" : {
+                "^/api" : {
+                    // "target" : "http://pj.frp.liuniu946.com", //请求的目标域名
+                    "target" : "https://penzhen.liuniu946.com", //请求的目标域名
+                    "changeOrigin" : true,
+                    // "secure": false,
+                    "pathRewrite" : {}
+                },
+                // "^/api": "/"
+                "^/hospital" : {
+                    "target" : "https://doctortest.igxys.com/api", //请求的目标域名
+                    "changeOrigin" : true,
+                    // "secure": false,
+                    "pathRewrite" : {
+                        "/hospital" : ""
+                    }
+                }
+            }
+        }
+    }
 }

+ 77 - 45
pages.json

@@ -2,7 +2,6 @@
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
-				"enablePullDownRefresh": true,
 				// #ifdef MP
 				"navigationStyle": "custom",
 				// #endif
@@ -14,6 +13,41 @@
 				"navigationBarTitleText": "商城首页"
 			}
 		},
+		{
+			"path": "pages/index/yydb",
+			"style": {
+				"navigationBarTitleText": "预约代办"
+			}
+		},
+		{
+			"path": "pages/index/info",
+			"style": {
+				"navigationBarTitleText": "新闻详情"
+			}
+		},
+		{
+			"path": "pages/index/yypz",
+			"style": {
+				"navigationBarTitleText": "预约陪诊"
+			}
+		},
+		{
+			"path": "pages/index/card",
+			"style": {
+				"navigationBarTitleText": "办卡",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/index/cardDetail",
+			"style": {
+				"navigationBarTitleText": "卡片详情"
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -24,7 +58,8 @@
 					}
 				}
 			}
-		}, {
+		},
+		{
 			"path": "pages/public/login",
 			"style": {
 				"navigationBarTitleText": "登录",
@@ -81,7 +116,7 @@
 		{
 			"path": "pages/user/coupon",
 			"style": {
-				"navigationBarTitleText": "我的卡卷"
+				"navigationBarTitleText": "卡券包"
 			}
 		},
 		{
@@ -99,6 +134,12 @@
 				}
 			}
 		},
+		{
+			"path": "pages/order/success",
+			"style": {
+				"navigationBarTitleText": "提交成功"
+			}
+		},
 		{
 			"path": "pages/order/expressInfo",
 			"style": {
@@ -117,7 +158,7 @@
 		{
 			"path": "pages/order/evaluate",
 			"style": {
-				"navigationBarTitleText": "评论"
+				"navigationBarTitleText": "申请售后"
 			}
 		},
 		{
@@ -127,11 +168,27 @@
 			}
 		},
 		{
-			"path": "pages/order/createOrder",
+			"path": "pages/jdr/center",
 			"style": {
-				"navigationBarTitleText": "创建订单"
+				"navigationBarTitleText": "接单中心",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/jdr/order",
+			"style": {
+				"navigationBarTitleText": "我的接单"
 			}
-		}, {
+		},
+		{
+			"path": "pages/jdr/evaluate",
+			"style": {
+				"navigationBarTitleText": "提交完成"
+			}
+		},
+		{
 			"path": "pages/money/pay",
 			"style": {
 				"navigationBarTitleText": "支付"
@@ -161,12 +218,12 @@
 				}
 			}
 		},
-		{
-			"path": "pages/money/account",
-			"style": {
-				"navigationBarTitleText": "提现账号"
-			}
-		},
+		// {
+		// 	"path": "pages/money/account",
+		// 	"style": {
+		// 		"navigationBarTitleText": "提现账号"
+		// 	}
+		// },
 		{
 			"path": "pages/money/withdrawal",
 			"style": {
@@ -179,6 +236,12 @@
 				"navigationBarTitleText": "充值"
 			}
 		},
+		{
+			"path": "pages/user/mycardDetail",
+			"style": {
+				"navigationBarTitleText": "卡片详情"
+			}
+		},
 		{
 			"path": "pages/redirect/redirect",
 			"style": {
@@ -204,37 +267,6 @@
 			}
 		}
 	],
-	"subPackages": [{
-		"root": "pages/activity",
-		"name": "activity",
-		"pages": [{
-				"path": "goods_bargain/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "goods_bargain_details/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "bargain/index",
-				"style": {
-					"navigationBarTitleText": "砍价记录"
-				}
-			}
-		]
-	}],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
@@ -256,7 +288,7 @@
 				"pagePath": "pages/order/order",
 				"iconPath": "static/tabBar/tab-cate.png",
 				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "分类"
+				"text": "订单"
 			},
 			{
 				"pagePath": "pages/user/user",

+ 0 - 267
pages/activity/bargain/index.vue

@@ -1,267 +0,0 @@
-<template>
-	<view>
-		<block v-if="bargain.length>0">
-			<div class="bargain-record" ref="container">
-				<div class="item" v-for="(item, index) in bargain" :key="index">
-					<div class="picTxt acea-row row-between-wrapper">
-						<div class="pictrue">
-							<image :src="item.image" />
-						</div>
-						<div class="text acea-row row-column-around">
-							<div class="line1" style="width: 100%;">{{ item.title }}</div>
-							<count-down :justify-left="'justify-content:left'" :is-day="true" :tip-text="'倒计时 '" :day-text="' 天 '" :hour-text="' 时 '" :minute-text="' 分 '"
-							 :second-text="' 秒'" :datatime="item.datatime" v-if="item.status === 1"></count-down>
-							<div class="successTxt font-color-red" v-else-if="item.status === 3">砍价成功</div>
-							<div class="endTxt" v-else>活动已结束</div>
-							<div class="money font-color-red">
-								已砍至<span class="symbol">¥</span><span class="num">{{ item.residue_price }}</span>
-							</div>
-						</div>
-					</div>
-					<div class="bottom acea-row row-between-wrapper">
-						<div class="purple" v-if="item.status === 1">活动进行中</div>
-						<div class="success" v-else-if="item.status === 3">砍价成功</div>
-						<div class="end" v-else>活动已结束</div>
-						<div class="acea-row row-middle row-right">
-							<div class="bnt cancel" v-if="item.status === 1" @click="getBargainUserCancel(item.bargain_id)">
-								取消活动
-							</div>
-							<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.bargain_id)">
-								继续砍价
-							</div>
-							<!-- <div class="bnt bg-color-red" v-else @click="goList">重开一个</div> -->
-						</div>
-					</div>
-				</div>
-				<Loading :loaded="status" :loading="loadingList"></Loading>
-			</div>
-		</block>
-		<block v-if="bargain.length == 0">
-			<emptyPage title="暂无砍价记录~"></emptyPage>
-		</block>
-	</view>
-</template>
-<script>
-	import CountDown from "@/components/countDown";
-	import emptyPage from '@/components/emptyPage.vue'
-	import {
-		getBargainUserList,
-		getBargainUserCancel
-	} from "@/api/activity";
-	import {
-		userinfos
-	} from '@/api/user.js';
-	import Loading from "@/components/Loading";
-
-	export default {
-		name: "BargainRecord",
-		components: {
-			CountDown,
-			Loading,
-			emptyPage
-		},
-		props: {},
-		data: function() {
-			return {
-				bargain: [],
-				status: false, //砍价列表是否获取完成 false 未完成 true 完成
-				loadingList: false, //当前接口是否请求完成 false 完成 true 未完成
-				page: 1, //页码
-				limit: 20, //数量
-				userInfo: {}
-			};
-		},
-		onLoad: function() {
-			this.getBargainUserList();
-			this.getUserInfo();
-			// this.$scroll(this.$refs.container, () => {
-			//   !this.loadingList && this.getBargainUserList();
-			// });
-		},
-		methods: {
-			goDetail: function(id) {
-				// this.$router.push({
-				// 	path: "/activity/dargain_detail/" + id +'&bargain='+ userInfo.uid
-				// });
-				uni.navigateTo({
-					url: `/pages/activity/goods_bargain_details/index?id=${id}&bargain=${this.userInfo.uid}`
-				})
-			},
-			// 砍价列表
-			goList: function() {
-				uni.navigateTo({
-					url: '/pages/activity/goods_bargain/index'
-				})
-			},
-			getBargainUserList: function() {
-				var that = this;
-				if (that.loadingList) return;
-				if (that.status) return;
-				getBargainUserList({
-						page: that.page,
-						limit: that.limit
-					})
-					.then(res => {
-						that.status = res.data.length < that.limit;
-						that.bargain.push.apply(that.bargain, res.data);
-						that.page++;
-						that.loadingList = false;
-					})
-					.catch(res => {
-						that.$dialog.error(res.msg);
-					});
-			},
-			getBargainUserCancel: function(bargainId) {
-				var that = this;
-				uni.showModal({
-				    title: '提示',
-				    content: '确定取消砍价商品吗',
-				    success: function (res) {
-				        if (res.confirm) {
-				            console.log('用户点击确定');
-							getBargainUserCancel({
-									bargainId: bargainId
-								})
-								.then(res => {
-									that.status = false;
-									that.loadingList = false;
-									that.page = 1;
-									that.bargain = [];
-									that.getBargainUserList();
-									uni.showToast({
-										title:res.msg
-									});
-								})
-								.catch(res => {
-									uni.showToast({
-										title:res
-									});
-								});
-				        } else if (res.cancel) {
-				            console.log('用户点击取消');
-				        }
-				    }
-				});
-			},
-			/**
-			 * 获取个人用户信息
-			 */
-			getUserInfo: function() {
-				let that = this;
-				userinfos().then(res => {
-					that.userInfo = res.data;
-				});
-			},
-		},
-		onReachBottom() {
-			this.getBargainUserList();
-		}
-	};
-</script>
-
-<style lang="scss">
-	page{
-		background-color: #f5f5f5;
-	}
-	/*砍价记录*/
-	.bargain-record .item .picTxt .text .time .styleAll {
-		color: #fc4141;
-		font-size:24rpx;
-	}
-	.bargain-record .item .picTxt .text .time .red {
-		color: #999;
-		font-size:24rpx;
-	}
-	.bargain-record .item {
-		background-color: #fff;
-		margin-bottom: 12upx;
-	}
-
-	.bargain-record .item .picTxt {
-		height: 210upx;
-		border-bottom: 1px solid #f0f0f0;
-		padding: 0 30upx;
-	}
-
-	.bargain-record .item .picTxt .pictrue {
-		width: 150upx;
-		height: 150upx;
-	}
-
-	.bargain-record .item .picTxt .pictrue image {
-		width: 100%;
-		height: 100%;
-		border-radius: 6upx;
-	}
-
-	.bargain-record .item .picTxt .text {
-		width: 515upx;
-		font-size: 30upx;
-		color: #282828;
-		height: 150upx;
-	}
-
-	.bargain-record .item .picTxt .text .time {
-		font-size: 24upx;
-		color: #868686;
-		justify-content: left !important;
-	}
-	
-	.bargain-record .item .picTxt .text .successTxt{
-		font-size:24rpx;
-	}
-	
-	.bargain-record .item .picTxt .text .endTxt{
-		font-size:24rpx;
-		color: #999;
-	}
-	.bargain-record .item .picTxt .text .money {
-		font-size: 24upx;
-	}
-
-	.bargain-record .item .picTxt .text .money .num {
-		font-size: 32upx;
-		font-weight: bold;
-	}
-
-	.bargain-record .item .picTxt .text .money .symbol {
-		font-weight: bold;
-	}
-
-	.bargain-record .item .bottom {
-		height: 100upx;
-		padding: 0 30upx;
-		font-size: 27upx;
-	}
-
-	.bargain-record .item .bottom .purple {
-		color: #f78513;
-	}
-
-	.bargain-record .item .bottom .end {
-		color: #999;
-	}
-
-	.bargain-record .item .bottom .success {
-		color: #e93323;
-	}
-
-	.bargain-record .item .bottom .bnt {
-		font-size: 27upx;
-		color: #fff;
-		width: 176upx;
-		height: 60upx;
-		border-radius: 32upx;
-		text-align: center;
-		line-height: 60upx;
-	}
-
-	.bargain-record .item .bottom .bnt.cancel {
-		color: #aaa;
-		border: 1px solid #ddd;
-	}
-
-	.bargain-record .item .bottom .bnt~.bnt {
-		margin-left: 18upx;
-	}
-</style>

File diff suppressed because it is too large
+ 0 - 172
pages/activity/goods_bargain/index.vue


File diff suppressed because it is too large
+ 0 - 726
pages/activity/goods_bargain_details/index.vue


+ 207 - 0
pages/index/card.vue

@@ -0,0 +1,207 @@
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<view class="top"><image src="../../static/img/cardbg.png" mode=""></image></view>
+		<view class="main">
+			<view class="main-item" v-for="(item, index) in cardList" @click="navTo(item)">
+				<view class="main-item-top flex">
+					<view class="main-item-top-bg"><image :src="item.image" mode=""></image></view>
+					<view class="main-item-top-left">
+						<view class="main-item-title">{{ item.name }}</view>
+						<view class="main-item-time" v-if="item.type == 1">有效期{{ item.time }}天</view>
+						<view class="main-item-time" v-if="item.type == 2">有效次数{{ item.number }}次</view>
+					</view>
+					<view class="main-item-type">{{ item.type == 1 ? '时效卡' : '次卡' }}</view>
+				</view>
+				<view class="main-item-bottom">
+					<view class="main-item-bottom-bg"><image src="../../static/img/cardbottom.png" mode=""></image></view>
+					<view class="main-item-price">
+						<text class="fh">¥</text>
+						{{ item.price }}
+						<text class="time"></text>
+					</view>
+					<view class="main-item-info flex">
+						<view class="main-item-info-left">{{ item.info }}</view>
+						<view class="main-item-info-right">
+							<view class="main-item-info-font">查看详情</view>
+							<view class="main-item-info-icon"><image src="../../static/img/img39.png" mode=""></image></view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { cardlist } from '@/api/jdr.js';
+export default {
+	data() {
+		return {
+			cardList: [],
+			page: 1,
+			limit: 1000
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	methods: {
+		navTo(opt) {
+			uni.navigateTo({
+				url: '/pages/index/cardDetail?id=' + opt.id
+			});
+		},
+		loadData() {
+			const obj = this;
+			cardlist({ page: obj.page, limit: obj.limit }).then(({ data }) => {
+				obj.cardList = data;
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.container {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+}
+.vheigh {
+	height: var(--status-bar-height);
+	background-color: $base-color;
+}
+.top {
+	position: relative;
+	height: 534rpx;
+	width: 750rpx;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+.main {
+	margin: 52rpx 0 0;
+	padding: 0 24rpx;
+	width: 750rpx;
+	.main-item {
+		.main-item-top {
+			align-items: flex-start;
+			width: 702rpx;
+			height: 150rpx;
+			position: relative;
+			.main-item-top-bg {
+				position: absolute;
+				top: 0;
+				left: 0;
+				right: 0;
+				width: 702rpx;
+				height: 150rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.main-item-top-left {
+				position: relative;
+				z-index: 2;
+				padding: 40rpx 0 0 30rpx;
+				line-height: 1;
+				.main-item-title {
+					font-size: 42rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #c99f62;
+				}
+				.main-item-time {
+					margin-top: 20rpx;
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #d6d1d1;
+				}
+			}
+			.main-item-type {
+				padding: 56rpx 24rpx 0 0;
+				position: relative;
+				z-index: 2;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #d6d1d1;
+			}
+		}
+		.main-item-bottom {
+			width: 702rpx;
+			height: 176rpx;
+			position: relative;
+			padding: 30rpx 30rpx 0;
+			line-height: 1;
+			.main-item-bottom-bg {
+				position: absolute;
+				top: 0;
+				left: 0;
+				right: 0;
+				width: 702rpx;
+				height: 176rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.main-item-price {
+				position: relative;
+				z-index: 2;
+				font-size: 38rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ff6f0f;
+				.fh {
+					font-size: 20px;
+				}
+				.time {
+					font-size: 20px;
+					color: #333333;
+				}
+			}
+			.main-item-info {
+				position: relative;
+				z-index: 2;
+				margin-top: 20rpx;
+				.main-item-info-left {
+					width: 100%;
+					font-size: 22rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+				.main-item-info-right {
+					flex-shrink: 0;
+					display: flex;
+					align-items: center;
+					line-height: 1;
+					.main-item-info-font {
+						font-size: 24rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #999999;
+						margin-right: 10rpx;
+					}
+					.main-item-info-icon {
+						position: relative;
+						top: -10rpx;
+						width: 19rpx;
+						height: 19rpx;
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 199 - 0
pages/index/cardDetail.vue

@@ -0,0 +1,199 @@
+<template>
+	<view class="container">
+		<view class="top"><image :src="info.details_image" mode=""></image></view>
+		<view class="main">
+			<view class="title">
+				<view class="title-left"></view>
+				<view class="title-font">卡片详情</view>
+				<view class="title-right"></view>
+			</view>
+			<view class="detail-desc"><rich-text :nodes="info.introduce"></rich-text></view>
+			<view class="btn" @click="buy()">立即购买(¥{{ info.price }})</view>
+			<view class="two">
+				<label @click="checkboxChange">
+					<radio style="transform:scale(0.7)" color="#5dbc7c" :checked="istype" />
+					已阅读并同意
+					<text>《优惠卡服务协议》</text>
+				</label>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { carddetails, wechat, routine } from '@/api/jdr.js';
+import { mapState, mapMutations } from 'vuex';
+export default {
+	data() {
+		return {
+			id: '',
+			info: '',
+			istype: false,
+			isbuy: false
+		};
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj']),
+		// #endif
+		...mapState('user', ['userInfo'])
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			carddetails({}, this.id).then(({ data }) => {
+				this.info = data;
+			});
+		},
+		navTo(opt) {
+			uni.navigateTo({
+				url: '/pages/index/cardDetail?id='
+			});
+		},
+		checkboxChange() {
+			this.istype = !this.istype;
+			console.log(this.istype);
+		},
+		buy() {
+			const obj = this;
+			if (!this.istype) {
+				return this.$api.msg('请阅读并同意优惠卡服务协议');
+			}
+			if (this.isbuy) {
+				return;
+			}
+			this.isbuy = true;
+			// #ifdef H5
+			wechat({ card_id: this.id }).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) {
+						obj.isbuy = false;
+						uni.showModal({
+							title: '提示',
+							content: '购买优惠卡成功是否前往卡券中心激活卡',
+							success: function(res) {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '/pages/user/coupon'
+									});
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+							}
+						});
+					}
+				});
+			});
+			// #endif
+			// #ifdef MP-WEIXIN
+			routine({ card_id: this.id }).then(e => {
+				let da = e.data;
+				let data = {
+					// #ifdef H5
+					timestamp: da.timestamp,
+					// #endif
+					// #ifdef MP
+					timeStamp: da.timestamp,
+					// #endif
+					nonceStr: da.nonceStr,
+					package: da.package,
+					signType: da.signType,
+					paySign: da.paySign,
+					success: function(res) {
+						obj.isbuy = false;
+						uni.showModal({
+							title: '提示',
+							content: '购买优惠卡成功是否前往卡券中心激活卡',
+							success: function(res) {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '/pages/user/coupon'
+									});
+								} else if (res.cancel) {
+									console.log('用户点击取消');
+								}
+							}
+						});
+					},
+					fail: () => {
+						obj.isbuy = false;
+					}
+				};
+				wx.requestPayment(data);
+			});
+			// #endif
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.container {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+}
+.top {
+	position: relative;
+	height: 346rpx;
+	width: 750rpx;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+.main {
+	position: relative;
+	z-index: 2;
+	width: 750rpx;
+	background: #ffffff;
+	border-radius: 20rpx 20rpx 5rpx 5rpx;
+	margin-top: -10rpx;
+	padding: 46rpx 44rpx;
+	.title {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.title-font {
+			font-size: 32rpx;
+			font-family: ZhenyanGB;
+			font-weight: 400;
+			color: #bd9360;
+		}
+	}
+}
+.btn {
+	width: 620rpx;
+	height: 80rpx;
+	background: linear-gradient(270deg, #ffe7c4, #ffce8a);
+	border-radius: 40rpx;
+	margin: 58rpx auto 0;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #9f570e;
+	line-height: 80rpx;
+	text-align: center;
+}
+.two {
+	margin: 26rpx 0 0;
+	font-size: 28rpx;
+	text-align: center;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #999999;
+	text {
+		color: #ff383e;
+	}
+}
+</style>

+ 64 - 79
pages/index/index.vue

@@ -21,17 +21,9 @@
 			</view>
 		</view>
 		<view class="main flex">
-			<view class="main-item">
-				<view class="main-image"><image src="../../static/icon/index4.png" mode=""></image></view>
-				<view class="main-font">半天陪诊</view>
-			</view>
-			<view class="main-item">
-				<view class="main-image"><image src="../../static/icon/index5.png" mode=""></image></view>
-				<view class="main-font">全天陪诊</view>
-			</view>
-			<view class="main-item">
-				<view class="main-image"><image src="../../static/icon/index6.png" mode=""></image></view>
-				<view class="main-font">夜间陪诊</view>
+			<view class="main-item" v-for="(item, index) in pzlist" @click="navTo('/pages/index/yypz?type=' + item.id)">
+				<view class="main-image"><image :src="item.image" mode=""></image></view>
+				<view class="main-font">{{ item.name }}</view>
 			</view>
 		</view>
 		<view class="title">
@@ -39,86 +31,61 @@
 			<view class="title-font">代办服务</view>
 		</view>
 		<view class="dbfw flex">
-			<view class="dbfw-item">
-				<view class="dbfw-left"><image src="../../static/icon/index7.png" mode=""></image></view>
+			<view class="dbfw-item" v-for="(item, index) in dblist" @click="navTo('/pages/index/yydb?type=' + item.id)">
+				<view class="dbfw-left"><image :src="item.image" mode=""></image></view>
 				<view class="dbfw-right">
-					<view class="dbfw-title">病案代办</view>
-					<view class="dbfw-tip">为您的健康保驾护航</view>
-				</view>
-			</view>
-			<view class="dbfw-item">
-				<view class="dbfw-left"><image src="../../static/icon/index8.png" mode=""></image></view>
-				<view class="dbfw-right">
-					<view class="dbfw-title">出入院代办</view>
-					<view class="dbfw-tip">星级服务平价收费</view>
-				</view>
-			</view>
-			<view class="dbfw-item">
-				<view class="dbfw-left"><image src="../../static/icon/index9.png" mode=""></image></view>
-				<view class="dbfw-right">
-					<view class="dbfw-title">代办送取报告</view>
-					<view class="dbfw-tip">服务至上严谨求精</view>
-				</view>
-			</view>
-			<view class="dbfw-item">
-				<view class="dbfw-left"><image src="../../static/icon/index10.png" mode=""></image></view>
-				<view class="dbfw-right">
-					<view class="dbfw-title">代办生育险津贴</view>
-					<view class="dbfw-tip">用心做最好</view>
+					<view class="dbfw-title">{{ item.name }}</view>
+					<view class="dbfw-tip">{{ item.info }}</view>
 				</view>
 			</view>
 		</view>
-		<view class="card"><image src="../../static/img/index11.png" mode=""></image></view>
+		<view class="card" @click="navTo('/pages/index/card')"><image src="../../static/img/index11.png" mode=""></image></view>
 		<view class="title">
 			<view class="xian"></view>
 			<view class="title-font">新闻资讯</view>
 		</view>
-		<scroll-view scroll-y="true" class="listBox" :style="{ height: height }">
-			<view v-for="(item, index) in dataList" :key="index" class="list" @click="navto(item)">
-				<!-- <view class="img"><image :src="item.image_input[0]" mode=""></image></view>
-				<view class="right">
-					<view class="r-title">{{ item.title }}</view>
-					<view class="time">{{ item.add_time }}</view>
-				</view> -->
-				<view class="img"><image src="../../static/img/img05.png" mode=""></image></view>
-				<view class="right"><view class="r-title clamp2">1111111111111111111111111111111111111111111111111111111</view></view>
+		<view v-for="(item, index) in dataList" :key="index" class="list" @click="navto(item)">
+			<view class="img"><image :src="item.image_input[0]" mode=""></image></view>
+			<view class="right">
+				<view class="r-title clamp2">{{ item.title }}</view>
+				<view class="time">{{ item.add_time }}</view>
 			</view>
-		</scroll-view>
+		</view>
 	</view>
 </template>
 
 <script>
 import seckill from '../../components/seckill/seckill.vue';
-import { loadIndexs } from '@/api/index.js';
+import { loadIndexs, cate, articleList } from '@/api/index.js';
 import { getUserInfo } from '@/api/user.js';
-import { setCoupons } from '@/api/functionalUnit.js';
-import { interceptor } from '@/utils/loginUtils';
 import { mapState } from 'vuex';
-
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 export default {
 	data() {
 		return {
 			carouselList: [''], //轮播图列表
 			height: '',
 			swiperCurrent: 0, //当前几张图
-			swiperLength: 2, //轮播图总数
-			dataList: [] //文章列表
+			swiperLength: 1, //轮播图总数
+			dataList: [], //文章列表
+			dblist: [], //代办列表
+			pzlist: [] //陪诊列表
 		};
 	},
-	onReady(res) {
-		var _this = this;
-		uni.getSystemInfo({
-			success: resu => {
-				const query = uni.createSelectorQuery();
-				query.select('.listBox').boundingClientRect();
-				query.exec(function(res) {
-					_this.height = resu.windowHeight - res[0].top + 'px';
-					console.log('打印页面的剩余高度', _this.height);
-				});
-			},
-			fail: res => {}
-		});
-	},
+	// onReady(res) {
+	// 	var _this = this;
+	// 	uni.getSystemInfo({
+	// 		success: resu => {
+	// 			const query = uni.createSelectorQuery();
+	// 			query.select('.listBox').boundingClientRect();
+	// 			query.exec(function(res) {
+	// 				_this.height = resu.windowHeight - res[0].top + 'px';
+	// 				console.log('打印页面的剩余高度', _this.height);
+	// 			});
+	// 		},
+	// 		fail: res => {}
+	// 	});
+	// },
 	computed: {
 		...mapState(['loginInterceptor']),
 		...mapState('user', ['hasLogin', 'userInfo'])
@@ -145,6 +112,8 @@ export default {
 		if (this.loginInterceptor && !this.hasLogin) {
 			// 登录拦截
 			interceptor();
+		} else {
+			this.loadData();
 		}
 	},
 	//下拉刷新
@@ -156,25 +125,41 @@ export default {
 		async loadData() {
 			loadIndexs({})
 				.then(({ data }) => {
-					let goods = data.info;
 					this.carouselList = data.banner;
-					this.swiperLength = this.carouselList.length;
-					this.menusList = data.menus;
-					this.goodsList = goods.firstList; //最新商品
-					this.bastList = goods.bastList; //精品推荐
-					this.bastBanner = data.benefit; //促销单品
-					this.$set(this, 'couponArray', data.couponList); //保存卡包券
-
-					uni.stopPullDownRefresh();
 				})
-				.catch(e => {
-					uni.stopPullDownRefresh();
-				});
+				.catch(e => {});
+			cate({ type: 1 }).then(({ data }) => {
+				this.pzlist = data;
+			});
+			cate({ type: 2 }).then(({ data }) => {
+				this.dblist = data;
+			});
+			articleList({ page: 1, limit: 10000 }, 1).then(({ data }) => {
+				this.dataList = data;
+				console.log(data, '123456');
+			});
 		},
 		//轮播图切换修改背景色
 		swiperChange(e) {
 			const index = e.detail.current;
 			this.swiperCurrent = index;
+		},
+		navTo(url) {
+			if (!this.hasLogin) {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			} else {
+				uni.navigateTo({
+					url
+				});
+			}
+		},
+		navto(item) {
+			uni.navigateTo({
+				url: '/pages/index/info?id=' + item.id
+			});
 		}
 	}
 };

+ 73 - 0
pages/index/info.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="container">
+		<view class="title">{{ list.title }}</view>
+		<view class="synopsis">{{ list.synopsis }}</view>
+		<view class="notice-item"><jyf-parser :html="description" ref="article"></jyf-parser></view>
+	</view>
+</template>
+
+<script>
+import { details } from '@/api/index.js';
+import jyfParser from '@/components/jyf-parser/jyf-parser.vue';
+export default {
+	components: {
+		jyfParser
+	},
+	data() {
+		return {
+			id: '',
+			list: '',
+			description: '',
+			type: 0
+		};
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			let obj = this;
+			details({}, obj.id).then(function(e) {
+				obj.list = e.data;
+				console.log(obj.list);
+				if (obj.list.content != null) {
+					obj.description = obj.list.content.replace(/<img/g, "<img style='max-width:100%;height:auto;'");
+				} //小程序商品详情图超出屏幕问题
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	min-height: 100%;
+	background: #ffffff;
+}
+.notice_name {
+	font-size: 35rpx !important;
+	color: #303133;
+	padding: 25rpx 25rpx 0rpx 25rpx;
+	margin-bottom: 25rpx;
+}
+.course-video {
+	width: 100%;
+	height: 500rpx;
+}
+.title {
+	margin-top: 66rpx;
+	padding-left: 30rpx;
+	font-size: 34rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.synopsis {
+	padding-left: 30rpx;
+	font-size: 26rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #999999;
+}
+</style>

+ 474 - 0
pages/index/yydb.vue

@@ -0,0 +1,474 @@
+<template>
+	<view class="content">
+		<view class="top" v-if="!show"><image class="top-bg" src="../../static/img/dbbg.png" mode=""></image></view>
+		<scroll-view scroll-y="true" class="scrollList" :style="{ height: height }">
+			<view class="main">
+				<view class="info-item flex">
+					<view class="info-left">预约日期</view>
+					<view class="info-right">
+						<picker mode="date" :start="startDate" :end="endDate" :value="date" @change="bindDateChange" class="box-right">
+							<view>{{ date }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">预约时间</view>
+					<view class="info-right">
+						<picker mode="time" :value="time" @change="bindTimeChange" class="box-right">
+							<view>{{ time }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">姓名</view>
+					<view class="info-right"><input class="list-input" type="text" v-model="name" placeholder="请填写姓名" /></view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">性别</view>
+					<view class="info-right">
+						<picker @change="bindPickerSex" :value="index" :range="array">
+							<view>{{ sex }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">联系电话</view>
+					<view class="info-right"><input class="list-input" type="number" v-model="phone" placeholder="请填写联系电话" /></view>
+				</view>
+				<view class="info-item flex" @tap="Toshow">
+					<view class="info-left">代办医院</view>
+					<view class="info-right">
+						{{ hospital || '请选择医院名称' }}
+						<!-- <input class="list-input" type="text" @focus="outFocus" v-model="hospital" placeholder="" placeholder-class="placeholder" /> -->
+					</view>
+				</view>
+				<zhilin-picker
+					v-model="show"
+					:title="title"
+					:data="list"
+					:initSelected="initSelected"
+					:showSearch="true"
+					@change="onChange"
+					@searchInput="onSearchInput"
+					@confirm="onConfirm1"
+					@shua="shua"
+				/>
+				<view class="info-type">
+					<view class="info-type-title">
+						代办类型
+						<text class="info-type-tip">(可多选)</text>
+					</view>
+					<view class="info-type-main">
+						<view class="info-type-main-item" :class="{ current: item.chose == 2 }" v-for="(item, index) in typelist" :key="index" @click="choose(item)">
+							{{ item.name }}
+							<text>¥{{ item.price }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">基础费用</view>
+					<view class="info-right">¥{{ jcprice }}</view>
+				</view>
+				<view class="info-item flex" v-if="cardList != ''">
+					<view class="info-left">优惠卡优惠</view>
+					<view class="info-right">{{ cardList }}</view>
+				</view>
+			</view>
+			<view class="info-bz">
+				<view class="info-type-title">
+					备注说明
+					<text class="info-type-tip">(选填)</text>
+				</view>
+				<textarea v-model="remarks" class="text-box" name="" id="" cols="30" rows="10"></textarea>
+			</view>
+		</scroll-view>
+
+		<view class="btn" @click="buy">立即下单(¥{{ price }})</view>
+	</view>
+</template>
+
+<script>
+import { cate, service, getHospitalList, basics, equity } from '@/api/index.js';
+import { Diagnosisconfirm } from '@/api/order.js';
+export default {
+	data() {
+		return {
+			jcprice: 0,
+			price: 0,
+			height: '0px',
+			id: '',
+			index: '',
+			date: '请选择预约日期',
+			time: '请选择预约时间',
+			name: '',
+			array: ['男', '女'],
+			sex: '请选择你的性别',
+			phone: '',
+			show: false,
+			initSelected: [],
+			title: '选择医院',
+			hospital: '', //医院
+			addr: '',
+			list: [], //医院列表
+			typelist: [],
+			remarks: '',
+			province: '',
+			city: '',
+			hospital_id: '',
+			searchVal: '',
+			page: 1,
+			cardList: [],
+			type: 1,
+			cardprice: 0
+		};
+	},
+	computed: {
+		startDate() {
+			return this.getDate('start');
+		},
+		endDate() {
+			return this.getDate('end');
+		}
+	},
+
+	onLoad(opt) {
+		if (opt.type) {
+			this.id = opt.type;
+		}
+		this.loadData();
+		this.ListDate();
+	},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.scrollList').boundingClientRect();
+				query.exec(function(res) {
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	onShow() {},
+	methods: {
+		// 选择预约时间
+		bindDateChange: function(e) {
+			this.date = e.target.value;
+		},
+		// 选择预约时间
+		bindTimeChange: function(e) {
+			this.time = e.target.value;
+		},
+		// 选择性别
+		bindPickerSex: function(e) {
+			console.log(this.array[e.target.value]);
+			this.sex = this.array[e.target.value];
+		},
+		onChange(val) {
+			let obj = this;
+			console.log(val, 'onChange');
+			let arr = val.split(',');
+			obj.hospital = arr[1];
+			let city = arr[2];
+			let district = arr[4];
+			let province = arr[6];
+			obj.province = province;
+			obj.city = city;
+			obj.hospital_id = arr[0];
+			obj.addr = province + city + district;
+			console.log(obj.addr);
+		},
+		onConfirm1(val) {},
+		onSearchInput(val) {
+			this.page = 1;
+			this.list = [];
+			console.log('val223', this.list);
+			this.searchVal = val;
+			this.ListDate();
+		},
+		Toshow() {
+			this.show = true;
+		},
+		shua() {
+			this.page += 1;
+			this.ListDate();
+		},
+		outFocus(e) {
+			console.log(event.target);
+			event.target.blur();
+		},
+		//加载医院列表
+		ListDate() {
+			let obj = this;
+			let data = '';
+			console.log(obj.searchVal);
+			if (!obj.searchVal) {
+				data = {
+					keyword: '',
+					// province_id: obj.province_id,
+					// city_id: obj.city_id,
+					// district_id: obj.district_id,
+					sort: 'id desc',
+					page: obj.page,
+					limit: 10
+				};
+			} else {
+				data = {
+					keyword: obj.searchVal,
+					sort: 'id desc',
+					page: obj.page,
+					limit: 10
+				};
+			}
+			getHospitalList(data)
+				.then(e => {
+					obj.list = obj.list.concat(e.data.list);
+					console.log(obj.list);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		loadData() {
+			const obj = this;
+			equity({}).then(({ data }) => {
+				let clist = data.map(e => {
+					return e.name;
+				});
+				cate({ type: 2 }).then(({ data }) => {
+					this.pzTypelist = data;
+					data.forEach(e => {
+						console.log(clist, '123456');
+						if (clist.indexOf(e.name) != -1) {
+							e.price = 0;
+							obj.type = 2;
+							obj.cardList.push(e.name);
+						}
+						if (e.id == obj.id) {
+							e.chose = 2;
+							this.price += e.price * 1;
+						} else {
+							e.chose = 1;
+						}
+					});
+					obj.cardList = obj.cardList.join('/');
+					console.log(data, '123456');
+					obj.typelist = data;
+					basics({}).then(({ data }) => {
+						this.jcprice = data.price;
+						if (obj.type != 2) {
+							this.price += data.price * 1;
+						} else {
+							this.cardprice = data.price * 1;
+						}
+					});
+				});
+			});
+		},
+		getDate(type) {
+			const date = new Date();
+			let year = date.getFullYear();
+			let month = date.getMonth() + 1;
+			let day = date.getDate();
+
+			if (type === 'start') {
+				year = year - 60;
+			} else if (type === 'end') {
+				year = year + 2;
+			}
+			month = month > 9 ? month : '0' + month;
+			day = day > 9 ? day : '0' + day;
+			return `${year}-${month}-${day}`;
+		},
+		choose(opt) {
+			if (opt.chose == 1) {
+				opt.chose = 2;
+				this.price += opt.price * 1;
+			} else {
+				opt.chose = 1;
+				this.price -= opt.price * 1;
+			}
+			console.log(this.typelist);
+		},
+		buy() {
+			const obj = this;
+			let service_id = '';
+			obj.typelist.forEach(e => {
+				if (e.chose == 2) {
+					if (service_id != '') {
+						service_id = service_id + ',' + e.id;
+					} else {
+						service_id = e.id;
+					}
+				}
+			});
+			if (obj.date == '请选择预约日期') {
+				return this.$api.msg('请选择预约日期');
+			}
+			if (obj.time == '请选择预约时间') {
+				return this.$api.msg('请选择预约时间');
+			}
+			let time = obj.date + ' ' + obj.time + ':00';
+			if (obj.name == '') {
+				return this.$api.msg('请填写你的姓名');
+			}
+			if (obj.sex == '请选择你的性别') {
+				return this.$api.msg('请选择你的性别');
+			}
+			if (obj.phone == '') {
+				return this.$api.msg('请填写你的联系电话');
+			}
+			if (this.phone.length != 11) {
+				this.$api.msg('请输入正确的联系方式');
+				return;
+			}
+			if (obj.hospital == '') {
+				return this.$api.msg('请选择代办医院');
+			}
+			Diagnosisconfirm({
+				type: 2,
+				cate: service_id,
+				time: time,
+				name: obj.name,
+				sex: obj.sex == '男' ? 1 : 2,
+				phone: obj.phone,
+				province: obj.province,
+				city: obj.city,
+				hospital_id: obj.hospital_id,
+				hospital: obj.addr + ':' + obj.hospital,
+				remarks: obj.remarks
+			})
+				.then(e => {
+					console.log(e, '1111');
+					uni.navigateTo({
+						url: '/pages/money/pay?orderId=' + e.data.cache + '&money=' + e.data.pay_price
+					});
+				})
+				.catch(e => {});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content,
+page {
+	min-height: 100%;
+	height: auto;
+	background: #f8f8f8;
+}
+.top {
+	position: relative;
+	z-index: 0;
+	width: 750rpx;
+	height: 287rpx;
+	.top-bg {
+		width: 750rpx;
+		height: 287rpx;
+	}
+}
+.main {
+	background: #ffffff;
+}
+.info-item {
+	padding: 40rpx 0 38rpx;
+	margin: 0 24rpx;
+	border-bottom: 1px solid #ececec;
+	.info-left {
+		width: 300rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #222222;
+	}
+	.info-right {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+	}
+}
+.list-input {
+	text-align: right;
+	font-size: 28rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #999999;
+}
+.info-type-title {
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #222222;
+	.info-type-tip {
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+}
+.info-type {
+	padding: 38rpx 24rpx 50rpx;
+	.info-type-main {
+		display: flex;
+		flex-wrap: wrap;
+		.current {
+			background: #24a17d !important;
+			color: #ffffff !important;
+			text {
+				color: #ffffff !important;
+			}
+		}
+		.info-type-main-item {
+			margin: 30rpx 10rpx 0 0;
+			padding: 10rpx 20rpx;
+			background: #ffffff;
+			border: 2rpx solid #e7e7e7;
+			border-radius: 15rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			text {
+				color: #ff6f0f;
+			}
+		}
+	}
+}
+.info-bz {
+	margin: 15rpx 0 0;
+	padding: 40rpx 30rpx;
+	background: #ffffff;
+	.text-box {
+		margin: 10rpx 0 0;
+		width: 690rpx;
+		height: 100rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+}
+.btn {
+	position: fixed;
+	bottom: 40rpx;
+	left: 50%;
+	margin-left: -311rpx;
+	width: 622rpx;
+	height: 85rpx;
+	background: #24a17d;
+	border-radius: 15rpx;
+	text-align: center;
+	line-height: 85rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ffffff;
+}
+.scrollList {
+	padding-bottom: 150rpx;
+}
+</style>

+ 646 - 0
pages/index/yypz.vue

@@ -0,0 +1,646 @@
+<template>
+	<view class="content">
+		<view class="top" v-if="!show"><image class="top-bg" src="../../static/img/dbbg.png" mode=""></image></view>
+		<scroll-view scroll-y="true" class="scrollList" :style="{ height: height }">
+			<view class="main">
+				<view class="info-item flex">
+					<view class="info-left">陪诊类型</view>
+					<view class="info-right">
+						<picker @change="bindPickerType" :value="index" :range="pzTypelist" range-key="name">
+							<view>{{ pzType.name }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">基础费用</view>
+					<view class="info-right">¥{{ pzType.price }}</view>
+				</view>
+				<view class="info-item flex" v-if="cardprice > 0">
+					<view class="info-left">优惠卡优惠</view>
+					<view class="info-right">-¥{{ cardprice }}</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">预约日期</view>
+					<view class="info-right">
+						<picker mode="date" :start="startDate" :end="endDate" :value="date" @change="bindDateChange" class="box-right">
+							<view>{{ date }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">预约时间</view>
+					<view class="info-right">
+						<picker mode="time" :value="time" @change="bindTimeChange" class="box-right">
+							<view>{{ time }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">姓名</view>
+					<view class="info-right"><input class="list-input" type="text" v-model="name" placeholder="请填写姓名" /></view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">年龄</view>
+					<view class="info-right"><input class="list-input" type="number" v-model="age" placeholder="请填写年龄" /></view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">性别</view>
+					<view class="info-right">
+						<picker @change="bindPickerSex" :value="index" :range="array">
+							<view>{{ sex }}</view>
+						</picker>
+					</view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">联系电话</view>
+					<view class="info-right"><input class="list-input" type="number" v-model="phone" placeholder="请填写联系电话" /></view>
+				</view>
+				<view class="info-item flex" @tap="Toshow">
+					<view class="info-left">陪诊医院</view>
+					<view class="info-right">{{ hospital || '请选择医院名称' }}</view>
+				</view>
+				<zhilin-picker
+					v-model="show"
+					:title="title"
+					:data="list"
+					:initSelected="initSelected"
+					:showSearch="true"
+					@change="onChange"
+					@searchInput="onSearchInput"
+					@confirm="onConfirm1"
+					@shua="shua"
+				/>
+				<view class="info-item flex">
+					<view class="info-left">紧急联系人姓名</view>
+					<view class="info-right"><input class="list-input" type="text" v-model="jjname" placeholder="请填写紧急联系人姓名" /></view>
+				</view>
+				<view class="info-item flex">
+					<view class="info-left">紧急联系人电话</view>
+					<view class="info-right"><input class="list-input" type="number" v-model="jjphone" placeholder="请填写紧急联系人电话" /></view>
+				</view>
+				<view class="info-type">
+					<view class="info-type-title">
+						服务项目
+						<text class="info-type-tip">(可多选)</text>
+					</view>
+					<view class="info-type-main">
+						<view class="info-type-main-item" :class="{ current: item.chose == 2 }" v-for="(item, index) in typelist" :key="index" @click="choose(item)">
+							{{ item.name }}
+							<text>¥{{ item.price }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="info-item flex" v-if="type == 2">
+					<text class="info-left">上门接送地址</text>
+					<view class="info-right">
+						<pickerAddress class="input" @change="onCityClick">{{ addressDetail || '请选择地址' }}</pickerAddress>
+					</view>
+				</view>
+				<view class="info-item flex" v-if="type == 2">
+					<view class="info-left">详细地址</view>
+					<view class="info-right"><input class="list-input" type="text" v-model="addressD" placeholder="请填写详细地址" /></view>
+				</view>
+			</view>
+
+			<view class="info-bz">
+				<view class="info-type-title">
+					备注说明
+					<text class="info-type-tip">(选填)</text>
+				</view>
+				<textarea v-model="remarks" class="text-box" name="" id="" cols="30" rows="10"></textarea>
+			</view>
+		</scroll-view>
+		<view class="btn" @click="buy()">立即下单(¥{{ price }})</view>
+		<uni-popup ref="popup" type="center">
+			<view class="popup-box">
+				<view class="img"><image src="../../static/img/popup.png" mode=""></image></view>
+				<view class="mian">
+					<view class="title">暂不提供跨区域接送服务</view>
+					<view class="nocancel">您所在的地区与医院所在地区不符合请重新填写</view>
+					<view class="comfirm-box" @click="cancel">知道了</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+import { cate, service, getHospitalList, equity } from '@/api/index.js';
+import { Diagnosisconfirm } from '@/api/order.js';
+import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+import zhilinPicker from '@/components/zhilin-picker/zhilin-picker.vue';
+import uniPopup from '@/components/uni-popup/uni-popup.vue';
+export default {
+	components: {
+		pickerAddress,
+		uniPopup
+	},
+	data() {
+		return {
+			type: 1,
+			price: 0,
+			height: '0px',
+			id: '',
+			cardprice: '',
+			index: '',
+			pzType: '', //陪诊类型
+			pzTypelist: [],
+			date: '请选择预约日期',
+			time: '请选择预约时间',
+			name: '',
+			age: '',
+			array: ['男', '女'],
+			sex: '请选择你的性别',
+			phone: '',
+			jjname: '',
+			jjphone: '',
+			show: false,
+			initSelected: [],
+			title: '选择医院',
+			hospital: '', //医院
+			list: [], //医院列表
+			typelist: [],
+			addressD: '',
+			addressDetail: '',
+			addr: '',
+			address: {
+				province: '',
+				city: '',
+				district: ''
+			},
+			remarks: '',
+			province: '',
+			city: '',
+			hospital_id: '',
+			searchVal: '',
+			page: 1,
+			cardList: []
+		};
+	},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.scrollList').boundingClientRect();
+				query.exec(function(res) {
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	computed: {
+		startDate() {
+			return this.getDate('start');
+		},
+		endDate() {
+			return this.getDate('end');
+		}
+	},
+	onLoad(opt) {
+		if (opt.type) {
+			this.id = opt.type;
+		}
+		this.loadData();
+		this.ListDate();
+	},
+	methods: {
+		Toshow() {
+			this.show = true;
+		},
+		//加载医院列表
+		ListDate() {
+			let obj = this;
+			let data = '';
+			console.log(obj.searchVal);
+			if (!obj.searchVal) {
+				data = {
+					keyword: '',
+					// province_id: obj.province_id,
+					// city_id: obj.city_id,
+					// district_id: obj.district_id,
+					sort: 'id desc',
+					page: obj.page,
+					limit: 10
+				};
+			} else {
+				data = {
+					keyword: obj.searchVal,
+					sort: 'id desc',
+					page: obj.page,
+					limit: 10
+				};
+			}
+			getHospitalList(data)
+				.then(e => {
+					obj.list = obj.list.concat(e.data.list);
+					console.log(obj.list);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 选择预约时间
+		bindDateChange: function(e) {
+			this.date = e.target.value;
+		},
+		// 选择预约时间
+		bindTimeChange: function(e) {
+			this.time = e.target.value;
+		},
+		// 选择性别
+		bindPickerSex: function(e) {
+			console.log(this.array[e.target.value]);
+			this.sex = this.array[e.target.value];
+		},
+		// 选择类型
+		bindPickerType: function(e) {
+			if (this.cardList.indexOf(this.pzType.name) == -1) {
+				this.price -= this.pzType.price * 1;
+			} else {
+				this.cardprice -= this.pzType.price * 1;
+			}
+			this.pzType = this.pzTypelist[e.target.value];
+			if (this.cardList.indexOf(this.pzType.name) == -1) {
+				this.price += this.pzType.price * 1;
+			} else {
+				this.cardprice += this.pzType.price * 1;
+			}
+		},
+		onChange(val) {
+			let obj = this;
+			console.log(val, 'onChange');
+			let arr = val.split(',');
+			obj.hospital = arr[1];
+			let city = arr[2];
+			let district = arr[4];
+			let province = arr[6];
+			obj.province = province;
+			obj.city = city;
+			obj.hospital_id = arr[0];
+			obj.addr = province + city + district;
+			console.log(obj.addr);
+		},
+		shua() {
+			this.page += 1;
+			this.ListDate();
+		},
+		onConfirm1(val) {},
+		onSearchInput(val) {
+			this.page = 1;
+			this.list = [];
+			console.log('val223', this.list);
+			this.searchVal = val;
+			this.ListDate();
+		},
+		loadData() {
+			const obj = this;
+			equity({}).then(({ data }) => {
+				obj.cardList = data.map(e => {
+					return e.name;
+				});
+				console.log(obj.cardList, '123456');
+				cate({ type: 1 }).then(({ data }) => {
+					this.pzTypelist = data;
+					data.forEach(e => {
+						if (e.id == obj.id) {
+							console.log(obj.cardList.indexOf(e.id));
+							if (obj.cardList.indexOf(e.name) == -1) {
+								obj.price += e.price * 1;
+							} else {
+								obj.cardprice = e.price * 1;
+							}
+							obj.pzType = e;
+						}
+					});
+				});
+				service({}).then(({ data }) => {
+					data.forEach(e => {
+						e.chose = 1;
+					});
+					obj.typelist = data;
+				});
+			});
+		},
+		outFocus(e) {
+			console.log(event.target);
+			event.target.blur();
+		},
+		getDate(type) {
+			const date = new Date();
+			let year = date.getFullYear();
+			let month = date.getMonth() + 1;
+			let day = date.getDate();
+
+			if (type === 'start') {
+				year = year - 60;
+			} else if (type === 'end') {
+				year = year + 2;
+			}
+			month = month > 9 ? month : '0' + month;
+			day = day > 9 ? day : '0' + day;
+			return `${year}-${month}-${day}`;
+		},
+		choose(opt) {
+			if (opt.chose == 1) {
+				if (opt.name == '上门接送') {
+					this.type = 2;
+				}
+				opt.chose = 2;
+				this.price += opt.price * 1;
+			} else {
+				if (opt.name == '上门接送') {
+					this.type = 1;
+				}
+				opt.chose = 1;
+				this.price -= opt.price * 1;
+			}
+			console.log(this.typelist);
+		},
+		openPopup() {
+			this.$refs.popup.open();
+		},
+		cancel() {
+			this.$refs.popup.close();
+		},
+		// 选中城市切换
+		onCityClick({ data }) {
+			let address = this.address;
+			address.province = data[0];
+			address.city = data[1];
+			address.district = data[2];
+			this.addressDetail = data.join('');
+		},
+		buy() {
+			const obj = this;
+			let cate = '';
+			console.log(typeof cate);
+			cate = obj.pzType.id + '';
+			let service_id = '';
+			obj.typelist.forEach(e => {
+				if (e.chose == 2) {
+					if (service_id != '') {
+						service_id = service_id + ',' + e.id;
+					} else {
+						service_id = e.id;
+					}
+				}
+			});
+			if (obj.date == '请选择预约日期') {
+				return this.$api.msg('请选择预约日期');
+			}
+			if (obj.time == '请选择预约时间') {
+				return this.$api.msg('请选择预约时间');
+			}
+			let time = obj.date + ' ' + obj.time + ':00';
+			if (obj.name == '') {
+				return this.$api.msg('请填写你的姓名');
+			}
+			if (obj.sex == '请选择你的性别') {
+				return this.$api.msg('请选择你的性别');
+			}
+			if (obj.age == '') {
+				return this.$api.msg('请填写你的年龄');
+			}
+			if (obj.phone == '') {
+				return this.$api.msg('请填写你的联系电话');
+			}
+			if (this.phone.length != 11) {
+				this.$api.msg('请输入正确的联系方式');
+				return;
+			}
+			if (obj.hospital == '') {
+				return this.$api.msg('请选择医院');
+			}
+			if (obj.jjname == '') {
+				return this.$api.msg('请填写紧急联系人姓名');
+			}
+			if (obj.jjphone == '') {
+				return this.$api.msg('请填写紧急联系人电话');
+			}
+			if (obj.jjphone.length != 11) {
+				this.$api.msg('请输入正确的紧急联系人电话');
+				return;
+			}
+			// if (obj.addressDetail == '') {
+			// 	return this.$api.msg('请选择上门接送地址');
+			// }
+			// if (obj.addressD == '') {
+			// 	return this.$api.msg('请填写详细地址');
+			// }
+			console.log(cate, service_id, '1111');
+			console.log(typeof cate, typeof service_id, '2222');
+			Diagnosisconfirm({
+				type: 1,
+				cate: cate,
+				service_id: service_id,
+				time: time,
+				name: obj.name,
+				sex: obj.sex == '男' ? 1 : 2,
+				age: obj.age,
+				phone: obj.phone,
+				province: obj.province,
+				city: obj.city,
+				hospital_id: obj.hospital_id,
+				hospital: obj.addr + ':' + obj.hospital,
+				urgent_name: obj.jjname,
+				urgent_phone: obj.jjphone,
+				transfer_address: obj.addressDetail + obj.addressD,
+				remarks: obj.remarks
+			})
+				.then(e => {
+					console.log(e, '1111');
+					uni.navigateTo({
+						url: '/pages/money/pay?orderId=' + e.data.cache + '&money=' + e.data.pay_price
+					});
+				})
+				.catch(e => {
+					this.openPopup();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.content,
+page {
+	min-height: 100%;
+	height: auto;
+	background: #f8f8f8;
+}
+.top {
+	position: relative;
+	z-index: 0;
+	width: 750rpx;
+	height: 287rpx;
+	.top-bg {
+		width: 750rpx;
+		height: 287rpx;
+	}
+}
+.main {
+	height: auto;
+	background: #ffffff;
+}
+.info-item {
+	padding: 40rpx 0 38rpx;
+	margin: 0 24rpx;
+	border-bottom: 1px solid #ececec;
+	.info-left {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #222222;
+	}
+	.info-right {
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #999999;
+	}
+}
+.list-input {
+	text-align: right;
+	font-size: 28rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #999999;
+}
+.info-type-title {
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #222222;
+	.info-type-tip {
+		font-size: 24rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+}
+.info-type {
+	border-bottom: 1px solid #ececec;
+	padding: 38rpx 24rpx 50rpx;
+	.info-type-main {
+		display: flex;
+		flex-wrap: wrap;
+		.current {
+			background: #24a17d !important;
+			color: #ffffff !important;
+			text {
+				color: #ffffff !important;
+			}
+		}
+		.info-type-main-item {
+			margin: 30rpx 10rpx 0 0;
+			padding: 10rpx 20rpx;
+			background: #ffffff;
+			border: 2rpx solid #e7e7e7;
+			border-radius: 15rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+			text {
+				color: #ff6f0f;
+			}
+		}
+	}
+}
+.info-bz {
+	margin: 15rpx 0 0;
+	padding: 40rpx 30rpx;
+	background: #ffffff;
+	.text-box {
+		margin: 10rpx 0 0;
+		width: 690rpx;
+		height: 100rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #666666;
+	}
+}
+.btn {
+	position: fixed;
+	bottom: 40rpx;
+	left: 50%;
+	margin-left: -311rpx;
+	width: 622rpx;
+	height: 85rpx;
+	background: #24a17d;
+	border-radius: 15rpx;
+	text-align: center;
+	line-height: 85rpx;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ffffff;
+}
+.popup-box {
+	width: 527rpx;
+	height: 602rpx;
+	background: #ffffff;
+	border-radius: 28rpx;
+	position: relative;
+	.img {
+		position: relative;
+		top: -56rpx;
+		left: 0;
+		width: 527rpx;
+		height: 280rpx;
+		display: flex;
+		justify-content: center;
+		image {
+			border-radius: 20rpx 20rpx 0 0;
+			width: 477rpx;
+			height: 280rpx;
+		}
+	}
+
+	.mian {
+		margin-top: -44rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		// padding: 32rpx 32rpx;
+		background-color: #ffffff;
+		border-radius: 0 0 20rpx 20rpx;
+		padding: 0 42rpx;
+		text-align: center;
+		.title {
+			font-size: 33rpx;
+			font-family: PingFang SC;
+			font-weight: 800;
+			color: #333333;
+		}
+
+		.nocancel {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #7b95a9;
+		}
+
+		.comfirm-box {
+			margin: 52rpx auto;
+			width: 403rpx;
+			height: 83rpx;
+			background: #24a17d;
+			border-radius: 42rpx;
+			text-align: center;
+			line-height: 83rpx;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+	}
+}
+.scrollList {
+	padding-bottom: 150rpx;
+}
+</style>

+ 389 - 0
pages/jdr/center.vue

@@ -0,0 +1,389 @@
+<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>
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 订单列表 -->
+			<view class="order-item" v-for="(item, index) in maiList[currentIndex].orderList">
+				<view class="order-top flex">
+					<view class="order-top-left">
+						<image class="order-top-left-image" src="../../static/img/order5.png" mode=""></image>
+						<view class="order-top-left-font">订单信息</view>
+					</view>
+					<view class="order-top-right">待接单</view>
+				</view>
+				<view class="order-info flex">
+					<view class="order-info-left">预约时间:</view>
+					<view class="order-info-right">{{ item.time }}</view>
+				</view>
+				<view class="order-info flex">
+					<view class="order-info-left">姓名:</view>
+					<view class="order-info-right">{{ item.name }}</view>
+				</view>
+				<view class="order-info flex">
+					<view class="order-info-left">性别:</view>
+					<view class="order-info-right">{{ item.sex == 1 ? '男' : '女' }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 0">
+					<view class="order-info-left">代办医院:</view>
+					<view class="order-info-right">{{ item.hospital }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 0">
+					<view class="order-info-left">代办类型:</view>
+					<view class="order-info-right">{{ item.catename }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 1">
+					<view class="order-info-left">医院:</view>
+					<view class="order-info-right">{{ item.hospital }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 1">
+					<view class="order-info-left">陪诊类型:</view>
+					<view class="order-info-right">{{ item.catename }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 1">
+					<view class="order-info-left">陪诊服务:</view>
+					<view class="order-info-right">{{ item.servicename }}</view>
+				</view>
+				<view class="order-info flex" v-if="currentIndex == 1 && item.issm == 2">
+					<view class="order-info-left">接送地址:</view>
+					<view class="order-info-right">{{ item.transfer_address }}</view>
+				</view>
+				<view class="order-info flex">
+					<view class="order-info-left">备注:</view>
+					<view class="order-info-right">{{ item.remarks || '无' }}</view>
+				</view>
+				<view class="order-info flex">
+					<view class="order-info-left">佣金:</view>
+					<view class="order-info-price">{{ item.commission }}</view>
+				</view>
+				<view class="order-btn">
+					<image class="order-btn-icon" src="../../static/img/order5.png" mode=""></image>
+					<view class="order-btn-font" @click="takeOrder(item)">立即接单</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import empty from '@/components/empty';
+import { order_receiving_hall, order_receiving } from '@/api/jdr.js';
+import { getTime } from '@/utils/rocessor.js';
+export default {
+	components: {
+		uniLoadMore,
+		empty
+	},
+	data() {
+		return {
+			currentIndex: 0, //当前选中的第一级0为我要买单,1我要卖单
+			maiList: [
+				{
+					state: 2,
+					title: '代办订单',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					title: '陪诊订单',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		this.loadData();
+	},
+	methods: {
+		navGo(index) {
+			this.currentIndex = index;
+			this.loadData('shua');
+		},
+		toBack() {
+			uni.switchTab({
+				url: '/pages/user/user'
+			});
+		},
+		loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.currentIndex;
+			let navItem = this.maiList[index];
+			let state = navItem.state;
+			if (source === 'shua') {
+				navItem.loaded = false;
+				navItem.page = 1;
+				navItem.limit = 10;
+				navItem.loadingType = 'more';
+				navItem.orderList = [];
+			}
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			if (navItem.loadingType === 'noMore') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			order_receiving_hall({
+				type: state,
+				page: navItem.page,
+				limit: navItem.limit
+			})
+				.then(({ data }) => {
+					data.forEach(e => {
+						if (e.remarks == undefined || e.remarks == 'undefined') {
+							e.remarks = '无';
+						}
+						let key = Object.keys(e.cate);
+						let name = '';
+						key.forEach(e => {
+							if (name == '') {
+								name = name + e;
+							} else {
+								name = name + '/' + e;
+							}
+						});
+						e.catename = name;
+						let key1 = Object.keys(e.service);
+						let name1 = '';
+						e.issm = 1;
+						key1.forEach(es => {
+							console.log(e);
+							if (es == '上门接送') {
+								e.issm = 2;
+							}
+							if (name1 == '') {
+								name1 = name1 + es;
+							} else {
+								name1 = name1 + '/' + es;
+							}
+						});
+						e.servicename = name1;
+						e.time = getTime(e.time);
+					});
+					navItem.orderList = navItem.orderList.concat(data);
+					// 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);
+				});
+		},
+		takeOrder(opt) {
+			const obj = this;
+			uni.showModal({
+				title: '提示',
+				content: '是否接取该订单,订单佣金:' + opt.commission + '前往医院:' + opt.hospital,
+				success: function(res) {
+					if (res.confirm) {
+						order_receiving({}, opt.id).then(e => {
+							uni.showToast({
+								title: '接单成功',
+								duration: 2000
+							});
+							obj.loadData('shua');
+						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+.order-title {
+	width: 750rpx;
+	height: 270rpx;
+	background: url(../../static/img/jrzxbg.png) repeat-x 0;
+	display: flex;
+	flex-direction: column;
+	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: #24a17d;
+		}
+
+		.current {
+			color: #24a17d;
+			background: #ffffff;
+		}
+	}
+}
+.list-scroll-content {
+	height: calc(100% - 150px);
+}
+.order-item {
+	width: 702rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: 20rpx auto 0;
+	padding: 24rpx;
+	.order-top-left {
+		display: flex;
+		align-items: center;
+		.order-top-left-image {
+			width: 32rpx;
+			height: 37rpx;
+		}
+		.order-top-left-font {
+			margin-left: 10rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+	}
+	.order-top-right {
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ff6f0f;
+	}
+	.order-info {
+		margin-top: 24rpx;
+		align-items: flex-start;
+		.order-info-left {
+			width: 200rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+		.order-info-right {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+		.order-info-price {
+			font-size: 38rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff6f0f;
+		}
+	}
+	.order-btn {
+		margin: 34rpx auto;
+		align-items: center;
+		display: flex;
+		justify-content: center;
+		width: 566rpx;
+		height: 74rpx;
+		background: #24a17d;
+		border-radius: 15rpx;
+		.order-btn-icon {
+			width: 35rpx;
+			height: 36rpx;
+		}
+		.order-btn-font {
+			margin-left: 7rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+	}
+}
+</style>

+ 221 - 0
pages/jdr/evaluate.vue

@@ -0,0 +1,221 @@
+<template>
+	<view class="content">
+		<view class="equity_box">
+			<view class="text-box uni-textarea"><textarea placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea></view>
+			<view class="">
+				<view class="add-img-box flex_item">
+					<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
+						<image class="add-img" @click.stop="imgInfo(index)" :src="item" mode="aspectFill"></image>
+						<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
+					</view>
+					<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()"><image class="add-img" src="/static/img/add.png"></image></view>
+				</view>
+			</view>
+		</view>
+		<view @click.stop="submit" class="submit-btn">提交</view>
+	</view>
+</template>
+
+<script>
+import { upload } from '@/api/order.js';
+import { submit } from '@/api/jdr.js';
+import uniRate from '@/components/uni-rate/uni-rate.vue';
+export default {
+	components: {
+		uniRate
+	},
+	data() {
+		return {
+			placeholder: '请上传照片完成确认',
+			imgList: [],
+			unique: '', //商品唯一标识码
+			imgCount: 3 //最多支持9张上传,可以修改
+		};
+	},
+	onLoad(option) {
+		this.unique = option.unique;
+	},
+	onShow() {},
+	methods: {
+		//单张上传图片
+		scImg() {
+			let obj = this;
+			console.log(obj.imgCount, 11);
+			if (obj.imgCount == 0) {
+				uni.showToast({
+					title: '最多添加3张图片',
+					icon: 'none'
+				});
+				return;
+			}
+			upload({
+				file: ''
+			})
+				.then(e => {
+					obj.imgList.push(e[0].url);
+					obj.imgCount = 3 - obj.imgList.length;
+				})
+				.catch(e => {});
+		},
+		//提交评论
+		submit(e) {
+			let obj = this;
+			if (obj.imgList.length < 1) {
+				uni.showToast({
+					title: '请添加图片',
+					icon: 'none'
+				});
+				return;
+			}
+			submit(
+				{
+					images: obj.imgList
+				},
+				obj.unique
+			)
+				.then(e => {
+					uni.showModal({
+						title: '提示',
+						content: '提交完成成功,是否前往个人中心页',
+						success: function(res) {
+							if (res.confirm) {
+								uni.switchTab({
+									url: '/pages/user/user'
+								});
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
+					});
+				})
+				.catch(e => {});
+		},
+		//点击图片显示大图
+		imgInfo(i) {
+			let tempList = [];
+			console.log(111);
+			this.imgList.forEach(e => {
+				tempList.push(e);
+			});
+			console.log(tempList);
+			//显示图片
+			uni.previewImage({
+				current: i,
+				loop: false,
+				urls: tempList,
+				indicator: 'default'
+			});
+		},
+		//删除图片
+		delImg(i) {
+			uni.showModal({
+				content: '确定删除这张吗',
+				success: res => {
+					if (res.confirm) {
+						this.imgList.splice(i, 1);
+						this.imgCount++;
+					} else if (res.cancel) {
+					}
+				}
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #f8f6f6;
+	height: 100%;
+	.content {
+		background: #f8f6f6;
+		height: 100%;
+	}
+}
+.equity_box {
+	border-radius: 10rpx;
+	padding: 25rpx 25rpx;
+	margin: 25rpx 0rpx;
+	background: #ffffff;
+	.text-box {
+		height: 200rpx;
+		textarea {
+			font-size: 25rpx;
+			width: 100%;
+			height: 100%;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 5;
+		}
+	}
+}
+.submit-btn {
+	margin: 102rpx auto 0;
+	width: 560rpx;
+	height: 85rpx;
+	background: #24a17d;
+	border-radius: 43px;
+	text-align: center;
+	font-size: 36rpx;
+	font-family: PingFangSC;
+	font-weight: 500;
+	color: #ffffff;
+	line-height: 85rpx;
+}
+.add-img-box {
+	width: 100%;
+	flex-direction: row;
+	flex-wrap: wrap;
+	margin-top: 50rpx;
+}
+.add-img-item {
+	width: 180rpx;
+	height: 180rpx;
+	border-radius: 24rpx;
+	position: relative;
+	margin: 0rpx 20rpx;
+	margin-bottom: 25rpx;
+	.add-img {
+		width: 100%;
+		height: 100%;
+	}
+}
+.add-img-camera {
+	flex: 1;
+}
+.add-img-del {
+	position: absolute;
+	width: 40rpx;
+	height: 40rpx;
+	left: 155rpx;
+	bottom: 155rpx;
+	//background-color: rgba(238, 0, 0, 1);
+	border-radius: 20rpx;
+}
+.address-time {
+	width: 484rpx;
+	height: 88rpx;
+	background-color: rgba(245, 245, 245, 1);
+	opacity: 1;
+	border-radius: 24rpx;
+	text-align: center;
+
+	font-size: 35rpx;
+	font-weight: 500;
+	color: rgba(51, 51, 51, 1);
+}
+.line {
+	width: 750rpx;
+	height: 1px;
+	transform: scaleY(0.3);
+	background-color: rgba(0, 0, 0, 0.5);
+}
+</style>

+ 520 - 0
pages/jdr/order.vue

@@ -0,0 +1,520 @@
+<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 class="order-item" v-for="(item, index) in tabItem.orderList">
+						<view class="order-top flex">
+							<view class="order-top-left">
+								<image class="order-top-left-image" src="../../static/img/order5.png" mode=""></image>
+								<view class="order-top-left-font">订单信息</view>
+							</view>
+							<view class="order-top-right">{{ tabItem.text }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">委托时间:</view>
+							<view class="order-info-right">{{ item.time }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">订单类型:</view>
+							<view class="order-info-right">{{ item.type == 2 ? '代办' : '陪诊' }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">医院:</view>
+							<view class="order-info-right">{{ item.hospital }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">客户:</view>
+							<view class="order-info-right">{{ item.name }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">客户电话:</view>
+							<view class="order-info-right">{{ item.phone }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.type == 2">
+							<view class="order-info-left">代办类型:</view>
+							<view class="order-info-right">{{ item.catename }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.type == 1">
+							<view class="order-info-left">陪诊类型:</view>
+							<view class="order-info-right">{{ item.catename }}</view>
+						</view>
+						<view class="order-info flex" v-if="tabCurrentIndex == 0 && item.type == 1">
+							<view class="order-info-left">陪诊服务:</view>
+							<view class="order-info-right">{{ item.servicename }}</view>
+						</view>
+						<view class="order-info flex" v-if="tabCurrentIndex == 0 && item.type == 1 && item.issm == 2">
+							<view class="order-info-left">接送地址:</view>
+							<view class="order-info-address">
+								<view class="order-info-address-main">{{ item.transfer_address }}</view>
+								<image class="order-info-address-icon" src="../../static/img/order7.png" mode=""></image>
+								<!-- <view class="order-info-dh">导航</view> -->
+							</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">下单时间:</view>
+							<view class="order-info-right">{{ item.receiving.create_time }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">备注:</view>
+							<view class="order-info-right">{{ item.remarks }}</view>
+						</view>
+						<view class="order-info flex" v-if="tabCurrentIndex != 0">
+							<view class="order-info-left">照片:</view>
+							<view class="order-info-picture">
+								<view class="order-info-picture-item" v-for="(itm, inx) in item.images"><image :src="itm" mode=""></image></view>
+							</view>
+						</view>
+						<view class="order-btn-box" v-if="tabCurrentIndex == 0">
+							<view class="order-btn" @click="abandonOrder(item)">
+								<image class="order-btn-icon" src="../../static/img/order3.png" mode=""></image>
+								<view class="order-btn-font">放弃订单</view>
+							</view>
+							<view class="order-btn btn1" @click="call(item)">
+								<image class="order-btn-icon1" src="../../static/img/order9.png" mode=""></image>
+								<view class="order-btn-font">立即联系</view>
+							</view>
+							<view class="order-btn btn2" @click="navTo('/pages/jdr/evaluate?unique=' + item.id)">
+								<image class="order-btn-icon2" src="../../static/img/order8.png" mode=""></image>
+								<view class="order-btn-font">提交完成</view>
+							</view>
+						</view>
+						<view class="ordering-btn flex" v-if="tabCurrentIndex == 1" @click="call(item)">
+							<image class="ordering-btn-icon" src="../../static/img/order4.png" mode=""></image>
+							<view class="ordering-btn-font">立即联系</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 { receiving_list, discard_orde } from '@/api/jdr.js';
+import { getTime } from '@/utils/rocessor.js';
+export default {
+	components: {
+		uniLoadMore,
+		empty
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					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 //每次信息条数
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		this.tabCurrentIndex = options.state;
+		/**
+		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+		 * 替换onLoad下代码即可
+		 */
+		// #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
+	filters: {
+		moneyNum(value) {
+			return +value;
+		}
+	},
+	methods: {
+		//联系客户
+		call(item) {
+			console.log(item.phone);
+			uni.makePhoneCall({
+				phoneNumber: item.phone //仅为示例
+			});
+		},
+		// 转换金额为数字
+		moneyNum(value) {
+			return +value;
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		//获取订单列表
+		loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'shua') {
+				navItem.loaded = false;
+				navItem.page = 1;
+				navItem.limit = 10;
+				navItem.loadingType = 'more';
+				navItem.orderList = [];
+			}
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			if (navItem.loadingType === 'noMore') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			receiving_list({
+				status: state,
+				page: navItem.page,
+				limit: navItem.limit
+			})
+				.then(({ data }) => {
+					data.forEach(e => {
+						if (e.remarks == undefined || e.remarks == 'undefined') {
+							e.remarks = '无';
+						}
+						let key = Object.keys(e.cate);
+						let name = '';
+						key.forEach(e => {
+							if (name == '') {
+								name = name + e;
+							} else {
+								name = name + '/' + e;
+							}
+						});
+						e.catename = name;
+						let key1 = Object.keys(e.service);
+						let name1 = '';
+						e.issm = 1;
+						key1.forEach(es => {
+							console.log(e);
+							if (es == '上门接送') {
+								e.issm = 2;
+							}
+							if (name1 == '') {
+								name1 = name1 + es;
+							} else {
+								name1 = name1 + '/' + es;
+							}
+						});
+						e.servicename = name1;
+						e.time = getTime(e.time);
+					});
+					navItem.orderList = navItem.orderList.concat(data);
+					// 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);
+				});
+		},
+		// 取消接单
+		abandonOrder(opt) {
+			const obj = this;
+			uni.showModal({
+				title: '提示',
+				content: '是否取消订单',
+				success: function(res) {
+					if (res.confirm) {
+						discard_orde({}, opt.id).then(e => {
+							uni.showToast({
+								title: '放弃订单成功',
+								icon: 'success',
+								duration: 2000
+							});
+							obj.loadData('shua');
+						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
+				}
+			});
+		},
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+};
+</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 {
+	width: 702rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: 20rpx auto 0;
+	padding: 24rpx;
+	.order-top-left {
+		display: flex;
+		align-items: center;
+		.order-top-left-image {
+			width: 32rpx;
+			height: 37rpx;
+		}
+		.order-top-left-font {
+			margin-left: 10rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+	}
+	.order-top-right {
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ff6f0f;
+	}
+	.order-info {
+		margin-top: 24rpx;
+		align-items: flex-start;
+		.order-info-left {
+			width: 200rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+		.order-info-right {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+		.order-info-picture {
+			display: flex;
+			justify-content: flex-end;
+			.order-info-picture-item {
+				width: 130rpx;
+				height: 130rpx;
+				margin-left: 10rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+		.order-info-address {
+			display: flex;
+			align-items: center;
+			.order-info-address-main {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+				margin-right: 10rpx;
+			}
+			.order-info-address-icon {
+				width: 24rpx;
+				height: 24rpx;
+			}
+			.order-info-dh {
+				margin-left: 4rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ff6f0f;
+			}
+		}
+	}
+	.order-btn-box {
+		display: flex;
+		justify-content: space-between;
+		.btn1 {
+			border: 1px solid #24a17d !important;
+			color: #24a17d !important;
+		}
+		.btn2 {
+			border: none !important;
+			background: #ff6f0f;
+			color: #fff !important;
+		}
+		.order-btn {
+			margin-top: 34rpx;
+			align-items: center;
+			display: flex;
+			justify-content: center;
+			width: 211rpx;
+			height: 74rpx;
+			border: 1px solid #cdcdcd;
+			border-radius: 10rpx;
+			color: #666666;
+			.order-btn-icon {
+				width: 38rpx;
+				height: 38rpx;
+			}
+			.order-btn-icon1 {
+				width: 32rpx;
+				height: 34rpx;
+			}
+			.order-btn-icon2 {
+				width: 36rpx;
+				height: 32rpx;
+			}
+			.order-btn-font {
+				margin-left: 7rpx;
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+			}
+		}
+	}
+	.ordering-btn {
+		display: flex;
+		justify-content: center;
+		margin: 38rpx auto 0;
+		width: 566rpx;
+		height: 74rpx;
+		background: #24a17d;
+		border-radius: 15rpx;
+		.ordering-btn-icon {
+			width: 32rpx;
+			height: 34rpx;
+		}
+		.ordering-btn-font {
+			margin-left: 14rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+	}
+}
+
+/* load-more */
+.uni-load-more {
+	display: flex;
+	flex-direction: row;
+	height: 80rpx;
+	align-items: center;
+	justify-content: center;
+}
+
+@-webkit-keyframes load {
+	0% {
+		opacity: 1;
+	}
+
+	100% {
+		opacity: 0.2;
+	}
+}
+</style>

+ 51 - 34
pages/money/account.vue

@@ -16,7 +16,15 @@
 				</view>
 				<view class="row b-b" v-if="tabIndex == 1">
 					<text class="tit">所属银行</text>
-					<input class="input" v-model="tabItem.orderList.bankName" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
+					<input class="input" v-model="tabItem.orderList.bankName" type="text" placeholder="请输入所属银行" placeholder-class="placeholder" />
+				</view>
+				<view class="row b-b" v-if="tabIndex == 1">
+					<text class="tit">所属支行</text>
+					<input class="input" v-model="tabItem.orderList.idName" type="text" placeholder="请输入所属支行" placeholder-class="placeholder" />
+				</view>
+				<view class="row b-b">
+					<text class="tit">手机号</text>
+					<input class="input" v-model="tabItem.orderList.phone" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
 				</view>
 			</swiper-item>
 		</swiper>
@@ -26,7 +34,7 @@
 </template>
 
 <script>
-import { aliInfo, bankInfo, setAliInfo, setBankInfo } from '@/api/wallet.js';
+import { aliInfo, setInfo } from '@/api/wallet.js';
 export default {
 	data() {
 		return {
@@ -39,7 +47,7 @@ export default {
 					orderList: {
 						name: '',
 						code: '',
-						id:''
+						phone: ''
 					}
 				},
 				{
@@ -50,7 +58,8 @@ export default {
 						name: '',
 						code: '',
 						bankName: '',
-						id:''
+						phone: '',
+						idName: ''
 					}
 				}
 			]
@@ -60,28 +69,33 @@ export default {
 	onLoad(options) {
 		this.tabCurrentIndex = +options.state || 0;
 		this.loadAli();
-		this.loadBank();
 	},
 
 	methods: {
 		//加载数据
 		loadAli(source) {
-			aliInfo({}).then(({data}) => {
+			aliInfo({}).then(({ data }) => {
 				let order = this.navList[0].orderList;
-				this.$set(order,'name',data.fullname)
-				this.$set(order,'code',data.alino)
-				this.$set(order,'id',data.id)
-			});
-		},
-		loadBank() {
-			bankInfo({}).then(({data}) => {
-				let order = this.navList[1].orderList;
-				this.$set(order,'name',data.fullname);
-				this.$set(order,'code',data.bankno);
-				this.$set(order,'bankName',data.bank);
-				this.$set(order,'id',data.id)
+				this.$set(order, 'name', data.zfb.name);
+				this.$set(order, 'code', data.zfb.payment);
+				this.$set(order, 'phone', data.zfb.phone);
+				let order1 = this.navList[1].orderList;
+				this.$set(order1, 'name', data.bank.name);
+				this.$set(order1, 'code', data.bank.payment);
+				this.$set(order1, 'bankName', data.bank.bank);
+				this.$set(order1, 'idName', data.bank.bank_name);
+				this.$set(order1, 'phone', data.bank.phone);
 			});
 		},
+		// loadBank() {
+		// 	bankInfo({}).then(({ data }) => {
+		// 		let order = this.navList[1].orderList;
+		// 		this.$set(order, 'name', data.fullname);
+		// 		this.$set(order, 'code', data.bankno);
+		// 		this.$set(order, 'bankName', data.bank);
+		// 		this.$set(order, 'id', data.id);
+		// 	});
+		// },
 		//swiper 切换
 		changeTab(e) {
 			this.tabCurrentIndex = e.target.current;
@@ -96,33 +110,36 @@ export default {
 			let arr = obj.navList[obj.tabCurrentIndex].orderList;
 			if (obj.tabCurrentIndex == 1) {
 				obj.setBankInfo({
-					fullname: arr.name,
+					type: 3,
+					name: arr.name,
 					bank: arr.bankName,
-					bankno: arr.code,
-					id:arr.id
+					payment: arr.code,
+					phone: arr.phone,
+					bank_name: arr.idName
 				});
 			}
 			if (obj.tabCurrentIndex == 0) {
 				obj.setAliInfo({
-					fullname: arr.name,
-					alino: arr.code,
-					id:arr.id
+					type: 2,
+					name: arr.name,
+					payment: arr.code,
+					phone: arr.phone
 				});
 			}
 		},
 		/* 保存银行卡详细 */
 		setBankInfo(obj) {
-			setBankInfo(obj)
+			setInfo(obj)
 				.then(e => {
 					uni.showToast({
 						title: '修改成功',
 						duration: 2000,
 						position: 'top'
 					});
-					this.$api.prePage().dataUp()
+					this.$api.prePage().dataUp();
 					setTimeout(() => {
-						uni.navigateBack()
-					},1500)
+						uni.navigateBack();
+					}, 1500);
 				})
 				.catch(e => {
 					console.log(e);
@@ -130,22 +147,22 @@ export default {
 		},
 		// 修改支付宝信息
 		setAliInfo(obj) {
-			setAliInfo(obj)
+			setInfo(obj)
 				.then(e => {
 					uni.showToast({
 						title: '修改成功',
 						duration: 2000,
 						position: 'top'
 					});
-					this.$api.prePage().dataUp()
+					this.$api.prePage().dataUp();
 					setTimeout(() => {
-						uni.navigateBack()
-					},1500)
+						uni.navigateBack();
+					}, 1500);
 				})
 				.catch(e => {
 					console.log(e);
 				});
-		},
+		}
 	}
 };
 </script>
@@ -160,7 +177,7 @@ export default {
 	background: #fff;
 	.tit {
 		flex-shrink: 0;
-		width: 120rpx;
+		width: 140rpx;
 		font-size: 30rpx;
 		color: $font-color-dark;
 	}

+ 13 - 14
pages/money/balance.vue

@@ -2,14 +2,15 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="content-money">
-				<view class="status_bar"><!-- 这里是状态栏 --></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="content-bg"><image src="../../static/img/userBg.png" mode=""></image></view>
 				<view class="money-box">
-					<view class="money">{{ userInfo.brokerage_price || 0 }}</view>
+					<view class="money">{{ userInfo.now_money || 0 }}</view>
 					<view>余额</view>
 				</view>
 				<view class="moneybtn-box">
@@ -69,7 +70,7 @@
 </template>
 
 <script>
-import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { moneyList, userBalance } from '@/api/wallet.js';
 import { mapState, mapMutations } from 'vuex';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
@@ -109,7 +110,7 @@ export default {
 			zc: '',
 			navList: [
 				{
-					state: 0,
+					state: 1,
 					text: '收入',
 					loadingType: 'more',
 					orderList: [],
@@ -117,7 +118,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 1,
+					state: 0,
 					text: '支出',
 					loadingType: 'more',
 					orderList: [],
@@ -154,7 +155,7 @@ export default {
 			//这里时将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
-			let state = navItem.state + 1;
+			let state = navItem.state;
 			if (source === 'tabChange' && navItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return;
@@ -166,13 +167,11 @@ export default {
 			//修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			spreadCommission(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
+			moneyList({
+				page: navItem.page,
+				limit: navItem.limit,
+				pm: state
+			})
 				.then(({ data }) => {
 					console.log(data, '123456');
 					obj.sr = data.sr;
@@ -344,7 +343,7 @@ page {
 				transform: translateX(-50%);
 				width: 44px;
 				height: 0;
-				border-bottom: 2px solid rgba(154, 94, 25, 1);
+				border-bottom: 2px solid #24a17d;
 			}
 		}
 	}

+ 56 - 143
pages/money/pay.vue

@@ -35,7 +35,7 @@
 
 <script>
 import { balance } from '@/api/wallet.js';
-import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
+import { createOrderkey, orderPay } from '@/api/order.js';
 import { mapState } from 'vuex';
 export default {
 	data() {
@@ -50,14 +50,12 @@ export default {
 			orderInfo: {},
 			money: 0.0, //订单金额
 			now_money: 0.0, //余额
-			orderKey: '',
 			orderId: '', //保存订单id
 			payLoding: false, //判断是否支付中
 			type: '', //判断是否从订单中进入
 			// #ifdef H5
-			froms: '', //保存h5中数据来源对象
+			froms: '' //保存h5中数据来源对象
 			// #endif
-			pinkid: '' //保存拼团商品id
 		};
 	},
 	computed: {
@@ -66,27 +64,8 @@ export default {
 		// #endif
 	},
 	onLoad(options) {
-		if (options.type == 1) {
-			this.type = 1;
-			this.orderId = options.ordid;
-			this.money = options.money;
-		} else {
-			this.orderKey = options.key;
-			let prepage = this.$api.prePage();
-			computedOrderkey({
-				orderkey: this.orderKey,
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //地址编号
-				useIntegral: prepage.checkedPoints ? 1 : 0
-			}).then(({ data }) => {
-				// 获取支付金额
-				this.money = data.result.pay_price;
-			});
-		}
-		// 保存pinkid
-		if (options.pinkid) {
-			this.pinkid = options.pinkid;
-		}
+		this.orderId = options.orderId;
+		this.money = options.money;
 		// 载入余额
 		balance({}).then(({ data }) => {
 			// 获取余额
@@ -107,74 +86,6 @@ export default {
 				this.payName = 'yue';
 			}
 		},
-		// 支付金额
-		orderMoneyPay() {
-			let obj = this;
-			orderPay({
-				uni: obj.orderId,
-				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
-				// #endif
-				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
-				// #endif
-				paytype: obj.payName //支付类型  weixin-微信 yue-余额
-			})
-				.then(e => {
-					// 判断是否为余额支付
-					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
-						if (e.status == 200) {
-							obj.paySuccessTo();
-						} else {
-							obj.$api.msg(msg);
-						}
-					}
-					if (obj.payName == 'weixin' || obj.payName == 'routine') {
-						let da = e.data.result.jsConfig;
-						let data = {
-							// #ifdef H5
-							timestamp: da.timestamp,
-							// #endif
-							// #ifdef MP
-							timeStamp: da.timestamp,
-							// #endif
-							nonceStr: da.nonceStr,
-							package: da.package,
-							signType: da.signType,
-							paySign: da.paySign,
-							success: function(res) {
-								obj.paySuccessTo();
-							},
-							fail: () => {
-								uni.navigateTo({
-									url: '/pages/order/order?state=0'
-								});
-							}
-						};
-						// #ifdef H5
-						if(obj.payName == 'weixin'){
-						obj.weichatObj.chooseWXPay(data);
-						}
-						// #endif
-						// #ifdef MP-WEIXIN
-						if(obj.payName == 'routine'){
-							wx.requestPayment(data);
-						}
-						// #endif
-					}
-					uni.hideLoading();
-					obj.payLoding = false;
-				})
-				.catch(e => {
-					// 支付完成
-					uni.hideLoading();
-					obj.payLoding = false;
-					console.log(e);
-				});
-		},
 		// 支付成功跳转
 		paySuccessTo() {
 			uni.hideLoading();
@@ -188,7 +99,7 @@ export default {
 			uni.showLoading({
 				title: '支付中',
 				mask: true
-			})
+			});
 			// 判断是否余额不足
 			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
 				uni.showModal({
@@ -208,70 +119,72 @@ export default {
 			obj.froms = uni.getStorageSync('weichatBrowser') || '';
 			// #endif
 			// 判断是否为未支付订单中跳转进入
-			if (obj.type != 1) {
-				// 初次生成订单
-				obj.firstCreateOrder();
-			} else {
-				// 已经生成订单未支付
-				obj.orderMoneyPay();
-			}
+			obj.firstCreateOrder();
 		},
-		// 初次订单创建
+		// 订单创建和支付
 		firstCreateOrder() {
 			let obj = this;
-			// 获取下单页面数据
-			let prepage = obj.$api.prePage();
-
 			let data = {
-				real_name: prepage.addressData.real_name, //联系人名称
-				phone: prepage.addressData.phone, //联系人号码
-				couponId: prepage.couponChecked.id, //优惠券编号
-				addressId: prepage.addressData.id, //支付地址id
-				useIntegral: prepage.checkedPoints ? 1 : 0, //是否积分抵扣1为是0为否
-				payType: obj.payName, //支付类型  weixin-微信 yue-余额
-				mark: prepage.desc, //备注
+				cache: obj.orderId,
 				// #ifdef H5
-				from: obj.froms ? 'weixin' : 'H5', //来源
+				pay_type: obj.payType == 3 ? 1 : 3, //来源
 				// #endif
 				// #ifdef MP-WEIXIN
-				from: 'routine', //来源
-				// #endif
-				// #ifdef APP-PLUS
-				from: 'app', //来源
+				pay_type: obj.payType == 3 ? 1 : 2 //来源
 				// #endif
-				shipping_type: 1 //提货方式 1 快递 2自提
 			};
-			// 判断是否拼团商品
-			if (obj.pinkid) {
-				data.pinkId = obj.pinkid;
-			}
 			// 生成订单
-			createOrderkey(data, obj.orderKey)
-				.then(({ data, status, msg }) => {
-					// 判断是否支付失败
-					if (data.status == 'ORDER_EXIST') {
-						uni.showModal({
-							title: '提示',
-							content: msg,
-							showCancel: false
-						});
-						uni.hideLoading();
-						obj.payLoding = false;
-						return;
-					}
-					// 保存订单号
-					obj.orderId = data.result.orderId;
-					// 判断是否为余额支付
-					if (obj.payName == 'yue') {
-						if (status == 200 && data.status == 'SUCCESS') {
+			createOrderkey(data)
+				.then(e => {
+					if (obj.payName == 'yue' && e.data.status == 'SUCCESS') {
+						if (e.status == 200) {
 							obj.paySuccessTo();
 						} else {
 							obj.$api.msg(msg);
 						}
-					} else {
-						// 立即支付
-						obj.orderMoneyPay();
 					}
+					if (obj.payName == 'weixin' || obj.payName == 'routine') {
+						if (!e.data.result.jsConfig && e.data.status == 'SUCCESS') {
+							if (e.status == 200) {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+						}
+						let da = e.data.result.jsConfig;
+						let data = {
+							// #ifdef H5
+							timestamp: da.timestamp,
+							// #endif
+							// #ifdef MP
+							timeStamp: da.timestamp,
+							// #endif
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								obj.paySuccessTo();
+							},
+							fail: () => {
+								uni.navigateTo({
+									url: '/pages/order/order?state=0'
+								});
+							}
+						};
+						// #ifdef H5
+						if (obj.payName == 'weixin') {
+							obj.weichatObj.chooseWXPay(data);
+						}
+						// #endif
+						// #ifdef MP-WEIXIN
+						if (obj.payName == 'weixin') {
+							wx.requestPayment(data);
+						}
+						// #endif
+					}
+					uni.hideLoading();
+					obj.payLoding = false;
 				})
 				.catch(e => {
 					uni.hideLoading();

+ 47 - 49
pages/money/paySuccess.vue

@@ -3,63 +3,61 @@
 		<text class="success-icon iconfont iconroundcheck"></text>
 		<text class="tit">支付成功</text>
 		<view class="btn-group">
-			<navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
+			<!-- <navigator :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator> -->
 			<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
 		</view>
 	</view>
 </template>
 
 <script>
-	export default {
-		data() {
-			return {
-				orderId:''
-			}
-		},
-		onLoad(opt) {
-			// 保存订单号
-			this.orderId = opt.orderid;
-		},
-		methods: {
-			
-		}
-	}
+export default {
+	data() {
+		return {
+			orderId: ''
+		};
+	},
+	onLoad(opt) {
+		// 保存订单号
+		this.orderId = opt.orderid;
+	},
+	methods: {}
+};
 </script>
 
-<style lang='scss'>
-	.content{
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-	.success-icon{
-		font-size: 160upx;
-		color: #5dbc7c;
-		margin-top: 100upx;
-	}
-	.tit{
-		font-size: 38upx;
+<style lang="scss">
+.content {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+}
+.success-icon {
+	font-size: 160upx;
+	color: #5dbc7c;
+	margin-top: 100upx;
+}
+.tit {
+	font-size: 38upx;
+	color: #303133;
+}
+.btn-group {
+	padding-top: 100upx;
+}
+.mix-btn {
+	margin-top: 30upx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 600upx;
+	height: 80upx;
+	font-size: $font-lg;
+	color: #fff;
+	background-color: $base-color;
+	border-radius: 10upx;
+	&.hollow {
+		background: #fff;
 		color: #303133;
+		border: 1px solid #ccc;
 	}
-	.btn-group{
-		padding-top: 100upx;
-	}
-	.mix-btn {
-		margin-top: 30upx;
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		width: 600upx;
-		height: 80upx;
-		font-size: $font-lg;
-		color: #fff;
-		background-color: $base-color;
-		border-radius: 10upx;
-		&.hollow{
-			background: #fff;
-			color: #303133;
-			border: 1px solid #ccc;
-		}
-	}
+}
 </style>

+ 33 - 11
pages/money/recharge.vue

@@ -49,7 +49,10 @@
 <script>
 import uniPopup from '@/components/uni-popup/uni-popup.vue';
 import { getMoneyStyle } from '@/utils/rocessor.js';
-import { rechargeWechat, getRechargeList } from '@/api/wallet.js';
+// #ifdef H5
+import { rechargeWechat } from '@/api/wallet.js';
+// #endif
+import { rechargeRoutine } from '@/api/wallet.js';
 import { mapState, mapMutations } from 'vuex';
 import { getUserInfo } from '@/api/login.js';
 export default {
@@ -84,7 +87,6 @@ export default {
 		// #ifdef H5
 		this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
 		// #endif
-		this.getRechargeList();
 	},
 	computed: {
 		// #ifdef H5
@@ -94,15 +96,6 @@ export default {
 	},
 	methods: {
 		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-		getRechargeList() {
-			getRechargeList().then(({ data }) => {
-				console.log(data, 'getRechargeList');
-				// data.recharge_quota.forEach(item => {
-				// 	this.moneyList.push(item.price * 1)
-				// })
-				this.moneyList = data.recharge_quota;
-			});
-		},
 		// 跳转
 		navTo(url) {
 			uni.navigateTo({
@@ -125,6 +118,7 @@ export default {
 				});
 				return;
 			}
+			// #ifdef H5
 			rechargeWechat({
 				price: this.money,
 				from: this.type,
@@ -185,6 +179,34 @@ export default {
 					obj.payLoding = false;
 					console.log(e);
 				});
+
+			// #endif
+			// #ifdef MP-WEIXIN
+			rechargeRoutine({
+				price: this.money
+			})
+				.then(e => {
+					console.log(e);
+					let da = e.data;
+					wx.requestPayment({
+						timeStamp: da.timestamp,
+						nonceStr: da.nonceStr,
+						package: da.package,
+						signType: da.signType,
+						paySign: da.paySign,
+						success: function(res) {
+							uni.redirectTo({
+								url: '/pages/money/paySuccess'
+							});
+						}
+					});
+
+					obj.payLoding = false;
+				})
+				.catch(e => {
+					obj.payLoding = false;
+				});
+			// #endif
 		},
 		go() {
 			this.$refs.popup.open();

+ 12 - 13
pages/money/wallet.vue

@@ -2,7 +2,8 @@
 	<view class="content">
 		<view class="content-money">
 			<view class="content-money">
-				<view class="status_bar"><!-- 这里是状态栏 --></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>
@@ -15,7 +16,7 @@
 				<view class="moneybtn-box">
 					<!-- <view class="money-btn" style="text-decoration: underline;" @click="navto('/pages/money/freeze')">冻结记录</view> -->
 					<view class="money-btn" style="text-decoration: underline;"></view>
-					<view class="money-btn" @click="navto('/pages/money/withdrawal')">
+					<view class="money-btn" @click="navto('/pages/money/withdrawal')" v-if="userInfo.brokerage_price > 0">
 						佣金提现
 						<image class="money-img" src="../../static/img/img45.png" mode=""></image>
 					</view>
@@ -69,7 +70,7 @@
 </template>
 
 <script>
-import { spreadCommission, userBalance } from '@/api/wallet.js';
+import { brokerageList, userBalance } from '@/api/wallet.js';
 import { mapState, mapMutations } from 'vuex';
 import { getMoneyStyle } from '@/utils/rocessor.js';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
@@ -109,7 +110,7 @@ export default {
 			zc: '',
 			navList: [
 				{
-					state: 0,
+					state: 1,
 					text: '收入',
 					loadingType: 'more',
 					orderList: [],
@@ -117,7 +118,7 @@ export default {
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 1,
+					state: 0,
 					text: '支出',
 					loadingType: 'more',
 					orderList: [],
@@ -154,7 +155,7 @@ export default {
 			//这里时将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
-			let state = navItem.state + 3;
+			let state = navItem.state;
 			if (source === 'tabChange' && navItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return;
@@ -166,13 +167,11 @@ export default {
 			//修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
-			spreadCommission(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
+			brokerageList({
+				page: navItem.page,
+				limit: navItem.limit,
+				pm: state
+			})
 				.then(({ data }) => {
 					console.log(data, '123456');
 					obj.sr = data.sr;

+ 28 - 72
pages/money/withdrawal.vue

@@ -32,32 +32,22 @@
 				</view> -->
 			</template>
 		</view>
-		<!-- #ifndef MP-WEIXIN -->
-		<view class="list">
+		<!-- <view class="list">
 			<view style="padding-top: 28rpx; font-size: 32rpx; font-weight: 600;color: #4d4d4d;">提现到</view>
 			<radio-group @change="tabRadio">
-				<!-- <label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color="#ff4c4c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label> -->
 				<label>
 					<view class="box">
 						<view class="icon iconfont iconzhifubao"></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-if="aliData.name">提现至支付宝</text>
 								<text v-else>请创建支付宝账号</text>
 							</view>
 							<view class="node">
-								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+								<text v-if="aliData.name">真实姓名({{ aliData.name }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="alipay" color="#ff4c4c" :checked="type == 'alipay'" /></view>
+						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
 					</view>
 				</label>
 				<label>
@@ -65,21 +55,20 @@
 						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
 						<view class="title-box">
 							<view class="title">
-								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-if="bankData.payment">{{ bankData.bank + ' ' + bankData.payment }}</text>
 								<text v-else>请创建银行账号</text>
 							</view>
 							<view class="node">
-								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+								<text v-if="bankData.name">真实姓名({{ bankData.name }})</text>
 							</view>
 						</view>
-						<view class="right"><radio value="bank" color="#ff4c4c" :checked="type == 'bank'" /></view>
+						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
 					</view>
 				</label>
 			</radio-group>
-		</view>
-		<!-- #endif -->
+		</view> -->
 		<button class="add-btn up" @click="confirm">提交申请</button>
-		<button class="btn" @click="navTo('/pages/money/account')">账号管理</button>
+		<!-- <button class="btn" @click="navTo('/pages/money/account')">账号管理</button> -->
 	</view>
 </template>
 
@@ -98,7 +87,7 @@ export default {
 	data() {
 		return {
 			// sxf: '0.00',
-			type: 'alipay', //提现方式
+			type: 'weixin', //提现方式
 			money: '0.00', //可提现金额
 			freeze: '0.0', //冻结金额
 			withdrawal: '', //提现金额
@@ -124,39 +113,18 @@ export default {
 		//加载提现信息
 		this.loadData();
 		// 加载提款账号信息
-		// this.loadAli();
-		// this.loadBank();
+		this.dataUp();
 	},
 	methods: {
 		// 更新数据
 		dataUp() {
-			this.loadAli();
-			this.loadBank();
-		},
-		//加载数据
-		async loadAli(source) {
-			aliInfo({}).then(e => {
-				this.aliData = e.data;
-			});
-		},
-		// 加载银行卡信息
-		async loadBank() {
-			bankInfo({}).then(e => {
-				this.bankData = e.data;
+			aliInfo().then(({ data }) => {
+				this.aliData = data.zfb;
+				this.bankData = data.bank;
 			});
 		},
 		// 加载余额信息
 		async loadData() {
-			// spreadInfo().then( ({data}) => {
-			// 	console.log(data,"spreadInfo++++++++++++++++++")
-			// 	this.money = data.brokerage_price//可提现余额
-			// 	this.minPrice = data.user_extract_min//最小提现
-			// 	this.freeze = data.lock_brokerage//冻结金额
-			// })
-			// getSpreadCount({}, 3).then(({ data }) => {
-			// 	console.log(data);
-			// 	this.money = data.count;
-			// });
 			extractBank({}).then(({ data }) => {
 				this.sxf = (data.charge * 1) / 100;
 				this.money = data.commissionCount; //可提现余额
@@ -178,43 +146,29 @@ export default {
 		// 提交
 		confirm() {
 			console.log(this.withdrawal, this.money);
-			if (+this.withdrawal == 0) {
-				return this.$api.msg('请输入提现金额');
-			}
-			if (+this.withdrawal < +this.minPrice) {
-				return this.$api.msg('提现金额不足最低提现金额');
-			}
-			if (+this.withdrawal > +this.money) {
-				return this.$api.msg('可提现佣金不足');
-			}
+			// if (+this.withdrawal == 0) {
+			// 	return this.$api.msg('请输入提现金额');
+			// }
+			// if (+this.withdrawal < +this.minPrice) {
+			// 	return this.$api.msg('提现金额不足最低提现金额');
+			// }
+			// if (+this.withdrawal > +this.money) {
+			// 	return this.$api.msg('可提现佣金不足');
+			// }
 			let data = {
-				extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
+				extract_type: 'weixin', //bank -银行卡 alipay-支付宝 weixin-微信
 				money: this.withdrawal, //金额
-				money_type: 1 //0佣金1余额
+				money_type: 1, //0佣金1余额
+				weixin: '123456'
 			};
 			if (this.type == 'alipay') {
 				data.name = this.aliData.fullname;
 				data.alipay_code = this.aliData.alino;
-				if (!data.name) {
-					return this.$api.msg('请完善账户名称');
-				}
-				if (!data.alipay_code) {
-					return this.$api.msg('请完善支付宝账号');
-				}
 			}
 			if (this.type == 'bank') {
 				data.name = this.bankData.fullname;
 				data.bankname = this.bankData.bank;
 				data.cardnum = this.bankData.bankno;
-				if (!data.name) {
-					return this.$api.msg('请完善银行卡信息');
-				}
-				if (!data.bankname) {
-					return this.$api.msg('请完善银行卡信息');
-				}
-				if (!data.cardnum) {
-					return this.$api.msg('请完善银行卡信息');
-				}
 			}
 
 			extractCash(data)
@@ -224,6 +178,8 @@ export default {
 						duration: 2000,
 						position: 'top'
 					});
+					this.loadData();
+					this.withdrawal = '';
 				})
 				.catch(e => {
 					console.log();

File diff suppressed because it is too large
+ 0 - 165
pages/order/createOrder.vue


+ 59 - 230
pages/order/evaluate.vue

@@ -1,51 +1,23 @@
 <template>
 	<view class="content">
-		<view class="order-item">
-			<view class="goods-box-single">
-				<image class="goods-img" :src="productInfo.image" mode="aspectFill"></image>
-				<view class="right position-relative">
-					<view class="flex">
-						<text class="title">{{ productInfo.store_name }}</text>
-						<view class="title-right">
-							<view class="price">{{ productInfo.price }}</view>
-							<view class="attr-box">x{{ list.cart_num }}</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view>
-				<view class="flex_item zhil">
-					<view>商品质量</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
-				</view>
-				<view class="flex_item zhil">
-					<view>服务态度</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
-				</view>
-				<view class="equity_box">
-					<view class="text-box uni-textarea">
-						<textarea placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea>
-					</view>
-					<view class="">
-						<view class="add-img-box flex_item">
-							<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
-								<image class="add-img" @click.stop="imgInfo(index)" :src="item.url" mode="aspectFill"></image>
-								<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
-							</view>
-							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()">
-								<image class="add-img" src="/static/img/add.png"></image>
-							</view>
-						</view>
+		<view class="equity_box">
+			<view class="text-box uni-textarea"><textarea placeholder-style="color:#999" :placeholder="placeholder" v-model="text"></textarea></view>
+			<view class="">
+				<view class="add-img-box flex_item">
+					<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
+						<image class="add-img" @click.stop="imgInfo(index)" :src="item" mode="aspectFill"></image>
+						<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
 					</view>
+					<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()"><image class="add-img" src="/static/img/add.png"></image></view>
 				</view>
 			</view>
 		</view>
-		<view @click.stop="submit" class="address-box submit-box"><text class="submit-btn">提交评论</text></view>
+		<view @click.stop="submit" class="submit-btn" v-if="type == 0">提交</view>
 	</view>
 </template>
 
 <script>
-import { product, upload, order_comment } from '@/api/order.js';
+import { after_sales, upload, orderDetail } from '@/api/order.js';
 import uniRate from '@/components/uni-rate/uni-rate.vue';
 export default {
 	components: {
@@ -53,45 +25,30 @@ export default {
 	},
 	data() {
 		return {
-			list: '', //订单详情
-			productInfo: '',
+			type: 1, //1查看0申请
 			text: '', //评论内容
-			placeholder: '商品满足你的期待么?说说你的想法,分享给想买的他们吧~',
+			placeholder: '请详细描述您的售后理由...',
 			imgList: [],
 			unique: '', //商品唯一标识码
-			cloudimgList: [],
-			rateValue1: '', //商品质量
-			rateValue2: '', //服务态度
-			imgCount: 6 //最多支持9张上传,可以修改
+			imgCount: 3 //最多支持9张上传,可以修改
 		};
 	},
 	onLoad(option) {
 		this.unique = option.unique;
-		this.loadOrder();
 	},
-	onShow() {},
+	onShow() {
+		this.loadData();
+	},
 	methods: {
-		//text
-		bindTextAreaBlur: function(e) {
-			this.text = e.detail.value;
-		},
-		//获取收入支出信息
-		async loadOrder() {
-			product({
-				unique: this.unique
-			}).then(e => {
-				this.list = e.data;
-				this.productInfo = e.data.productInfo;
+		loadData() {
+			orderDetail({}, this.unique).then(({ data }) => {
+				this.type = data.after_sales;
+				if (this.type == 1) {
+					this.placeholder = data.after_remarks;
+					this.imgList = data.after_images;
+				}
 			});
 		},
-		//商品质量评分
-		rateChange1(val) {
-			this.rateValue1 = val.value;
-		},
-		//服务态度评分
-		rateChange2(val) {
-			this.rateValue2 = val.value;
-		},
 		//单张上传图片
 		scImg() {
 			let obj = this;
@@ -107,11 +64,8 @@ export default {
 				file: ''
 			})
 				.then(e => {
-					console.log(e,'e')
-					obj.imgList = [...obj.imgList, ...e];
-					console.log(obj.imgList,'imgList')
-					obj.imgCount = 10 - obj.imgList.length;
-					console.log(obj.imgCount ,'imgCount ')
+					obj.imgList.push(e[0].url);
+					obj.imgCount = 3 - obj.imgList.length;
 				})
 				.catch(e => {});
 		},
@@ -125,35 +79,36 @@ export default {
 				});
 				return;
 			}
-			for (let i = 0; i < obj.imgList.length; i++) {
-				obj.cloudimgList.push(obj.imgList[i].url);
-			}
-			let arr = obj.cloudimgList.join(',');
-			order_comment({
-				pics: arr,
-				comment: obj.text,
-				product_score: obj.rateValue1,
-				service_score: obj.rateValue2,
-				unique: obj.unique,
-				
-			})
+			after_sales(
+				{
+					after_images: obj.imgList,
+					after_remarks: obj.text
+				},
+				obj.unique
+			)
 				.then(e => {
-					uni.navigateTo({
-						url: '/pages/order/order?state=4'
+					uni.showModal({
+						title: '提示',
+						content: '申请售后成功,是否前往个人中心页',
+						success: function(res) {
+							if (res.confirm) {
+								uni.switchTab({
+									url: '/pages/user/user'
+								});
+							} else if (res.cancel) {
+								console.log('用户点击取消');
+							}
+						}
 					});
 				})
-				.catch(e => {
-					uni.navigateTo({
-						url: '/pages/order/order?state=4'
-					});
-				});
+				.catch(e => {});
 		},
 		//点击图片显示大图
 		imgInfo(i) {
 			let tempList = [];
 			console.log(111);
 			this.imgList.forEach(e => {
-				tempList.push(e.url);
+				tempList.push(e);
 			});
 			console.log(tempList);
 			//显示图片
@@ -189,73 +144,18 @@ export default {
 
 <style lang="scss">
 page {
-	background: #ffffff;
+	background: #f8f6f6;
 	height: 100%;
 	.content {
-		background: #ffffff;
+		background: #f8f6f6;
 		height: 100%;
 	}
 }
-/* 多条商品 */
-.order-item {
-	display: flex;
-	flex-direction: column;
-	padding: 0rpx 30rpx;
-	background: #fff;
-	margin-top: 20rpx;
-	/* 单条商品 */
-	.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;
-			height: 100%;
-			.title {
-				align-self: flex-start;
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				height: 80rpx;
-				overflow:hidden; 
-				text-overflow:ellipsis;
-				display:-webkit-box; 
-				-webkit-box-orient:vertical;
-				-webkit-line-clamp:2; 
-			}
-			.title-right {
-				flex-shrink: 0;
-				text-align: right;
-				align-self: flex-start;
-			}
-			.attr-box {
-				font-size: $font-sm + 2rpx;
-				color: $font-color-light;
-			}
-			.price {
-				font-size: $font-base + 2rpx;
-				color: $font-color-dark;
-				&:before {
-					content: '¥';
-					font-size: $font-sm;
-					margin: 0 2rpx 0 8rpx;
-				}
-			}
-		}
-	}
-}
 .equity_box {
-	background-color: #fafafa;
 	border-radius: 10rpx;
 	padding: 25rpx 25rpx;
 	margin: 25rpx 0rpx;
+	background: #ffffff;
 	.text-box {
 		height: 200rpx;
 		textarea {
@@ -270,89 +170,19 @@ page {
 		}
 	}
 }
-.zhil {
-	font-size: 28rpx !important;
-	padding: 15rpx 15rpx;
-}
-.submit-box {
-	bottom: 0;
-	left: 0;
-	width: 750rpx;
-}
 .submit-btn {
-	margin-top: 10px;
-	display: inline-block;
-	width: 670rpx;
-	height: 96rpx;
-	line-height: 96rpx;
-	text-align: center;
-	background-color: #1BCC26 !important;
-	opacity: 1;
-	border-radius: 32rpx;
-	border-width: 8rpx;
-	border-color: rgba(255, 255, 255, 1);
-	box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
-	border-radius: 56rpx;
-	font-size: 39rpx;
-	font-weight: bold;
-	color: rgba(255, 255, 255, 1);
-}
-.submit-btn-txt {
-	font-size: 39rpx;
-	font-weight: bold;
-	line-height: 47rpx;
-	color: rgba(255, 255, 255, 1);
-	opacity: 1;
-}
-.map-box {
-	width: 484rpx;
-	height: 256rpx;
-	border-width: 4rpx;
-	border-color: rgba(255, 255, 255, 1);
-	box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.16);
-	/* border-radius: 12rpx; */
-	position: relative;
-}
-.map {
-	position: absolute;
-	top: 0;
-	left: 0;
-	right: 0;
-	bottom: 0;
-	width: 476rpx;
-	height: 250rpx;
-}
-.map-img {
-	position: absolute;
-	top: 90rpx;
-	left: 156rpx;
-	width: 230rpx;
-	height: 68rpx;
-	background-color: rgba(51, 51, 51, 0.64);
-	border-width: 1rpx;
-	border-color: rgba(0, 0, 0, 0);
-	border-radius: 34px;
-
-	font-size: 28rpx;
-	font-weight: bold;
-	line-height: 66rpx;
-	color: rgba(255, 255, 255, 1);
+	margin: 102rpx auto 0;
+	width: 560rpx;
+	height: 85rpx;
+	background: #24a17d;
+	border-radius: 43px;
 	text-align: center;
-}
-.address-box {
-	padding: 15rpx 40rpx;
-	margin-bottom: 10px;
-}
-.label {
 	font-size: 36rpx;
-	font-weight: bold;
-	line-height: 50rpx;
-	color: #222222;
-}
-.label-img {
-	padding-left: 40rpx;
+	font-family: PingFangSC;
+	font-weight: 500;
+	color: #ffffff;
+	line-height: 85rpx;
 }
-
 .add-img-box {
 	width: 100%;
 	flex-direction: row;
@@ -369,7 +199,6 @@ page {
 	.add-img {
 		width: 100%;
 		height: 100%;
-		border-radius: 24rpx;
 	}
 }
 .add-img-camera {
@@ -402,4 +231,4 @@ page {
 	transform: scaleY(0.3);
 	background-color: rgba(0, 0, 0, 0.5);
 }
-</style>
+</style>

+ 369 - 430
pages/order/order.vue

@@ -11,57 +11,116 @@
 					<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 class="order-item" v-for="(item, index) in tabItem.orderList">
+						<view class="order-top flex">
+							<view class="order-top-left">
+								<image class="order-top-left-image" src="../../static/img/order5.png" mode=""></image>
+								<view class="order-top-left-font">订单信息</view>
+							</view>
+							<view class="order-top-right">{{ item.after_sales == 1 ? '申请售后' : item.after_sales == 2 ? '售后成功' : tabItem.text }}</view>
 						</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 class="order-info flex">
+							<view class="order-info-left">委托时间:</view>
+							<view class="order-info-right">{{ item.time }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">订单类型:</view>
+							<view class="order-info-right">{{ item.type == 2 ? '代办' : '陪诊' }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">医院:</view>
+							<view class="order-info-right">{{ item.hospital }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">预约人:</view>
+							<view class="order-info-right">{{ item.name }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.type == 2">
+							<view class="order-info-left">代办类型:</view>
+							<view class="order-info-right">{{ item.catename }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.type == 1">
+							<view class="order-info-left">陪诊类型:</view>
+							<view class="order-info-right">{{ item.catename }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.type == 1">
+							<view class="order-info-left">陪诊服务:</view>
+							<view class="order-info-right">{{ item.servicename }}</view>
+						</view>
+						<view class="order-info flex" v-if="item.issm == 2">
+							<view class="order-info-left">接送地址:</view>
+							<view class="order-info-right">{{ item.transfer_address }}</view>
+						</view>
+						<view class="order-info flex">
+							<view class="order-info-left">备注:</view>
+							<view class="order-info-right">{{ item.remarks || '无' }}</view>
+						</view>
+						<view class="order-btn-box" v-if="tabCurrentIndex == 0">
+							<view class="order-btn" @click="qxorder(item)">
+								<image class="order-btn-icon" src="../../static/img/order3.png" mode=""></image>
+								<view class="order-btn-font">取消订单</view>
 							</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 class="ordering" v-if="tabCurrentIndex == 1">
+							<view class="order-info flex">
+								<view class="order-info-left">接单人:</view>
+								<view class="order-info-right">{{ item.receiving.name }}</view>
+							</view>
+							<view class="order-info flex">
+								<view class="order-info-left">接单人电话:</view>
+								<view class="order-info-right">{{ item.receiving.phone }}</view>
+							</view>
+							<view class="ordering-btn flex" @click="call(item)">
+								<image class="ordering-btn-icon" src="../../static/img/order4.png" mode=""></image>
+								<view class="ordering-btn-font">立即联系</view>
+							</view>
+						</view>
+						<view class="ordering" v-if="tabCurrentIndex == 2">
+							<view class="order-info flex">
+								<view class="order-info-left">接单人:</view>
+								<view class="order-info-right">{{ item.receiving.name }}</view>
 							</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">{{ goodsItem.productInfo.price|moneyNum }}</text>
+							<view class="order-info flex">
+								<view class="order-info-left">接单人电话:</view>
+								<view class="order-info-right">{{ item.receiving.phone }}</view>
+							</view>
+							<view class="order-info flex">
+								<view class="order-info-left">照片:</view>
+								<view class="order-info-picture">
+									<view class="order-info-picture-item" v-for="(itm, inx) in item.images"><image :src="itm" mode=""></image></view>
 								</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 class="ordering-btnbox">
+								<view class="ordering-btnbox-left" @click="navTo('/pages/order/evaluate?unique=' + item.id)">
+									<image class="ordering-btnbox-left-icon" src="../../static/img/order1.png" mode=""></image>
+									<view class="ordering-btnbox-left-font">{{ item.after_sales == 1 ? '查看售后' : '申请售后' }}</view>
 								</view>
+								<view class="ordering-btnbox-right" @click="accomplish(item)"><view class="ordering-btnbox-right-font">确认完成</view></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">{{ 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 class="ordering" v-if="tabCurrentIndex == 3">
+							<view class="order-info flex">
+								<view class="order-info-left">接单人:</view>
+								<view class="order-info-right">{{ item.receiving.name }}</view>
+							</view>
+							<view class="order-info flex">
+								<view class="order-info-left">接单人电话:</view>
+								<view class="order-info-right">{{ item.receiving.phone }}</view>
+							</view>
+							<view class="order-info flex">
+								<view class="order-info-left">照片:</view>
+								<view class="order-info-picture">
+									<view class="order-info-picture-item" v-for="(itm, inx) in item.images"><image :src="itm" mode=""></image></view>
+								</view>
+							</view>
+							<view class="order-btn-box">
+								<view class="order-btn" @click="navTo('/pages/order/evaluate?unique=' + item.id)">
+									<image class="order-btn-icon" src="../../static/img/order1.png" mode=""></image>
+									<view class="order-btn-font">{{ item.after_sales == 1 ? '查看售后' : '申请售后' }}</view>
+								</view>
+							</view>
 						</view>
 					</view>
-
 					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
 				</scroll-view>
 			</swiper-item>
@@ -71,20 +130,26 @@
 
 <script>
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import { mapState, mapMutations } from 'vuex';
 import empty from '@/components/empty';
-import { orderList, orderCancel, orderDel, orderTake } from '@/api/order.js';
+import { orderList, orderCancel, orderDel, orderTake, confirmation } from '@/api/order.js';
+import { getTime } from '@/utils/rocessor.js';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 export default {
 	components: {
 		uniLoadMore,
 		empty
 	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
 	data() {
 		return {
 			tabCurrentIndex: 0,
 			navList: [
 				{
 					state: 0,
-					text: '待付款',
+					text: '待接单',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
@@ -92,7 +157,7 @@ export default {
 				},
 				{
 					state: 1,
-					text: '待发货',
+					text: '进行中',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
@@ -100,7 +165,7 @@ export default {
 				},
 				{
 					state: 2,
-					text: '待收货',
+					text: '待确认',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
@@ -108,14 +173,6 @@ export default {
 				},
 				{
 					state: 3,
-					text: '待评价',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 4,
 					text: '已完成',
 					loadingType: 'more',
 					orderList: [],
@@ -125,77 +182,124 @@ export default {
 			]
 		};
 	},
-
-	onLoad(options) {
-		/**
-		 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-		 * 替换onLoad下代码即可
-		 */
-		this.tabCurrentIndex = +options.state;
-		// #ifndef MP
-		this.loadData();
-		// #endif
-		// #ifdef MP
-		if (options.state == 0) {
+	onShow() {
+		this.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 //每次信息条数
+			}
+		];
+		this.tabCurrentIndex = 0;
+		if (!this.hasLogin) {
+			// 保存地址
+			saveUrl();
+			// 登录拦截
+			interceptor();
+		} else {
 			this.loadData();
 		}
-		// #endif
 	},
+	onLoad(options) {},
 	// #ifdef APP-PLUS || H5
-	onBackPress(e){
+	onBackPress(e) {
 		uni.switchTab({
-			url: '/pages/user/user',
+			url: '/pages/user/user'
 		});
 		return true;
 	},
 	// #endif
 	filters: {
-		moneyNum(value){
-				return +value;
-		},
+		moneyNum(value) {
+			return +value;
+		}
 	},
 	methods: {
-		// 转换金额为数字
-		moneyNum(value){
-				return +value;
+		call(item) {
+			console.log(item.receiving.phone);
+			uni.makePhoneCall({
+				phoneNumber: item.receiving.phone //仅为示例
+			});
 		},
-		// 确认收货
-		orderTake(item, index) {
-			let obj = this;
+		// 完成
+		accomplish(opt) {
+			const obj = this;
 			uni.showModal({
-				title: '是否确认收货?',
-				success: () => {
-					orderTake({
-						uni: item.order_id
-					})
-						.then(e => {
-							obj.navList[obj.tabCurrentIndex].orderList.splice(index, 1);
+				title: '提示',
+				content: '是否确认订单成功',
+				success: function(res) {
+					if (res.confirm) {
+						confirmation({}, opt.id).then(e => {
 							uni.showToast({
-								title: '收货成功'
+								title: '确认订单成功',
+								icon: 'success',
+								duration: 2000
 							});
-						})
-						.catch(e => {
-							console.log(e);
+							obj.loadData('shua');
 						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
 				}
 			});
 		},
-		//跳转到订单详情
-		goToOrderDetail(e) {
-			uni.navigateTo({
-				url: '/pages/order/orderDetail?id=' + e.order_id
-			});
+
+		// 转换金额为数字
+		moneyNum(value) {
+			return +value;
 		},
-		// 申请退款
-		orderRefund(e) {
+		navTo(url) {
 			uni.navigateTo({
-				url: '/pages/order/orderRefund?id=' + e.order_id
+				url
 			});
 		},
-		// 订单支付
-		orderPay(e) {
-			uni.navigateTo({
-				url: '/pages/money/pay?type=1&ordid=' + e.order_id + '&money=' + e.pay_price
+		// 取消订单
+		qxorder(opt) {
+			const obj = this;
+			uni.showModal({
+				title: '提示',
+				content: '是否取消订单',
+				success: function(res) {
+					if (res.confirm) {
+						orderCancel({}, opt.id).then(e => {
+							uni.showToast({
+								title: '取消订单成功',
+								icon: 'success',
+								duration: 2000
+							});
+							obj.loadData('shua');
+						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
+				}
 			});
 		},
 		//获取订单列表
@@ -204,6 +308,13 @@ export default {
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
 			let state = navItem.state;
+			if (source === 'shua') {
+				navItem.loaded = false;
+				navItem.page = 1;
+				navItem.limit = 10;
+				navItem.loadingType = 'more';
+				navItem.orderList = [];
+			}
 			if (source === 'tabChange' && navItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return;
@@ -216,23 +327,48 @@ export default {
 				//防止重复加载
 				return;
 			}
+
 			// 修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
 
 			orderList({
-				type: state,
+				status: 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;
+					data.forEach(e => {
+						if (e.remarks == undefined || e.remarks == 'undefined') {
+							e.remarks = '无';
+						}
+						let key = Object.keys(e.cate);
+						let name = '';
+						key.forEach(e => {
+							if (name == '') {
+								name = name + e;
+							} else {
+								name = name + '/' + e;
+							}
+						});
+						e.catename = name;
+						let key1 = Object.keys(e.service);
+						let name1 = '';
+						e.issm = 1;
+						key1.forEach(es => {
+							console.log(e);
+							if (es == '上门接送') {
+								e.issm = 2;
+							}
+							if (name1 == '') {
+								name1 = name1 + es;
+							} else {
+								name1 = name1 + '/' + es;
+							}
+						});
+						e.servicename = name1;
+						e.time = getTime(e.time);
 					});
-					navItem.orderList = navItem.orderList.concat(arr);
-					// console.log(navItem.orderList);
+					navItem.orderList = navItem.orderList.concat(data);
 					navItem.page++;
 					if (navItem.limit == data.length) {
 						//判断是否还有数据, 有改为 more, 没有改为noMore
@@ -258,77 +394,6 @@ export default {
 		//顶部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 };
 		}
 	}
 };
@@ -384,163 +449,150 @@ page,
 .uni-swiper-item {
 	height: auto;
 }
+
 .order-item {
-	display: flex;
-	flex-direction: column;
-	padding-left: 30rpx;
-	background: #fff;
-	margin-top: 16rpx;
-	.i-top {
+	width: 702rpx;
+	background: #ffffff;
+	box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	border-radius: 20rpx;
+	margin: 20rpx auto 0;
+	padding: 24rpx;
+	.order-top-left {
 		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;
+		.order-top-left-image {
+			width: 32rpx;
+			height: 37rpx;
 		}
-		.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%);
-			}
+		.order-top-left-font {
+			margin-left: 10rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
 		}
 	}
-	/* 多条商品 */
-	.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%;
-		}
+	.order-top-right {
+		font-size: 26rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #ff6f0f;
 	}
-	/* 单条商品 */
-	.goods-box-single {
-		display: flex;
-		padding: 20rpx 0;
-		.goods-img {
-			display: block;
-			width: 120rpx;
-			height: 120rpx;
+	.order-info {
+		margin-top: 24rpx;
+		align-items: flex-start;
+		.order-info-left {
+			width: 200rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
 		}
-		.right {
-			flex: 1;
+		.order-info-right {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+		.order-info-picture {
 			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;
-					
+			justify-content: flex-end;
+			.order-info-picture-item {
+				width: 130rpx;
+				height: 130rpx;
+				margin-left: 10rpx;
+				image {
+					width: 100%;
+					height: 100%;
 				}
 			}
 		}
 	}
-	.price-box {
+	.order-btn-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;
+		.order-btn {
+			margin-top: 34rpx;
+			align-items: center;
+			display: flex;
+			justify-content: center;
+			width: 181rpx;
+			height: 63rpx;
+			border: 1rpx solid #c9c9c9;
+			border-radius: 15rpx;
+			.order-btn-icon {
+				width: 38rpx;
+				height: 38rpx;
+			}
+			.order-btn-font {
+				margin-left: 7rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
 			}
 		}
 	}
-	.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;
+	.ordering {
+		margin-top: 30rpx;
+		padding: 30rpx 0 10rpx;
+		border-top: 1px solid #eaeced;
+		.ordering-btn {
+			display: flex;
+			justify-content: center;
+			margin: 38rpx auto 0;
+			width: 566rpx;
+			height: 74rpx;
+			background: #24a17d;
+			border-radius: 15rpx;
+			.ordering-btn-icon {
+				width: 32rpx;
+				height: 34rpx;
+			}
+			.ordering-btn-font {
+				margin-left: 14rpx;
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #ffffff;
 			}
 		}
-		&.evaluate {
-			color: $color-yellow;
-			&:after {
-				border-color: $color-yellow;
+		.ordering-btnbox {
+			margin-top: 40rpx;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			.ordering-btnbox-left {
+				display: flex;
+				flex-direction: column;
+				align-items: center;
+				line-height: 1;
+				.ordering-btnbox-left-icon {
+					width: 42rpx;
+					height: 42rpx;
+				}
+				.ordering-btnbox-left-font {
+					margin-top: 10rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #666666;
+				}
+			}
+			.ordering-btnbox-right {
+				display: flex;
+				justify-content: center;
+				align-items: center;
+				width: 556rpx;
+				height: 74rpx;
+				background: #24a17d;
+				border-radius: 15rpx;
+				.ordering-btnbox-right-font {
+					font-size: 30rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					color: #ffffff;
+				}
 			}
 		}
 	}
@@ -555,119 +607,6 @@ page,
 	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;

+ 88 - 0
pages/order/success.vue

@@ -0,0 +1,88 @@
+<template>
+	<view class="container">
+		<view class="re-succ-box">
+			<image class="re-succ-img" src="../../static/img/success.png"></image>
+
+			<view class="re-succ-tit">提交成功</view>
+			<view class="re-succ-tip" v-if="type == 2">请耐心等待审核</view>
+			<view class="re-succ-btn" @click="goBack()">返回</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			type: 1
+		};
+	},
+	onLoad(opt) {
+		if (opt.type) {
+			this.type = opt.type;
+		}
+	},
+	methods: {
+		goBack() {
+			uni.switchTab({
+				url: '/pages/index/index'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	height: 100%;
+}
+.container {
+	height: 100%;
+	background: #ffffff;
+	.line-top {
+		width: 750rpx;
+		height: 20rpx;
+		background: #f5f5f5;
+	}
+	.re-succ-box {
+		padding-top: 170rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		.re-succ-img {
+			margin-left: -30rpx;
+			width: 362rpx;
+			height: 267rpx;
+			display: block;
+		}
+		.re-succ-tit {
+			margin-top: -26rpx;
+			font-size: 40rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.re-succ-tip {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #b3b3b3;
+			margin-top: 20rpx;
+		}
+		.re-succ-btn {
+			margin-top: 80rpx;
+			width: 301rpx;
+			height: 78rpx;
+			border: 2rpx solid #24a17d;
+			border-radius: 10rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #24a17d;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+		}
+	}
+}
+</style>

+ 13 - 18
pages/public/register.vue

@@ -1,8 +1,6 @@
 <template>
 	<view class="container">
-		<view class="container_text" >
-			<image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image>
-		</view>
+		<view class="container_text"><image class="banner-img" src="/static/img/img01.png" mode="scaleToFill"></image></view>
 		<view class="loginTitle"><text>注册</text></view>
 		<view class="login_text">
 			<view class="login_input flex">
@@ -21,13 +19,13 @@
 				<view class="login_img"><image src="/static/icon/img07.png"></image></view>
 				<view class="login_name"><input class="uni-input" type="text" v-model="invitation" focus placeholder="请输入邀请码" /></view>
 			</view>
-			<!-- <view class="login_input flex">
+			<view class="login_input flex">
 				<view class="login_img"><image src="/static/icon/img06.png"></image></view>
 				<view class="login_name flex">
 					<input class="uni-input width" v-model="code" focus placeholder="请输入验证码" />
 					<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
 				</view>
-			</view> -->
+			</view>
 			<view><button type="green" @click="register" class="uni-button uni-button-green">注册账号</button></view>
 			<view><button class="uni-button uni-button-green uni-button-green-plain" type="green" plain="true" hover-class="none" @click="login">返回登录</button></view>
 		</view>
@@ -44,12 +42,12 @@ export default {
 			invitation: '', //邀请码
 			code: '', //验证码
 			time: '', //保存倒计时对象
-			countDown: 0 ,//倒计时
+			countDown: 0 //倒计时
 		};
 	},
 	onLoad() {
 		// 获取扫码邀请人id
-		this.invitation = uni.getStorageSync('spread')||'';
+		this.invitation = uni.getStorageSync('spread') || '';
 	},
 	watch: {
 		// 监听倒计时
@@ -93,21 +91,20 @@ export default {
 			// }
 			register({
 				account: obj.phone, //账号
-				// captcha: obj.code, //验证码
-				password: obj.password ,//密码
-				spread:this.invitation//上级推广人
+				captcha: obj.code, //验证码
+				password: obj.password, //密码
+				spread: this.invitation //上级推广人
 			}).then(function(e) {
 				uni.showToast({
-					title:'注册成功',
-					duration:2000,
-					position:'top'
+					title: '注册成功',
+					duration: 2000,
+					position: 'top'
 				});
-				setTimeout(function () {
+				setTimeout(function() {
 					uni.navigateTo({
 						url: '/pages/public/login'
 					});
-				},1000)
-				
+				}, 1000);
 			});
 			//调用注册接口,成功跳转登录页
 		},
@@ -276,6 +273,4 @@ uni-button {
 	height: 80rpx !important;
 	line-height: 80rpx !important;
 }
-
 </style>
-

+ 199 - 230
pages/public/wxLogin.vue

@@ -1,238 +1,218 @@
 <template>
 	<view class="content">
-		<!-- #ifdef MP -->
-		<image class="bg-img" :src="/static/img/img09.png" mode=" scaleToFill"></image>
+		<!-- #ifndef H5 -->
+		<!-- <image class="bg-img" :src="baseURL+urlFile+'/img/img09.png'" mode=" scaleToFill"></image> -->
 		<view class="logo-img-box">
-			<image class="logo-img" src="/static/img/img10.png" mode=" aspectFit"></image>
-			<button class="userInfo" type="warn" open-type="getUserInfo" @getuserinfo="userInfoData">
+			<image class="logo-img" src="../../static/img/logo.png" mode=" aspectFit"></image>
+			<!-- 获取头像登录 -->
+			<!-- <button class="userInfo" type="warn" @click="isclick?'':userInfoData()" :class="{'nocaction': isclick}">
 				<text class="iconfont iconweixin"></text>
-				<text>微信授权登录</text>
-			</button>
-		</view>
-		<!-- #endif -->
-		<view class="Mask" v-show="MaskShow">
-			<view class="Mask-box">
-				<view class="title">申请获取您的手机号</view>
-				<view class="text">为了方便您的取货和我们的送货,并获取更多优惠活动,需要您的手机授权</view>
-				<view class="btn_box">
-					<button class="weixin" @click="ToIndex()">取消</button>
-					<button class="weixin" open-type="getPhoneNumber" @getphonenumber="PhoneNumber">手机号授权</button>
+				<text>
+				微信授权登录
+				</text>
+			</button> -->
+			<!-- 获取手机号登录 -->
+			<template v-if="!hasphone">
+				<button class="userInfo" type="warn" :class="{ nocaction: isclick }" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
+					<text class="iconfont iconweixin"></text>
+					<text>微信授权登录</text>
+				</button>
+			</template>
+			<template v-if="hasphone">
+				<button class="userInfo" type="warn" :class="{ nocaction: isclick }" @click="isclick ? '' : userInfoData()">
+					<text class="iconfont iconweixin"></text>
+					<text>微信授权登录</text>
+				</button>
+			</template>
+
+			<!-- 550*450 -->
+			<uni-popup ref="popupsq" type="center">
+				<view class="popupsq-wrap">
+					<view class="" style="text-align: center;font-size: 32rpx;font-weight: bold;padding: 40rpx 0;color: #000;">陪诊</view>
+					<view class="" style="font-size: 26rpx;padding-bottom: 35rpx;color: #000;">该程序获取以下授权:</view>
+					<view class="" style="font-size: 26rpx;color:#b7b7b7;">获取您的公开信息(昵称,头像),以便于个性话头像和昵称</view>
+					<view class="flex" style="padding-top: 40rpx;">
+						<view class="btn qx" style="" @click="close()">取消</view>
+						<view class="btn qr" style="" @click="isclick ? '' : userInfoData()">确认授权</view>
+					</view>
 				</view>
-			</view>
+			</uni-popup>
 		</view>
+		<!-- #endif -->
 	</view>
 </template>
 
 <script>
+import { getUserInfo } from '@/api/login.js';
 // #ifdef H5
 import { loginWinxin } from '@/utils/wxAuthorized';
 // #endif
 // #ifdef MP-WEIXIN
+import { loginWinxinMp } from '@/utils/wxMinProgram';
 import { wechatMpAuth } from '@/api/wx';
 // #endif
-import { mapMutations } from 'vuex';
-import { getUserInfo, bangding } from '@/api/login.js';
+import { mapMutations, mapState } from 'vuex';
 export default {
 	data() {
 		return {
 			userInfo: {}, //授权用户信息
 			code: '', //授权code
-			loding: false, //判断是否在点击中
-			MaskShow: false // 手机号授权弹窗
+			isclick: false, //是否点击了
+			iv1: '',
+			encryptedData1: '',
+			hasphone: false
 		};
 	},
-	onLoad(option) {
+	onLoad() {
 		this.loadData();
 	},
+	computed: {
+		// ...mapState(['baseURL','urlFile'])
+	},
 	methods: {
+		// ...mapMutations(['login', 'setUserInfo']),
+		...mapMutations('user', ['login', 'setUserInfo']),
+		close() {
+			this.$refs.popupsq.close();
+		},
+		getPhoneNumber(e) {
+			let obj = this;
+			console.log(e, 'e+++++++++++++++');
+			// 用户同意授权
+			if (e.detail.errMsg == 'getPhoneNumber:ok') {
+				console.log('chenggong++++++++++++++');
+				obj.hasphone = true;
+				obj.iv1 = e.detail.iv;
+				obj.encryptedData1 = e.detail.encryptedData;
+				obj.$refs.popupsq.open();
+			} else {
+				obj.isclick = false;
+				uni.showToast({
+					title: '您拒绝了请求,不能正常使用小程序',
+					icon: 'error',
+					duration: 2000
+				});
+				return;
+			}
+		},
 		loadData() {
+			let obj = this;
 			// #ifdef H5
 			loginWinxin();
 			// #endif
-		},
-		// #ifndef H5
-		// 用户确认授权
-		userInfoData(e) {
-			const that = this;
 			// #ifdef MP-WEIXIN
-			if (!this.loding) {
-				uni.showModal({
-					title: '温馨提示',
-					content: '亲,授权微信登录后才能正常使用小程序功能',
-					success: res => {
-						if (res.confirm) {
-							wx.getUserProfile({
-								desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-								success: res => {
-									that.userInfo = res;
-									that.loadMp();
-								},
-								fail: err => {
-									uni.showToast({
-										title: '您拒绝了请求,不能正常使用小程序',
-										icon: 'error',
-										duration: 2000
-									});
-									return;
-								}
-							});
-						} else if (res.cancel) {
-							//如果用户点击了取消按钮
-							uni.showToast({
-								title: '您拒绝了请求,不能正常使用小程序',
-								icon: 'error',
-								duration: 2000
-							});
-							return;
-						}
+			loginWinxinMp().then(e => {
+				console.log(e, 'ddddddddddddddddddddddd');
+				// obj.code = e.code
+				wx.login({
+					success(e) {
+						console.log(e, 'loginWinxinMp');
+						obj.code = e.code;
+						console.log(obj.code, 'wxlogin.code++++++');
+					},
+					fill: function(e) {
+						console.log(e);
 					}
 				});
-			}
+			});
 			// #endif
 		},
-		// #endif
+		// 用户确认授权
+		userInfoData() {
+			let that = this;
+			if (that.isclick) {
+				return;
+			}
+			that.isclick = true;
+			wx.getUserProfile({
+				desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+				success: res => {
+					console.log(res, 'that.userInfo+++++++++++++++++++');
+					that.userInfo = res;
+					uni.showLoading({
+						title: '授权中',
+						mask: true
+					});
+					that.loadMp();
+				},
+				fail: err => {
+					that.isclick = false;
+					uni.showToast({
+						title: '您拒绝了请求,不能正常使用小程序',
+						icon: 'error',
+						duration: 2000
+					});
+					return;
+				}
+			});
+			// this.userInfo = e;
+			// console.log(e,'用户确认授权')
+			// this.loadMp()
+		},
 		// #ifdef MP-WEIXIN
-		loadMp(option) {
+		loadMp() {
 			let obj = this;
-			obj.loding = true;
 			// 获取登录授权页数据
 			let user = obj.userInfo;
+			console.log(user);
 			// 获取推广人id
 			let spread_spid = uni.getStorageSync('spread') || '';
-			// let spread_code = uni.getStorageSync('spread_code') || '';
-			uni.showLoading({
-				title: '授权中',
-				mask: true
-			});
-			wx.login({
-				success(e) {
-					wechatMpAuth({
-						code: e.code,
-						iv: user.iv,
-						encryptedData: user.encryptedData,
-						spread_spid: spread_spid,
-						// #ifdef MP
-						spread_code: spread_code
-						// #endif
-					})
-						.then(({ data }) => {
-							obj.loding = false;
-							obj.wchatAuth(data);
-							console.log(data);
-						})
-						.catch(e => {
-							obj.loding = false;
-							uni.hideLoading();
-						});
-				},
-				fill: function(e) {
-					obj.loding = false;
-					console.log(e);
-				}
-			});
+			// #ifdef MP
+			let spread_code = uni.getStorageSync('spread_code') || '';
+			// #endif
+
+			wechatMpAuth({
+				code: obj.code,
+				iv: user.iv,
+				iv1: obj.iv1,
+				encryptedData1: obj.encryptedData1,
+				encryptedData: user.encryptedData,
+				spread_spid: spread_spid,
+				// #ifdef MP
+				spread_code: spread_code
+				// #endif
+			})
+				.then(({ data }) => {
+					obj.wchatAuth(data);
+					console.log(data, 'wechatMpAuth++++++++++++++++++++++++++');
+				})
+				.catch(err => {
+					// obj.loding = false;
+					// uni.hideLoading();
+				});
 		},
+		// #endif
 		wchatAuth(data) {
 			let obj = this;
 			// 保存token
 			uni.setStorageSync('token', data.token);
+			console.log(data.token, 'token++++++++++++++');
 			// 获取用户基础信息
-			getUserInfo({})
-				.then(e => {
-					uni.hideLoading();
-					obj.login();
-					// 保存返回用户数据
-					obj.setUserInfo(e.data);
-					obj.ToIndex();
-					// if (e.data.phone == null || !e.data.phone ) {
-					// 	obj.MaskShow = true;
-					// } else {
-					// 	obj.ToIndex();
-					// }
-				})
-				.catch(e => {
-					uni.hideLoading();
-				});
-		},
-		// #endif
-		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'
-							});
-						}
-					});
+			getUserInfo({}).then(e => {
+				console.log('userInfo+++++++++++', e);
+				obj.login();
+				uni.hideLoading();
+				// 保存返回用户数据
+				obj.setUserInfo(e.data);
+				let ur = uni.getStorageSync('present') || '/pages/index/index';
+				// 用于处理缓存bug
+				if (ur == 'pages/shop/product') {
+					ur = '/pages/index/index';
 				}
-			});
-		},
-		// 绑定手机号
-		PhoneNumber(e) {
-			let obj = this;
-			obj.MaskShow = false;
-			(obj.iv = e.detail.iv), (obj.encryptedData = e.detail.encryptedData);
-
-			uni.setStorageSync('code', obj.code);
-			bangding({
-				flag: 1,
-				cache_key: obj.cache_key,
-				code: obj.code,
-				iv: obj.iv,
-				encryptedData: obj.encryptedData
-			}).then(function(e) {
-				if (e.data.is_bind == 1) {
-					console.log('bangding1');
-					bangding({
-						flag: 1,
-						cache_key: obj.cache_key,
-						code: obj.code,
-						iv: obj.iv,
-						encryptedData: obj.encryptedData,
-						step: 1
-					})
-						.then(function(e) {
-							// 获取用户基础信息
-							obj.GetUser();
-							obj.$api.msg(e.msg);
-							obj.$nextTick(function() {
-								obj.ToIndex();
-							});
-						})
-						.catch(e => {
-							console.log(e);
+				uni.switchTab({
+					url: ur,
+					fail(e) {
+						uni.navigateTo({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: '/pages/index/index'
+								});
+							}
 						});
-				} else {
-					console.log('bangding2');
-					obj.$api.msg(e.msg);
-					// 获取用户基础信息
-					obj.GetUser();
-					obj.$api.msg(e.msg);
-					obj.$nextTick(function() {
-						obj.ToIndex();
-					});
-				}
-			});
-		},
-		GetUser() {
-			// 获取用户基础信息
-			getUserInfo({})
-				.then(({ data }) => {
-					this.setUserInfo(data);
-					console.log(data, 11);
-					console.log(uni.getStorageSync('userInfo'), 55);
-				})
-				.catch(e => {
-					console.log(e);
+					}
 				});
+			});
 		}
 	}
 };
@@ -242,52 +222,9 @@ export default {
 page,
 .content {
 	height: 100%;
+	background-color: #fff;
 }
 
-.Mask {
-	position: fixed;
-	top: 0;
-	width: 100%;
-	height: 100%;
-	background-color: rgba(51, 51, 51, 0.7);
-	.Mask-box {
-		margin: auto;
-		margin-top: 320rpx;
-		padding: 50rpx 30rpx;
-		width: 90%;
-		height: 450rpx;
-		top: 500rpx;
-		left: 10%;
-		background-color: #ffffff;
-		border-radius: 15rpx;
-		.title {
-			text-align: center;
-			font-size: 35rpx;
-			font-weight: 700;
-		}
-		.text {
-			font-size: 30rpx;
-			color: #848484;
-			padding-top: 50rpx;
-		}
-		.btn_box {
-			margin: 70rpx 0 0 0;
-			display: flex;
-			align-items: center;
-			justify-content: space-between;
-		}
-	}
-}
-
-.weixin {
-	// background: linear-gradient(90deg, rgba(36, 214, 78, 1), rgba(45, 187, 89, 1));
-	background: $base-color;
-	width: 40%;
-	color: #ffffff;
-	border-radius: 50rpx;
-	border: none;
-	margin: 0 20rpx;
-}
 .bg-img,
 .logo-img-box {
 	position: absolute;
@@ -296,17 +233,49 @@ page,
 	width: 100%;
 	height: 100%;
 }
+
 .logo-img {
 	margin-top: 20vh;
 	margin-left: 176rpx;
 	width: 385rpx;
 	height: 394rpx;
 }
+
 .userInfo {
 	margin: 0 100rpx;
 	margin-top: 50rpx;
 	color: #ffffff;
 	border-radius: 99rpx;
-	background-color: $base-color !important;
+	background-color: #24a17d !important;
+}
+
+.nocaction {
+	background-color: #999;
+}
+
+.popupsq-wrap {
+	width: 550rpx;
+	height: 450rpx;
+	background-color: #fff;
+	border-radius: 20rpx;
+	padding: 0 30rpx;
+
+	.btn {
+		width: 240rpx;
+		height: 90rpx;
+		text-align: center;
+		line-height: 90rpx;
+		font-size: 30rpx;
+		border-radius: 45rpx;
+		font-weight: bold;
+	}
+	.qx {
+		color: #000;
+		border: #f0f0f0 1px solid;
+	}
+	.qr {
+		color: #fff;
+		background-color: #24a17d;
+	}
 }
 </style>

+ 4 - 6
pages/set/userinfo.vue

@@ -14,9 +14,7 @@
 		</view>
 		<view class="submit-box flex">
 			<view class="submit" @click="edit">确认修改</view>
-			<!-- <view class="submit out" @click="toLogout" >
-			退出登录
-		</view> -->
+			<view class="submit out" @click="toLogout">退出登录</view>
 		</view>
 	</view>
 </template>
@@ -26,7 +24,7 @@ import uniList from '@/components/uni-list/uni-list.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
 import { mapState, mapMutations } from 'vuex';
 import { logout } from '@/api/set.js';
-import { uploads, edit, upload } from '@/api/user.js';
+import { uploads, edit, upload } from '@/api/order.js';
 export default {
 	components: {
 		uniList,
@@ -54,8 +52,8 @@ export default {
 						logout({})
 							.then(e => {
 								obj.logout();
-								uni.navigateTo({
-									url: '/pages/public/login'
+								uni.switchTab({
+									url: '/pages/user/user'
 								});
 							})
 							.catch(e => {

+ 288 - 2
pages/user/becomeVip.vue

@@ -1,8 +1,185 @@
 <template>
-	<view class="center"><view class="info-box"></view></view>
+	<view class="center">
+		<view class="info-box">
+			<view class="info-item flex">
+				<view class="info-item-left">姓名:</view>
+				<view class="info-item-right"><input type="text" v-model="name" placeholder="请输入您的姓名" placeholder-class="placeholder" /></view>
+			</view>
+			<view class="info-item flex">
+				<view class="info-item-left">性别:</view>
+				<view class="info-item-right">
+					<picker @change="bindPickerSex" :range="array">
+						<view>{{ sex }}</view>
+					</picker>
+				</view>
+			</view>
+			<view class="info-item flex">
+				<view class="info-item-left">联系方式:</view>
+				<view class="info-item-right"><input type="number" v-model="phone" placeholder="请输入您的手机号" placeholder-class="placeholder" /></view>
+			</view>
+			<view class="info-item flex">
+				<view class="info-item-left">验证码:</view>
+				<view class="info-item-right"><input type="number" v-model="code" placeholder="请输入您的验证码" placeholder-class="placeholder" /></view>
+				<view class="info-item-yzm" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+			</view>
+		</view>
+		<view class="upload">
+			<view class="upload-title">身份证正反面</view>
+			<view class="upload-main">
+				<view class="add-img-box flex_item">
+					<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
+						<image class="add-img" @click.stop="imgInfo(index)" :src="item" mode="aspectFill"></image>
+						<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
+					</view>
+					<view v-for="(item, index) in 2 - imgList.length" class="add-img-item" @click.stop="scImg()"><image class="add-img" src="/static/img/add.png"></image></view>
+				</view>
+			</view>
+		</view>
+		<view class="btn" @click="add()">提交申请</view>
+	</view>
 </template>
 
-<script></script>
+<script>
+import { upload, apply } from '@/api/order.js';
+import { verify } from '@/api/login.js';
+export default {
+	data() {
+		return {
+			name: '',
+			sex: '请选择您的性别',
+			phone: '',
+			code: '',
+			countDown: 0, //倒计时
+			array: ['男', '女'],
+			imgList: [],
+			imgCount: 2 //最多支持9张上传,可以修改
+		};
+	},
+	watch: {
+		// 监听倒计时
+		countDown(i) {
+			if (i == 0) {
+				clearInterval(this.time);
+			}
+		}
+	},
+	methods: {
+		scImg() {
+			let obj = this;
+			console.log(obj.imgCount, 11);
+			if (obj.imgCount == 0) {
+				uni.showToast({
+					title: '最多添加2张图片',
+					icon: 'none'
+				});
+				return;
+			}
+			upload({
+				file: ''
+			})
+				.then(e => {
+					console.log(e[0].url, 'e');
+					obj.imgList.push(e[0].url);
+					console.log(obj.imgList, 'imgList');
+					obj.imgCount = 2 - obj.imgList.length;
+					console.log(obj.imgCount, 'imgCount ');
+				})
+				.catch(e => {});
+		},
+		// 选择性别
+		bindPickerSex: function(e) {
+			console.log(this.array[e.target.value]);
+			this.sex = this.array[e.target.value];
+		},
+		//点击图片显示大图
+		imgInfo(i) {
+			let tempList = [];
+			console.log(111);
+			this.imgList.forEach(e => {
+				tempList.push(e);
+			});
+			console.log(tempList);
+			//显示图片
+			uni.previewImage({
+				current: i,
+				loop: false,
+				urls: tempList,
+				indicator: 'default'
+			});
+		},
+		//删除图片
+		delImg(i) {
+			uni.showModal({
+				content: '确定删除这张吗',
+				success: res => {
+					if (res.confirm) {
+						this.imgList.splice(i, 1);
+						this.imgCount++;
+					} else if (res.cancel) {
+					}
+				}
+			});
+		},
+		verification() {
+			let obj = this;
+			if (this.phone == '') {
+				this.$api.msg('请输入联系方式');
+				return;
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的手机号');
+				return;
+			}
+			// 判断是否在倒计时
+			if (obj.countDown > 0) {
+				return false;
+			} else {
+				obj.countDown = 60;
+				obj.time = setInterval(() => {
+					obj.countDown--;
+				}, 1000);
+				//调用验证码接口
+				verify({
+					phone: obj.phone,
+					type: 'register'
+				})
+					.then(({ data }) => {})
+					.catch(err => {
+						console.log(err);
+					});
+			}
+		},
+		// 提交申请
+		add() {
+			const obj = this;
+			if (obj.name == '') {
+				return this.$api.msg('请输入你的姓名');
+			}
+			if (obj.sex == '') {
+				return this.$api.msg('请输入你的姓别');
+			}
+			if (obj.phone == '') {
+				return this.$api.msg('请输入你的联系方式');
+			}
+			if (this.phone.length < 11) {
+				this.$api.msg('请输入正确的联系方式');
+				return;
+			}
+			if (obj.code == '') {
+				return this.$api.msg('请输入你的验证码');
+			}
+			if (obj.imgList.length == 0) {
+				return this.$api.msg('请上传你的身份证照片');
+			}
+			apply({ name: obj.name, sex: obj.sex == '男' ? 1 : 2, phone: obj.phone, images: obj.imgList, captcha: obj.code }).then(e => {
+				uni.navigateTo({
+					url: '/pages/order/success?type=2'
+				});
+			});
+		}
+	}
+};
+</script>
 
 <style lang="scss">
 page,
@@ -11,4 +188,113 @@ page,
 	height: auto;
 	background: #f2f3f5;
 }
+.info-box {
+	width: 690rpx;
+	margin: 20rpx auto 0;
+	background: #ffffff;
+	border-radius: 10rpx;
+	.info-item {
+		justify-content: flex-start;
+		padding: 38rpx 20rpx;
+		.info-item-left {
+			width: 140rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.info-item-right {
+			margin-left: 70rpx;
+			width: 260rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #999999;
+			.placeholder {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+			}
+		}
+		.info-item-yzm {
+			margin-left: 100rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #ff6f0f;
+		}
+	}
+}
+.upload-image {
+	width: 160rpx;
+	height: 160rpx;
+	border-radius: 10rpx;
+}
+.upload-title {
+	font-size: 30rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.upload-main {
+	padding-top: 32rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+	.upload-font {
+		margin-top: 24rpx;
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		color: #333333;
+	}
+}
+.upload {
+	width: 690rpx;
+	margin: 20rpx auto 0;
+	padding: 34rpx 30rpx 40rpx 30rpx;
+	background: #ffffff;
+	.add-img-box {
+		width: 100%;
+		flex-direction: row;
+		flex-wrap: wrap;
+		margin-top: 50rpx;
+	}
+	.add-img-item {
+		width: 180rpx;
+		height: 180rpx;
+		border-radius: 24rpx;
+		position: relative;
+		margin: 0rpx 20rpx;
+		margin-bottom: 25rpx;
+		.add-img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+.add-img-del {
+	position: absolute;
+	width: 40rpx;
+	height: 40rpx;
+	left: 155rpx;
+	bottom: 155rpx;
+	//background-color: rgba(238, 0, 0, 1);
+	border-radius: 20rpx;
+}
+.btn {
+	position: fixed;
+	bottom: 0;
+	width: 750rpx;
+	height: 98rpx;
+	background: #24a17d;
+	text-align: center;
+	font-size: 36rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	line-height: 98rpx;
+}
 </style>

+ 437 - 156
pages/user/coupon.vue

@@ -1,54 +1,92 @@
 <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 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">
 				<!-- 空白页 -->
 				<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-				<view v-for="(item, index) in tabItem.orderList" :key="index" class="row flex">
-					<view class="list-money flex">
-						<image :src="item._type == 2 ? '/static/img/img03.png' : '/static/img/img02.png'" mode="scaleToFill"></image>
-						<view class="list-money-text">
-							<view class="tit" :class="{ action: item._type} == 2">
-								<text>{{ item.coupon_price }}</text>
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="main-item">
+						<view class="main-item-top flex">
+							<view class="main-item-top-bg"><image src="../../static/img/cardTop.png" mode=""></image></view>
+							<view class="main-item-top-left">
+								<view class="main-item-title">{{ item.name }}</view>
+								<view class="main-item-time">购买时间{{ item.create_time }}</view>
 							</view>
-							<view class="price">
-								<text>满{{ item.use_min_price }}元</text>
-							</view>
-						</view>
-					</view>
-					<view class="list-interval position-relative">
-						<view class="bottom"></view>
-						<view class="top"></view>
-					</view>
-					<view class="row_list_right">
-						<view class="right_top">
-							<text class="right_title" :class="{ action: item._type == 2}">{{ item.coupon_title }}</text>
+							<view class="main-item-type">{{ item.type == 1 ? '时效卡' : '次卡' }}</view>
 						</view>
-						<view class="right_time">
-							<text>{{ item._add_time }}-{{ item.end_time }}</text>
-						</view>
-						<view class="right_use action" v-if="item._type == 2">
-							<text>{{ item._msg }}</text>
-						</view>
-						<view class="right_use noAction" v-if="item._type == 0">
-							<text>{{ item._msg }}</text>
+						<view class="main-item-bottom">
+							<view class="main-item-bottom-bg"><image src="../../static/img/cardbottom.png" mode=""></image></view>
+							<view class="flex">
+								<view class="main-item-price">
+									<text class="fh">卡券码:</text>
+									{{ item.card }}
+									<text class="time" @click="copy(item.card)">复制</text>
+								</view>
+								<view class="main-item-bottom-type" v-if="tabCurrentIndex == 2">已过期</view>
+								<view class="main-item-info-right" v-if="tabCurrentIndex == 0">
+									<view class="main-item-info-font" @click="navTo('/pages/user/mycardDetail?id=' + item.id)">查看详情</view>
+									<view class="main-item-info-icon"><image src="../../static/img/img39.png" mode=""></image></view>
+								</view>
+							</view>
+							<view class="main-item-info flex">
+								<view class="main-item-info-left" v-if="tabCurrentIndex == 1 && item.type == 1">{{ item.end_time }}后失效</view>
+								<view class="main-item-info-left" v-if="tabCurrentIndex == 1 && item.type == 2">总使用次数{{ item.number }}</view>
+								<view class="flex" v-if="tabCurrentIndex == 0 && !item.show">
+									<view class="info">
+										激活密码:
+										<text v-for="l in item.pwd.length">*</text>
+									</view>
+									<image class="image" src="../../static/img/img43.png" @click="showPick(item)"></image>
+									<!-- <view class="copy">复制</view> -->
+								</view>
+								<view class="flex" v-if="tabCurrentIndex == 0 && item.show">
+									<view class="info">激活密码:{{ item.pwd }}</view>
+									<image class="image" src="../../static/img/img29.png" @click="showPick(item)"></image>
+									<view class="copy" @click="copy(item.pwd)">复制</view>
+								</view>
+								<view class="main-item-info-left" v-if="tabCurrentIndex == 2">卡券已被激活</view>
+								<view class="main-item-info-btn" @click="jihuo(item)" v-if="tabCurrentIndex == 0">一键激活</view>
+								<view class="main-item-info-right" v-if="tabCurrentIndex != 0">
+									<view class="main-item-info-font" @click="navTo('/pages/user/mycardDetail?id=' + item.id)">查看详情</view>
+									<view class="main-item-info-icon"><image src="../../static/img/img39.png" mode=""></image></view>
+								</view>
+							</view>
 						</view>
 					</view>
-				</view>
-				<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
 			</swiper-item>
 		</swiper>
+		<view class="btn" @click="openPopup()">卡券激活</view>
+		<uni-popup ref="popup" type="center">
+			<view class="img1"><image src="../../static/img/jh3.png" mode=""></image></view>
+			<view class="popup-box">
+				<view class="img"><image src="../../static/img/jh1.png" mode=""></image></view>
+				<view class="mian">
+					<view class="delivery"><view class="title">卡券激活</view></view>
+					<view class="comfirm-box">
+						<view class="input"><input type="text" v-model="card" placeholder="请输入卡号" /></view>
+						<view class="input"><input type="text" v-model="pwd" placeholder="请输入密码" /></view>
+					</view>
+					<view class="popup-btn" @click="jihuo()">立即激活</view>
+				</view>
+			</view>
+			<view class="x" @click="cancel()"><image src="../../static/img/jh2.png" mode=""></image></view>
+		</uni-popup>
 	</view>
 </template>
 
 <script>
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
-import { getCouponsList } from '@/api/order.js';
-export default{
+import { getCouponsList, use_card } from '@/api/jdr.js';
+import uniCopy from '@/utils/uni-copy.js';
+import { getTime } from '@/utils/rocessor.js';
+export default {
 	components: {
 		uniLoadMore,
 		empty
@@ -56,29 +94,31 @@ export default{
 	data() {
 		return {
 			tabCurrentIndex: 0,
-			navList:[
+			pwd: '',
+			card: '',
+			navList: [
 				{
-					state: 0,
-					text: '全部',
+					state: 1,
+					text: '未使用',
 					loadingType: 'more',
 					orderList: [],
-					page: 1,//当前页数
+					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 1,
-					text: '使用',
+					state: 2,
+					text: '使用',
 					loadingType: 'more',
 					orderList: [],
 					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
 				{
-					state: 2,
-					text: '已使用',
+					state: 3,
+					text: '已失效',
 					loadingType: 'more',
 					orderList: [],
-					page: 1,//当前页数
+					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				}
 			]
@@ -89,48 +129,55 @@ export default{
 	},
 	methods: {
 		//返回首页
-		navTo(){
-			uni.switchTab({
-				url: '/pages/index/index'
+		navTo(url) {
+			uni.navigateTo({
+				url
 			});
 		},
+		showPick(item) {
+			item.show = !item.show;
+		},
 		//获取订单列表
 		loadData(source) {
 			//将订单挂载到tab列表下
 			let index = this.tabCurrentIndex;
 			let navItem = this.navList[index];
 			let state = navItem.state;
+			if (source === 'shua') {
+				navItem.loaded = false;
+				navItem.page = 1;
+				navItem.limit = 10;
+				navItem.loadingType = 'more';
+				navItem.orderList = [];
+			}
 			if (source === 'tabChange' && navItem.loaded === true) {
 				//tab切换只有第一次需要加载数据
 				return;
 			}
-			if (navItem.loadingType === 'loading'){
+			if (navItem.loadingType === 'loading') {
 				//防止重复加载
 				return;
 			}
 			//修改当前对象状态为加载中
 			navItem.loadingType = 'loading';
-			getCouponsList(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				index
-			)
+			getCouponsList({
+				page: navItem.page,
+				limit: navItem.limit,
+				status: 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
+					data.forEach(e => {
+						e.show = false;
+						e.end_time = getTime(e.end_time);
 					});
-					navItem.orderList = navItem.orderList.concat(da);
+					navItem.orderList = navItem.orderList.concat(data);
 					console.log(navItem.orderList);
 					navItem.page++;
 					if (navItem.limit == data.length) {
 						// 判断是否还有数据,有改为more,没有改为noMore
 						navItem.loadingType = 'more';
 						return;
-					}else {
+					} else {
 						navItem.loadingType = 'noMore';
 					}
 					uni.hideLoading();
@@ -138,7 +185,7 @@ export default{
 				})
 				.catch(e => {
 					console.log(e);
-				})
+				});
 		},
 		//swiper 切换
 		changeTab(e) {
@@ -148,6 +195,69 @@ export default{
 		//顶部tab点击
 		tabClick(index) {
 			this.tabCurrentIndex = index;
+		},
+		copy(value) {
+			let content = value; //需要复制的内容
+			console.log('复制的内容:', content);
+			// content = typeof content === 'string' ? content : content.toString(); // 复制内容,必须字符串,数字需要转换为字符串
+			const result = uniCopy({ content });
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		openPopup() {
+			this.$refs.popup.open();
+		},
+		// 弹窗 - 取消
+		cancel() {
+			this.card = '';
+			this.pwd = '';
+			this.$refs.popup.close();
+		},
+		jihuo(item) {
+			const obj = this;
+			let card = '';
+			let pwd = '';
+			if (item) {
+				card = item.card;
+				pwd = item.pwd;
+			} else {
+				card = this.card;
+				pwd = this.pwd;
+			}
+			if (card == '') {
+				return this.$api.msg('请填写卡号');
+			}
+			if (pwd == '') {
+				return this.$api.msg('请填写密码');
+			}
+			uni.showModal({
+				title: '提示',
+				content: '是否激活改卡?',
+				success: function(res) {
+					if (res.confirm) {
+						use_card({
+							card: card,
+							pwd: pwd
+						}).then(e => {
+							uni.showModal({
+								title: '提示',
+								content: '激活卡片成功'
+							});
+							obj.loadData('shua');
+						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
+				}
+			});
 		}
 	}
 };
@@ -165,12 +275,15 @@ page,
 .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:first-child {
+		border-left: none;
+	}
 	.nav-item {
+		border-left: 1px solid #e7e7e7;
 		flex: 1;
 		display: flex;
 		justify-content: center;
@@ -180,131 +293,299 @@ page,
 		color: $font-color-dark;
 		position: relative;
 		&.current {
-			color: #bc253a;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid #bc253a;
-			}
+			color: #24a17d;
 		}
 	}
 }
 
 .swiper-box {
-	height: calc(100% - 40px);
+	height: calc(100% - 100px);
 	.tab-content {
-		padding: 25rpx 0px;
-		font-size: 28rpx;
-		color: #1b1b1b;
+		padding: 25rpx;
 	}
 }
 
-.row {
-	border-radius: 15rpx;
-	margin: 0 25rpx;
-	margin-bottom: 25rpx;
-	height: 200rpx;
-	overflow: hidden;
-	background-color: #ffffff;
-	.list-interval {
-		border: 1px dashed $border-color-light;
-		height: 100%;
-		.top,
-		.bottom {
-			border-radius: 100rpx;
-			width: 30rpx;
-			height: 30rpx;
+// uni-load-more
+.uni-load-more {
+	display: flex;
+	flex-direction: row;
+	height: 80rpx;
+	align-items: center;
+	justify-content: center;
+}
+.main-item {
+	.main-item-top {
+		align-items: flex-start;
+		width: 702rpx;
+		height: 150rpx;
+		position: relative;
+		.main-item-top-bg {
 			position: absolute;
-			background-color: $page-color-base;
-			right: -15rpx;
-		}
-		.top {
-			top: -18rpx;
-		}
-		.bottom {
-			bottom: -18rpx;
-		}
-	}
-	.list-money {
-		height: 100%;
-		image {
-			height: 100%;
-			width: 20rpx;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 702rpx;
+			height: 150rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
 		}
-		.list-money-text {
-			width: 220rpx;
-			padding: 0 25rpx;
-			text-align: center;
-			color: $font-color-light;
-			.tit {
-				padding: 15rpx 0rpx;
-				font-size: 55rpx;
+		.main-item-top-left {
+			position: relative;
+			z-index: 2;
+			padding: 40rpx 0 0 30rpx;
+			line-height: 1;
+			.main-item-title {
+				font-size: 42rpx;
+				font-family: PingFang SC;
 				font-weight: bold;
-				&.action {
-					color: $card-color-action;
-				}
+				color: #c99f62;
 			}
-			.price {
-				padding-bottom: 25rpx;
+			.main-item-time {
+				margin-top: 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #d6d1d1;
 			}
 		}
+		.main-item-type {
+			padding: 56rpx 24rpx 0 0;
+			position: relative;
+			z-index: 2;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #d6d1d1;
+		}
 	}
-	.row_list_right {
-		flex-grow: 1;
-		padding-left: 25rpx;
+	.main-item-bottom {
+		width: 702rpx;
+		height: 176rpx;
+		position: relative;
+		padding: 30rpx 30rpx 0;
 		line-height: 1;
-		.right_time {
-			color: $font-color-light;
-			font-size: $font-sm;
+		.main-item-bottom-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 702rpx;
+			height: 176rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
 		}
-		.right_use {
-			margin: 15rpx 0;
-			padding: 10rpx;
-			width: 140rpx;
-			text_align: center;
-			border-radius: 50rpx;
-			color: #fff;
-			font-size: $font-sm - 4rpx;
-			&.action {
-				background-color: $card-color-action;
+		.main-item-price {
+			width: 100%;
+			position: relative;
+			z-index: 2;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ff6f0f;
+			.fh {
+				color: #333333;
 			}
-			&.noAction {
-				background-color: $color-gray;
+			.time {
+				display: inline-block;
+				margin-left: 4rpx;
+				color: #333333;
+				text-decoration: underline;
 			}
 		}
-		.right_top {
-			margin: 15rpx 0;
-			font-size: $font-lg;
-			height: 50rpx;
-			color: $font-color-light;
-			.right_name {
-				font-weight: bold;
+		.main-item-bottom-type {
+			position: relative;
+			z-index: 2;
+			flex-shrink: 0;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+		.main-item-info-right {
+			position: relative;
+			z-index: 2;
+			flex-shrink: 0;
+			display: flex;
+			align-items: center;
+			line-height: 1;
+			.main-item-info-font {
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				margin-right: 10rpx;
 			}
-			.right_title {
-				font-weight: bold;
-				&.action {
-					color: $font-color-base;
+			.main-item-info-icon {
+				position: relative;
+				top: -10rpx;
+				width: 19rpx;
+				height: 19rpx;
+				image {
+					width: 100%;
+					height: 100%;
 				}
 			}
 		}
-	}
-	
-	.iconlocation {
-		font-size: 36rpx;
-		color: $font-color-light;
+		.main-item-info {
+			position: relative;
+			z-index: 2;
+			margin-top: 20rpx;
+			.main-item-info-left {
+				width: 100%;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+			.main-item-info-btn {
+				width: 127rpx;
+				height: 44rpx;
+				background: #ff6f0f;
+				border-radius: 22rpx;
+				font-size: 22rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #ffffff;
+				line-height: 44rpx;
+				text-align: center;
+			}
+		}
 	}
 }
-// uni-load-more
-.uni-load-more {
+.image {
+	width: 44rpx;
+	height: 30rpx;
+}
+.info {
+	width: 350rpx;
+	margin-right: 10rpx;
+	font-size: 26rpx;
+	font-weight: 500;
+	color: #666666;
+}
+.copy {
+	margin-left: 10rpx;
+	font-size: 22rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	text-decoration: underline;
+	color: #333333;
+}
+.list-scroll-content {
+	height: 100%;
+}
+.btn {
+	margin: 10rpx auto 0;
+	width: 622rpx;
+	height: 85rpx;
+	background: #ff6f0f;
+	border-radius: 15rpx;
+	line-height: 85rpx;
+	text-align: center;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #ffffff;
+}
+.img1 {
+	width: 560rpx;
+	height: 182rpx;
 	display: flex;
-	flex-direction: row;
-	height: 80rpx;
-	align-items: center;
 	justify-content: center;
+	image {
+		width: 462rpx;
+		height: 182rpx;
+	}
+}
+.popup-box {
+	margin-top: -50rpx;
+	width: 560rpx;
+	background: #ffffff;
+	border-radius: 30rpx;
+	position: relative;
+	padding-bottom: 50rpx;
+	.img {
+		position: relative;
+		top: -80rpx;
+		left: 0;
+		width: 560rpx;
+		height: 186rpx;
+		display: flex;
+		justify-content: center;
+		image {
+			width: 177rpx;
+			height: 186rpx;
+		}
+	}
+
+	.mian {
+		margin-top: -44rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		// padding: 32rpx 32rpx;
+		background-color: #ffffff;
+		border-radius: 0 0 20rpx 20rpx;
+		text-align: center;
+
+		.delivery {
+			font-size: 40rpx;
+			color: #333333;
+			display: flex;
+			align-items: center;
+			flex-direction: column;
+			.title {
+			}
+			image {
+				margin-top: 48rpx;
+				width: 172rpx;
+				height: 160rpx;
+			}
+		}
+		.comfirm-box {
+			margin-top: 30rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			.input {
+				font-size: 26rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #999999;
+				text-align: left;
+				width: 439rpx;
+				background: #f5f5f5;
+				border-radius: 10rpx;
+				margin-top: 20rpx;
+				padding: 20rpx 26rpx;
+			}
+		}
+		.popup-btn {
+			width: 403rpx;
+			height: 83rpx;
+			background: #24a17d;
+			border-radius: 42rpx;
+			margin: 45rpx auto 0;
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+			line-height: 83rpx;
+			text-align: center;
+		}
+	}
+}
+.x {
+	margin: 35rpx auto 0;
+	width: 80rpx;
+	height: 80rpx;
+	image {
+		width: 80rpx;
+		height: 80rpx;
+	}
 }
 </style>

+ 3 - 2
pages/user/extension.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="content">
 		<view class="content-money">
-			<view class="status_bar"><!-- 这里是状态栏 --></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>
@@ -39,7 +40,7 @@
 	</view>
 </template>
 <script>
-import { getExtensionData, getUserInfo, getSpreadPeople } from '@/api/user.js';
+import { getUserInfo, getSpreadPeople } from '@/api/user.js';
 import { mapState, mapMutations } from 'vuex';
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';

+ 158 - 0
pages/user/mycardDetail.vue

@@ -0,0 +1,158 @@
+<template>
+	<view class="container">
+		<view class="row b-b flex">
+			<text class="tit">卡片类型</text>
+			<view class="input">{{ info.cards[0].type == 1 ? '时效卡' : '次卡' }}</view>
+		</view>
+		<view v-for="(item, index) in info.cards">
+			<view class="row b-b flex">
+				<text class="tit">服务类型</text>
+				<view class="input">{{ item.name }}</view>
+			</view>
+			<view class="row b-b flex" v-if="info.cards[0].type != 1">
+				<text class="tit">剩余次数</text>
+				<view class="input">{{ item.number }}</view>
+			</view>
+		</view>
+		<view class="main">
+			<view class="title">
+				<view class="title-left"></view>
+				<view class="title-font">卡片详情</view>
+				<view class="title-right"></view>
+			</view>
+			<view class="detail-desc"><rich-text :nodes="info.introduce"></rich-text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { user_card_details } from '@/api/jdr.js';
+import { mapState, mapMutations } from 'vuex';
+export default {
+	data() {
+		return {
+			id: '',
+			info: '',
+			istype: false
+		};
+	},
+	computed: {
+		// #ifdef H5
+		...mapState(['weichatObj']),
+		// #endif
+		...mapState('user', ['userInfo'])
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+		this.loadData();
+	},
+	methods: {
+		loadData() {
+			user_card_details({}, this.id).then(({ data }) => {
+				this.info = data;
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.container {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+}
+.top {
+	position: relative;
+	height: 346rpx;
+	width: 750rpx;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+}
+.main {
+	position: relative;
+	z-index: 2;
+	width: 750rpx;
+	background: #ffffff;
+	border-radius: 20rpx 20rpx 5rpx 5rpx;
+	margin-top: -10rpx;
+	padding: 46rpx 44rpx;
+	.title {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.title-font {
+			font-size: 32rpx;
+			font-family: ZhenyanGB;
+			font-weight: 400;
+			color: #bd9360;
+		}
+	}
+}
+.btn {
+	width: 620rpx;
+	height: 80rpx;
+	background: linear-gradient(270deg, #ffe7c4, #ffce8a);
+	border-radius: 40rpx;
+	margin: 58rpx auto 0;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #9f570e;
+	line-height: 80rpx;
+	text-align: center;
+}
+.two {
+	margin: 26rpx 0 0;
+	font-size: 28rpx;
+	text-align: center;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #999999;
+	text {
+		color: #ff383e;
+	}
+}
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 30rpx;
+	background: #fff;
+	.order-status {
+		font-size: $font-lg;
+		color: $color-red;
+		font-weight: 500;
+	}
+	.refund {
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.noRefund {
+		font-size: 30rpx;
+		color: $font-color-light;
+	}
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		text-align: right;
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		&.payColor {
+			color: $color-red;
+		}
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+</style>

+ 223 - 243
pages/user/shareQrCode.vue

@@ -1,105 +1,188 @@
 <template>
-	<view class="content">
-		<!-- <view class="qrimg">
-			<tki-qrcode
-				:cid="cid"
-				ref="qrcode"
-				:val="val"
-				:size="size"
-				:unit="unit"
-				:background="background"
-				:foreground="foreground"
-				:pdground="pdground"
-				:icon="icon"
-				:iconSize="iconSize"
-				:lv="lv"
-				:onval="onval"
-				:loadMake="loadMake"
-				:usingComponents="usingComponents"
-				@result="qrR"
-			/>
-		</view> -->
-		<!-- #ifndef MP-ALIPAY -->
-		<canvas :class="{ qrimg: !loading }" @longtap="alertCanv" id="qrShareBox" canvas-id="qrShareBox" class="tki-qrcode-canvas" />
+	<view class="container">
+		<swiper class="posters-box" :autoplay="false" :circular="false" :interval="3000" :duration="500" @change="bindchange" previous-margin="40px" next-margin="40px">
+			<block v-for="(item, index) in shareList" :key="index">
+				<swiper-item>
+					<!-- #ifndef MP -->
+					<image class="slide-image" :class="swiperIndex == index ? 'active' : 'quiet'" mode="aspectFill" :src="item.wap_poster"></image>
+					<!-- #endif -->
+
+					<!-- #ifdef MP -->
+					<image class="slide-image" :class="swiperIndex == index ? 'active' : 'quiet'" mode="aspectFill" :src="item.poster"></image>
+					<!-- #endif -->
+				</swiper-item>
+			</block>
+		</swiper>
+		<!-- #ifndef MP -->
+		<div class="preserve">
+			<div class="line"></div>
+			<div class="tip">长按保存图片</div>
+			<div class="line"></div>
+		</div>
 		<!-- #endif -->
-		<!-- #ifdef MP-ALIPAY -->
-		<canvas :class="{ qrimg: !loading }" @longtap="alertCanv" id="qrShareBox" class="tki-qrcode-canvas" />
+
+		<!-- #ifdef MP -->
+		<view class="keep" @click="savePosterPath">保存海报</view>
 		<!-- #endif -->
-		<view :style="{ display: loading ? 'none' : 'block' }" class="tki-qrcode-canvas"><image :src="ctxSrc" mode="scaleToFill" class="tki-qrcode-canvas"></image></view>
-		<view class="share-bottom flex" :class="{ 'action-share-bottom': !loading }" @click="loading ? showImg() : ''">
-			<text>{{ loading ? '点击生成图片' : '长按二维码下载' }}</text>
-		</view>
 	</view>
 </template>
 
 <script>
-// import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
 import { spreadBanner } from '@/api/user.js';
+import { mapState } from 'vuex';
 export default {
-	// components: { tkiQrcode },
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		// if (res.from === 'button') {
+
+		// 保存邀请人
+		let path = '/pages/index/index?' + 'spread=' + this.userInfo.uid;
+		console.log('path', path);
+		let data = {
+			path: path,
+			imageUrl: this.poster,
+			title: this.userInfo.nickname + '邀请您进入智播商城'
+		};
+		console.log('---data---', data);
+		return data;
+		// }
+	},
+	// #endif
 	data() {
 		return {
-			cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
-			size: 180, //生成的二维码大小
-			unit: 'upx', //大小单位尺寸
-			// show: true,//默认使用组件中的image标签显示二维码
-			val: '', //要生成的内容
-			background: '#ffffff', //二维码背景色
-			foreground: '#333333', //二维码前景色
-			pdground: '#333333', //二维码角标色
-			icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
-			iconSize: 40, //二维码图标大小
-			lv: 3, //容错级别
-			onval: false, //监听val值变化自动重新生成二维码
-			loadMake: false, //组件初始化完成后自动生成二维码,val需要有值
-			usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
-			showLoading: false, //是否显示loading
-			loadingText: '二维码生成中', //loading文字
-			src: '', // 二维码生成后的图片地址或base64
-			ratio: 1, //页面比例用于计算
-			ctxSrc: '', //要显示的图片
-			loading: true,//是否载入图片中
-			canHeight: '',//画布高度
-			canWeidth: ''//画布宽度
+			shareList: [],
+			swiperIndex: 0,
+			poster: '' // 当前海报
 		};
 	},
-	onLoad() {
-		this.loadCodeList()
+	onLoad(option) {
+		console.log('---option---', option);
+		let path = '/pages/index/index?' + 'spread=' + this.userInfo.uid;
+		console.log('path', path);
+		// if(option.scene){
+		// 	// 存储邀请人
+		// 	this.spread = opt.pid;
+		// 	uni.setStorageSync('spread', opt.pid);
+		// }
+		this.loadData();
+	},
+	computed: {
+		...mapState(['userInfo'])
 	},
-	onReady() {
-		let obj = this;
-		let query = uni.createSelectorQuery();
-		// 获取页面比例
-		query
-			.select('.content')
-			.fields(
-				{
-					size: true
+	methods: {
+		bindchange(e) {
+			let shareList = this.shareList;
+			this.swiperIndex = e.detail.current;
+			// #ifdef MP
+			this.poster = shareList[this.swiperIndex].poster;
+			// #endif
+
+			// // #ifndef MP
+			// this.poster = shareList[this.swiperIndex].wap_poster;
+			// // #endif
+
+			console.log(this.poster);
+		},
+
+		// 保存海报
+		savePosterPath: function() {
+			let that = this;
+			if (that.poster == '') {
+				that.poster = that.shareList[0].poster;
+			}
+			uni.downloadFile({
+				url: that.poster,
+				success(resFile) {
+					if (resFile.statusCode === 200) {
+						uni.getSetting({
+							success(res) {
+								if (!res.authSetting['scope.writePhotosAlbum']) {
+									uni.authorize({
+										scope: 'scope.writePhotosAlbum',
+										success() {
+											uni.saveImageToPhotosAlbum({
+												filePath: resFile.tempFilePath,
+												success: function(res) {
+													return that.$api.msg('保存成功');
+												},
+												fail: function(res) {
+													return that.$api.msg(res.errMsg);
+												},
+												complete: function(res) {}
+											});
+										},
+										fail() {
+											uni.showModal({
+												title: '您已拒绝获取相册权限',
+												content: '是否进入权限管理,调整授权?',
+												success(res) {
+													if (res.confirm) {
+														uni.openSetting({
+															success: function(res) {
+																console.log(res.authSetting);
+															}
+														});
+													} else if (res.cancel) {
+														return that.$api.msg('已取消!');
+													}
+												}
+											});
+										}
+									});
+								} else {
+									uni.saveImageToPhotosAlbum({
+										filePath: resFile.tempFilePath,
+										success: function(res) {
+											return that.$api.msg('保存成功');
+										},
+										fail: function(res) {
+											return that.$api.msg(res.errMsg);
+										},
+										complete: function(res) {}
+									});
+								}
+							},
+							fail(res) {}
+						});
+					} else {
+						return that.$api.msg(resFile.errMsg);
+					}
 				},
-				e => {
-					// 保存比例
-					this.ratio = e.width / 750;
+				fail(res) {
+					return that.$api.msg(res.errMsg);
 				}
-			)
-			.exec();
-		// 获取画布宽高信息
-		query
-			.select('#qrShareBox')
-			.fields(
-				{
-					size: true
-				},
-				e => {
-					// 保存画布宽高信息
-					obj.canHeight = e.height;
-					obj.canWeidth = e.width;
+			});
+		},
+
+		// #ifdef MP-WEIXIN
+		// 保存画图图片到本地
+		seav(url) {
+			uni.showLoading({
+				title: '生成中...',
+				mask: true
+			});
+			uni.saveImageToPhotosAlbum({
+				filePath: this.poster,
+				complete(result) {
+					uni.hideLoading();
+					console.log(result);
+					uni.showToast({
+						title: '保存图片成功!',
+						duration: 2000,
+						icon: 'none'
+					});
 				}
-			)
-			.exec();
-	},
-	methods: {
-		loadCodeList() {
-			// 加载二维码信息
+			});
+		},
+		// #endif
+
+		// 获取海报
+		loadData() {
+			let obj = this;
+			uni.showLoading({
+				title: '获取中',
+				mask: true
+			});
 			spreadBanner({
 				// #ifdef H5
 				type: 2,
@@ -107,177 +190,74 @@ export default {
 				// #ifdef MP
 				type: 1
 				// #endif
-			}).then(e => {
-				console.log(e);
-				// #ifdef MP
-				// 保存二维码图片
-				uni.downloadFile({
-					url: e.data[0].wap_posterQr,
-					success(res) {
-						if (res.errMsg == 'downloadFile:ok') {
-							obj.src = res.tempFilePath;
-							// 生成画布
-							obj.loadImg(obj.src);
-							uni.hideLoading();
-						}
-						console.log(res);
-					},
-					fail(e) {
-						console.log(e);
-					}
+			})
+				.then(res => {
+					uni.hideLoading();
+					obj.shareList = res.data;
+					console.log('obj.shareList', obj.shareList);
 				})
-				// #endif
-				// #ifdef H5
-					// 保存二维码图片
-					this.src =  e.data[0].wap_posterQr;
-					// 生成画布
-					this.loadImg(e.data[0].wap_posterQr);
-				// #endif
-				
-			}).catch((e) => {
-					uni.showModal({
-						title: '生成失败请刷新页面',
-						showCancel: false
-					});
+				.catch(err => {
 					uni.hideLoading();
-				});;
-		},
-		// 长按画布事件
-		alertCanv() {
-			uni.showModal({
-				title: '请先点击生成图片再下载',
-				showCancel: false
-			});
-		},
-		// 生成图片
-		showImg() {
-			uni.showLoading({
-				title: '图片生成中',
-				mask: true
-			});
-			let obj = this;
-			//因为和uni.showLoading载入效果冲突需要延迟执行生成图片方法
-			setTimeout(function() {
-				uni.canvasToTempFilePath({
-					x: 0,
-					y: 0,
-					width: obj.canWeidth,
-					height: obj.canHeight,
-					destWidth: obj.canWeidth,
-					destHeight: obj.canHeight,
-					fileType: 'jpg',
-					quality: 1,
-					canvasId: 'qrShareBox',
-					success: res => {
-						uni.hideLoading();
-						uni.showModal({
-							title: '创建成功,长按二维码下载图片',
-							showCancel: false
-						});
-						// 显示生成的图片
-						obj.loading = false;
-						// 保存图片base64
-						obj.ctxSrc = res.tempFilePath;
-					},
-					fail(e) {
-						console.log(e);
-					}
 				});
-			}, 50);
-		},
-		// 开始渲染画布
-		loadImg(src) {
-			const obj = this;
-			const cavWidth=523;//画布宽度
-			const cavHeight=700;//画布高度
-			const ratio = obj.ratio;//获取页面比例
-			const ctxBg = '/static/img/img14.jpg'; //画布背景
-			let context = uni.createCanvasContext('qrShareBox');
-			const codeSize = obj.size * ratio; //计算二维码大小
-			const codeX = ((cavWidth - obj.size) * ratio) / 2; //二维码所在x轴位置
-			const codeY = cavHeight * ratio; //二维码所在y轴位置
-			const codeBoxColor = '#FFFFFF'; //包裹框颜色
-			const codeBoxWidht = 0; //包裹边框宽度
-			const codeBoxSize = (codeBoxWidht / 2) * ratio; //计算二维码白色包裹框大小
-			const codeBoxX = codeX - codeBoxSize; //包裹框初始X轴
-			const codeBoxY = codeY - codeBoxSize; //包裹框初始Y轴
-			const codeBoxEnd = codeSize + codeBoxWidht * ratio; //计算包裹框大小
-			const fontTop = codeY + codeBoxEnd + (codeBoxWidht + 20) * this.ratio; //文字距离上边距高度
-			const fontSize = 24 * ratio; //文字大小
-			const fontText = ''; //文字内容
-			const fontLeft = (codeSize - fontSize * fontText.length) / 2 + codeX; //文字左侧距离
-			// 插入背景图片
-			context.drawImage(ctxBg, 0, 0, obj.canWeidth, obj.canHeight);
-			// // 插入文字
-			context.setFontSize(fontSize);
-			context.fillText(fontText, fontLeft, fontTop);
-			// 插入边框
-			context.beginPath();//开始画线
-			context.setLineJoin('round'); //边框类型
-			context.setLineWidth(codeBoxWidht * ratio);
-			context.setStrokeStyle(codeBoxColor); //设置包裹框颜色
-			context.strokeRect(codeBoxX, codeBoxY, codeBoxEnd, codeBoxEnd);
-			context.stroke();//渲染线条
-			// 插入二维码
-			context.drawImage(src, codeX, codeY, codeSize, codeSize);
-			// 开始渲染
-			context.draw();
-		},
-		// 創建二维码
-		creatQrcode() {
-			this.$refs.qrcode._makeCode();
-		},
-		// 保存二维码到图库
-		saveQrcode() {
-			this.$refs.qrcode._saveCode();
-		},
-		// 生成二维码后返回base64
-		qrR(res) {
-			this.src = res;
-		},
-		//清空二维码(清空二维码会触发result回调 返回值为空)
-		clearQrcode(e) {
-			this.$refs.qrcode._clearCode();
-			this.val = '';
 		}
 	}
 };
 </script>
 
 <style lang="scss">
-.content {
-	padding-top: 30rpx;
+page {
+	background: #a3a3a3;
+	height: 100%;
 }
-// #qrShareBox {
-// 	position: absolute;
-// 	left: -9999rpx;
-// 	top: -9999rpx;
-// }
+.container {
+	width: 100%;
+	.posters-box {
+		width: 100%;
+		height: 1000rpx;
+		margin-top: 40rpx;
+		.slide-image {
+			width: 100%;
+			height: 100%;
+			border-radius: 15rpx;
+		}
+	}
+	.posters-box .slide-image.active {
+		transform: none;
+		transition: all 0.2s ease-in 0s;
+	}
 
-.qrimg {
-	position: absolute;
-	left: -9999rpx;
-	top: -9999rpx;
-}
-.tki-qrcode-canvas {
-	// width: 700rpx;
-	// height: 1245rpx;
-	width: 532rpx;
-	height: 945rpx;
-	margin: 0 auto;
+	.posters-box .slide-image.quiet {
+		transform: scale(0.8333333);
+		transition: all 0.2s ease-in 0s;
+	}
+
+	.keep {
+		font-size: 30rpx;
+		background: $base-color;
+		color: #fff;
+		width: 600rpx;
+		height: 80rpx;
+		border-radius: 50rpx;
+		text-align: center;
+		line-height: 80rpx;
+		margin: 38rpx auto;
+	}
 }
-.share-bottom {
-	width: 560rpx;
-	height: 80rpx;
-	color: #ffffff;
-	background-color: $base-color;
-	margin: 0 auto;
-	font-size: $font-lg - 2rpx;
-	margin-top: 30rpx;
-	border-radius: 99rpx;
+.preserve {
+	color: #fff;
+	text-align: center;
+	margin-top: 38rpx;
+	display: flex;
+	align-items: center;
 	justify-content: center;
-	&.action-share-bottom {
-		background-color: $color-gray;
+	.line {
+		width: 100rpx;
+		height: 1px;
+		background-color: #fff;
+	}
+	.tip {
+		margin: 0 20rpx;
+		font-size: 28rpx;
 	}
 }
 </style>

+ 178 - 23
pages/user/user.vue

@@ -6,30 +6,60 @@
 		<view class="user-box">
 			<image class="avatar" :src="userInfo.avatar" mode="" v-if="userInfo.avatar"></image>
 			<image class="avatar" src="../../static/error/missing-face.png" mode="" v-else></image>
-			<view class="user-name">李丹丹</view>
-			<view class="user-phone">13245678911</view>
+			<view class="user-name">{{ userInfo.nickname || '游客' }}</view>
+			<view class="user-phone">{{ userInfo.phone || '******' }}</view>
 			<view class="user-money flex">
 				<view class="user-money-item" @click="navTo('/pages/money/balance')">
-					<view class="user-money-num">{{ userInfo.brokerage_price || 0 }}</view>
+					<view class="user-money-num">{{ userInfo.now_money || 0 }}</view>
 					<view class="user-money-font">我的余额</view>
 				</view>
 				<view class="user-xian"></view>
 				<view class="user-money-item" @click="navTo('/pages/money/wallet')">
-					<view class="user-money-num">{{ total || 0 }}</view>
+					<view class="user-money-num">{{ userInfo.brokerage_price || 0 }}</view>
 					<view class="user-money-font">我的佣金</view>
 				</view>
 				<view class="user-xian"></view>
 				<view class="user-money-item" @click="navTo('/pages/user/extension')">
-					<view class="user-money-num">{{ total || 0 }}</view>
+					<view class="user-money-num">{{ userInfo.spread_count || 0 }}</view>
 					<view class="user-money-font">我的推广</view>
 				</view>
 			</view>
 		</view>
-		<view class="shop flex" @click="navTo('/pages/user/becomeVip')">
+		<view class="shop flex" @click="becomeVip()" v-if="userInfo.is_receiver == 0">
 			<view class="shop-bg"><image src="../../static/img/usertitle.png" mode=""></image></view>
-			<view class="shop-left">申请成为接单员</view>
+			<view class="shop-left">申请成为接单员{{ type == 0 ? '(审核中)' : type == -1 ? '(审核失败)' : '' }}</view>
 			<view class="shop-right">立即申请</view>
 		</view>
+		<view v-if="userInfo.is_receiver == 1">
+			<view class="shop flex" @click="navTo('/pages/jdr/center')">
+				<view class="shop-bg"><image src="../../static/img/usertitle.png" mode=""></image></view>
+				<view class="shop-left">接单中心</view>
+				<view class="shop-right">立即进入</view>
+			</view>
+			<view class="main-box">
+				<view class="title flex" @click="navTo('/pages/jdr/order?state=0')">
+					<view class="title-left">
+						<image class="title-icon" src="../../static/icon/user2.png" mode=""></image>
+						<view class="title-font">我的接单</view>
+					</view>
+					<image class="title-right" src="../../static/icon/jt.png" mode=""></image>
+				</view>
+				<view class="main flex">
+					<view class="oitem" @click="navTo('/pages/jdr/order?state=0')">
+						<image class="oitem-image" src="../../static/icon/user3.png" mode=""></image>
+						<view class="oitem-font">进行中</view>
+					</view>
+					<view class="oitem" @click="navTo('/pages/jdr/order?state=1')">
+						<image class="oitem-image" src="../../static/icon/user4.png" mode=""></image>
+						<view class="oitem-font">待确认</view>
+					</view>
+					<view class="oitem" @click="navTo('/pages/jdr/order?state=2')">
+						<image class="oitem-image" src="../../static/icon/user5.png" mode=""></image>
+						<view class="oitem-font">已完成</view>
+					</view>
+				</view>
+			</view>
+		</view>
 		<!-- 我的工具 -->
 		<view class="my-tool flex" @click="navTo('/pages/user/shareQrCode')">
 			<view class="my-tool-left">
@@ -38,7 +68,7 @@
 			</view>
 			<image class="my-tool-right" src="../../static/icon/jt.png" mode=""></image>
 		</view>
-		<view class="my-tool flex" @click="navTo('/pages/set/address')">
+		<view class="my-tool flex" @click="navTo('/pages/user/coupon')">
 			<view class="my-tool-left">
 				<image class="my-tool-image2" src="../../static/icon/u2.png" mode=""></image>
 				<view class="my-tool-font">我的卡券</view>
@@ -82,7 +112,7 @@ import uniCopy from '@/utils/uni-copy.js';
 import { mapState, mapMutations } from 'vuex';
 import uniList from '@/components/uni-list/uni-list.vue';
 import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-import { orderData, getUserInfo } from '@/api/user.js';
+import { orderData, getUserInfo, user_apply } from '@/api/user.js';
 import { saveUrl, interceptor } from '@/utils/loginUtils.js';
 export default {
 	components: {
@@ -91,8 +121,10 @@ export default {
 	},
 	data() {
 		return {
+			type: 1,
 			text: '', // 客服
-			total: ''
+			total: '',
+			remarks: ''
 		};
 	},
 	onShow() {
@@ -129,25 +161,29 @@ export default {
 				.catch(e => {
 					console.log(e);
 				});
+			user_apply({}).then(({ data }) => {
+				if (data != []) {
+					this.type = data[0].status;
+					this.remarks = data[0].remarks;
+				}
+				console.log(data);
+			});
 		},
 		/**
 		 * 统一跳转接口,拦截未登录路由
 		 * navigator标签现在默认没有转场动画,所以用view
 		 */
 		navTo(url) {
-			uni.navigateTo({
-				url
-			});
-			// if (!this.hasLogin) {
-			// 	// 保存地址
-			// 	saveUrl();
-			// 	// 登录拦截
-			// 	interceptor();
-			// } else {
-			// 	uni.navigateTo({
-			// 		url
-			// 	});
-			// }
+			if (!this.hasLogin) {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			} else {
+				uni.navigateTo({
+					url
+				});
+			}
 		},
 		openPopup() {
 			this.$refs.popup.open();
@@ -170,6 +206,36 @@ export default {
 			}
 			this.$refs.popup.close();
 		},
+		becomeVip() {
+			if (this.type == 0) {
+				uni.showModal({
+					title: '提示',
+					content: '正在审核中,请耐心等待。'
+				});
+			}
+			if (this.type == -1) {
+				uni.showModal({
+					title: '提示',
+					content: '审核失败,失败原因:' + this.remarks + '。是否重新提交',
+					success: function(res) {
+						if (res.confirm) {
+							uni.navigateTo({
+								url: '/pages/user/becomeVip'
+							});
+						} else if (res.cancel) {
+							uni.navigateTo({
+								url: '/pages/user/becomeVip'
+							});
+						}
+					}
+				});
+			}
+			if (this.type == 1) {
+				uni.navigateTo({
+					url: '/pages/user/becomeVip'
+				});
+			}
+		},
 		// 客服弹窗 - 取消
 		cancel() {
 			this.$refs.popup.close();
@@ -309,6 +375,95 @@ page,
 		color: #f0e1c9;
 	}
 }
+.main-box {
+	margin: 20rpx auto 0;
+	width: 710rpx;
+	background: #ffffff;
+	box-shadow: 0px 4rpx 14rpx 0px rgba(229, 229, 229, 0.46);
+	border-radius: 20rpx;
+
+	.title {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		padding: 24rpx;
+		border-bottom: 1px solid #eeeeee;
+
+		.title-left {
+			display: flex;
+			align-items: center;
+
+			.title-icon {
+				width: 32rpx;
+				height: 32rpx;
+			}
+
+			.title-font {
+				margin-left: 20rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.title-right {
+			width: 14rpx;
+			height: 24rpx;
+		}
+	}
+
+	.main {
+		padding: 50rpx 0 30rpx;
+		.jg {
+			width: 1px;
+			height: 100rpx;
+			background: #eeeeee;
+		}
+		.item {
+			padding-bottom: 20rpx;
+			width: 25%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.item-num {
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.item-font {
+				margin-top: 18rpx;
+				font-size: 22rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+
+		.oitem {
+			width: 33%;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+
+			.oitem-image {
+				height: 40rpx;
+				width: 42rpx;
+			}
+
+			.oitem-font {
+				margin-top: 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+		}
+	}
+}
 .my-tool {
 	width: 690rpx;
 	background: #ffffff;

BIN
static/icon/user2.png


BIN
static/icon/user3.png


BIN
static/icon/user4.png


BIN
static/icon/user5.png


BIN
static/img/cardTop.png


BIN
static/img/cardbg.png


BIN
static/img/cardbottom.png


BIN
static/img/dbbg.png


BIN
unpackage/dist/dev/mp-weixin/static/icon/c3.png → static/img/img29.png


BIN
static/img/img43.png


BIN
static/img/jh1.png


BIN
static/img/jh2.png


BIN
static/img/jh3.png


BIN
static/img/jrzxbg.png


BIN
static/img/logo.png


BIN
static/img/order1.png


BIN
static/img/order2.png


BIN
static/img/order3.png


BIN
static/img/order4.png


BIN
static/img/order5.png


BIN
static/img/order6.png


BIN
static/img/order7.png


BIN
static/img/order8.png


BIN
static/img/order9.png


BIN
static/img/popup.png


BIN
static/img/success.png


BIN
static/tabBar/tab-cart-current.png


BIN
static/tabBar/tab-cart.png


BIN
static/tabBar/tab-cate-current.png


BIN
static/tabBar/tab-cate.png


BIN
static/tabBar/tab-home-current.png


BIN
static/tabBar/tab-home.png


BIN
static/tabBar/tab-my-current.png


BIN
static/tabBar/tab-my.png


+ 6 - 6
store/index.js

@@ -7,13 +7,13 @@ const store = new Vuex.Store({
 	namespaced: true,
 	state: {
 		// baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置 
-		baseURL:'http://base.liuniu946.com',//请求地址配置 
-		urlFile:'/index',//项目部署所在文件夹
+		baseURL: 'https://penzhen.liuniu946.com', //请求地址配置 
+		urlFile: '/index', //项目部署所在文件夹
 		userInfo: {}, //登录信息
-		loginInterceptor:false,//是否打开强制登录
+		loginInterceptor: false, //是否打开强制登录
 		// #ifdef H5 || MP-WEIXIN
-		weichatInfo:{},//保存微信注册信息
-		weichatObj:'',//微信对象
+		weichatInfo: {}, //保存微信注册信息
+		weichatObj: '', //微信对象
 		// #endif
 	},
 	mutations: {
@@ -26,7 +26,7 @@ const store = new Vuex.Store({
 			state.weichatObj = provider;
 		}
 	},
-	modules:{
+	modules: {
 		user
 	},
 	actions: {}

+ 0 - 0
unpackage/dist/build/.automator/mp-weixin/.automator.json


+ 4 - 0
unpackage/dist/build/mp-weixin/app.js

@@ -0,0 +1,4 @@
+
+require('./common/runtime.js')
+require('./common/vendor.js')
+require('./common/main.js')

+ 72 - 0
unpackage/dist/build/mp-weixin/app.json

@@ -0,0 +1,72 @@
+{
+  "pages": [
+    "pages/index/index",
+    "pages/index/yydb",
+    "pages/index/info",
+    "pages/index/yypz",
+    "pages/index/card",
+    "pages/index/cardDetail",
+    "pages/public/register",
+    "pages/public/login",
+    "pages/public/wxLogin",
+    "pages/public/forget",
+    "pages/set/phone",
+    "pages/set/userinfo",
+    "pages/user/user",
+    "pages/user/coupon",
+    "pages/user/becomeVip",
+    "pages/order/order",
+    "pages/order/success",
+    "pages/order/expressInfo",
+    "pages/order/orderDetail",
+    "pages/order/evaluate",
+    "pages/order/orderRefund",
+    "pages/jdr/center",
+    "pages/jdr/order",
+    "pages/jdr/evaluate",
+    "pages/money/pay",
+    "pages/money/paySuccess",
+    "pages/money/wallet",
+    "pages/money/balance",
+    "pages/money/withdrawal",
+    "pages/money/recharge",
+    "pages/user/mycardDetail",
+    "pages/redirect/redirect",
+    "pages/user/extension",
+    "pages/user/shareQrCode"
+  ],
+  "subPackages": [],
+  "window": {
+    "navigationBarTextStyle": "black",
+    "navigationBarTitleText": "uni-app",
+    "navigationBarBackgroundColor": "#FFFFFF",
+    "backgroundColor": "#f8f8f8"
+  },
+  "tabBar": {
+    "color": "#C0C4CC",
+    "selectedColor": "#5DBC7C",
+    "borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "static/tabBar/tab-home.png",
+        "selectedIconPath": "static/tabBar/tab-home-current.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/order/order",
+        "iconPath": "static/tabBar/tab-cate.png",
+        "selectedIconPath": "static/tabBar/tab-cate-current.png",
+        "text": "订单"
+      },
+      {
+        "pagePath": "pages/user/user",
+        "iconPath": "static/tabBar/tab-my.png",
+        "selectedIconPath": "static/tabBar/tab-my-current.png",
+        "text": "我的"
+      }
+    ]
+  },
+  "usingComponents": {}
+}

+ 3 - 0
unpackage/dist/build/mp-weixin/app.wxss

@@ -0,0 +1,3 @@
+@import './common/main.wxss';
+
+[data-custom-hidden="true"],[bind-data-custom-hidden="true"]{display: none !important;}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/common/main.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/common/main.wxss


File diff suppressed because it is too large
+ 2 - 0
unpackage/dist/build/mp-weixin/common/runtime.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/common/vendor.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/components/empty.js


+ 0 - 0
unpackage/dist/dev/mp-weixin/components/Loading/index.json → unpackage/dist/build/mp-weixin/components/empty.json


+ 1 - 0
unpackage/dist/build/mp-weixin/components/empty.wxml

@@ -0,0 +1 @@
+<view class="empty-content"><image class="empty-content-image" src="{{setSrc}}" mode="aspectFit"></image></view>

+ 1 - 0
unpackage/dist/build/mp-weixin/components/empty.wxss

@@ -0,0 +1 @@
+.empty-content{display:flex;align-items:center;justify-content:center;flex-direction:column;position:fixed;left:0;top:0;right:0;bottom:0;background:#f8f8f8;padding-bottom:120rpx}.empty-content-image{width:200rpx;height:200rpx}

File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.js


+ 6 - 0
unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.json

@@ -0,0 +1,6 @@
+{
+  "component": true,
+  "usingComponents": {
+    "trees": "/components/jyf-parser/libs/trees"
+  }
+}

+ 1 - 0
unpackage/dist/build/mp-weixin/components/jyf-parser/jyf-parser.wxml

@@ -0,0 +1 @@
+<view><block wx:if="{{!nodes.length}}"><slot></slot></block><view style="{{(showAm+(selectable?';user-select:text;-webkit-user-select:text':''))}}" id="_top"><trees vue-id="6b79763c-1" nodes="{{nodes}}" lazyLoad="{{lazyLoad}}" loading="{{loadingImg}}" bind:__l="__l"></trees></view></view>

Some files were not shown because too many files changed in this diff