Browse Source

2024-11-20

cmy 3 ngày trước cách đây
commit
73d82c572f
100 tập tin đã thay đổi với 23830 bổ sung0 xóa
  1. 6 0
      .gitignore
  2. 288 0
      App.vue
  3. 276 0
      api/activity.js
  4. 66 0
      api/functionalUnit.js
  5. 65 0
      api/index.js
  6. 64 0
      api/login.js
  7. 146 0
      api/order.js
  8. 186 0
      api/product.js
  9. 36 0
      api/set.js
  10. 196 0
      api/shop.js
  11. 272 0
      api/user.js
  12. 140 0
      api/wallet.js
  13. 37 0
      api/wx.js
  14. 18 0
      components/empty/empty.vue
  15. 1355 0
      components/wangding-pickerAddress/data.js
  16. 103 0
      components/wangding-pickerAddress/wangding-pickerAddress.vue
  17. 39 0
      libs/log.js
  18. 13 0
      main.js
  19. 203 0
      manifest.json
  20. 19 0
      package.json
  21. 441 0
      pages.json
  22. 510 0
      pages/home/cart.vue
  23. 216 0
      pages/home/category.vue
  24. 118 0
      pages/home/index.vue
  25. 591 0
      pages/home/user.vue
  26. 73 0
      pages/index/follow.vue
  27. 309 0
      pages/index/indexComponents/noUser.vue
  28. 334 0
      pages/index/notice.vue
  29. 310 0
      pages/index/noticeDetail.vue
  30. 535 0
      pages/index/share.vue
  31. 324 0
      pages/index/shopTab.vue
  32. 769 0
      pages/order/createOrder.vue
  33. 401 0
      pages/order/evaluate.vue
  34. 730 0
      pages/order/order.vue
  35. 633 0
      pages/order/orderAfter.vue
  36. 185 0
      pages/order/orderDetail.vue
  37. 296 0
      pages/order/orderRefund.vue
  38. 204 0
      pages/product/classify.vue
  39. 68 0
      pages/product/common/contentText.vue
  40. 139 0
      pages/product/common/discounts.vue
  41. 115 0
      pages/product/common/estimate.vue
  42. 78 0
      pages/product/common/freshDetail.vue
  43. 120 0
      pages/product/common/guessLike.vue
  44. 193 0
      pages/product/common/productBottom.vue
  45. 150 0
      pages/product/common/productContent.vue
  46. 55 0
      pages/product/common/topSwiper.vue
  47. 416 0
      pages/product/list.vue
  48. 688 0
      pages/product/product.vue
  49. 278 0
      pages/product/reply.vue
  50. 449 0
      pages/product/search.vue
  51. 252 0
      pages/product/showImg.vue
  52. 55 0
      pages/public/agreement.vue
  53. 160 0
      pages/public/domApp.vue
  54. 321 0
      pages/public/forget.vue
  55. 338 0
      pages/public/login.vue
  56. 260 0
      pages/public/loginMethods.vue
  57. 351 0
      pages/public/phoneLogin.vue
  58. 160 0
      pages/public/privacyAgreement.vue
  59. 156 0
      pages/public/redirect.vue
  60. 366 0
      pages/public/register.vue
  61. 724 0
      pages/public/userAgreement.vue
  62. 68 0
      pages/public/workwork.vue
  63. 382 0
      pages/public/wxLogin.vue
  64. 318 0
      pages/set/address.vue
  65. 250 0
      pages/set/addressManage.vue
  66. 235 0
      pages/set/password.vue
  67. 211 0
      pages/set/phone.vue
  68. 210 0
      pages/set/set.vue
  69. 169 0
      pages/set/userinfo.vue
  70. 239 0
      pages/user/award/account.vue
  71. 327 0
      pages/user/award/award.vue
  72. 199 0
      pages/user/award/awardList.vue
  73. 361 0
      pages/user/award/withdrawal.vue
  74. 407 0
      pages/user/money/pay.vue
  75. 108 0
      pages/user/money/paySuccess.vue
  76. 486 0
      pages/user/money/recharge.vue
  77. 268 0
      pages/user/money/wallet.vue
  78. 192 0
      pages/user/money/walletList.vue
  79. 438 0
      pages/user/myteam.vue
  80. 54 0
      pages/user/realName/cropper.vue
  81. 394 0
      pages/user/realName/realNameAuthentication.vue
  82. 348 0
      pages/user/scoreAccumulate.vue
  83. 314 0
      pages/user/shareQrCode.vue
  84. 507 0
      pages/user/shopPage.vue
  85. 557 0
      pages/user/userPage.vue
  86. 147 0
      plugin/image-tools/index.js
  87. 0 0
      plugin/jweixin-module/index.js
  88. BIN
      static/controller/baoxiu.png
  89. BIN
      static/controller/dianchi.png
  90. BIN
      static/controller/dingwei.png
  91. BIN
      static/controller/huanche.png
  92. BIN
      static/controller/kaisuo.png
  93. BIN
      static/controller/qidong.png
  94. BIN
      static/controller/shouquan.png
  95. BIN
      static/controller/witchMessage.png
  96. BIN
      static/controller/witchShop.png
  97. BIN
      static/controller/xincheng.png
  98. BIN
      static/controller/xunche.png
  99. 242 0
      static/css/cmy.css
  100. BIN
      static/error/emptyAddress.png

+ 6 - 0
.gitignore

@@ -0,0 +1,6 @@
+.DS_Store
+unpackage/dist
+unpackage/release
+unpackage/debug
+unpackage/cache
+.hbuilderx

+ 288 - 0
App.vue

@@ -0,0 +1,288 @@
+<script>
+/**
+ * vuex管理登陆状态,具体可以参考官方登陆模板示例
+ */
+import { mapMutations } from 'vuex';
+// #ifdef H5
+import { weixindata, setRouter } from './utils/wxAuthorized';
+// #endif
+// #ifdef APP-PLUS
+import { getUpApp } from './utils/upApp.js';
+// #endif
+export default {
+	data() {
+		return {
+			/* 保存微信信息 */
+			appData: {}
+		};
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'login', 'hasLogin']),
+		...mapMutations('shop', ['setShopInfo','setShopAction']),
+		...mapMutations(['setFirstUse'])
+	},
+	onLaunch: function(urlObj) {
+		console.log('开始升级');
+		const obj = this;
+		// 加载缓存中的用户信息
+		const userInfo = uni.getStorageSync('userInfo') || '';
+		// 判断是否拥有用户信息
+		if (userInfo.uid) {
+			//更新登陆状态
+			uni.getStorage({
+				key: 'userInfo',
+				success: res => {
+					obj.setUserInfo(res.data);
+					obj.login();
+				}
+			});
+		}
+		// 获取当前位置附近商店数据
+		const shopDetail = uni.getStorageSync('shopDetail') ||'';
+		if(shopDetail){
+			uni.getStorage({
+				key: 'shopDetail',
+				success: res => {
+					obj.setShopInfo(res.data);
+				}
+			});
+		}
+		// 获取商家用户数据
+		const shopDetailAction = uni.getStorageSync('shopDetailAction') ||'';
+		if(shopDetailAction){
+			uni.getStorage({
+				key: 'shopDetailAction',
+				success: res => {
+					obj.setShopAction(res.data);
+				}
+			});
+		}
+		// 获取是否已经在如果引导图
+		const guideMap = uni.getStorageSync('guideMap') ||false;
+		// 判断是否已经加载过数据
+		if(guideMap){
+			this.setFirstUse(true)
+		}
+		// #ifdef H5
+		// 保存路由对象
+		setRouter(this.$router);
+		//判断是否已经缓存浏览器
+		let bool = uni.getStorageSync('weichatBrowser') || '';
+		if (bool === '') {
+			//判断是否为微信浏览
+			bool = navigator.userAgent.toLowerCase().match(/MicroMessenger/i) == 'micromessenger';
+			// 保存当前是否为微信内核浏览器
+			uni.setStorageSync('weichatBrowser', bool);
+		}
+		if (bool) {
+			// 加载微信信息
+			weixindata();
+		}
+		// #endif
+		// #ifdef APP-PLUS
+		// 判断是否升级
+		getUpApp();
+		// 获取当前运行系统
+		let system = uni.getStorageSync('platform') || '';
+		if (!system) {
+			uni.setStorage({
+				key: 'platform',
+				data: uni.getSystemInfoSync().platform
+			});
+		}
+		// #endif
+	},
+	onShow: function() {
+		// 加载拦截
+		// console.log('App Show');
+	},
+	onHide: function() {
+		// console.log('App Hide');
+	}
+};
+</script>
+
+<style lang="scss">
+/*全局公共样式和字体图标*/
+@import '/static/css/cmy.css';
+view,
+scroll-view,
+swiper,
+swiper-item,
+cover-view,
+cover-image,
+icon,
+text,
+rich-text,
+progress,
+button,
+checkbox,
+form,
+input,
+label,
+radio,
+slider,
+switch,
+textarea,
+navigator,
+audio,
+camera,
+image,
+video {
+	box-sizing: border-box;
+}
+/* 骨架屏替代方案 */
+.Skeleton {
+	background: #f3f3f3;
+	padding: 20rpx 0;
+	border-radius: 8rpx;
+}
+
+/* 图片载入替代方案 */
+.image-wrapper {
+	font-size: 0;
+	background: #f3f3f3;
+	border-radius: 4px;
+	image {
+		width: 100%;
+		height: 100%;
+		transition: 0.6s;
+		opacity: 0;
+		&.loaded {
+			opacity: 1;
+		}
+	}
+}
+
+// 设置富文本中图片最大宽度
+uni-rich-text img {
+	max-width: 100% !important;
+}
+/*边框*/
+.b-b:after,
+.b-t:after {
+	position: absolute;
+	z-index: 3;
+	left: 0;
+	right: 0;
+	height: 0;
+	content: '';
+	transform: scaleY(0.5);
+	border-bottom: 1px solid $border-color-base;
+}
+
+.b-b:after {
+	bottom: 0;
+}
+
+.b-t:after {
+	top: 0;
+}
+
+/* input 样式 */
+.input-placeholder {
+	color: #999999;
+}
+
+.placeholder {
+	color: #999999;
+}
+// 边距样式
+@for $i from 1 to 5 {
+	.margin-l-#{$i * 10} {
+		margin-left: $i * 10rpx !important;
+	}
+	.margin-r-#{$i * 10} {
+		margin-right: $i * 10rpx !important;
+	}
+	.margin-t-#{$i * 10} {
+		margin-top: $i * 10rpx !important;
+	}
+	.margin-b-#{$i * 10} {
+		margin-bottom: $i * 10rpx !important;
+	}
+	.margin-#{$i * 10} {
+		margin: $i * 10rpx !important;
+	}
+	.margin-v-#{$i * 10} {
+		margin-top: $i * 10rpx !important;
+		margin-bottom: $i * 10rpx !important;
+	}
+	.margin-c-#{$i * 10} {
+		margin-left: $i * 10rpx !important;
+		margin-right: $i * 10rpx !important;
+	}
+	.padding-l-#{$i * 10} {
+		padding-left: $i * 10rpx !important;
+	}
+	.padding-r-#{$i * 10} {
+		padding-right: $i * 10rpx !important;
+	}
+	.padding-t-#{$i * 10} {
+		padding-top: $i * 10rpx !important;
+	}
+	.padding-b-#{$i * 10} {
+		padding-bottom: $i * 10rpx !important;
+	}
+	.padding-#{$i * 10} {
+		padding: $i * 10rpx !important;
+	}
+	.padding-v-#{$i * 10} {
+		padding-top: $i * 10rpx !important;
+		padding-bottom: $i * 10rpx !important;
+	}
+	.padding-c-#{$i * 10} {
+		padding-left: $i * 10rpx !important;
+		padding-right: $i * 10rpx !important;
+	}
+}
+// 字体大小
+.font-size-sm {
+	font-size: $font-sm;
+}
+.font-size-base {
+	font-size: $font-base;
+}
+.font-size-lg {
+	font-size: $font-lg;
+}
+// 字体颜色
+.font-color-yellow {
+	color: $color-yellow !important;
+}
+.font-color-gray {
+	color: $color-gray !important;
+}
+.font-color-red {
+	color: $color-red !important;
+}
+.font-color-greed {
+	color: $color-green !important;
+}
+// 边框颜色
+.border-color-yellow {
+	border: 1rpx solid $color-yellow;
+}
+// 基础按钮
+.base-buttom {
+	background-color: $color-green;
+	font-size: 32rpx;
+	padding: 30rpx;
+	color: #FFFFFF;
+	margin: 0 50rpx;
+	border-radius: 100rpx;
+	margin-top: 100rpx;
+	text-align: center;
+	z-index: 95;
+}
+// 修改默认背景颜色
+uni-page-wrapper {
+	background-color: $page-color-base;
+}
+page {
+	background-color: $page-color-base;
+	// 设置默认字体
+	font-family: PingFang SC, STHeitiSC-Light, Helvetica-Light, arial, sans-serif, Droid Sans Fallback;
+	min-height: 100%;
+}
+</style>

+ 276 - 0
api/activity.js

@@ -0,0 +1,276 @@
+import request from "@/utils/request.js";
+/**
+ * 
+ * 所有活动接口 包括:拼团,砍价,秒杀
+ * 
+*/
+// 砍价产品详情
+export function getBargainDetail(data,id) {
+	return request({
+		url: '/api/bargain/detail/' + id,
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 砍价产品详情
+ */
+// export function getBargainDetail(id) {
+//   return request.get("bargain/detail/" + id);
+// }
+
+//砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
+export function postBargainHelpCount(data) {
+	return request({
+		url: '/api/bargain/help/count',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
+ */
+// export function postBargainHelpCount(data) {
+//   return request.post("bargain/help/count", data);
+// }
+
+//砍价 开启砍价用户信息
+export function postBargainStartUser(data) {
+	return request({
+		url: '/api/bargain/start/user',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价 开启砍价用户信息
+ */
+// export function postBargainStartUser(data) {
+//   return request.post("bargain/start/user", data);
+// }
+
+//砍价开启
+export function postBargainStart(data) {
+	return request({
+		url: '/api/bargain/start',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价开启
+ */
+// export function postBargainStart(bargainId) {
+//   return request.post("bargain/start", { bargainId: bargainId});
+// }
+
+// 砍价 砍掉金额
+export function postBargainHelpPrice(data) {
+	return request({
+		url: '/api/bargain/help/price',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价 砍掉金额
+ */
+// export function postBargainHelpPrice(data) {
+//   return request.post("bargain/help/price", data);
+// }
+
+// 砍价 帮助好友砍价
+export function postBargainHelp(data) {
+	return request({
+		url: '/api/bargain/help',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价 帮助好友砍价
+ */
+// export function postBargainHelp(data) {
+//   return request.post("bargain/help", data);
+// }
+
+// 砍价 砍价帮
+export function postBargainHelpList(data) {
+	return request({
+		url: '/api/bargain/help/list',
+		method: 'post',
+		data
+	});
+}
+
+
+/**
+ * 砍价 砍价帮
+ */
+// export function postBargainHelpList(data) {
+//   return request.post("bargain/help/list", data);
+// }
+
+// 砍价 观看/分享/参与次数
+export function postBargainShare(data) {
+	return request({
+		url: '/api/bargain/share',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价 观看/分享/参与次数
+ */
+// export function postBargainShare(bargainId) {
+//   return request.post("bargain/share", { bargainId: bargainId});
+// }
+
+// 砍价列表(已参与)
+export function getBargainUserList(data) {
+	return request({
+		url: '/api/bargain/user/list',
+		method: 'get',
+		data
+	});
+}
+
+/**
+ * 
+ * 砍价列表(已参与)
+ * @param object data
+*/
+// export function getBargainUserList(data){
+//   return request.get('bargain/user/list',data);
+// }
+
+// 砍价取消
+export function getBargainUserCancel(data) {
+	return request({
+		url: '/api/bargain/user/cancel',
+		method: 'post',
+		data
+	});
+}
+
+/**
+ * 砍价取消
+ */
+// export function getBargainUserCancel(data) {
+//   return request.post("/bargain/user/cancel", data);
+// }
+
+
+
+
+
+/**
+ * 拼团列表
+ * 
+*/
+export function getCombinationList(data) {
+  return request.get('combination/list', data,{noAuth:true});
+}
+
+/**
+ * 拼团详情
+ * 
+*/
+export function getCombinationDetail(id) {
+  return request.get('combination/detail/'+id);
+}
+
+/**
+ * 拼团 开团
+ */
+export function getCombinationPink(id) {
+  return request.get("combination/pink/" + id);
+}
+
+/**
+ * 拼团 取消开团
+ */
+export function postCombinationRemove(data) {
+  return request.post("combination/remove",data);
+}
+
+/**
+ * 砍价列表
+ */
+export function getBargainList(data) {
+  return request.get("bargain/list", data,{noAuth:true});
+}
+
+
+/**
+ * 
+ * 取消砍价
+ * @param int bargainId
+*/
+export function bargainUserCancel(bargainId){
+  return request.post('bargain/user/cancel', { bargainId: bargainId})
+}
+
+/**
+ * 秒杀产品时间区间
+ * 
+*/
+export function getSeckillIndexTime(){
+  return request.get('seckill/index',{},{noAuth:true});
+}
+
+/**
+ * 秒杀产品列表
+ * @param int time
+ * @param object data
+*/
+export function getSeckillList(time,data){
+  return request.get('seckill/list/'+time,data,{noAuth:true});
+}
+
+/**
+ * 秒杀产品详情
+ * @param int id
+*/
+export function getSeckillDetail(id){
+  return request.get('seckill/detail/'+id);
+}
+
+/**
+ * 砍价海报
+ * @param object data
+ * 
+*/
+export function getBargainPoster(data){
+  return request.post('bargain/poster',data)
+}
+
+/**
+ * 拼团海报
+ * @param object data
+ * 
+*/
+export function getCombinationPoster(data){
+  return request.post('combination/poster',data)
+}
+
+/**
+ * 获取秒杀小程序二维码
+ */
+export function seckillCode(id,data) {
+  return request.get("seckill/code/"+id,data);
+}
+
+/**
+ * 获取拼团小程序二维码
+ */
+export function scombinationCode(id) {
+  return request.get("combination/code/"+id);
+}

+ 66 - 0
api/functionalUnit.js

@@ -0,0 +1,66 @@
+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
+	});
+}

+ 65 - 0
api/index.js

@@ -0,0 +1,65 @@
+import request from '@/utils/request'
+
+// 获取首页信息
+export function loadIndexs(data) {
+	return request({
+		url: '/api/new_index',
+		method: 'get',
+		data
+	});
+}
+// 获取版本号信息
+// #ifdef APP || H5
+export function getAppBBH(data) {
+	return request({
+		url: '/api/version',
+		method: 'get',
+		data
+	});
+}
+// #endif
+
+
+// 消息通知
+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
+	});
+}
+// 是否已读
+export function notify_read(data) {
+	return request({
+		url: '/api/car/notify_read',
+		method: 'post',
+		data
+	});
+}
+// 报警信息
+export function notify(data) {
+	return request({
+		url: '/api/car/notify',
+		method: 'post',
+		data
+	});
+}
+// 获取首页引导图
+export function guide_map(data) {
+	return request({
+		url: '/api/guide_map',
+		method: 'get',
+		data
+	});
+}
+
+

+ 64 - 0
api/login.js

@@ -0,0 +1,64 @@
+import request from '@/utils/request'
+
+// 登录
+export function login(data) {
+	return request({
+		url: '/api/login',
+		method: 'post',
+		data
+	});
+}
+// 注册
+export function register(data) {
+	return request({
+		url: '/api/register',
+		method: 'post',
+		data
+	});
+}
+// 验证码
+export function verify(data) {
+	// type=register为注册
+	// type=login为登录
+	return request({
+		url: '/api/register/verify',
+		method: 'post',
+		data
+	});
+}
+
+// 获取用户信息
+export function getUserInfo(data) {
+	return request({
+		url: '/api/userinfo',
+		method: 'get',
+		data
+	});
+}
+
+// 短信登录
+export function loginMobile(data) {
+	return request({
+		url: '/api/login/mobile',
+		method: 'post',
+		data
+	});
+}
+// #ifdef APP-PLUS
+// 微信授权登录
+export function loginWx(data) {
+	return request({
+		url: '/api/wechat/appauth',
+		method: 'get',
+		data
+	});
+}
+//苹果生成账户
+export function applelogin(data) {
+	return request({
+		url: '/api/applelogin',
+		method: 'post',
+		data
+	});
+}
+// #endif

+ 146 - 0
api/order.js

@@ -0,0 +1,146 @@
+import request from '@/utils/request'
+import {upFilse} from '@/utils/request'
+// 订单确认
+export function confirm(data) {
+	return request({
+		url: '/api/order/confirm',
+		method: 'post',
+		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({
+		url: '/api/order/comment',
+		method: 'post',
+		data
+	});
+}
+//订单产品信息
+export function product(data) {
+	return request({
+		url: '/api/order/product',
+		method: 'post',
+		data
+	});
+}
+// 快递查询
+export function express_query(data) {
+	return request({
+		url: '/api/order/express_query',
+		method: 'get',
+		data
+	});
+}
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/upload/image',
+		method: 'post',
+		data
+	});
+}
+// 订单列表
+export function orderList(data) {
+	return request({
+		url: '/api/order/list',
+		method: 'get',
+		data
+	});
+}
+// 订单详细
+export function orderDetail(data,orderid) {
+	return request({
+		url: '/api/order/detail/'+orderid,
+		method: 'get',
+		data
+	});
+}
+
+// 取消订单
+export function orderCancel(data) {
+	return request({
+		url: '/api/order/cancel',
+		method: 'post',
+		data
+	});
+}
+
+// 删除订单
+export function orderDel(data) {
+	return request({
+		url: '/api/order/del',
+		method: 'post',
+		data
+	});
+}
+// 申请退款
+export function refund(data) {
+	return request({
+		url: '/api/order/refund/verify',
+		method: 'post',
+		data
+	});
+}
+// 退款理由列表
+export function refundReason(data) {
+	return request({
+		url: '/api/order/refund/reason',
+		method: 'get',
+		data
+	});
+}
+
+// 确认收货
+export function orderTake(data) {
+	return request({
+		url: '/api/order/take',
+		method: 'post',
+		data
+	});
+}
+
+// 订单支付
+export function orderPay(data) {
+	return request({
+		url: '/api/order/pay',
+		method: 'post',
+		data
+	});
+}
+
+// 创建订单
+export function createOrderkey(data,key) {
+	return request({
+		url: '/api/order/create/'+key,
+		method: 'post',
+		data
+	});
+}
+
+// 统计订单金额
+export function computedOrderkey(data) {
+	return request({
+		url: '/api/order/computed/'+data.orderkey,
+		method: 'post',
+		data
+	});
+}
+

+ 186 - 0
api/product.js

@@ -0,0 +1,186 @@
+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
+	});
+}
+

+ 36 - 0
api/set.js

@@ -0,0 +1,36 @@
+import request from '@/utils/request'
+
+// 修改用户信息
+export function userEdit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}
+
+//退出登录
+export function logout(data) {
+	return request({
+		url: '/api/logout',
+		method: 'get',
+		data
+	});
+}
+//修改密码
+export function registerReset(data) {
+	return request({
+		url: '/api/register/reset',
+		method: 'post',
+		data
+	});
+}
+
+//绑定手机
+export function binding(data) {
+	return request({
+		url: '/api/binding',
+		method: 'post',
+		data
+	});
+}

+ 196 - 0
api/shop.js

@@ -0,0 +1,196 @@
+import request from '@/utils/request'
+
+
+// 获取首页信息
+export function storeList(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		data
+	});
+}
+
+// 订单数据统计
+export function statistics(data) {
+	return request({
+		url: '/api/admin/order/statistics',
+		method: 'get',
+		data
+	});
+}
+
+
+// 订单列表
+export function shopOrderList(data) {
+	return request({
+		url: '/api/admin/order/list',
+		method: 'get',
+		data
+	});
+}
+
+
+// 订单详情
+export function shopOrderDetai(data,orderid) {
+	return request({
+		url: '/api/admin/order/detai/'+orderid,
+		method: 'get',
+		data
+	});
+}
+
+
+// 订单发货(普通商品)
+export function deliveryGain(data,orderid) {
+	return request({
+		url: '/api/admin/order/delivery/gain/'+orderid,
+		method: 'get',
+		data
+	});
+}
+
+
+
+// 订单发货
+export function delivery(data) {
+	return request({
+		url: '/api/admin/order/delivery/keep',
+		method: 'get',
+		data
+	});
+}
+
+// 订单退款(普通商品)
+export function refund(data) {
+	return request({
+		url: '/api/admin/order/refund',
+		method: 'get',
+		data
+	});
+}
+
+
+// 订单核销(普通商品)
+export function order_verific(data) {
+	return request({
+		url: '/api/order/order_verific',
+		method: 'get',
+		data
+	});
+}
+
+
+// 门店资金
+export function funds(data) {
+	return request({
+		url: '/api/admin/funds',
+		method: 'get',
+		data
+	});
+}
+
+// 车辆报修
+export function question(data) {
+	return request({
+		url: '/api/admin/car/question',
+		method: 'post',
+		data
+	});
+}
+// 车辆报修详情
+export function questionInfo(data) {
+	return request({
+		url: '/api/admin/question/info',
+		method: 'get',
+		data
+	});
+}
+// 车辆发货
+export function set_car_number(data) {
+	return request({
+		url: '/api/admin/car/set_car_number',
+		method: 'post',
+		data
+	});
+}
+// 订单查询
+export function orderDetail(data,id) {
+	return request({
+		url: '/api/admin/order/detail/'+id,
+		method: 'get',
+		data
+	});
+}
+
+// 车辆批次
+export function batch(data) {
+	return request({
+		url: '/api/car/batch',
+		method: 'get',
+		data
+	});
+}
+// 车辆类型
+export function carType(data) {
+	return request({
+		url: '/api/car/type',
+		method: 'get',
+		data
+	});
+}
+
+// 获取自己所属的门店信息
+export function adminStore(data) {
+	return request({
+		url: '/api/admin/store',
+		method: 'get',
+		data
+	});
+}
+
+
+// 维修人员列表
+export function adminKf(data) {
+	return request({
+		url: '/api/admin/kf',
+		method: 'get',
+		data
+	});
+}
+// 安排维修人员
+export function schedule_task(data) {
+	return request({
+		url: '/api/admin/schedule_task',
+		method: 'post',
+		data
+	});
+}
+
+// 员工我的任务
+export function task(data) {
+	return request({
+		url: '/api/admin/task',
+		method: 'post',
+		data
+	});
+}
+// 处理任务
+export function tasksave(data) {
+	return request({
+		url: '/api/admin/tasksave',
+		method: 'post',
+		data
+	});
+}
+
+// 处理任务
+export function detail(data,id) {
+	return request({
+		url: '/api/admin/order/detail/'+id,
+		method: 'get',
+		data
+	});
+}
+
+
+

+ 272 - 0
api/user.js

@@ -0,0 +1,272 @@
+import request from '@/utils/request'
+
+// 订单统计信息
+export function orderData(data) {
+	return request({
+		url: '/api/order/data',
+		method: 'get',
+		data
+	});
+}
+// 实名认证
+export function real_name(data) {
+	return request({
+		url: '/api/real_name',
+		method: 'post',
+		data
+	});
+}
+
+// 获取用户信息
+export function getUserInfo(data) {
+	return request({
+		url: '/api/userinfo',
+		method: 'get',
+		data
+	});
+}
+// 个人中心页数据
+export function getUser(data) {
+	return request({
+		url: '/api/user',
+		method: 'get',
+		data
+	});
+}
+
+// 用户分享图
+export function spreadBanner(data) {
+	return request({
+		url: '/api/spread/banner',
+		method: 'get',
+		data
+	});
+}
+
+// 获取地址列表
+export function getAddressList(data) {
+	return request({
+		url: '/api/address/list',
+		method: 'get',
+		data
+	});
+}
+// 修改地址
+export function addressEdit(data) {
+	return request({
+		url: '/api/address/edit',
+		method: 'post',
+		data
+	});
+}
+// 删除地址
+export function addressDel(data) {
+	return request({
+		url: '/api/address/del',
+		method: 'post',
+		data
+	});
+}
+// 设为默认地址
+export function setAddressDefault(data) {
+	return request({
+		url: '/api/address/default/set',
+		method: 'post',
+		data
+	});
+}
+// 购物车列表
+export function getCartList(data) {
+	return request({
+		url: '/api/cart/list',
+		method: 'get',
+		data
+	});
+}
+
+// 修改购物车数量
+export function getCartNum(data) {
+	return request({
+		url: '/api/cart/num',
+		method: 'post',
+		data
+	});
+}
+//删除购物车
+export function cartDel(data) {
+	return request({
+		url: '/api/cart/del',
+		method: 'post',
+		data
+	});
+}
+//获取收藏夹列表
+export function getcollectList(data) {
+	return request({
+		url: '/api/collect/user',
+		method: 'get',
+		data
+	});
+}
+// 取消收藏
+export function delcollect(data) {
+	return request({
+		url: '/api/collect/del',
+		method: 'post',
+		data
+	});
+}
+// 获取我的团队
+export function spreadPeople(data) {
+	return request({
+		url: '/api/spread/people',
+		method: 'post',
+		data
+	});
+}
+// 获取我的所有车辆包含被授权车辆
+export function mycar(data) {
+	return request({
+		url: '/api/car/mycar',
+		method: 'get',
+		data
+	});
+}
+// 获取我的车辆
+export function carList(data) {
+	return request({
+		url: '/api/car/lst',
+		method: 'get',
+		data
+	});
+}
+// 获取授权车辆
+export function get_touid_car(data) {
+	return request({
+		url: '/api/car/get_touid_car',
+		method: 'post',
+		data
+	});
+}
+// 获取车辆详情
+export function getCarInfo(data) {
+	return request({
+		url: '/api/car/info',
+		method: 'get',
+		data
+	});
+}
+// 获取车辆行程记录列表
+export function car_record(data) {
+	return request({
+		url: '/api/car/car_record',
+		method: 'post',
+		data
+	});
+}
+// 获取车辆行程记录详细
+export function record_info(data) {
+	return request({
+		url: '/api/car/record_info',
+		method: 'get',
+		data
+	});
+}
+// 车锁开关
+export function car_switch(data) {
+	return request({
+		url: '/api/car/car_switch',
+		method: 'post',
+		data
+	});
+}
+
+// 车辆授权
+export function add_auth_car(data) {
+	return request({
+		url: '/api/car/add_auth_car',
+		method: 'post',
+		data
+	});
+}
+// 删除授权
+export function del_auth_car(data) {
+	return request({
+		url: '/api/car/del_auth_car',
+		method: 'post',
+		data
+	});
+}
+
+// 车辆授权列表
+export function get_auth(data) {
+	return request({
+		url: '/api/car/get_auth',
+		method: 'post',
+		data
+	});
+}
+
+// 车辆报修
+export function create_question(data) {
+	return request({
+		url: '/api/car/create_question',
+		method: 'post',
+		data
+	});
+}
+
+// 车辆报修详情
+export function question_info(data) {
+	return request({
+		url: '/api/car/question_info',
+		method: 'post',
+		data
+	});
+}
+
+// 车辆报修历史
+export function question(data) {
+	return request({
+		url: '/api/car/question',
+		method: 'post',
+		data
+	});
+}
+// 车辆报修评价
+export function question_score(data) {
+	return request({
+		url: '/api/car/question_score',
+		method: 'post',
+		data
+	});
+}
+
+// 撤销报修
+export function cancel_question(data) {
+	return request({
+		url: '/api/car/cancel_question',
+		method: 'get',
+		data
+	});
+}
+
+// 提前还款
+export function prepayment(data) {
+	return request({
+		url: '/api/car/prepayment',
+		method: 'post',
+		data
+	});
+}
+
+
+// 提前还款
+export function getcar_status(data) {
+	return request({
+		url: '/api/car/getcar_status',
+		method: 'get',
+		data
+	});
+}
+

+ 140 - 0
api/wallet.js

@@ -0,0 +1,140 @@
+import request from '@/utils/request'
+
+// 获取用户消费记录
+export function spreadCommission(data,state) {
+	return request({
+		url: '/api/spread/commission/'+state,
+		method: 'get',
+		data
+	});
+}
+
+// 获取账户余额
+export function userBalance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+// 提现
+export function extractCash(data) {
+	return request({
+		url: '/api/extract/cash',
+		method: 'post',
+		data
+	});
+}
+
+// 提现信息
+export function extractBank(data) {
+	return request({
+		url: '/api/extract/bank',
+		method: 'get',
+		data
+	});
+}
+// #ifdef H5
+// 公众号充值
+export function rechargeWechat(data) {
+	return request({
+		url: '/api/recharge/wechat',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// #ifdef MP
+// 小程序充值
+export function rechargeRoutine(data) {
+	return request({
+		url: '/api/recharge/routine',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// #ifdef APP
+// 支付宝支付
+export function aliPay(data) {
+	return request({
+		url: '/api/recharge/ali',
+		method: 'post',
+		data
+	});
+}
+// 微信支付
+export function wxPay(data) {
+	return request({
+		url: '/api/recharge/wxapp',
+		method: 'post',
+		data
+	});
+}
+// #endif
+// 佣金充值余额
+export function commissionPay(data) {
+	return request({
+		url: '/api/recharge/brokerage',
+		method: 'post',
+		data
+	});
+}
+// 获取提现支付宝账号
+export function aliInfo(data) {
+	return request({
+		url: '/api/ali/info',
+		method: 'get',
+		data
+	});
+}
+//获取默认银行卡账号
+export function bankInfo(data) {
+	return request({
+		url: '/api/bank/info',
+		method: 'get',
+		data
+	});
+}
+// 保存提现支付宝账号
+export function setAliInfo(data) {
+	return request({
+		url: '/api/ali/edit',
+		method: 'post',
+		data
+	});
+}
+//保存默认银行卡账号
+export function setBankInfo(data) {
+	return request({
+		url: '/api/bank/edit',
+		method: 'post',
+		data
+	});
+}
+
+
+// 账户余额
+export function balance(data) {
+	return request({
+		url: '/api/user/balance',
+		method: 'get',
+		data
+	});
+}
+
+
+// 充值分类金额
+export function rechargeIndex(data) {
+	return request({
+		url: '/api/recharge/index',
+		method: 'get',
+		data
+	});
+}
+
+
+
+
+

+ 37 - 0
api/wx.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+// 微信分享信息
+export function share(data) {
+	return request({
+		url: '/api/share',
+		method: 'get',
+		data
+	});
+}
+// #ifdef H5
+//微信配置
+export function wechatConfig(data) {
+	return request({
+		url: '/api/wechat/config',
+		method: 'get',
+		data
+	});
+}
+// 微信code地址
+export function wechatAuth(data) {
+	return request({
+		url: '/api/wechat/auth',
+		method: 'get',
+		data
+	});
+}
+// #endif
+// #ifdef MP-WEIXIN
+// 微信code地址
+export function wechatMpAuth(data) {
+	return request({
+		url: '/api/wechat/mp_auth',
+		method: 'post',
+		data
+	});
+}
+// #endif

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 18 - 0
components/empty/empty.vue


+ 1355 - 0
components/wangding-pickerAddress/data.js

@@ -0,0 +1,1355 @@
+export default [{
+	"name": "北京",
+	"city": [{
+		"name": "北京市",
+		"area": ["东城区", "西城区", "朝阳区", "丰台区", "石景山区", "海淀区", "门头沟区", "房山区", "通州区", "顺义区", "昌平区", "大兴区",
+			"怀柔区", "平谷区", "密云区", "延庆区"
+		]
+	}]
+}, {
+	"name": "天津",
+	"city": [{
+		"name": "天津市",
+		"area": ["和平区", "河东区", "河西区", "南开区", "河北区", "红桥区", "东丽区", "西青区", "津南区", "北辰区", "武清区", "宝坻区", "滨海新区",
+			"宁河区", "静海区", "蓟州区"
+		]
+	}]
+}, {
+	"name": "河北",
+	"city": [{
+		"name": "石家庄市",
+		"area": ["市辖区", "长安区", "桥西区", "新华区", "井陉矿区", "裕华区", "藁城区", "鹿泉区", "栾城区", "井陉县", "正定县", "行唐县", "灵寿县",
+			"高邑县", "深泽县", "赞皇县", "无极县", "平山县", "元氏县", "赵县", "晋州市", "新乐市"
+		]
+	}, {
+		"name": "唐山市",
+		"area": ["市辖区", "路南区", "路北区", "古冶区", "开平区", "丰南区", "丰润区", "曹妃甸区", "滦县", "滦南县", "乐亭县", "迁西县", "玉田县",
+			"遵化市", "迁安市"
+		]
+	}, {
+		"name": "秦皇岛市",
+		"area": ["市辖区", "海港区", "山海关区", "北戴河区", "抚宁区", "青龙满族自治县", "昌黎县", "卢龙县"]
+	}, {
+		"name": "邯郸市",
+		"area": ["市辖区", "邯山区", "丛台区", "复兴区", "峰峰矿区", "邯郸县", "临漳县", "成安县", "大名县", "涉县", "磁县", "肥乡县", "永年县",
+			"邱县", "鸡泽县", "广平县", "馆陶县", "魏县", "曲周县", "武安市"
+		]
+	}, {
+		"name": "邢台市",
+		"area": ["市辖区", "桥东区", "桥西区", "邢台县", "临城县", "内丘县", "柏乡县", "隆尧县", "任县", "南和县", "宁晋县", "巨鹿县", "新河县",
+			"广宗县", "平乡县", "威县", "清河县", "临西县", "南宫市", "沙河市"
+		]
+	}, {
+		"name": "保定市",
+		"area": ["市辖区", "竞秀区", "莲池区", "满城区", "清苑区", "徐水区", "涞水县", "阜平县", "定兴县", "唐县", "高阳县", "容城县", "涞源县",
+			"望都县", "安新县", "易县", "曲阳县", "蠡县", "顺平县", "博野县", "雄县", "涿州市", "安国市", "高碑店市"
+		]
+	}, {
+		"name": "张家口市",
+		"area": ["市辖区", "桥东区", "桥西区", "宣化区", "下花园区", "万全区", "崇礼区", "张北县", "康保县", "沽源县", "尚义县", "蔚县", "阳原县",
+			"怀安县", "怀来县", "涿鹿县", "赤城县"
+		]
+	}, {
+		"name": "承德市",
+		"area": ["市辖区", "双桥区", "双滦区", "鹰手营子矿区", "承德县", "兴隆县", "平泉县", "滦平县", "隆化县", "丰宁满族自治县", "宽城满族自治县",
+			"围场满族蒙古族自治县"
+		]
+	}, {
+		"name": "沧州市",
+		"area": ["市辖区", "新华区", "运河区", "沧县", "青县", "东光县", "海兴县", "盐山县", "肃宁县", "南皮县", "吴桥县", "献县", "孟村回族自治县",
+			"泊头市", "任丘市", "黄骅市", "河间市"
+		]
+	}, {
+		"name": "廊坊市",
+		"area": ["市辖区", "安次区", "广阳区", "固安县", "永清县", "香河县", "大城县", "文安县", "大厂回族自治县", "霸州市", "三河市"]
+	}, {
+		"name": "衡水市",
+		"area": ["市辖区", "桃城区", "冀州区", "枣强县", "武邑县", "武强县", "饶阳县", "安平县", "故城县", "景县", "阜城县", "深州市"]
+	}, {
+		"name": "直辖县",
+		"area": ["定州市", "辛集市"]
+	}]
+}, {
+	"name": "山西",
+	"city": [{
+		"name": "太原市",
+		"area": ["市辖区", "小店区", "迎泽区", "杏花岭区", "尖草坪区", "万柏林区", "晋源区", "清徐县", "阳曲县", "娄烦县", "古交市"]
+	}, {
+		"name": "大同市",
+		"area": ["市辖区", "城区", "矿区", "南郊区", "新荣区", "阳高县", "天镇县", "广灵县", "灵丘县", "浑源县", "左云县", "大同县"]
+	}, {
+		"name": "阳泉市",
+		"area": ["市辖区", "城区", "矿区", "郊区", "平定县", "盂县"]
+	}, {
+		"name": "长治市",
+		"area": ["市辖区", "城区", "郊区", "长治县", "襄垣县", "屯留县", "平顺县", "黎城县", "壶关县", "长子县", "武乡县", "沁县", "沁源县",
+			"潞城市"
+		]
+	}, {
+		"name": "晋城市",
+		"area": ["市辖区", "城区", "沁水县", "阳城县", "陵川县", "泽州县", "高平市"]
+	}, {
+		"name": "朔州市",
+		"area": ["市辖区", "朔城区", "平鲁区", "山阴县", "应县", "右玉县", "怀仁县"]
+	}, {
+		"name": "晋中市",
+		"area": ["市辖区", "榆次区", "榆社县", "左权县", "和顺县", "昔阳县", "寿阳县", "太谷县", "祁县", "平遥县", "灵石县", "介休市"]
+	}, {
+		"name": "运城市",
+		"area": ["市辖区", "盐湖区", "临猗县", "万荣县", "闻喜县", "稷山县", "新绛县", "绛县", "垣曲县", "夏县", "平陆县", "芮城县", "永济市",
+			"河津市"
+		]
+	}, {
+		"name": "忻州市",
+		"area": ["市辖区", "忻府区", "定襄县", "五台县", "代县", "繁峙县", "宁武县", "静乐县", "神池县", "五寨县", "岢岚县", "河曲县", "保德县",
+			"偏关县", "原平市"
+		]
+	}, {
+		"name": "临汾市",
+		"area": ["市辖区", "尧都区", "曲沃县", "翼城县", "襄汾县", "洪洞县", "古县", "安泽县", "浮山县", "吉县", "乡宁县", "大宁县", "隰县",
+			"永和县", "蒲县", "汾西县", "侯马市", "霍州市"
+		]
+	}, {
+		"name": "吕梁市",
+		"area": ["市辖区", "离石区", "文水县", "交城县", "兴县", "临县", "柳林县", "石楼县", "岚县", "方山县", "中阳县", "交口县", "孝义市",
+			"汾阳市"
+		]
+	}]
+}, {
+	"name": "内蒙古",
+	"city": [{
+		"name": "呼和浩特市",
+		"area": ["市辖区", "新城区", "回民区", "玉泉区", "赛罕区", "土默特左旗", "托克托县", "和林格尔县", "清水河县", "武川县"]
+	}, {
+		"name": "包头市",
+		"area": ["市辖区", "东河区", "昆都仑区", "青山区", "石拐区", "白云鄂博矿区", "九原区", "土默特右旗", "固阳县", "达尔罕茂明安联合旗"]
+	}, {
+		"name": "乌海市",
+		"area": ["市辖区", "海勃湾区", "海南区", "乌达区"]
+	}, {
+		"name": "赤峰市",
+		"area": ["市辖区", "红山区", "元宝山区", "松山区", "阿鲁科尔沁旗", "巴林左旗", "巴林右旗", "林西县", "克什克腾旗", "翁牛特旗", "喀喇沁旗",
+			"宁城县", "敖汉旗"
+		]
+	}, {
+		"name": "通辽市",
+		"area": ["市辖区", "科尔沁区", "科尔沁左翼中旗", "科尔沁左翼后旗", "开鲁县", "库伦旗", "奈曼旗", "扎鲁特旗", "霍林郭勒市"]
+	}, {
+		"name": "鄂尔多斯市",
+		"area": ["市辖区", "东胜区", "康巴什区", "达拉特旗", "准格尔旗", "鄂托克前旗", "鄂托克旗", "杭锦旗", "乌审旗", "伊金霍洛旗"]
+	}, {
+		"name": "呼伦贝尔市",
+		"area": ["市辖区", "海拉尔区", "扎赉诺尔区", "阿荣旗", "莫力达瓦达斡尔族自治旗", "鄂伦春自治旗", "鄂温克族自治旗", "陈巴尔虎旗", "新巴尔虎左旗",
+			"新巴尔虎右旗", "满洲里市", "牙克石市", "扎兰屯市", "额尔古纳市", "根河市"
+		]
+	}, {
+		"name": "巴彦淖尔市",
+		"area": ["市辖区", "临河区", "五原县", "磴口县", "乌拉特前旗", "乌拉特中旗", "乌拉特后旗", "杭锦后旗"]
+	}, {
+		"name": "乌兰察布市",
+		"area": ["市辖区", "集宁区", "卓资县", "化德县", "商都县", "兴和县", "凉城县", "察哈尔右翼前旗", "察哈尔右翼中旗", "察哈尔右翼后旗", "四子王旗",
+			"丰镇市"
+		]
+	}, {
+		"name": "兴安盟",
+		"area": ["乌兰浩特市", "阿尔山市", "科尔沁右翼前旗", "科尔沁右翼中旗", "扎赉特旗", "突泉县"]
+	}, {
+		"name": "锡林郭勒盟",
+		"area": ["二连浩特市", "锡林浩特市", "阿巴嘎旗", "苏尼特左旗", "苏尼特右旗", "东乌珠穆沁旗", "西乌珠穆沁旗", "太仆寺旗", "镶黄旗", "正镶白旗",
+			"正蓝旗", "多伦县"
+		]
+	}, {
+		"name": "阿拉善盟",
+		"area": ["阿拉善左旗", "阿拉善右旗", "额济纳旗"]
+	}]
+}, {
+	"name": "辽宁",
+	"city": [{
+		"name": "沈阳市",
+		"area": ["市辖区", "和平区", "沈河区", "大东区", "皇姑区", "铁西区", "苏家屯区", "浑南区", "沈北新区", "于洪区", "辽中区", "康平县",
+			"法库县", "新民市"
+		]
+	}, {
+		"name": "大连市",
+		"area": ["市辖区", "中山区", "西岗区", "沙河口区", "甘井子区", "旅顺口区", "金州区", "普兰店区", "长海县", "瓦房店市", "庄河市"]
+	}, {
+		"name": "鞍山市",
+		"area": ["市辖区", "铁东区", "铁西区", "立山区", "千山区", "台安县", "岫岩满族自治县", "海城市"]
+	}, {
+		"name": "抚顺市",
+		"area": ["市辖区", "新抚区", "东洲区", "望花区", "顺城区", "抚顺县", "新宾满族自治县", "清原满族自治县"]
+	}, {
+		"name": "本溪市",
+		"area": ["市辖区", "平山区", "溪湖区", "明山区", "南芬区", "本溪满族自治县", "桓仁满族自治县"]
+	}, {
+		"name": "丹东市",
+		"area": ["市辖区", "元宝区", "振兴区", "振安区", "宽甸满族自治县", "东港市", "凤城市"]
+	}, {
+		"name": "锦州市",
+		"area": ["市辖区", "古塔区", "凌河区", "太和区", "黑山县", "义县", "凌海市", "北镇市"]
+	}, {
+		"name": "营口市",
+		"area": ["市辖区", "站前区", "西市区", "鲅鱼圈区", "老边区", "盖州市", "大石桥市"]
+	}, {
+		"name": "阜新市",
+		"area": ["市辖区", "海州区", "新邱区", "太平区", "清河门区", "细河区", "阜新蒙古族自治县", "彰武县"]
+	}, {
+		"name": "辽阳市",
+		"area": ["市辖区", "白塔区", "文圣区", "宏伟区", "弓长岭区", "太子河区", "辽阳县", "灯塔市"]
+	}, {
+		"name": "盘锦市",
+		"area": ["市辖区", "双台子区", "兴隆台区", "大洼区", "盘山县"]
+	}, {
+		"name": "铁岭市",
+		"area": ["市辖区", "银州区", "清河区", "铁岭县", "西丰县", "昌图县", "调兵山市", "开原市"]
+	}, {
+		"name": "朝阳市",
+		"area": ["市辖区", "双塔区", "龙城区", "朝阳县", "建平县", "喀喇沁左翼蒙古族自治县", "北票市", "凌源市"]
+	}, {
+		"name": "葫芦岛市",
+		"area": ["市辖区", "连山区", "龙港区", "南票区", "绥中县", "建昌县", "兴城市"]
+	}]
+}, {
+	"name": "吉林",
+	"city": [{
+		"name": "长春市",
+		"area": ["市辖区", "南关区", "宽城区", "朝阳区", "二道区", "绿园区", "双阳区", "九台区", "农安县", "榆树市", "德惠市"]
+	}, {
+		"name": "吉林市",
+		"area": ["市辖区", "昌邑区", "龙潭区", "船营区", "丰满区", "永吉县", "蛟河市", "桦甸市", "舒兰市", "磐石市"]
+	}, {
+		"name": "四平市",
+		"area": ["市辖区", "铁西区", "铁东区", "梨树县", "伊通满族自治县", "公主岭市", "双辽市"]
+	}, {
+		"name": "辽源市",
+		"area": ["市辖区", "龙山区", "西安区", "东丰县", "东辽县"]
+	}, {
+		"name": "通化市",
+		"area": ["市辖区", "东昌区", "二道江区", "通化县", "辉南县", "柳河县", "梅河口市", "集安市"]
+	}, {
+		"name": "白山市",
+		"area": ["市辖区", "浑江区", "江源区", "抚松县", "靖宇县", "长白朝鲜族自治县", "临江市"]
+	}, {
+		"name": "松原市",
+		"area": ["市辖区", "宁江区", "前郭尔罗斯蒙古族自治县", "长岭县", "乾安县", "扶余市"]
+	}, {
+		"name": "白城市",
+		"area": ["市辖区", "洮北区", "镇赉县", "通榆县", "洮南市", "大安市"]
+	}, {
+		"name": "延边朝鲜族自治州",
+		"area": ["延吉市", "图们市", "敦化市", "珲春市", "龙井市", "和龙市", "汪清县", "安图县"]
+	}]
+}, {
+	"name": "黑龙江",
+	"city": [{
+		"name": "哈尔滨市",
+		"area": ["市辖区", "道里区", "南岗区", "道外区", "平房区", "松北区", "香坊区", "呼兰区", "阿城区", "双城区", "依兰县", "方正县", "宾县",
+			"巴彦县", "木兰县", "通河县", "延寿县", "尚志市", "五常市"
+		]
+	}, {
+		"name": "齐齐哈尔市",
+		"area": ["市辖区", "龙沙区", "建华区", "铁锋区", "昂昂溪区", "富拉尔基区", "碾子山区", "梅里斯达斡尔族区", "龙江县", "依安县", "泰来县",
+			"甘南县", "富裕县", "克山县", "克东县", "拜泉县", "讷河市"
+		]
+	}, {
+		"name": "鸡西市",
+		"area": ["市辖区", "鸡冠区", "恒山区", "滴道区", "梨树区", "城子河区", "麻山区", "鸡东县", "虎林市", "密山市"]
+	}, {
+		"name": "鹤岗市",
+		"area": ["市辖区", "向阳区", "工农区", "南山区", "兴安区", "东山区", "兴山区", "萝北县", "绥滨县"]
+	}, {
+		"name": "双鸭山市",
+		"area": ["市辖区", "尖山区", "岭东区", "四方台区", "宝山区", "集贤县", "友谊县", "宝清县", "饶河县"]
+	}, {
+		"name": "大庆市",
+		"area": ["市辖区", "萨尔图区", "龙凤区", "让胡路区", "红岗区", "大同区", "肇州县", "肇源县", "林甸县", "杜尔伯特蒙古族自治县"]
+	}, {
+		"name": "伊春市",
+		"area": ["市辖区", "伊春区", "南岔区", "友好区", "西林区", "翠峦区", "新青区", "美溪区", "金山屯区", "五营区", "乌马河区", "汤旺河区",
+			"带岭区", "乌伊岭区", "红星区", "上甘岭区", "嘉荫县", "铁力市"
+		]
+	}, {
+		"name": "佳木斯市",
+		"area": ["市辖区", "向阳区", "前进区", "东风区", "郊区", "桦南县", "桦川县", "汤原县", "同江市", "富锦市", "抚远市"]
+	}, {
+		"name": "七台河市",
+		"area": ["市辖区", "新兴区", "桃山区", "茄子河区", "勃利县"]
+	}, {
+		"name": "牡丹江市",
+		"area": ["市辖区", "东安区", "阳明区", "爱民区", "西安区", "林口县", "绥芬河市", "海林市", "宁安市", "穆棱市", "东宁市"]
+	}, {
+		"name": "黑河市",
+		"area": ["市辖区", "爱辉区", "嫩江县", "逊克县", "孙吴县", "北安市", "五大连池市"]
+	}, {
+		"name": "绥化市",
+		"area": ["市辖区", "北林区", "望奎县", "兰西县", "青冈县", "庆安县", "明水县", "绥棱县", "安达市", "肇东市", "海伦市"]
+	}, {
+		"name": "大兴安岭地区",
+		"area": ["呼玛县", "塔河县", "漠河县"]
+	}]
+}, {
+	"name": "上海",
+	"city": [{
+		"name": "上海市",
+		"area": ["黄浦区", "徐汇区", "长宁区", "静安区", "普陀区", "虹口区", "杨浦区", "闵行区", "宝山区", "嘉定区", "浦东新区", "金山区", "松江区",
+			"青浦区", "奉贤区", "崇明区"
+		]
+	}]
+}, {
+	"name": "江苏",
+	"city": [{
+		"name": "南京市",
+		"area": ["市辖区", "玄武区", "秦淮区", "建邺区", "鼓楼区", "浦口区", "栖霞区", "雨花台区", "江宁区", "六合区", "溧水区", "高淳区"]
+	}, {
+		"name": "无锡市",
+		"area": ["市辖区", "锡山区", "惠山区", "滨湖区", "梁溪区", "新吴区", "江阴市", "宜兴市"]
+	}, {
+		"name": "徐州市",
+		"area": ["市辖区", "鼓楼区", "云龙区", "贾汪区", "泉山区", "铜山区", "丰县", "沛县", "睢宁县", "新沂市", "邳州市"]
+	}, {
+		"name": "常州市",
+		"area": ["市辖区", "天宁区", "钟楼区", "新北区", "武进区", "金坛区", "溧阳市"]
+	}, {
+		"name": "苏州市",
+		"area": ["市辖区", "虎丘区", "吴中区", "相城区", "姑苏区", "吴江区", "常熟市", "张家港市", "昆山市", "太仓市"]
+	}, {
+		"name": "南通市",
+		"area": ["市辖区", "崇川区", "港闸区", "通州区", "海安县", "如东县", "启东市", "如皋市", "海门市"]
+	}, {
+		"name": "连云港市",
+		"area": ["市辖区", "连云区", "海州区", "赣榆区", "东海县", "灌云县", "灌南县"]
+	}, {
+		"name": "淮安市",
+		"area": ["市辖区", "淮安区", "淮阴区", "清江浦区", "洪泽区", "涟水县", "盱眙县", "金湖县"]
+	}, {
+		"name": "盐城市",
+		"area": ["市辖区", "亭湖区", "盐都区", "大丰区", "响水县", "滨海县", "阜宁县", "射阳县", "建湖县", "东台市"]
+	}, {
+		"name": "扬州市",
+		"area": ["市辖区", "广陵区", "邗江区", "江都区", "宝应县", "仪征市", "高邮市"]
+	}, {
+		"name": "镇江市",
+		"area": ["市辖区", "京口区", "润州区", "丹徒区", "丹阳市", "扬中市", "句容市"]
+	}, {
+		"name": "泰州市",
+		"area": ["市辖区", "海陵区", "高港区", "姜堰区", "兴化市", "靖江市", "泰兴市"]
+	}, {
+		"name": "宿迁市",
+		"area": ["市辖区", "宿城区", "宿豫区", "沭阳县", "泗阳县", "泗洪县"]
+	}]
+}, {
+	"name": "浙江",
+	"city": [{
+		"name": "杭州市",
+		"area": ["市辖区", "上城区", "下城区", "江干区", "拱墅区", "西湖区", "滨江区", "萧山区", "余杭区", "富阳区", "桐庐县", "淳安县", "建德市",
+			"临安市"
+		]
+	}, {
+		"name": "宁波市",
+		"area": ["市辖区", "海曙区", "江东区", "江北区", "北仑区", "镇海区", "鄞州区", "象山县", "宁海县", "余姚市", "慈溪市", "奉化市"]
+	}, {
+		"name": "温州市",
+		"area": ["市辖区", "鹿城区", "龙湾区", "瓯海区", "洞头区", "永嘉县", "平阳县", "苍南县", "文成县", "泰顺县", "瑞安市", "乐清市"]
+	}, {
+		"name": "嘉兴市",
+		"area": ["市辖区", "南湖区", "秀洲区", "嘉善县", "海盐县", "海宁市", "平湖市", "桐乡市"]
+	}, {
+		"name": "湖州市",
+		"area": ["市辖区", "吴兴区", "南浔区", "德清县", "长兴县", "安吉县"]
+	}, {
+		"name": "绍兴市",
+		"area": ["市辖区", "越城区", "柯桥区", "上虞区", "新昌县", "诸暨市", "嵊州市"]
+	}, {
+		"name": "金华市",
+		"area": ["市辖区", "婺城区", "金东区", "武义县", "浦江县", "磐安县", "兰溪市", "义乌市", "东阳市", "永康市"]
+	}, {
+		"name": "衢州市",
+		"area": ["市辖区", "柯城区", "衢江区", "常山县", "开化县", "龙游县", "江山市"]
+	}, {
+		"name": "舟山市",
+		"area": ["市辖区", "定海区", "普陀区", "岱山县", "嵊泗县"]
+	}, {
+		"name": "台州市",
+		"area": ["市辖区", "椒江区", "黄岩区", "路桥区", "玉环县", "三门县", "天台县", "仙居县", "温岭市", "临海市"]
+	}, {
+		"name": "丽水市",
+		"area": ["市辖区", "莲都区", "青田县", "缙云县", "遂昌县", "松阳县", "云和县", "庆元县", "景宁畲族自治县", "龙泉市"]
+	}]
+}, {
+	"name": "安徽",
+	"city": [{
+		"name": "合肥市",
+		"area": ["市辖区", "瑶海区", "庐阳区", "蜀山区", "包河区", "长丰县", "肥东县", "肥西县", "庐江县", "巢湖市"]
+	}, {
+		"name": "芜湖市",
+		"area": ["市辖区", "镜湖区", "弋江区", "鸠江区", "三山区", "芜湖县", "繁昌县", "南陵县", "无为县"]
+	}, {
+		"name": "蚌埠市",
+		"area": ["市辖区", "龙子湖区", "蚌山区", "禹会区", "淮上区", "怀远县", "五河县", "固镇县"]
+	}, {
+		"name": "淮南市",
+		"area": ["市辖区", "大通区", "田家庵区", "谢家集区", "八公山区", "潘集区", "凤台县", "寿县"]
+	}, {
+		"name": "马鞍山市",
+		"area": ["市辖区", "花山区", "雨山区", "博望区", "当涂县", "含山县", "和县"]
+	}, {
+		"name": "淮北市",
+		"area": ["市辖区", "杜集区", "相山区", "烈山区", "濉溪县"]
+	}, {
+		"name": "铜陵市",
+		"area": ["市辖区", "铜官区", "义安区", "郊区", "枞阳县"]
+	}, {
+		"name": "安庆市",
+		"area": ["市辖区", "迎江区", "大观区", "宜秀区", "怀宁县", "潜山县", "太湖县", "宿松县", "望江县", "岳西县", "桐城市"]
+	}, {
+		"name": "黄山市",
+		"area": ["市辖区", "屯溪区", "黄山区", "徽州区", "歙县", "休宁县", "黟县", "祁门县"]
+	}, {
+		"name": "滁州市",
+		"area": ["市辖区", "琅琊区", "南谯区", "来安县", "全椒县", "定远县", "凤阳县", "天长市", "明光市"]
+	}, {
+		"name": "阜阳市",
+		"area": ["市辖区", "颍州区", "颍东区", "颍泉区", "临泉县", "太和县", "阜南县", "颍上县", "界首市"]
+	}, {
+		"name": "宿州市",
+		"area": ["市辖区", "埇桥区", "砀山县", "萧县", "灵璧县", "泗县"]
+	}, {
+		"name": "六安市",
+		"area": ["市辖区", "金安区", "裕安区", "叶集区", "霍邱县", "舒城县", "金寨县", "霍山县"]
+	}, {
+		"name": "亳州市",
+		"area": ["市辖区", "谯城区", "涡阳县", "蒙城县", "利辛县"]
+	}, {
+		"name": "池州市",
+		"area": ["市辖区", "贵池区", "东至县", "石台县", "青阳县"]
+	}, {
+		"name": "宣城市",
+		"area": ["市辖区", "宣州区", "郎溪县", "广德县", "泾县", "绩溪县", "旌德县", "宁国市"]
+	}]
+}, {
+	"name": "福建",
+	"city": [{
+		"name": "福州市",
+		"area": ["市辖区", "鼓楼区", "台江区", "仓山区", "马尾区", "晋安区", "闽侯县", "连江县", "罗源县", "闽清县", "永泰县", "平潭县", "福清市",
+			"长乐市"
+		]
+	}, {
+		"name": "厦门市",
+		"area": ["市辖区", "思明区", "海沧区", "湖里区", "集美区", "同安区", "翔安区"]
+	}, {
+		"name": "莆田市",
+		"area": ["市辖区", "城厢区", "涵江区", "荔城区", "秀屿区", "仙游县"]
+	}, {
+		"name": "三明市",
+		"area": ["市辖区", "梅列区", "三元区", "明溪县", "清流县", "宁化县", "大田县", "尤溪县", "沙县", "将乐县", "泰宁县", "建宁县", "永安市"]
+	}, {
+		"name": "泉州市",
+		"area": ["市辖区", "鲤城区", "丰泽区", "洛江区", "泉港区", "惠安县", "安溪县", "永春县", "德化县", "金门县", "石狮市", "晋江市", "南安市"]
+	}, {
+		"name": "漳州市",
+		"area": ["市辖区", "芗城区", "龙文区", "云霄县", "漳浦县", "诏安县", "长泰县", "东山县", "南靖县", "平和县", "华安县", "龙海市"]
+	}, {
+		"name": "南平市",
+		"area": ["市辖区", "延平区", "建阳区", "顺昌县", "浦城县", "光泽县", "松溪县", "政和县", "邵武市", "武夷山市", "建瓯市"]
+	}, {
+		"name": "龙岩市",
+		"area": ["市辖区", "新罗区", "永定区", "长汀县", "上杭县", "武平县", "连城县", "漳平市"]
+	}, {
+		"name": "宁德市",
+		"area": ["市辖区", "蕉城区", "霞浦县", "古田县", "屏南县", "寿宁县", "周宁县", "柘荣县", "福安市", "福鼎市"]
+	}]
+}, {
+	"name": "江西",
+	"city": [{
+		"name": "南昌市",
+		"area": ["市辖区", "东湖区", "西湖区", "青云谱区", "湾里区", "青山湖区", "新建区", "南昌县", "安义县", "进贤县"]
+	}, {
+		"name": "景德镇市",
+		"area": ["市辖区", "昌江区", "珠山区", "浮梁县", "乐平市"]
+	}, {
+		"name": "萍乡市",
+		"area": ["市辖区", "安源区", "湘东区", "莲花县", "上栗县", "芦溪县"]
+	}, {
+		"name": "九江市",
+		"area": ["市辖区", "濂溪区", "浔阳区", "九江县", "武宁县", "修水县", "永修县", "德安县", "都昌县", "湖口县", "彭泽县", "瑞昌市", "共青城市",
+			"庐山市"
+		]
+	}, {
+		"name": "新余市",
+		"area": ["市辖区", "渝水区", "分宜县"]
+	}, {
+		"name": "鹰潭市",
+		"area": ["市辖区", "月湖区", "余江县", "贵溪市"]
+	}, {
+		"name": "赣州市",
+		"area": ["市辖区", "章贡区", "南康区", "赣县", "信丰县", "大余县", "上犹县", "崇义县", "安远县", "龙南县", "定南县", "全南县", "宁都县",
+			"于都县", "兴国县", "会昌县", "寻乌县", "石城县", "瑞金市"
+		]
+	}, {
+		"name": "吉安市",
+		"area": ["市辖区", "吉州区", "青原区", "吉安县", "吉水县", "峡江县", "新干县", "永丰县", "泰和县", "遂川县", "万安县", "安福县", "永新县",
+			"井冈山市"
+		]
+	}, {
+		"name": "宜春市",
+		"area": ["市辖区", "袁州区", "奉新县", "万载县", "上高县", "宜丰县", "靖安县", "铜鼓县", "丰城市", "樟树市", "高安市"]
+	}, {
+		"name": "抚州市",
+		"area": ["市辖区", "临川区", "南城县", "黎川县", "南丰县", "崇仁县", "乐安县", "宜黄县", "金溪县", "资溪县", "东乡县", "广昌县"]
+	}, {
+		"name": "上饶市",
+		"area": ["市辖区", "信州区", "广丰区", "上饶县", "玉山县", "铅山县", "横峰县", "弋阳县", "余干县", "鄱阳县", "万年县", "婺源县", "德兴市"]
+	}]
+}, {
+	"name": "山东",
+	"city": [{
+		"name": "济南市",
+		"area": ["市辖区", "历下区", "市中区", "槐荫区", "天桥区", "历城区", "长清区", "平阴县", "济阳县", "商河县", "章丘市"]
+	}, {
+		"name": "青岛市",
+		"area": ["市辖区", "市南区", "市北区", "黄岛区", "崂山区", "李沧区", "城阳区", "胶州市", "即墨市", "平度市", "莱西市"]
+	}, {
+		"name": "淄博市",
+		"area": ["市辖区", "淄川区", "张店区", "博山区", "临淄区", "周村区", "桓台县", "高青县", "沂源县"]
+	}, {
+		"name": "枣庄市",
+		"area": ["市辖区", "市中区", "薛城区", "峄城区", "台儿庄区", "山亭区", "滕州市"]
+	}, {
+		"name": "东营市",
+		"area": ["市辖区", "东营区", "河口区", "垦利区", "利津县", "广饶县"]
+	}, {
+		"name": "烟台市",
+		"area": ["市辖区", "芝罘区", "福山区", "牟平区", "莱山区", "长岛县", "龙口市", "莱阳市", "莱州市", "蓬莱市", "招远市", "栖霞市", "海阳市"]
+	}, {
+		"name": "潍坊市",
+		"area": ["市辖区", "潍城区", "寒亭区", "坊子区", "奎文区", "临朐县", "昌乐县", "青州市", "诸城市", "寿光市", "安丘市", "高密市", "昌邑市"]
+	}, {
+		"name": "济宁市",
+		"area": ["市辖区", "任城区", "兖州区", "微山县", "鱼台县", "金乡县", "嘉祥县", "汶上县", "泗水县", "梁山县", "曲阜市", "邹城市"]
+	}, {
+		"name": "泰安市",
+		"area": ["市辖区", "泰山区", "岱岳区", "宁阳县", "东平县", "新泰市", "肥城市"]
+	}, {
+		"name": "威海市",
+		"area": ["市辖区", "环翠区", "文登区", "荣成市", "乳山市"]
+	}, {
+		"name": "日照市",
+		"area": ["市辖区", "东港区", "岚山区", "五莲县", "莒县"]
+	}, {
+		"name": "莱芜市",
+		"area": ["市辖区", "莱城区", "钢城区"]
+	}, {
+		"name": "临沂市",
+		"area": ["市辖区", "兰山区", "罗庄区", "河东区", "沂南县", "郯城县", "沂水县", "兰陵县", "费县", "平邑县", "莒南县", "蒙阴县", "临沭县"]
+	}, {
+		"name": "德州市",
+		"area": ["市辖区", "德城区", "陵城区", "宁津县", "庆云县", "临邑县", "齐河县", "平原县", "夏津县", "武城县", "乐陵市", "禹城市"]
+	}, {
+		"name": "聊城市",
+		"area": ["市辖区", "东昌府区", "阳谷县", "莘县", "茌平县", "东阿县", "冠县", "高唐县", "临清市"]
+	}, {
+		"name": "滨州市",
+		"area": ["市辖区", "滨城区", "沾化区", "惠民县", "阳信县", "无棣县", "博兴县", "邹平县"]
+	}, {
+		"name": "菏泽市",
+		"area": ["市辖区", "牡丹区", "定陶区", "曹县", "单县", "成武县", "巨野县", "郓城县", "鄄城县", "东明县"]
+	}]
+}, {
+	"name": "河南",
+	"city": [{
+		"name": "郑州市",
+		"area": ["市辖区", "中原区", "二七区", "管城回族区", "金水区", "上街区", "惠济区", "中牟县", "巩义市", "荥阳市", "新密市", "新郑市",
+			"登封市"]
+	}, {
+		"name": "开封市",
+		"area": ["市辖区", "龙亭区", "顺河回族区", "鼓楼区", "禹王台区", "金明区", "祥符区", "杞县", "通许县", "尉氏县", "兰考县"]
+	}, {
+		"name": "洛阳市",
+		"area": ["市辖区", "老城区", "西工区", "瀍河回族区", "涧西区", "吉利区", "洛龙区", "孟津县", "新安县", "栾川县", "嵩县", "汝阳县", "宜阳县",
+			"洛宁县", "伊川县", "偃师市"
+		]
+	}, {
+		"name": "平顶山市",
+		"area": ["市辖区", "新华区", "卫东区", "石龙区", "湛河区", "宝丰县", "叶县", "鲁山县", "郏县", "舞钢市", "汝州市"]
+	}, {
+		"name": "安阳市",
+		"area": ["市辖区", "文峰区", "北关区", "殷都区", "龙安区", "安阳县", "汤阴县", "滑县", "内黄县", "林州市"]
+	}, {
+		"name": "鹤壁市",
+		"area": ["市辖区", "鹤山区", "山城区", "淇滨区", "浚县", "淇县"]
+	}, {
+		"name": "新乡市",
+		"area": ["市辖区", "红旗区", "卫滨区", "凤泉区", "牧野区", "新乡县", "获嘉县", "原阳县", "延津县", "封丘县", "长垣县", "卫辉市", "辉县市"]
+	}, {
+		"name": "焦作市",
+		"area": ["市辖区", "解放区", "中站区", "马村区", "山阳区", "修武县", "博爱县", "武陟县", "温县", "沁阳市", "孟州市"]
+	}, {
+		"name": "濮阳市",
+		"area": ["市辖区", "华龙区", "清丰县", "南乐县", "范县", "台前县", "濮阳县"]
+	}, {
+		"name": "许昌市",
+		"area": ["市辖区", "魏都区", "许昌县", "鄢陵县", "襄城县", "禹州市", "长葛市"]
+	}, {
+		"name": "漯河市",
+		"area": ["市辖区", "源汇区", "郾城区", "召陵区", "舞阳县", "临颍县"]
+	}, {
+		"name": "三门峡市",
+		"area": ["市辖区", "湖滨区", "陕州区", "渑池县", "卢氏县", "义马市", "灵宝市"]
+	}, {
+		"name": "南阳市",
+		"area": ["市辖区", "宛城区", "卧龙区", "南召县", "方城县", "西峡县", "镇平县", "内乡县", "淅川县", "社旗县", "唐河县", "新野县", "桐柏县",
+			"邓州市"
+		]
+	}, {
+		"name": "商丘市",
+		"area": ["市辖区", "梁园区", "睢阳区", "民权县", "睢县", "宁陵县", "柘城县", "虞城县", "夏邑县", "永城市"]
+	}, {
+		"name": "信阳市",
+		"area": ["市辖区", "浉河区", "平桥区", "罗山县", "光山县", "新县", "商城县", "固始县", "潢川县", "淮滨县", "息县"]
+	}, {
+		"name": "周口市",
+		"area": ["市辖区", "川汇区", "扶沟县", "西华县", "商水县", "沈丘县", "郸城县", "淮阳县", "太康县", "鹿邑县", "项城市"]
+	}, {
+		"name": "驻马店市",
+		"area": ["市辖区", "驿城区", "西平县", "上蔡县", "平舆县", "正阳县", "确山县", "泌阳县", "汝南县", "遂平县", "新蔡县"]
+	}, {
+		"name": "直辖县",
+		"area": ["济源市"]
+	}]
+}, {
+	"name": "湖北",
+	"city": [{
+		"name": "武汉市",
+		"area": ["市辖区", "江岸区", "江汉区", "硚口区", "汉阳区", "武昌区", "青山区", "洪山区", "东西湖区", "汉南区", "蔡甸区", "江夏区", "黄陂区",
+			"新洲区"
+		]
+	}, {
+		"name": "黄石市",
+		"area": ["市辖区", "黄石港区", "西塞山区", "下陆区", "铁山区", "阳新县", "大冶市"]
+	}, {
+		"name": "十堰市",
+		"area": ["市辖区", "茅箭区", "张湾区", "郧阳区", "郧西县", "竹山县", "竹溪县", "房县", "丹江口市"]
+	}, {
+		"name": "宜昌市",
+		"area": ["市辖区", "西陵区", "伍家岗区", "点军区", "猇亭区", "夷陵区", "远安县", "兴山县", "秭归县", "长阳土家族自治县", "五峰土家族自治县",
+			"宜都市", "当阳市", "枝江市"
+		]
+	}, {
+		"name": "襄阳市",
+		"area": ["市辖区", "襄城区", "樊城区", "襄州区", "南漳县", "谷城县", "保康县", "老河口市", "枣阳市", "宜城市"]
+	}, {
+		"name": "鄂州市",
+		"area": ["市辖区", "梁子湖区", "华容区", "鄂城区"]
+	}, {
+		"name": "荆门市",
+		"area": ["市辖区", "东宝区", "掇刀区", "京山县", "沙洋县", "钟祥市"]
+	}, {
+		"name": "孝感市",
+		"area": ["市辖区", "孝南区", "孝昌县", "大悟县", "云梦县", "应城市", "安陆市", "汉川市"]
+	}, {
+		"name": "荆州市",
+		"area": ["市辖区", "沙市区", "荆州区", "公安县", "监利县", "江陵县", "石首市", "洪湖市", "松滋市"]
+	}, {
+		"name": "黄冈市",
+		"area": ["市辖区", "黄州区", "团风县", "红安县", "罗田县", "英山县", "浠水县", "蕲春县", "黄梅县", "麻城市", "武穴市"]
+	}, {
+		"name": "咸宁市",
+		"area": ["市辖区", "咸安区", "嘉鱼县", "通城县", "崇阳县", "通山县", "赤壁市"]
+	}, {
+		"name": "随州市",
+		"area": ["市辖区", "曾都区", "随县", "广水市"]
+	}, {
+		"name": "恩施土家族苗族自治州",
+		"area": ["恩施市", "利川市", "建始县", "巴东县", "宣恩县", "咸丰县", "来凤县", "鹤峰县"]
+	}, {
+		"name": "直辖县",
+		"area": ["仙桃市", "潜江市", "天门市", "神农架林区"]
+	}]
+}, {
+	"name": "湖南",
+	"city": [{
+		"name": "长沙市",
+		"area": ["市辖区", "芙蓉区", "天心区", "岳麓区", "开福区", "雨花区", "望城区", "长沙县", "宁乡县", "浏阳市"]
+	}, {
+		"name": "株洲市",
+		"area": ["市辖区", "荷塘区", "芦淞区", "石峰区", "天元区", "株洲县", "攸县", "茶陵县", "炎陵县", "醴陵市"]
+	}, {
+		"name": "湘潭市",
+		"area": ["市辖区", "雨湖区", "岳塘区", "湘潭县", "湘乡市", "韶山市"]
+	}, {
+		"name": "衡阳市",
+		"area": ["市辖区", "珠晖区", "雁峰区", "石鼓区", "蒸湘区", "南岳区", "衡阳县", "衡南县", "衡山县", "衡东县", "祁东县", "耒阳市", "常宁市"]
+	}, {
+		"name": "邵阳市",
+		"area": ["市辖区", "双清区", "大祥区", "北塔区", "邵东县", "新邵县", "邵阳县", "隆回县", "洞口县", "绥宁县", "新宁县", "城步苗族自治县",
+			"武冈市"
+		]
+	}, {
+		"name": "岳阳市",
+		"area": ["市辖区", "岳阳楼区", "云溪区", "君山区", "岳阳县", "华容县", "湘阴县", "平江县", "汨罗市", "临湘市"]
+	}, {
+		"name": "常德市",
+		"area": ["市辖区", "武陵区", "鼎城区", "安乡县", "汉寿县", "澧县", "临澧县", "桃源县", "石门县", "津市市"]
+	}, {
+		"name": "张家界市",
+		"area": ["市辖区", "永定区", "武陵源区", "慈利县", "桑植县"]
+	}, {
+		"name": "益阳市",
+		"area": ["市辖区", "资阳区", "赫山区", "南县", "桃江县", "安化县", "沅江市"]
+	}, {
+		"name": "郴州市",
+		"area": ["市辖区", "北湖区", "苏仙区", "桂阳县", "宜章县", "永兴县", "嘉禾县", "临武县", "汝城县", "桂东县", "安仁县", "资兴市"]
+	}, {
+		"name": "永州市",
+		"area": ["市辖区", "零陵区", "冷水滩区", "祁阳县", "东安县", "双牌县", "道县", "江永县", "宁远县", "蓝山县", "新田县", "江华瑶族自治县"]
+	}, {
+		"name": "怀化市",
+		"area": ["市辖区", "鹤城区", "中方县", "沅陵县", "辰溪县", "溆浦县", "会同县", "麻阳苗族自治县", "新晃侗族自治县", "芷江侗族自治县",
+			"靖州苗族侗族自治县", "通道侗族自治县", "洪江市"
+		]
+	}, {
+		"name": "娄底市",
+		"area": ["市辖区", "娄星区", "双峰县", "新化县", "冷水江市", "涟源市"]
+	}, {
+		"name": "湘西土家族苗族自治州",
+		"area": ["吉首市", "泸溪县", "凤凰县", "花垣县", "保靖县", "古丈县", "永顺县", "龙山县"]
+	}]
+}, {
+	"name": "广东",
+	"city": [{
+		"name": "广州市",
+		"area": ["市辖区", "荔湾区", "越秀区", "海珠区", "天河区", "白云区", "黄埔区", "番禺区", "花都区", "南沙区", "从化区", "增城区"]
+	}, {
+		"name": "韶关市",
+		"area": ["市辖区", "武江区", "浈江区", "曲江区", "始兴县", "仁化县", "翁源县", "乳源瑶族自治县", "新丰县", "乐昌市", "南雄市"]
+	}, {
+		"name": "深圳市",
+		"area": ["市辖区", "罗湖区", "福田区", "南山区", "宝安区", "龙岗区", "盐田区"]
+	}, {
+		"name": "珠海市",
+		"area": ["市辖区", "香洲区", "斗门区", "金湾区"]
+	}, {
+		"name": "汕头市",
+		"area": ["市辖区", "龙湖区", "金平区", "濠江区", "潮阳区", "潮南区", "澄海区", "南澳县"]
+	}, {
+		"name": "佛山市",
+		"area": ["市辖区", "禅城区", "南海区", "顺德区", "三水区", "高明区"]
+	}, {
+		"name": "江门市",
+		"area": ["市辖区", "蓬江区", "江海区", "新会区", "台山市", "开平市", "鹤山市", "恩平市"]
+	}, {
+		"name": "湛江市",
+		"area": ["市辖区", "赤坎区", "霞山区", "坡头区", "麻章区", "遂溪县", "徐闻县", "廉江市", "雷州市", "吴川市"]
+	}, {
+		"name": "茂名市",
+		"area": ["市辖区", "茂南区", "电白区", "高州市", "化州市", "信宜市"]
+	}, {
+		"name": "肇庆市",
+		"area": ["市辖区", "端州区", "鼎湖区", "高要区", "广宁县", "怀集县", "封开县", "德庆县", "四会市"]
+	}, {
+		"name": "惠州市",
+		"area": ["市辖区", "惠城区", "惠阳区", "博罗县", "惠东县", "龙门县"]
+	}, {
+		"name": "梅州市",
+		"area": ["市辖区", "梅江区", "梅县区", "大埔县", "丰顺县", "五华县", "平远县", "蕉岭县", "兴宁市"]
+	}, {
+		"name": "汕尾市",
+		"area": ["市辖区", "城区", "海丰县", "陆河县", "陆丰市"]
+	}, {
+		"name": "河源市",
+		"area": ["市辖区", "源城区", "紫金县", "龙川县", "连平县", "和平县", "东源县"]
+	}, {
+		"name": "阳江市",
+		"area": ["市辖区", "江城区", "阳东区", "阳西县", "阳春市"]
+	}, {
+		"name": "清远市",
+		"area": ["市辖区", "清城区", "清新区", "佛冈县", "阳山县", "连山壮族瑶族自治县", "连南瑶族自治县", "英德市", "连州市"]
+	}, {
+		"name": "东莞市",
+		"area": ["东城街道办事处", "南城街道办事处", "万江街道办事处", "莞城街道办事处", "石碣镇", "石龙镇", "茶山镇", "石排镇", "企石镇", "横沥镇",
+			"桥头镇", "谢岗镇", "东坑镇", "常平镇", "寮步镇", "樟木头镇", "大朗镇", "黄江镇", "清溪镇", "塘厦镇", "凤岗镇", "大岭山镇", "长安镇",
+			"虎门镇", "厚街镇", "沙田镇", "道滘镇", "洪梅镇", "麻涌镇", "望牛墩镇", "中堂镇", "高埗镇", "松山湖管委会", "虎门港管委会", "东莞生态园"
+		]
+	}, {
+		"name": "中山市",
+		"area": ["石岐区街道办事处", "东区街道办事处", "火炬开发区街道办事处", "西区街道办事处", "南区街道办事处", "五桂山街道办事处", "小榄镇", "黄圃镇", "民众镇",
+			"东凤镇", "东升镇", "古镇镇", "沙溪镇", "坦洲镇", "港口镇", "三角镇", "横栏镇", "南头镇", "阜沙镇", "南朗镇", "三乡镇", "板芙镇",
+			"大涌镇", "神湾镇"
+		]
+	}, {
+		"name": "潮州市",
+		"area": ["市辖区", "湘桥区", "潮安区", "饶平县"]
+	}, {
+		"name": "揭阳市",
+		"area": ["市辖区", "榕城区", "揭东区", "揭西县", "惠来县", "普宁市"]
+	}, {
+		"name": "云浮市",
+		"area": ["市辖区", "云城区", "云安区", "新兴县", "郁南县", "罗定市"]
+	}]
+}, {
+	"name": "广西",
+	"city": [{
+		"name": "南宁市",
+		"area": ["市辖区", "兴宁区", "青秀区", "江南区", "西乡塘区", "良庆区", "邕宁区", "武鸣区", "隆安县", "马山县", "上林县", "宾阳县", "横县"]
+	}, {
+		"name": "柳州市",
+		"area": ["市辖区", "城中区", "鱼峰区", "柳南区", "柳北区", "柳江区", "柳城县", "鹿寨县", "融安县", "融水苗族自治县", "三江侗族自治县"]
+	}, {
+		"name": "桂林市",
+		"area": ["市辖区", "秀峰区", "叠彩区", "象山区", "七星区", "雁山区", "临桂区", "阳朔县", "灵川县", "全州县", "兴安县", "永福县", "灌阳县",
+			"龙胜各族自治县", "资源县", "平乐县", "荔浦县", "恭城瑶族自治县"
+		]
+	}, {
+		"name": "梧州市",
+		"area": ["市辖区", "万秀区", "长洲区", "龙圩区", "苍梧县", "藤县", "蒙山县", "岑溪市"]
+	}, {
+		"name": "北海市",
+		"area": ["市辖区", "海城区", "银海区", "铁山港区", "合浦县"]
+	}, {
+		"name": "防城港市",
+		"area": ["市辖区", "港口区", "防城区", "上思县", "东兴市"]
+	}, {
+		"name": "钦州市",
+		"area": ["市辖区", "钦南区", "钦北区", "灵山县", "浦北县"]
+	}, {
+		"name": "贵港市",
+		"area": ["市辖区", "港北区", "港南区", "覃塘区", "平南县", "桂平市"]
+	}, {
+		"name": "玉林市",
+		"area": ["市辖区", "玉州区", "福绵区", "容县", "陆川县", "博白县", "兴业县", "北流市"]
+	}, {
+		"name": "百色市",
+		"area": ["市辖区", "右江区", "田阳县", "田东县", "平果县", "德保县", "那坡县", "凌云县", "乐业县", "田林县", "西林县", "隆林各族自治县",
+			"靖西市"
+		]
+	}, {
+		"name": "贺州市",
+		"area": ["市辖区", "八步区", "平桂区", "昭平县", "钟山县", "富川瑶族自治县"]
+	}, {
+		"name": "河池市",
+		"area": ["市辖区", "金城江区", "南丹县", "天峨县", "凤山县", "东兰县", "罗城仫佬族自治县", "环江毛南族自治县", "巴马瑶族自治县", "都安瑶族自治县",
+			"大化瑶族自治县", "宜州市"
+		]
+	}, {
+		"name": "来宾市",
+		"area": ["市辖区", "兴宾区", "忻城县", "象州县", "武宣县", "金秀瑶族自治县", "合山市"]
+	}, {
+		"name": "崇左市",
+		"area": ["市辖区", "江州区", "扶绥县", "宁明县", "龙州县", "大新县", "天等县", "凭祥市"]
+	}]
+}, {
+	"name": "海南",
+	"city": [{
+		"name": "海口市",
+		"area": ["市辖区", "秀英区", "龙华区", "琼山区", "美兰区"]
+	}, {
+		"name": "三亚市",
+		"area": ["市辖区", "海棠区", "吉阳区", "天涯区", "崖州区"]
+	}, {
+		"name": "三沙市",
+		"area": ["西沙群岛", "南沙群岛", "中沙群岛的岛礁及其海域"]
+	}, {
+		"name": "儋州市",
+		"area": ["那大镇", "和庆镇", "南丰镇", "大成镇", "雅星镇", "兰洋镇", "光村镇", "木棠镇", "海头镇", "峨蔓镇", "三都镇", "王五镇", "白马井镇",
+			"中和镇", "排浦镇", "东成镇", "新州镇", "国营西培农场", "国营西联农场", "国营蓝洋农场", "国营八一农场", "洋浦经济开发区", "华南热作学院"
+		]
+	}, {
+		"name": "省直辖县级行政区域",
+		"area": ["五指山市", "琼海市", "文昌市", "万宁市", "东方市", "定安县", "屯昌县", "澄迈县", "临高县", "白沙黎族自治县", "昌江黎族自治县",
+			"乐东黎族自治县", "陵水黎族自治县", "保亭黎族苗族自治县", "琼中黎族苗族自治县"
+		]
+	}]
+}, {
+	"name": "重庆",
+	"city": [{
+		"name": "重庆市",
+		"area": ["万州区", "涪陵区", "渝中区", "大渡口区", "江北区", "沙坪坝区", "九龙坡区", "南岸区", "北碚区", "綦江区", "大足区", "渝北区",
+			"巴南区", "黔江区", "长寿区", "江津区", "合川区", "永川区", "南川区", "璧山区", "铜梁区", "潼南区", "荣昌区", "开州区"
+		]
+	}, {
+		"name": "县",
+		"area": ["梁平县", "城口县", "丰都县", "垫江县", "武隆县", "忠县", "云阳县", "奉节县", "巫山县", "巫溪县", "石柱土家族自治县",
+			"秀山土家族苗族自治县", "酉阳土家族苗族自治县", "彭水苗族土家族自治县"
+		]
+	}]
+}, {
+	"name": "四川",
+	"city": [{
+		"name": "成都市",
+		"area": ["市辖区", "锦江区", "青羊区", "金牛区", "武侯区", "成华区", "龙泉驿区", "青白江区", "新都区", "温江区", "双流区", "金堂县", "郫县",
+			"大邑县", "蒲江县", "新津县", "都江堰市", "彭州市", "邛崃市", "崇州市", "简阳市"
+		]
+	}, {
+		"name": "自贡市",
+		"area": ["市辖区", "自流井区", "贡井区", "大安区", "沿滩区", "荣县", "富顺县"]
+	}, {
+		"name": "攀枝花市",
+		"area": ["市辖区", "东区", "西区", "仁和区", "米易县", "盐边县"]
+	}, {
+		"name": "泸州市",
+		"area": ["市辖区", "江阳区", "纳溪区", "龙马潭区", "泸县", "合江县", "叙永县", "古蔺县"]
+	}, {
+		"name": "德阳市",
+		"area": ["市辖区", "旌阳区", "中江县", "罗江县", "广汉市", "什邡市", "绵竹市"]
+	}, {
+		"name": "绵阳市",
+		"area": ["市辖区", "涪城区", "游仙区", "安州区", "三台县", "盐亭县", "梓潼县", "北川羌族自治县", "平武县", "江油市"]
+	}, {
+		"name": "广元市",
+		"area": ["市辖区", "利州区", "昭化区", "朝天区", "旺苍县", "青川县", "剑阁县", "苍溪县"]
+	}, {
+		"name": "遂宁市",
+		"area": ["市辖区", "船山区", "安居区", "蓬溪县", "射洪县", "大英县"]
+	}, {
+		"name": "内江市",
+		"area": ["市辖区", "市中区", "东兴区", "威远县", "资中县", "隆昌县"]
+	}, {
+		"name": "乐山市",
+		"area": ["市辖区", "市中区", "沙湾区", "五通桥区", "金口河区", "犍为县", "井研县", "夹江县", "沐川县", "峨边彝族自治县", "马边彝族自治县",
+			"峨眉山市"
+		]
+	}, {
+		"name": "南充市",
+		"area": ["市辖区", "顺庆区", "高坪区", "嘉陵区", "南部县", "营山县", "蓬安县", "仪陇县", "西充县", "阆中市"]
+	}, {
+		"name": "眉山市",
+		"area": ["市辖区", "东坡区", "彭山区", "仁寿县", "洪雅县", "丹棱县", "青神县"]
+	}, {
+		"name": "宜宾市",
+		"area": ["市辖区", "翠屏区", "南溪区", "宜宾县", "江安县", "长宁县", "高县", "珙县", "筠连县", "兴文县", "屏山县"]
+	}, {
+		"name": "广安市",
+		"area": ["市辖区", "广安区", "前锋区", "岳池县", "武胜县", "邻水县", "华蓥市"]
+	}, {
+		"name": "达州市",
+		"area": ["市辖区", "通川区", "达川区", "宣汉县", "开江县", "大竹县", "渠县", "万源市"]
+	}, {
+		"name": "雅安市",
+		"area": ["市辖区", "雨城区", "名山区", "荥经县", "汉源县", "石棉县", "天全县", "芦山县", "宝兴县"]
+	}, {
+		"name": "巴中市",
+		"area": ["市辖区", "巴州区", "恩阳区", "通江县", "南江县", "平昌县"]
+	}, {
+		"name": "资阳市",
+		"area": ["市辖区", "雁江区", "安岳县", "乐至县"]
+	}, {
+		"name": "阿坝藏族羌族自治州",
+		"area": ["马尔康市", "汶川县", "理县", "茂县", "松潘县", "九寨沟县", "金川县", "小金县", "黑水县", "壤塘县", "阿坝县", "若尔盖县", "红原县"]
+	}, {
+		"name": "甘孜藏族自治州",
+		"area": ["康定市", "泸定县", "丹巴县", "九龙县", "雅江县", "道孚县", "炉霍县", "甘孜县", "新龙县", "德格县", "白玉县", "石渠县", "色达县",
+			"理塘县", "巴塘县", "乡城县", "稻城县", "得荣县"
+		]
+	}, {
+		"name": "凉山彝族自治州",
+		"area": ["西昌市", "木里藏族自治县", "盐源县", "德昌县", "会理县", "会东县", "宁南县", "普格县", "布拖县", "金阳县", "昭觉县", "喜德县",
+			"冕宁县", "越西县", "甘洛县", "美姑县", "雷波县"
+		]
+	}]
+}, {
+	"name": "贵州",
+	"city": [{
+		"name": "贵阳市",
+		"area": ["市辖区", "南明区", "云岩区", "花溪区", "乌当区", "白云区", "观山湖区", "开阳县", "息烽县", "修文县", "清镇市"]
+	}, {
+		"name": "六盘水市",
+		"area": ["钟山区", "六枝特区", "水城县", "盘县"]
+	}, {
+		"name": "遵义市",
+		"area": ["市辖区", "红花岗区", "汇川区", "播州区", "桐梓县", "绥阳县", "正安县", "道真仡佬族苗族自治县", "务川仡佬族苗族自治县", "凤冈县", "湄潭县",
+			"余庆县", "习水县", "赤水市", "仁怀市"
+		]
+	}, {
+		"name": "安顺市",
+		"area": ["市辖区", "西秀区", "平坝区", "普定县", "镇宁布依族苗族自治县", "关岭布依族苗族自治县", "紫云苗族布依族自治县"]
+	}, {
+		"name": "毕节市",
+		"area": ["市辖区", "七星关区", "大方县", "黔西县", "金沙县", "织金县", "纳雍县", "威宁彝族回族苗族自治县", "赫章县"]
+	}, {
+		"name": "铜仁市",
+		"area": ["市辖区", "碧江区", "万山区", "江口县", "玉屏侗族自治县", "石阡县", "思南县", "印江土家族苗族自治县", "德江县", "沿河土家族自治县",
+			"松桃苗族自治县"
+		]
+	}, {
+		"name": "黔西南布依族苗族自治州",
+		"area": ["兴义市", "兴仁县", "普安县", "晴隆县", "贞丰县", "望谟县", "册亨县", "安龙县"]
+	}, {
+		"name": "黔东南苗族侗族自治州",
+		"area": ["凯里市", "黄平县", "施秉县", "三穗县", "镇远县", "岑巩县", "天柱县", "锦屏县", "剑河县", "台江县", "黎平县", "榕江县", "从江县",
+			"雷山县", "麻江县", "丹寨县"
+		]
+	}, {
+		"name": "黔南布依族苗族自治州",
+		"area": ["都匀市", "福泉市", "荔波县", "贵定县", "瓮安县", "独山县", "平塘县", "罗甸县", "长顺县", "龙里县", "惠水县", "三都水族自治县"]
+	}]
+}, {
+	"name": "云南",
+	"city": [{
+		"name": "昆明市",
+		"area": ["市辖区", "五华区", "盘龙区", "官渡区", "西山区", "东川区", "呈贡区", "晋宁县", "富民县", "宜良县", "石林彝族自治县", "嵩明县",
+			"禄劝彝族苗族自治县", "寻甸回族彝族自治县", "安宁市"
+		]
+	}, {
+		"name": "曲靖市",
+		"area": ["市辖区", "麒麟区", "沾益区", "马龙县", "陆良县", "师宗县", "罗平县", "富源县", "会泽县", "宣威市"]
+	}, {
+		"name": "玉溪市",
+		"area": ["市辖区", "红塔区", "江川区", "澄江县", "通海县", "华宁县", "易门县", "峨山彝族自治县", "新平彝族傣族自治县", "元江哈尼族彝族傣族自治县"]
+	}, {
+		"name": "保山市",
+		"area": ["市辖区", "隆阳区", "施甸县", "龙陵县", "昌宁县", "腾冲市"]
+	}, {
+		"name": "昭通市",
+		"area": ["市辖区", "昭阳区", "鲁甸县", "巧家县", "盐津县", "大关县", "永善县", "绥江县", "镇雄县", "彝良县", "威信县", "水富县"]
+	}, {
+		"name": "丽江市",
+		"area": ["市辖区", "古城区", "玉龙纳西族自治县", "永胜县", "华坪县", "宁蒗彝族自治县"]
+	}, {
+		"name": "普洱市",
+		"area": ["市辖区", "思茅区", "宁洱哈尼族彝族自治县", "墨江哈尼族自治县", "景东彝族自治县", "景谷傣族彝族自治县", "镇沅彝族哈尼族拉祜族自治县",
+			"江城哈尼族彝族自治县", "孟连傣族拉祜族佤族自治县", "澜沧拉祜族自治县", "西盟佤族自治县"
+		]
+	}, {
+		"name": "临沧市",
+		"area": ["市辖区", "临翔区", "凤庆县", "云县", "永德县", "镇康县", "双江拉祜族佤族布朗族傣族自治县", "耿马傣族佤族自治县", "沧源佤族自治县"]
+	}, {
+		"name": "楚雄彝族自治州",
+		"area": ["楚雄市", "双柏县", "牟定县", "南华县", "姚安县", "大姚县", "永仁县", "元谋县", "武定县", "禄丰县"]
+	}, {
+		"name": "红河哈尼族彝族自治州",
+		"area": ["个旧市", "开远市", "蒙自市", "弥勒市", "屏边苗族自治县", "建水县", "石屏县", "泸西县", "元阳县", "红河县", "金平苗族瑶族傣族自治县",
+			"绿春县", "河口瑶族自治县"
+		]
+	}, {
+		"name": "文山壮族苗族自治州",
+		"area": ["文山市", "砚山县", "西畴县", "麻栗坡县", "马关县", "丘北县", "广南县", "富宁县"]
+	}, {
+		"name": "西双版纳傣族自治州",
+		"area": ["景洪市", "勐海县", "勐腊县"]
+	}, {
+		"name": "大理白族自治州",
+		"area": ["大理市", "漾濞彝族自治县", "祥云县", "宾川县", "弥渡县", "南涧彝族自治县", "巍山彝族回族自治县", "永平县", "云龙县", "洱源县", "剑川县",
+			"鹤庆县"
+		]
+	}, {
+		"name": "德宏傣族景颇族自治州",
+		"area": ["瑞丽市", "芒市", "梁河县", "盈江县", "陇川县"]
+	}, {
+		"name": "怒江傈僳族自治州",
+		"area": ["泸水市", "福贡县", "贡山独龙族怒族自治县", "兰坪白族普米族自治县"]
+	}, {
+		"name": "迪庆藏族自治州",
+		"area": ["香格里拉市", "德钦县", "维西傈僳族自治县"]
+	}]
+}, {
+	"name": "西藏",
+	"city": [{
+		"name": "拉萨市",
+		"area": ["市辖区", "城关区", "堆龙德庆区", "林周县", "当雄县", "尼木县", "曲水县", "达孜县", "墨竹工卡县"]
+	}, {
+		"name": "日喀则市",
+		"area": ["桑珠孜区", "南木林县", "江孜县", "定日县", "萨迦县", "拉孜县", "昂仁县", "谢通门县", "白朗县", "仁布县", "康马县", "定结县",
+			"仲巴县", "亚东县", "吉隆县", "聂拉木县", "萨嘎县", "岗巴县"
+		]
+	}, {
+		"name": "昌都市",
+		"area": ["卡若区", "江达县", "贡觉县", "类乌齐县", "丁青县", "察雅县", "八宿县", "左贡县", "芒康县", "洛隆县", "边坝县"]
+	}, {
+		"name": "林芝市",
+		"area": ["巴宜区", "工布江达县", "米林县", "墨脱县", "波密县", "察隅县", "朗县"]
+	}, {
+		"name": "山南市",
+		"area": ["市辖区", "乃东区", "扎囊县", "贡嘎县", "桑日县", "琼结县", "曲松县", "措美县", "洛扎县", "加查县", "隆子县", "错那县", "浪卡子县"]
+	}, {
+		"name": "那曲地区",
+		"area": ["那曲县", "嘉黎县", "比如县", "聂荣县", "安多县", "申扎县", "索县", "班戈县", "巴青县", "尼玛县", "双湖县"]
+	}, {
+		"name": "阿里地区",
+		"area": ["普兰县", "札达县", "噶尔县", "日土县", "革吉县", "改则县", "措勤县"]
+	}]
+}, {
+	"name": "陕西",
+	"city": [{
+		"name": "西安市",
+		"area": ["市辖区", "新城区", "碑林区", "莲湖区", "灞桥区", "未央区", "雁塔区", "阎良区", "临潼区", "长安区", "高陵区", "蓝田县", "周至县",
+			"户县"
+		]
+	}, {
+		"name": "铜川市",
+		"area": ["市辖区", "王益区", "印台区", "耀州区", "宜君县"]
+	}, {
+		"name": "宝鸡市",
+		"area": ["市辖区", "渭滨区", "金台区", "陈仓区", "凤翔县", "岐山县", "扶风县", "眉县", "陇县", "千阳县", "麟游县", "凤县", "太白县"]
+	}, {
+		"name": "咸阳市",
+		"area": ["市辖区", "秦都区", "杨陵区", "渭城区", "三原县", "泾阳县", "乾县", "礼泉县", "永寿县", "彬县", "长武县", "旬邑县", "淳化县",
+			"武功县", "兴平市"
+		]
+	}, {
+		"name": "渭南市",
+		"area": ["市辖区", "临渭区", "华州区", "潼关县", "大荔县", "合阳县", "澄城县", "蒲城县", "白水县", "富平县", "韩城市", "华阴市"]
+	}, {
+		"name": "延安市",
+		"area": ["市辖区", "宝塔区", "安塞区", "延长县", "延川县", "子长县", "志丹县", "吴起县", "甘泉县", "富县", "洛川县", "宜川县", "黄龙县",
+			"黄陵县"
+		]
+	}, {
+		"name": "汉中市",
+		"area": ["市辖区", "汉台区", "南郑县", "城固县", "洋县", "西乡县", "勉县", "宁强县", "略阳县", "镇巴县", "留坝县", "佛坪县"]
+	}, {
+		"name": "榆林市",
+		"area": ["市辖区", "榆阳区", "横山区", "神木县", "府谷县", "靖边县", "定边县", "绥德县", "米脂县", "佳县", "吴堡县", "清涧县", "子洲县"]
+	}, {
+		"name": "安康市",
+		"area": ["市辖区", "汉滨区", "汉阴县", "石泉县", "宁陕县", "紫阳县", "岚皋县", "平利县", "镇坪县", "旬阳县", "白河县"]
+	}, {
+		"name": "商洛市",
+		"area": ["市辖区", "商州区", "洛南县", "丹凤县", "商南县", "山阳县", "镇安县", "柞水县"]
+	}]
+}, {
+	"name": "甘肃",
+	"city": [{
+		"name": "兰州市",
+		"area": ["市辖区", "城关区", "七里河区", "西固区", "安宁区", "红古区", "永登县", "皋兰县", "榆中县"]
+	}, {
+		"name": "嘉峪关市",
+		"area": ["市辖区"]
+	}, {
+		"name": "金昌市",
+		"area": ["市辖区", "金川区", "永昌县"]
+	}, {
+		"name": "白银市",
+		"area": ["市辖区", "白银区", "平川区", "靖远县", "会宁县", "景泰县"]
+	}, {
+		"name": "天水市",
+		"area": ["市辖区", "秦州区", "麦积区", "清水县", "秦安县", "甘谷县", "武山县", "张家川回族自治县"]
+	}, {
+		"name": "武威市",
+		"area": ["市辖区", "凉州区", "民勤县", "古浪县", "天祝藏族自治县"]
+	}, {
+		"name": "张掖市",
+		"area": ["市辖区", "甘州区", "肃南裕固族自治县", "民乐县", "临泽县", "高台县", "山丹县"]
+	}, {
+		"name": "平凉市",
+		"area": ["市辖区", "崆峒区", "泾川县", "灵台县", "崇信县", "华亭县", "庄浪县", "静宁县"]
+	}, {
+		"name": "酒泉市",
+		"area": ["市辖区", "肃州区", "金塔县", "瓜州县", "肃北蒙古族自治县", "阿克塞哈萨克族自治县", "玉门市", "敦煌市"]
+	}, {
+		"name": "庆阳市",
+		"area": ["市辖区", "西峰区", "庆城县", "环县", "华池县", "合水县", "正宁县", "宁县", "镇原县"]
+	}, {
+		"name": "定西市",
+		"area": ["市辖区", "安定区", "通渭县", "陇西县", "渭源县", "临洮县", "漳县", "岷县"]
+	}, {
+		"name": "陇南市",
+		"area": ["市辖区", "武都区", "成县", "文县", "宕昌县", "康县", "西和县", "礼县", "徽县", "两当县"]
+	}, {
+		"name": "临夏回族自治州",
+		"area": ["临夏市", "临夏县", "康乐县", "永靖县", "广河县", "和政县", "东乡族自治县", "积石山保安族东乡族撒拉族自治县"]
+	}, {
+		"name": "甘南藏族自治州",
+		"area": ["合作市", "临潭县", "卓尼县", "舟曲县", "迭部县", "玛曲县", "碌曲县", "夏河县"]
+	}]
+}, {
+	"name": "青海",
+	"city": [{
+		"name": "西宁市",
+		"area": ["市辖区", "城东区", "城中区", "城西区", "城北区", "大通回族土族自治县", "湟中县", "湟源县"]
+	}, {
+		"name": "海东市",
+		"area": ["乐都区", "平安区", "民和回族土族自治县", "互助土族自治县", "化隆回族自治县", "循化撒拉族自治县"]
+	}, {
+		"name": "海北藏族自治州",
+		"area": ["门源回族自治县", "祁连县", "海晏县", "刚察县"]
+	}, {
+		"name": "黄南藏族自治州",
+		"area": ["同仁县", "尖扎县", "泽库县", "河南蒙古族自治县"]
+	}, {
+		"name": "海南藏族自治州",
+		"area": ["共和县", "同德县", "贵德县", "兴海县", "贵南县"]
+	}, {
+		"name": "果洛藏族自治州",
+		"area": ["玛沁县", "班玛县", "甘德县", "达日县", "久治县", "玛多县"]
+	}, {
+		"name": "玉树藏族自治州",
+		"area": ["玉树市", "杂多县", "称多县", "治多县", "囊谦县", "曲麻莱县"]
+	}, {
+		"name": "海西蒙古族藏族自治州",
+		"area": ["格尔木市", "德令哈市", "乌兰县", "都兰县", "天峻县"]
+	}]
+}, {
+	"name": "宁夏",
+	"city": [{
+		"name": "银川市",
+		"area": ["市辖区", "兴庆区", "西夏区", "金凤区", "永宁县", "贺兰县", "灵武市"]
+	}, {
+		"name": "石嘴山市",
+		"area": ["市辖区", "大武口区", "惠农区", "平罗县"]
+	}, {
+		"name": "吴忠市",
+		"area": ["市辖区", "利通区", "红寺堡区", "盐池县", "同心县", "青铜峡市"]
+	}, {
+		"name": "固原市",
+		"area": ["市辖区", "原州区", "西吉县", "隆德县", "泾源县", "彭阳县"]
+	}, {
+		"name": "中卫市",
+		"area": ["市辖区", "沙坡头区", "中宁县", "海原县"]
+	}]
+}, {
+	"name": "新疆",
+	"city": [{
+		"name": "乌鲁木齐市",
+		"area": ["市辖区", "天山区", "沙依巴克区", "新市区", "水磨沟区", "头屯河区", "达坂城区", "米东区", "乌鲁木齐县"]
+	}, {
+		"name": "克拉玛依市",
+		"area": ["市辖区", "独山子区", "克拉玛依区", "白碱滩区", "乌尔禾区"]
+	}, {
+		"name": "吐鲁番市",
+		"area": ["高昌区", "鄯善县", "托克逊县"]
+	}, {
+		"name": "哈密市",
+		"area": ["伊州区", "巴里坤哈萨克自治县", "伊吾县"]
+	}, {
+		"name": "昌吉回族自治州",
+		"area": ["昌吉市", "阜康市", "呼图壁县", "玛纳斯县", "奇台县", "吉木萨尔县", "木垒哈萨克自治县"]
+	}, {
+		"name": "博尔塔拉蒙古自治州",
+		"area": ["博乐市", "阿拉山口市", "精河县", "温泉县"]
+	}, {
+		"name": "巴音郭楞蒙古自治州",
+		"area": ["库尔勒市", "轮台县", "尉犁县", "若羌县", "且末县", "焉耆回族自治县", "和静县", "和硕县", "博湖县"]
+	}, {
+		"name": "阿克苏地区",
+		"area": ["阿克苏市", "温宿县", "库车县", "沙雅县", "新和县", "拜城县", "乌什县", "阿瓦提县", "柯坪县"]
+	}, {
+		"name": "克孜勒苏柯尔克孜自治州",
+		"area": ["阿图什市", "阿克陶县", "阿合奇县", "乌恰县"]
+	}, {
+		"name": "喀什地区",
+		"area": ["喀什市", "疏附县", "疏勒县", "英吉沙县", "泽普县", "莎车县", "叶城县", "麦盖提县", "岳普湖县", "伽师县", "巴楚县",
+			"塔什库尔干塔吉克自治县"
+		]
+	}, {
+		"name": "和田地区",
+		"area": ["和田市", "和田县", "墨玉县", "皮山县", "洛浦县", "策勒县", "于田县", "民丰县"]
+	}, {
+		"name": "伊犁哈萨克自治州",
+		"area": ["伊宁市", "奎屯市", "霍尔果斯市", "伊宁县", "察布查尔锡伯自治县", "霍城县", "巩留县", "新源县", "昭苏县", "特克斯县", "尼勒克县"]
+	}, {
+		"name": "塔城地区",
+		"area": ["塔城市", "乌苏市", "额敏县", "沙湾县", "托里县", "裕民县", "和布克赛尔蒙古自治县"]
+	}, {
+		"name": "阿勒泰地区",
+		"area": ["阿勒泰市", "布尔津县", "富蕴县", "福海县", "哈巴河县", "青河县", "吉木乃县"]
+	}, {
+		"name": "直辖县",
+		"area": ["石河子市", "阿拉尔市", "图木舒克市", "五家渠市", "铁门关市"]
+	}]
+}, {
+	"name": "香港",
+	"city": [{
+		"name": "香港特别行政区",
+		"area": ["中西区", "东区", "九龙城区", "观塘区", "南区", "深水埗区", "湾仔区", "黄大仙区", "油尖旺区", "离岛区", "葵青区", "北区", "西贡区",
+			"沙田区", "屯门区", "大埔区", "荃湾区", "元朗区"
+		]
+	}]
+}, {
+	"name": "澳门",
+	"city": [{
+		"name": "澳门特别行政区",
+		"area": ["澳门半岛", "凼仔", "路凼城", "路环"]
+	}]
+}, {
+	"name": "台湾",
+	"city": [{
+		"name": "彰化县",
+		"area": ["芳苑乡", "芬园乡", "福兴乡", "和美镇", "花坛乡", "鹿港镇", "埤头乡", "埔心乡", "埔盐乡", "伸港乡", "社头乡", "田尾乡", "田中镇",
+			"线西乡", "溪湖镇", "秀水乡", "溪州乡", "永靖乡", "员林市", "竹塘乡"
+		]
+	}, {
+		"name": "新北市",
+		"area": ["八里区", "板桥区", "贡寮区", "金山区", "林口区", "芦洲区", "坪林区", "平溪区", "瑞芳区", "三重区", "三峡区", "三芝区", "深坑区",
+			"石碇区", "石门区", "双溪区", "树林区", "泰山区", "淡水区", "土城区"
+		]
+	}, {
+		"name": "澎湖县",
+		"area": ["白沙乡", "湖西乡", "马公市", "七美乡", "望安乡", "西屿乡"]
+	}, {
+		"name": "屏东县",
+		"area": ["三地门乡", "狮子乡", "泰武乡", "万丹乡", "万峦乡", "雾臺乡", "新埤乡", "新园乡", "盐埔乡", "竹田乡", "长治乡", "潮州镇", "车城乡",
+			"春日乡", "东港镇", "枋寮乡", "枋山乡", "高树乡", "恆春镇", "佳冬乡"
+		]
+	}, {
+		"name": "臺中市",
+		"area": ["梧栖区", "乌日区", "新社区", "西屯区", "北屯区", "中区", "大肚区", "大甲区", "大里区", "大雅区", "大安区", "东势区", "东区",
+			"丰原区", "和平区", "后里区", "龙井区", "南屯区", "北区", "清水区"
+		]
+	}, {
+		"name": "臺南市",
+		"area": ["佳里区", "将军区", "六甲区", "柳营区", "龙崎区", "麻豆区", "南化区", "楠西区", "北区", "七股区", "仁德区", "善化区", "山上区",
+			"南区", "中西区", "下营区", "西港区", "新化区", "新市区", "新营区"
+		]
+	}, {
+		"name": "臺北市",
+		"area": ["北投区", "大同区", "大安区", "南港区", "内湖区", "士林区", "松山区", "万华区", "文山区", "信义区", "中山区", "中正区"]
+	}, {
+		"name": "臺东县",
+		"area": ["卑南乡", "长滨乡", "成功镇", "池上乡", "达仁乡", "大武乡", "东河乡", "关山镇", "海端乡", "金峰乡", "兰屿乡", "绿岛乡", "鹿野乡",
+			"太麻里乡", "臺东市", "延平乡"
+		]
+	}, {
+		"name": "桃园市",
+		"area": ["八德区", "大溪区", "大园区", "復兴区", "观音区", "龟山区", "龙潭区", "芦竹区", "平镇区", "桃园区", "新屋区", "杨梅区", "中坜区"]
+	}, {
+		"name": "宜兰县",
+		"area": ["大同乡", "钓鱼臺", "冬山乡", "礁溪乡", "罗东镇", "南澳乡", "三星乡", "苏澳镇", "头城镇", "五结乡", "宜兰市", "员山乡", "壮围乡"]
+	}, {
+		"name": "南投县",
+		"area": ["草屯镇", "国姓乡", "集集镇", "鹿谷乡", "名间乡", "南投市", "埔里镇", "仁爱乡", "水里乡", "信义乡", "鱼池乡", "中寮乡", "竹山镇"]
+	}, {
+		"name": "南海岛",
+		"area": ["东沙群岛", "南沙群岛"]
+	}, {
+		"name": "苗栗县",
+		"area": ["头屋乡", "西湖乡", "苑里镇", "造桥乡", "竹南镇", "卓兰镇", "大湖乡", "公馆乡", "后龙镇", "苗栗市", "南庄乡", "三湾乡", "三义乡",
+			"狮潭乡", "泰安乡", "铜锣乡", "通霄镇", "头份市"
+		]
+	}, {
+		"name": "嘉义市",
+		"area": ["东区", "西区"]
+	}, {
+		"name": "嘉义县",
+		"area": ["阿里山乡", "布袋镇", "大林镇", "大埔乡", "东石乡", "番路乡", "六脚乡", "鹿草乡", "梅山乡", "民雄乡", "朴子市", "水上乡", "太保市",
+			"溪口乡", "新港乡", "义竹乡", "中埔乡", "竹崎乡"
+		]
+	}, {
+		"name": "新竹市",
+		"area": ["东区", "北区"]
+	}, {
+		"name": "新竹县",
+		"area": ["峨眉乡", "关西镇", "横山乡", "湖口乡", "尖石乡", "芎林乡", "五峰乡", "新丰乡", "新埔镇", "竹北市", "竹东镇", "宝山乡", "北埔乡"]
+	}, {
+		"name": "花莲县",
+		"area": ["卓溪乡", "丰滨乡", "凤林镇", "富里乡", "光復乡", "花莲市", "吉安乡", "瑞穗乡", "寿丰乡", "万荣乡", "新城乡", "秀林乡", "玉里镇"]
+	}, {
+		"name": "高雄市",
+		"area": ["阿莲区", "大寮区", "大社区", "大树区", "凤山区", "冈山区", "鼓山区", "湖内区", "甲仙区", "苓雅区", "林园区", "六龟区", "路竹区",
+			"茂林区", "美浓区", "弥陀区", "那玛夏区", "楠梓区", "内门区", "鸟松区"
+		]
+	}, {
+		"name": "基隆市",
+		"area": ["安乐区", "暖暖区", "七堵区", "仁爱区", "信义区", "中山区", "中正区"]
+	}, {
+		"name": "金门县",
+		"area": ["金城镇", "金湖镇", "金宁乡", "金沙镇", "烈屿乡", "乌坵乡"]
+	}, {
+		"name": "连江县",
+		"area": ["北竿乡", "东引乡", "莒光乡", "南竿乡"]
+	}, {
+		"name": "云林县",
+		"area": ["褒忠乡", "北港镇", "莿桐乡", "大埤乡", "东势乡", "斗六市", "斗南镇", "二崙乡", "古坑乡", "虎尾镇", "口湖乡", "林内乡", "崙背乡",
+			"麦寮乡", "水林乡", "四湖乡", "臺西乡", "土库镇", "西螺镇", "元长乡"
+		]
+	}]
+}]

+ 103 - 0
components/wangding-pickerAddress/wangding-pickerAddress.vue

@@ -0,0 +1,103 @@
+<template>
+	<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() // 更新源数据
+				.updateAddressDate() // 更新结果数据
+				.$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
+			}
+			
+		}
+	}
+</script>
+
+<style>
+</style>

+ 39 - 0
libs/log.js

@@ -0,0 +1,39 @@
+
+const logLength=100;//缓存存储上限
+const name = 'log';//缓存名字
+export function addLog (data,content='') {
+	let log = uni.getStorageSync(name)||[];
+	log.unshift({
+		title:data,
+		content:content
+	});
+	uni.setStorageSync(name,log);
+	initLog(log);
+}
+
+
+export function delLog () {
+	return uni.setStorageSync(name,'');
+}
+
+export function getLog () {
+	return uni.getStorageSync(name);
+}
+
+export function initLog (log) {
+	if(log.length>logLength){
+		const newarr = log.slice(log.length-logLength);
+		uni.setStorageSync(name,newarr);
+	}
+}
+export function showLog (log) {
+	
+	let str = '';
+	uni.getStorageSync(name).forEach((e) => {
+		str+=e.title+':'+JSON.stringify(e.content)
+	})
+	uni.showModal({
+		title:"日志",
+		content:str
+	})
+}

+ 13 - 0
main.js

@@ -0,0 +1,13 @@
+import Vue from 'vue'
+import store from './store'
+import App from './App'
+Vue.config.productionTip = false
+Vue.prototype.$fire = new Vue();
+Vue.prototype.$store = store;
+
+App.mpType = 'app'
+
+const app = new Vue({
+    ...App
+})
+app.$mount()

+ 203 - 0
manifest.json

@@ -0,0 +1,203 @@
+{
+    "name" : "绿津",
+    "appid" : "__UNI__1E38A9C",
+    "description" : "",
+    "versionName" : "1.0.19",
+    "versionCode" : 122,
+    "transformPx" : false,
+    "app-plus" : {
+        /* 5+App特有相关 */
+        "usingComponents" : true,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        "modules" : {
+            "Maps" : {},
+            "Geolocation" : {},
+            "OAuth" : {},
+            "Payment" : {},
+            "Share" : {}
+        },
+        /* 模块配置 */
+        "distribute" : {
+            /* 应用发布信息 */
+            "android" : {
+                /* android打包配置 */
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+            },
+            "ios" : {
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSPhotoLibraryUsageDescription" : "用于提交审核认证",
+                    "NSLocationWhenInUseUsageDescription" : "该应用需要持续获取用户地理位置,以便为你进行导航",
+                    "NSLocationAlwaysUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息",
+                    "NSPhotoLibraryAddUsageDescription" : "该应用需要读取你的相册,以便为你编辑个人信息",
+                    "NSCameraUsageDescription" : "该应用需要你的相机,以便你完成信息认证",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "该应用需要你的地理位置,以便为你提供当前位置信息"
+                },
+                "dSYMs" : false
+            },
+            /* ios打包配置 */
+            "sdkConfigs" : {
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "7e8fabcd781f77afbd37eaf98dd54498",
+                        "appkey_android" : "605c71799909b1b96fbc15dbe161cca0"
+                    }
+                },
+                "oauth" : {
+                    "weixin" : {
+                        "appid" : "wx016c3a0056b79c15",
+                        "appsecret" : "ab387ea25d15ad1f6d91d72ddc64bf96",
+                        "UniversalLinks" : "https://www.zjljzn.com/uni-universallinks/__UNI__F0EBD91/"
+                    },
+                    "apple" : {}
+                },
+                "ad" : {},
+                "geolocation" : {
+                    "amap" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appkey_ios" : "7e8fabcd781f77afbd37eaf98dd54498",
+                        "appkey_android" : "605c71799909b1b96fbc15dbe161cca0"
+                    },
+                    "system" : {
+                        "__platform__" : [ "ios", "android" ]
+                    }
+                },
+                "payment" : {
+                    "alipay" : {
+                        "__platform__" : [ "ios", "android" ]
+                    },
+                    "weixin" : {
+                        "__platform__" : [ "ios", "android" ],
+                        "appid" : "wx016c3a0056b79c15",
+                        "UniversalLinks" : "https://www.zjljzn.com/uni-universallinks/__UNI__F0EBD91/"
+                    }
+                },
+                "push" : {},
+                "share" : {
+                    "weixin" : {
+                        "appid" : "wx016c3a0056b79c15",
+                        "UniversalLinks" : "https://www.zjljzn.com/uni-universallinks/__UNI__F0EBD91/"
+                    }
+                },
+                "statics" : {}
+            },
+            "splashscreen" : {
+                "androidStyle" : "common",
+                "iosStyle" : "common",
+                "android" : {
+                    "hdpi" : "unpackage/启动图/安卓/482.9.png",
+                    "xhdpi" : "unpackage/启动图/安卓/722.9.png",
+                    "xxhdpi" : "unpackage/启动图/安卓/1082.9.png"
+                },
+                "ios" : {
+                    "storyboard" : "unpackage/启动图/ios/CustomStoryboard.zip"
+                }
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
+        }
+    },
+    /* SDK配置 */
+    "quickapp" : {},
+    /* 快应用特有相关 */
+    "mp-weixin" : {
+        /* 小程序特有相关 */
+        "usingComponents" : true,
+        "appid" : "wx1af9ca9ccd6ca98b",
+        "setting" : {
+            "urlCheck" : true,
+            "minified" : true
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "为了定位车辆位置需要获取定位信息"
+            }
+        },
+        "lazyCodeLoading" : "requiredComponents",
+        "requiredBackgroundModes" : [ "location" ]
+    },
+    "h5" : {
+        "title" : "绿津",
+        "domain" : "",
+        "router" : {
+            "base" : "/index/",
+            "mode" : "history"
+        },
+        "devServer" : {
+            "proxy" : {
+                "/api" : {
+                    "target" : "https://www.zjljzn.com/api",
+                    // "changeOrigin": true,
+                    "pathRewrite" : {
+                        "/api" : "" // rewrite path
+                    }
+                }
+            },
+            "https" : true
+        },
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "VYZBZ-P2TRG-RMIQ3-ITAIN-2DKBK-CKFQQ"
+                }
+            }
+        }
+    },
+    "_spaceID" : "364f3115-6ed2-4e8f-913f-836cbd3f34fa"
+}

+ 19 - 0
package.json

@@ -0,0 +1,19 @@
+{
+    "id": "alger-simg",
+    "name": "图片预览(使用简单 长按可保存分享 插件)",
+    "version": "1.1.0",
+    "description": "图片预览(使用简单) 可以双指缩放 可以保存分享",
+    "keywords": [
+        "图片",
+        "image",
+        "img",
+        "图片预览",
+        "大图"
+    ],
+    "dcloudext": {
+        "category": [
+            "前端组件",
+            "通用组件"
+        ]
+    }
+}

+ 441 - 0
pages.json

@@ -0,0 +1,441 @@
+{
+	"pages": [{
+			"path": "pages/home/index",
+			"style": {
+				// #ifndef MP
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				"navigationBarTitleText": "装修"
+			}
+		},
+		{
+			"path": "pages/home/user",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "个人中心"
+			}
+		},
+		{
+			"path": "pages/home/category",
+			"style": {
+				// #ifdef APP-PLUS
+				"navigationStyle": "custom",
+				// #endif
+				// #ifndef MP
+				"app-plus": {
+					"bounce": "none",
+					"titleNView": {
+						"searchInput": {
+							"backgroundColor": "rgba(231, 231, 231,.7)",
+							"borderRadius": "16px",
+							"placeholder": "商品搜索",
+							"disabled": true,
+							"placeholderColor": "#606266",
+							"align": "left"
+						}
+					}
+				},
+				// #endif
+				"navigationBarTitleText": "分类"
+			}
+		},
+		{
+			"path": "pages/home/cart",
+			"style": {
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// #endif
+				"navigationBarTitleText": "购物车"
+			}
+		}
+	],
+	"subPackages": [{ // 模块分包
+		"root": "pages/user",
+		"name": "user",
+		"pages": [
+			{
+				"path": "shareQrCode",
+				"style": {
+					"navigationBarTitleText": "邀请好友"
+				}
+			},
+			{
+				"path": "realName/realNameAuthentication",
+				"style": {
+					"navigationBarTitleText": "实名认证"
+				}
+			},
+			{
+				"path": "realName/cropper",
+				"style": {
+					"navigationBarTitleText": "图片裁切"
+				}
+			},
+			{
+				"path": "myteam",
+				"style": {
+					"navigationBarTitleText": "我的团队"
+				}
+			},
+			{
+				"path": "award/award",
+				"style": {
+					"navigationBarTitleText": "佣金",
+					"navigationBarBackgroundColor": "#f6ab0b",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "award/awardList",
+				"style": {
+					"navigationBarTitleText": "佣金明细"
+				}
+			},
+			{
+				"path": "award/withdrawal",
+				"style": {
+					"navigationBarTitleText": "提现"
+				}
+			},
+			{
+				"path": "money/pay",
+				"style": {
+					"navigationBarTitleText": "支付",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "money/paySuccess",
+				"style": {
+					"navigationBarTitleText": "支付成功"
+				}
+			},
+			{
+				"path": "money/wallet",
+				"style": {
+					"navigationBarTitleText": "我的钱包",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			{
+				"path": "money/walletList",
+				"style": {
+					"navigationBarTitleText": "余额明细"
+				}
+			},
+			{
+				"path": "award/account",
+				"style": {
+					"navigationBarTitleText": "提现账号"
+				}
+			},
+			{
+				"path": "money/recharge",
+				"style": {
+					"navigationBarTitleText": "充值",
+					"navigationBarBackgroundColor": "#0BBB62",
+					"navigationBarTextStyle": "white"
+				}
+			},
+			// {
+			// 	"path": "favorites",
+			// 	"style": {
+			// 		"navigationBarTitleText": "收藏夹"
+			// 	}
+			// }, {
+			// 	"path": "coupon",
+			// 	"style": {
+			// 		"navigationBarTitleText": "我的卡卷"
+			// 	}
+			// },
+			{
+				"path": "scoreAccumulate",
+				"style": {
+					"navigationBarTitleText": "积分明细"
+				}
+			}
+		]
+	}, {
+		"root": "pages/index",
+		"name": "index",
+		"pages": [{
+				"path": "notice",
+				"style": {
+					"navigationBarTitleText": "消息中心"
+				}
+			},
+			{
+				"path": "share",
+				"style": {
+					"navigationBarTitleText": "邀好友赚佣金"
+				}
+			},
+			// #ifndef APP
+			{
+				"path": "follow",
+				"style": {
+					"navigationBarTitleText": "关注公众号"
+				}
+			},
+			// #endif
+			{
+				"path": "noticeDetail",
+				"style": {
+					"navigationBarTitleText": "消息",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			},
+			{
+				"path": "shopTab",
+				"style": {
+					// "enablePullDownRefresh": true,
+					"navigationStyle": "custom",
+					"navigationBarTitleText": "门店查询",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			}
+		]
+	}, {
+		"root": "pages/public",
+		"name": "public",
+		"pages": [{
+				"path": "redirect",
+				"style": {
+					"navigationBarTitleText": "微信登录跳转页面",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			// #ifdef H5
+			{
+				"path": "domApp",
+				"style": {
+					"navigationBarTitleText": "app下载",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			// #endif
+			// #ifndef MP
+			{
+				"path": "workwork",
+				"style": {
+					"navigationBarTitleText": "关于我们"
+				}
+			},
+			// #endif
+			{
+				"path": "register",
+				"style": {
+					"navigationBarTitleText": "注册",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			{
+				"path": "phoneLogin",
+				"style": {
+					"navigationBarTitleText": "手机登录",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			{
+				"path": "login",
+				"style": {
+					"navigationBarTitleText": "登录",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			// #ifdef MP || H5
+			{
+				"path": "wxLogin",
+				"style": {
+					"navigationBarTitleText": "微信登录",
+					"app-plus": {
+						"titleNView": {
+							"type": "transparent"
+						}
+					}
+				}
+			},
+			// #endif
+			{
+				"path": "forget",
+				"style": {
+					"navigationBarTitleText": "忘记密码",
+					"app-plus": {
+						"titleNView": false
+					}
+				}
+			},
+			{
+				"path": "userAgreement",
+				"style": {
+					"navigationBarTitleText": "用户协议"
+				}
+			},
+			{
+				"path": "privacyAgreement",
+				"style": {
+					"navigationBarTitleText": "隐私协议"
+				}
+			}
+		]
+	},
+	{
+		"root": "pages/set",
+		"name": "set",
+		"pages": [{
+			"path": "set",
+			"style": {
+				"navigationBarTitleText": "设置"
+			}
+		},
+		{
+			"path": "address",
+			"style": {
+				"navigationBarTitleText": "收货地址"
+			}
+		},
+		{
+			"path": "addressManage",
+			"style": {
+				"navigationBarTitleText": "編輯地址"
+			}
+		},
+		{
+			"path": "phone",
+			"style": {
+				"navigationBarTitleText": "手机认证"
+			}
+		},
+		{
+			"path": "password",
+			"style": {
+				"navigationBarTitleText": "修改密码"
+			}
+		},
+		{
+			"path": "userinfo",
+			"style": {
+				"navigationBarTitleText": "修改资料"
+			}
+		}]
+	},
+	{
+		"root": "pages/order",
+		"name": "order",
+		"pages": [{
+			"path": "order",
+			"style": {
+				"navigationBarTitleText": "我的订单",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "orderAfter",
+			"style": {
+				"navigationBarTitleText": "售后管理"
+			}
+		},
+		{
+			"path": "orderDetail",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"app-plus": {
+					"bounce": "none"
+				}
+			}
+		},
+		{
+			"path": "evaluate",
+			"style": {
+				"navigationBarTitleText": "评论"
+			}
+		},
+		{
+			"path": "orderRefund",
+			"style": {
+				"navigationBarTitleText": "申请退款"
+			}
+		},
+		{
+			"path": "createOrder",
+			"style": {
+				"navigationBarTitleText": "创建订单"
+			}
+		}]
+	},
+	{
+		"root": "pages/product",
+		"name": "product",
+		"pages": [
+			
+		]
+	}],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8"
+	},
+	"tabBar": {
+		"color": "#666666",
+		"selectedColor": "#5DBC7C",
+		"borderStyle": "black",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/home/index",
+				"iconPath": "static/tabBar/tab-home.png",
+				"selectedIconPath": "static/tabBar/tab-home-current.png",
+				"text": "首页"
+			},
+			{
+				"pagePath": "pages/home/category",
+				"iconPath": "static/tabBar/tab-cate.png",
+				"selectedIconPath": "static/tabBar/tab-cate-current.png",
+				"text": "分类"
+			},
+			{
+				"pagePath": "pages/home/cart",
+				"iconPath": "static/tabBar/tab-cart.png",
+				"selectedIconPath": "static/tabBar/tab-cart-current.png",
+				"text": "购物车"
+			},
+			{
+				"pagePath": "pages/home/user",
+				"iconPath": "static/tabBar/tab-my.png",
+				"selectedIconPath": "static/tabBar/tab-my-current.png",
+				"text": "我的"
+			}
+		]
+	},
+	"condition": { //模式配置,仅开发期间生效
+		"current": 0, //当前激活的模式(list 的索引项)
+		"list": [{
+			"name": "", //模式名称
+			"path": "", //启动页面,必选
+			"query": "" //启动参数,在页面的onLoad函数里面得到
+		}]
+	}
+}

+ 510 - 0
pages/home/cart.vue

@@ -0,0 +1,510 @@
+<template>
+	<view class="container">
+		<!-- 空白页 -->
+		<view v-if="!hasLogin || empty === true" class="empty">
+			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+			<view v-if="hasLogin" class="empty-tips">
+				空空如也
+				<navigator class="navigator" v-if="hasLogin" url="../index/index" open-type="switchTab">随便逛逛>
+				</navigator>
+			</view>
+			<view v-else class="empty-tips">
+				空空如也
+				<view class="navigator" @click="navToLogin">去登陆></view>
+			</view>
+		</view>
+		<view v-else>
+			<!-- 列表 -->
+			<view class="cart-list">
+				<block v-for="(item, index) in cartList" :key="item.id">
+					<view class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+						<view class="flex padding-r-20" @click="item.checked=!item.checked">
+							<image v-if='item.checked' class="checkedGoods" src="../../static/icon/addressIconXz.png"
+								mode="scaleToFill">
+							</image>
+							<view v-else class="icon-checked-box">
+
+							</view>
+						</view>
+						<image class="image-wrapper" :src="item.productInfo.image" :class="[item.loaded]"
+							mode="aspectFill" lazy-load @load="onImageLoad('cartList', index)"
+							@error="onImageError('cartList', index)"></image>
+						<view class="item-right">
+							<view class="clamp title">{{ item.productInfo.store_name }}</view>
+							<view class="attr">{{ item.productInfo.attrInfo.suk }}</view>
+							<view class="flex">
+								<text class="price">¥{{ item.productInfo.price }}</text>
+								<uni-number-box class="step" :min="1" :max="item.productInfo.stock"
+									:value="item.cart_num > item.productInfo.stock ? item.productInfo.stock : item.cart_num"
+									:isMax="item.cart_num >= item.productInfo.stock ? true : false"
+									:isMin="item.cart_num === 1" :index="index" @eventChange="numberChange">
+								</uni-number-box>
+							</view>
+							<view class="server" v-if="item.day>0">
+								(服务费:{{item.day_deducted}} 服务天数:{{item.day}})
+							</view>
+						</view>
+						<image class="del-btn" src="../../static/icon/goodsExit.png" @click="deleteCartItem(index)"
+							mode="scaleToFill"></image>
+					</view>
+				</block>
+			</view>
+			<!-- 底部菜单栏 -->
+			<view class="action-section">
+				<view class="flex leftBox">
+					<view class="checkbox" @click="check('all')">
+						<image class="icon-checked-box icon-checked" v-if='allChecked'
+							src="../../static/icon/addressIconXz.png" mode="scaleToFill"></image>
+						<view v-else class="icon-checked-box"></view>
+					</view>
+					<view class="margin-l-20">
+						全选
+					</view>
+				</view>
+				<view class="total-box">
+					<view class="font-size-base">
+						<text>合计:</text>
+						<text class="price">¥{{ total }}</text>
+
+					</view>
+					<view class="coupon">
+						共{{checkedNum}}件商品
+					</view>
+				</view>
+				<button type="primary" class="no-border confirm-btn" @click="createOrder">立即购买</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getCartList,
+		getCartNum,
+		cartDel
+	} from '@/api/user.js';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				total: 0, //总价格
+				allChecked: false, //全选状态  true|false
+				empty: false, //空白页现实  true|false
+				cartList: []
+			};
+		},
+		onShow() {
+			uni.setTabBarStyle({
+				backgroundColor: '#FFFFFF'
+			})
+			// 只有登录时才加载数据
+			if (this.hasLogin) {
+				this.loadData();
+			}
+		},
+		watch: {
+			//显示空白页
+			cartList(e) {
+				let empty = e.length === 0 ? true : false;
+				if (this.empty !== empty) {
+					this.empty = empty;
+				}
+			}
+		},
+		computed: {
+			...mapState('user', ['hasLogin']),
+			...mapState('shop', ['shopDetail']),
+			checkedNum() {
+				let num = 0;
+				for (var i = 0; i < this.cartList.length; i++) {
+					if (this.cartList[i].checked) {
+						num++
+					}
+				}
+				return num
+			},
+		},
+		methods: {
+			//请求数据
+			async loadData() {
+				let obj = this;
+				getCartList({
+					store_id:obj.shopDetail.id
+				})
+					.then(function(e) {
+						// 获取当前购物车物品增加数量
+						let nub = obj.cartList.length;
+						// 获取之前对象数组
+						let aArray = obj.cartList.reverse();
+						// 获取返回数据对象数组
+						let bArray = e.data.valid.reverse();
+						obj.cartList = bArray
+							.map((item, ind) => {
+								// 设置返回数据默认为勾选状态
+								item.checked = true;
+								// 获取相同数组之前对象的数据
+								let carlist = aArray[ind];
+								// 判断之前是否已经加载完毕
+								if (carlist && carlist.loaded == 'loaded') {
+									item.loaded = 'loaded';
+								}
+								return item;
+							})
+							.reverse();
+						obj.calcTotal(); //计算总价
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+			},
+			//监听image加载完成
+			onImageLoad(key, index) {
+				// 修改载入完成后图片class样式
+				this.$set(this[key][index], 'loaded', 'loaded');
+			},
+			//监听image加载失败
+			onImageError(key, index) {
+				this[key][index].image = '/static/error/errorImage.jpg';
+			},
+			// 跳转到登录页
+			navToLogin() {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			},
+			//选中状态处理
+			check(type, index) {
+				if (type === 'item') {
+					this.cartList[index].checked = !this.cartList[index].checked;
+				} else {
+					const checked = !this.allChecked;
+					const list = this.cartList;
+					list.forEach(item => {
+						item.checked = checked;
+					});
+					this.allChecked = checked;
+				}
+				this.calcTotal(type);
+			},
+			//数量
+			numberChange(data) {
+				let arr = this.cartList[data.index];
+				arr.cart_num = data.number;
+				getCartNum({
+						id: arr.id,
+						number: data.number
+					})
+					.then(e => {
+						console.log(e);
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+				this.calcTotal();
+			},
+			//删除
+			deleteCartItem(index) {
+				let list = this.cartList;
+				let row = list[index];
+				let id = row.id;
+				uni.showModal({
+					title: '提示',
+					content: '是否删除'+row.productInfo.store_name,
+					success: res => {
+						if(res.confirm){
+							cartDel({
+								ids: id
+							});
+							this.cartList.splice(index, 1);
+							uni.hideLoading();
+							this.calcTotal();
+						}
+					}
+				});
+				
+			},
+			//清空
+			// clearCart() {
+			// 	uni.showModal({
+			// 		content: '清空购物车?',
+			// 		success: e => {
+			// 			if (e.confirm) {
+			// 				let st = this.cartList.map(e => {
+			// 					return e.id;
+			// 				});
+			// 				cartDel({
+			// 					ids: st.join(',')
+			// 				}).then(e => {
+			// 					console.log(e);
+			// 				});
+			// 				this.cartList = [];
+			// 			}
+			// 		}
+			// 	});
+			// },
+			//计算总价
+			calcTotal() {
+				let list = this.cartList;
+				if (list.length === 0) {
+					this.empty = true;
+					return;
+				}
+				let total = 0;
+				let checked = true;
+				list.forEach(item => {
+					if (item.checked === true) {
+						total += item.productInfo.price * item.cart_num;
+					} else if (checked === true) {
+						checked = false;
+					}
+				});
+				this.allChecked = checked;
+				this.total = Number(total.toFixed(2));
+			},
+			//创建订单
+			createOrder() {
+				let list = this.cartList;
+				let goodsData = [];
+				list.forEach(item => {
+					if (item.checked) {
+						goodsData.push(item.id);
+					}
+				});
+
+				uni.navigateTo({
+					url: '/pages/order/createOrder?id=' + goodsData.join(',')
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.container {
+		padding-bottom: 134rpx;
+		background-color: $page-color-base;
+		/* #ifdef MP-WEIXIN || H5 */
+		padding-top: 30rpx;
+		/* #endif */
+		/* #ifdef APP */
+		padding-top: var(--status-bar-height);
+		/* #endif */
+		/* 空白页 */
+		.empty {
+			position: fixed;
+			left: 0;
+			top: 0;
+			width: 100%;
+			height: 100vh;
+			padding-bottom: 100rpx;
+			display: flex;
+			justify-content: center;
+			flex-direction: column;
+			align-items: center;
+			background: #fff;
+
+			.emptyImg {
+				width: 300rpx;
+				height: 250rpx;
+				margin-bottom: 30rpx;
+			}
+
+			.empty-tips {
+				display: flex;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-disabled;
+
+				.navigator {
+					color: $uni-color-primary;
+					margin-left: 16rpx;
+				}
+			}
+		}
+	}
+
+	/* 购物车列表项 */
+	.cart-list {
+		padding: 0 30rpx;
+	}
+
+	.cart-item {
+		display: flex;
+		position: relative;
+		padding: 20rpx;
+		background-color: #FFFFFF;
+		margin-bottom: 20rpx;
+		border-radius: 20rpx;
+
+		.icon-checked-box {
+			width: 37rpx;
+			height: 37rpx;
+			z-index: 5;
+			border: 1px solid $font-color-light;
+			border-radius: 99rpx;
+		}
+
+		.checkedGoods {
+			width: 37rpx;
+			height: 37rpx;
+		}
+
+		.image-wrapper {
+			width: 170rpx;
+			height: 170rpx;
+			flex-shrink: 0;
+			position: relative;
+			border-radius: 20rpx;
+		}
+
+		.checkbox {
+			position: absolute;
+			left: -16rpx;
+			top: -16rpx;
+			z-index: 8;
+			font-size: 44rpx;
+			line-height: 1;
+			padding: 4rpx;
+			color: $font-color-disabled;
+			background: #fff;
+			border-radius: 50px;
+		}
+
+		.item-right {
+			overflow: hidden;
+			position: relative;
+			padding-left: 30rpx;
+			flex-grow: 1;
+
+			.title,
+			.price {
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.attr {
+				font-size: 24rpx;
+				color: $font-color-light;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.server {
+				font-size: 24rpx;
+				color: $font-color-light;
+				margin-top: 10rpx;
+			}
+
+			.price {
+				font-size: 30rpx;
+				color: $color-green;
+			}
+		}
+
+		.del-btn {
+			flex-shrink: 0;
+			height: 40rpx;
+			width: 40rpx;
+		}
+	}
+
+	/* 底部栏 */
+	.action-section {
+		/* #ifdef H5 */
+		margin-bottom: 100rpx;
+		/* #endif */
+		position: fixed;
+		left: 0rpx;
+		bottom: 0rpx;
+		z-index: 95;
+		display: flex;
+		align-items: center;
+		width: 750rpx;
+		height: 100rpx;
+		padding: 0 30rpx;
+		background: rgba(255, 255, 255, 0.9);
+
+		.leftBox {
+			padding-right: 30rpx;
+			border-right: 1px solid $font-color-disabled;
+		}
+
+		.checkbox {
+			line-height: 1;
+			font-size: 30rpx;
+
+			.icon-checked-box {
+				width: 37rpx;
+				height: 37rpx;
+				z-index: 5;
+				border: 1px solid $font-color-light;
+				border-radius: 99rpx;
+			}
+
+			.icon-checked {
+				border: none;
+				color: $base-color;
+			}
+		}
+
+		.clear-btn {
+			position: absolute;
+			left: 26rpx;
+			top: 0;
+			z-index: 4;
+			width: 0;
+			height: 52rpx;
+			line-height: 52rpx;
+			padding-left: 38rpx;
+			font-size: $font-base;
+			color: #fff;
+			background: $font-color-disabled;
+			border-radius: 0 50px 50px 0;
+			opacity: 0;
+			transition: 0.2s;
+
+			&.show {
+				opacity: 1;
+				width: 120rpx;
+			}
+		}
+
+		.total-box {
+			flex-grow: 1;
+			padding-left: 30rpx;
+			font-size: 30rpx;
+
+			.price {
+				color: $color-green;
+			}
+
+			.coupon {
+				font-size: 24rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.confirm-btn {
+			padding: 0 70rpx;
+			margin: 0;
+			border-radius: 100px;
+			height: 70rpx;
+			line-height: 70rpx;
+			font-size: 24rpx;
+			background: $color-yellow;
+			color: #714D01;
+		}
+	}
+
+	/* 复选框选中状态 */
+	.action-section .checkbox.checked,
+	.cart-item .checkbox.checked {
+		color: $base-color;
+	}
+</style>

+ 216 - 0
pages/home/category.vue

@@ -0,0 +1,216 @@
+<template>
+	<view class="content">
+		<scroll-view scroll-y class="left-aside">
+			<view v-for="item in flist" :key="item.id" class="f-item b-b" :class="{ active: item.id === currentId }" @click="tabtap(item)">{{ item.cate_name }}</view>
+		</scroll-view>
+		<scroll-view scroll-with-animation scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
+			<view v-for="item in flist" :key="item.id" class="s-list" :id="'main-' + item.id">
+				<text class="s-item">{{ item.cate_name }}</text>
+				<view class="t-list ">
+					<view @click="navToList(item.id, titem.id)" class="t-item" v-for="titem in item.children" :key="titem.id">
+						<image :src="titem.pic"></image>
+						<text>{{ titem.cate_name }}</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+import { getCategoryList } from '@/api/product.js';
+export default {
+	data() {
+		return {
+			sizeCalcState: false,
+			tabScrollTop: 0,
+			currentId: 9,
+			flist: [],
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	// 监听导航栏输入框点击事件
+	onNavigationBarSearchInputClicked(e) {
+		uni.navigateTo({
+			url: '/pages/product/search'
+		});
+	},
+	methods: {
+		// 载入数据
+		async loadData() {
+			let obj = this;
+			getCategoryList({})
+				.then(({ data }) => {
+					obj.flist = data.map(function(s) {
+						return s;
+					});
+				})
+				.catch(err => {
+					console.log(err);
+				});
+		},
+		//一级分类点击
+		tabtap(item) {
+			console.log(item);
+			// 判断有没有初始化页面高度对象数据
+			if (!this.sizeCalcState) {
+				this.calcSize();
+			}
+			// 获取当前点击的id
+			this.currentId = item.id;
+			console.log(item.top);
+			this.tabScrollTop = item.top;
+			console.log(this.tabScrollTop);
+		},
+		//右侧栏滚动
+		asideScroll(e) {
+			// 判断有没有初始化页面高度对象数据
+			if (!this.sizeCalcState) {
+				this.calcSize();
+			}
+			let scrollTop = e.detail.scrollTop;
+			let box = 0; //列表包裹框高度初始化
+			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
+			// 查询当前页面对象
+			let view = uni.createSelectorQuery().select('.content');
+			view.fields(
+				{
+					id: true,
+					dataset: true,
+					rect: true,
+					size: true,
+					scrollOffset: true
+				},
+				function(e) {
+					// 保存包裹框高度
+					box = e.height;
+				}
+			).exec();
+			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+			let tabs = this.flist.filter(item =>( item.top-10) <= scrollTop).reverse();
+			if (tabs.length > 0) {
+				// 判断是否已经到达滚轮底部
+				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
+					this.currentId = this.flist[this.flist.length - 1].id;
+				} else {
+					this.currentId = tabs[0].id;
+				}
+			}
+		},
+		//计算右侧栏每个tab的高度等信息
+		calcSize() {
+			let h = 0;
+			this.flist.forEach(item => {
+				let view = uni.createSelectorQuery().select('#main-' + item.id);
+				view.fields(
+					{
+						size: true
+					},
+					data => {
+						item.top = h;
+						h += data.height;
+						item.bottom = h;
+					}
+				).exec();
+			});
+			this.sizeCalcState = true;
+		},
+		navToList(sid, tid) {
+			// 点击导航跳转到详细页面
+			uni.navigateTo({
+				url: '/pages/product/list?fid='+this.currentId+'&sid='+sid+'&tid='+tid
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+	background-color: #f8f8f8;
+}
+
+.content {
+	display: flex;
+}
+.left-aside {
+	flex-shrink: 0;
+	width: 200rpx;
+	height: 100%;
+	background-color: #fff;
+}
+.f-item {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 100%;
+	height: 100rpx;
+	font-size: 28rpx;
+	color: $font-color-base;
+	position: relative;
+	&.active {
+		color: $base-color;
+		background: #f8f8f8;
+		&:before {
+			content: '';
+			position: absolute;
+			left: 0;
+			top: 50%;
+			transform: translateY(-50%);
+			height: 36rpx;
+			width: 8rpx;
+			background-color: $base-color;
+			border-radius: 0 4px 4px 0;
+			opacity: 0.8;
+		}
+	}
+}
+
+.right-aside {
+	flex: 1;
+	overflow: hidden;
+	padding-left: 20rpx;
+	padding-right: 20rpx;
+}
+.s-item {
+	display: flex;
+	align-items: center;
+	height: 70rpx;
+	padding-top: 8rpx;
+	font-size: 28rpx;
+	color: $font-color-dark;
+}
+.t-list {
+	display: flex;
+	flex-wrap: wrap;
+	border-radius: 15rpx;
+	width: 100%;
+	background: #fff;
+	padding-top: 12rpx;
+	&:after {
+		content: '';
+		flex: 99;
+		height: 0;
+	}
+}
+.t-item {
+	flex-shrink: 0;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+	width: 171rpx;
+	font-size: 26rpx;
+	color: #666;
+	padding-bottom: 20rpx;
+
+	image {
+		width: 140rpx;
+		height: 140rpx;
+	}
+}
+</style>

+ 118 - 0
pages/home/index.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="indexBox">
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	// #ifdef MP
+	import {
+		share
+	} from '@/api/wx';
+	// #endif
+	import {
+		loadIndexs,
+	} from '@/api/index.js';
+	export default {
+		data() {
+			return {
+			};
+		},
+		computed: {
+			...mapState('user', ['hasLogin', 'userInfo']),
+		},
+		onLoad: function(option) {
+			// #ifndef MP
+			if (option.spread) {
+				// 存储其他邀请人
+				uni.setStorageSync('spread', option.spread);
+			}
+			// #endif
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			this.share()
+			// #endif
+		},
+		onShow() {
+			this.loadIndexs();
+		},
+		onReady() {
+		},
+		// #ifdef MP
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let shareObj = {
+				title: this.shareData.title, // 默认是小程序的名称(可以写slogan等)
+				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.shareData.img,
+				desc: this.shareData.synopsis,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+			// 判断是否可以邀请
+			if (this.userInfo.uid) {
+				shareObj.path += '&spread=' + this.userInfo.uid;
+			}
+			return shareObj;
+		},
+		// #endif
+		methods: {
+			// #ifdef MP
+			share() {
+				// console.log('加载分享');
+				const that = this;
+				// 请求获取默认数据
+				share({}).then(({
+					data
+				}) => {
+					// console.log('分享回调', data);
+					that.shareData = data.data
+				});
+			},
+			// #endif
+			// 首页初始化
+			loadIndexs() {
+				const that = this;
+				// 获取首页数据
+				loadIndexs({
+					store_id: that.shopDetail.id
+				}).then((e) => {
+				}).catch((e) => {
+				})
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			}
+		},
+
+	};
+</script>
+
+<style lang="scss">
+	
+</style>

+ 591 - 0
pages/home/user.vue

@@ -0,0 +1,591 @@
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<scroll-view class="content-box" scroll-y="true">
+			<view class="user-section">
+				<view class="user-info-box ">
+					<view class="detail flex">
+						<view class="portrait-box" @click="navTo('/pages/set/userinfo')">
+							<image class="portrait" :src="user.avatar || '/static/error/missing-face.png'"></image>
+						</view>
+						<view class="info-box">
+							<view class="username flex-start">
+								<text class="clamp padding-r-20">
+									{{ user.nickname || '游客' }}
+								</text>
+								<image v-if="user.level>0" class="tipLevel flex-shrink-false"
+									:src="`../../static/image/level${user.level-1}.png`" mode="heightFix"></image>
+							</view>
+							<view class="flex-start flex">
+								<view class="authentication"
+									@click="navTo('/pages/user/realName/realNameAuthentication')"
+									v-if="userInfo.is_real==0||!userInfo.is_real">未实名认证</view>
+								<view class="authentication success" v-else>已认证</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="cover-container">
+				<view class="tj-sction">
+					<view class="tj-item" @click="navTo('./money/wallet')">
+						<text class="num">{{ user.now_money || '0.00' }}</text>
+						<text>余额</text>
+					</view>
+					<view v-if="fx" class="tj-item" @click="navTo('/pages/user/award/award')">
+						<text class="num">{{ user.brokerage_price || '0.00' }}</text>
+						<text>佣金</text>
+					</view>
+					<!-- <view class="tj-item" @click="navTo('/pages/index/route')">
+						<text class="num">{{ user.record_sum || '0' }}</text>
+						<text>行程</text>
+					</view> -->
+					<view class="tj-item" @click="navTo('/pages/index/notice')">
+						<text class="num">{{ notic|| '0' }}</text>
+						<text>消息</text>
+					</view>
+				</view>
+				<!-- 订单 -->
+				<view class="item-box">
+					<view class="box-title flex">
+						<view class="title"><text>我的订单</text></view>
+						<!-- <view class="link" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover">
+							<text>全部订单</text>
+							<text class="iconfont iconenter"></text>
+						</view> -->
+					</view>
+					<view class="order-section">
+						<view class="order-item" @click="navTo('/pages/order/order?state=3')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconAll.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.unshipped_count > 0">
+									<text>{{ orderInfo.unshipped_count }}</text>
+								</view> -->
+							</view>
+							<text>已完成</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconPay.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.unpaid_count > 0">
+									<text>{{ user.unpaid_count }}</text>
+								</view>
+							</view>
+							<text>待付款</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconGet.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.received_count > 0">
+									<text>{{ user.received_count }}</text>
+								</view>
+							</view>
+							<text>待收货</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/orderAfter?state=0')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconout.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
+									<text>{{ orderInfo.complete_count }}</text>
+								</view> -->
+							</view>
+							<text>售后</text>
+						</view>
+					</view>
+				</view>
+				<view class="listBox">
+					<view class="list">
+						<view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myCart.png" mode="widthFix"></image>
+								<text class="title">我的车辆</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/repair/userRepair')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修历史</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" v-if="fx" @click="navTo('/pages/user/myteam')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">我的团队</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/set/address')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myAddress.png" mode="widthFix">
+								</image>
+								<text class="title">我的地址</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<!-- #ifndef APP -->
+						<view class="flex listItem" @click="navTo('/pages/user/shareQrCode')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifdef APP -->
+						<view class="flex listItem" @click="shareDomApp">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifndef MP -->
+						<view class="flex listItem" @click="navTo('/pages/public/workwork')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myServer.png" mode="widthFix"></image>
+								<text class="title">关于我们</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/mySet.png" mode="widthFix"></image>
+								<text class="title">设置</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tapBottom" v-if='user.adminid' @click="changeTab">
+					前往商家界面
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		share
+	} from '@/api/wx';
+	import {
+		getUser
+	} from '@/api/user.js';
+	import {
+		articleList,
+		notify
+	} from '@/api/index.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				user: {
+					avatar: '', //头像
+					nickname: '', //昵称
+					now_money: 0, //余额
+					brokerage_price: 0, //佣金
+					record_sum: 0, //行程
+					notice_sum: 0, //报警信息
+					question_sum: 0, //系统消息
+					// 订单数据类型
+					orderStatusNum: {
+						unpaid_count: 0, //待付款
+						received_count: 0, //待收货
+					},
+				},
+				shareData: {}
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL', 'urlFile']),
+			...mapState(['fx']),
+			// 总消息条数
+			notic() {
+				return this.user.question_sum + this.user.notice_sum;
+			},
+		},
+		onLoad() {
+			share().then((res) => {
+				this.shareData = res.data.data
+			}).catch((res) => {
+				console.log(res, '分享加载失败');
+			})
+
+		},
+		onShow() {
+			if (this.hasLogin) {
+				this.loadBaseData();
+				this.getUser();
+			}
+		},
+		// 创建时获取分享信息
+		methods: {
+			loadBaseData() {
+				getUserInfo({})
+					.then(({
+						data
+					}) => {
+						this.setUserInfo(data);
+						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+						orderData({})
+							.then(({
+								data
+							}) => {
+								this.setOrderInfo(data);
+							})
+							.catch(e => {
+								this.setOrderInfo({
+									complete_count: 0, //完成
+									received_count: 0, //待收货
+									unshipped_count: 0, //待发货
+									order_count: 0, //订单总数
+									unpaid_count: 0 //待付款
+								});
+							});
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//#ifdef APP
+			shareDomApp() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title: '绿津智能电动车',
+					summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
+					imageUrl: this.shareData.img,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+			// 获取用户数据
+			getUser() {
+				const that = this;
+				getUser({}).then((e) => {
+					this.user = e.data;
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 系统消息
+				articleList({}, 1).then((e) => {
+					that.user.question_sum = e.data.count
+					console.log(that, 1);
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 报警消息
+				notify().then((e) => {
+					that.user.notice_sum = e.data.count
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
+			changeTab() {
+				this.$emit('tab', true)
+			},
+			navTo(url) {
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						fail(e) {
+							console.log(e);
+						}
+					});
+				}
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.tapBottom {
+		margin: 0 50rpx;
+		text-align: center;
+		color: #FFFFFF;
+		border: 1px solid $color-red;
+		background-color: $color-red;
+		line-height: 1;
+		padding: 25rpx;
+		border-radius: 100rpx;
+		margin-top: 50rpx;
+	}
+
+	.listBox {
+		margin-top: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.right {
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				padding-left: 20rpx;
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	%flex-center {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	%section {
+		display: flex;
+		justify-content: space-around;
+		align-content: center;
+		border-radius: 10rpx;
+	}
+
+	.container {
+		height: 100%;
+		background-color: $page-color-base;
+	}
+
+	.content-box {
+		height: 100%;
+	}
+
+	.vheigh {
+		height: var(--status-bar-height);
+	}
+
+	.user-section {
+		padding: 15rpx 30rpx 0;
+		position: relative;
+	}
+
+	.user-info-box {
+		height: 180rpx;
+		color: white;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		z-index: 1;
+
+		.detail {
+			height: 130rpx;
+			flex-grow: 1;
+			overflow: hidden;
+
+			.portrait-box {
+				height: 100%;
+
+				.portrait {
+					width: 130rpx;
+					height: 100%;
+					border: 5rpx solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			.info-box {
+				margin-left: 20rpx;
+				line-height: 1.5;
+				flex-grow: 1;
+				overflow: hidden;
+
+				.tipLevel {
+					height: 36rpx;
+					margin-right: 20rpx;
+				}
+
+				.username {
+					font-size: 40rpx;
+					color: $font-color-dark;
+					font-weight: bold;
+					height: 100%;
+				}
+
+				.authentication {
+					border: 2rpx solid #FF4241;
+					border-radius: 20px;
+					padding: 0 25rpx;
+					font-size: 24rpx;
+					color: #FF4241;
+					float: left;
+
+					&.success {
+						border: 2rpx solid $color-green;
+						color: $color-green;
+					}
+				}
+			}
+		}
+	}
+
+	.cover-container {
+		padding: 0 30rpx;
+		position: relative;
+		padding-bottom: 20rpx;
+	}
+
+	.tj-sction {
+		@extend %section;
+
+		.tj-item {
+			@extend %flex-center;
+			flex-direction: column;
+			height: 100rpx;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+
+		.num {
+			font-size: $font-base;
+			color: $font-color-dark;
+			margin-bottom: 8rpx;
+			font-weight: bold;
+		}
+	}
+
+	.item-box {
+		border-radius: 20rpx;
+		background-color: white;
+		margin-top: 20rpx;
+
+		.box-title {
+			line-height: 1;
+			padding: 30rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.order-section {
+			@extend %section;
+			padding: 28rpx 0;
+			padding-top: 0;
+
+			.order-item {
+				@extend %flex-center;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+				font-size: $font-sm;
+				color: $font-color-dark;
+			}
+
+			.iconfont {
+				font-size: 48rpx;
+				margin-bottom: 18rpx;
+				color: #fa436a;
+			}
+
+			.icon-shouhoutuikuan {
+				font-size: 44rpx;
+			}
+
+			.icon {
+				height: 50rpx;
+				width: 48rpx;
+				margin-bottom: 18rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				background-position: center;
+
+				.icon-img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.history-section {
+		// padding: 30rpx 0 0;
+		margin-top: 20rpx;
+		background: #fff;
+		border-radius: 10rpx;
+
+		.h-list {
+			white-space: nowrap;
+			padding: 30rpx 30rpx 0;
+
+			.h-list-image {
+				display: inline-block;
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+</style>

+ 73 - 0
pages/index/follow.vue

@@ -0,0 +1,73 @@
+<template>
+	<view class="content">
+		<image class="qr" src="../../static/image/followTop.jpg" mode="scaleToFill"></image>
+		<image class="pint" src="../../static/image/followCenter.png" mode="scaleToFill"></image>
+		<view class="text">
+			<!-- #ifdef H5 -->
+			长按二维码识别
+			<!-- #endif -->
+			<!-- #ifndef H5 -->
+			扫码识别公众号
+			<!-- #endif -->
+		</view>
+		<image class="buttomImg" src="../../static/image/followButtom.png" mode="widthFix"></image>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {};
+		},
+		onLoad(options) {},
+		methods: {}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		height: 100%;
+	}
+
+	.content {
+		padding-bottom: 150rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		align-content: center;
+		flex-wrap: wrap;
+		line-height: 1;
+		background-color: $color-green;
+
+		.qr {
+			margin: 0 75rpx;
+			width: 600rpx;
+			height: 600rpx;
+		}
+
+		.pint {
+			margin: 0 auto;
+			margin-top: 50rpx;
+			width: 200rpx;
+			height: 200rpx;
+
+		}
+		.text{
+			color: #FFFFFF;
+			width: 100%;
+			flex-shrink: 0;
+			text-align: center;
+			margin-top: 30rpx;
+		}
+
+		.buttomImg {
+			position: absolute;
+			left: 0;
+			right: 0;
+			bottom: 0;
+			width: 100%;
+			height: 50rpx;
+		}
+	}
+</style>

+ 309 - 0
pages/index/indexComponents/noUser.vue

@@ -0,0 +1,309 @@
+<template>
+	<view class="container">
+		<view class="content">
+			<view class="title">
+				<text>HI,车主</text>
+			</view>
+			<view class="tip">
+				<text>
+					您还没未拥有车辆。
+				</text>
+			</view>
+			<view class="itemTitleBox flex">
+				<view class="itemTitle">
+					附近商家
+				</view>
+				<view class="tager flex" @click="navTo('/pages/index/shopTab')">
+					<text>切换</text>
+					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="shopContent flex">
+				<view class="shoplogo">
+					<image class="logo" :src="shopDetail.image" mode="scaleToFill"></image>
+				</view>
+				<view class="shopDetail">
+					<view class="shopName clamp">
+						{{shopDetail.name}}
+					</view>
+					<view class="shopDetailText">
+						{{shopDetail.detailed_address}}
+					</view>
+				</view>
+			</view>
+			<view class="itemTitleBox flex">
+				<view class="itemTitle">
+					国标系列
+				</view>
+				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id+'&type=1')">
+					<text>全部</text>
+					<image class="itemIcon" src="/static/icon/next1.png" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="flex cartList">
+				<view class="itemBox" v-for="(item,index) in cartList" @click="navTo('/pages/product/product?id='+item.id)" :key='index'>
+					<view class="imgBox">
+						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="itemDetaile">
+						<view class="cartName">
+							<view class="clamp2 ">
+								{{item.store_name}}
+							</view>
+						</view>
+						<view class="maney clamp">
+							<text class="greenText font-size-base">¥{{item.price}}</text>
+							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="itemTitleBox flex">
+				<view class="itemTitle">
+					电摩系列
+				</view>
+				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id+'&type=2')">
+					<text>全部</text>
+					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="flex cartList">
+				<view class="itemBox" v-for="(item,index) in carTwoList" :key='index' @click="navTo('/pages/product/product?id='+item.id)">
+					<view class="imgBox">
+						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="itemDetaile">
+						<view class="cartName">
+							<view class="clamp2 ">
+								{{item.store_name}}
+							</view>
+						</view>
+						<view class="maney clamp">
+							<text class="greenText font-size-base">¥{{item.price}}</text>
+							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="itemTitleBox flex">
+				<view class="itemTitle">
+					电轻摩系列
+				</view>
+				<view class="tager flex" @click="navTo('/pages/shop/shopIndex?id='+shopDetail.id)+'&type=3'">
+					<text>全部</text>
+					<image class="itemIcon" src="../../../static/icon/next1.png" mode="widthFix"></image>
+				</view>
+			</view>
+			<view class="flex cartList">
+				<view class="itemBox" v-for="(item,index) in carTreeList" :key='index' @click="navTo('/pages/product/product?id='+item.id)">
+					<view class="imgBox">
+						<image class="imageItem" :src="item.image" mode="scaleToFill"></image>
+					</view>
+					<view class="itemDetaile">
+						<view class="cartName">
+							<view class="clamp2 ">
+								{{item.store_name}}
+							</view>
+						</view>
+						<view class="maney clamp">
+							<text class="greenText font-size-base">¥{{item.price}}</text>
+							<text class="lign font-size-sm">{{item.sales|getNum}}+付款</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+	} from 'vuex';
+	import {
+		getProducts,
+	} from '@/api/product.js';
+	export default {
+		data() {
+			return {
+				cartList: [], //国标系列电动车
+				carTwoList: [], //电摩系列电动车
+				carTreeList: [], //电摩系列电动车
+			};
+		},
+		computed: {
+			...mapState('shop', ['shopDetail'])
+		},
+		filters: {
+			getNum(num) {
+				if (num) {
+					// 转为字符串
+					num += '';
+					let nu = num.slice(0, 1);
+					for (let i = 0; i < num.length - 1; i++) {
+						nu += 0
+					}
+					return nu
+				} else {
+					return 0
+				}
+			}
+		},
+		methods: {
+			init() {
+				// 查询国标
+				this.getProducts(2, 'salesOrder').then((data) => {
+					this.cartList = data;
+				})
+				// 查询电车
+				this.getProducts(5, 'salesOrder').then((data) => {
+					this.carTwoList = data;
+				})
+				// 查询电轻摩
+				this.getProducts(6, 'salesOrder').then((data) => {
+					this.carTreeList = data;
+				})
+			},
+			// 获取门店车辆信息
+			getProducts(sid, type) {
+				let data = {
+					sid: sid,
+					page: 1,
+					limit: 10,
+					store_id: this.shopDetail.id,
+					is_car: 1
+				}
+				// 保存查询分类
+				data[type] = 1
+				return new Promise((ok, erro) => {
+					getProducts(data).then(({
+						data
+					}) => {
+						ok(data)
+					}).catch((e) => {
+						erro(e)
+					})
+				})
+			},
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			}
+		},
+
+	};
+</script>
+
+<style lang="scss">
+	$paddingJg:40rpx;
+	.container{
+		/* #ifdef APP */
+		padding-top: calc(105rpx + var(--status-bar-height));
+		/* #endif */
+		/* #ifdef H5 || MP */
+		padding-top: 105rpx;
+		/* #endif */
+	}
+	.content {
+		.greenText {
+			color: $color-green;
+		}
+		.title {
+			font-size: 48rpx;
+			padding: 0 $paddingJg;
+			padding-top: 60rpx;
+		}
+
+		.tip {
+			font-size: 22rpx;
+			color: $font-color-light;
+			margin: 20rpx 0;
+			padding: 0 $paddingJg;
+		}
+
+		.shopContent {
+			color: $font-color-white;
+			background-color: $base-color;
+			border-radius: 20rpx;
+			height: 160rpx;
+			padding: 20rpx;
+			margin: 0 $paddingJg;
+			margin-bottom: 20rpx;
+
+			.shoplogo {
+				flex-shrink: 0;
+				background-color: $font-color-white;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 20rpx;
+
+				.logo {
+					height: 100%;
+					width: 100%;
+				}
+			}
+
+			.shopDetail {
+				padding-left: 30rpx;
+				flex-grow: 1;
+
+				.shopName {
+					margin-bottom: 25rpx;
+					font-size: 36rpx;
+				}
+
+				.shopDetailText {
+					font-size: 22rpx;
+				}
+			}
+		}
+
+		.cartList {
+			flex-wrap: wrap;
+			margin: 0 $paddingJg;
+			overflow: hidden;
+
+			.itemBox {
+				width: 310rpx;
+				min-height: 460rpx;
+				background-color: $font-color-white;
+				border-radius: 20rpx;
+				box-shadow: 0px 0px 10px 0px rgba(226, 226, 226, 0.35);
+				margin-bottom: 30rpx;
+				overflow: hidden;
+
+				.imgBox {
+					line-height: 0;
+
+					.imageItem {
+						width: 310rpx;
+						height: 310rpx;
+					}
+				}
+
+				.itemDetaile {
+					padding: 10rpx 20rpx;
+
+					.cartName {
+						line-height: 1.5;
+						font-size: 28rpx;
+						color: $font-color-base;
+						font-weight: 400;
+						min-height: 90rpx;
+					}
+
+					.maney {
+						line-height: 1;
+
+						.lign {
+							margin-left: 20rpx;
+							color: $font-color-light;
+
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 334 - 0
pages/index/notice.vue

@@ -0,0 +1,334 @@
+<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)">
+				<text>{{ item.text }}</text>
+				<text class="margin-l-10" v-if="item.count>0">({{item.count}})</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">
+					<!-- 空白页 -->
+					<!-- #ifdef H5 -->
+					<empty src="../../static/error/emptyNotice.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+
+					<!-- #ifndef H5 -->
+					<empty src="../static/error/emptyNotice.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- 订单列表 -->
+					<view class="itemBox" v-for="(item,index) in tabItem.orderList">
+						<view class="time">
+							{{item.add_time}}
+						</view>
+						<view @click="
+						tabItem.state==1
+						?
+						navTo('/pages/index/noticeDetail?id='+item.id+'&type=1',item)
+						:
+						navTo('/pages/index/noticeDetail?id='+item.id+'&type=2',item)
+						" class="itemDetail" :class="{wargin:tabItem.state==2,base:tabItem.state==1}">
+							<view class="typeName" :class="{gray:item.is_read==1}">
+								{{item.title}}
+							</view>
+							<view class="detail" :class="{gray:item.is_read==1}">
+								{{item.synopsis}}
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		articleList,
+		notify,
+		notify_read
+	} from '@/api/index.js';
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 1,
+						text: '通知',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						count: 0, //总消息条数
+					},
+					{
+						state: 2,
+						text: '警报',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						count: 0, //总消息条数
+					}
+				]
+			};
+		},
+
+		onLoad(options) {
+			this.initNum();
+			this.loadData();
+		},
+		methods: {
+			// 初始化查询数量
+			initNum() {
+				notify().then((e) => {
+					this.navList[1].count = e.data.not_read_count;
+				})
+			},
+			navTo(url, item) {
+				let data = {
+					url: url,
+				}
+
+				// 判断是否为报警信息
+				if (item.type==2) {
+					// 判断是否已读
+					notify_read({
+						id: item.id
+					})
+					data.success = function(res) {
+						// 通过eventChannel向被打开页面传送数据
+						res.eventChannel.emit('addPushData', item)
+					}
+				}
+				 if (item.is_read != 1) {
+				 	this.navList[item.type-1].count--
+				 }
+				 console.log(this.navList[item.type-1]);
+				// 设置为已读
+				item.is_read = 1
+				uni.navigateTo(data)
+			},
+			// 转换金额为数字
+			moneyNum(value) {
+				return +value;
+			},
+			// 确认收货
+			//获取订单列表
+			loadData(source) {
+				const that = this;
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				console.log(navItem, '数据');
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				// 判断是否为消息通知
+				if (state == 1) {
+					articleList({
+							page: navItem.page,
+							limit: navItem.limit
+						}, 1)
+						.then(({
+							data
+						}) => {
+							data.data = data.data.map((e) => {
+								e.is_read = +e.is_read;
+								e.type=1
+								return e
+							})
+							that.callback(data, navItem)
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				}
+				// 判断是否为警报
+				if (state == 2) {
+					notify({
+							page: navItem.page,
+							limit: navItem.limit
+						})
+						.then(({
+							data
+						}) => {
+
+							data.data = data.data.map((e) => {
+								const detail = {
+									title: e.content,
+									synopsis: e.address,
+									longitude: e.longitude,
+									latitude: e.latitude,
+									address: e.address,
+									is_read: +e.is_read,
+									id: e.id,
+									add_time: e.add_time,
+									type:2
+								}
+								return detail
+							})
+
+
+
+							that.callback(data, navItem)
+						})
+						.catch(e => {
+							console.log(e);
+						});
+				}
+
+			},
+			// 回调数据处理
+			callback(data, navItem) {
+				navItem.count = data.not_read_count;
+				let arr = data.data
+				navItem.orderList = navItem.orderList.concat(arr);
+				// console.log(navItem.orderList);
+				navItem.page++;
+				if (navItem.limit == arr.length) {
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					navItem.loadingType = 'more';
+					return;
+				} else {
+					//判断是否还有数据, 有改为 more, 没有改为noMore
+					navItem.loadingType = 'noMore';
+				}
+				uni.hideLoading();
+				this.$set(navItem, 'loaded', true);
+			},
+			//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);
+	}
+
+	.tab-content {
+		height: 100%;
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.itemBox {
+		padding: 50rpx 30rpx 0;
+
+		.time {
+			margin: 0 auto;
+			width: 360rpx;
+			background-color: $font-color-disabled;
+			height: 48rpx;
+			color: #FFFFFF;
+			text-align: center;
+			line-height: 48rpx;
+			margin-bottom: 30rpx;
+			border-radius: 10rpx;
+			font-size: 24rpx;
+		}
+
+		.itemDetail {
+			padding: 50rpx;
+			background-color: #FFFFFF;
+			border-radius: 20rpx;
+
+			&.base {
+				color: $font-color-base;
+			}
+
+			&.wargin {
+				color: $color-red;
+			}
+
+
+			.typeName {
+				font-size: 28rpx;
+
+				&.gray {
+					color: $color-gray !important;
+				}
+			}
+
+			.detail {
+				font-size: 24rpx;
+
+				&.gray {
+					color: $color-gray !important;
+				}
+			}
+		}
+	}
+
+	.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;
+				}
+			}
+		}
+	}
+</style>

+ 310 - 0
pages/index/noticeDetail.vue

@@ -0,0 +1,310 @@
+<template>
+	<view class="content">
+		<view class="itemDetail">
+			<view class="typeName clamp2" :class="{wargin:type==2,base:type==1}">
+				{{actionCart.title}}
+			</view>
+			<view class="detail">
+				{{actionCart.add_time}}
+			</view>
+			<view class="contentDetail detail-desc">
+				<rich-text class="detail-centent" :nodes="actionCart.content"></rich-text>
+			</view>
+		</view>
+		<view class="mapBox" v-if="type==2">
+			<map :enable-zoom='false' :enable-scroll='false' @click="openMap(actionCart.latitude,actionCart.longitude)"
+				class="map" :latitude="actionCart.latitude" :longitude="actionCart.longitude" :markers="[{
+				latitude:actionCart.latitude,
+				longitude:actionCart.longitude,
+				iconPath: '../../static/image/location.png',
+				heighe:35,
+				width:35
+			}]"></map>
+			<view class="mapBottom flex">
+				<view>
+					<image src="../../static/icon/gpsW.png" mode="widthFix"></image>
+				</view>
+				<view class="clamp">
+					{{actionCart.title}}
+				</view>
+			</view>
+			<!-- <view class="mapTip flex">
+				<view class="leftMapTip flex" :class="{success:actionCart.xh,error:!actionCart.xh}">
+					<image class="topTip" src="../../static/icon/mpXh.png" mode="widthFix"></image>
+				</view>
+				<view class="leftMapTip flex" :class="{success:actionCart.gps,error:!actionCart.gps}">
+					<image class="topTip" src="../../static/icon/mpGps.png" mode="widthFix"></image>
+				</view>
+			</view> -->
+		</view>
+
+		<!-- <view class="base-buttom" v-if="type==1">
+
+		</view> -->
+	</view>
+</template>
+
+<script>
+	import {
+		share
+	} from '@/api/wx';
+	import {
+		mapState,
+	} from 'vuex';
+	import {
+		details,
+	} from '@/api/index.js';
+	export default {
+		data() {
+			return {
+				id: '', //保存信息id
+				type: 0, //2为警报1为非警报
+				actionCart: {},
+
+			};
+		},
+
+		onLoad(options) {
+			const that = this;
+			that.id = options.id;
+			that.type = options.type;
+			if(+options.type==2){
+				// #ifdef APP-NVUE
+				const eventChannel = that.$scope.eventChannel; // 兼容APP-NVUE
+				// #endif
+				// #ifndef APP-NVUE
+				const eventChannel = that.getOpenerEventChannel();
+				// #endif
+				// 监听acceptDataFromOpenerPage事件,获取上一页面通过eventChannel传送到当前页面的数据
+				eventChannel.on('addPushData', function(data) {
+					that.actionCart = data;
+					that.actionCart.content = that.actionCart.content.replace(/\<img/gi, '<img class="rich-img"');
+				})
+			}
+			if(+options.type==1){
+				that.loadData();
+			}
+			if(+options.type==3){
+				that.loadData();
+			}
+			that.share()
+		},
+		// #ifdef MP
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let shareObj = {
+				title: this.shareData.title, // 默认是小程序的名称(可以写slogan等)
+				path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.shareData.img,
+				desc:this.shareData.synopsis,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+			// 判断是否可以邀请
+			if (this.userInfo) {
+				shareObj.path += '&spread=' + this.userInfo.uid;
+			}
+			return shareObj;
+		},
+		// #endif
+		methods: {
+			share() {
+				console.log('加载分享');
+				const that = this;
+				// 请求获取默认数据
+				share({}).then(({
+					data
+				}) => {
+					console.log('分享回调', data);
+					that.shareData = data.data
+				});
+			},
+			// 打开地图导航
+			openMap(lat, long) {
+				uni.openLocation({
+					latitude: lat,
+					longitude: long,
+				})
+			},
+			navTo(url) {
+
+				uni.navigateTo({
+					url: url
+				})
+
+			},
+			// 转换金额为数字
+			moneyNum(value) {
+				return +value;
+			},
+			// 确认收货
+			//获取订单列表
+			loadData() {
+				const that = this;
+				details({},this.id)
+					.then(({
+						data
+					}) => {
+						this.actionCart = data;
+						that.actionCart.content = that.actionCart.content.replace(/\<img/gi, '<img class="rich-img"');
+						uni.setNavigationBarTitle({
+							title:data.title
+						})
+					})
+					.catch(e => {
+						
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	/deep/ .iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
+	}
+	
+	/deep/ .con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+	
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+	.detail-desc {
+		background: #fff;
+		/deep/ img {
+			max-width: 100% !important;
+			display: inline !important;
+		}
+		/deep/ div {
+			max-width: 100% !important;
+		}
+	}
+	page,
+	.content {
+		background: $page-color-base;
+		height: 100%;
+	}
+
+	// .content {
+	// 	padding-top: 30rpx;
+	// }
+
+	.base-buttom {
+		position: relative;
+		bottom: auto;
+		right: auto;
+		left: auto;
+	}
+
+	.itemDetail {
+		margin-bottom: 30rpx;
+		padding: 50rpx;
+		padding-top: 44px;
+		background-color: #FFFFFF;
+		.base {
+			color: $font-color-base;
+		}
+
+		.wargin {
+			color: $color-red;
+		}
+
+		.typeName {
+			font-size: 36rpx;
+		}
+
+		.detail {
+			margin-top: 10rpx;
+			font-size: 24rpx;
+			color: $font-color-light;
+		}
+
+		.contentDetail {
+			margin-top: 40rpx;
+			font-size: 28rpx;
+			color: $font-color-light;
+		}
+	}
+
+	.mapBox {
+		position: relative;
+
+		.mapBottom {
+			position: absolute;
+			bottom: 0;
+			left: 0;
+			right: 0;
+			padding: 15rpx;
+			font-size: 24rpx;
+			;
+			color: #ffffff;
+			justify-content: flex-start;
+			background-color: rgba($color: #000000, $alpha: 0.75);
+
+			image {
+				width: 30rpx;
+				margin-right: 10rpx;
+			}
+		}
+
+		.map {
+			width: 750rpx;
+			height: 300rpx;
+			font-size: 35rpx;
+		}
+
+		.mapTip {
+			position: absolute;
+			top: 0;
+			left: 0;
+			padding: 20rpx;
+
+			.leftMapTip {
+				margin-right: 20rpx;
+				width: 44rpx;
+				height: 44rpx;
+				border-radius: 10rpx;
+				justify-content: center;
+
+				.topTip {
+					width: 24rpx;
+				}
+
+				&.success {
+					background-color: $color-green;
+				}
+
+				&.error {
+					background-color: $color-red;
+				}
+			}
+		}
+	}
+</style>

+ 535 - 0
pages/index/share.vue

@@ -0,0 +1,535 @@
+<template>
+	<view class="content position-relative flex-line">
+		<image class="share" src="../../static/image/shareBg.jpg" mode="widthFix"></image>
+		<view class="title">
+			<text>
+				邀好友赚佣金
+			</text>
+			<text class="bg">
+				邀好友赚佣金
+			</text>
+		</view>
+		<view class="money position-relative">
+			<view class="showText position-relative">
+				<view class="border">
+					<view class="text">
+						邀请的好友每下一单
+					</view>
+					<view class="text">
+						都可分得下单一定佣金
+					</view>
+					<view class="moneybox">
+						<text class="moneytext">
+							50-100
+						</text>
+						<text class="tip">
+							元
+						</text>
+					</view>
+				</view>
+			</view>
+			<view class="borderBox">
+				<view class="borderBox1">
+					<view class="borderBox2">
+						<view class="bottomBox ">
+							<!-- #ifdef MP -->
+							
+							<button open-type="share" class="bottom flex-center">
+								<image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
+								</image>
+								<text>
+									立即分享
+								</text>
+							</button>
+							<!-- #endif -->
+							
+							<!-- #ifdef APP -->
+							<view class="bottom flex-center" @click="shareDomApp">
+								<image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
+								</image>
+								<text>
+									立即分享
+								</text>
+							</view>
+							<!-- #endif -->
+							<!-- #ifdef H5 -->
+							<view class="bottom flex-center" @click="shareDomH5">
+								<image class="img margin-r-20" src="/static/image/shareTip.png" mode="scaleToFill">
+								</image>
+								<text>
+									立即分享
+								</text>
+							</view>
+							<!-- #endif -->
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="moneyBg"></view>
+		</view>
+		<view class="footer position-relative">
+			<view class="bacolor">
+				<view class="flex">
+					<view class="bs">
+
+					</view>
+					<view class="bs">
+						<view class="ll flex">
+							<view class="ls flex-center">
+								<view class="ii">
+								</view>
+								<view class="ii">
+								</view>
+								<view class="ii">
+								</view>
+							</view>
+							<view class="ls">
+								如何赚钱
+							</view>
+							<view class="ls flex-center">
+								<view class="ii">
+								</view>
+								<view class="ii">
+								</view>
+								<view class="ii">
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="bs">
+
+					</view>
+				</view>
+				<view class="bottomColor">
+					<view class="flex">
+						<view class="item">
+							<view class="ls">
+
+							</view>
+						</view>
+						<view class="item">
+							<view class="ls">
+
+							</view>
+						</view>
+					</view>
+					<view class="bottom flex-between-center">
+						<view class="item">
+							<view class="imgBox flex-center">
+								<image class="img" src="/static/image/shareUser.png" mode="widthFix"></image>
+							</view>
+						</view>
+						<view class="next">
+							<image class="tip" src="/static/image/shareNext.png" mode="scaleToFill"></image>
+						</view>
+						<view class="item">
+							<view class="imgBox flex-center">
+								<image class="img" src="/static/image/shareGwc.png" mode="widthFix"></image>
+							</view>
+						</view>
+						<view class="next">
+							<image class="tip" src="/static/image/shareNext.png" mode="scaleToFill"></image>
+						</view>
+						<view class="item">
+							<view class="imgBox flex-center">
+								<image class="img" src="/static/image/sharehyxd.png" mode="widthFix"></image>
+							</view>
+
+						</view>
+					</view>
+					<view class="bottom flex-between-center" style="align-items: flex-start;">
+						<view class="item">
+							邀请好友
+						</view>
+						<view class="next"></view>
+						<view class="item">
+							好友下单
+						</view>
+						<view class="next"></view>
+						<view class="item">
+							<view>
+								获得佣金
+							</view>
+							<view>
+								50-100元
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo']),
+			...mapState(['baseURL', 'urlFile']),
+		},
+		// #ifdef MP
+		onShareAppMessage: function(res) {
+			console.log('点击分享');
+			let path = '/pages/index/index?' + 'spread=' + this.userInfo.uid;
+			let data = {
+				path: path,
+				title: this.userInfo.nickname + '邀请您进入绿津',
+			};
+			return data;
+		},
+		// #endif
+		onLoad(options) {
+
+		},
+		methods: {
+			//#ifdef APP
+			shareDomApp() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title:  this.userInfo.nickname + '邀请您进入绿津',
+					summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
+					imageUrl:  '/pages/index/index?spread=' + this.userInfo.uid,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+			//#ifdef H5
+			shareDomH5() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title:  this.userInfo.nickname + '邀请您进入绿津',
+					summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
+					imageUrl:  '/pages/index/index?spread=' + this.userInfo.uid,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 0;
+		min-height: 100%;
+	}
+
+	.content {
+		min-height: 100%;
+		background-color: #d90f3e;
+
+		.share {
+			width: 750rpx;
+			position: absolute;
+			top: 0;
+			left: 0;
+		}
+	}
+
+	.title {
+		line-height: 1;
+		padding-bottom: 5vh;
+		font-weight: bold;
+		color: #FFFFFF;
+		font-size: 90rpx;
+		text-align: center;
+		text-shadow: -4rpx 4rpx #D15B40;
+		position: relative;
+		z-index: 1;
+
+		.bg {
+			position: absolute;
+			top: 8rpx;
+			left: -8rpx;
+			width: 100%;
+			color: #934E3D;
+			z-index: -1;
+		}
+	}
+
+	.money {
+		z-index: 1;
+		width: 580rpx;
+		margin: 0 auto;
+
+		.borderBox {
+			position: relative;
+			height: 300rpx;
+			width: 100%;
+			overflow: hidden;
+			border-bottom-right-radius: 20rpx;
+			border-bottom-left-radius: 20rpx;
+			box-shadow: 0 6rpx #B70000;
+			margin-top: -200rpx;
+			z-index: 2;
+
+			.borderBox1 {
+				width: 2000rpx;
+				margin-left: -710rpx;
+				height: 2000rpx;
+				margin-top: -1625rpx;
+				border: 300rpx solid #FB1727;
+				border-radius: 2000rpx;
+			}
+
+			.borderBox2 {
+				width: 100%;
+				height: 100%;
+				border-radius: 2000rpx;
+				border: 5px solid #ffc98d;
+				box-shadow: 0px 30px 60px #FAB07E;
+
+				.bottomBox {
+					font-size: 48rpx;
+					font-weight: bold;
+					position: absolute;
+					bottom: 60rpx;
+					left: 0;
+					width: 100%;
+					line-height: 1;
+					.bottom {
+						width: 460rpx;
+						height: 106rpx;
+						border-radius: 99rpx;
+						margin: 0 auto;
+						box-shadow: 0px 0px 20rpx 0px rgba(131, 45, 52, 0.75);
+						background-image: linear-gradient(0deg, #EEA768 25%, #FCDAB9 63%, #FFC490 100%);
+					color: #95653A !important;
+						.img {
+							width: 50rpx;
+							height: 50rpx;
+						}
+					}
+				}
+			}
+		}
+
+		.showText {
+			background-color: #FFF1E1;
+			border-radius: 20rpx;
+			height: 480rpx;
+			width: 520rpx;
+			margin: 0 auto;
+			padding: 10rpx;
+			z-index: 1;
+			line-height: 1.5;
+
+			.moneybox {
+				margin-top: 30rpx;
+				background-image: linear-gradient(to bottom, #FAB07E 0%, #FB1727 100%);
+				background-clip: text;
+				color: rgba(0, 0, 0, 0);
+
+				.moneytext {
+					font-size: 95rpx;
+				}
+
+				.tip {
+					font-size: 50rpx;
+				}
+			}
+
+			.border {
+				width: 100%;
+				height: 100%;
+				border: 2px solid rgba(148, 131, 134, 0.3);
+				border-radius: 20rpx;
+				color: #B67363;
+				font-size: $font-sm;
+				text-align: center;
+				font-weight: bold;
+				padding: 20rpx;
+			}
+		}
+
+		.moneyBg {
+			background: linear-gradient(to right, #FAB18A 0%, #ff793f 35rpx, #ff793f 551rpx, #FAB18A 100%);
+			height: 340rpx;
+			width: 100%;
+			border-radius: 20rpx;
+			margin-top: -440rpx;
+		}
+
+
+	}
+
+	.footer {
+		padding-top: 10vh;
+
+		.bacolor {
+			width: 710rpx;
+			height: 320rpx;
+			background: linear-gradient(0deg, #FE4352 56%, #FD784B 100%);
+			border-radius: 20rpx;
+			overflow: hidden;
+
+			.flex {
+				.bs {
+					width: 150rpx;
+					height: 70rpx;
+				}
+
+				.bs:nth-child(1) {
+					background-color: #d90f3e;
+					border-bottom-right-radius: 50rpx;
+				}
+
+				.bs:nth-child(2) {
+					flex-shrink: 0;
+					width: 420rpx;
+					overflow: hidden;
+
+					.ll {
+						padding: 0 20rpx;
+						width: 436rpx;
+						height: 100%;
+						margin-left: -8rpx;
+						border-top-left-radius: 60rpx;
+						border-top-right-radius: 60rpx;
+						background-color: rgba(0, 0, 0, 0);
+						box-shadow: 0 -36rpx 0 #d90f3e;
+
+						.ls {
+							.ii {
+								margin: 0 5rpx;
+							}
+						}
+
+						.ls:nth-child(1) {
+							.ii {
+								transform: rotate(45deg);
+								height: 16rpx;
+								width: 16rpx;
+							}
+
+							.ii:nth-child(1) {
+								background-color: rgba(253, 217, 182, 1);
+							}
+
+							.ii:nth-child(2) {
+								background-color: rgba(253, 217, 182, 0.8);
+							}
+
+							.ii:nth-child(3) {
+								background-color: rgba(253, 217, 182, 0.5);
+							}
+						}
+
+						.ls:nth-child(3) {
+							.ii {
+								transform: rotate(45deg);
+								height: 16rpx;
+								width: 16rpx;
+							}
+
+							.ii:nth-child(3) {
+								background-color: rgba(253, 217, 182, 1);
+							}
+
+							.ii:nth-child(2) {
+								background-color: rgba(253, 217, 182, 0.8);
+							}
+
+							.ii:nth-child(1) {
+								background-color: rgba(253, 217, 182, 0.5);
+							}
+						}
+
+						.ls {
+							text-align: center;
+							flex-grow: 1;
+							color: #FFD6CB;
+							font-size: 36rpx;
+							font-weight: bold;
+						}
+					}
+				}
+
+				.bs:nth-child(3) {
+					background-color: #d90f3e;
+					border-bottom-left-radius: 50rpx;
+				}
+			}
+		}
+
+		.bottomColor {
+			height: 270rpx;
+			width: 100%;
+
+			&>.flex {
+				.item {
+					height: 40rpx;
+					width: 40rpx;
+					overflow: hidden;
+
+					&>.ls {
+						height: 40rpx;
+						width: 40rpx;
+						box-shadow: 0 -20rpx 0 #d90f3e;
+					}
+
+					&:nth-child(1) {
+						.ls {
+							border-top-left-radius: 20rpx;
+						}
+					}
+
+					&:nth-child(2) {
+						.ls {
+							border-top-right-radius: 20rpx;
+						}
+					}
+				}
+			}
+		}
+
+		.bottom {
+			justify-content: space-around;
+
+			.next {
+				width: 34rpx;
+
+				.tip {
+					width: 34rpx;
+					height: 38rpx;
+				}
+			}
+
+			.item {
+				width: 150rpx;
+
+				.imgBox {
+					width: 80rpx;
+					height: 80rpx;
+					background-color: #FFC98D;
+					border-radius: 99rpx;
+					margin: 0 auto;
+					margin-bottom: 20rpx;
+
+					.img {
+						width: 50rpx;
+					}
+				}
+			}
+		}
+
+		.flex-between-center {
+			text-align: center;
+			justify-content: space-around;
+			color: #FFC98D;
+			font-size: 22rpx;
+			padding: 0 30rpx;
+		}
+	}
+</style>

+ 324 - 0
pages/index/shopTab.vue

@@ -0,0 +1,324 @@
+<template>
+	<view class="container">
+		<view class="topNav flex">
+			<image @click="backIndex" class="back" src="../../static/icon/back.png" mode="widthFix"></image>
+			<view class="inputbox flex">
+				<image class="search" src="../../static/icon/search.png" mode="widthFix"></image>
+				<input class="input" confirm-type='搜索' @confirm='searchData' placeholder="请输入城市或者门店" type="text"
+					v-model="search" />
+			</view>
+		</view>
+		<!-- <pickerAddress class="" @change="onCityClick">
+			<view class="address flex">
+				<view class="flex">
+					<text class="text">{{province}}</text>
+					<image class="tipButtom" src="../../static/icon/dom.png" mode="widthFix"></image>
+				</view>
+				<view class="flex">
+					<text class="text">{{city}}</text>
+					<image class="tipButtom" src="../../static/icon/dom.png" mode="widthFix"></image>
+				</view>
+				<view class="flex">
+					<text class="text">{{district}}</text>
+					<image class="tipButtom" src="../../static/icon/dom.png" mode="widthFix"></image>
+				</view>
+			</view>
+		</pickerAddress> -->
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="storeList">
+			<!-- 空白页 -->
+			<!-- <empty v-if="loaded === true && orderList.length === 0"></empty> -->
+			<!-- 订单列表 -->
+			<view class="itemList">
+				<view class="item flex" v-for="(item,index) in orderList" :key='index' @click="onChecked(item)">
+					<view class="imgBox">
+						<image class="logo" :src="item.image" mode="aspectFit"></image>
+					</view>
+					<view class="padding-l-20 flex-grow-true">
+						<view class="title clamp flex">
+							<view class="name">
+								{{item.name}}
+							</view>
+							<view class="km">
+								{{item.range<1?item.distance+'m':item.range+'km'}}
+							</view>
+						</view>
+						<view class="list margin-t-20">
+							营业时间:{{item.day_time}}
+						</view>
+						<view class="list">
+							联系电话:{{item.phone}}
+						</view>
+						<view class="flex addressBox ">
+							<image class="iconA margin-r-10" src="../../static/icon/shopAddress.png" mode="heightFix">
+							</image>
+							<text class="clamp">
+								{{item.address}}
+							</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		storeList,
+	} from '@/api/shop.js';
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	export default {
+		computed: {
+			...mapState('user', ['address'])
+		},
+		data() {
+			return {
+				search: '', //查询内容
+				loadingType: 'more',
+				orderList: [],
+				page: 1, //当前页数
+				limit: 10, //每次信息条数
+				province: '请选择', //省
+				city: '请选择', //市
+				district: '请选择', //区
+				loaded: false,
+				type: 0 //默认为切换商店,1为不切换
+
+			};
+		},
+		onLoad: function(option) {
+			console.log(option.type);
+			if (option.type) {
+				this.type = option.type;
+			}
+			this.storeList();
+		},
+		methods: {
+			...mapMutations('shop', ['setShopInfo']),
+			toJSON() {
+				return this;
+			},
+			backIndex() {
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			// 查询方法
+			searchData() {
+				// 初始化数据重新搜索
+				this.loaded = false;
+				this.page = 1;
+				this.orderList = [];
+				this.loadingType = 'more';
+				this.storeList()
+			},
+			// 存储当前的门店
+			onChecked(item) {
+				if (this.type == 0) {
+					this.setShopInfo(item);
+					uni.showToast({
+						title: '切换成功',
+						mask: true,
+						duration: 1500
+					});
+					setTimeout((e) => {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					}, 1500)
+				}
+				console.log();
+				if (+this.type == 1) {
+					this.setShopInfo(item);
+					uni.navigateTo({
+						url: '/pages/shop/shopIndex?id=' + item.id
+					})
+				}
+			},
+			storeList(source) {
+				//这里是将订单挂载到tab列表下
+				let navItem = this;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				let city = `${this.province},${this.city},${this.district}`;
+				if (this.province == '请选择') {
+					city = '';
+				}
+				storeList({
+						city,
+						page: navItem.page,
+						limit: navItem.limit,
+						key: this.search,
+						latitude: this.address.latitude,
+						longitude: this.address.longitude,
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.list.map(e => {
+							return e;
+						});
+						navItem.orderList = navItem.orderList.concat(arr);
+						// console.log(navItem.orderList);
+						navItem.page++;
+						if (navItem.limit == arr.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+						console.log(this, '结果');
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 内容改变事件
+			onCityClick(item) {
+				const arr = item.data;
+				this.province = arr[0];
+				this.city = arr[1];
+				this.district = arr[2];
+				// 开始查询
+				console.log(this.province, this.city, this.district);
+				console.log(arr);
+				this.searchData()
+			}
+		},
+
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.container {
+		height: 100%;
+	}
+	/* #ifdef APP */
+	.container {
+		padding-top: var(--status-bar-height);
+	}
+	/* #endif */
+
+	.list-scroll-content {
+		height: calc(100% - 44px);
+		position: relative;
+		overflow: hidden;
+		z-index: 100;
+	}
+
+	.itemList {
+		padding: 30rpx $page-row-spacing;
+
+		.item {
+			background-color: #FFFFFF;
+			margin-bottom: 30rpx;
+			padding: 30rpx;
+			border-radius: 20rpx;
+			.list,.km{
+				color: $font-color-light;
+				font-size: $font-sm;
+			}
+			.logo {
+				height: 200rpx;
+				width: 200rpx;
+				border-radius: 20rpx;
+			}
+
+			.title {
+				font-size: 36rpx;
+				color: $font-color-dark;
+			}
+
+			.iconR {
+				height: 24rpx;
+			}
+
+			.iconA {
+				width: 24rpx;
+				height: 24rpx;
+			}
+
+			.addressBox {
+				font-size: 24rpx;
+				color: $font-color-light;
+				justify-content: flex-start;
+			}
+		}
+	}
+
+	.address {
+		background-color: #FFFFFF;
+		justify-content: space-around;
+		height: 40px;
+
+		.text {
+			font-size: 22rpx;
+			color: $font-color-dark;
+			margin-right: 5px;
+		}
+
+		.tipButtom {
+			width: 11px;
+		}
+	}
+
+	.topNav {
+		height: 44px;
+		background-color: #FFFFFF;
+		padding: 0 15px;
+		/* #ifdef MP */
+		height:calc(44px +  var(--status-bar-height)) ;
+		padding-top: calc(var(--status-bar-height) - 15px);
+		/* #endif */
+		.back {
+			width: 13px;
+		}
+
+		.inputbox {
+			background-color: $page-color-base;
+			height: 15px;
+			flex-grow: 1;
+			margin-left: 15px;
+			border-radius: 50px;
+			height: 30px;
+			padding-left: 20px;
+			/* #ifdef MP */
+			margin-right: 200rpx;
+			/* #endif */
+			font-size: $font-base;
+
+			.search {
+				width: 18px;
+			}
+
+			.input {
+				height: 100%;
+				width: 100%;
+				text-align: left;
+				padding-left: 10px;
+
+			}
+		}
+	}
+</style>

+ 769 - 0
pages/order/createOrder.vue

@@ -0,0 +1,769 @@
+<template>
+	<view class="padding-t-30">
+		<!-- 地址 -->
+		<navigator url="/pages/set/address?source=1" class="address-section">
+			<view class="order-content" v-if="addressData.real_name">
+				<view class="cen">
+					<view class="top">
+						<text class="name">{{ addressData.real_name }}</text>
+						<text class="mobile">{{ addressData.phone }}</text>
+					</view>
+					<text
+						class="address flex">{{ addressData.province + addressData.city + addressData.district }}{{ addressData.detail }}</text>
+				</view>
+				<text class="iconfont iconenter"></text>
+			</view>
+			<view class="order-content" v-if="!addressData.real_name">
+				<view class="addAddress">
+					<text class="iconfont iconaddition"></text>
+					<text>添加收货地址</text>
+				</view>
+			</view>
+		</navigator>
+		<view class="goodsList">
+
+			<view class="goods-section" v-for="(ls, ind) in shopList" :key="ind">
+				<!-- 商品列表 -->
+				<view class="g-item">
+					<image :src="ls.productInfo.image"></image>
+					<view class="right">
+						<text class="title clamp">{{ ls.productInfo.store_name }}</text>
+						<text class="spec">{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.suk : '默认' }}</text>
+						<view class="price-box">
+							<text
+								class="price">¥{{ ls.productInfo.attrInfo ? ls.productInfo.attrInfo.price : ls.productInfo.price }}</text>
+							<text class="number">{{ 'x ' + ls.cart_num + (ls.productInfo.unit_name || '') }}</text>
+							<!-- <view class="number">
+							<uni-number-box class="step" :value="lss.number" :index="indx" @eventChange="numberChange"></uni-number-box>
+						</view> -->
+						</view>
+						<view class="serverSet" v-if="ls.day>0">
+							(<text>服务费:{{ls.day_deducted}}</text>
+							<text class="margin-l-10">服务天数:{{ls.day}}天</text>)
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 金额明细 -->
+		<view class="yt-list">
+			<view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">运费</text>
+				<text class="cell-tip disabled">{{ Postage }}</text>
+			</view>
+			<view class="yt-list-cell b-b">
+				<text class="cell-tit clamp">备注</text>
+				<input class="desc" type="text" v-model="desc" placeholder="请填写备注信息" placeholder-class="placeholder" />
+			</view>
+		</view>
+
+
+		<view class="yt-list">
+			<view class="yt-list-cell b-b" v-if="fx" @click="payType='weixin'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/orderWx.png" mode="widthFix"></image>
+					<text class="margin-l-10">微信支付</text>
+				</view>
+				<image class="checked" v-if="payType=='weixin'" src="../../static/icon/addressIconXz.png"
+					mode="widthFix"></image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="yt-list-cell b-b" @click="payType='ali'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/orderAli.png" mode="widthFix"></image>
+					<text class="margin-l-10">支付宝</text>
+				</view>
+				<image class="checked" v-if="payType=='ali'" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #endif -->
+			<view class="yt-list-cell b-b" @click="payType='yue'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/ye.png" mode="widthFix"></image>
+					<text class="margin-l-10">余额({{now_money}})</text>
+				</view>
+				<image class="checked" v-if="payType=='yue'" src="../../static/icon/addressIconXz.png" mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+		</view>
+
+
+		<!-- 底部 -->
+		<view class="footer">
+			<view class="price-content">
+				<text>实付款</text>
+				<text class="price-tip">¥</text>
+				<text class="price">{{ payPrice }}</text>
+			</view>
+			<text class="submit" :class="{submitNo:payLoding}" @click="payLoding?'':submit()">提交订单</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		confirm,
+		computedOrderkey,
+		createOrderkey,
+		orderPay
+	} from '@/api/order.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				payType: 'ali',
+				desc: '', //备注
+				// 收货地址
+				addressData: {},
+				// 商品列表
+				shopList: [],
+				// 购物车id
+				cartId: '',
+				//购物金额详情
+				moneyAll: {
+					storeFreePostage: 0, //邮费优惠
+					storePostage: 0, //邮费
+					totalPrice: 0, //总支付金额
+					vipPrice: 0 //vip优惠价
+				},
+				payPrice: 0, //总支付金额
+				orderKey: '', //订单id
+				payLoding: false, //判断是否支付中
+				orderId: '', //订单id
+				now_money: 0, //余额
+				onShopId: -1, //默认-1为不存在商家id
+			};
+		},
+		onLoad(option) {
+			// 保存当前商品在购物车中的id
+			this.cartId = option.id;
+			// 判断是否要读取商家id
+			if (option.shopId) {
+				this.onShopId = option.shopId;
+			}
+			this.loadData();
+			this.userinfo();
+		},
+		computed: {
+			Postage() {
+				let money = +this.moneyAll.storePostage;
+				if (money == 0) {
+					return '免运费';
+				} else {
+					return '¥' + money;
+				}
+			},
+			payAllMoney() {
+				return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
+			},
+			...mapState('shop', ['shopDetail']),
+			...mapState(['fx'])
+		},
+		methods: {
+			// 加载用户基础信息
+			userinfo() {
+				getUserInfo({}).then(({
+					data
+				}) => {
+					this.now_money = data.now_money;
+				});
+			},
+			// 计算支付金额
+			payMoneyNub() {
+				computedOrderkey({
+						orderkey: this.orderKey,
+						useIntegral: 0, //是否积分抵扣
+						addressId: this.addressData.id //地址编号
+					})
+					.then(({
+						data
+					}) => {
+						this.integralShow = true;
+						// 获取支付金额
+						this.payPrice = +data.result.pay_price;
+						this.integralMoney = data.result.deduction_price;
+					})
+					.catch(e => {
+						console.log(e);
+						this.integralShow = false;
+					});
+			},
+			// 加载基础数据
+			loadData() {
+				let obj = this;
+				confirm({
+					cartId: obj.cartId + ''
+				}).then(({
+					data
+				}) => {
+					obj.addressData = data.addressInfo || {};
+					obj.shopList = data.cartInfo; //商品列表
+					obj.moneyAll = data.priceGroup; //金额数据
+					obj.orderKey = data.orderKey; //订单key
+					// 计算金额
+					this.payMoneyNub();
+				});
+			},
+			// 提交订单
+			submit() {
+				let obj = this;
+				if (!this.addressData.real_name) {
+					uni.showToast({
+						title: '请选择收货地址',
+						icon:'none'
+					});
+					return false;
+				}
+				// 判断是否余额不足
+				if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+					});
+					return;
+				}
+
+				uni.showLoading({
+					title: '支付中',
+					mask: true
+				})
+				// 支付中
+				obj.payLoding = true;
+				// 判断是否为未支付订单中跳转进入
+				obj.firstCreateOrder();
+			},
+			// 订单金额支付
+			orderMoneyPay() {
+				let obj = this;
+				orderPay({
+						uni: obj.orderId,
+						// #ifdef H5
+						from: 'weixin', //来源
+						// #endif
+						// #ifdef MP-WEIXIN
+						from: 'routine', //来源
+						// #endif
+						// #ifdef APP-PLUS
+						from: 'app', //来源
+						// #endif
+						paytype: obj.payType //支付类型  weixin-微信 yue-余额
+					})
+					.then(e => {
+						// 判断是否微信小程序支付
+						if (obj.payType == 'weixin') {
+							// #ifdef H5 || MP
+							let da = e.data.result.jsConfig;
+							let data = {
+								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'
+									});
+								}
+							};
+							// #endif
+							// #ifdef H5
+							data.timestamp = da.timestamp;
+							weixinObj.chooseWXPay(data);
+							// #endif
+							// #ifdef MP-WEIXIN
+							data.timeStamp = da.timestamp;
+							wx.requestPayment(data);
+							// #endif
+							// #ifdef APP
+							console.log( e.data.result.jsConfig,'返回数值');
+							uni.requestPayment({
+								provider: 'wxpay',
+								orderInfo: e.data.result.jsConfig,
+								success(e) {
+									obj.paySuccessTo();
+								},
+								fail: (e) => {
+									console.log(e,'支付失败');
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							})
+							// #endif
+						}
+						// #ifdef APP
+						if(obj.payType == 'ali'){
+							uni.requestPayment({
+								provider: 'alipay',
+								orderInfo: e.data.result.jsConfig,
+								success(e) {
+									obj.paySuccessTo();
+								},
+								fail: (e) => {
+									console.log(e,'支付失败');
+									uni.navigateTo({
+										url: '/pages/order/order?state=0'
+									});
+								}
+							})
+						}
+						// #endif
+						uni.hideLoading();
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						// 支付完成
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			// 支付成功跳转
+			paySuccessTo() {
+				uni.hideLoading();
+				uni.redirectTo({
+					url: '/pages/user/money/paySuccess?orderid=' + this.orderId,
+				});
+			},
+			// 初次订单创建
+			firstCreateOrder() {
+				let obj = this;
+				// 获取下单页面数据
+				let prepage = obj;
+				let data = {
+					real_name: prepage.addressData.real_name, //联系人名称
+					phone: prepage.addressData.phone, //联系人号码
+					addressId: prepage.addressData.id, //支付地址id
+					useIntegral: 0, //是否积分抵扣1为是0为否
+					payType: obj.payType, //支付类型  weixin-微信 yue-余额
+					mark: prepage.desc, //备注
+					// #ifdef H5
+					from: 'weixin', //来源
+					// #endif
+					// #ifdef MP-WEIXIN
+					from: 'routine', //来源
+					// #endif
+					// #ifdef APP-PLUS
+					from: 'app', //来源
+					// #endif
+					shipping_type: 1, //提货方式 1 快递 2自提
+				};
+				// 判断是否需要读取非默认商家id
+				if (obj.onShopId != -1) {
+					data.store_id = obj.onShopId;
+				} else {
+					data.store_id = obj.shopDetail.id;
+				}
+				// 生成订单
+				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.payType == 'yue') {
+							console.log('余额支付', status == 200 && data.status == 'SUCCESS');
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								uni.showToast({
+									title: msg,
+									icon:'none'
+								});
+							}
+						} else {
+							// 立即支付
+							obj.orderMoneyPay();
+						}
+					})
+					.catch(e => {
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+		padding-bottom: 100rpx;
+	}
+
+	.address-section {
+		border-radius: 20rpx;
+		padding: 30rpx;
+		margin: 0 $page-row-spacing;
+		background: #fff;
+		position: relative;
+
+		.order-content {
+			min-height: 100rpx;
+			display: flex;
+			align-items: center;
+
+			.leftIcon {
+				width: 36rpx;
+				margin: 0 30rpx;
+			}
+
+			.addAddress {
+				text-align: center;
+				width: 100%;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+
+				.iconaddition {
+					font-size: 55rpx;
+					line-height: 1;
+					border-radius: 100rpx;
+					margin-right: 20rpx;
+				}
+			}
+		}
+
+		.iconlocation {
+			flex-shrink: 0;
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 90rpx;
+			color: #888;
+			font-size: 44rpx;
+		}
+
+		.cen {
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			font-size: 28rpx;
+			color: $font-color-dark;
+		}
+
+		.name {
+			font-size: 34rpx;
+			margin-right: 24rpx;
+		}
+
+		.address {
+			margin-top: 16rpx;
+			margin-right: 20rpx;
+			color: $font-color-light;
+		}
+
+		.icon-you {
+			font-size: 32rpx;
+			color: $font-color-light;
+			margin-right: 30rpx;
+		}
+
+		.a-bg {
+			position: absolute;
+			left: 0;
+			bottom: 0;
+			display: block;
+			width: 100%;
+			height: 5rpx;
+		}
+	}
+
+	.goodsList {
+		margin: 0 $page-row-spacing;
+		padding: 30rpx;
+		background: #fff;
+		border-radius: 20rpx;
+		margin-top: 30rpx;
+	}
+
+	.goods-section {
+		.logo {
+			display: block;
+			width: 50rpx;
+			height: 50rpx;
+			border-radius: 100px;
+		}
+
+		.name {
+			font-size: 30rpx;
+			color: $font-color-base;
+			margin-left: 24rpx;
+		}
+
+		.g-item {
+			display: flex;
+
+			image {
+				flex-shrink: 0;
+				display: block;
+				width: 170rpx;
+				height: 170rpx;
+				border-radius: 4rpx;
+			}
+
+			.right {
+				flex: 1;
+				padding-left: 24rpx;
+				overflow: hidden;
+
+				.serverSet {
+					font-size: 22rpx;
+					color: $font-color-light;
+				}
+			}
+
+			.title {
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.spec {
+				font-size: 26rpx;
+				color: $font-color-light;
+			}
+
+			.price-box {
+				display: flex;
+				align-items: center;
+				font-size: 32rpx;
+				padding-top: 10rpx;
+				color: $font-color-light;
+
+				.price {
+					margin-bottom: 4rpx;
+				}
+
+				.number {
+					font-size: 26rpx;
+					margin-left: 20rpx;
+				}
+			}
+
+			.step-box {
+				position: relative;
+			}
+		}
+	}
+
+	.yt-list {
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		margin-top: 30rpx;
+		border-radius: 20rpx;
+	}
+
+	.yt-list-cell {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10rpx 30rpx 10rpx 40rpx;
+		line-height: 70rpx;
+		position: relative;
+
+		.checked,
+		.noChecked {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.noChecked {
+			border: 1px solid $font-color-light;
+			border-radius: 100rpx;
+		}
+
+		&.cell-hover {
+			background: #fafafa;
+		}
+
+		&.b-b:after {
+			left: 30rpx;
+		}
+
+		.cell-icon {
+			height: 32rpx;
+			width: 32rpx;
+			font-size: 22rpx;
+			color: #fff;
+			text-align: center;
+			line-height: 32rpx;
+			background: #f85e52;
+			border-radius: 4rpx;
+			margin-right: 12rpx;
+
+			&.hb {
+				background: #ffaa0e;
+			}
+
+			&.lpk {
+				background: #3ab54a;
+			}
+		}
+
+		.cell-more {
+			align-self: center;
+			font-size: 24rpx;
+			color: $font-color-light;
+			margin-left: 8rpx;
+			margin-right: -10rpx;
+		}
+
+		.cell-tit {
+			font-size: 26rpx;
+			color: $font-color-light;
+			margin-right: 10rpx;
+
+			.orderIcon {
+				width: 48rpx;
+			}
+		}
+
+		.cell-tip {
+			font-size: 26rpx;
+			color: $font-color-dark;
+
+			&.disabled {
+				color: $font-color-light;
+			}
+
+			&.active {
+				color: $base-color;
+			}
+
+			&.red {
+				color: $base-color;
+			}
+		}
+
+		&.desc-cell {
+			.cell-tit {
+				max-width: 90rpx;
+			}
+		}
+
+		.desc {
+			text-align: right;
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+	}
+
+	/* 支付列表 */
+	.pay-list {
+		padding-left: 40rpx;
+		margin-top: 16rpx;
+		background: #fff;
+
+		.pay-item {
+			display: flex;
+			align-items: center;
+			padding-right: 20rpx;
+			line-height: 1;
+			height: 110rpx;
+			position: relative;
+		}
+
+		.icon-weixinzhifu {
+			width: 80rpx;
+			font-size: 40rpx;
+			color: #6bcc03;
+		}
+
+		.icon-alipay {
+			width: 80rpx;
+			font-size: 40rpx;
+			color: #06b4fd;
+		}
+
+		.icon-xuanzhong2 {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 60rpx;
+			height: 60rpx;
+			font-size: 40rpx;
+			color: $base-color;
+		}
+
+		.tit {
+			font-size: 32rpx;
+			color: $font-color-dark;
+			flex: 1;
+		}
+	}
+
+	.footer {
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		z-index: 995;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		height: 90rpx;
+		justify-content: space-between;
+		font-size: 30rpx;
+		background-color: #fff;
+		z-index: 998;
+		color: $font-color-base;
+		box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
+
+		.price-content {
+			padding-left: 30rpx;
+		}
+
+		.price-tip {
+			color: $font-color-base;
+			margin-left: 8rpx;
+		}
+
+		.price {
+			font-size: 36rpx;
+			color: $font-color-base;
+		}
+
+		.submit {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 280rpx;
+			height: 100%;
+			color: #fff;
+			font-size: 32rpx;
+			background-color: $base-color;
+
+			&.submitNo {
+				background-color: $font-color-disabled;
+			}
+		}
+	}
+</style>

+ 401 - 0
pages/order/evaluate.vue

@@ -0,0 +1,401 @@
+<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><uni-rate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uni-rate></view>
+				</view>
+				<view class="flex_item zhil">
+					<view>服务态度</view>
+					<view><uni-rate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uni-rate></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>
+				</view>
+			</view>
+		</view>
+		<view @click.stop="submit" class="address-box submit-box"><text class="submit-btn">提交评论</text></view>
+	</view>
+</template>
+
+<script>
+import { product, upload, order_comment } from '@/api/order.js';
+export default {
+	data() {
+		return {
+			list: '', //订单详情
+			productInfo: '',
+			text: '', //评论内容
+			placeholder: '商品满足你的期待么?说说你的想法,分享给想买的他们吧~',
+			imgList: [],
+			unique: '', //商品唯一标识码
+			cloudimgList: [],
+			rateValue1: '', //商品质量
+			rateValue2: '', //服务态度
+			imgCount: 6 //最多支持9张上传,可以修改
+		};
+	},
+	onLoad(option) {
+		this.unique = option.unique;
+		this.loadOrder();
+	},
+	onShow() {},
+	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;
+			});
+		},
+		//商品质量评分
+		rateChange1(val) {
+			this.rateValue1 = val.value;
+		},
+		//服务态度评分
+		rateChange2(val) {
+			this.rateValue2 = val.value;
+		},
+		//单张上传图片
+		scImg() {
+			let obj = this;
+			console.log(obj.imgCount, 11);
+			if (obj.imgCount == 0) {
+				uni.showToast({
+					title: '最多添加6张图片',
+					icon: 'none'
+				});
+				return;
+			}
+			upload({
+				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 ')
+				})
+				.catch(e => {});
+		},
+		//提交评论
+		submit(e) {
+			let obj = this;
+			if (obj.imgList.length < 1) {
+				uni.showToast({
+					title: '请添加图片',
+					icon: 'none'
+				});
+				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,
+				
+			})
+				.then(e => {
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				})
+				.catch(e => {
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				});
+		},
+		//点击图片显示大图
+		imgInfo(i) {
+			let tempList = [];
+			console.log(111);
+			this.imgList.forEach(e => {
+				tempList.push(e.url);
+			});
+			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: #ffffff;
+	height: 100%;
+	.content {
+		background: #ffffff;
+		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;
+	.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;
+		}
+	}
+}
+.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);
+	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;
+}
+
+.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%;
+		border-radius: 24rpx;
+	}
+}
+.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>

+ 730 - 0
pages/order/order.vue

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

+ 633 - 0
pages/order/orderAfter.vue

@@ -0,0 +1,633 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- 订单列表 -->
+					<view @click="goToOrderDetail(item)" v-for="(item, index) in tabItem.orderList" :key="index"
+						class="order-item">
+						<view class="i-top b-b">
+							<text class="time">{{ item._add_time }}</text>
+							<text class="state" :style="{ color: item.stateTipColor }">{{ item._status._title }}</text>
+						</view>
+						<scroll-view v-if="item.cartInfo.length > 1" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+							</view>
+						</scroll-view>
+						<view 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 flextop">
+									<text class="title clamp2">{{ goodsItem.productInfo.store_name }}</text>
+									<text class="price">{{ moneyNum(goodsItem.productInfo.price) }}</text>
+								</view>
+								<view class="row flex">
+									<text
+										class="row_title">{{ goodsItem.productInfo.attrInfo ? goodsItem.productInfo.attrInfo.suk : '' }}</text>
+									<text class="attr-box"> x {{ goodsItem.cart_num }}</text>
+								</view>
+								<view class="row flex">
+									<text class="attr-box">( 服务费:{{goodsItem.day_deducted}} 服务天数:{{goodsItem.day}}
+										)</text>
+								</view>
+							</view>
+						</view>
+						<view class="action-box b-t">
+							<button v-if="item._status._title == '已退款'" @click.stop="deleteOrder(item,index)"
+								class="action-btn recom">删除订单</button>
+							<button @click.stop="goToOrderDetail(item)" class="action-btn evaluate">查看详情</button>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		orderList,
+		orderDel
+	} from '@/api/order.js';
+	export default {
+		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) {
+			/**
+			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+			 * 替换onLoad下代码即可
+			 */
+			this.tabCurrentIndex = +options.state;
+			// #ifndef MP
+			this.loadData();
+			// #endif
+			// #ifdef MP
+			if (options.state == 0) {
+				this.loadData();
+			}
+			// #endif
+		},
+		// #ifdef APP-PLUS || H5
+		onBackPress(e) {
+			uni.switchTab({
+				url: '/pages/user/user',
+			});
+			return true;
+		},
+		// #endif
+		methods: {
+			// 转换金额为数字
+			moneyNum(value) {
+				return +value;
+			},
+			// 确认收货
+			//跳转到订单详情
+			goToOrderDetail(e) {
+				uni.navigateTo({
+					url: '/pages/order/orderDetail?id=' + e.order_id
+				});
+			},
+			//获取订单列表
+			loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				orderList({
+						type: state,
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.map(e => {
+							let b = this.orderStateExp(e.status);
+							e.stateTip = b.stateTip;
+							e.stateTipColor = b.stateTipColor;
+							return e;
+						});
+						navItem.orderList = navItem.orderList.concat(arr);
+						// console.log(navItem.orderList);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			//删除订单
+			deleteOrder(item, index) {
+				let that = this;
+				uni.showLoading({
+					title: '请稍后',
+					mask:true
+				});
+				uni.showModal({
+					title: '删除订单',
+					content: '删除订单后不可恢复,是否删除?',
+					success: res => {
+						uni.showLoading({
+							title: '请稍后'
+						});
+						if (res.confirm) {
+							orderDel({
+								uni: item.order_id
+							}).then(() => {
+								that.navList[that.tabCurrentIndex].orderList.splice(index, 1);
+								uni.hideLoading();
+							}).catch((e) => {
+								uni.hideLoading();
+								console.log(e);
+							})
+						}
+					},
+				});
+			},
+			//订单状态文字和颜色
+			orderStateExp(state) {
+				let stateTip = '',
+					stateTipColor = '#fa436a';
+				switch (+state) {
+					case 0:
+						stateTip = '待付款';
+						break;
+					case 1:
+						stateTip = '待发货';
+						break;
+					case 2:
+						stateTip = '待收货';
+						break;
+					case 3:
+						stateTip = '待评价';
+						break;
+					case 4:
+						stateTip = '已完成';
+						stateTipColor = '#5dbc7c';
+						break;
+					case 9:
+						stateTip = '订单已关闭';
+						stateTipColor = '#909399';
+						break;
+
+						//更多自定义
+				}
+				return {
+					stateTip,
+					stateTipColor
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: $page-color-base;
+		height: 100%;
+	}
+
+	.swiper-box {
+		height:100%;
+	}
+
+	.list-scroll-content {
+		height: 100%;
+		padding-top: 30rpx;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+
+	.uni-swiper-item {
+		height: auto;
+	}
+
+	.order-item {
+		display: flex;
+		flex-direction: column;
+		padding-left: 30rpx;
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		border-radius: 20rpx;
+		padding-bottom: 10rpx;
+
+		.i-top {
+			display: flex;
+			align-items: center;
+			height: 80rpx;
+			padding-right: 30rpx;
+			font-size: $font-base;
+			color: $font-color-dark;
+			position: relative;
+
+			.time {
+				flex: 1;
+			}
+
+			.state {
+				color: $base-color;
+			}
+
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				color: $font-color-light;
+				position: relative;
+
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+
+		/* 多条商品 */
+		.goods-box {
+			height: 160rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+
+			.goods-item {
+				width: 120rpx;
+				height: 120rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		/* 单条商品 */
+		.goods-box-single {
+			display: flex;
+			padding: 20rpx 0;
+
+			.goods-img {
+				display: block;
+				width: 170rpx;
+				height: 170rpx;
+				border-radius: 20rpx;
+			}
+
+			.right {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				padding: 0 30rpx 0 24rpx;
+				overflow: hidden;
+
+				.flextop {
+					align-items: flex-start;
+					line-height: 1.3;
+				}
+
+				.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;
+					width: 80%;
+					min-height: 2.5rem;
+				}
+
+				.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-light;
+
+					&:before {
+						content: '¥';
+						font-size: $font-sm;
+
+					}
+				}
+			}
+		}
+
+		.price-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: baseline;
+			padding: 20rpx 30rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-light;
+
+			.num {
+				margin: 0 8rpx;
+				color: $font-color-dark;
+			}
+
+			.price {
+				font-size: $font-lg;
+				color: $font-color-dark;
+
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+
+		.action-box {
+			display: flex;
+			justify-content: flex-end;
+			align-items: center;
+			height: 100rpx;
+			position: relative;
+			padding-right: 30rpx;
+		}
+
+		.action-btn {
+			width: 160rpx;
+			height: 60rpx;
+			margin: 0;
+			margin-left: 24rpx;
+			padding: 0;
+			text-align: center;
+			line-height: 60rpx;
+			font-size: $font-sm + 2rpx;
+			color: $color-red;
+			border-radius: 100px;
+			border: 1px solid $color-red;
+			background-color: #FFFFFF;
+
+			&.recom {
+				color: $font-color-light;
+				border: 1px solid $font-color-light;
+			}
+
+			&.evaluate {
+				color: $color-yellow;
+				border: 1px solid $color-yellow;
+			}
+		}
+	}
+
+	/* load-more */
+	.uni-load-more {
+		display: flex;
+		flex-direction: row;
+		height: 80rpx;
+		align-items: center;
+		justify-content: center;
+	}
+
+	.uni-load-more__text {
+		font-size: 28rpx;
+		color: #999;
+	}
+
+	.uni-load-more__img {
+		height: 24px;
+		width: 24px;
+		margin-right: 10px;
+	}
+
+	.uni-load-more__img>view {
+		position: absolute;
+	}
+
+	.uni-load-more__img>view view {
+		width: 6px;
+		height: 2px;
+		border-top-left-radius: 1px;
+		border-bottom-left-radius: 1px;
+		background: #999;
+		position: absolute;
+		opacity: 0.2;
+		transform-origin: 50%;
+		animation: load 1.56s ease infinite;
+	}
+
+	.uni-load-more__img>view view:nth-child(1) {
+		transform: rotate(90deg);
+		top: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(2) {
+		transform: rotate(180deg);
+		top: 11px;
+		right: 0;
+	}
+
+	.uni-load-more__img>view view:nth-child(3) {
+		transform: rotate(270deg);
+		bottom: 2px;
+		left: 9px;
+	}
+
+	.uni-load-more__img>view view:nth-child(4) {
+		top: 11px;
+		left: 0;
+	}
+
+	.load1,
+	.load2,
+	.load3 {
+		height: 24px;
+		width: 24px;
+	}
+
+	.load2 {
+		transform: rotate(30deg);
+	}
+
+	.load3 {
+		transform: rotate(60deg);
+	}
+
+	.load1 view:nth-child(1) {
+		animation-delay: 0s;
+	}
+
+	.load2 view:nth-child(1) {
+		animation-delay: 0.13s;
+	}
+
+	.load3 view:nth-child(1) {
+		animation-delay: 0.26s;
+	}
+
+	.load1 view:nth-child(2) {
+		animation-delay: 0.39s;
+	}
+
+	.load2 view:nth-child(2) {
+		animation-delay: 0.52s;
+	}
+
+	.load3 view:nth-child(2) {
+		animation-delay: 0.65s;
+	}
+
+	.load1 view:nth-child(3) {
+		animation-delay: 0.78s;
+	}
+
+	.load2 view:nth-child(3) {
+		animation-delay: 0.91s;
+	}
+
+	.load3 view:nth-child(3) {
+		animation-delay: 1.04s;
+	}
+
+	.load1 view:nth-child(4) {
+		animation-delay: 1.17s;
+	}
+
+	.load2 view:nth-child(4) {
+		animation-delay: 1.3s;
+	}
+
+	.load3 view:nth-child(4) {
+		animation-delay: 1.43s;
+	}
+
+	@-webkit-keyframes load {
+		0% {
+			opacity: 1;
+		}
+
+		100% {
+			opacity: 0.2;
+		}
+	}
+</style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 185 - 0
pages/order/orderDetail.vue


+ 296 - 0
pages/order/orderRefund.vue

@@ -0,0 +1,296 @@
+<template>
+	<view class="content">
+		<view class="order-item">
+			<view class="titleGoods">
+				退款商品
+			</view>
+			<scroll-view v-if="listStyle == 1" class="goods-box" scroll-x>
+				<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+					<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill"></image>
+				</view>
+			</scroll-view>
+			<view v-if="listStyle == 2" 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>
+
+					<view v-if="goodsItem.productInfo.attrInfo">
+						<view class="attr-box">{{ goodsItem.productInfo.attrInfo.suk}} x {{ goodsItem.cart_num }}</view>
+						<view class="price">{{ goodsItem.productInfo.attrInfo.price }}</view>
+					</view>
+					<view v-else>
+
+						<view class="attr-box">{{ goodsItem.attrInfo ? goodsItem.attrInfo.suk : '' }} x
+							{{ goodsItem.cart_num }}</view>
+						<view class="price">{{ goodsItem.productInfo.price }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="orderDetial">
+			<view class="row b-b flex">
+				<text class="tit">订单总价</text>
+				<view class="input">¥{{ item.total_price }}</view>
+			</view>
+			<view class="row b-b flex">
+				<text class="tit">邮费</text>
+				<view class="input">{{ item.pay_postage > 0 ? '¥' +item.pay_postage : '免邮费' }}</view>
+			</view>
+			<view class="row flex">
+				<text class="tit ">退款金额</text>
+				<view class="input payColor">¥{{ item.pay_price }}</view>
+			</view>
+		</view>
+		<view class="orderDetial">
+
+			<view class="row b-b flex">
+				<text class="tit">退款理由</text>
+				<picker mode="selector" :range="value" @change="bindChange">
+					<view class="refund" v-if="refund">{{ refund || '请选择退款理由' }}</view>
+					<view class="noRefund" v-else>请选择退款理由</view>
+				</picker>
+			</view>
+			<view class="row">
+				<text class="tit">备注说明</text>
+				<input class="input" type="text" v-model="reason" placeholder="请填写备注" placeholder-class="placeholder" />
+			</view>
+		</view>
+		<view class="base-buttom" @click="confirm">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		refund,
+		refundReason,
+		orderDetail
+	} from '@/api/order.js';
+	export default {
+		data() {
+			return {
+				refund: '', //退款理由
+				reason: '', //备注
+				value: ['1', '2', '3', '4', '5', '6', '7', '8', 9, 10, 11, 12, 13],
+				orderId: '',
+				item: {},
+				listStyle: 2
+			};
+		},
+		onLoad(option) {
+			this.orderId = option.id;
+			this.refundReason();
+			this.loadOrder();
+		},
+		methods: {
+			// 切换选中事件
+			bindChange(e) {
+				this.refund = this.value[e.detail.value];
+			},
+			// 加载退款理由
+			refundReason() {
+				refundReason({}).then(e => {
+					this.value = e.data;
+				});
+			},
+			loadOrder() {
+				orderDetail({}, this.orderId).then(e => {
+					this.item = e.data;
+				});
+			},
+			//提交
+			confirm() {
+				let obj = this;
+				if (!obj.refund) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写退货理由',
+						showCancel: false
+					});
+					return false;
+				}
+				uni.showLoading({
+					title: '提交中...',
+					mask: true
+				});
+				refund({
+					text: obj.refund,
+					uni: obj.orderId,
+					refund_reason_wap_explain: obj.reason
+				}).then(function(e) {
+					uni.hideLoading()
+					uni.showModal({
+						title: '提示',
+						content: '已提交成功是否返回?',
+						success: res => {
+							if(res.confirm){
+								uni.switchTab({
+									url:'/pages/user/user'
+								})
+							}
+						},
+					});
+				}).catch(() => {
+					uni.hideLoading()
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+		padding-top: 30rpx;
+	}
+
+	.orderDetial {
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		border-radius: 20rpx;
+		overflow: hidden;
+
+		.row {
+			.input {
+				text-align: right;
+				color: $font-color-light;
+			}
+		}
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		position: relative;
+		padding: 0 30rpx;
+		height: 110rpx;
+		background: #fff;
+
+		.refund {
+			font-size: 30rpx;
+			color: $font-color-light;
+		}
+
+		.noRefund {
+			font-size: 30rpx;
+			color: $font-color-light;
+			padding-left: 20rpx;
+		}
+
+		.tit {
+			flex-shrink: 0;
+			width: 120rpx;
+			font-size: 30rpx;
+			color: $font-color-dark;
+		}
+
+		.input {
+			flex: 1;
+			font-size: 30rpx;
+			color: $font-color-dark;
+			padding-left: 20rpx;
+
+			&.payColor {
+				color: $color-red;
+			}
+		}
+
+		.iconlocation {
+			font-size: 36rpx;
+			color: $font-color-light;
+		}
+	}
+
+	.add-btn {
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 60rpx auto;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	/* 多条商品 */
+	.order-item {
+		display: flex;
+		flex-direction: column;
+		padding-left: 30rpx;
+		background: #fff;
+		margin-top: 16rpx;
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		padding-top: 30rpx;
+		margin-bottom: 30rpx;
+
+		.titleGoods {
+			font-size: $font-lg;
+		}
+
+		.goods-box {
+			height: 160rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+
+			.goods-item {
+				width: 120rpx;
+				height: 120rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		/* 单条商品 */
+		.goods-box-single {
+			display: flex;
+			padding: 20rpx 0;
+
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+
+			.right {
+				flex: 1;
+				display: flex;
+				flex-direction: column;
+				padding: 0 30rpx 0 24rpx;
+				overflow: hidden;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-dark;
+					line-height: 1;
+				}
+
+				.attr-box {
+					font-size: $font-sm + 2rpx;
+					color: $font-color-light;
+					padding: 10rpx 12rpx;
+				}
+
+				.price {
+					font-size: $font-base + 2rpx;
+					color: $font-color-dark;
+
+					&:before {
+						content: '¥';
+						font-size: $font-sm;
+						margin: 0 2rpx 0 8rpx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 204 - 0
pages/product/classify.vue

@@ -0,0 +1,204 @@
+<template>
+	<view class="container">
+		<!-- 头部轮播 -->
+		<view class="carousel-section">
+			<swiper class="carousel" autoplay="true" duration="400" interval="5000">
+				<swiper-item v-for="(item, index) in bannerImg" :key="index" class="carousel-item" @click="bannerNavToUrl(item)">
+					<image :src="item.img" mode=" scaleToFill" />
+				</swiper-item>
+			</swiper>
+		</view>
+		<view class="type-title-box flex">
+			<view class="title-border"></view>
+			<view class="title-content">
+				<text v-if="type == 1">精品推荐</text>
+				<text v-if="type == 2">热门榜单</text>
+				<text v-if="type == 3">首发新品</text>
+				<text v-if="type == 4">促销单品</text>
+			</view>
+			<view class="title-border"></view>
+		</view>
+
+		<view class="goodsList-box">
+			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
+				<image :src="ls.image" mode=" scaleToFill"></image>
+				<view class="goodsList-content">
+					<view class="title">
+						<text>{{ ls.store_name }}</text>
+					</view>
+					<view class="goods-money flex">
+						<view class="money-box">
+							<view class="money">
+								<text class="font-size-sm">¥</text>
+								{{ ls.price }}
+							</view>
+							<view class="otMoney-box">
+								<text class="otMoney">¥{{ ls.ot_price }}</text>
+								<text class="sales">已售{{ ls.sales }}件</text>
+							</view>
+						</view>
+						<view @click="navTo(ls)" class="cart iconfont iconcart"></view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { groomList } from '@/api/product.js';
+export default {
+	data() {
+		return {
+			list: [],
+			bannerImg: []
+		};
+	},
+	onLoad(option) {
+		// 获取查询对象
+		this.type = option.type;
+		// 加载基础数据
+		this.loadData();
+	},
+	methods: {
+		navTo: function(ls) {
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + ls.id
+			});
+		},
+		// 请求载入数据
+		async loadData() {
+			groomList({}, this.type)
+				.then(({ data }) => {
+					// 保存轮播图
+					this.bannerImg = data.banner;
+					// 保存商品信息
+					this.list = data.list;
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 轮播图跳转
+		bannerNavToUrl(item) {
+			// #ifdef H5
+			if (item.wap_link.indexOf('http') > 0) {
+				window.location.href = item.wap_link;
+			}
+			// #endif
+			if (item.wap_link) {
+				uni.navigateTo({
+					url: item.wap_link
+				});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: $page-color-base;
+}
+.carousel-section {
+	padding: 0;
+	.titleNview-placing {
+		padding-top: 0;
+		height: 0;
+	}
+	.swiper-dots {
+		left: 45rpx;
+		bottom: 40rpx;
+	}
+	.carousel {
+		width: 100%;
+		height: 360rpx;
+		.carousel-item {
+			width: 100%;
+			height: 100%;
+			overflow: hidden;
+		}
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+// 中间标题样式
+.type-title-box {
+	padding: 40rpx;
+	.title-content {
+		height: 100%;
+		width: 200rpx;
+		text-align: center;
+		font-size: $font-lg;
+		font-weight: 500;
+		color: $font-color-dark;
+	}
+	.title-border {
+		width: 250rpx;
+		height: 2rpx;
+		background-color: #e9e9e9;
+	}
+}
+// 商品列表
+.goodsList-box {
+	.goodsList-item {
+		margin-bottom: 40rpx;
+		background-color: #ffffff;
+		padding: 30rpx;
+		image {
+			flex-shrink: 0;
+			border-radius: $border-radius-sm;
+			height: 180rpx;
+			width: 180rpx;
+		}
+		.goodsList-content {
+			margin-left: 20rpx;
+			flex-grow: 1;
+			height: 180rpx;
+			position: relative;
+			.title {
+				font-size: $font-base;
+				color: $font-color-dark;
+				font-weight: 500;
+			}
+			.goods-money {
+				position: absolute;
+				left: 0;
+				bottom: 0;
+				width:100%;
+				.money-box {
+					.money {
+						font-size: $font-lg;
+						color: $color-red;
+						font-weight: bold;
+					}
+					.otMoney-box {
+						font-size: $font-sm;
+						.otMoney {
+							color: $font-color-dark;
+							padding-right: 20rpx;
+						}
+						.sales {
+							color: $font-color-light;
+						}
+					}
+				}
+				.cart {
+					border: 1px solid $color-red;
+					color: $color-red;
+					font-size: $font-base;
+					font-weight: bold;
+					border-radius: 99px;
+					width: 55rpx;
+					height: 55rpx;
+					display: flex;
+					justify-content: center;
+					align-items: center;
+				}
+			}
+		}
+	}
+}
+</style>

+ 68 - 0
pages/product/common/contentText.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="detail-desc">
+		<view class="d-header"><text>图文详情</text></view>
+		<rich-text class="detail-centent" :nodes="description"></rich-text>
+		<!-- 底部高度撑开 -->
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		description: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+			
+		};
+	},
+};
+</script>
+
+<style lang="scss">
+	/*  详情 */
+	.detail-desc {
+		margin-top: 14rpx;
+		background: #fff;
+		/deep/ img {
+			max-width: 100% !important;
+			display: inline !important;
+		}
+		/deep/ div {
+			max-width: 100% !important;
+		}
+		.d-header {
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 80rpx;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			position: relative;
+	
+			text {
+				padding: 0 20rpx;
+				background: #fff;
+				position: relative;
+				z-index: 1;
+			}
+			&:after {
+				position: absolute;
+				left: 50%;
+				top: 50%;
+				transform: translateX(-50%);
+				width: 300rpx;
+				height: 0;
+				content: '';
+				border-bottom: 1px solid #ccc;
+			}
+		}
+	}
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 139 - 0
pages/product/common/discounts.vue

@@ -0,0 +1,139 @@
+<template>
+	<view class="c-list">
+		<view class="c-row b-b">
+			<text class="tit">配送</text>
+			<view class="bz-list con" v-if="!mark">立即下单 ,预计最快第二天8.30-9:30送达</view>
+			<view class="bz-list con reding" v-else>{{mark}}</view>
+		</view>
+		<view v-if="showCoupon" class="c-row b-b" @click="Getcoupon">
+			<text class="tit">优惠券</text>
+			<text class="con t-r red">领取优惠券</text>
+			<text class="iconfont iconenter"></text>
+		</view>
+		<view class="c-row b-b">
+			<text class="tit">简介</text>
+			<view class="bz-list con">
+				<text>{{ Info }}</text>
+				<!-- <text>{{ copy2 }}</text> -->
+
+			</view>
+			<view class="copy-btn" @click="copy">一键复制</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			showCoupon: {
+				type: Boolean,
+				default: false
+			},
+			mark: {
+				default: ''
+			},
+			Info: {
+				default: ''
+			},
+		},
+		data() {
+			return {
+				copy1: '食材质检 ·',
+				copy2: '无接触配送到门口'
+			};
+		},
+		methods: {
+			Getcoupon() {
+				this.$emit('clickCoupon')
+			},
+			copy() {
+				// let copyText = this.copy1 + ' ' + this.copy2;
+				console.log(this.Info)
+				uni.setClipboardData({
+					//去找上面的数据
+					data: this.Info,
+					success: function(res) {
+						uni.showToast({
+							title: '复制成功',
+						});
+					},
+					fail: function(res) {
+					}
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.c-list {
+		font-size: $font-sm + 2rpx;
+		color: $font-color-base;
+		background: #fff;
+
+		.title {
+			color: #333333;
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+
+		.c-row {
+			display: flex;
+			align-items: center;
+			padding: 20rpx 30rpx;
+			position: relative;
+		}
+
+		.tit {
+			width: 140rpx;
+		}
+
+		.con {
+			flex: 1;
+			color: $font-color-dark;
+
+			.selected-text {
+				margin-right: 10rpx;
+			}
+		}
+
+		.reding {
+			color: #FF0815 !important;
+		}
+
+		.bz-list {
+			height: 40rpx;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-dark;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			
+			text {
+				display: inline-block;
+				margin-right: 30rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				white-space: nowrap;
+				width: 100%;
+			}
+		}
+
+		.copy-btn {
+			background-color: #F3F3F2;
+			padding: 8rpx 20rpx;
+			border-radius: 10rpx;
+			color: #040406;
+		}
+
+		.red {
+			color: #fb6d24;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	.rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 115 - 0
pages/product/common/estimate.vue

@@ -0,0 +1,115 @@
+<template>
+	<view class="eva-section" @click="navTo">
+		<view class="e-header">
+			<text class="tit">评价</text>
+			<text>({{ list.replyCount }})</text>
+			<text class="tip">好评率 {{ list.replyChance }}%</text>
+			<text class="iconfont iconenter"></text>
+		</view>
+		<view class="eva-box">
+			<image class="portrait" :src="reply.avatar" mode="aspectFill"></image>
+			<view class="right">
+				<text class="name">{{ reply.nickname }}</text>
+				<text class="con">{{ reply.comment }}</text>
+				<view class="con_box">
+					<view class="con_image" v-for="item in reply.pics"><image :src="item"></image></view>
+				</view>
+				<view class="bot">
+					<text class="attr"></text>
+					<text class="stime">{{ reply.add_time }}</text>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		list: {
+			default: ''
+		},
+		reply: {
+			default: ''
+		},
+	},
+	data() {
+		return {
+		};
+	},
+	methods: {
+		navTo() {
+			this.$emit('navTo')
+		}
+	},
+};
+</script>
+
+<style lang="scss">
+/* 评价 */
+.eva-section {
+	display: flex;
+	flex-direction: column;
+	padding: 20rpx 30rpx;
+	background: #fff;
+	margin-top: 16rpx;
+	.e-header {
+		display: flex;
+		align-items: center;
+		height: 70rpx;
+		font-size: $font-sm + 2rpx;
+		color: $font-color-light;
+		.tit {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right: 4rpx;
+		}
+		.tip {
+			flex: 1;
+			text-align: right;
+		}
+		.iconenter {
+			margin-left: 10rpx;
+		}
+	}
+	.eva-box {
+		display: flex;
+		padding: 20rpx 0;
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base;
+			color: $font-color-base;
+			padding-left: 26rpx;
+			.con {
+				font-size: $font-base;
+				color: $font-color-dark;
+				padding: 20rpx 0;
+			}
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+	.con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 78 - 0
pages/product/common/freshDetail.vue

@@ -0,0 +1,78 @@
+<template>
+	<view class="listBox" @click="onClick">
+		<view class="list">
+			<view class="flex listItem">
+				<view class="flex titleBox">
+					<text class="title">当前选中:</text>
+					<text v-for="(item,index) in specSelected" class="margin-l-10">
+						<text v-if="index>0">,</text>
+						<text>
+							{{item}}
+						</text>
+					</text>
+				</view>
+				<view class="right flex">
+					<text></text>
+					<image class="img" src="../../../static/icon/next1.png" mode="widthFix"></image>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			specSelected: {
+				type: Array,
+				default: function() {
+					return []
+				}
+			},
+		},
+		data() {
+			return {
+
+			};
+		},
+		methods: {
+			onClick() {
+				this.$emit('click')
+			}
+		},
+	};
+</script>
+
+<style lang="scss">
+	.listBox {
+		background-color: #FFFFFF;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 30rpx 40rpx;
+			padding-top: 0;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			color: $font-color-light;
+			font-size: $font-base;
+		}
+	}
+</style>

+ 120 - 0
pages/product/common/guessLike.vue

@@ -0,0 +1,120 @@
+<template>
+	<view class="guess-item">
+		<view class="guess">猜你喜欢</view>
+		<view class="guess-scroll flex_item" scroll-x>
+			<view class="scroll-list" v-for="ls in goodList" @click="navToDetailPage(ls)">
+				<view class="scoll-img"><image :src="ls.image"></image></view>
+				<view class="scoll-name ellipsis">{{ ls.store_name }}</view>
+				<view class="price-list flex">
+					<view class="tpl">
+						<view class="red-price">
+							¥
+							<text>{{ ls.price }}</text>
+						</view>
+						<view class="grey-price">¥{{ ls.ot_price }}</view>
+					</view>
+					<view class="img position-relative" @click.stop="Addcar(ls)">
+						<image src="/static/img/img13.png"></image>
+						<view class="corner" v-if="ls.cart_num > 0">
+							<text>{{ ls.cart_num }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		goodList: {
+			type: Array,
+			default: function () {
+				return []
+			}
+		},
+	},
+	methods: {
+		// 跳转到详情页
+		navToDetailPage(ls){
+			this.$emit('clickNavTo',ls)
+		},
+		// 加入购物车
+		Addcar(ls){
+			this.$emit('Addcar',ls)
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+//猜你喜欢
+.guess-item {
+	padding: 25rpx 25rpx;
+	background: #ffffff;
+	margin-bottom: 15rpx;
+	padding-bottom: 45rpx !important;
+	.guess {
+		color: #000000;
+		font-size: 35rpx;
+		font-weight: 500;
+		padding-bottom: 25rpx;
+	}
+	.guess-scroll {
+		width: 100%;
+		font-size: 24rpx;
+		overflow: hidden;
+		overflow-x: auto;
+		justify-content: flex-start;
+		.scroll-list {
+			border: 2rpx solid #f0f0f0;
+			border-radius: 25rpx;
+			margin-right: 15rpx;
+			.scoll-img {
+				width: 227rpx;
+				border-top-right-radius: 25rpx;
+				border-top-left-radius: 25rpx;
+				height: 227rpx;
+				overflow: hidden;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+			.scoll-name {
+				height: 80rpx;
+				width: 227rpx;
+				font-size: 22rpx;
+				padding: 15rpx 15rpx;
+			}
+			.price-list {
+				padding: 25rpx 15rpx;
+				padding-right: 25rpx;
+				.tpl {
+					.red-price {
+						color: #f31d29;
+						text {
+							font-size: 35rpx !important;
+							font-weight: bold;
+						}
+					}
+					.grey-price {
+						text-decoration: line-through;
+						color: #999999;
+						font-size: 10px !important;
+					}
+				}
+				.img {
+					width: 45rpx;
+					height: 45rpx;
+					image {
+						width: 100%;
+						height: 100%;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 193 - 0
pages/product/common/productBottom.vue

@@ -0,0 +1,193 @@
+<template>
+	<view class="page-bottom">
+		<view class="p-b-btn" @click="shopLi">
+			<image class="icon" src="../../../static/icon/goodsServer.png" mode="widthFix"></image>
+			<text>客服</text>
+		</view>
+		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="setCart(goodsObjact)">
+			<image class="icon" src="../../../static/icon/goodsAddCart.png" mode="widthFix"></image>
+			<text>购物车</text>
+		</view>
+		<view class="action-btn-group">
+			<button type="primary" class=" action-btn add-cart-btn margin-r-30" @click="buy(2)">加入购物车</button>
+			<button type="primary" class=" action-btn  buy-now-btn margin-r-30" @click="buy(1)">立即购买</button>
+		</view>
+	</view>
+</template>
+
+<script>
+import { collectAdd, collectDel } from '@/api/product.js';
+export default {
+	props: {
+		many: {
+			default: 9
+		},
+		goodsObjact: {
+			default: function() {
+				return {};
+			}
+		},
+		goodsid:{
+			default: ''
+		},
+		systemStore:{
+			default: function() {
+				return {};
+			}
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		// 联系商家
+		shopLi() {
+			uni.makePhoneCall({
+				phoneNumber: this.systemStore.phone //仅为示例
+			});
+		},
+		buy(type) {
+			this.$emit('specOPne',type);
+		},
+		// 加入购物车
+		setCart(goodsObjact){
+			uni.switchTab({
+				url:'/pages/cart/cart'
+			})
+		}
+		//收藏
+		// toFavorite(item) {
+		// 	let obj = this;
+		// 	item.userCollect = !item.userCollect;
+		// 	if (!item.userCollect) {
+		// 		collectDel({ id: obj.goodsid, category: 'product' }).then(function(e) {
+		// 			uni.showToast({
+		// 				title: '成功取消收藏',
+		// 				type: 'top',
+		// 				duration: 1500
+		// 			});
+		// 		});
+		// 	} else {
+		// 		collectAdd({ id: obj.goodsid, category: 'product' }).then(function(e) {
+		// 			uni.showToast({
+		// 				title: '成功加入收藏',
+		// 				type: 'top',
+		// 				duration: 1500
+		// 			});
+		// 		});
+		// 	}
+		// }
+	}
+};
+</script>
+
+<style lang="scss">
+/* 底部操作菜单 */
+.page-bottom {
+	position: fixed;
+	bottom: 0rpx;
+	z-index: 95;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 750rpx;
+	height: 120rpx;
+	background-color: #ffffff;
+	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	border-radius: 16rpx; */
+	.icon{
+		width: 50rpx ;
+	}
+	.p-b-btn {
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		font-size: $font-sm;
+		color: $font-color-base;
+		width: 96rpx;
+		height: 80rpx;
+		.iconfont {
+			font-size: 40rpx;
+			line-height: 48rpx;
+			color: $font-color-light;
+		}
+		&.active,
+		&.active .iconfont {
+			color: $uni-color-primary;
+		}
+		.iconlikefill {
+			font-size: 46rpx;
+		}
+		image {
+			width: 56rpx;
+			height: 58rpx;
+		}
+	}
+	.action-btn-group {
+		display: flex;
+		height: 76rpx;
+		border-radius: 100px;
+		overflow: hidden;
+		margin-left: 20rpx;
+		position: relative;
+		flex-grow: 1;
+		&:after {
+			content: '';
+			position: absolute;
+			top: 50%;
+			right: 50%;
+			transform: translateY(-50%);
+			height: 28rpx;
+			width: 0;
+			border-right: 1px solid rgba(255, 255, 255, 0.5);
+		}
+		.action-btn {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 250rpx;
+			height: 100%;
+			font-size: $font-base;
+			padding: 0;
+			border-radius: 100px;
+			flex-grow: 1;
+			background: transparent;
+			&.buy-now-btn {
+				background-color: $color-yellow;
+				color: #714D01;
+			}
+			&.add-cart-btn {
+				background-color: $color-red;
+				color:#6C0100 ;
+			}
+		}
+	}
+}
+.p-b-btn {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	justify-content: center;
+	font-size: $font-sm;
+	color: $font-color-base;
+	width: 96rpx;
+	height: 80rpx;
+	.iconfont {
+		font-size: 40rpx;
+		line-height: 48rpx;
+		color: $font-color-light;
+	}
+	&.active,
+	&.active .iconfont {
+		color: $uni-color-primary;
+	}
+	.icon-fenxiang2 {
+		font-size: 42rpx;
+		transform: translateY(-2rpx);
+	}
+	.iconlikefill {
+		font-size: 46rpx;
+	}
+}
+</style>

+ 150 - 0
pages/product/common/productContent.vue

@@ -0,0 +1,150 @@
+<template>
+	<view class="introduce-section">
+		<view class="flex">
+
+			<view class="price-box">
+				<text class="price-tip">¥</text>
+				<view class="price margin-l-10">
+					{{ goodsObjact.price }}
+					<!-- <text class="text">/份</text> -->
+					<!-- <text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text> -->
+				</view>
+			</view>
+			<view class="sales">
+				{{(goodsObjact.sales+goodsObjact.ficti)|getNum}}+
+				<text class="margin-l-10">
+					付款
+				</text>
+			</view>
+		</view>
+		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
+		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			goodsObjact: {
+				type: Object,
+				default: function() {
+					return {
+						percent: 1
+					};
+				}
+			}
+		},
+		filters: {
+			getNum(num) {
+				if (num) {
+			
+					// 转为字符串
+					num += '';
+					let nu = num.slice(0, 1);
+					for (let i = 0; i < num.length - 1; i++) {
+						nu += 0
+					}
+					return nu
+				}
+			}
+		},
+		data() {
+			return {};
+		}
+	};
+</script>
+
+<style lang="scss">
+	/* 标题简介 */
+	.introduce-section {
+		position: relative;
+		background: #fff;
+		padding: 35rpx 35rpx;
+
+		.sales {
+			color: $font-color-light;
+			font-size: 24rpx;
+		}
+
+		.title {
+			font-size: 32rpx;
+			color: $font-color-dark;
+
+			.tip-o {
+				color: #ff3334;
+				padding-left: 15rpx;
+			}
+		}
+
+		.shareDate {
+			position: absolute;
+			top: 25rpx;
+			right: 25rpx;
+			font-size: 26rpx;
+			color: #3d3f46;
+			border-radius: 15rpx;
+			background-color: #ffffff;
+			height: 60rpx;
+			line-height: 60rpx;
+		}
+
+		.share-img {
+			width: 30rpx;
+			height: 30rpx;
+			position: relative;
+			top: 5rpx;
+			left: 0;
+			margin-right: 10rpx;
+		}
+
+		.info {
+			color: #999999;
+			font-size: 26rpx;
+			padding-bottom: 15rpx;
+		}
+
+		.progress-box {
+			width: 260rpx;
+			position: relative;
+			margin-top: 15rpx;
+			line-height: 10px;
+
+			.number {
+				font-size: 17rpx;
+				position: absolute;
+				z-index: 999;
+				top: 3rpx;
+				left: 15rpx;
+				color: #ffffff;
+			}
+		}
+
+		.price-box {
+			display: flex;
+			align-items: baseline;
+			height: 64rpx;
+			padding: 10rpx 0;
+			font-size: 26rpx;
+			color: $uni-color-primary;
+		}
+
+		.price {
+			font-size: 44rpx;
+			font-weight: bold;
+
+			.text {
+				padding-left: 5rpx;
+				color: #b0b0b0;
+				font-size: 22rpx !important;
+			}
+		}
+
+		.m-price {
+			margin: 0 12rpx;
+			color: $font-color-light;
+			text-decoration: line-through;
+			margin-left: 25rpx;
+			font-size: 24rpx;
+		}
+	}
+</style>

+ 55 - 0
pages/product/common/topSwiper.vue

@@ -0,0 +1,55 @@
+<template>
+	<view class="carousel">
+		<swiper indicator-dots :circular="true" duration="400">
+			<swiper-item class="swiper-item" v-for="(item, index) in imgList" :key="index">
+				<view class="image-wrapper"><image :src="item" class="loaded" mode="scaleToFill"></image></view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		imgList: {
+			type: Array,
+			default: function () {
+				return []
+			}
+		},
+	},
+	data() {
+		return {
+			
+		};
+	},
+};
+</script>
+
+<style lang="scss">
+.carousel {
+	/* #ifdef APP-PLUS */
+	padding-top: var(--status-bar-height);
+	/* #endif */
+	height: 700rpx;
+	position: relative;
+	swiper {
+		height: 100%;
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 100%;
+	}
+	.swiper-item {
+		display: flex;
+		justify-content: center;
+		align-content: center;
+		height: 700rpx;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 416 - 0
pages/product/list.vue

@@ -0,0 +1,416 @@
+<template>
+	<view class="content">
+		<view class="navbar" :style="{ position: headerPosition, top: headerTop }">
+			<view class="nav-item" :class="{ current: filterIndex === 0 }" @click="tabClick(0)">综合排序</view>
+			<view class="nav-item" :class="{ current: filterIndex === 1 }" @click="tabClick(1)">
+				<text>销量优先</text>
+				<view class="p-box">
+					<text :class="{ active: numberOrder === 1 && filterIndex === 1 }" class="iconfont iconfold"></text>
+					<text :class="{ active: numberOrder === 2 && filterIndex === 1 }" class="iconfont iconfold xia"></text>
+				</view>
+			</view>
+			<view class="nav-item" :class="{ current: filterIndex === 2 }" @click="tabClick(2)">
+				<text>价格</text>
+				<view class="p-box">
+					<text :class="{ active: priceOrder === 1 && filterIndex === 2 }" class="iconfont iconfold"></text>
+					<text :class="{ active: priceOrder === 2 && filterIndex === 2 }" class="iconfont iconfold xia"></text>
+				</view>
+			</view>
+			<text class="cate-item iconfont iconapps" @click="toggleCateMask('show')"></text>
+		</view>
+		<view class="goods-list">
+			<view v-for="(item, index) in goodsList" :key="index" class="goods-item" @click="navToDetailPage(item)">
+				<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
+				<text class="title clamp">{{ item.title }}</text>
+				<view class="price-box">
+					<text class="price">{{ item.price }}</text>
+					<text>已售 {{ item.sales }}</text>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+
+		<view class="cate-mask" :class="cateMaskState === 0 ? 'none' : cateMaskState === 1 ? 'show' : ''" @click="toggleCateMask">
+			<view class="cate-content" @click.stop.prevent="stopPrevent" @touchmove.stop.prevent="stopPrevent">
+				<scroll-view scroll-y class="cate-list">
+					<view v-for="item in cateList" :key="item.id">
+						<view class="cate-item b-b two">{{ item.cate_name }}</view>
+						<view v-for="tItem in item.children" :key="tItem.id" class="cate-item b-b" :class="{ active: tItem.id == cateId }" @click="changeCate(tItem)">
+							{{ tItem.cate_name }}
+						</view>
+					</view>
+				</scroll-view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+import { getProducts } from '@/api/product.js';
+import { getCategoryList } from '@/api/product.js';
+export default {
+	components: {
+		uniLoadMore
+	},
+	data() {
+		return {
+			cateMaskState: 0, //分类面板展开状态
+			headerPosition: 'fixed',
+			headerTop: '0px',
+			loadingType: 'more', //加载更多状态
+			filterIndex: 0, //查询类型
+			numberOrder: 0, //1 销量从低到高 2销量从高到低
+			limit: 6, //每次加载数据条数
+			page: 0, //当前页数
+			cateId: 0, //已选三级分类id
+			priceOrder: 0, //1 价格从低到高 2价格从高到低
+			cateList: [], //分类列表
+			goodsList: [] //商品列表
+		};
+	},
+
+	onLoad(options) {
+		// #ifdef H5
+		this.headerTop = document.getElementsByTagName('uni-page-head')[0].offsetHeight + 'px';
+		// #endif
+		this.cateId = options.tid;
+		this.loadCateList(options.fid, options.sid);
+		this.loadData();
+	},
+	onPageScroll(e) {
+		//兼容iOS端下拉时顶部漂移
+		if (e.scrollTop >= 0) {
+			this.headerPosition = 'fixed';
+		} else {
+			this.headerPosition = 'absolute';
+		}
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		this.loadData('refresh');
+	},
+	//监听页面是否滚动到底部加载更多
+	onReachBottom() {
+		this.loadData();
+	},
+	methods: {
+		//加载分类
+		async loadCateList(fid, sid) {
+			let obj = this;
+			getCategoryList({}).then(function(e) {
+				console.log(e);
+				e.data.forEach(function(e) {
+					if (e.id == fid) {
+						obj.cateList = e.children;
+						return;
+					}
+				});
+				console.log(obj.cateList);
+			});
+		},
+		//加载商品 ,带下拉刷新和上滑加载
+		async loadData(type = 'add', loading) {
+			let obj = this;
+			let data = {
+				page: obj.page,
+				limit: obj.limit,
+				sid: obj.cateId //分类id
+			};
+			//没有更多直接返回
+			if (type === 'add') {
+				if (obj.loadingType === 'nomore') {
+					return;
+				}
+				obj.loadingType = 'loading';
+			} else {
+				obj.loadingType = 'more';
+			}
+			if (type === 'refresh') {
+				// 清空数组
+				obj.goodsList = [];
+				obj.page = 1
+			}
+			if (this.filterIndex == 1) {
+				console.log( obj.salesOrder);
+				data.salesOrder = obj.numberOrder == 1 ? 'asc' : 'desc';
+			}
+			if (this.filterIndex == 2) {
+				console.log( obj.priceOrder);
+				data.priceOrder = obj.priceOrder == 1 ? 'asc' : 'desc';
+			}
+			getProducts(data).then(function(e) {
+				console.log(e.data);
+				obj.goodsList = obj.goodsList.concat(e.data);
+				//判断是否还有下一页,有是more  没有是nomore
+				if (obj.limit==e.data.length) {
+					obj.page++
+					obj.loadingType='more'
+				} else{
+					obj.loadingType='nomore'
+				}
+				if (type === 'refresh') {
+					if (loading == 1) {
+						uni.hideLoading();
+					} else {
+						uni.stopPullDownRefresh();
+					}
+				}
+			});
+		},
+		//筛选点击
+		tabClick(index) {
+			// 防止重复点击综合排序
+			if (this.filterIndex === 0 && this.filterIndex === index) {
+				return;
+			}
+			this.filterIndex = index;
+			// 判断是否为销量优先
+			if (index === 1) {
+				this.numberOrder = this.numberOrder === 1 ? 2 : 1;
+			}
+			// 判断是否为价格优先
+			if (index === 2) {
+				this.priceOrder = this.priceOrder === 1 ? 2 : 1;
+			}
+			// 初始化页数
+			this.page = 1;
+			// 初始化数组
+			uni.pageScrollTo({
+				duration: 300,
+				scrollTop: 0
+			});
+			this.loadData('refresh', 1);
+			uni.showLoading({
+				title: '正在加载',
+				mask:true
+			});
+		},
+		//显示分类面板
+		toggleCateMask(type) {
+			let timer = type === 'show' ? 10 : 300;
+			let state = type === 'show' ? 1 : 0;
+			this.cateMaskState = 2;
+			setTimeout(() => {
+				this.cateMaskState = state;
+			}, timer);
+		},
+		//分类点击
+		changeCate(item) {
+			this.cateId = item.id;
+			// 显示右侧分类
+			this.toggleCateMask();
+			// 滚轮返回顶部
+			uni.pageScrollTo({
+				duration: 300,
+				scrollTop: 0
+			});
+			// 初始化查询页数
+			this.page = 1
+			// 重新加载数据
+			this.loadData('refresh', 1);
+			uni.showLoading({
+				title: '正在加载',
+				mask:true
+			});
+		},
+		//详情
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: `/pages/product/product?id=${id}`
+			});
+		},
+		stopPrevent() {}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	background: $page-color-base;
+}
+.content {
+	padding-top: 96rpx;
+}
+
+.navbar {
+	position: fixed;
+	left: 0;
+	top: var(--window-top);
+	display: flex;
+	width: 100%;
+	height: 80rpx;
+	background: #fff;
+	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 120rpx;
+				height: 0;
+				border-bottom: 4rpx solid $base-color;
+			}
+		}
+	}
+	.p-box {
+		display: flex;
+		flex-direction: column;
+		.iconfont {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 30rpx;
+			height: 14rpx;
+			line-height: 1;
+			margin-left: 4rpx;
+			font-size: 26rpx;
+			color: #888;
+			&.active {
+				color: $base-color;
+			}
+		}
+		.xia {
+			transform: scaleY(-1);
+		}
+	}
+	.cate-item {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		width: 80rpx;
+		position: relative;
+		font-size: 44rpx;
+		&:after {
+			content: '';
+			position: absolute;
+			left: 0;
+			top: 50%;
+			transform: translateY(-50%);
+			border-left: 1px solid #ddd;
+			width: 0;
+			height: 36rpx;
+		}
+	}
+}
+
+/* 分类 */
+.cate-mask {
+	position: fixed;
+	left: 0;
+	top: var(--window-top);
+	bottom: 0;
+	width: 100%;
+	background: rgba(0, 0, 0, 0);
+	z-index: 95;
+	transition: 0.3s;
+
+	.cate-content {
+		width: 630rpx;
+		height: 100%;
+		background: #fff;
+		float: right;
+		transform: translateX(100%);
+		transition: 0.3s;
+	}
+	&.none {
+		display: none;
+	}
+	&.show {
+		background: rgba(0, 0, 0, 0.4);
+
+		.cate-content {
+			transform: translateX(0);
+		}
+	}
+}
+.cate-list {
+	display: flex;
+	flex-direction: column;
+	height: 100%;
+	.cate-item {
+		display: flex;
+		align-items: center;
+		height: 90rpx;
+		padding-left: 30rpx;
+		font-size: 28rpx;
+		color: #555;
+		position: relative;
+	}
+	.two {
+		height: 64rpx;
+		color: #303133;
+		font-size: 30rpx;
+		background: #f8f8f8;
+	}
+	.active {
+		color: $base-color;
+	}
+}
+
+/* 商品列表 */
+.goods-list {
+	display: flex;
+	flex-wrap: wrap;
+	padding: 0 30rpx;
+	background: #fff;
+	.goods-item {
+		display: flex;
+		flex-direction: column;
+		width: 48%;
+		padding-bottom: 40rpx;
+		&:nth-child(2n + 1) {
+			margin-right: 4%;
+		}
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 330rpx;
+		border-radius: 3px;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+			opacity: 1;
+		}
+	}
+	.title {
+		font-size: $font-lg;
+		color: $font-color-dark;
+		line-height: 80rpx;
+	}
+	.price-box {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding-right: 10rpx;
+		font-size: 24rpx;
+		color: $font-color-light;
+	}
+	.price {
+		font-size: $font-lg;
+		color: $uni-color-primary;
+		line-height: 1;
+		&:before {
+			content: '¥';
+			font-size: 26rpx;
+		}
+	}
+}
+</style>

+ 688 - 0
pages/product/product.vue

@@ -0,0 +1,688 @@
+<template>
+	<view class="container">
+		<!-- 轮播图 -->
+		<top-swiper :imgList="imgList"></top-swiper>
+		<!-- 标题 -->
+		<product-content :goodsObjact="goodsObjact"></product-content>
+		<!-- 规格信息 -->
+		<fresh-detail @click='specOPne' :specSelected="specSelected"></fresh-detail>
+		<!-- 图文详情 -->
+		<content-text :description="description"></content-text>
+		<!-- 底部高度撑开 -->
+		<view class="contentBottomHeight"></view>
+		<!-- 底部操作菜单 -->
+		<product-bottom :systemStore='system_store' @buy="buy" :goodsObjact="goodsObjact" :goodsid="goodsid"
+			@specOPne="specOPne"></product-bottom>
+		<!-- 规格-模态层弹窗 -->
+		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec">
+			<!-- 遮罩层 -->
+			<view class="mask"></view>
+			<view class="layer attr-content" @click.stop="stopPrevent">
+				<image class="close" src="../../static/icon/goodsExit.png" mode="aspectFit" @click="toggleSpec">
+				</image>
+
+				<view class="a-t">
+					<image @click="showImg(true)" :src="actionGoodsType.actionImage"></image>
+					<view class="right">
+						<!-- <text class="name">{{ goodsObjact.store_name }}</text> -->
+						<text class="price">
+							<text class="font-size-base margin-r-10">
+								¥
+							</text>
+							<text>
+								{{ actionGoodsType.actionPrice * goodsNumber }}
+							</text>
+							<text class="font-color-gray font-size-sm margin-l-10">
+								库存:{{actionGoodsType.goodsStore}}
+							</text>
+						</text>
+						<view class="flex">
+							<view class="type">
+								服务费:{{actionGoodsType.day_deducted}}
+							</view>
+							<view class="type">
+								服务天数:{{actionGoodsType.deal_price_num}}
+							</view>
+
+						</view>
+					</view>
+				</view>
+				<view v-for="(item, index) in specList" :key="index" class="attr-list">
+					<text>{{ item.attr_name }}</text>
+					<view class="item-list flex">
+						<text v-for="(childItem, childIndex) in item.attr_value" :key="childIndex" class="tit"
+							:class="{ selected: childItem.check }" @click="selectSpec(childItem, item, index)">
+							{{ childItem.attr }}
+						</text>
+					</view>
+				</view>
+				<!-- <view class="attr-list">
+					<text>购买数量</text>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
+					</view>
+				</view> -->
+				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
+				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		goodsDetail,
+		cartAdd
+	} from '@/api/product.js';
+	import {
+		mapState
+	} from 'vuex';
+	import store from '@/store/index.js';
+	import {
+		saveUrl
+	} from '@/utils/loginUtils.js';
+	// #ifdef H5
+	import {
+		weixindata
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// 头部轮播图
+	import topSwiper from './common/topSwiper.vue';
+	// 标题
+	import productContent from './common/productContent.vue';
+	// 规格信息
+	import freshDetail from './common/freshDetail.vue';
+	// 图文详情
+	import contentText from './common/contentText.vue';
+	// 底部按钮
+	import productBottom from './common/productBottom.vue';
+	export default {
+		components: {
+			topSwiper,
+			productContent,
+			freshDetail,
+			contentText,
+			productBottom,
+		},
+		data() {
+			return {
+				specList: [],
+				buys_show: true,
+				buys_shows: false,
+				specSelected: [], //选中的分类
+				specClass: 'none', //显示隐藏弹窗
+				many: 1, //1是单规格  2是多规格
+				reply: '', //评论
+				list: '', //商品详情的数据
+				type: 1, //默认支付方式add为
+				goodsType: 0,
+				goodsNumber: 1, //购买数量
+				goodsid: '', //商品id
+				description: '', //商品描述
+				goodsObjact: {
+					percent: 1
+				}, //保存商品数据
+				//图片循环
+				imgList: [],
+				// 对比对象
+				good_list: '', //猜你喜欢列表
+				goodsNumberMax: 0, //最大可购买数量
+				userInfo: '',
+				// 选中商品的分类
+				actionGoodsType: {
+					goodsStore: 0, //选中库存
+					actionImage: '', //默认选中图片
+					actionPrice: 0, //默认选中商品价格
+					day_deducted: 0, //选中商品的服务费用
+					deal_price_num: 0, //选中商品的扣款天数
+					uniqueId: '', //选中规格商品id
+				},
+				system_store: {}, //商家信息
+				onShopId: -1, //默认-1为不存在商家id
+			};
+		},
+		async onLoad(options) {
+			let obj = this;
+			obj.userInfo = uni.getStorageSync('userInfo');
+			//保存商品id
+			this.goodsid = options.id;
+			this.goodsType = options.type;
+
+			// 判断是否要读取商家id
+			if (options.shopId) {
+				console.log(options.shopId, '商店');
+				this.onShopId = +options.shopId;
+			}
+
+			// 判断有无人邀请
+			if (options.spread) {
+				// 存储邀请人
+				uni.setStorageSync('spread', options.spread);
+			}
+			saveUrl();
+			this.goodsDetail();
+			// 注册邀请信息
+			// #ifdef H5
+			let bool = uni.getStorageSync('weichatBrowser') || '';
+			if (bool) {
+				weixindata();
+			}
+			// #endif
+		},
+		computed: {
+			...mapState(['weichatObj', 'baseURL', 'urlFile']),
+			...mapState('shop', ['shopDetail'])
+		},
+		// 分享
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let shareObj = {
+				title: this.goodsObjact.store_name + '   价格:' + this.goodsObjact.price, // 默认是小程序的名称(可以写slogan等)
+				path: url + '?id=' + item.id + '&spread=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+				imageUrl: this.goodsObjact.image,
+				success: function(res) {
+					// 转发成功之后的回调
+					if (res.errMsg == 'shareAppMessage:ok') {}
+				},
+				fail: function() {
+					// 转发失败之后的回调
+					if (res.errMsg == 'shareAppMessage:fail cancel') {
+						// 用户取消转发
+					} else if (res.errMsg == 'shareAppMessage:fail') {
+						// 转发失败,其中 detail message 为详细失败信息
+					}
+				}
+			};
+
+			return shareObj;
+		},
+		methods: {
+			showImg(bool) {
+				uni.navigateTo({
+				    url: './showImg?imgs=' + JSON.stringify([this.actionGoodsType.actionImage]) + '&current=' +0,
+				    animationType: "fade-in"
+					
+				})
+			},
+			//选择规格
+			selectSpec(item, arr, ind) {
+				arr.attr_value.forEach(function(e) {
+					e.check = false;
+				});
+				item.check = true;
+				let obj = this;
+				obj.specSelected[ind] = item.attr;
+				// 重置触发修改事件
+				obj.specSelected = obj.specSelected.map((e) => {
+					return e
+				});
+				let str = obj.specSelected.join(',');
+
+				let goodItemAction = obj.actionGoodsType
+
+				// 获取当前选中的对象
+				if (obj.productValue[str]) {
+
+					obj.buys_show = true;
+					obj.buys_shows = false;
+					goodItemAction.actionPrice = obj.productValue[str].price;
+					goodItemAction.goodsNumberMax = obj.productValue[str].stock;
+					goodItemAction.actionImage = obj.productValue[str].image;
+					goodItemAction.uniqueId = obj.productValue[str].unique;
+					goodItemAction.goodsStore = obj.productValue[str].stock;
+					console.log(goodItemAction.goodsStore, 'kc')
+					goodItemAction.day_deducted = obj.productValue[str].day_deducted; //每天扣款
+					if (+obj.productValue[str].day_deducted) {
+						goodItemAction.deal_price_num = Math.ceil((obj.productValue[str].deal_price - obj.productValue[str]
+							.price) / obj.productValue[str].day_deducted); //每天扣款
+					} else {
+						goodItemAction.deal_price_num = 0
+					}
+					// 扣款天数
+				} else {
+					(obj.buys_show = false), (obj.buys_shows = true);
+				}
+				if (goodItemAction.goodsStore == 0) {
+					obj.buys_show = false;
+					obj.buys_shows = true;
+				}
+				// obj.specSelected[ind] = item.attr;
+			},
+			// 打開彈窗
+			specOPne(type = 1) {
+				let obj = this;
+				obj.specClass = 'show';
+				obj.type = type;
+			},
+			//规格弹窗开关
+			toggleSpec(str) {
+				if (this.specClass === 'show') {
+					this.specClass = 'hide';
+					setTimeout(() => {
+						this.specClass = 'none';
+					}, 250);
+				} else if (this.specClass === 'none') {
+					this.specClass = 'show';
+				}
+				// 保存当前购买类型
+				this.type = str;
+			},
+			//领取优惠券
+			Getcoupon() {
+				uni.navigateTo({
+					url: '/pages/coupon/getcoupon'
+				});
+			},
+			//详情页
+			navToDetailPage(item) {
+				let id = item.id;
+				uni.navigateTo({
+					url: '/pages/product/product?id=' + id
+				});
+			},
+			// 跳转页面
+			navTo(url) {
+				uni.navigateTo({
+					url: '/pages/product/reply?id=' + this.goodsid
+				});
+			},
+			// 获取商品详情
+			goodsDetail() {
+				let obj = this;
+				// 获取普通商品信息
+
+				let data = {}
+				// 判断是否需要读取非默认商家id
+				if (obj.onShopId != -1) {
+					data.store_id = obj.onShopId;
+				} else {
+					data.store_id = obj.shopDetail.id;
+				}
+
+
+				goodsDetail(data, this.goodsid).then(function({
+					data
+				}) {
+					obj.list = data;
+					//保存猜你喜欢列表
+					obj.good_list = data.good_list;
+					//保存评论列表
+					obj.reply = data.reply;
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					//保存商家信息
+					obj.system_store = data.system_store;
+					if (obj.goodsObjact.description != null) {
+						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
+					} //小程序商品详情图超出屏幕问题
+					obj.imgList = goods.slider_image; //保存轮播图
+					obj.specList = data.productAttr; //保存分类列表
+					if (Array.isArray(data.productValue) != true) {
+						obj.many = 2; //多规格
+						obj.specList = data.productAttr; //保存产品属性
+						obj.productValue = data.productValue; //保存属性值
+						obj.specSelected = []; //初始化默认选择对象
+						for (let i = 0; i < obj.specList.length; i++) {
+							// 设置默认数据
+							let attrValue = obj.specList[i].attr_value[0];
+							attrValue.check = true;
+							obj.specSelected.push(attrValue.attr);
+						}
+						let str = obj.specSelected.join(',');
+						console.log(str, 'str');
+						let goodItemAction = obj.actionGoodsType
+						// 设置默认值
+						goodItemAction.actionPrice = obj.productValue[str].price;
+						goodItemAction.goodsNumberMax = obj.productValue[str].stock;
+						goodItemAction.actionImage = obj.productValue[str].image;
+						goodItemAction.uniqueId = obj.productValue[str].unique;
+						goodItemAction.goodsStore = obj.productValue[str].stock;
+						goodItemAction.day_deducted = obj.productValue[str].day_deducted; //每天扣款
+						goodItemAction.deal_price_num = Math.ceil((obj.productValue[str].deal_price - obj
+							.productValue[str].price) / obj.productValue[str].day_deducted); //每天扣款
+						// 扣款天数
+					} else {
+						obj.many = 1; //单规格
+						obj.productValue = data.productValue; //保存分类查询数据
+						goodItemAction.actionPrice = goods.price; //保存默认选中商品价格
+						goodItemAction.actionImage = goods.image_base; //保存默认选中商品图片
+						goodItemAction.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+
+					}
+					obj.shopId = data.mer_id; //保存商店id
+				});
+			},
+			// 立即购买
+			buy() {
+				let obj = this;
+				if (obj.userInfo.is_real == 0) {
+					uni.showModal({
+						title: '提示',
+						content: '请先实名认证才可购买',
+						showCancel: false,
+						success: res => {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/user/realName/realNameAuthentication'
+								})
+							}
+						},
+					});
+					return
+				}
+
+
+				// 创建传值对象
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.actionGoodsType.uniqueId,
+					is_car: obj.goodsObjact.is_car, //是否电动车
+					day_deducted: obj.actionGoodsType.day_deducted,
+					day: obj.actionGoodsType.deal_price_num,
+				};
+				// 判断是否需要读取非默认商家id
+				if (obj.onShopId != -1) {
+					data.store_id = obj.onShopId;
+				} else {
+					data.store_id = obj.shopDetail.id;
+				}
+				// 判断是否加入购物车
+				if (obj.type == 2) {
+					data.new = 0;
+				} else {
+					data.new = 1;
+				}
+				cartAdd(data)
+					.then(function(e) {
+						let da = e.data;
+						// 不是购物车跳转支付页面
+						if (obj.type == 1) {
+							// 跳转到支付页
+							let url = '/pages/order/createOrder?id=' + da.cartId
+							// 判断是否指定商店购买商品
+							if (obj.onShopId != -1) {
+								url += '&shopId=' + obj.onShopId
+							}
+							uni.navigateTo({
+								url: url
+							});
+						}
+						// 购物车不跳转购物车页面
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+							// obj.goodsDetail();
+						}
+						obj.toggleSpec();
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 阻止触发上级事件
+			stopPrevent() {}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.alertImgBox {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		.alertImg {
+			width: 730rpx;
+		}
+	}
+
+	/*  弹出层 */
+	.popup {
+		position: fixed;
+		left: 0;
+		top: 0;
+		right: 0;
+		bottom: 0;
+		z-index: 99;
+
+		&.show {
+			display: block;
+
+			.mask {
+				animation: showPopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: showLayer 0.2s linear both;
+			}
+		}
+
+		&.hide {
+			.mask {
+				animation: hidePopup 0.2s linear both;
+			}
+
+			.layer {
+				animation: hideLayer 0.2s linear both;
+			}
+		}
+
+		&.none {
+			display: none;
+		}
+
+		.mask {
+			position: fixed;
+			top: 0;
+			width: 100%;
+			height: 100%;
+			z-index: 1;
+			background-color: rgba(0, 0, 0, 0.4);
+		}
+
+		.layer {
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			width: 100%;
+			min-height: 35vh;
+			border-radius: 10rpx 10rpx 0 0;
+			background-color: #fff;
+
+			.btn {
+				height: 66rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				background: $color-yellow;
+				font-size: $font-base + 2rpx;
+				color: #714D01;
+				margin: 30rpx auto 20rpx;
+			}
+		}
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
+		}
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
+		}
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
+		}
+	}
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 50rpx;
+		position: relative;
+
+		.close {
+			width: 36rpx;
+			height: 36rpx;
+			position: absolute;
+			top: 50rpx;
+			right: 50rpx;
+		}
+
+		.a-t {
+			display: flex;
+
+			image {
+				border: 1px solid $page-color-light;
+				width: 170rpx;
+				height: 170rpx;
+				flex-shrink: 0;
+				border-radius: 8rpx;
+			}
+
+			.right {
+				display: flex;
+				flex-direction: column;
+				padding-left: 24rpx;
+				font-size: $font-sm + 2rpx;
+				color: $font-color-base;
+				line-height: 42rpx;
+				width: 75%;
+
+				.price {
+					font-size: 44rpx;
+					color: $uni-color-primary;
+					margin: 10rpx 0rpx;
+					flex-grow: 1;
+					width: 100%;
+				}
+
+				.name {
+					font-size: 32rpx;
+					color: $font-color-dark;
+					height: 50rpx;
+					overflow: hidden;
+					text-overflow: ellipsis;
+					white-space: nowrap;
+					display: block;
+				}
+
+				.selected-text {
+					margin-right: 10rpx;
+				}
+			}
+		}
+
+		.attr-list {
+			display: flex;
+			flex-direction: column;
+			font-size: $font-base + 2rpx;
+			color: $font-color-base;
+			padding-top: 30rpx;
+		}
+
+		.item-list {
+			padding: 20rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+			justify-content: flex-start;
+
+			.tit {
+				min-width: 200rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				background: #eee;
+				margin-bottom: 20rpx;
+				margin-right: 16rpx;
+				border-radius: 5rpx;
+				height: 60rpx;
+				padding: 0 20rpx;
+				font-size: $font-base;
+				color: $font-color-dark;
+			}
+
+			.selected {
+				background: #E1F4EA;
+				color: $color-green;
+				border: 1px solid $color-green;
+			}
+		}
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	page {
+		background: #f0f0f0;
+	}
+
+	//秒杀、拼团底部高度
+	.contentBottomHeight {
+		height: 110rpx;
+	}
+
+	//默认商品底部高度
+	.goodsBottom {
+		height: 160rpx;
+	}
+
+	/deep/ .iconenter {
+		font-size: $font-base + 2rpx;
+		color: #888;
+	}
+
+	/deep/ .con_image {
+		width: 130rpx;
+		height: 130rpx;
+		display: inline-block;
+		padding: 15rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	/* 商品详情中限制图片大小 */
+	/deep/ .rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+</style>

+ 278 - 0
pages/product/reply.vue

@@ -0,0 +1,278 @@
+<template>
+	<view class="container">
+		<view class="reply_btn flex_item">
+			<view class="btn" v-for="(item, index) in navList" :key="index" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">
+				{{ item.text }}({{ item.number }})
+			</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" :style="{ height: maxheight + 'px' }" 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="loadDate">
+					<!-- 评论列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="eva-box">
+						<view class="row-1 flex1">
+							<image class="portrait" :src="item.avatar" mode="aspectFill"></image>
+							<view class="right flex1">
+								<view>
+									<view class="name flex1">
+										<view>{{ item.nickname }}</view>
+										<!-- <image src="../../static/label/vip.png"></image> -->
+									</view>
+									<uniRate class="rate" disabled size="10" margin="1" :value="item.product_score" ></uniRate>
+								</view>
+								<view class="bot">
+									<text class="attr"></text>
+									<text class="time">{{ item.add_time }}</text>
+								</view>
+							</view>
+						</view>
+						<view class="con">{{ item.comment }}</view>
+						<view class="con_box">
+							<view class="con_image" v-for="ls in item.pics"><image :src="ls"></image></view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import { reply_config, reply_list } from '@/api/product.js';
+import uniRate from '@/components/uni-rate/uni-rate.vue';
+export default {
+	components: {
+		uniRate
+	},
+	watch: {},
+	data() {
+		return {
+			maxheight: '',
+			id: '', //商品id
+			list: '', //评论列表
+			reply: '', //评论配置
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					number: '',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 5 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '好评',
+					loadingType: 'more',
+					number: '',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 5 //每次信息条数
+				},
+				{
+					state: 3,
+					text: '差评',
+					loadingType: 'more',
+					number: '',
+					orderList: [],
+					page: 1, //当前页数
+					limit:5 //每次信息条数
+				},
+				{
+					state: 2,
+					text: '中评',
+					loadingType: 'more',
+					number: '',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 5 //每次信息条数
+				}
+			]
+		};
+	},
+	computed: {},
+	onReady() {
+		// 初始化获取页面宽度
+		uni.createSelectorQuery()
+			.select('.container')
+			.fields(
+				{
+					size: true
+				},
+				data => {
+					// 保存头部高度
+					this.maxheight = data.height - Math.floor((data.width / 750) * 145);
+				}
+			)
+			.exec();
+	},
+	onLoad(option) {
+		this.id = option.id;
+	},
+	onShow() {
+		let obj = this;
+		reply_config({}, this.id).then(function({ data }) {
+			obj.reply = data;
+			obj.navList[0].number = obj.reply.sum_count;
+			obj.navList[1].number = obj.reply.good_count;
+			obj.navList[2].number = obj.reply.poor_count;
+			obj.navList[3].number = obj.reply.in_count;
+		});
+		this.loadDate();
+	},
+	methods: {
+		async loadDate(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			if (navItem.loadingType === 'noMore') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+			reply_list(
+				{
+					type: state,
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				this.id
+			)
+				.then(({ data }) => {
+					let arr = data;
+					navItem.orderList = navItem.orderList.concat(arr);
+					console.log(navItem.orderList,111)
+					navItem.page++;
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// async GetList(){
+		// 	let obj = this;
+		// 	reply_list({}, obj.id).then(function({ data }) {
+		// 		// console.log(data)
+		// 		obj.list = data;
+		// 	});
+		// },
+		//跳转接口
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadDate('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+	.container {
+		height: 100%;
+		padding: 25rpx 25rpx;
+		padding-top: 120rpx;
+		.swiper-box {
+			// height: 100%;
+			.list-scroll-content {
+				height: 100%;
+			}
+		}
+	}
+}
+.reply_btn {
+	padding: 15rpx 0rpx;
+	.btn {
+		padding: 10rpx 25rpx;
+		font-size: 24rpx;
+		background: #f4f4f4;
+		margin-right: 25rpx;
+	}
+	.current {
+		background-color: #e93323 !important;
+		color: #ffffff !important;
+	}
+}
+.eva-box {
+	padding: 20rpx 0;
+	// height: 100%;
+	.row-1{
+		.portrait {
+			flex-shrink: 0;
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 100px;
+		}
+		.right {
+			flex: 1;
+			font-size: $font-base;
+			color: $font-color-base;
+			padding-left: 26rpx;
+			.name{
+				margin-bottom: 20rpx;
+				image{
+					width: 35rpx;
+					height: 25rpx;
+				}
+			}
+			.bot {
+				display: flex;
+				justify-content: space-between;
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+	}
+	.con {
+		font-size:24rpx;
+		font-weight:500;
+		color:rgba(84,84,86,1);
+		padding: 20rpx 0 35rpx 0;
+		letter-spacing: 3rpx;
+	}
+	.con_image {
+		width: 150rpx;
+		height: 150rpx;
+		display: inline-block;
+		margin-right: 20rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+
+
+</style>

+ 449 - 0
pages/product/search.vue

@@ -0,0 +1,449 @@
+<template>
+	<view class="content">
+		<!-- 兼容小程序搜索 -->
+		<!-- #ifdef MP || APP-PLUS -->
+		<view class="vheight"></view>
+		<view class="input-box flex">
+			<view class=" input-content flex">
+				<view class="iconfont iconsearch"></view>
+				<view class="input"><input type="text" v-model="keyword" placeholder="请输入搜索内容" /></view>
+			</view>
+			<view class="input-button flex" @click="navTo"><text>搜索</text></view>
+		</view>
+		<!-- #endif -->
+		<swiper :current="tabCurrentIndex" class="swiper-box " duration="300">
+			<swiper-item class="search-hot">
+				<view class="title"><text>热门搜索</text></view>
+				<view class="hot-list">
+					<view @click="clickHotText(ls)" class="list-item" :key="ind" v-for="(ls, ind) in list">
+						<text>{{ ls }}</text>
+					</view>
+				</view>
+			</swiper-item>
+			<swiper-item class="search-hot position-relative">
+				<view class="navbar">
+					<view class="nav-item" @click="defaultSearch()">默认</view>
+					<view class="nav-item" :class="{ current: searchType === 1 }" @click="sortTab(1)">
+						<text>销量优先</text>
+						<view class="p-box">
+							<text :class="{ active: searchType === 1 && numberOrder === 1 }" class="iconfont iconfold"></text>
+							<text :class="{ active: searchType === 1 && numberOrder === 2 }" class="iconfont iconfold xia"></text>
+						</view>
+					</view>
+					<view class="nav-item" :class="{ current: searchType === 2 }" @click="sortTab(2)">
+						<text>价格</text>
+						<view class="p-box">
+							<text :class="{ active: searchType === 2 && priceOrder === 1 }" class="iconfont iconfold"></text>
+							<text :class="{ active: searchType === 2 && priceOrder === 2 }" class="iconfont iconfold xia"></text>
+						</view>
+					</view>
+					<view class="nav-item" :class="{ current: newOrder == 1 }" @click="newGoodsTab()">新品</view>
+				</view>
+				<scroll-view scroll-y class="cate-list" @scrolltolower='getProducts'>
+					<view class="guess-section">
+						<view v-for="(item, index) in goodsList" :key="index" class="guess-item" @click="navToDetailPage(item)">
+							<view class="image-wrapper"><image :src="item.image" mode="aspectFill"></image></view>
+							<text class="title clamp margin-c-20">{{ item.store_name }}</text>
+							<view class="cmy-hr"></view>
+							<view class="price margin-c-20 flex">
+								<view>
+									<text class="font-size-sm ">¥</text>
+									{{ item.price }}
+								</view>
+								<view class="font-size-sm">
+									<text class="font-color-gray">{{ item.sales }}人购买</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import { searchKeyword, getProducts } from '@/api/product.js';
+export default {
+	data() {
+		return {
+			arrlist: [], //热门关键词
+			keyword: '', //关键字
+			list: [], //搜索内容
+			tabCurrentIndex: 0, //切换
+			goodsList: [],
+			limit: 6, //每次加载数据条数
+			page: 1, //当前页数
+			loadingType: 'more', //加载更多状态
+			numberOrder: 1, //1 销量从低到高 2销量从高到低
+			priceOrder: 1, //1 价格从低到高 2价格从高到低
+			newOrder: 0, //0 不是新品 1是新品
+			searchType: 0 //0为默认查询 1为销量 2 为价格
+		};
+	},
+	// #ifndef MP
+	//点击导航栏 buttons 时触发
+	onNavigationBarButtonTap(e) {
+		const index = e.index;
+		if (index === 0) {
+			this.navTo();
+		}
+	},
+	// 点击键盘搜索事件
+	onNavigationBarSearchInputConfirmed(e) {
+		this.navTo();
+	},
+	// 搜索栏内容变化事件
+	onNavigationBarSearchInputChanged(e) {
+		this.keyword = e.text;
+	},
+	// #endif
+	onLoad() {
+		this.loadData();
+	},
+	//下拉刷新
+		onPullDownRefresh() {
+			this.page = 1
+			this.getProducts('refresh');
+		},
+	methods: {
+		// 加载商品
+		async getProducts(type, loading) {
+			let obj = this;
+			// 判断是否为加载数据
+			if (type !== 'refresh') {
+				//没有更多数据直接跳出方法
+				if (obj.loadingType === 'nomore') {
+					return;
+				} else {
+					// 设置当前为数据载入中
+					obj.loadingType = 'loading';
+				}
+			} else {
+				//当重新加载数据时更新状态为可继续添加数据
+				obj.loadingType = 'more';
+			}
+			let data = {
+				page: obj.page,
+				limit: obj.limit,
+				news: obj.newOrder,
+				keyword: this.keyword
+			};
+			// 判断是否为销售数量排序
+			if (this.searchType === 1) {
+				data.salesOrder = obj.numberOrder === 1 ? 'asc' : 'desc';
+			}
+			// 判断是否为金额排序
+			if (this.searchType === 2) {
+				data.priceOrder = obj.priceOrder === 1 ? 'asc' : 'desc';
+			}
+			getProducts(data).then(e => {
+				if (type === 'refresh') {
+					obj.goodsList = [];
+				}
+				obj.goodsList = obj.goodsList.concat(e.data);
+				//判断是否还有下一页,有是more  没有是nomore
+				if (obj.limit == e.data.length) {
+					obj.page++;
+					obj.loadingType = 'more';
+				} else {
+					obj.loadingType = 'nomore';
+				}
+				// 判断是否为刷新数据
+				if (type === 'refresh') {
+					// 判断是否为点击搜索按钮跳转加载
+					if (loading == 1) {
+						uni.hideLoading();
+					} else {
+						uni.stopPullDownRefresh();
+					}
+				}
+			});
+		},
+		// 点击关键词触发事件
+		clickHotText(e) {
+			this.keyword = e;
+			this.navTo();
+		},
+		// 加载搜索关键字
+		async loadData() {
+			searchKeyword({})
+				.then(e => {
+					this.list = e.data;
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 点击触发搜索事件
+		navTo() {
+			this.tabCurrentIndex = 1;
+			this.infoData()
+		},
+		// 默认搜索
+		defaultSearch() {
+			// 初始化查询
+			this.numberOrder = '';
+			this.priceOrder = '';
+			this.newOrder = 0;
+			this.searchType = 0;
+			this.infoData();
+		},
+		// 是否为新品
+		newGoodsTab() {
+			this.newOrder = this.newOrder === 1 ? 0 : 1;
+			this.infoData();
+		},
+		// 排序
+		sortTab(nub) {
+			this.searchType = nub;
+			if (this.searchType === 1) {
+				this.numberOrder = this.numberOrder === 1 ? 2 : 1;
+			}
+			if (this.searchType === 2) {
+				this.priceOrder = this.priceOrder === 1 ? 2 : 1;
+			}
+			this.infoData();
+		},
+		// 查询切换后初始化
+		infoData() {
+			// 初始化页数
+			this.page = 1;
+			// 初始化数组
+			uni.pageScrollTo({
+				duration: 300,
+				scrollTop: 0
+			});
+			// 加载数据
+			this.getProducts('refresh', 1);
+			uni.showLoading({
+				title: '正在加载',
+				mask:true
+			});
+		},
+		navToDetailPage(item) {
+			//测试数据没有写id,用title代替
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: 100%;
+	background-color: $page-color-base;
+}
+/* #ifdef MP || APP-PLUS */
+.vheight{
+	height: var(--status-bar-height);
+	background-color: #FFFFFF;
+}
+.input-box {
+	padding: 25rpx;
+	background-color: #ffffff;
+	height: 44px;
+	.iconsearch {
+		font-size: 50rpx;
+	}
+	.input-content {
+		border-radius: 99rpx;
+		flex-grow: 1;
+		padding: 10rpx 30rpx;
+		background-color: rgba(231, 231, 231, 0.7);
+		.input {
+			flex-grow: 1;
+			input {
+				font-size: $font-lg;
+			}
+		}
+	}
+	.input-button {
+		padding-left: 20rpx;
+		font-size: $font-lg;
+		height: 100%;
+	}
+}
+/* #endif */
+
+.swiper-box {
+	/* #ifndef MP */
+	height: 100%;
+	/* #endif */
+	/* #ifdef MP */
+	height: calc(100% - 44px);
+	/* #endif */
+	.search-hot {
+		padding: 25rpx;
+		.title {
+			font-size: $font-lg;
+			color: $font-color-light;
+		}
+		.hot-list {
+			display: flex;
+			flex-wrap: wrap;
+			margin-top: 30rpx;
+			.list-item {
+				padding: 10rpx 20rpx;
+				border: 1px solid $border-color-dark;
+				color: $font-color-dark;
+				font-size: $font-base;
+				margin-right: 20rpx;
+				margin-bottom: 20rpx;
+			}
+		}
+	}
+}
+
+// 订单
+%icon {
+	margin-right: 10rpx;
+	display: inline-block;
+	padding: 2rpx 10rpx;
+	border: 1rpx solid $color-yellow;
+	color: $color-yellow;
+	line-height: 1;
+	font-size: $font-base;
+	border-radius: 10rpx;
+}
+.guess-section {
+	display: flex;
+	flex-wrap: wrap;
+	.guess-item {
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+		width: 48%;
+		margin-bottom: 4%;
+		border-radius: $border-radius-sm;
+		background-color: white;
+		box-shadow: $box-shadow;
+		&:nth-child(2n + 1) {
+			margin-right: 4%;
+		}
+	}
+	.image-wrapper {
+		width: 100%;
+		height: 330rpx;
+		border-radius: 3px;
+		overflow: hidden;
+		image {
+			width: 100%;
+			height: 100%;
+			opacity: 1;
+		}
+	}
+	.title {
+		font-size: $font-base;
+		color: $font-color-dark;
+		font-weight: bold;
+		line-height: 80rpx;
+	}
+	.price {
+		font-size: $font-lg;
+		color: $font-color-base;
+		font-weight: bold;
+		line-height: 1;
+		line-height: 80rpx;
+	}
+
+	.icon {
+		@extend %icon;
+	}
+
+	.detail {
+		line-height: 1;
+	}
+	.tip {
+		color: white;
+		background-color: $color-yellow;
+		line-height: 1.5;
+		font-size: $font-sm;
+		padding-left: 20rpx;
+	}
+}
+
+.navbar {
+	position: absolute;
+	top: 0;
+	left: 0;
+	display: flex;
+	width: 100%;
+	height: 40px;
+	background: #fff;
+	box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 30rpx;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 120rpx;
+				height: 0;
+				border-bottom: 4rpx solid $base-color;
+			}
+		}
+	}
+	.p-box {
+		display: flex;
+		flex-direction: column;
+		.iconfont {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 30rpx;
+			height: 14rpx;
+			line-height: 1;
+			margin-left: 4rpx;
+			font-size: 26rpx;
+			color: #888;
+			&.active {
+				color: $base-color;
+			}
+		}
+		.xia {
+			transform: scaleY(-1);
+		}
+	}
+	.cate-item {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		width: 80rpx;
+		position: relative;
+		font-size: 44rpx;
+		&:after {
+			content: '';
+			position: absolute;
+			left: 0;
+			top: 50%;
+			transform: translateY(-50%);
+			border-left: 1px solid #ddd;
+			width: 0;
+			height: 36rpx;
+		}
+	}
+}
+.cate-list {
+	height: 100%;
+	padding-top: 40px;
+}
+</style>

+ 252 - 0
pages/product/showImg.vue

@@ -0,0 +1,252 @@
+<template>
+  <view @click="back" @longpress="isPop = true">
+    <swiper class="swiper-img" :current="currentImg" :duration="300" @change="changeSwiper">
+      <swiper-item class="swiper-item" v-for="(item, index) in imgs" :key="index">
+        <view class="img-page">
+          <movable-area scale-area>
+            <movable-view @change.stop='isPop = false'  @scale.stop='isPop = false' direction="all" scale="true" scale-min="1" scale-max="4">
+              <image :src="item" mode="widthFix" :lazy-load="true" />
+            </movable-view>
+          </movable-area>
+        </view>
+      </swiper-item>
+    </swiper>
+    <view class="item-bottom">
+      <view class="small-list-page">
+        <view class="small-list" v-if="imgs.length > 1">
+          <view class="img-page" :class="currentImg == index ? 'img-page-checked' : ''" v-for="(item, index) in imgs"
+            :key="index" @click.stop="toImg(index)">
+            <image class="img" border-radius="10rpx" :src="item" mode="aspectFill" />
+          </view>
+        </view>
+      </view>
+    </view>
+    <view class="pop" v-if="isPop">
+      <!-- <view class="item" @click.stop="share()">分享图片</view> -->
+      <!-- #ifndef H5 -->
+      <view class="item" @click.stop="saveImg(false)">保存图片</view>
+      <view class="item" v-if='imgs.length>1' @click.stop="saveImg(true)">保存全部图片</view>
+      <!-- #endif -->
+    </view>
+  </view>
+</template>
+
+<script>
+  export default {
+    data() {
+      return {
+        imgs: [],
+        currentImg: 0,
+        isPop: false
+      };
+    },
+    onLoad(options) {
+      let {
+        imgs,
+        current
+      } = options;
+      this.imgs = JSON.parse(imgs);
+      this.currentImg = current;
+    },
+    methods: {
+      changeSwiper(e) {
+        this.currentImg = e.detail.current;
+      },
+      toImg(index) {
+        this.currentImg = index;
+      },
+      back() {
+        if (this.isPop) {
+          this.isPop = false
+          return
+        }
+        try {
+          this.$Router.back(1);
+        } catch (e) {
+          //TODO handle the exception
+          uni.navigateBack();
+        }
+      },
+      share() {
+        uni.downloadFile({
+          // 下面一行时拼接预览PDF的地址!!!
+          url: this.imgs[this.currentImg],
+          success: function(res) {
+            var filePath = res.tempFilePath;
+            if (!filePath) return
+            uni.openDocument({
+              filePath: filePath,
+              success: function(res) {
+                console.log(res);
+                console.log('打开文档成功');
+              }
+            });
+          }
+        });
+      },
+      saveImg(isAll = false) {
+        const that = this;
+        if (!isAll) {
+          uni.downloadFile({
+            url: this.imgs[this.currentImg],
+            success: res => {
+              if (res.statusCode === 200) {
+                uni.saveImageToPhotosAlbum({
+                  filePath: res.tempFilePath,
+                  success: function() {
+                    uni.showToast({
+                      icon: "none",
+                      title: "保存成功"
+                    })
+                    that.isPop =false
+                  },
+                  fail: function() {}
+                });
+              } else {}
+            }
+          });
+          return;
+        }
+        this.imgs.forEach(item => {
+          uni.downloadFile({
+            url: item,
+            success: res => {
+              if (res.statusCode === 200) {
+                uni.saveImageToPhotosAlbum({
+                  filePath: res.tempFilePath,
+                  success: function() {
+                    uni.showToast({
+                      icon: "none",
+                      title: "保存全部成功"
+                    })
+                    that.isPop =false
+                  },
+                  fail: function() {}
+                });
+              } else {}
+            }
+          });
+        })
+
+      }
+    },
+  };
+</script>
+
+<style lang="scss" scoped>
+  movable-view {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 100%;
+    height: 100%;
+  }
+
+  movable-area {
+    height: 100%;
+    width: 100%;
+    position: fixed;
+    overflow: hidden;
+  }
+
+  movable-view image {
+    width: 100%;
+  }
+
+  uni-image>img {
+    z-index: -1 !important;
+  }
+
+  .content {
+    height: 60vh;
+  }
+
+  .swiper-img {
+    width: 100vw;
+    height: 100vh;
+    background-color: #000000;
+    &>.swiper-item {
+      width: 100vw;
+      height: 100vh;
+
+      .img-page {
+        height: 100vh;
+        display: flex;
+        align-items: center;
+      }
+    }
+  }
+
+  .item-bottom {
+    width: 100vw;
+    position: fixed;
+    z-index: 9999;
+    bottom: 0;
+    left: 0rpx;
+    padding: 30rpx;
+    transition: ease-in-out 0.3s;
+    height: 200rpx;
+    display: flex;
+    justify-content: space-between;
+    flex-direction: column;
+  }
+
+  .small-list-page {
+    min-height: 60rpx;
+  }
+
+  .small-list {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+
+    .img-page {
+      display: inline-block;
+      margin-right: 20rpx;
+      border: 2rpx solid #c2c2c2;
+      transition: ease-in 0.1s;
+      border-radius: 11rpx;
+      background: #c2c2c2;
+      overflow: hidden;
+
+      &:last-child {
+        margin-right: 0;
+      }
+
+      .img {
+        width: 46rpx;
+        height: 46rpx;
+        display: block;
+      }
+    }
+
+    .img-page-checked {
+      transform: scale(1.2);
+      border: 4rpx solid #c2c2c2;
+    }
+  }
+
+  .pop {
+    width: 500rpx;
+    background-color: #FFFFFF;
+    border-radius: 20rpx;
+    overflow: hidden;
+    position: fixed;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    z-index: 999999;
+
+    .item {
+      line-height: 100rpx;
+      height: 100rpx;
+      padding: 0 50rpx;
+      transition: all .2s;
+      border-radius: 20rpx;
+
+      &:active {
+        background-color: #eeeeee;
+      }
+    }
+  }
+</style>

+ 55 - 0
pages/public/agreement.vue

@@ -0,0 +1,55 @@
+<template>
+	<view class="buttomText flex" @click="checkedChange">
+		<image v-if='checked' class="buttomIcon" src="../../static/icon/addressIconXz.png" mode="scaleToFill">
+		</image>
+		<view class="buttomNo" v-else>
+
+		</view>
+		<text class="margin-l-10">勾选代表同意</text>
+		<navigator url="./userAgreement">
+			<text class="font-color-greed">绿津服务</text>
+		</navigator>
+		<text>与</text>
+		<navigator url="./privacyAgreement">
+			<text class="font-color-greed">隐私条例</text>
+		</navigator>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 是否选中
+				checked: false,
+			};
+		},
+		methods: {
+
+			checkedChange() {
+				this.checked = !this.checked;
+				this.$emit('checkedChange', this.checked)
+			}
+		},
+	};
+</script>
+
+<style lang="scss">
+	.buttomText {
+		margin-top: 30rpx;
+		justify-content: center;
+		font-size: 22rpx;
+		color: $font-color-light;
+
+		.buttomIcon,
+		.buttomNo {
+			width: 24rpx;
+			height: 24rpx;
+		}
+
+		.buttomNo {
+			border: 1px solid $font-color-light;
+			border-radius: 100rpx;
+		}
+	}
+</style>

+ 160 - 0
pages/public/domApp.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="box">
+		<view class="logo flex-line ">
+			<image class="logoImg" src="../../static/img/domLogo.png" mode="aspectFit"></image>
+			<view class="text">
+				<view class="name">
+					绿津
+				</view>
+				<view class="content margin-t-20">
+					绿津智能电动车
+				</view>
+			</view>
+			<view class="tipBox">
+
+				<view class="rightO">
+
+				</view>
+				<view class="leftX">
+					×
+				</view>
+			</view>
+		</view>
+		<image class="img" src="../../static/img/bg.png" mode="widthFix"></image>
+		<view class="bottom flex-line">
+			<view class="buttom" @click="load">
+				立即下载
+			</view>
+			<view class="tip margin-t-20">
+				平价惠万民,智能行百里
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getAppBBH
+	} from "@/api/index.js";
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		onLoad() {
+		
+		},
+		methods: {
+			load(){
+				const bo = uni.getStorageSync('weichatBrowser')||false;
+				if(bo){
+					uni.showModal({
+						title: '错误',
+						content: '无法在微信浏览器中下载请使用手机自带浏览器',
+						showCancel: false,
+					});
+					return 
+				}
+				uni.showLoading({
+					title: '开始下载',
+					mask: true
+				});
+				getAppBBH().then((res)=>{
+					uni.hideLoading()
+					let r = res.data;
+					console.log(r);
+					// 打开下载文件
+					window.open(r.file_url.app_file)
+				}).catch(()=>{
+					uni.hideLoading()
+				})
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.box {
+		line-height: 0;
+		height: 100vh;
+	}
+
+	.logo {
+		margin: 0 auto;
+		width: 700rpx;
+		height: calc(100vh - 535rpx);
+
+		.logoImg {
+			width: 100%;
+		}
+
+		.tipBox {
+			width: 700rpx;
+			position: relative;
+
+			.rightO {
+				border: 1px solid #04aa6a;
+				opacity: 0.8;
+				width: 40rpx;
+				height: 40rpx;
+				border-radius: 100rpx;
+				position: absolute;
+				right: 0;
+				top: -100rpx;
+			}
+
+			.leftX {
+				color: #04aa6a;
+				opacity: 0.8;
+				position: absolute;
+				left: 10rpx;
+				top: 80rpx;
+			}
+		}
+	}
+
+	.img {
+		width: 750rpx;
+		height: 160rpx;
+	}
+
+	.bottom {
+		width: 750rpx;
+		height: 375rpx;
+		background-color: #04aa6a;
+		line-height: 1;
+
+		.buttom {
+			font-weight: bold;
+			background-color: #FFFFFF;
+			text-align: center;
+			color: #04aa6a;
+			padding: 20rpx;
+			border-radius: 20rpx;
+			width: 450rpx;
+			margin: 0 auto;
+		}
+
+		.tip {
+			color: #FFFFFF;
+			font-size: 24rpx;
+		}
+	}
+
+	.text {
+		line-height: 1;
+		color: #04aa6a;
+		text-align: center;
+
+		.name {
+			font-size: 38rpx;
+			font-weight: bold;
+		}
+
+		.content {
+			font-size: 28rpx;
+			opacity: 0.5;
+		}
+	}
+</style>

+ 321 - 0
pages/public/forget.vue

@@ -0,0 +1,321 @@
+<template>
+	<view class="container">
+		<view class="loginTitle"><text>修改密码</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img">
+					+86
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					新密码
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus
+						placeholder="请重复输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					验证码
+				</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><button type="green" @click="register" class="uni-button uni-button-green">修改密码</button></view>
+			<view>
+				<navigator url="login">
+					<button class="uni-button uni-button-green-plain" type="green" plain="true"
+						hover-class="none">返回登录</button>
+				</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		verify
+	} from '@/api/login.js';
+	import {
+		registerReset
+	} from '@/api/set.js';
+	export default {
+		data() {
+			return {
+				phone: '', //用户
+				password: '', //密码
+				code: '', //验证码
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+			};
+		},
+		onLoad() {
+			// 获取扫码邀请人id
+			this.invitation = uni.getStorageSync('spread') || '';
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		methods: {
+			// 注册
+			register() {
+				let obj = this;
+				if (obj.phone == '') {
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
+					return;
+				}
+				if (this.phone.length != 11) {
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
+					return;
+				}
+				if (obj.password == '') {
+					uni.showToast({
+						title: "请输入密码",
+						icon:'none'
+					});
+					return;
+				}
+				registerReset({
+					account: obj.phone, //账号
+					captcha: obj.code, //验证码
+					password: obj.password, //密码
+				}).then(function(e) {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					setTimeout(function() {
+						uni.navigateTo({
+							url: '/pages/public/login'
+						});
+					}, 1000)
+
+				});
+				//调用注册接口,成功跳转登录页
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
+					return;
+				}
+				if (this.phone.length < 11) {
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: ''
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			login() {
+				//返回登录
+				uni.navigateTo({
+					url: '/pages/public/login'
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.container {
+		width: 100%;
+		height: 100%;
+		background-size: 100%;
+		background-color: #FFFFFF;
+	}
+
+	.container_text {
+		width: 100%;
+		height: 500rpx;
+		top: 0rpx;
+
+		.banner-img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.login_text {
+		margin: auto 50rpx;
+		position: relative;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 30rpx;
+			padding: 30rpx 0;
+			line-height: 1;
+			.login_img {
+				height: 35rpx;
+				width: 150rpx;
+				flex-shrink: 0;
+				font-size: 30rpx;
+				text-align: center;
+				margin-right: 20rpx;
+				color: $font-base;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 100%;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+				flex-grow: 1;
+
+				.code {
+					color: #5dbc7c;
+					font-size: 23rpx;
+					border-left: 1px solid #eeeeee;
+					width: 150rpx;
+					flex-shrink: 0;
+					text-align: center;
+				}
+			}
+		}
+
+		.other {
+			margin-top: 60rpx;
+
+			.fenge {
+				width: 30%;
+				height: 2rpx;
+				background-color: #eeeeee;
+			}
+
+			.qita {
+				font-size: 28rpx;
+				color: #999999;
+			}
+		}
+
+		.weixin {
+			width: 75rpx;
+			height: 75rpx;
+			margin: 25rpx auto;
+		}
+
+		.weixin image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.weixin_text {
+			text-align: center;
+			font-size: 28rpx;
+			color: #999999;
+		}
+
+		.forget {
+			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
+			color: #999999;
+		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba(166, 203, 184, 0.75);
+		}
+
+		.uni-button-green-plain {
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: $font-base;
+			background-color: $page-color-base;
+			border: none;
+		}
+
+		.uni-button {
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 28rpx;
+			width: 100%;
+		}
+	}
+
+	.loginTitle {
+		padding: 150rpx 0;
+		width: 100%;
+		text-align: left;
+		color: $font-base;
+		font-size: 48rpx;
+		margin: 0 50rpx;
+
+	}
+
+	.forget {
+		width: 100rpx;
+		font-size: 24rpx;
+		color: #ffffff;
+		margin: 0px auto;
+		border-bottom: 1px solid #ffffff;
+	}
+
+	.width {
+		width: 325rpx !important;
+	}
+
+	.code {
+		color: #5dbc7c;
+		font-size: 23rpx;
+		border-left: 1px solid #eeeeee;
+		width: 150rpx;
+		flex-shrink: 0;
+		text-align: center;
+	}
+
+	uni-button {
+		height: 80rpx !important;
+		line-height: 80rpx !important;
+	}
+</style>

+ 338 - 0
pages/public/login.vue

@@ -0,0 +1,338 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<view>
+				<image class="banner-img" src="../../static/image/logo.png" mode="scaleToFill"></image>
+			</view>
+			<view class="logName">
+				绿津智能电动车
+			</view>
+		</view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img">
+					+86
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="username" focus placeholder="请输入手机号" />
+				</view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					密码
+				</view>
+				<view class="login_name">
+					<input class="uni-input" type="password" v-model="passward" focus placeholder="请输入密码" />
+				</view>
+			</view>
+			<view><button type="green" class="uni-button uni-button-green" @click="toLogin">立即登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green-plain" plain="true" hover-class="none"
+					@click="$refs.popup.open()">更多</button></view>
+
+		</view>
+		<!-- #ifdef APP-PLUS -->
+		<loginMethods @onLogin='loginGl'></loginMethods>
+		<!-- #endif -->
+		<agreement @checkedChange='changeChecked'></agreement>
+		<uni-popup ref="popup" type="bottom">
+			<view class="buttomBox">
+				<navigator url="/pages/public/phoneLogin">
+					<view class="item borde-b">
+						手机登录
+					</view>
+				</navigator>
+				<navigator url="/pages/public/forget">
+					<view class="item borde-b">
+						忘记密码
+					</view>
+				</navigator>
+				<navigator url="/pages/public/register">
+					<view class="item">
+						注册
+					</view>
+				</navigator>
+			</view>
+			<view class="buttomBox" @click="close">
+				<view class="item qx">
+					取消
+				</view>
+			</view>
+		</uni-popup>
+
+	</view>
+</template>
+
+<script>
+	import loginMethods from "./loginMethods.vue"
+	import agreement from "./agreement.vue"
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		login
+	} from '@/api/login.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				checked: false, //是否同意条款
+				username: '',
+				passward: '',
+			};
+		},
+		onLoad() {
+			let obj = this;
+		},
+		components: {
+			loginMethods,
+			agreement
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login','logout']),
+			// 监听隐私条例
+			changeChecked(check) {
+				this.checked = check;
+			},
+			loginGl(userinfo){
+				if(!this.checked){
+					this.logout();
+					uni.showModal({
+						title: '提示',
+						content: '请先阅读同意《绿津服务》《隐私条例》',
+						showCancel: false,
+					});
+					return;
+				}
+				let ur = uni.getStorageSync('present') || '/pages/index/index';
+				// 用于处理缓存bug
+				if (ur == 'pages/product/product') {
+					ur = '/pages/index/index'
+				}
+				
+				if (!userinfo.phone) {
+					uni.showModal({
+						title: '提示',
+						content: '请先绑定手机号',
+						showCancel: false,
+						success: res => {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/set/phone',
+								});
+							}
+						},
+					});
+				} else {
+					uni.switchTab({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: ur,
+								fail(e) {
+									uni.navigateTo({
+										url: '/pages/index/index',
+									});
+								}
+							});
+						}
+					});
+				}
+			},
+			//登录
+			async toLogin() {
+				let obj = this;
+				
+				if (obj.username == '') {
+					uni.showToast({
+						title: "请输入手机号",
+						icon:'none'
+					});
+					return;
+				}
+				if (obj.passward == '') {
+					uni.showToast({
+						title: "请输入密码",
+						icon:'none'
+					});
+					return;
+				}
+				if(!this.checked){
+					uni.showModal({
+						title: '提示',
+						content: '请先阅读同意《绿津服务》《隐私条例》',
+						showCancel: false,
+					});
+					return;
+				}
+				obj.logining = true;
+				login({
+						account: obj.username,
+						password: obj.passward
+					})
+					.then(function(e) {
+						uni.setStorageSync('token', e.data.token);
+						obj.$store.commit('hasLogin', true);
+						getUserInfo({}).then(e => {
+							obj.login();
+							// 保存返回用户数据
+							obj.setUserInfo(e.data);
+							let ur = uni.getStorageSync('present') || '/pages/index/index';
+							//成功跳转首页
+							uni.reLaunch({
+								url: ur,
+								fail(e) {
+									uni.switchTab({
+										url: '/pages/index/index',
+									});
+								}
+							})
+						});
+					})
+					.catch(function(e) {
+						console.log(e);
+					});
+			},
+			//跳转注册页
+			register() {
+				uni.navigateTo({
+					url: `/pages/public/register`
+				});
+			},
+			// 后退
+			navBack() {
+				uni.navigateBack();
+			},
+			// 关闭更多弹窗
+			close() {
+				this.$refs.popup.close();
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #FFFFFF;
+		padding-top: 44px;
+	}
+
+	.container {
+		width: 100%;
+		height: 100%;
+		background-size: 100%;
+		padding-top: 50rpx;
+	}
+
+	.container_text {
+		text-align: center;
+
+		.logName {
+			font-weight: bold;
+			font-size: 36rpx;
+			margin: 30rpx 0 80rpx;
+		}
+
+		.banner-img {
+			width: 170rpx;
+			height: 170rpx;
+			margin: 0 auto;
+			border-radius: 20rpx;
+		}
+	}
+
+	.login_text {
+		margin: auto 50rpx;
+		position: relative;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 30rpx;
+			padding: 30rpx 0;
+			line-height: 1;
+
+			.login_img {
+				height: 35rpx;
+				width: 70rpx;
+				flex-shrink: 0;
+				font-size: 30rpx;
+				margin-right: 20rpx;
+				color: $font-base;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 100%;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+				flex-grow: 1;
+			}
+		}
+
+
+
+
+
+		.forget {
+			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
+			color: #999999;
+		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba(166, 203, 184, 0.75);
+		}
+
+		.uni-button-green-plain {
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: $font-base;
+			background-color: $page-color-base;
+			border: none;
+		}
+
+		.uni-button {
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 28rpx;
+			width: 100%;
+		}
+	}
+
+
+
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $color-green;
+		background-color: #FFFFFF;
+		overflow: hidden;
+
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+
+			&.qx {
+				font-weight: bold;
+			}
+		}
+
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
+	}
+</style>

+ 260 - 0
pages/public/loginMethods.vue

@@ -0,0 +1,260 @@
+<template>
+	<view class="">
+		<view class="flex other">
+			<view class="fenge"></view>
+			<view class="qita">其他方式登录</view>
+			<view class="fenge"></view>
+		</view>
+		<!-- #ifndef APP-PLUS -->
+		<view class="weixin" @click="wecahtLogin">
+			<image src="../../static/icon/weichat.png" mode=""></image>
+		</view>
+		<view class="weixin_text" @click="wecahtLogin">微信登录</view>
+		<!-- #endif -->
+		<!-- #ifdef APP-PLUS -->
+		<block v-if="!is_ios">
+			<view class="weixin" @click="wecahtLogin('weixin')">
+				<image src="../../static/icon/weichat.png" mode="scaleToFill"></image>
+			</view>
+			<view class="weixin_text" @click="wecahtLogin('weixin')">微信登录</view>
+		</block>
+		<block v-else>
+			<view class="ios_login flex" @click="wecahtLogin('weixin')">
+				<image class="loginIcon" src="../../static/icon/weichat.png" mode=" scaleToFill"></image>
+				<text class="weixin_text">微信登录</text>
+			</view>
+			<view class="ios_login flex" @click="wecahtLogin('apple')">
+				<image class="loginIcon" src="../../static/icon/appleIcon.png" mode=" scaleToFill"></image>
+				<text class="weixin_text">Apple登录</text>
+			</view>
+		</block>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations
+	} from 'vuex';
+	// #ifdef APP-PLUS
+	// loginWx,applelogin接口需要开发编写,基础项目中可能没有
+	import {
+		loginWx,
+		applelogin
+	} from '@/api/login.js';
+	// #endif
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				// #ifdef APP-PLUS
+				is_ios: false, //判断是否为ios手机
+				// is_apple_login: false, //是否有ios授权登录功能
+				// #endif
+			};
+		},
+		created() {
+			let obj = this;
+			// #ifdef APP-PLUS
+			let system = uni.getStorageSync('platform');
+			console.log(system);
+			// 判断是否为ios
+			if (system == 'ios') {
+				obj.is_ios = true;
+			}
+			// uni.getSystemInfo({
+			// 	success(e) {
+			// 		if (+e.system.split('.')[0] >= 13) {
+			// 			obj.is_apple_login = true;
+			// 		}
+			// 	}
+			// })
+			// #endif
+		},
+		
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			wecahtLogin(type) {
+				let obj = this;
+				// #ifdef H5
+				let weichatBrowser = uni.getStorageSync('weichatBrowser');
+				if (weichatBrowser) {
+					loginWinxin();
+				}
+				// #endif
+				// #ifdef APP-PLUS
+				uni.login({
+					provider: type,
+					success(e) {
+						console.log('授权返回结果',e);
+						uni.getUserInfo({
+							provider: type,
+							success(es) {
+								console.log('用户信息',es);
+								if (type === 'weixin') {
+									loginWx(es.userInfo)
+										.then(e => {
+											console.log(e,'回调数据');
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+												obj.$emit('onLogin',e.data)
+											}).catch((e)=>{
+												console.log('错误',e);
+											});
+										})
+										.catch(e => {
+											console.log(e);
+											uni.showModal({
+												content: JSON.stringify(e),
+												success() {},
+												fail() {}
+											});
+										});
+								}
+								if (type === 'apple') {
+									console.log(es.userInfo);
+									applelogin({
+											account: es.userInfo.openId,
+										})
+										.then(function(e) {
+											console.log(e, 'token')
+											uni.setStorageSync('token', e.data.token);
+											getUserInfo({}).then(e => {
+												obj.login();
+												// 保存返回用户数据
+												obj.setUserInfo(e.data);
+												//成功跳转首页
+												uni.switchTab({
+													url: '/pages/index/index'
+												});
+											});
+			
+										})
+										.catch(function(e) {
+											console.log(e);
+										});
+								}
+			
+							},
+							fail(es) {
+								console.log(es,'错误');
+								uni.showModal({
+									content: JSON.stringify(es),
+									success() {
+										// obj.login();
+										// // 保存返回用户数据
+										// obj.setUserInfo(e.data);
+										// //成功跳转首页
+										// uni.switchTab({
+										// 	url: '/pages/index/index'
+										// });
+									}
+								});
+							}
+						});
+					},
+					fail(e) {
+						console.log(e,'错误');
+						uni.showModal({
+							title: '提示',
+							content: JSON.stringify(e),
+							showCancel: false
+						});
+					}
+				});
+				// #endif
+			},
+		},
+	};
+</script>
+
+<style  lang="scss">
+	.other {
+		margin-top: 60rpx;
+	
+		.fenge {
+			width: 30%;
+			height: 2rpx;
+			background-color: #eeeeee;
+		}
+	
+		.qita {
+			font-size: 28rpx;
+			color: #999999;
+		}
+	}
+	.weixin {
+		width: 75rpx;
+		height: 75rpx;
+		margin: 25rpx auto;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+	
+	.weixin_text {
+		text-align: center;
+		font-size: 28rpx;
+		color: #999999;
+	}
+	/* #ifdef APP-PLUS */
+	
+	.ios_login {
+		width: 260rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 10rpx;
+		background-color: #FFFFFF;
+		.loginIcon {
+			width: 50rpx;
+			height: 50rpx;
+		}
+	
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			font-size: 24rpx !important;
+			color: #212121 !important;
+		}
+	}
+	
+	/* #endif */
+	/* #ifdef H5 */
+	.ios_login {
+		width: 350rpx;
+		border-radius: 12rpx;
+		justify-content: center;
+		border: 1px solid #212121;
+		margin: 24rpx auto;
+		padding: 15rpx;
+		background-color: #212121;
+		color: #ffffff;
+		font-size: 32rpx;
+	
+		.loginIcon {
+			font-size: 35rpx;
+			width: 35rpx;
+			height: 35rpx;
+		}
+	
+		.weixin_text {
+			line-height: 1;
+			margin-left: 20rpx;
+			color: #ffffff !important;
+		}
+	}
+	/* #endif */
+</style>

+ 351 - 0
pages/public/phoneLogin.vue

@@ -0,0 +1,351 @@
+<template>
+	<view class="container">
+		<view class="container_text">
+			<view>
+				<image class="banner-img" src="../../static/image/logo.png" mode="scaleToFill"></image>
+			</view>
+			<view class="logName">
+				绿津智能电动车
+			</view>
+		</view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img">
+					+86
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" />
+				</view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					验证码
+				</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><button type="green" class="uni-button uni-button-green" @click="toLogin">立即登录</button></view>
+			<view><button type="green" class="uni-button uni-button-green-plain" plain="true" hover-class="none"
+					@click="$refs.popup.open()">更多</button></view>
+		</view>
+		<!-- #ifdef APP-PLUS -->
+		<!-- <loginMethods  @onLogin='loginGl'></loginMethods> -->
+		<!-- #endif -->
+		<agreement @checkedChange='changeChecked'></agreement>
+		<uni-popup ref="popup" type="bottom">
+			<view class="buttomBox">
+				<navigator url="/pages/public/login">
+					<view class="item borde-b">
+						账号登录
+					</view>
+				</navigator>
+				<navigator url="/pages/public/forget">
+					<view class="item borde-b">
+						忘记密码
+					</view>
+				</navigator>
+				<navigator url="/pages/public/register">
+					<view class="item">
+						注册
+					</view>
+				</navigator>
+			</view>
+			<view class="buttomBox" @click="close">
+				<view class="item qx">
+					取消
+				</view>
+			</view>
+		</uni-popup>
+
+	</view>
+</template>
+
+<script>
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		verify,
+		loginMobile,
+		getUserInfo
+	} from '@/api/login.js';
+	// #ifdef APP-PLUS
+	// applelogin接口需要开发编写,基础项目中可能没有
+	import {
+		applelogin
+	} from '@/api/set.js';
+	// loginWx接口需要开发编写,基础项目中可能没有
+	import {
+		loginWx
+	} from '@/api/login.js';
+	// #endif
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	import loginMethods from "./loginMethods.vue"
+	import agreement from "./agreement.vue"
+
+	export default {
+		data() {
+			return {
+				checked: false, //是否同意条款
+				phone: '',
+				code: '',
+				time: '', //保存倒计时对象
+				countDown: 0 //倒计时
+			};
+		},
+		components: {
+			loginMethods,
+			agreement
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		onLoad() {
+
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			changeChecked(check) {
+				this.checked = check;
+			},
+			//登录
+			async toLogin() {
+				let obj = this;
+
+				if (obj.phone == '') {
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
+					return;
+				}
+				if (obj.phone.length!=11) {
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
+					return;
+				}
+				if (obj.code == '') {
+					uni.showToast({
+						title: "请输入验证码",
+						icon:'none'
+					});
+					return;
+				}
+				if (!obj.checked) {
+					uni.showModal({
+						title: '提示',
+						content: '请先阅读同意《绿津服务》《隐私条例》',
+						showCancel: false,
+					});
+					return;
+				}
+				loginMobile({
+					phone: obj.phone, //账号
+					captcha: obj.code
+				}).then(function(e) {
+					uni.setStorageSync('token', e.data.token);
+					getUserInfo({}).then(e => {
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(e.data);
+						//成功跳转首页
+						uni.switchTab({
+							url: '/pages/index/index'
+						});
+					});
+				}).catch((e) => {
+					console.log(e);
+				});
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					uni.showToast({
+						title: "请输入电话号码",
+						icon:'none'
+					});
+					return;
+				}
+				if (this.phone.length < 11) {
+					uni.showToast({
+						title: "请输入正确的手机号",
+						icon:'none'
+					});
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: 'login'
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			// 后退
+			navBack() {
+				uni.navigateBack();
+			},
+			// 关闭更多弹窗
+			close() {
+				this.$refs.popup.close();
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #FFFFFF;
+		padding-top: 44px;
+	}
+
+	.container {
+		width: 100%;
+		height: 100%;
+		background-size: 100%;
+		padding-top: 50rpx;
+	}
+
+	.container_text {
+		text-align: center;
+
+		.logName {
+			font-weight: bold;
+			font-size: 36rpx;
+			margin: 30rpx 0 80rpx;
+		}
+
+		.banner-img {
+			width: 170rpx;
+			height: 170rpx;
+			margin: 0 auto;
+			border-radius: 20rpx;
+		}
+	}
+
+	.login_text {
+		margin: auto 50rpx;
+		position: relative;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 30rpx;
+			padding: 30rpx 0;
+
+			.login_img {
+				height: 35rpx;
+				width: 100rpx;
+				flex-shrink: 0;
+				font-size: 30rpx;
+				text-align: center;
+				margin-right: 20rpx;
+				color: $font-base;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 100%;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+				flex-grow: 1;
+
+				.code {
+					color: #5dbc7c;
+					font-size: 23rpx;
+					border-left: 1px solid #eeeeee;
+					width: 150rpx;
+					flex-shrink: 0;
+					text-align: center;
+				}
+			}
+		}
+
+		.forget {
+			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
+			color: #999999;
+		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba(166, 203, 184, 0.75);
+		}
+
+		.uni-button-green-plain {
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: $font-base;
+			background-color: $page-color-base;
+			border: none;
+		}
+
+		.uni-button {
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 28rpx;
+			width: 100%;
+		}
+	}
+
+
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $color-green;
+		background-color: #FFFFFF;
+		overflow: hidden;
+
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+
+			&.qx {
+				font-weight: bold;
+			}
+		}
+
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
+	}
+</style>

+ 160 - 0
pages/public/privacyAgreement.vue

@@ -0,0 +1,160 @@
+<template>
+	<view class="content">
+		<view class="title">
+			绿津隐私及定位服务规则
+		</view>
+		<view class="lineSt margin-t-40">
+			为绿津智能电动车平台、浙江绿津智能科技有限公司提供相应服务之必须,您以自愿填写的方式提供注册所需的姓名、性别、电话以及其他类似的个人信息,则表示您已经了解并接受您个人信息的用途,同意绿津智能电动车平台、浙江绿津智能科技有限公司为实现该特定目的使用您的个人信息。除此个人信息之外,其他任何您发送或提供给绿津智能电动车平台、浙江绿津智能科技有限公司的材料、信息或文本(以下统称信息)均将被视为非保密和非专有的。绿津智能电动车平台、浙江绿津智能科技有限公司对这些信息不承担任何义务。同时如果您提交时没有特别声明的,可视为同意绿津智能电动车平台、浙江绿津智能科技有限公司及其授权人可以因商业或非商业的目的复制、透露、分发、合并和以其他方式利用这些信息和所有数据、图像、声音、文本及其他内容。您可阅读下面的隐私规则以了解更加详细的内容。
+		</view>
+		<view class="lineSt strongItem">
+			隐私规则
+		</view>
+		<view class="lineSt">
+			绿津智能电动车平台、浙江绿津智能科技有限公司非常重视对您的个人隐私保护,我们将按照本规则收集、使用、共享和保护您的个人信息。在您使用绿津智能电动车平台、浙江绿津智能科技有限公司的产品及服务前,请您仔细阅读并全面了解本规则。如果您是未成年人,您的监护人需要仔细阅读本规则并同意您依照本规则使用我们的产品或服务。对于本规则中与您的权益存在重大关系的条款,我们已将字体加粗以提示您注意。当您浏览、访问绿津智能电动车平台、浙江绿津智能科技有限公司平台及/或使用绿津智能电动车平台、浙江绿津智能科技有限公司的产品或服务时,即表示您已经同意我们按照本规则来收集、使用、共享和保护您的个人信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的收集范围
+		</view>
+		<view class="lineSt">
+			我们收集您的以下个人信息:
+		</view>
+		<view class="lineSt">
+			身份识别信息,包括但不限于您的姓名、身份证明、联系地址、电话号码、生物特征信息;
+		</view>
+		<view class="lineSt">
+			您所处的地理位置及目的地信息;
+		</view>
+		<view class="lineSt">
+			平台操作信息,包括但不限于您的IP地址、设备型号、设备标识符、操作系统版本信息;
+		</view>
+		<view class="lineSt">
+			行程信息,包括但不限于您的出发地、到达地、路线、途经地点及里程数信息;
+		</view>
+		<view class="lineSt">
+			支付信息,包括但不限于您的支付时间、支付金额、支付工具、银行账户及支付账户信息;
+		</view>
+		<view class="lineSt">
+			个人信用信息,包括但不限于关于您的任何信用状况、信用分、信用报告信息;
+		</view>
+		<view class="lineSt">
+			其他根据我们具体产品及服务的需要而收集的您的个人信息,包括但不限于您对我们及我们的产品或服务的意见、建议、您曾经使用或经常使用的移动应用软件以及使用场景和使用习惯等信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的收集方法
+		</view>
+		<view class="lineSt">
+			您授权我们通过以下方法收集您的个人信息:
+		</view>
+		<view class="lineSt">
+			我们将收集和储存在您浏览、访问绿津智能电动车平台、浙江绿津智能科技有限公司平台及/或使用绿津智能电动车平台、浙江绿津智能科技有限公司的产品或服务时主动向我们提供的信信息;
+		</view>
+		<view class="lineSt">
+			我们将收集和储存我们在向您提供绿津智能电动车平台、浙江绿津智能科技有限公司的产品或服务的过程中记录的与您有关的信息;
+		</view>
+		<view class="lineSt">
+			我们将收集和储存您通过我们的客服人员及/或其他渠道主动提交或反馈的信息;
+		</view>
+		<view class="lineSt">
+			我们将向关联公司、商业合作伙伴及第三方独立资料来源,收集和储存其合法获得的与您有关的信息;
+		</view>
+		<view class="lineSt">
+			我们将向依法设立的征信机构査询您的相关信用信息,包括但不限于任何信用分、信用报告等。
+		</view>
+		<view class="lineSt strongItem">
+			信息的用途
+		</view>
+		<view class="lineSt">
+			您授权我们出于以下用途使用您的个人信息:
+		</view>
+		<view class="lineSt">
+			向您提供绿津智能电动车平台、浙江绿津智能科技有限公司的产品及服务,并进行绿津智能电动车平台、浙江绿津智能科技有限公司相关网站及APP的管理和优化;
+		</view>
+		<view class="lineSt">
+			提升和改善绿津智能电动车平台、浙江绿津智能科技有限公司现有产品及服务的功能和质量,包括但不限于产品及服务内容的个性化定制及更新;
+		</view>
+		<view class="lineSt">
+			开展绿津智能电动车平台、浙江绿津智能科技有限公司产品及服务相关的市场活动,向您推送最新的市场活动信息及优惠方案;
+		</view>
+		<view class="lineSt">
+			设计、开发、推广全新的产品及服务;
+		</view>
+		<view class="lineSt">
+			提高绿津智能电动车平台、浙江绿津智能科技有限公司产品及服务安全性,包括但不限于身份验证、客户服务、安全防范、诈骗监测、存档和备份;
+		</view>
+		<view class="lineSt">
+			协助行政机关、司法机构等有权机关开展调査,并遵守适用法律法规及其他向有权机关承诺之义务;
+		</view>
+		<view class="lineSt">
+			在收集信息之时所通知您的用途以及与上述任何用途有关的其他用途;
+		</view>
+		<view class="lineSt">
+			此外,我们可能向您发送与上述用途有关的信息和通知,包括但不限于为保证服务完成所必须的验证码、使用产品或服务时所必要的推送通知、当前费用优惠及减免信息、关于绿津智能电动车平台、浙江绿津智能科技有限公司产品或服务的新闻以及市场活动及优惠促销信息。
+		</view>
+		<view class="lineSt strongItem">
+			信息的共享
+		</view>
+		<view class="lineSt">
+			我们对您的个人信息承担保密义务,但您授权我们在下列情况下将您的信息与第三方共享:
+		</view>
+		<view class="lineSt">
+			为了提升我们的产品及服务质量或向您提供全新的产品及服务,我们会在关联公司内部共享您的相关信息,也可能将我们收集的信息提供给第三方用于分析和统计;
+		</view>
+		<view class="lineSt">
+			为了与第三方开展联合推广活动,我们可能与其共享开展活动所必需的以及在活动过程中产生的相关信息;
+		</view>
+		<view class="lineSt">
+			为了维护您的合法权益,在协助处理与您有关的纠纷或争议时,我们会向存在利害关系的第三方提供解决纠纷或争议所必需的信息;
+		</view>
+		<view class="lineSt">
+			根据法律法规的规定及商业惯例,我们需要接受第三方的审计或尽职调査时,可能向其提供您的相关信息;
+		</view>
+		<view class="lineSt">
+			根据法律法规的规定或行政机关、司法机构等有权机关要求,我们会向其提供您的相关信息;
+		</view>
+		<view class="lineSt">
+			其他经您同意或授权可以向第三方提供您的个人信息的情况。
+		</view>
+		<view class="lineSt">
+			信息的安全及保护措施
+		</view>
+		<view class="lineSt">
+			我们及我们的关联公司将采用严格的安全制度以及行业通行的安全技术和程序来确保您的个人信息不被丢失、泄露、毀损或滥用。但是,请您注意,任何安全系统都存在可能的及未知的风险。
+		</view>
+		<view class="lineSt">
+			您访问的第三方网站经营者、您使用的第三方服务提供者和通过我们获取您的个人信息的第三方可能有自己的隐私权保护规则以及获取您个人信息的方法和措施,这些第三方的隐私权保护规则、获取个人信息的方法和措施将不会受到我们的控制。虽然我们将与可能接触到您的个人信息的我们的合作方等第三方签署保密协议并尽合理的努力督促其履行保密义务,但我们无法保证第三方一定会按照我们的要求采取保密措施,我们亦不对第三方的行为及后果承担任何责任。
+		</view>
+		<view class="lineSt">
+			作为用户,您可根据您的意愿决定是否使用绿津智能电动车平台、浙江绿津智能科技有限公司平台的服务,是否主动提供个人信息。同时,您可以查看您提供给我们的个人信息及行程信息。如果您希望删除或更正您的个人信息,请联系我们的客服人员。
+		</view>
+		<view class="lineSt">
+			如果我们监测到您将绿津智能电动车平台、浙江绿津智能科技有限公司的产品及服务以及相关信息用于欺诈或非法目的,我们将会采取相应措施,包括但不限于中止或终止向您提供任何产品或服务。
+		</view>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style lang="scss">
+	.content {
+		padding: $page-row-spacing;
+		line-height: 2;
+		font-size: $font-base;
+	}
+
+	.title {
+		font-size: $font-lg + 6rpx;
+		font-weight: bold;
+		text-align: center;
+	}
+
+	.lineSt {
+		text-indent: 2em;
+	}
+
+	.strongItem {
+		margin: 20rpx 0 ;
+		font-weight: bold;
+		font-size: $font-lg;
+	}
+</style>

+ 156 - 0
pages/public/redirect.vue

@@ -0,0 +1,156 @@
+<template>
+	<view>
+	</view>
+</template>
+<script>
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	// #ifdef H5
+	import {
+		wechatAuth
+	} from '@/api/wx';
+	// #endif
+	// #ifdef MP-WEIXIN
+	import {
+		wechatMpAuth
+	} from '@/api/wx';
+	// #endif
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
+	export default {
+		computed: {
+			...mapState(['urlFile'])
+		},
+		onLoad(option) {
+			let obj = this;
+			// 判断是否需要保存定向地址
+			// #ifdef H5
+			this.loadH5()
+			// #endif
+			// #ifdef MP-WEIXIN
+			this.loadMp(option)
+			// #endif
+		},
+		methods: {
+			...mapMutations('user', ['login', 'setUserInfo', 'logout']),
+			// #ifdef H5
+			loadH5() {
+				let obj = this;
+				let url = window.location.href;
+				let code = url.match(/code=([0-9]|[a-z]|[A-Z])*/g)[0].replace('code=', '');
+				let spread = uni.getStorageSync('spread') || '';
+				wechatAuth({
+					code: code,
+					spread: spread,
+				}).then(({
+					data
+				}) => {
+					obj.wchatAuth(data);
+					// 修改当前页面
+					history.replaceState({ name: '首页' }, '首页', obj.urlFile+'/pages/index/index');
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			},
+			// #endif
+			// #ifdef MP-WEIXIN
+			loadMp(option) {
+				let obj = this;
+				// 获取登录授权页数据
+				let user = prePage().userInfo;
+				// #ifndef MP
+				// 获取推广人id
+				let spread_spid = uni.getStorageSync('spread') || '';
+				// #endif
+				// #ifdef MP
+				// 小程序推广人
+				let spread_code = uni.getStorageSync('spread_code') || '';
+				// #endif
+				wechatMpAuth({
+					code: option.code,
+					iv: user.target.iv,
+					encryptedData: user.target.encryptedData,
+					// #ifndef MP
+					spread_spid: spread_spid,
+					// #endif
+					// #ifdef MP
+					spread_code: spread_code
+					// #endif
+				}).then(({
+					data
+				}) => {
+					obj.wchatAuth(data);
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});
+			},
+			// #endif
+			wchatAuth(data) {
+				let obj = this;
+				// 保存token
+				uni.setStorageSync('token', data.token);
+				// 获取用户基础信息
+				getUserInfo({}).then(e => {
+					obj.login();
+					// 保存返回用户数据
+					obj.setUserInfo(e.data);
+					let ur = uni.getStorageSync('present') || '/pages/index/index';
+					// 用于处理缓存bug
+					if (ur == 'pages/product/product') {
+						ur = '/pages/index/index'
+					}
+
+					if (!e.data.phone) {
+						uni.showModal({
+							title: '提示',
+							content: '请先绑定手机号',
+							showCancel: false,
+							success: res => {
+								if (res.confirm) {
+									uni.navigateTo({
+										url: '/pages/set/phone',
+									});
+								}
+							},
+						});
+					} else {
+						uni.switchTab({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: ur,
+									fail(e) {
+										uni.navigateTo({
+											url: '/pages/index/index',
+										});
+									}
+								});
+							}
+						});
+					}
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			}
+		}
+	};
+</script>
+<style></style>

+ 366 - 0
pages/public/register.vue

@@ -0,0 +1,366 @@
+<template>
+	<view class="container">
+		<view class="loginTitle"><text>注册绿津</text></view>
+		<view class="login_text">
+			<view class="login_input flex">
+				<view class="login_img">
+					+86
+				</view>
+				<view class="login_name"><input class="uni-input" v-model="phone" focus placeholder="请输入手机号" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					密码
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="password" focus
+						placeholder="请输入密码" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img">
+					重复密码
+				</view>
+				<view class="login_name"><input class="uni-input" type="password" v-model="repassword" focus
+						placeholder="请重复输入密码" /></view>
+			</view>
+			<view class="login_input flex" style="display: none;">
+				<view class="login_img">
+					邀请码
+				</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_img">
+					验证码
+				</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><button type="green" @click="register" class="uni-button uni-button-green">立即注册</button></view>
+			<view>
+				<navigator url="login">
+					<button class="uni-button uni-button-green-plain" type="green" plain="true"
+						hover-class="none">返回登录</button>
+				</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		register,
+		verify
+	} from '@/api/login.js';
+	export default {
+		data() {
+			return {
+				phone: '', //用户
+				password: '', //密码
+				repassword: '',
+				invitation: '', //邀请码
+				code: '', //验证码
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+				navdom: false //注册后是否跳转到下载页
+			};
+		},
+		onLoad(option) {
+			// 判断是否有邀请人
+			if (option.spread) {
+				// 有邀请人时跳转到下载页
+				this.navdom = true;
+				uni.setStorageSync('spread', option.spread);
+			}
+			// 获取扫码邀请人id
+			this.invitation = uni.getStorageSync('spread') || '';
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		methods: {
+			// 注册
+			register() {
+				let obj = this;
+				if (obj.phone == '') {
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
+					return;
+				}
+				if (this.phone.length != 11) {
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
+					return;
+				}
+				if (obj.password == '') {
+					uni.showToast({
+						title:"请输入密码",
+						icon:"none"
+					})
+					return;
+				}
+				if (obj.repassword == '') {
+					uni.showToast({
+						title:"请再次输入密码",
+						icon:"none"
+					})
+					return;
+				}
+				if (obj.repassword != obj.password) {
+					uni.showToast({
+						title:"两次密码不正确",
+						icon:"none"
+					})
+					return;
+				}
+				register({
+					account: obj.phone, //账号
+					captcha: obj.code, //验证码
+					password: obj.password, //密码
+					spread: obj.invitation //上级推广人
+				}).then(function(e) {
+					uni.showToast({
+						title: '注册成功',
+						duration: 2000,
+						position: 'top',
+						mask:true
+					});
+					if (obj.navdom) {
+						setTimeout(function() {
+							uni.navigateTo({
+								url: '/pages/public/domApp'
+							});
+						}, 1000)
+					} else {
+						setTimeout(function() {
+							uni.navigateTo({
+								url: '/pages/public/login'
+							});
+						}, 1000)
+					}
+				});
+				//调用注册接口,成功跳转登录页
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
+					return;
+				}
+				if (this.phone.length < 11) {
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
+					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);
+						});
+				}
+			},
+			login() {
+				//返回登录
+				uni.navigateTo({
+					url: '/pages/public/login'
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.container {
+		width: 100%;
+		height: 100%;
+		background-size: 100%;
+		background-color: #FFFFFF;
+	}
+
+	.container_text {
+		width: 100%;
+		height: 500rpx;
+		top: 0rpx;
+
+		.banner-img {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.login_text {
+		margin: auto 50rpx;
+		position: relative;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.login_input {
+			border-bottom: 1px solid #f0f0f0;
+			margin-bottom: 30rpx;
+			padding: 30rpx 0;
+			line-height: 1;
+
+			.login_img {
+				height: 35rpx;
+				width: 150rpx;
+				flex-shrink: 0;
+				font-size: 30rpx;
+				text-align: center;
+				margin-right: 20rpx;
+				color: $font-base;
+			}
+
+			.uni-input {
+				text-align: left;
+				width: 100%;
+				font-size: 28rpx !important;
+			}
+
+			.login_name {
+				color: #333333;
+				flex-grow: 1;
+
+				.code {
+					color: #5dbc7c;
+					font-size: 23rpx;
+					border-left: 1px solid #eeeeee;
+					width: 150rpx;
+					flex-shrink: 0;
+					text-align: center;
+				}
+			}
+		}
+
+		.other {
+			margin-top: 60rpx;
+
+			.fenge {
+				width: 30%;
+				height: 2rpx;
+				background-color: #eeeeee;
+			}
+
+			.qita {
+				font-size: 28rpx;
+				color: #999999;
+			}
+		}
+
+		.weixin {
+			width: 75rpx;
+			height: 75rpx;
+			margin: 25rpx auto;
+		}
+
+		.weixin image {
+			width: 100%;
+			height: 100%;
+		}
+
+		.weixin_text {
+			text-align: center;
+			font-size: 28rpx;
+			color: #999999;
+		}
+
+		.forget {
+			font-size: 28rpx;
+			width: 100%;
+			text-align: right;
+			color: #999999;
+		}
+
+		.uni-button-green {
+			color: #ffffff;
+			background-color: #5dbc7c;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba(166, 203, 184, 0.75);
+		}
+
+		.uni-button-green-plain {
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			color: $font-base;
+			background-color: $page-color-base;
+			border: none;
+		}
+
+		.uni-button {
+			height: 80rpx;
+			line-height: 80rpx;
+			font-size: 28rpx;
+			width: 100%;
+		}
+	}
+
+	.loginTitle {
+		padding: 150rpx 0;
+		width: 100%;
+		text-align: left;
+		color: $font-base;
+		font-size: 48rpx;
+		margin: 0 50rpx;
+
+	}
+
+	.forget {
+		width: 100rpx;
+		font-size: 24rpx;
+		color: #ffffff;
+		margin: 0px auto;
+		border-bottom: 1px solid #ffffff;
+	}
+
+	.width {
+		width: 325rpx !important;
+	}
+
+	.code {
+		color: #5dbc7c;
+		font-size: 23rpx;
+		border-left: 1px solid #eeeeee;
+		width: 150rpx;
+		flex-shrink: 0;
+		text-align: center;
+	}
+
+	uni-button {
+		height: 80rpx !important;
+		line-height: 80rpx !important;
+	}
+</style>

+ 724 - 0
pages/public/userAgreement.vue

@@ -0,0 +1,724 @@
+<template>
+	<view class="content">
+		<view class="title">
+			绿津智能电动车使用及用户服务协议
+		</view>
+		<view class="margin-t-40">
+			感谢用户购买并使用绿津智能电动车。
+		</view>
+		<view class="lineSt">
+			欢迎用户与浙江绿津智能科技有限公司(以下简称“本公司”)共同签署《绿津APP平台用户使用协议》(以下简称“本协议”)并使用绿津APP平台服务(以下简称“本产品”)。
+		</view>
+		<view class="lineSt">
+			本公司一向尊重并会严格保护用户在使用本产品时的合法权益(包括用户隐私、用户数据等)不受到任何侵犯。
+		</view>
+		<view>
+			&nbsp;
+		</view>
+		<view class="lineSt">
+			本协议(包括本文最后部分的隐私政策)是用户(包括通过各种合法途径获取到本产品的自然人、法人或其他组织机构,以下简称“用户”)与本公司针对本产品的相关事项而订立的最终的、完整的且排他的协议,并取代、合并之前的当事人之间关于上述事项的讨论和协议。
+		</view>
+		<view>
+			&nbsp;
+		</view>
+		<view class="lineSt">
+			本协议将对用户使用本产品的行为产生法律约束力,用户已承诺和保证有权利和能力订立本协议。用户开始使用本产品将视为已经接受本协议,请认真阅读并理解本协议中各种条款,包括免除和限制本公司的免责条款和对用户的权利限制(未成年人审阅时及签署应由法定监护人陪同并操作)。本协议条款中存在的标题或关键词仅为帮助用户理解该条款所表达的主旨只用,不影响条款的含义或解释。
+		</view>
+		<view>
+			&nbsp;
+		</view>
+		<view class="lineSt">
+			当用户按照注册页面提示填写个人信息、阅读并同意本协议且完成全部注册后即表示用户已经充分阅读、理解并接受本协议的全部内容,与本公司达成一致并成为绿津智能电动车的使用人和绿津平台服务用户。阅读本协议的过程中,如用户不同意本协议的相关内容,请用户立即停止注册程序,不再使用本产品。
+		</view>
+		<view class="lineSt strongItem">
+			1、定义
+		</view>
+		<view class="lineSt">
+			在本协议中,除上下文有其他约定,下列表达均做如下解释:
+		</view>
+		<view class="lineSt">
+			1.1 绿津APP平台:指本公司旗下运营的电动车定位、售后服务互联网平台,以及其在IOS、安卓、windows等个人计算机或移动电话设备等终端系统上的客户端。
+		</view>
+		<view class="lineSt">
+			1.2浙江绿津智能科技有限公司:“绿津”智能电动车的提供方、绿津平台服务运营商。
+		</view>
+		<view class="lineSt">
+			1.3用户:指具备完全民事行为能力、具备相应驾驶资格的购买“绿津”系列智能电动车并使用绿津APP平台各项服务的使用人。
+		</view>
+		<view class="lineSt">
+			1.4 产品:指“绿津”系列智能电动车。
+		</view>
+		<view class="lineSt">
+			1.5认证用户:指与本公司签订《本协议》并完成注册流程的用户。一个认证用户仅可以拥有一个账户,每个账户对应唯一的用户名。
+		</view>
+		<view class="lineSt">
+			1.6账户:指用户认证时设置的账户名,其账号具有唯一性。
+		</view>
+		<view class="lineSt">
+			1.7
+			购车服务:指本公司通过绿津APP平台向认证用户提供分期付款购买本公司所持有的电动自行车所有权,并由本公司收取尾款及提供售后服务的等相关行为,主要包括用户的在线注册登录、在线支付费用、在线充退押金、在线信用评级以及相对应的奖惩方案、在线智能预订车辆、智能车辆位置搜寻、智能开锁、智能锁车、评价及举报投诉、查询、分享用车历史记录、基于大数据的车辆研发设计以改进客户体验等。本公司和认证用户均应遵守本协议中设定的权利义务。
+		</view>
+		<view class="lineSt">
+			1.8电动车经营者:是指在平台方提供电动车出售服务的绿津品牌电动车加盟商。
+		</view>
+		<view class="lineSt strongItem">
+			2、协议范围及服务内容
+		</view>
+		<view class="lineSt">
+			2.1签约主体
+		</view>
+		<view class="lineSt">
+			本协议由用户与本公司共同缔结,本协议对用户与本公司均具有合同效力。
+		</view>
+		<view class="lineSt">
+			2.2补充协议
+		</view>
+		<view class="lineSt">
+			用户明确同意,本公司有权根据需要时制订、修改本协议及相关规则,变更后的协议和规则一经公布,立即取代原协议及规则并自动生效。如用户不同意相关变更,应当立即停止使用绿津APP平台服务,如用户继续使用绿津APP平台服务,即表示用户已接受经修订的协议和规则。
+		</view>
+		<view class="lineSt">
+			2.3电动车经营者在绿津APP平台上以一次性支付或分期支付的形式向用户提供电动车售卖服务。
+		</view>
+		<view class="lineSt strongItem">
+			3、用户注册与认证
+		</view>
+		<view class="lineSt">
+			3.1 用户资格
+		</view>
+		<view class="lineSt">
+			用户需确认,在用户开始通过用户认证程序获得具备使用绿津APP的资格前,用户应具备中华人民共和国法律规定的与用户行为相适应的民事行为能力(特别提示,用户应为符合骑行电动自行车上路的年龄(16周岁以上)及身体条件的健康人士。用户如未满16周岁或患有包括但不限于影响骑行的如癫痫、心脏病、高血压、暂时性眩晕、视力障碍、听觉障碍、残疾等各种疾病的,不得使用本服务)。用户不具备前述与用户行为相适应的民事行为能力,则用户及其监护人应依照法律规定承担因此而导致的一切后果。
+		</view>
+		<view class="lineSt">
+			3.2注册信息和隐私保护
+		</view>
+		<view class="lineSt">
+			3.2.1注册信息
+		</view>
+		<view class="lineSt">
+			用户作为访客通过手机验证等程序注册绿津APP平台后,用户即成为绿津APP平台的用户并拥有自己的账户。绿津APP平台帐号(即绿津APP平台用户ID)的所有权归本公司所有,用户在完成注册申请手续后,即获得绿津APP平台账号的使用权。
+		</view>
+		<view class="lineSt">
+			但当且仅当用户完成了实名认证程序成为绿津APP平台的认证用户后,用户方可使用购车服务。
+		</view>
+		<view class="lineSt">
+			当用户按照实名认证程序提示填写信息、阅读并同意本协议且完成全部认证程序后,用户可获得绿津APP平台认证用户账户。用户应及时提供真实、完整、具体及准确的个人资料,符合完整、详尽、准确的要求。用户知晓并同意,因国家相关规定,本服务谢绝向无民事行为能力人及不满十八周岁的限制行为能力人提供。如果因用户提供的注册信息不真实而引起的问题及其产生的一切法律责任,由用户自行承担。
+		</view>
+		<view class="lineSt">
+			由于认证用户的账户关联到其本人的信用信息,故用户不得转让该账户,也不得许可或协助他人使用该认证用户账户使用购车服务,否则由此产生的一切责任均由用户承担连带责任。
+		</view>
+		<view class="lineSt">
+			3.2.2隐私保护
+		</view>
+		<view class="lineSt">
+			(1)用户知晓并同意,本公司不得对外公开或向第三方提供用户的具体注册资料,但以下情况除外:
+		</view>
+		<view class="lineSt">
+			a.事先获得用户的明确授权;
+		</view>
+		<view class="lineSt">
+			b.只有透露用户的个人资料,才能提供用户所要求的产品和服务;
+		</view>
+		<view class="lineSt">
+			c.根据有关的法律法规要求;
+		</view>
+		<view class="lineSt">
+			d.按照国家机关、法院判决、仲裁机构裁定的要求;
+		</view>
+		<view class="lineSt">
+			e.在法律规定的紧急情况下为维护本公司的合法权益且不损害注册用户法律权利的前提下。
+		</view>
+		<view class="lineSt">
+			本公司的上述行为,符合法律规定,无须承担相关法律责任。
+		</view>
+		<view class="lineSt">
+			(2)在用户使用本协议项下服务时,用户同意并将意味着不可撤销地授权本公司就服务过程中需要的其相关信息(包括但不限于用户的姓名、身份证号、联系地址、联系电话、IP地址、地理位置、行程信息等相关信息)进行收集、存储等,以用于优化、推广绿津APP平台软件以及本协议项下的服务。本公司可能会与第三方合作向用户提供相关的服务,或与关联企业合作提供服务;在此情况下,如该第三方同意承担与本公司同等的保护用户隐私的责任,则本公司有权将用户的注册数据等提供给该第三方。
+		</view>
+		<view class="lineSt">
+			(3)用户知晓并同意,本公司有权将用户的信息提供给信用查询机构及其它合作机构,用于验证用户信息的真实性,或者进一步查询用户的其他信息。用户授权信用查询机构及其它合作机构,可根据本公司提供的信息,及用户留存的信息进行对比分析并反馈相应查询结果或关联风险的判断。
+		</view>
+		<view class="lineSt">
+			(4)在不透露单个用户隐私数据的前提下,本公司有权对整个用户数据库进行分析并在合法范围内对用户数据库进行商业上的使用。
+		</view>
+		<view class="lineSt">
+			3.3认证信息管理
+		</view>
+		<view class="lineSt">
+			3.3.1在用户认证过程中,用户应按绿津APP平台页面的提示准确、真实、完整地提供用户的个人信息(包阔并不限于用户的真实姓名、用户个人的身份证号、人脸识别等)和个人征信信息(包括并不限于中国人民银行征信报告、蚂蚁信用、微信支付分、芝麻信用等)。用户对认证程序所需收集的信息了解并同意,用户有义务保证其提供信息的真实性及有效性。
+		</view>
+		<view class="lineSt">
+			3.3.2如果用户的认证信息有所变更,用户应当及时更新用户提供的信息,本公司将依法不定时地对用户的信息进行检查核实,用户应当配合提供最及时、真实、完整的信息。
+		</view>
+		<view class="lineSt">
+			如本公司根据用户最后一次提供的信息与用户联系未果,或用户未按本公司的要求及时提供信息,或用户提供的信息存在明显不实的,用户将针对上述情形承担其对自身、他人及本公司造成的全部损失与不利后果。
+		</view>
+		<view class="lineSt">
+			3.3.3开通购车及车辆使用权限。用户在成功通过用户认证程序并付费后,即可购买、使用绿津APP平台所提供的电动自行车。
+		</view>
+		<view class="lineSt">
+			上述用户认证的审核和通过均由本公司最终决定。本公司可以根据用户上传的文件对其文件的真实性、合法性进行合理的质询和怀疑,并给予用户不通过认证的结果且无需对该结果做任何解释;用户可以通过再次申请认证或申诉进行重新认证。
+		</view>
+		<view class="lineSt">
+			3.4账户安全规范
+		</view>
+		<view class="lineSt">
+			3.4.1用户的账户为用户自行设置并由用户保管,本公司任何时候均不会主动要求用户提供其账户信息。因此,请务必保管好账户信息,账户安全由用户自行负责,请确保在每个上网时段结束时退出登录并以正确步骤关闭绿津APP。如果用户的账户因用户主动泄露或遭受他人攻击、诈骗等行为而造成的任何损失及后果,该等损失和后果均由用户自行承担。
+		</view>
+		<view class="lineSt">
+			3.4.2除本公司存在过错外,用户应对用户账户项下的所有行为和结果(包括但不限于购买电车、使用电动车、发布信息、披露信息、开放通讯录等)负责,无论该等行为和结果是否对用户自身或第三方造成任何损害。
+		</view>
+		<view class="lineSt">
+			3.4.3如发现任何未经授权使用用户账户登录绿津APP平台或其他可能导致用户账户遭窃、遗失的情况,建议用户立即联系绿津APP平台客服。用户须理解本公司对用户的任何请求采取行动均需要合理时间,除本公司存在过错外,本公司对在采取行动前已经产生的后果不承担任何责任。
+		</view>
+		<view class="lineSt">
+			3.5 用户承诺与保证
+		</view>
+		<view class="lineSt">
+			用户使用本产品的行为必须合法。本产品将会依据本协议“修改和终止”的规定保留或终止用户的账户。用户必须承诺对用户的登录信息保密、不被其他人获取与使用,并且对用户在本账户下的所有行为负责。用户必须将任何有可能触犯法律的、未授权使用或怀疑为未授权使用的行为在第一时间通知本产品。本产品不对用户因未能遵守上述要求而造成的损失承担法律责任。
+		</view>
+		<view class="lineSt">
+			3.6终端用户协议许可
+		</view>
+		<view class="lineSt">
+			依据本协议规定,本产品将授予用户以下不可转让的、非排他的许可:
+		</view>
+		<view class="lineSt">
+			3.6.1. 使用本产品的权利;
+		</view>
+		<view class="lineSt">
+			3.6.2. 在用户所有的网络通信设备、计算机设备和移动通信设备上下载、安装、使用本产品的权利。
+		</view>
+		<view class="lineSt">
+			3.7限制性条款
+		</view>
+		<view class="lineSt">
+			本协议对用户的授权将受到以下限制:
+		</view>
+		<view class="lineSt">
+			3.7.1. 未经本公司书面同意,用户不得对本产品进行任何形式的许可、出售、租赁、转让、发行或其他商业用途;
+		</view>
+		<view class="lineSt">
+			3.7.2. 除非法律禁止此类限制,否则用户不得对本产品的任何部分或衍生产品进行修改、翻译、改编、合并、利用、分解、改造或反向编译、反向工程等;
+		</view>
+		<view class="lineSt">
+			3.7.3. 用户不得以创建相同或竞争服务为目的使用本产品;
+		</view>
+		<view class="lineSt">
+			3.7.4. 除非法律明文规定,否则用户不得对本产品的任何部分以任何形式或方法进行生产、复制、发行、出售、下载或显示等;
+		</view>
+		<view class="lineSt">
+			3.7.5. 用户不得删除或破坏包含在本产品中的任何版权声明或其他所有权标记。
+		</view>
+		<view class="lineSt">
+			3.8 绿津APP平台服务规则
+		</view>
+		<view class="lineSt">
+			经认证的用户可通过绿津APP平台使用购车服务。
+		</view>
+		<view class="lineSt">
+			3.8.1用户应遵守本协议项下用户的义务,用户可行使本协议项下用户的权利。用户应确保用户不会利用绿津APP平台进行任何违法行为或下述行为:
+		</view>
+		<view class="lineSt">
+			(1)利用技术手段故意访问、记录、盗取、传播绿津APP平台的数据和相关信息;
+		</view>
+		<view class="lineSt">
+			(2)以任何方式侵犯他人的合法权益;
+		</view>
+		<view class="lineSt">
+			(3)干扰或破坏绿津APP平台、其服务器或其网络;
+		</view>
+		<view class="lineSt">
+			(4)未经合法授权而截取、篡改、收集、储存、使用、传播或删除其他用户的个人信息或提供的其他信息;
+		</view>
+		<view class="lineSt">
+			(5)不得利用绿津APP平台服务系统进行任何不利于本公司的行为;
+		</view>
+		<view class="lineSt">
+			(6)未经本公司同意,不论电动车处于上锁或开锁状态,用户不得以除正常骑行外的任何其他方式将电动车或其任何部件转移至任何地区;
+		</view>
+		<view class="lineSt">
+			(7)不得以任何形式使用绿津APP平台服务侵犯本公司的商业利益,包括但不限于发布非经本公司许可的商业广告;
+		</view>
+		<view class="lineSt">
+			(8)不得利用绿津APP平台服务系统进行任何可能对互联网或移动网正常运转造成不利影响的行为;
+		</view>
+		<view class="lineSt">
+			(9)不得利用绿津APP平台服务系统进行任何不利于本公司的行为;
+		</view>
+		<view class="lineSt">
+			(10)其他未经合法授权的行为。
+		</view>
+		<view class="lineSt">
+			3.8.2 用户应确保用户在绿津APP平台上所发布和传播的内容不得包含下述信息:
+		</view>
+		<view class="lineSt">
+			(1)违反宪法确定的基本原则的;
+		</view>
+		<view class="lineSt">
+			(2)危害国家统一、主权和领土完整的;
+		</view>
+		<view class="lineSt">
+			(3)泄露国家秘密,危害国家安全,损害国家荣誉和利益的;
+		</view>
+		<view class="lineSt">
+			(4)煽动民族仇恨、民族歧视,破坏民族团结,侵害民族风俗、习惯的;
+		</view>
+		<view class="lineSt">
+			(5)违背国家宗教政策,宣扬邪教、迷信的;
+		</view>
+		<view class="lineSt">
+			(6)扰乱社会秩序,破坏社会稳定的;
+		</view>
+		<view class="lineSt">
+			(7)宣扬淫秽、赌博、暴力、教唆犯罪的;
+		</view>
+		<view class="lineSt">
+			(8)侮辱、诽谤、恐吓、涉及他人隐私等侵害他人合法权益的;
+		</view>
+		<view class="lineSt">
+			(9)侵犯他人知识产权或涉及第三方商业秘密及其他专有权利的;
+		</view>
+		<view class="lineSt">
+			(10)存在可能破坏、篡改、删除、影响绿津APP平台任何系统正常运行或未经授权秘密获取绿津APP平台及其他用户的数据、个人资料的病毒、木马、爬虫等恶意软件、程序代码的;
+		</view>
+		<view class="lineSt">
+		 (11)危害社会公德,诋毁民族优秀文化的;
+		</view>
+		<view class="lineSt">
+			(12)有国家法律、法规或政策禁止的其他内容。
+		</view>
+		<view class="lineSt">
+			3.8.3用户同意本公司有权在提供网络服务过程中以各种方式投放各种商业性广告或其他任何类型的商业信息,并且,用户同意接受本公司通过电子邮件、或其他方式向用户发送商品促销或其他商业信息。用户同意本公司无须对前述广告或促销信息的内容负责,用户应自行审慎判断内容的正确性与商品或服务的质量。
+		</view>
+		<view class="lineSt">
+			3.8.4本公司针对某些特定的绿津APP平台服务的使用行为通过各种方式(包括但不限于网页公告、电子邮件、短信提醒等)做出的任何声明、通知、警示等内容视为本协议的一部分,用户使用该服务,视为用户知悉并同意该等声明、通知、警示的内容,如用户不同意该等声明、通知或警示,应当立即停止使用本服务。
+		</view>
+		<view class="lineSt">
+			3.8.5本公司有权对用户使用绿津APP平台服务(包括但不限于免费或付费服务)的情况进行审查和监督(包括但不限于对用户存储在本公司的内容进行审核),如用户在使用服务时违反上述任何规定,本公司有权要求用户改正或直接采取一切必要的措施(包括但不限于更改或删除用户的内容、暂停或终止用户使用本服务的权利)以减轻用户不当行为的影响。因用户自身行为需向第三人承担责任的,由用户自行承担,与本公司无关。
+		</view>
+		<view class="lineSt">
+			3.8.6本公司有权基于其独立判断,在其认为可能发生危害绿津APP平台或本公司等的情形时(包括但不限于用户违反本协议第八条第1项下的原则),不经事前通知用户而先行暂停、中断或终止向用户提供本协议项下的全部或部分用户服务,且无需对用户或任何第三方承担任何责任。当用户因本条原因被暂停、中断或终止服务时,用户应按照本公司指示行事,否则将被视为违约,用户应承担本协议第十一条第2项下的违约责任,并且本公司保留追究用户法律责任的权利。
+		</view>
+		<view class="lineSt">
+			3.8.7用户作为车辆的使用方或购买方,用户在申请使用绿津APP平台服务时,必须向本公司提供准确、真实的个人相关资料,且需通过本公司的认证后方能开始使用软件。如个人资料有任何变动,必须及时更新。更新过程中,本公司有权暂停该用户的使用权,经过本公司对更新信息的再次认证后方能继续使用软件。
+		</view>
+		<view class="lineSt strongItem">
+			4、费用
+		</view>
+		<view class="lineSt">
+			4.1 用户必须自行负担购买本产品的费用,个人上网或第三方(包括但不限于电信或移动通讯提供商)收取的通讯费、信息费等相关费用。如涉及电信增值服务,本公司建议用户与增值服务提供商确认相关费用问题。
+		</view>
+		<view class="lineSt">
+			4.2用户知晓并同意,用户购买电动车后暂不支持退、换服务,但法律、法规规定应当退换的情形除外。用户需理解并注意:用户在实际提取电动车前仍应尽到充分的注意及检查义务,确认车辆各部件的完整有效,熟悉电动车的性能和安全装置。对于发现故障的电动车,应放弃预定并立刻停止使用,否则本公司对因该故障车的使用所造成的一切后果不负任何责任。若用户签约提车,即表明已认同所订车辆本身的安全性和完整性。此时使用相关服务过程中发生任何意外或伤害事故,用户须自行承担。
+		</view>
+		<view class="lineSt">
+			4.3 购买产品费用包括:根据用户所选择的电动车类型应一次性缴纳的费用(即会员价)及该类型对应的还款期中每日应还金额。具体金额由系统根据电动车类型、交易方式等自动生成。
+		</view>
+		<view class="lineSt">
+			用户认可并同意本公司将依据用户的微信支付分、支付宝信用分等信用分的分数判定具体分期付款方案,即500—649分档,可办理首付款+分期购车,不能享受0首付+分期政策。650分档以上的,可办理0首付款+分期购车和首付款+分期购车政策,由用户自行选择付款方案。
+		</view>
+		<view class="lineSt">
+			4.4用户分期支付或一次性支付给电动车经营者的货款不包括用户使用标的车辆过程中发生的违章罚款、修理检测、损害赔偿等因使用行为产生的费用。
+		</view>
+		<view class="lineSt">
+			4.5还款方式:用户需通过本公司专门软件进行还款,该软件可以自由选择还款账户及还款平台,包括并不限于支付宝、微信、手机银行APP、云闪付等实名认证快捷支付金融平台。
+		</view>
+		<view class="lineSt">
+			4.6
+			用户知晓并同意,若用户违反分期付款规定,在约定付款日未付款的,每逾期一日用户应按照应付未付款项千分之五向电动车经营者支付迟延履行金,逾期超过7日的,视为用户根本违约,电动车经营者有权要求用户返还电动车并按照合同总价款的25%向其支付违约金,返还电动车时产生的费用由用户自行承担。若用户无法返还电动车(如电动车已毁损灭失),或者返还的电动车有损坏,用户应当全额赔偿,并按照合同总价款的25%向电动车经营者支付违约金。
+		</view>
+		<view class="lineSt strongItem">
+			5、产品交付及所有权转移
+		</view>
+		<view class="lineSt">
+			5.1
+			用户选择好相应电动车产品类型、注册APP、缴纳会员价并绑定还款平台后即可领取并产品。用户知晓并同意,在未付清款项之前,电动车所有权归电动车经营者所有,直至用户按约定在还款周期支付全部款项后,该电动车的所有权才转移至用户。
+		</view>
+		<view class="lineSt">
+			5.2 用户领取电动自行车后,其上路行驶需办理相关牌照、证件、驾驶资格等均应由用户自行办理并承担相关费用。
+		</view>
+		<view class="lineSt">
+			若因为牌照问题(包括但不限于牌照不合规、牌照缺失等)造成用户无法使用电动车,或造成电动车相关损失或灭失(包括但不限于政府将车辆扣押等),由用户自行承担一切责任。
+		</view>
+		<view class="lineSt">
+			因用户原因导致所选购车辆无法上路行驶或行驶后受行政处罚的情形,本公司不承担责任。
+		</view>
+		<view class="lineSt">
+			5.3违章罚款:骑行合约车辆时,请用户遵守交通法规、安全骑行。用车期间如有违章产生,请用户自行负责缴纳罚款;
+		</view>
+		<view class="lineSt strongItem">
+			6、用户义务
+		</view>
+		<view class="lineSt">
+			6.1 用户有义务按照协议约定及时足额支付会员价及单日运营费。
+		</view>
+		<view class="lineSt">
+			6.2用户在使用电动车时应自觉遵守《道路交通安全法》等相关法律、法规,服从交警的指挥和处理。凡违法骑行造成的处罚和损失,由用户自行承担,本公司均不负责。用户骑行过程中发生交通事故,用户应配合公安交通部门按《道路交通事故处理办法》有关规定处理。本公司建议用户购买适合自己的人身安全保险以备不时之需。如用户不幸发生任何意外或事故,除非用户能证明该意外或事故是因电动车本身的固有缺陷直接导致的,否则本公司不承担任何法律责任。
+		</view>
+		<view class="lineSt">
+			用户在使用电动车期间如与第三方发生纠纷应由纠纷双方自行解决,本公司不承担任何赔偿义务,如给本公司造成损失的,用户应向本公司承担赔偿义务。用户不得以此为由违反或拒绝遵守相关规定中之任何约定。
+		</view>
+		<view class="lineSt">
+			6.3 用户有义务接受本公司通过绿津APP平台自带的GPS定位功能对产品的行程监控及锁车服务。
+		</view>
+		<view class="lineSt">
+			6.4 用户有义务妥善保管本产品,不得人为破坏、故意丢弃所选产品。若因用户本人使用原因导致产品毁损的,本公司可以提供维修服务,但用户应支付相应修理费及零部件更换的费用,同时不免除用户运营周期内的单日运营费用。
+		</view>
+		<view class="lineSt">
+			6.5用户知晓并同意,电动车经营者已经授权本公司:
+		</view>
+		<view class="lineSt">
+			(1)用户逾期付款超过72小时,本公司有权通过技术手段采取锁车、停止充/放电等措施的,本公司有权采取前述保全措施直至用户付清逾期款项。
+		</view>
+		<view class="lineSt">
+			(2)用户逾期付款并经本公司催要、采取上述保全措施仍未付清逾期款项超过7天的(即自逾期付款时起计算共10天),本公司及电动车经营者有权根据GPS定位确定车辆位置并暂扣车辆。
+		</view>
+		<view class="lineSt">
+			(3)本公司或电动车经营者收回车辆后将通过APP及时通知用户缴纳逾期款项后领取车辆,若在通知宽限期内用户仍不缴费的,本公司及电动车经营者将视为用户终止协议,前期支付的购车首付款不予退还并按用户违约终止协议处理。
+		</view>
+		<view class="lineSt strongItem">
+			7、本公司承诺及保证
+		</view>
+		<view class="lineSt">
+			7.1
+			本公司承诺所提供的产品为全新、未使用、合格产品,符合国家产品质量标准并根据产品质量法提供相应的售后服务及三包质保。质保期内,若因产品质量问题导致用户无法正常使用电动车产品的,本公司负责免费维修或更换同类型产品。
+		</view>
+		<view class="lineSt">
+			针对分期付款购车用户,在合约期间,电动车经营者比照国家“三包”的要求对电动车进行质量维保(以下简称“三包维保”)。当使用本车时,请当场检验、调试并有权要求销售人员提供正确的操作办法及维护事项,提供有效票证。
+		</view>
+		<view class="lineSt">
+			7.2 本公司承诺APP所采用的定位功能仅作为监督用户还款所用,不作其他用途,非经司法机关、行政机关要求,非经用户本人许可,不向任何人或机构提供用户的行程信息。
+		</view>
+		<view class="lineSt">
+			7.3 本公司承诺第一时间响应用户需求,包括并不限于解决APP使用障碍、升级APP软件、协助用户定位车辆所在地。
+		</view>
+		<view class="lineSt">
+			7.4 本产品具备GPS定位功能,若发生盗窃、抢夺、抢劫等第三人原因导致丢失产品的情形,用户应第一时间联系本公司,同时应向公安机关报案,本公司将通过技术手段协助用户及公安机关查找产品所在地。
+		</view>
+		<view class="lineSt">
+			7.5 若产品丢失且通过定位技术无法寻回产品的,用户仍按照原有运营周期付费。若产品因不可抗力原因丢失且无法寻回的,按不可抗力条款处理。
+		</view>
+		<view class="lineSt">
+			7.6请不要私自对车体、线缆、电器件、发动机及其他有关该车结构性能进行改造。电缆线、电器件参数的私自修改,会造成整车性能下降或电器性能的失效及其他情况发生,缩短该车的使用寿命,性能得不到有效保障;由此产生的责任与损失,本公司和电动车经营者概不负责,一律由用户自行承担。
+		</view>
+		<view class="lineSt strongItem">
+			8、 著作权
+		</view>
+		<view class="lineSt">
+			8.1 用户同意本协议并成为绿津APP平台用户的行为,仅使得用户本人得以按照本协议的规范使用绿津APP平台的各项服务。用户与绿津APP平台或本公司之间并不存在其他授权、合作、代理、委托、雇佣等关系。
+		</view>
+		<view class="lineSt">
+			8.2
+			用户了解绿津APP平台和相关专有保密资料的知识产权归属于本公司,除非本公司另行声明,绿津APP平台出售服务包含的所有产品、技术、软件、程序、数据及其他信息(包括但不限于文字、图像、图片、照片、音频、视频、图表、色彩、版面设计、电子文档)的所有知识产权(包括但不限于版权、商标权、专利权、商业秘密等)及相关权利均归本公司所有。
+		</view>
+		<view class="lineSt">
+			用户了解绿津APP平台上的任何赞助广告或信息的知识产权归属于相关赞助广告或信息的提供商。用户了解并同意,未经知识产权所有人的书面明示授权,用户不得对上述知识产权实施包括但不限于出租、出借、出售、散布、复制、修改、转载、汇编、发表、出版、还原工程、反向汇编、反向编译,或以其它方式发现原始码等任何侵犯本公司权益的行为。
+		</view>
+		<view class="lineSt">
+			8.3绿津APP平台软件涉及的Logo、“绿津电动车”等文字、图形及其组成,以及“绿津电动车”其他标识、徵记、产品和服务名称均为本公司在中国和其它国家的商标,用户未经本公司书面授权不得以任何方式展示、使用或作其他处理,也不得向他人表明用户有权展示、使用、或作其他处理。
+		</view>
+		<view class="lineSt">
+			8.4用户理解并同意授权绿津APP平台在宣传和推广中使用用户的名称、商标、标识,但仅限于表明用户属于本公司的用户或合作伙伴。
+		</view>
+		<view class="lineSt strongItem">
+			9、 有限责任
+		</view>
+		<view class="lineSt">
+			9.1 由于互联网服务实时更新的性质,用户了解并同意,本公司不对下述内容承担任何保证责任,对该等原因对用户造成的任何损失,本公司不承担任何责任:
+		</view>
+		<view class="lineSt">
+			(1)绿津APP平台服务不受任何干扰、服务提供及时、安全可靠、不出现任何差错;
+		</view>
+		<view class="lineSt">
+			(2)使用绿津APP平台服务所取得的信息在任何情况下均正确可靠;
+		</view>
+		<view class="lineSt">
+			(3)用户经由绿津APP平台所购买的电动车符合用户的期望;
+		</view>
+		<view class="lineSt">
+			(4)是否通过绿津APP平台下载或取得的任何资料不会导致用户的个人电脑或移动设备有任何损坏或数据有任何流失。
+		</view>
+		<view class="lineSt">
+			9.2
+			本公司负责「按现状」和「可得到」的状态向用户提供绿津APP平台的服务。除本协议内所做出的保证或本公司以书面形式做出的其他明示保证外,本公司未向用户做出任何形式的保证或承诺,包括但不限于商业适售性、特定目的之适用性或其他明示或暗示的保证。
+		</view>
+		<view class="lineSt">
+			9.3本公司对绿津APP平台服务所涉的技术和信息的有效性,准确性,正确性,可靠性,质量,稳定,完整和及时性均不作承诺和保证。不保证本协议项下服务不受任何干扰,不保证电动车符合用户的期望,不保证通过绿津APP平台软件获得的任何资料不会导致用户的个人电脑或移动设备或任何数据有任何损害。
+		</view>
+		<view class="lineSt">
+			9.4不论在何种情况下,本公司均不对由于Internet连接故障,电脑,通讯或其他系统的故障,电力故障,罢工,劳动争议,暴乱,起义,骚乱,生产力或生产资料不足,火灾,洪水,风暴,爆炸,不可抗力,战争,政府行为,国际、国内法院的命令或第三方的不作为而造成的不能服务或延迟服务承担责任。
+		</view>
+		<view class="lineSt">
+			9.5不论是否可以预见,不论是源于何种形式的行为,本公司不对以下原因造成的任何特别的,直接的,间接的,惩罚性的,突发性的或有因果关系的损害或其他任何损害(包括但不限于利润或利息的损失,营业中止,资料灭失)承担责任。
+		</view>
+		<view class="lineSt">
+			(1)使用或不能使用本公司向用户免费提供、或赠送的、或附赠的各项产品或者服务;
+		</view>
+		<view class="lineSt">
+			(2)未经授权的存取或修改数据或数据的传输;
+		</view>
+		<view class="lineSt">
+			(3)第三方通过本公司软件所作的陈述或行为;
+		</view>
+		<view class="lineSt">
+			(4)其它与服务相关事件,包括疏忽等,所造成的损害。
+		</view>
+		<view class="lineSt">
+			9.6用户充分了解并同意:鉴于互联网体制及环境的特殊性,用户在服务中分享的信息及个人资料有可能会被他人复制、转载、擅改或做其它非法用途;用户在此已充分意识此类风险的存在,并确认此等风险应完全由用户自行承担,本公司对此不承担任何责任。
+		</view>
+		<view class="lineSt">
+			9.7用户了解并同意:在使用服务过程中可能存在来自任何他人的包括威胁性的、诽谤性的、令人反感的或非法的内容或行为或对他人权利的侵犯(包括知识产权)及匿名或冒名的信息的风险,该等风险应由用户自行承担,本公司对此不承担任何责任。
+		</view>
+		<view class="lineSt">
+			9.8用户理解安全骑行、停车的重要性,且保证在任何可能引起安全隐患的情况下均不得使用绿津APP平台服务,并同意一切因使用绿津APP平台服务而产生的纠纷和交通事故,均应由用户负责,并由权威部门认定的责任方承担责任,本公司概不负责赔偿。如有举证需要,本公司可以向有关部门提供相关资料作为证据。
+		</view>
+		<view class="lineSt">
+			9.9用户理解并同意:绿津APP平台所提供的功能受制于中国的交通法律法规和管理条例,即与本产品的功能和条例发生冲突时,应以各地的交通法律法规和管理条例为最高准则。任何在使用绿津APP平台服务过程中直接或间接违反当地交通法律法规和管理条例的行为,该后果应由用户承担。如有举证需要,本公司可以向有关部门提供相关数据作为证据。
+		</view>
+		<view class="lineSt">
+			9.10本公司使用第三方电子支付服务,处理用户使用本服务相关的付款时,本公司将获取与用户使用服务相关的特定交易明细,在使用这些信息时本公司将严格遵守相关法律法规和公司各项政策。
+		</view>
+		<view class="lineSt strongItem">
+			10、违约认定
+		</view>
+		<view class="lineSt">
+			10.1用户违约
+		</view>
+		<view class="lineSt">
+			发生如下情形之一的,视为用户违约:
+		</view>
+		<view class="lineSt">
+			(1)如本公司在用户认证信息复核过程中发现用户提供的认证信息不全、无效或虚假;
+		</view>
+		<view class="lineSt">
+		 (2)如用户发生危及交易安全或账户安全的行为;
+		</view>
+		<view class="lineSt">
+			(3)如用户未按时缴纳分期款项或绑定的支付账户余额不足以支付分期款项、经本公司(APP线上通知、短信通知、电话催收)通知后未补足余额或拖延支付的;
+		</view>
+		<view class="lineSt">
+			(4)如用户存在拆分、破坏产品的行为,包括并不限于毁坏定位器、毁坏电动车车身及其他部件、丢弃产品;
+		</view>
+		<view class="lineSt">
+			(5)如用户采用不正当手段谋取利益的行为,包括向本公司工作人员及/或其关联人士提供财物、消费、款待或商业机会,或通过其他手段谋取不正当利益;
+		</view>
+		<view class="lineSt">
+			(6)如用户扰乱绿津APP平台的秩序,以任何方式,刻意规避绿津APP平台的各类规则或市场管控措施,或以不正当的方式获取、使用绿津APP平台资源的行为;
+		</view>
+		<view class="lineSt">
+			(7)如用户违反中国相关法律法规的规定;
+		</view>
+		<view class="lineSt">
+			(8)如用户违反本协议的其他规定。
+		</view>
+		<view class="lineSt">
+			10.2
+			为适应互联网平台发展和满足海量用户对高效优质服务的需求,用户理解并同意,本公司可在绿津APP平台规则中约定违约认定的程序和标准。如:本公司可依据用户的用户数据与海量用户数据的关系来认定用户是否构成违约;用户有义务对用户的数据异常现象进行充分举证和合理解释,否则将被认定为违约。
+		</view>
+		<view class="lineSt">
+			10.3 为保障其他用户或绿津APP平台的正当权益,维持市场正常运营秩序,在用户违规处理期间本公司按照本规则规定的情形对用户采取违规处理措施,本公司没有义务在采取违规处理前通知用户:
+		</view>
+		<view class="lineSt">
+			(1)停止购车服务:指停止认证用户通过绿津APP平台使用电动自行车、电动摩托车的权利;
+		</view>
+		<view class="lineSt">
+			(2)关闭账户:指删除用户的账户或停止用户的所有权限,并将用户列入黑名单,不再向用户提供任何服务;
+		</view>
+		<view class="lineSt">
+			(3)公示警告:指在绿津APP平台的管理系统等位置对其正在被执行的处理进行公示;
+		</view>
+		<view class="lineSt">
+			本公司可将对用户上述违约行为处理措施信息以及其他经国家行政或司法机关生效法律文书确认的违法信息在绿津APP平台上予以公示。
+		</view>
+		<view class="lineSt strongItem">
+			11、赔偿责任
+		</view>
+		<view class="lineSt">
+			11.1如用户的行为使本公司遭受损失(包括自身的直接经济损失、商誉损失及对外支付的赔偿金、和解款、律师费、诉讼费等间接经济损失),用户应赔偿本公司的上述全部损失。
+		</view>
+		<view class="lineSt">
+			如用户的行为使本公司遭受第三人主张权利,本公司可在对第三人承担金钱给付等义务后就全部损失向用户追偿。
+		</view>
+		<view class="lineSt">
+			11.2如用户向本公司的雇员或顾问等提供实物、现金、现金等价物、劳务、旅游等价值明显超出正常商务洽谈范畴的利益,则可视为用户存在商业贿赂行为。发生上述情形的,本公司可立即终止与用户的所有合作并向用户收取违约金及/或赔偿金,该等金额以本公司因用户的贿赂行为而遭受的经济损失和商誉损失作为计算依据。
+		</view>
+		<view class="lineSt strongItem">
+			12、协议的变更
+		</view>
+		<view class="lineSt">
+			12.1由于互联网的高速发展,本公司保留不经事先通知为维修、升级或其他目的暂停或更改本服务任何部分的权利。
+		</view>
+		<view class="lineSt">
+			12.2本公司可根据国家法律法规变化及维护交易秩序、保护消费者权益需要,不时修改本协议、补充协议,变更后的协议、补充协议(下称“变更事项”)将通过法定程序并以本协议第13条约定的方式通知用户。
+		</view>
+		<view class="lineSt">
+			12.3如用户不同意变更事项,用户有权于变更事项确定的生效日前联系本公司反馈意见。如反馈意见得以采纳,本公司将酌情调整变更事项。
+		</view>
+		<view class="lineSt">
+			12.4如用户对已生效的变更事项仍不同意的,用户应当于变更事项确定的生效之日起停止使用绿津APP平台服务,变更事项对用户不产生效力;如用户在变更事项生效后仍继续使用绿津APP平台服务,则视为用户同意已生效的变更事项。
+		</view>
+		<view class="lineSt strongItem">
+			13、 通知
+		</view>
+		<view class="lineSt">
+			13.1用户同意本公司以以下合理的方式向用户送达各类通知:
+		</view>
+		<view class="lineSt">
+			(1)绿津APP平台公示的文案;
+		</view>
+		<view class="lineSt">
+			(2)站内短信、绿津APP平台弹出消息、客户端推送的消息;
+		</view>
+		<view class="lineSt">
+			(3)根据用户预留于绿津APP平台的联系方式发出的电子邮件、短信、函件等。
+		</view>
+		<view class="lineSt">
+			13.2本公司向用户发出的任何通知,可采用电子邮件、网站或软件页面公开区域公告、个人网络区域提示、手机短信或常规信件等方式,且该等通知应自发送之日视为已向用户送达或生效。
+		</view>
+		<view class="lineSt">
+			13.3用户同意,用户向绿津APP平台发出的任何通知应发至本公司对外正式公布的联系信息,或使用其他本公司认可的其他通知方式进行送达。该等通知以本公司实际收到日为送达日。
+		</view>
+		<view class="lineSt strongItem">
+			14、协议的终止
+		</view>
+		<view class="lineSt">
+			14.1用户发起终止
+		</view>
+		<view class="lineSt">
+			用户有权通过以下任一方式终止本协议:
+		</view>
+		<view class="lineSt">
+			(1)用户不再继续使用绿津APP平台服务;
+		</view>
+		<view class="lineSt">
+			(2)变更事项生效前用户停止使用并明示不愿接受变更事项的。
+		</view>
+		<view class="lineSt">
+			14.2 用户终止协议的效果
+		</view>
+		<view class="lineSt">
+			用户因自身原因提前终止本协议,则需一次性支付运营周期中尚未支付的分期款项,并承担违约金,违约金标准为所选购车辆市场价值的20%。
+		</view>
+		<view class="lineSt">
+			14.3本公司发起的终止
+		</view>
+		<view class="lineSt">
+			14.3.1用户理解并同意,鉴于互联网服务的特殊性,本公司有权随时变更、中止、终止或致使中止终止服务或其任何部分(包括收费服务及免费服务);对于免费服务之变更、中止或终止,本公司无需向用户发出通知,也无需对任何用户或任何第三方承担任何责任;如变更、中止或终止的网络服务属于收费服务,本公司应当在变更、中止或终止之前事先通知用户,并应向受影响的用户提供等值的替代性的收费服务,如用户不愿意接受替代性的收费服务,就该用户已经向本公司支付的服务费,本公司应当按照该用户实际使用相应收费服务的情况扣除相应服务费之后将剩余的服务费退还给该用户。
+		</view>
+		<view class="lineSt">
+			14.3.2用户理解并同意,本公司可能定期或不定期地对提供本服务的平台设备、设施和软硬件进行维护或检修,如因此类情况而造成收费服务在合理时间内中止,本公司无需承担责任,但应尽可能事先进行通告。
+		</view>
+		<view class="lineSt">
+			14.3.3出现以下情况时,本公司可以本协议第11条的所列的方式通知用户终止本协议:
+		</view>
+		<view class="lineSt">
+			(1)用户违反本协议约定,本公司依据违约条款终止本协议的;
+		</view>
+		<view class="lineSt">
+			(2)用户的用户行为存在异常,本公司合理怀疑用户可能存在违反本协议约定的行为,如果不终止本协议则可能对绿津APP平台或其他用户造成不利影响的;
+		</view>
+		<view class="lineSt">
+			(3)用户盗用他人账户、发布违禁信息、骗取他人财物、采取不正当手段谋利等行为,本公司依据本协议对用户的账户予以查封的;
+		</view>
+		<view class="lineSt">
+			(4)除上述情形外,因用户多次违反绿津APP平台相关规定且情节严重,本公司依据本协议对用户的账户予以查封的;
+		</view>
+		<view class="lineSt">
+			(5)用户运营期结束后停止使用该账户达【2】年的;
+		</view>
+		<view class="lineSt">
+			(6)其它应当终止服务的情况。
+		</view>
+		<view class="lineSt">
+			14.4本公司终止协议后的处理
+		</view>
+		<view class="lineSt">
+			14.4.1本协议终止后,除法律有明确规定外,本公司无义务向用户或用户指定的第三方披露用户账户中的任何信息。
+		</view>
+		<view class="lineSt">
+			14.4.2本协议终止后,本公司仍享有下列权利:
+		</view>
+		<view class="lineSt">
+			14.4.3继续保存用户留存于绿津APP平台的各类信息;
+		</view>
+		<view class="lineSt">
+			14.4.4对于用户过往的违约行为导致本公司损失的,本公司可依据本协议向用户追究违约责任,并要求用户承担损害赔偿责任,包括并不限于直接经济损失、商誉损失、对外支付的赔偿金、解款、律师费、诉讼费等。
+		</view>
+		<view class="lineSt strongItem">
+			15、不可抗力
+		</view>
+		<view class="lineSt">
+			15.1&nbsp;&nbsp;
+			“不可抗力”是指不可避免的非协议一方或双方的错误和疏忽造成的超出控制能力的原因,包括(但不限于)天灾、战争(宣布或不宣布的)、暴乱、革命、民众骚乱、火灾、流行病(如新冠疫情)等,但不包括未预见到的制造困难、供应困难(除非由不可抗力造成)、劳力短缺、罢工。
+		</view>
+		<view class="lineSt">
+			15.2&nbsp;&nbsp;
+			因不可抗力阻碍了合同全面或部分正常执行,受不可抗力影响的一方应在该事件发生后二十四(24)小时内通过传真或电报的形式通知另一方,并在不可抗力事件发生后十(10)天内通过13条通知方式寄发有关职能部门签发的该事件的证明。
+		</view>
+		<view class="lineSt">
+			15.3&nbsp;&nbsp;
+			在不可抗力事件按上述第16.2款被通知和证实后,双方应协商本协议的后续履行方案。由于不可抗力的原因,从发生到结束的整个期间,而使履约推迟或不能执行,双方都无权向对方提出违约金、利益、损害和其它赔偿的索赔要求。
+		</view>
+		<view class="lineSt">
+			15.4&nbsp;&nbsp; 由于不可抗力结果造成产品灭失但运营期尚未结束的,双方协商确定后续运营方案。
+		</view>
+		<view class="lineSt strongItem">
+			16、法律适用、管辖与其他
+		</view>
+		<view class="lineSt">
+			16.1 本协议之订立、生效、解释、修订、补充、终止、执行与争议解决均适用中华人民共和国大陆地区法律;如法律无相关规定的,参照商业惯例及/或行业惯例。
+		</view>
+		<view class="lineSt">
+			16.2 用户因使用绿津APP平台服务所产生及与绿津APP平台服务有关的争议,由本公司与用户协商解决。协商不成时,任何一方均在广西壮族自治区向有管辖权的法院会提起诉讼;诉讼结果对双方均有约束力。
+		</view>
+		<view class="lineSt">
+			16.3 本协议任一条款被视为废止、无效或不可执行,该条应视为可分的且并不影响本协议其余条款的有效性及可执行性。
+		</view>
+		<view class="lineSt">
+			16.4 本协议的标题仅供阅读方便而设,不属于协议的条款,不具有任何法律效果。
+		</view>
+		<view class="lineSt">
+			16.5
+			任何一方当事人放弃或者延迟行使其在本协议项下的全部或部分权利的,不应视为其放弃本协议项下的任何其他权利或与此类似的一切权利。本公司于用户过失或违约时放弃本协议规定的权利的,不得视为其对用户的其他或以后同类之过失或违约行为弃权。
+		</view>
+		<view class="lineSt">
+			16.6 本协议构成各方之间就本协议内容所达成的完全合意;本协议签署前存在的、或与本协议相矛盾或抵触的一切合意,无论其为口头、书面或其他形式均归于无效。
+		</view>
+		<view class="lineSt">
+			16.7 如果本协议及其附件的任何条款因适用法律而无效或不可强制执行,则该条款应视为自始无效,且不影响本协议其他条款的效力。在此情形下,各方应当在合法范围内协商确定新的条款,以保证最大限度地实现原有条款的意图。
+		</view>
+		<view class="lineSt">
+			16.8本公司有权根据业务调整情况将本协议项下的全部权利义务一并转移给其关联公司,转让将以本协议规定的方式通知,用户承诺对此不持有异议。
+		</view>
+		<view class="lineSt">
+			&nbsp;
+		</view>
+		<view class="lineSt">
+			<br />
+		</view>
+	</view>
+</template>
+
+<script>
+</script>
+
+<style lang="scss">
+	.content {
+		padding: $page-row-spacing;
+		line-height: 2;
+		font-size: $font-base;
+	}
+
+	.title {
+		font-size: $font-lg + 6rpx;
+		font-weight: bold;
+		text-align: center;
+	}
+
+	.lineSt {
+		text-indent: 2em;
+	}
+	.strongItem{
+		font-weight: bold;
+		font-size: $font-lg;
+	}
+</style>

+ 68 - 0
pages/public/workwork.vue

@@ -0,0 +1,68 @@
+<template>
+	<view class="content">
+		<view class=" " @click="openPhone">
+			浙江绿津智能科技有限公司
+		</view>
+		<view class="margin-t-10">
+			联系地址:浙江,台州,路桥区 央钿大厦20楼
+		</view>
+		<view class="margin-t-10" @click="openPhone">
+			客服热线:<text>400-699-0899</text>
+		</view>
+		<view @click="openWWW" class="margin-t-10">
+			公司网址:<text>www.guaiyouyou.com</text>	
+		</view>
+		<view class="margin-t-10">
+			<text>协议条例:</text>		
+			<text class="xy" @click="navTo('/pages/public/privacyAgreement')">《隐私协议》</text>		
+			<text class="xy" @click="navTo('/pages/public/userAgreement')">《用户协议》</text>		
+		</view>
+		<view class="text margin-t-30">
+			绿津是由浙江绿津智能科技有限公司打造的新一代智能电动车品牌,电慧安是一家集智能设备制造、软件开发、销售贸易、物带动互、社会服务为一体的高科技企业,公司以便、惠、安为核心发展理念,以做物联网产业的推动者,互联网行业的服务者为立企初衷。 公司通过不断创新商业模式,打造产品和服务品牌,以生产销售智能型电动车为主,研发全智能电动车软硬件配套,打造绿津自主品牌,致力于成为新一代智能电动车领域的第一品牌。
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		onLoad(option) {
+			
+		},
+		methods: {
+			navTo(url){
+				uni.navigateTo({
+					url,
+				});
+			},
+			openPhone(){
+				uni.makePhoneCall({
+					phoneNumber:'4006990899'
+				});
+			},
+			openWWW(){
+				// #ifdef H5
+				window.open('http://www.guaiyouyou.com')
+				// #endif
+				// #ifdef APP
+				plus.runtime.openURL('http://www.guaiyouyou.com');
+				// #endif
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content{
+		padding: 30rpx;
+		color: $font-color-light;
+		font-size: 28rpx;
+	}
+	.text{
+		text-indent: 2em;
+		color: $font-color-light;
+		font-size: 28rpx;
+	}
+	.xy{
+		color: $color-green;
+	}
+</style>

+ 382 - 0
pages/public/wxLogin.vue

@@ -0,0 +1,382 @@
+<template>
+	<view class="content">
+		<!-- #ifdef MP -->
+		<view class="flex-center">
+			<view class="logo-img-box">
+				<image class="logo-img" src="../../static/image/logo.png" mode="scaleToFill"></image>
+				<button class="userInfo flex-center" type="warn" @tap="loding?'':userInfoData()">
+					<image class="icon margin-r-10" src="../../static/icon/weichat.png" mode="scaleToFill"></image>
+					<text>微信授权登录</text>
+				</button>
+				<agreement @checkedChange='changeChecked'></agreement>
+			</view>
+		</view>
+		<!-- <view class="info flex">
+			<view>
+				登录代表你已同意
+			</view>
+			<view class="text" @click="agreement">用户协议,</view>
+			<view class="text" @click="privacy">隐私协议</view>
+		</view> -->
+		<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="outUser">取消</button>
+					<button class="weixin" open-type="getPhoneNumber" @getphonenumber="PhoneNumber">授权</button>
+				</view>
+			</view>
+		</view>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import {
+		loginWinxin
+	} from '@/utils/wxAuthorized';
+	// #endif
+	// #ifdef MP-WEIXIN
+	import {
+		wechatMpAuth
+	} from '@/api/wx';
+	import {
+		loginWinxinMp
+	} from '@/utils/wxMinProgram';
+	// #endif
+	import {
+		mapMutations
+	} from 'vuex';
+	import {
+		getUserInfo,
+	} from '@/api/login.js';
+	import {
+		binding
+	} from '@/api/set.js';
+	import agreement from "./agreement.vue"
+	export default {
+		components: {
+			agreement
+		},
+		data() {
+			return {
+				checked: false,
+				userInfo: {}, //授权用户信息
+				code: '', //授权code
+				loding: false, //判断是否在点击中
+				MaskShow: false, // 手机号授权弹窗
+				cache_key: ''
+			};
+		},
+		onLoad(option) {
+			console.log(option, '船只');
+			this.loadData();
+		},
+		methods: {
+			...mapMutations('user', ['login', 'setUserInfo', 'logout']),
+			changeChecked(check) {
+				this.checked = check;
+			},
+			loadData() {
+				let obj = this;
+				// #ifdef H5
+				loginWinxin();
+				// #endif
+				// #ifdef MP-WEIXIN
+				loginWinxinMp().then(() => {
+					wx.login({
+						success(e) {
+							console.log(e, 'loginWinxinMp');
+							obj.code = e.code;
+						},
+						fill: function(e) {
+							console.log(e)
+						}
+					})
+				});
+				// #endif
+			},
+			// #ifndef H5
+			// 用户确认授权
+			userInfoData(e) {
+				const that = this;
+				if (!that.checked) {
+					uni.showModal({
+						title: '提示',
+						content: '请先阅读同意《绿津服务》《隐私条例》',
+						showCancel: false,
+					});
+					return;
+				}
+				// #ifdef MP-WEIXIN
+				if (!this.loding) {
+					wx.getUserProfile({
+						desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+						success: res => {
+							that.userInfo = res;
+							that.loadMp();
+						},
+						fail: err => {
+							obj.loding = false;
+							uni.showToast({
+								title: '您拒绝了请求,不能正常使用小程序',
+								icon: 'error',
+								duration: 2000
+							});
+							return;
+						}
+					});
+				}
+				// #endif
+			},
+			// #endif
+			// #ifdef MP-WEIXIN
+			// 退出用户登录
+			outUser() {
+				this.logout();
+				uni.switchTab({
+					url: '/pages/index/index'
+				})
+			},
+			// 小程序授权登录
+			loadMp(option) {
+				let obj = this;
+				obj.loding = true;
+				// 获取登录授权页数据
+				let user = obj.userInfo;
+				// 获取推广人id
+				// #ifndef MP
+				let spread_spid = uni.getStorageSync('spread') || '';
+				// #endif
+				// #ifdef MP
+				let spread_code = uni.getStorageSync('spread_code') || '';
+				// #endif
+				uni.showLoading({
+					title: '授权中',
+					mask: true
+				});
+
+				wechatMpAuth({
+						code: obj.code,
+						iv: user.iv,
+						encryptedData: user.encryptedData,
+						// #ifndef MP
+						spread_spid: spread_spid,
+						// #endif
+						// #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();
+					});
+
+			},
+			wchatAuth(data) {
+				let obj = this;
+				obj.cache_key = data.cache_key;
+				// 保存token
+				uni.setStorageSync('token', data.token);
+				obj.GetUser().then((data) => {
+					console.log(data, '返回用户的数据');
+					try {
+						uni.hideLoading();
+						obj.login();
+						// 保存返回用户数据
+						obj.setUserInfo(data);
+						console.log();
+						if (data.phone == null || !data.phone) {
+							obj.MaskShow = true;
+						} else {
+							obj.ToIndex();
+						}
+					} catch (e) {
+						console.log(e, '登录');
+					}
+				}).catch((e) => {
+					uni.hideLoading();
+				})
+			},
+			// #endif
+			ToIndex() {
+				// 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'
+				// 				});
+				// 			}
+				// 		});
+				// 	}
+				// });
+				uni.switchTab({
+					url: '/pages/index/index'
+				});
+			},
+			// 获取用户数据
+			GetUser() {
+				// 获取用户基础信息
+				return new Promise((ok, error) => {
+					getUserInfo({})
+						.then(({
+							data
+						}) => {
+							ok(data)
+						})
+						.catch(e => {
+							error(e)
+						});
+				})
+			},
+			// #ifdef MP
+			// 绑定手机号
+			PhoneNumber(e) {
+				let obj = this;
+				console.log(e, '授权返回数据');
+				obj.MaskShow = false;
+				(obj.iv = e.detail.iv), (obj.encryptedData = e.detail.encryptedData);
+				uni.setStorageSync('code', obj.code);
+				let requestData = {
+					flag: 1,
+					cache_key: obj.cache_key,
+					code: obj.code,
+					iv: obj.iv,
+					encryptedData: obj.encryptedData
+				}
+				obj.bindPhone(requestData).then((ar) => {
+
+					if (ar.data.is_bind == 1) {
+						uni.showToast({
+							title:e.msg,
+							icon:"none"
+						})
+					} else {
+						obj.GetUser().then((data) => {
+							obj.setUserInfo(data);
+							obj.ToIndex();
+						});
+					}
+
+				})
+			},
+			// 绑定手机号
+			bindPhone(data) {
+				// 获取用户基础信息
+				return new Promise((ok, error) => {
+					binding(data)
+						.then(function(e) {
+							ok(e)
+						})
+						.catch(e => {
+							error(e)
+						});
+				})
+
+			}
+			// #endif
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		height: 100%;
+
+		/* #ifdef MP-WEIXIN */
+		.flex-center {
+			height: 100%;
+			text-align: center;
+			line-height: 1;
+		}
+		/* #endif */
+	}
+	/* #ifdef MP-WEIXIN */
+	
+	.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: $base-color;
+		width: 40%;
+		color: #ffffff;
+		border-radius: 50rpx;
+		border: none;
+		margin: 0 20rpx;
+	}
+
+	.logo-img {
+		width: 385rpx;
+		height: 385rpx;
+		margin: 0 auto;
+		border-radius: 50rpx;
+	}
+
+	.userInfo {
+		margin: 0 100rpx;
+		margin-top: 50rpx;
+		padding: 30rpx 50rpx;
+		color: #ffffff;
+		border-radius: 99rpx;
+		background-color: $base-color !important;
+		.icon{
+			width: 55rpx;
+			height: 55rpx;
+		}
+	}
+	/* #endif */
+</style>

+ 318 - 0
pages/set/address.vue

@@ -0,0 +1,318 @@
+<template>
+	<view class="content b-t">
+		<!-- #ifdef H5 -->
+		<empty src="../../static/error/emptyAddress.png" v-if="addressList.length === 0"></empty>
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<empty src="../static/error/emptyAddress.png" v-if="addressList.length === 0"></empty>
+		<!-- #endif -->
+		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
+			<view class="wrapper">
+				<view class="address-box">
+					<text class="name">{{ item.real_name }}</text>
+					<text class="mobile">{{ item.phone }}</text>
+				</view>
+				<view class="u-box">
+					<text class="address">{{ item.province + item.city + item.district }} {{ item.detail }}</text>
+				</view>
+			</view>
+			<view class="buttom">
+				<view class="default-buttom" @click.stop="defaultUp(item,index)">
+					<image class="checkedImg" v-if="item.is_default == 1" src="../../static/icon/addressIconXz.png"
+						mode="widthFix"></image>
+					<view v-else class="checkbox">
+
+					</view>
+					<text class="text">设为默认地址</text>
+				</view>
+				<view class="operation">
+					<view @click.stop="addAddress('edit', item)" class="flex">
+						<image class="icon" src="../../static/icon/addressIcon1.png" mode="widthFix"></image>
+						<text class="text">编辑</text>
+					</view>
+					<view class="blank"></view>
+					<view @click.stop="delAddress(item)" class="flex">
+						<image class="icon" src="../../static/icon/addressIcon2.png" mode="widthFix"></image>
+						<text class="text">删除</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- #ifdef H5 || MP -->
+		<view class="add-btn two base-buttom" @click="addWxAddress">获取微信地址</view>
+		<!-- #endif -->
+		<view class="add-btn one base-buttom" @click="addAddress('add')">新增地址</view>
+	</view>
+</template>
+
+<script>
+	import {
+		getAddressList,
+		setAddressDefault,
+		addressDel,
+		addressEdit
+	} from '@/api/user.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	import {
+		weixindata
+	} from "../../utils/wxAuthorized.js"
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
+	// #endif
+	export default {
+		data() {
+			return {
+				source: 0,
+				addressList: []
+			};
+		},
+		onLoad(option) {
+			this.source = option.source || 0
+			this.loadAddress();
+		},
+		methods: {
+			// 加载地址
+			loadAddress() {
+				getAddressList({
+					page: 1,
+					limit: 100
+				}).then(({
+					data
+				}) => {
+					this.addressList = data;
+				});
+			},
+			// 设为默认地址
+			defaultUp(data, ind) {
+				this.addressList = this.addressList.map((e) => {
+					e.is_default = 0
+					return e
+				})
+				this.addressList[ind].is_default = 1
+				setAddressDefault({
+					id: data.id
+				}).then(({
+					data
+				}) => {
+					this.loadAddress();
+				}).catch((e) => {
+					console.log(e);
+				});
+			},
+			//删除地址
+			delAddress(item) {
+				addressDel({
+					id: item.id
+				}).then(({
+					data
+				}) => {
+					uni.showToast({
+						title:"删除成功",
+						icon:"none"
+					})
+				})
+				let s = this.addressList.indexOf(item);
+				this.addressList.splice(s, 1);
+			},
+			//选择地址
+			checkAddress(item) {
+				if (this.source == 1) {
+					//prePage()获取上一页实例,在App.vue定义
+					prePage().addressData = item;
+					uni.navigateBack();
+				}
+			},
+			// 添加地址
+			addAddress(type, item) {
+				uni.navigateTo({
+					url: `/pages/set/addressManage?type=${type}&data=${JSON.stringify(item)}`
+				});
+			},
+			//添加或修改成功之后回调
+			refreshList() {
+				// 重新加载地址
+				this.loadAddress()
+			},
+			// #ifdef H5
+			// 公众号获取地址
+			addWxAddress() {
+				let that = this;
+				weixindata().then(() => {
+					weixinObj.openAddress({
+						success: function(data) {
+							that.addAddressOn(data)
+						},fail(e){
+							console.log(e,'授权错误');
+						}
+					});
+				})
+			},
+			// #endif
+			// #ifdef MP
+			addWxAddress() {
+				let that = this;
+				wx.chooseAddress({
+					success: function(data) {
+						console.log('获取地址',data);
+						that.addAddressOn(data)
+					},fail(e){
+						console.log(e);
+					}
+				});
+			},
+			// #endif
+			// #ifdef H5 || MP
+			addAddressOn(data) {
+				let that = this;
+				addressEdit({
+					real_name: data.userName,
+					phone: data.telNumber,
+					address: {
+						province: data.provinceName,
+						city: data.cityName,
+						district: data.countyName
+					},
+					detail: data.detailInfo,
+					type: 1
+				}).then(function(e) {
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(function() {
+						that.loadAddress();
+					}, 800);
+				});
+			
+			}
+			// #endif
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		padding-bottom: 120rpx;
+		padding-top: 20rpx;
+		background-color: $page-color-base;
+	}
+
+	.content {
+		position: relative;
+	}
+
+	.list {
+		align-items: center;
+		padding: 20rpx 30rpx;
+		background: #fff;
+		margin: 20rpx;
+		margin-top: 0;
+
+		.buttom {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding-top: 10rpx;
+
+			.checkbox,
+			.checkedImg {
+				height: 36rpx;
+				width: 36rpx;
+				border-radius: 100rpx;
+			}
+
+			.checkbox {
+				border: 1px solid $font-color-light;
+			}
+
+			.checkbox.checked {
+				color: $base-color;
+			}
+
+			.default-buttom {
+				display: flex;
+				align-items: center;
+			}
+
+			.operation {
+				display: flex;
+				align-items: center;
+
+				.blank {
+					width: 30rpx;
+				}
+
+				.icon {
+					width: 32rpx;
+				}
+			}
+
+			.text {
+				padding-left: 10rpx;
+				font-size: 24rpx;
+				color: #666666;
+			}
+		}
+	}
+
+	.wrapper {
+		display: flex;
+		flex-direction: column;
+		flex: 1;
+		border-bottom: 1px solid #f0f0f0;
+		padding-bottom: 20rpx;
+	}
+
+	.address-box {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+
+		.address {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.mobile {
+			font-size: $font-base;
+			color: rgba(51, 51, 51, 1);
+		}
+	}
+
+	.u-box {
+		font-size: $font-base;
+		color: $font-color-light;
+		margin-top: 16rpx;
+
+		.name {
+			margin-right: 30rpx;
+		}
+	}
+
+	.icon-bianji {
+		display: flex;
+		align-items: center;
+		height: 80rpx;
+		font-size: 40rpx;
+		color: $font-color-light;
+		padding-left: 30rpx;
+	}
+
+	.add-btn {
+		position: fixed;
+		z-index: 95;
+		left: 30rpx;
+		right: 30rpx;
+
+		&.one {
+			bottom: 16rpx;
+		}
+
+		&.two {
+			bottom: 136rpx;
+			background-color: $font-color-disabled;
+		}
+	}
+</style>

+ 250 - 0
pages/set/addressManage.vue

@@ -0,0 +1,250 @@
+<template>
+	<view class="content">
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">联系人</text>
+					</view>
+					<view class="right flex">
+						<input class="input" type="text" v-model="addressData.name" placeholder="收货人姓名"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">手机号</text>
+					</view>
+					<view class="right flex">
+						<input class="input" type="number" v-model="addressData.mobile" placeholder="收货人手机号码"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">地址</text>
+					</view>
+					<view class="right flex">
+						<pickerAddress class="input" @change="onCityClick">{{addressDetail||'请选择地址'}}</pickerAddress>
+					</view>
+				</view>
+				<view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">门牌号</text>
+					</view>
+					<view class="right flex">
+						<input class="input" type="text" v-model="addressData.area" placeholder="楼号、门牌"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+			</view>
+
+		</view>
+		<uni-list class="margin-t-20 margin-l-30 margin-r-30" style="border-radius: 20rpx;">
+			<uni-list-item
+				title="设为默认"
+				:switch-checked="addressData.default"
+				:show-switch="true"
+				:show-arrow="false"
+				switch-color="#5dbc7c"
+				@switchChange="switchChange"
+			></uni-list-item>
+		</uni-list>
+
+		<view class="base-buttom" @click="confirm">提交</view>
+	</view>
+</template>
+
+<script>
+	import pickerAddress from '@/components/wangding-pickerAddress/wangding-pickerAddress.vue';
+	import {
+		addressEdit
+	} from '@/api/user.js';
+	import {
+		prePage
+	} from '@/utils/rocessor.js';
+	export default {
+		components: {
+			pickerAddress,
+		},
+		data() {
+			return {
+				code: '',
+				addressDetail: '',
+				addressData: {
+					name: '',
+					mobile: '',
+					address: {
+						province: '',
+						city: '',
+						district: ''
+					},
+					area: '',
+					default: false
+				},
+			};
+		},
+		onLoad(option) {
+			let title = '新增收货地址';
+			if (option.type === 'edit') {
+				title = '编辑收货地址';
+				let data = JSON.parse(option.data);
+				console.log(data);
+
+				this.addressData = {
+					name: data.real_name,
+					mobile: data.phone,
+					address: {
+						province: data.province,
+						city: data.city,
+						district: data.district
+					},
+					area: data.detail,
+					default: data.is_default == 1,
+					id: data.id
+				};
+				this.addressDetail = data.province + data.city + data.district;
+			}
+			this.manageType = option.type;
+			uni.setNavigationBarTitle({
+				title
+			});
+		},
+		methods: {
+			// 选中城市切换
+			onCityClick({
+				data
+			}) {
+				let address = this.addressData.address;
+				address.province = data[0];
+				address.city = data[1];
+				address.district = data[2];
+				this.addressDetail = data.join('');
+			},
+			//地图选择地址
+			chooseLocation() {
+				uni.chooseLocation({
+					success: data => {
+						console.log(data);
+						this.addressData.addressName = data.name;
+						this.addressData.address = data.name;
+					}
+				});
+			},
+			// 设置是否为默认地址
+			switchChange(e) {
+				this.addressData.default = e.value;
+			},
+			//提交
+			confirm() {
+				let obj = this;
+				let data = this.addressData;
+				if (!data.name) {
+					uni.showToast({
+						title:"请填写收货人姓名",
+						icon:"none"
+					})
+					return;
+				}
+				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
+					uni.showToast({
+						title:"请输入正确的手机号码",
+						icon:"none"
+					})
+					return;
+				}
+				if (!data.address) {
+					uni.showToast({
+						title:"请在地图选择所在位置",
+						icon:"none"
+					})
+					return;
+				}
+				if (!data.area) {
+					uni.showToast({
+						title:"请填写门牌号信息",
+						icon:"none"
+					})
+					return;
+				}
+
+				//prePage()获取上一页实例,可直接调用上页所有数据和方法,在App.vue定义
+				addressEdit({
+					real_name: data.name,
+					phone: data.mobile,
+					address: {
+						province: data.address.province,
+						city: data.address.city,
+						district: data.address.district
+					},
+					detail: data.area,
+					is_default: data.default,
+					id: data.id || "",
+					type: 1
+				}).then(function(e) {
+					prePage().refreshList();
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(function() {
+						uni.navigateBack();
+					}, 800);
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+	}
+	.content{
+		padding-top: 30rpx;
+	}
+	.listBox {
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.list {
+		.input {
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+			width: 100%;
+			flex-grow: 1;
+		}
+
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+
+			.img {
+				width: 26rpx;
+			}
+
+			.code {}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+</style>

+ 235 - 0
pages/set/password.vue

@@ -0,0 +1,235 @@
+<template>
+	<view class="container">
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">手机号</text>
+					</view>
+					<view class="right flex">
+						<input class="input" placeholder="请输入手机号" type="text" v-model="account"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">验证码</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="captcha" type="text" placeholder="请填写验证码"
+							placeholder-class="placeholder" />
+						<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">新密码</text>
+					</view>
+					<view class="right flex">
+						<input class="input" placeholder="请输入新密码" type="text" v-model="password"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">确认密码</text>
+					</view>
+					<view class="right flex">
+						<input class="input" placeholder="再次输入密码" type="text" v-model="dbPassword"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- <view class="row b-b">
+			<text class="tit">手机号</text>
+			<input class="input" v-model="account" type="text" placeholder="请填写手机号" placeholder-class="placeholder" />
+		</view>
+		
+		<view class="row b-b">
+			<text class="tit">新密码</text>
+			<input class="input" v-model="password" type="password" placeholder="请填写新密码" placeholder-class="placeholder" />
+		</view> -->
+		<view class="base-buttom" :class="{'bg-gray':loding}" @click="loding?'':confirm()">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		verify
+	} from '@/api/login.js';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		registerReset
+	} from '@/api/set.js';
+	export default {
+		data() {
+			return {
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+				account: '', //原密码
+				dbPassword: '', //对比密码
+				password: '', //新密码
+				loding: false, //是否载入中
+			};
+		},
+		computed: {
+			...mapState(['userInfo'])
+		},
+		onLoad() {
+			if (this.userInfo.phone == null) {
+				this.account = '';
+			} else {
+				this.account = this.userInfo.phone;
+				this.show = false;
+			}
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		methods: {
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.account == '') {
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
+					return;
+				}
+				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.account,
+							type: ''
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			confirm(e) {
+				this.loding = true;
+				if (this.dbPassword != this.password) {
+					this.loding = false;
+					uni.showModal({
+						title: '请重新输入',
+						content: '两次密码输入不一致',
+						showCancel: false,
+					});
+					return
+				}
+				registerReset({
+						account: this.account,
+						captcha: this.captcha,
+						password: this.password,
+					})
+					.then(({
+						data
+					}) => {
+						this.loding = false;
+						uni.showToast({
+							title:"修改成功",
+							icon:"success"
+						})
+					})
+					.catch(err => {
+						this.loding = false;
+						console.log(err);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+	}
+
+	.container {
+		padding-top: 30rpx;
+	}
+
+	.listBox {
+		margin: $page-row-spacing;
+		margin-top: 0;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+		
+	}
+
+	.list {
+		.input {
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+			width: 100%;
+			
+		}
+
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+			.code {
+				color: #5dbc7c;
+				font-size: 23rpx;
+				border-left: 1px solid #eeeeee;
+				padding-left: 20rpx;
+				flex-shrink: 0;
+				text-align: center;
+			}
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.bg-gray {
+		background-color: $color-gray;
+	}
+</style>

+ 211 - 0
pages/set/phone.vue

@@ -0,0 +1,211 @@
+<template>
+	<view class="container">
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">手机号</text>
+					</view>
+					<view class="right flex">
+						<input class="input" placeholder="填写绑定号码" type="text" v-model="account"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">验证码</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="captcha" type="text" placeholder="请填写验证码"
+							placeholder-class="placeholder" />
+						<view class="code" @click="verification">{{ countDown == 0 ? '验证码' : countDown }}</view>
+					</view>
+				</view>
+				<!-- <view class="flex listItem" >
+					<view class="flex titleBox">
+						<text class="title">新号码</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="account" type="text" placeholder="请填写新手机号"
+							placeholder-class="placeholder" />
+					</view>
+				</view> -->
+			</view>
+		</view>
+		<view class="base-buttom" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		verify
+	} from '@/api/login.js';
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		registerReset,
+		binding
+	} from '@/api/set.js';
+	export default {
+		data() {
+			return {
+				time: '', //保存倒计时对象
+				countDown: 0, //倒计时
+				account: '', //手机号
+				captcha: '', //验证码
+				loding: false //是否载入中
+			};
+		},
+		watch: {
+			// 监听倒计时
+			countDown(i) {
+				if (i == 0) {
+					clearInterval(this.time);
+				}
+			}
+		},
+		computed: {
+			...mapState(['userInfo'])
+		},
+		onLoad() {
+			if (this.userInfo.phone == null) {
+				this.account = '';
+			} else {
+				this.account = this.userInfo.phone;
+				this.show = false;
+			}
+		},
+		methods: {
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.account == '') {
+					uni.showToast({
+						title:"请输入电话号码",
+						icon:"none"
+					})
+					return;
+				}
+				if (this.account.length != 11) {
+					uni.showToast({
+						title:"请输入正确的手机号",
+						icon:"none"
+					})
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.account,
+							type: 'BDING_CODE'
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			confirm(e) {
+				let obj = this;
+				obj.loding = true;
+				binding({
+						phone: obj.account,
+						captcha: obj.captcha
+					})
+					.then(({
+						data
+					}) => {
+						uni.showToast({
+							title:"绑定成功",
+							icon:"success"
+						})
+						setTimeout(function() {
+							obj.loding = false;
+							uni.switchTab({
+								url: '/pages/user/user'
+							});
+						}, 1000);
+					})
+					.catch(err => {
+						obj.loding = false;
+						console.log(err);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: $page-color-base;
+	}
+	.container{
+		padding-top: 30rpx;
+	}
+	.listBox {
+		margin: $page-row-spacing;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.list {
+		.input {
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+			width: 100%;
+		}
+
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+
+
+	.bg-gray {
+		background-color: $color-gray;
+	}
+
+	.code {
+		color: #5dbc7c;
+		font-size: 23rpx;
+		border-left: 1px solid #eeeeee;
+		padding-left: 20rpx;
+		flex-shrink: 0;
+		text-align: center;
+	}
+</style>

+ 210 - 0
pages/set/set.vue

@@ -0,0 +1,210 @@
+<template>
+	<view class="container">
+
+		<view class="listBox">
+			<view class="row flex" @click="navTo('/pages/set/userinfo')">
+				<text class="tit">头像</text>
+				<view>
+					<image class="background-img" v-model="userInfo.avatar" :src="userInfo.avatar" mode="aspectFill">
+					</image>
+				</view>
+			</view>
+			<view class="list">
+				<view class="flex listItem" @click="navTo('/pages/set/userinfo')">
+					<view class="flex titleBox">
+						<text class="title">昵称</text>
+					</view>
+					<view class="right flex">
+						<text>{{userInfo.nickname}}</text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
+				<view class="flex listItem" @click="navTo('/pages/set/phone')">
+					<view class="flex titleBox">
+						<text class="title">手机号</text>
+					</view>
+					<view class="right flex">
+						<text>{{userInfo.phone}}</text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
+				<!-- <view class="flex listItem" @click="navTo('/pages/user/realName/realNameAuthentication')">
+					<view class="flex titleBox">
+						<text class="title">实名认证</text>
+					</view>
+					<view class="right flex">
+						<text></text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view> -->
+				<view class="flex listItem" @click="navTo('/pages/set/password')">
+					<view class="flex titleBox">
+						<text class="title">修改密码</text>
+					</view>
+					<view class="right flex">
+						<text></text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
+				<!-- #ifdef APP -->
+				<view class="flex listItem" @click="$refs.inputDialog.open()">
+					<view class="flex titleBox">
+						<text class="title">注销账号</text>
+					</view>
+					<view class="right flex">
+						<text></text>
+						<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+					</view>
+				</view>
+				<!-- #endif -->
+			</view>
+		</view>
+		<view class="base-buttom" @click="toLogout">
+			退出账号
+		</view>
+		<!-- #ifdef APP -->
+		<uni-popup ref="inputDialog" type="dialog">
+			<uni-popup-dialog ref="inputClose" mode="input" title="注销账号" value="" placeholder="请输入账号密码"
+				@confirm="outAccount"></uni-popup-dialog>
+		</uni-popup>
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	import {
+		uploads
+	} from '@/api/user.js';
+	import {
+		logout
+	} from '@/api/set.js';
+	import {
+		mapMutations,
+		mapState
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			...mapMutations('user', ['logout']),
+			// #ifdef APP
+			outAccount() {
+				uni.showModal({
+					title: '警告',
+					content: '注销后账号不可恢复是否注销?',
+					cancelText: '取消',
+					confirmText: '立即注销',
+					success: res => {
+						if (res.confirm) {
+							uni.showModal({
+								title: '提示',
+								content: '已提交注销申请!请等待处理结果',
+								showCancel: false,
+							});
+						}
+					},
+				});
+			},
+			// #endif
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				})
+			},
+			//退出登录
+			toLogout() {
+				let obj = this;
+				uni.showModal({
+					content: '确定要退出登录么',
+					success: (e) => {
+						if (e.confirm) {
+							logout({}).then((e) => {
+								uni.navigateBack();
+							}).catch((e) => {
+								console.log(e);
+							})
+							obj.logout();
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.container {
+		padding-top: 30rpx;
+	}
+
+	.listBox {
+		margin: 0 $page-row-spacing;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.row {
+		display: flex;
+		align-items: center;
+		padding: 35rpx 40rpx;
+		background: #fff;
+		border-bottom: 1px solid $page-color-light;
+
+		.background-img {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+			background: #f2f2f2;
+		}
+
+		.tit {
+			flex-shrink: 0;
+			width: 120upx;
+			font-size: $font-base;
+			color: $font-color-base;
+		}
+
+		.input {
+			flex: 1;
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+		}
+	}
+</style>

+ 169 - 0
pages/set/userinfo.vue

@@ -0,0 +1,169 @@
+<template>
+	<view class="content">
+		<view class="listBox">
+			<view class="row flex" @click="imgsub">
+				<text class="tit">头像</text>
+				<view>
+					<image class="background-img" v-model="userInfo.avatar" :src="userInfo.avatar" mode="aspectFill">
+					</image>
+				</view>
+			</view>
+			<view class="list">
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">昵称</text>
+					</view>
+					<view class="right flex">
+						<input class="input" type="text" v-model="userInfo.nickname" placeholder="请输入昵称" placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">ID</text>
+					</view>
+					<view class="right flex">
+						<text>{{userInfo.uid}}</text>
+						<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+					</view>
+				</view>
+				<!-- <view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">账户</text>
+					</view>
+					<view class="right flex">
+						<text>{{userInfo.account}}</text>
+					</view>
+				</view> -->
+			</view>
+		</view>
+		<view class="base-buttom" @click="confirm">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState,
+	} from 'vuex';
+	import {
+		upload
+	} from '@/api/order.js';
+	import {
+		userEdit,
+	} from '@/api/set.js';
+
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+			console.log(this.userInfo)
+		},
+		computed: {
+			...mapState('user', ['userInfo'])
+		},
+		methods: {
+			imgsub() {
+				console.log('上传头像')
+				upload({
+					filename: ''
+				}).then(data => {
+					console.log("data", data);
+					this.userInfo.avatar = data[0].url;
+				})
+			},
+			confirm() {
+				userEdit({
+						avatar: this.userInfo.avatar,
+						nickname: this.userInfo.nickname
+					})
+					.then(e => {
+						uni.showToast({
+							title:"修改成功",
+							icon:"success"
+						})
+						setTimeout(() => {
+							uni.switchTab({
+								url: '/pages/user/user'
+							});
+						}, 1000);
+						console.log(e);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.content {
+		padding-top: 30rpx;
+	}
+	.listBox {
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+			.img {
+				width: 26rpx;
+			}
+		}
+		.input {
+			flex-grow: 1;
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+		}
+		
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	
+	.row {
+		display: flex;
+		align-items: center;
+		padding: 35rpx 40rpx;
+		background: #fff;
+		border-bottom: 1px solid $page-color-light;
+
+		.background-img {
+			width: 80rpx;
+			height: 80rpx;
+			border-radius: 50%;
+			background: #f2f2f2;
+		}
+
+		.tit {
+			flex-shrink: 0;
+			width: 120upx;
+			font-size: $font-base;
+			color: $font-color-base;
+		}
+	}
+
+</style>

+ 239 - 0
pages/user/award/account.vue

@@ -0,0 +1,239 @@
+<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">
+				<view class="row b-b">
+					<text class="tit">姓名</text>
+					<input class="input" v-model="tabItem.orderList.name" type="text" placeholder="提款人姓名" placeholder-class="placeholder" />
+				</view>
+				<view class="row b-b">
+					<text class="tit">{{ tabIndex == 0 ? '账号' : '银行卡号' }}</text>
+					<input class="input" v-model="tabItem.orderList.code" 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.bankName" type="text" placeholder="请输入账号" placeholder-class="placeholder" />
+				</view>
+			</swiper-item>
+		</swiper>
+
+		<button class="add-btn up" @click="confirm">提交申请</button>
+	</view>
+</template>
+
+<script>
+import { aliInfo, bankInfo, setAliInfo, setBankInfo } from '@/api/wallet.js';
+import {
+		prePage
+	} from '@/utils/rocessor.js';
+export default {
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '支付宝',
+					loadingType: 'more',
+					orderList: {
+						name: '',
+						code: '',
+						id:''
+					}
+				},
+				{
+					state: 1,
+					text: '银行卡',
+					loadingType: 'more',
+					orderList: {
+						name: '',
+						code: '',
+						bankName: '',
+						id:''
+					}
+				}
+			]
+		};
+	},
+
+	onLoad(options) {
+		this.tabCurrentIndex = +options.state || 0;
+		this.loadAli();
+		this.loadBank();
+	},
+
+	methods: {
+		//加载数据
+		loadAli(source) {
+			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)
+			});
+		},
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		},
+		// 提交保存
+		confirm() {
+			let obj = this;
+			let arr = obj.navList[obj.tabCurrentIndex].orderList;
+			if (obj.tabCurrentIndex == 1) {
+				obj.setBankInfo({
+					fullname: arr.name,
+					bank: arr.bankName,
+					bankno: arr.code,
+					id:arr.id
+				});
+			}
+			if (obj.tabCurrentIndex == 0) {
+				obj.setAliInfo({
+					fullname: arr.name,
+					alino: arr.code,
+					id:arr.id
+				});
+			}
+		},
+		/* 保存银行卡详细 */
+		setBankInfo(obj) {
+			setBankInfo(obj)
+				.then(e => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					prePage().dataUp()
+					setTimeout(() => {
+						uni.navigateBack()
+					},1500)
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 修改支付宝信息
+		setAliInfo(obj) {
+			setAliInfo(obj)
+				.then(e => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					prePage().dataUp()
+					setTimeout(() => {
+						uni.navigateBack()
+					},1500)
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+	}
+};
+</script>
+
+<style lang="scss">
+.row {
+	display: flex;
+	align-items: center;
+	position: relative;
+	padding: 0 30rpx;
+	height: 110rpx;
+	background: #fff;
+	.tit {
+		flex-shrink: 0;
+		width: 120rpx;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.input {
+		flex: 1;
+		font-size: 30rpx;
+		color: $font-color-dark;
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+page,
+.content {
+	background: $page-color-base;
+	height: 100%;
+}
+
+.swiper-box {
+	height: 750rpx;
+}
+
+.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;
+			}
+		}
+	}
+}
+
+.add-btn {
+	&.up {
+		background-color: $base-color;
+		color: #fff;
+	}
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 690rpx;
+	height: 80rpx;
+	margin: 0 auto;
+	margin-top: 30rpx;
+	font-size: $font-lg;
+	border-radius: 10rpx;
+	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+}
+</style>

+ 327 - 0
pages/user/award/award.vue

@@ -0,0 +1,327 @@
+<template>
+	<view class="content">
+		<view class="bg">
+		</view>
+		<view class="content-money">
+			<view class="conetnt-box">
+				<view class="money-box">
+					<view class="text">可用佣金(元)</view>
+					<view class="money">{{ money | getMoneyStyle }}</view>
+				</view>
+
+				<view class="detailBox flex">
+					<view class="item">
+						<view class="nametype">
+							提现中
+						</view>
+						<view class="moneyNum font-color-red">
+							{{addMoney||0}}
+						</view>
+					</view>
+					<view class="item">
+						<view class="nametype">
+							即将到账
+						</view>
+						<view class="moneyNum ">
+							{{timeMoney||0}}
+						</view>
+					</view>
+					<view class="item">
+						<view class="nametype">
+							累计收益
+						</view>
+						<view class="moneyNum ">
+							{{allMoney||0}}
+						</view>
+					</view>
+				</view>
+				<view class="flex buttom-box">
+					<view class="buttom geMoney" @click="navto('./withdrawal')">
+						<text>提现</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="listbox">
+			<view class="navbar flex">
+				<view class="title">
+					佣金变动明细
+				</view>
+				<view class="alllist" @click="navto('./awardList')">
+					全部
+				</view>
+			</view>
+			<view class="conetntList">
+				<view class="listItem flex" v-for="(item, tabIndex) in navList[0].orderList">
+					<view class="itemLeft">
+						<view class="itemTitle flex">
+							<text>{{item.title}}</text>
+							<text class="font-size-sm font-color-red" v-if="item.status==0">(未到账)</text>
+						</view>
+						<view class="itemBottom">
+							{{item.add_time}}
+						</view>
+					</view>
+					<view class="itemRight">
+						<view class="itemTitle">
+							{{(item.pm == 0 ? '-' : '+')+item.number}}
+						</view>
+						<!-- <view class="itemBottom">
+								余额{{item.yue}}
+							</view> -->
+					</view>
+				</view>
+				<uni-load-more :status="navList[0].loadingType"></uni-load-more>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadCommission,
+		extractBank
+	} from '@/api/wallet.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	// import empty from '@/components/empty';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		// components: {
+		// 	empty,
+		// },
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 3,
+					text: '收入',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页面
+					limit: 10 //每次信息条数
+				}],
+				money: 0, //可提现佣金
+				addMoney: 200, //提现中到账
+				timeMoney: 200, //即将到账
+				allMoney: 1000, //累计收益
+
+			};
+		},
+		onLoad(options) {
+			this.loadData();
+		},
+		onShow() {
+			//获取用户余额
+			extractBank({}).then(({
+				data
+			}) => {
+				this.money = data.commissionCount;
+				this.addMoney = data.ext_broerage;
+				this.timeMoney = data.not_broerage;
+				this.allMoney = data.total_brokerage;
+			});
+		},
+		// 页面到底部后加载数据
+		onReachBottom() {
+			this.loadData();
+		},
+		methods: {
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			async loadData(source) {
+				//这里时将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state ;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				//修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				spreadCommission({
+							page: navItem.page,
+							limit: navItem.limit
+						},
+						state
+					)
+					.then(({
+						data
+					}) => {
+						if (data.length > 0) {
+							navItem.orderList = navItem.orderList.concat(data[0].list);
+							console.log(navItem.orderList);
+							navItem.page++;
+						}
+						//判断是否还有数据, 有改为more, 没有改为noMore
+						if (navItem.limit == data.length) {
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		padding: 20rpx;
+		z-index: 1;
+
+		.conetnt-box {
+			border-radius: 20rpx;
+			background-color: #ffffff;
+			padding-bottom: 50rpx;
+
+			// height: 400rpx;
+			.detailBox {
+				justify-content: space-around;
+				padding-top: 30rpx;
+
+				.item {
+					text-align: center;
+					color: $font-color-light;
+
+					.nametype {
+						color: $font-color-disabled;
+						font-size: 24rpx;
+					}
+
+					.moneyNum {
+						margin-top: 20rpx;
+						font-size: 28rpx;
+						font-weight: bold;
+					}
+				}
+			}
+		}
+
+		.buttom-box {
+			text-align: center;
+			margin: 0 30rpx;
+			margin-top: 50rpx;
+
+			.buttom {
+				flex-grow: 1;
+				border-radius: 100rpx;
+				font-size: $font-lg;
+				width: 300rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				background-color: $color-green;
+				color: #FFFFFF;
+
+				&.geMoney {
+					border: 1px solid $font-color-disabled;
+					color: $font-color-disabled;
+					background-color: #FFFFFF;
+				}
+			}
+		}
+	}
+
+	.money-box {
+		text-align: center;
+		color: $font-color-dark;
+		font-weight: bold;
+
+		.text {
+			padding-top: 85rpx;
+			font-size: 24rpx;
+			margin-bottom: 20rpx;
+		}
+
+		.money {
+			font-size: 60rpx;
+		}
+	}
+
+	.listbox {
+		margin: 0 20rpx;
+		border-radius: 20rpx;
+		position: relative;
+	}
+
+	.navbar {
+		background: #fff;
+		padding: 30rpx;
+		border-bottom: 1px solid $page-color-light;
+		border-top-left-radius: 20rpx;
+		border-top-right-radius: 20rpx;
+
+		.title {
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+
+		.alllist {
+			font-size: 28rpx;
+
+		}
+	}
+
+
+	.content {
+		height: 100%;
+
+		.bg {
+			background-color: #f6ab0b;
+			width: 950rpx;
+			position: absolute;
+			left: -100rpx;
+			border-bottom-left-radius: 1000rpx;
+			border-bottom-right-radius: 1000rpx;
+			top: 0rpx;
+			height: 300rpx;
+		}
+
+	}
+
+	.conetntList {
+		padding: 30rpx;
+		background-color: #FFFFFF;
+		border-bottom-left-radius: 20rpx;
+		border-bottom-right-radius: 20rpx;
+
+		.listItem {
+			font-size: 30rpx;
+			color: $font-color-dark;
+			align-items: flex-start;
+		}
+
+		.itemBottom {
+			font-size: 24rpx;
+			color: $font-color-disabled;
+		}
+	}
+</style>

+ 199 - 0
pages/user/award/awardList.vue

@@ -0,0 +1,199 @@
+<template>
+	<view class="content">
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 空白页 -->
+			<empty v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
+			<!-- 订单列表 -->
+			<view class="momBox" v-for="(list, index) in navList[0].orderList" :key="index">
+				<view class="topMon">
+					<view>
+						<text class="mon">{{list.time}}</text>
+						<!-- <text class="font-size-sm margin-l-10">月</text> -->
+						<image class="iconRight margin-l-10" src="../../../static/icon/dom.png" mode="widthFix"></image>
+					</view>
+					<!-- <view class="textSm font-color-gray">
+						<text>支出:{{list.out}}</text>
+						<text class="margin-l-20">支出:{{list.get}}</text>
+					</view> -->
+				</view>
+				<view v-for="(item,index) in list.list" class="order-item flex">
+					<view class="title-box">
+						<view class="title">
+							<text>{{ item.title }}</text>
+						</view>
+						<view class="time">
+							<text>{{ item.add_time }}</text>
+						</view>
+					</view>
+					<view class="money">
+						<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="navList[0].loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadCommission,
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 3,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}, ],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				spreadCommission({
+							page: navItem.page,
+							limit: navItem.limit
+						},
+						state
+					)
+					.then(({
+						data
+					}) => {
+						if (data.length > 0) {
+							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);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.money-box {
+		padding-top: var(--status-bar-height);
+		text-align: center;
+		color: $font-color-dark;
+		font-weight: bold;
+
+		.text {
+			padding-top: 85rpx;
+			font-size: 24rpx;
+		}
+
+		.money {
+			font-size: 60rpx;
+		}
+	}
+
+
+	// 列表
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		border-bottom: 1px solid $page-color-light;
+		margin-left: 20rpx;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			font-size: $font-lg;
+		}
+	}
+
+	.list-scroll-content {
+		height: 100%;
+		padding-top: 30rpx;
+		.momBox{
+			background-color: #FFFFFF;
+			margin: $page-row-spacing;
+			margin-top: 0rpx;
+			border-radius: 20rpx;
+			overflow: hidden;
+			.topMon{
+				padding: 30rpx 20rpx;
+				border-bottom: 1px solid $page-color-light;
+				.iconRight{
+					width: 22rpx;
+				}
+				.mon{
+					font-size: 36rpx;
+					font-weight: 400;
+				}
+				.textSm{
+					color: $font-color-light;
+					font-size: 22rpx;
+				}
+			}
+		}
+	}
+
+	.content {
+		height: 100%;
+	}
+</style>

+ 361 - 0
pages/user/award/withdrawal.vue

@@ -0,0 +1,361 @@
+<template>
+	<view class="content">
+		<!-- <uni-notice-bar single="true" text="每月25号到月底可提现上月结算余额"></uni-notice-bar> -->
+		<view class="content-money">
+			<view class="flex ">
+				<view class="buttom">
+					<view class="icon">{{ money | getMoneyStyle }}</view>
+					<text class="text">可提现佣金</text>
+				</view>
+				<view class="interval"></view>
+				<view class="buttom">
+					<view class=" icon">{{ freeze | getMoneyStyle }}</view>
+					<text class="text">待审核提现佣金</text>
+				</view>
+			</view>
+		</view>
+		<view class="row-box">
+			<view class="title">提现金额</view>
+			<view class="row">
+				<text class="tit">¥</text>
+				<input class="input" type="number" v-model="withdrawal" :placeholder="'最低提现金额' + minPrice + '元'"
+					placeholder-class="placeholder" />
+				<view class="buttom" @click="withdrawal = money">全部提现</view>
+			</view>
+		</view>
+		<view class="list">
+			<radio-group @change="tabRadio">
+				<!-- <label>
+					<view class="box">
+						<view class="icon ">
+							<image class="icon-img" src="../../static/icon/orderWx.png" mode="scaleToFill"></image>
+						</view>
+						<view class="title-box">
+							<view class="title"><text>提现至微信</text></view>
+						</view>
+						<view class="right">
+							<radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" />
+						</view>
+					</view>
+				</label> -->
+				<label>
+					<view class="box">
+						<!-- <view class="icon iconfont iconzhifubao"></view> -->
+						<view class="icon ">
+							<image class="icon-img" src="../../../static/icon/orderAli.png" mode="scaleToFill"></image>
+						</view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="aliData.fullname">提现至支付宝</text>
+								<text v-else>请创建支付宝账号</text>
+							</view>
+							<view class="node">
+								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right">
+							<radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" />
+						</view>
+					</view>
+				</label>
+				<label>
+					<view class="box">
+						<view class="icon ">
+							<image class="icon-img" src="../../../static/icon/yh.png" mode="scaleToFill"></image>
+						</view>
+						<view class="title-box">
+							<view class="title">
+								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
+								<text v-else>请创建银行账号</text>
+							</view>
+							<view class="node">
+								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
+							</view>
+						</view>
+						<view class="right">
+							<radio value="bank" color="#5dbc7c" :checked="type == 'bank'" />
+						</view>
+					</view>
+				</label>
+			</radio-group>
+		</view>
+		<button class="add-btn up" @click="confirm">提交申请</button>
+		<button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('./account')">账号管理</button>
+	</view>
+</template>
+
+<script>
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	import {
+		extractCash,
+		extractBank,
+		aliInfo,
+		bankInfo
+	} from '@/api/wallet.js';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				type: 'alipay', //提现方式
+				money: '0.00', //可提现金额
+				freeze: '0.0', //冻结金额
+				withdrawal: '', //提现金额
+				minPrice: '', //最少提现金额
+				aliData: {},
+				bankData: {},
+				// #ifdef H5
+				weichatBsrowser: false
+				// #endif
+			};
+		},
+		onLoad(options) {
+			// #ifdef H5
+			// this.weichatBsrowser = uni.getStorageSync('weichatBrowser');
+			// #endif
+			//加载提现信息
+			this.loadData();
+			// 加载提款账号信息
+			this.loadAli();
+			this.loadBank();
+		},
+		methods: {
+			// 更新数据
+			dataUp() {
+				this.loadAli();
+				this.loadBank();
+			},
+			//加载数据
+			async loadAli(source) {
+				aliInfo({}).then(e => {
+					this.aliData = e.data;
+				});
+			},
+			// 加载银行卡信息
+			async loadBank() {
+				bankInfo({}).then(e => {
+					this.bankData = e.data;
+				});
+			},
+			// 加载余额信息
+			async loadData() {
+				extractBank({}).then(({
+					data
+				}) => {
+					this.money = data.commissionCount;
+					this.minPrice = data.minPrice;
+					this.freeze = data.incommissionCount;
+				});
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 切换选中对象
+			tabRadio(e) {
+				this.type = e.detail.value;
+			},
+			// 提交
+			confirm() {
+				let data = {
+					extract_type: this.type, //bank -银行卡 alipay-支付宝 weixin-微信
+					money: this.withdrawal, //金额
+					money_type: 0 //0佣金1余额
+				};
+
+				if (this.withdrawal < this.minPrice) {
+					uni.showToast({
+						title: '提现金额不可少于' + this.minPrice,
+						duration: 2000,
+						mask: false,
+						icon: 'none',
+					})
+					return;
+				}
+				if (this.type == 'alipay') {
+					data.name = this.aliData.fullname;
+					data.alipay_code = this.aliData.alino;
+				}
+				if (this.type == 'bank') {
+					data.name = this.bankData.fullname;
+					data.bankname = this.bankData.bank;
+					data.cardnum = this.bankData.bankno;
+				}
+
+				extractCash(data)
+					.then(e => {
+						uni.showToast({
+							title: '提交成功',
+							duration: 2000,
+							position: 'top'
+						});
+					})
+					.catch(e => {
+						console.log();
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content-money {
+		padding: 30rpx 0;
+		background: #ffffff;
+	}
+
+	.flex {
+		background-color: #ffffff;
+		text-align: center;
+		margin: 0 30rpx;
+		border-radius: $border-radius-sm;
+
+		.buttom {
+			font-size: $font-lg;
+			width: 50%;
+		}
+
+		.interval {
+			width: 2px;
+			height: 60rpx;
+			background-color: #eeeeee;
+		}
+
+		.icon {
+			background-size: 100%;
+			font-size: 42rpx;
+			color: $font-color-dark;
+			font-weight: bold;
+			background-repeat: no-repeat;
+			background-position: center;
+		}
+
+		.text {
+			color: $font-color-light;
+		}
+	}
+
+	.row-box {
+		margin-top: 30rpx;
+		padding: 20rpx 30rpx;
+		background: #fff;
+
+		.title {
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+		}
+
+		.row {
+			display: flex;
+			align-items: center;
+			position: relative;
+			height: 80rpx;
+
+			.tit {
+				flex-shrink: 0;
+				width: 40rpx;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.input {
+				flex: 1;
+				font-size: 30rpx;
+				color: $font-color-dark;
+			}
+
+			.iconlocation {
+				font-size: 36rpx;
+				color: $font-color-light;
+			}
+
+			.buttom {
+				color: $font-color-spec;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.add-btn {
+		&.modified {
+			color: $base-color;
+		}
+
+		&.up {
+			background-color: $base-color;
+			color: #fff;
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 690rpx;
+		height: 80rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+		// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	}
+
+	.list {
+		padding-left: 30rpx;
+		margin-top: 30rpx;
+		background-color: #ffffff;
+
+		.box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+			height: 120rpx;
+			border-bottom: 1px solid $border-color-light;
+
+			.icon {
+				font-size: 48rpx;
+				padding-right: 20rpx;
+
+				.icon-img {
+					height: 50rpx;
+					width: 50rpx;
+				}
+			}
+
+			.iconweixin1 {
+				color: #18bf16;
+			}
+
+			.iconzhifubao {
+				color: #08aaec;
+			}
+
+			.title-box {
+				flex-grow: 1;
+				text-align: left;
+
+				.title {
+					font-size: $font-base + 2rpx;
+					color: $font-color-base;
+				}
+
+				.node {
+					font-size: $font-sm;
+					color: $font-color-light;
+				}
+			}
+		}
+	}
+
+	/deep/ .uni-radio-input {
+		width: 45rpx;
+		height: 45rpx;
+	}
+</style>

+ 407 - 0
pages/user/money/pay.vue

@@ -0,0 +1,407 @@
+<template>
+	<view class="app">
+		<view class="bg">
+		</view>
+		<view class="moneyBox">
+			<view class="price-box">
+				<text>支付金额</text>
+				<text class="price">{{ money }}</text>
+			</view>
+			<view class="yt-list">
+				<view class="yt-list-cell b-b" v-if="fx" @click="payType='weixin'">
+					<view class="cell-tit flex">
+						<image class="orderIcon" src="../../../static/icon/orderWx.png" mode="widthFix"></image>
+						<text class="margin-l-10">微信支付</text>
+					</view>
+					<image class="checked" v-if="payType=='weixin'" src="../../../static/icon/addressIconXz.png"
+						mode="widthFix"></image>
+					<view v-else class="noChecked"></view>
+				</view>
+				<!-- #ifdef APP-PLUS -->
+				<view class="yt-list-cell b-b" @click="payType='ali'">
+					<view class="cell-tit flex">
+						<image class="orderIcon" src="../../../static/icon/orderAli.png" mode="widthFix"></image>
+						<text class="margin-l-10">支付宝</text>
+					</view>
+					<image class="checked" v-if="payType=='ali'" src="../../../static/icon/addressIconXz.png"
+						mode="widthFix">
+					</image>
+					<view v-else class="noChecked"></view>
+				</view>
+				<!-- #endif -->
+				<view class="yt-list-cell" @click="payType='yue'">
+					<view class="cell-tit flex">
+						<image class="orderIcon" src="../../../static/icon/ye.png" mode="widthFix"></image>
+						<text class="margin-l-10">余额({{now_money}})</text>
+					</view>
+					<image class="checked" v-if="payType=='yue'" src="../../../static/icon/addressIconXz.png"
+						mode="widthFix">
+					</image>
+					<view v-else class="noChecked"></view>
+				</view>
+			</view>
+		</view>
+		<view class="base-buttom" :class="{ clickbg: payLoding }" @click="!payLoding ? confirm() : ''">确认支付</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex'
+	import {
+		balance
+	} from '@/api/wallet.js';
+	import {
+		orderPay
+	} from '@/api/order.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				// #ifdef H5
+				payType: 'ali',
+				// #endif
+				// #ifdef MP-WEIXIN
+				payType: 'ali',
+				// #endif
+				money: 0.0, //订单金额
+				now_money: 0.0, //余额
+				orderId: '', //保存订单id
+				payLoding: false, //判断是否支付中
+				payType: 'ali',
+				// #ifdef H5
+				froms: '', //保存h5中数据来源对象
+				// #endif
+			};
+		},
+		onLoad(options) {
+			// 判断是否为已创建单号订单
+			this.type = 1;
+			this.orderId = options.ordid;
+			this.money = options.money;
+			// 载入余额
+			balance({}).then(({
+				data
+			}) => {
+				// 获取余额
+				this.now_money = data.now_money;
+			});
+		},
+		computed:{
+			...mapState(['fx'])
+		},
+		methods: {
+			// 支付金额
+			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.payType //支付类型  weixin-微信 yue-余额
+					})
+					.then(e => {
+						// 判断是否为余额支付
+						if (obj.payType == 'yue' && e.data.status == 'SUCCESS') {
+							if (e.status == 200) {
+								obj.paySuccessTo();
+							} else {
+								uni.showToast({
+									title:msg,
+									icon:"none"
+								})
+							}
+						}
+						if (obj.payType == 'weixin') {
+							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.payType == 'weixin') {
+								weixinObj.chooseWXPay(data);
+							}
+							// #endif
+							// #ifdef MP-WEIXIN
+							if (obj.payType == 'weixin') {
+								wx.requestPayment(data);
+							}
+							// #endif
+						}
+						uni.hideLoading();
+						obj.payLoding = false;
+					})
+					.catch(e => {
+						// 支付完成
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			},
+			// 支付成功跳转
+			paySuccessTo() {
+				uni.hideLoading();
+				uni.redirectTo({
+					url: './paySuccess?orderid=' + this.orderId
+				});
+			},
+			//确认支付
+			confirm: async function() {
+				let obj = this;
+				uni.showLoading({
+					title: '支付中',
+					mask: true
+				})
+				// 判断是否余额不足
+				if (obj.payType == 'yue' && +obj.now_money < obj.money) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+						success: res => {},
+						fail: () => {},
+						complete: () => {}
+					});
+					return;
+				}
+				// 支付中
+				obj.payLoding = true;
+				// #ifdef H5
+				// 获取当前是否为微信浏览器
+				obj.froms = uni.getStorageSync('weichatBrowser') || '';
+				// #endif
+				// 判断是否为未支付订单中跳转进入
+				obj.orderMoneyPay();
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.app {
+		width: 100%;
+		padding-top: 30rpx;
+	}
+
+	.moneyBox {
+		position: relative;
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.bg {
+		background-color: $color-green;
+		width: 950rpx;
+		position: absolute;
+		left: -100rpx;
+		border-bottom-left-radius: 1000rpx;
+		border-bottom-right-radius: 1000rpx;
+		top: 0rpx;
+		height: 300rpx;
+	}
+
+	.price-box {
+		background-color: #fff;
+		height: 200rpx;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		font-size: 28upx;
+		color: #909399;
+
+		.price {
+			font-size: 50upx;
+			color: #303133;
+			margin-top: 12upx;
+
+			&:before {
+				content: '¥';
+				font-size: 40upx;
+			}
+		}
+	}
+
+	.pay-type-list {
+		margin-top: 20upx;
+		background-color: #fff;
+		padding-left: 60upx;
+
+		.type-item {
+			height: 120upx;
+			padding: 20upx 0;
+			display: flex;
+			justify-content: space-between;
+			align-items: center;
+			padding-right: 60upx;
+			font-size: 30upx;
+			position: relative;
+		}
+
+		.icon {
+			width: 100upx;
+			font-size: 52upx;
+		}
+
+		.iconyue {
+			color: #fe8e2e;
+		}
+
+		.iconweixin {
+			color: #36cb59;
+		}
+
+		.iconzhifubao {
+			color: #01aaef;
+		}
+
+		.tit {
+			font-size: $font-lg;
+			color: $font-color-dark;
+			margin-bottom: 4upx;
+		}
+
+		.con {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+	}
+
+	.clickbg {
+		background-color: $color-gray !important;
+	}
+
+	.yt-list {
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		padding-bottom: 20rpx;
+	}
+
+	.yt-list-cell {
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		padding: 10rpx 30rpx 10rpx 40rpx;
+		line-height: 70rpx;
+		position: relative;
+
+		.checked,
+		.noChecked {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.noChecked {
+			border: 1px solid $font-color-light;
+			border-radius: 100rpx;
+		}
+
+		&.cell-hover {
+			background: #fafafa;
+		}
+
+		&.b-b:after {
+			left: 30rpx;
+		}
+
+		.cell-icon {
+			height: 32rpx;
+			width: 32rpx;
+			font-size: 22rpx;
+			color: #fff;
+			text-align: center;
+			line-height: 32rpx;
+			background: #f85e52;
+			border-radius: 4rpx;
+			margin-right: 12rpx;
+
+			&.hb {
+				background: #ffaa0e;
+			}
+
+			&.lpk {
+				background: #3ab54a;
+			}
+		}
+
+		.cell-more {
+			align-self: center;
+			font-size: 24rpx;
+			color: $font-color-light;
+			margin-left: 8rpx;
+			margin-right: -10rpx;
+		}
+
+		.cell-tit {
+			font-size: 26rpx;
+			color: $font-color-light;
+			margin-right: 10rpx;
+
+			.orderIcon {
+				width: 48rpx;
+			}
+		}
+
+		.cell-tip {
+			font-size: 26rpx;
+			color: $font-color-dark;
+
+			&.disabled {
+				color: $font-color-light;
+			}
+
+			&.active {
+				color: $base-color;
+			}
+
+			&.red {
+				color: $base-color;
+			}
+		}
+
+		&.desc-cell {
+			.cell-tit {
+				max-width: 90rpx;
+			}
+		}
+
+		.desc {
+			text-align: right;
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+	}
+</style>

+ 108 - 0
pages/user/money/paySuccess.vue

@@ -0,0 +1,108 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<image class="img" src="../../../static/image/success.png" mode="widthFix"></image>
+			<text class="tit">支付成功</text>
+			<view class="tip" >
+				<text v-if="type==0">
+				请前往绿津加盟商一领取
+				</text>
+			</view>
+			<view class="btn-group flex">
+				<navigator v-if="type==0" :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect"
+					class="mix-btn hollow">查看订单</navigator>
+				<view v-if="type==1" class="mix-btn hollow" @click="navBack">返回</view>
+				<navigator url="/pages/index/index" open-type="switchTab" class="mix-btn ">返回首页</navigator>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				orderId: '',
+				type: 0 //0为订单1为充值
+			}
+		},
+		onLoad(opt) {
+			// 保存订单号
+			if (opt.orderid) {
+				this.orderId = opt.orderid;
+			}
+			// 分类
+			if (opt.type) {
+				this.type = opt.type;
+			}
+		},
+		methods: {
+			// 返回上一页
+			navBack() {
+				uni.navigateBack()
+			}
+		}
+	}
+</script>
+
+<style lang='scss'>
+	.content {
+		padding-top: 30rpx;
+	}
+
+	.box {
+		margin: 0 $page-row-spacing;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		padding: 50rpx;
+		padding-top: 80rpx;
+	}
+
+	.tip {
+		color: $font-color-disabled;
+		font-size: 24rpx;
+		margin-top: 30rpx;
+		padding-bottom: 30rpx;
+	}
+
+	.img {
+		width: 200rpx;
+
+	}
+
+	.tit {
+		font-size: 38rpx;
+		font-weight: bold;
+		color: #303133;
+		margin-top: 30rpx;
+	}
+
+	.btn-group {
+		padding-top: 100rpx;
+		width: 100%;
+		justify-content: space-around;
+		padding: 0 10rpx;
+	}
+
+	.mix-btn {
+		margin-top: 30upx;
+		display: flex;
+		align-items: center;
+		font-size: $font-lg;
+		color: #fff;
+		background-color: $base-color;
+		padding: 20rpx 50rpx;
+		border-radius: 100rpx;
+		line-height: 1;
+
+		&.hollow {
+			background: #fff;
+			color: #303133;
+			border: 1px solid #ccc;
+		}
+	}
+</style>

+ 486 - 0
pages/user/money/recharge.vue

@@ -0,0 +1,486 @@
+<template>
+	<view class="content">
+		<view class="bg">
+		</view>
+		<view class="listBox">
+			<view class="list flex">
+				<view @click="changeMoney(index)" :class="{action:index==actionIndex}" class="item flex"
+					v-for="(item,index) in moneyList">
+					<text>{{item.price}}元</text>
+				</view>
+			</view>
+			<view class="flex inputBox">
+				<text class="text">自定义金额</text>
+				<input class="input" type="number" v-model="money" />
+				<text>元</text>
+			</view>
+		</view>
+
+		<view class="yt-list">
+			<view class="yt-list-cell b-b" v-if="fx" @click="type='wxpay'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../../static/icon/orderWx.png" mode="widthFix"></image>
+					<text class="margin-l-10">微信支付</text>
+				</view>
+				<image class="checked" v-if="type=='wxpay'" src="../../../static/icon/addressIconXz.png"
+					mode="widthFix"></image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #ifdef APP-PLUS -->
+			<view class="yt-list-cell b-b" @click="type='alipay'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../../static/icon/orderAli.png" mode="widthFix"></image>
+					<text class="margin-l-10">支付宝</text>
+				</view>
+				<image class="checked" v-if="type=='alipay'" src="../../../static/icon/addressIconXz.png"
+					mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view>
+			<!-- #endif -->
+<!-- 			<view class="yt-list-cell b-b" @click="type='commission'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../../static/icon/ye.png" mode="widthFix"></image>
+					<text class="margin-l-10">佣金({{commissionMoney}})</text>
+				</view>
+				<image class="checked" v-if="type=='commission'" src="../../../static/icon/addressIconXz.png"
+					mode="widthFix">
+				</image>
+				<view v-else class="noChecked"></view>
+			</view> -->
+		</view>
+
+		<view class="base-buttom" :class="{ 'active-bg': payLoding }" @click="!payLoding ? confirm() : ''">确认充值</view>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		commissionPay
+	} from '@/api/wallet.js';
+	// #ifdef APP
+	import {
+		aliPay,
+		wxPay
+	} from '@/api/wallet.js';
+	// #endif
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	import {
+		rechargeWechat
+	} from '@/api/wallet.js';
+	// #endif
+	// #ifdef MP
+	import {
+		rechargeRoutine
+	} from '@/api/wallet.js';
+	// #endif
+
+	import {
+		rechargeIndex,
+		spreadCommission,
+		extractBank
+	} from '@/api/wallet.js';
+
+
+	export default {
+		data() {
+			return {
+				actionIndex: 0, //当前选中的充值金额对象
+				type: 'alipay',
+				money: '', //充值金额
+				payLoding: false, //是否加载中
+				moneyList: [],
+				commissionMoney: 0, //可提现佣金
+			};
+		},
+		onLoad(options) {
+			this.rechargeIndex();
+			this.extractBank();
+			console.log("s");
+		},
+		computed:{
+			...mapState(['fx'])
+		},
+		methods: {
+			//获取用户金额信息
+			extractBank() {
+				extractBank({}).then(({
+					data
+				}) => {
+					// 保存佣金信息
+					this.commissionMoney = data.commissionCount;
+				});
+			},
+			// 金额修改
+			changeMoney(ind) {
+				this.actionIndex = ind;
+				this.money = this.moneyList[ind].price
+			},
+			// 查询金额列表
+			rechargeIndex() {
+				rechargeIndex().then((e) => {
+					this.moneyList = e.data.recharge_quota.map((e) => {
+						e.price = +e.price;
+						return e
+					});
+					// 设置默认金额值
+					this.money = this.moneyList[0].price
+					console.log(e);
+				})
+			},
+			// 跳转
+			navTo(url) {
+				uni.navigateTo({
+					url: url
+				});
+			},
+			// 提交
+			confirm() {
+				const that = this;
+				if (that.money < (+that.moneyList[0].price)) {
+					uni.showModal({
+						title: '失败',
+						content: '充值金额不可以低于¥' + that.moneyList[0].price,
+						showCancel: false
+					});
+					return
+				}
+				that.payLoding = true;
+				let pushData = {
+					price: this.money,
+					// #ifdef H5
+					from: 'weixin',
+					// #endif
+					// #ifdef APP
+					from: 'app',
+					// #endif
+				}
+				// 佣金转余额
+				if (that.type == 'commission') {
+					that.commissionPay(pushData)
+					return
+				}
+				// 微信支付
+				if (that.type == 'wxpay') {
+					that.wxpay(pushData)
+					return
+				}
+				// #ifdef APP
+				// 支付宝支付
+				if (that.type == 'alipay') {
+					console.log('ali');
+					that.alipay(pushData)
+					return
+				}
+				// #endif
+				// 微信支付
+
+			},
+			commissionPay(pushData) {
+				const that = this;
+				commissionPay(pushData).then((e) => {
+					that.payLoding = false;
+					if (e.status == 200) {
+						that.extractBank()
+						uni.redirectTo({
+							url: './paySuccess?type=1'
+						});
+						return
+					}
+					uni.showToast({
+						title: e.msg
+					});
+				}).catch(() => {
+					that.payLoding = false;
+				})
+			},
+			// #ifdef APP-PLUS
+			alipay(pushData) {
+				const that = this;
+				aliPay(pushData).then((e) => {
+					console.log(e.data.data,'jie');
+					let orderInfo={};
+					that.payLoding = true;
+					uni.requestPayment({
+						provider: that.type,
+						orderInfo:e.data.data,
+						success(e) {
+							uni.redirectTo({
+								url: './paySuccess?type=1'
+							});
+						},fail(e) {
+							console.log(e);
+						}
+					})
+				}).catch(e => {
+					that.payLoding = false;
+					console.log(e,'cuowu');
+				});
+			},
+			// #endif
+			wxpay(pushData) {
+				const that = this;
+				// #ifdef H5
+				console.log(pushData);
+				rechargeWechat(pushData)
+					.then(e => {
+						let da = e.data;
+						that.payLoding = false;
+						weixinObj.chooseWXPay({
+							timestamp: da.timestamp,
+							nonceStr: da.nonceStr,
+							package: da.package,
+							signType: da.signType,
+							paySign: da.paySign,
+							success: function(res) {
+								uni.redirectTo({
+									url: './paySuccess?type=1'
+								});
+							},
+						});
+					})
+					.catch(e => {
+						that.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+				// #ifdef MP
+				rechargeRoutine(pushData)
+					.then(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: './paySuccess?type=1'
+								});
+							}
+						})
+						that.payLoding = false;
+					})
+					.catch(e => {
+						that.payLoding = false;
+						console.log(e);
+					});
+				// #endif
+				// #ifdef APP
+				wxPay(pushData).then((res) => {
+					console.log(res.data,'充值');
+					that.payLoding = true;
+					uni.requestPayment({
+						provider: that.type,
+						orderInfo: res.data,
+						success(e) {
+							uni.redirectTo({
+								url: './paySuccess?type=1'
+							});
+						},
+						fail(e) {
+							console.log('错误', e);
+						}
+					})
+				}).catch(e => {
+					that.payLoding = false;
+					console.log(e);
+				});
+				// #endif
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.yt-list {
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		margin-top: 30rpx;
+		border-radius: 20rpx;
+
+		.yt-list-cell {
+			display: flex;
+			align-items: center;
+			justify-content: space-between;
+			padding: 10rpx 30rpx 10rpx 40rpx;
+			line-height: 70rpx;
+			position: relative;
+
+			.checked,
+			.noChecked {
+				width: 36rpx;
+				height: 36rpx;
+			}
+
+			.noChecked {
+				border: 1px solid $font-color-light;
+				border-radius: 100rpx;
+			}
+
+			&.cell-hover {
+				background: #fafafa;
+			}
+
+			&.b-b:after {
+				left: 30rpx;
+			}
+
+			.cell-icon {
+				height: 32rpx;
+				width: 32rpx;
+				font-size: 22rpx;
+				color: #fff;
+				text-align: center;
+				line-height: 32rpx;
+				background: #f85e52;
+				border-radius: 4rpx;
+				margin-right: 12rpx;
+
+				&.hb {
+					background: #ffaa0e;
+				}
+
+				&.lpk {
+					background: #3ab54a;
+				}
+			}
+
+			.cell-more {
+				align-self: center;
+				font-size: 24rpx;
+				color: $font-color-light;
+				margin-left: 8rpx;
+				margin-right: -10rpx;
+			}
+
+			.cell-tit {
+				font-size: 26rpx;
+				color: $font-color-light;
+				margin-right: 10rpx;
+
+				.orderIcon {
+					width: 48rpx;
+				}
+			}
+
+			.cell-tip {
+				font-size: 26rpx;
+				color: $font-color-dark;
+
+				&.disabled {
+					color: $font-color-light;
+				}
+
+				&.active {
+					color: $base-color;
+				}
+
+				&.red {
+					color: $base-color;
+				}
+			}
+
+			&.desc-cell {
+				.cell-tit {
+					max-width: 90rpx;
+				}
+			}
+
+			.desc {
+				text-align: right;
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+	}
+
+
+
+	page {
+		height: 100%;
+	}
+
+	.content {
+		padding-top: 30rpx;
+	}
+
+	.active-bg {
+		background-color: $color-gray !important;
+	}
+
+	.listBox {
+		margin: 30rpx;
+		margin-top: 0;
+		border-radius: 20rpx;
+		padding: 20rpx;
+		background-color: #FFFFFF;
+		position: relative;
+		padding-bottom: 30rpx;
+
+		.inputBox {
+			font-size: 28rpx;
+			font-weight: bold;
+			color: $font-color-base;
+			margin: 0 20rpx;
+
+			.text {
+				flex-shrink: 0;
+			}
+
+			.input {
+				border-bottom: 1px solid $font-color-disabled;
+				flex-grow: 1;
+				margin: 0 10rpx;
+				height: 30rpx;
+				text-align: center;
+			}
+		}
+	}
+
+	.list {
+		padding-top: 10rpx;
+		flex-wrap: wrap;
+
+		.item {
+			justify-content: center;
+			width: 210rpx;
+			height: 100rpx;
+			margin-bottom: 20rpx;
+			background-color: #F5F5F5;
+			border-radius: 20rpx;
+			font-size: 28rpx;
+			font-weight: bold;
+			color: $font-color-base;
+			border: 1px solid #F5F5F5;
+
+			&.action {
+				border: 1px solid $color-green;
+				color: $color-green;
+			}
+		}
+	}
+
+	.bg {
+		background-color: $color-green;
+		width: 950rpx;
+		position: absolute;
+		left: -100rpx;
+		border-bottom-left-radius: 1000rpx;
+		border-bottom-right-radius: 1000rpx;
+		top: 0rpx;
+		height: 300rpx;
+	}
+
+	.base-buttom {
+		position: relative;
+		left: auto;
+		bottom: auto;
+		right: auto;
+	}
+</style>

+ 268 - 0
pages/user/money/wallet.vue

@@ -0,0 +1,268 @@
+<template>
+	<view class="content">
+		<view class="bg">
+		</view>
+		<view class="content-money">
+			<view class="conetnt-box">
+				<view class="money-box">
+					<view class="text">可用金额(元)</view>
+					<view class="money">{{ money | getMoneyStyle }}</view>
+				</view>
+				<view class="flex buttom-box">
+					<view class="buttom" @click="navto('./recharge')">
+						<text>充值</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="listbox">
+			<view class="navbar flex">
+				<view class="title">
+					余额变动明细
+				</view>
+				<view class="alllist" @click="navto('./walletList')">
+					全部
+				</view>
+			</view>
+			<view class="conetntList">
+				<view class="listItem flex" v-for="(item, tabIndex) in navList[0].orderList">
+					<view class="itemLeft">
+						<view class="itemTitle">
+							{{item.title}}
+						</view>
+						<view class="itemBottom">
+							{{item.add_time}}
+						</view>
+					</view>
+					<view class="itemRight">
+						<view class="itemTitle">
+							{{(item.pm == 0 ? '-' : '+')+item.number}}
+						</view>
+						<!-- <view class="itemBottom">
+							余额{{item.yue}}
+						</view> -->
+					</view>
+				</view>
+				<uni-load-more :status="navList[0].loadingType"></uni-load-more>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0, //当前选中的
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}, ],
+				money: ''
+			};
+		},
+		onLoad(options) {
+			this.loadData();
+			console.log('进入');
+		},
+		onShow() {
+			// 获取用户余额
+			userBalance({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+			});
+		},
+		// 页面到底部后加载数据
+		onReachBottom() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				spreadCommission({
+							page: navItem.page,
+							limit: navItem.limit
+						},
+						state
+					)
+					.then(({
+						data
+					}) => {
+						if (data.length > 0) {
+							navItem.orderList = navItem.orderList.concat(data[0].list);
+							console.log(navItem.orderList);
+							navItem.page++;
+						}
+						if (navItem.limit == data.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						this.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+						this.$set(navItem, 'loaded', true);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.content-money {
+		position: relative;
+		padding: 20rpx;
+		z-index: 1;
+		height: 440rpx;
+
+		.conetnt-box {
+			border-radius: 20rpx;
+			background-color: #ffffff;
+			height: 400rpx
+		}
+
+		.buttom-box {
+			text-align: center;
+			margin: 0 30rpx;
+			margin-top: 80rpx;
+
+			.buttom {
+				flex-grow: 1;
+				border-radius: 100rpx;
+				font-size: $font-lg;
+				width: 300rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				background-color: $color-green;
+				color: #FFFFFF;
+
+				&.geMoney {
+					border: 1px solid $font-color-disabled;
+					color: $font-color-disabled;
+					background-color: #FFFFFF;
+				}
+			}
+		}
+	}
+
+	.money-box {
+		text-align: center;
+		color: $font-color-dark;
+		font-weight: bold;
+
+		.text {
+			padding-top: 85rpx;
+			font-size: 24rpx;
+			margin-bottom: 20rpx;
+		}
+
+		.money {
+			font-size: 60rpx;
+		}
+	}
+
+	.listbox {
+		margin: 0 20rpx;
+		border-radius: 20rpx;
+	}
+
+	.navbar {
+		background: #fff;
+		padding: 30rpx;
+		border-bottom: 1px solid $page-color-light;
+		border-top-left-radius: 20rpx;
+		border-top-right-radius: 20rpx;
+
+		.title {
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+
+		.alllist {
+			font-size: 28rpx;
+
+		}
+	}
+
+
+	.content {
+		height: 100%;
+
+		.bg {
+			background-color: $color-green;
+			width: 950rpx;
+			position: absolute;
+			left: -100rpx;
+			border-bottom-left-radius: 1000rpx;
+			border-bottom-right-radius: 1000rpx;
+			top: 0rpx;
+			height: 300rpx;
+		}
+
+	}
+
+	.conetntList {
+		padding: 30rpx;
+		background-color: #FFFFFF;
+		border-bottom-left-radius: 20rpx;
+		border-bottom-right-radius: 20rpx;
+
+		.listItem {
+			font-size: 30rpx;
+			color: $font-color-dark;
+			align-items: flex-start;
+		}
+
+		.itemBottom {
+			font-size: 24rpx;
+			color: $font-color-disabled;
+		}
+	}
+</style>

+ 192 - 0
pages/user/money/walletList.vue

@@ -0,0 +1,192 @@
+<template>
+	<view class="content">
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 空白页 -->
+			<empty v-if="navList[0].loaded === true && navList[0].orderList.length === 0"></empty>
+			<!-- 订单列表 -->
+			<view class="momBox" v-for="(list, index) in navList[0].orderList" :key="index">
+				<view class="topMon">
+					<view>
+						<text class="mon">{{list.time}}</text>
+						<!-- <text class="font-size-sm margin-l-10">月</text> -->
+						<image class="iconRight margin-l-10" src="../../../static/icon/dom.png" mode="widthFix"></image>
+					</view>
+					<!-- <view class="textSm font-color-gray">
+						<text>支出:{{list.out}}</text>
+						<text class="margin-l-20">支出:{{list.get}}</text>
+					</view> -->
+				</view>
+				<view v-for="(item,index) in list.list" class="order-item flex">
+					<view class="title-box">
+						<view class="title">
+							<text>{{ item.title }}</text>
+						</view>
+						<view class="time">
+							<text>{{ item.add_time }}</text>
+						</view>
+					</view>
+					<view class="money">
+						<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="navList[0].loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadCommission,
+	} from '@/api/wallet.js';
+	export default {
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}, ],
+				money: ''
+			};
+		},
+		onLoad(options) {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let index = this.tabCurrentIndex;
+				let navItem = this.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				spreadCommission({
+							page: navItem.page,
+							limit: navItem.limit
+						},
+						state
+					)
+					.then(({
+						data
+					}) => {
+						if (data.length > 0) {
+							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);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.money-box {
+		padding-top: var(--status-bar-height);
+		text-align: center;
+		color: $font-color-dark;
+		font-weight: bold;
+
+		.text {
+			padding-top: 85rpx;
+			font-size: 24rpx;
+		}
+
+		.money {
+			font-size: 60rpx;
+		}
+	}
+
+
+	// 列表
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		border-bottom: 1px solid $page-color-light;
+		margin-left: 20rpx;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			font-size: $font-lg;
+		}
+	}
+
+	.list-scroll-content {
+		height: 100%;
+		padding-top: 30rpx;
+		.momBox{
+			background-color: #FFFFFF;
+			margin: $page-row-spacing;
+			margin-top: 0rpx;
+			border-radius: 20rpx;
+			overflow: hidden;
+			.topMon{
+				padding: 30rpx 20rpx;
+				border-bottom: 1px solid $page-color-light;
+				.iconRight{
+					width: 22rpx;
+				}
+				.mon{
+					font-size: 36rpx;
+					font-weight: 400;
+				}
+				.textSm{
+					color: $font-color-light;
+					font-size: 22rpx;
+				}
+			}
+		}
+	}
+
+	.content {
+		height: 100%;
+	}
+</style>

+ 438 - 0
pages/user/myteam.vue

@@ -0,0 +1,438 @@
+<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)">
+				<text>{{ item.text }}</text>
+				<text v-if="item.num>0">({{ item.num || '' }})</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">
+					<view class="searchInput flex">
+						<view class="searchBox flex">
+							<image class="search" src="../../static/icon/search.png" mode="widthFix"></image>
+							<input class="input" type="text" @confirm="changeSearchList('')" v-model='search'
+								confirm-type='搜索' />
+							<image @click="search=''" class="exit" src="../../static/icon/goodsExit.png"
+								mode="widthFix"></image>
+						</view>
+						<view class="searchImg flex">
+							<picker mode="selector" range-key="text" :range="searchList" @change="changeSearchList">
+								<image class="searchList" src="../../static/icon/searchList.png" mode="widthFix">
+								</image>
+							</picker>
+						</view>
+					</view>
+					<!-- 空白页 -->
+					<!-- #ifdef H5 -->
+					<empty src="../../static/error/emptyItem.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- #ifndef H5 -->
+					<empty src="../static/error/emptyItem.png"
+						v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					<!-- #endif -->
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="item.uid" class="andr-mt-lBox flex">
+						<!-- 订单列表 -->
+						<image :src="item.avatar" class="andr-mt-avatar andr-mt-marR20 flex-shrink-false" mode="scaleToFill"></image>
+						<view class="andr-mt-fdC">
+							<view class="andr-mt-lname flex-start">
+							<text class="clamp padding-r-20">
+							{{ item.nickname }}
+							</text>
+							<image v-if="item.level>0" class="tipLevel flex-shrink-false" :src="`../../static/image/level${item.level-1}.png`" mode="heightFix"></image>
+							</view>
+							<view class="andr-mt-ltime margin-t-10">{{ item.time }}</view>
+							<view class="andr-mt-ltime margin-t-20">推广数:{{ item.childCount }}</view>
+						</view>
+						<view class="rightText">
+							<view class="money">
+								{{item.numberCount}}
+							</view>
+							<view class="allOrder margin-t-20">
+								消费{{item.orderCount}}单
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadPeople
+	} from '@/api/user.js';
+	import {
+		userinfo
+	} from '@/api/user.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		data() {
+			return {
+				// 查询key
+				search: '',
+				searchIndex: 0, //当前选中对象
+				searchList: [{
+						text: '团队排序',
+						key: 'childCount DESC'
+					},
+					{
+						text: '金额排序  ',
+						key: 'numberCount DESC'
+					},
+					{
+						text: '订单排序',
+						key: 'orderCount DESC'
+					}
+				],
+				userInfo: {},
+				// 头部图高度
+				maxheight: '',
+
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 0,
+						text: '一级团队',
+						loadingType: 'more',
+						num: 0, //人数
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 1,
+						text: '二级团队',
+						num: 0, //团队人数
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+			// 获取用户积分
+			let obj = this;
+			userinfo({})
+				.then(({
+					data
+				}) => {
+					console.log(data);
+					obj.userInfo = data;
+				})
+				.catch(e => {});
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				let obj = this;
+				//这里是将订单挂载到tab列表下
+				let index = obj.tabCurrentIndex;
+				let navItem = obj.navList[index];
+				let state = navItem.state;
+				if (source === 'tabChange' && navItem.loaded === true) {
+					//tab切换只有第一次需要加载数据
+					return;
+				}
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				spreadPeople({
+						page: navItem.page,
+						limit: navItem.limit,
+						grade: state,
+						keyword: this.search,
+						sort: this.searchList[this.tabCurrentIndex].key
+					})
+					.then(({
+						data
+					}) => {
+						obj.navList[0].num = data.total;
+						obj.navList[1].num = data.totalLevel;
+						if (data.list.length > 0) {
+							navItem.orderList = navItem.orderList.concat(data.list);
+							console.log(navItem.orderList);
+							navItem.page++;
+						}
+						if (navItem.limit == data.list.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'more';
+							return;
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							navItem.loadingType = 'noMore';
+						}
+						uni.hideLoading();
+						obj.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			// 查询对象数据
+			changeSearchList(e) {
+				if (e) {
+					this.searchIndex = e.detail.value;
+				}
+				// 重新初始化
+				this.navList[tabCurrentIndex].page = 1;
+				this.navList[tabCurrentIndex].limit = 10;
+				this.navList[tabCurrentIndex].loadingType = 'more';
+				this.navList[tabCurrentIndex].orderList = [];
+
+				this.loadData()
+			}
+
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.searchInput {
+		padding: 0 30rpx;
+
+		.searchBox {
+			background-color: #FFFFFF;
+			border-radius: 100rpx;
+			padding: 0 30rpx;
+			height: 70rpx;
+			flex-grow: 1;
+
+			.input {
+				flex-grow: 1;
+				padding: 0 20rpx;
+			}
+
+			.search {
+				width: 36rpx;
+			}
+
+			.exit {
+				width: 36rpx;
+			}
+		}
+
+		.searchImg {
+			height: 70rpx;
+			width: 70rpx;
+			justify-content: center;
+			margin-left: 30rpx;
+			border-radius: 20rpx;
+			background-color: #FFFFFF;
+
+			.searchList {
+				width: 36rpx;
+			}
+		}
+	}
+
+	.money-box {
+		background-color: $base-color;
+		padding-top: var(--status-bar-height);
+		// height: 368rpx;
+		height: 180rpx;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
+		color: #ffffff;
+
+		// text-align: center;
+		.text {
+			// padding-top: 147rpx;
+			font-size: $font-sm;
+		}
+
+		.money {
+			font-size: 56rpx;
+		}
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+
+	// 列表
+
+	.swiper-box {
+		padding-top: 10rpx;
+		height: calc(100% - 40px);
+
+		.order-item {
+			padding: 20rpx 30rpx;
+			line-height: 1.5;
+
+			.title-box {
+				.title {
+					font-size: $font-lg;
+					color: $font-color-base;
+				}
+
+				.time {
+					font-size: $font-base;
+					color: $font-color-light;
+				}
+			}
+
+			.money {
+				color: #fd5b23;
+				font-size: $font-lg;
+			}
+		}
+	}
+
+	.list-scroll-content {
+		height: 100%;
+		padding-top: 30rpx;
+	}
+
+	.content {
+		height: 100%;
+
+		.empty-content {
+			background-color: #ffffff;
+		}
+	}
+
+	.andr-mt-avatar {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 10rpx;
+		background-color: $font-color-light;
+	}
+
+	.andr-mt-avatarBd {
+		border: 2px solid #ffffff;
+	}
+
+	.andr-mt-cname {
+		font-size: 28rpx;
+		color: #ffffff;
+	}
+
+	.andr-mt-flex {
+		display: flex;
+	}
+
+	.andr-mt-lBox {
+		background-color: #ffffff;
+		padding: 30rpx;
+		border-bottom: 1px solid #f0f0f0;
+		margin: 30rpx;
+		border-radius: 20rpx;
+	}
+
+	.andr-mt-marR20 {
+		margin-right: 20rpx;
+	}
+
+	.andr-mt-fdC {
+		flex-grow: 1;
+		overflow: hidden;
+	}
+
+	.rightText {
+		line-height: 1;
+
+		.money {
+			font-size: 36rpx;
+			font-weight: bold;
+
+		}
+
+		.allOrder {
+			font-size: 22rpx;
+			color: $font-color-disabled;
+		}
+	}
+
+	.andr-mt-lname {
+		font-size: 32rpx;
+		color: #3f454b;
+		overflow: hidden;
+		.tipLevel{
+			height: 36rpx;
+			margin-right: 20rpx;
+		}
+	}
+
+	.andr-mt-ltime {
+		line-height: 1;
+		font-size: 22rpx;
+		color: $font-color-disabled;
+	}
+</style>

+ 54 - 0
pages/user/realName/cropper.vue

@@ -0,0 +1,54 @@
+<template>
+	<view>
+		<ksp-cropper mode="fixed" :width="minPicWidth" :height="minPicHeight" :maxWidth="1024" :maxHeight="1024"
+			:url="url" @cancel="oncancel" @ok="uploadSuccess"></ksp-cropper>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				// 保存触发事件
+				eventChannel: '',
+				minPicWidth: 100, //保存图片最小宽
+				minPicHeight: 100, //保存图片最小高
+				url: '' //图片
+
+			}
+		},
+		onLoad(opt) {
+			const that = this;
+			if (opt.width) {
+				that.minPicWidth = +opt.width;
+			}
+			if (opt.height) {
+				that.minPicHeight = +opt.height;
+			}
+			// #ifdef APP-NVUE
+			that.eventChannel = that.$scope.eventChannel; // 兼容APP-NVUE
+			// #endif
+			// #ifndef APP-NVUE
+			that.eventChannel = that.getOpenerEventChannel();
+			// #endif
+			that.eventChannel.on('urlNext', function(data) {
+				that.url = data.url;
+			})
+		},
+		methods: {
+			oncancel(e) {
+				uni.navigateBack();
+				console.log(e, 'on');
+			},
+			// 3.定义自己的回调函数
+			uploadSuccess(tempFilePath) {
+				this.eventChannel.emit('uploadSuccess', tempFilePath.path);
+				// 后退回原来的页面
+				uni.navigateBack();
+			},
+
+		}
+	}
+</script>
+<style>
+</style>

+ 394 - 0
pages/user/realName/realNameAuthentication.vue

@@ -0,0 +1,394 @@
+<template>
+	<view class="content padding-b-30">
+		<view class="listBox" @click="navCroper(480,640,'upimg')">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="titleBox">
+						<view class="title">正面照</view>
+						<view class="font-color-gray font-size-sm">
+							上传您的正面照
+						</view>
+					</view>
+					<view class="right flex">
+						<!-- #ifdef H5 -->
+						<image class="userRenzheng" :src="upimg||this.urlFile + '/static/image/realUser.png'"
+							mode="widthFix"></image>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<image class="userRenzheng" :src="upimg||'/static/image/realUser.png'" mode="widthFix"></image>
+						<!-- #endif -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="listBox" @click="navCroper(400,300,'sfzZm')">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="titleBox">
+						<view class="title">身份证正面</view>
+						<view class="font-color-gray font-size-sm">
+							上传您的身份证正面
+						</view>
+					</view>
+					<view class="right flex">
+						<!-- #ifdef H5 -->
+						<image class="userRenzheng" :src="sfzZm||this.urlFile + '/static/image/realZm.png'"
+							mode="widthFix"></image>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<image class="userRenzheng" :src="sfzZm||'/static/image/realZm.png'" mode="widthFix"></image>
+						<!-- #endif -->
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="listBox" @click="navCroper(400,300,'sfzFm')">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="titleBox">
+						<view class="title">身份证反面</view>
+						<view class="font-color-gray font-size-sm">
+							上传您的身份证反面
+						</view>
+					</view>
+					<view class="right flex">
+						<!-- #ifdef H5 -->
+						<image class="userRenzheng" :src="sfzFm||this.urlFile + '/static/image/realBm.png'"
+							mode="widthFix"></image>
+						<!-- #endif -->
+						<!-- #ifndef H5 -->
+						<image class="userRenzheng" :src="sfzFm||'/static/image/realBm.png'" mode="widthFix"></image>
+						<!-- #endif -->
+					</view>
+				</view>
+			</view>
+		</view>
+    
+		<view class="listBox">
+			<view class="list">
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">真实姓名</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="name" type="text" placeholder="请填写真实姓名"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+				<view class="flex listItem">
+					<view class="flex titleBox">
+						<text class="title">身份证号</text>
+					</view>
+					<view class="right flex">
+						<input class="input" v-model="cardId" type="text" placeholder="请填写身份证号"
+							placeholder-class="placeholder" />
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="base-buttom" :class="{ 'bg-gray': loding }" @click="loding ? '' : confirm()">提交</view>
+	</view>
+</template>
+
+<script>
+	import {
+		real_name
+	} from '@/api/user.js';
+	import {
+		mapState
+	} from "vuex"
+	export default {
+		data() {
+			return {
+				name: '', //用户名称
+				cardId: '', //身份证号
+				upimg: '', //图片地址
+				xyfImg: '', //信用分图片
+				sfzZm: '', //身份证正面
+				sfzFm: '', //身份证反面
+				loding: false, //是否载入中
+			};
+		},
+		onLoad(options) {},
+		computed: {
+			// #ifdef H5
+			...mapState(['urlFile']),
+			// #endif
+			...mapState(['baseURL']),
+		},
+		methods: {
+			upLoad(path) {
+				// #ifdef H5
+				console.log(path,'h5');
+				// #endif
+				uni.showLoading({
+					title: '图片上传中',
+					mask: true
+				});
+				return new Promise((resolve, error) => {
+					uni.uploadFile({
+						url: this.baseURL + '/api/upload/image', //仅为示例,非真实的接口地址
+						filePath: path,
+						name: 'file',
+						header: {
+							"Authori-zation": 'Bearer ' + uni.getStorageSync('token')
+						},
+						success: (uploadFileRes) => {
+							if ("string" === typeof uploadFileRes.data) {
+								resolve(JSON.parse(uploadFileRes.data).data)
+							} else {
+								resolve(uploadFileRes.data.data)
+							}
+						},
+						complete() {
+							uni.hideLoading()
+						}
+					});
+				})
+			},
+			// 图片裁切
+			/**
+			 * @param {Number} w 裁切宽度比例
+			 * @param {Number} h 裁切高度比例
+			 * @param {Number} mw 图片最小宽度
+			 * @param {Number} mh 图片最小高度
+			 * @param {String} url url修改
+			 */
+			navCroper(w, h, type) {
+				let that = this;
+				let tt = (type=='upimg'?2:1)
+				this.onImg(tt).then((url) => {
+					uni.navigateTo({
+						url: `./cropper?width=${w}&height=${h}`,
+						events: {
+							uploadSuccess(res) {
+								that.upLoad(res).then((urldata) => {
+									that[type] = urldata.url;
+								})
+								// console.log(e, '接受数据');
+							}
+						},
+						success: function(res) {
+							// 通过eventChannel向被打开页面传送数据
+							res.eventChannel.emit('urlNext', {
+								url
+							})
+						}
+					})
+				})
+			},
+			onImg(type) {
+				const _this = this
+				return new Promise((ok, erro) => {
+					// 判断是否需要选择
+					if(type==1){
+						uni.showActionSheet({
+							itemList: ['拍照', '选择一张照片'],
+							success: function(res) {
+								_this.chooseImage(res.tapIndex).then((url) => {
+									ok(url)
+								}).catch((res) => {
+									erro(res)
+								})
+							},
+							fail: function(res) {
+								erro(res)
+								console.log(res.errMsg);
+							}
+						});
+					}
+					// 判断是否只需要拍照
+					if(type==2){
+						_this.chooseImage(0).then((url) => {
+							ok(url)
+						}).catch((res) => {
+							erro(res)
+						})
+					}
+					
+					
+
+				})
+
+			},
+			chooseImage: function(index) {
+				const _this = this
+				return new Promise((ok, error) => {
+					// 从相册/相机选择
+					// 如需直接开相机或直接选相册,请只使用一个选项
+					const sourceType = index === 0 ? ['camera'] : ['album']
+					uni.chooseImage({
+						count: 1, //默认9
+						sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+						sourceType: sourceType,
+						success: function(res) {
+							ok(res.tempFilePaths[0])
+						},
+						fail(e) {
+							uni.showModal({
+								title: '文件打开错误',
+								content: '请设置授权文件存储权限',
+								showCancel: false,
+							});
+							error(e)
+						}
+					});
+				})
+
+			},
+
+			// 实名认证
+			confirm(e) {
+				if (!this.name) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写姓名',
+						showCancel: false,
+					});
+					return
+				}
+				if (!this.cardId) {
+					uni.showModal({
+						title: '错误',
+						content: '请填写身份证号',
+						showCancel: false,
+					});
+					return
+				}
+				if (!this.upimg) {
+					uni.showModal({
+						title: '错误',
+						content: '请上传正面照',
+						showCancel: false,
+					});
+					return
+				}
+				if (!this.sfzZm) {
+					uni.showModal({
+						title: '错误',
+						content: '请上传身份证正面照',
+						showCancel: false,
+					});
+					return
+				}
+				if (!this.sfzFm) {
+					uni.showModal({
+						title: '错误',
+						content: '请上传身份证反面照',
+						showCancel: false,
+					});
+					return
+				}
+				/*
+				if (!this.xyfImg) {
+					uni.showModal({
+						title: '错误',
+						content: '上传您的信用分截图',
+						showCancel: false,
+					});
+					return
+				}*/
+				this.loding = true;
+				real_name({
+						real_name: this.name,
+						id_card: this.cardId,
+						face_image: this.upimg.replace('data:image/jpeg;base64,', ''),
+						id_card_front_image: this.sfzZm.replace('data:image/jpeg;base64,', ''),
+						id_card_back_image: this.sfzFm.replace('data:image/jpeg;base64,', ''),
+						pay_points: this.xyfImg.replace('data:image/jpeg;base64,', ''),
+
+					})
+					.then((e) => {
+						this.loding = false;
+						if (e.msg == '已实名') {
+							uni.showModal({
+								title: '提示',
+								content: '恭喜您实名认证成功',
+								showCancel: false,
+								complete: () => {
+									uni.switchTab({
+										url: '/pages/user/user'
+									})
+								}
+							});
+						} else {
+							uni.showToast({
+								title: '认证失败' ,
+								icon:"none"
+							})
+						}
+					})
+					.catch(err => {
+						this.loding = false;
+						console.log(err);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content,
+	page {
+		min-height: 100%;
+	}
+
+	.listBox {
+		margin: $page-row-spacing;
+		margin-top: 30rpx;
+		border-radius: 20rpx;
+		overflow: hidden;
+		background-color: #FFFFFF;
+	}
+
+	.list {
+		.input {
+			text-align: right;
+			font-size: $font-base;
+			color: $color-gray;
+			width: 100%;
+		}
+
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+		}
+
+		.right {
+			color: $font-color-light;
+			font-size: $font-base;
+			flex-grow: 1;
+			justify-content: flex-end;
+
+			.userRenzheng {
+				width: 400rpx;
+			}
+
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.bg-gray {
+		background-color: $color-gray;
+	}
+
+	.base-buttom {
+		position: relative;
+		bottom: auto;
+		right: auto;
+		left: auto;
+	}
+</style>

+ 348 - 0
pages/user/scoreAccumulate.vue

@@ -0,0 +1,348 @@
+<template>
+	<view class="content">
+		<!-- <view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view> -->
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
+						<view class="title-box">
+							<view class="title">
+								<text>{{ item.mark }}</text>
+							</view>
+							<view class="time">
+								<text>{{ item.add_time }}</text>
+							</view>
+						</view>
+						<view class="money">
+							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+		<view class="bottom-box">
+			<button class="add-btn up" @click="confirmShow">积分转佣金</button>
+			<navigator url="./setintegral">
+			<button class="add-btn yue" >积分转账</button>
+			</navigator>
+		</view>
+	</view>
+</template>
+
+<script>
+	
+import { integrallist } from '@/api/functionalUnit.js';
+import empty from '@/components/empty/empty.vue';
+import {
+		getUserInfo
+	} from '@/api/user.js';
+import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+export default {
+	components: {
+		empty
+	},
+	computed: {
+		...mapState('user', ['userInfo'])
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+			],
+		};
+	},
+	onShow() {
+		// 载入积分数据
+		this.loadData();
+		this.loadBaseData();
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo']),
+		// 重新获取用户数据
+		loadBaseData() {
+			getUserInfo({})
+				.then(({
+					data
+				}) => {
+					console.log(data.nickname)
+					this.setUserInfo(data);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		confirmShow(){
+			uni.showModal({
+				title: '积分转佣金',
+				editable: true,
+				placeholderText:'请输入要转换的积分',
+				success: res => {
+					if(res.confirm){
+						// setMoney({
+						// 	brokerage:+res.content/10
+						// }).then((e)=>{
+						// 	uni.showToast({
+						// 		title: '积分转佣金完成'
+						// 	});
+						// }).catch((err)=>{
+						// 	console.log(err);
+						// })
+					}
+				},
+				fail: () => {},
+				complete: () => {}
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		},
+		//获取收入支出信息
+		async loadData(source) {
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+
+			integrallist(
+				{
+					page: navItem.page,
+					limit: navItem.limit
+				},
+				state
+			)
+				.then(({ data }) => {
+					if (data.length > 0) {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+					}
+					if (navItem.limit == data.length) {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'more';
+						return;
+					} else {
+						//判断是否还有数据, 有改为 more, 没有改为noMore
+						navItem.loadingType = 'noMore';
+					}
+					uni.hideLoading();
+					this.$set(navItem, 'loaded', true);
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+}
+.navbar {
+	display: flex;
+	height: 40px;
+	padding: 0 5px;
+	background: #fff;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	position: relative;
+	z-index: 10;
+	.nav-item {
+		flex: 1;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		height: 100%;
+		font-size: 15px;
+		color: $font-color-dark;
+		position: relative;
+		&.current {
+			color: $base-color;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 2px solid $base-color;
+			}
+		}
+	}
+}
+// 列表
+
+.swiper-box {
+	height: calc(100% - 44px);
+	padding-top: 10rpx;
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		.title-box {
+			.title {
+				font-size: $font-lg;
+				color: $font-color-base;
+			}
+			.time {
+				font-size: $font-base;
+				color: $font-color-light;
+			}
+		}
+		.money {
+			color: #fd5b23;
+			font-size: $font-lg;
+		}
+	}
+}
+.list-scroll-content {
+	height: 100%;
+}
+.content {
+	height: 100%;
+	.empty-content {
+		background-color: #ffffff;
+	}
+}
+.bottom-box{
+	position: absolute;
+	bottom: 0;
+	left:0;
+	right:0;
+	padding-bottom: 30rpx;
+}
+.add-btn {
+		color:#FFF;
+		&.yue{
+			background-color: #FFF;
+			color: #6B4216;
+		}
+		&.up {
+			background: linear-gradient(-90deg, #FAC545, #FFE000);
+		}
+
+		display: flex;
+		align-items: center;
+		justify-content: center;
+		width: 604rpx;
+		height: 90rpx;
+		margin: 0 auto;
+		margin-top: 30rpx;
+		font-size: $font-lg;
+		border-radius: 10rpx;
+
+	}
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+		.title{
+			text-align: center;
+		}
+		.mian {
+			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;
+	
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+	
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+	
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+	
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+	
+					font-size: 32rpx;
+					color: #605128;
+				}
+	
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
+		}
+	}
+</style>

+ 314 - 0
pages/user/shareQrCode.vue

@@ -0,0 +1,314 @@
+<template>
+	<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 -->
+		<view class='keep' @click='savePosterPath'>保存海报</view>
+		<!-- #endif -->
+		
+	</view>
+</template>
+
+<script>
+import { spreadBanner } from '@/api/user.js';
+import { qrcode } from  '@/api/user.js';
+import { mapState } from 'vuex';
+export default {
+	// #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 {
+			shareList: [],
+			swiperIndex: 0,
+			poster: '',	// 当前海报
+		}
+	},
+	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']),
+	},
+	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) {
+													uni.showToast({
+														title: '保存成功' ,
+														icon:"success"
+													})
+													return 
+												},
+												fail: function(res) {
+													uni.showToast({
+														title: res.errMsg ,
+														icon:"none"
+													})
+													return
+												},
+												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) {
+														uni.showToast({
+															title: '已取消!' ,
+															icon:"none"
+														})
+														return ;
+													}
+												}
+											})
+										}
+									})
+								} else {
+									uni.saveImageToPhotosAlbum({
+										filePath: resFile.tempFilePath,
+										success: function(res) {
+											uni.showToast({
+												title: '保存成功' ,
+												icon:"success"
+											})
+											return;
+										},
+										fail: function(res) {
+											uni.showToast({
+												title:  res.errMsg ,
+												icon:"none"
+											})
+											return ;
+										},
+										complete: function(res) {},
+									})
+								}
+							},
+							fail(res) {
+		
+							}
+						})
+					} else {
+						uni.showToast({
+							title:  resFile.errMsg  ,
+							icon:"none"
+						})
+						return 
+					}
+				},
+				fail(res) {
+					uni.showToast({
+						title:  res.errMsg  ,
+						icon:"none"
+					})
+					return 
+				}
+			})
+		},
+		
+		// #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'
+					});
+				}
+			});
+		},
+		// #endif
+		
+		// 获取海报
+		loadData() {
+			let obj = this;
+			uni.showLoading({
+				title: '获取中',
+				mask: true,
+			});
+			spreadBanner({
+				// #ifdef H5
+				type: 2,
+				// #endif
+				// #ifdef MP
+				type: 1
+				// #endif
+			}).then(res =>{
+				uni.hideLoading();
+				obj.shareList = res.data;
+				console.log('obj.shareList',obj.shareList);
+			}).catch(err => {
+				uni.hideLoading();
+			});
+		},
+	}
+}
+</script>
+
+<style lang="scss">
+	page {
+		background: #a3a3a3;
+		height: 100%;
+	}
+.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;
+	}
+	
+	.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;
+	}
+}
+.preserve {
+	color: #fff;
+	text-align: center;
+	margin-top: 38rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	.line {
+		width: 100rpx;
+		height: 1px;
+		background-color: #fff;
+	}
+	.tip {
+		margin: 0 20rpx;
+		font-size: 28rpx;
+	}
+}
+</style>

+ 507 - 0
pages/user/shopPage.vue

@@ -0,0 +1,507 @@
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<scroll-view class="content-box" scroll-y="true">
+			<view class="user-section">
+				<view class="user-info-box ">
+					<view class="detail flex" @click="navTo('/pages/set/userinfo')">
+						<view class="portrait-box">
+							<image class="portrait" :src="shopAction.image || '/static/error/shopErroe.png'"></image>
+						</view>
+						<view class="info-box">
+							<view class="username">{{ shopAction.name?shopAction.name:'载入中'}}</view>
+							<view class="authentication success">已认证</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="cover-container">
+				<view class="tj-sction" v-if="type==1">
+					<view class="tj-item" @click="navTo('./money/wallet')">
+						<text>支付金额</text>
+						<text class="num">{{ orderNum.todayPrice || '0' }}</text>
+						<text>昨日:{{orderNum.proPrice}}</text>
+					</view>
+					<!-- <view class="tj-item" @click="navTo('/pages/user/award/award')">
+						<text>会员数</text>
+						<text class="num">{{ orderNum.proPrice || '0' }}</text>
+						<text>昨日:{{orderNum.proPrice}}</text>
+					</view> -->
+					<view class="tj-item" @click="navTo('/pages/user/scoreAccumulate')">
+						<text>支付订单数</text>
+						<text class="num">{{ orderNum.todayCount || '0' }}</text>
+						<text>昨日:{{orderNum.proCount}}</text>
+					</view>
+				</view>
+				<!-- 订单 -->
+				<view class="item-box">
+					<view class="box-title flex">
+						<view class="title"><text>店铺订单</text></view>
+						<!-- <view class="link" @click="navTo('/pages/shop/shopOrder?state=0')" hover-class="common-hover">
+							<text>全部</text>
+							<text class="iconfont iconenter"></text>
+						</view> -->
+					</view>
+					<view class="order-section">
+						<view class="order-item" @click="navTo('/pages/shop/shopOrder?state=0')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class=" icon position-relative">
+								<view class="numOrderItem font-color-gray">
+									{{orderNum.unpaid_count}}
+								</view>
+							</view>
+							<text>待付款</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/shop/shopOrder?state=1')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class=" icon position-relative">
+								<view class="numOrderItem font-color-red">
+									{{orderNum.unshipped_count}}
+								</view>
+							</view>
+							<text>待发货</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/shop/shopOrder?state=2')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<view class="numOrderItem font-color-gray">
+									{{orderNum.received_count}}
+								</view>
+							</view>
+							<text>已发货</text>
+						</view>
+						<!-- <view class="order-item" @click="navTo('/pages/shop/shopOrderAfter?state=3')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<view class="numOrderItem font-color-yellow">
+									{{orderNum.refund_count}}
+								</view>
+							</view>
+							<text>待售后</text>
+						</view> -->
+					</view>
+				</view>
+				<view class="listBox">
+					<view class="list">
+						<view class="flex listItem" @click="navTo('/pages/shop/repair/clientRepair')" v-if="type==1">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">客户报修</text>
+							</view>
+							<view class="right flex" v-if="question>0">
+								<text class="numbox">{{question}}</text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/shop/repair/repairHistory')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修历史</text>
+							</view>
+							<!-- <view class="right flex" v-if="question>0">
+								<text class="numbox">{{question}}</text>
+							</view> -->
+						</view>
+						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/shopMoney.png" mode="widthFix">
+								</image>
+								<text class="title">店铺钱包</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view> -->
+						<view class="flex listItem" @click="navTo('/pages/shop/repair/taskClientRepair')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修任务</text>
+							</view>
+							<view class="right flex" v-if="tesk>0">
+								<text class="numbox">{{tesk}}</text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myServer.png" mode="widthFix"></image>
+								<text class="title">联系平台</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view> -->
+						<view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/mySet.png" mode="widthFix"></image>
+								<text class="title">设置</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tapBottom" @click="changeTab">
+					前往用户界面
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		statistics,
+		funds,
+		question,
+		adminStore,
+		task
+	} from '@/api/shop.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				type: 0, //0为数据未加载,1为门店2为店员
+				orderNum: {
+					unpaid_count: 0, //待支付
+					unshipped_count: 0, //待发货
+					received_count: 0, //待收获
+					refund_count: 0, //待售后
+					todayPrice: 0, //今日成交额
+					todayCount: 0, //今日订单数
+					proPrice: 0, //昨日成交额
+					proCount: 0, //昨日订单数
+				},
+				question: 0, //维修数量
+				tesk: 0, //维修任务数量
+			};
+		},
+		computed: {
+			...mapState('user', ['hasLogin']),
+			...mapState('shop', ['shopAction'])
+		},
+		created() {
+			this.type = this.shopAction.type
+		},
+		methods: {
+			...mapMutations('shop', ['setShopAction']),
+			// 重新加载数据
+			getInit() {
+				const that = this;
+				// 订单数
+				statistics().then((e) => {
+					that.orderNum = e.data
+				})
+				// 门店资金
+				funds().then((e) => {
+					that.name = e.data.name;
+					that.logo = e.data.image;
+					// 保存商店数据
+					if (e.data.address) {
+						e.data.type = 1;
+						that.setShopAction(e.data);
+					} else {
+						e.data.type = 2;
+						adminStore().then((ar) => {
+							that.setShopAction(ar.data);
+						}).catch((e) => {
+							console.log(e);
+						})
+					}
+					that.type = e.data.type;
+				})
+				// 查询店长客户报修数量
+				question().then((e) => {
+					that.question = e.data.count
+				})
+				// 查询维修任务数量
+				task().then((e) => {
+					that.tesk = e.data.count;
+				}).catch((e) => {
+					console.log(e);
+				})
+
+			},
+			// 界面切换
+			changeTab() {
+				this.$emit('tab', false)
+			},
+			navTo(url) {
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url
+					});
+				}
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.tapBottom {
+		margin: 0 50rpx;
+		text-align: center;
+		color: #FFFFFF;
+		border: 1px solid $color-green;
+		background-color:$color-green ;
+		line-height: 1;
+		padding: 25rpx;
+		border-radius: 100rpx;
+		margin-top: 50rpx;
+	}
+
+	.listBox {
+		margin-top: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.right {
+			.img {
+				width: 26rpx;
+			}
+
+			.numbox {
+				background-color: $color-red;
+				color: #FFFFFF;
+				font-size: 22rpx;
+				border-radius: 100rpx;
+				min-width: 36rpx;
+				height: 36rpx;
+				line-height: 36rpx;
+				text-align: center;
+				padding: 0 5rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				padding-left: 20rpx;
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	%flex-center {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	%section {
+		display: flex;
+		justify-content: space-around;
+		align-content: center;
+		border-radius: 10rpx;
+	}
+
+	.container {
+		height: 100%;
+		background-color: $page-color-base;
+	}
+
+	.content-box {
+		height: 100%;
+	}
+
+	.vheigh {
+		height: var(--status-bar-height);
+	}
+
+	.user-section {
+		padding: 15rpx 30rpx 0;
+		position: relative;
+	}
+
+	.user-info-box {
+		height: 180rpx;
+		color: white;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		z-index: 1;
+
+		.detail {
+			height: 130rpx;
+
+			.portrait-box {
+				height: 100%;
+
+				.portrait {
+					width: 130rpx;
+					height: 100%;
+					border: 5rpx solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			.info-box {
+				margin-left: 20rpx;
+				line-height: 1.5;
+
+				.username {
+					font-size: 40rpx;
+					color: $font-color-dark;
+					font-weight: bold;
+					height: 100%;
+				}
+
+				.authentication {
+					border: 2rpx solid #FF4241;
+					border-radius: 20px;
+					padding: 0 25rpx;
+					font-size: 24rpx;
+					color: #FF4241;
+					float: left;
+
+					&.success {
+						border: 2rpx solid $color-green;
+						color: $color-green;
+					}
+				}
+			}
+		}
+	}
+
+	.cover-container {
+		padding: 0 30rpx;
+		position: relative;
+		padding-bottom: 20rpx;
+	}
+
+	.tj-sction {
+		@extend %section;
+
+		.tj-item {
+			@extend %flex-center;
+			flex-direction: column;
+			height: 100rpx;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+
+		.num {
+			font-size: $font-base;
+			color: $font-color-dark;
+			margin-bottom: 8rpx;
+			font-weight: bold;
+		}
+	}
+
+	.item-box {
+		border-radius: 20rpx;
+		background-color: white;
+		margin-top: 20rpx;
+
+		.box-title {
+			line-height: 1;
+			padding: 30rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.order-section {
+			@extend %section;
+			padding: 28rpx 0;
+			padding-top: 0;
+
+			.order-item {
+				@extend %flex-center;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+				font-size: $font-sm;
+				color: $font-color-dark;
+
+				.numOrderItem {
+					font-size: 36rpx;
+					font-weight: bold;
+					text-align: center;
+				}
+			}
+
+			.iconfont {
+				font-size: 48rpx;
+				margin-bottom: 18rpx;
+				color: #fa436a;
+			}
+
+			.icon-shouhoutuikuan {
+				font-size: 44rpx;
+			}
+
+			.icon {
+				height: 50rpx;
+				width: 48rpx;
+				margin-bottom: 18rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				background-position: center;
+
+				.icon-img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.history-section {
+		// padding: 30rpx 0 0;
+		margin-top: 20rpx;
+		background: #fff;
+		border-radius: 10rpx;
+
+		.h-list {
+			white-space: nowrap;
+			padding: 30rpx 30rpx 0;
+
+			.h-list-image {
+				display: inline-block;
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+</style>

+ 557 - 0
pages/user/userPage.vue

@@ -0,0 +1,557 @@
+<template>
+	<view class="container">
+		<view class="vheigh"></view>
+		<scroll-view class="content-box" scroll-y="true">
+			<view class="user-section">
+				<view class="user-info-box ">
+					<view class="detail flex">
+						<view class="portrait-box" @click="navTo('/pages/set/userinfo')">
+							<image class="portrait" :src="user.avatar || '/static/error/missing-face.png'"></image>
+						</view>
+						<view class="info-box">
+							<view class="username flex-start">
+								<text class="clamp padding-r-20">
+									{{ user.nickname || '游客' }}
+								</text>
+								<image v-if="user.level>0" class="tipLevel flex-shrink-false"
+									:src="`../../static/image/level${user.level-1}.png`" mode="heightFix"></image>
+							</view>
+							<view class="flex-start flex">
+								<view class="authentication"
+									@click="navTo('/pages/user/realName/realNameAuthentication')"
+									v-if="userInfo.is_real==0||!userInfo.is_real">未实名认证</view>
+								<view class="authentication success" v-else>已认证</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="cover-container">
+				<view class="tj-sction">
+					<view class="tj-item" @click="navTo('./money/wallet')">
+						<text class="num">{{ user.now_money || '0.00' }}</text>
+						<text>余额</text>
+					</view>
+					<view v-if="fx" class="tj-item" @click="navTo('/pages/user/award/award')">
+						<text class="num">{{ user.brokerage_price || '0.00' }}</text>
+						<text>佣金</text>
+					</view>
+					<!-- <view class="tj-item" @click="navTo('/pages/index/route')">
+						<text class="num">{{ user.record_sum || '0' }}</text>
+						<text>行程</text>
+					</view> -->
+					<view class="tj-item" @click="navTo('/pages/index/notice')">
+						<text class="num">{{ notic|| '0' }}</text>
+						<text>消息</text>
+					</view>
+				</view>
+				<!-- 订单 -->
+				<view class="item-box">
+					<view class="box-title flex">
+						<view class="title"><text>我的订单</text></view>
+						<!-- <view class="link" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover">
+							<text>全部订单</text>
+							<text class="iconfont iconenter"></text>
+						</view> -->
+					</view>
+					<view class="order-section">
+						<view class="order-item" @click="navTo('/pages/order/order?state=3')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconAll.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.unshipped_count > 0">
+									<text>{{ orderInfo.unshipped_count }}</text>
+								</view> -->
+							</view>
+							<text>已完成</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=0')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconPay.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.unpaid_count > 0">
+									<text>{{ user.unpaid_count }}</text>
+								</view>
+							</view>
+							<text>待付款</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/order?state=2')" hover-class="common-hover"
+							:hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconGet.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="user.received_count > 0">
+									<text>{{ user.received_count }}</text>
+								</view>
+							</view>
+							<text>待收货</text>
+						</view>
+						<view class="order-item" @click="navTo('/pages/order/orderAfter?state=0')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userIconout.png" mode="aspectFit">
+								</image>
+								<!-- <view class="corner" v-if="orderInfo.complete_count > 0">
+									<text>{{ orderInfo.complete_count }}</text>
+								</view> -->
+							</view>
+							<text>售后</text>
+						</view>
+					</view>
+				</view>
+				<view class="listBox">
+					<view class="list">
+						<view class="flex listItem" @click="navTo('/pages/user/myCart/myCart')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myCart.png" mode="widthFix"></image>
+								<text class="title">我的车辆</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/user/repair/userRepair')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myWx.png" mode="widthFix"></image>
+								<text class="title">维修历史</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" v-if="fx" @click="navTo('/pages/user/myteam')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">我的团队</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<view class="flex listItem" @click="navTo('/pages/set/address')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myAddress.png" mode="widthFix">
+								</image>
+								<text class="title">我的地址</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+						<!-- #ifndef APP -->
+						<view class="flex listItem" @click="navTo('/pages/user/shareQrCode')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifdef APP -->
+						<view class="flex listItem" @click="shareDomApp">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myitem.png" mode="widthFix"></image>
+								<text class="title">邀请好友</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<!-- #ifndef MP -->
+						<view class="flex listItem" @click="navTo('/pages/public/workwork')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/myServer.png" mode="widthFix"></image>
+								<text class="title">关于我们</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+							</view>
+						</view>
+						<!-- #endif -->
+						<view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/mySet.png" mode="widthFix"></image>
+								<text class="title">设置</text>
+							</view>
+							<view class="right flex">
+								<text></text>
+								<!-- <image class="img" src="../../static/icon/next1.png" mode="widthFix"></image> -->
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="tapBottom" v-if='user.adminid' @click="changeTab">
+					前往商家界面
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		share
+	} from '@/api/wx';
+	import {
+		getUser
+	} from '@/api/user.js';
+	import {
+		articleList,
+		notify
+	} from '@/api/index.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				user: {
+					avatar: '', //头像
+					nickname: '', //昵称
+					now_money: 0, //余额
+					brokerage_price: 0, //佣金
+					record_sum: 0, //行程
+					notice_sum: 0, //报警信息
+					question_sum: 0, //系统消息
+					// 订单数据类型
+					orderStatusNum: {
+						unpaid_count: 0, //待付款
+						received_count: 0, //待收货
+					},
+				},
+				shareData: {}
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL', 'urlFile']),
+			...mapState(['fx']),
+			// 总消息条数
+			notic() {
+				return this.user.question_sum + this.user.notice_sum;
+			},
+		},
+		// 创建时获取分享信息
+		created() {
+			share().then((res) => {
+				this.shareData = res.data.data
+			}).catch((res) => {
+				console.log(res, '分享加载失败');
+			})
+		},
+		methods: {
+			//#ifdef APP
+			shareDomApp() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title: '绿津智能电动车',
+					summary: '新一代智能电动车,手机开关锁、智能防盗、卫星定位,时刻掌握爱车位置。品牌大厂生产,质量好,款式多,售后优,所有车辆支持0元购新车!',
+					imageUrl: this.shareData.img,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+			// 获取用户数据
+			getUser() {
+				const that = this;
+				getUser({}).then((e) => {
+					this.user = e.data;
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 系统消息
+				articleList({}, 1).then((e) => {
+					that.user.question_sum = e.data.count
+					console.log(that, 1);
+				}).catch((e) => {
+					console.log(e);
+				})
+				// 报警消息
+				notify().then((e) => {
+					that.user.notice_sum = e.data.count
+				}).catch((e) => {
+					console.log(e);
+				})
+			},
+			changeTab() {
+				this.$emit('tab', true)
+			},
+			navTo(url) {
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						fail(e) {
+							console.log(e);
+						}
+					});
+				}
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	page {
+		height: 100%;
+	}
+
+	.tapBottom {
+		margin: 0 50rpx;
+		text-align: center;
+		color: #FFFFFF;
+		border: 1px solid $color-red;
+		background-color: $color-red;
+		line-height: 1;
+		padding: 25rpx;
+		border-radius: 100rpx;
+		margin-top: 50rpx;
+	}
+
+	.listBox {
+		margin-top: 20rpx;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			border-bottom: 1px solid $page-color-light;
+		}
+
+		.listIconImg {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.right {
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				padding-left: 20rpx;
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	%flex-center {
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+	}
+
+	%section {
+		display: flex;
+		justify-content: space-around;
+		align-content: center;
+		border-radius: 10rpx;
+	}
+
+	.container {
+		height: 100%;
+		background-color: $page-color-base;
+	}
+
+	.content-box {
+		height: 100%;
+	}
+
+	.vheigh {
+		height: var(--status-bar-height);
+	}
+
+	.user-section {
+		padding: 15rpx 30rpx 0;
+		position: relative;
+	}
+
+	.user-info-box {
+		height: 180rpx;
+		color: white;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		position: relative;
+		z-index: 1;
+
+		.detail {
+			height: 130rpx;
+			flex-grow: 1;
+			overflow: hidden;
+
+			.portrait-box {
+				height: 100%;
+
+				.portrait {
+					width: 130rpx;
+					height: 100%;
+					border: 5rpx solid #fff;
+					border-radius: 50%;
+				}
+			}
+
+			.info-box {
+				margin-left: 20rpx;
+				line-height: 1.5;
+				flex-grow: 1;
+				overflow: hidden;
+
+				.tipLevel {
+					height: 36rpx;
+					margin-right: 20rpx;
+				}
+
+				.username {
+					font-size: 40rpx;
+					color: $font-color-dark;
+					font-weight: bold;
+					height: 100%;
+				}
+
+				.authentication {
+					border: 2rpx solid #FF4241;
+					border-radius: 20px;
+					padding: 0 25rpx;
+					font-size: 24rpx;
+					color: #FF4241;
+					float: left;
+
+					&.success {
+						border: 2rpx solid $color-green;
+						color: $color-green;
+					}
+				}
+			}
+		}
+	}
+
+	.cover-container {
+		padding: 0 30rpx;
+		position: relative;
+		padding-bottom: 20rpx;
+	}
+
+	.tj-sction {
+		@extend %section;
+
+		.tj-item {
+			@extend %flex-center;
+			flex-direction: column;
+			height: 100rpx;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+
+		.num {
+			font-size: $font-base;
+			color: $font-color-dark;
+			margin-bottom: 8rpx;
+			font-weight: bold;
+		}
+	}
+
+	.item-box {
+		border-radius: 20rpx;
+		background-color: white;
+		margin-top: 20rpx;
+
+		.box-title {
+			line-height: 1;
+			padding: 30rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+			}
+		}
+
+		.order-section {
+			@extend %section;
+			padding: 28rpx 0;
+			padding-top: 0;
+
+			.order-item {
+				@extend %flex-center;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 10rpx;
+				font-size: $font-sm;
+				color: $font-color-dark;
+			}
+
+			.iconfont {
+				font-size: 48rpx;
+				margin-bottom: 18rpx;
+				color: #fa436a;
+			}
+
+			.icon-shouhoutuikuan {
+				font-size: 44rpx;
+			}
+
+			.icon {
+				height: 50rpx;
+				width: 48rpx;
+				margin-bottom: 18rpx;
+				background-size: 100%;
+				background-repeat: no-repeat;
+				background-position: center;
+
+				.icon-img {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
+
+	.history-section {
+		// padding: 30rpx 0 0;
+		margin-top: 20rpx;
+		background: #fff;
+		border-radius: 10rpx;
+
+		.h-list {
+			white-space: nowrap;
+			padding: 30rpx 30rpx 0;
+
+			.h-list-image {
+				display: inline-block;
+				width: 160rpx;
+				height: 160rpx;
+				margin-right: 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+	}
+</style>

+ 147 - 0
plugin/image-tools/index.js

@@ -0,0 +1,147 @@
+function getLocalFilePath(path) {
+    if (path.indexOf('_www') === 0 || path.indexOf('_doc') === 0 || path.indexOf('_documents') === 0 || path.indexOf('_downloads') === 0) {
+        return path
+    }
+    if (path.indexOf('file://') === 0) {
+        return path
+    }
+    if (path.indexOf('/storage/emulated/0/') === 0) {
+        return path
+    }
+    if (path.indexOf('/') === 0) {
+        var localFilePath = plus.io.convertAbsoluteFileSystem(path)
+        if (localFilePath !== path) {
+            return localFilePath
+        } else {
+            path = path.substr(1)
+        }
+    }
+    return '_www/' + path
+}
+
+export function pathToBase64(path) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            if (typeof FileReader === 'function') {
+                var xhr = new XMLHttpRequest()
+                xhr.open('GET', path, true)
+                xhr.responseType = 'blob'
+                xhr.onload = function() {
+                    if (this.status === 200) {
+                        let fileReader = new FileReader()
+                        fileReader.onload = function(e) {
+                            resolve(e.target.result)
+                        }
+                        fileReader.onerror = reject
+                        fileReader.readAsDataURL(this.response)
+                    }
+                }
+                xhr.onerror = reject
+                xhr.send()
+                return
+            }
+            var canvas = document.createElement('canvas')
+            var c2x = canvas.getContext('2d')
+            var img = new Image
+            img.onload = function() {
+                canvas.width = img.width
+                canvas.height = img.height
+                c2x.drawImage(img, 0, 0)
+                resolve(canvas.toDataURL())
+                canvas.height = canvas.width = 0
+            }
+            img.onerror = reject
+            img.src = path
+            return
+        }
+        if (typeof plus === 'object') {
+            plus.io.resolveLocalFileSystemURL(getLocalFilePath(path), function(entry) {
+                entry.file(function(file) {
+                    var fileReader = new plus.io.FileReader()
+                    fileReader.onload = function(data) {
+                        resolve(data.target.result)
+                    }
+                    fileReader.onerror = function(error) {
+                        reject(error)
+                    }
+                    fileReader.readAsDataURL(file)
+                }, function(error) {
+                    reject(error)
+                })
+            }, function(error) {
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            wx.getFileSystemManager().readFile({
+                filePath: path,
+                encoding: 'base64',
+                success: function(res) {
+                    resolve('data:image/png;base64,' + res.data)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}
+
+export function base64ToPath(base64) {
+    return new Promise(function(resolve, reject) {
+        if (typeof window === 'object' && 'document' in window) {
+            base64 = base64.split(',')
+            var type = base64[0].match(/:(.*?);/)[1]
+            var str = atob(base64[1])
+            var n = str.length
+            var array = new Uint8Array(n)
+            while (n--) {
+                array[n] = str.charCodeAt(n)
+            }
+            return resolve((window.URL || window.webkitURL).createObjectURL(new Blob([array], { type: type })))
+        }
+        var extName = base64.match(/data\:\S+\/(\S+);/)
+        if (extName) {
+            extName = extName[1]
+        } else {
+            reject(new Error('base64 error'))
+        }
+        var fileName = Date.now() + '.' + extName
+        if (typeof plus === 'object') {
+            var bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
+            bitmap.loadBase64Data(base64, function() {
+                var filePath = '_doc/uniapp_temp/' + fileName
+                bitmap.save(filePath, {}, function() {
+                    bitmap.clear()
+                    resolve(filePath)
+                }, function(error) {
+                    bitmap.clear()
+                    reject(error)
+                })
+            }, function(error) {
+                bitmap.clear()
+                reject(error)
+            })
+            return
+        }
+        if (typeof wx === 'object' && wx.canIUse('getFileSystemManager')) {
+            var filePath = wx.env.USER_DATA_PATH + '/' + fileName
+            wx.getFileSystemManager().writeFile({
+                filePath: filePath,
+                data: base64.replace(/^data:\S+\/\S+;base64,/, ''),
+                encoding: 'base64',
+                success: function() {
+                    resolve(filePath)
+                },
+                fail: function(error) {
+                    reject(error)
+                }
+            })
+            return
+        }
+        reject(new Error('not support'))
+    })
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
plugin/jweixin-module/index.js


BIN
static/controller/baoxiu.png


BIN
static/controller/dianchi.png


BIN
static/controller/dingwei.png


BIN
static/controller/huanche.png


BIN
static/controller/kaisuo.png


BIN
static/controller/qidong.png


BIN
static/controller/shouquan.png


BIN
static/controller/witchMessage.png


BIN
static/controller/witchShop.png


BIN
static/controller/xincheng.png


BIN
static/controller/xunche.png


+ 242 - 0
static/css/cmy.css

@@ -0,0 +1,242 @@
+.bg-color-red {
+	background-color: #e93323 !important;
+}
+
+/*水平线*/
+.hr {
+	width: 100%;
+	position: relative;
+	border-bottom: 1px solid #dddddd;
+	/* height: 0.5rpx; */
+}
+
+/* 一行显示 */
+.clamp {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	white-space: nowrap;
+	display: block;
+}
+
+/* 二行显示 */
+.clamp2 {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-line-clamp: 2;
+	-webkit-box-orient: vertical;
+}
+
+/* 二行显示 */
+.ellipsis {
+	overflow: hidden;
+	text-overflow: ellipsis;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+	-webkit-line-clamp: 2;
+}
+
+.common-hover {
+	background: #f5f5f5;
+}
+
+/* 角标 */
+.corner {
+	background-color: #e51c23;
+	position: absolute;
+	right: -18rpx;
+	top: -18rpx;
+	color: #FFFFFF;
+	text-align: center;
+	border-radius: 999px;
+	font-size: 24rpx !important;
+	min-width: 35rpx;
+	min-height: 35rpx;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	line-height: 1;
+}
+
+.flex_item {
+	display: flex;
+	align-items: center;
+	/* justify-content: space-between; */
+}
+
+/* 左右顶格加上下居中 */
+.flex-between-center {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+}
+
+/* flex布局-整体居中 */
+.flex-center {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+}
+/* flex-开始居中 */
+.flex-start {
+	display: flex;
+	align-items: center;
+	justify-content: flex-start;
+}
+/* 一行居中显示 */
+.flex-line{
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	flex-direction: column;
+}
+
+/*文字对齐*/
+.text-left {
+	text-align: left !important;
+}
+
+.text-center {
+	text-align: center !important;
+}
+
+.text-justify {
+	text-align: justify !important;
+}
+
+.text-right {
+	text-align: right !important;
+}
+
+.text-default {
+	color: #212121 !important;
+}
+
+.text-white {
+	color: #ffffff !important;
+}
+
+.text-primary {
+	color: #00bcd4 !important;
+}
+
+.text-success {
+	color: #009688 !important;
+}
+
+.text-info {
+	color: #03a9f4 !important;
+}
+
+.text-warning {
+	color: #ffc107 !important;
+}
+
+.text-danger {
+	color: #e51c23 !important;
+}
+
+.text-pink {
+	color: #e91e63 !important;
+}
+
+.text-purple {
+	color: #673ab7 !important;
+}
+
+.text-indigo {
+	color: #3f51b5 !important;
+}
+
+.text-gray {
+	color: #999999 !important;
+}
+
+.bg-default {
+	background-color: #f5f5f5 !important;
+}
+
+.bg-primary {
+	background-color: #00bcd4 !important;
+}
+
+.bg-success {
+	background-color: #009688 !important;
+}
+
+.bg-info {
+	background-color: #03a9f4 !important;
+}
+
+.bg-warning {
+	background-color: #FFB238 !important;
+}
+
+.bg-danger {
+	background-color: #DC4D46 !important;
+}
+
+.bg-pink {
+	background-color: #e91e63 !important;
+}
+
+.bg-purple {
+	background-color: #673ab7 !important;
+}
+
+.bg-indigo {
+	background-color: #3f51b5 !important;
+}
+
+.bg-white {
+	background-color: white !important;
+}
+
+.bg-gray {
+	background-color: #e3e3e3 !important;
+}
+
+/* 边框 */
+.border-radius-15 {
+	border-radius: 15rpx;
+}
+
+.border-radius-10 {
+	border-radius: 10rpx;
+}
+
+.border-radius-all {
+	border-radius: 1000rpx;
+}
+
+/* 底部边线 */
+.borde-b {
+	border-bottom: 1px solid #dddddd;
+}
+
+/* 弹性盒子 */
+.flex {
+	display: flex;
+	align-items: center;
+	justify-content: space-between;
+}
+
+.items-left {
+	justify-content: flex-start;
+}
+
+.items-right {
+	justify-content: flex-end;
+}
+
+.flex-shrink-false {
+	flex-shrink: 0;
+}
+
+.flex-grow-true {
+	flex-grow: 1;
+}
+
+.position-relative {
+	position: relative;
+}

BIN
static/error/emptyAddress.png


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác