hwq 2 anos atrás
pai
commit
490ab2c4f9
100 arquivos alterados com 5623 adições e 8579 exclusões
  1. 4 0
      .hbuilderx/launch.json
  2. 1 0
      App.vue
  3. 58 217
      api/activity.js
  4. 13 4
      api/functionalUnit.js
  5. 12 11
      api/order.js
  6. 25 1
      api/user.js
  7. 108 0
      components/sunui-grand/sunui-grand.vue
  8. 111 112
      components/uni-rate/uni-rate.vue
  9. 33 0
      js_sdk/xb-copy/uni-copy.js
  10. 11 6
      main.js
  11. 29 23
      manifest.json
  12. 89 37
      pages.json
  13. 0 267
      pages/activity/bargain/index.vue
  14. 0 172
      pages/activity/goods_bargain/index.vue
  15. 0 726
      pages/activity/goods_bargain_details/index.vue
  16. 200 0
      pages/index/coupon.vue
  17. 96 0
      pages/index/detail.vue
  18. 526 449
      pages/index/index.vue
  19. 0 177
      pages/index/sign.vue
  20. 9 5
      pages/money/pay.vue
  21. 53 50
      pages/money/paySuccess.vue
  22. 11 11
      pages/order/createOrder.vue
  23. 177 26
      pages/order/evaluate.vue
  24. 14 15
      pages/order/order.vue
  25. 5 5
      pages/product/classify.vue
  26. 11 12
      pages/product/common/productBottom.vue
  27. 5 6
      pages/product/common/productContent.vue
  28. 0 386
      pages/product/groupBooking/detail.vue
  29. 0 236
      pages/product/groupBooking/index.vue
  30. 0 75
      pages/product/groupBooking/inviteImg.vue
  31. 0 2094
      pages/product/groupBooking/productCollage.vue
  32. 0 934
      pages/product/groupBooking/productGroup.vue
  33. 0 404
      pages/product/seckill.vue
  34. 13 18
      pages/public/register.vue
  35. 194 230
      pages/public/wxLogin.vue
  36. 165 52
      pages/set/userinfo.vue
  37. 0 305
      pages/user/award.vue
  38. 16 14
      pages/user/coupon.vue
  39. 348 0
      pages/user/creation.vue
  40. 575 0
      pages/user/evaluate.vue
  41. 0 156
      pages/user/favorites.vue
  42. 295 0
      pages/user/living.vue
  43. 102 0
      pages/user/new.vue
  44. 0 153
      pages/user/notice.vue
  45. 0 200
      pages/user/scoreAccumulate.vue
  46. 108 248
      pages/user/shareQrCode.vue
  47. 330 413
      pages/user/user.vue
  48. 0 321
      pages/user/withdrawal.vue
  49. 418 0
      pages/zc/plDetail.vue
  50. 291 0
      pages/zc/plshare.vue
  51. 427 0
      pages/zc/wzDetail.vue
  52. 291 0
      pages/zc/wzshare.vue
  53. 440 0
      pages/zc/zc.vue
  54. BIN
      static/icon/bj.png
  55. BIN
      static/icon/c3.png
  56. BIN
      static/icon/c5.png
  57. BIN
      static/icon/c6.png
  58. BIN
      static/icon/c7.png
  59. BIN
      static/icon/c8.png
  60. BIN
      static/icon/pyq.png
  61. BIN
      static/icon/sc.png
  62. BIN
      static/icon/share1.png
  63. BIN
      static/icon/share2.png
  64. BIN
      static/icon/share3.png
  65. BIN
      static/icon/share4.png
  66. BIN
      static/icon/sharejt.png
  67. BIN
      static/icon/u1.png
  68. BIN
      static/icon/u2.png
  69. BIN
      static/icon/u3.png
  70. BIN
      static/icon/u4.png
  71. BIN
      static/icon/u5.png
  72. BIN
      static/icon/wxhy.png
  73. BIN
      static/icon/zan.png
  74. BIN
      static/icon/zanguo.png
  75. BIN
      static/img/bargainBg.jpg
  76. BIN
      static/img/bo.png
  77. BIN
      static/img/delete.png
  78. BIN
      static/img/deletes.png
  79. BIN
      static/img/img009.png
  80. BIN
      static/img/img010.png
  81. BIN
      static/img/img07.png
  82. BIN
      static/img/img08.png
  83. BIN
      static/img/img10.png
  84. BIN
      static/img/img14.jpg
  85. BIN
      static/img/living.png
  86. BIN
      static/img/paySuccess.png
  87. BIN
      static/img/share.png
  88. BIN
      static/img/vip-card-bg.png
  89. BIN
      static/tabBar/dingdan.png
  90. BIN
      static/tabBar/home.png
  91. BIN
      static/tabBar/tab-cart-current.png
  92. BIN
      static/tabBar/tab-cart.png
  93. BIN
      static/tabBar/tab-cate-current.png
  94. BIN
      static/tabBar/tab-cate.png
  95. BIN
      static/tabBar/tab-home-current.png
  96. BIN
      static/tabBar/tab-home.png
  97. BIN
      static/tabBar/tab-my-current.png
  98. BIN
      static/tabBar/tab-my.png
  99. 6 6
      store/index.js
  100. 3 2
      uni.scss

+ 4 - 0
.hbuilderx/launch.json

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

+ 1 - 0
App.vue

@@ -76,6 +76,7 @@ export default {
 <style lang="scss">
 /*全局公共样式和字体图标*/
 @import '/static/css/cmy.css';
+@import 'uview-ui/index.scss';
 view,
 scroll-view,
 swiper,

+ 58 - 217
api/activity.js

@@ -1,276 +1,117 @@
 import request from "@/utils/request.js";
-/**
- * 
- * 所有活动接口 包括:拼团,砍价,秒杀
- * 
-*/
-// 砍价产品详情
-export function getBargainDetail(data,id) {
+
+// 删除草稿
+export function delete_comment(data, id) {
 	return request({
-		url: '/api/bargain/detail/' + id,
-		method: 'get',
+		url: '/api/order/delete_comment/' + id,
+		method: 'post',
 		data
 	});
 }
 
-/**
- * 砍价产品详情
- */
-// export function getBargainDetail(id) {
-//   return request.get("bargain/detail/" + id);
-// }
-
-//砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
-export function postBargainHelpCount(data) {
+// 保存草稿
+export function save_comment(data) {
 	return request({
-		url: '/api/bargain/help/count',
+		url: '/api/order/save_comment',
 		method: 'post',
 		data
 	});
 }
 
-/**
- * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格
- */
-// export function postBargainHelpCount(data) {
-//   return request.post("bargain/help/count", data);
-// }
-
-//砍价 开启砍价用户信息
-export function postBargainStartUser(data) {
+// 我的评价详情
+export function my_reply(data, id) {
 	return request({
-		url: '/api/bargain/start/user',
-		method: 'post',
+		url: '/api/reply/my/' + id,
+		method: 'get',
 		data
 	});
 }
 
-/**
- * 砍价 开启砍价用户信息
- */
-// export function postBargainStartUser(data) {
-//   return request.post("bargain/start/user", data);
-// }
-
-//砍价开启
-export function postBargainStart(data) {
+// 我的评价
+export function my_replylist(data) {
 	return request({
-		url: '/api/bargain/start',
-		method: 'post',
+		url: '/api/reply/my',
+		method: 'get',
 		data
 	});
 }
 
-/**
- * 砍价开启
- */
-// export function postBargainStart(bargainId) {
-//   return request.post("bargain/start", { bargainId: bargainId});
-// }
-
-// 砍价 砍掉金额
-export function postBargainHelpPrice(data) {
+// 评价详情
+export function reply_detail(data, id) {
 	return request({
-		url: '/api/bargain/help/price',
-		method: 'post',
+		url: '/api/reply/detail/' + id,
+		method: 'get',
 		data
 	});
 }
 
-/**
- * 砍价 砍掉金额
- */
-// export function postBargainHelpPrice(data) {
-//   return request.post("bargain/help/price", data);
-// }
-
-// 砍价 帮助好友砍价
-export function postBargainHelp(data) {
+// 评价点赞
+export function reply_good(data, id) {
 	return request({
-		url: '/api/bargain/help',
+		url: '/api/reply/good/' + id,
 		method: 'post',
 		data
 	});
 }
 
-/**
- * 砍价 帮助好友砍价
- */
-// export function postBargainHelp(data) {
-//   return request.post("bargain/help", data);
-// }
-
-// 砍价 砍价帮
-export function postBargainHelpList(data) {
+// 文章点赞
+export function article_good(data, id) {
 	return request({
-		url: '/api/bargain/help/list',
+		url: '/api/article/good/' + id,
 		method: 'post',
 		data
 	});
 }
 
-
-/**
- * 砍价 砍价帮
- */
-// export function postBargainHelpList(data) {
-//   return request.post("bargain/help/list", data);
-// }
-
-// 砍价 观看/分享/参与次数
-export function postBargainShare(data) {
+//  我的草稿详情
+export function reply_save(data, id) {
 	return request({
-		url: '/api/bargain/share',
-		method: 'post',
+		url: '/api/reply/save/' + id,
+		method: 'get',
 		data
 	});
 }
 
-/**
- * 砍价 观看/分享/参与次数
- */
-// export function postBargainShare(bargainId) {
-//   return request.post("bargain/share", { bargainId: bargainId});
-// }
-
-// 砍价列表(已参与)
-export function getBargainUserList(data) {
+// 我的草稿 
+export function reply_savelist(data) {
 	return request({
-		url: '/api/bargain/user/list',
+		url: '/api/reply/save',
 		method: 'get',
 		data
 	});
 }
 
-/**
- * 
- * 砍价列表(已参与)
- * @param object data
-*/
-// export function getBargainUserList(data){
-//   return request.get('bargain/user/list',data);
-// }
-
-// 砍价取消
-export function getBargainUserCancel(data) {
+// 直播列表
+export function live(data) {
 	return request({
-		url: '/api/bargain/user/cancel',
-		method: 'post',
+		url: '/api/wechat/live',
+		method: 'get',
 		data
 	});
 }
 
-/**
- * 砍价取消
- */
-// export function getBargainUserCancel(data) {
-//   return request.post("/bargain/user/cancel", data);
-// }
-
-
-
-
-
-/**
- * 拼团列表
- * 
-*/
-export function getCombinationList(data) {
-  return request.get('combination/list', data,{noAuth:true});
-}
-
-/**
- * 拼团详情
- * 
-*/
-export function getCombinationDetail(id) {
-  return request.get('combination/detail/'+id);
-}
-
-/**
- * 拼团 开团
- */
-export function getCombinationPink(id) {
-  return request.get("combination/pink/" + id);
-}
-
-/**
- * 拼团 取消开团
- */
-export function postCombinationRemove(data) {
-  return request.post("combination/remove",data);
-}
-
-/**
- * 砍价列表
- */
-export function getBargainList(data) {
-  return request.get("bargain/list", data,{noAuth:true});
-}
-
-
-/**
- * 
- * 取消砍价
- * @param int bargainId
-*/
-export function bargainUserCancel(bargainId){
-  return request.post('bargain/user/cancel', { bargainId: bargainId})
-}
-
-/**
- * 秒杀产品时间区间
- * 
-*/
-export function getSeckillIndexTime(){
-  return request.get('seckill/index',{},{noAuth:true});
-}
-
-/**
- * 秒杀产品列表
- * @param int time
- * @param object data
-*/
-export function getSeckillList(time,data){
-  return request.get('seckill/list/'+time,data,{noAuth:true});
-}
-
-/**
- * 秒杀产品详情
- * @param int id
-*/
-export function getSeckillDetail(id){
-  return request.get('seckill/detail/'+id);
-}
-
-/**
- * 砍价海报
- * @param object data
- * 
-*/
-export function getBargainPoster(data){
-  return request.post('bargain/poster',data)
-}
-
-/**
- * 拼团海报
- * @param object data
- * 
-*/
-export function getCombinationPoster(data){
-  return request.post('combination/poster',data)
+// 生成链接
+export function short_link(data) {
+	return request({
+		url: '/api/wechat/short_link',
+		method: 'post',
+		data
+	});
 }
 
-/**
- * 获取秒杀小程序二维码
- */
-export function seckillCode(id,data) {
-  return request.get("seckill/code/"+id,data);
+// 分享海报
+export function reply_poster(data, id) {
+	return request({
+		url: '/api/reply/poster/' + id,
+		method: 'post',
+		data
+	});
 }
-
-/**
- * 获取拼团小程序二维码
- */
-export function scombinationCode(id) {
-  return request.get("combination/code/"+id);
+// 文章海报
+export function article_poster(data, id) {
+	return request({
+		url: '/api/article/poster/' + id,
+		method: 'post',
+		data
+	});
 }

+ 13 - 4
api/functionalUnit.js

@@ -1,15 +1,24 @@
 import request from '@/utils/request'
 
 //获取优惠券列表
-export function getCouponsList(data,types) {
+export function getCouponsList(data, types) {
 	//优惠券状态 0全部 1未使用 2已使用
 	return request({
-		url: '/api/coupons/user/'+types,
+		url: '/api/coupons/user/' + types,
 		method: 'get',
 		data
 	});
 }
 
+//优惠券列表 
+export function getwCouponsList(data) {
+	return request({
+		url: '/api/coupons',
+		method: 'get',
+		data
+	})
+}
+
 //领取优惠券
 export function setCoupons(data) {
 	return request({
@@ -20,9 +29,9 @@ export function setCoupons(data) {
 }
 
 //获取可使用优惠券
-export function couponsOrder(data,price) {
+export function couponsOrder(data, price) {
 	return request({
-		url: '/api/coupons/order/'+price,
+		url: '/api/coupons/order/' + price,
 		method: 'get',
 		data
 	});

+ 12 - 11
api/order.js

@@ -1,5 +1,7 @@
 import request from '@/utils/request'
-import {upFilse} from '@/utils/request'
+import {
+	upFilse
+} from '@/utils/request'
 // 订单确认
 export function confirm(data) {
 	return request({
@@ -9,18 +11,18 @@ export function confirm(data) {
 	});
 }
 //获取可使用优惠券
-export function couponsOrder(data,price) {
+export function couponsOrder(data, price, id) {
 	return request({
-		url: '/api/coupons/order/'+price,
+		url: '/api/coupons/order/' + price + '/' + id,
 		method: 'get',
 		data
 	});
 }
 //获取优惠券列表
-export function getCouponsList(data,types) {
+export function getCouponsList(data, types) {
 	//优惠券状态 0全部 1未使用 2已使用
 	return request({
-		url: '/api/coupons/user/'+types,
+		url: '/api/coupons/user/' + types,
 		method: 'get',
 		data
 	});
@@ -66,9 +68,9 @@ export function orderList(data) {
 	});
 }
 // 订单详细
-export function orderDetail(data,orderid) {
+export function orderDetail(data, orderid) {
 	return request({
-		url: '/api/order/detail/'+orderid,
+		url: '/api/order/detail/' + orderid,
 		method: 'get',
 		data
 	});
@@ -127,9 +129,9 @@ export function orderPay(data) {
 }
 
 // 创建订单
-export function createOrderkey(data,key) {
+export function createOrderkey(data, key) {
 	return request({
-		url: '/api/order/create/'+key,
+		url: '/api/order/create/' + key,
 		method: 'post',
 		data
 	});
@@ -138,9 +140,8 @@ export function createOrderkey(data,key) {
 // 统计订单金额
 export function computedOrderkey(data) {
 	return request({
-		url: '/api/order/computed/'+data.orderkey,
+		url: '/api/order/computed/' + data.orderkey,
 		method: 'post',
 		data
 	});
 }
-

+ 25 - 1
api/user.js

@@ -18,6 +18,15 @@ export function getUserInfo(data) {
 	});
 }
 
+//用户修改信息
+export function edit(data) {
+	return request({
+		url: '/api/user/edit',
+		method: 'post',
+		data
+	});
+}
+
 // 用户分享图
 export function spreadBanner(data) {
 	return request({
@@ -101,4 +110,19 @@ export function delcollect(data) {
 	});
 }
 
-
+//文章详情
+export function details(data, id) {
+	return request({
+		url: '/api/article/details/' + id,
+		method: 'GET',
+		data
+	});
+}
+//文章列表
+export function articleList(data, id) {
+	return request({
+		url: '/api/article/list/' + id,
+		method: 'GET',
+		data
+	});
+}

+ 108 - 0
components/sunui-grand/sunui-grand.vue

@@ -0,0 +1,108 @@
+<template name="sunui-grand">
+	<view>
+		<view v-show="isHide">
+			<view class="sunui-grand-hide-bg" :style="'background-color:' + bg + ';'">
+				<view class="sunui-grand-summary" :style="'-webkit-line-clamp:' + clamp + ';'">{{ content }}</view>
+				<view class="sunui-grand-show-btn" :style="'top:' + (clamp - 1) + 'rem;height:' + clamp / 2 + 'rem;'" v-show="clamp >= 4">
+					<view @tap.stop="show" :style="{ color: color }">
+						<text :style="'border-bottom: 1upx solid ' + color + ';'">{{ expandText }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-show="!isHide">
+			<view class="sunui-grand-show-bg" :style="'background-color:' + bg + ';'">
+				<view>{{ content }}</view>
+				<view class="sunui-grand-hide-btn" v-show="shinkText != ''">
+					<view @tap.stop="hide" :style="{ color: color }">{{ shinkText == 'true' || shinkText == true ? '' : shinkText }}</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+var _self;
+export default {
+	data() {
+		return {
+			isHide: true
+		};
+	},
+	name: 'sunui-grand',
+	props: {
+		clamp: {
+			type: [Number, String],
+			default: `4`
+		},
+		color: {
+			type: String,
+			default: `#1D82FE`
+		},
+		content: {
+			type: [String, Object],
+			default: ``
+		},
+		bg: {
+			type: String,
+			default: `#E6E6E6`
+		},
+		expandText: {
+			type: String,
+			default: '展开阅读全文'
+		},
+		shinkText: {
+			type: String,
+			default: '点击收起全文'
+		}
+	},
+	created() {
+		_self = this;
+	},
+	methods: {
+		show() {
+			let _this = this;
+			_this.isHide = false;
+		},
+		hide() {
+			let _this = this;
+			_this.isHide = true;
+		}
+	}
+};
+</script>
+
+<style>
+.sunui-grand-hide-bg {
+	background-color: #e9ecef;
+	padding: 4%;
+	padding-bottom: 0;
+	position: relative;
+}
+
+.sunui-grand-show-bg {
+	background-color: #e9ecef;
+	padding: 4%;
+}
+
+.sunui-grand-summary {
+	overflow: hidden;
+	text-overflow: clip;
+	display: -webkit-box;
+	-webkit-box-orient: vertical;
+}
+
+.sunui-grand-show-btn {
+	width: 100%;
+	position: absolute;
+	left: 0;
+	z-index: 0;
+	text-align: center;
+	background-image: linear-gradient(-180deg, rgba(233, 236, 239, 0) 0%, #fff 80%);
+	padding-top: 3rem;
+}
+
+.sunui-grand-hide-btn {
+	text-align: right;
+}
+</style>

+ 111 - 112
components/uni-rate/uni-rate.vue

@@ -3,139 +3,138 @@
 		<view :key="index" :style="{ marginLeft: margin + 'px' }" @click="_onClick(index)" class="uni-rate__icon" v-for="(star, index) in stars">
 			<uni-icons :color="color" :size="size" :type="isFill ? 'star-filled' : 'star'" />
 			<!-- #ifdef APP-NVUE -->
-			<view :style="{ width: star.activeWitch.replace('%','')*size/100+'px'}" class="uni-rate__icon-on">
+			<view :style="{ width: (star.activeWitch.replace('%', '') * size) / 100 + 'px' }" class="uni-rate__icon-on">
 				<uni-icons style="text-align: left;" :color="activeColor" :size="size" type="star-filled" />
 			</view>
 			<!-- #endif -->
 			<!-- #ifndef APP-NVUE -->
-			<view :style="{ width: star.activeWitch,top:-size/2+'px' }" class="uni-rate__icon-on">
-				<uni-icons :color="activeColor" :size="size" type="star-filled" />
-			</view>
+			<view :style="{ width: star.activeWitch, top: -size / 2 + 'px' }" class="uni-rate__icon-on"><uni-icons :color="activeColor" :size="size" type="star-filled" /></view>
 			<!-- #endif -->
 		</view>
 	</view>
 </template>
 
 <script>
-	import uniIcons from "../uni-icons/uni-icons.vue";
-	export default {
-		name: "UniRate",
-		components: {
-			uniIcons
+import uniIcons from '../uni-icons/uni-icons.vue';
+export default {
+	name: 'UniRate',
+	components: {
+		uniIcons
+	},
+	props: {
+		isFill: {
+			// 星星的类型,是否镂空
+			type: [Boolean, String],
+			default: true
 		},
-		props: {
-			isFill: {
-				// 星星的类型,是否镂空
-				type: [Boolean, String],
-				default: true
-			},
-			color: {
-				// 星星的颜色
-				type: String,
-				default: "#ececec"
-			},
-			activeColor: {
-				// 星星选中状态颜色
-				type: String,
-				default: "#ffca3e"
-			},
-			size: {
-				// 星星的大小
-				type: [Number, String],
-				default: 24
-			},
-			value: {
-				// 当前评分
-				type: [Number, String],
-				default: 0
-			},
-			max: {
-				// 最大评分
-				type: [Number, String],
-				default: 5
-			},
-			margin: {
-				// 星星的间距
-				type: [Number, String],
-				default: 0
-			},
-			disabled: {
-				// 是否可点击
-				type: [Boolean, String],
-				default: false
-			}
+		color: {
+			// 星星的颜色
+			type: String,
+			default: '#ececec'
 		},
-		data() {
-			return {
-				valueSync: ""
-			};
+		activeColor: {
+			// 星星选中状态颜色
+			type: String,
+			default: '#ffca3e'
 		},
-		computed: {
-			stars() {
-				const value = this.valueSync ? this.valueSync : 0;
-				const starList = [];
-				const floorValue = Math.floor(value);
-				const ceilValue = Math.ceil(value);
-				// console.log("ceilValue: " + ceilValue);
-				// console.log("floorValue: " + floorValue);
-				for (let i = 0; i < this.max; i++) {
-					if (floorValue > i) {
-						starList.push({
-							activeWitch: "100%"
-						});
-					} else if (ceilValue - 1 === i) {
-						starList.push({
-							activeWitch: (value - floorValue) * 100 + "%"
-						});
-					} else {
-						starList.push({
-							activeWitch: "0"
-						});
-					}
-				}
-				console.log("starList[4]: " + starList[4].activeWitch);
-				return starList;
-			}
+		size: {
+			// 星星的大小
+			type: [Number, String],
+			default: 24
 		},
-		created() {
-			this.valueSync = Number(this.value);
+		value: {
+			// 当前评分
+			type: [Number, String],
+			default: 0
 		},
-		methods: {
-			_onClick(index) {
-				if (this.disabled) {
-					return;
+		max: {
+			// 最大评分
+			type: [Number, String],
+			default: 5
+		},
+		margin: {
+			// 星星的间距
+			type: [Number, String],
+			default: 0
+		},
+		disabled: {
+			// 是否可点击
+			type: [Boolean, String],
+			default: false
+		}
+	},
+	data() {
+		return {
+			valueSync: ''
+		};
+	},
+	computed: {
+		stars() {
+			const value = this.valueSync ? this.valueSync : 0;
+			const starList = [];
+			const floorValue = Math.floor(value);
+			const ceilValue = Math.ceil(value);
+			// console.log("ceilValue: " + ceilValue);
+			// console.log("floorValue: " + floorValue);
+			for (let i = 0; i < this.max; i++) {
+				if (floorValue > i) {
+					starList.push({
+						activeWitch: '100%'
+					});
+				} else if (ceilValue - 1 === i) {
+					starList.push({
+						activeWitch: (value - floorValue) * 100 + '%'
+					});
+				} else {
+					starList.push({
+						activeWitch: '0'
+					});
 				}
-				this.valueSync = index + 1;
-				this.$emit("change", {
-					value: this.valueSync
-				});
 			}
+			console.log('starList[4]: ' + starList[4].activeWitch);
+			return starList;
 		}
-	};
+	},
+	created() {
+		this.valueSync = Number(this.value);
+		console.log(this.valueSync, this.value, '132456');
+	},
+	methods: {
+		_onClick(index) {
+			if (this.disabled) {
+				return;
+			}
+			this.valueSync = index + 1;
+			this.$emit('change', {
+				value: this.valueSync
+			});
+		}
+	}
+};
 </script>
 
 <style lang="scss" scoped>
-	.uni-rate {
-		/* #ifndef APP-NVUE */
-		display: flex;
-		/* #endif */
-		line-height: 0;
-		font-size: 0;
-		flex-direction: row;
-	}
+.uni-rate {
+	/* #ifndef APP-NVUE */
+	display: flex;
+	/* #endif */
+	line-height: 0;
+	font-size: 0;
+	flex-direction: row;
+}
 
-	.uni-rate__icon {
-		position: relative;
-		line-height: 0;
-		font-size: 0;
-	}
+.uni-rate__icon {
+	position: relative;
+	line-height: 0;
+	font-size: 0;
+}
 
-	.uni-rate__icon-on {
-		overflow: hidden;
-		position: absolute;
-		top: 0;
-		left: 0;
-		line-height: 1;
-		text-align: left;
-	}
+.uni-rate__icon-on {
+	overflow: hidden;
+	position: absolute;
+	top: 0;
+	left: 0;
+	line-height: 1;
+	text-align: left;
+}
 </style>

+ 33 - 0
js_sdk/xb-copy/uni-copy.js

@@ -0,0 +1,33 @@
+export default function 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
+}

+ 11 - 6
main.js

@@ -1,15 +1,17 @@
 import Vue from 'vue'
 import store from './store'
 import App from './App'
+import uView from 'uview-ui'
+Vue.use(uView)
 /**
  *  所有测试用数据均存放于根目录json.js
  *  
  *  css部分使用了App.vue下的全局样式和iconfont图标,有需要图标库的可以留言。
  *  示例使用了uni.scss下的变量, 除变量外已尽量移除特有语法,可直接替换为其他预处理器使用
  */
-const msg = (title, duration=1500, mask=false, icon='none')=>{
+const msg = (title, duration = 1500, mask = false, icon = 'none') => {
 	//统一提示方便全局修改
-	if(Boolean(title) === false){
+	if (Boolean(title) === false) {
 		return;
 	}
 	uni.showToast({
@@ -20,7 +22,7 @@ const msg = (title, duration=1500, mask=false, icon='none')=>{
 	});
 }
 
-const prePage = ()=>{
+const prePage = () => {
 	// 获取当前页面
 	let pages = getCurrentPages();
 	let prePage = pages[pages.length - 2];
@@ -34,11 +36,14 @@ const prePage = ()=>{
 Vue.config.productionTip = false
 Vue.prototype.$fire = new Vue();
 Vue.prototype.$store = store;
-Vue.prototype.$api = {msg, prePage};
+Vue.prototype.$api = {
+	msg,
+	prePage
+};
 
 App.mpType = 'app'
 
 const app = new Vue({
-    ...App
+	...App
 })
-app.$mount()
+app.$mount()

+ 29 - 23
manifest.json

@@ -1,6 +1,6 @@
 {
-    "name" : "基础项目",
-    "appid" : "__UNI__F0EBD91",
+    "name" : "亲家母优选",
+    "appid" : "__UNI__A45549C",
     "description" : "",
     "versionName" : "1.0.0",
     "versionCode" : "100",
@@ -58,9 +58,15 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        "appid" : "",
+        "appid" : "wxe17f0c1d96620a35",
         "setting" : {
             "urlCheck" : true
+        },
+        "plugins" : {
+            "live-player-plugin" : {
+                "version" : "1.3.5",
+                "provider" : "wx2b03c6e691cd7370"
+            }
         }
     },
     // "h5" : {
@@ -82,24 +88,24 @@
     //         }
     //     }
     // }
-	"h5" : {
-	        "title" : "商城",
-	        "domain" : "",
-	        "router" : {
-	            "base" : "/index/",
-	            "mode" : "hash"
-	        },
-	        "devServer" : {
-	            "proxy" : {
-	                "/api" : {
-	                    "target" : "http://zccy.frp.liuniu946.com", //请求的目标域名
-	                    "changeOrigin" : true,
-	                    // "secure": false,
-	                    "pathRewrite" : {
-	                                                // "^/api": "/"
-	                                        }
-	                }
-	            }
-	        }
-	    }  
+    "h5" : {
+        "title" : "玲姐优选",
+        "domain" : "",
+        "router" : {
+            "base" : "/index/",
+            "mode" : "hash"
+        },
+        "devServer" : {
+            "proxy" : {
+                "/api" : {
+                    "target" : "https://qjm.liuniu946.com", //请求的目标域名
+                    "changeOrigin" : true,
+                    // "secure": false,
+                    "pathRewrite" : {}
+                }
+            }
+        }
+    }
 }
+// "^/api": "/"
+

+ 89 - 37
pages.json

@@ -1,4 +1,13 @@
 {
+	"easycom": {
+		"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"
+	},
+	"plugins": {
+		"live-player-plugin": {
+			"version": "1.3.5",
+			"provider": "wx2b03c6e691cd7370"
+		}
+	},
 	"pages": [{
 			"path": "pages/index/index",
 			"style": {
@@ -9,6 +18,61 @@
 				}
 			}
 		},
+		{
+			"path": "pages/index/detail",
+			"style": {
+				"navigationBarTitleText": "公司介绍"
+			}
+		},
+		{
+			"path": "pages/index/coupon",
+			"style": {
+				"navigationBarTitleText": "优惠券列表"
+			}
+		},
+		{
+			"path": "pages/zc/plshare",
+			"style": {
+				"navigationBarTitleText": "分享内容"
+			}
+		},
+		{
+			"path": "pages/zc/wzshare",
+			"style": {
+				"navigationBarTitleText": "分享内容"
+			}
+		},
+		{
+			"path": "pages/zc/zc",
+			"style": {
+				"navigationBarTitleText": "种草专区",
+				"app-plus": {
+					"titleNView": false
+				}
+			}
+		},
+		{
+			"path": "pages/zc/plDetail",
+			"style": {
+				"navigationBarTitleText": "内容详情",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
+		{
+			"path": "pages/zc/wzDetail",
+			"style": {
+				"navigationBarTitleText": "内容详情",
+				"app-plus": {
+					"titleNView": {
+						"type": "transparent"
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/public/register",
 			"style": {
@@ -175,16 +239,35 @@
 			}
 		},
 		{
-			"path": "pages/user/favorites",
+			"path": "pages/user/new",
 			"style": {
-				"navigationBarTitleText": "收藏夹"
+				"navigationBarTitleText": "新品通知"
 			}
-		}, {
+		},
+		{
+			"path": "pages/user/living",
+			"style": {
+				"navigationBarTitleText": ""
+			}
+		},
+		{
+			"path": "pages/user/creation",
+			"style": {
+				"navigationBarTitleText": "创作中心"
+			}
+		},
+		{
 			"path": "pages/user/coupon",
 			"style": {
 				"navigationBarTitleText": "我的卡卷"
 			}
 		},
+		{
+			"path": "pages/user/evaluate",
+			"style": {
+				"navigationBarTitleText": "发帖"
+			}
+		},
 		{
 			"path": "pages/order/order",
 			"style": {
@@ -278,37 +361,6 @@
 			}
 		}
 	],
-	"subPackages": [{
-		"root": "pages/activity",
-		"name": "activity",
-		"pages": [{
-				"path": "goods_bargain/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "goods_bargain_details/index",
-				"style": {
-					"navigationStyle": "custom"
-						// #ifdef MP
-						,
-					"navigationBarTextStyle": "#fff"
-					// #endif
-				}
-			},
-			{
-				"path": "bargain/index",
-				"style": {
-					"navigationBarTitleText": "砍价记录"
-				}
-			}
-		]
-	}],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",
 		"navigationBarTitleText": "uni-app",
@@ -317,7 +369,7 @@
 	},
 	"tabBar": {
 		"color": "#C0C4CC",
-		"selectedColor": "#5DBC7C",
+		"selectedColor": "#000000",
 		"borderStyle": "black",
 		"backgroundColor": "#ffffff",
 		"list": [{
@@ -327,10 +379,10 @@
 				"text": "首页"
 			},
 			{
-				"pagePath": "pages/category/category",
+				"pagePath": "pages/zc/zc",
 				"iconPath": "static/tabBar/tab-cate.png",
 				"selectedIconPath": "static/tabBar/tab-cate-current.png",
-				"text": "分类"
+				"text": "种草专区"
 			},
 			{
 				"pagePath": "pages/cart/cart",

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

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

Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 172
pages/activity/goods_bargain/index.vue


Diferenças do arquivo suprimidas por serem muito extensas
+ 0 - 726
pages/activity/goods_bargain_details/index.vue


+ 200 - 0
pages/index/coupon.vue

@@ -0,0 +1,200 @@
+<template>
+	<view class="content">
+		<scroll-view class="coupon-box clamp" :style="{ height: height }">
+			<view v-for="(item, index) in couponArray" :key="item.id" class="coupon-list">
+				<view class="row flex">
+					<view class="list-money flex">
+						<image :src="item.is_use ? '/static/img/img02.png' : '/static/img/img03.png'" mode="scaleToFill"></image>
+						<view class="list-money-text">
+							<view class="tit" :class="{ noAction: item.is_use }">
+								<text>{{ item.coupon_price }}</text>
+							</view>
+						</view>
+					</view>
+					<view class="list-interval position-relative">
+						<view class="bottom"></view>
+						<view class="top"></view>
+					</view>
+					<view class="row_list_right">
+						<view class="right_top"><text class="right_title" :class="{ noAction: item.is_use }">满减券</text></view>
+						<view class="right_time">
+							<text>满{{ item.use_min_price }}使用</text>
+						</view>
+					</view>
+					<view class="right_use noAction" v-if="item.is_use" @click="setCoupons(item)">
+						<text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
+					</view>
+					<view class="right_use action" v-else @click="setCoupons(item)">
+						<text>{{ item.is_use ? '已领取' : '立即领取' }}</text>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+import { getCouponsList } from '@/api/index.js';
+import { setCoupons, getwCouponsList } from '@/api/functionalUnit.js';
+export default {
+	data() {
+		return {
+			height: '',
+			couponArray: [] //可领取优惠券
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	onShow() {},
+	onReachBottom() {},
+	onReady() {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.coupon-box').boundingClientRect();
+				query.exec(function(res) {
+					console.log(res, 'ddddddddddddd');
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	methods: {
+		loadData() {
+			getwCouponsList({}).then(({ data }) => {
+				this.couponArray = data;
+			});
+		},
+		setCoupons(item) {
+			// 判断是否已经领取了优惠券
+			let obj = this;
+			uni.showModal({
+				title: '领取提示',
+				content: '是否领取优惠券',
+				success(e) {
+					if (e.confirm) {
+						setCoupons({ couponId: item.id }).then(e => {
+							item.is_use = true;
+							uni.showToast({
+								title: '领取成功',
+								type: 'top',
+								duration: 2000
+							});
+						});
+					}
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+$card-color-action: #fc4141;
+.row {
+	padding-right: 10rpx;
+	border-radius: 15rpx;
+	margin: 0 25rpx;
+	margin-bottom: 25rpx;
+	height: 200rpx;
+	overflow: hidden;
+	background-color: #ffffff;
+	.list-interval {
+		border: 1px dashed $border-color-light;
+		height: 100%;
+		.top,
+		.bottom {
+			border-radius: 100rpx;
+			width: 30rpx;
+			height: 30rpx;
+			position: absolute;
+			background-color: $page-color-base;
+			right: -15rpx;
+		}
+		.top {
+			top: -18rpx;
+		}
+		.bottom {
+			bottom: -18rpx;
+		}
+	}
+	.list-money {
+		height: 100%;
+		image {
+			height: 100%;
+			width: 20rpx;
+		}
+		.list-money-text {
+			width: 220rpx;
+			padding: 0 25rpx;
+			text-align: center;
+			color: $font-color-light;
+			.tit {
+				padding: 15rpx 0rpx;
+				font-size: 55rpx;
+				font-weight: bold;
+				&.action {
+					color: $card-color-action;
+				}
+			}
+			.price {
+				padding-bottom: 25rpx;
+			}
+		}
+	}
+	.row_list_right {
+		flex-grow: 1;
+		padding-left: 25rpx;
+		line-height: 1;
+		.right_time {
+			color: $font-color-light;
+			font-size: $font-sm;
+		}
+		.right_top {
+			margin: 15rpx 0;
+			font-size: $font-lg;
+			height: 50rpx;
+			color: $font-color-light;
+			.right_name {
+				font-weight: bold;
+			}
+			.right_title {
+				font-weight: bold;
+				&.action {
+					color: $font-color-base;
+				}
+			}
+		}
+	}
+	.right_use {
+		margin: 15rpx 0;
+		padding: 10rpx;
+		width: 140rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		border-radius: 50rpx;
+		color: #fff;
+		font-size: $font-sm - 4rpx;
+		&.action {
+			background-color: $card-color-action;
+		}
+		&.noAction {
+			background-color: $color-gray;
+		}
+	}
+	.iconlocation {
+		font-size: 36rpx;
+		color: $font-color-light;
+	}
+}
+</style>

+ 96 - 0
pages/index/detail.vue

@@ -0,0 +1,96 @@
+<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();
+	},
+	methods: {
+		loadData() {
+			details({}, this.id).then(({ data }) => {
+				data.content = data.content.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img');
+				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">
+.center,
+page {
+	min-height: 100%;
+	height: auto;
+	background: #ffffff;
+	padding: 30rpx 24rpx 0;
+}
+.title {
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: bold;
+}
+.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;
+	}
+}
+</style>

+ 526 - 449
pages/index/index.vue

@@ -2,82 +2,49 @@
 	<view class="container">
 		<view class="vheigh"></view>
 		<view class="top" @click="clickSearch()">
-			<view class="top-icon">
-				<image src="../../static/icon/icon.png" mode=""></image>
-			</view>
-			<view class="top-main">
-				输入你要查找的内容
-			</view>
+			<view class="top-icon"><image src="../../static/icon/icon.png" mode=""></image></view>
+			<view class="top-main">输入你要查找的内容</view>
 		</view>
 		<swiper class="banner" autoplay="true" duration="400" interval="5000">
-			<swiper-item class="banner-item" v-for="(item, index) in carouselList">
-				<image src="../../static/img/banner.png" />
-			</swiper-item>
+			<swiper-item class="banner-item" v-for="(item, index) in carouselList"><image :src="item.pic" /></swiper-item>
 		</swiper>
 		<view class="navbar flex">
-			<view class="navbar-item">
-				<view class="navbar-image">
-					<image src="../../static/icon/index1.png" mode=""></image>
-				</view>
-				<view class="navbar-font">
-					全部商品
-				</view>
+			<view class="navbar-item" @click="navTo('/pages/category/category')">
+				<view class="navbar-image"><image src="../../static/icon/index1.png" mode=""></image></view>
+				<view class="navbar-font">全部商品</view>
 			</view>
-			<view class="navbar-item">
-				<view class="navbar-image">
-					<image src="../../static/icon/index2.png" mode=""></image>
-				</view>
-				<view class="navbar-font">
-					公司介绍
-				</view>
+			<view class="navbar-item" @click="navTo('/pages/index/detail?id=2')">
+				<view class="navbar-image"><image src="../../static/icon/index2.png" mode=""></image></view>
+				<view class="navbar-font">公司介绍</view>
 			</view>
-			<view class="navbar-item">
-				<view class="navbar-image">
-					<image src="../../static/icon/index3.png" mode=""></image>
-				</view>
-				<view class="navbar-font">
-					联系客服
-				</view>
+			<view class="navbar-item" @click="kfOpen">
+				<view class="navbar-image"><image src="../../static/icon/index3.png" mode=""></image></view>
+				<view class="navbar-font">联系客服</view>
 			</view>
-			<view class="navbar-item">
-				<view class="navbar-image">
-					<image src="../../static/icon/index4.png" mode=""></image>
-				</view>
-				<view class="navbar-font">
-					邀请好友
-				</view>
+			<view class="navbar-item" @click="navTo('/pages/user/shareQrCode')">
+				<view class="navbar-image"><image src="../../static/icon/index4.png" mode=""></image></view>
+				<view class="navbar-font">邀请好友</view>
 			</view>
 		</view>
 		<view class="xian"></view>
 		<view class="hot-box">
 			<view class="hot-title flex">
 				<view class="hot-title-item flex">
-					<view class="hot-title-image">
-						<image src="../../static/icon/fire.png" mode=""></image>
-					</view>
-					<view class="hot-title-font">
-						好货上新
-					</view>
+					<view class="hot-title-image"><image src="../../static/icon/fire.png" mode=""></image></view>
+					<view class="hot-title-font">好货上新</view>
 				</view>
-				<view class="hot-title-item flex">
-					<view class="hot-title-more">
-						更多
-					</view>
-					<view class="hot-title-jt">
-						<image src="../../static/icon/jt.png" mode=""></image>
-					</view>
+				<view class="hot-title-item flex" @click="navTo('/pages/product/classify?type=3')">
+					<view class="hot-title-more">更多</view>
+					<view class="hot-title-jt"><image src="../../static/icon/jt.png" mode=""></image></view>
 				</view>
 			</view>
 			<view class="hot-main flex">
-				<view class="hot-main-item" v-for="(item,index) in hotList">
-					<view class="hot-main-image">
-						<image src="../../static/img/banner.png" mode=""></image>
-					</view>
-					<view class="hot-name clamp">
-						护肤品面膜套装
-					</view>
+				<view class="hot-main-item" v-for="(item, index) in hotList" @click="navToDetailPage(item)">
+					<view class="hot-main-image"><image :src="item.image" mode=""></image></view>
+					<view class="hot-name clamp">{{ item.store_name }}</view>
 					<view class="hot-price">
-						¥69.9 <text class="yuan-price">¥89.9</text>
+						¥{{ item.price * 1 }}
+						<!-- <text class="yuan-price">¥{{ item.ot_price * 1 }}</text> -->
 					</view>
 				</view>
 			</view>
@@ -86,22 +53,18 @@
 		<view class="guess-section-box">
 			<view class="guess-section-title">
 				<view class="guess-section-xian"></view>
-				<view class="guess-section-title-font">
-					爆款推荐
-				</view>
+				<view class="guess-section-title-font">爆款推荐</view>
 				<view class="guess-section-xian"></view>
 			</view>
 			<view class="guess-section">
 				<view v-for="(item, index) in bastList" :key="index" class="guess-item" @click="navToDetailPage(item)">
-					<view class="image-wrapper">
-						<image :src="item.image" mode="scaleToFill"></image>
-					</view>
+					<view class="image-wrapper"><image :src="item.image" mode="scaleToFill"></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>
 							¥{{ item.price }}
-							<text class="yuan-price">¥{{item.yuan}}</text>
+							<text class="yuan-price">¥{{ item.ot_price }}</text>
 						</view>
 						<!-- <view class="font-size-sm">
 									<text class="font-color-gray">{{ item.sales }}人购买</text>
@@ -110,491 +73,605 @@
 				</view>
 			</view>
 		</view>
+		<view class="zb" @click="navTo('/pages/user/living')"><image src="../../static/img/living.png" mode=""></image></view>
+		<uni-popup ref="popupkf" type="center">
+			<view class="popup-box">
+				<view class="img"><image src="../../static/img/img009.png" mode=""></image></view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image src="../../static/img/img010.png" mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ text }}</view>
+					<view class="comfirm-box">
+						<view class="cancel" @click="kfClose()">取消</view>
+						<view class="comfirm" @click="comfirm(text)">复制微信</view>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 
 <script>
-	import {
-		loadIndexs
-	} from '@/api/index.js';
-	import {
-		getUserInfo
-	} from '@/api/user.js';
-	import {
-		setCoupons
-	} from '@/api/functionalUnit.js';
-	import {
-		getBargainList
-	} from '@/api/product.js';
-	import {
-		interceptor
-	} from '@/utils/loginUtils';
-	import {
-		mapState
-	} from 'vuex';
-	export default {
-		data() {
-			return {
-				carouselList: [''],
-				hotList: ['', '', ''],
-				bastList: [{
-						image: '../../static/img/banner.png',
-						store_name: '爆款推荐康养跨店联fsadfsdsdfsda',
-						price: '26.90',
-						yuan: '36'
-					},
-					{
-						image: '../../static/img/banner.png',
-						store_name: '爆款推荐康养跨店联fsadfsdsdfsda',
-						price: '26.90',
-						yuan: '36'
-					},
-					{
-						image: '../../static/img/banner.png',
-						store_name: '爆款推荐康养跨店联fsadfsdsdfsda',
-						price: '26.90',
-						yuan: '36'
-					},
-				]
+import { loadIndexs } from '@/api/index.js';
+import { getUserInfo } from '@/api/user.js';
+import { setCoupons } from '@/api/functionalUnit.js';
+import { getBargainList } from '@/api/product.js';
+import { interceptor } from '@/utils/loginUtils';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+import { mapState } from 'vuex';
+export default {
+	data() {
+		return {
+			carouselList: [''],
+			hotList: [],
+			text: '1111',
+			bastList: []
+		};
+	},
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		console.log(res);
+		console.log('是否从按钮进入');
+		if (res.from === 'button' || res.from === 'menu') {
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			// 保存邀请人
+			path += 'spread=' + this.userInfo.uid;
+			let data = {
+				path: path,
+				imageUrl: this.bastList[0].pic,
+				title: this.userInfo.nickname ? this.userInfo.nickname : '' + '邀请您进入亲家母优选'
 			};
+			return data;
+		} else {
+			console.log('else');
+		}
+	},
+	// #endif
+	computed: {
+		...mapState('user', ['hasLogin', 'userInfo'])
+	},
+	onLoad: function(option) {
+		// #ifndef MP
+		if (option.spread) {
+			// 存储其他邀请人
+			uni.setStorageSync('spread', option.spread);
+		}
+		// #endif
+		// #ifdef MP
+		if (option.scene) {
+			// 存储小程序邀请人
+			uni.setStorage({
+				key: 'spread_code',
+				data: option.scene
+			});
+		}
+		// #endif
+	},
+	onShow: function() {
+		// 判断是否强制登录
+		if (this.loginInterceptor && !this.hasLogin) {
+			// 登录拦截
+			interceptor();
+		}
+		this.loadData();
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		this.loadData();
+	},
+	methods: {
+		kfOpen() {
+			this.$refs.popupkf.open();
 		},
-		computed: {
-			...mapState('user', ['hasLogin', 'userInfo'])
+		kfClose() {
+			this.$refs.popupkf.close();
 		},
-		onLoad: function(option) {
-			// #ifndef MP
-			if (option.spread) {
-				// 存储其他邀请人
-				uni.setStorageSync('spread', option.spread);
-			}
-			// #endif
-			// #ifdef MP
-			if (option.scene) {
-				// 存储小程序邀请人
-				uni.setStorage({
-					key: 'spread_code',
-					data: option.scene
+		navTo(url) {
+			uni.navigateTo({
+				url,
+				fail() {
+					uni.switchTab({
+						url
+					});
+				}
+			});
+		},
+		comfirm(text) {
+			console.log(text);
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
 				});
 			}
-			// #endif
+			this.$refs.popupkf.close();
 		},
-		onShow: function() {
-			// 判断是否强制登录
-			if (this.loginInterceptor && !this.hasLogin) {
-				// 登录拦截
-				interceptor();
-			}
-			// this.loadData();
+		cs() {
+			uni.scanCode({
+				success: function(res) {
+					console.log('条码类型:' + res.scanType);
+					console.log('条码内容:' + res.result);
+				}
+			});
 		},
-		//下拉刷新
-		onPullDownRefresh() {
-			this.loadData();
+		// 點擊搜索框
+		clickSearch() {
+			uni.navigateTo({
+				url: '/pages/product/search'
+			});
 		},
-		methods: {
-			//砍价商品推荐详情页
-			navToDetailPages(item) {
-				let id = item.product_id;
-				//let type = 2;
-
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + id
-				});
-			},
-			openSubscribe: function(e) {
-				let page = e;
-				// #ifndef MP
-				uni.navigateTo({
-					url: page
-				});
-				// #endif
-				// #ifdef MP
-				uni.showLoading({
-					title: '正在加载'
-				});
-				openBargainSubscribe()
-					.then(res => {
-						uni.hideLoading();
-						uni.navigateTo({
-							url: page
-						});
-					})
-					.catch(err => {
-						uni.hideLoading();
-					});
-				// #endif
-			},
-			Tocancel() {
-				this.shareShow = false;
-			},
-			// 點擊搜索框
-			clickSearch() {
-				uni.navigateTo({
-					url: '/pages/product/search'
-				});
-			},
-			// 请求载入数据
-			async loadData() {
-				loadIndexs({})
-					.then(({
-						data
-					}) => {
-						let goods = data.info;
-						this.carouselList = data.banner;
-						this.swiperLength = this.carouselList.length;
-						this.menusList = data.menus;
-						this.goodsList = goods.firstList; //最新商品
-						this.bastList = goods.bastList; //精品推荐
-						this.bastBanner = data.benefit; //促销单品
-						this.$set(this, 'couponArray', data.couponList); //保存卡包券
-
-						uni.stopPullDownRefresh();
-					})
-					.catch(e => {
-						uni.stopPullDownRefresh();
-					});
-
-			},
-			//轮播图切换修改背景色
-			swiperChange(e) {
-				const index = e.detail.current;
-				this.swiperCurrent = index;
-				this.titleNViewBackground = this.carouselList[index].background;
-			},
-			//详情页
-			navToDetailPage(item) {
-				let id = item.id;
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + id
+		// 请求载入数据
+		async loadData() {
+			loadIndexs({})
+				.then(({ data }) => {
+					let goods = data.info;
+					this.carouselList = data.banner;
+					this.swiperLength = this.carouselList.length;
+					this.hotList = goods.firstList; //最新商品
+					this.bastList = data.likeInfo; //爆款推荐
+
+					uni.stopPullDownRefresh();
+				})
+				.catch(e => {
+					uni.stopPullDownRefresh();
 				});
-			},
+		},
+		//轮播图切换修改背景色
+		swiperChange(e) {
+			const index = e.detail.current;
+			this.swiperCurrent = index;
+			this.titleNViewBackground = this.carouselList[index].background;
+		},
+		//详情页
+		navToDetailPage(item) {
+			let id = item.id;
+			uni.navigateTo({
+				url: '/pages/product/product?id=' + id
+			});
+		},
 
-			// 轮播图跳转
-			bannerNavToUrl(item) {
-				// #ifdef H5
-				if (item.wap_url.indexOf('http') > 0) {
-					window.location.href = item.wap_url;
-				}
-				// #endif
-				//测试数据没有写id,用title代替
-				uni.navigateTo({
-					url: item.wap_url
-				});
+		// 轮播图跳转
+		bannerNavToUrl(item) {
+			// #ifdef H5
+			if (item.wap_url.indexOf('http') > 0) {
+				window.location.href = item.wap_url;
 			}
+			// #endif
+			//测试数据没有写id,用title代替
+			uni.navigateTo({
+				url: item.wap_url
+			});
 		}
-	};
+	}
+};
 </script>
 
 <style lang="scss">
-	.vheigh {
-		height: var(--status-bar-height);
-		background-color: #ffffff;
+.vheigh {
+	height: var(--status-bar-height);
+	background-color: #ffffff;
+}
+
+.container,
+page {
+	height: auto;
+	min-height: 100%;
+	background: #ffffff;
+}
+
+.top {
+	width: 689rpx;
+	height: 58rpx;
+	background: #ededed;
+	border-radius: 29rpx;
+	margin: 20rpx auto 0;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+	.top-icon {
+		width: 32rpx;
+		height: 32rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.top-main {
+		margin-left: 20rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #cbcbcb;
 	}
+}
+
+.banner {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	height: 350rpx;
+
+	.banner-item {
+		width: 690rpx;
+		height: 350rpx;
 
-	.container,
-	page {
-		height: auto;
-		min-height: 100%;
-		background: #ffffff;
+		image {
+			width: 100%;
+			height: 100%;
+		}
 	}
+}
+
+.navbar {
+	justify-content: space-around;
+	margin-top: 50rpx;
 
-	.top {
-		width: 689rpx;
-		height: 58rpx;
-		background: #EDEDED;
-		border-radius: 29rpx;
-		margin: 20rpx auto 0;
+	.navbar-item {
 		display: flex;
-		justify-content: center;
+		flex-direction: column;
 		align-items: center;
 
-		.top-icon {
-			width: 32rpx;
-			height: 32rpx;
+		.navbar-image {
+			width: 90rpx;
+			height: 90rpx;
+			border-radius: 50%;
 
 			image {
 				width: 100%;
 				height: 100%;
+				border-radius: 50%;
 			}
 		}
 
-		.top-main {
-			margin-left: 20rpx;
-			font-size: 28rpx;
+		.navbar-font {
+			margin-top: 24rpx;
+			font-size: 24rpx;
 			font-family: PingFang SC;
 			font-weight: 500;
-			color: #CBCBCB;
+			color: #666666;
 		}
 	}
+}
 
-	.banner {
-		margin: 20rpx auto 0;
-		width: 690rpx;
-		height: 350rpx;
-
-		.banner-item {
-			width: 690rpx;
-			height: 350rpx;
+.xian {
+	margin-top: 50rpx;
+	width: 750rpx;
+	height: 20rpx;
+	background: #efefef;
+	opacity: 0.61;
+}
 
-			image {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
+.hot-box {
+	padding: 0 30rpx;
 
-	.navbar {
-		justify-content: space-around;
-		margin-top: 50rpx;
+	.hot-title {
+		padding-top: 50rpx;
 
-		.navbar-item {
-			display: flex;
-			flex-direction: column;
-			align-items: center;
+		.hot-title-item {
+			justify-content: flex-start;
 
-			.navbar-image {
-				width: 90rpx;
-				height: 90rpx;
-				border-radius: 50%;
+			.hot-title-image {
+				width: 36rpx;
+				height: 36rpx;
 
 				image {
 					width: 100%;
 					height: 100%;
-					border-radius: 50%;
 				}
 			}
 
-			.navbar-font {
-				margin-top: 24rpx;
+			.hot-title-font {
+				margin-left: 7rpx;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 800;
+				color: #303030;
+			}
+
+			.hot-title-more {
+				margin-right: 10rpx;
 				font-size: 24rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				color: #666666;
+				color: #999999;
 			}
-		}
-	}
 
-	.xian {
-		margin-top: 50rpx;
-		width: 750rpx;
-		height: 20rpx;
-		background: #EFEFEF;
-		opacity: 0.61;
-	}
+			.hot-title-jt {
+				width: 10rpx;
+				height: 19rpx;
+				position: relative;
+				top: -8rpx;
 
-	.hot-box {
-		padding: 0 30rpx;
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
+		}
+	}
 
-		.hot-title {
-			padding-top: 50rpx;
+	.hot-main {
+		margin-top: 25rpx;
 
-			.hot-title-item {
-				justify-content: flex-start;
+		.hot-main-item {
+			width: 220rpx;
+			background: #ffffff;
+			border: 4rpx solid #f0e7d2;
+			border-radius: 10rpx;
+			padding: 0 0 34rpx;
 
-				.hot-title-image {
-					width: 36rpx;
-					height: 36rpx;
+			.hot-main-image {
+				width: 212rpx;
+				height: 212rpx;
 
-					image {
-						width: 100%;
-						height: 100%;
-					}
+				image {
+					width: 100%;
+					height: 100%;
 				}
+			}
 
-				.hot-title-font {
-					margin-left: 7rpx;
-					font-size: 32rpx;
-					font-family: PingFang SC;
-					font-weight: 800;
-					color: #303030;
-				}
+			.hot-name {
+				padding: 20rpx 12rpx 0;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #0a122b;
+			}
+
+			.hot-price {
+				padding: 0 12rpx;
+				font-size: 32rpx;
+				font-family: PingFang SC;
+				font-weight: 800;
+				color: #ff4c4c;
 
-				.hot-title-more {
-					margin-right: 10rpx;
+				.yuan-price {
+					display: inline-block;
+					margin-left: 10rpx;
 					font-size: 24rpx;
 					font-family: PingFang SC;
 					font-weight: 500;
-					color: #999999;
+					text-decoration: line-through;
+					color: #969696;
 				}
+			}
+		}
+	}
+}
 
-				.hot-title-jt {
-					width: 10rpx;
-					height: 19rpx;
-					position: relative;
-					top: -8rpx;
+.guess-section-box {
+	margin-top: 20rpx;
+	width: 750rpx;
+	background: #fff;
+	padding-top: 30rpx;
 
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-			}
+	.guess-section-title {
+		display: flex;
+		justify-content: center;
+		align-items: center;
+
+		.guess-section-xian {
+			width: 120rpx;
+			height: 1px;
+			background: #999999;
 		}
 
-		.hot-main {
-			margin-top: 25rpx;
+		.guess-section-title-font {
+			margin: 0 70rpx;
+			font-size: 30rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #363636;
+		}
+	}
+}
 
-			.hot-main-item {
-				width: 220rpx;
-				background: #FFFFFF;
-				border: 4rpx solid #F0E7D2;
-				border-radius: 10rpx;
-				padding: 0 0 34rpx;
+.guess-section {
+	margin-top: 40rpx;
+	display: flex;
+	flex-wrap: wrap;
+	padding: 0 30rpx;
 
-				.hot-main-image {
-					width: 212rpx;
-					height: 212rpx;
+	.guess-item {
+		padding-bottom: 35rpx;
+		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 {
-						width: 100%;
-						height: 100%;
-					}
-				}
+	.image-wrapper {
+		width: 100%;
+		height: 330rpx;
+		border-radius: 3px;
+		overflow: hidden;
 
-				.hot-name {
-					padding: 20rpx 12rpx 0;
-					font-size: 28rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #0A122B;
-				}
+		image {
+			width: 100%;
+			height: 100%;
+			opacity: 1;
+		}
+	}
 
-				.hot-price {
-					padding: 0 12rpx;
-					font-size: 32rpx;
-					font-family: PingFang SC;
-					font-weight: 800;
-					color: #FF4C4C;
-
-					.yuan-price {
-						display: inline-block;
-						margin-left: 10rpx;
-						font-size: 24rpx;
-						font-family: PingFang SC;
-						font-weight: 500;
-						text-decoration: line-through;
-						color: #969696;
-					}
-				}
-			}
+	.title {
+		margin-top: 28rpx;
+		font-size: $font-base;
+		color: $font-color-dark;
+		font-weight: bold;
+	}
+
+	.price {
+		margin-top: 34rpx;
+		font-size: 32rpx;
+		font-family: PingFang SC;
+		font-weight: 800;
+		color: #ff4c4c;
+		line-height: 1;
+
+		.yuan-price {
+			display: inline-block;
+			margin-left: 10rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			text-decoration: line-through;
+			color: #969696;
 		}
 	}
 
-	.guess-section-box {
-		margin-top: 20rpx;
-		width: 750rpx;
-		background: #fff;
-		padding-top: 30rpx;
+	.icon {
+		@extend %icon;
+	}
 
-		.guess-section-title {
-			display: flex;
-			justify-content: center;
-			align-items: center;
+	.detail {
+		line-height: 1;
+	}
 
-			.guess-section-xian {
-				width: 120rpx;
-				height: 1px;
-				background: #999999;
-			}
+	.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;
+}
+.popup-box {
+	width: 640rpx;
+	height: 605rpx;
+	background-color: #ffffff;
+	border-radius: 20rpx;
+	position: relative;
+
+	.img {
+		position: relative;
+		top: -56rpx;
+		left: 0;
+		width: 640rpx;
+		height: 132rpx;
+		display: flex;
+		justify-content: center;
 
-			.guess-section-title-font {
-				margin: 0 70rpx;
-				font-size: 30rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #363636;
-			}
+		image {
+			border-radius: 20rpx 20rpx 0 0;
+			width: 450rpx;
+			height: 132rpx;
 		}
 	}
 
-	.guess-section {
-		margin-top: 40rpx;
+	.mian {
+		margin-top: -44rpx;
 		display: flex;
-		flex-wrap: wrap;
-		padding: 0 30rpx;
+		flex-direction: column;
+		align-items: center;
+		// padding: 32rpx 32rpx;
+		background-color: #ffffff;
+		border-radius: 0 0 20rpx 20rpx;
+		text-align: center;
 
-		.guess-item {
-			padding-bottom: 35rpx;
-			overflow: hidden;
+		.delivery {
+			font-size: 40rpx;
+			color: #333333;
 			display: flex;
+			align-items: center;
 			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;
+			.title {
+			}
 
 			image {
-				width: 100%;
-				height: 100%;
-				opacity: 1;
+				margin-top: 48rpx;
+				width: 172rpx;
+				height: 160rpx;
 			}
 		}
 
-		.title {
-			margin-top: 28rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-			font-weight: bold;
-		}
-
-		.price {
-			margin-top: 34rpx;
+		.nocancel {
 			font-size: 32rpx;
-			font-family: PingFang SC;
-			font-weight: 800;
-			color: #FF4C4C;
-			line-height: 1;
+			color: #333333;
+			margin-top: 14rpx;
+		}
 
-			.yuan-price {
-				display: inline-block;
-				margin-left: 10rpx;
-				font-size: 24rpx;
+		.comfirm-box {
+			margin-top: 52rpx;
+			display: flex;
+			// margin-bottom: 32rpx;
+
+			// justify-content: space-around;
+			.cancel {
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 260rpx;
+				height: 88rpx;
+				border: 2rpx solid #dcc786;
+				border-radius: 10rpx;
+				font-size: 32rpx;
 				font-family: PingFang SC;
 				font-weight: 500;
-				text-decoration: line-through;
-				color: #969696;
+				color: #605128;
 			}
 
-
-		}
-
-		.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;
+			.comfirm {
+				margin-left: 32rpx;
+				display: flex;
+				align-items: center;
+				justify-content: center;
+				width: 260rpx;
+				height: 88rpx;
+				background: linear-gradient(-90deg, #d1ba77 0%, #f7e8ad 100%);
+				border-radius: 10rpx;
+				font-size: 32rpx;
+				color: #605128;
+			}
 		}
 	}
-
-	/*公用边框样式*/
-	%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;
+}
+.zb {
+	position: fixed;
+	right: 20rpx;
+	bottom: 20%;
+	width: 136rpx;
+	height: 136rpx;
+	image {
+		width: 100%;
+		height: 100%;
 	}
+}
 </style>

+ 0 - 177
pages/index/sign.vue

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

+ 9 - 5
pages/money/pay.vue

@@ -35,7 +35,7 @@
 
 <script>
 import { balance } from '@/api/wallet.js';
-import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
+import { createOrderkey, computedOrderkey, orderPay } from '@/api/order.js';
 import { mapState } from 'vuex';
 export default {
 	data() {
@@ -134,6 +134,8 @@ export default {
 					}
 					if (obj.payName == 'weixin' || obj.payName == 'routine') {
 						let da = e.data.result.jsConfig;
+						console.log(da, '支付打印');
+
 						let data = {
 							// #ifdef H5
 							timestamp: da.timestamp,
@@ -155,12 +157,14 @@ export default {
 							}
 						};
 						// #ifdef H5
-						if(obj.payName == 'weixin'){
-						obj.weichatObj.chooseWXPay(data);
+						if (obj.payName == 'weixin') {
+							obj.weichatObj.chooseWXPay(data);
 						}
 						// #endif
 						// #ifdef MP-WEIXIN
-						if(obj.payName == 'routine'){
+						if (obj.payName == 'weixin') {
+							console.log(data, '传入数据');
+							console.log(wx, 'wx');
 							wx.requestPayment(data);
 						}
 						// #endif
@@ -188,7 +192,7 @@ export default {
 			uni.showLoading({
 				title: '支付中',
 				mask: true
-			})
+			});
 			// 判断是否余额不足
 			if (obj.payName == 'yue' && +obj.now_money < obj.money) {
 				uni.showModal({

+ 53 - 50
pages/money/paySuccess.vue

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

+ 11 - 11
pages/order/createOrder.vue

@@ -1,8 +1,8 @@
 <template>
 	<view>
-		<view class="navbar">
+		<!-- <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>
+		</view> -->
 
 		<!-- 地址 -->
 		<navigator v-if="tabCurrentIndex == 0" url="/pages/set/address?source=1" class="address-section">
@@ -93,10 +93,10 @@
 				<text class="cell-tit clamp">优惠金额</text>
 				<text class="cell-tip red">-¥35</text>
 			</view> -->
-			<view class="yt-list-cell b-b">
+			<!-- <view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">积分抵扣{{ '(当前积分:' + integralAll + ')' }}</text>
 				<view class="cell-tip"><radio @click="checkedPoints = !checkedPoints" color=" #5dbc7c" :checked="checkedPoints" /></view>
-			</view>
+			</view> -->
 			<view class="yt-list-cell b-b">
 				<text class="cell-tit clamp">运费</text>
 				<text class="cell-tip">{{ Postage }}</text>
@@ -156,7 +156,7 @@
 </template>
 
 <script>
-import { confirm,computedOrderkey,couponsOrder } from '@/api/order.js';
+import { confirm, computedOrderkey, couponsOrder } from '@/api/order.js';
 import { getUserInfo } from '@/api/user.js';
 import { cartAdd } from '@/api/product.js';
 export default {
@@ -283,7 +283,7 @@ export default {
 				addressId: this.addressData.id //地址编号
 			})
 				.then(({ data }) => {
-					console.log(data,'111');
+					console.log(data, '111');
 					this.payType = true;
 					this.integralShow = true;
 					// 获取支付金额
@@ -307,7 +307,7 @@ export default {
 		},
 		// 加载优惠券列表
 		couponsOrder(money) {
-			couponsOrder({}, money).then(e => {
+			couponsOrder({}, money, this.cartId).then(e => {
 				if (e.data.length > 0) {
 					this.couponListshow = true;
 				}
@@ -329,7 +329,7 @@ export default {
 		},
 		loadData() {
 			let obj = this;
-			confirm({ cartId: obj.cartId+'' }).then(({ data }) => {
+			confirm({ cartId: obj.cartId + '' }).then(({ data }) => {
 				obj.addressData = data.addressInfo || {};
 				obj.shopList = data.cartInfo; //商品列表
 				obj.moneyAll = data.priceGroup; //金额数据
@@ -358,9 +358,9 @@ export default {
 				this.$api.msg('请选择收货地址');
 				return false;
 			}
-			let url =  '/pages/money/pay?key='+ this.orderKey
-			if(this.pinkid){
-				url += '&pinkid='+this.pinkid
+			let url = '/pages/money/pay?key=' + this.orderKey;
+			if (this.pinkid) {
+				url += '&pinkid=' + this.pinkid;
 			}
 			uni.navigateTo({
 				url

+ 177 - 26
pages/order/evaluate.vue

@@ -16,36 +16,45 @@
 			<view>
 				<view class="flex_item zhil">
 					<view>商品质量</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
+					<view v-if="rateValue1 != ''"><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
 				</view>
 				<view class="flex_item zhil">
 					<view>服务态度</view>
-					<view><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
+					<view v-if="rateValue2 != ''"><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
 				</view>
-				<view class="equity_box">
-					<view class="text-box uni-textarea">
-						<textarea placeholder-style="color:#999" :placeholder="placeholder" @blur="bindTextAreaBlur"></textarea>
+				<view class="list">
+					<view class="list-left">标题:</view>
+					<input type="text" v-model="title" placeholder-class="placeholder" class="list-input" placeholder="请填写评论的标题" />
+				</view>
+				<view class="upload-box">
+					<view class="upload-left">主图</view>
+					<view class="upload-right" @click.stop="scImgMian()">
+						<image v-if="!main_pic" class="upload-img " src="/static/img/add.png"></image>
+						<image v-if="main_pic" class="upload-img " :src="main_pic"></image>
 					</view>
+				</view>
+				<view class="equity_box">
+					<view class="text-box uni-textarea"><textarea placeholder-style="color:#999" :placeholder="placeholder" v-model="text"></textarea></view>
 					<view class="">
 						<view class="add-img-box flex_item">
 							<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
 								<image class="add-img" @click.stop="imgInfo(index)" :src="item.url" mode="aspectFill"></image>
 								<image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image>
 							</view>
-							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()">
-								<image class="add-img" src="/static/img/add.png"></image>
-							</view>
+							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()"><image class="add-img" src="/static/img/add.png"></image></view>
 						</view>
 					</view>
 				</view>
 			</view>
 		</view>
 		<view @click.stop="submit" class="address-box submit-box"><text class="submit-btn">提交评论</text></view>
+		<view @click.stop="submit1" class="address-box submit-box"><text class="submit-btn gren">保存草稿</text></view>
 	</view>
 </template>
 
 <script>
 import { product, upload, order_comment } from '@/api/order.js';
+import { save_comment, reply_save } from '@/api/activity.js';
 import uniRate from '@/components/uni-rate/uni-rate.vue';
 export default {
 	components: {
@@ -53,6 +62,9 @@ export default {
 	},
 	data() {
 		return {
+			id: '',
+			title: '', //标题
+			main_pic: '', //主图
 			list: '', //订单详情
 			productInfo: '',
 			text: '', //评论内容
@@ -62,12 +74,20 @@ export default {
 			cloudimgList: [],
 			rateValue1: '', //商品质量
 			rateValue2: '', //服务态度
-			imgCount: 6 //最多支持9张上传,可以修改
+			imgCount: 9 //最多支持9张上传,可以修改
 		};
 	},
 	onLoad(option) {
-		this.unique = option.unique;
-		this.loadOrder();
+		if (option.unique) {
+			this.unique = option.unique;
+			this.rateValue1 = '0';
+			this.rateValue2 = '0';
+			this.loadOrder();
+		}
+		if (option.id) {
+			this.id = option.id;
+			this.loadData();
+		}
 	},
 	onShow() {},
 	methods: {
@@ -84,6 +104,22 @@ export default {
 				this.productInfo = e.data.productInfo;
 			});
 		},
+		loadData() {
+			reply_save({}, this.id).then(({ data }) => {
+				this.unique = data.unique;
+				this.title = data.title;
+				this.main_pic = data.main_pic;
+				for (let i = 0; i < data.pics.length; i++) {
+					let url = { url: data.pics[i] };
+					this.imgList.push(url);
+				}
+				this.text = data.comment;
+				this.rateValue1 = data.product_score + '';
+				this.rateValue2 = data.service_score + '';
+				this.loadOrder();
+				console.log(this.rateValue1, '12456');
+			});
+		},
 		//商品质量评分
 		rateChange1(val) {
 			this.rateValue1 = val.value;
@@ -98,7 +134,7 @@ export default {
 			console.log(obj.imgCount, 11);
 			if (obj.imgCount == 0) {
 				uni.showToast({
-					title: '最多添加6张图片',
+					title: '最多添加9张图片',
 					icon: 'none'
 				});
 				return;
@@ -107,11 +143,22 @@ export default {
 				file: ''
 			})
 				.then(e => {
-					console.log(e,'e')
+					console.log(e, 'e');
 					obj.imgList = [...obj.imgList, ...e];
-					console.log(obj.imgList,'imgList')
+					console.log(obj.imgList, 'imgList');
 					obj.imgCount = 10 - obj.imgList.length;
-					console.log(obj.imgCount ,'imgCount ')
+					console.log(obj.imgCount, 'imgCount ');
+				})
+				.catch(e => {});
+		},
+		scImgMian() {
+			let obj = this;
+			upload({
+				file: ''
+			})
+				.then(e => {
+					console.log(e, 'e');
+					obj.main_pic = e[0].url;
 				})
 				.catch(e => {});
 		},
@@ -135,7 +182,8 @@ export default {
 				product_score: obj.rateValue1,
 				service_score: obj.rateValue2,
 				unique: obj.unique,
-				
+				main_pic: obj.main_pic,
+				title: obj.title
 			})
 				.then(e => {
 					uni.navigateTo({
@@ -148,6 +196,36 @@ export default {
 					});
 				});
 		},
+		// 保存草稿
+		submit1(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(',');
+			save_comment({
+				pics: arr,
+				comment: obj.text,
+				product_score: obj.rateValue1,
+				service_score: obj.rateValue2,
+				unique: obj.unique,
+				main_pic: obj.main_pic,
+				title: obj.title
+			})
+				.then(e => {
+					uni.navigateTo({
+						url: '/pages/user/creation?id=0'
+					});
+				})
+				.catch(e => {});
+		},
 		//点击图片显示大图
 		imgInfo(i) {
 			let tempList = [];
@@ -224,11 +302,11 @@ page {
 				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; 
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
 			}
 			.title-right {
 				flex-shrink: 0;
@@ -279,6 +357,7 @@ page {
 	left: 0;
 	width: 750rpx;
 }
+
 .submit-btn {
 	margin-top: 10px;
 	display: inline-block;
@@ -286,17 +365,19 @@ page {
 	height: 96rpx;
 	line-height: 96rpx;
 	text-align: center;
-	background-color: #1BCC26 !important;
+	background-color: #000000;
 	opacity: 1;
-	border-radius: 32rpx;
-	border-width: 8rpx;
-	border-color: rgba(255, 255, 255, 1);
 	box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
 	border-radius: 56rpx;
 	font-size: 39rpx;
 	font-weight: bold;
 	color: rgba(255, 255, 255, 1);
 }
+.gren {
+	background: #ffffff;
+	color: #000000;
+	border: 1px solid #000000;
+}
 .submit-btn-txt {
 	font-size: 39rpx;
 	font-weight: bold;
@@ -402,4 +483,74 @@ page {
 	transform: scaleY(0.3);
 	background-color: rgba(0, 0, 0, 0.5);
 }
-</style>
+.list {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	width: 100%;
+	margin-top: 32rpx;
+	// height: 133rpx;
+
+	.list-left {
+		width: 100%;
+		text-align: left;
+		font-size: 28rpx;
+	}
+
+	input {
+		height: 66rpx;
+
+		margin-top: 32rpx;
+	}
+
+	.list-input {
+		padding: 10rpx 24rpx;
+		// margin: 12rpx 0 ;
+		display: flex;
+		justify-content: center;
+		// line-height: 66rpx;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		flex: 1;
+		color: #000000;
+		border: 1rpx solid #000000;
+		border-radius: 22rpx;
+		text-align: left;
+		padding-right: 24rpx;
+
+		.input-placeholder {
+			height: 70rpx;
+			color: #000000;
+		}
+	}
+}
+.upload-box {
+	width: 100%;
+	background: #ffffff;
+	// border: 1px solid #E63931;
+	border-radius: 27rpx;
+	display: flex;
+	flex-direction: column;
+	padding: 30rpx 40rpx 30rpx 0;
+	margin: 0 auto 30rpx;
+
+	.upload-left {
+		font-weight: 400;
+		font-size: 28rpx;
+	}
+
+	.upload-right {
+		flex: 1;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.upload-img {
+			width: 200rpx;
+			height: 200rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+</style>

+ 14 - 15
pages/order/order.vue

@@ -36,11 +36,11 @@
 							<view class="right">
 								<view class="flex-start">
 									<text class="title clamp">{{ goodsItem.productInfo.store_name }}</text>
-									<text class="price">{{ goodsItem.productInfo.price|moneyNum }}</text>
+									<text class="price">{{ goodsItem.productInfo.price | moneyNum }}</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>
+									<text class="attr-box">x {{ goodsItem.cart_num }}</text>
 								</view>
 							</view>
 						</view>
@@ -49,9 +49,9 @@
 							<text class="num">{{ item.cartInfo.length }}</text>
 							件商品 邮费
-							<text class="price">{{ moneyNum(item.pay_postage)}}</text>
+							<text class="price">{{ moneyNum(item.pay_postage) }}</text>
 							实付款
-							<text class="price">{{ moneyNum(item.pay_price)}}</text>
+							<text class="price">{{ moneyNum(item.pay_price) }}</text>
 						</view>
 						<view class="action-box b-t" v-if="item.status != 5">
 							<button v-if="item._status._title == '未支付'" class="action-btn" @click.stop="cancelOrder(item)">取消订单</button>
@@ -142,22 +142,22 @@ export default {
 		// #endif
 	},
 	// #ifdef APP-PLUS || H5
-	onBackPress(e){
+	onBackPress(e) {
 		uni.switchTab({
-			url: '/pages/user/user',
+			url: '/pages/user/user'
 		});
 		return true;
 	},
 	// #endif
 	filters: {
-		moneyNum(value){
-				return +value;
-		},
+		moneyNum(value) {
+			return +value;
+		}
 	},
 	methods: {
 		// 转换金额为数字
-		moneyNum(value){
-				return +value;
+		moneyNum(value) {
+			return +value;
 		},
 		// 确认收货
 		orderTake(item, index) {
@@ -453,11 +453,11 @@ page,
 			flex-direction: column;
 			padding: 0 30rpx 0 24rpx;
 			overflow: hidden;
-			.row{
+			.row {
 				margin-top: 10rpx;
 			}
-			.row_title{
-				padding:5rpx 10rpx;
+			.row_title {
+				padding: 5rpx 10rpx;
 				background-color: #dddddd;
 				border-radius: 10rpx;
 				font-size: 22rpx;
@@ -482,7 +482,6 @@ page,
 				&:before {
 					content: '¥';
 					font-size: $font-sm;
-					
 				}
 			}
 		}

+ 5 - 5
pages/product/classify.vue

@@ -1,14 +1,14 @@
 <template>
 	<view class="container">
 		<!-- 头部轮播 -->
-		<view class="carousel-section">
+		<!-- <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> -->
+		<!-- <view class="type-title-box flex">
 			<view class="title-border"></view>
 			<view class="title-content">
 				<text v-if="type == 1">精品推荐</text>
@@ -17,7 +17,7 @@
 				<text v-if="type == 4">促销单品</text>
 			</view>
 			<view class="title-border"></view>
-		</view>
+		</view> -->
 
 		<view class="goodsList-box">
 			<view class="goodsList-item flex" :key="ind" v-for="(ls, ind) in list">
@@ -167,7 +167,7 @@ page {
 				position: absolute;
 				left: 0;
 				bottom: 0;
-				width:100%;
+				width: 100%;
 				.money-box {
 					.money {
 						font-size: $font-lg;

+ 11 - 12
pages/product/common/productBottom.vue

@@ -4,10 +4,10 @@
 			<text class="iconfont iconhome"></text>
 			<text>首页</text>
 		</navigator>
-		<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
+		<!-- <view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
 			<text class="iconfont " :class="{ iconlike: !goodsObjact.userCollect, iconlikefill: goodsObjact.userCollect }"></text>
 			<text>收藏</text>
-		</view>
+		</view> -->
 		<view class="action-btn-group">
 			<button type="primary" class=" action-btn no-border add-cart-btn" @click="buy(2)">加入购物车</button>
 			<button type="primary" class=" action-btn no-border buy-now-btn" @click="buy(1)">立即购买</button>
@@ -27,7 +27,7 @@ export default {
 				return {};
 			}
 		},
-		goodsid:{
+		goodsid: {
 			default: ''
 		}
 	},
@@ -36,7 +36,7 @@ export default {
 	},
 	methods: {
 		buy(type) {
-			this.$emit('specOPne',type);
+			this.$emit('specOPne', type);
 		},
 		//收藏
 		toFavorite(item) {
@@ -71,10 +71,11 @@ export default {
 	bottom: 0rpx;
 	z-index: 95;
 	display: flex;
-	justify-content: center;
+	justify-content: space-between;
+	padding-left: 20rpx;
 	align-items: center;
 	width: 750rpx;
-	height: 120rpx;
+	height: 96rpx;
 	background-color: #ffffff;
 	/* box-shadow: 0 0 20rpx 0 rgba(0, 0, 0, 0.5);
 	border-radius: 16rpx; */
@@ -106,8 +107,7 @@ export default {
 	}
 	.action-btn-group {
 		display: flex;
-		height: 76rpx;
-		border-radius: 100px;
+		height: 96rpx;
 		overflow: hidden;
 		margin-left: 20rpx;
 		position: relative;
@@ -119,23 +119,22 @@ export default {
 			transform: translateY(-50%);
 			height: 28rpx;
 			width: 0;
-			border-right: 1px solid rgba(255, 255, 255, 0.5);
 		}
 		.action-btn {
 			display: flex;
 			align-items: center;
 			justify-content: center;
-			width: 270rpx;
+			width: 300rpx;
 			height: 100%;
 			font-size: $font-base;
 			padding: 0;
 			border-radius: 0;
 			background: transparent;
 			&.buy-now-btn {
-				background-color: #303e49;
+				background-color: #ff3442;
 			}
 			&.add-cart-btn {
-				background-color: $base-color;
+				background-color: #ec6941;
 			}
 		}
 	}

+ 5 - 6
pages/product/common/productContent.vue

@@ -1,10 +1,10 @@
 <template>
 	<view class="introduce-section">
 		<text class="title clamp2">{{ goodsObjact.store_name }}</text>
-		<button open-type="share" class="shareDate">
+		<!-- <button open-type="share" class="shareDate">
 			<image class="share-img" src="../../../static/img/img57.png"></image>
 			好物推荐
-		</button>
+		</button> -->
 		<text class="info" v-if="goodsObjact.store_info">{{ goodsObjact.store_info }}</text>
 		<!-- <view class="progress-box">
 			<progress :percent="goodsObjact.percent | parseIntTo" activeColor="#F65527" font-size="10" show-info border-radius="5" stroke-width="9" />
@@ -14,7 +14,6 @@
 			<text class="price-tip">¥</text>
 			<view class="price">
 				{{ goodsObjact.price }}
-				<text class="text">/份</text>
 				<text class="m-price" v-if="goodsObjact.ot_price > goodsObjact.price">¥{{ goodsObjact.ot_price }}</text>
 			</view>
 		</view>
@@ -32,7 +31,7 @@ export default {
 			type: Object,
 			default: function() {
 				return {
-					percent:1
+					percent: 1
 				};
 			}
 		}
@@ -124,10 +123,10 @@ export default {
 		}
 	}
 	.price-green {
-		color: #2dbd59;
+		color: #ff3442;
 		font-size: 28rpx !important;
 		text {
-			background: #2dbd59;
+			background: #ff3442;
 			color: #ffffff;
 			padding: 0rpx 10rpx;
 			border-radius: 5rpx;

+ 0 - 386
pages/product/groupBooking/detail.vue

@@ -1,386 +0,0 @@
-<template>
-	<view class="box">
-		<!-- 拼团 -->
-		<view class="lyy-a">
-			<view class="lyy-a-p">
-				<view class="lyy-a-f">
-					<view><image :src="goods.image" class="lyy-a-tu" /></view>
-					<view class="lyy-a-z">
-						<view class="lyy-a-word lyy-a-word2">{{ goods.title }}</view>
-						<view class="flex money-box">
-							<view class="lyy-a-f lyy-a-word margin-r-20">
-								<view class="lyy-a-word3">¥{{ goods.price }}</view>
-							</view>
-							<view class="lyy-a-tu2 lyy-a-f padding-c-20 border-radius-all">
-								<view class="lyy-a-tu3"><image src="http://lxscimg.liuniu946.com/2019-11-02_5dbd110b5928a.png" class="lyy-a-tu5"></image></view>
-								<view class="lyy-a-tu4 flex-shrink-false">{{ goods.people }}人拼</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="lyy-hx"></view>
-		<!-- 第二部分 -->
-		<view class="lyy-b padding-t-20">
-			<view class="lyy-b-p">
-				<view class="lyy-b-jz flex">
-					<view class="image1"><view class="lyy-b-word">剩余时间</view></view>
-				</view>
-				<view class="lyy-b-jz flex">
-					<uni-countdowns
-						v-if="pinkBool == 0"
-						color="#FFFFFF"
-						splitor-color="#FC5B62"
-						background-color="#FC5B62"
-						border-color="#FC5B62"
-						:show-day="false"
-						:hour="stopTime.stopTimeH"
-						:minute="stopTime.stopTimeM"
-						:second="stopTime.stopTimeS"
-					></uni-countdowns>
-				</view>
-				<view class="lyy-b-jz flex">
-					<span class="lyy-b-word2">{{ pinkT.people }}</span>
-					<span class="lyy-b-word3">人成团,还差{{ peopleNub }}人</span>
-				</view>
-				<view class="lyy-b-jz flex">
-					<view class="cmy-user-box">
-						<view class="user-list">
-							<view class="lyy-y bg-gray"><image :src="pinkT.avatar" class="user-list-img" /></view>
-							<view class="lyy-y-word clamp">{{ pinkT.nickname }}</view>
-						</view>
-						<view class="user-list" v-for="(item , i) in people" :key='i'>
-						    <view class="lyy-y bg-gray"><image :src="item.avatar" class="user-list-img" /></view>
-						    <view class="lyy-y-word clamp">{{ item.nickname }}</view>
-						</view>
-						<view class="user-list" v-for="(l, i) in peopleNub" :key="i">
-							<view class="lyy-y bg-gray"></view>
-							<view class="lyy-y-word clamp">待邀请</view>
-						</view>
-					</view>
-				</view>
-				<view class="lyy-b-jz flex">
-					<view class="lyy-b-but" v-if="status == 1 && pinkBool == 0" @click="invitation">邀请好友参团</view>
-					<view class="lyy-b-but" v-if="status == 0&&pinkBool==0" @click="goBuy">立即加入</view>
-					<!-- <view class="lyy-b-but" @click="goBuy">立即加入</view> -->
-					<view class="lyy-b-but bg-gray" v-if="pinkBool == -1">拼团失败</view>
-					<view class="lyy-b-but" v-if="pinkBool == 1">拼团成功</view>
-				</view> 
-			</view>
-		</view>
-		<view class="lyy-hx"></view>
-		<!-- 第三部分 -->
-		<view class="lyy-c">
-			<view class="lyy-c-p">
-				<view class="lyy-c-word">
-					<view>拼团规则:</view>
-					<view>1.点击商品进入商品详情,通过超值拼团进入订单支付 页,用户付款成功后,按页面提示分享给微信好友。</view>
-					<view>2.好友通过分享,加入超值拼团,完成订单支付,待达成 拼团人数后,拼团成功。</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import uniCountdowns from '@/components/uni-countdown/uni-countdowns.vue';
-import { getCombinationLisPink } from '@/api/product.js';
-import { groupGoods } from '@/api/product.js';
-import { timeComputed } from '@/utils/rocessor.js';
-import { mapState } from 'vuex';
-// 倒计时
-export default {
-	data() {
-		return {
-			gp_id: 0, //拼团商品id
-			goods: {}, //商品信息
-			pinkT: {}, //拼团团长信息
-			people: [], //拼团成员信息
-			status: 0, //判断是否为团长
-			gid: 0,
-			user_info: {}, //当前用户信息
-			// 倒计时
-			stopTime: {
-				stopTimeH: 0,
-				stopTimeM: 0,
-				stopTimeS: 0
-			},
-			pinkBool: 0, //拼团状态0为待拼团 -1为拼团失败 1为拼团成功
-			userBool: 0, //判断用户是否已经参与拼团 0未参加 1为已参加
-			spread: '', //默认没有邀请人
-			userInfo: {} ,//当前用户信息
-			peopleNub:0
-		};
-	},
-	onLoad(e) {
-		// 保存拼团订单id
-		this.gp_id = e.id;
-		// 判断是否有人邀请
-		if (e.spread) {
-			// 存储邀请人
-			this.spread = e.spread;
-			uni.setStorageSync('spread', option.spread);
-		}
-	},
-	onShow() {
-		this.getData();
-	},
-	components: {
-		uniCountdowns
-	},
-	methods: {
-		//前往参团
-		goBuy() {
-			let _self = this;
-			uni.navigateTo({
-				url: '/pages/order/createOrder?pinkId=' + this.gp_id + '&type=pink' + '&pid=' + this.goods.product_id + '&gid=' + this.goods.id + '&merid=' + this.goods.mer_id
-			});
-		},
-		//邀请参团
-		invitation() {
-			let obj = this;
-			// 判断拼团是否已经结束
-			if (obj.userBool == 0) {
-				uni.showModal({
-					title: '提示',
-					content: '该拼团已经结束!',
-					showCancel: false,
-					success: res => {},
-					fail: () => {},
-					complete: () => {}
-				});
-				return;
-			}
-			uni.navigateTo({
-				url: '/pages/product/groupBooking/inviteImg?id=' + this.pinkT.id + '&spread=' + this.userInfo.uid,
-				success: res => {},
-				fail: e => {
-					console.log(e);
-				},
-				complete: () => {}
-			});
-		},
-		// #ifdef H5
-		// 加载微信html5页面分享方法
-		shareDate() {
-			let obj = this;
-			// 判断是否微信浏览器
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				// 过滤微信强制添加的链接地址
-				url = url.replace('?from=singlemessage', '');
-				let data = {
-					link: url, // 分享链接
-					imgUrl: obj.goodsObjact.image, // 分享图标
-					desc: obj.goodsObjact.store_info,
-					title: obj.goodsObjact.store_name,
-					success: function() {}
-				};
-				obj.weichatObj.updateAppMessageShareData(data);
-				obj.weichatObj.updateTimelineShareData(data);
-			}
-		},
-		// #endif
-		// 获取拼团信息
-		getData() {
-			let obj = this;
-			// let data = {gp_id:_self.gp_id},
-			getCombinationLisPink({}, this.gp_id).then(e => {
-				let r = e.data;
-				// 保存拼团商品详细
-				obj.goods = r.store_combination;
-				// 保存团长信息
-				obj.pinkT = r.pinkT;
-				/* 计算倒计时 */
-				obj.timeComputed(obj.pinkT.stop_time * 1000);
-				// 获取拼团用户列表
-				obj.people = r.pinkAll;
-				// 获取当前是否已参与过这个拼团
-				obj.userBool = r.userBool;
-				// 判断当前用户是否为团长
-				if (r.pinkT.uid == r.userInfo.uid) {
-					// 显示邀请好用选项
-					obj.status = 1;
-				}
-				// 保存当前登录用户信息
-				obj.userInfo = r.userInfo;
-				// 获取拼团是否已经过期
-				obj.pinkBool = r.pinkBool;
-				obj.peopleNub = obj.pinkT.people - 1 - obj.people.length;
-				// #ifdef H5
-				// 加载微信分享配置
-				this.shareDate();
-				// #endif
-			});
-		},
-		// 计算倒计时时间
-		timeComputed(da) {
-			let obj = this;
-			let stopTime = timeComputed(da);
-			obj.stopTime.stopTimeH = stopTime.hours;
-			obj.stopTime.stopTimeM = stopTime.minutes;
-			obj.stopTime.stopTimeS = stopTime.seconds;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-.box {
-	/* #ifdef APP-PLUS | MP */
-	padding-top: var(--status-bar-height);
-	/* #endif */
-}
-.lyy-c {
-	width: 100%;
-	background: rgba(255, 255, 255, 1);
-	.lyy-c-word {
-		font-size: 28rpx;
-		color: rgba(102, 102, 102, 1);
-		line-height: 50rpx;
-	}
-
-	.lyy-c-p {
-		padding: 39rpx 30rpx;
-	}
-}
-
-.lyy-wrap {
-	background-color: #f4f4f4;
-}
-
-.lyy-hx {
-	height: 14rpx;
-}
-
-.image1 {
-	width: 200rpx;
-	height: 33rpx;
-	background: url('http://lxscimg.liuniu946.com/2019-11-02_5dbd0e10a2160.png') center center no-repeat;
-	background-size: 200rpx auto;
-}
-
-.lyy-b {
-	width: 100%;
-	background-color: white;
-	.lyy-b-p {
-		padding: 30rpx 45rpx;
-		.lyy-b-word2,
-		.lyy-b-word3 {
-			font-size: 28rpx;
-			font-weight: bold;
-		}
-		.lyy-b-word2 {
-			color: #fc5b62;
-		}
-		.lyy-b-word3 {
-			color: #1d2023;
-		}
-		.lyy-b-jz {
-			width: 100%;
-			justify-content: center;
-			margin-bottom: 20rpx;
-			.lyy-y {
-				width: 80rpx;
-				height: 80rpx;
-				margin: 0px 15rpx;
-				border-radius: 40rpx;
-				overflow: hidden;
-				.user-list-img {
-					width: 100%;
-					height: 100%;
-				}
-			}
-			.lyy-y-word {
-				margin-top: 10rpx;
-				font-size: 28rpx;
-				text-align: center;
-				width: 110rpx;
-			}
-			.lyy-b-but {
-				width: 550rpx;
-				height: 80rpx;
-				background: #fc5b62;
-				border-radius: 100rpx;
-				text-align: center;
-				color: white;
-				line-height: 80rpx;
-				font-size: 32rpx;
-			}
-			.cmy-user-box {
-				.user-list {
-					display: inline-block;
-					line-height: 1;
-				}
-			}
-		}
-		.lyy-b-word {
-			text-align: center;
-			font-size: 26rpx;
-			color: rgba(29, 32, 35, 1);
-		}
-	}
-}
-
-// 商品列表样式
-.lyy-a {
-	width: 100%;
-	background-color: white;
-	.lyy-a-p {
-		padding: 22rpx 30rpx;
-		.lyy-a-f {
-			display: flex;
-			align-items: center;
-			.lyy-a-f2 {
-				flex: 1;
-			}
-			.lyy-a-tu {
-				width: 122rpx;
-				height: 122rpx;
-			}
-			.lyy-a-z {
-				padding-left: 30rpx;
-				flex-grow: 1;
-				.money-box {
-					justify-content: flex-start;
-					.lyy-a-tu2 {
-						background: rgba(255, 255, 255, 1);
-						border: 1rpx solid #fc5b62;
-						.lyy-a-tu3 {
-							background-color: #fc5b62;
-							padding: 2px 4px 0px 4px;
-							text-align: center;
-							height: 26rpx;
-							.lyy-a-tu5 {
-								width: 20rpx;
-								height: 20rpx;
-								display: block;
-							}
-						}
-						.lyy-a-tu4 {
-							margin-left: 2px;
-							font-size: 10px;
-							color: #fc5b62;
-							padding: 0px 10rpx;
-							text-align: center;
-						}
-					}
-				}
-				.lyy-a-word {
-					line-height: 56rpx;
-					.lyy-a-word3 {
-						font-size: 28rpx;
-						font-weight: bold;
-						color: #fc5b62;
-					}
-				}
-				.lyy-a-word2 {
-					font-size: 30rpx;
-					color: rgba(29, 32, 35, 1);
-				}
-			}
-		}
-	}
-}
-</style>

+ 0 - 236
pages/product/groupBooking/index.vue

@@ -1,236 +0,0 @@
-<template>
-	<view class="lyy-bg4">
-		<view class="lyy-f-a">
-			<view class="lyy-f-b lyy-flex">
-				<view class="lyy-f-c item" @click="goProduct(items)" v-for="(items, ind) in goodsList" :key="ind">
-					<view class="content">
-						<view><image :src="items.image" class="lyy-f-image" /></view>
-						<view class="lyy-f-word1 lyy-f-jl ellipsis">{{ items.title }}</view>
-						<view class="lyy-flex2">
-							<view class="lyy-flex3">
-								<view class="lyy-f-word2 lyy-f-jl">¥{{ items.price * 1 }}</view>
-							</view>
-							<view class="lyy-a-tu2 lyy-flex2">
-								<view class="lyy-a-tu3"><image src="../../../static/img/img11.png" class="lyy-a-tu5" /></view>
-								<view class="lyy-a-tu4">{{ items.people }}人拼</view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<uni-load-more :status="loadingType"></uni-load-more>
-	</view>
-</template>
-
-<script>
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { getCombinationList } from '@/api/product.js';
-export default {
-	components: {
-		uniLoadMore
-	},
-	data() {
-		return {
-			goodsList: [],
-			loadingType: 'more', //加载更多状态
-			limit: 20, //每次加载数据条数
-			page: 1 //当前页数
-		};
-	},
-	onLoad(options) {
-		this.loadData();
-	},
-	//下拉刷新
-	onPullDownRefresh() {
-		this.loadData('refresh');
-	},
-	//监听页面是否滚动到底部加载更多
-	onReachBottom() {
-		this.loadData();
-	},
-	methods: {
-		//加载商品 ,带下拉刷新和上滑加载
-		async loadData(type = 'add', loading) {
-			let obj = this;
-			let data = {
-				page: obj.page,
-				limit: obj.limit
-			};
-			//没有更多直接返回
-			if (type === 'add') {
-				if (obj.loadingType === 'nomore') {
-					return;
-				}
-				obj.loadingType = 'loading';
-			} else {
-				obj.loadingType = 'more';
-			}
-
-			// 加载商品信息
-			getCombinationList(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();
-						}
-					}
-				})
-				.catch();
-		},
-		goProduct(e) {
-			uni.navigateTo({
-				url: '/pages/product/groupBooking/productGroup?id=' + e.id
-			});
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-// 拼团列表
-.lyy-f-a {
-	margin: 0px 15px;
-
-	.lyy-flex {
-		/* 内部模块1*/
-		display: flex;
-		justify-content: space-between;
-	}
-	.lyy-f-b {
-		flex-wrap: wrap;
-		.lyy-f-c {
-			flex: 0 0 50%;
-			/* width: 50%; */
-			margin: 10px 0px 0px 0px;
-		}
-
-		.item:nth-child(2n + 1) .content {
-			margin: 0px 7.5px 0px 0px;
-			border-radius: 10px;
-		}
-	}
-
-	.lyy-f-b .content {
-		background-color: white;
-		.lyy-f-image {
-			width: 100%;
-			height: 340rpx;
-			border-radius: 10rpx 10rpx 0rpx 0rpx;
-		}
-		.ellipsis {
-			width: 165px;
-			white-space: nowrap;
-			overflow: hidden;
-			text-overflow: ellipsis;
-		}
-		.lyy-f-jl {
-			padding: 5px 7px;
-		}
-		.lyy-f-word1 {
-			font-size: 12px;
-			color: rgba(50, 50, 50, 1);
-			line-height: 20px;
-			width: 300rpx;
-			white-space: nowrap;
-			overflow: hidden;
-			text-overflow: ellipsis;
-		}
-	}
-
-	.item:nth-child(2n) .content {
-		margin: 0px 0 0px 7.5px;
-		border-radius: 10px;
-	}
-
-	.lyy-f-word3 {
-		font-size: 12px;
-		text-decoration: line-through;
-		color: rgba(139, 139, 139, 1);
-	}
-
-	.lyy-f-word5 {
-		font-size: 20rpx;
-		color: rgba(153, 153, 153, 1);
-		margin: 20rpx 0px 0px 0px;
-	}
-
-	.lyy-f-word4 {
-		height: 26px;
-		background: #6fb22f;
-		color: white;
-		text-align: center;
-	}
-
-	.lyy-f-d {
-		height: 24rpx;
-		border: 1px solid rgba(252, 91, 98, 1);
-		border-radius: 3px;
-		font-size: 20rpx;
-		text-align: center;
-		width: 50rpx;
-		color: rgba(252, 91, 98, 1);
-		margin: 23rpx 0rpx 0rpx 0rpx;
-		line-height: 24rpx;
-	}
-
-	.lyy-flex2 {
-		display: flex;
-		padding-right: 10rpx;
-		align-items: center;
-		.lyy-flex3 {
-			flex: 1;
-			.lyy-f-word2 {
-				font-size: 14px;
-				color: rgba(241, 13, 59, 1);
-			}
-		}
-		&.lyy-a-tu2 {
-			height: 34rpx;
-			background: rgba(255, 255, 255, 1);
-			border: 1px solid #fc5b62;
-			border-radius: 2px;
-			margin: 10rpx 0rpx;
-
-			.lyy-a-tu3 {
-				height: 30rpx;
-				background-color: #fc5b62;
-				padding: 0px 6px;
-				text-align: center;
-				.lyy-a-tu5 {
-					width: 20rpx;
-					height: 20rpx;
-					margin-top: 6rpx;
-					display: block;
-				}
-			}
-
-			.lyy-a-tu4 {
-				margin-left: 4rpx;
-				font-size: 24rpx;
-				line-height: 30rpx;
-				color: #fc5b62;
-				padding: 0px 10rpx;
-				text-align: center;
-			}
-		}
-	}
-}
-</style>

+ 0 - 75
pages/product/groupBooking/inviteImg.vue

@@ -1,75 +0,0 @@
-<template>
-	<view class="box">
-		<image class="inviteImg" :src="image" ></image>
-		<view class="lyy-b-but">长按图片下载</view>
-		<!-- <view class="lyy-b-but" @click="domImg">点击下载图片</view> -->
-	</view>
-</template>
-
-<script>
-	import { getCombinationPoster } from '@/api/product.js';
-	import { mapState } from 'vuex';
-	export default {
-		data() {
-			return {
-				image:'',//海报
-				ptId:'',//拼团id
-			}
-		},
-		computed: {
-			...mapState(['baseURL','urlFile'])
-		},
-		onLoad(option) {
-			// 保存拼团id
-			this.ptId = option.id;
-			// 保存团长id
-			this.spread = option.spread;
-			// 加载分享图
-			this.getCombinationPoster();
-		},
-		methods: {
-			// 加载海报
-			getCombinationPoster() {
-				let obj = this;
-				getCombinationPoster({
-					id:obj.ptId,
-					// #ifdef H5|APP-PLUS
-					url:obj.baseURL+obj.urlFile+'/#/pages/product/groupBooking/detail?id='+obj.ptId+'&spread='+obj.spread,
-					from:'wechat',//来源wechat公众号
-					// #endif
-					// #ifdef MP
-					from:'routine',//来源routine小程序
-					url:'/pages/product/groupBooking/detail?id='+obj.ptId
-					// #endif
-				}).then((e) => {
-					obj.image = e.data.url;
-				}).catch((e) => {
-					console.log(e);
-				})
-			}
-		},
-	}
-</script>
-
-<style lang="scss">
-	page{
-		background-color: #FFFFFF;
-		height: 100%;
-	}
-	.box{
-		.inviteImg{
-			width: 750rpx;
-			height: 1200rpx;
-		}
-	}
-	.lyy-b-but {
-		height: 80rpx;
-		background: #fc5b62;
-		border-radius: 100rpx;
-		text-align: center;
-		color: white;
-		line-height: 80rpx;
-		font-size: 32rpx;
-		margin:  0 100rpx;
-	}
-</style>

+ 0 - 2094
pages/product/groupBooking/productCollage.vue

@@ -1,2094 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<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>
-		<!-- 介绍部分 -->
-		<view class="introduce-section">
-			<view class="introduce-price flex1">
-				<view class="price">
-					<view class="price-left">
-						<view class="left-1">¥</view>
-						<view class="left-2">{{goodsObjact.price}}</view>
-					</view>
-					<!-- <view class="price-right" >单买价 ¥{{goodsObjact.product_price}}</view> -->
-				</view>
-				<view class="people flex_item">
-					<view class="people_number">{{goodsObjact.people}}人拼</view>
-				</view>
-			</view>
-			<view class="title" >{{goodsObjact.title}}</view>
-			<view class="bot-row flex1">
-				<view>快递:¥ {{goodsObjact.postage}}</view>
-				<view>剩余:{{ goodsObjact.allStock}}件</view>
-				<view>销量:{{ goodsObjact.sales }}</view>
-			</view>
-		</view>
-		<!-- <view class="c-list">
-			<view class="c-row b-b"><text class="tit">拼团玩法</text></view>
-			<view class="c-row b-b">
-				<view class="c-text">
-					①开团/参团
-					<text>——</text>
-					②邀请好友
-					<text>——</text>
-					③满员发货
-				</view>
-			</view>
-			<view class="c-row b-b" @click="toggleSpec()" v-if="goodsType == 2">
-				<text class="tit">购买数量</text>
-				<view class="con">
-					<text class="selected-text">{{ goodsNumber }}</text>
-				</view>
-				<text class="iconfont iconenter"></text>
-			</view>
-		</view> -->
-		<view class="pinklistbox" v-if="pinkTlist.length > 0">
-			<view class="listbox-1 flex1">
-				<view >{{pinkTlist.length}}人在拼单,可直接参与</view>
-				<view class="more flex-center" @click="opens_popup" v-if="more">查看全部
-					<image src="../../../static/img/img39.png"></image>
-				</view>
-			</view>
-			<view class="pinklist">
-				<view v-for="(ls, ind) in showlist" :key="ind" class="flex pinklist_list">
-					<view class="pink_row flex1">
-						<view class="pink_img"><image :src="ls.avatar"></image></view>
-						<view class="pink_name">{{ ls.nickname }}</view>
-					</view>
-					<view class="pink_tpl flex1">
-						<view >
-							<view class="pink_people">
-								还差
-								<text>{{ ls.count}}</text>
-								人拼团
-							</view>
-							<!-- <view class="pink_people">
-								剩余{{ls.time || '00:00:00'}}
-							</view> -->
-						</view>
-						<view class="pint" @click="groupBooking(ls.id)">
-							去拼单
-							<!-- <text class="iconfont iconenter"></text> opens_popups-->
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 评价 -->
-		<!-- <view class="eva-section" v-if="replyCount > 0" @click="navTo('/pages/product/reply')">
-			<view class="e-header">
-				<text class="tit">评价</text>
-				<text class="number">({{replyCount}})</text>
-				<text class="tip">全部评价</text>
-				<text class="iconfont iconenter"></text>
-			</view>
-			<view class="eva-box">
-				<view class="box-1 flex1">
-					<view class="left flex-start">
-						<image :src="commentList.avatar"></image>
-						<view class="content">
-							<view class="content-name">{{commentList.nickname}}</view>
-							<view class="content-time">{{commentList.add_time}}</view>
-						</view>
-					</view>
-					<view class="right flex-upDown-center">
-						<view><uniRate text="1" size="14" margin="1" :value="commentList.product_score" ></uniRate></view>
-						<text class="red">{{commentList.product_score}}分</text>
-					</view>
-				</view>
-				<view class="box-2">{{commentList.comment}}</view>
-				<view class="box-3">
-					<view v-for="(item,index) in commentList.pics" :key="index" class="box-3-1">
-						<image :src="item"></image>
-					</view>
-				</view>
-			</view>
-		</view> -->
-		<view class="eva-section" v-if="reply.length > 0" @click="navTo('/pages/product/reply?id=' + goodsid)">
-			<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="time">{{ reply.add_time }}</text>
-					</view>
-				</view>
-			</view>
-		</view>
-		<!-- 商品详情图 -->
-		<view class="detail-desc">
-			<view class="desc-title flex-center">
-				<view class="one"></view>
-				商品详情
-				<view class="two"></view>
-			</view>
-			<rich-text :nodes="goodsObjact.description"></rich-text>
-		</view>
-		<!-- <view class="detail-desc">
-			<view class="d-header"><text>图文详情</text></view>
-			<rich-text :nodes="goodsObjact.description"></rich-text>
-		</view> -->
-		<!-- 拼团商品 -->
-		<view class="page-bottom" >
-			<!-- <navigator url="/pages/index/index" open-type="switchTab" class="p-b-btn">
-				<text class="iconfont iconhomefill"></text>
-				<text>首页</text>
-			</navigator> -->
-			<!--<view class="botton-1 flex-center">
-				<view class="botton-frame" @click="toFavorite(goodsObjact)">
-					<view class="img-box" v-if="goodsObjact.userCollect == false"><image src="../../static/label/img02.png"></image></view>
-					<view class="img-box" v-if="goodsObjact.userCollect == true"><image src="../../static/label/img08.png"></image></view>
-					<view class="word" :class="{ active: goodsObjact.userCollect }">收藏</view>
-				</view>
-			</view> 
-			<view class="p-b-btn" :class="{ active: goodsObjact.userCollect }" @click="toFavorite(goodsObjact)">
-				<text class="iconfont iconlikefill"></text>
-				<text>收藏</text>
-			</view> -->
-			<view class="action-btn-group">
-				<!-- <button type="primary" class=" action-btn no-border btn-favorites-btn" @click="navTo('/pages/favorites/favorites')">收藏夹</button> -->
-				<!-- <button type="primary" class=" action-btn no-border buy-now-btn" @click="toFavorite(goodsObjact)">{{ goodsObjact.userCollect ? '取消收藏' : '收藏' }}</button> -->
-				<button type="primary" class=" action-btn no-border add-cart-btn" @click="specOPne()">一键开团</button>
-			</view>
-		</view>
-		
-		<!-- 规格-模态层弹窗 -->
-		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer attr-content" @click.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="actionImage"></image>
-					<view class="right">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
-			</view>
-		</view>
-		
-		<!-- 查看全部拼单 -->
-		<uni-popup ref="popup" type="center" >
-			<view class="popup-row">
-				<view class="popup-1">
-					正在拼单
-				</view>
-				
-				<scroll-view scroll-y="true" class="popcont-box">
-					<view class="popup-2">
-						<view v-for="(item,index) in pinkTlist" :key="index" class="popup-2-row flex1">
-							<view class="row-1 flex1">
-								<view class="one">
-									<image :src="item.avatar"></image>
-									<view class="two">
-										<view class="two-1">{{item.nickname }}</view>
-										<!-- <view>剩余 {{item.time}}</view> -->
-									</view>
-								</view>
-								
-								<text class="two-1-1">还差{{item.count}}人</text>
-							</view>
-							<view class="row-2" @click="groupBooking(item.id)">
-								去拼单
-							</view>
-						</view>
-					</view>
-				</scroll-view>
-				
-			</view>
-			<view class="delete" @click="closes_popup"><image src="../../../static/img/deletes.png"></image></view>
-		</uni-popup>
-		
-		<!-- <uni-popup ref="popups" type="center" >
-			<view class="popup-rows" >
-				<view class="rows-1">参与李丹的拼单</view>
-				<view class="rows-2">仅剩<text class="red">1</text>个名额,23:41:55后结束</view>
-				<view class="rows-3 flex1">
-					<view class="rows-3-group" v-for="(item,index) in information" >
-						<view class="group-1">
-							<image src="../../static/delete/timg.jpg"></image>
-							<view class="group-1-1" >团长</view>
-						</view>
-						<view class="group-2">婷930sadasa</view>
-					</view>
-					<view class="rows-3-group" v-for="i in (5 - information.length) " >
-						<view class="group-1">
-							<image src="../../static/label/blank.png"></image>
-						</view>
-						<view class="group-2">带邀请</view>
-					</view>
-				</view>
-				<view class="rows-4" @click="navTo('/pages/order/createOrder')">参与拼单</view>
-			</view>
-			<view class="delete" @click="groupBooking()"><image src="../../static/label/deletes.png"></image></view>
-		</uni-popup>
-		 -->
-		
-		
-		<!-- #ifdef H5 -->
-        <!-- <view class="btn_fenxiang" @click="open">分享</view> -->
-        <view class="mask" v-show="show"><image @click="onTap" src="https://mmz.liuniu946.com/statics/img/shareimg.png"></image></view>
-        <!-- #endif -->  
-		<!-- #ifdef MP-WEIXIN -->
-		<button  open-type="share" class="shareDate">分享</button>
-		<!-- #endif -->
-	</view>
-</template>
-<script>
-import { mapState } from 'vuex';
-
-import { uniFav } from '@/components/uni-fav/uni-fav.vue';
-import { groupGoods, cartAdd, collectAdd, collectDel, productDetail } from '@/api/product.js';
-import { saveUrl } from '@/utils/loginUtils.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-import uniRate from '@/components/uni-rate/uni-rate.vue';
-import uniPopup from '@/components/uni-popup/uni-popup.vue'
-import uniPopupMessage from '@/components/uni-popup/uni-popup-message.vue'
-import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
-import uniNumberBox from '@/components/uni-number-box.vue';
-// #ifdef H5
-import { weixindata } from '@/utils/wxAuthorized';
-// #endif
-export default {
-	components: {
-		uniNumberBox,
-		uniFav,
-		uniNoticeBar,
-		uniRate,
-		uniPopup,
-		uniPopupMessage,
-		uniPopupDialog
-	},
-	// #ifdef MP
-	onShareAppMessage: function(res) {
-		if (res.from === 'button') {
-			// 来自页面内分享按钮
-			let pages = getCurrentPages();
-			// 获取当前页面
-			let page = pages[pages.length - 1];
-			let path = '/' + page.route + '?';
-			// 保存传值
-			for (let i in page.options) {
-				path += i + '=' + page.options[i] + '&';
-			}
-			// 保存邀请人
-			path += 'spread=' + this.userInfo.uid;
-			let data = {
-				path: path,
-				imageUrl: this.goodsObjact.image,
-				title: this.goodsObjact.title
-			};
-			return data;
-		}
-	},
-	// #endif
-	data() {
-		return {
-			imgList: [], //商品轮播图
-			goodsObjact: {}, //保存商品数据
-			pinkTlist:{
-				length:5
-			}, //进行中的拼团的信息
-			showlist: [],//进行中的拼团前两组的信息
-			replyCount:0,//评价总数
-			commentList:{},
-			specList: [],
-			ishow:'',
-			information:[],
-			popuplist:[],
-			show: false,
-			showModal: true, //拼单遮罩层
-			more: true, //查看更多按钮
-			autoplay: true,
-			vertical: true,
-			interval: 3000,
-			duration: 500,
-			buys_show: true,
-			buys_shows: false,
-			circular: true,
-			type: 1, //默认支付方式add为
-			specClass: 'none', //显示隐藏弹窗
-			actionImage: '', //商品图片
-			goodsid: '', //商品id
-			actionPrice: '', //商品价格
-			// specClass: 'none', //显示隐藏弹窗
-			shareList: [], //分享列表
-			goodsNumberMax: 0, //商品库存
-			//图片循环
-			people: '', //拼团人数
-			goodsNumber: 1, //购买数量(开团数量为1,整团数量为1*参团人数)
-			carnumber: '', //整团购买商品数量
-			reply: {}, //商品数据
-			list: '', //详情数据
-			goodsType: 1, //商品类型1秒杀商品0为普通商品2为拼团商品3为新人礼包
-			count: 0, //点击查看更多
-			showmore: true,
-			pinkTlistnum: '',
-			spread: '',
-			chooseGoodsNumber: 1, //选择商品的数量
-			specSelected: [], //选中的分类
-			goodsStore: 0, //选中库存
-			uniqueId: '',
-			productValue: '',
-			isCollect: '', //是否被收藏
-			maskshow: false, //弹窗
-			posturl: '',
-			option: '', //保存传值
-			opt: '', //保存小程序传值
-			uniquetype:false,//判断是否是从拼团详情界面跳回的 false 不是  true 是 
-			shop:'',//返回的拼团订单id
-			allStock:0//商品总库存
-		};
-	},
-	onLoad(option) {
-		this.option = option;
-		if (option.scene) {
-			if (typeof option.scene == 'string') {
-				let scene = ('{' + option.scene + '}')
-					.replace('qr%26', '')
-					.replace(/%3D/g, ':')
-					.replace(/%26/g, ',')
-					.replace('pid', '"pid"')
-					.replace('type', '"type"')
-					.replace('id', '"id"');
-				let opt = JSON.parse(scene);
-				this.opt = opt;
-				// 保存拼团订单id
-				this.goodsid = opt.id;
-				if (opt.pid) {
-					// 存储邀请人
-					this.spread = opt.pid;
-					uni.setStorageSync('spread', opt.pid);
-				}
-				if (opt.type) {
-					this.goodsType = opt.type;
-				}
-			}
-		} else {
-			//保存商品id
-			this.goodsid = option.id;
-			//判断有无人邀请
-			if (option.spread) {
-				// 存储邀请人
-				this.spread = option.spread;
-				uni.setStorageSync('spread', option.spread);
-			}
-			//判断是否是普通商品
-			if (option.type) {
-				console.log(option.type);
-				this.goodsType = option.type;
-			}
-			
-		}
-		//判断是否是从拼团详情界面跳回的
-		if (option.uniquetype) {
-			console.log(option.uniquetype);
-			this.uniquetype = option.uniquetype;
-		}
-		//接受返回的拼团订单id
-		if (option.shop) {
-			console.log(option.uniquetype);
-			this.shop = option.shop;
-		}
-		// 保存当前页面
-		saveUrl();
-	},
-	onShow() {
-		let obj = this;
-		groupGoods({}, obj.goodsid).then(function({ data }) {
-			console.log(data,112)
-			let goods = data.storeInfo;
-			obj.imgList = goods.images;//拼团轮播图
-			obj.goodsObjact = goods;//拼团拼团产品信息
-			// 保存商品总库存
-			obj.allStock = 0;
-			for(let key in 	data.productValue){
-				obj.allStock +=data.productValue[key].stock
-			}
-			obj.pinkTlist = data.pink;//进行中的拼团的信息
-			obj.showlist = obj.pinkTlist.slice(0, 2);//截取拼团信息的前两组
-			obj.replyCount = data.replyCount;//评价总数
-			//obj.commentList = data.reply[0];//保存评价里的第一条
-			obj.specList = data.productAttr;//保存产品属性
-			//商品详情图超出屏幕问题
-			if (obj.goodsObjact.description != null) {
-				obj.goodsObjact.description = obj.goodsObjact.description.replace(/<img/g, '<img class="rich-img"').replace(/<p>\S*<img/g, '<p class="pHeight"><img');
-			}
-			
-			if(obj.pinkTlist.length<=2){
-				obj.more = false;
-			};
-			if (data.reply) {
-				obj.reply = data.reply;
-			}
-			obj.list = data; //详情数据
-			obj.productValue = data.productValue; //保存属性值
-			// 保存数据修改数组
-			// console.log(obj.pinkTlist,55)
-			obj.people = goods.people; //拼团人数
-			obj.productId = goods.product_id;
-			
-			// 保存默认选中的对象
-			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(',');
-			// 设置默认值
-			obj.actionPrice = obj.productValue[str].price;
-			obj.goodsNumberMax = obj.productValue[str].stock;
-			obj.actionImage = obj.productValue[str].image;
-			obj.uniqueId = obj.productValue[str].unique;
-			obj.goodsStore = obj.productValue[str].quota;
-			console.log(obj.goodsStore,9000)
-			// #ifdef H5
-			obj.shareDate();
-			// #endif
-			// obj.clickMore();
-		});
-		// combination({}, obj.goodsid).then()
-	},
-	computed: {
-		...mapState(['userInfo', 'baseURL'])
-	},
-	methods: {
-		//选择规格
-		selectSpec(item, arr, ind) {
-			console.log(item,arr,ind,';')
-			arr.attr_value.forEach(function(e) {
-				e.check = false;
-			});
-			item.check = true;
-			let obj = this;
-			obj.specSelected[ind] = item.attr;
-			let str = obj.specSelected.join(',');
-			console.log(obj.productValue[str],116)
-			if (obj.productValue[str]) {
-				obj.buys_show = true;
-				obj.buys_shows = false;
-				obj.actionPrice = obj.productValue[str].price;
-				obj.goodsNumberMax = obj.productValue[str].stock;
-				obj.actionImage = obj.productValue[str].image;
-				obj.uniqueId = obj.productValue[str].unique;
-				if (obj.goodsType == 2) {
-					obj.goodsStore = obj.productValue[str].quota;
-				} else {
-					obj.goodsStore = obj.productValue[str].product_stock;
-				}
-			} else {
-				(obj.buys_show = false), (obj.buys_shows = true);
-			}
-		},
-		numberChange(e) {
-			//购买数量
-			this.chooseGoodsNumber = e.number;
-			// console.log(e.number)
-			// console.log(this.chooseGoodsNumber,'chooseGoodsNumber')
-		},
-		opens_popup(){
-			this.$refs.popup.open()
-		},
-		closes_popup(){
-			this.$refs.popup.close()
-		},
-		opens_popups(){
-			this.$refs.popup.close()
-			this.$refs.popups.open()
-		},
-		closes_popups(){
-			this.$refs.popups.close()
-		},
-		// 处理数组结构
-		dataUpReturn(data) {
-			//保存处理完毕数据
-			let arr = [];
-			// 保存临时数据
-			let arr1 = [];
-			// 设置每个小数组可以存放的数量
-			let num = 2;
-			if (data.length > 1) {
-				for (let i = 0; i < data.length; i++) {
-					// 保存数据到临时数组
-					arr1.push(data[i]);
-					if ((i + 1) % num === 0) {
-						console.log(arr1, 2);
-						// 添加数据到返回数组,用map方法解决物理指针问题导致的数据对象改变问题
-						arr.push(
-							arr1.map(e => {
-								return e;
-							})
-						);
-						// 清空临时数组重新开始计算
-						arr1 = [];
-					}
-				}
-			}
-			// 判断是否为奇数
-			if (data.length % num === 1) {
-				arr.push([data[data.length - 1]]);
-			}
-			return arr;
-		},
-		specOPne() {
-			//显示弹出框
-			// 是否有开团用户
-			// if (this.pinkTlist.length > 0) {
-			// 	this.groupBooking(this.pinkTlist[0][0].id);
-			// } else {
-			// }
-			this.specClass = 'show';
-		},
-		
-		//去拼团
-		groupBooking(item) {
-			uni.navigateTo({
-				url: '/pages/product/details?pink_id=' + item
-			});
-		},
-		//拼团列表数据分页
-		setPinkList() {
-			let obj = this;
-			let showlist = new Array();
-			for (let i = 0; i < obj.pinkTlist.length; i++) {
-				if (i >= obj.count) {
-					break;
-				}
-				showlist[i] = obj.pinkTlist[i];
-			}
-			obj.showlist = showlist;
-		},
-		//查看更多
-		// clickMore() {
-		// 	let obj = this;
-		// 	obj.count += 2;
-		// 	obj.setPinkList();
-		// 	if (obj.count >= obj.pinkTlist.length) {
-		// 		obj.showmore = false; //当次数大于拼团数据,查看更多隐藏
-		// 	} else {
-		// 		obj.showmore = true; //当次数大于拼团数据,查看更多隐藏
-		// 	}
-		// },
-		clickMore() {
-			this.showlist = this.pinkTlist;
-			console.log(this.showlist, 22);
-			this.more = false;
-		},
-		//规格弹窗开关
-		toggleSpec(str) {
-			if (this.specClass === 'show') {
-				this.specClass = 'hide';
-				setTimeout(() => {
-					this.specClass = 'none';
-				}, 250);
-			} else if (this.specClass === 'none') {
-				this.specClass = 'show';
-			}
-			// 判断是否为数字
-			if (typeof str == 'number') {
-				// 保存当前购买类型
-				this.type = str;
-			}
-		},
-		//显示弹窗
-		open() {
-			this.show = true;
-		},
-		//随意点击隐藏弹窗
-		onTap() {
-			if (!this.open) return;
-			this.close();
-		},
-		close() {
-			this.show = false;
-		},
-		//收藏
-		toFavorite(item) {
-			let obj = this;
-
-			item.userCollect = !item.userCollect;
-			// 判断是否已经收藏
-			if (!item.userCollect) {
-				collectDel({
-					id: item.id,
-					category: 'pink'
-				}).then(function(e) {
-					obj.$api.msg('成功取消收藏!');
-				});
-			} else {
-				collectAdd({
-					id: item.id,
-					category: 'pink'
-				}).then(function(e) {
-					obj.$api.msg('成功加入收藏!');
-				});
-			}
-		},
-		
-		// #ifdef H5
-		shareDate() {
-			let obj = this;
-			let url = window.location.href.replace(/[\?,&]{0,1}from=singlemessage/g, '') + '&spread=' + this.userInfo.uid;
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			// 判断是否微信浏览器
-			if (bool) {
-				let data;
-				if (obj.goodsType == 0) {
-					data = {
-						link: url, // 分享链接
-						imgUrl: obj.goodsObjact.image, // 分享图标
-						desc: obj.goodsObjact.store_info,
-						title: obj.goodsObjact.store_name,
-						success: function() {}
-					};
-				}
-				if (obj.goodsType == 2) {
-					data = {
-						link: url, // 分享链接
-						imgUrl: obj.goodsObjact.image, // 分享图标
-						title: obj.goodsObjact.title,
-						desc: obj.goodsObjact.info,
-						success: function() {}
-					};
-				}
-				weixindata(data);
-			}
-		},
-		// #endif
-		/**
-		 * 统一跳转接口,拦截未登录路由
-		 * navigator标签现在默认没有转场动画,所以用view
-		 */
-		navTo(url) {
-			uni.navigateTo({
-				url
-			});
-		},
-		// 立即购买
-		buy(item) {
-			let obj = this;
-			if(obj.uniquetype == false){
-				// 创建传值对象
-				console.log(obj.list.productValue);
-				console.log(obj.list);
-				let data = {
-					// cartNum: obj.goodsNumber, //商品数量
-					cartNum: obj.chooseGoodsNumber, //商品数量
-					uniqueId: obj.uniqueId, //商品标签
-					new: 1, //商品是否新增加到购物车1为不加入0为加入
-					mer_id: obj.shopId,
-					combinationId: obj.goodsid, //拼团编号
-					productId: obj.goodsObjact.product_id, //商品编号
-				};
-				this.specClass = 'none';
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						console.log(e);
-						if (obj.type == 1) {
-							// 跳转到支付页
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
-							});
-						}
-						if (obj.type == 2) {
-							obj.$api.msg('成功加入购物车');
-							obj.toggleSpec();
-						}
-					})
-					.catch(e => {
-						console.log(e);
-					}); 
-			}else{
-				console.log(obj.uniquetype,'obj.uniquetype')
-				uni.navigateTo({
-					url: '/pages/product/details?pink_id=' + obj.shop + '&unique=' + obj.uniqueId + '&uniquetype=' + obj.uniquetype
-				});
-			}
-			
-		},
-		// 阻止触发上级事件
-		stopPrevent() {}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: $page-color-base;
-	padding-bottom: 160rpx;
-	line-height: 1;
-}
-
-// 处理图片间白色间距问题
-/deep/ .pHeight {
-	line-height: 0;
-}
-
-/deep/ div,
-/deep/ table {
-	max-width: 100% !important;
-}
-
-/* #ifdef MP */
-.rich-img {
-	width: 100% !important;
-	height: auto;
-}
-// 处理图片间白色间距问题
-.pHeight {
-	line-height: 0;
-}
-/* #endif */
-
-.popup-row{
-	width:580rpx;
-	background:#ffffff;
-	border-radius:20rpx;
-	.popup-1{
-		padding: 35rpx 0;
-		font-size:$font-lg;
-		font-weight:bold;
-		color:#333333;
-		text-align: center;
-		border-bottom: 1px solid #EEEEEE;
-	}
-	.popcont-box {
-		height: 600rpx;
-	}
-	.popup-2{
-		padding: 0 25rpx;
-		.popup-2-row{
-			padding: 25rpx 0;
-			border-bottom: 1px solid #EEEEEE;
-			&:nth-last-child(1){
-				border-bottom:none;
-			}
-			.row-1{
-				width: 70%;
-				.one{
-					display: flex;
-					align-items: center;
-					image{
-						width: 75rpx;
-						height: 75rpx;
-						border-radius: 50%;
-					}
-				}
-				.two{
-					margin-left: 20rpx;
-					font-size:28rpx;
-					font-weight:500;
-					color:#333333;
-					.two-1{
-						// margin-bottom: 20rpx;
-						font-size:$font-base;
-						font-weight:500;
-						max-width: 160rpx;
-						overflow: hidden;
-						text-overflow: ellipsis;
-						white-space: nowrap;
-					}
-				}
-				.two-1-1{
-					font-size:$font-base;
-					font-weight:500;
-					color:#666666;
-				}
-			}
-			.row-2{
-				padding: 20rpx 30rpx;
-				background:$base-color;
-				border-radius:10rpx;
-				font-size:28rpx;
-				font-weight:500;
-				color:#FFFFFF;
-			}
-		}
-	}
-}
-.popup-rows{
-	width:580rpx;
-	background:#ffffff;
-	border-radius:20rpx;
-	text-align: center;
-	padding-bottom: 35rpx;
-	.rows-1{
-		font-size:$font-lg;
-		font-weight:bold;
-		color:#333333;
-		padding-top: 60rpx;
-	}
-	.rows-2{
-		margin-top: 25rpx;
-		font-size:28rpx;
-		font-weight:500;
-		color:#333333;
-	}
-	.rows-3{
-		margin-top: 35rpx;
-		padding: 0 50rpx;
-		
-		.rows-3-group {
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-			.group-1{
-				display: flex;
-				align-items: center;
-				flex-direction: column;
-			}
-			.group-2{
-				flex: 1;
-				font-size:$font-sm - 4rpx;
-				font-weight:500;
-				color:#666666;
-				margin-top: 10rpx;
-				width:55rpx;
-				overflow:hidden;
-				white-space:nowrap;
-				text-overflow:ellipsis;
-			}
-			image{
-				width: 80rpx;
-				height: 80rpx;
-				border-radius: 50%;
-			}
-			.group-1-1{
-				z-index: 10;
-				margin-top: -25rpx;
-				width:70rpx;
-				height:25rpx;
-				background:#e64048;
-				border-radius:12rpx;
-				font-size:$font-sm - 4rpx;
-				font-weight:500;
-				color:#ffffff;
-				line-height: 25rpx;
-			}
-		}
-	}
-	.rows-4{
-		margin: 40rpx 45rpx 0rpx 45rpx;
-		padding: 25rpx 0;
-		background:$base-color;
-		border-radius:10rpx;
-		
-		font-size:$font-lg;
-		font-weight:500;
-		color:#ffffff;
-	}
-}
-
-.delete{
-	width: 60rpx;
-	height: 60rpx;
-	position: absolute;
-	right: -30rpx;
-	top:-30rpx;
-	image{
-		width: 60rpx;
-		height: 60rpx;
-	}
-}
-
-/* 评价 */
-.eva-section {
-	padding: 20rpx 30rpx;
-	background: #fff;
-	margin-top: 20rpx;
-	.e-header {
-		display: flex;
-		align-items: center;
-		font-size:28rpx;
-		color: #333333;
-		.tit {
-			margin-right: 15rpx;
-		}
-		.tip {
-			flex: 1;
-			font-size:24rpx;
-			color: #999999;
-			text-align: right;
-		}
-		.iconenter {
-			width: 24rpx;
-			height: 24rpx;
-			margin-left: 10rpx;
-		}
-	}
-	.eva-box {
-		padding-top: 30rpx;
-		.box-1{
-			.left{
-				image{
-					width: 80rpx;
-					height: 80rpx;
-					border-radius: 50%;
-				}
-				.content{
-					margin-left: 15rpx;
-					.content-name{
-						font-size:24rpx;
-						font-weight:500;
-						color:#333333;
-					}
-					.content-time{
-						font-size:20rpx;
-						font-weight:500;
-						color:#999999;
-					}
-				}
-			}
-			.right{
-				.image{
-					width: 25rpx;
-					height: 25rpx;
-					margin-left: 10rpx;
-				}
-				.red{
-					margin-left: 15rpx;
-					font-size:24rpx;
-					font-weight:500;
-					color:#fd5b23;
-				}
-				.con_image{
-					
-				}
-			}
-		}
-		.box-2{
-			padding: 30rpx 0 15rpx 0;
-			font-size:28rpx;
-			font-weight:500;
-			color:#666666;
-		}
-		.box-3{
-			.box-3-1{
-				display: inline;
-				width: 150rpx;
-				height: 150rpx;
-				image{
-					margin-right: 20rpx;
-					width: 150rpx;
-					height: 150rpx;
-				}
-			}
-			
-		}
-	}
-}
-
-/* .list-row {
-	position: fixed;
-	top: 450rpx;
-	left: 86rpx;
-
-	.row {
-		position: relative;
-		width: 578rpx;
-		height: 700rpx;
-		background: #ffffff;
-		border-radius: 20rpx;
-
-		.row-1 {
-			flex: 1;
-			text-align: center;
-			padding: 26rpx 223rpx;
-			border-bottom: 2rpx solid #eeeeee;
-
-			.row-1-1 {
-				font-size: $font-lg;
-				font-weight: bold;
-				color: #333333;
-			}
-		}
-
-		.row-2 {
-			padding: 0 23rpx;
-
-			.pinklist_list {
-				padding: 20rpx 0;
-				display: flex;
-				justify-content: space-around;
-				align-items: center;
-				border-bottom: 1px solid #eeeeee;
-
-				.left {
-					width: 74rpx;
-					height: 74rpx;
-					background-color: #e3e3e3;
-					border-radius: 50%;
-				}
-
-				.center {
-					display: flex;
-					flex-wrap: wrap;
-					margin-left: 17rpx;
-
-					.center-1 {
-						display: flex;
-						align-items: center;
-						letter-spacing: 3rpx;
-
-						.center-1-1 {
-							font-size: $font-base;
-							font-weight: 500;
-							color: #333333;
-						}
-
-						.center-1-2 {
-							font-size: $font-base - 2rpx;
-							font-weight: 500;
-							color: #333333;
-						}
-					}
-				}
-
-				.right {
-					width: 134rpx;
-					height: 59rpx;
-					background: $base-color;
-					border-radius: 10rpx;
-					display: flex;
-					align-items: center;
-					justify-content: center;
-
-					.right-word {
-						font-size: 26rpx;
-						font-weight: 500;
-						color: #ffffff;
-					}
-				}
-			}
-		}
-
-		.row-3 {
-			width: 56rpx;
-			height: 56rpx;
-			position: absolute;
-			top: -28rpx;
-			right: -28rpx;
-		}
-	}
-} */
-
-.iconenter {
-	font-size: $font-base + 2rpx;
-	color: #888;
-}
-
-
-.carousel {
-	height: 722rpx;
-	position: relative;
-
-	swiper {
-		height: 100%;
-	}
-
-	.image-wrapper {
-		width: 100%;
-		height: 100%;
-	}
-
-	.swiper-item {
-		display: flex;
-		justify-content: center;
-		align-content: center;
-		height: 750rpx;
-		overflow: hidden;
-
-		image {
-			width: 100%;
-			height: 100%;
-		}
-	}
-}
-
-/* 标题简介 */
-.introduce-section {
-	background: #fff;
-	padding: 15rpx 25rpx 30rpx 25rpx;
-	.introduce-price{
-		width: 100%;
-		overflow: hidden;
-		.price{
-			display: flex;
-			align-items: flex-end;
-			justify-content: flex-start;
-			
-			.price-left{
-				display: flex;
-				align-items: flex-end;
-				color:#fc4141;
-				margin-right: 20rpx;
-				.left-1{
-					margin-right: 5rpx;
-					font-size:28rpx;
-				}
-				.left-2{
-					font-size:$font-lg + 16rpx;
-					line-height: 38rpx;
-				}
-			}
-			.price-right{
-				font-size:28rpx;
-				color:#333333;
-				opacity:0.61;
-			}
-		}
-		.people{
-			width: 140rpx;
-			height: 45rpx;
-			background: url(../../../static/img/img43.png) no-repeat center;
-			background-size: 100%;
-			.people_number{
-				margin-left: 60rpx;
-				font-size:20rpx;
-				font-weight:500;
-				color:rgba(250,39,64,1);
-				line-height: 40rpx;
-			}
-		}
-		/* .share{
-			image{
-				width: 30rpx;
-				height: 35rpx;
-			}
-		} */
-	}
-	.title {
-		margin-top: 30rpx;
-		font-size: 32rpx;
-		color: #1D2023;
-		line-height: 40rpx;
-		font-weight: 600;
-	}
-	.bot-row{
-		margin-top: 20rpx;
-		overflow: hidden;
-		font-size:24rpx;
-		font-weight:500;
-		color:#999999;
-	}
-}
-
-
-/* 标题简介 */
-/* .introduce-section {
-	background: #fff;
-	padding: 20rpx 30rpx;
-
-	.title {
-		font-size: 32rpx;
-		color: $font-color-dark;
-		height: 50rpx;
-		line-height: 50rpx;
-	}
-
-	.price-box {
-		display: flex;
-		align-items: baseline;
-		// height: 64rpx;
-		padding: 10rpx 0;
-		font-size: 26rpx;
-		color: $uni-color-primary;
-	}
-
-	.price {
-		font-size: $font-lg + 2rpx;
-		color: #666666 !important;
-	}
-
-	.vip_price {
-		font-size: $font-lg + 2rpx;
-		color: $uni-color-primary;
-		padding-left: 15rpx;
-	}
-
-	.m-price {
-		margin: 0 12rpx;
-		color: $font-color-light;
-		text-decoration: line-through;
-	}
-
-	.coupon-tip {
-		align-items: center;
-		padding: 4rpx 10rpx;
-		background: $uni-color-primary;
-		font-size: $font-sm;
-		color: #fff;
-		border-radius: 6rpx;
-		line-height: 1;
-		transform: translateY(-4rpx);
-	}
-
-	.bot-row {
-		display: flex;
-		align-items: center;
-		height: 50rpx;
-		font-size: $font-sm;
-		color: $font-color-light;
-
-		text {
-			flex: 1;
-		}
-	}
-
-	.people {
-		border-radius: 10rpx;
-		height: 35rpx !important;
-		border: 2rpx solid #db1935;
-		height: 40rpx;
-
-		.people_image {
-			background-color: #db1935;
-			width: 40rpx;
-			height: 35rpx;
-			text-align: center;
-			border-top-left-radius: 20%;
-			border-bottom-left-radius: 20%;
-
-			image {
-				width: 25rpx;
-				height: 20rpx;
-				// margin-bottom: 5rpx;
-			}
-		}
-
-		.people_number {
-			padding: 5rpx 10rpx;
-		}
-	}
-} */
-
-/* 分享 */
-.share-section {
-	display: flex;
-	align-items: center;
-	color: $font-color-base;
-	background: linear-gradient(left, #fdf5f6, #fbebf6);
-	padding: 12rpx 30rpx;
-
-	.share-icon {
-		display: flex;
-		align-items: center;
-		width: 70rpx;
-		height: 30rpx;
-		line-height: 1;
-		border: 1px solid $uni-color-primary;
-		border-radius: 4rpx;
-		position: relative;
-		overflow: hidden;
-		font-size: 22rpx;
-		color: $uni-color-primary;
-
-		&:after {
-			content: '';
-			width: 50rpx;
-			height: 50rpx;
-			border-radius: 50%;
-			left: -20rpx;
-			top: -12rpx;
-			position: absolute;
-			background: $uni-color-primary;
-		}
-	}
-
-	.iconfavorfill {
-		position: relative;
-		z-index: 1;
-		font-size: 24rpx;
-		margin-left: 2rpx;
-		margin-right: 10rpx;
-		color: #fff;
-		line-height: 1;
-	}
-
-	.tit {
-		font-size: $font-base;
-		margin-left: 10rpx;
-	}
-
-	.iconprompt {
-		padding: 10rpx;
-		font-size: 30rpx;
-		line-height: 1;
-	}
-
-	.share-btn {
-		flex: 1;
-		text-align: right;
-		font-size: $font-sm;
-		color: $uni-color-primary;
-	}
-
-	.iconenter {
-		font-size: $font-sm;
-		margin-left: 4rpx;
-		color: $uni-color-primary;
-	}
-}
-
-.c-list {
-	font-size: $font-sm + 2rpx;
-	color: #303133;
-	margin-top: 20rpx;
-	background: #fff;
-
-	.c-row {
-		display: flex;
-		align-items: center;
-		padding: 20rpx 30rpx;
-		position: relative;
-
-		.c-text {
-			text {
-				padding-left: 25rpx;
-				padding-right: 25rpx;
-			}
-		}
-	}
-
-	.tit {
-		width: 140rpx;
-	}
-
-	.con {
-		flex: 1;
-		color: $font-color-dark;
-
-		.selected-text {
-			margin-right: 10rpx;
-		}
-	}
-
-	.bz-list {
-		height: 40rpx;
-		font-size: $font-sm + 2rpx;
-		color: $font-color-dark;
-
-		text {
-			display: inline-block;
-			margin-right: 30rpx;
-		}
-	}
-
-	.con-list {
-		flex: 1;
-		display: flex;
-		flex-direction: column;
-		color: $font-color-dark;
-		line-height: 40rpx;
-	}
-
-	.red {
-		color: $uni-color-primary;
-	}
-}
-
-/* 评价 */
-/* .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%;
-	}
-}*/
-
-/*  详情 */
-.detail-desc {
-	.desc-title{
-		font-size:28rpx;
-		font-weight:500;
-		color:#1D2023;
-		padding: 25rpx 0;
-		.one{
-			width:77rpx;
-			height:1px;
-			background:linear-gradient( to right ,rgba(204,204,204,0), rgba(204,204,204,1));
-			margin-right: 10rpx;
-		}
-		.two{
-			margin-left: 10rpx;
-			width:77rpx;
-			height:1px;
-			background:linear-gradient( to left ,rgba(204,204,204,0), rgba(204,204,204,1));
-		}
-	}
-	
-}
-/* .detail-desc {
-	background: #fff;
-	margin-top: 16rpx;
-
-	img {
-		max-width: 100%;
-	}
-
-	.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;
-		}
-	}
-} */
-
-/* 规格选择弹窗 */
-.attr-content {
-	padding: 25rpx 30rpx;
-
-	.a-t {
-		display: flex;
-
-		image {
-			width: 170rpx;
-			height: 170rpx;
-			flex-shrink: 0;
-			border-radius: 8rpx;
-		}
-
-		.right {
-			display: flex;
-			flex-direction: column;
-			padding-left: 24rpx;
-			font-size: $font-sm + 2rpx;
-			color: $font-color-base;
-			line-height: 42rpx;
-			width: 75%;
-
-			.price {
-				font-size: $font-lg;
-				color: $uni-color-primary;
-				margin: 10rpx 0rpx;
-			}
-
-			.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;
-		padding-left: 10rpx;
-	}
-
-	.item-list {
-		padding: 20rpx 0 0;
-		display: flex;
-		flex-wrap: wrap;
-
-		text {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			background: #eee;
-			margin-right: 20rpx;
-			margin-bottom: 20rpx;
-			border-radius: 100rpx;
-			min-width: 60rpx;
-			height: 60rpx;
-			padding: 0 20rpx;
-			font-size: $font-base;
-			color: $font-color-dark;
-		}
-
-		.selected {
-			background: #fbebee;
-			color: $uni-color-primary;
-		}
-	}
-}
-
-/*  弹出层 */
-.popup {
-	position: fixed;
-	left: 0;
-	top: 0;
-	right: 0;
-	bottom: 0;
-	z-index: 99;
-
-	&.show {
-		display: block;
-
-		.mask {
-			animation: showPopup 0.2s linear both;
-		}
-
-		.layer {
-			animation: showLayer 0.2s linear both;
-		}
-	}
-
-	&.hide {
-		.mask {
-			animation: hidePopup 0.2s linear both;
-		}
-
-		.layer {
-			animation: hideLayer 0.2s linear both;
-		}
-	}
-
-	&.none {
-		display: none;
-	}
-
-	.mask {
-		position: fixed;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		z-index: 1;
-		background-color: rgba(0, 0, 0, 0.4);
-	}
-
-	.layer {
-		position: fixed;
-		z-index: 99;
-		bottom: 0;
-		width: 100%;
-		min-height: 35vh;
-		border-radius: 10rpx 10rpx 0 0;
-		background-color: #fff;
-
-		.btn {
-			height: 66rpx;
-			line-height: 66rpx;
-			border-radius: 100rpx;
-			background: $uni-color-primary;
-			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%);
-		}
-	}
-}
-//分享
-.btn_fenxiang {
-	position: fixed;
-	right: 20rpx;
-	bottom: 50%;
-	z-index: 95;
-	width: 100rpx;
-	color: #ffffff;
-	border-radius: 100%;
-	background-color: $background-color;
-	line-height: 100rpx;
-	text-align: center;
-	font-size: 30rpx;
-}
-.shareDate{
-	position: fixed;
-	right: 20rpx;
-	bottom: 50%;
-	z-index: 95;
-	color: #ffffff;
-	border-radius: 100rpx;
-	height: 120rpx;
-	line-height: 120rpx;
-	background-color: $background-color;
-	text-align: center;
-	font-size: 30rpx;
-}
-/* 底部操作菜单 */
-.page-bottom {
-	position: fixed;
-	bottom: 0rpx;
-	z-index: 95;
-	display: flex;
-	justify-content: center;
-	align-items: center;
-	width: 100%;
-	height: 100rpx;
-	background: rgba(255, 255, 255, 0.9);
-	.botton-1{
-		width: 100rpx;
-		height: 100rpx;
-		background-color: #FFFFFF;
-		.botton-frame {
-			display: flex;
-			align-items: center;
-			flex-direction: column;
-			.img-box {
-				width: 45rpx;
-				height: 40rpx;
-				image{
-					width: 100%;
-					height: 100%;
-				}
-			}
-			
-		}
-		.word{
-			margin-top: 6rpx;
-			font-size:20rpx;
-			font-weight:400;
-			color:#666666;
-			&.active {
-				color: $uni-color-primary;
-			}
-		}
-	}
-	.p-b-btn {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-		justify-content: center;
-		font-size: $font-sm;
-		color: $font-color-base;
-		width: 100rpx;
-		height: 100rpx;
-
-		.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;
-		}
-	}
-
-	.gobuy {
-		width: 100%;
-		background: #db1935;
-		height: 100%;
-		color: #ffffff;
-		text-align: center;
-		padding-top: 25rpx;
-		border-radius: 15rpx;
-	}
-
-	.action-btn-group {
-		display: flex;
-		flex:1;
-		height: 100%;
-		overflow: hidden;
-		position: relative;
-
-		&:after {
-			content: '';
-			position: absolute;
-			top: 50%;
-			right: 50%;
-			transform: translateY(-50%);
-			height: 28rpx;
-			width: 0;
-			// border-right: 1px solid rgba(255, 255, 255, 0.5);
-		}
-
-		.action-btn {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			flex: 1;
-			height: 100%;
-			font-size: $font-lg + 4rpx;
-			font-weight:bold;
-			background: transparent;
-			border-radius:0;
-			letter-spacing: 5rpx;
-
-			&.buy-now-btn {
-				background-color: #ffb238;
-			}
-
-			&.add-cart-btn {
-				background:$base-color;
-			}
-			&.btn-favorites-btn {
-				background-color: rgba(24, 179, 255, 1);
-			}
-		}
-
-		/* .action-btn1 {
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 210rpx;
-			height: 100%;
-			font-size: $font-base;
-			padding: 0;
-			border-radius: 0;
-			background: transparent;
-
-			&.buy-now-btn {
-				background-color: #ffb238;
-			}
-
-			&.add-cart-btn {
-				background-color: #db1935;
-			}
-		} */
-	}
-}
-
-// 底部拼团、秒杀支付按钮
-.goods-pay-box {
-	position: fixed;
-	left: 0;
-	bottom: 0;
-	z-index: 95;
-	width: 750rpx;
-	height: 100rpx;
-	line-height: 1;
-	color: #ffffff;
-	text-align: center;
-	font-size: $font-lg;
-	.bgLine {
-		background: linear-gradient(90deg, rgba(239, 78, 81, 1) 0%, rgba(244, 113, 59, 1) 100%);
-	}
-	// 拼团支付按钮
-	.goods-pay {
-		display: flex;
-		align-content: center;
-		flex-wrap: wrap;
-		justify-content: center;
-		.goods-buttom,
-		.goods-buttom-money {
-			width: 100%;
-		}
-		.goods-buttom-money {
-			font-size: $font-base;
-		}
-	}
-	.goods-pay-stop,
-	.goods-pay {
-		padding: 15rpx 0;
-		height: 100%;
-		width: 100%;
-	}
-	.goods-pay-stop {
-		background: $color-gray;
-		line-height: 70rpx;
-	}
-}
-
-
-//拼团列表
-.pinklistbox {
-	background: #ffffff;
-	text-align: center;
-	font-size: 26rpx;
-	margin-top: 25rpx;
-	.listbox-1{
-		padding: 25rpx;
-		font-size:$font-lg - 2rpx;
-		font-weight:500;
-		color:#333333;
-		border-bottom: 1px solid #EEEEEE;
-		.more{
-			font-size:$font-base - 2rpx;
-			font-weight:500;
-			color:#999999;
-			image {
-				width: 25rpx;
-				height: 25rpx;
-			}
-		}
-	}
-	.pinklist{
-		margin: 0 25rpx;
-		
-		.pinklist_list{
-			padding: 25rpx 0;
-			border-bottom: 1px solid #EEEEEE;
-			&:nth-last-child(1){
-				border-bottom: none;
-			}
-		}
-	}
-}
-
-/* .pinklistbox {
-	background: #ffffff;
-	margin-top: 25rpx;
-	overflow: hidden;
-} */
-
-.pink_num {
-	background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
-	padding: 15rpx 25rpx;
-	font-size: 26rpx;
-	color: #dd524d;
-}
-
-.pint {
-	background: -webkit-linear-gradient(0deg, #fa2740,#fe5544);
-	border-radius:10rpx;
-	margin-left: 20rpx;
-	padding: 20rpx 25rpx;
-	color: #ffffff;
-	font-size: $font-base - 2rpx;
-
-	/* .iconenter {
-		font-size: 15px;
-		color: #ffffff;
-	} */
-}
-
-
-
-.pink_row {
-	.pink_img{
-		width: 70rpx;
-		height: 70rpx;
-		
-		image {
-			width: 100%;
-			height: 100%;
-			border-radius: 100%;
-		}
-	}
-	
-}
-.pink_people {
-	font-size: $font-base - 2rpx;
-	// margin-top: 10rpx;
-	text {
-		color: $font-color;
-	}
-}
-
-.pink_time {
-	font-size: 26rpx;
-	color: #909399;
-}
-
-.pink_name {
-	font-size:30rpx;
-	color:#333333;
-	margin-left: 20rpx;
-}
-.More {
-	width: 100%;
-	line-height: 2;
-	background-color: #fc2a3f;
-	font-size:$font-lg;
-	margin: 0 auto;
-	text-align: center;
-	color: #ffffff;
-	// border-radius: 50rpx;
-}
-.mask {
-	z-index: 999;
-	width: 100%;
-	height: 100%;
-	position: fixed;
-	top: 0;
-	left: 0;
-	text-align: center;
-	background-color: rgba(0, 0, 0, 0.5);
-	image {
-		width: 100%;
-		height: 100%;
-		opacity: 0.8;
-	}
-}
-</style>

+ 0 - 934
pages/product/groupBooking/productGroup.vue

@@ -1,934 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 轮播图 -->
-		<top-swiper :imgList="imgList"></top-swiper>
-		<!-- 拼团倒计时 -->
-		<group-time :goodsObjact="goodsObjact" :key='goodsObjact.product_price' :seckillObj="seckillObj"></group-time>
-		<!-- 拼团标题 -->
-		<group-content :goodsObjact="goodsObjact"></group-content>
-		<!-- 拼团到货时间及优惠 -->
-		<discounts :mark='goodsObjact.mark' :Info="goodsObjact.info" @clickCoupon="Getcoupon" :showCoupon='false'></discounts>
-		<!-- 规格信息 -->
-		<!-- <fresh-detail :goodsObjact="goodsObjact"></fresh-detail> -->
-		<!-- <view class="uni-padding-wrap pinklistbox" v-if="pinkTlist.length > 0">
-			<view class="pinklist">
-				<view v-for="(ls, ind) in showlist">
-					<view class="flex pinklist_list">
-						<view class="pink_img"><image :src="ls.avatar"></image></view>
-						<view class="pink_name">{{ ls.nickname }}</view>
-						<view class="pink_tpl">
-							<view class="pink_people">
-								还差
-								<text>{{ ls.count }}</text>
-								人拼团
-							</view>
-						</view>
-						<view class="pint" @click="groupBooking(ls.id)">
-							去拼团
-							<text class="iconfont iconenter"></text>
-						</view>
-					</view>
-				</view>
-			</view>
-			<view class="More" @click="clickMore" v-if="more">查看更多</view>
-		</view> -->
-		<!-- <view class="ping-plan">
-			<view class="participate-7 flex-between-center">
-				<view class="participate-7-1">
-					<text class="word" v-if="pink_type == 1">AA团</text>
-					<text class="word" v-else>达人团</text>
-					<text>玩法</text>
-				</view>
-				<view class="participate-7-1" @click="ToRule()">
-					<text class="word1">详细规则</text>
-					<image src="../../../static/img/img74.png"></image>
-				</view>
-			</view>
-			<view class="participate-8 flex-between-center">
-				<view class="participate-8-1">
-					<image class="img1" src="https://shicai.liuniu946.com/img/img76.png"></image>
-					<view class="word-1">开团/参团</view>
-					<view class="word-2">拼团享低价</view>
-				</view>
-				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
-				<view class="participate-8-1">
-					<image class="img2" src="https://shicai.liuniu946.com/img/img77.png"></image>
-					<view class="word-1">邀请邻里参团</view>
-					<view class="word-2">分享优惠多</view>
-				</view>
-				<image src="https://shicai.liuniu946.com/img/img75.png"></image>
-				<view class="participate-8-1">
-					<image class="img3" src="https://shicai.liuniu946.com/img/img78.png"></image>
-					<view class="word-1">人满发货</view>
-					<view class="word-2">人不满退款</view>
-				</view>
-			</view>
-		</view> -->
-		
-		<!-- 大家都在拼 达人团显示 -->
-		<!-- <now-list v-if="pink_type == 2" :recommendedlist="recommendedlist"></now-list> -->
-		
-		
-		<!-- 图文详情 -->
-		<content-text :description="description"></content-text>
-
-		<!-- 底部高度撑开 -->
-		<view class="contentBottomHeight"></view>
-		<!-- 底部操作菜单 -->
-		<view >
-			<view >
-				<group-bottom :peoplePrize='goodsObjact.people_prize' @buy="openPinkT" @specOPne="specOPne" :seckillObj="seckillObj" :many='many'></group-bottom>
-			</view>
-		</view>
-		<!-- 规格-模态层弹窗 -->
-		<view class="popup spec" :class="specClass" @touchmove.stop.prevent="stopPrevent" @click="toggleSpec()">
-			<!-- 遮罩层 -->
-			<view class="mask"></view>
-			<view class="layer attr-content" @click.stop="stopPrevent">
-				<view class="a-t">
-					<image :src="actionImage"></image>
-					<view class="right">
-						<text class="name">{{ goodsObjact.store_name }}</text>
-						<text class="price">¥{{ actionPrice * goodsNumber }}</text>
-						<text class="stock">库存:{{ goodsStore }}件</text>
-						<view class="selected" v-if="specList != ''">
-							已选:
-							<text class="selected-text" v-for="(sItem, sIndex) in specSelected" :key="sIndex">{{ sItem }}</text>
-						</view>
-					</view>
-				</view>
-				<view v-for="(item, index) in specList" :key="index" class="attr-list">
-					<text>{{ item.attr_name }}</text>
-					<view class="item-list">
-						<text
-							v-for="(childItem, childIndex) in item.attr_value"
-							:key="childIndex"
-							class="tit"
-							:class="{ selected: childItem.check }"
-							@click="selectSpec(childItem, item, index)"
-						>
-							{{ childItem.attr }}
-						</text>
-					</view>
-				</view>
-				<!-- <view class="attr-list">
-					<text>购买数量</text>
-					<view class="item-list">
-						<uni-number-box class="step" :isMin="true" :value="goodsNumber" :min="1" :max="goodsNumberMax" @eventChange="numberChange"></uni-number-box>
-					</view>
-				</view> -->
-				<button class="btn" @click.stop="buy" v-show="buys_show">完成</button>
-				<button class="btn" style="background-color: #999999;" v-show="buys_shows">售罄</button>
-			</view>
-		</view>
-		<!-- 返回按钮 -->
-		<return-button></return-button>
-
-	</view>
-</template>
-
-<script>
-	import { nowPinkLst } from '@/api/order.js';
-	import {
-		goodsDetail,
-		cartAdd,
-		collectAdd,
-		collectDel,
-		seckillGoods,
-		groupGoods
-	} from '@/api/product.js';
-	import {
-		mapState
-	} from 'vuex';
-	import store from '@/store/index.js';
-	import {
-		saveUrl
-	} from '@/utils/loginUtils.js';
-	import {
-		timeComputed
-	} from '@/utils/rocessor.js';
-	// #ifdef H5
-	import {
-		weixindata
-	} from '@/utils/wxAuthorized';
-	// #endif
-	// 头部轮播图
-	import topSwiper from '../common/topSwiper.vue';
-	// 拼团倒计时
-	import groupTime from '../common/groupTime.vue';
-	// 拼团标题
-	import groupContent from '../common/groupContent.vue';
-	// 拼团到货时间及优惠
-	import discounts from '../common/discounts.vue';
-	// 规格信息
-	import freshDetail from '../common/freshDetail.vue';
-	// 图文详情
-	import contentText from '../common/contentText.vue';
-	// 底部按钮
-	import groupBottom from '../common/groupBottom.vue';
-	// 返回按钮
-	import returnButton from '@/components/returnButton.vue';
-	// 大家还在拼
-	import NowList from '@/components/newlist/nowList.vue';
-	export default {
-		components: {
-			topSwiper,
-			groupTime,
-			groupContent,
-			discounts,
-			freshDetail,
-			contentText,
-			groupBottom,
-			returnButton,
-			NowList
-		},
-		data() {
-			return {
-				goodsStore: 0, //选中库存
-				specList: [],
-				buys_show: true,
-				buys_shows: false,
-				specSelected: [], //选中的分类
-				reply: '', //评论
-				list: '', //商品详情的数据
-				type: 1, //默认支付方式add为
-				goodsNumber: 1, //购买数量
-				goodsid: '', //商品id
-				description: '', //商品描述
-				goodsObjact: {}, //保存商品数据
-				//图片循环
-				imgList: [],
-				// 对比对象
-				actionPrice: 0, //默认选中商品价格
-				actionImage: '', //默认选中图片
-				good_list: '', //猜你喜欢列表
-				goodsNumberMax: 0, //最大可购买数量
-				many:1,//1是单规格  2是多规格
-				// 倒计时数据保存
-				seckillObj: {
-					stopTime: 0, //结束时间
-					stop: false, //是否结束
-					stopTimeH: 0, //小时
-					stopTimeM: 0, //分钟
-					stopTimeS: 0, //秒钟
-					stopTimeD: 0, //天
-					upTime: 0 //更新组件内部组件用
-				},
-				// 拼团数据保存
-				pink: {
-					id: '', //拼团编号
-					uid: '', //用户编号
-					people: '', //拼团人数
-					price: '', //拼团价格
-					stop_time: '', //拼团结束时间
-					nickname: '', //团长昵称
-					avatar: '', //团长头像
-					count: '', //拼团剩余人数
-					h: '', //时
-					i: '', //分
-					s: '' //秒
-				},
-				userInfo: '',
-				pinkTlist: '', //拼团数据
-				more: true, //查看更多按钮
-				showlist: [],
-				pink_type: 1, //拼团类别
-				show: false, // 是否显示底部按钮
-				recommendedlist:[],// 大家都在拼
-				specClass: 'none' //显示隐藏弹窗
-			};
-
-		},
-		filters: {
-			parseIntTo(percent) {
-				percent = +percent * 100;
-				if (percent % 1 === 0) {
-					return percent;
-				} else {
-					percent = percent.toFixed(1);
-					return percent;
-				}
-			}
-		},
-		async onLoad(options) {
-			let obj = this;
-			obj.userInfo = uni.getStorageSync('userInfo');
-			//保存商品id
-			this.goodsid = options.id;
-			if (options.show) {
-				this.show = options.show;
-			}
-			console.log(this.show, 5656)
-			// 判断有无人邀请
-			if (options.spread) {
-				// 存储邀请人
-				uni.setStorageSync('spread', options.spread);
-			}
-			saveUrl();
-			// 家在数据
-			this.groupGoods();
-			return;
-			
-			// 注册邀请信息
-			// #ifdef H5
-			let bool = uni.getStorageSync('weichatBrowser') || '';
-			if (bool) {
-				weixindata();
-			}
-			// #endif
-		},
-		computed: {
-			...mapState(['weichatObj', 'baseURL', 'urlFile'])
-		},
-		// 分享
-		// onShareAppMessage(options) {
-		// 	// 设置菜单中的转发按钮触发转发事件时的转发内容
-		// 	let pages = getCurrentPages(); //获取加载的页面
-		// 	let currentPage = pages[pages.length - 1]; //获取当前页面的对象
-		// 	let url = currentPage.route; //当前页面url
-		// 	let item = currentPage.options; //如果要获取url中所带的参数可以查看options
-		// 	let shareObj = {
-		// 		title: this.goodsObjact.title + '   价格:' + 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: {
-			// 跳转详细规则
-			ToRule() {
-				if( this.pink_type == 1 ) {
-					// AA团
-					uni.navigateTo({
-						url: '/pages/rule/AArule'
-					})
-				} else {
-					// 达人团
-					uni.navigateTo({
-						url: '/pages/rule/DaRrule'
-					})
-				}
-			},
-			//选择规格
-			selectSpec(item, arr, ind) {
-				arr.attr_value.forEach(function(e) {
-					e.check = false;
-				});
-				item.check = true;
-				let obj = this;
-				obj.specSelected[ind] = item.attr;
-				let str = obj.specSelected.join(',');
-				console.log(obj.productValue[str],116)
-				if (obj.productValue[str]) {
-					obj.buys_show = true;
-					obj.buys_shows = false;
-					obj.actionPrice = obj.productValue[str].price;
-					obj.goodsNumberMax = obj.productValue[str].stock;
-					obj.actionImage = obj.productValue[str].image;
-					obj.uniqueId = obj.productValue[str].unique;
-					obj.goodsStore = obj.productValue[str].stock;
-					// if (obj.goodsType == 2) {
-					// 	obj.goodsStore = obj.productValue[str].quota;
-					// } else {
-					// 	obj.goodsStore = obj.productValue[str].product_stock;
-					// }
-				} else {
-					(obj.buys_show = false), (obj.buys_shows = true);
-				}
-			},
-			// 立即购买
-			buy(item) {
-				let obj = this;
-				/* obj.toggleSpec();
-				this.specClass='show',
-				console.log(obj.list.productValue.默认.unique)
-				console.log(obj.chooseGoodsNumber,'chooseGoodsNumber')
-				return */
-				// 创建传值对象
-				console.log(obj.list.productValue);
-				console.log(obj.list);
-				let data = {
-					// cartNum: obj.goodsNumber, //商品数量
-					cartNum: obj.chooseGoodsNumber, //商品数量
-					uniqueId: obj.uniqueId, //商品标签
-					new: 1, //商品是否新增加到购物车1为不加入0为加入
-					mer_id: obj.shopId,
-					combinationId: obj.goodsid, //拼团编号
-					productId: obj.goodsObjact.product_id, //商品编号
-				};
-				this.specClass = 'none';
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						console.log(e);
-						if (obj.type == 1) {
-							// 跳转到支付页
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId + '&goodsType=' + obj.goodsType
-							});
-						}
-						if (obj.type == 2) {
-							obj.$api.msg('成功加入购物车');
-							obj.toggleSpec();
-						}
-					})
-					.catch(e => {
-						console.log(e);
-					}); 
-			},
-			// 去开团
-			ToKaiTuan(item) {
-				let id = item.id;
-				uni.navigateTo({
-					url: '/pages/product/productGroup?id=' + id
-				});
-			},
-			
-			// 跳转页面
-			navTo(url) {
-				uni.navigateTo({
-					url
-				});
-			},
-			// 查看更多
-			clickMore() {
-				this.showlist = this.pinkTlist;
-				console.log(this.showlist, 22);
-				this.more = false;
-			},
-			//去拼团
-			groupBooking(item) {
-				uni.navigateTo({
-					url: '/pages/groupBooking/groupdetails?id=' + item
-				});
-			},
-			// 获取拼团商品详情
-			groupGoods() {
-				let obj = this;
-				
-				// // 大家还在拼
-				// nowPinkLst({}).then(({data}) => {
-				// 	this.recommendedlist = data;
-				// })
-				
-				groupGoods({}, this.goodsid).then(function({
-					data
-				}) {
-					let goods = data.storeInfo;
-					obj.goodsObjact = goods;
-					console.log(obj.goodsObjact, 88)
-					console.log(Array.isArray(data.productValue), 99)
-					if(Array.isArray(data.productValue) != true){
-						obj.many = 2;
-						obj.specList = data.productAttr;//保存产品属性
-						obj.productValue = data.productValue; //保存属性值
-						obj.specSelected = []; //初始化默认选择对象
-						for (let i = 0; i < obj.specList.length; i++) {
-							// 设置默认数据
-							let attrValue = obj.specList[i].attr_value[0];
-							attrValue.check = true;
-							obj.specSelected.push(attrValue.attr);
-						}
-						let str = obj.specSelected.join(',');
-						console.log(str,'str')
-						// 设置默认值
-						
-						obj.actionPrice = obj.productValue[str].price;
-						obj.goodsNumberMax = obj.productValue[str].stock;
-						obj.actionImage = obj.productValue[str].image;
-						obj.uniqueId = obj.productValue[str].unique;
-						obj.goodsStore = obj.productValue[str].quota;
-					}else{
-						obj.many = 1;
-					}
-					console.log(obj.many,'obj.many')
-					if (obj.goodsObjact.description != null) {
-						obj.description = obj.goodsObjact.description.replace(/\<img/gi, '<img class="rich-img"');
-					}
-					obj.imgList = goods.images; //保存轮播图
-					obj.actionPrice = goods.price; //保存默认选中商品价格
-					obj.actionImage = goods.image_base; //保存默认选中商品图片
-					obj.goodsNumberMax = 1; //保存默认选中最大可购买商品数量
-					if (obj.goodsObjact.pink_type == 'AA团') {
-						obj.pink_type = 1;
-					} else {
-						obj.pink_type = 2;
-					}
-					obj.pinkTlist = data.pink;
-					obj.showlist = obj.pinkTlist.slice(0, 2);
-					if (obj.pinkTlist.length <= 2) {
-						obj.more = false;
-					}
-
-					// 保存结束时间
-					obj.seckillObj.stopTime = goods.stop_time * 1000;
-					// 获取当前时间
-					let acitonTime = new Date();
-					// 判断当前时间是否大于结束时间
-					if (acitonTime.getTime() > obj.seckillObj.stopTime) {
-						// 当前秒杀时间已经结束
-						obj.seckillObj.stop = true;
-					} else {
-						// 计算倒计时
-						let time = timeComputed(obj.seckillObj.stopTime)
-						// 倒计时数据保存
-						obj.seckillObj = {
-							stopTime: goods.stop_time * 1000, //结束时间
-							stop: false, //是否结束
-							stopTimeD: time.day, //天
-							stopTimeH: time.hours, //小时
-							stopTimeM: time.minutes, //分钟
-							stopTimeS: time.seconds, //秒钟
-							upTime: (new Date()).getTime()
-						}
-					}
-				});
-			},
-			// 立即购买
-			openPinkT(item) {
-				let obj = this;
-				obj.type = item;
-				// 创建传值对象
-				let data = {
-					cartNum: obj.goodsNumber, //商品数量
-					new: 1, //商品是否新增加到购物车1为不加入0为加入
-					combinationId: obj.goodsid,
-					productId: obj.goodsObjact.product_id
-				};
-				cartAdd(data)
-					.then(function(e) {
-						let da = e.data;
-						if (obj.type == 1) {
-							// 跳转到支付页
-							uni.navigateTo({
-								url: '/pages/order/createOrder?id=' + da.cartId+'&goodsType=2'
-							});
-						}
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			specOPne(item) {
-				let obj = this;
-				obj.specClass = 'show';
-				console.log(obj.specClass,'this.specClass')
-			},
-			//规格弹窗开关
-			toggleSpec(str) {
-				if (this.specClass === 'show') {
-					this.specClass = 'hide';
-					setTimeout(() => {
-						this.specClass = 'none';
-					}, 250);
-				} else if (this.specClass === 'none') {
-					this.specClass = 'show';
-				}
-				// 判断是否为数字
-				if (typeof str == 'number') {
-					// 保存当前购买类型
-					this.type = str;
-				}
-			},
-			// 阻止触发上级事件
-			stopPrevent() {}
-		}
-	};
-</script>
-
-<style lang="scss">
-	/*  弹出层 */
-	.popup {
-		position: fixed;
-		left: 0;
-		top: 0;
-		right: 0;
-		bottom: 0;
-		z-index: 99;
-		&.show {
-			display: block;
-	
-			.mask {
-				animation: showPopup 0.2s linear both;
-			}
-	
-			.layer {
-				animation: showLayer 0.2s linear both;
-			}
-		}
-	
-		&.hide {
-			.mask {
-				animation: hidePopup 0.2s linear both;
-			}
-	
-			.layer {
-				animation: hideLayer 0.2s linear both;
-			}
-		}
-	
-		&.none {
-			display: none;
-		}
-	
-		.mask {
-			position: fixed;
-			top: 0;
-			width: 100%;
-			height: 100%;
-			z-index: 1;
-			background-color: rgba(0, 0, 0, 0.4);
-		}
-	
-		.layer {
-			position: fixed;
-			z-index: 99;
-			bottom: 0;
-			width: 100%;
-			min-height: 35vh;
-			border-radius: 10rpx 10rpx 0 0;
-			background-color: #fff;
-	
-			.btn {
-				height: 66rpx;
-				line-height: 66rpx;
-				border-radius: 100rpx;
-				background: $uni-color-primary;
-				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: 25rpx 30rpx;
-	
-		.a-t {
-			display: flex;
-	
-			image {
-				width: 170rpx;
-				height: 170rpx;
-				flex-shrink: 0;
-				border-radius: 8rpx;
-			}
-	
-			.right {
-				display: flex;
-				flex-direction: column;
-				padding-left: 24rpx;
-				font-size: $font-sm + 2rpx;
-				color: $font-color-base;
-				line-height: 42rpx;
-				width: 75%;
-	
-				.price {
-					font-size: $font-lg;
-					color: $uni-color-primary;
-					margin: 10rpx 0rpx;
-				}
-	
-				.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;
-			padding-left: 10rpx;
-		}
-	
-		.item-list {
-			padding: 20rpx 0 0;
-			display: flex;
-			flex-wrap: wrap;
-	
-			text {
-				display: flex;
-				align-items: center;
-				justify-content: center;
-				background: #eee;
-				margin-right: 20rpx;
-				margin-bottom: 20rpx;
-				border-radius: 100rpx;
-				min-width: 60rpx;
-				height: 60rpx;
-				padding: 0 20rpx;
-				font-size: $font-base;
-				color: $font-color-dark;
-			}
-	
-			.selected {
-				background: #ddffdf;
-				color: $uni-color-primary;
-			}
-		}
-	}
-	
-	//默认商品底部高度
-	.goodsBottom {
-		height: 160rpx;
-	}
-
-	page {
-		background: #f0f0f0;
-	}
-
-	//秒杀、拼团底部高度
-	.contentBottomHeight {
-		height: 110rpx;
-		// background-color: #FFFFFF;
-	}
-
-	//默认商品底部高度
-	.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;
-	}
-
-	.pinklistbox {
-		background: #ffffff;
-		margin-top: 25rpx;
-		overflow: hidden;
-	}
-
-	.pink_num {
-		background: -webkit-linear-gradient(left, #fdf5f6, #fbebf6);
-		padding: 15rpx 25rpx;
-		font-size: 26rpx;
-		color: #dd524d;
-	}
-
-	.pint {
-		background: -webkit-linear-gradient(left, #ff1f4f, #ff0409);
-		padding: 10rpx 25rpx;
-		color: #ffffff;
-		font-size: 24rpx;
-		border-radius: 25rpx;
-
-		.iconenter {
-			font-size: 15px;
-			color: #ffffff;
-		}
-	}
-
-	.pinklist {
-		padding: 0rpx 25rpx;
-		padding-top: 45rpx !important;
-	}
-
-	.pinklist_list {
-		margin-bottom: 10rpx;
-	}
-
-	.pink_img {
-		width: 100rpx;
-		height: 100rpx;
-
-		image {
-			width: 100%;
-			height: 100%;
-			border-radius: 100%;
-		}
-	}
-
-	.pink_people {
-		font-size: 28rpx;
-
-		text {
-			color: #dd524d;
-		}
-	}
-
-	.pink_time {
-		font-size: 26rpx;
-		color: #909399;
-	}
-
-	.pink_name {
-		width: 200rpx;
-		overflow: hidden;
-		white-space: nowrap;
-		text-overflow: ellipsis;
-		padding-left: 10rpx;
-		// background: #FC2A3F;
-		// height: 50rpx;
-	}
-
-	.More {
-		width: 100%;
-		line-height: 2;
-		background-color: #fc2a3f;
-		font-size: $font-lg;
-		margin: 0 auto;
-		text-align: center;
-		color: #ffffff;
-		// border-radius: 50rpx;
-	}
-
-	.ping-plan {
-		background-color: #FFFFFF;
-		padding: 25rpx 35rpx;
-		border-top: 15rpx solid #F3F3F4;
-		border-bottom: 15rpx solid #F3F3F4;
-	}
-
-	.participate-7 {
-		color: #000000;
-		font-size: 29rpx;
-		font-weight: 500;
-		padding-bottom: 25rpx;
-
-		.participate-7-1 {
-			.word {
-				color: #ff0a1a;
-			}
-
-			.word1 {
-				font-size: 25rpx;
-				color: #989aa0;
-			}
-
-			image {
-				width: 10rpx;
-				height: 20rpx;
-				margin-left: 15rpx;
-			}
-		}
-	}
-
-	//左右顶格加上下居中
-	.flex-between-center {
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
-	}
-
-	.participate-8 {
-		image {
-			width: 26rpx;
-			height: 12rpx;
-		}
-
-		.participate-8-1 {
-			text-align: center;
-
-			.img1 {
-				width: 43rpx;
-				height: 50rpx;
-			}
-
-			.img2 {
-				width: 43rpx;
-				height: 42rpx;
-			}
-
-			.img3 {
-				width: 60rpx;
-				height: 46rpx;
-			}
-
-			.word-1 {
-				font-size: 23rpx;
-				color: #000000;
-				line-height: 34rpx;
-			}
-
-			.word-2 {
-				font-size: 21rpx;
-				color: #91949B;
-				line-height: 34rpx;
-			}
-		}
-	}
-</style>

+ 0 - 404
pages/product/seckill.vue

@@ -1,404 +0,0 @@
-<template>
-	<view class="seckillBox">
-		<scroll-view scroll-x="true" class="class-box flex b-t" :scroll-left="scrollLeft" :scroll-with-animation="true">
-			<view @click="tabClass(idx)" class="item" :style="{ width: topNavWidth }" v-for="(item, idx) in indexList" :key="idx">
-				<view class="time" :class="{ action: idx == classIndex }">{{ item.time }}</view>
-				<view class="status" :class="{ action: idx == classIndex }">{{ item.state }}</view>
-			</view>
-		</scroll-view>
-		<swiper class="list-Box" :current="classIndex" @change="swiperChange" duration="500">
-			<swiper-item class="list-item" v-for="(ls, idx) in indexList">
-				<view class=" b-b position-relative">
-					<view class="title-box flex ">
-						<view class="title-box-left">
-							<text v-if="ls.status == 1">抢购中先下先得哦!</text>
-							<text v-if="ls.status == 2">精品好货即将开抢!</text>
-							<text v-if="ls.status == 0">本场已结束,下次早点来哦!</text>
-						</view>
-						<view class="title-box-right flex">
-							<text class="tip" v-if="ls.status == 1">距离结束</text>
-							<text class="tip" v-if="ls.status == 2">距离开始</text>
-							<uni-countdown
-								color="#F9F9F8"
-								background-color="#666666"
-								v-if="ls.status == 1 || ls.status == 2"
-								:show-day="false"
-								:hour="ls.stopTimeH"
-								:minute="ls.stopTimeM"
-								:second="ls.stopTimeS"
-							></uni-countdown>
-						</view>
-					</view>
-				</view>
-				<scroll-view scroll-y="true" class="list" @scrolltolower="getList(classIndex)">
-					<view class="goodsList-item flex" :key="ind" v-for="(lss, ind) in ls.dataList">
-						<image :src="lss.image" lazy-load mode="scaleToFill"></image>
-						<view class="goodsList-content">
-							<view class="title clamp">
-								<text>{{ lss.title }}</text>
-							</view>
-							<view class="slider flex">
-								<view class="slider-box"><view class="slider-action" :style="{ width: lss.percent + '%' }"></view></view>
-								<view class="sales-nub">已抢{{ lss.percent + '%' }}</view>
-							</view>
-							<view class="goods-money flex">
-								<view class="money-box">
-									<view class="money">
-										<text class="font-size-sm">¥</text>
-										{{ lss.price }}
-									</view>
-									<view class="otMoney-box">
-										<text class="otMoney">¥{{ lss.ot_price }}</text>
-									</view>
-								</view>
-								<view @click="navProduct(ls, ind)" class="cart" :class="{ 'seckill-action': ls.status == 1 }">
-									{{ ls.status == 1 ? '去抢购' : ls.status == 2 ? '未开始' : '已结束' }}
-								</view>
-							</view>
-						</view>
-					</view>
-					<uni-load-more :status="ls.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import { getSeckillList, getSeckillClass } from '@/api/product.js';
-import uniCountdown from '@/components/uni-countdown/uni-countdown.vue';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import { timeComputed } from '@/utils/rocessor.js';
-export default {
-	components: {
-		uniCountdown,
-		uniLoadMore
-	},
-	data() {
-		return {
-			indexList: [], //分类列表
-			showTime: '', //显示的时间
-			showTImeId: '', //显示时间id用于查询数据
-			// 判断是否所有活动已经结束
-			stop: false, //活动是否已经结束
-			show: false, //是否显示活动
-			status: 0, //获取状态值1为有活动开始中 2为活动未开始 0为活动已经结束
-			topNavWidth: '25%', //设置导航默认宽度
-			classIndex: 0, //当前进行中的活动
-			itemWidht: 0 //顶部分类宽度
-		};
-	},
-	computed: {
-		// 计算左侧距离
-		scrollLeft() {
-			if (this.classIndex > 1) {
-				return this.itemWidht * (this.classIndex - 1.5);
-			} else {
-				return 0;
-			}
-		}
-	},
-	onLoad: function(e) {
-		// 载入分类
-		this.getClass();
-	},
-	methods: {
-		//抢购时间切换时触发效果
-		swiperChange(e) {
-			this.classIndex = e.target.current;
-			this.getList(this.classIndex, 'tabChange');
-		},
-		// 获取项目宽度
-		numClassWidht() {
-			uni.createSelectorQuery()
-				.select('.seckillBox')
-				.fields(
-					{
-						size: true
-					},
-					data => {
-						// 设置项目宽度
-						this.itemWidht = Math.floor((data.width / 750) * 187.5);
-					}
-				)
-				.exec();
-		},
-		// 切换当前选中的秒杀活动
-		tabClass(ind) {
-			// 保存当前选中的对象
-			this.classIndex = ind;
-		},
-		// 跳转到商品详情
-		navProduct(ls, ind) {
-			if (ls.status == 1) {
-				let data = ls.dataList[ind];
-
-				uni.navigateTo({
-					url: '/pages/product/product?id=' + data.id + '&type=1'
-				});
-			}
-		},
-		// 获取商品
-		getList(ind, source) {
-			// 获取数据对象
-			let date = this.indexList[ind];
-			console.log(date, source);
-			if (source === 'tabChange' && date.loaded === true) {              
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (date.loadingType === 'noMore') {
-				//防止重复加载
-				return;
-			}
-			if (date.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			date.loadingType = 'loading';
-			getSeckillList(
-				{
-					page: date.page,
-					limit: date.limit
-				},
-				date.id
-			)
-				.then(e => {
-					date.dataList.push(...e.data);
-					// 查询翻页增加
-					date.page++;
-					// 判断是否可以继续加载
-					if (date.limit == e.data.length) {
-						date.loadingType = 'more';
-					} else {
-						date.loadingType = 'noMore';
-					}
-					// 设置当前数据已加载完毕
-					this.$set(date, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 获取秒杀时间段
-		getClass() {
-			let obj = this;
-			getSeckillClass({})
-				.then(({ data }) => {
-					obj.indexList = data.seckillTime.map((e, ind) => {
-						console.log(e,'eeee')
-						// 初始化翻页页数
-						e.page = 1;
-						// 初始每次加载的数据条数
-						e.limit = 6;
-						// 创建储存订单数据
-						e.dataList = [];
-						// 初始化加载
-						// e.loadingType = 'more';
-						let ar = e;
-						// 判断是否为进行中的活动
-						if (ar.status === 1) {
-							// 计算倒计时时间
-							obj.timeComputed(ar.stop * 1000, ar);
-						} else {
-							// 获取距离开始还需要多少时间
-							let arTime = ar.time.split(':');
-							let h = arTime[0];
-							let m = arTime[1];
-							let time = new Date();
-							// 设置时间
-							time.setHours(h, m, 0);
-							// 计算倒计时时间
-							obj.timeComputed(time.getTime(), ar);
-						}
-
-						return e;
-					});
-					// 获取当前活动中的下标值
-					obj.classIndex = data.seckillTimeIndex;
-					// 获取当前显示中对象的数据
-					obj.$nextTick(() => {
-						obj.getList(obj.classIndex);
-					});
-					if (obj.indexList.length <= 4) {
-						// 当数量小于等于4的时候自适应宽度
-						obj.topNavWidth = 100 / obj.indexList.length + '%';
-					} else {
-						// 页面渲染完毕后加载scroll-view左侧距离
-						obj.$nextTick(() => {
-							obj.numClassWidht();
-						});
-					}
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-		// 计算倒计时时间
-		timeComputed(da, ar) {
-			let obj = this;
-			// 计算时间,保存需要多少时间到期
-			let stopTime = timeComputed(da);
-			console.log(stopTime);
-			ar.stopTimeH = stopTime.hours;
-			ar.stopTimeM = stopTime.minutes;
-			ar.stopTimeS = stopTime.seconds;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page,
-.seckillBox {
-	min-height: 100%;
-	height: 100%;
-}
-// 头部时间段样式
-.class-box {
-	white-space: nowrap;
-	height: 60px;
-	.item {
-		text-align: center;
-		display: inline-block;
-		color: $font-color-base;
-		padding: 11.5px 5px;
-		background-color: #ffffff;
-		line-height: 1;
-		.time {
-			font-size: 16px;
-			padding-bottom: 3px;
-			&.action {
-				color: $color-red;
-			}
-		}
-		.status {
-			font-size: 12px;
-			margin: 0 auto;
-			width: 60px;
-			padding: 3px 0;
-			&.action {
-				color: #ffffff;
-				border-radius: 99px;
-				background-color: $color-red;
-			}
-		}
-	}
-}
-// 列表上方标题样式
-.title-box {
-	margin-top: 10px;
-	padding: 10px;
-	background-color: #ffffff;
-	.title-box-left {
-		font-size: 15px;
-		color: $font-color-base;
-	}
-	.title-box-right {
-		.tip {
-			font-size: 15px;
-			color: #999999;
-			padding-right: 5px;
-		}
-
-		/deep/ .uni-countdown__number {
-			border-radius: 3px;
-			width: 22px;
-		}
-		/deep/ .uni-countdown__splitor,
-		/deep/ .uni-countdown__number {
-			height: 20px;
-			line-height: 18px;
-		}
-	}
-}
-// 列表样式
-.list-Box {
-	height: calc(100% - 60px);
-	.list {
-		height: calc(100% - 55px);
-	}
-}
-// 商品列表
-$slider-color: #fe9398; //滑块左侧颜色
-.goodsList-item {
-	background-color: #ffffff;
-	padding: 30rpx;
-	border-bottom: 1px solid $border-color-light;
-	image {
-		flex-shrink: 0;
-		border-radius: $border-radius-sm;
-		height: 180rpx;
-		width: 180rpx;
-	}
-	.slider {
-		margin-top: 15rpx;
-		justify-content: flex-start;
-		.slider-box {
-			width: 196rpx;
-			border-radius: 99px;
-			border: 1px solid $slider-color;
-			height: 16rpx;
-			.slider-action {
-				background-color: $slider-color;
-				height: 100%;
-			}
-		}
-		.sales-nub {
-			color: $font-color-light;
-			font-size: 24rpx;
-			padding-left: 20rpx;
-		}
-	}
-	.goodsList-content {
-		margin-left: 20rpx;
-		flex-grow: 1;
-		height: 180rpx;
-		position: relative;
-		.title {
-			font-size: $font-base;
-			color: $font-color-dark;
-			font-weight: 500;
-			width: 0;
-			min-width: 100%;
-		}
-		.goods-money {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			width: 100%;
-			.money-box {
-				.money {
-					font-size: $font-lg + 10rpx;
-					color: $color-red;
-					font-weight: bold;
-				}
-				.otMoney-box {
-					font-size: $font-sm;
-					.otMoney {
-						color: $font-color-light;
-						padding-right: 20rpx;
-						text-decoration: line-through;
-					}
-					.sales {
-						color: $font-color-light;
-					}
-				}
-			}
-			.cart {
-				font-size: $font-base;
-				border-radius: 99px;
-				padding: 15rpx 30rpx;
-				line-height: 1;
-				color: #ffffff;
-				background-color: $color-gray;
-				&.seckill-action {
-					border: 1px solid $color-red;
-					background-color: $color-red;
-				}
-			}
-		}
-	}
-}
-</style>

+ 13 - 18
pages/public/register.vue

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

+ 194 - 230
pages/public/wxLogin.vue

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

+ 165 - 52
pages/set/userinfo.vue

@@ -1,46 +1,117 @@
 <template>
-	<view class="content">
-		<view class="row b-b">
+	<view class="container">
+		<view class="row b-b flex jg">
+			<text class="tit">头像</text>
+			<image :src="userInfo.avatar" @click="imgsub"></image>
+		</view>
+		<view class="row b-b flex">
 			<text class="tit">昵称</text>
-			<input class="input" type="text" v-model="name" placeholder="修改昵称" placeholder-class="placeholder" />
+			<input class="input" v-model="userInfo.nickname" type="text" placeholder-class="placeholder" />
+		</view>
+		<view class="row b-b flex">
+			<text class="tit">邀请码</text>
+			<input class="input" v-model="userInfo.uid" type="text" disabled="true" placeholder-class="placeholder" style="color: #999;" />
+		</view>
+
+		<view class="submit-box flex">
+			<view class="submit dl" @click="edit">确认修改</view>
+			<view class="submit " @click="toLogout">退出登录</view>
 		</view>
-		<button class="add-btn" @click="confirm">提交</button>
 	</view>
 </template>
 
 <script>
-import { mapState } from 'vuex';
-import { userEdit } from '@/api/set.js';
+import uniList from '@/components/uni-list/uni-list.vue';
+import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+import { mapState, mapMutations } from 'vuex';
+import { logout } from '@/api/set.js';
+
+import { edit } from '@/api/user.js';
+import { upload } from '@/api/order.js';
 export default {
+	components: {
+		uniList,
+		uniListItem
+	},
 	data() {
 		return {
-			name: ''
+			userInfo: {},
+			pics: []
 		};
 	},
-
-	computed: {
-		...mapState('user', ['userInfo'])
-	},
-	onShow(option) {
-		this.name = this.userInfo.nickname + '';
+	onLoad() {
+		this.userInfo = uni.getStorageSync('userInfo') || '';
+		console.log(this.userInfo);
 	},
 	methods: {
-		switchChange(e) {
-			this.addressData.default = e.value;
+		...mapMutations('user', ['logout']),
+		//退出登录
+		toLogout() {
+			let obj = this;
+			uni.showModal({
+				content: '确定要退出登录么',
+				success: e => {
+					if (e.confirm) {
+						logout({})
+							.then(e => {
+								obj.logout();
+								uni.switchTab({
+									url: '/pages/index/index'
+								});
+							})
+							.catch(e => {
+								console.log(e);
+							});
+					}
+				}
+			});
+		},
+		imgsub() {
+			let obj = this;
+			console.log('上传头像');
+			// this.$util.uploadImageOne('upload/image', function(res) {
+			// 	console.log('------',res);
+			// 	this.pics.push(res.data.pathreplace(/http:\/\/mer.crmeb.net/,'https://hy.liuniu946.com'));
+			// 	// obj.userInfo.avatar = res.data.path.replace(/http:\/\/mer.crmeb.net/,'http://zccy.frp.liuniu946.com')
+			// 	obj.$set(this, 'pics', this.pics);
+			// 	obj.$set(this, 'extract_pic', this.pics[0])
+			// });
+			// uploads({
+			// 	filename: ''
+			// }).then(data => {
+			// 	console.log("data",data);
+			// 	this.userInfo.avatar = data[0].url;
+			// })
+			upload({
+				filename: ''
+			}).then(res => {
+				console.log(res[0].url);
+				obj.userInfo.avatar = res[0].url;
+				// console.log(obj.userInfo.avatar)
+			});
 		},
-		confirm() {
-			userEdit({ nickname: this.name, avatar: this.userInfo.avatar })
+		edit() {
+			const that = this;
+			uni.showLoading({
+				title: '提交中...',
+				mask: true
+			});
+			edit({
+				avatar: this.userInfo.avatar,
+				nickname: this.userInfo.nickname
+			})
 				.then(e => {
-					this.$api.msg('修改成功');
-					setTimeout(()=> {
+					uni.hideLoading();
+					that.$api.msg('修改成功');
+					setTimeout(() => {
 						uni.switchTab({
-							url:'/pages/user/user'
+							url: '/pages/user/user'
 						});
 					}, 1000);
-					console.log(e);
 				})
 				.catch(e => {
 					console.log(e);
+					that.$api.msg('修改失败');
 				});
 		}
 	}
@@ -48,46 +119,88 @@ export default {
 </script>
 
 <style lang="scss">
+/* page{
+		background: $page-color-base;
+	}
+	.list-cell{
+		display:flex;
+		align-items:baseline;
+		padding: 20rpx $page-row-spacing;
+		line-height:60rpx;
+		position:relative;
+		background: #fff;
+		justify-content: center;
+		&.log-out-btn{
+			margin-top: 40rpx;
+			.cell-tit{
+				color: $uni-color-primary;
+				text-align: center;
+				margin-right: 0;
+			}
+		}
+		.cell-tit{
+			flex: 1;
+			font-size: $font-base + 2rpx;
+			color: $font-color-dark;
+			margin-right:10rpx;
+		}
+		.cell-tip{
+			font-size: $font-base;
+			color: $font-color-light;
+		}
+		switch{
+			transform: translateX(16rpx) scale(.84);
+		}
+	} */
 page {
-	background: $page-color-base;
-	padding-top: 16upx;
+	background-color: #f3f3f3;
+	min-height: 100%;
+
+	.container {
+		height: 100%;
+	}
 }
 
 .row {
-	display: flex;
-	align-items: center;
-	position: relative;
-	padding: 0 30upx;
-	height: 110upx;
-	background: #fff;
+	background-color: #fff;
+	padding: 42rpx 25rpx;
+	font-size: 30rpx;
+	color: #333333;
 
-	.tit {
-		flex-shrink: 0;
-		width: 120upx;
-		font-size: 30upx;
-		color: $font-color-dark;
+	image {
+		width: 80rpx;
+		height: 80rpx;
+		border-radius: 50%;
 	}
+
 	.input {
-		flex: 1;
-		font-size: 30upx;
-		color: $font-color-dark;
-	}
-	.iconlocation {
-		font-size: 36upx;
-		color: $font-color-light;
+		text-align: right;
+		color: #333333;
 	}
 }
-.add-btn {
+
+.submit-box {
 	display: flex;
-	align-items: center;
-	justify-content: center;
-	width: 690upx;
-	height: 80upx;
-	margin: 60upx auto;
-	font-size: $font-lg;
-	color: #fff;
-	background-color: $base-color;
-	border-radius: 10upx;
-	// box-shadow: 1px 2px 5px rgba(219, 63, 96, 0.4);
+	flex-direction: column;
+	padding-top: 157rpx;
+
+	.submit {
+		margin: 40rpx auto;
+		width: 560rpx;
+		background-color: #ffffff;
+		color: #000000;
+		text-align: center;
+		padding: 26rpx 0rpx;
+		border-radius: 50rpx;
+	}
+
+	.dl {
+		background-color: #000000;
+		color: #ffffff;
+	}
+}
+
+.jg {
+	margin-bottom: 20rpx;
 }
 </style>

+ 0 - 305
pages/user/award.vue

@@ -1,305 +0,0 @@
-<template>
-	<view class="content">
-		<view class="content-money">
-			<view class="money-box">
-				<view class="text">可提现佣金(元)</view>
-				<view class="money">{{ money | getMoneyStyle }}</view>		
-			</view>
-			<view class="moneyTx" @click="navto('./withdrawal')">提现</view>
-			<view class="flex buttom-box">
-				<view class="buttom" @click="navto('/pages/money/recharge')">
-					<view class="icon"><image src="/static/icon/i6.png" mode="aspectFill" class="icon-img"></image></view>
-					<text>统计</text>
-				</view>
-				<view class="interval"></view>
-				<view class="buttom" @click="navto('./withdrawal')">
-					<view class="icon"><image src="/static/icon/i7.png" mode="aspectFill" class="icon-img"></image></view>
-					<text>提现</text>
-				</view>
-			</view>
-		</view>
-		<view class="navbar">
-			<view v-for="(item,index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index}" @click="tabClick(index)">{{ item.text }}</view>
-		</view>
-		<swiper :current="tabCurrentIndex" :style="{'height':maxheight+'px'}" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view scroll-y="true" class="list-scroll-content" @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-					
-					<!-- 订单列表 -->
-					<view class="order-item flex" v-for="(item, index) in tabItem.orderList" :key="index">
-						<view class="title-box">
-							<view class="title">
-								<text>{{ item.title }}</text>
-							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
-							</view>
-						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-import { spreadCommission, userBalance } from '@/api/wallet.js';
-import { mapState, mapMutations } from 'vuex';
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	components: {
-		empty,
-		uniLoadMore
-	},
-	onReady() {
-		//初始化获取页面宽度
-		uni.createSelectorQuery().select('.content')
-			.fields(
-			{
-				size:true
-			},
-			data => {
-				console.log(data);
-				console.log(Math.floor((data.width /750) * 300));
-				//保存头部高度
-				this.maxheight =data.height - Math.floor((data.width / 750) * 570);
-				console.log(this.maxheight);
-				}
-			)
-			.exec();
-	},
-	data() {
-		return {
-			// 头部图高度
-			maxheight:'',
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '收入',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页面
-					limit: 10 //每次信息条数
-				},
-				{
-					state: 1,
-					text: '支出',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页面
-					limit: 10 //每次信息条数
-				},
-			],
-			money: ''
-		};
-	},
-	onLoad(options) {},
-	onShow() {
-		this.loadData();
-		//获取用户余额
-		userBalance({}).then(({ data }) => {
-			this.money = data.commissionCount;
-		});
-	},
-	methods: {
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		async loadData(source) {
-			//这里时将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state+3;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			//修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-			
-			spreadCommission(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					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);
-				});
-		},
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		}
-	}
-}
-</script>
-
-<style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-}
-.content-money {
-	padding-bottom: 30rpx;
-	background: $page-color-base;
-	.moneyTx{
-		position: absolute;
-		top: 150rpx;
-		right: 0rpx;
-		width: 150rpx;
-		padding: 10rpx 30rpx;
-		border: 2px solid #FFFFFF;
-		border-top-left-radius: 99rpx;
-		border-bottom-left-radius: 99rpx;
-		color: #FFFFFF;
-		line-height: 1;
-		font-size: $font-base;
-	}
-	.buttom-box {
-		background-color: #ffffff;
-		text-align: center;
-		margin: 0 30rpx;
-		padding: 20rpx 0;
-		border-radius: $border-radius-sm;
-		margin-top: -60rpx;
-		.buttom {
-			font-size: $font-lg;
-			flex-grow: 1;
-		}
-		.interval {
-			width: 2px;
-			height: 60rpx;
-			background-color: #eeeeee;
-		}
-		.icon {
-			height: 50rpx;
-			width: 48rpx;
-			margin: 0 auto;
-			.icon-img {
-				width: 100%;
-				height: 100%;
-			}
-		}
-	}
-}
-.money-box {
-	background-color: $base-color;
-	padding-top: var(--status-bar-height);
-	height: 368rpx;
-	color: #ffffff;
-	text-align: center;
-	.text {
-		padding-top: 147rpx;
-		font-size: $font-sm;
-	}
-	.money {
-		font-size: 56rpx;
-	}
-}
-
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-//列表
-
-.swiper-box {
-	padding-top: 10rpx;
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
-			}
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-		.money {
-			color: #fd5b23;
-			font-size: $font-lg;
-		}
-	}
-}
-.list-scroll-content {
-	height: 100%;
-}
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
-	}
-}
-</style>

+ 16 - 14
pages/user/coupon.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
 		<view class="navbar">
-			<view v-for="(item,index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
 		</view>
 		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
 			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
@@ -11,7 +11,7 @@
 					<view class="list-money flex">
 						<image :src="item._type == 2 ? '/static/img/img03.png' : '/static/img/img02.png'" mode="scaleToFill"></image>
 						<view class="list-money-text">
-							<view class="tit" :class="{ action: item._type} == 2">
+							<view class="tit" :class="{ action: item._type } == 2">
 								<text>{{ item.coupon_price }}</text>
 							</view>
 							<view class="price">
@@ -25,7 +25,7 @@
 					</view>
 					<view class="row_list_right">
 						<view class="right_top">
-							<text class="right_title" :class="{ action: item._type == 2}">{{ item.coupon_title }}</text>
+							<text class="right_title" :class="{ action: item._type == 2 }">{{ item.coupon_title }}</text>
 						</view>
 						<view class="right_time">
 							<text>{{ item._add_time }}-{{ item.end_time }}</text>
@@ -48,7 +48,7 @@
 import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 import empty from '@/components/empty';
 import { getCouponsList } from '@/api/order.js';
-export default{
+export default {
 	components: {
 		uniLoadMore,
 		empty
@@ -56,13 +56,13 @@ export default{
 	data() {
 		return {
 			tabCurrentIndex: 0,
-			navList:[
+			navList: [
 				{
 					state: 0,
 					text: '全部',
 					loadingType: 'more',
 					orderList: [],
-					page: 1,//当前页数
+					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				},
 				{
@@ -78,7 +78,7 @@ export default{
 					text: '已使用',
 					loadingType: 'more',
 					orderList: [],
-					page: 1,//当前页数
+					page: 1, //当前页数
 					limit: 10 //每次信息条数
 				}
 			]
@@ -89,7 +89,7 @@ export default{
 	},
 	methods: {
 		//返回首页
-		navTo(){
+		navTo() {
 			uni.switchTab({
 				url: '/pages/index/index'
 			});
@@ -104,7 +104,7 @@ export default{
 				//tab切换只有第一次需要加载数据
 				return;
 			}
-			if (navItem.loadingType === 'loading'){
+			if (navItem.loadingType === 'loading') {
 				//防止重复加载
 				return;
 			}
@@ -121,7 +121,7 @@ export default{
 					let da = data.map(e => {
 						e.coupon_price = +e.coupon_price.replace(',', '');
 						e.use_min_price = +e.use_min_price.replace(',', '');
-						return e
+						return e;
 					});
 					navItem.orderList = navItem.orderList.concat(da);
 					console.log(navItem.orderList);
@@ -130,7 +130,7 @@ export default{
 						// 判断是否还有数据,有改为more,没有改为noMore
 						navItem.loadingType = 'more';
 						return;
-					}else {
+					} else {
 						navItem.loadingType = 'noMore';
 					}
 					uni.hideLoading();
@@ -138,7 +138,7 @@ export default{
 				})
 				.catch(e => {
 					console.log(e);
-				})
+				});
 		},
 		//swiper 切换
 		changeTab(e) {
@@ -266,7 +266,9 @@ page,
 			margin: 15rpx 0;
 			padding: 10rpx;
 			width: 140rpx;
-			text_align: center;
+			display: flex;
+			justify-content: center;
+			align-items: center;
 			border-radius: 50rpx;
 			color: #fff;
 			font-size: $font-sm - 4rpx;
@@ -293,7 +295,7 @@ page,
 			}
 		}
 	}
-	
+
 	.iconlocation {
 		font-size: 36rpx;
 		color: $font-color-light;

+ 348 - 0
pages/user/creation.vue

@@ -0,0 +1,348 @@
+<template>
+	<view class="content">
+		<view class="navbar">
+			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
+				<scroll-view scroll-y="true" class="list-scroll-content" :class="{ yan: tabCurrentIndex == 0 }" @scrolltolower="loadData">
+					<!-- 空白页 -->
+					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
+
+					<!-- 订单列表 -->
+					<view v-else>
+						<view
+							class="order-item flex"
+							v-for="(item, index) in tabItem.orderList"
+							:key="index"
+							@click="navTo('/pages/user/evaluate?id=' + item.id + '&type=' + tabCurrentIndex)"
+						>
+							<view class="order-image"><image :src="item.main_pic" mode=""></image></view>
+							<view class="order-info">
+								<view class="order-title clamp2">{{ item.title }}</view>
+								<view class="order-info-main flex">
+									<view class="order-time">{{ item.add_time }}</view>
+									<view class="order-btnBox flex" v-if="tabCurrentIndex == 0">
+										<view class="order-btn-item" @click.stop="navTo('/pages/order/evaluate?id=' + item.id)">
+											<view class="order-btn-icon"><image src="../../static/icon/bj.png" mode=""></image></view>
+											<view class="order-btn-font">编辑</view>
+										</view>
+										<view class="order-btn-item" @click.stop="del(item.id)">
+											<view class="order-btn-icon1"><image src="../../static/icon/sc.png" mode=""></image></view>
+											<view class="order-btn-font1">删除</view>
+										</view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+					<uni-load-more :status="tabItem.loadingType" v-if="!(tabItem.orderList.length == 0 && tabItem.loaded)"></uni-load-more>
+				</scroll-view>
+				<view class="btn" @click="navTo('/pages/order/order?state=3')" v-if="tabCurrentIndex == 0">发帖</view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import empty from '@/components/empty';
+import { delete_comment, my_replylist, reply_savelist } from '@/api/activity.js';
+export default {
+	components: {
+		empty
+	},
+	data() {
+		return {
+			height: '',
+			tabCurrentIndex: 0,
+			navList: [
+				{
+					state: 1,
+					text: '草稿箱',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 1,
+					text: '已审核',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				},
+				{
+					state: 0,
+					text: '审核中',
+					loadingType: 'more',
+					orderList: [],
+					page: 1, //当前页数
+					limit: 10 //每次信息条数
+				}
+			]
+		};
+	},
+	onLoad(opt) {
+		this.tabCurrentIndex = opt.id * 1;
+	},
+	onShow() {
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	methods: {
+		//swiper 切换
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData('tabChange');
+		},
+		//顶部tab点击
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		// 删除草稿
+		del(id) {
+			const obj = this;
+			uni.showModal({
+				title: '提示',
+				content: '是否删除这个草稿',
+				success: function(res) {
+					if (res.confirm) {
+						delete_comment({}, id).then(({ data }) => {
+							obj.$api.msg('删除成功');
+							obj.loadData('shua');
+						});
+					} else if (res.cancel) {
+						console.log('用户点击取消');
+					}
+				}
+			});
+		},
+		async loadData(source) {
+			let obj = this;
+			//这里是将订单挂载到tab列表下
+			let index = this.tabCurrentIndex;
+			let navItem = this.navList[index];
+			let state = navItem.state;
+			if (source === 'shua') {
+				navItem.loadingType = 'more';
+				navItem.page = 1;
+				navItem.limit = 10;
+				navItem.orderList = [];
+			}
+			if (source === 'tabChange' && navItem.loaded === true) {
+				//tab切换只有第一次需要加载数据
+				return;
+			}
+			if (navItem.loadingType === 'loading') {
+				//防止重复加载
+				return;
+			}
+			// 修改当前对象状态为加载中
+			navItem.loadingType = 'loading';
+			if (index == 0) {
+				reply_savelist({
+					page: navItem.page,
+					limit: navItem.limit
+				})
+					.then(({ data }) => {
+						console.log(data, '123456');
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							navItem.loadingType = 'more';
+						} else {
+							navItem.loadingType = 'noMore';
+						}
+						obj.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			} else {
+				my_replylist({
+					page: navItem.page,
+					limit: navItem.limit,
+					type: state
+				})
+					.then(({ data }) => {
+						navItem.orderList = navItem.orderList.concat(data);
+						navItem.page++;
+						if (navItem.limit == data.length) {
+							navItem.loadingType = 'more';
+						} else {
+							navItem.loadingType = 'noMore';
+						}
+						obj.$set(navItem, 'loaded', true);
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.navbar {
+	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 #c54b4a;
+			}
+		}
+	}
+}
+
+//列表
+.swiper-box {
+	margin-top: 20rpx;
+
+	.order-item {
+		padding: 22rpx 24rpx 24rpx;
+		border-bottom: 1px solid #eeeeee;
+		justify-content: flex-start;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+		.order-image {
+			flex-shrink: 0;
+			width: 200rpx;
+			height: 160rpx;
+		}
+		.order-info {
+			margin-left: 16rpx;
+			width: 100%;
+			display: flex;
+			flex-direction: column;
+			justify-content: space-between;
+			.order-title {
+				font-size: 30rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+			.order-info-main {
+				margin-top: 20rpx;
+				.order-time {
+					font-size: 24rpx;
+					font-family: PingFang SC;
+					font-weight: 500;
+					color: #999999;
+				}
+				.order-btnBox {
+					justify-content: flex-start;
+					.order-btn-item {
+						display: flex;
+						align-items: center;
+						margin: 0 10rpx;
+						.order-btn-icon {
+							width: 30rpx;
+							height: 30rpx;
+						}
+						.order-btn-font {
+							margin-left: 10rpx;
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #000000;
+						}
+						.order-btn-icon1 {
+							width: 30rpx;
+							height: 30rpx;
+						}
+						.order-btn-font1 {
+							margin-left: 10rpx;
+							font-size: 26rpx;
+							font-family: PingFang SC;
+							font-weight: 500;
+							color: #ff4c4c;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+.list-scroll-content {
+	background: #ffffff;
+	height: 100%;
+	.yan {
+		padding-bottom: 100rpx;
+	}
+}
+.tab-content {
+	position: relative;
+}
+.btn {
+	position: absolute;
+	bottom: 20rpx;
+	left: 0;
+	right: 0;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	width: 560rpx;
+	height: 76rpx;
+	background: #000000;
+	border-radius: 38rpx;
+	font-size: 34rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #ffffff;
+	margin: 0 auto;
+}
+</style>

+ 575 - 0
pages/user/evaluate.vue

@@ -0,0 +1,575 @@
+<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 v-if="rateValue1 != ''"><uniRate text="1" size="20" margin="10" :value="rateValue1" @change="rateChange1"></uniRate></view>
+				</view>
+				<view class="flex_item zhil">
+					<view>服务态度</view>
+					<view v-if="rateValue2 != ''"><uniRate text="1" size="20" margin="10" :value="rateValue2" @change="rateChange2"></uniRate></view>
+				</view>
+				<view class="list">
+					<view class="list-left">标题:</view>
+					<input type="text" v-model="title" placeholder-class="placeholder" class="list-input" placeholder="请填写评论的标题" />
+				</view>
+				<view class="upload-box">
+					<view class="upload-left">主图</view>
+					<view class="upload-right" @click.stop="scImgMian()">
+						<image v-if="!main_pic" class="upload-img " src="/static/img/add.png"></image>
+						<image v-if="main_pic" class="upload-img " :src="main_pic"></image>
+					</view>
+				</view>
+				<view class="equity_box">
+					<view class="text-box uni-textarea"><textarea placeholder-style="color:#999" :placeholder="placeholder" v-model="text"></textarea></view>
+					<view class="">
+						<view class="add-img-box flex_item">
+							<view class="add-img-item" v-for="(item, index) in imgList" :key="index">
+								<image class="add-img" @click.stop="imgInfo(index)" :src="item.url" mode="aspectFill"></image>
+								<!-- <image class="add-img-del" @click.stop="delImg(index)" src="/static/img/delete.png"></image> -->
+							</view>
+							<view v-if="imgList.length < 9" class="add-img-item" @click.stop="scImg()"><image class="add-img" src="/static/img/add.png"></image></view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { product, upload, order_comment } from '@/api/order.js';
+import { save_comment, reply_save, my_reply } from '@/api/activity.js';
+import uniRate from '@/components/uni-rate/uni-rate.vue';
+export default {
+	components: {
+		uniRate
+	},
+	data() {
+		return {
+			type: 0,
+			id: '',
+			title: '', //标题
+			main_pic: '', //主图
+			list: '', //订单详情
+			productInfo: '',
+			text: '', //评论内容
+			placeholder: '商品满足你的期待么?说说你的想法,分享给想买的他们吧~',
+			imgList: [],
+			unique: '', //商品唯一标识码
+			cloudimgList: [],
+			rateValue1: '', //商品质量
+			rateValue2: '', //服务态度
+			imgCount: 9 //最多支持9张上传,可以修改
+		};
+	},
+	onLoad(option) {
+		if (option.unique) {
+			this.unique = option.unique;
+			this.rateValue1 = '0';
+			this.rateValue2 = '0';
+			this.loadOrder();
+		}
+		if (option.type) {
+			this.type = option.type;
+		}
+		if (option.id) {
+			this.id = option.id;
+			this.loadData();
+		}
+	},
+	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;
+			});
+		},
+		loadData() {
+			if (this.type == 0) {
+				reply_save({}, this.id).then(({ data }) => {
+					this.unique = data.unique;
+					this.title = data.title;
+					this.main_pic = data.main_pic;
+					for (let i = 0; i < data.pics.length; i++) {
+						let url = { url: data.pics[i] };
+						this.imgList.push(url);
+					}
+					this.text = data.comment;
+					this.rateValue1 = data.product_score + '';
+					this.rateValue2 = data.service_score + '';
+					this.loadOrder();
+					console.log(this.rateValue1, '12456');
+				});
+			} else {
+				my_reply({}, this.id).then(({ data }) => {
+					this.unique = data.unique;
+					this.title = data.title;
+					this.main_pic = data.main_pic;
+					for (let i = 0; i < data.pics.length; i++) {
+						let url = { url: data.pics[i] };
+						this.imgList.push(url);
+					}
+					this.text = data.comment;
+					this.rateValue1 = data.product_score + '';
+					this.rateValue2 = data.service_score + '';
+					this.loadOrder();
+					console.log(this.rateValue1, '12456');
+				});
+			}
+		},
+		//商品质量评分
+		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: '最多添加9张图片',
+					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 => {});
+		},
+		scImgMian() {
+			let obj = this;
+			upload({
+				file: ''
+			})
+				.then(e => {
+					console.log(e, 'e');
+					obj.main_pic = e[0].url;
+				})
+				.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,
+				main_pic: obj.main_pic,
+				title: obj.title
+			})
+				.then(e => {
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				})
+				.catch(e => {
+					uni.navigateTo({
+						url: '/pages/order/order?state=4'
+					});
+				});
+		},
+		// 保存草稿
+		submit1(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(',');
+			save_comment({
+				pics: arr,
+				comment: obj.text,
+				product_score: obj.rateValue1,
+				service_score: obj.rateValue2,
+				unique: obj.unique,
+				main_pic: obj.main_pic,
+				title: obj.title
+			})
+				.then(e => {
+					uni.navigateTo({
+						url: '/pages/user/creation?id=0'
+					});
+				})
+				.catch(e => {});
+		},
+		//点击图片显示大图
+		imgInfo(i) {
+			let tempList = [];
+			console.log(111);
+			this.imgList.forEach(e => {
+				tempList.push(e.url);
+			});
+			console.log(tempList);
+			//显示图片
+			uni.previewImage({
+				current: i,
+				loop: false,
+				urls: tempList,
+				indicator: 'default'
+			});
+		},
+		//删除图片
+		delImg(i) {
+			uni.showModal({
+				content: '确定删除这张吗',
+				success: res => {
+					if (res.confirm) {
+						this.imgList.splice(i, 1);
+						this.imgCount++;
+					} else if (res.cancel) {
+					}
+				}
+			});
+		},
+		// 页面跳转
+		navto(e) {
+			uni.navigateTo({
+				url: e
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page {
+	background: #ffffff;
+	height: 100%;
+	.content {
+		background: #ffffff;
+		height: 100%;
+	}
+}
+/* 多条商品 */
+.order-item {
+	display: flex;
+	flex-direction: column;
+	padding: 0rpx 30rpx;
+	background: #fff;
+	margin-top: 20rpx;
+	/* 单条商品 */
+	.goods-box-single {
+		display: flex;
+		padding: 20rpx 0;
+		.goods-img {
+			display: block;
+			width: 120rpx;
+			height: 120rpx;
+		}
+		.right {
+			flex: 1;
+			display: flex;
+			flex-direction: column;
+			padding: 0 30rpx 0 24rpx;
+			overflow: hidden;
+			height: 100%;
+			.title {
+				align-self: flex-start;
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				height: 80rpx;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				display: -webkit-box;
+				-webkit-box-orient: vertical;
+				-webkit-line-clamp: 2;
+			}
+			.title-right {
+				flex-shrink: 0;
+				text-align: right;
+				align-self: flex-start;
+			}
+			.attr-box {
+				font-size: $font-sm + 2rpx;
+				color: $font-color-light;
+			}
+			.price {
+				font-size: $font-base + 2rpx;
+				color: $font-color-dark;
+				&:before {
+					content: '¥';
+					font-size: $font-sm;
+					margin: 0 2rpx 0 8rpx;
+				}
+			}
+		}
+	}
+}
+.equity_box {
+	background-color: #fafafa;
+	border-radius: 10rpx;
+	padding: 25rpx 25rpx;
+	margin: 25rpx 0rpx;
+	.text-box {
+		height: 200rpx;
+		textarea {
+			font-size: 25rpx;
+			width: 100%;
+			height: 100%;
+			overflow: hidden;
+			text-overflow: ellipsis;
+			display: -webkit-box;
+			-webkit-box-orient: vertical;
+			-webkit-line-clamp: 5;
+		}
+	}
+}
+.zhil {
+	font-size: 28rpx !important;
+	padding: 15rpx 15rpx;
+}
+.submit-box {
+	bottom: 0;
+	left: 0;
+	width: 750rpx;
+}
+
+.submit-btn {
+	margin-top: 10px;
+	display: inline-block;
+	width: 670rpx;
+	height: 96rpx;
+	line-height: 96rpx;
+	text-align: center;
+	background-color: #000000;
+	opacity: 1;
+	box-shadow: 0rpx 8rpx 12rpx rgba(0, 0, 0, 0.16);
+	border-radius: 56rpx;
+	font-size: 39rpx;
+	font-weight: bold;
+	color: rgba(255, 255, 255, 1);
+}
+.gren {
+	background: #ffffff;
+	color: #000000;
+	border: 1px solid #000000;
+}
+.submit-btn-txt {
+	font-size: 39rpx;
+	font-weight: bold;
+	line-height: 47rpx;
+	color: rgba(255, 255, 255, 1);
+	opacity: 1;
+}
+.map-box {
+	width: 484rpx;
+	height: 256rpx;
+	border-width: 4rpx;
+	border-color: rgba(255, 255, 255, 1);
+	box-shadow: 0rpx 0rpx 24rpx rgba(0, 0, 0, 0.16);
+	/* border-radius: 12rpx; */
+	position: relative;
+}
+.map {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	bottom: 0;
+	width: 476rpx;
+	height: 250rpx;
+}
+.map-img {
+	position: absolute;
+	top: 90rpx;
+	left: 156rpx;
+	width: 230rpx;
+	height: 68rpx;
+	background-color: rgba(51, 51, 51, 0.64);
+	border-width: 1rpx;
+	border-color: rgba(0, 0, 0, 0);
+	border-radius: 34px;
+
+	font-size: 28rpx;
+	font-weight: bold;
+	line-height: 66rpx;
+	color: rgba(255, 255, 255, 1);
+	text-align: center;
+}
+.address-box {
+	padding: 15rpx 40rpx;
+	margin-bottom: 10px;
+}
+.label {
+	font-size: 36rpx;
+	font-weight: bold;
+	line-height: 50rpx;
+	color: #222222;
+}
+.label-img {
+	padding-left: 40rpx;
+}
+
+.add-img-box {
+	width: 100%;
+	flex-direction: row;
+	flex-wrap: wrap;
+	margin-top: 50rpx;
+}
+.add-img-item {
+	width: 180rpx;
+	height: 180rpx;
+	border-radius: 24rpx;
+	position: relative;
+	margin: 0rpx 20rpx;
+	margin-bottom: 25rpx;
+	.add-img {
+		width: 100%;
+		height: 100%;
+		border-radius: 24rpx;
+	}
+}
+.add-img-camera {
+	flex: 1;
+}
+.add-img-del {
+	position: absolute;
+	width: 40rpx;
+	height: 40rpx;
+	left: 155rpx;
+	bottom: 155rpx;
+	//background-color: rgba(238, 0, 0, 1);
+	border-radius: 20rpx;
+}
+.address-time {
+	width: 484rpx;
+	height: 88rpx;
+	background-color: rgba(245, 245, 245, 1);
+	opacity: 1;
+	border-radius: 24rpx;
+	text-align: center;
+
+	font-size: 35rpx;
+	font-weight: 500;
+	color: rgba(51, 51, 51, 1);
+}
+.line {
+	width: 750rpx;
+	height: 1px;
+	transform: scaleY(0.3);
+	background-color: rgba(0, 0, 0, 0.5);
+}
+.list {
+	display: flex;
+	flex-direction: column;
+	align-items: center;
+	width: 100%;
+	margin-top: 32rpx;
+	// height: 133rpx;
+
+	.list-left {
+		width: 100%;
+		text-align: left;
+		font-size: 28rpx;
+	}
+
+	input {
+		height: 66rpx;
+
+		margin-top: 32rpx;
+	}
+
+	.list-input {
+		padding: 10rpx 24rpx;
+		// margin: 12rpx 0 ;
+		display: flex;
+		justify-content: center;
+		// line-height: 66rpx;
+		display: flex;
+		align-items: center;
+		width: 100%;
+		flex: 1;
+		color: #000000;
+		border: 1rpx solid #000000;
+		border-radius: 22rpx;
+		text-align: left;
+		padding-right: 24rpx;
+
+		.input-placeholder {
+			height: 70rpx;
+			color: #000000;
+		}
+	}
+}
+.upload-box {
+	width: 100%;
+	background: #ffffff;
+	// border: 1px solid #E63931;
+	border-radius: 27rpx;
+	display: flex;
+	flex-direction: column;
+	padding: 30rpx 40rpx 30rpx 0;
+	margin: 0 auto 30rpx;
+
+	.upload-left {
+		font-weight: 400;
+		font-size: 28rpx;
+	}
+
+	.upload-right {
+		flex: 1;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+
+		.upload-img {
+			width: 200rpx;
+			height: 200rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+</style>

+ 0 - 156
pages/user/favorites.vue

@@ -1,156 +0,0 @@
-<template>
-	<view class="container">
-		<!-- 空白页 -->
-		<empty v-if="favoriteList.length < 1"></empty>
-		<view class="favorites flex" v-for="ls in favoriteList" @click="toproduct(ls.pid)">
-			<view class="favorites_img"><image :src="ls.image"></image></view>
-			<view class="favorites_list">
-				<view class="favorites_name">{{ ls.store_name }}</view>
-				<view class="favorites_peice flex">
-					<view>
-						<text>¥{{ ls.price }}</text>
-					</view>
-					<view class="icon_del" @click.prevent.stop="del(ls.pid)" v-show="delshow">
-						<text class="iconfont icondelete"></text>
-						<text>取消</text>
-					</view>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-import { getcollectList, delcollect } from '@/api/user.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	components: {
-		uniLoadMore,
-		empty
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			favoriteList: '',
-			delshow: true
-		};
-	},
-	onLoad() {
-		this.loadData();
-	},
-	methods: {
-		//获取收藏夹列表
-		loadData() {
-			let obj = this;
-			getcollectList({
-				page: '1',
-				limit: '10'
-			})
-				.then(function(e) {
-					obj.favoriteList = e.data;
-					console.log(obj.favoriteList);
-				})
-				.catch(function(e) {
-					console.log(e);
-				});
-		},
-		//跳转商品详情页
-		toproduct(item) {
-			let id = item;
-			uni.navigateTo({
-				url: `/pages/product/product?id=${id}`
-			})
-		},
-		//删除收藏夹商品
-		del(item) {
-			let obj = this;
-			uni.showModal({
-				title: '提示',
-				content: '是否取消收藏该商品',
-				success: e => {
-					if (e.confirm) {
-						delcollect({
-							id: item,
-							category: 'product'
-						})
-							.then(function(e) {
-								uni.showToast({
-									title: '已取消收藏',
-									duration: 1500,
-								});
-								obj.loadData();
-							})
-							.catch(function(e) {
-								console.log(e);
-							});
-					}
-				}
-			});
-		},
-	}
-}
-</script>
-
-<style lang="scss">
-page {
-	height: 100%;
-}
-%flex-center {
-	display: flex;
-	flex-direction: column;
-	justify-content: center;
-	align-items: center;
-}
-%section {
-	display: flex;
-	justify-content: space-around;
-	align-content: center;
-	background: #fff;
-	border-radius: 10rpx;
-}
-.container {
-	height: 100%;
-	background-color: $page-color-base;
-	padding: 15rpx 0rpx;
-	font-size: 28rpx;
-}
-.favorites {
-	width: 90%;
-	background-color: #ffffff;
-	border-radius: 15rpx;
-	margin: 15rpx auto;
-	padding: 25rpx 25rpx;
-	margin-bottom: 25rpx;
-}
-.favorites_img {
-	width: 80px !important;
-	height: 80px;
-}
-.favorites_img image {
-	width: 100%;
-	height: 100%;
-}
-.favorites_list {
-	width: 70%;
-	padding-left: 20rpx;
-}
-.icon_del {
-	color: $font-color-base;
-	z-index: 9999;
-	font-weight: bold;
-}
-.favorites_name {
-	height: 80rpx;
-	overflow: hidden;
-	text-overflow: ellipsis;
-	display: -webkit-box;
-	-webkit-box-orient: vertial;
-	-webkit-line-clamp: 2;
-}
-.favorites_peice {
-	margin-top: 25rpx;
-	color: #db1935;
-	font-weight: bold;
-}
-</style>

+ 295 - 0
pages/user/living.vue

@@ -0,0 +1,295 @@
+<template>
+	<view class="content">
+		<view class="main-item" v-for="(item, index) in list" @click="navTo(item)">
+			<view class="type">{{ item.live_status == 101 ? '直播中' : item.live_status == 102 ? '未开始' : item.live_status == 103 ? '已结束' : '网络中断' }}</view>
+			<view class="main-image"><image :src="item.cover_img" mode=""></image></view>
+			<view class="info flex">
+				<view class="info-left">
+					<view class="main-title">{{ item.name }}</view>
+					<view class="main-time">{{ item.add_time }}开播</view>
+				</view>
+				<view class="info-right" @click.stop="shareLink(item)">分享</view>
+			</view>
+		</view>
+		<view v-if="shareShow" class="Shraremask" @click="cancel">
+			<view class="mask-content">
+				<scroll-view class="view-content" scroll-y>
+					<view class="share-header">分享到</view>
+					<view class="share-list">
+						<view class="share-item">
+							<!-- 微信 -->
+							<button class="wechat-box" open-type="share">
+								<image class="itemImage" src="../../static/icon/share1.png" mode=""></image>
+								<text class="itemText">微信好友</text>
+							</button>
+							<!-- 朋友圈 -->
+							<view class="wechat-box" @click="copy()">
+								<image class="itemImage" src="../../static/icon/share3.png" mode=""></image>
+								<text class="itemText">复制链接</text>
+							</view>
+							<!-- <view class="wechat-box" @click="copy()">
+								<image class="itemImage" src="../../static/icon/share4.png" mode=""></image>
+								<text class="itemText">生成海报</text>
+							</view> -->
+						</view>
+					</view>
+				</scroll-view>
+				<view class="bottomButtom b-t" @click="cancel">取消</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { live, short_link } from '@/api/activity.js';
+import { getTime } from '@/utils/rocessor.js';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		console.log(this.share);
+		if (res.from === 'button') {
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			// 保存邀请人
+			let data = {
+				path: path,
+				imageUrl: this.share.cover_img,
+				title: this.share.name
+			};
+			console.log('data', data);
+			return data;
+		}
+	},
+	// #endif
+	data() {
+		return {
+			list: [],
+			shareShow: false,
+			share: ''
+		};
+	},
+	onLoad() {
+		this.loadData();
+	},
+	onShow() {},
+	onReachBottom() {},
+	onReady() {},
+	methods: {
+		loadData() {
+			live({ page: 1, limit: 100 }).then(({ data }) => {
+				data.forEach(e => {
+					e.add_time = getTime(e.start_time);
+				});
+				this.list = data;
+				console.log(data);
+			});
+		},
+		shareLink(item) {
+			console.log('dainjideniang');
+			this.share = item;
+			this.shareShow = true;
+		},
+		copy() {
+			short_link({ url: 'pages/user/living' }).then(({ data }) => {
+				console.log(data);
+				this.comfirm(data.link);
+			});
+		},
+		comfirm(text) {
+			console.log(text);
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		//取消分享
+		cancel() {
+			this.shareShow = false;
+		},
+		navTo(opt) {
+			let roomId = opt.roomid;
+			let customParams = encodeURIComponent(JSON.stringify({ path: 'pages/index/index', pid: 1 }));
+			uni.navigateTo({
+				url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomId}&custom_params=${customParams}`
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.main-item {
+	margin: 20rpx auto 0;
+	width: 690rpx;
+	background: #ffffff;
+	border-radius: 30rpx;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+	.type {
+		top: 50rpx;
+		left: 50rpx;
+		position: absolute;
+		z-index: 2;
+		border-radius: 50rpx;
+		width: 100rpx;
+		height: 50rpx;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		background: #7f7f7f;
+		color: #ffffff;
+	}
+	.main-image {
+		width: 100%;
+		height: 500rpx;
+	}
+	.info {
+		padding: 10rpx 10rpx 20rpx;
+		.info-left {
+			line-height: 1;
+			.main-title {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+			.main-time {
+				margin-top: 8rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+		.info-right {
+			border-radius: 50rpx;
+			width: 100rpx;
+			height: 50rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			color: #e56969;
+			border: 1px solid #e56969;
+		}
+	}
+}
+.Shraremask {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	display: flex;
+	justify-content: center;
+	align-items: flex-end;
+	z-index: 998;
+	transition: 0.3s;
+	background-color: rgba(51, 51, 51, 0.6);
+	.bottomButtom {
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		height: 90rpx;
+		background: #fff;
+		z-index: 9;
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+}
+.mask-content {
+	margin-bottom: 88rpx;
+	width: 100%;
+	height: 380rpx;
+	transition: 0.3s;
+	background: #fff;
+	&.has-bottom {
+		padding-bottom: 90rpx;
+	}
+	.view-content {
+		height: 100%;
+	}
+}
+.share-header {
+	height: 110rpx;
+	font-size: $font-base + 2rpx;
+	color: font-color-dark;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	padding-top: 10rpx;
+	&:before,
+	&:after {
+		content: '';
+		width: 240rpx;
+		height: 0;
+		border-top: 1px solid $border-color-base;
+		transform: scaleY(0.5);
+		margin-right: 30rpx;
+	}
+	&:after {
+		margin-left: 30rpx;
+		margin-right: 0;
+	}
+}
+.share-list {
+	display: flex;
+	width: 80%;
+	margin: 0rpx auto;
+}
+.share-item {
+	min-width: 33.33%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	height: 180rpx;
+	width: 100%;
+	.wechat-box {
+		width: 50%;
+		height: 100%;
+		background: #ffffff;
+		border: 0;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		&::after {
+			border: 0;
+		}
+		.itemImage {
+			width: 80rpx;
+			height: 80rpx;
+			margin-bottom: 16rpx;
+		}
+		.itemText {
+			font-size: $font-base;
+			color: $font-color-base;
+			line-height: 2;
+		}
+	}
+}
+</style>

+ 102 - 0
pages/user/new.vue

@@ -0,0 +1,102 @@
+<template>
+	<view class="content">
+		<view class="main flex">
+			<view class="main-font">新品通知</view>
+			<u-switch v-model="checked" active-color="#2979ff" size="50"></u-switch>
+		</view>
+		<u-popup v-model="show" mode="center" border-radius="50" :closeable="true">
+			<view class="popup-box">
+				<view class="popup-font">长按二维码保存至本地,关注公众号即可接收消息</view>
+				<view class="ewm"><image @longtap="bc_code" src="../../static/img/add.png" mode=""></image></view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			checked: false,
+			show: true
+		};
+	},
+	onLoad() {
+		this.open();
+	},
+	onShow() {},
+	onReachBottom() {},
+	onReady() {},
+	methods: {
+		change(status) {
+			console.log(status);
+			this.open();
+		},
+		open() {
+			this.show = true;
+		},
+		close() {
+			this.show = false;
+		},
+		bc_code() {
+			let that = this;
+			console.log('保存二维码', this.backImg);
+			uni.downloadFile({
+				//获得二维码的临时地址
+				url: this.backImg,
+				success: res => {
+					//console.log('获取url',res)
+					if (res.statusCode == 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath, //传入临时地址
+							success() {
+								that.$api.msg('保存成功'); //封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败');
+							}
+						});
+					}
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.main {
+	padding: 40rpx;
+	.main-font {
+		font-size: 30rpx;
+		font-family: PingFang SC;
+		font-weight: 800;
+		color: #000000;
+	}
+}
+.popup-box {
+	width: 470rpx;
+	padding: 86rpx 40rpx 40rpx;
+	position: relative;
+	.popup-font {
+		font-size: 32rpx;
+		font-weight: 800;
+		font-family: PingFang SC;
+		color: #000000;
+	}
+	.ewm {
+		margin: 20rpx auto;
+		width: 390rpx;
+		height: 390rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+}
+</style>

+ 0 - 153
pages/user/notice.vue

@@ -1,153 +0,0 @@
-<template>
-	<view>
-		<view class="notice-item">
-			<text class="time">11:30</text>
-			<view class="content">
-				<text class="title">新品上市,全场满199减50</text>
-				<view class="img-wrapper">
-					<image class="pic" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556465765776&di=57bb5ff70dc4f67dcdb856e5d123c9e7&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01fd015aa4d95fa801206d96069229.jpg%401280w_1l_2o_100sh.jpg"></image>
-				</view>
-				<text class="introduce">
-					虽然做了一件好事,但很有可能因此招来他人的无端猜测,例如被质疑是否藏有其他利己动机等,乃至谴责。即便如此,还是要做好事。
-				</text>
-				<view class="bot b-t">
-					<text>查看详情</text>
-					<text class="more-icon iconfont iconenter"></text>
-				</view>
-			</view>
-		</view>
-		<view class="notice-item">
-			<text class="time">昨天 12:30</text>
-			<view class="content">
-				<text class="title">新品上市,全场满199减50</text>
-				<view class="img-wrapper">
-					<image class="pic" src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3761064275,227090144&fm=26&gp=0.jpg"></image>
-					<view class="cover">
-						活动结束
-					</view>
-				</view>
-				<view class="bot b-t">
-					<text>查看详情</text>
-					<text class="more-icon iconfont iconenter"></text>
-				</view>
-			</view>
-		</view>
-		<view class="notice-item">
-			<text class="time">2019-07-26 12:30</text>
-			<view class="content">
-				<text class="title">新品上市,全场满199减50</text>
-				<view class="img-wrapper">
-					<image class="pic" src="https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1556465765776&di=57bb5ff70dc4f67dcdb856e5d123c9e7&imgtype=0&src=http%3A%2F%2Fimg.zcool.cn%2Fcommunity%2F01fd015aa4d95fa801206d96069229.jpg%401280w_1l_2o_100sh.jpg"></image>
-					<view class="cover">
-						活动结束
-					</view>
-				</view>
-				<text class="introduce">新品上市全场2折起,新品上市全场2折起,新品上市全场2折起,新品上市全场2折起,新品上市全场2折起</text>
-				<view class="bot b-t">
-					<text>查看详情</text>
-					<text class="more-icon iconfont iconenter"></text>
-				</view>
-			</view>
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-
-			}
-		},
-		methods: {
-
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page {
-		background-color: #f7f7f7;
-		padding-bottom: 30upx;
-	}
-
-	.notice-item {
-		display: flex;
-		flex-direction: column;
-		align-items: center;
-	}
-
-	.time {
-		display: flex;
-		align-items: center;
-		justify-content: center;
-		height: 80upx;
-		padding-top: 10upx;
-		font-size: 26upx;
-		color: #7d7d7d;
-	}
-
-	.content {
-		width: 710upx;
-		padding: 0 24upx;
-		background-color: #fff;
-		border-radius: 4upx;
-	}
-
-	.title {
-		display: flex;
-		align-items: center;
-		height: 90upx;
-		font-size: 32upx;
-		color: #303133;
-	}
-
-	.img-wrapper {
-		width: 100%;
-		height: 260upx;
-		position: relative;
-	}
-
-	.pic {
-		display: block;
-		width: 100%;
-		height: 100%;
-		border-radius: 6upx;
-	}
-
-	.cover {
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		position: absolute;
-		left: 0;
-		top: 0;
-		width: 100%;
-		height: 100%;
-		background-color: rgba(0, 0, 0, .5);
-		font-size: 36upx;
-		color: #fff;
-	}
-
-	.introduce {
-		display: inline-block;
-		padding: 16upx 0;
-		font-size: 28upx;
-		color: #606266;
-		line-height: 38upx;
-	}
-
-	.bot {
-		display: flex;
-		align-items: center;
-		justify-content: space-between;
-		height: 80upx;
-		font-size: 24upx;
-		color: #707070;
-		position: relative;
-	}
-
-	.more-icon {
-		font-size: 32upx;
-	}
-</style>

+ 0 - 200
pages/user/scoreAccumulate.vue

@@ -1,200 +0,0 @@
-<template>
-	<view class="content">
-		<!-- <view class="navbar">
-			<view v-for="(item, index) in navList" :key="index" class="nav-item" :class="{ current: tabCurrentIndex === index }" @click="tabClick(index)">{{ item.text }}</view>
-		</view> -->
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view class="list-scroll-content" scroll-y @scrolltolower="loadData">
-					<!-- 空白页 -->
-					<empty v-if="tabItem.loaded === true && tabItem.orderList.length === 0"></empty>
-
-					<!-- 订单列表 -->
-					<view v-for="(item, index) in tabItem.orderList" :key="index" class="order-item flex">
-						<view class="title-box">
-							<view class="title">
-								<text>{{ item.mark }}</text>
-							</view>
-							<view class="time">
-								<text>{{ item.add_time }}</text>
-							</view>
-						</view>
-						<view class="money">
-							<text>{{ (item.pm == 0 ? '-' : '+') + item.number }}</text>
-						</view>
-					</view>
-					<uni-load-more :status="tabItem.loadingType"></uni-load-more>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-	</view>
-</template>
-
-<script>
-	
-import { integrallist } from '@/api/functionalUnit.js';
-import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
-import empty from '@/components/empty';
-export default {
-	components: {
-		empty,
-		uniLoadMore
-	},
-	onReady() {
-		
-	},
-	data() {
-		return {
-			tabCurrentIndex: 0,
-			navList: [
-				{
-					state: 0,
-					text: '全部',
-					loadingType: 'more',
-					orderList: [],
-					page: 1, //当前页数
-					limit: 10 //每次信息条数
-				},
-			],
-		};
-	},
-	onShow() {
-		// 载入积分数据
-		this.loadData();
-	},
-	methods: {
-		// 页面跳转
-		navto(e) {
-			uni.navigateTo({
-				url: e
-			});
-		},
-		//获取收入支出信息
-		async loadData(source) {
-			//这里是将订单挂载到tab列表下
-			let index = this.tabCurrentIndex;
-			let navItem = this.navList[index];
-			let state = navItem.state;
-			if (source === 'tabChange' && navItem.loaded === true) {
-				//tab切换只有第一次需要加载数据
-				return;
-			}
-			if (navItem.loadingType === 'loading') {
-				//防止重复加载
-				return;
-			}
-			// 修改当前对象状态为加载中
-			navItem.loadingType = 'loading';
-
-			integrallist(
-				{
-					page: navItem.page,
-					limit: navItem.limit
-				},
-				state
-			)
-				.then(({ data }) => {
-					if (data.length > 0) {
-						navItem.orderList = navItem.orderList.concat(data);
-						navItem.page++;
-					}
-					if (navItem.limit == data.length) {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'more';
-						return;
-					} else {
-						//判断是否还有数据, 有改为 more, 没有改为noMore
-						navItem.loadingType = 'noMore';
-					}
-					uni.hideLoading();
-					this.$set(navItem, 'loaded', true);
-				})
-				.catch(e => {
-					console.log(e);
-				});
-		},
-
-		//swiper 切换
-		changeTab(e) {
-			this.tabCurrentIndex = e.target.current;
-			this.loadData('tabChange');
-		},
-		//顶部tab点击
-		tabClick(index) {
-			this.tabCurrentIndex = index;
-		}
-	}
-};
-</script>
-
-<style lang="scss">
-page {
-	background: #ffffff;
-	height: 100%;
-}
-.navbar {
-	display: flex;
-	height: 40px;
-	padding: 0 5px;
-	background: #fff;
-	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
-	position: relative;
-	z-index: 10;
-	.nav-item {
-		flex: 1;
-		display: flex;
-		justify-content: center;
-		align-items: center;
-		height: 100%;
-		font-size: 15px;
-		color: $font-color-dark;
-		position: relative;
-		&.current {
-			color: $base-color;
-			&:after {
-				content: '';
-				position: absolute;
-				left: 50%;
-				bottom: 0;
-				transform: translateX(-50%);
-				width: 44px;
-				height: 0;
-				border-bottom: 2px solid $base-color;
-			}
-		}
-	}
-}
-// 列表
-
-.swiper-box {
-	height: calc(100% - 44px);
-	padding-top: 10rpx;
-	.order-item {
-		padding: 20rpx 30rpx;
-		line-height: 1.5;
-		.title-box {
-			.title {
-				font-size: $font-lg;
-				color: $font-color-base;
-			}
-			.time {
-				font-size: $font-base;
-				color: $font-color-light;
-			}
-		}
-		.money {
-			color: #fd5b23;
-			font-size: $font-lg;
-		}
-	}
-}
-.list-scroll-content {
-	height: 100%;
-}
-.content {
-	height: 100%;
-	.empty-content {
-		background-color: #ffffff;
-	}
-}
-</style>

+ 108 - 248
pages/user/shareQrCode.vue

@@ -1,283 +1,143 @@
 <template>
-	<view class="content">
-		<!-- <view class="qrimg">
-			<tki-qrcode
-				:cid="cid"
-				ref="qrcode"
-				:val="val"
-				:size="size"
-				:unit="unit"
-				:background="background"
-				:foreground="foreground"
-				:pdground="pdground"
-				:icon="icon"
-				:iconSize="iconSize"
-				:lv="lv"
-				:onval="onval"
-				:loadMake="loadMake"
-				:usingComponents="usingComponents"
-				@result="qrR"
-			/>
-		</view> -->
-		<!-- #ifndef MP-ALIPAY -->
-		<canvas :class="{ qrimg: !loading }" @longtap="alertCanv" id="qrShareBox" canvas-id="qrShareBox" class="tki-qrcode-canvas" />
-		<!-- #endif -->
-		<!-- #ifdef MP-ALIPAY -->
-		<canvas :class="{ qrimg: !loading }" @longtap="alertCanv" id="qrShareBox" class="tki-qrcode-canvas" />
-		<!-- #endif -->
-		<view :style="{ display: loading ? 'none' : 'block' }" class="tki-qrcode-canvas"><image :src="ctxSrc" mode="scaleToFill" class="tki-qrcode-canvas"></image></view>
-		<view class="share-bottom flex" :class="{ 'action-share-bottom': !loading }" @click="loading ? showImg() : ''">
-			<text>{{ loading ? '点击生成图片' : '长按二维码下载' }}</text>
-		</view>
+	<view class="container">
+		<image @longtap="bc_code" class="backImg" :src="backImg"></image>
+		<view class="tki-qrcode"><canvas @longtap="bc_code" canvas-id="qrcode" /></view>
 	</view>
 </template>
 
 <script>
-// import tkiQrcode from '@/components/tki-qrcode/tki-qrcode.vue';
 import { spreadBanner } from '@/api/user.js';
 export default {
 	// components: { tkiQrcode },
 	data() {
 		return {
-			cid: 'tki-qrcode-canvas', //canvasId,页面存在多个二维码组件时需设置不同的ID
-			size: 180, //生成的二维码大小
-			unit: 'upx', //大小单位尺寸
-			// show: true,//默认使用组件中的image标签显示二维码
-			val: '', //要生成的内容
-			background: '#ffffff', //二维码背景色
-			foreground: '#333333', //二维码前景色
-			pdground: '#333333', //二维码角标色
-			icon: '', //二维码图标URL(必须是本地图片,网络图需要先下载至本地)
-			iconSize: 40, //二维码图标大小
-			lv: 3, //容错级别
-			onval: false, //监听val值变化自动重新生成二维码
-			loadMake: false, //组件初始化完成后自动生成二维码,val需要有值
-			usingComponents: false, //是否使用了自定义组件模式(主要是为了修复非自定义组件模式时 v-if 无法生成二维码的问题)
-			showLoading: false, //是否显示loading
-			loadingText: '二维码生成中', //loading文字
-			src: '', // 二维码生成后的图片地址或base64
-			ratio: 1, //页面比例用于计算
-			ctxSrc: '', //要显示的图片
-			loading: true,//是否载入图片中
-			canHeight: '',//画布高度
-			canWeidth: ''//画布宽度
+			url: '',
+			backImg: '',
+			userInfo: ''
 		};
 	},
 	onLoad() {
-		this.loadCodeList()
+		this.spread();
 	},
-	onReady() {
-		let obj = this;
-		let query = uni.createSelectorQuery();
-		// 获取页面比例
-		query
-			.select('.content')
-			.fields(
-				{
-					size: true
-				},
-				e => {
-					// 保存比例
-					this.ratio = e.width / 750;
-				}
-			)
-			.exec();
-		// 获取画布宽高信息
-		query
-			.select('#qrShareBox')
-			.fields(
-				{
-					size: true
-				},
-				e => {
-					// 保存画布宽高信息
-					obj.canHeight = e.height;
-					obj.canWeidth = e.width;
-				}
-			)
-			.exec();
+	computed: {
+		cpSize() {
+			if (this.unit == 'upx') {
+				return uni.upx2px(this.size);
+			} else {
+				return this.size;
+			}
+		}
 	},
 	methods: {
-		loadCodeList() {
-			// 加载二维码信息
+		spread() {
+			uni.showLoading({
+				title: '加载中'
+			});
+			let obj = this;
 			spreadBanner({
-				// #ifdef H5
+				//#ifdef H5
 				type: 2,
-				// #endif
-				// #ifdef MP
-				type: 1
-				// #endif
-			}).then(e => {
-				console.log(e);
-				// #ifdef MP
-				// 保存二维码图片
-				uni.downloadFile({
-					url: e.data[0].wap_posterQr,
-					success(res) {
-						if (res.errMsg == 'downloadFile:ok') {
-							obj.src = res.tempFilePath;
-							// 生成画布
-							obj.loadImg(obj.src);
-							uni.hideLoading();
-						}
-						console.log(res);
-					},
-					fail(e) {
-						console.log(e);
-					}
-				})
-				// #endif
-				// #ifdef H5
-					// 保存二维码图片
-					this.src =  e.data[0].wap_posterQr;
-					// 生成画布
-					this.loadImg(e.data[0].wap_posterQr);
-				// #endif
-				
-			}).catch((e) => {
-					uni.showModal({
-						title: '生成失败请刷新页面',
-						showCancel: false
-					});
-					uni.hideLoading();
-				});;
-		},
-		// 长按画布事件
-		alertCanv() {
-			uni.showModal({
-				title: '请先点击生成图片再下载',
-				showCancel: false
+				//#endif
+				//#ifdef MP
+				type: 1,
+				//#endif
+				//#ifdef APP-PLUS
+				type: 2
+				//#endif
+			}).then(({ data }) => {
+				console.log(data);
+				//#ifdef MP
+				obj.backImg = data[0].poster;
+				//#endif
+				//#ifdef H5
+				obj.backImg = data[0].wap_poster;
+				//#endif
+				//#ifdef APP-PLUS
+				obj.backImg = data[0].wap_poster;
+				//#endif
+				uni.hideLoading();
 			});
 		},
-		// 生成图片
-		showImg() {
-			uni.showLoading({
-				title: '图片生成中',
-				mask: true
-			});
-			let obj = this;
-			//因为和uni.showLoading载入效果冲突需要延迟执行生成图片方法
-			setTimeout(function() {
-				uni.canvasToTempFilePath({
-					x: 0,
-					y: 0,
-					width: obj.canWeidth,
-					height: obj.canHeight,
-					destWidth: obj.canWeidth,
-					destHeight: obj.canHeight,
-					fileType: 'jpg',
-					quality: 1,
-					canvasId: 'qrShareBox',
-					success: res => {
-						uni.hideLoading();
-						uni.showModal({
-							title: '创建成功,长按二维码下载图片',
-							showCancel: false
+		bc_code() {
+			let that = this;
+			console.log('保存二维码', this.backImg);
+			uni.downloadFile({
+				//获得二维码的临时地址
+				url: this.backImg,
+				success: res => {
+					//console.log('获取url',res)
+					if (res.statusCode == 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath, //传入临时地址
+							success() {
+								that.$api.msg('保存成功'); //封装的提示
+							},
+							fail() {
+								that.$api.msg('保存失败');
+							}
 						});
-						// 显示生成的图片
-						obj.loading = false;
-						// 保存图片base64
-						obj.ctxSrc = res.tempFilePath;
-					},
-					fail(e) {
-						console.log(e);
 					}
-				});
-			}, 50);
-		},
-		// 开始渲染画布
-		loadImg(src) {
-			const obj = this;
-			const cavWidth=523;//画布宽度
-			const cavHeight=700;//画布高度
-			const ratio = obj.ratio;//获取页面比例
-			const ctxBg = '/static/img/img14.jpg'; //画布背景
-			let context = uni.createCanvasContext('qrShareBox');
-			const codeSize = obj.size * ratio; //计算二维码大小
-			const codeX = ((cavWidth - obj.size) * ratio) / 2; //二维码所在x轴位置
-			const codeY = cavHeight * ratio; //二维码所在y轴位置
-			const codeBoxColor = '#FFFFFF'; //包裹框颜色
-			const codeBoxWidht = 0; //包裹边框宽度
-			const codeBoxSize = (codeBoxWidht / 2) * ratio; //计算二维码白色包裹框大小
-			const codeBoxX = codeX - codeBoxSize; //包裹框初始X轴
-			const codeBoxY = codeY - codeBoxSize; //包裹框初始Y轴
-			const codeBoxEnd = codeSize + codeBoxWidht * ratio; //计算包裹框大小
-			const fontTop = codeY + codeBoxEnd + (codeBoxWidht + 20) * this.ratio; //文字距离上边距高度
-			const fontSize = 24 * ratio; //文字大小
-			const fontText = ''; //文字内容
-			const fontLeft = (codeSize - fontSize * fontText.length) / 2 + codeX; //文字左侧距离
-			// 插入背景图片
-			context.drawImage(ctxBg, 0, 0, obj.canWeidth, obj.canHeight);
-			// // 插入文字
-			context.setFontSize(fontSize);
-			context.fillText(fontText, fontLeft, fontTop);
-			// 插入边框
-			context.beginPath();//开始画线
-			context.setLineJoin('round'); //边框类型
-			context.setLineWidth(codeBoxWidht * ratio);
-			context.setStrokeStyle(codeBoxColor); //设置包裹框颜色
-			context.strokeRect(codeBoxX, codeBoxY, codeBoxEnd, codeBoxEnd);
-			context.stroke();//渲染线条
-			// 插入二维码
-			context.drawImage(src, codeX, codeY, codeSize, codeSize);
-			// 开始渲染
-			context.draw();
-		},
-		// 創建二维码
-		creatQrcode() {
-			this.$refs.qrcode._makeCode();
-		},
-		// 保存二维码到图库
-		saveQrcode() {
-			this.$refs.qrcode._saveCode();
-		},
-		// 生成二维码后返回base64
-		qrR(res) {
-			this.src = res;
-		},
-		//清空二维码(清空二维码会触发result回调 返回值为空)
-		clearQrcode(e) {
-			this.$refs.qrcode._clearCode();
-			this.val = '';
+				}
+			});
 		}
 	}
 };
 </script>
 
 <style lang="scss">
-.content {
-	padding-top: 30rpx;
+page {
+	width: 100%;
+	min-height: 100%;
+	.container {
+		width: 100%;
+		height: 100%;
+	}
 }
-// #qrShareBox {
-// 	position: absolute;
-// 	left: -9999rpx;
-// 	top: -9999rpx;
-// }
-
-.qrimg {
+.backImg {
 	position: absolute;
-	left: -9999rpx;
-	top: -9999rpx;
+	width: 100%;
+	height: 100%;
+}
+.portrait {
+	width: 100%;
+	text-align: center;
+	padding-top: 80rpx;
+	padding-bottom: 30rpx;
+	image {
+		width: 250rpx;
+		height: 250rpx;
+	}
 }
-.tki-qrcode-canvas {
-	// width: 700rpx;
-	// height: 1245rpx;
-	width: 532rpx;
-	height: 945rpx;
-	margin: 0 auto;
+.text {
+	text-align: center;
+	width: 100%;
+	color: #ffffff;
+	font-size: 55rpx;
+	letter-spacing: 15rpx;
 }
-.share-bottom {
-	width: 560rpx;
-	height: 80rpx;
+.uid-name {
+	padding: 50rpx 0rpx;
+	text-align: center;
+	width: 100%;
 	color: #ffffff;
-	background-color: $base-color;
-	margin: 0 auto;
-	font-size: $font-lg - 2rpx;
-	margin-top: 30rpx;
-	border-radius: 99rpx;
-	justify-content: center;
-	&.action-share-bottom {
-		background-color: $color-gray;
-	}
+}
+.copy-btn {
+	color: #ffffff;
+	background-color: #4ba6ed;
+	border-radius: 50rpx;
+	width: 170rpx;
+	line-height: 70rpx;
+	margin: 0rpx auto;
+	text-align: center;
+}
+.tki-qrcode {
+	position: fixed;
+	bottom: 10%;
+	left: 30%;
+}
+canvas {
+	width: 150px;
+	height: 150px;
+	margin: auto;
 }
 </style>

+ 330 - 413
pages/user/user.vue

@@ -2,289 +2,212 @@
 	<view class="container">
 		<!-- <view class="vheigh"></view> -->
 		<view class="top">
-			<view class="bg">
-				<image src="../../static/img/userBg.png" mode=""></image>
-			</view>
-			<view class="set">
-				<image src="../../static/icon/set.png" mode=""></image>
-			</view>
+			<view class="bg"><image src="../../static/img/userBg.png" mode=""></image></view>
+			<view class="set" @click="navTo('/pages/set/userinfo')"><image src="../../static/icon/set.png" mode=""></image></view>
 		</view>
 		<view class="userInfo-box">
-			<view class="avatar">
-				<image src="../../static/icon/fire.png" mode=""></image>
-			</view>
-			<view class="name">
-				李丹丹
-			</view>
+			<view class="avatar"><image :src="userInfo.avatar || '/static/error/missing-face.png'" mode=""></image></view>
+			<view class="name">{{ userInfo.nickname || '游客' }}</view>
 			<view class="myId">
-				会员编号:12010 <text class="xian"></text> 推荐人:李丹丹
-			</view>
-			<view class="shareId">
-				推荐人编号:12010
+				会员编号:{{ userInfo.uid || '游客' }}
+				<!-- <text class="xian"></text> -->
+				<!-- 推荐人:{{李丹丹}} -->
 			</view>
+			<view class="shareId" v-if="userInfo.spread_uid && userInfo.spread_uid != 0">推荐人编号:{{ userInfo.spread_uid }}</view>
 		</view>
 		<view class="czzx-box flex">
 			<view class="czzx-item">
-				<view class="czzx-icon1">
-					<image src="../../static/icon/czzx.png" mode=""></image>
-				</view>
+				<view class="czzx-icon1"><image src="../../static/icon/czzx.png" mode=""></image></view>
 			</view>
 			<view class="czzx-xian"></view>
-			<view class="czzx-item">
-				<view class="czzx-icon2">
-					<image src="../../static/icon/user1.png" mode=""></image>
-				</view>
-				<view class="czzx-font">
-					草稿箱
-				</view>
+			<view class="czzx-item" @click="navTo('/pages/user/creation?id=0')">
+				<view class="czzx-icon2"><image src="../../static/icon/user1.png" mode=""></image></view>
+				<view class="czzx-font">草稿箱</view>
 			</view>
-			<view class="czzx-item">
-				<view class="czzx-icon3">
-					<image src="../../static/icon/user2.png" mode=""></image>
-				</view>
-				<view class="czzx-font">
-					审核中
-				</view>
+			<view class="czzx-item" @click="navTo('/pages/user/creation?id=2')">
+				<view class="czzx-icon3"><image src="../../static/icon/user2.png" mode=""></image></view>
+				<view class="czzx-font">审核中</view>
 			</view>
-			<view class="czzx-item">
-				<view class="czzx-icon4">
-					<image src="../../static/icon/user3.png" mode=""></image>
-				</view>
-				<view class="czzx-font">
-					已审核
-				</view>
+			<view class="czzx-item" @click="navTo('/pages/user/creation?id=1')">
+				<view class="czzx-icon4"><image src="../../static/icon/user3.png" mode=""></image></view>
+				<view class="czzx-font">已审核</view>
 			</view>
 		</view>
 		<view class="box">
 			<view class="box-title flex">
-				<view class="box-title-left">
-					我的订单
-				</view>
-				<view class="box-title-right flex">
-					<view class="box-title-right-font">
-						全部
-					</view>
-					<view class="jt">
-						<image src="../../static/icon/jt.png" mode=""></image>
-					</view>
+				<view class="box-title-left">我的订单</view>
+				<view class="box-title-right flex" @click="navTo('/pages/order/order?state=0')">
+					<view class="box-title-right-font">全部</view>
+					<view class="jt"><image src="../../static/icon/jt.png" mode=""></image></view>
 				</view>
 			</view>
 			<view class="box-main flex">
-				<view class="box-main-item">
-					<view class="box-main-item-icon1">
-						<image src="../../static/icon/user4.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						待付款
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/order/order?state=0')">
+					<view class="box-main-item-icon1"><image src="../../static/icon/user4.png" mode=""></image></view>
+					<view class="box-main-item-font">待付款</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon2">
-						<image src="../../static/icon/user5.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						待发货
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/order/order?state=1')">
+					<view class="box-main-item-icon2"><image src="../../static/icon/user5.png" mode=""></image></view>
+					<view class="box-main-item-font">待发货</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon3">
-						<image src="../../static/icon/user6.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						待收获
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/order/order?state=2')">
+					<view class="box-main-item-icon3"><image src="../../static/icon/user6.png" mode=""></image></view>
+					<view class="box-main-item-font">待收货</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon4">
-						<image src="../../static/icon/user7.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						已完成
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/order/order?state=3')">
+					<view class="box-main-item-icon4"><image src="../../static/icon/user7.png" mode=""></image></view>
+					<view class="box-main-item-font">已完成</view>
 				</view>
 			</view>
 		</view>
 		<view class="box">
-			<view class="box-title flex">
-				<view class="box-title-left">
-					我的应用
-				</view>
-			</view>
+			<view class="box-title flex"><view class="box-title-left">我的应用</view></view>
 			<view class="box-main flex">
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user8.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						我的优惠券
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/user/coupon')">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user8.png" mode=""></image></view>
+					<view class="box-main-item-font">我的优惠券</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user9.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						购物车
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/cart/cart')">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user9.png" mode=""></image></view>
+					<view class="box-main-item-font">购物车</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user10.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						收货地址
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/set/address')">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user10.png" mode=""></image></view>
+					<view class="box-main-item-font">收货地址</view>
 				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user11.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						新品提醒
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/index/coupon')">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user11.png" mode=""></image></view>
+					<view class="box-main-item-font">优惠券列表</view>
 				</view>
 			</view>
 		</view>
 		<view class="box">
-			<view class="box-title flex">
-				<view class="box-title-left">
-					更多服务
-				</view>
-			</view>
+			<view class="box-title flex"><view class="box-title-left">更多服务</view></view>
 			<view class="box-main flex">
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user12.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						直播广场
-					</view>
-				</view>
-				<view class="box-main-item">
-					<view class="box-main-item-icon5">
-						<image src="../../static/icon/user13.png" mode=""></image>
-					</view>
-					<view class="box-main-item-font">
-						主播入口
-					</view>
+				<view class="box-main-item" @click="navTo('/pages/user/living')">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user12.png" mode=""></image></view>
+					<view class="box-main-item-font">直播广场</view>
 				</view>
+				<!-- <view class="box-main-item">
+					<view class="box-main-item-icon5"><image src="../../static/icon/user13.png" mode=""></image></view>
+					<view class="box-main-item-font">主播入口</view>
+				</view> -->
 			</view>
 		</view>
 	</view>
 </template>
 <script>
-	import {
-		mapState,
-		mapMutations
-	} from 'vuex';
-	import uniList from '@/components/uni-list/uni-list.vue';
-	import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
-	import {
-		orderData,
-		getUserInfo
-	} from '@/api/user.js';
-	import {
-		saveUrl,
-		interceptor
-	} from '@/utils/loginUtils.js';
-	export default {
-		data() {
-			return {};
+import { mapState, mapMutations } from 'vuex';
+import uniList from '@/components/uni-list/uni-list.vue';
+import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+import { orderData, getUserInfo } from '@/api/user.js';
+import { saveUrl, interceptor } from '@/utils/loginUtils.js';
+export default {
+	data() {
+		return {};
+	},
+	onShow() {
+		// 判断是否已经登录
+		if (this.hasLogin) {
+			this.loadBaseData();
+		}
+	},
+	computed: {
+		...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
+	},
+	methods: {
+		...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
+		// 加载初始数据
+		loadBaseData() {
+			getUserInfo({})
+				.then(({ data }) => {
+					this.setUserInfo(data);
+					// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
+					orderData({})
+						.then(({ data }) => {
+							this.setOrderInfo(data);
+						})
+						.catch(e => {
+							this.setOrderInfo({
+								complete_count: 0, //完成
+								received_count: 0, //待收货
+								unshipped_count: 0, //待发货
+								order_count: 0, //订单总数
+								unpaid_count: 0 //待付款
+							});
+						});
+				})
+				.catch(e => {
+					console.log(e);
+				});
 		},
-		onShow() {
-			// 判断是否已经登录
-			if (this.hasLogin) {
-				this.loadBaseData();
+		/**
+		 * 统一跳转接口,拦截未登录路由
+		 * navigator标签现在默认没有转场动画,所以用view
+		 */
+		navTo(url) {
+			if (!this.hasLogin) {
+				// 保存地址
+				saveUrl();
+				// 登录拦截
+				interceptor();
+			} else {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						});
+					}
+				});
 			}
-		},
-		computed: {
-			...mapState('user', ['userInfo', 'orderInfo', 'hasLogin'])
-		},
-		methods: {
-			...mapMutations('user', ['setUserInfo', 'setOrderInfo']),
-			// 加载初始数据
-			loadBaseData() {
-				getUserInfo({})
-					.then(({
-						data
-					}) => {
-						this.setUserInfo(data);
-						// 获取用户数据完毕后在获取订单数据防止多次跳转到登录页
-						orderData({})
-							.then(({
-								data
-							}) => {
-								this.setOrderInfo(data);
-							})
-							.catch(e => {
-								this.setOrderInfo({
-									complete_count: 0, //完成
-									received_count: 0, //待收货
-									unshipped_count: 0, //待发货
-									order_count: 0, //订单总数
-									unpaid_count: 0 //待付款
-								});
-							});
-					})
-					.catch(e => {
-						console.log(e);
-					});
-			},
-			/**
-			 * 统一跳转接口,拦截未登录路由
-			 * navigator标签现在默认没有转场动画,所以用view
-			 */
-			navTo(url) {
-				if (!this.hasLogin) {
-					// 保存地址
-					saveUrl();
-					// 登录拦截
-					interceptor();
-				} else {
-					uni.navigateTo({
-						url
-					});
-				}
-			},
-
 		}
-	};
+	}
+};
 </script>
 <style lang="scss">
-	page {
-		height: 100%;
-	}
-
-	%flex-center {
-		display: flex;
-		flex-direction: column;
-		justify-content: center;
-		align-items: center;
-	}
-
-	%section {
-		display: flex;
-		justify-content: space-around;
-		align-content: center;
-		background: #fff;
-		border-radius: 10rpx;
-	}
-
-	.container {
-		height: 100%;
-		background-color: $page-color-base;
-	}
-
-	.content-box {
-		height: 100%;
-	}
-
-	.vheigh {
-		height: var(--status-bar-height);
-		background-color: #ffffff;
-	}
-
-	.top {
+page {
+	height: 100%;
+}
+
+%flex-center {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+}
+
+%section {
+	display: flex;
+	justify-content: space-around;
+	align-content: center;
+	background: #fff;
+	border-radius: 10rpx;
+}
+
+.container {
+	height: 100%;
+	background-color: $page-color-base;
+}
+
+.content-box {
+	height: 100%;
+}
+
+.vheigh {
+	height: var(--status-bar-height);
+	background-color: #ffffff;
+}
+
+.top {
+	position: absolute;
+	top: 0;
+	left: 0;
+	right: 0;
+	width: 750rpx;
+	height: 224rpx;
+
+	.bg {
 		position: absolute;
 		top: 0;
 		left: 0;
@@ -292,235 +215,229 @@
 		width: 750rpx;
 		height: 224rpx;
 
-		.bg {
-			position: absolute;
-			top: 0;
-			left: 0;
-			right: 0;
-			width: 750rpx;
-			height: 224rpx;
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
 
-			image {
-				width: 100%;
-				height: 100%;
-			}
+	.set {
+		position: absolute;
+		z-index: 2;
+		width: 44rpx;
+		height: 44rpx;
+		top: 96rpx;
+		right: 40rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
 		}
+	}
+}
+
+.userInfo-box {
+	display: flex;
+	flex-direction: column;
+	justify-content: center;
+	align-items: center;
+	padding-top: 117rpx;
+
+	.avatar {
+		position: relative;
+		z-index: 2;
+		width: 130rpx;
+		height: 130rpx;
+		background: #ffffff;
+		border-radius: 50%;
+
+		image {
+			width: 100%;
+			height: 100%;
+			border-radius: 50%;
+		}
+	}
 
-		.set {
-			position: absolute;
-			z-index: 2;
-			width: 44rpx;
-			height: 44rpx;
-			top: 96rpx;
-			right: 40rpx;
+	.name {
+		margin-top: 20rpx;
+		font-size: 34rpx;
+		font-family: PingFang SC;
+		font-weight: 800;
+		color: #000000;
+	}
 
-			image {
-				width: 100%;
-				height: 100%;
-			}
+	.myId {
+		margin-top: 20rpx;
+		font-size: 20rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+
+		.xian {
+			display: inline-block;
+			margin: 0 12rpx;
+			width: 2rpx;
+			height: 20rpx;
+			background: #cbcdcf;
 		}
 	}
 
-	.userInfo-box {
+	.shareId {
+		margin-top: 20rpx;
+		font-size: 20rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #333333;
+	}
+}
+
+.czzx-box {
+	margin: 50rpx auto 0;
+	width: 708rpx;
+	background: #ffffff;
+	border-radius: 5rpx;
+	padding: 28rpx 0 22rpx;
+
+	.czzx-xian {
+		width: 1px;
+		height: 81rpx;
+		background: #ebebeb;
+	}
+
+	.czzx-item {
+		width: 25%;
 		display: flex;
 		flex-direction: column;
 		justify-content: center;
 		align-items: center;
-		padding-top: 117rpx;
 
-		.avatar {
-			width: 130rpx;
-			height: 130rpx;
-			background: #FFFFFF;
-			border-radius: 50%;
+		image {
+			width: 100%;
+			height: 100%;
+		}
 
-			image {
-				width: 100%;
-				height: 100%;
-				border-radius: 50%;
-			}
+		.czzx-icon1 {
+			width: 58rpx;
+			height: 64rpx;
+		}
+
+		.czzx-icon2 {
+			width: 42rpx;
+			height: 42rpx;
+		}
+
+		.czzx-icon3 {
+			width: 44rpx;
+			height: 36rpx;
+		}
+
+		.czzx-icon4 {
+			width: 42rpx;
+			height: 40rpx;
 		}
 
-		.name {
+		.czzx-font {
 			margin-top: 20rpx;
-			font-size: 34rpx;
+			font-size: 22rpx;
 			font-family: PingFang SC;
-			font-weight: 800;
+			font-weight: 500;
 			color: #000000;
 		}
+	}
+}
 
-		.myId {
-			margin-top: 20rpx;
-			font-size: 20rpx;
+.box {
+	margin: 20rpx auto 0;
+	width: 708rpx;
+	background: #ffffff;
+	border-radius: 5rpx;
+
+	.box-title {
+		padding: 27rpx 36rpx 20rpx 28rpx;
+		border-bottom: 1px solid #f5f5f5;
+
+		.box-title-left {
+			font-size: 28rpx;
 			font-family: PingFang SC;
-			font-weight: 500;
+			font-weight: bold;
 			color: #333333;
+		}
 
-			.xian {
-				display: inline-block;
-				margin: 0 12rpx;
-				width: 2rpx;
-				height: 20rpx;
-				background: #CBCDCF;
+		.box-title-right {
+			justify-content: flex-end;
+			align-items: center;
+
+			.box-title-right-font {
+				font-size: 26rpx;
+				font-family: SourceHanSansCN;
+				font-weight: 400;
+				color: #666666;
+				margin-right: 14rpx;
 			}
-		}
 
-		.shareId {
-			margin-top: 20rpx;
-			font-size: 20rpx;
-			font-family: PingFang SC;
-			font-weight: 500;
-			color: #333333;
+			.jt {
+				position: relative;
+				top: -12rpx;
+				width: 12rpx;
+				height: 22rpx;
+
+				image {
+					width: 100%;
+					height: 100%;
+				}
+			}
 		}
 	}
 
-	.czzx-box {
-		margin: 50rpx auto 0;
-		width: 708rpx;
-		background: #FFFFFF;
-		border-radius: 5rpx;
-		padding: 28rpx 0 22rpx;
-
-		.czzx-xian {
-			width: 1px;
-			height: 81rpx;
-			background: #EBEBEB;
-		}
+	.box-main {
+		padding: 34rpx 0 30rpx;
+		justify-content: start;
 
-		.czzx-item {
+		.box-main-item {
 			width: 25%;
 			display: flex;
 			flex-direction: column;
-			justify-content: center;
 			align-items: center;
+			justify-content: center;
 
 			image {
 				width: 100%;
 				height: 100%;
 			}
 
-			.czzx-icon1 {
-				width: 58rpx;
-				height: 64rpx;
-			}
-
-			.czzx-icon2 {
+			.box-main-item-icon1 {
 				width: 42rpx;
-				height: 42rpx;
+				height: 38rpx;
 			}
 
-			.czzx-icon3 {
-				width: 44rpx;
-				height: 36rpx;
+			.box-main-item-icon2 {
+				width: 47rpx;
+				height: 40rpx;
 			}
 
-			.czzx-icon4 {
+			.box-main-item-icon3 {
 				width: 42rpx;
 				height: 40rpx;
 			}
 
-			.czzx-font {
-				margin-top: 20rpx;
-				font-size: 22rpx;
-				font-family: PingFang SC;
-				font-weight: 500;
-				color: #000000;
+			.box-main-item-icon4 {
+				width: 42rpx;
+				height: 42rpx;
 			}
-		}
-	}
-
-	.box {
-		margin: 20rpx auto 0;
-		width: 708rpx;
-		background: #FFFFFF;
-		border-radius: 5rpx;
 
-		.box-title {
-			padding: 27rpx 36rpx 20rpx 28rpx;
-			border-bottom: 1px solid #F5F5F5;
+			.box-main-item-icon5 {
+				width: 70rpx;
+				height: 70rpx;
+			}
 
-			.box-title-left {
-				font-size: 28rpx;
+			.box-main-item-font {
+				margin-top: 23rpx;
+				font-size: 24rpx;
 				font-family: PingFang SC;
-				font-weight: bold;
+				font-weight: 500;
 				color: #333333;
 			}
-
-			.box-title-right {
-				justify-content: flex-end;
-				align-items: center;
-
-				.box-title-right-font {
-					font-size: 26rpx;
-					font-family: SourceHanSansCN;
-					font-weight: 400;
-					color: #666666;
-					margin-right: 14rpx;
-				}
-
-				.jt {
-					position: relative;
-					top: -6rpx;
-					width: 12rpx;
-					height: 22rpx;
-
-					image {
-						width: 100%;
-						height: 100%;
-					}
-				}
-			}
-		}
-
-		.box-main {
-			padding: 34rpx 0 30rpx;
-			justify-content: start;
-
-			.box-main-item {
-				width: 25%;
-				display: flex;
-				flex-direction: column;
-				align-items: center;
-				justify-content: center;
-
-				image {
-					width: 100%;
-					height: 100%;
-				}
-
-				.box-main-item-icon1 {
-					width: 42rpx;
-					height: 38rpx;
-				}
-
-				.box-main-item-icon2 {
-					width: 47rpx;
-					height: 40rpx;
-				}
-
-				.box-main-item-icon3 {
-					width: 42rpx;
-					height: 40rpx;
-				}
-
-				.box-main-item-icon4 {
-					width: 42rpx;
-					height: 42rpx;
-				}
-
-				.box-main-item-icon5 {
-					width: 70rpx;
-					height: 70rpx;
-				}
-
-				.box-main-item-font {
-					margin-top: 23rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC;
-					font-weight: 500;
-					color: #333333;
-				}
-			}
 		}
 	}
+}
 </style>

+ 0 - 321
pages/user/withdrawal.vue

@@ -1,321 +0,0 @@
-<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>
-		<!-- #ifndef MP-WEIXIN -->
-		<view class="list" v-if="!weichatBsrowser">
-			<radio-group @change="tabRadio">
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconweixin1"></view>
-						<view class="title-box">
-							<view class="title"><text>提现至微信</text></view>
-						</view>
-						<view class="right"><radio value="weixin" color="#5dbc7c" :checked="type == 'weixin'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont iconzhifubao"></view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="aliData.fullname">提现至支付宝</text>
-								<text v-else>请创建支付宝账号</text>
-							</view>
-							<view class="node">
-								<text v-if="aliData.fullname">真实姓名({{ aliData.fullname }})</text>
-							</view>
-						</view>
-						<view class="right"><radio value="alipay" color="#5dbc7c" :checked="type == 'alipay'" /></view>
-					</view>
-				</label>
-				<label>
-					<view class="box">
-						<view class="icon iconfont"><image class="icon-img" src="/static/icon/i8.png" mode="aspectFit"></image></view>
-						<view class="title-box">
-							<view class="title">
-								<text v-if="bankData.bankno">{{ bankData.bank + ' ' + bankData.bankno }}</text>
-								<text v-else>请创建银行账号</text>
-							</view>
-							<view class="node">
-								<text v-if="bankData.fullname">真实姓名({{ bankData.fullname }})</text>
-							</view>
-						</view>
-						<view class="right"><radio value="bank" color="#5dbc7c" :checked="type == 'bank'" /></view>
-					</view>
-				</label>
-			</radio-group>
-		</view>
-		<!-- #endif -->
-		<button class="add-btn up" @click="confirm">提交申请</button>
-		<button class="add-btn modified" v-if="!weichatBsrowser" @click="navTo('/pages/money/account')">账号管理</button>
-	</view>
-</template>
-
-<script>
-import { getMoneyStyle } from '@/utils/rocessor.js';
-import { extractCash, extractBank, aliInfo, bankInfo } from '@/api/wallet.js';
-import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue';
-export default {
-	filters: {
-		getMoneyStyle
-	},
-	components: {
-		uniNoticeBar
-	},
-	data() {
-		return {
-			type: 'weixin', //提现方式
-			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>

+ 418 - 0
pages/zc/plDetail.vue

@@ -0,0 +1,418 @@
+<template>
+	<view class="content">
+		<view class="top"><image :src="info.main_pic || ''" mode="widthFix"></image></view>
+		<view class="title">{{ info.title || '' }}</view>
+		<view class="tip">{{ info.comment || '' }}</view>
+		<view class="main" v-for="(ls, index) in info.pics" :key="index"><image :src="ls" mode="widthFix"></image></view>
+		<view class="navbar flex">
+			<view class="navbar-item" @click.stop="shareLink()">
+				<view class="navbar-icon"><image src="../../static/icon/sharejt.png" mode=""></image></view>
+				<view class="navbar-font">分享</view>
+			</view>
+			<view class="xian"></view>
+			<view class="navbar-item" @click.stop="wzdz()">
+				<view class="navbar-icon" v-if="info.user_good == 1"><image src="../../static/icon/zanguo.png" mode=""></image></view>
+				<view class="navbar-icon" v-else><image src="../../static/icon/zan.png" mode=""></image></view>
+				<view class="navbar-font">{{ info.goods_count }}</view>
+			</view>
+		</view>
+		<view v-if="shareShow" class="Shraremask" @click="cancel">
+			<view class="mask-content">
+				<scroll-view class="view-content" scroll-y>
+					<view class="share-header">分享到</view>
+					<view class="share-list">
+						<view class="share-item">
+							<button class="wechat-box" open-type="share">
+								<image class="itemImage" src="../../static/icon/share1.png" mode=""></image>
+								<text class="itemText">微信好友</text>
+							</button>
+							<view class="wechat-box" @click="navTo('/pages/zc/plshare?id=' + id)">
+								<image class="itemImage" src="../../static/icon/share2.png" mode=""></image>
+								<text class="itemText">朋友圈</text>
+							</view>
+							<view class="wechat-box" @click="copy()">
+								<image class="itemImage" src="../../static/icon/share3.png" mode=""></image>
+								<text class="itemText">复制链接</text>
+							</view>
+							<view class="wechat-box" @click="shareToFriend()">
+								<image class="itemImage" src="../../static/icon/share4.png" mode=""></image>
+								<text class="itemText">生成海报</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="bottomButtom b-t" @click="cancel">取消</view>
+			</view>
+		</view>
+		<uni-popup ref="popupshare" type="center">
+			<view class="share-box"><image :src="shareImage" mode="" class="box-img" @longpress="saveImg()"></image></view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+import { reply_detail, reply_good, short_link, reply_poster } from '@/api/activity.js';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	data() {
+		return { id: '', info: {}, shareShow: false, shareImage: '' };
+	},
+	onLoad(option) {
+		if (option.id) {
+			this.id = option.id;
+		}
+		// #ifdef MP
+		if (option.scene) {
+			if (typeof option.scene == 'string') {
+				// let scene = ('{' + option.scene + "}").replace('qr%26', '').replace(/%3D/g, ':').replace(/%26/g, ',')
+				// 	.replace('id', '\"id\"').replace('pid', '\"pid\"');
+				let scene = ('{' + option.scene + '}')
+					.replace('qr%26', '')
+					.replace(/%3D/g, ':')
+					.replace(/%26/g, ',')
+					.replace('id', '"id"')
+					.replace('pid', '"pid"')
+					.replace(/=/g, ':')
+					.replace(/&/g, ',');
+				console.log(scene, 'scene');
+				let opt = JSON.parse(scene);
+				console.log(opt);
+				// 保存拼团订单id
+				this.id = opt.id;
+				if (opt.pid) {
+					// 存储邀请人
+					this.spread = opt.pid;
+					uni.setStorageSync('spread', opt.pid);
+				}
+			}
+		}
+		// #endif
+	},
+	onShow() {
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady() {},
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		console.log(this.share);
+		if (res.from === 'button') {
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			// 保存邀请人
+			let data = {
+				path: path,
+				imageUrl: this.info.share_images[0],
+				title: this.info.title
+			};
+			console.log('data', data);
+			return data;
+		}
+	},
+	// #endif
+	methods: {
+		loadData() {
+			reply_detail({}, this.id).then(({ data }) => {
+				this.info = data;
+			});
+		},
+		// 文章点赞
+		wzdz() {
+			reply_good({}, this.id).then(e => {
+				if (this.info.user_good == 0) {
+					this.info.user_good = 1;
+					this.info.goods_count += 1;
+				} else {
+					this.info.user_good = 0;
+					this.info.goods_count -= 1;
+				}
+			});
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		shareLink(item) {
+			console.log('dainjideniang');
+			this.shareShow = true;
+		},
+		shareToFriend() {
+			let obj = this;
+			uni.showLoading({
+				title: 'Loading...',
+				mask: true
+			});
+			reply_poster({}, this.id)
+				.then(({ data }) => {
+					obj.shareImage = data.url;
+					console.log(obj.shareImage, '123456');
+					uni.hideLoading();
+					this.$refs.popupshare.open();
+				})
+				.catch(e => {
+					uni.hideLoading();
+				});
+		},
+		copy() {
+			short_link({ url: 'pages/zc/plDetail?id=' + this.id }).then(({ data }) => {
+				console.log(data);
+				this.comfirm(data.link);
+			});
+		},
+		comfirm(text) {
+			console.log(text);
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		//取消分享
+		cancel() {
+			this.shareShow = false;
+		},
+		saveImg(w) {
+			console.log(w);
+			let obj = this;
+			uni.downloadFile({
+				//下载图片
+				url: obj.shareImage,
+				success: res => {
+					console.log(res.tempFilePath);
+					uni.saveImageToPhotosAlbum({
+						//将图片保存在手机
+						filePath: res.tempFilePath, //保存的位置
+						success: res => {
+							uni.showToast({
+								title: '保存成功',
+								icon: 'none'
+							});
+						}
+					});
+				}
+			});
+		},
+		// 富文本视频解析
+		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,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.top {
+	width: 750rpx;
+	image {
+		width: 100%;
+	}
+}
+.title {
+	margin-top: 20rpx;
+	text-align: center;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: 800;
+	color: #303030;
+}
+.tip {
+	margin-top: 20rpx;
+	padding: 0 10rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #969696;
+}
+.main {
+	margin-top: 60rpx;
+	image {
+		width: 750rpx;
+	}
+}
+.navbar {
+	background: #ffffff;
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	width: 750rpx;
+	padding: 50rpx 0;
+	.xian {
+		width: 2px;
+		background: #999999;
+		height: 36rpx;
+	}
+	.navbar-item {
+		width: 50%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.navbar-icon {
+			width: 36rpx;
+			height: 36rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.navbar-font {
+			margin-left: 17rpx;
+			font-size: 22rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
+}
+.Shraremask {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	display: flex;
+	justify-content: center;
+	align-items: flex-end;
+	z-index: 998;
+	transition: 0.3s;
+	background-color: rgba(51, 51, 51, 0.6);
+	.bottomButtom {
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		height: 90rpx;
+		background: #fff;
+		z-index: 9;
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+}
+.mask-content {
+	margin-bottom: 88rpx;
+	width: 100%;
+	height: 380rpx;
+	transition: 0.3s;
+	background: #fff;
+	&.has-bottom {
+		padding-bottom: 90rpx;
+	}
+	.view-content {
+		height: 100%;
+	}
+}
+.share-header {
+	height: 110rpx;
+	font-size: $font-base + 2rpx;
+	color: font-color-dark;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	padding-top: 10rpx;
+	&:before,
+	&:after {
+		content: '';
+		width: 240rpx;
+		height: 0;
+		border-top: 1px solid $border-color-base;
+		transform: scaleY(0.5);
+		margin-right: 30rpx;
+	}
+	&:after {
+		margin-left: 30rpx;
+		margin-right: 0;
+	}
+}
+.share-list {
+	display: flex;
+	width: 80%;
+	margin: 0rpx auto;
+}
+.share-item {
+	min-width: 33.33%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	height: 180rpx;
+	width: 100%;
+	.wechat-box {
+		width: 50%;
+		height: 100%;
+		background: #ffffff;
+		border: 0;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		&::after {
+			border: 0;
+		}
+		.itemImage {
+			width: 80rpx;
+			height: 80rpx;
+			margin-bottom: 16rpx;
+		}
+		.itemText {
+			font-size: $font-base;
+			color: $font-color-base;
+			line-height: 2;
+		}
+	}
+}
+.share-box {
+	width: 600rpx;
+	height: 1000rpx;
+	background: red;
+	.box-img {
+		width: 600rpx;
+		height: 1000rpx;
+	}
+}
+</style>

+ 291 - 0
pages/zc/plshare.vue

@@ -0,0 +1,291 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<view class="title flex">
+				<view class="title-font">分享文案</view>
+				<view class="title-btn" @click="comfirm()">复制文案</view>
+			</view>
+			<view class="box-info">
+				<view class="info-title">{{ info.title }}</view>
+				<view class="info-tip">{{ info.comment }}</view>
+				<view class="info-url">{{ url }}</view>
+			</view>
+			<view class="title flex" style="margin-top: 20rpx;">
+				<view class="title-font">
+					分享素材
+					<text>(已选{{ nowlen }}/{{ alllen }})</text>
+				</view>
+			</view>
+			<view class="image-box">
+				<view class="image-item" v-for="(item, index) in imageBox" @click="change(item)">
+					<image :src="item.url" mode=""></image>
+					<view class="isxuan" v-if="item.isxuan"></view>
+				</view>
+			</view>
+		</view>
+		<view class="btn" @click="onDown()">下载</view>
+	</view>
+</template>
+
+<script>
+import sunuiGrand from '@/components/sunui-grand/sunui-grand.vue';
+import { reply_detail, short_link } from '@/api/activity.js';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	data() {
+		return {
+			info: {},
+			url: '',
+			imageBox: [],
+			alllen: '',
+			nowlen: ''
+		};
+	},
+	components: {
+		sunuiGrand
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+	},
+	onShow() {
+		this.imageBox = [];
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady() {},
+	methods: {
+		loadData() {
+			const obj = this;
+			reply_detail({}, this.id).then(({ data }) => {
+				data.pics.forEach(e => {
+					let u = {
+						isxuan: true,
+						url: e
+					};
+					obj.imageBox.push(u);
+				});
+				this.alllen = obj.imageBox.length;
+				this.nowlen = obj.imageBox.length;
+				this.info = data;
+			});
+			short_link({ url: 'pages/zc/plDetail?id=' + this.id }).then(({ data }) => {
+				console.log(data);
+				this.url = data.link;
+			});
+		},
+		change(opt) {
+			if (opt.isxuan) {
+				opt.isxuan = false;
+				this.nowlen -= 1;
+			} else {
+				opt.isxuan = true;
+				this.nowlen += 1;
+			}
+		},
+		comfirm() {
+			let text = this.info.comment + this.url;
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		onDown() {
+			let that = this;
+			let index = 0;
+			let list = [];
+			that.imageBox.forEach(e => {
+				if (e.isxuan) {
+					list.push(e.url);
+				}
+			});
+			// console.log('触发下载图片');
+			// 第一步,先调用授权功能
+			uni.authorize({
+				scope: 'scope.writePhotosAlbum',
+				success() {
+					// 1 授权成功遍历所有要下载的图片
+					if (list && list.length > 0) {
+						// console.log(that.pathList, '============查看有没有图片数据=============>');
+						let i = 1;
+						list.forEach(item => {
+							// 1.1 调用下载api方法
+							uni.showLoading({
+								title: '下载第' + i + '图片中,共' + list.length + '张'
+							});
+							uni.downloadFile({
+								url: item, // 获取要下载的服务器里的图片地址
+								success: res => {
+									// 1.2 获取远程图片地址后,将图片地址缓存到本地
+									if (res.statusCode === 200) {
+										// console.log(res, '============下载后的图片地址=============>');
+										uni.saveImageToPhotosAlbum({
+											filePath: res.tempFilePath, // 把远程的图片地址及图片保存到本地
+											success: function(res) {
+												// 1.3保存成功后弹框提示保存成功
+												i += 1;
+												uni.showToast({
+													title: '保存成功',
+													icon: 'none'
+												});
+											},
+											fail: function(res) {
+												// console.log(res, '============fail=============>');
+												// 1.4保存失败给用户弹框提示
+												uni.showToast({
+													title: '保存失败',
+													icon: 'none'
+												});
+												if (res.errMsg == 'saveImageToPhotosAlbum:fail cancel') {
+													return;
+												}
+											}
+										});
+									}
+								}
+							});
+						});
+					} else {
+						uni.showToast({
+							title: '暂无数据',
+							icon: 'none'
+						});
+					}
+				},
+				fail() {
+					// 2、授权失败 弹框再次要求授权
+					uni.showModal({
+						title: '您需要授权相册权限',
+						success(res) {
+							// 2.1点击确认按钮就调取授权设置页面
+							if (res.confirm) {
+								// 2.2 开启授权设置页面
+								uni.openSetting({
+									success(res) {},
+									fail(res) {}
+								});
+							}
+						}
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #f8f8f8;
+}
+.box {
+	width: 730rpx;
+	margin: 20rpx auto 0;
+	border-radius: 20rpx;
+	background: #ffffff;
+	padding: 20rpx;
+	.title {
+		.title-font {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 800;
+			color: #303030;
+			text {
+				display: inline-block;
+				margin-left: 10rpx;
+				color: #999999;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+			}
+		}
+		.title-btn {
+			width: 150rpx;
+			height: 50rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border: 1px solid #e66f6f;
+			border-radius: 30rpx;
+			color: #e66f6f;
+		}
+	}
+	.box-info {
+		background: #f6f6f6;
+		width: 700rpx;
+		padding: 20rpx;
+		margin: 20rpx auto 0;
+		.info-title {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 800;
+			color: #303030;
+		}
+		.info-tip {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #303030;
+		}
+		.info-url {
+			margin-top: 20rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+	}
+	.image-box {
+		margin-top: 20rpx;
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		.image-item {
+			margin: 10rpx;
+			position: relative;
+			width: 33%;
+			height: 300rpx;
+			.isxuan {
+				position: absolute;
+				top: 20rpx;
+				right: 20rpx;
+				width: 30rpx;
+				height: 30rpx;
+				border-radius: 50%;
+				background: #e04b4b;
+			}
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+}
+.btn {
+	margin: 0 auto;
+	position: fixed;
+	bottom: 20rpx;
+	left: 0;
+	right: 0;
+	width: 710rpx;
+	height: 80rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #e04b4b;
+	color: #ffffff;
+	font-size: 26rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	border-radius: 50rpx;
+}
+</style>

+ 427 - 0
pages/zc/wzDetail.vue

@@ -0,0 +1,427 @@
+<template>
+	<view class="content">
+		<view class="top"><image :src="info.share_images[0] || ''" mode="widthFix"></image></view>
+		<view class="title">{{ info.title || '' }}</view>
+		<view class="tip">{{ info.synopsis || '' }}</view>
+		<view class="main" v-for="(ls, index) in info.content" :key="index">
+			<view v-if="ls.type == 'rich-text'" v-html="ls.value"></view>
+			<video v-if="ls.type == 'video' && ls.value" :src="ls.value" style="width:100%;height: 300px" frameborder="0"></video>
+		</view>
+		<view class="navbar flex">
+			<view class="navbar-item" @click.stop="shareLink()">
+				<view class="navbar-icon"><image src="../../static/icon/sharejt.png" mode=""></image></view>
+				<view class="navbar-font">分享</view>
+			</view>
+			<view class="xian"></view>
+			<view class="navbar-item" @click.stop="wzdz()">
+				<view class="navbar-icon" v-if="info.user_good == 1"><image src="../../static/icon/zanguo.png" mode=""></image></view>
+				<view class="navbar-icon" v-else><image src="../../static/icon/zan.png" mode=""></image></view>
+				<view class="navbar-font">{{ info.goods_count }}</view>
+			</view>
+		</view>
+		<view v-if="shareShow" class="Shraremask" @click="cancel">
+			<view class="mask-content">
+				<scroll-view class="view-content" scroll-y>
+					<view class="share-header">分享到</view>
+					<view class="share-list">
+						<view class="share-item">
+							<button class="wechat-box" open-type="share">
+								<image class="itemImage" src="../../static/icon/share1.png" mode=""></image>
+								<text class="itemText">微信好友</text>
+							</button>
+							<view class="wechat-box" @click="navTo('/pages/zc/wzshare?id=' + id)">
+								<image class="itemImage" src="../../static/icon/share2.png" mode=""></image>
+								<text class="itemText">朋友圈</text>
+							</view>
+							<view class="wechat-box" @click="copy()">
+								<image class="itemImage" src="../../static/icon/share3.png" mode=""></image>
+								<text class="itemText">复制链接</text>
+							</view>
+							<view class="wechat-box" @click="shareToFriend()">
+								<image class="itemImage" src="../../static/icon/share4.png" mode=""></image>
+								<text class="itemText">生成海报</text>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view class="bottomButtom b-t" @click="cancel">取消</view>
+			</view>
+		</view>
+		<uni-popup ref="popupshare" type="center">
+			<view class="share-box"><image :src="shareImage" mode="" class="box-img" @longpress="saveImg()"></image></view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+import { details } from '@/api/user.js';
+import { article_good, short_link, article_poster } from '@/api/activity.js';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	data() {
+		return { id: '', info: {}, shareShow: false, shareImage: '' };
+	},
+	onLoad(option) {
+		if (option.id) {
+			this.id = option.id;
+		}
+		// #ifdef MP
+		if (option.scene) {
+			if (typeof option.scene == 'string') {
+				// let scene = ('{' + option.scene + "}").replace('qr%26', '').replace(/%3D/g, ':').replace(/%26/g, ',')
+				// 	.replace('id', '\"id\"').replace('pid', '\"pid\"');
+				let scene = ('{' + option.scene + '}')
+					.replace('qr%26', '')
+					.replace(/%3D/g, ':')
+					.replace(/%26/g, ',')
+					.replace('id', '"id"')
+					.replace('pid', '"pid"')
+					.replace(/=/g, ':')
+					.replace(/&/g, ',');
+				console.log(scene, 'scene');
+				let opt = JSON.parse(scene);
+				console.log(opt);
+				// 保存拼团订单id
+				this.id = opt.id;
+				if (opt.pid) {
+					// 存储邀请人
+					this.spread = opt.pid;
+					uni.setStorageSync('spread', opt.pid);
+				}
+			}
+		}
+		// #endif
+	},
+	onShow() {
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady() {},
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		console.log(this.share);
+		if (res.from === 'button') {
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			// 保存邀请人
+			let data = {
+				path: path,
+				imageUrl: this.info.share_images[0],
+				title: this.info.title
+			};
+			console.log('data', data);
+			return data;
+		}
+	},
+	// #endif
+	methods: {
+		loadData() {
+			details({}, this.id).then(({ data }) => {
+				data.content = data.content.replace(/<img/g, '<img class="rich-img"').replace(/<p>\s*<img/g, '<p class="pHeight"><img');
+				data.content = this.getVideo(data.content);
+				this.info = data;
+			});
+		},
+		// 文章点赞
+		wzdz() {
+			article_good({}, this.id).then(e => {
+				if (this.info.user_good == 0) {
+					this.info.user_good = 1;
+					this.info.goods_count += 1;
+				} else {
+					this.info.user_good = 0;
+					this.info.goods_count -= 1;
+				}
+			});
+		},
+		shareLink(item) {
+			console.log('dainjideniang');
+			this.shareShow = true;
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		shareToFriend() {
+			let obj = this;
+			uni.showLoading({
+				title: 'Loading...',
+				mask: true
+			});
+			article_poster({}, this.id)
+				.then(({ data }) => {
+					obj.shareImage = data.url;
+					console.log(obj.shareImage, '123456');
+					uni.hideLoading();
+					this.$refs.popupshare.open();
+				})
+				.catch(e => {
+					uni.hideLoading();
+				});
+		},
+		copy() {
+			short_link({ url: 'pages/zc/wzDetail?id=' + this.id }).then(({ data }) => {
+				console.log(data);
+				this.comfirm(data.link);
+			});
+		},
+		comfirm(text) {
+			console.log(text);
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		//取消分享
+		cancel() {
+			this.shareShow = false;
+		},
+		saveImg(w) {
+			console.log(w);
+			let obj = this;
+			uni.downloadFile({
+				//下载图片
+				url: obj.shareImage,
+				success: res => {
+					console.log(res.tempFilePath);
+					uni.saveImageToPhotosAlbum({
+						//将图片保存在手机
+						filePath: res.tempFilePath, //保存的位置
+						success: res => {
+							uni.showToast({
+								title: '保存成功',
+								icon: 'none'
+							});
+						}
+					});
+				}
+			});
+		},
+		// 富文本视频解析
+		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,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.top {
+	width: 750rpx;
+	image {
+		width: 100%;
+	}
+}
+.title {
+	margin-top: 20rpx;
+	text-align: center;
+	font-size: 32rpx;
+	font-family: PingFang SC;
+	font-weight: 800;
+	color: #303030;
+}
+.tip {
+	margin-top: 20rpx;
+	padding: 0 10rpx;
+	font-size: 24rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	color: #969696;
+}
+.main {
+	margin-top: 60rpx;
+	padding: 10rpx;
+}
+/deep/ .main {
+	.rich-img {
+		width: 100% !important;
+		height: auto;
+	}
+}
+.navbar {
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	right: 0;
+	width: 750rpx;
+	padding: 50rpx 0;
+	.xian {
+		width: 2px;
+		background: #999999;
+		height: 36rpx;
+	}
+	.navbar-item {
+		width: 50%;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		.navbar-icon {
+			width: 36rpx;
+			height: 36rpx;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+		.navbar-font {
+			margin-left: 17rpx;
+			font-size: 22rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #333333;
+		}
+	}
+}
+.Shraremask {
+	position: fixed;
+	left: 0;
+	top: 0;
+	right: 0;
+	bottom: 0;
+	display: flex;
+	justify-content: center;
+	align-items: flex-end;
+	z-index: 998;
+	transition: 0.3s;
+	background-color: rgba(51, 51, 51, 0.6);
+	.bottomButtom {
+		position: absolute;
+		left: 0;
+		bottom: 0;
+		display: flex;
+		justify-content: center;
+		align-items: center;
+		width: 100%;
+		height: 90rpx;
+		background: #fff;
+		z-index: 9;
+		font-size: $font-base + 2rpx;
+		color: $font-color-dark;
+	}
+}
+.mask-content {
+	margin-bottom: 88rpx;
+	width: 100%;
+	height: 380rpx;
+	transition: 0.3s;
+	background: #fff;
+	&.has-bottom {
+		padding-bottom: 90rpx;
+	}
+	.view-content {
+		height: 100%;
+	}
+}
+.share-header {
+	height: 110rpx;
+	font-size: $font-base + 2rpx;
+	color: font-color-dark;
+	display: flex;
+	align-items: center;
+	justify-content: center;
+	padding-top: 10rpx;
+	&:before,
+	&:after {
+		content: '';
+		width: 240rpx;
+		height: 0;
+		border-top: 1px solid $border-color-base;
+		transform: scaleY(0.5);
+		margin-right: 30rpx;
+	}
+	&:after {
+		margin-left: 30rpx;
+		margin-right: 0;
+	}
+}
+.share-list {
+	display: flex;
+	width: 80%;
+	margin: 0rpx auto;
+}
+.share-item {
+	min-width: 33.33%;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	height: 180rpx;
+	width: 100%;
+	.wechat-box {
+		width: 50%;
+		height: 100%;
+		background: #ffffff;
+		border: 0;
+		display: flex;
+		align-items: center;
+		flex-direction: column;
+		&::after {
+			border: 0;
+		}
+		.itemImage {
+			width: 80rpx;
+			height: 80rpx;
+			margin-bottom: 16rpx;
+		}
+		.itemText {
+			font-size: $font-base;
+			color: $font-color-base;
+			line-height: 2;
+		}
+	}
+}
+.share-box {
+	width: 600rpx;
+	height: 1000rpx;
+	background: red;
+	.box-img {
+		width: 600rpx;
+		height: 1000rpx;
+	}
+}
+</style>

+ 291 - 0
pages/zc/wzshare.vue

@@ -0,0 +1,291 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<view class="title flex">
+				<view class="title-font">分享文案</view>
+				<view class="title-btn" @click="comfirm()">复制文案</view>
+			</view>
+			<view class="box-info">
+				<view class="info-title">{{ info.title }}</view>
+				<view class="info-tip">{{ info.synopsis }}</view>
+				<view class="info-url">{{ url }}</view>
+			</view>
+			<view class="title flex" style="margin-top: 20rpx;">
+				<view class="title-font">
+					分享素材
+					<text>(已选{{ nowlen }}/{{ alllen }})</text>
+				</view>
+			</view>
+			<view class="image-box">
+				<view class="image-item" v-for="(item, index) in imageBox" @click="change(item)">
+					<image :src="item.url" mode=""></image>
+					<view class="isxuan" v-if="item.isxuan"></view>
+				</view>
+			</view>
+		</view>
+		<view class="btn" @click="onDown()">下载</view>
+	</view>
+</template>
+
+<script>
+import { details } from '@/api/user.js';
+import sunuiGrand from '@/components/sunui-grand/sunui-grand.vue';
+import { reply_detail, short_link } from '@/api/activity.js';
+import uniCopy from '@/js_sdk/xb-copy/uni-copy.js';
+export default {
+	data() {
+		return {
+			info: {},
+			url: '',
+			imageBox: [],
+			alllen: '',
+			nowlen: ''
+		};
+	},
+	components: {
+		sunuiGrand
+	},
+	onLoad(opt) {
+		this.id = opt.id;
+	},
+	onShow() {
+		this.imageBox = [];
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady() {},
+	methods: {
+		loadData() {
+			const obj = this;
+			details({}, this.id).then(({ data }) => {
+				data.share_images.forEach(e => {
+					let u = {
+						isxuan: true,
+						url: e
+					};
+					obj.imageBox.push(u);
+				});
+				this.alllen = obj.imageBox.length;
+				this.nowlen = obj.imageBox.length;
+				this.info = data;
+			});
+			short_link({ url: 'pages/zc/wzDetail?id=' + this.id }).then(({ data }) => {
+				this.url = data.link;
+			});
+		},
+		change(opt) {
+			if (opt.isxuan) {
+				opt.isxuan = false;
+				this.nowlen -= 1;
+			} else {
+				opt.isxuan = true;
+				this.nowlen += 1;
+			}
+		},
+		comfirm() {
+			let text = this.info.synopsis + this.url;
+			const result = uniCopy(text);
+			if (result === false) {
+				uni.showToast({
+					title: '不支持'
+				});
+			} else {
+				uni.showToast({
+					title: '复制成功',
+					icon: 'none'
+				});
+			}
+		},
+		onDown() {
+			let that = this;
+			let index = 0;
+			let list = [];
+			that.imageBox.forEach(e => {
+				if (e.isxuan) {
+					list.push(e.url);
+				}
+			});
+			// console.log('触发下载图片');
+			// 第一步,先调用授权功能
+			uni.authorize({
+				scope: 'scope.writePhotosAlbum',
+				success() {
+					// 1 授权成功遍历所有要下载的图片
+					if (list && list.length > 0) {
+						// console.log(that.pathList, '============查看有没有图片数据=============>');
+						let i = 1;
+						list.forEach(item => {
+							uni.showLoading({
+								title: '下载第' + i + '图片中,共' + list.length + '张'
+							});
+							// 1.1 调用下载api方法
+							uni.downloadFile({
+								url: item, // 获取要下载的服务器里的图片地址
+								success: res => {
+									// 1.2 获取远程图片地址后,将图片地址缓存到本地
+									if (res.statusCode === 200) {
+										// console.log(res, '============下载后的图片地址=============>');
+										uni.saveImageToPhotosAlbum({
+											filePath: res.tempFilePath, // 把远程的图片地址及图片保存到本地
+											success: function(res) {
+												// 1.3保存成功后弹框提示保存成功
+												i += 1;
+												uni.showToast({
+													title: '保存成功',
+													icon: 'none'
+												});
+											},
+											fail: function(res) {
+												// console.log(res, '============fail=============>');
+												// 1.4保存失败给用户弹框提示
+												uni.showToast({
+													title: '保存失败',
+													icon: 'none'
+												});
+												if (res.errMsg == 'saveImageToPhotosAlbum:fail cancel') {
+													return;
+												}
+											}
+										});
+									}
+								}
+							});
+						});
+					} else {
+						uni.showToast({
+							title: '暂无数据',
+							icon: 'none'
+						});
+					}
+				},
+				fail() {
+					// 2、授权失败 弹框再次要求授权
+					uni.showModal({
+						title: '您需要授权相册权限',
+						success(res) {
+							// 2.1点击确认按钮就调取授权设置页面
+							if (res.confirm) {
+								// 2.2 开启授权设置页面
+								uni.openSetting({
+									success(res) {},
+									fail(res) {}
+								});
+							}
+						}
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+	background: #f8f8f8;
+}
+.box {
+	width: 730rpx;
+	margin: 20rpx auto 0;
+	border-radius: 20rpx;
+	background: #ffffff;
+	padding: 20rpx;
+	.title {
+		.title-font {
+			font-size: 32rpx;
+			font-family: PingFang SC;
+			font-weight: 800;
+			color: #303030;
+			text {
+				display: inline-block;
+				margin-left: 10rpx;
+				color: #999999;
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+			}
+		}
+		.title-btn {
+			width: 150rpx;
+			height: 50rpx;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			border: 1px solid #e66f6f;
+			border-radius: 30rpx;
+			color: #e66f6f;
+		}
+	}
+	.box-info {
+		background: #f6f6f6;
+		width: 700rpx;
+		padding: 20rpx;
+		margin: 20rpx auto 0;
+		.info-title {
+			font-size: 28rpx;
+			font-family: PingFang SC;
+			font-weight: 800;
+			color: #303030;
+		}
+		.info-tip {
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #303030;
+		}
+		.info-url {
+			margin-top: 20rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: 500;
+			color: #666666;
+		}
+	}
+	.image-box {
+		margin-top: 20rpx;
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		.image-item {
+			margin: 10rpx;
+			position: relative;
+			width: 32%;
+			height: 300rpx;
+			.isxuan {
+				position: absolute;
+				top: 20rpx;
+				right: 20rpx;
+				width: 30rpx;
+				height: 30rpx;
+				border-radius: 50%;
+				background: #e04b4b;
+			}
+			image {
+				width: 100%;
+				height: 100%;
+			}
+		}
+	}
+}
+.btn {
+	margin: 0 auto;
+	position: fixed;
+	bottom: 20rpx;
+	left: 0;
+	right: 0;
+	width: 710rpx;
+	height: 80rpx;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+	background: #e04b4b;
+	color: #ffffff;
+	font-size: 26rpx;
+	font-family: PingFang SC;
+	font-weight: 500;
+	border-radius: 50rpx;
+}
+</style>

+ 440 - 0
pages/zc/zc.vue

@@ -0,0 +1,440 @@
+<template>
+	<view class="content">
+		<view class="vheigh"></view>
+		<view class="top-bg">
+			<view class="top" @click="clickSearch()">
+				<view class="top-icon"><image src="../../static/icon/icon.png" mode=""></image></view>
+				<view class="top-main">输入关键词搜索</view>
+			</view>
+		</view>
+		<view class="navbar">
+			<view class="nav-item" :class="{ current: tabCurrentIndex === 0 }" @click="tabClick('0')">笔记素材</view>
+			<view class="nav-item" :class="{ current: tabCurrentIndex === 1 }" @click="tabClick('1')">买家反馈</view>
+		</view>
+		<swiper :current="tabCurrentIndex" :style="{ height: height }" class="swiper-box" duration="300" @change="changeTab">
+			<swiper-item class="tab-content">
+				<scroll-view scroll-y="true" class="list-scroll-content">
+					<view class="main" v-for="(item, index) in bjsclist" :key="index" @click="navTo('/pages/zc/wzDetail?id=' + item.id)">
+						<view class="main-userInfo">
+							<view class="avatar"><image src="../../static/icon/fire.png" mode=""></image></view>
+							<view class="main-user-info">
+								<view class="main-userName">{{ item.author }}</view>
+								<view class="main-user-time">2022-12-20 20:52</view>
+							</view>
+						</view>
+						<sunuiGrand :content="item.synopsis" clamp="4" expandText="全文" shinkText="收起" bg="#ffffff"></sunuiGrand>
+						<!-- <view class="imagebox">
+							<view class="image-item" v-for="(itm, inx) in item.share_images"><image :src="itm" mode=""></image></view>
+						</view> -->
+						<view class="main-bottom flex">
+							<view class="main-bottom-item" @click.stop="navTo('/pages/zc/wzshare?id=' + item.id)">
+								<view class="main-bottom-icon"><image src="../../static/icon/pyq.png" mode=""></image></view>
+								<view class="main-bottom-font">朋友圈</view>
+							</view>
+							<button class="main-bottom-item" open-type="share" @click.stop="seave(item)">
+								<view class="main-bottom-icon1"><image src="../../static/icon/wxhy.png" mode=""></image></view>
+								<view class="main-bottom-font">微信好友</view>
+							</button>
+							<view class="main-bottom-item" @click.stop="wzdz(item)">
+								<view class="main-bottom-icon" v-if="item.user_good == 1"><image src="../../static/icon/zanguo.png" mode=""></image></view>
+								<view class="main-bottom-icon" v-else><image src="../../static/icon/zan.png" mode=""></image></view>
+								<view class="main-bottom-font">{{ item.goods_count }}</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</swiper-item>
+			<swiper-item class="tab-content">
+				<scroll-view scroll-y="true" class="list-scroll-content">
+					<view class="info">
+						<view class="info-item" v-for="(item, index) in mjfklist" :key="index" @click="navTo('/pages/zc/plDetail?id=' + item.id)">
+							<view class="info-image"><image :src="item.main_pic" mode=""></image></view>
+							<view class="info-name clamp">{{ item.title }}</view>
+							<view class="info-userinfo flex">
+								<view class="info-left">
+									<view class="info-avatar"><image :src="item.avatar" mode=""></image></view>
+									<view class="info-userinfo-name">{{ item.nickname }}</view>
+								</view>
+								<view class="info-right" @click="pldz(item)">
+									<view class="info-avatar" v-if="item.user_good == 0"><image src="../../static/icon/zan.png" mode=""></image></view>
+									<view class="info-avatar" v-if="item.user_good == 1"><image src="../../static/icon/zanguo.png" mode=""></image></view>
+									<view class="info-userinfo-name">{{ item.goods_count }}</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+			</swiper-item>
+		</swiper>
+	</view>
+</template>
+
+<script>
+import { articleList } from '@/api/user.js';
+import { reply_list } from '@/api/product.js';
+import { article_good, reply_good } from '@/api/activity.js';
+import sunuiGrand from '@/components/sunui-grand/sunui-grand.vue';
+export default {
+	// #ifdef MP
+	onShareAppMessage: function(res) {
+		console.log(this.share);
+		if (res.from === 'button') {
+			// 来自页面内分享按钮
+			let pages = getCurrentPages();
+			// 获取当前页面
+			let page = pages[pages.length - 1];
+			let path = '/' + page.route + '?';
+			// 保存传值
+			for (let i in page.options) {
+				path += i + '=' + page.options[i] + '&';
+			}
+			// 保存邀请人
+			let data = {
+				path: path,
+				imageUrl: this.share.image_input[0],
+				title: this.share.title
+			};
+			console.log('data', data);
+			return data;
+		}
+	},
+	// #endif
+	components: {
+		sunuiGrand
+	},
+	data() {
+		return {
+			tabCurrentIndex: 0,
+			height: '',
+			bjsclist: '',
+			mjfklist: '',
+			share: ''
+		};
+	},
+	onLoad() {},
+	onShow() {
+		this.loadData();
+	},
+	onReachBottom() {},
+	onReady(res) {
+		var _this = this;
+		uni.getSystemInfo({
+			success: resu => {
+				const query = uni.createSelectorQuery();
+				query.select('.swiper-box').boundingClientRect();
+				query.exec(function(res) {
+					_this.height = resu.windowHeight - res[0].top + 'px';
+					console.log('打印页面的剩余高度', _this.height);
+				});
+			},
+			fail: res => {}
+		});
+	},
+	methods: {
+		seave(item) {
+			this.share = item;
+		},
+		clickSearch() {
+			uni.navigateTo({
+				url: '/pages/product/search'
+			});
+		},
+		changeTab(e) {
+			this.tabCurrentIndex = e.target.current;
+			this.loadData();
+		},
+		tabClick(index) {
+			this.tabCurrentIndex = index;
+			this.loadData();
+		},
+		// 文章点赞
+		wzdz(item) {
+			article_good({}, item.id).then(e => {
+				if (item.user_good == 0) {
+					item.user_good = 1;
+					item.goods_count += 1;
+				} else {
+					item.user_good = 0;
+					item.goods_count -= 1;
+				}
+			});
+		},
+		// 评论点赞
+		pldz(item) {
+			reply_good({}, item.id).then(e => {
+				if (item.user_good == 0) {
+					item.user_good = 1;
+					item.goods_count += 1;
+				} else {
+					item.user_good = 0;
+					item.goods_count -= 1;
+				}
+			});
+		},
+		navTo(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		async loadData(source) {
+			let obj = this;
+			if (this.tabCurrentIndex == 0) {
+				articleList(
+					{
+						page: 1,
+						limit: 1000
+					},
+					1
+				)
+					.then(({ data }) => {
+						this.bjsclist = data;
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			} else {
+				reply_list(
+					{
+						page: 1,
+						limit: 1000
+					},
+					0
+				)
+					.then(({ data }) => {
+						this.mjfklist = data;
+					})
+					.catch(e => {
+						console.log(e);
+					});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.vheigh {
+	height: var(--status-bar-height);
+	background-color: #ffffff;
+}
+button {
+	padding: 0;
+	margin: 0;
+	border: none;
+	background-color: #ffffff;
+	line-height: 1;
+	height: auto;
+}
+button::after {
+	border: none;
+}
+page,
+.content {
+	min-height: 100%;
+	height: auto;
+}
+.top-bg {
+	padding-top: 20rpx;
+	background: #ffffff;
+}
+.list-scroll-content {
+	background: #ffffff;
+	height: 100%;
+	.yan {
+		padding-bottom: 100rpx;
+	}
+}
+.top {
+	width: 689rpx;
+	height: 58rpx;
+	background: #ededed;
+	border-radius: 29rpx;
+	margin: 0 auto;
+	display: flex;
+	justify-content: center;
+	align-items: center;
+
+	.top-icon {
+		width: 32rpx;
+		height: 32rpx;
+
+		image {
+			width: 100%;
+			height: 100%;
+		}
+	}
+
+	.top-main {
+		margin-left: 20rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC;
+		font-weight: 500;
+		color: #cbcbcb;
+	}
+}
+.navbar {
+	display: flex;
+	height: 88rpx;
+	padding: 0 5px;
+	background: #ffffff;
+	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 #000000;
+			}
+		}
+	}
+}
+.main {
+	margin-top: 20rpx;
+	padding: 35rpx 20rpx 24rpx;
+	background: #ffffff;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+	.main-userInfo {
+		display: flex;
+		align-items: center;
+
+		.avatar {
+			width: 80rpx;
+			height: 80rpx;
+			background: #ffffff;
+			border-radius: 50%;
+		}
+		.main-user-info {
+			margin-left: 14rpx;
+			line-height: 1;
+			.main-userName {
+				font-size: 28rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #000000;
+			}
+			.main-user-time {
+				margin-top: 14rpx;
+				font-size: 21rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #666666;
+			}
+		}
+	}
+	.imagebox {
+		margin-top: 40rpx;
+		display: flex;
+		align-items: center;
+		flex-wrap: wrap;
+		.image-item {
+			margin: 10rpx;
+			width: 30%;
+			height: 230rpx;
+		}
+	}
+	.main-bottom {
+		margin-top: 60rpx;
+		.main-bottom-item {
+			padding: 30rpx 0;
+			width: 33%;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			.main-bottom-icon {
+				width: 36rpx;
+				height: 36rpx;
+			}
+			.main-bottom-icon1 {
+				width: 43rpx;
+				height: 36rpx;
+			}
+			.main-bottom-icon2 {
+				width: 36rpx;
+				height: 36rpx;
+			}
+			.main-bottom-font {
+				margin-left: 17rpx;
+				font-size: 22rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				color: #333333;
+			}
+		}
+	}
+}
+.info {
+	padding: 10rpx;
+	display: flex;
+	flex-wrap: wrap;
+	justify-content: space-between;
+	image {
+		width: 100%;
+		height: 100%;
+	}
+	.info-item {
+		width: 48%;
+		padding-bottom: 20rpx;
+		.info-image {
+			width: 100%;
+			height: 480rpx;
+		}
+		.info-name {
+			margin-top: 20rpx;
+			padding: 0 10rpx;
+			font-size: 26rpx;
+			font-family: PingFang SC;
+			font-weight: bold;
+			color: #000000;
+		}
+		.info-userinfo {
+			margin-top: 20rpx;
+			padding: 0 10rpx;
+			.info-left {
+				display: flex;
+				align-items: center;
+				.info-avatar {
+					width: 32rpx;
+					height: 32rpx;
+				}
+			}
+			.info-userinfo-name {
+				margin-left: 10rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC;
+				font-weight: bold;
+				color: #999999;
+			}
+			.info-right {
+				display: flex;
+				align-items: center;
+				.info-avatar {
+					width: 30rpx;
+					height: 30rpx;
+				}
+			}
+		}
+	}
+}
+</style>

BIN
static/icon/bj.png


BIN
static/icon/c3.png


BIN
static/icon/c5.png


BIN
static/icon/c6.png


BIN
static/icon/c7.png


BIN
static/icon/c8.png


BIN
static/icon/pyq.png


BIN
static/icon/sc.png


BIN
static/icon/share1.png


BIN
static/icon/share2.png


BIN
static/icon/share3.png


BIN
static/icon/share4.png


BIN
static/icon/sharejt.png


BIN
static/icon/u1.png


BIN
static/icon/u2.png


BIN
static/icon/u3.png


BIN
static/icon/u4.png


BIN
static/icon/u5.png


BIN
static/icon/wxhy.png


BIN
static/icon/zan.png


BIN
static/icon/zanguo.png


BIN
static/img/bargainBg.jpg


BIN
static/img/bo.png


BIN
static/img/delete.png


BIN
static/img/deletes.png


BIN
static/img/img009.png


BIN
static/img/img010.png


BIN
static/img/img07.png


BIN
static/img/img08.png


BIN
static/img/img10.png


BIN
static/img/img14.jpg


BIN
static/img/living.png


BIN
static/img/paySuccess.png


BIN
static/img/share.png


BIN
static/img/vip-card-bg.png


BIN
static/tabBar/dingdan.png


BIN
static/tabBar/home.png


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


BIN
static/tabBar/tab-cart.png


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


BIN
static/tabBar/tab-cate.png


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


BIN
static/tabBar/tab-home.png


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


BIN
static/tabBar/tab-my.png


+ 6 - 6
store/index.js

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

+ 3 - 2
uni.scss

@@ -1,10 +1,11 @@
+@import 'uview-ui/theme.scss';
 /* 页面左右间距 */
 $page-row-spacing: 30rpx;
 //页面基础颜色
 $page-color-base: #f8f8f8; //页面背景颜色
 $page-color-light: #f8f6fc;
 // 主题颜色
-$base-color: #5dbc7c; //项目颜色
+$base-color: #fd3b39; //项目颜色
 $box-shadow-color: #5dbc7c; //阴影颜色
 $font-color: #5dbc7c; //字体颜色
 $font-color-spec: #5dbc7c; //可操作文字颜色
@@ -35,7 +36,7 @@ $color-red: #dd524d;
 /* 图片加载中颜色 */
 $image-bg-color: #eee;
 /* 行为相关颜色 */
-$uni-color-primary: #5dbc7c;
+$uni-color-primary: #000000;
 $uni-color-success: #4cd964;
 $uni-color-warning: #f0ad4e;
 $uni-color-error: #dd524d;

Alguns arquivos não foram mostrados porque muitos arquivos mudaram nesse diff