Browse Source

2023-6-12

cmy 2 years ago
commit
9e324995d1
100 changed files with 25349 additions and 0 deletions
  1. 6 0
      .gitignore
  2. 292 0
      App.vue
  3. 88 0
      api/index.js
  4. 55 0
      api/login.js
  5. 109 0
      api/model.js
  6. 153 0
      api/order.js
  7. 186 0
      api/product.js
  8. 44 0
      api/set.js
  9. 126 0
      api/user.js
  10. 140 0
      api/wallet.js
  11. 173 0
      api/water.js
  12. 37 0
      api/wx.js
  13. 18 0
      components/empty/empty.vue
  14. 1355 0
      components/wangding-pickerAddress/data.js
  15. 103 0
      components/wangding-pickerAddress/wangding-pickerAddress.vue
  16. 27 0
      main.js
  17. 200 0
      manifest.json
  18. 19 0
      package.json
  19. 610 0
      pages.json
  20. 863 0
      pages/home/cart.vue
  21. 626 0
      pages/home/category.vue
  22. 863 0
      pages/home/index.vue
  23. 534 0
      pages/home/order.vue
  24. 641 0
      pages/home/user.vue
  25. 183 0
      pages/order/WriteOff.vue
  26. 1124 0
      pages/order/createOrder.vue
  27. 291 0
      pages/order/evaluate.vue
  28. 633 0
      pages/order/orderAfter.vue
  29. 209 0
      pages/order/orderDetail.vue
  30. 295 0
      pages/order/orderRefund.vue
  31. 233 0
      pages/order/shopList.vue
  32. 204 0
      pages/product/classify.vue
  33. 68 0
      pages/product/common/contentText.vue
  34. 139 0
      pages/product/common/discounts.vue
  35. 115 0
      pages/product/common/estimate.vue
  36. 78 0
      pages/product/common/freshDetail.vue
  37. 120 0
      pages/product/common/guessLike.vue
  38. 132 0
      pages/product/common/productBottom.vue
  39. 150 0
      pages/product/common/productContent.vue
  40. 55 0
      pages/product/common/topSwiper.vue
  41. 416 0
      pages/product/list.vue
  42. 648 0
      pages/product/product.vue
  43. 278 0
      pages/product/reply.vue
  44. 449 0
      pages/product/search.vue
  45. 252 0
      pages/product/showImg.vue
  46. 57 0
      pages/public/agreement.vue
  47. 130 0
      pages/public/artDetail.vue
  48. 164 0
      pages/public/artList.vue
  49. 160 0
      pages/public/domApp.vue
  50. 306 0
      pages/public/forget.vue
  51. 333 0
      pages/public/login.vue
  52. 261 0
      pages/public/loginMethods.vue
  53. 336 0
      pages/public/phoneLogin.vue
  54. 160 0
      pages/public/privacyAgreement.vue
  55. 158 0
      pages/public/redirect.vue
  56. 345 0
      pages/public/register.vue
  57. 457 0
      pages/public/userAgreement.vue
  58. 68 0
      pages/public/workwork.vue
  59. 375 0
      pages/public/wxLogin.vue
  60. 323 0
      pages/set/address.vue
  61. 258 0
      pages/set/addressManage.vue
  62. 226 0
      pages/set/password.vue
  63. 202 0
      pages/set/phone.vue
  64. 204 0
      pages/set/set.vue
  65. 164 0
      pages/set/userinfo.vue
  66. 238 0
      pages/user/admin/ktadmin.vue
  67. 636 0
      pages/user/admin/orderAdmin.vue
  68. 207 0
      pages/user/admin/useradmin.vue
  69. 236 0
      pages/user/award/account.vue
  70. 327 0
      pages/user/award/award.vue
  71. 199 0
      pages/user/award/awardList.vue
  72. 361 0
      pages/user/award/withdrawal.vue
  73. 404 0
      pages/user/money/pay.vue
  74. 105 0
      pages/user/money/paySuccess.vue
  75. 478 0
      pages/user/money/recharge.vue
  76. 313 0
      pages/user/money/wallet.vue
  77. 192 0
      pages/user/money/walletList.vue
  78. 444 0
      pages/user/myteam.vue
  79. 54 0
      pages/user/realName/cropper.vue
  80. 391 0
      pages/user/realName/realNameAuthentication.vue
  81. 441 0
      pages/user/shareQrCode.vue
  82. 324 0
      pages/water/deposit.vue
  83. 256 0
      pages/water/myWaterList.vue
  84. 566 0
      pages/water/waterDetail.vue
  85. 175 0
      pages/water/waterList.vue
  86. 338 0
      pages/water/waterUse.vue
  87. 147 0
      plugin/image-tools/index.js
  88. 0 0
      plugin/jweixin-module/index.js
  89. BIN
      static/controller/baoxiu.png
  90. BIN
      static/controller/dianchi.png
  91. BIN
      static/controller/dingwei.png
  92. BIN
      static/controller/huanche.png
  93. BIN
      static/controller/kaisuo.png
  94. BIN
      static/controller/qidong.png
  95. BIN
      static/controller/shouquan.png
  96. BIN
      static/controller/witchMessage.png
  97. BIN
      static/controller/witchShop.png
  98. BIN
      static/controller/xincheng.png
  99. BIN
      static/controller/xunche.png
  100. 490 0
      static/css/cmy.css

+ 6 - 0
.gitignore

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

+ 292 - 0
App.vue

@@ -0,0 +1,292 @@
+<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) {
+			//更新登陆状态
+			uni.getStorage({
+				key: 'userInfo',
+				success: res => {
+					obj.setUserInfo(res.data);
+					obj.login();
+				},fail(res) {
+					console.log(res,'res.data');
+				}
+				
+			});
+		}
+		// 获取当前位置附近商店数据
+		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: $base-color;
+	font-size: 32rpx;
+	padding: 30rpx;
+	color: #FFFFFF;
+	margin: 0 30rpx;
+	border-radius: 10rpx;
+	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%;
+	height: 0;
+}
+</style>

+ 88 - 0
api/index.js

@@ -0,0 +1,88 @@
+import request from '@/utils/request'
+
+// 促销商品
+export function groom4(data) {
+	return request({
+		url: '/api/groom/list/4',
+		method: 'get',
+		data
+	});
+}
+// 精品推荐
+export function groom1(data) {
+	return request({
+		url: '/api/groom/list/1',
+		method: 'get',
+		data
+	});
+}
+// 新品首发
+export function groom3(data) {
+	return request({
+		url: '/api/groom/list/3',
+		method: 'get',
+		data
+	});
+}
+
+// 获取首页信息
+export function loadIndexs(data) {
+	return request({
+		url: '/api/index',
+		method: 'get',
+		data
+	});
+}
+
+//获取活动列表
+export function getActionList(data) {
+	return request({
+		url: '/api/partake/out',
+		method: 'get',
+		data
+	});
+}
+
+//获取活动详情
+export function getActionDetail(data,id) {
+	return request({
+		url: '/api/partake/out/' + id,
+		method: 'get',
+		data
+	});
+}
+
+// 参加活动
+export function addAction(data) {
+	return request({
+		url: '/api/partake/participate_in',
+		method: 'post',
+		data
+	});
+}
+
+export function getAddList(data) {
+	return request({
+		url: '/api/partake/partake',
+		method: 'get',
+		data
+	});
+}
+
+//
+export function getStoreList(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		data
+	})
+}
+
+//普通商品核销
+export function orderVerific(data) {
+	return request({
+		url: '/api/order/order_verific',
+		method: 'post',
+		data
+	});
+}

+ 55 - 0
api/login.js

@@ -0,0 +1,55 @@
+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 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

+ 109 - 0
api/model.js

@@ -0,0 +1,109 @@
+import request from '@/utils/request'
+//获取其他用户名片信息
+export function getCommonUserCardInfo(data) {
+	return request({
+		url: '/api/pub/getCommonUserCardInfo',
+		method: 'post',
+		data
+	});
+}
+//获取模板详情
+export function getShowTemplateItem(data) {
+	return request({
+		url: '/api/pub/getShowTemplateItem',
+		method: 'post',
+		data
+	});
+}
+
+//购买皮肤模板
+export function subShowTemplateOrder(data) {
+	return request({
+		url: '/api/user/subShowTemplateOrder',
+		method: 'post',
+		data
+	});
+}
+// 获取服务时间类型
+export function getServiceTimeTypeList(data) {
+	return request({
+		url: '/api/pub/getServiceTimeTypeList',
+		method: 'post',
+		data
+	});
+}
+// 获取服务内容列表
+export function getServiceTypeList(data) {
+	return request({
+		url: '/api/pub/getServiceTypeList',
+		method: 'post',
+		data
+	});
+}
+// 获取服务职称
+export function getUserWorkTypeList(data) {
+	return request({
+		url: '/api/pub/getUserWorkTypeList',
+		method: 'post',
+		data
+	});
+}
+
+// 提交资料审核
+export function subInfoAudit(data) {
+	return request({
+		url: '/api/user/subInfoAudit',
+		method: 'post',
+		data
+	});
+}
+
+// 提交平台审核
+export function subTypeAudit(data) {
+	return request({
+		url: '/api/user/subTypeAudit',
+		method: 'post',
+		data
+	});
+}
+// 首页轮播图
+export function getBannerList(data) {
+	return request({
+		url: '/api/pub/getBannerList',
+		method: 'post',
+		data
+	});
+}
+// 首页模板列表
+export function getShowTemplateList(data) {
+	return request({
+		url: '/api/pub/getShowTemplateList',
+		method: 'post',
+})
+}
+//我的模板
+export function userShowTemplateList(data) {
+	return request({
+		url: '/api/user/userShowTemplateList',
+		method: 'post',
+		data
+	});
+}
+
+//默认模板
+export function setShowTemplate(data) {
+	return request({
+		url: '/api/user/setShowTemplate',
+		method: 'post',
+		data
+	});
+}
+
+//获取本人用户名片信息
+export function getUserCardInfo(data, id) {
+	return request({
+		url: '/api/user/getUserCardInfo',
+		method: 'post',
+		data
+	});
+}

+ 153 - 0
api/order.js

@@ -0,0 +1,153 @@
+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
+	});
+}
+// 门店地址
+export function storeList(data) {
+	return request({
+		url: '/api/store_list',
+		method: 'get',
+		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
+	});
+}
+

+ 44 - 0
api/set.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+import {upFilse} from '@/utils/request'
+//上传图片
+export function upload(data) {
+	return upFilse({
+		url: '/api/user/qiniuUpload',
+		method: 'post',
+		data
+	});
+}
+// 修改用户信息
+export function userEdit(data) {
+	return request({
+		url: '/api/user/setUserInfo',
+		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/user/bindMobile',
+		method: 'post',
+		data
+	});
+}

+ 126 - 0
api/user.js

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

+ 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
+	});
+}
+
+
+
+
+

+ 173 - 0
api/water.js

@@ -0,0 +1,173 @@
+import request from '@/utils/request'
+// 送水列表
+export function waterList(data) {
+	return request({
+		url: '/api/certificate/list',
+		method: 'get',
+		data
+	});
+}
+// 送水详情
+export function waterDetail(data) {
+	return request({
+		url: '/api/certificate/detail/'+data.id,
+		method: 'get',
+		data
+	});
+}
+// 获取商品二级分类
+export function category_layer(data) {
+	return request({
+		url: '/api/category_layer',
+		method: 'get',
+		data
+	});
+}
+// 获取二级分类下商品
+export function category_goods(data) {
+	return request({
+		url: '/api/category_goods',
+		method: 'get',
+		data
+	});
+}
+
+
+// 获取水票
+export function certificate(data) {
+	return request({
+		url: '/api/user/certificate',
+		method: 'get',
+		data
+	});
+}
+// 水票使用记录
+export function use_certificate(data) {
+	return request({
+		url: '/api/user/use_certificate',
+		method: 'get',
+		data
+	});
+}
+// 获取门店可用时间段
+export function storeday(data) {
+	return request({
+		url: '/api/order/storeday',
+		method: 'get',
+		data
+	});
+}
+// 创建押桶订单
+export function createPledge(data) {
+	return request({
+		url: '/api/pledge/create',
+		method: 'post',
+		data
+	});
+}
+// 还桶
+export function delPledge(data) {
+	return request({
+		url: '/api/pledge/refund',
+		method: 'post',
+		data
+	});
+}
+
+// 配送订单
+export function adminStatistics(data) {
+	return request({
+		url: '/api/admin/order/statistics',
+		method: 'get',
+		data
+	});
+}
+// 获取送货人员
+export function adminkf(data) {
+	return request({
+		url: '/api/admin/kf',
+		method: 'get',
+		data
+	});
+}
+// 会员列表
+export function storeMember(data) {
+	return request({
+		url: '/api/store/member',
+		method: 'get',
+		data
+	});
+}
+
+
+//配送员订单
+export function GetAdminOrderList(data) {
+	return request({
+		url: '/api/admin/order/list',
+		method: 'get',
+		data
+	});
+}
+
+
+//送货
+export function deliveryKeep(data) {
+	return request({
+		url: '/api/admin/order/delivery/keep',
+		method: 'post',
+		data
+	});
+}
+
+//确认送达
+export function take_delivery(data) {
+	return request({
+		url: '/api/admin/order/take_delivery/'+data.id,
+		method: 'get',
+		data
+	});
+}
+
+//确认支付
+export function offlinePay(data) {
+	return request({
+		url: '/api/admin/order/offline',
+		method: 'post',
+		data
+	});
+}
+//店员定位
+export function staff_location(data) {
+	return request({
+		url: '/api/store/staff_location',
+		method: 'post',
+		data
+	});
+}
+//空桶管理
+export function admin_certificate(data) {
+	return request({
+		url: '/api/admin/certificate',
+		method: 'get',
+		data
+	});
+}
+//回收桶
+export function pledge_recovery(data) {
+	return request({
+		url: '/api/admin/pledge/recovery',
+		method: 'post',
+		data
+	});
+}
+
+
+
+
+
+
+
+
+
+
+

+ 37 - 0
api/wx.js

@@ -0,0 +1,37 @@
+import request from '@/utils/request'
+// 微信分享信息
+export function share(data) {
+	return request({
+		url: '/api/pub/getShareInfo',
+		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/login/weixinLogin',
+		method: 'post',
+		data
+	});
+}
+// #endif

File diff suppressed because it is too large
+ 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>

+ 27 - 0
main.js

@@ -0,0 +1,27 @@
+import App from './App'
+import store from './store'
+
+// #ifndef VUE3
+import Vue from 'vue'
+Vue.config.productionTip = false
+Vue.prototype.$store = store;
+App.mpType = 'app'
+const app = new Vue({
+	store,
+	...App
+})
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import {
+	createSSRApp
+} from 'vue'
+export function createApp() {
+	const app = createSSRApp(App)
+	app.use(store)
+	return {
+		app
+	}
+}
+// #endif

+ 200 - 0
manifest.json

@@ -0,0 +1,200 @@
+{
+    "name" : "小井康泉",
+    "appid" : "__UNI__F0EBD91",
+    "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" : "wx57a473fc2f83f7e5",
+        "setting" : {
+            "urlCheck" : true,
+            "minified" : true
+        },
+        "permission" : {},
+        "lazyCodeLoading" : "requiredComponents",
+        "requiredBackgroundModes" : [ "location" ]
+    },
+    "h5" : {
+        "title" : "母婴界严选",
+        "domain" : "",
+        "router" : {
+            "base" : "/index/",
+            "mode" : "history"
+        },
+        "devServer" : {
+            "proxy" : {
+                "/api" : {
+                    "target" : "http://sc.frp.liuniu946.com/api",
+                    // "changeOrigin": true,
+                    "pathRewrite" : {
+                        "/api" : "" // rewrite path
+                    }
+                }
+            }
+        },
+        // "https" : true
+        "sdkConfigs" : {
+            "maps" : {
+                "qqmap" : {
+                    "key" : "CPGBZ-AW53P-C2BDJ-VPL5Z-HU5EK-OWB2W"
+                }
+            }
+        }
+    },
+    "_spaceID" : "364f3115-6ed2-4e8f-913f-836cbd3f34fa",
+    "vueVersion" : "3"
+}

+ 19 - 0
package.json

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

+ 610 - 0
pages.json

@@ -0,0 +1,610 @@
+{
+	"pages": [{
+			"path": "pages/home/index",
+			"style": {
+				// #ifndef MP
+				"navigationStyle": "custom",
+				"app-plus": {
+					"titleNView": false
+				},
+				// #endif
+				// #ifdef MP
+				"navigationBarBackgroundColor": "#ff629f",
+				"navigationBarTextStyle": "white",
+				// #endif
+				"navigationBarTitleText": "小井康泉"
+			}
+		},
+		{
+			"path": "pages/home/cart",
+			"style": {
+				// #ifndef MP-WEIXIN
+				"navigationStyle": "custom",
+				// #endif
+				"navigationBarTitleText": "购物车"
+			}
+		},
+		{
+			"path": "pages/home/order",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "订单"
+			}
+		},
+		{
+			"path": "pages/home/category",
+			"style": {
+				"navigationStyle": "custom",
+				// #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/user",
+			"style": {
+				"navigationStyle": "custom",
+				"navigationBarTitleText": "个人中心"
+			}
+		}
+	],
+	"subPackages": [{
+			"root": "pages/water",
+			"name": "water",
+			"pages": [{
+					"path": "/waterList",
+					"style": {
+						"navigationBarTitleText": "充水票"
+					}
+				},
+				{
+					"path": "/waterDetail",
+					"style": {
+						"navigationBarTitleText": "水票购买"
+					}
+				},
+				{
+					"path": "/deposit",
+					"style": {
+						"navigationBarTitleText": "我的押金"
+					}
+				},
+				{
+					"path": "/waterUse",
+					"style": {
+						"navigationBarTitleText": "使用记录"
+					}
+				},
+				{
+					"path": "/myWaterList",
+					"style": {
+						"navigationStyle": "custom",
+						"navigationBarTitleText": "我的水票",
+						"navigationBarBackgroundColor": "#3C82E6",
+						"navigationBarTextStyle": "white"
+					}
+				}
+			]
+		},
+		{
+			"root": "pages/order",
+			"name": "order",
+			"pages": [{
+					"path": "/orderAfter",
+					"style": {
+						"navigationBarTitleText": "售后管理"
+					}
+				},
+				{
+					"path": "/orderDetail",
+					"style": {
+						"navigationBarTitleText": "订单详情",
+						"app-plus": {
+							"bounce": "none"
+						}
+					}
+				},
+				{
+					"path": "/evaluate",
+					"style": {
+						"navigationBarTitleText": "评论"
+					}
+				},
+				{
+					"path": "/WriteOff",
+					"style": {
+						"navigationBarTitleText": "核销码"
+					}
+				},
+				{
+					"path": "/orderRefund",
+					"style": {
+						"navigationBarTitleText": "申请退款"
+					}
+				},
+				{
+					"path": "/createOrder",
+					"style": {
+						"navigationBarTitleText": "创建订单"
+					}
+				},
+				{
+					"path": "/shopList",
+					"style": {
+						"navigationBarTitleText": "门店列表",
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入关键字",
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						}
+					}
+				}
+			]
+		},
+		{
+			"root": "pages/product",
+			"name": "product",
+			"pages": [
+				// {
+				// 	"path": "/reply",
+				// 	"style": {
+				// 		"navigationBarTitleText": "商品评价",
+				// 		"app-plus": {
+				// 			"titleNView": {
+				// 				"type": "transparent"
+				// 			}
+				// 		}
+				// 	}
+				// },
+				{
+					"path": "/product",
+					"style": {
+						"navigationBarTitleText": "详情展示",
+						"app-plus": {
+							"titleNView": {
+								"type": "transparent"
+							}
+						}
+					}
+				},
+				{
+					"path": "/showImg",
+					"style": {
+						"navigationBarTitleText": "图片预览",
+						"app-plus": {
+							"animationType": "fade-in",
+							"titleNView": {
+								"type": "transparent"
+							},
+							"animationDuration": 300
+						}
+					}
+				},
+				// {
+				// 	"path": "/seckill",
+				// 	"style": {
+				// 		"navigationBarTitleText": "限时秒杀"
+				// 	}
+				// },
+				// {
+				// 	"path": "/list",
+				// 	"style": {
+				// 		"enablePullDownRefresh": true,
+				// 		"navigationBarTitleText": "商品列表"
+				// 	}
+				// },
+				{
+					"path": "/search",
+					"style": {
+						"enablePullDownRefresh": true,
+						// #ifdef APP-PLUS
+						"navigationStyle": "custom",
+						// #endif
+						// #ifndef MP || APP-PLUS
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入关键字",
+									"disabled": false,
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						},
+						// #endif
+						"navigationBarTitleText": "搜索"
+					}
+				}
+				// {
+				// 	"path": "pages/product/classify",
+				// 	"style": {
+				// 		"navigationStyle": "custom",
+				// 		"app-plus": {
+				// 			"titleNView": {
+				// 				"type": "transparent"
+				// 			}
+				// 		}
+				// 	}
+				// },
+			]
+		},
+		{
+			"root": "pages/user",
+			"name": "user",
+			"pages": [
+				{
+					"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": "#3C82E6",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "money/paySuccess",
+					"style": {
+						"navigationBarTitleText": "支付成功"
+					}
+				},
+				{
+					"path": "money/wallet",
+					"style": {
+						"navigationStyle": "custom",
+						"navigationBarTitleText": "我的余额"
+					}
+				},
+				
+				{
+					"path": "money/walletList",
+					"style": {
+						"navigationBarTitleText": "余额明细"
+					}
+				},
+				{
+					"path": "award/account",
+					"style": {
+						"navigationBarTitleText": "提现账号"
+					}
+				},
+				{
+					"path": "money/recharge",
+					"style": {
+						"navigationBarTitleText": "充值",
+						"navigationBarBackgroundColor": "#3C82E6",
+						"navigationBarTextStyle": "white"
+					}
+				},
+				{
+					"path": "shareQrCode",
+					"style": {
+						"navigationBarTitleText": "邀请好友"
+					}
+				},
+				{
+					"path": "admin/ktadmin",
+					"style": {
+						// #ifndef MP || APP-PLUS
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入用户名/手机号",
+									"disabled": false,
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						},
+						// #endif
+						"navigationBarTitleText": "空桶管理"
+					}
+				},
+				{
+					"path": "admin/useradmin",
+					"style": {
+						// #ifndef MP || APP-PLUS
+						"app-plus": {
+							"titleNView": {
+								"searchInput": {
+									"backgroundColor": "rgba(231, 231, 231,.7)",
+									"borderRadius": "16px",
+									"placeholder": "请输入用户名/手机号",
+									"disabled": false,
+									"placeholderColor": "#606266",
+									"align": "left"
+								},
+								"buttons": [{
+									"text": "搜索",
+									"fontSize": "14",
+									"color": "#303133",
+									"background": "rgba(0,0,0,0)",
+									"width": "40px"
+								}]
+							}
+						},
+						// #endif
+						"navigationBarTitleText": "用户管理"
+					}
+				},
+				{
+					"path": "admin/orderAdmin",
+					"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/public",
+			"name": "public",
+			"pages": [
+				// #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": "redirect",
+					"style": {
+						"navigationBarTitleText": "微信登录跳转页面",
+						"app-plus": {
+							"titleNView": false
+						}
+					}
+				},
+				{
+					"path": "userAgreement",
+					"style": {
+						"navigationBarTitleText": "用户协议"
+					}
+				},
+				{
+					"path": "privacyAgreement",
+					"style": {
+						"navigationBarTitleText": "隐私协议"
+					}
+				},
+				{
+					"path": "artList",
+					"style": {
+						"navigationBarTitleText": "新闻资讯"
+					}
+				},
+				{
+					"path": "artDetail",
+					"style": {
+						"navigationBarTitleText": ""
+					}
+				}
+			]
+		}
+	],
+	"globalStyle": {
+		"navigationBarTextStyle": "black",
+		"navigationBarTitleText": "uni-app",
+		"navigationBarBackgroundColor": "#FFFFFF",
+		"backgroundColor": "#f8f8f8"
+	},
+	"tabBar": {
+		"color": "#999999",
+		"selectedColor": "#323C5B",
+		"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/order",
+				"iconPath": "static/tabBar/tab-order.png",
+				"selectedIconPath": "static/tabBar/tab-order-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函数里面得到
+		}]
+	}
+}

+ 863 - 0
pages/home/cart.vue

@@ -0,0 +1,863 @@
+<template>
+	<view class="container">
+		<!-- 空白页 -->
+		<view v-if="!hasLogin" class="empty">
+			<image src="/static/error/emptyCart.png" class="emptyImg" mode="aspectFit"></image>
+			<view class="empty-tips">
+				空空如也
+				<view class="navigator" @click="navToLogin">去登陆></view>
+			</view>
+		</view>
+		<view v-if="hasLogin">
+			<!-- 列表 -->
+			<!-- <view class="coupon flex" @click="Getcoupon" v-if="showCart == true">
+				<view class="tip red">优惠券</view>
+				<view class="tip">优惠券详情见活动页面</view>
+				<view class="tip green flex">
+					<view>更多优惠</view>
+					<view class="iconfont iconenter"></view>
+				</view>
+			</view> -->
+			<view class="emptyCart" v-if="showCart == false">
+				<view class="empty-img"><image src="/static/error/emptyCart.png"></image></view>
+				<view class="empty-text">
+					空空如也,
+					<text @click="ToCategory">随便逛逛</text>
+				</view>
+			</view>
+			<view class="cart-list">
+				<view v-for="(item, index) in cartList" :key="index" class="cart-item" :class="{ 'b-b': index !== cartList.length - 1 }">
+					<view class="image-wrapper">
+						<image
+							:src="item.productInfo.image"
+							:class="[item.loaded]"
+							mode="aspectFill"
+							lazy-load
+							@load="onImageLoad('cartList', index)"
+							@error="onImageError('cartList', index)"
+						></image>
+						<view class="iconfont iconroundcheckfill checkbox" :class="{ checked: item.checked }" @click="check('item', index)"></view>
+					</view>
+					<view class="item-right">
+						<view class="flex">
+							<text class="clamp title">{{ item.productInfo.store_name }}</text>
+							<text class="del-btn iconfont iconclose" @click="deleteCartItem(item, 1)"></text>
+						</view>
+						<text class="attr">{{ item.attr_val }}</text>
+						<view class="flex">
+							<view class="price">¥{{ item.productInfo.price }}</view>
+							<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"
+								:key="item.id"
+								:disabled="true"
+								@eventChange="numberChange"
+							></uni-number-box>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="guess-name" v-if="invalList.length > 0">
+				<view class="img"><image src="../../static/image/img13.png"></image></view>
+				<view class="name">失效商品</view>
+			</view>
+			<view class="cart-list">
+				<view v-for="(item, ind) in invalList" :key="item.id" class="cart-item" :class="{ 'b-b': ind !== invalList.length - 1 }">
+					<view class="image-wrapper"><image :src="item.productInfo.image" mode="aspectFill"></image></view>
+					<view class="meng">已失效</view>
+					<view class="item-right">
+						<view class="flex">
+							<text class="clamp title">{{ item.productInfo.store_name }}</text>
+							<text class="del-btn iconfont iconclose" @click="deleteCartItem(item, 2)"></text>
+						</view>
+						<text class="attr">{{ item.attr_val }}</text>
+						<view class="flex">
+							<view class="price">¥{{ item.productInfo.price }}</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<!-- <view v-if="Guesslist.length > 0">
+				<view class="guess-name">
+					<view class="img"><image src="../../static/image/img13.png"></image></view>
+					<view class="name">猜你喜欢</view>
+				</view>
+				<view id="list-box" class="list-box" :style="{ height: swiperHeight + 'px' }">
+					<view class="guess-section">
+						<view v-for="(item, index) in Guesslist" :key="index" class="guess-item" @click="ToDetail(item)">
+							<view class="imagewrapper"><image :src="item.image"></image></view>
+							<view class="guess-list">
+								<text class="title clamp margin-c-20">{{ item.store_name }}</text>
+								<view class="info clamp margin-c-20">{{ item.store_info }}</view>
+								<view class="tipBox margin-c-20">
+									<view class="tipsl" v-if="item.keyword != ''">
+										<text v-for="lss in item.keyword">{{ lss }}</text>
+									</view>
+								</view>
+							</view>
+							<view class="price margin-c-20 flex">
+								<view class="price_list">
+									<view class="price-red">
+										¥{{ item.price }}
+										<text>/份</text>
+									</view>
+									<view class="price-green">
+										¥{{ item.ot_price }}
+										<text>市场价</text>
+									</view>
+								</view>
+								<view class="img position-relative" @click.stop="Addcar(item)">
+									<image src="/static/img/img21.png"></image>
+									<view class="corner" v-if="item.cart_num > 0">
+										<text>{{ item.cart_num }}</text>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view> -->
+			<!-- 底部菜单栏 -->
+			<view class="action-section" v-show="showCart">
+				<view class="checkbox">
+					<view class="iconfont iconroundcheckfill icon-checked-box" @click="check('all')" :class="{ 'icon-checked': allChecked }"></view>
+					<view class="clear-btn" @click="allChecked ? clearCart() : ''" :class="{ show: allChecked }"><text>清空</text></view>
+				</view>
+				<view class="total-box">
+					<text class="price">合计:¥{{ total }}</text>
+				</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 { getProducts,cartAdd } from '@/api/product.js';
+import { mapState } from 'vuex';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
+export default {
+	data() {
+		return {
+			total: 0, //总价格
+			allChecked: false, //全选状态  true|false
+			showCart: false, //隐藏购物车数据
+			empty: false, //空白页现实  true|false
+			cartList: [], //购物车商品
+			swiperHeight: 0,
+			// Guesslist: '', //猜你喜欢
+			invalList: '' //失效商品
+		};
+	},
+	onShow() {
+		// 只有登录时才加载数据
+		if (this.hasLogin) {
+			this.loadData();
+			this.Guess();
+		}
+	},
+	onLoad(option){
+		if (option.spread) {
+			uni.setStorageSync('spread', option.spread);
+		}
+		saveUrl();
+	},
+	watch: {
+		//显示空白页
+		cartList(e) {
+			let empty = e.length === 0 ? true : false;
+			if (this.empty !== empty) {
+				this.empty = empty;
+			}
+			if (e.length > 0) {
+				this.showCart = true;
+			}
+			if (e.length == 0) {
+				this.showCart = false;
+			}
+		},
+		// 初次加载页面高度时修改页面高度
+		// Guesslist(newValue, oldValue) {
+		// 	let obj = this;
+		// 	let bHeight = Math.ceil(newValue.length / 2);
+		// 	obj.$nextTick(function() {
+		// 		uni.createSelectorQuery()
+		// 			.select('#list-box')
+		// 			.fields(
+		// 				{
+		// 					size: true
+		// 				},
+		// 				function(data) {
+		// 					obj.pageProportion = data.width / 750;
+		// 					obj.swiperHeight = Math.ceil(obj.pageProportion * 620 * bHeight);
+		// 				}
+		// 			)
+		// 			.exec();
+		// 	});
+		// }
+	},
+	computed: {
+		...mapState('user', ['hasLogin'])
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		let obj = this;
+		//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
+		setTimeout(function() {
+			obj.loadData();
+			uni.stopPullDownRefresh(); //停止下拉刷新动画
+		}, 1000);
+	},
+	methods: {
+		//请求数据
+		async loadData() {
+			let obj = this;
+			getCartList({})
+				.then(function(e) {
+					obj.invalList = e.data.invalid;
+					// 获取当前购物车物品增加数量
+					let nub = obj.cartList.length;
+					// 获取之前对象数组
+					let aArray = obj.cartList.reverse();
+					// 获取返回数据对象数组
+					let bArray = e.data.valid.reverse();
+					// 处理数据缓存
+					let arr = bArray
+						.map((item, ind) => {
+							// 设置返回数据默认为勾选状态
+							item.checked = true;
+							// 获取相同数组之前对象的数据
+							let carlist = aArray[ind];
+							// 判断之前是否已经加载完毕
+							if (carlist && carlist.loaded == 'loaded') {
+								item.loaded = 'loaded';
+							}
+							return item;
+						})
+						.reverse();
+
+					obj.$set(obj, 'cartList', []);
+					obj.$nextTick(e => {
+						obj.$set(obj, 'cartList', arr);
+						obj.calcTotal(); //计算总价
+					});
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		// #ifdef MP
+		onShareAppMessage: function(res) {
+			let userInfo = uni.getStorageSync('userInfo');
+			let GetInfo = uni.getStorageSync('GetInfo');
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/pages/index/index?';
+			// 保存邀请人
+			path += 'spread=' + userInfo.uid;
+			let data = {
+				path: path,
+				imageUrl: GetInfo.img,
+				title: GetInfo.title
+			};
+			console.log(data)
+			return data;
+		},
+		// #endif
+		// 猜你喜欢
+		Guess() {
+			let obj = this;
+			getProducts({
+				page: 1,
+				limit: 10,
+				type: 1,
+				sid: 97 //分类id
+			})
+				.then(({ data }) => {
+					obj.Guesslist = data;
+				})
+				.catch(err => {
+					console.log(err);
+				});
+		},
+		//加入购物车
+		Addcar(item) {
+			let obj = this;
+			cartAdd({
+				cartNum: '1', //商品数量
+				uniqueId: '', //商品标签
+				new: 0, //商品是否新增加到购物车1为不加入0为加入
+				mer_id: '',
+				productId: item.id //商品编号
+			})
+				.then(function(e) {
+					uni.showToast({
+						title: '成功加入购物车',
+						type: 'top',
+						duration: 500,
+						icon: 'none'
+					});
+					obj.Guess();
+					obj.loadData();
+				})
+				.catch(e => {});
+		},
+		// 商品详情页
+		ToDetail(item) {
+			if (item.stock < 1) {
+				this.$api.msg('该商品已售罄');
+			} else {
+				uni.navigateTo({
+					url: `/pages/product/product?id=` + item.id
+				});
+			}
+		},
+		ToCategory() {
+			uni.switchTab({
+				url: `/pages/category/category`
+			});
+		},
+		//领取优惠券
+		Getcoupon() {
+			uni.navigateTo({
+				url: '/pages/coupon/getcoupon'
+			});
+		},
+		//监听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) {
+			console.log(data);
+			let arr = this.cartList[data.index];
+			arr.cart_num = data.number;
+			getCartNum({ id: arr.id, number: data.number })
+				.then(e => {})
+				.catch(function(e) {
+					console.log(e);
+				});
+			this.calcTotal();
+			this.Guess();
+		},
+		//删除
+		deleteCartItem(index, type) {
+			uni.showLoading({
+				title: '加载中'
+			});
+			let id = index.id;
+			let obj = this;
+			// if(type == 1){
+			// 	let list = this.cartList;
+			// 	let row = list[index];
+			// 	id = row.id;
+			// }else{
+			// 	let list = this.invalList;
+			// 	let row = list[index];
+			// 	id = row.id;
+			// }
+			// if(type == 1){
+			// 	this.cartList.splice(index, 1);
+			// 	this.calcTotal();
+			// }else{
+			// 	this.invalList.splice(index, 1);
+			// }
+			cartDel({
+				ids: id
+			})
+				.then(function(e) {
+					uni.hideLoading();
+					obj.loadData();
+					obj.calcTotal();
+					obj.Guess();
+				})
+				.catch(e => {
+					uni.hideLoading();
+					console.log(e.message);
+				});
+		},
+		//清空
+		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 = [];
+						this.Guess();
+					}
+				}
+			});
+		},
+		//计算总价
+		calcTotal() {
+			let list = this.cartList;
+			console.log(list, 7);
+			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(',')
+			});
+		},
+		//随便逛逛
+		Toindex() {
+			uni.switchTab({
+				url: '/pages/category/category'
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.container {
+	padding-bottom: 134rpx;
+	background-color: $page-color-base;
+	.emptyCart {
+		position: relative;
+		width: 100%;
+		padding-top: 150rpx;
+		.empty-img {
+			width: 385rpx;
+			height: 300rpx;
+			margin: 0rpx auto;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.empty-text {
+			text-align: center;
+			font-size: $font-sm + 2rpx;
+			color: $font-color-disabled;
+			margin-bottom: 100rpx;
+			text {
+				color: $uni-color-primary;
+			}
+		}
+	}
+	/* 空白页 */
+	.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;
+			}
+		}
+		.empty {
+			width: 100%;
+			height: 500rpx;
+		}
+	}
+}
+/* 购物车列表项 */
+.coupon {
+	width: 92%;
+	margin: 25rpx auto;
+	border-radius: 25rpx;
+	background: #ffffff;
+	font-size: 20rpx !important;
+	padding: 25rpx 15rpx;
+	.red {
+		background-color: #fe1212;
+		color: #ffffff;
+		line-height: 35rpx;
+		padding: 0rpx 20rpx;
+		border-radius: 25rpx;
+	}
+	.green {
+		color: #2dbd59;
+	}
+	.tip.green {
+		height: 30rpx;
+	}
+}
+.cart-list {
+	background: #ffffff;
+	width: 92%;
+	margin: 25rpx auto;
+	border-radius: 25rpx;
+	.cart-item {
+		display: flex;
+		position: relative;
+		padding: 30rpx 40rpx;
+		.image-wrapper {
+			width: 160rpx;
+			height: 160rpx;
+			flex-shrink: 0;
+			position: relative;
+			image {
+				border-radius: 8rpx;
+			}
+		}
+		.meng {
+			width: 160rpx;
+			height: 160rpx;
+			position: absolute;
+			background-color: rgba(0, 0, 0, 0.6);
+			color: #ffffff;
+			font-size: 22rpx;
+			line-height: 160rpx;
+			text-align: center;
+		}
+		.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 {
+			display: flex;
+			flex-direction: column;
+			flex: 1;
+			overflow: hidden;
+			position: relative;
+			padding-left: 30rpx;
+			.title {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+			.price {
+				font-size: $font-base + 2rpx;
+				color: #ff1a27;
+				font-weight: bold;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+			.attr {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+				height: 50rpx;
+				line-height: 50rpx;
+			}
+			.price {
+				height: 50rpx;
+				line-height: 50rpx;
+			}
+		}
+		.del-btn {
+			padding: 4rpx 10rpx;
+			font-size: 34rpx;
+			height: 50rpx;
+			color: $font-color-light;
+		}
+	}
+}
+.guess-name {
+	padding: 25rpx 25rpx;
+	font-size: 32rpx;
+	text-align: center;
+	.img {
+		width: 80%;
+		margin: 0rpx auto;
+		height: 4rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+/* 猜你喜欢 */
+.guess-section {
+	display: flex;
+	flex-wrap: wrap;
+	padding: 0 20rpx;
+	.guess-item {
+		// height: 558rpx;
+		position: relative;
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+		border: 2rpx solid #eeeeee;
+		width: 343rpx;
+		margin-bottom: 4%;
+		border-radius: $border-radius-sm;
+		background-color: white;
+		padding-bottom: 30rpx;
+		&:nth-child(2n + 1) {
+			margin-right: 24rpx;
+		}
+	}
+	.imagewrapper {
+		width: 100%;
+		height: 330rpx;
+		border-radius: 3px;
+		margin-bottom: 15rpx;
+		image {
+			width: 100%;
+			height: 100%;
+			// opacity: 1;
+		}
+	}
+	.guess-list {
+		height: 130rpx;
+		.title {
+			font-size: 28rpx;
+			color: $font-color-dark;
+		}
+		.info {
+			color: #999999;
+			font-size: 24rpx;
+		}
+		.tipBox {
+			// padding-bottom: 8rpx;
+			.tipsl {
+				text {
+					border: 2rpx solid #ff1a27;
+					color: #ff1a27;
+					border-radius: 5rpx;
+					font-size: 18rpx;
+					padding: 2rpx 5rpx;
+					margin-right: 15rpx;
+				}
+			}
+		}
+	}
+	.price {
+		font-size: 28rpx;
+		width: 303rpx;
+		// padding-top: 25rpx;
+		position: relative;
+		.price_list {
+			.price-red {
+				font-weight: bold;
+				font-size: 32rpx !important;
+				color: #ff1a27;
+				text {
+					color: #9699a0;
+					font-size: 24rpx !important;
+					font-weight: normal;
+					padding: 0rpx 10rpx;
+				}
+			}
+			.price-green {
+				color: #2dbd59;
+				font-size: 24rpx !important;
+				text {
+					background: #2dbd59;
+					color: #ffffff;
+					padding: 0rpx 8 rpx;
+					border-radius: 7rpx;
+					font-size: 20rpx !important;
+					margin-left: 8rpx;
+				}
+			}
+		}
+		.img {
+			position: absolute;
+			bottom: 0;
+			right: 0;
+			width: 50rpx;
+			height: 50rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+
+	.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;
+	}
+}
+/*公用边框样式*/
+%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;
+}
+/* 底部栏 */
+.action-section {
+	/* #ifdef H5 */
+	margin-bottom: 100rpx;
+	/* #endif */
+	position: fixed;
+	// left: 30rpx;
+	bottom: 0rpx;
+	z-index: 95;
+	display: flex;
+	align-items: center;
+	width: 100%;
+	height: 120rpx;
+	padding: 0 30rpx;
+	background: #ffffff;
+	// box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
+	.checkbox {
+		height: 52rpx;
+		position: relative;
+		.icon-checked-box {
+			border-radius: 50rpx;
+			background-color: #ffffff;
+			width: 52rpx;
+			height: 100%;
+			position: relative;
+			z-index: 5;
+			font-size: 53rpx;
+			line-height: 1;
+			color: $font-color-light;
+		}
+		.icon-checked {
+			color: $base-color;
+		}
+	}
+	.clear-btn {
+		position: absolute;
+		left: 26rpx;
+		top: 0;
+		z-index: 4;
+		width: 0;
+		height: 52rpx;
+		line-height: 52rpx;
+		padding-left: 38rpx;
+		font-size: $font-base;
+		color: #fff;
+		background: $font-color-disabled;
+		border-radius: 0 50px 50px 0;
+		opacity: 0;
+		transition: 0.2s;
+		&.show {
+			opacity: 1;
+			width: 120rpx;
+		}
+	}
+	.total-box {
+		flex: 1;
+		display: flex;
+		flex-direction: column;
+		text-align: right;
+		padding-right: 40rpx;
+		.price {
+			font-size: $font-lg;
+			color: #ff383e;
+		}
+		.coupon {
+			font-size: $font-sm;
+			color: $font-color-light;
+			text {
+				color: $font-color-dark;
+			}
+		}
+	}
+	.confirm-btn {
+		padding: 0 45rpx;
+		margin: 0;
+		border-radius: 100px;
+		height: 70rpx;
+		line-height: 70rpx;
+		font-size: $font-base + 2rpx;
+		background: $bg-gradual;
+	}
+}
+/* 复选框选中状态 */
+.action-section .checkbox.checked,
+.cart-item .checkbox.checked {
+	color: $base-color;
+}
+</style>

+ 626 - 0
pages/home/category.vue

@@ -0,0 +1,626 @@
+<template>
+	<view class="content">
+		<view class="scroll-top flex_item">
+			<scroll-view class="scroll-list" scroll-x>
+				<view class="scoll-box" v-for="ls in flist" :class="{ active: ls.id === currentId }" @click="tabtap(ls.id)">
+					<view class="scoll-img"><image :src="ls.pic"></image></view>
+					<view class="scoll-name">{{ ls.cate_name }}</view>
+				</view>
+			</scroll-view>
+			<view class="search-box" @click="Toseach">
+				<view class="search"><image src="../../static/image/img22.png" mode="scaleToFill"></image></view>
+				<view>搜索</view>
+			</view>
+		</view>
+		<view class="scroll-view flex-tpl" :style="{ height: pageHeight + 'px' }">
+			<scroll-view scroll-y class="left-aside">
+				<view v-for="item in slist"  class="f-item" :class="{ active_top: item.id === erjiid }" @click="changeSlist(item)">{{ item.cate_name }}</view>
+			</scroll-view>
+			<scroll-view :scroll-with-animation="scrollAnimation" scroll-y class="right-aside" @scroll="asideScroll" :scroll-top="tabScrollTop">
+				<view class="tlist-box" v-for="ls in slist" :id="'main-' + ls.id">
+					<view class="tlistname" v-if="ls.list">{{ ls.name }}</view>
+					<view class="tlist-list flex_item" v-if="ls.goods" v-for="item in ls.goods" @click="ToDetail(item)">
+						<view class="tlist-img">
+								<image  class="img" :src="item.image" :lazy-load="true" mode="scaleToFill"></image>
+						</view>
+						<view class="sell-out" v-if="item.stock == 0"><text>已售罄</text></view>
+						<view class="tlist-info">
+							<view class="name clamp2">{{ item.store_name }}</view>
+							<!-- <view class="info clamp">{{ item.store_info }}</view> -->
+							<view class="tipBox">
+								<view class="tip clamp" v-if="item.keyword != ''">
+									<text >{{ item.keyword }}</text>
+								</view>
+							</view>
+							<view class="tlist-price flex">
+								<view class="price-box">
+									<view class="stock flex_item" v-if="item.stock > 0">
+										<view class="stock-num clamp">库存剩{{ item.stock }}</view>
+									</view>
+									<view class="price">
+										¥
+										<text class="blod">{{ item.price }}</text>
+										<text class="fen">/{{item.unit_name}}</text>
+									</view>
+								</view>
+								<view class="gocar position-relative" v-if="item.is_barrel==0" @click.stop="Addcar(item)">
+									<image src="/static/image/img21.png" mode="scaleToFill"></image>
+									<view class="corner" v-if="item.cart_num > 0">
+										<text>{{ item.cart_num }}</text>
+									</view>
+								</view>
+							</view>
+							<view class="bottom_border"></view>
+						</view>
+					</view>
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+<script>
+import { mapState, mapMutations } from 'vuex';
+import { category_layer,category_goods } from '@/api/water.js';
+import { cartAdd } from '@/api/product.js';
+import { saveUrl } from '@/utils/loginUtils';
+export default {
+	data() {
+		return {
+			sizeCalcState: false,
+			tabScrollTop: 0,
+			currentId: '', //一级选择id,
+			erjiid: '', //二级选择id
+			flist: [], //一级分类列表
+			slist: [], //二级分类列表
+			yijishow: true, //一级界面显示
+			sanjishow: false, //三级界面隐藏
+			bili: 1, //设置页面比例
+			pageHeight: 0, //保存滚轮页面高度
+			CategoryID: '',
+			userInfo: '',
+			onload: true, //保存数据判断是否是第一次打开页面
+			scrollAnimation: true //是否开启动画
+		};
+	},
+	onLoad(option) {
+		if (option.spread) {
+			uni.setStorageSync('spread', option.spread);
+		}
+		saveUrl();
+		uni.showLoading({
+			title: '加载中'
+		});
+		this.loadData();
+	},
+	onShow() {
+		let obj = this;
+		const categoryId = uni.getStorageSync('categoryId') || '';
+		if (obj.currentId != categoryId && categoryId != '' && !obj.onload) {
+			obj.tabtap(categoryId);
+		}
+		// 初次数据加载完毕
+		obj.onload = false;
+	},
+	onReady() {
+		// 初始化获取页面宽度
+		uni.createSelectorQuery()
+			.select('.content')
+			.fields(
+				{
+					size: true
+				},
+				data => {
+					// 获取页面百分比
+					this.bili = data.width / 750;
+					console.log(data, 2);
+					this.pageHeight = data.height - 185 * this.bili;
+					console.log(this.pageHeight, 33);
+				}
+			)
+			.exec();
+	},
+	// #ifndef MP
+	// 监听导航栏输入框点击事件
+	onNavigationBarSearchInputClicked(e) {
+		uni.navigateTo({
+			url: '/pages/product/search'
+		});
+	},
+	// #endif
+	//下拉刷新
+	onPullDownRefresh() {
+		let obj = this;
+		//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
+		setTimeout(function() {
+			obj.loadData();
+			uni.stopPullDownRefresh(); //停止下拉刷新动画
+		}, 1000);
+	},
+	computed: {
+		...mapState(['GetInfo']),
+	},
+	methods: {
+		// 载入数据
+		async loadData() {
+			let obj = this;
+			obj.loading = true;
+			category_layer({})
+				.then(({ data }) => {
+					obj.flist = data.list;
+					obj.currentId = data.first;
+					obj.erji();
+				})
+				.catch(err => {
+					console.log(err);
+				});
+		},
+		// 二级数据加载
+		erji() {
+			let obj = this;
+			category_goods({
+				pid: obj.currentId
+			})
+				.then(({ data }) => {
+					obj.slist = data.slist.map(function(s) {
+						return s;
+					});
+					obj.erjiid = obj.slist[0].id;
+					obj.$nextTick(e => {
+						// 重新开启动画效果
+						uni.hideLoading();
+						// 数据加载完成后重新计算高度
+						obj.calcSize()
+						obj.scrollAnimation = true;
+					});
+				})
+				.catch(err => {
+					uni.hideLoading();
+					console.log(err);
+				});
+		},
+		//分享
+		// #ifdef MP
+		onShareAppMessage: function(res) {
+			let userInfo = uni.getStorageSync('userInfo');
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/pages/category/category?';
+			// 保存邀请人
+			path += 'spread=' + userInfo.uid;
+			let data = {
+				path: path,
+				imageUrl: this.GetInfo.img,
+				title: this.GetInfo.title
+			};
+			console.log(data)
+			return data;
+		},
+		// #endif
+		//加入购物车
+		Addcar(item) {
+			let obj = this;
+			cartAdd({
+				cartNum: '1', //商品数量
+				uniqueId: '', //商品标签
+				new: 0, //商品是否新增加到购物车1为不加入0为加入
+				mer_id: '',
+				productId: item.id //商品编号
+			})
+				.then(function(e) {
+					uni.showToast({
+						title: '成功加入购物车',
+						type: 'top',
+						duration: 500,
+						icon: 'none'
+					});
+					obj.erji();
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		//一级分类点击
+		tabtap(item) {
+			uni.showLoading({
+				title: '加载中'
+			});
+			let obj = this;
+			// 关闭动画效果
+			obj.scrollAnimation = false;
+			// 设置顶部高度为0
+			obj.$nextTick(function(){
+				// 等待渲染完毕在执行高度修改否则动画效果依然存在
+				obj.tabScrollTop = 0;
+			})
+			// 获取当前点击的id
+			obj.currentId = item;
+			// 二级分类分类保存id
+			obj.erjiid = item;
+			uni.setStorageSync('categoryId', item);
+			// 重置分类滚轮绑定高度
+			obj.sizeCalcState = false;
+			// 加载二级方法
+			setTimeout(function() {
+				obj.erji();
+			});
+		},
+		//二级点击
+		changeSlist(item) {
+			let obj = this;
+			// 判断有没有初始化页面高度对象数据
+			console.log(obj.sizeCalcState)
+			if (!obj.sizeCalcState) {
+				obj.calcSize();
+			}
+			// 获取当前点击的id
+			obj.erjiid = item.id;
+			let index = obj.slist.findIndex(sitem => sitem.id === item.id);
+			setTimeout(function() {
+				obj.tabScrollTop = obj.slist[index].top;
+			}, 10);
+		},
+		// 商品详情页
+		ToDetail(item) {
+			if (item.stock < 1) {
+				this.$api.msg('该商品已售罄');
+			} else {
+				uni.navigateTo({
+					url: `/pages/product/product?id=` + item.id
+				});
+			}
+		},
+		Toseach() {
+			uni.navigateTo({
+				url: `/pages/product/search`
+			});
+		},
+		//右侧栏滚动
+		asideScroll(e) {
+			// 判断有没有初始化页面高度对象数据
+			if (!this.sizeCalcState) {
+				this.calcSize();
+			}
+			let scrollTop = e.detail.scrollTop;
+			let box = 0; //列表包裹框高度初始化
+			let bottom = 10; //距离页面底部多少像素左侧列表切换到最后一个一级分类
+			// 查询当前页面对象
+			let view = uni.createSelectorQuery().select('.right-aside');
+			view.fields(
+				{
+					id: true,
+					dataset: true,
+					rect: true,
+					size: true,
+					scrollOffset: true
+				},
+				function(e) {
+					// 保存包裹框高度
+					box = e.height;
+				}
+			).exec();
+			// 获取所有距离顶部大于滚轮距离页面高度的所有分类
+			let tabs = this.slist.filter(item => item.top <= scrollTop).reverse();
+			if (tabs.length > 0) {
+				// 判断是否已经到达滚轮底部
+				if (box + scrollTop + bottom >= e.detail.scrollHeight) {
+					this.erjiid = this.slist[this.slist.length - 1].id;
+				} else {
+					this.erjiid = tabs[0].id;
+				}
+			}
+		},
+		//计算右侧栏每个tab的高度等信息
+		calcSize() {
+			let h = this.bili * 215;
+			this.slist.forEach(item => {
+				let view = uni.createSelectorQuery().select('#main-' + item.id);
+				view.fields(
+					{
+						size: true
+					},
+					data => {
+						item.top = Math.ceil(h);
+						h += data.height;
+						item.bottom = Math.ceil(h);
+					}
+				).exec();
+			});
+			this.sizeCalcState = true;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background-color: #ffffff;
+	height: 100%;
+	.content {
+		background-color: #ffffff;
+		height: 100%;
+	}
+}
+//顶部分类
+.scroll-top {
+	width: 100%;
+	font-size: 24rpx;
+	height: 170rpx;
+	padding: 0px 25rpx;
+	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+	.scroll-list {
+		width: 80%;
+		overflow: hidden;
+		white-space: nowrap;
+		.scoll-box {
+			margin-right: 15rpx;
+			text-align: center;
+			display: inline-block;
+			.scoll-img {
+				width: 130rpx;
+				height: 85rpx;
+				border-radius: 100%;
+				image {
+					width: 85rpx;
+					height: 100%;
+					border-radius: 100%;
+				}
+			}
+			.scoll-name {
+				padding-top: 15rpx;
+			}
+			&.active {
+				color: $base-color;
+			}
+		}
+	}
+	.search-box {
+		text-align: center;
+		margin-left: 50rpx;
+		.search {
+			width: 85rpx;
+			height: 85rpx;
+			border-radius: 100%;
+			margin-bottom: 15rpx;
+			image {
+				width: 100%;
+				height: 100%;
+				border-radius: 100%;
+			}
+		}
+	}
+}
+.flex-tpl {
+	display: flex;
+	justify-content: space-between;
+}
+.scroll-view {
+	margin-top: 15rpx;
+	.left-aside {
+		width: 190rpx;
+		background-color: rgba(245, 246, 248, 1);
+		overflow: hidden;
+		height: 100%;
+		display: block;
+		overflow-y: scroll;
+	}
+}
+
+.f-item {
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	width: 100%;
+	height: 100rpx;
+	font-size: 24rpx;
+	color: $font-color-base;
+	position: relative;
+	&.active_top {
+		background: #ffffff;
+		font-size: 26rpx;
+		font-weight: 500;
+		color: rgba(51, 51, 51, 1);
+		&: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 {
+	overflow: hidden;
+	padding: 0rpx 20rpx;
+	height: 100%;
+	display: block;
+	overflow-y: scroll;
+	width: 100%;
+	.image {
+		width: 100%;
+		padding-bottom: 15rpx;
+		.imageLV {
+			width: 100%;
+			height: 200rpx;
+		}
+	}
+	.tlist-box {
+		.tlistname {
+			font-size: 24rpx;
+			padding: 25rpx 25rpx;
+			border-top: 2rpx solid rgba(238, 238, 238, 1);
+			border-bottom: 2rpx solid rgba(238, 238, 238, 1);
+		}
+		.tlist-list.flex_item {
+			height: 0;
+			min-height: 240rpx;
+			align-items: stretch;
+		}
+		.tlist-list {
+			padding: 25rpx 0rpx;
+			position: relative;
+			.tlist-img {
+				width: 190rpx;
+				position: relative;
+				.img {
+					width: 190rpx;
+					height: 190rpx;
+				}
+			}
+			.sell-out {
+				position: absolute;
+				width: 190rpx;
+				height: 190rpx;
+				background: rgba(255, 255, 255, 0.4);
+				text-align: center;
+				text {
+					line-height: 190rpx;
+					background: rgba(0, 0, 0, 0.5);
+					color: #ffffff;
+					padding: 10rpx 25rpx;
+					border-radius: 25rpx;
+					font-size: 20rpx;
+				}
+			}
+			.tlist-info {
+				font-size: 24rpx;
+				width: 0;
+				flex-grow: 1;
+				padding-left: 25rpx;
+				padding-right: 25rpx;
+				height: 100%;
+				position: relative;
+				line-height: 1;
+				.bottom_border {
+					position: absolute;
+					border-bottom: 1px solid #eeeeee;
+					left: 25rpx;
+					bottom: 0;
+					height: 2rpx;
+					width: 100%;
+				}
+				.name {
+					color: #141821;
+					font-weight: 500;
+					font-size: 26rpx;
+					line-height: 1.2;
+				}
+				.info {
+					margin: 10rpx 0rpx;
+					height: 30rpx;
+					color: #979797;
+					font-size: 24rpx;
+				}
+				.tipBox {
+					height: 50rpx;
+					margin: 10rpx 0;
+					.tip {
+						padding: 10rpx 0rpx;
+						text {
+							border: 2rpx solid #ff1a27;
+							color: #ff1a27;
+							border-radius: 5rpx;
+							font-size: 18rpx;
+							padding: 5rpx 10rpx;
+							margin-right: 15rpx;
+						}
+					}
+					
+				}
+				
+				.tlist-price {
+					position: absolute;
+					left: 0rpx;
+					padding-left: 25rpx;
+					padding-right: 25rpx;
+					bottom: 10rpx;
+					width: 100%;
+					.stock {
+						font-size: 26rpx;
+						color: $font-color-light;
+						.stock-num {
+							padding-left: 7rpx;
+							font-size: 22rpx;
+							border-radius: 5rpx;
+							height: 32rpx;
+							line-height: 32rpx;
+						}
+					}
+					.price-box {
+						.price {
+							color: #ff1a27;
+							.blod {
+								font-size: 35rpx;
+								font-weight: bold;
+							}
+							.fen {
+								color: #838691;
+							}
+						}
+					}
+					.gocar {
+						width: 50rpx;
+						height: 50rpx;
+						align-self: flex-end;
+						image {
+							width: 100%;
+							height: 100%;
+						}
+					}
+				}
+			}
+		}
+	}
+	.tlist {
+		.cate {
+			padding: 25rpx 0rpx;
+			color: #666666;
+			font-size: 24rpx;
+		}
+	}
+}
+.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>

+ 863 - 0
pages/home/index.vue

@@ -0,0 +1,863 @@
+<template>
+	<view class="container">
+		<!-- 顶部logo and 搜索 start-->
+		<view class="index-top-wrap">
+			<view class="index-top-image index-top"></view>
+			<view class="status_bar fud"></view>
+			<view class="top-search flex fud">
+				<view class="search-box flex" @click="clickSearch()">
+					<image class="search" src="../../static/icon/search.png" mode=""></image>
+					<view class="search-font">输入关键词搜索</view>
+				</view>
+			</view>
+			<!-- 顶部logo and 搜索 end-->
+			<!-- <view class="jg fud" style="background-color: #fff;"></view> -->
+			<!-- 轮播图 start -->
+			<swiper class="top-swiper fud" autoplay="true" duration="400" interval="5000" @change="swiperChange">
+				<swiper-item v-for="(item, index) in carouselList" :key="index" class="carousel-item"
+					@click="bannerNavToUrl(item)">
+					<image :src="item.pic" />
+				</swiper-item>
+			</swiper>
+			<!-- 轮播图 end -->
+		</view>
+		<!-- 分类 start -->
+		<view class="cate-section flex">
+			<!-- <view class="cate-item flex" @click="navto('/pages/category/category')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/index1.png" mode=""></image>
+				</view>
+				<view class="item-title">一键叫水</view>
+			</view> -->
+			<view class="cate-item flex" @click="navto('/pages/order/shopList?type=2')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/index2.png" mode=""></image>
+				</view>
+				<view class="item-title">附近门店</view>
+			</view>
+			<view class="cate-item flex" @click="navto('/pages/public/artList')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/index3.png" mode=""></image>
+				</view>
+				<view class="item-title">新闻简介</view>
+			</view>
+			<view class="cate-item flex" @click="openKf">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/index4.png" mode=""></image>
+				</view>
+				<view class="item-title">联系客服</view>
+			</view>
+			<view class="cate-item flex" @click="navto('/pages/water/waterList')">
+				<view class="img-wrapper flex">
+					<image src="../../static/icon/index5.png" mode=""></image>
+				</view>
+				<view class="item-title">充水票</view>
+			</view>
+		</view>
+		<!-- 商品列表 start -->
+		<view class="product-box flex">
+			<view class="product-tit flex">
+				<text class="left-icon"></text>
+				<text class="tit">
+					热销推荐
+				</text>
+				<text class="bottom-text">在售精品</text>
+			</view>
+			<view></view>
+		</view>
+		<view class="good-list">
+			<view class="good flex" v-for="item in goodList">
+				<image :src="item.image" mode="" class="good-image"></image>
+				<view class="right">
+					<view class="good-name ">
+						<view class="clamp2">
+							{{item.store_name}}
+						</view>
+					</view>
+					<view class="good-key">
+						<!-- 鸿运开来 为成功喝彩 -->
+					</view>
+					<view class="good-price flex">
+						<view class="price">
+							¥{{item.price}}/{{item.unit_name}}
+						</view>
+						<view class="xl" @click="navto('/pages/product/product?id='+item.id)">
+							立即购买
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 客服 ed-->
+		<uni-popup ref="popupkf" type="center">
+			<view class="popup-box">
+				<view class="img">
+					<image src="../../static/image/img009.png" mode=""></image>
+				</view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image src="../../static/image/img010.png" mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="cancel">取消</view>
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		loadIndexs
+	} from '@/api/index.js';
+	import {
+		getUserInfo,
+		spread
+	} from '@/api/user.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	// #ifdef H5
+	import {
+		shareLoad
+	} from '@/utils/wxAuthorized';
+	// #endif
+	import util from '@/utils/util.js';
+	export default {
+		data() {
+			return {
+				text: 'shxsophina', //客服微信
+				pageProportion: 0, //保存页面基于750宽度的比例
+				carouselList: [], //轮播列表
+				goodList: [], //精选商品列表
+			};
+		},
+		computed: {
+			...mapState('user', ['hasLogin', 'userInfo'])
+		},
+		//#ifdef
+		onShareAppMessage(options) {
+			// 设置菜单中的转发按钮触发转发事件时的转发内容
+			let pages = getCurrentPages(); //获取加载的页面
+			let currentPage = pages[pages.length - 1]; //获取当前页面的对象
+			let url = currentPage.route; //当前页面url
+			let item = currentPage.options; //如果要获取url中所带的参数可以查看options
+			let shareObj = {}
+			if (this.userInfo.uid) {
+				shareObj = {
+					title: this.userInfo.nickname + '邀请您加入小井康泉', // 默认是小程序的名称(可以写slogan等)
+					path: url + '?scene=' + this.userInfo.uid, // 默认是当前页面,必须是以‘/’开头的完整路径
+					imageUrl: '',
+					success: function(res) {
+						// 转发成功之后的回调
+						if (res.errMsg == 'shareAppMessage:ok') {}
+					},
+					fail: function() {
+						// 转发失败之后的回调
+						if (res.errMsg == 'shareAppMessage:fail cancel') {
+							// 用户取消转发
+						} else if (res.errMsg == 'shareAppMessage:fail') {
+							// 转发失败,其中 detail message 为详细失败信息
+						}
+					}
+				};
+			} else {
+				shareObj = {
+					title: '小井康泉', // 默认是小程序的名称(可以写slogan等)
+					path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
+					imageUrl: '',
+					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;
+		},
+		//#ifndef
+		onReachBottom() {
+			console.log('到底')
+		},
+		onLoad: function(option) {
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			// #endif
+			// #ifdef H5
+			// 加载公众号分享
+			shareLoad()
+			// #endif
+			util.$L.getLocation();
+		},
+		onShow: function() {
+			this.loadData();
+		},
+		methods: {
+			navto(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			},
+			// 點擊搜索框
+			clickSearch() {
+				uni.navigateTo({
+					url: '/pages/product/search'
+				});
+			},
+			// 监听图片加载完成
+			onImageError(key, index) {
+				this[key][index].image = '/static/error/errorImage.jpg';
+			},
+			// 请求载入数据
+			async loadData() {
+				const that = this;
+				console.log('商品信息');
+				loadIndexs({})
+					.then(({
+						data
+					}) => {
+						let goods = data.info;
+						that.carouselList = data.banner;
+						that.goodList = data.info.bastList;
+						console.log(that.carouselList)
+						uni.stopPullDownRefresh();
+					})
+					.catch(e => {
+						uni.stopPullDownRefresh();
+					});
+			},
+			// 轮播图跳转
+			bannerNavToUrl(item) {
+				// #ifdef H5
+				console.log(item.wap_url.indexOf('http'), 'banner');
+				if (item.wap_url.indexOf('http') >= 0) {
+					window.location.href = item.wap_url;
+				}
+				// #endif
+				//测试数据没有写id,用title代替
+				uni.navigateTo({
+					url: item.wap_url
+				});
+			},
+			comfirm(text) {
+				console.log(text);
+				const result = this.uniCopy(text);
+				if (result === false) {
+					uni.showToast({
+						title: '不支持'
+					});
+				} else {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none'
+					});
+				}
+				this.$refs.popupkf.close();
+			},
+			uniCopy(content) {
+				/**
+				 * 小程序端 和 app端的复制逻辑
+				 */
+				//#ifndef H5
+				uni.setClipboardData({
+					data: content,
+					success: function() {
+						console.log('success');
+						return true;
+					}
+				});
+				//#endif
+
+				/**
+				 * H5端的复制逻辑
+				 */
+				// #ifdef H5
+				if (!document.queryCommandSupported('copy')) {
+					//为了兼容有些浏览器 queryCommandSupported 的判断
+					// 不支持
+					return false;
+				}
+				let textarea = document.createElement('textarea');
+				textarea.value = content;
+				textarea.readOnly = 'readOnly';
+				document.body.appendChild(textarea);
+				textarea.select(); // 选择对象
+				textarea.setSelectionRange(0, content.length); //核心
+				let result = document.execCommand('copy'); // 执行浏览器复制命令
+				textarea.remove();
+				return result;
+				// #endif
+			},
+			// 打开客服
+			openKf() {
+				this.$refs.popupkf.open();
+			},
+			// 关闭客服
+			cancel() {
+				this.$refs.popupkf.close();
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #ffff;
+		min-height: 100%;
+		height: auto;
+	}
+
+	// 顶部搜索
+	.top-search {
+		height: 80rpx;
+		padding: 0 20rpx;
+		margin-bottom: 20rpx;
+		// background-color: #fff;
+
+		.top-logo {
+			width: 50rpx;
+			// height: 50rpx;
+			margin-right: 10rpx;
+
+			image {
+				width: 48rpx;
+			}
+
+		}
+
+		.search-box {
+			justify-content: center;
+			width: 100%;
+			height: 60rpx;
+			background: #EEEEEE;
+			// box-shadow: 0px 10rpx 20rpx 0px rgba(4, 114, 69, 0.22);
+			border-radius: 30rpx;
+
+			.search {
+				width: 34rpx;
+				height: 34rpx;
+			}
+
+			.search-font {
+				margin-left: 14rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #CBCBCB;
+			}
+		}
+	}
+
+	// 顶部轮播图
+	.top-swiper {
+		width: 690rpx;
+		height: 365rpx;
+
+		// margin: 20rpx 0 0;
+		border-radius: 20rpx;
+		margin: auto;
+
+		image {
+			width: 690rpx;
+			height: 365rpx;
+			border-radius: 20rpx;
+		}
+	}
+
+	.swiper-btm {
+		height: 60rpx;
+		width: 750rpx;
+		background-color: #fff;
+		margin-bottom: 20rpx;
+		font-size: 21rpx;
+		font-weight: 500;
+		color: #333333;
+
+		.btm-item {
+			flex-grow: 1;
+			justify-content: center;
+
+			image {
+				width: 25rpx;
+				height: 25rpx;
+				margin-right: 14rpx;
+			}
+		}
+	}
+
+	// 分类
+	.cate-section {
+		justify-content: space-around;
+		background-color: #fff;
+		padding: 0rpx 0 10rpx;
+		margin-top: 20rpx;
+		flex-wrap: wrap;
+
+		.cate-item {
+			flex-grow: 0;
+			width: 20%;
+			flex-direction: column;
+			text-align: center;
+			align-items: center;
+			justify-content: center;
+			padding-bottom: 20rpx;
+
+			.img-wrapper {
+				width: 140rpx;
+				height: 140rpx;
+				border-radius: 20rpx;
+				position: relative;
+
+				image {
+					width: 140rpx;
+					height: 140rpx;
+					position: absolute;
+					left: 50%;
+					top: 50%;
+					transform: translate(-50%, -50%);
+				}
+			}
+
+			.item-title {
+				margin-top: 15rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				color: #6B4216;
+			}
+		}
+	}
+
+	.product-box {
+		background: #ffffff;
+		padding: 30rpx;
+		padding-top: 10rpx;
+
+		.product-tit {
+			justify-content: center;
+
+			.left-icon {
+				width: 8rpx;
+				height: 38rpx;
+				background: linear-gradient(180deg, #3C82E6, #5395F5);
+				border-radius: 3px;
+			}
+
+			.tit {
+				padding-left: 15rpx;
+				font-size: 36rpx;
+				font-weight: bold;
+				color: #202739;
+			}
+
+			.bottom-text {
+				padding-left: 15rpx;
+				align-self: flex-end;
+				font-size: 20rpx;
+				color: #95A0B1;
+			}
+		}
+	}
+
+	.hotgoods {
+		margin-top: 38rpx;
+		width: 100%;
+		display: flex;
+		flex-wrap: wrap;
+		padding: 0 20rpx 30rpx;
+		justify-content: space-between;
+
+		.hotgoods-item {
+			width: 345rpx;
+			background-color: #ffffff;
+			border-radius: 12rpx;
+			box-shadow: 0 0 15rpx rgba(0, 0, 0, 0.2);
+			margin-bottom: 15rpx;
+
+			.image-wrapper {
+				width: 345rpx;
+				height: 345rpx;
+				border-radius: 3px;
+				overflow: hidden;
+				position: relative;
+
+				.image-bg {
+					position: absolute;
+					top: 0;
+					left: 0;
+					right: 0;
+					bottom: 0;
+					width: 100%;
+					height: 100%;
+					opacity: 1;
+					border-radius: 12rpx 12rpx 0 0;
+					z-index: 2;
+				}
+
+				.image {
+					width: 100%;
+					height: 100%;
+					opacity: 1;
+					border-radius: 12rpx 12rpx 0 0;
+				}
+			}
+
+			.title {
+				margin-top: 24rpx;
+				padding: 0 20rpx;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+
+			.hot-price {
+				display: flex;
+				justify-content: flex-start;
+				align-items: center;
+				// padding: 14rpx 0 30rpx;
+
+				.hotPrice-box {
+					padding: 2rpx 6rpx;
+
+					background: linear-gradient(90deg, #c79a4c, #f9df7f);
+					border-radius: 5rpx;
+					text-align: center;
+					line-height: 28rpx;
+					font-size: 20rpx;
+					font-family: Source Han Sans CN;
+					font-weight: 400;
+					color: #ffffff;
+				}
+
+				.price {
+					margin-left: 10rpx;
+					font-size: 40rpx;
+					color: #ff0000;
+					font-weight: 500;
+
+					.jf {
+						font-size: 20rpx;
+					}
+				}
+
+				.yuanPrice {
+					margin-left: 10rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					text-decoration: line-through;
+					color: #999999;
+				}
+
+				.cart-icon {
+					image {
+						width: 44rpx;
+						height: 44rpx;
+					}
+				}
+			}
+		}
+	}
+
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+
+		.product-tit {
+			justify-content: center;
+
+			.hx {
+				width: 120rpx;
+				height: 1rpx;
+				background: #989898;
+			}
+
+			.tit {
+				margin: 0 70rpx;
+				font-size: 30rpx;
+				font-weight: 500;
+				color: #4A2723;
+			}
+		}
+
+		.img {
+			position: relative;
+			top: -56rpx;
+			left: 0;
+			width: 522rpx;
+			height: 132rpx;
+			display: flex;
+			justify-content: center;
+
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 450rpx;
+				height: 132rpx;
+			}
+		}
+
+		.mian {
+			margin-top: -44rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+
+				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;
+				}
+			}
+		}
+	}
+
+	.good-list {
+		padding: 20rpx 28rpx;
+		width: 750rpx;
+		.good {
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20px 0px rgba(50,50,52,0.06);
+			width: 100%;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			padding: 20rpx;
+			.good-image {
+				width: 170rpx;
+				height: 170rpx;
+				background-color: #eee;
+				border-radius: 10rpx;
+				flex-shrink: 0;
+				
+			}
+			.right{
+				height: 170rpx;
+				position: relative;
+				
+				.good-name {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					padding-left: 20rpx;
+				}
+				
+				.good-key {
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+					padding-left: 20rpx
+				}
+				
+				.good-price {
+					display: flex;
+					justify-content: space-between;
+					align-items: flex-end;
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF1A1A;
+					position: absolute;
+					bottom: 0rpx;
+					padding: 0 20rpx;
+					left: 0;
+					right:0rpx;
+					.xl {
+						background: linear-gradient(90deg, #3C82E6, #5395F5);
+						border-radius: $font-base;
+						padding: 10rpx 20rpx ;
+						color: #fff;
+					}
+				}
+			}
+		}
+	}
+
+	// .good-list {
+	// 	width: 750rpx;
+	// 	background:#fff;
+	// 	padding: 30rpx 0;
+
+	// 	.good {
+	// 		width: 690rpx;
+	// 		height: 276rpx;
+	// 		background: #FFFFFF;
+	// 		box-shadow: 0px 0px 20rpx 0px rgba(50, 50, 52, 0.06);
+	// 		border-radius: 10rpx;
+	// 		margin: auto;
+	// 		padding: 20rpx 15rpx;
+	// 		margin-bottom: 20rpx;
+	// 		&:last-of-type {
+	// 			margin-bottom: 0rpx;
+	// 		}
+
+	// 		.good-img {
+	// 			flex-shrink: 0;
+	// 			width: 236rpx;
+	// 			height: 236rpx;
+	// 			border-radius: 10rpx;
+	// 			margin-right: 22rpx;
+
+	// 			image {
+	// 				width: 236rpx;
+	// 				height: 236rpx;
+	// 				border-radius: 10rpx;
+	// 			}
+	// 		}
+
+	// 		.good-info {
+	// 			flex-grow: 1;
+	// 			height: 100%;
+	// 			flex-direction: column;
+	// 			justify-content: space-between;
+	// 			align-items: flex-start;
+
+	// 			.good-name {
+	// 				font-size: 32rpx;
+	// 				font-weight: bold;
+	// 				padding-top: 10rpx;
+	// 				color: #333333;
+	// 			}
+
+	// 			.good-price {
+	// 				width: 100%;
+
+	// 				image {
+	// 					width: 14rpx;
+	// 					margin: 0 6rpx 0 10rpx;
+	// 				}
+
+	// 				.old-price {
+	// 					.old-left {
+	// 						font-size: 26rpx;
+	// 						font-weight: 500;
+	// 						text-decoration: line-through;
+	// 						color: #999999;
+	// 					}
+
+	// 					.old-right {
+	// 						font-size: 24rpx;
+	// 						font-weight: bold;
+	// 						color: #B59467;
+	// 					}
+	// 				}
+
+	// 				.new-price {
+	// 					width: 100%;
+	// 					font-size: 36rpx;
+	// 					font-weight: bold;
+	// 					color: #FF4C4C;
+	// 					justify-content: space-between;
+
+	// 					.good-tip {
+	// 						width: 137rpx;
+	// 						height: 52rpx;
+	// 						background: #ff4a48;
+	// 						border-radius: 26rpx;
+	// 						position: relative;
+	// 						font-size: 26rpx;
+	// 						font-weight: 500;
+	// 						color: #FFFFFF;
+	// 						line-height: 52rpx;
+	// 						text-align: center;
+	// 					}
+	// 				}
+	// 			}
+	// 		}
+	// 	}
+
+	// }
+	.index-top-wrap {
+		position: relative;
+		.index-top-image{
+			position: absolute;
+			width: 750rpx;
+			height: 288rpx;
+			border-bottom-right-radius: 30rpx;
+			border-bottom-left-radius: 30rpx;
+			background:$bg-gradual;
+		}
+
+		.fud {
+			position: relative;
+		}
+	}
+</style>

+ 534 - 0
pages/home/order.vue

@@ -0,0 +1,534 @@
+<template>
+	<view class="content">
+		<view class="header">
+			<view class="title">
+				我的订单
+			</view>
+		</view>
+
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+
+		<swiper :current="tabCurrentIndex" 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?type=1&id=' + item.order_id )"
+						v-for="(item, index) in tabItem.orderList" :key="index" class="order-item position-relative">
+						<view class="i-top b-b flex">
+							<view class="order-code flex">
+								<view class="no">
+									订单编号:
+								</view>
+								<view>
+									{{ item.order_id }}
+								</view>
+							</view>
+							<text class="font-size-sm" :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 > 0" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item.cartInfo" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.productInfo.image" mode="aspectFill">
+								</image>
+								<view class="good-name clamp">
+									{{goodsItem.productInfo.attrInfo.suk}}*{{goodsItem.cart_num}}
+								</view>
+							</view>
+						</scroll-view>
+						<view class="info-info">
+							<view class="js">
+								共{{item.cartInfo.length}}件
+							</view>
+							<view class="hj">
+								合计:¥{{item.pay_price}}
+							</view>
+						</view>
+						<!-- 底部操作栏 -->
+						<view class="btm-btn-wrap flex">
+							<view class="btm-left">
+								下单时间:{{item._add_time.split(' ')[0].replace(/-/g,'/')}}
+							</view>
+							<view class="btm-right flex">
+								<view class="btm-btn" @click.stop="cancelOrder(item)"
+									v-if="item._status._title == '未支付'">
+									取消订单
+								</view>
+								<view class="btm-btn ksps"
+									@click.stop="navTo( '/pages/user/money/pay?type=1&ordid=' + item.order_id + '&money=' + item.pay_price)"
+									v-if="item._status._title == '未支付'">
+									前往支付
+								</view>
+								<view class="btm-btn ksps" @click.stop="orderTake(item, index)"
+									v-if="item._status._title == '待收货'">
+									确认收货
+								</view>
+								<view class="btm-btn ksps"
+									@click.stop="navTo('/pages/order/orderRefund?id=' + item.order_id)"
+									v-if="item._status._title == '未发货'||item._status._title == '未核销'">
+									申请退款
+								</view>
+								<view class="btm-btn ksps"
+									@click.stop="navTo('/pages/order/WriteOff?id=' + item.order_id)"
+									v-if="item._status._title == '待核销'">
+									核销码
+								</view>
+								<view class="btm-btn ksps" @click.stop="evaluate(item)"
+									v-if="item._status._title == '待评价'">
+									立即评价
+								</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more v-if="!(tabItem.orderList.length==0&&tabItem.loaded === true)" :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: 3,
+						text: '待评价',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					},
+					{
+						state: 4,
+						text: '已完成',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10 //每次信息条数
+					}
+				]
+			};
+		},
+
+		onLoad(options) {
+			this.loadData();
+		},
+		// #ifdef APP-PLUS || H5
+		onBackPress(e) {
+			uni.switchTab({
+				url: '/pages/user/user',
+			});
+			return true;
+		},
+		// #endif
+		methods: {
+			// 评价
+			evaluate(item){
+				if(item.cartInfo.length==1){
+					uni.navigateTo({
+						url: '/pages/order/evaluate?unique=' + item.cartInfo[0].unique
+					});
+				}else{
+					this.navTo( '/pages/order/orderDetail?type=1&id=' + item.order_id )
+				}
+			},
+			// 确认收货
+			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.page = 1;
+					navItem.orderList = [];
+					navItem.loadingType = 'more';
+					navItem.loaded=false;
+					//tab切换只有第一次需要加载数据
+				}
+				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 = '#3C82E6';
+				switch (+state) {
+					case 0:
+						stateTip = '待付款';
+						stateTipColor = '#3C82E6'
+						break;
+					case 1:
+						stateTip = '待发货';
+						stateTipColor = '#3C82E6'
+						break;
+					case 2:
+						stateTip = '待收货';
+						break;
+					case 3:
+						stateTip = '待评价';
+						break;
+					case 4:
+						stateTip = '已完成';
+						stateTipColor = '#999999';
+						break;
+					case 9:
+						stateTip = '订单已关闭';
+						stateTipColor = '#909399';
+						break;
+
+						//更多自定义
+				}
+				return {
+					stateTip,
+					stateTipColor
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content {
+		height: 100%;
+		background: linear-gradient(180deg, rgba(#3C82E6, 0.3), rgba(#5395F5, 0));
+		background-size: 100% 645rpx;
+		background-repeat: no-repeat;
+	}
+
+	.header {
+		padding-top: var(--status-bar-height);
+
+		.title {
+			height: 50px;
+			font-size: 18px;
+			line-height: 50px;
+			text-align: center;
+			font-weight: bold;
+		}
+	}
+
+	.swiper-box {
+		height: calc(100% - 90px);
+	}
+
+	.list-scroll-content {
+		height: 100%;
+		padding-top: 30rpx;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 6px;
+		background: $bg-gradual;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+		margin: 0 30rpx;
+		border-radius: 99rpx;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 28px;
+			font-size: 15px;
+			line-height: 28px;
+			color: #FFF;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+				background-color: #FFF;
+				border-radius: 99rpx;
+			}
+		}
+	}
+
+	.order-item {
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		margin: 0 30rpx;
+		margin-bottom: 30rpx;
+		border-radius: 30rpx;
+		background: #fff;
+		color: #A8ADBF;
+
+		.i-top {
+			height: 80rpx;
+			.order-code{
+				font-size: $font-sm;
+				.no{
+					padding: 10rpx 10rpx;
+					background-color: #FFEAE5;
+					color: #FD5B23;
+					line-height: 1;
+					border-top-right-radius: 10rpx;
+					border-bottom-left-radius: 10rpx;
+					margin-right: 10rpx;
+					
+				}
+			}
+			
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				position: relative;
+
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+
+		.info-info {
+			width: 215rpx;
+			height: 200rpx;
+			position: absolute;
+			top: 80rpx;
+			right: 35rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: flex-end;
+			align-items: flex-end;
+			font-size: 30rpx;
+			font-weight: 500;
+
+			.hj {
+				padding-top: 40rpx;
+				color: $font-color-dark;
+				padding-bottom: 20rpx;
+			}
+		}
+
+		/* 多条商品 */
+		.goods-box {
+			height: 200rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+			padding-right: 250rpx;
+
+			.goods-item {
+				width: 120rpx;
+				height: 180rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+
+			.good-name {
+				font-size: 24rpx;
+				text-align: center;
+				width: 120rpx;
+				padding-top: 10rpx;
+				margin-right: 0;
+				color: $font-color-dark;
+			}
+		}
+
+		.btm-btn-wrap {
+			height: 90rpx;
+			width: 100%;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #A3A8BB;
+			line-height: 1;
+
+			.btm-right {
+				justify-content: flex-end;
+			}
+
+			.btm-btn {
+				width: 144rpx;
+				padding: 10rpx 0;
+				border: 2px solid #ededed;
+				border-radius: 28rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				text-align: center;
+				margin-left: 10rpx;
+				color: #999999;
+			}
+
+			.ksps {
+				border-color: #4589ec;
+				color: #4589ec;
+			}
+		}
+	}
+
+	/deep/ .empty-content {
+		background: transparent;
+	}
+</style>

+ 641 - 0
pages/home/user.vue

@@ -0,0 +1,641 @@
+<template>
+	<view class="container">
+		<view class="content-box">
+			<view class="user-section">
+				<view class="avatar" @click="navTo('/pages/set/userinfo')">
+					<image class="image" v-if="userInfo.avatar" :src="userInfo.avatar" mode="scaleToFill"></image>
+					<image class="image" v-else src="../../static/error/missing-face.png" mode="scaleToFill"></image>
+				</view>
+				<view class="flex-center phone">
+					{{userInfo.nickname || '游客'}}
+				</view>
+				<view class="tj-sction flex">
+					<view class="tj-item flex-line" @click="navTo('/pages/user/money/wallet')">
+						<text class="num">{{userInfo.now_money || '0.00' }}</text>
+						<text>我的余额</text>
+					</view>
+					<view class="tj-item flex-line" @click="navTo('/pages/water/myWaterList')">
+						<text class="num">{{userInfo.certificate_count }}</text>
+						<text>我的水票</text>
+
+					</view>
+					<view class="tj-item flex-line" @click="navTo('/pages/water/deposit')">
+						<text class="num">{{ +userInfo.certificate_pledge || '0.00' }}</text>
+						<text>我的押金</text>
+					</view>
+				</view>
+			</view>
+
+			<view class="cover-container">
+				<view class="item-box" v-if="userInfo.adminid">
+					<view class="box-title flex">
+						<view class="title"><text>配送员订单</text></view>
+						<view class="link flex" @click="navTo('/pages/user/admin/orderAdmin?state=0')"
+							hover-class="common-hover">
+							<text class="margin-r-10">全部</text>
+							<image class="img" src="../../static/icon/next1.png" mode="widthFix"></image>
+						</view>
+					</view>
+					<view class="order-section flex">
+						<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=0')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userorder1.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="shopOrderDetail.unpaid_count > 0">
+									<text>{{ shopOrderDetail.unpaid_count }}</text>
+								</view>
+							</view>
+							<text>待付款</text>
+						</view>
+						<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=1')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userorder2.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="shopOrderDetail.unshipped_count > 0">
+									<text>{{ shopOrderDetail.unshipped_count }}</text>
+								</view>
+							</view>
+							<text>待发货</text>
+						</view>
+						<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=2')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class="icon position-relative">
+								<image class="icon-img" src="../../static/icon/userorder2.png" mode="aspectFit">
+								</image>
+								<view class="corner" v-if="shopOrderDetail.received_count > 0">
+									<text>{{ shopOrderDetail.received_count }}</text>
+								</view>
+							</view>
+							<text>待收货</text>
+						</view>
+						<view class="order-item flex-line" @click="navTo('/pages/user/admin/orderAdmin?state=4')"
+							hover-class="common-hover" :hover-stay-time="50">
+							<view class=" icon position-relative">
+								<image class="icon-img" src="../../static/icon/userorder3.png" mode="aspectFit">
+								</image>
+							</view>
+							<text>已完成</text>
+						</view>
+					</view>
+				</view>
+				<view class="listBox">
+					<view class="list">
+						<view  v-if="userInfo.adminid" class="flex listItem" @click="smsh">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/usersm.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  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/useradmin')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/useryh.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  v-if="userInfo.adminid" class="flex listItem" @click="navTo('/pages/user/admin/ktadmin')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/userkt.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/userdz.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/shareQrCode')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/usergg.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> -->
+						<!-- <button hover-class="none" class="flex listItem" open-type='contact'>
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/userkf.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>
+						</button> -->
+						<!-- <view class="flex listItem" @click="navTo('/pages/set/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/userabout.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/set')">
+							<view class="flex titleBox">
+								<image class="listIconImg" src="../../static/icon/userset.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>
+		</view>
+		<!-- 核销弹窗 -->
+		<uni-popup ref="popuphx" class="agree-wrapper">
+			<view class="hx-wrapper">
+				<view class="hx-img">
+					<image src="../../static/image/hxbg.png" mode=""></image>
+				</view>
+				<view class="hx-body">
+					<!-- <view class="hx-title">
+						核销码
+					</view> -->
+					<input type="text" v-model="code" placeholder="请输入核销码" placeholder-class="hx-placeholder" />
+					<!-- <image src="../../static/icon/scend.png" mode=""></image> -->
+					<view class="hx-btn" @click="qhx">
+						立即核销
+					</view>
+				</view>
+				<view class="hx-close" @click="close">
+					<image src="../../static/icon/close.png" mode=""></image>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+<script>
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		share
+	} from '@/api/wx';
+	import {
+		getUser
+	} from '@/api/user.js';
+	import {
+		adminStatistics
+	} from '@/api/water.js';
+	import {
+		orderVerific
+	} from '@/api/index.js';
+	import {
+		saveUrl,
+		interceptor
+	} from '@/utils/loginUtils.js';
+	export default {
+		data() {
+			return {
+				hxLoading: false,
+				hxtype: 0, //0普通核销1电池核销
+				dcode: '', //电池编号
+				code: '', //商品核销码
+				shareData: {}
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState('shop', ['shopOrderDetail']),
+			...mapState(['baseURL', 'urlFile']),
+			// 总消息条数
+			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() {
+			this.getUser();
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo']),
+			...mapMutations('shop', ['setShopOrder']),
+			qhx() {
+				let that = this
+				if (that.hxLoading) {
+					return
+				}
+				if (that.code == '') {
+					return that.$api.msg('请输入核销码')
+				}
+
+					that.hxLoading = true
+					orderVerific({
+						verify_code: that.code,
+						is_confirm: 1
+					}).then(res => {
+						uni.showToast({
+							title: '核销成功',
+							mask: true,
+							duration: 1500
+						});
+						that.close()
+						that.hxLoading = false
+					}).catch(err => [
+						that.hxLoading = false
+					])
+				
+			},
+			openHx() {
+				this.$refs.popuphx.open()
+			},
+			close() {
+				this.code = ''
+				this.dcode = ''
+				this.$refs.popuphx.close()
+			},
+			// 扫码
+			smsh() {
+				let that = this
+				// #ifdef H5
+				try {
+					weixinObj.scanQRCode({
+						needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
+						scanType: ["qrCode", "barCode"], // 可以指定扫二维码还是一维码,默认二者都有
+						success: function(res) {
+							var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
+							that.code = result
+							that.openHx();
+							// 判断是否为电池核销
+
+						}
+					});
+				} catch (err) {
+					console.log(err)
+					that.openHx();
+				}
+
+				// #endif
+				// #ifndef H5
+				uni.scanCode({
+					success: (res) => {
+						let result = res.result
+						that.code = result
+						that.openHx();
+					}
+				})
+				// #endif
+
+			},
+			// 跳转卡片页面
+			navcard() {
+				// 判断是否已经认证
+				if (this.user.work_type_id <= 0) {
+					this.navTo('/pages/user/model/modelrz')
+				} else {
+					if (this.user.show_template_id) {
+						this.navTo('/pages/user/model/model?mtype=' + this.user.show_template_id + '&look=1')
+					} else {
+						this.navTo('/pages/user/model/model')
+					}
+				}
+			},
+
+			//#ifdef APP
+			shareDomApp() {
+				uni.share({
+					provider: 'weixin',
+					type: 0,
+					title: '小井康泉',
+					summary: '',
+					imageUrl: this.shareData.img,
+					href: this.baseURL + this.urlFile + '/pages/public/register?spread=' + this.userInfo.uid
+				})
+			},
+			//#endif
+			// 获取订单信息
+			adminStatistics(){
+				adminStatistics({}).then((e) => {
+					this.setShopOrder(e.data)
+				}).catch((e) => {
+					console.log(e, 'sj');
+				})
+			},
+			// 获取用户数据
+			getUser() {
+				console.log('data')
+				const that = this;
+				getUser({}).then((e) => {
+					that.setUserInfo(e.data)
+					if(e.data.adminid){
+						that.adminStatistics()
+					}
+				}).catch((e) => {
+					console.log(e, 'sj');
+				})
+				// 系统消息
+				// 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) {
+				console.log(this.hasLogin, 'this.hasLogin');
+				if (!this.hasLogin) {
+					// 保存地址
+					saveUrl();
+					// 登录拦截
+					interceptor();
+				} else {
+					uni.navigateTo({
+						url,
+						fail(e) {
+							console.log(e);
+						}
+					});
+				}
+			},
+		}
+	};
+</script>
+<style lang="scss">
+	.listBox {
+		margin-top: 20rpx;
+		overflow: hidden;
+	}
+
+	.list {
+		.listItem {
+			padding: 35rpx 40rpx;
+			margin-bottom: 15rpx;
+			background-color: #FFFFFF;
+			border-radius: 20rpx;
+			border: none;
+			line-height: 1;
+
+			&::after {
+				border: none;
+			}
+		}
+
+		.listIconImg {
+			width: 36rpx;
+			height: 36rpx;
+		}
+
+		.right {
+			.img {
+				width: 26rpx;
+			}
+		}
+
+		.titleBox {
+			.title {
+				padding-left: 20rpx;
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+
+	.container {
+		background-color: $page-color-base;
+		background-image: url('../../static/image/userbg.png');
+		background-repeat: no-repeat;
+		background-size: 100% auto;
+		padding-top: 100rpx;
+		padding-bottom: 150rpx;
+	}
+
+	.user-section {
+		background-color: #FFF;
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		padding: 40rpx 0;
+
+		.avatar {
+			width: 130rpx;
+			height: 130rpx;
+			margin: 0 auto;
+			border-radius: 100rpx;
+			overflow: hidden;
+			margin-bottom: 30rpx;
+
+			.image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.phone {
+			height: 1rem;
+			margin-bottom: 30rpx;
+		}
+	}
+
+	.cover-container {
+		padding: 0 30rpx;
+		position: relative;
+		padding-bottom: 20rpx;
+	}
+
+	.tj-sction {
+		justify-content: space-around;
+
+		.tj-item {
+			flex-direction: column;
+			height: 100rpx;
+			font-size: $font-sm;
+			color: $font-color-light;
+		}
+
+		.num {
+			font-size: $font-lg + 4rpx;
+			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 40rpx;
+
+			.title {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.link {
+				font-size: $font-base - 2rpx;
+				color: $font-color-light;
+
+				.img {
+					width: 26rpx;
+				}
+			}
+		}
+
+		.order-section {
+			padding: 28rpx 0;
+			padding-top: 0;
+			justify-content: space-around;
+
+			.order-item {
+				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%;
+				}
+			}
+		}
+	}
+	.hx-wrapper {
+		width: 536rpx;
+		// height: 630rpx;
+		position: relative;
+		padding-bottom: 40rpx;
+		background-color: #fff;
+		border-radius: 20rpx;
+	
+		.hx-img {
+			width: 536rpx;
+			height: 281rpx;
+	
+			image {
+				width: 536rpx;
+				height: 281rpx;
+			}
+		}
+	
+		.hx-close {
+			position: absolute;
+			left: 243rpx;
+			bottom: -80rpx;
+			width: 52rpx;
+			height: 52rpx;
+	
+			image {
+				width: 52rpx;
+				height: 52rpx;
+			}
+		}
+	
+		.hx-body {
+			width: 536rpx;
+			// min-height: 349rpx;
+			background-color: #fff;
+			border-radius: 0 0 10rpx 10rpx;
+			padding-top: 40rpx;
+	
+			.hx-title {
+				width: 536rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #333333;
+				line-height: 1;
+				padding-top: 42rpx;
+				text-align: center;
+				padding-bottom: 10rpx;
+			}
+	
+			input {
+				width: 439rpx;
+				height: 68rpx;
+				background: #f1faf6;
+				border-radius: 10rpx;
+				margin: 0 auto 40rpx;
+				padding-left: 26rpx;
+	
+				.hx-placeholder {
+					font-size: 26rpx;
+					font-weight: 500;
+					color: $base-color;
+				}
+			}
+	
+			.hx-btn {
+				margin: 44rpx auto 0;
+				width: 353rpx;
+				height: 71rpx;
+				background: $base-color;
+				border-radius: 34rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #F8F9F9;
+				line-height: 71rpx;
+				text-align: center;
+			}
+	
+	
+		}
+	}
+</style>

+ 183 - 0
pages/order/WriteOff.vue

@@ -0,0 +1,183 @@
+<template>
+	<view class="content">
+		<view class="qr-box position-relative">
+			<view class="title-box">
+				<view class="title">
+					服务确认二维码
+				</view>
+				<view class="tip-text">
+					请扫码核销
+				</view>
+			</view>
+			<view class="qr-content flex-center">
+				<uqrcode :loading='loading' :auto='false' :start='false' sizeUnit='rpx' ref="qrcode" canvas-id="qrcode"
+					:value="item.verify_code" size="500"></uqrcode>
+			</view>
+			<view class="text-code">
+				{{item.verify_code}}
+			</view>
+			<view class="tip-icon top-left"></view>
+			<view class="tip-icon bottom-left"></view>
+			<view class="tip-icon top-right"></view>
+			<view class="tip-icon bottom-right"></view>
+		</view>
+		<view class="flex bottomBox">
+			<view class="buttomBottom" @click="shopLi">
+				联系商家
+			</view>
+			<view class="buttomBottom bgYellow" @click="shopNext">前往商家</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		orderDetail
+	} from '@/api/order.js';
+	export default {
+		data() {
+			return {
+				orderId: '',
+				item: {
+					verify_code: ''
+				},
+				loading: true
+			};
+		},
+		onLoad(option) {
+			this.orderId = option.id;
+			this.loadOrder();
+		},
+		methods: {
+			// 载入订单详细
+			loadOrder() {
+				let obj = this;
+				orderDetail({}, obj.orderId).then(e => {
+					obj.item = e.data;
+					obj.$refs.qrcode.make({
+						success: () => {
+							obj.loading = false;
+							console.log('生成成功');
+					 },
+						fail: err => {
+							console.log(err)
+						}
+					});
+				});
+			},
+			// 联系商家
+			shopLi() {
+				uni.makePhoneCall({
+					phoneNumber: this.item.system_store.phone //仅为示例
+				});
+			},
+			// 前往商家
+			shopNext() {
+				// 打开地图导航
+				uni.openLocation({
+					latitude: +this.item.system_store.latitude,
+					longitude: +this.item.system_store.longitude,
+					fail(e) {
+						console.log(e);
+					}
+				})
+			},
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background-color: $base-color;
+	}
+
+	.qr-box {
+		color: $font-color-dark;
+		background-color: #FFF;
+		text-align: center;
+		margin: 0 30rpx;
+
+		.title-box {
+			padding-top: 50rpx;
+			padding-bottom: 30rpx;
+			background-color: #F5F5F5;
+
+			.title {
+				font-weight: bold;
+				font-size: 44rpx;
+			}
+
+			.tip-text {
+				font-size: $font-sm;
+				color: $font-color-light;
+			}
+		}
+
+		.qr-content {
+			padding-top: 110rpx;
+		}
+
+		.tip-icon {
+			position: absolute;
+			background-color: $base-color;
+			border-radius: 99rpx;
+			width: 100rpx;
+			height: 100rpx;
+		}
+
+		.top-left,
+		.bottom-left {
+			left: -40rpx;
+		}
+
+		.top-right,
+		.bottom-right {
+			right: -40rpx;
+		}
+
+		.bottom-left,
+		.bottom-right {
+			bottom: -40rpx;
+		}
+
+		.top-left,
+		.top-right {
+			top: -40rpx;
+		}
+
+		.text-code {
+			font-size: 44rpx;
+			font-weight: bold;
+			padding-top: 60rpx;
+			padding-bottom: 110rpx;
+		}
+	}
+
+	.content {
+		padding-top: 90rpx;
+	}
+
+	.bottomBox {
+		justify-content: space-around;
+		position: fixed;
+		bottom: 0;
+		left: 0;
+		right: 0;
+		border-top: 1px solid $border-color-light;
+
+		.buttomBottom {
+			width: 50%;
+			text-align: center;
+			padding: 30rpx 80rpx;
+			line-height: 1;
+			color: $base-color;
+			font-size: $font-base;
+			background-color: #FFF;
+
+			&.bgYellow {
+				color: #FFFFFF;
+				background: $bg-gradual;
+			}
+		}
+	}
+</style>

+ 1124 - 0
pages/order/createOrder.vue

@@ -0,0 +1,1124 @@
+<template>
+	<view class="content padding-t-30">
+		<view class="flex tab-address goodsList">
+			<view class="left">
+				收货方式
+			</view>
+			<view class="flex right">
+				<view class=" item" :class="{action:tabCurrentIndex==1}" @click="tabCurrentIndex=1">
+					配送
+				</view>
+				<view class=" item" :class="{action:tabCurrentIndex==2}" @click="tabCurrentIndex=2">
+					自提
+				</view>
+			</view>
+		</view>
+		<!-- 地址 -->
+		<navigator v-if="tabCurrentIndex == 1" url="/pages/set/address?source=1" class="address-section margin-b-30">
+			<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></text>
+					<text>添加收货地址</text>
+				</view>
+			</view>
+		</navigator>
+		<navigator url="/pages/order/shopList?type=1" class="address-section">
+			<view class="shop-box" v-if="shopAddress.name">
+				<view class="shop-top flex">
+					<view class="flex shop-title">
+						<image class="shopImg" :src="shopAddress.image" mode="scaleToFill"></image>
+						<view class="shop-name clamp2">{{ shopAddress.name }}</view>
+					</view>
+					<view class="shop-tip">
+						门店
+					</view>
+				</view>
+				<view class="shop-content margin-t-10">
+					<view class="shop-address">
+						电话:{{ shopAddress.phone }}
+					</view>
+					<text class="shop-address">
+						地区:{{shopAddress.address+shopAddress.detailed_address}}
+					</text>
+				</view>
+			</view>
+			<view class="order-content" v-if="!shopAddress.name">
+				<view class="addAddress">
+					<text></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>
+						<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" v-if="certificate_info.num>0">
+				<text class="cell-tit clamp">使用卡券({{certificate_info.num}})</text>
+				<view class="desc">
+					<switch class="switchCard" :checked='certificate_info.checked' style="transform:scale(0.7)"
+						@change="switchChange" />
+				</view>
+			</view>
+			<template v-if="tabCurrentIndex == 1">
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">送货日期</text>
+					<view @click="openTime" class="desc">
+						<text v-if="day.day">
+							{{timeList[checkedTime].name+day.time}}
+						</text>
+						<text v-else>
+							请选择送货日期
+						</text>
+					</view>
+				</view>
+			</template>
+			<template v-if="tabCurrentIndex == 2">
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">姓名</text>
+					<input class="desc" type="text" v-model="addressData.real_name" placeholder="请填写姓名"
+						placeholder-class="placeholder" />
+				</view>
+				<view class="yt-list-cell b-b">
+					<text class="cell-tit clamp">手机号</text>
+					<input class="desc" type="text" v-model="addressData.phone" placeholder="请填写手机号"
+						placeholder-class="placeholder" />
+				</view>
+			</template>
+			<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" @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 class="yt-list-cell b-b" v-if="!certificate_info.checked" @click="payType='offline'">
+				<view class="cell-tit flex">
+					<image class="orderIcon" src="../../static/icon/yh.png" mode="widthFix"></image>
+					<text class="margin-l-10">线下支付</text>
+				</view>
+				<image class="checked" v-if="payType=='offline'" 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>
+
+		<uni-popup class="alertTime" ref="popup" type="bottom">
+			<view class="alert-box position-relative">
+				<view class="alert-title ">
+					选择预计送达时间
+				</view>
+				<view class="tip iconfont iconclose" @click="$refs.popup.close()"></view>
+				<view class="flex">
+					<view class="left-title">
+						<view class="title" :class="{action:checkedTime==ind}" v-for="(item,ind) in  timeList"
+							@click="changeCheckedTime(item,ind)">
+							{{item.name+'('+item.day+')'}}
+						</view>
+					</view>
+					<view class="right-content">
+						<view class="list flex" v-for="(item,ind) in  timeList[checkedTime].list"
+							@click="checkedShopTime(item)">
+							<view class="time">
+								{{item.time}}
+							</view>
+							<view class="checked">
+								剩余:{{item.door_number-item.day_number}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		mapState
+	} from 'vuex';
+	import {
+		confirm,
+		computedOrderkey,
+		createOrderkey,
+		orderPay
+	} from '@/api/order.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	import {
+		storeday
+	} from '@/api/water.js';
+	// #ifdef H5
+	import weixinObj from "@/plugin/jweixin-module/index.js";
+	// #endif
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 1, //1为自提2为配送
+				// #ifdef APP
+				payType: 'ali',
+				// #endif
+				// #ifndef APP
+				payType: 'weixin',
+				// #endif
+				desc: '', //备注
+				// 收货地址
+				addressData: {},
+				// 店铺地址
+				shopAddress: {
+					name: '',
+					mobile: '',
+					addressName: '',
+					address: '',
+					area: '',
+					default: false,
+					id: ''
+				},
+				// 商品列表
+				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
+				// 下单日期
+				day: {
+					day: '',
+					id: '',
+					time: ''
+				},
+				// 当前选中的日期对象
+				checkedTime: 0,
+				// 保存每周日子
+				timeName: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
+				// 保存日期列表
+				timeList: [{
+					name: '今天',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '明天',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '',
+					day: '',
+					time: '',
+					list: []
+				}, {
+					name: '',
+					day: '',
+					time: '',
+					list: []
+				}],
+				// 可使用的水票
+				certificate_info: {
+					id: '',
+					num: 0,
+					checked: false
+				}
+			};
+		},
+		watch: {
+			shopAddress(newValue, oldValue) {
+				console.log(newValue, 'newValue');
+				for (let i = 0; i < this.timeList.length; i++) {
+					const item = this.timeList[i];
+					const day = `${item.time.getFullYear()}-${item.time.getMonth()+1}-${item.time.getDate()}`
+					storeday({
+						store_id: newValue.id,
+						day
+					}).then(({
+						data
+					}) => {
+						item.list = data;
+					});
+				}
+			}
+		},
+		onLoad(option) {
+			// 保存当前商品在购物车中的id
+			this.cartId = option.id;
+			// 判断是否要读取商家id
+			if (option.shopId) {
+				this.onShopId = option.shopId;
+			}
+			this.loadData();
+			this.userinfo();
+			// 初始化送货时间
+			this.timeInit();
+		},
+		computed: {
+			// 计算是否免运费
+			Postage() {
+				let money = +this.moneyAll.storePostage;
+				if (money == 0) {
+					return '免运费';
+				} else {
+					return '¥' + money;
+				}
+			},
+			payAllMoney() {
+				return +this.moneyAll.totalPrice + +this.moneyAll.vipPrice;
+			},
+		},
+		methods: {
+			// 是否使用卡券切换
+			switchChange(res) {
+				this.certificate_info.checked = res.detail.value;
+				if (this.payType == 'offline') {
+					this.payType = 'weixin'
+				}
+				// 重新计算价格
+				this.payMoneyNub();
+			},
+			checkedShopTime(item) {
+
+				if (item.door_number - item.day_number == 0) {
+					uni.showModal({
+						title: '提示',
+						content: '该时间段预约已满!',
+						showCancel: false,
+					});
+					return
+				}
+				this.day = item;
+				this.$refs.popup.close();
+			},
+			// 选中的时间对象
+			changeCheckedTime(item, ind) {
+				this.checkedTime = ind;
+			},
+			// 打开弹窗
+			openTime() {
+				// 打开弹出窗
+				this.$refs.popup.open();
+			},
+			// 初始化送货时间
+			timeInit() {
+				// 保存当前时间
+				const startTime = new Date();
+				for (let i = 0; i < this.timeList.length; i++) {
+					const item = this.timeList[i]
+					// 保存今天时间戳
+					item.time = new Date(startTime.getTime() + 86400000 * i);
+					// 获取今日周几
+					item.day = this.timeName[item.time.getDay()];
+					if (!item.name) {
+						// 获取今日日期
+						item.name = `${item.time.getMonth()+1}月${item.time.getDate()}日`
+					}
+				}
+				console.log(this.timeList, 'this.timeList');
+			},
+			// 送货时间修改
+			changeTime(res) {
+				console.log(res);
+			},
+			// 加载用户基础信息
+			userinfo() {
+				getUserInfo({}).then(({
+					data
+				}) => {
+					this.now_money = data.now_money;
+				});
+			},
+			// 计算支付金额
+			payMoneyNub() {
+				let updata = {
+					orderkey: this.orderKey,
+					useIntegral: 0, //是否积分抵扣
+					addressId: this.addressData.id //地址编号
+				}
+				// 判断是卡券支付
+				if (this.certificate_info.checked) {
+					updata.use_certificate_id = this.certificate_info.id
+				}
+				computedOrderkey(updata)
+					.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 + '',
+					longitude: uni.getStorageSync('CACHE_LONGITUDE'),
+					latitude: uni.getStorageSync('CACHE_LATITUDE'),
+				}).then(({
+					data
+				}) => {
+					obj.certificate_info.id = data.certificate_info.id;
+					obj.certificate_info.num = data.certificate_info.num;
+					obj.addressData = data.addressInfo || {};
+					obj.shopList = data.cartInfo; //商品列表
+					obj.moneyAll = data.priceGroup; //金额数据
+					obj.orderKey = data.orderKey; //订单key
+					obj.shopAddress = data.system_store; //到店自提列表
+					obj.shopAddress.address = data.system_store.address.join(','); //到店自提列表
+					// 计算金额
+					this.payMoneyNub();
+				});
+			},
+			// 提交订单
+			submit() {
+				let obj = this;
+				if (!this.addressData.real_name) {
+					this.$api.msg('请选择收货地址');
+					return false;
+				}
+				// 判断是否余额不足
+				if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+					});
+					return;
+				}
+				if (!obj.day.day&&obj.tabCurrentIndex==1) {
+					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;
+				console.log(obj.day, 'obj.day');
+				let data = {
+					real_name: obj.addressData.real_name, //联系人名称
+					phone: obj.addressData.phone, //联系人号码
+					addressId: obj.addressData.id, //支付地址id
+					useIntegral: 0, //是否积分抵扣1为是0为否
+					payType: obj.payType, //支付类型  weixin-微信 yue-余额
+					mark: obj.desc, //备注
+					// #ifdef H5
+					from: 'weixin', //来源
+					// #endif
+					// #ifdef MP-WEIXIN
+					from: 'routine', //来源
+					// #endif
+					// #ifdef APP-PLUS
+					from: 'app', //来源
+					// #endif
+					shipping_type: obj.tabCurrentIndex, //提货方式 1 快递 2自提
+					store_id: obj.shopAddress.id || '',
+					day: obj.day.day,
+					door_id: obj.day.door_id
+				};
+				if (obj.certificate_info.checked) {
+					data.use_certificate_id = obj.certificate_info.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.certificate_info.checked&&obj.payPrice==0){
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+							return
+						}
+						
+						
+						// 判断是否为余额支付
+						if (obj.payType == 'yue' || obj.payType == 'offline') {
+							if (status == 200 && data.status == 'SUCCESS') {
+								obj.paySuccessTo();
+							} else {
+								obj.$api.msg(msg);
+							}
+						} else {
+							// 立即支付
+							obj.orderMoneyPay();
+						}
+					})
+					.catch(e => {
+						uni.hideLoading();
+						obj.payLoding = false;
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content {
+		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;
+
+			}
+		}
+
+		.cen {
+			display: flex;
+			flex-direction: column;
+			font-size: 28rpx;
+			color: $font-color-dark;
+			width: 0px;
+			flex-grow: 1;
+		}
+
+		.name {
+			font-size: 34rpx;
+			margin-right: 24rpx;
+		}
+
+		.address {
+			margin-top: 16rpx;
+			margin-right: 20rpx;
+			color: $font-color-light;
+		}
+
+	}
+
+	.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;
+
+			.switchCard {
+				margin-right: -20rpx;
+
+			}
+		}
+	}
+
+	/* 支付列表 */
+	.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: $bg-gradual;
+
+			&.submitNo {
+				background-color: $font-color-disabled;
+			}
+		}
+	}
+
+	.tab-address {
+		margin-bottom: 30rpx;
+		margin-top: 0;
+
+		.left {
+			font-size: $font-base;
+		}
+
+		.right {
+			font-size: $font-sm;
+			color: #FFF;
+			background: $bg-gradual;
+			padding: 6rpx;
+			border-radius: 10rpx;
+			line-height: 1;
+
+			.item {
+				padding: 16rpx 20rpx;
+
+				&.action {
+					color: $uni-color-primary;
+					background-color: #FFF;
+					border-radius: 10rpx;
+				}
+			}
+		}
+	}
+
+	.shop-box {
+		.shop-top {
+			width: 100%;
+
+			.shop-title {
+				width: 0px;
+				flex-grow: 1;
+				justify-content: flex-start;
+
+				.shopImg {
+					height: 65rpx;
+					width: 65rpx;
+					border-radius: 100rpx;
+					margin-right: 20rpx;
+					flex-shrink: 0;
+				}
+
+				.shop-name {
+					font-weight: bold;
+					font-size: $font-lg;
+				}
+			}
+
+			.shop-tip {
+				color: #FFF;
+				padding: 5rpx 10rpx;
+				font-size: $font-sm;
+				background: linear-gradient(-90deg, #DCB876 0%, #EECD92 100%);
+				border-radius: 5rpx;
+			}
+		}
+
+		.shop-content {
+			color: $font-color-light;
+			font-size: $font-sm;
+		}
+	}
+
+	.alertTime {
+		z-index: 1000;
+
+		.alert-box {
+			background-color: #FFF;
+			border-top-right-radius: 20rpx;
+			border-top-left-radius: 20rpx;
+
+			.right-content {
+				width: 70%;
+
+				.list {
+					padding: 20rpx 30rpx;
+					font-size: $font-sm;
+					border-bottom: 1px solid $border-color-light;
+				}
+			}
+
+			.left-title {
+				width: 30%;
+				align-self: flex-start;
+
+				.title {
+					padding: 30rpx;
+					text-align: center;
+					font-weight: bold;
+					font-size: $font-sm;
+					background-color: rgba(246, 246, 246, 1);
+
+					&.action {
+						background-color: #FFF;
+					}
+				}
+			}
+
+			.alert-title {
+				text-align: center;
+				padding: 30rpx;
+				line-height: 1;
+				font-weight: bold;
+			}
+
+			.tip {
+				position: absolute;
+				top: 30rpx;
+				right: 30rpx;
+				color: $font-color-disabled;
+				font-weight: bold;
+			}
+		}
+	}
+
+	/deep/ .uni-switch-input {
+		&.uni-switch-input-checked {
+			border-color: $base-color !important;
+			background-color: $base-color !important;
+		}
+	}
+</style>

+ 291 - 0
pages/order/evaluate.vue

@@ -0,0 +1,291 @@
+<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 class="padding-l-10"><uni-rate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uni-rate></view>
+				</view>
+				<view class="flex_item zhil">
+					<view>服务态度</view>
+					<view class="padding-l-10"><uni-rate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uni-rate></view>
+				</view>
+				<view class="equity_box">
+						<textarea class="text-box" auto-height placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea>
+					<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/image/delete.png"></image>
+						</view>
+						<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()">
+							<image class="add-img" src="/static/image/upImg.png"></image>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="base-buttom" @click="submit">
+			提交评论
+		</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.reLaunch({
+						url: '/pages/home/order'
+					});
+				})
+				.catch(e => {
+					uni.reLaunch({
+						url: '/pages/home/order'
+					});
+				});
+		},
+		//点击图片显示大图
+		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 {
+		font-size: 25rpx;
+		width: 100%;
+	}
+}
+.zhil {
+	font-size: 28rpx !important;
+	padding: 15rpx 15rpx;
+}
+
+.add-img-box {
+	width: 100%;
+	flex-direction: row;
+	flex-wrap: wrap;
+	margin-top: 30rpx;
+}
+.add-img-item {
+	width: 190rpx;
+	height: 190rpx;
+	border-radius: 24rpx;
+	position: relative;
+	margin-right: 20rpx;
+	margin-bottom: 25rpx;
+	.add-img {
+		width: 100%;
+		height: 100%;
+		border-radius: 24rpx;
+	}
+}
+.add-img-del {
+	position: absolute;
+	width: 40rpx;
+	height: 40rpx;
+	left: 155rpx;
+	bottom: 155rpx;
+	//background-color: rgba(238, 0, 0, 1);
+	border-radius: 20rpx;
+}
+</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>

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


+ 295 - 0
pages/order/orderRefund.vue

@@ -0,0 +1,295 @@
+<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: 30rpx;
+		background: #fff;
+		margin-top: 16rpx;
+		margin: 0 $page-row-spacing;
+		border-radius: 20rpx;
+		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-left: 30rpx;
+				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>

+ 233 - 0
pages/order/shopList.vue

@@ -0,0 +1,233 @@
+<template>
+	<view class="content b-t">
+		<view class="list" v-for="(item, index) in addressList" :key="index" @click="checkAddress(item)">
+			<view class="wrapper flex ">
+				<image class="logo margin-r-20" :src="item.image" mode="scaleToFill"></image>
+				<view class="list-content position-relative">
+					<view class="address-box flex">
+						<view class="name clamp">{{ item.name }}</view>
+						<view class="range flex" v-if="item.distance<1000">
+							<text>
+							距离{{ item.distance }}M
+							</text>
+							</view>
+						<view class="range flex" v-else>
+							<image class="address-icon" src="../../static/icon/shopAddress.png" mode="scaleToFill"></image>
+							<text>
+								
+							距离{{ item.range }}KM
+							</text>
+							</view>
+					</view>
+					<view class="u-box">
+						<view class="text flex-start">
+							<image class="icon" src="../../static/icon/shopIcon2.png" mode="widthFix"></image>
+							<text>
+								{{ item.phone }}
+							</text>
+						</view>
+						<view class="text flex-start">
+							<image class="icon" src="../../static/icon/shopIcon1.png" mode="widthFix"></image>
+							<text>
+								{{ item.address + item.detailed_address }}
+							</text>
+						</view>
+					</view>
+					<view class="time">
+						营业时间:{{item.day_time}}
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		storeList
+	} from '@/api/order.js';
+	import util from '@/utils/util.js';
+	export default {
+		data() {
+			return {
+				addressList: [], //显示的地址数据
+				value: '', //保存查询值
+				addressListAll: [], //保存地址数据
+				longitude: '', //经度
+				latitude: '', //未读
+				time:'',//保存定时获取对象
+				type:1//1为创建订单进入2为首页进入
+			};
+		},
+		// #ifdef APP-PLUS || H5
+		onNavigationBarButtonTap(e) {
+			if (e.text === '搜索') {
+				this.searchAddressList();
+			}
+		},
+		// 监听原生标题栏搜索输入框输入内容变化事件
+		onNavigationBarSearchInputChanged(e) {
+			this.value = e.text;
+		},
+		// 监听原生标题栏搜索输入框搜索事件,用户点击软键盘上的“搜索”按钮时触发
+		onNavigationBarSearchInputConfirmed() {
+			this.searchAddressList();
+		},
+		// #endif
+		onLoad(option) {
+			const that = this;
+			that.longitude = uni.getStorageSync('CACHE_LONGITUDE');
+			that.latitude = uni.getStorageSync('CACHE_LATITUDE');
+			that.type = option.type;
+			if (!that.longitude) {
+				uni.showModal({
+					title: '获取定位',
+					content: '为了更好的提供最近的门店需要获取您的定位信息',
+					cancelText: '暂不授权',
+					confirmText: '立即授权',
+					success: res => {
+						if (res.cancel) {
+							that.getStoreList();
+						}
+						if (res.confirm) {
+							util.$L.getLocation();
+							that.time = setInterval(()=>{
+								console.log(uni.getStorageSync('CACHE_LONGITUDE'),'获取到金纬度');
+								
+								if(uni.getStorageSync('CACHE_LONGITUDE')){
+									that.longitude = uni.getStorageSync('CACHE_LONGITUDE');
+									that.latitude = uni.getStorageSync('CACHE_LATITUDE');
+									that.getStoreList();
+									clearInterval(that.time)
+								}
+							},1000)
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+			} else {
+				// 获取当前位置
+				that.getStoreList();
+			}
+		},
+		methods: {
+
+			// 获取列表
+			getStoreList() {
+				storeList({
+					longitude:this.longitude,
+					latitude:this.latitude,
+				}).then((res) => {
+					this.addressListAll = this.addressList = res.data.list;
+				})
+			},
+			// 地址查询功能
+			searchAddressList() {
+				let obj = this;
+				obj.addressList = obj.addressListAll.filter(e => {
+					// 判断客户是否有输入值并且能查询到
+					if (e.name.indexOf(obj.value) >= 0 && obj.value) {
+						return true;
+					} else if (obj.value.length == 0) {
+						return true;
+					}
+				});
+				console.log(obj.addressList);
+			},
+			//选择地址
+			checkAddress(item) {
+				if (this.type==1) {
+					// 设置商品页面地址
+					this.$api.prePage().shopAddress = item;
+					uni.navigateBack();
+					return
+				} 
+				if(this.type==2){
+					uni.openLocation({
+						longitude:+item.longitude,
+						latitude:+item.latitude,
+						fail(res){
+							console.log(res,'定位获取失败');
+						}
+					})
+					return
+				}
+				
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.content {
+		position: relative;
+		padding-top: 30rpx;
+	}
+
+	.list {
+		align-items: center;
+		padding: 20rpx 30rpx;
+		background: #fff;
+		margin: 0 $page-row-spacing;
+		margin-bottom: $page-row-spacing;
+		border-radius: 20rpx;
+
+		.wrapper {
+			.logo {
+				width: 180rpx;
+				height: 180rpx;
+				border-radius: 10rpx;
+			}
+
+			.list-content {
+				align-self: stretch;
+				display: flex;
+				flex-direction: column;
+				flex: 1;
+
+				.address-box {
+					.range {
+						font-size: $font-sm - 2rpx;
+						color: $font-color-disabled;
+						flex-shrink: 0;
+						.address-icon{
+							width: 28rpx;
+							height: 28rpx;
+						}
+					}
+
+					.name {
+						font-size: $font-lg;
+						font-weight: bold;
+						flex-grow: 1;
+					}
+				}
+
+				.u-box {
+					font-size: $font-sm;
+					color: $font-color-light;
+					margin-top: 16rpx;
+
+					.text {
+						.icon {
+							width: 28rpx;
+							margin-right: 10rpx;
+						}
+					}
+				}
+
+				.time {
+					position: absolute;
+					background: rgba(60, 130, 230, 0.12);
+					border-radius: 20rpx;
+					font-size: $font-sm - 4rpx;
+					color: $base-color;
+					bottom: 0;
+					left: 0;
+					padding: 0 20rpx;
+				}
+			}
+		}
+	}
+</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>

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

@@ -0,0 +1,132 @@
+<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 flex" >
+			<button type="primary" v-if="goodsObjact.is_barrel==0" class=" action-btn add-cart-btn" @click="buy(2)">加入购物车</button>
+			<button type="primary" class=" action-btn  buy-now-btn" @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);
+		},
+	}
+};
+</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 ;
+	}
+	.action-btn-group {
+		height: 76rpx;
+		padding-right:30rpx;
+		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 {
+			width: 250rpx;
+			height: 100%;
+			font-size: $font-base;
+			border-radius: 100px;
+			flex-grow: 1;
+			margin-left: 30rpx;
+			&.buy-now-btn {
+				background: linear-gradient(90deg, #3C82E6, #5395F5);
+				color: #FFFFFF;
+			}
+			&.add-cart-btn {
+				background: transparent;
+				color: #5395F5;
+				border: 1px solid  #5395F5;
+			}
+		}
+	}
+}
+.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: $color-red;
+		}
+
+		.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>

+ 648 - 0
pages/product/product.vue

@@ -0,0 +1,648 @@
+<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>
+				</view>
+				<view v-if="many==2" 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 v-if="many==1" class="attr-list">
+					<text>规格</text>
+					<view class="item-list flex">
+						<text class="tit selected">
+							默认
+						</text>
+					</view>
+				</view>
+				<view class="attr-list">
+					<text>购买数量</text>
+					<view class="item-list">
+						<uni-number-box class="step" :isMin="true" v-model="goodsNumber"
+							:max="actionGoodsType.goodsNumberMax"></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: '', //猜你喜欢列表
+				userInfo: '',
+				// 选中商品的分类
+				actionGoodsType: {
+					goodsNumberMax: 0, //最大可购买数量
+					goodsStore: 0, //选中库存
+					actionImage: '', //默认选中图片
+					actionPrice: 0, //默认选中商品价格
+					day_deducted: 0, //选中商品的服务费用
+					deal_price_num: 0, //选中商品的扣款天数
+					uniqueId: '', //选中规格商品id
+				},
+				system_store: {}, //商家信息
+			};
+		},
+		async onLoad(options) {
+			let obj = this;
+			obj.userInfo = uni.getStorageSync('userInfo');
+			//保存商品id
+			this.goodsid = options.id;
+			this.goodsType = options.type;
+
+			// 判断有无人邀请
+			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.type = type;
+				obj.specClass = 'show';
+			},
+			//规格弹窗开关
+			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;
+				// 获取普通商品信息
+				goodsDetail({}, this.goodsid).then(function({
+					data
+				}) {
+					obj.list = data;
+					//保存猜你喜欢列表
+					obj.good_list = data.good_list;
+					//保存评论列表
+					obj.reply = data.reply;
+					let goods = data.storeInfo;
+					obj.goodsObjact = goods;
+					//保存商家信息
+					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 (obj.specList.length > 0) {
+
+						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(',');
+						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.actionGoodsType.actionPrice = goods.price; //保存默认选中商品价格
+						obj.actionGoodsType.actionImage = goods.image_base; //保存默认选中商品图片
+						obj.actionGoodsType.goodsNumberMax = goods.stock; //保存默认选中最大可购买商品数量
+						obj.actionGoodsType.goodsStore = goods.stock;
+					}
+				});
+			},
+			// 立即购买
+			buy() {
+				let obj = this;
+				// 创建传值对象
+				let data = {
+					cartNum: obj.goodsNumber, //商品数量
+					productId: obj.goodsid, //商品编号
+					uniqueId: obj.actionGoodsType.uniqueId,
+				};
+				// 判断是否需要读取非默认商家id
+				// 判断是否加入购物车
+				if (obj.type == 2) {
+					data.new = 0;
+				} else {
+					data.new = 1;
+				}
+				uni.showLoading({
+					title: '请求中',
+					mask: true
+				});
+				cartAdd(data)
+					.then(function(e) {
+						uni.hideLoading()
+						let da = e.data;
+						// 不是购物车跳转支付页面
+						if (obj.type == 1) {
+							// 跳转到支付页
+							let url = '/pages/order/createOrder?id=' + da.cartId
+							uni.navigateTo({
+								url: url,
+								fail(res) {
+									console.log(res, '错误')
+								}
+							});
+						}
+						// 购物车不跳转购物车页面
+						if (obj.type == 2) {
+							uni.showToast({
+								title: '成功加入购物车',
+								type: 'top',
+								duration: 2000,
+								icon: 'none'
+							});
+						}
+						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: 76rpx;
+				line-height: 66rpx;
+				border-radius: 100rpx;
+				background: linear-gradient(90deg, #3C82E6, #5395F5);
+				font-size: $font-base + 2rpx;
+				color: #FFF;
+				margin: 30rpx auto 20rpx;
+			}
+		}
+
+		@keyframes showPopup {
+			0% {
+				opacity: 0;
+			}
+
+			100% {
+				opacity: 1;
+			}
+		}
+
+		@keyframes hidePopup {
+			0% {
+				opacity: 1;
+			}
+
+			100% {
+				opacity: 0;
+			}
+		}
+
+		@keyframes showLayer {
+			0% {
+				transform: translateY(120%);
+			}
+
+			100% {
+				transform: translateY(0%);
+			}
+		}
+
+		@keyframes hideLayer {
+			0% {
+				transform: translateY(0);
+			}
+
+			100% {
+				transform: translateY(120%);
+			}
+		}
+	}
+
+	/* 规格选择弹窗 */
+	.attr-content {
+		padding: 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: $color-red;
+					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>

+ 57 - 0
pages/public/agreement.vue

@@ -0,0 +1,57 @@
+<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="next-text">用户协议</text>
+		</navigator>
+		<text>与</text>
+		<navigator url="./privacyAgreement">
+			<text class="next-text">隐私条例</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: 24rpx;
+		color: $font-color-light;
+
+		.buttomIcon,
+		.buttomNo {
+			width: 40rpx;
+			height: 40rpx;
+		}
+		.next-text{
+			color: $uni-color-primary;
+		}
+		.buttomNo {
+			border: 1px solid $font-color-light;
+			border-radius: 100rpx;
+		}
+	}
+</style>

+ 130 - 0
pages/public/artDetail.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="center">
+		<view class="title clamp">{{ item.title }}</view>
+		<view class="time">{{ item.add_time }}</view>
+		<view class="main" v-for="(ls, index) in item.content" :key="index">
+			<view v-if="ls.type == 'rich-text'" v-html="ls.value" class="main"></view>
+			<video v-if="ls.type == 'video' && ls.value" :src="ls.value" style="width:100%;height: 300px" frameborder="0"></video>
+		</view>
+	</view>
+</template>
+
+<script>
+import { details } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			id: '',
+			item: ''
+		};
+	},
+	onLoad(option) {
+		this.id = option.id;
+		this.loadData();
+	},
+	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: '水箱计算', // 默认是小程序的名称(可以写slogan等)
+			path: url + '?id=' + item.id, // 默认是当前页面,必须是以‘/’开头的完整路径
+			imageUrl: '',
+			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: {
+		loadData() {
+			details({}, this.id).then(({ data }) => {
+				console.log(data);
+				data.content = data.content.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img').replace(/<div/g, '<div style="max-width: 50% !important;"');
+				data.content = this.getVideo(data.content);
+				this.item = data;
+			});
+		},
+		// 富文本视频解析
+		getVideo(data) {
+			let videoList = [];
+			let videoReg = /<video.*?(?:>|\/>)/gi; //匹配到字符串中的 video 标签
+			let srcReg = /src=[\'\"]?([^\'\"]*)[\'\"]?/i; //匹配到字符串中的 video 标签 的路径
+			let arr = data.match(videoReg) || []; // arr 为包含所有video标签的数组
+			let articleList = data.split('</video>'); // 把字符串  从视频标签分成数组
+			arr.forEach((item, index) => {
+				var src = item.match(srcReg);
+				videoList.push(src[1]); //所要显示的字符串中 所有的video 标签 的路径
+			});
+			let needArticleList = [];
+			articleList.forEach((item, index) => {
+				if (item != '' && item != undefined) {
+					//  常见的标签渲染
+					needArticleList.push({
+						type: 'rich-text',
+						value: item + '</video>'
+					});
+				}
+				let articleListLength = articleList.length; // 插入到原有video 标签位置
+				if (index < articleListLength && videoList[index] != undefined) {
+					needArticleList.push({
+						type: 'video',
+						value: videoList[index]
+					});
+				}
+			});
+			return needArticleList;
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+	page {
+		background-color: #fff;
+		min-height: 100%;
+		height: auto;
+	}
+.center {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+	padding: 30rpx 24rpx 0;
+}
+.title {
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+	color: #333333;
+}
+.time {
+	font-size: 24rpx;
+	font-family: PingFangSC;
+	font-weight: 500;
+	color: #999999;
+	margin-top: 40rpx;
+}
+.main {
+	margin-top: 60rpx;
+}
+/deep/ .main {
+	.rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+	* {
+		max-width: 100% !important;
+	}
+}
+</style>

+ 164 - 0
pages/public/artList.vue

@@ -0,0 +1,164 @@
+<template>
+	<view class="content">
+		<view class="main">
+			<view v-for="(item, index) in list">
+				<view class="first" v-if="index == 0" @click="navToList(item.id)">
+					<view class="title">{{item.title}}</view>
+					<view class="image"><image :src="item.image_input[0]" mode=""></image></view>
+					<view class="time">{{item.add_time}}</view>
+				</view>
+				<view class="item flex" @click="navToList(item.id)" v-else>
+					<view class="item-left"><image :src="item.image_input[0]" mode=""></image></view>
+					<view class="item-right">
+						<view class="item-font clamp">{{item.title}}</view>
+						<view class="item-time">{{item.add_time}}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="loadingType"></uni-load-more>
+	</view>
+</template>
+
+<script>
+import { article } from '@/api/user.js';
+export default {
+	data() {
+		return {
+			list: [],
+			page: 1.,
+			limit: 10,
+			loadingType: 'more'
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	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: '水箱计算', // 默认是小程序的名称(可以写slogan等)
+			path: url, // 默认是当前页面,必须是以‘/’开头的完整路径
+			imageUrl: '',
+			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: {
+		// 载入数据
+		async loadData() {
+			let obj = this;
+			if(obj.loadingType == 'noMore' || obj.loadingType == 'loading' ) {
+				return
+			}
+			obj.loadingType = 'loading'
+			article({page:obj.page,limit:obj.limit},1).then(({data}) =>{
+				obj.list = obj.list.concat(data)
+				obj.page++
+				if(data.length == obj.limit) {
+					obj.loadingType = 'more'
+				}else {
+					obj.loadingType = 'noMore'
+				}
+			})
+		},
+		navToList(id) {
+			uni.navigateTo({
+				url: '/pages/index/artDetail?id=' + id
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	height: auto;
+	min-height: 100%;
+	background: #f5f5f5;
+}
+.main {
+	// margin-top: 20rpx;
+	background: #ffffff;
+	.first {
+		padding: 50rpx 0 18rpx;
+		margin: 0 22rpx;
+		border-bottom: 1px solid #e0e0e0;
+		.title {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #333333;
+		}
+		.image {
+			width: 710rpx;
+			height: 400rpx;
+			background: #eee;
+			margin-top: 20rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.time {
+			margin-top: 20rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+	}
+	.item {
+		padding: 26rpx 0 18rpx;
+		margin: 0 22rpx;
+		justify-content: flex-start;
+		align-items: flex-start;
+		border-bottom: 1px solid #e0e0e0;
+		.item-left {
+			width: 224rpx;
+			height: 160rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.item-right {
+			width: 458rpx;
+			height: 160rpx;
+			margin-left: 24rpx;
+			padding: 18rpx 0;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			.item-font {
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+			.item-time {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+}
+</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/image/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/image/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>

+ 306 - 0
pages/public/forget.vue

@@ -0,0 +1,306 @@
+<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 == '') {
+					obj.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length != 11) {
+					obj.$api.msg('请输入正确的手机号');
+					return;
+				}
+				if (obj.password == '') {
+					obj.$api.msg('请输入密码');
+					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 == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: ''
+						})
+						.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: $base-color;
+					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:  $base-color;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba( $base-color, 0.3);
+		}
+
+		.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>

+ 333 - 0
pages/public/login.vue

@@ -0,0 +1,333 @@
+<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: '',
+				successUrl:'/pages/home/index'
+			};
+		},
+		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') || this.successUrl;
+				// 用于处理缓存bug
+				if (ur == 'pages/product/product') {
+					ur = this.successUrl
+				}
+				
+				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:this.successUrl,
+									});
+								}
+							});
+						}
+					});
+				}
+			},
+			//登录
+			async toLogin() {
+				let obj = this;
+				
+				if (obj.username == '') {
+					obj.$api.msg('请输入手机号');
+					return;
+				}
+				if (obj.passward == '') {
+					obj.$api.msg('请输入密码');
+					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') || obj.successUrl;
+							//成功跳转首页
+							uni.reLaunch({
+								url: ur,
+								fail(e) {
+									uni.switchTab({
+										url: obj.successUrl,
+									});
+								}
+							})
+						});
+					})
+					.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;
+			// border: 1px solid $border-color-light;
+		}
+	}
+
+	.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: $base-color;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba( $base-color, 0.3);
+		}
+
+		.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: $font-color-dark;
+		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>

+ 261 - 0
pages/public/loginMethods.vue

@@ -0,0 +1,261 @@
+<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
+				successUrl:'/pages/home/index'
+			};
+		},
+		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: obj.successUrl
+												});
+											});
+			
+										})
+										.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: this.successUrl
+										// });
+									}
+								});
+							}
+						});
+					},
+					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>

+ 336 - 0
pages/public/phoneLogin.vue

@@ -0,0 +1,336 @@
+<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 == '') {
+					obj.$api.msg('请输入电话号码');
+					return;
+				}
+				if (obj.phone.length!=11) {
+					obj.$api.msg('请输入正确的手机号');
+					return;
+				}
+				if (obj.code == '') {
+					obj.$api.msg('请输入验证码');
+					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/home/index'
+						});
+					});
+				}).catch((e) => {
+					console.log(e);
+				});
+			},
+			//发送验证码
+			verification() {
+				let obj = this;
+				if (this.phone == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: '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: $base-color;
+					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: $base-color;
+			margin: 40rpx 10rpx;
+			border-radius: 50rpx;
+			box-shadow: 0px 8px 10px 0px rgba($base-color, 0.3);
+		}
+
+		.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: $font-color-dark;
+		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">
+			为小井康泉提供相应服务之必须,您以自愿填写的方式提供注册所需的姓名、性别、电话以及其他类似的个人信息,则表示您已经了解并接受您个人信息的用途,同意小井康泉为实现该特定目的使用您的个人信息。除此个人信息之外,其他任何您发送或提供给小井康泉的材料、信息或文本(以下统称信息)均将被视为非保密和非专有的。<strong>小井康泉</strong>对这些信息不承担任何义务。同时如果您提交时没有特别声明的,可视为同意小井康泉及其授权人可以因商业或非商业的目的复制、透露、分发、合并和以其他方式利用这些信息和所有数据、图像、声音、文本及其他内容。您可阅读下面的隐私规则以了解更加详细的内容。
+		</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>

+ 158 - 0
pages/public/redirect.vue

@@ -0,0 +1,158 @@
+<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
+	export default {
+		computed: {
+			...mapState(['urlFile'])
+		},
+		onLoad(option) {
+			let obj = this;
+			// 判断是否需要保存定向地址
+			// #ifdef H5
+			this.loadH5()
+			// #endif
+			// #ifdef MP-WEIXIN
+			this.loadMp(option)
+			// #endif
+		},
+		data() {
+			return {
+				successUrl:'/pages/home/index'
+			};
+		},
+		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+obj.successUrl);
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			},
+			// #endif
+			// #ifdef MP-WEIXIN
+			loadMp(option) {
+				let obj = this;
+				// 获取登录授权页数据
+				let user = obj.$api.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') || obj.successUrl;
+					// 用于处理缓存bug
+					if (ur == 'pages/product/product') {
+						ur = obj.successUrl
+					}
+
+					// 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: obj.successUrl,
+										});
+									}
+								});
+							}
+						});
+					// }
+				}).catch((e) => {
+					uni.showModal({
+						title: '错误',
+						content: JSON.stringify(e),
+						showCancel: false,
+					});
+				});;
+			}
+		}
+	};
+</script>
+<style></style>

+ 345 - 0
pages/public/register.vue

@@ -0,0 +1,345 @@
+<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 == '') {
+					obj.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length != 11) {
+					obj.$api.msg('请输入正确的手机号');
+					return;
+				}
+				if (obj.password == '') {
+					obj.$api.msg('请输入密码');
+					return;
+				}
+				if (obj.repassword == '') {
+					obj.$api.msg('请再次输入密码');
+					return;
+				}
+				if (obj.repassword != obj.password) {
+					obj.$api.msg('两次密码不正确');
+					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 == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.phone.length < 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.phone,
+							type: 'register'
+						})
+						.then(({
+							data
+						}) => {})
+						.catch(err => {
+							console.log(err);
+						});
+				}
+			},
+			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>

+ 457 - 0
pages/public/userAgreement.vue

@@ -0,0 +1,457 @@
+<template>
+	<view class="container">
+		<view class="title-name">小井康泉服务协议</view>
+		<view class="title right">更新日期: 2022年04月28日</view>
+		<view class="indent">
+			欢迎您使用“小井康泉"小程序,在您使用“小井康泉"小程序前,您须仔细阅读、理解《小井康泉服务协议》(以下简称"本协议")内容。一经您选择接受该协议或使用“小井康泉 "小程序,即视为您已经阅读、理解协议内容,并同意与小井康泉就您使用小井康泉向您提供的“小井康泉”小程序服务缔结合约。您在使用小井康泉过程中,应严格遵守本协议相应约定。如您没有阅读、理解并接受本协议所有条款,请您不要继续使用小井康泉提供的服务,您使用"小井康泉"小程序提供的服务,即视为您已阅读、理解并同意本协议的约束。</br>
+			
+		如果您未满14周岁,请在法定监护人的陪同下阅读本协议。
+		</view>
+		<view class="title name">一、协议的订立</view>
+		<view class="title">
+			1.1本协议,指本协议正文、小井康泉的平台规则、其修订版本等所列明的所有规则性文件、通知或其他公示内容。上述内容一 经正式发布, 即为本协议不可分割的组成部分。如您不接受本协议的全部或部分条款,请您不要使用、登录“小井康泉",并立即予以注销或卸载。
+		</view>
+		<view class="title">
+			 1.2本协议各条的标题仅为方便阅读而设,不影响本协议的含义或解释。
+		</view>
+		<view class="title name">二、协议的生效与变更</view>
+		<view class="title">
+			 2.1小井康泉有权在必要时修改本协议条款并及时更新公示,经修订的协议将根据法律法规的规定提前在"小井康泉"小程序及相关渠道中予以公示,公示期满后自动生效。您可以在“小井康泉"小程序中随时查阅最新版本的协议条款。
+		</view>
+		<view class="title">
+			2.2本协议条款变更且生效后,如果您继续使用小井康泉提供的服务,即视为您已接受并愿意遵守修改后的协议。如果您不接受修改后的协议,应停止使用并卸载"小井康泉"小程序。
+		</view>
+		<view class="title name">三、定义和解释</view>
+		<view class="title">
+			 3.1小井康泉:指由小井康泉提供技术支持和服务,并负责运营的生活服务类手机微信小程序。随着小井康泉服务范围或服务项目的变更,小井康泉可能在平台规则或公告中对小井康泉的相关调整予以声明。
+		</view>
+		<view class="title">
+			  3.2平台规则:指在小井康泉上已经发布或将来可能发布的各种规范性文件,包括但不限于细则、规范、政策、通知、公告等规范性文件,所有规范性文件为协议不可分割的一部分,与协议正文具有同等法律效力。
+		</view>
+		<view class="title">
+			 3.3平台服务:指小井康泉依托小井康泉小程序向用户提供的网络空间、技术支持、相关的软件服务、系统维护,以及同意向用户提供的各项附属功能、增值服务等,具体服务内容及功能以“小井康泉"小程序显示功能为准。
+		</view>
+		<view class="title">
+			 3.4用户:指使用“小井康泉"小程序的自然人、法人或其他组织,本协议中又称“您"。用户首次注册成功即为新用户。
+		</view>
+		<view class="title">
+			 3.5商品:系指小井康泉通过软件或其他渠道,为用户提供的可供选购的商品(含服务)。
+		</view>
+		<view class="title">
+			  3.6账号:指用户所拥有的经小井康泉认可,可以登录“小井康泉"小程序的一一个合法获得并持有的服务账号。该账号形式可能是在小井康泉注册所获得的账号、手机号、电子邮箱等小井康泉支持的账号形式。该账户是您在使用小井康泉服务时的重要身份标识,您应当妥善保管。
+		</view>
+		<view class="title">
+			   3.7互联网支付服务:指具有互联网支付合法资质的第三方支付机构为用户完成交易、转移资金提供的支付服务,详情见该第三方支付机构通过用户与其所签订的约定其所提供支付服务的协议、公司网站、电子邮件或其他形式所公布的相关规则及说明。
+		</view>
+		<view class="title">
+			3.8关联公司:本协议所称一方的“关联公司”是指由一方直接控制或间接控制;或直接或间接控制一方;或与一方共同控制同一家公司或能对其施加重大影响;或与一方受同一家公司直接或间接控制的公司。包括但不限于一方的母公司、子公司;与-方受同一母公司控制的子公司; 一方的合营企业、联营企业等。“控制”是指直接或间接地拥有影响所提及公司管理的能力,无论是通过所有权、有投票权的股份、合同或其他被人民法院认定的方式。
+		</view>
+		<view class="title name">四、帐户注册和注销</view>
+		<view class="title">4.1账户注册</view>
+		<view class="title soujin">
+			4.1.1用户使用“小井康泉"小程序应具备完全民事行为能力,若用户不具备前述资格,用户的监护人应承担一切后果,且小井康泉有权注销或永久冻结该用户账号,“				小井康泉”有权就由此造成任何损失主张赔偿。
+		</view>
+		<view class="title soujin">
+			4.1.2用户使用“小井康泉”小程序,必须拥有经小井康泉认可的、可登录“小井康泉"小程序的、一个合法获得并持有的服务账号;用户对前述账号的申请、使用等行为应符合本协议及注册该账号时与相应的第三方账号服务提供者所签订的注册协议、服务协议以及其他有关规则。用户应自行确保上述账号及其密码的安全,并对利用上述账号及其密码所进行的一切行为负完全责任。
+		</view>
+		<view class="title soujin">
+		4.1.3用户标识或账户中设置和使用的昵称、头像等不得违反国家法律法规、公序良俗,否则壹佰米可注销您的账号。
+		</view>
+		<view class="title soujin">
+		 4.1.4原则.上您只能注册一个账号,严禁同- -用户注册多个账号,若有违反,“小井康泉”有权取消交易并停止向该用户提供服务,用户因此获取的利益须退还。虽有多个注册账号但经平台判断,存在相同注册电话号码、收货电话号码、支付账号、应用设备、2人次以上收货地址等情况的,将视为同一用户,平台将不会发放相关优惠福利等,如已发放,平台有权做无效处理。
+		</view>
+		<view class="title">4.2账户注销</view>
+		<view class="title soujin">
+		 4.2.1您可自行按照页面操作提示注销自有账户,提交账户注销申请前,请务必确认该账户无未完结订单及未消费资产等权益,否则,小井康泉将视为您对该权益做出放弃处分,账户内未消费余额、卡券等将做清零处理。
+		</view>
+		<view class="title soujin">
+		4.2.2账户注销后,小井康泉将删除您的个人信息或对其进行匿名化处理。
+		</view>
+		<view class="title soujin">
+		 4.2.3若您注销账户后使用相同手机号码再次注册,系统将不再判定您为新用户,故将无法享受相应新用户权益。
+		</view>
+		<view class="title">  4.3您理解并同意,若您的行为违反有关法律、本协议相关规定或滥用用户权利的,您的用户资格和账号可能被注销、暂时冻结或永久冻结;使小井康泉遭受任何损失、受到任何第三方的索赔、或任何行政管理部门的处罚的,用户应对小井康泉提供补偿,包括合理的维权费用。</view>
+		<view class="title">4.4您理解并同意,您下载小井康泉小程序不视为小井康泉.必须按照您的要求出售商品,诗词啊有权按照商品库存状况及本协议约定等因素评估是否接受您的购买要约。</view>
+		<view class="title">
+			 4.5您理解并同意,诗词啊有权基于运营情况设定或调整软件界面、功能等,如您在使用过程中需要操作指引,可通过客服服务获取帮助。
+		</view>
+		<view class="title">
+		 4.6您理解并同意,小井康泉有权基于您已有的消费评价、投诉等实际行为判断您是否不认可本协议约定内容、平台公示规则等展现的小井康泉的服务内容和方式,如确认属实,小井康泉有权选择提示您或终止对您提供服务。
+		</view>
+		<view class="title name">五、用户信息收集、使用和保护</view>
+		<view class="title">
+		  5.1用户在使用“小井康泉"小程序时需要根据要求披露- -些信息,包括但不限于您选择接受服务的社区地址、联系电话、收货地址等,及根据第三方支付机构的要求为享受互联网支付服务而需要提供的- -些必要信息,这些信息包括但不限于:真实姓名或名称、联系地址、邮箱和联系电话等。您应保证这些信息在提供时是真实、准确、有效且完整的,且应及时根据实际情况或者小井康泉的要求更新这些信息。由于信息披露不完整、不真实.或者信息更新不及时导致您在享受平台服务时受到限制或损失的,应由您独立承担责任。除了必要信息外,您也有权自行决定披露一些其他信息。
+		</view>
+		<view class="title">
+		 5.2您授权“小井康泉"小程序收集您的用户信息,这些信息可能包括注册信息或企业主体资质信息、产品信息和交易信息以及您的地理位置等,“小井康泉"小虎层序对用户信息的收集将遵循相关法律的规定。您同时授权“小井康泉”小程序和小井康泉全国通用(在法律许可范围内)的、免费的许可使用权利(并有权对该权利再授权), 使“小井康泉”小程序和小井康泉有权(全部或部分地)使用、复制、修订、改写、发布、翻译、发布、执行和展示您所公示于小井康泉的各类信息(不包括您的个人身份信息)或制作其派生作品,和/或以现在已知或日后开发的任何形式、媒体或技术,将上述您所公示的各类信息纳入其他作品内。
+		</view>
+		<view class="title">
+		5.3小井康泉将采取适当措施,根据相关法律的要求,对用户信息提供充分的信息安全保障。用户应妥善保管、使用其用户信息,包括账号号码及其验证码、与交易有关的支付账号及密码、联系方式、地址等信息,因上述信息泄露而导致您的任何损失,包括使用小井康泉的任何第三方应用软件造成信息泄露而导致您的任何损失,由您独立承担责任。如您泄露上述任何信息,您还应及时将泄露的情况以有效方式立即通知小井康泉,以便小井康泉在合理时间内采取措施防止损失继续扩大,但小井康泉对采取措施前已经产生的后果不承担任何责任。
+		</view>
+		<view class="title">
+		 5.4小井康泉不对外公开或向任何第三方提供您的个人信息,但存在下列情形之一的除外:
+		</view>
+		<view class="title soujin">
+		5.4.1公开或提供相关信息之前获得您许可的;
+		</view>
+		<view class="title soujin">
+		5.4.2根据法律或政策的规定而公开或提供的;
+		</view>
+		<view class="title soujin">
+		  5.4.3只有公开或提供您的个人信息,才能提供您所需的商品的;
+		</view>
+		<view class="title soujin">
+		  5.4.4只有公开或提供您的个人信息,才能提供您需要的小井康泉服务的;
+		</view>
+		<view class="title soujin">
+		  5.4.5根据国家权力机关要求公开或提供的;
+		</view>
+		<view class="title soujin">
+		  5. 4.6根据本协议其他条款约定而公开或提供的。
+		</view>
+		<view class="title">
+		  5.5为了向您提供更优质的小井康泉服务,提升购物体验,您同意小井康泉可将您的个人信息提供给小井康泉的关联公司。
+		</view>
+		<view class="title">
+		  5.6您理解并认同,在平台方发生并购等情况时,平台方可能会向第三方出售或转让小井康泉。在该等交易中,作为小井康泉不可分割的一部分,您的用户信息也可能将被转让给该第三方,以使该第三方可以继续为您提供服务。
+		</view>
+		<view class="title">
+		 5.7关于小井康泉收集、使用、共享您个人信息的详细情况,您可以查看《小井康泉隐私权政策》。
+		</view>
+		<view class="title name">十、用户行为规范</view>
+		<view class="title">
+		6.1遵守法律法规、社会公德及本协议
+		</view>
+		<view class="title soujin">
+		 您在使用“小井康泉”服务中的所有行为应遵守国家法律、法规、规章、规范性文件等规定(如卖家从海外进口商品的,其还应遵守国家海关、检验检疫、外汇管理等进出口相关法律规定)及本协议的规定和要求,不违背社会公德,不损害国家或者任何第三人的任何合法权益。否则,产生的一切法律后果均由您独立承担,并应确保小井康泉免于承担任何责任。
+		</view>
+		<view class="title">
+		6.2您应避免因使用小井康泉服务而使小井康泉卷入政治和公共事件,否则小井康泉有权暂停或终止对您的服务。
+		</view>
+		<view class="title">
+		6.3遵守规则及相应流程要求
+		</view>
+		<view class="title soujin">
+		 您使用“小井康泉"小程序的所有行为应遵守小井康泉所实时公布的平台规则;如您需要开通、申请或使用"小井康泉”小程序所公示提供的不同服务或为取得该种服务的相应资格(具体以公示的规则为准), 您应依据"小井康泉"小程序所公示的相应具体规则及流程要求完成相应资格的认证与申请,提供开通相应服务所必须的相应资料和信息并保证该等信息的真实和准确;您应与壹佰米签订协议(如需要),并严格履行该等协议;您使用该等服务的具体内容以相应协议约定及平台规则规定为准。
+		</view>
+		<view class="title">
+		6.4您在使用“小井康泉"小程序的所有行为应遵守诚信原则,不得实施以下任一行为:
+		</view>
+		<view class="title soujin">
+		6.4.2通过发送病毒、木马等行为攻击其他用户的账号或机器;
+		</view>
+		<view class="title soujin">
+		 6.4.1发送钓鱼链接给其他用户;
+		</view>
+		<view class="title soujin">
+		  6.4.3冒充"小井康泉”工作人员欺骗其他用户;
+		</view>
+		<view class="title soujin">
+		 6.4. 5违反银行卡管理规则实施套现;
+		</view>
+		<view class="title soujin">
+		6.4.6通过留言、评价等手段发送违规或垃圾信息或有诋毁"小井康泉”之行为;
+		</view>
+		<view class="title soujin">
+		6.4.7谋取、协助谋取不正当利益;
+		</view>
+		<view class="title soujin">
+		6.4.8恶意刷券行为;
+		</view>
+		<view class="title soujin">
+		6.4.9平台规则规定的其他不当行为;
+		</view>
+		<view class="title soujin">
+		 6.4.10其他有损平台正常运行或有损壹佰米权益的行为。
+		</view>
+		<view class="title">
+		 6.5禁止不当评价
+		</view>
+		<view class="title soujin">
+		 您不得以虚构或歪曲事实的方式不当评价其他用户,不得以不正当手段,包括虚假交易、互换好评等手段提高或降低自身或其他用户信用度。
+		</view>
+		<view class="title soujin">
+		您不得发布国家法律法规、本协议及其平台规则所禁止发布的商品信息,也不得发布任何涉嫌侵犯他人知识产权等合法权益的商品信息。
+		</view>
+		<view class="title">
+		 6.7您不得以任何方式危害“小井康泉”的正常交易,包括不得实施如下任一行为:
+		</view>
+		<view class="title soujin">
+		 6.7.1 以任何机器人软件、蜘蛛软件、爬虫软件、刷屏软件等非小井康泉认可的方式访问或登录"小井康泉"小程序;
+		</view>
+		<view class="title soujin">
+		6.7.2通过任何方式对“小井康泉小程序造成或可能造成不合理或不合比例的重大负荷;
+		</view>
+		<view class="title soujin">
+		 6.7.3通过任何方式干扰或试图干扰“小井康泉"小程序的正常运行。
+		</view>
+		<view class="title">
+		6.7您不得以任何方式危害“小井康泉”的正常交易,包括不得实施如下任一行为:
+		</view>
+		<view class="title">
+		  6.8同意接收广告、营销信息
+		</view>
+		<view class="title soujin">
+		 您同意接收来自小井康泉的信息,包括但不限于营销活动信息、商品交易信息、促销信息等。为使您及时了解丰富的商品信息,提升服务体验,小井康泉或其合作的第三方可以在法律法规允许的范围内,通过短信、电话、邮件等各种方式向您提供前述信息。
+		</view>
+		<view class="title soujin">
+		6.8.1您应自行承担因交易产生的相关费用,并依法纳税。您应自行配备上网的所需设备,包括个人手机、调制解调器或其他必备上网装置,并自行负担个人上网所支付的与此服务有关的电话费用、网络费用。
+		</view>
+		<view class="title soujin">
+		6.8.2小井康泉的服务大部分是免费提供的,但可能会有部分服务是以收费方式提供的,如您使用收费服务,请遵守小井康泉服务相关的规则。小井康泉可能根据实际需要对收费服务的收费标准、方式进行修改,小井康泉也可能会对部分免费服务开始收费。前述修改或开始收费前,小井康泉将在相应服务页面进行通知或公告。如果您不同意上述修改或收费内容,则应立即停止使用该服务。
+		</view>
+		<view class="title">
+		6.9享受小井康泉服务
+		</view>
+		<view class="title soujin">
+		  您享受小井康泉服务时,应遵守法律法规及本协议约定,该服务内容可能包括在小井康泉上发布、浏览、查询商品信息,进行商品交易,发表评价等,具体以“小井康泉”提供的为准。
+		</view>
+		<view class="title">
+		6.10您有责任自行备份存储在使用小井康泉服务中产生的数据和信息。
+		</view>
+		<view class="title name">十一、小井康泉的权利和义务</view>
+		<view class="title">
+		7.1小井康泉有义务在现有技术水平条件下,努力使整个小井康泉正常运行,尽力避免小井康泉服务中断或将中断时间限制在最短时间内,以保证用户正常使用服务。
+		</view>
+		<view class="title">
+		7.2用户已充分知悉和理解,因网上交易平台的特殊性,小井康泉没有义务对所有用户使用小井康泉服务的过程及行为进行事前及实时审查。但用户发生以下情形之一的,小井康泉可以普通、非专业人员的知识水平标准或根据自己掌握的信息进行独立判断,小井康泉有权采取包括但不限于限制用户登录、要求用户提供有关资料、发出警告通知、删除相关信息、中止或终止向用户提供小井康泉服务、以网络公告等形式公布用户违法违约行为或依据平台规则对于违约用户进行的其他违规处理:
+		</view>
+		<view class="title soujin">
+		7.2.1 用户违反国家法律、法规、规章及规范性文件的;
+		</view>
+		<view class="title soujin">
+		  7.2.2用户违反本协议或任何平台规则的;
+		</view>
+		<view class="title soujin">
+		7.2.3用户侵犯第三方合法权益的;
+		</view>
+		<view class="title soujin">
+		7.2. 4恶意获取用户福利的。
+		</view>
+		<view class="title">
+		7.3用户不得发布下列任何信息,否则,小井康泉可在不通知用户的情况下对其采取删除、屏蔽、断开链接或依据平台规则对于违约用户进行其他的违规处理:
+		</view>
+		<view class="title soujin">
+		7.3.1恶意欺诈信息;
+		</view>
+		<view class="title soujin">
+		 7.3.2与商品交易无关的信息;
+		</view>
+		<view class="title soujin">
+		7.3.3不以商品交易为目的的信息;
+		</view>
+		<view class="title soujin">
+		7.3.4存在恶意评价信息;
+		</view>
+		<view class="title soujin">
+		7.3.5试图或已经扰乱正常交易秩序的信息;
+		</view>
+		<view class="title soujin">
+		7.3.6违反国家法律、危害国家安全统一、社会稳定、公序良俗,侮辱、诽谤、淫秽、暴力的,以及任何违反国家法律法规的信息;
+		</view>
+		<view class="title soujin">
+		7.3.7侵害他人知识产权、商业秘密等合法权益的信息;
+		</view>
+		<view class="title">
+		 7.3.8虚构事实、误导、欺骗他人的信息;
+		</view>
+		<view class="title">
+		7.3.9发布、传送、传播广告信息及垃圾信息。
+		</view>
+		<view class="title">
+		 7.4用户知悉并同意,当国家行政、司法机关主动依职权或者根据他人的投诉调查用户在小井康泉上的相关行为时,小井康泉有权予以配合,并将所掌握的信息提供给上述国家机关。
+		</view>
+		<view class="title">
+		7.5用户知悉并同意,用户不得利用小井康泉服务实施侵犯他人知识产权及其他合法权益的行为,如小井康泉接到第三方投诉称用户侵权的,为防止侵权行为的继续扩大和及时解决纠纷,小井康泉除依本协议规定采取措施外,小井康泉还可以将用户的相关信息提供给投诉人。
+		</view>
+		<view class="title">
+		7.6对违反法律法规或本协议条款及其他严重影响平台运营效率和秩序的行为,小井康泉有权随时终止对该用户提供服务,同时小井康泉有权对新账户注册申请进行评估,如确认为同一用户的,有权对该账户注册申请不予通过。
+		</view>
+		<view class="title name">八、特别授权</view>
+		<view class="title">
+		   8.1您完全理解并不可撤销地授权小井康泉或小井康泉授权的第三方(如有),根据本协议及平台规则的规定,处理您在小井康泉上发生的所有交易及交易纠纷。您同意小井康泉或小井康泉菜授权的第三方(如有)对您在小井康泉上的行为的判断和相应处理决定对您具有约束力。
+		</view>
+		<view class="title">
+		   8.2小井康泉有权以任何方式通知第三方支付机构及小井康泉的任何关联公司,针对您违反本协议或平台规则的行为,对您的权益采取限制措施或给予相应违规处理,包括但不限于通知第三方支付机构将您支付账号中的款项支付给小井康泉指定的用户或第三方,要求第三方支付机构和小井康泉的关联公司中止、终止对您提供服务,并对您提供小井康泉服务的目的而收集、使用、存储您的用户信息。
+		</view>
+		<view class="title name">九、责任限制</view>
+		<view class="title">
+		9.1您理解并同意,小井康泉会在现有技术水平和条件下尽最大努力向您提供服务,确保服务的连贯性和安全性;但小井康泉不能随时预见和防范法律、技术以及其他风险,包括但不限于不可抗力,大规模的病毒、木马和黑客攻击,系统不稳定,第三方服务瑕疵,政府管制等原因可能导致的服务中断、数据丢失以及其他的损失和风险。
+		</view>
+		<view class="title">
+		  9.2您同意,对小井康泉上出现的网络链接信息,您应审慎判断其真实性和可靠性,除法律明确规定外,您应对依该链接信息进行的交易负责。
+		</view>
+		<view class="title">
+		 9.3用户理解并同意,在使用小井康泉服务的过程中,可能会遇到不可抗力等风险因素使小井康泉服务发生中断。不可抗力是指不能预见、不能克服并不能避免且对一方或双方造成重大影响的客观事件,包括但不限于自.然灾害如洪水、地震、瘟疫流行和风暴等以及社会事件如战争、动乱、政府行为等。出现上述情况时,小井康泉将努力在第一时间与相关单位配合,及时进行修复,但是由此给用户造成的损失,小井康泉将在法律允许的范围内免责。
+		</view>
+		<view class="title">
+		9.4在法律允许的范围内,小井康泉对以下情形之一导致的服务中断或受阻不承担责任:
+		</view>
+		<view class="title soujin">
+		   9.4.1受到计算机病毒、木马或其他恶意程序、黑客攻击的破坏;
+		</view>
+		<view class="title soujin">
+		  9.4.2用户或小井康泉的软件、系统、硬件和通信线路出现故障;
+		</view>
+		<view class="title soujin">
+		 9.4.3用户操作不当;
+		</view>
+		<view class="title soujin">
+		9.4.4用户通过非小井康泉授权的方式使用服务;
+		</view>
+		<view class="title soujin">
+		 9.4.5其他小井康泉无法控制或合理预见的情形。
+		</view>
+		<view class="title">
+		 9.5小井康泉依据本协议约定获得处理违法违规内容的权利,该权利不构成小井康泉的义务或承诺,小井康泉不能保证及时发现违法行为或进行相应处理。
+		</view>
+		<view class="title">
+		  9.6您理解并同意,小井康泉将为您提供最快捷的商品配送服务,但鉴于天气、交通等非主观因素影响可能导致配送服务迟延,小井康泉将视情况为您提供一定补偿,补偿形式为积分补偿,补偿标准为超过用户选择的产品配送截止时间十分钟以上(含10分钟) 的,小井康泉将为您提供300积分的补偿,补偿积分将于产品送达后3个工作日内到账。截至2014年2月10日, 尚未升级至小井康泉8.10版本的用户,产品超出配送截止时间十分钟以上(含10分钟) 送达的,小井康泉将为您提供价值3元的优惠券补偿,优惠券将于产品送达后3个工作日内到账。
+		</view>
+		<view class="title soujin">
+		  小井康泉保留修改补偿形式、额度及补偿使用方式的权利。.上述补偿任何情况下不视为小井康泉所负有的法律义务。
+		</view>
+		<view class="title name">十、服务中止和终止</view>
+		<view class="title">
+		   10.1本协议在下述情形下终止:
+		</view>
+		<view class="title soujin">
+		 10.1.1协议方签署新协议代替本协议的;
+		</view>
+		<view class="title soujin">
+		  10.1.2通知终止:除本协议另有约定外,缔约协议方中任一-方 提前通知对方终止本协议。
+		</view>
+		<view class="title">
+		  10.2如发生下列任何一-种情形,小井康泉有权不经通知而中断、中止或终止向用户提供的服务,且不向该用户承担任何责任:
+		</view>
+		<view class="title soujin">
+		  10.2.1用户未按本协议提供真实信息;
+		</view>
+		<view class="title soujin">
+		   10.2.2用户违反相关法律法规或本协议的规定;
+		</view>
+		<view class="title soujin">
+		 10.2.3按照法律规定或主管部门的要求;
+		</view>
+		<view class="title soujin">
+		    10.2. 4用户侵犯其他第三方合法权益的;
+		</view>
+		<view class="title soujin">
+		   10.2.5用户对小井康泉工作人员有人身攻击、侮辱行为的;
+		</view>
+		<view class="title">
+		 10.2.6出于安全的原因或其他必要的情形。
+		</view>
+		<view class="title">
+		   10.3您同意,即便在本协议终止及您的服务被终止后,小井康泉仍有权:
+		</view>
+		<view class="title soujin">
+		  10.3.1在法律规定的范围内,继续保存并使用您的用户信息;
+		</view>
+		<view class="title soujin">
+		   10.3.2继续向您主张您在使用小井康泉服务期间因违反法律法规、本协议及平台规则而应承担的责任。
+		</view>
+		<view class="title name">十一、本服务软件形式</view>
+		<view class="title">
+		 11.1小井康泉可能为不同的终端设备开发不同的软件版本,您应当根据实际需要选择下载合适的版本进行安装。
+		</view>
+		<view class="title">
+		  11.2如果您从未经合法授权的第三方获取本软件或与本软件名称相同的安装程序,小井康泉将无法保证该软件能否正常使用,并对因此给您造成的任何损失不予负责。
+		</view>
+		<view class="title">
+		 11.3为了增进用户体验、完善服务内容,小井康泉将不时提供软件更新服务(该更新可能会采取软件替换、修改、功能强化、版本升级等形式)。为了改善用户体验,保证服务的安全性和功能的一致性,小井康泉有权对软件进行更新或者对软件的部分功能效果进行改变或限制。
+		</view>
+		<view class="title">
+		 11.4软件新版本发布后,旧版软件可能无法使用。小井康泉不保证旧版软件继续可用及相应的客户服务,请您随时核对并下载最新版本。
+		</view>
+		<view class="title">
+		   11.5除非法律允许或小井康泉书面许可,您不得从事下列行为:
+		</view>
+		<view class="title soujin">
+		   11.5.1删除软件及其副本.上关于著作权的信息;
+		</view>
+		<view class="title soujin">
+		   11.5.2对软件进行反向工程、反向汇编、反向编译或者以其他方式尝试发现软件的源代码;
+		</view>
+		<view class="title soujin">
+		  11.5.3对小井康泉或其关联公司拥有知识产权的内容进行使用、出租、出借、复制、修改、链接、转载、汇编、发表、出版、建立镜像站点等;
+		</view>
+		<view class="title soujin">
+		  11.5.4对软件或者软件运行过程中释放到任何终端内存中的数据、软件运行过程中客户端与服务器端的交互数据、软件运行过程中客户端与服务器端的交互数据,以及软件运行所必须的系统数据,进行复制、修改、增加、删除、挂件运行或创作任何非衍生作品,形式包括但不限于使用插件、外挂或非经合法授权的第三方工具/服务接入软件和相关系统。
+		</view>
+		<view class="title soujin">
+		11.5.5修改或伪造软件返行中的指令、数据,増加、刪減、变动软件的功能或送行效果,或者将用于上述用途的软件、方法进行运营或向公众侍播,无企上述行カ是是否为商业目的;
+		</view>
+		<view class="title soujin">
+		 11.5.6通过非小井康泉开发、授叔的第三方软件、插件、外挂、系统,使用小井康泉服务,或制作、友布、侍播非小井康泉开发、授枚的第三方软件、插件、外挂、系统;
+		</view>
+		<view class="title soujin">
+		  11.5.7其他小井康泉明示授权的行为。
+		</view>
+		<view class="title name">十二、知识产权</view>
+		<view class="title">
+		  12.1小井康泉在提供小井康泉服务中提供的信息内容,包括但不限于网页、文字、图片、音频、视频、图表等的知识产权均归小井康泉所有,用户在使用小井康泉服务中所产生的内容的知识产权归用户或相关权利人所有。
+		</view>
+		<view class="title">
+		   12.2除另有特别声明外,小井康泉提供小井康泉服务时所依托软件的著作权、专利权及其他知识产权均归小井康泉关联公司所有。
+		</view>
+		<view class="title red">
+		   12.3小井康泉在提供小井康泉服务中所使用的“小井康泉"、“小井康泉代"、“小井康泉代”等商业标识,其著作权或商标权归小井康泉公司所有。
+		</view>
+		<view class="title">
+		    12.4如您通过小井康泉推出的客户端软件使用小井康泉服务,小井康泉给予您一项个人的、不可转让、非独占及非排他性的许可,您只能为正当使用小井康泉服务之目的使用该权利,不得将其用作任何目的,也不得随意复制、修改、编译或以任何其他方式处置这些权利。
+		</view>
+		<view class="title name">十三、隐私政策</view>
+		<view class="title soujin">
+		    保护用户个人信息及隐私是小井康泉的一项基本原则。小井康泉严格保护您的个人信息安全。小井康泉使用各种制度、安全技术和程序等措施来保护您的个人信息不被未经授权的访问、使用或泄漏。除本协议有特殊约定,关于用户隐私保护政策详见《小井康泉隐私权政策》。
+		</view>
+		<view class="title name">十四、管辖与法律适用</view>
+		<view class="title">
+      14.1本协议的成立、生效、履行、解释及纠纷解决,适用中华人民共和国大陆地区法律(不包括冲突法)。
+		</view>
+		<view class="title">
+		14.2若您和小井康泉之间因本协议发生任何纠纷或争议,首先应友好协商解决;协商不成的,您和小井康泉均同意将纠纷或争议提交至本协议签订地有管辖权的人民法院管辖。
+		</view>
+		<view class="title">
+		14.3本协议条款无论因何种原因部分无效,其余条款仍有效,对各方具有约束力。
+		</view>
+	</view>
+</template>
+
+<script></script>
+
+<style>
+page,
+.container {
+	width: 95%;
+	height: 100%;
+	background: #ffffff;
+	font-size: 26rpx;
+	margin: 25rpx auto;
+}
+.indent {
+	text-indent: 30px;
+}
+.title {
+	margin: 25rpx 0rpx;
+}
+.title-name{
+	text-align: center;
+	font-size: 45rpx;
+	font-weight: bold;
+	padding-bottom: 25rpx;
+}
+.right{
+	text-align: right;
+}
+.name {
+	font-size: 28rpx;
+	font-weight: bold;
+}
+.soujin{
+	padding-left: 35rpx;
+}
+.red{
+	color: #FF1A27 !important;
+}
+</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>

+ 375 - 0
pages/public/wxLogin.vue

@@ -0,0 +1,375 @@
+<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="widthFix"></image>
+					<text>微信授权登录</text>
+				</button>
+				<agreement @checkedChange='changeChecked'></agreement>
+			</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: '',
+				successUrl:'/pages/home/index'
+			};
+		},
+		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((e) => {
+					console.log(e, 'loginWinxinMp');
+					obj.code = e.code;
+				});
+				// #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 => {
+							console.log(res, 'res');
+							that.userInfo = res;
+							that.loadMp();
+						},
+						fail: err => {
+							console.log(err, 'err');
+							that.loding = false;
+							that.getLoginCode();
+							uni.showToast({
+								title: '您拒绝了请求,不能正常使用小程序',
+								icon: 'error',
+								duration: 2000
+							});
+						}
+					});
+				}
+				// #endif
+			},
+			// #endif
+			// #ifdef MP-WEIXIN
+			// 退出用户登录
+			outUser() {
+				this.logout();
+				uni.switchTab({
+					url: this.successUrl
+				})
+			},
+			getLoginCode() {
+				const that = this;
+				wx.login({
+					success(e) {
+						console.log(e, 'loginWinxinMp');
+						that.code = e.code;
+					},
+					fill: function(e) {
+						console.log(e)
+					}
+				})
+			},
+			// 小程序授权登录
+			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,
+						avatar: user.userInfo.avatarUrl,
+						nickname: user.userInfo.nickName,
+						gender: user.userInfo.gender,
+						// #ifndef MP
+						parent_uid: spread_spid,
+						// #endif
+						// #ifdef MP
+						parent_uid: 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);
+						if (data.mobile == null || !data.mobile) {
+							obj.MaskShow = true;
+						} else {
+							obj.ToIndex();
+						}
+					} catch (e) {
+						console.log(e, '登录');
+					}
+				}).catch((e) => {
+					uni.hideLoading();
+				})
+			},
+			// #endif
+			ToIndex() {
+				const that = this;
+				let ur = uni.getStorageSync('present') ||that.successUrl;
+				// 用于处理缓存bug
+				if (ur == 'pages/product/product') {
+					ur = that.successUrl;
+				}
+				uni.switchTab({
+					url: ur,
+					fail(e) {
+						uni.navigateTo({
+							url: ur,
+							fail(e) {
+								uni.navigateTo({
+									url: that.successUrl
+								});
+							}
+						});
+					}
+				});
+			},
+			// 获取用户数据
+			GetUser() {
+				// 获取用户基础信息
+				return new Promise((ok, error) => {
+					getUserInfo({})
+						.then(({
+							data
+						}) => {
+							ok(data)
+						})
+						.catch(e => {
+							error(e)
+						});
+				})
+			},
+			// #ifdef MP
+			// 绑定手机号
+			PhoneNumber(e) {
+				let obj = this;
+				obj.MaskShow = false;
+				let requestData = {
+					code: e.detail.code,
+				}
+				obj.bindPhone(requestData).then((ar) => {
+					obj.GetUser().then((data) => {
+						obj.setUserInfo(data);
+						uni.showToast({
+							title: '绑定成功',
+							mask: true,
+						});
+						setTimeout(
+							function() {
+								obj.ToIndex();
+							}, 500
+						)
+					});
+				})
+			},
+			// 绑定手机号
+			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;
+		}
+	}
+
+	/* #endif */
+</style>

+ 323 - 0
pages/set/address.vue

@@ -0,0 +1,323 @@
+<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"
+	// #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
+				}) => {
+					this.$api.msg('删除成功')
+				})
+				let s = this.addressList.indexOf(item);
+				this.addressList.splice(s, 1);
+			},
+			//选择地址
+			checkAddress(item) {
+				if (this.source == 1) {
+					//this.$api.prePage()获取上一页实例,在App.vue定义
+					this.$api.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) {
+				uni.showModal({
+					title: '返回',
+					content: JSON.stringify(data),
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+				let that = this;
+				addressEdit({
+					real_name: data.userName,
+					phone: data.telNumber,
+					address: {
+						province: data.provinceName,
+						city: data.cityName,
+						district: data.countyName
+					},
+					detail: data.detailInfo,
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
+					type: 1
+				}).then(function(e) {
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000
+					});
+					setTimeout(function() {
+						that.loadAddress();
+					}, 800);
+				}).catch((err)=>{
+					console.log(err)
+				});
+			
+			}
+			// #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>

+ 258 - 0
pages/set/addressManage.vue

@@ -0,0 +1,258 @@
+<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 :disabled='true' class="input" type="text" v-model="addressData.locate_address" placeholder="请选择定位"
+							placeholder-class="placeholder"  @click="openAddress"/>
+					</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 class="list">
+					<view class="flex listItem" >
+						<view class="flex titleBox">
+							<text class="title">默认</text>
+						</view>
+						<view class="flex" style="justify-content: flex-end; margin-right: -20rpx;">
+							<switch :checked='addressData.default==1' style="transform:scale(0.7)" @change="switchChange"/>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<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';
+	export default {
+		components: {
+			pickerAddress,
+		},
+		data() {
+			return {
+				code: '',
+				addressDetail: '',
+				addressData: {
+					name: '',
+					mobile: '',
+					address: {
+						province: '',
+						city: '',
+						district: ''
+					},
+					area: '',
+					default: false,
+					longitude: '', //经度
+					latitude:'', //纬度
+					locate_address:''
+				},
+			};
+		},
+		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
+					},
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
+					area: data.detail,
+					default: data.is_default,
+					id: data.id,
+					locate_address:data.locate_address
+				};
+				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('');
+			},
+			//地图选择地址
+			openAddress() {
+				uni.chooseLocation({
+					latitude:uni.getStorageSync('CACHE_LATITUDE'),
+					longitude: uni.getStorageSync('CACHE_LONGITUDE'),
+					success: data => {
+						console.log(data);
+						this.addressData.area = data.name;
+						this.addressData.locate_address = data.address;
+						this.addressData.longitude = data.longitude;
+						this.addressData.latitude = data.latitude;
+						
+					}
+				});
+			},
+			// 设置是否为默认地址
+			switchChange(e) {
+				this.addressData.default = e.detail.value?1:0;
+			},
+			//提交
+			confirm() {
+				let obj = this;
+				let data = this.addressData;
+				if (!data.name) {
+					this.$api.msg('请填写收货人姓名');
+					return;
+				}
+				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(data.mobile)) {
+					this.$api.msg('请输入正确的手机号码');
+					return;
+				}
+				if (!data.address) {
+					this.$api.msg('请在地图选择所在位置');
+					return;
+				}
+				if (!data.area) {
+					this.$api.msg('请填写门牌号信息');
+					return;
+				}
+
+				//this.$api.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,
+					longitude: data.longitude, //经度
+					latitude:data.latitude, //纬度
+					locate_address:data.locate_address
+				}).then(function(e) {
+					obj.$api.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 {
+			margin-right: 10rpx;
+			.title {
+				color: $font-color-base;
+				font-size: $font-base;
+			}
+		}
+	}
+</style>

+ 226 - 0
pages/set/password.vue

@@ -0,0 +1,226 @@
+<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 == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (!/(^1[3|4|5|7|8][0-9]{9}$)/.test(this.account)) {
+					this.$api.msg('请输入正确的手机号');
+					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;
+						this.$api.msg('修改成功');
+					})
+					.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>

+ 202 - 0
pages/set/phone.vue

@@ -0,0 +1,202 @@
+<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 == '') {
+					this.$api.msg('请输入电话号码');
+					return;
+				}
+				if (this.account.length != 11) {
+					this.$api.msg('请输入正确的手机号');
+					return;
+				}
+				// 判断是否在倒计时
+				if (obj.countDown > 0) {
+					return false;
+				} else {
+					obj.countDown = 60;
+					obj.time = setInterval(() => {
+						obj.countDown--;
+					}, 1000);
+					//调用验证码接口
+					verify({
+							phone: obj.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
+					}) => {
+						obj.$api.msg('绑定成功!');
+						setTimeout(function() {
+							obj.loding = false;
+							uni.switchTab({
+								url: '/pages/userhome/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>

+ 204 - 0
pages/set/set.vue

@@ -0,0 +1,204 @@
+<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" >
+					<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 {
+		logout,
+		uploads
+	} 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) {
+							obj.logout();
+							uni.setStorageSync('token', '');
+							uni.navigateBack();
+						}
+					}
+				});
+			}
+		}
+	}
+</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>

+ 164 - 0
pages/set/userinfo.vue

@@ -0,0 +1,164 @@
+<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 {
+		userEdit,
+		upload
+	} 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].img;
+				})
+			},
+			confirm() {
+				userEdit({
+						avatar: this.userInfo.avatar,
+						nickname: this.userInfo.nickname
+					})
+					.then(e => {
+						this.$api.msg('修改成功');
+						setTimeout(() => {
+							uni.switchTab({
+								url: '/pages/userhome/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>

+ 238 - 0
pages/user/admin/ktadmin.vue

@@ -0,0 +1,238 @@
+<template>
+	<view class="content padding-t-30">
+		<!-- 空白页 -->
+		<!-- #ifdef H5 -->
+		<empty src="../../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<empty src="../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<view class="user-item" v-for="(item,index) in searchData.list">
+			<view class="flex">
+				<image :src="item.user.avatar" mode="scaleToFill" class="item-logo"></image>
+				<view class="item-info">
+					<view class="info-name clamp padding-b-10">
+						{{item.address.real_name}} {{item.address.phone}}
+					</view>
+					<view class="info padding-b-10">
+						{{item.address.locate_address}}
+					</view>
+					<view class="info padding-b-10">
+						空桶型号:{{item.product.keyword}}
+					</view>
+				</view>
+			</view>
+			<view class="info-info flex">
+				<view>
+					持桶:<text class="font-color-red">{{item.hold_num}}</text>
+				</view>
+				<view>
+					押桶:<text class="font-color-red">{{item.pledge_num}}</text>
+				</view>
+				<view>
+					借桶:<text class="font-color-red">{{item.borrow_num}}</text>
+				</view>
+				<view class="btn" @click="out(item)">
+					回收桶
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="searchData.loadingType"></uni-load-more>
+	</view>
+</template>
+<script>
+	import {
+		pledge_recovery,
+		admin_certificate,
+	} from '@/api/water.js';
+	export default {
+		data() {
+			return {
+				keyword: '', //搜索关键字
+				searchData: {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded: false,
+				}
+			};
+		},
+		onLoad(opt) {
+			this.getlist()
+		},
+		onShow() {
+
+		},
+		// #ifndef MP
+		//点击导航栏 buttons 时触发
+		onNavigationBarButtonTap(e) {
+			const index = e.index;
+			if (index === 0) {
+				this.reLoadSearch();
+			}
+		},
+		// 点击键盘搜索事件
+		onNavigationBarSearchInputConfirmed(e) {
+			this.reLoadSearch();
+		},
+		// 搜索栏内容变化事件
+		onNavigationBarSearchInputChanged(e) {
+			this.keyword = e.text;
+		},
+		// #endif
+		onReady(res) {
+			var that = this;
+		},
+		onReachBottom() {
+			this.getlist();
+		},
+		methods: {
+			// 空桶回收
+			out(item) {
+				const that = this;
+				uni.showModal({
+					title: '桶回收',
+					placeholderText: '请输入回收数量',
+					editable: true,
+					cancelText: '关闭',
+					confirmText: '回收',
+					success: res => {
+						if (res.confirm) {
+							if (res.content.search(/^\d*$/) < 0) {
+								uni.showModal({
+									title: '错误',
+									content: '请输入数字',
+									showCancel: false,
+								});
+								return
+							}
+							pledge_recovery({
+								id:item.id,
+								num: res.content,
+							}).then(() => {
+								uni.showToast({
+									title: '回收成功'
+								})
+								that.reLoadSearch();
+							}).catch(e => {
+								console.log(e);
+							});
+						}
+					},
+				});
+
+			},
+			// 搜索
+			reLoadSearch() {
+				this.searchData = {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded: false
+				};
+				this.getlist()
+			},
+			// 载入数据
+			getlist() {
+				//这里是将订单挂载到tab列表下
+				let navItem = this.searchData;
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+
+				admin_certificate({
+						page: navItem.page,
+						limit: navItem.limit,
+						key: this.keyword
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.data.map(e => {
+							return e;
+						});
+						navItem.list = navItem.list.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();
+						navItem.loaded = true;
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	.user-item {
+		padding: 30rpx;
+		background-color: #fff;
+		margin: 0 30rpx;
+		margin-bottom: 15rpx;
+		border-radius: 30rpx;
+
+		.info-info {
+			width: 100%;
+			font-size: $font-base;
+			font-weight: bold;
+			line-height: 1;
+
+			.btn {
+				background: $bg-gradual;
+				color: #fff;
+				padding: 10rpx 20rpx;
+				border-radius: 10rpx;
+			}
+		}
+
+		.item-logo {
+			align-self: flex-start;
+			width: 115rpx;
+			height: 115rpx;
+			border-radius: 50%;
+			background-color: #eee;
+			flex-shrink: 0;
+			margin-right: 24rpx;
+		}
+
+		.item-info {
+			flex-grow: 1;
+			height: 100%;
+			flex-direction: column;
+			align-items: flex-start;
+			justify-content: space-between;
+			color: $font-color-base;
+
+			.info-name {
+				font-size: $font-lg;
+				font-weight: bold;
+			}
+
+			.info {
+				font-size: $font-base;
+				font-weight: 500;
+				color: $font-color-light;
+			}
+		}
+	}
+</style>

+ 636 - 0
pages/user/admin/orderAdmin.vue

@@ -0,0 +1,636 @@
+<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 }}
+				<template v-if="item.ordertype">
+					<template v-if="shopOrderDetail[item.ordertype]>0">
+					(<text v-if="shopOrderDetail[item.ordertype]>99">99+</text>
+					<text v-else>{{shopOrderDetail[item.ordertype]}}</text>)
+					</template>
+				</template>
+			</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 padding-t-30" 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 position-relative">
+						<view class="i-top b-b flex">
+							<view class="order-code flex">
+								<view class="no">
+									订单编号:
+								</view>
+								<view>
+									{{ item.order_id }}
+								</view>
+							</view>
+							<text class="font-size-sm"
+								:style="{ color: item.stateTipColor }">{{ item.status_name }}</text>
+						</view>
+
+						<scroll-view v-if="item._info.length > 0" class="goods-box" scroll-x>
+							<view v-for="(goodsItem, goodsIndex) in item._info" :key="goodsIndex" class="goods-item">
+								<image class="goods-img" :src="goodsItem.cart_info.productInfo.image" mode="aspectFill">
+								</image>
+								<view class="good-name clamp">
+									{{goodsItem.cart_info.productInfo.suk}}*{{goodsItem.cart_info.cart_num}}
+								</view>
+							</view>
+						</scroll-view>
+						<view class="info-info">
+							<view class="js">
+								共{{item._info.length}}件
+							</view>
+							<view class="hj">
+								合计:¥{{item.pay_price}}
+							</view>
+						</view>
+						<!-- 客户信息 -->
+						<view class="kh-info">
+							<view class="">
+								客户信息:<text>{{item.user_address_info.real_name}} {{item.user_address_info.phone}}</text>
+							</view>
+							<view class="">
+								配送地址:<text>{{item.user_address_info.locate_address}}</text>
+							</view>
+						</view>
+						<!-- 底部操作栏 -->
+						<view class="btm-btn-wrap flex">
+							<view class="btm-left">
+								下单时间:{{item.add_time.split(' ')[0].replace(/-/g,'/')}}
+							</view>
+							<view class="btm-right flex">
+								<view class="btm-btn" @click.stop="toCall(item.user_address_info.phone)">
+									联系客户
+								</view>
+								<view class="btm-btn ksps" @click.stop="actionItem = item"
+									v-if=" item.status_name=='未发货' &&shopOrderDetail.is_main_store">
+									<picker mode="selector" :range="kflist" range-key="staff_name" @change="changeKf">
+										<view>开始配送</view>
+									</picker>
+								</view>
+								<view class="btm-btn ksps" v-if=" item.status_name=='待收货'"  @click.stop="shopNext(item)">
+									导航
+								</view>
+								<view class="btm-btn ksps" v-if=" item.status_name=='未支付'&&shopOrderDetail.is_main_store"  @click.stop="payMoney(item)">
+									确认支付
+								</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+	import {
+		adminkf,
+		GetAdminOrderList,
+		adminStatistics,
+		deliveryKeep,
+		offlinePay
+	} from '@/api/water.js';
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	export default {
+		data() {
+			return {
+				kflist: [], //客服列表
+				actionKf: {
+					staff_name: '',
+					id: ''
+				}, //选中的客服
+				actionItem: {}, //保存当前配送对象
+				tabCurrentIndex: 0,
+				navList: [{
+						state: 0,
+						text: '待付款',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						ordertype: 'unpaid_count'
+					},
+					{
+						state: 1,
+						text: '待发货',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						ordertype: 'unshipped_count'
+					},
+					{
+						state: 2,
+						text: '待收货',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+						ordertype: 'received_count'
+					},
+					{
+						state: 3,
+						text: '待评价',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+					},
+					{
+						state: 4,
+						text: '已完成',
+						loadingType: 'more',
+						orderList: [],
+						page: 1, //当前页数
+						limit: 10, //每次信息条数
+					}
+				]
+			};
+		},
+		computed: {
+			...mapState('shop', ['shopOrderDetail'])
+		},
+
+		onLoad(options) {
+			/**
+			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
+			 * 替换onLoad下代码即可
+			 */
+			this.tabCurrentIndex = +options.state;
+			// #ifndef MP
+			this.loadData();
+			// #endif
+			// #ifdef MP
+			if (options.state == 0) {
+				this.loadData();
+			}
+			// #endif
+			// 获取客服
+			this.getadminkf();
+			if (!this.shopOrderDetail.unpaid_count) {
+				this.adminStatistics()
+			}
+		},
+		// #ifdef APP-PLUS || H5
+		onBackPress(e) {
+			uni.switchTab({
+				url: '/pages/home/user',
+			});
+			return true;
+		},
+		// #endif
+		methods: {
+			...mapMutations('shop', ['setShopOrder']),
+			// 重新加载数据
+			reload(){
+				this.navList[this.tabCurrentIndex].orderList=[]
+				this.navList[this.tabCurrentIndex].page=1
+				this.navList[this.tabCurrentIndex].loadingType='more'
+				this.navList[this.tabCurrentIndex].loaded=false
+				this.changeKf()
+				this.loadData()
+			},
+			// 确认支付
+			payMoney(item){
+				const that = this;
+				uni.showModal({
+					title: '支付',
+					content: '是否确认用户已支付?',
+					cancelText: '关闭',
+					confirmText: '确认',
+					success: res => {
+						uni.showLoading({
+							title: '支付中',
+							mask: true
+						});
+						if(res.confirm){
+							offlinePay({
+								order_id:item.order_id
+							}).then((e) => {
+								uni.hideLoading()
+								uni.showToast({
+									title:'支付成功'
+								})
+								that.reload();
+							}).catch((e) => {
+								uni.hideLoading()
+								console.log(e, 'sj');
+							})
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+				
+			},
+			// 获取订单数量信息
+			adminStatistics() {
+				adminStatistics({}).then((e) => {
+					this.setShopOrder(e.data)
+				}).catch((e) => {
+					console.log(e, 'sj');
+				})
+			},
+			// 客服变更
+			changeKf(item) {
+				const that = this;
+				that.actionKf = that.kflist[item.detail.value]
+				uni.showModal({
+					title: '送货',
+					content: `是否让员工${that.actionKf.staff_name}(${that.actionKf.id})送货?`,
+					success: res => {
+						if (res.confirm) {
+							deliveryKeep({
+								delivery_kf: that.actionKf.id,
+								delivery_type: 'send',
+								order_id: that.actionItem.order_id,
+								delivery_name: that.actionKf.staff_name,
+								delivery_id: that.actionKf.phone
+							}).then((res) => {
+								uni.showToast({
+									title: res.msg
+								});
+								that.adminStatistics();
+								that.navList[that.tabCurrentIndex].page = 1;
+								that.navList[that.tabCurrentIndex].orderList = [];
+								that.navList[that.tabCurrentIndex].loadingType = 'more';
+								that.loadData();
+							}).catch((res) => {
+
+							})
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+			},
+			// 获取客服列表
+			getadminkf() {
+				adminkf({}).then((res) => {
+					this.kflist = res.data;
+					console.log(res, 'kf');
+				}).catch((res) => {
+					console.log(res);
+				})
+			},
+			// 前往客户
+			shopNext(item) {
+				// 打开地图导航
+				uni.openLocation({
+					latitude: +item.user_address_info.latitude,
+					longitude: +item.user_address_info.longitude,
+					fail(e) {
+						console.log(e);
+					}
+				})
+			},
+			// 联系用户
+			toCall(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			},
+			//跳转到订单详情
+			goToOrderDetail(e) {
+				uni.navigateTo({
+					url: '/pages/order/orderDetail?type=2&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';
+
+				GetAdminOrderList({
+						status: state,
+						page: navItem.page,
+						limit: navItem.limit,
+						shopping_type: 1 //1-送货,2自提
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.map(e => {
+							let b = this.orderStateExp(e.status);
+							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;
+			},
+			//订单状态文字和颜色
+			orderStateExp(state) {
+				let stateTipColor = '#3C82E6';
+				switch (+state) {
+					case 0:
+						//'待付款';
+						stateTipColor = '#3C82E6'
+						break;
+					case 1:
+						//'待发货';
+						stateTipColor = '#3C82E6'
+						break;
+					case 2:
+						//'待收货';
+						break;
+					case 3:
+						//'待评价';
+						break;
+					case 4:
+						//'已完成';
+						stateTipColor = '#999999';
+						break;
+					case 9:
+						//'订单已关闭';
+						stateTipColor = '#909399';
+						break;
+
+						//更多自定义
+				}
+				return {
+					stateTipColor
+				};
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page,
+	.content {
+		background: $page-color-base;
+		height: 100%;
+	}
+
+	.swiper-box {
+		height: calc(100% - 40px);
+	}
+
+	.list-scroll-content {
+		height: 100%;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: $font-color-dark;
+			position: relative;
+
+			&.current {
+				color: $base-color;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid $base-color;
+				}
+			}
+		}
+	}
+
+	.order-item {
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		margin: 0 30rpx;
+		margin-bottom: 30rpx;
+		border-radius: 30rpx;
+		background: #fff;
+		color:$font-color-light;
+
+		.i-top {
+			height: 80rpx;
+
+			.order-code {
+				font-size: $font-sm;
+
+				.no {
+					padding: 10rpx 10rpx;
+					background-color: #FFEAE5;
+					color: #FD5B23;
+					line-height: 1;
+					border-top-right-radius: 10rpx;
+					border-bottom-left-radius: 10rpx;
+					margin-right: 10rpx;
+
+				}
+			}
+
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				position: relative;
+
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+
+		.info-info {
+			width: 215rpx;
+			height: 200rpx;
+			position: absolute;
+			top: 80rpx;
+			right: 35rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: flex-end;
+			align-items: flex-end;
+			font-size: 30rpx;
+			font-weight: 500;
+
+			.hj {
+				padding-top: 40rpx;
+				color: $font-color-dark;
+				padding-bottom: 20rpx;
+			}
+
+			.js {
+				color:$font-color-light;
+			}
+		}
+
+		.kh-info {
+			font-size: 24rpx;
+			font-weight: 500;
+			color:$font-color-light;
+			padding-top: 20rpx;
+			border-top: 1px solid $border-color-base;
+
+			view {
+				padding: 5rpx 0;
+			}
+
+			text {
+				font-weight: bold;
+			}
+
+		}
+
+		/* 多条商品 */
+		.goods-box {
+			height: 200rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+			padding-right: 250rpx;
+
+			.goods-item {
+				width: 120rpx;
+				height: 180rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+
+			.good-name {
+				font-size: 24rpx;
+				text-align: center;
+				width: 120rpx;
+				padding-top: 10rpx;
+				margin-right: 0;
+				color: $font-color-dark;
+			}
+		}
+
+		.btm-btn-wrap {
+			height: 90rpx;
+			width: 100%;
+			font-size: 24rpx;
+			font-weight: 500;
+			color:$font-color-light;
+			line-height: 1;
+
+			.btm-right {
+				justify-content: flex-end;
+			}
+
+			.btm-btn {
+				width: 144rpx;
+				padding: 10rpx 0;
+				border: 2px solid $border-color-base;
+				border-radius: 28rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				text-align: center;
+				margin-left: 10rpx;
+				color: $font-color-light;
+			}
+
+			.ksps {
+				border-color:$base-color;
+				color: $base-color;
+			}
+		}
+	}
+
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $font-color-dark;
+		background-color: #FFFFFF;
+		overflow: hidden;
+
+		.send {
+			text-align: center;
+		}
+
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+			color: $base-color;
+
+			&.qx {
+				color: $color-red;
+			}
+		}
+
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
+	}
+</style>

+ 207 - 0
pages/user/admin/useradmin.vue

@@ -0,0 +1,207 @@
+<template>
+	<view class="content padding-t-30">
+		<!-- 空白页 -->
+		<!-- #ifdef H5 -->
+		<empty src="../../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<!-- #ifndef H5 -->
+		<empty src="../../static/error/emptyOrder.png"
+			v-if="searchData.loaded === true && searchData.list.length === 0"></empty>
+		<!-- #endif -->
+		<view class="user-item " v-for="(item,index) in searchData.list">
+			<view class="user-info flex">
+				<view class="flex-start flex-grow-true">
+					<image class="image" :src="item.avatar" mode="scaleToFill"></image>
+					<view class="clamp flex-grow-true padding-r-10">
+						{{item.nickname}}
+					</view>
+				</view>
+				<image @click="phone(item.phone)" class="phone" src="../../../static/icon/adminUserPhone.png"
+					mode="scaleToFill"></image>
+			</view>
+			<view class="user-base font-size-sm padding-b-10">
+				<view class="padding-b-10 padding-t-20">
+					电话:{{item.phone}}
+				</view>
+				<view class="padding-b-10">
+					地址:{{item.address.locate_address}}
+				</view>
+				<view class="padding-b-10">
+					详细:{{item.address.detail}}
+				</view>
+			</view>
+			<view class="btn-list flex font-size-sm clamp">
+				<view class="btn flex-shrink-false">
+					水票:{{item.certificate_num}}
+				</view>
+				<view class="btn flex-shrink-false clamp">
+					持桶:{{item.hold_num}}
+				</view>
+				<view class="btn clamp">
+					押金:{{+item.pledge_money}}
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="searchData.loadingType"></uni-load-more>
+	</view>
+</template>
+<script>
+	import {
+		storeMember
+	} from "@/api/water.js"
+	export default {
+		data() {
+			return {
+				keyword: '', //搜索关键字
+				searchData: {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded: false
+				}
+			};
+		},
+		onLoad(opt) {
+			this.getlist()
+		},
+		onShow() {
+
+		},
+		onReady(res) {
+			var that = this;
+		},
+		// #ifndef MP
+		//点击导航栏 buttons 时触发
+		onNavigationBarButtonTap(e) {
+			const index = e.index;
+			if (index === 0) {
+				this.reLoadSearch();
+			}
+		},
+		// 点击键盘搜索事件
+		onNavigationBarSearchInputConfirmed(e) {
+			this.reLoadSearch();
+		},
+		// 搜索栏内容变化事件
+		onNavigationBarSearchInputChanged(e) {
+			this.keyword = e.text;
+		},
+		// #endif
+		onReachBottom() {
+			this.getlist();
+		},
+		methods: {
+			// 拨打电话
+			phone(phone) {
+				uni.makePhoneCall({
+					phoneNumber: phone
+				})
+			},
+			// 搜索
+			reLoadSearch() {
+				this.searchData = {
+					page: 1,
+					limit: 10,
+					list: [],
+					loadingType: 'more',
+					loaded: false
+				};
+				this.getlist()
+			},
+			// 获取数据
+			getlist() {
+				//这里是将订单挂载到tab列表下
+				let navItem = this.searchData;
+				if (navItem.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (navItem.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				navItem.loadingType = 'loading';
+				storeMember({
+						page: navItem.page,
+						limit: navItem.limit,
+						key: this.keyword
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.data.map(
+							(e) => {
+								return e
+							}
+						);
+						navItem.list = navItem.list.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();
+						navItem.loaded = true;
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
+		}
+	};
+</script>
+<style lang="scss" scoped>
+	.user-item {
+		align-items: flex-start;
+		padding: 30rpx;
+		background-color: #fff;
+		margin: 0 30rpx;
+		border-radius: 30rpx;
+		margin-bottom: 15rpx;
+		color: $font-color-light;
+
+		.user-info {
+			height: 72rpx;
+			font-size: 36rpx;
+			font-weight: bold;
+			color: $font-color-base;
+
+			.image {
+				height: 72rpx;
+				width: 72rpx;
+				margin-right: 20rpx;
+				background-color: #eee;
+				border-radius: 50%;
+			}
+
+			.phone {
+				width: 40rpx;
+				height: 40rpx;
+			}
+		}
+
+		.btn-list {
+			color: $font-color-light;
+			text-align: center;
+			line-height: 1;
+
+			.btn {
+				width: 34%;
+				padding: 20rpx 0;
+				font-weight: 500;
+			}
+			.btn:nth-child(2) {
+				border-right: 1px solid $border-color-base;
+				border-left: 1px solid $border-color-base;
+			}
+		}
+	}
+</style>

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

@@ -0,0 +1,236 @@
+<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';
+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'
+					});
+					this.$api.prePage().dataUp()
+					setTimeout(() => {
+						uni.navigateBack()
+					},1500)
+				})
+				.catch(e => {
+					console.log(e);
+				});
+		},
+		// 修改支付宝信息
+		setAliInfo(obj) {
+			setAliInfo(obj)
+				.then(e => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					this.$api.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>

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

@@ -0,0 +1,404 @@
+<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 {
+								obj.$api.msg(msg);
+							}
+						}
+						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: $base-color;
+		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>

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

@@ -0,0 +1,105 @@
+<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" >
+			</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/home/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>

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

@@ -0,0 +1,478 @@
+<template>
+	<view class="content">
+		<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, //当前选中的充值金额对象
+				// #ifndef H5
+				type: 'alipay',
+				// #endif
+				// #ifdef H5
+				type: 'wxpay',
+				// #endif
+				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;
+		justify-content: flex-start;
+		.item {
+			justify-content: center;
+			margin-left: 14rpx;
+			width: 200rpx;
+			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;
+			}
+		}
+	}
+	.base-buttom {
+		position: relative;
+		left: auto;
+		bottom: auto;
+		right: auto;
+	}
+</style>

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

@@ -0,0 +1,313 @@
+<template>
+	<view class="content">
+		<uni-nav-bar class="nav" @clickLeft='back' :border='false' backgroundColor='transparent' leftIcon='left'
+			color='#FFF' title="我的余额" />
+		<view class="content-money">
+			<view class="conetnt-box">
+				<view class="money-box">
+					<view class="money"><text class="tip">¥</text>{{ money | getMoneyStyle }}</view>
+					<view class="text">当前余额</view>
+				</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item"
+				:class="{ current: tabCurrentIndex === index }" @click="tabCurrentIndex=index">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+					
+					<!-- 订单列表 -->
+					<view class="itemList" v-for="(items, indexs) in tabItem.orderList" :key="indexs">
+						<!-- <view class='font-size-lg padding-l-30 bg-gray padding-v-10'>
+							{{items.time}}
+						</view> -->
+						<view v-for="(item, index) in items.list" :key="index" 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="tabItem.loadingType"></uni-load-more>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+
+		<view class="base-buttom" @click="navto('./recharge')">立即充值</view>
+	</view>
+</template>
+
+<script>
+	import {
+		spreadCommission,
+		userBalance
+	} from '@/api/wallet.js';
+	import {
+		getMoneyStyle
+	} from '@/utils/rocessor.js';
+	export default {
+		filters: {
+			getMoneyStyle
+		},
+		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 //每次信息条数
+					}
+				],
+				money: ''
+			};
+		},
+		onLoad(options) {
+			this.loadData();
+			console.log('进入');
+		},
+		onShow() {
+			// 获取用户余额
+			userBalance({}).then(({
+				data
+			}) => {
+				this.money = data.now_money;
+			});
+		},
+		// 页面到底部后加载数据
+		onReachBottom() {
+			this.loadData();
+		},
+		methods: {
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			// 返回退回
+			back() {
+				uni.reLaunch({
+					url: '/pages/home/user'
+				})
+			},
+			// 页面跳转
+			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%;
+	}
+
+	.content-money {
+		position: relative;
+		padding: 20rpx;
+		padding-top: var(--status-bar-height);
+		background: url('../../../static/image/tg-bg.png') no-repeat;
+		height: 200px;
+
+		.money-box {
+			padding-top: 80px;
+			text-align: center;
+			color: #FFF;
+
+			.text {
+				font-size: $font-base;
+			}
+
+			.money {
+				font-weight: bold;
+				font-size: 82rpx;
+
+				.tip {
+					font-size: $font-lg;
+				}
+			}
+		}
+	}
+
+
+
+	.content {
+		height: 100%;
+
+		.nav {
+			position: fixed;
+			top: 0;
+			right: 0;
+			left: 0;
+			z-index: 998;
+		}
+	}
+
+	.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;
+			}
+		}
+	}
+
+	.base-buttom {
+		position: fixed;
+		bottom: 30rpx;
+		left: 0;
+		right: 0;
+	}
+
+	.navbar {
+		display: flex;
+		height: 40px;
+		padding: 0 5px;
+		margin-top: 10px;
+		background: #fff;
+		position: relative;
+		border-bottom: 1px solid $border-color-light;
+		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% - 250px);
+		background-color: #FFF;
+		.list-scroll-content{
+			height: 100%;
+			padding-bottom: 150rpx;
+		}
+		.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;
+			}
+		}
+	}
+</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>

+ 444 - 0
pages/user/myteam.vue

@@ -0,0 +1,444 @@
+<template>
+	<view class="content">
+		<view class="content-money">
+			<view class="status_bar">
+				<!-- 这里是状态栏 -->
+			</view>
+			<!-- <view class="body-title">
+				<view class="goback-box" @click="toBack">
+					<image class="goback" src="../../static/icon/fanhui.png" mode=""></image>
+				</view>
+				<view class="header">我的推广</view>
+			</view> -->
+			<view class="content-bg">
+				<image src="../../static/image/tg-bg.png" mode=""></image>
+			</view>
+			<view class="money-box">
+				<view class="money">{{ all|| '0' }}</view>
+				<view>我的影响指数</view>
+			</view>
+			<view class="money-box flex" style="padding-top: 20rpx;" >
+				<view style="flex-grow: 1;"></view>
+				<view style="flex-grow: 1;text-align: right;padding-right: 20rpx;" @click="navto('/pages/user/teamph')">排行榜</view>
+			</view>
+		</view>
+
+		<scroll-view class="list-scroll-content" :style="{ height: maxheight }" scroll-y @scrolltolower="loadData">
+			<!-- <empty v-if="loaded === true && list.length === 0" :style="{ height: maxheight }"></empty> -->
+
+			<view v-for="(item, index) in list" :key="index" class="order-item flex">
+				<view class="title-box flex_item">
+					<view class="title-avatar">
+						<image :src="item.avatar"></image>
+					</view>
+					<view class="list_tpl">
+						<view class="title">
+							<view class="title-name clamp">{{ item.nickname }}</view>
+						</view>
+						<view class="time">
+							<text>{{ item.mobile }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+<script>
+	import {
+		mapState,
+		mapMutations
+	} from 'vuex';
+	import {
+		getChildList
+	} from '@/api/user.js'
+	export default {
+		onReady(res) {
+			var _this = this;
+			uni.getSystemInfo({
+				success: resu => {
+					const query = uni.createSelectorQuery();
+					query.select('.list-scroll-content').boundingClientRect();
+					query.exec(function(res) {
+						_this.maxheight = resu.windowHeight - res[0].top + 'px';
+						console.log('打印页面的剩余高度', _this.height);
+					});
+				},
+				fail: res => {}
+			});
+		},
+		data() {
+			return {
+				// 头部图高度
+				maxheight: '',
+				loadingType: 'more',
+				list: [],
+				page: 1, //当前页数
+				all: '',
+				page: 1,
+				pageSize: 10,
+				loaded: false,
+			};
+		},
+		computed: {
+			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin']),
+			...mapState(['baseURL'])
+		},
+		onLoad(options) {},
+		onShow() {
+			this.loadData();
+		},
+		methods: {
+			// 页面跳转
+			navto(e) {
+				uni.navigateTo({
+					url: e
+				});
+			},
+			//获取收入支出信息
+			async loadData(source) {
+				//这里是将订单挂载到tab列表下
+				let that = this
+				if (that.loadingType === 'loading') {
+					//防止重复加载
+					return;
+				}
+				if (that.loadingType === 'noMore') {
+					//防止重复加载
+					return;
+				}
+				// 修改当前对象状态为加载中
+				that.loadingType = 'loading';
+				getChildList({
+						page: that.page,
+						pageSize: that.pageSize,
+					})
+					.then(({
+						data
+					}) => {
+						that.all = data.totalCount
+						that.list = that.list.concat(data.list)
+						that.page++
+
+						if (that.pageSize == data.list.length) {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							that.loadingType = 'more';
+						} else {
+							//判断是否还有数据, 有改为 more, 没有改为noMore
+							that.loadingType = 'noMore';
+						}
+						that.$set(that, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			//swiper 切换
+			changeTab(e) {
+				this.tabCurrentIndex = e.target.current;
+				this.loadData('tabChange');
+			},
+			//顶部tab点击
+			tabClick(index) {
+				this.tabCurrentIndex = index;
+			},
+			// 点击返回 我的页面
+			toBack() {
+				uni.switchTab({
+					url: '/pages/user/user'
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	page {
+		background: #f8f8f8;
+		height: 100%;
+	}
+
+	.status_bar {
+		height: var(--status-bar-height);
+		width: 100%;
+		background: #5dbc7c;
+	}
+
+	.content-money {
+		position: relative;
+		height: 480rpx;
+
+		.content-bg {
+			position: absolute;
+			top: 0;
+			left: 0;
+			right: 0;
+			width: 750rpx;
+			height: 480rpx;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+
+		.body-title {
+			height: 80rpx;
+			text-align: center;
+			font-size: 35rpx;
+			position: relative;
+
+			.header {
+				position: absolute;
+				left: 0;
+				top: 0;
+				width: 100%;
+				font-size: 36rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #fffeff;
+				height: 80rpx;
+				font-size: 36rpx;
+				font-weight: 700;
+				z-index: 9;
+				display: flex;
+				justify-content: center;
+				align-items: center;
+			}
+
+			.goback-box {
+				position: absolute;
+				left: 18rpx;
+				top: 0;
+				height: 80rpx;
+				display: flex;
+				align-items: center;
+			}
+
+			.goback {
+				z-index: 100;
+				width: 34rpx;
+				height: 34rpx;
+			}
+		}
+	}
+
+	.money-box {
+		position: relative;
+		z-index: 2;
+		padding-top: 90rpx;
+		color: #ffffff;
+		text-align: center;
+
+		.money {
+			font-size: 72rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #ffffff;
+		}
+
+		.text {
+			font-size: 30rpx;
+		}
+	}
+
+	.order-item {
+		padding: 20rpx 30rpx;
+		line-height: 1.5;
+		background-color: #fff;
+
+		.title-box {
+			width: 100%;
+
+			.title-avatar {
+				flex-shrink: 0;
+				width: 100rpx;
+				height: 100rpx;
+				margin-right: 25rpx;
+				border-radius: 100%;
+
+				image {
+					width: 100%;
+					height: 100%;
+					border-radius: 100%;
+				}
+			}
+
+			.list_tpl {
+				width: 85%;
+
+				.title {
+					display: flex;
+					justify-content: flex-start;
+					font-size: $font-lg;
+					color: $font-color-base;
+					overflow: hidden; //超出的文本隐藏
+					text-overflow: ellipsis; //溢出用省略号显示
+					white-space: nowrap;
+					line-height: 1;
+					text-align: center;
+
+					.title-name {
+						max-width: 40%;
+					}
+
+					.dl {
+						margin-left: 10rpx;
+						width: 93rpx;
+						height: 32rpx;
+						border-radius: 16rpx;
+
+						image {
+							width: 93rpx;
+							height: 32rpx;
+							border-radius: 16rpx;
+						}
+					}
+
+					.class {
+						display: inline-block;
+						margin-left: 10rpx;
+						padding: 6rpx;
+						text-align: center;
+						border: 1px solid #2e58ff;
+						border-radius: 16rpx;
+						font-size: 20rpx;
+						font-family: PingFang SC;
+						font-weight: 500;
+						color: #2e58ff;
+					}
+				}
+
+				.time {
+					font-size: $font-lg;
+					color: $font-color-light;
+				}
+			}
+		}
+
+		.money {
+			width: 50%;
+			text-align: right;
+			color: #db1935;
+			font-size: $font-lg;
+		}
+	}
+
+	.yeji {
+		position: relative;
+		margin: -72rpx auto 0;
+		width: 690rpx;
+		height: 143rpx;
+		background: #ffffff;
+		box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50, 50, 52, 0.06);
+		border-radius: 10rpx;
+		display: flex;
+		align-items: center;
+
+		.yeji-a {
+			width: 50%;
+			display: flex;
+			flex-direction: column;
+			justify-content: center;
+			align-items: center;
+
+			.yeji-top {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+
+			.yeji-buttom {
+				font-size: 42rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #333333;
+			}
+		}
+
+		.border {
+			width: 1rpx;
+			height: 51rpx;
+			background: #dddddd;
+		}
+	}
+
+	.navbar {
+		margin-top: 20rpx;
+		display: flex;
+		height: 88rpx;
+		padding: 0 5px;
+		background: #fff;
+		box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
+		position: relative;
+		z-index: 10;
+
+		.nav-item {
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			font-size: 15px;
+			color: #999999;
+			position: relative;
+
+			&.current {
+				color: #000;
+
+				&:after {
+					content: '';
+					position: absolute;
+					left: 50%;
+					bottom: 0;
+					transform: translateX(-50%);
+					width: 44px;
+					height: 0;
+					border-bottom: 2px solid #fe5b38;
+				}
+			}
+		}
+	}
+
+	.buttom-box {
+		position: relative;
+		background-color: #ffffff;
+		text-align: center;
+		padding: 30rpx 0;
+
+		.buttom {
+			flex-grow: 1;
+		}
+
+		.money {
+
+			font-size: 32rpx;
+			font-weight: bold;
+			color: #ff4173;
+		}
+
+		.text {
+			padding-bottom: 26rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #666666;
+
+			&.current {
+				border-bottom: 2px solid #ff4173;
+			}
+		}
+
+		.icon {
+			height: 50rpx;
+			width: 48rpx;
+			margin: 0 auto;
+
+			.icon-img {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+</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>

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

@@ -0,0 +1,391 @@
+<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/userhome/user'
+									})
+								}
+							});
+						} else {
+							this.$api.msg('认证失败');
+						}
+					})
+					.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>

+ 441 - 0
pages/user/shareQrCode.vue

@@ -0,0 +1,441 @@
+<template>
+	<view class="container">
+		<view class="" style="height: 80rpx;">
+			
+		</view>
+		<canvas :style="{ width:  canvasW + 'px', height: canvasH + 'px',}" canvas-id="myCanvas" id="myCanvas" class="hb"></canvas>
+		<!-- #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='saveShareQrcode' v-if="!loading">保存海报</view>
+		<!-- #endif -->
+
+	</view>
+</template>
+
+<script>
+	import {
+		spreadBanner,
+		getWxmpInviteQrcode
+	} 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/home/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 {
+				bl: 0.95,//画布比例
+				canvasW: '',
+				canvasH: '',
+				bgimg: '',
+				qrimg: '',
+				shareList: [],
+				swiperIndex: 0,
+				poster: '', // 当前海报
+				loading: true
+			}
+		},
+		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;
+					that.poster = this.bgimg
+				}
+				uni.downloadFile({
+					url: that.poster,
+					success(resFile) {
+						if (resFile.statusCode === 200) {
+							uni.getSetting({
+								success(res) {
+									if (!res.authSetting['scope.writePhotosAlbum']) {
+										uni.authorize({
+											scope: 'scope.writePhotosAlbum',
+											success() {
+												uni.saveImageToPhotosAlbum({
+													filePath: resFile.tempFilePath,
+													success: function(res) {
+														return that.$api.msg(
+															'保存成功');
+													},
+													fail: function(res) {
+														return that.$api.msg(res
+															.errMsg);
+													},
+													complete: function(res) {},
+												})
+											},
+											fail() {
+												uni.showModal({
+													title: '您已拒绝获取相册权限',
+													content: '是否进入权限管理,调整授权?',
+													success(res) {
+														if (res.confirm) {
+															uni.openSetting({
+																success: function(
+																	res) {
+																	console
+																		.log(
+																			res
+																			.authSetting
+																			)
+																}
+															});
+														} else if (res.cancel) {
+															return that.$api.msg(
+																'已取消!');
+														}
+													}
+												})
+											}
+										})
+									} else {
+										uni.saveImageToPhotosAlbum({
+											filePath: resFile.tempFilePath,
+											success: function(res) {
+												return that.$api.msg('保存成功');
+											},
+											fail: function(res) {
+												return that.$api.msg(res.errMsg);
+											},
+											complete: function(res) {},
+										})
+									}
+								},
+								fail(res) {
+
+								}
+							})
+						} else {
+							return that.$api.msg(resFile.errMsg);
+						}
+					},
+					fail(res) {
+						return that.$api.msg(res.errMsg);
+					}
+				})
+			},
+
+			// #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();
+				// });
+				getWxmpInviteQrcode().then(res => {
+					console.log(res)
+					obj.bgimg = res.data.bgimg
+					obj.qrcode = res.data.qrcode
+					uni.hideLoading();
+					obj.createPoster()
+					
+				})
+			},
+			async createPoster() {
+				let that = this
+				// 获取设备信息,主要获取宽度,赋值给canvasW 也就是宽度:100%
+				this.SystemInfo = await this.getSystemInfo();
+				// 获取商品主图,二维码信息,APP端会返回图片的本地路径(H5端只能返回原路径)
+				this.goodsImg = await this.getImageInfo(that.bgimg);
+				this.ewmImg = await this.getImageInfo(that.qrcode);
+				this.canvasW = this.SystemInfo.windowWidth * that.bl; // 画布宽度
+				this.ratio = this.SystemInfo.windowWidth / 750;
+				let x = 750*this.goodsImg.height/this.goodsImg.width
+				// this.canvasW =750 * this.ratio;
+				this.canvasH = x * this.ratio * that.bl;
+
+				this.ewmW = 220 * this.ratio;
+	
+				
+				console.log(this.canvasH, 'this.canvasH')
+				// this.canvasH = this.goodsImg.height + this.ewmW + 200;  // 画布高度 = 主图高度+二维码高度 + 文字图片的间距(大概50)
+			
+				// 如果主图,二维码图片,设备信息都获取成功,开始绘制海报,这里需要用setTimeout延时绘制,否则可能会出现图片不显示。
+				if (this.goodsImg.errMsg == 'getImageInfo:ok' && this.ewmImg.errMsg == 'getImageInfo:ok' && this
+					.SystemInfo.errMsg == 'getSystemInfo:ok') {
+					console.log('ok')
+					uni.showToast({
+						icon: 'loading',
+						mask: true,
+						duration: 10000,
+						title: '海报绘制中',
+					});
+					setTimeout(() => {
+						var ctx = uni.createCanvasContext('myCanvas', this);
+						// 填充背景色,白色
+						ctx.setFillStyle('#fff'); // 默认白色
+						ctx.fillRect(0, 0, this.canvasW, this.canvasH) // fillRect(x,y,宽度,高度)
+			
+						// 绘制商品主图,二维码
+						ctx.drawImage(this.goodsImg.path, 0, 0, this.canvasW, this
+							.canvasH) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度)
+							ctx.drawImage(this.ewmImg.path, (this.canvasW / 2 - this.ewmW / 2),this.canvasH - 85*this.ratio - this.ewmW,
+								this.ewmW, this.ewmW) // drawImage(图片路径,x,y,绘制图像的宽度,绘制图像的高度,二维码的宽,高)
+						
+			
+						// 3、绘制商品标题,多余文字自动换行
+						ctx.setFontSize(16); // setFontSize() 设置字体字号
+						ctx.setFillStyle('#333'); // setFillStyle() 设置字体颜色
+						ctx.draw(false, (ret) => { // draw方法 把以上内容画到 canvas 中。
+							console.log(ret)
+							uni.showToast({
+								icon: 'none',
+								title: '生成成功!',
+							});
+							that.loading = false
+							that.fina = true
+							uni.canvasToTempFilePath({ // 保存canvas为图片
+								canvasId: 'myCanvas',
+								quality: 1,
+								fileType: 'jpg',
+								complete: function(res) {
+									// 在H5平台下,tempFilePath 为 base64, // 图片提示跨域 H5保存base64失败,APP端正常输出临时路径
+									console.log(res)
+									that.canvasShow = false
+									that.shareQrcodeUrl = res.tempFilePath
+									that.$forceUpdate()
+									setTimeout(function() {
+										console.log(that.shareQrcodeUrl, that
+											.canvasShow)
+									}, 2000)
+								},
+							})
+						});
+					}, 1500)
+				} else {
+					console.log('err')
+				}
+			},
+			// 获取设备信息
+			getSystemInfo() {
+				return new Promise((req, rej) => {
+					uni.getSystemInfo({
+						success: function(res) {
+							req(res)
+						}
+					});
+				})
+			},
+			// 获取图片信息
+			getImageInfo(image) {
+				return new Promise((req, rej) => {
+					uni.getImageInfo({
+						src: image,
+						success: function(res) {
+							req(res)
+						},
+					});
+				})
+			},
+			//保存图片
+			saveShareQrcode() {
+				console.log(this.shareQrcodeUrl)
+				uni.saveImageToPhotosAlbum({
+					filePath: this.shareQrcodeUrl,
+					success: (res) => {
+						uni.showToast({
+							icon: 'none',
+							position: 'bottom',
+							title: "成功保存到相册",
+						});
+					},
+					fail: (err) => {
+						//重新提示用户打开保存图片的授权
+						if (err.errMsg === "saveImageToPhotosAlbum:fail auth deny") {
+							uni.showModal({
+								title: '提示',
+								content: '需要您授权保存相册',
+								showCancel: false,
+								success(res) {
+									if (res.confirm) {
+										uni.openSetting({
+											success(settingdata) {
+												if (settingdata.authSetting[
+														'scope.writePhotosAlbum']) {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限成功,再次保存图片即可成功',
+														showCancel: false,
+													})
+												} else {
+													uni.showModal({
+														title: '提示',
+														content: '获取权限失败,无法保存到相册',
+														showCancel: false
+													})
+												}
+											}
+										})
+									}
+								}
+							})
+						}
+					},
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		background: #a3a3a3;
+		height: 100%;
+	}
+
+	.container {
+		width: 100%;
+		padding-bottom: 100rpx;
+		.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: 750rpx;
+			position: fixed;
+			height: 100rpx;
+			text-align: center;
+			line-height: 100rpx;
+			bottom: 0;
+			left: 0;
+		}
+	}
+
+	.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;
+		}
+	}
+	.hb {
+		margin: auto;
+		border-radius: 20rpx;
+		overflow: hidden;
+	}
+</style>

+ 324 - 0
pages/water/deposit.vue

@@ -0,0 +1,324 @@
+<template>
+	<view class="good-list">
+
+		<view class="flex nav-box">
+			<view class="tab">
+				总计:<text class="font-color-red">{{total_count}}</text>(个)
+			</view>
+			<view class="line"></view>
+			<view class="tab">
+				押金:<text class="font-color-red">{{total_pledge_money}}</text>(元)
+			</view>
+		</view>
+		<view class="deposit-item">
+			<view class="list flex" v-for="(item,index) in navList[tabCurrentIndex].orderList" @click="open(item)">
+				<view class="content">
+					<view class="title clamp2">
+						{{item.product.keyword}}
+					</view>
+					<view class="flex type-list">
+						<view class="ls">
+							余桶:<text class="font-color-red">{{item.remain_num}}</text>
+						</view>
+						<view class="ls">
+							押桶:<text class="font-color-red">{{item.pledge_num}}</text>
+						</view>
+						<view class="ls">
+							借桶:<text class="font-color-red">{{item.borrow_num}}</text>
+						</view>
+					</view>
+				</view>
+				<view class="iconfont iconenter">
+
+				</view>
+			</view>
+			
+		</view>
+		<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+		<uni-popup ref="popup" type="bottom">
+			<view class="buttomBox">
+				<view class="item borde-b" @click="addBarrel">
+					押桶
+				</view>
+				<view class="item borde-b" @click="delBarrel">
+					退桶
+				</view>
+			</view>
+			<view class="buttomBox" @click="$refs.popup.close()">
+				<view class="item qx">
+					取消
+				</view>
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import {
+		certificate,
+		createPledge,
+		delPledge
+	} from '@/api/water.js';
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}],
+				// 保存当前选中的桶对象
+				actionItem: {},
+				total_pledge_money: 0, //押金
+				total_count: 0, //总数
+			};
+		},
+		onReachBottom() {
+			this.getGoodList();
+		},
+		onLoad: function(option) {
+			this.getGoodList();
+		},
+		methods: {
+			// 押桶
+			addBarrel() {
+				const that = this;
+				uni.showModal({
+					title: '押桶',
+					placeholderText: '请输入押桶数量',
+					editable: true,
+					cancelText: '关闭',
+					confirmText: '押桶',
+					success: res => {
+						if (res.confirm) {
+							if(res.content.search(/^\d*$/)<0){
+								uni.showModal({
+									title: '错误',
+									content: '请输入数字',
+									showCancel: false,
+								});
+								return
+							}
+							createPledge({
+								id: that.actionItem.id,
+								num: res.content,
+								pay_type: 'yue'
+							}).then(() => {
+								that.$refs.popup.close();
+								uni.showToast({
+									title: '押桶成功'
+								})
+								that.reloadList();
+							}).catch(e => {
+								console.log(e);
+							});
+						}
+					},
+				});
+			},
+			// 退桶
+			delBarrel() {
+				const that = this;
+				uni.showModal({
+					title: '退桶',
+					placeholderText: '请输入退桶数量',
+					editable: true,
+					cancelText: '关闭',
+					confirmText: '退桶',
+					success: res => {
+						if (res.confirm) {
+							if(res.content.search(/^\d*$/)<0){
+								uni.showModal({
+									title: '错误',
+									content: '请输入数字',
+									showCancel: false,
+								});
+								return
+							}
+							console.log(that.actionItem.pledge_num,res.content);
+							if(that.actionItem.pledge_num<+res.content){
+								uni.showModal({
+									title: '错误',
+									content: '退桶数不可大于押桶数',
+									showCancel: false,
+								});
+								return
+							}
+							delPledge({
+								id: that.actionItem.id,
+								num: res.content,
+							}).then(() => {
+								that.$refs.popup.close();
+								uni.showToast({
+									title: '退桶成功'
+								})
+								that.reloadList();
+							}).catch(e => {
+								console.log(e);
+							});
+						}
+					},
+				});
+			},
+			// 重新加载数据
+			reloadList() {
+				this.navList = [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}];
+				this.getGoodList();
+			},
+			// 打开选择弹窗
+			open(item) {
+				this.actionItem = item;
+				this.$refs.popup.open()
+			},
+			// 加载数据
+			getGoodList(source) {
+				//这里是将订单挂载到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';
+				certificate({
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						this.total_pledge_money = data.total_pledge_money;
+						this.total_count = data.total_count;
+						let arr = data.data.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);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+		}
+	};
+</script>
+
+
+<style lang="scss">
+	.good-list {
+		padding: 30rpx 0;
+		width: 750rpx;
+
+		.nav-box {
+			border-radius: 10rpx;
+			background-color: #FFF;
+			border-bottom: 2px solid $page-color-base;
+
+			.tab {
+				width: 50%;
+				height: 95rpx;
+				text-align: center;
+				flex-shrink: 1;
+				font-size: $font-lg;
+				font-weight: bold;
+				line-height: 95rpx;
+			}
+
+			.line {
+				height: 55rpx;
+				width: 3px;
+				background-color: $page-color-base;
+			}
+		}
+	}
+
+	.deposit-item {
+		padding: 0 30rpx;
+		background-color: #FFF;
+		line-height: 1;
+
+		.list {
+			border-bottom: 2px solid $page-color-base;
+			padding: 30rpx 0;
+
+			.content {
+				width: 0;
+				flex-grow: 1;
+
+				.title {
+					font-size: $font-lg;
+					font-weight: bold;
+				}
+
+				.type-list {
+					padding-top: 30rpx;
+					font-size: $font-sm;
+					color: $font-color-base;
+
+					.ls {
+						width: 33%;
+					}
+				}
+			}
+		}
+	}
+
+	.buttomBox {
+		border-radius: 20rpx;
+		margin: 0 $page-row-spacing;
+		margin-bottom: 30rpx;
+		color: $font-color-dark;
+		background-color: #FFFFFF;
+		overflow: hidden;
+
+		.item {
+			line-height: 100rpx;
+			height: 100rpx;
+			text-align: center;
+			font-size: 32rpx;
+			color: $base-color;
+
+			&.qx {
+				color: $color-red;
+			}
+		}
+
+		.border_b {
+			border-bottom: 1px solid $page-color-light;
+		}
+	}
+</style>

+ 256 - 0
pages/water/myWaterList.vue

@@ -0,0 +1,256 @@
+<template>
+	<view class="good-list">
+		<uni-nav-bar class="nav" @clickLeft='back' :border='false' backgroundColor='transparent' leftIcon='left'
+			color='#FFF' title="我的水票" />
+		<view class="content-money">
+			<view class="conetnt-box">
+				<view class="money-box">
+					<view class="money">{{ allNumber }}</view>
+					<view class="text">剩余总数</view>
+				</view>
+				<navigator url="./waterUse">
+					<view class="topDetail">
+						使用记录
+					</view>
+				</navigator>
+			</view>
+		</view>
+
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 空白页 -->
+			<!-- #ifdef H5 -->
+			<empty src="../../static/error/emptyMyCart.png"
+				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
+			</empty>
+			<!-- #endif -->
+			<!-- #ifndef H5 -->
+			<empty src="../static/error/emptyMyCart.png"
+				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
+			</empty>
+			<!-- #endif -->
+			<view class="good flex" v-for="item in navList[tabCurrentIndex].orderList">
+				<image :src="item.product.image" mode="" class="good-image"></image>
+				<view class="right">
+					<view class="good-name ">
+						<view class="clamp2">
+							{{item.product.store_name}}
+						</view>
+					</view>
+					<view class="good-key">
+						{{item.product.keyword}}
+					</view>
+					<view class="good-price">
+						剩余<text class="num">{{item.certificate_num}}</text>张
+					</view>
+				</view>
+			</view>
+			<uni-load-more v-if="navList[tabCurrentIndex].orderList.length>0" :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+		</scroll-view>
+
+	</view>
+</template>
+
+<script>
+	import {
+		certificate
+	} from '@/api/water.js';
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}]
+			};
+		},
+		computed: {
+			allNumber() {
+				const item = this.navList[0].orderList;
+				let num = 0;
+				for (let i = 0; i < item.length; i++) {
+					num += item[i].certificate_num
+				}
+				return num
+			}
+		},
+		onReachBottom() {
+			this.getGoodList();
+		},
+		onLoad: function(option) {
+			this.getGoodList();
+		},
+		methods: {
+			// 返回退回
+			back() {
+				uni.reLaunch({
+					url: '/pages/home/user'
+				})
+			},
+			// 加载数据
+			getGoodList(source) {
+				//这里是将订单挂载到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';
+
+				certificate({})
+					.then(({
+						data
+					}) => {
+						let arr = data.data
+						console.log(arr, 'arr');
+						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);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+		}
+	};
+</script>
+
+
+<style lang="scss">
+	.good-list {
+		width: 750rpx;
+		height: 100%;
+
+		.good {
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
+			width: 100%;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			padding: 20rpx;
+
+			.good-image {
+				width: 180rpx;
+				height: 180rpx;
+				background-color: #eee;
+				border-radius: 10rpx;
+				flex-shrink: 0;
+
+			}
+
+			.right {
+				height: 180rpx;
+				position: relative;
+
+				.good-name {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					padding-left: 20rpx;
+				}
+
+				.good-key {
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+					padding-left: 20rpx
+				}
+
+				.good-price {
+					font-size: 28rpx;
+					font-weight: bold;
+					position: absolute;
+					bottom: 0rpx;
+					padding: 0 20rpx;
+					left: 0;
+					right: 0rpx;
+
+					.num {
+						color: $color-red;
+					}
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		height: calc(100% - 200px - var(--status-bar-height));
+		padding: 20rpx;
+	}
+
+	.nav {
+		position: fixed;
+		top: 0;
+		right: 0;
+		left: 0;
+		z-index: 998;
+	}
+
+	.content-money {
+		position: relative;
+		padding: 20rpx;
+		padding-top: var(--status-bar-height);
+		background: url('../../static/image/mywater.png') no-repeat;
+		background-size: 100% 100%;
+		height: 200px;
+
+		.topDetail {
+			position: absolute;
+			right: 0;
+			top: calc(70px + var(--status-bar-height));
+			background-color: #FFF;
+			padding: 5px 10px;
+			border-top-left-radius: 10rpx;
+			border-bottom-left-radius: 10rpx;
+			line-height: 1;
+			color: $base-color;
+			font-size: $font-base;
+		}
+
+		.money-box {
+			padding-top: 80px;
+			text-align: center;
+			color: #FFF;
+
+			.text {
+				font-size: $font-base;
+			}
+
+			.money {
+				font-weight: bold;
+				font-size: 82rpx;
+			}
+		}
+	}
+	/deep/ .empty-content{
+		background: transparent;
+		position: absolute;
+	}
+</style>

+ 566 - 0
pages/water/waterDetail.vue

@@ -0,0 +1,566 @@
+<template>
+	<view class="good-list">
+		<view class="good flex">
+			<image :src="item.image" mode="" class="good-image"></image>
+			<view class="right">
+				<view class="good-name ">
+					<view class="clamp2">
+						{{item.title}}
+					</view>
+				</view>
+				<view class="good-key">
+					{{item.keyword}}
+				</view>
+				<view class="good-price flex" v-if="item.specifications">
+					<view class="price">
+						¥{{item.price}}
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="attr-list" v-if="item.specifications">
+			<text>选择规格分类</text>
+			<view class="item-list flex">
+				<text class="tit " @click="key=ind" :class="{selected:key==ind}"
+					v-for="(item,ind) in item.specifications">
+					{{item.attr_name}}
+				</text>
+			</view>
+		</view>
+
+		<view class="yt-list">
+			<view class="yt-list-cell b-b" @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>
+			<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" v-if="item.specifications">{{ item.specifications[key].price }}</text>
+			</view>
+			<text class="submit" :class="{submitNo:payLoding}" @click="payLoding?'':cardAdd()">提交订单</text>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		waterDetail
+	} from '@/api/water.js';
+	import {
+		cartAdd
+	} from '@/api/product.js';
+	import {
+		confirm,
+		createOrderkey,
+		orderPay
+	} from '@/api/order.js';
+	import {
+		getUserInfo
+	} from '@/api/user.js';
+	export default {
+		data() {
+			return {
+				id: '',
+				//详情
+				item: {},
+				key: 0, //选中的数据对象
+				payLoding: false,
+				payType: 'weixin',
+				now_money: '' //微信余额
+			};
+		},
+		onReachBottom() {
+			this.getGoodList();
+		},
+		onLoad: function(option) {
+			this.id = option.id
+			this.getGoodList();
+			this.userinfo();
+		},
+		methods: {
+			// 加载用户基础信息
+			userinfo() {
+				getUserInfo({}).then(({
+					data
+				}) => {
+					this.now_money = data.now_money;
+				});
+			},
+			// 加载数据
+			getGoodList(source) {
+				const that = this;
+				waterDetail({
+						id: this.id
+					})
+					.then(({
+						data
+					}) => {
+						that.item = data.storeInfo;
+						console.log(data);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+			// 添加到购物车
+			async cardAdd() {
+				let obj = this;
+				// 判断是否余额不足
+				if (obj.payType == 'yue' && +obj.now_money < obj.payPrice) {
+					uni.showModal({
+						title: '提示',
+						content: '账户余额不足!',
+						showCancel: false,
+					});
+					return;
+				}
+				uni.showLoading({
+					title: '创建订单中',
+					mask: true
+				})
+				// 支付中
+				obj.payLoding = true;
+				try {
+					// 创建购物车传值对象
+					let cardData = {
+						cartNum: obj.item.specifications[obj.key].num, //商品数量
+						productId: obj.item.product_id, //商品编号
+						certificate_id: obj.item.id, //水票id
+						new: 1
+					};
+					// 加入购物车
+					const cartDetail = await cartAdd(cardData);
+					// 获取订单Key
+					const orderGet = await confirm({
+						cartId: cartDetail.data.cartId+'',
+						certificate_id: obj.item.id, //水票id
+					});
+					// 创建订单
+					const {
+						data,
+						status,
+						msg
+					} = await createOrderkey({
+						payType: obj.payType, //支付类型  weixin-微信 yue-余额
+						certificate_id: obj.item.id, //水票id
+						// #ifdef H5
+						from: 'weixin', //来源
+						// #endif
+						// #ifdef MP-WEIXIN
+						from: 'routine', //来源
+						// #endif
+						// #ifdef APP-PLUS
+						from: 'app', //来源
+						// #endif
+					}, orderGet.data.orderKey)
+					// 判断是否支付失败
+					if (data.status == 'ORDER_EXIST') {
+						uni.showModal({
+							title: '提示',
+							content: msg,
+							showCancel: false
+						});
+						uni.hideLoading();
+						obj.payLoding = false;
+						return;
+					}
+					// 判断是否为余额支付
+					if (obj.payType == 'yue') {
+						if (status == 200 && data.status == 'SUCCESS') {
+							obj.paySuccessTo();
+						} else {
+							uni.showModal({
+								title: '提示',
+								content: msg,
+								showCancel: false
+							});
+							uni.hideLoading();
+							obj.payLoding = false;
+						}
+					} else {
+						// 订单支付创建
+						const order = orderPay({
+							uni: data.result.orderId,
+							// #ifdef H5
+							from: 'weixin', //来源
+							// #endif
+							// #ifdef MP-WEIXIN
+							from: 'routine', //来源
+							// #endif
+							// #ifdef APP-PLUS
+							from: 'app', //来源
+							// #endif
+							paytype: obj.payType //支付类型  weixin-微信 yue-余额
+						})
+						obj.successOrder(order)
+					}
+				} catch (e) {
+					uni.showModal({
+						title: '提示',
+						content: e.message||e.msg,
+						showCancel: false
+					});
+					obj.payLoding = false;
+					uni.hideLoading();
+				}
+			},
+			//订单支付创建成功回调处理
+			successOrder(e) {
+				const obj = this;
+				// 判断是否微信小程序支付
+				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;
+			},
+			//支付成功调用方法
+			paySuccessTo(){
+				const that = this;
+				uni.hideLoading();
+				uni.showModal({
+					title: '提示',
+					content: '购买成功是否继续购买',
+					cancelText: '返回',
+					confirmText: '确定',
+					success: res => {
+						if(res.cancel){
+							uni.reLaunch({
+								url:'/pages/home/index'
+							})
+						}else{
+							uni.reLaunch({
+								url:'/pages/water/waterList'
+							})
+						}
+					},
+					fail: () => {},
+					complete: () => {}
+				});
+				that.payLoding = false;
+			}
+		}
+	};
+</script>
+
+
+<style lang="scss">
+	.good-list {
+		padding: 20rpx 28rpx;
+		width: 750rpx;
+
+		.good {
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
+			width: 100%;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			padding: 20rpx;
+
+			.good-image {
+				width: 180rpx;
+				height: 180rpx;
+				background-color: #eee;
+				border-radius: 10rpx;
+				flex-shrink: 0;
+
+			}
+
+			.right {
+				height: 180rpx;
+				position: relative;
+				width: 100%;
+				flex-shrink: 1;
+
+				.good-name {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					padding-left: 20rpx;
+				}
+
+				.good-key {
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+					padding-left: 20rpx
+				}
+
+				.good-price {
+					display: flex;
+					justify-content: space-between;
+					align-items: flex-end;
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF1A1A;
+					position: absolute;
+					bottom: 0rpx;
+					padding: 0 20rpx;
+					left: 0;
+					right: 0rpx;
+				}
+			}
+		}
+	}
+
+	.attr-list {
+		display: flex;
+		flex-direction: column;
+		font-size: $font-base + 2rpx;
+		color: $font-color-base;
+		font-weight: bold;
+
+		.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: #FCEFF1;
+				color: $color-red;
+				border: 1px solid $color-red;
+			}
+		}
+	}
+
+	.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;
+			color: $color-red;
+		}
+
+		.price {
+			font-size: 36rpx;
+			color: $color-red;
+		}
+
+		.submit {
+			display: flex;
+			align-items: center;
+			justify-content: center;
+			width: 280rpx;
+			height: 100%;
+			color: #fff;
+			font-size: 32rpx;
+			background: $bg-gradual;
+
+			&.submitNo {
+				background-color: $font-color-disabled;
+			}
+		}
+	}
+
+	.yt-list {
+		background: #fff;
+		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;
+			}
+		}
+	}
+</style>

+ 175 - 0
pages/water/waterList.vue

@@ -0,0 +1,175 @@
+<template>
+	<view class="good-list">
+		<view class="good flex" v-for="item in navList[tabCurrentIndex].orderList">
+			<image :src="item.image" mode="" class="good-image"></image>
+			<view class="right">
+				<view class="good-name ">
+					<view class="clamp2">
+						{{item.store_name}}
+					</view>
+				</view>
+				<view class="good-key">
+					{{item.keyword}}
+				</view>
+				<view class="good-price flex">
+					<view class="price">
+						¥{{item.price}}/{{item.unit_name}}
+					</view>
+					<navigator :url="'/pages/water/waterDetail?id='+item.id">
+						<view class="xl">
+							立即购买
+						</view>
+					</navigator>
+				</view>
+			</view>
+		</view>
+		<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+	</view>
+</template>
+
+<script>
+	import {
+		waterList
+	} from '@/api/water.js';
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}]
+			};
+		},
+		onReachBottom() {
+			this.getGoodList();
+		},
+		onLoad: function(option) {
+			this.getGoodList();
+		},
+		methods: {
+			// 加载数据
+			getGoodList(source) {
+				//这里是将订单挂载到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';
+
+				waterList({
+						car_number: this.id,
+						page: navItem.page,
+						limit: navItem.limit
+					})
+					.then(({
+						data
+					}) => {
+						let arr = data.data.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);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+		}
+	};
+</script>
+
+
+<style lang="scss">
+	.good-list {
+		padding: 20rpx 28rpx;
+		width: 750rpx;
+
+		.good {
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
+			width: 100%;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			padding: 20rpx;
+
+			.good-image {
+				width: 180rpx;
+				height: 180rpx;
+				background-color: #eee;
+				border-radius: 10rpx;
+				flex-shrink: 0;
+
+			}
+
+			.right {
+				height: 180rpx;
+				position: relative;
+
+				.good-name {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					padding-left: 20rpx;
+				}
+
+				.good-key {
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+					padding-left: 20rpx
+				}
+
+				.good-price {
+					display: flex;
+					justify-content: space-between;
+					align-items: flex-end;
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #FF1A1A;
+					position: absolute;
+					bottom: 0rpx;
+					padding: 0 20rpx;
+					left: 0;
+					right: 0rpx;
+
+					.xl {
+						background: linear-gradient(90deg, #3C82E6, #5395F5);
+						border-radius: $font-base;
+						padding: 10rpx 20rpx;
+						color: #fff;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 338 - 0
pages/water/waterUse.vue

@@ -0,0 +1,338 @@
+<template>
+	<view class="good-list">
+		<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
+			<!-- 空白页 -->
+			<!-- #ifdef H5 -->
+			<empty src="../../static/error/emptyMyCart.png"
+				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
+			</empty>
+			<!-- #endif -->
+			<!-- #ifndef H5 -->
+			<empty src="../static/error/emptyMyCart.png"
+				v-if="navList[tabCurrentIndex].loaded === true && navList[tabCurrentIndex].orderList.length === 0">
+			</empty>
+			<!-- #endif -->
+			<view @click="navTo( '/pages/order/orderDetail?id=' + item.order_id )"
+				v-for="(item, index) in navList[tabCurrentIndex].orderList" :key="index" class="order-item position-relative">
+				<view class="i-top b-b flex">
+					<view class="order-code flex">
+						<view class="no">
+							订单编号:
+						</view>
+						<view>
+							{{ item.order_id }}
+						</view>
+					</view>
+					<text class="font-size-sm font-color-gray" >已完成</text>
+				</view>
+				<scroll-view class="goods-box" scroll-x>
+					<view class="goods-item">
+						<image class="goods-img" :src="item.cart_info.productInfo.image" mode="aspectFill">
+						</image>
+						<view class="good-name clamp">
+							{{item.cart_info.productInfo.attrInfo.suk}}*{{item.cart_info.cart_num}}
+						</view>
+					</view>
+				</scroll-view>
+				<view class="info-info">
+					<view class="js">
+						<!-- 共{{item.cartInfo.length}}件 -->
+					</view>
+					<view class="hj">
+						合计:{{+item.number}}/张
+					</view>
+				</view>
+				<!-- 底部操作栏 -->
+				<view class="btm-btn-wrap flex">
+					<view class="btm-left">
+						下单时间:{{item.day}}
+					</view>
+					<view class="btm-right flex">
+					</view>
+				</view>
+			</view>
+			<uni-load-more :status="navList[tabCurrentIndex].loadingType"></uni-load-more>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import {
+		use_certificate
+	} from '@/api/water.js';
+	export default {
+		data() {
+			return {
+				tabCurrentIndex: 0,
+				navList: [{
+					state: 0,
+					text: '全部',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}]
+			};
+		},
+		computed: {
+			allNumber() {
+				const item = this.navList[0].orderList;
+				let num = 0;
+				for (let i = 0; i < item.length; i++) {
+					num += item[i].certificate_num
+				}
+				return num
+			}
+		},
+		onReachBottom() {
+			this.getGoodList();
+		},
+		onLoad: function(option) {
+			this.getGoodList();
+		},
+		methods: {
+			// 返回退回
+			back() {
+				uni.reLaunch({
+					url: '/pages/home/user'
+				})
+			},
+			// 加载数据
+			getGoodList(source) {
+				//这里是将订单挂载到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';
+
+				use_certificate({
+							page: navItem.page,
+							limit: navItem.limit
+						})
+					.then(({
+						data
+					}) => {
+						let arr = data.data
+						console.log(arr,'arr');
+						navItem.orderList = navItem.orderList.concat(arr);
+						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);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			},
+		}
+	};
+</script>
+
+
+<style lang="scss">
+	.good-list {
+		width: 750rpx;
+		height: 100%;
+
+		.good {
+			background: #FFFFFF;
+			box-shadow: 0px 0px 20px 0px rgba(50, 50, 52, 0.06);
+			width: 100%;
+			border-radius: 14rpx;
+			margin-bottom: 20rpx;
+			position: relative;
+			padding: 20rpx;
+
+			.good-image {
+				width: 180rpx;
+				height: 180rpx;
+				background-color: #eee;
+				border-radius: 10rpx;
+				flex-shrink: 0;
+
+			}
+
+			.right {
+				height: 180rpx;
+				position: relative;
+
+				.good-name {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: #333333;
+					padding-left: 20rpx;
+				}
+
+				.good-key {
+					font-size: 22rpx;
+					font-weight: 500;
+					color: #999999;
+					padding-left: 20rpx
+				}
+
+				.good-price {
+					font-size: 28rpx;
+					font-weight: bold;
+					position: absolute;
+					bottom: 0rpx;
+					padding: 0 20rpx;
+					left: 0;
+					right: 0rpx;
+					.num{
+						color:$color-red;
+					}
+				}
+			}
+		}
+	}
+
+	.list-scroll-content {
+		height: calc(100% - 200px - var(--status-bar-height));
+		padding: 20rpx;
+	}
+	.order-item {
+		padding-left: 30rpx;
+		padding-right: 30rpx;
+		margin: 0 30rpx;
+		margin-bottom: 30rpx;
+		border-radius: 30rpx;
+		background: #fff;
+		color: #A8ADBF;
+	
+		.i-top {
+			height: 80rpx;
+			.order-code{
+				font-size: $font-sm;
+				.no{
+					padding: 10rpx 10rpx;
+					background-color: #FFEAE5;
+					color: #FD5B23;
+					line-height: 1;
+					border-top-right-radius: 10rpx;
+					border-bottom-left-radius: 10rpx;
+					margin-right: 10rpx;
+					
+				}
+			}
+			
+			.del-btn {
+				padding: 10rpx 0 10rpx 36rpx;
+				font-size: $font-lg;
+				position: relative;
+	
+				&:after {
+					content: '';
+					width: 0;
+					height: 30rpx;
+					border-left: 1px solid $border-color-dark;
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	
+		.info-info {
+			width: 215rpx;
+			height: 200rpx;
+			position: absolute;
+			top: 80rpx;
+			right: 35rpx;
+			display: flex;
+			flex-direction: column;
+			justify-content: flex-end;
+			align-items: flex-end;
+			font-size: 30rpx;
+			font-weight: 500;
+	
+			.hj {
+				padding-top: 40rpx;
+				color: $font-color-dark;
+				padding-bottom: 20rpx;
+			}
+		}
+	
+		/* 多条商品 */
+		.goods-box {
+			height: 200rpx;
+			padding: 20rpx 0;
+			white-space: nowrap;
+			padding-right: 250rpx;
+	
+			.goods-item {
+				width: 120rpx;
+				height: 180rpx;
+				display: inline-block;
+				margin-right: 24rpx;
+			}
+	
+			.goods-img {
+				display: block;
+				width: 120rpx;
+				height: 120rpx;
+			}
+	
+			.good-name {
+				font-size: 24rpx;
+				text-align: center;
+				width: 120rpx;
+				padding-top: 10rpx;
+				margin-right: 0;
+				color: $font-color-dark;
+			}
+		}
+	
+		.btm-btn-wrap {
+			height: 90rpx;
+			width: 100%;
+			font-size: 24rpx;
+			font-weight: 500;
+			color: #A3A8BB;
+			line-height: 1;
+	
+			.btm-right {
+				justify-content: flex-end;
+			}
+	
+			.btm-btn {
+				width: 144rpx;
+				padding: 10rpx 0;
+				border: 2px solid #ededed;
+				border-radius: 28rpx;
+				font-size: 26rpx;
+				font-weight: 500;
+				text-align: center;
+				margin-left: 10rpx;
+				color: #999999;
+			}
+	
+			.ksps {
+				border-color: #4589ec;
+				color: #4589ec;
+			}
+		}
+	}
+
+</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'))
+    })
+}

File diff suppressed because it is too large
+ 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


+ 490 - 0
static/css/cmy.css

@@ -0,0 +1,490 @@
+/*初始化类*/
+@font-face {
+	font-family: 'iconfont';
+	/* project id 1482221 */
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot');
+	src: url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.eot?#iefix') format('embedded-opentype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff2') format('woff2'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.woff') format('woff'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.ttf') format('truetype'),
+		url('https://at.alicdn.com/t/font_1482221_x9emymthrxs.svg#iconfont') format('svg');
+}
+
+.iconfont {
+	font-family: "iconfont" !important;
+	font-size: 34rpx;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-webkit-text-stroke-width: 0rpx;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+.iconedit:before {
+	content: "\e649";
+}
+
+.iconfavorfill:before {
+	content: "\e64b";
+}
+
+.iconfavor:before {
+	content: "\e64c";
+}
+
+.iconfold:before {
+	content: "\e6de";
+}
+
+.iconunfold:before {
+	content: "\e661";
+}
+
+.iconenter:after {
+	content: "\e6f8";
+}
+
+.iconlocation:before {
+	content: "\e651";
+}
+
+.iconroundcheckfill:before {
+	content: "\e656";
+}
+
+.iconroundcheck:before {
+	content: "\e657";
+}
+
+.iconlikefill:before {
+	content: "\e668";
+}
+
+.iconlike:before {
+	content: "\e669";
+}
+
+.iconshop:before {
+	content: "\e676";
+}
+
+.iconcart:before {
+	content: "\e6af";
+}
+
+.icondelete:before {
+	content: "\e6b4";
+}
+
+.iconhome:before {
+	content: "\e6b8";
+}
+
+.iconcartfill:before {
+	content: "\e6b9";
+}
+
+.iconhomefill:before {
+	content: "\e6bb";
+}
+
+.iconlock:before {
+	content: "\e6c0";
+}
+
+.iconfriendadd:before {
+	content: "\e6ca";
+}
+
+.iconapps:before {
+	content: "\e729";
+}
+
+.iconadd:before {
+	content: "\e767";
+}
+
+.iconmove:before {
+	content: "\e768";
+}
+
+.icontriangledownfill:before {
+	content: "\e79b";
+}
+
+.icontriangleupfill:before {
+	content: "\e79c";
+}
+
+.iconshaixuan:before {
+	content: "\e74a";
+}
+
+.iconyanzhengma:before {
+	content: "\e684";
+}
+
+.iconjifen:before {
+	content: "\e60f";
+}
+
+.iconwuliuxinxi:before {
+	content: "\e62b";
+}
+
+.iconmessage:before {
+	content: "\e78a";
+}
+
+.iconsetting:before {
+	content: "\e78e";
+}
+
+.iconaddition:before {
+	content: "\e6e0";
+}
+
+.iconclose:before {
+	content: "\e6e9";
+}
+
+
+.iconprompt:before {
+	content: "\e71b";
+}
+
+.iconreturn:before {
+	content: "\e720";
+}
+
+.iconsearch:before {
+	content: "\e741";
+}
+
+.iconpengyouquan:before {
+	content: "\e62c";
+}
+
+.iconweixin:before {
+	content: "\e60e";
+}
+
+.iconzhifubao:before {
+	content: "\e673";
+}
+
+.iconyue:before {
+	content: "\e618";
+}
+
+.iconweixin1:before {
+	content: "\e622";
+}
+
+.iconlock1:before {
+	content: "\e64d";
+}
+
+.iconuser:before {
+	content: "\e64e";
+}
+
+.iconchenggongtixianshouyi:before {
+	content: "\e64f";
+}
+
+.iconviptuiguangdingdan:before {
+	content: "\e650";
+}
+
+.icondaifukuan:before {
+	content: "\e652";
+}
+
+.icondaijiesuanshouyi:before {
+	content: "\e653";
+}
+
+.icondaidakuanshouyi:before {
+	content: "\e654";
+}
+
+.icondaifahuo:before {
+	content: "\e655";
+}
+
+.icondaishouhuoshouyi:before {
+	content: "\e658";
+}
+
+.icondaishouhuo:before {
+	content: "\e659";
+}
+
+.iconwuxiaoshouyi:before {
+	content: "\e65a";
+}
+
+.icontixianmingxi:before {
+	content: "\e65b";
+}
+
+.iconshouyi:before {
+	content: "\e65c";
+}
+
+.iconkouchutixianshouxufei:before {
+	content: "\e65d";
+}
+
+.iconyishenqingshouyi:before {
+	content: "\e65e";
+}
+
+.icontuihuanhuo:before {
+	content: "\e65f";
+}
+
+.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;
+}

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