Sfoglia il codice sorgente

增加评论相关内容

junyuanz 4 anni fa
parent
commit
81670111fc

+ 3 - 1
app.json

@@ -16,6 +16,7 @@
     "pages/helpfarm/othercustom/othercustom",
     "pages/helpfarm/group/group",
     "pages/projects/project-detail/project-detail",
+    "pages/projects/project-comment/project-comment",
     "pages/projects/project-success/project-success",
     "pages/pay/pay",
     "pages/customservice/customservice",
@@ -46,6 +47,7 @@
         "pages/user/radishDetail/radishDetail",
         "pages/user/orders/orders",
         "pages/user/order/order",
+        "pages/user/comment/comment",
         "pages/user/logistics/logistics",
         "pages/user/safe/safe",
         "pages/user/exchange/exchange",
@@ -130,7 +132,7 @@
   "sitemapLocation": "sitemap.json",
   "plugins": {
 	    "live-player-plugin": {
-	        "version": "1.2.7",
+	        "version": "1.2.8",
 	        "provider": "wx2b03c6e691cd7370"
 	    }
 	}

BIN
images/star_a_l.png


BIN
images/star_a_r.png


BIN
images/star_d_l.png


BIN
images/star_d_r.png


+ 191 - 0
packageUser/pages/user/comment/comment.js

@@ -0,0 +1,191 @@
+var _request = require('../../../../utils/request.js')
+var rid;
+var pid;
+Page({
+  data: {
+    order: {},
+    express: '',
+    total:0,
+	lvList:[
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png'
+  ],//星星个数
+  lvListActive1: '/images/star_a_l.png',//选中的
+  lvListActive2:'/images/star_d_l.png',//未选中的
+	lvListActive3: '/images/star_a_r.png',//选中的
+  lvListActive4:'/images/star_d_r.png',//未选中的
+	star_txt:'非常好',
+	commtxt:'商品不错,物流快,好评',
+	commlv:9
+  },
+  onLoad: function (options) {
+    rid = options.id;
+	pid = options.pid;
+    this.getProjectDetail()
+  },
+  getProjectDetail () {
+    var that = this
+    var url = "v1/product/" + pid;
+    var params = {}
+    var success = function (val) {
+		console.log('data',val.data)
+      that.setData({
+        order: val.data,
+      });
+    }
+    _request.$get(url, params, success)
+  },
+  confirmPopup () {
+    var that = this
+    wx.showModal({
+      title: '提示',
+      content: '是否确认收货?',
+      success: function(res) {
+        if (res.confirm) {
+          that.confirmOrder()
+        } else if (res.cancel) {
+        }
+      }
+    })
+  },
+  CancelPopup () {
+    var that = this
+    wx.showModal({
+      title: '提示',
+      content: '确定取消该订单?',
+      success: function(res) {
+        if (res.confirm) {
+          that.CancelOrder()
+        } else if (res.cancel) {
+        }
+      }
+    })
+  },
+  confirmOrder: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/order/' + id + '/confirm'
+    var params = {
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  CancelOrder: function () {
+    var id = this.data.order.order_id
+    var that = this
+    var url = 'v1/order/' + id + '/cancel'
+    var params = {
+    }
+    var success = function (res) {
+      getApp().globalData.order = true
+      wx.navigateBack()
+    }
+    _request.$put(url, params, success)
+  },
+  formatOrder: function () {
+    var id = this.data.order.express_order_no
+    var result = ''
+    for (var i = 0; i < id.length; i++) {
+      if (i%4 === 0 && i !== 0) {
+        result = result + ' '
+      }
+      result = result + id[i]
+    }
+    this.setData({
+      express: result
+    })
+  },
+  copeOrder: function () {
+    var that = this
+    var id = this.data.order.express_order_no
+    wx.setClipboardData({
+      data: id,
+      success: function(res) {
+        wx.showToast({
+          title: '已成功复制到剪贴板',
+          icon: 'none',
+          duration: 2000
+        })
+      }
+    })
+  },
+  onShareAppMessage: function (val) {
+    return _request.share({
+      sc: 'xcx_user_order'
+    })
+  },
+  evaluateLv(e){
+	console.log(e);
+	var that = this;
+	var idx = e.currentTarget.dataset.index;
+	var lvList = that.data.lvList;
+	console.log('idx',idx);
+	var star_txt = '';
+	if(idx == 9) star_txt = '非常好';
+	if(idx == 8) star_txt = '满意';
+	if(idx == 7) star_txt = '满意';
+	if(idx == 6) star_txt = '一般';
+	if(idx == 5) star_txt = '一般';
+	if(idx == 4) star_txt = '差';
+	if(idx == 3) star_txt = '差';
+	if(idx == 2) star_txt = '非常差';
+	if(idx == 1) star_txt = '非常差';
+	if(idx == 0) star_txt = '非常差';
+	
+	lvList.forEach((item,index) => {
+	console.log('index',index);
+		if(index <= idx){
+			if(index % 2 === 0){
+				lvList[index] = that.data.lvListActive1; 
+			}else{
+				lvList[index] = that.data.lvListActive3; 
+			}
+		}else{
+			if(index % 2 === 0){
+				lvList[index] = that.data.lvListActive2; 
+			}else{
+				lvList[index] = that.data.lvListActive4; 
+			}
+    }
+  })
+	that.setData({
+		lvList: lvList,
+		star_txt:star_txt,
+		commlv:idx
+	})
+  },
+  bindcomm: function (e) {
+    this.setData({
+      commtxt: e.detail.value
+    })
+  },
+  sendComment() {
+    var that = this
+    var url = 'v1/order_detail/'+ rid +'/commend';
+	var score = (this.data.commlv + 1) * 10 /2;
+    var params = {
+      detail:this.data.commtxt,
+	  score:score
+    }
+    var success = function (res) {
+      wx.showToast({
+        title: '申请添加评论成功',
+        icon: 'none',
+        duration: 2000
+      })
+	  wx.navigateBack({ changed: true });
+    }
+    _request.$put(url, params, success)
+  },
+})

+ 7 - 0
packageUser/pages/user/comment/comment.json

@@ -0,0 +1,7 @@
+{
+  "navigationBarTitleText": "发表评价",
+  "usingComponents": {
+    "currency": "../../../../component/currency/currency"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 38 - 0
packageUser/pages/user/comment/comment.wxml

@@ -0,0 +1,38 @@
+<view class="bg">
+  <view class="orderDetail-project">
+	  <view>
+	    <view class="order-main">
+	      <image class="order-main__left" src="{{order.cover}}"></image>
+	      <view class="order-main__right">
+	        <h6 class="ellipsisLn">
+	        	<b style="color:#F00" wx:if="{{order.is_zeng}}">[赠品]</b>
+	        {{order.name}}</h6>
+	        <view class="order-info__title ellipsisLn">{{order.color_name}} {{order.size_name}}</view>
+	        <view class="order-info__price">
+	        	<currency symbol="¥" value="{{order.price}}" />
+	        </view>
+	        
+	      </view>
+	      <view class="clean"></view>
+	    </view>
+	   </view> 
+  </view>
+  <view class="comment_box">
+	  商品评分
+	  <!-- <view class="star_box"></view> -->
+	  <view class="evaluateLv">
+      <view class="list-item" wx:for="{{lvList}}" wx:key="item">
+        <image class="block" src="{{item}}" bindtap="evaluateLv" data-index="{{index}}"></image>
+      </view>
+
+			<view class="star_txt">{{star_txt}}</view>
+	  </view>
+	  
+	  <textarea placeholder="请输入留言:[默认] 商品不错,物流快,好评" bindinput="bindcomm"></textarea>
+  </view>
+  
+  <view style="height: 60px;"></view>
+  <view class="send_comment">
+	  <button type="button" bindtap="sendComment">发布</button>
+  </view>
+</view>

+ 281 - 0
packageUser/pages/user/comment/comment.wxss

@@ -0,0 +1,281 @@
+.bg {
+  position: relative;
+  width: 100%;
+  min-height: 100%;
+  background-color: #f3f3f3;
+}
+.orderDetail-type {
+  width: 100%;
+  height: 170rpx;
+  background: -webkit-linear-gradient(left, #ff5c5c , #ff9b74);
+  background: linear-gradient(to right, #ff5c5c , #ff9b74);
+  line-height: 170rpx;
+  text-align: center;
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #ffffff;
+}
+.orderDetail-address {
+  position: relative;
+  padding: 0 20rpx;
+  color: #4c4c4c;
+  font-size: 28rpx;
+  background-color: #fff;
+}
+.orderDetail-address__info {
+  padding-top: 25rpx;
+}
+.orderDetail-address__name {
+  float: left;
+}
+.orderDetail-address__tel {
+  float: right;
+}
+.orderDetail-address__more {
+  padding-top: 20rpx;
+  padding-bottom: 20rpx;
+  line-height: 50rpx;
+}
+.orderDetail-address__border {
+  position: absolute;
+  left: 0;
+  bottom: 2rpx;
+  width: 100%;
+  height: 2rpx;
+}
+.order-main {
+  width: 710rpx;
+  height: 200rpx;
+  background-color: #fcfcfc;
+  margin-bottom:5px;
+}
+.order-main__left {
+  width: 200rpx;
+  height: 200rpx;
+  display: block;
+  float: left;
+}
+.order-main__right {
+  position: relative;
+  width: 490rpx;
+  height: 200rpx;
+  float: right;
+}
+.order-info__title {
+  color: #4c4c4c;
+  padding-top: 5rpx;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  height: 72rpx;
+  -webkit-line-clamp: 2;
+}
+.order-info__type {
+  padding-top: 12rpx;
+  font-size: 24rpx;
+  color: #bbbbbb;
+}
+.order-info__price {
+  position: absolute;
+  bottom: 16rpx;
+  left: 0;
+  font-size: 24rpx;
+  color: #eab86a;
+}
+.order-info__point {
+  color: #bbbbbb;
+}
+.order-info__count {
+  position: absolute;
+  bottom: 16rpx;
+  right: 0;
+  font-size: 24rpx;
+  color: #bbbbbb;
+}
+.orderDetail-project {
+  padding: 20rpx;
+  background-color: #fff;
+}
+.orderDetail-count {
+  padding-top: 50rpx;
+  line-height: 48rpx;
+  font-size: 28rpx;
+}
+.orderDetail-count__title {
+  color: #4c4c4c;
+  float: left;
+}
+.orderDetail-count__count {
+  color: #4c4c4c;
+  float: right;
+}
+.orderDetail-discount {
+  line-height: 48rpx;
+  font-size: 28rpx;
+}
+.orderDetail-discount__title {
+  color: #4c4c4c;
+  float: left;
+}
+.orderDetail-discount__count {
+  color: #eab86a;
+  float: right;
+}
+.orderDetail-discount__point {
+  color: #bbbbbb;
+}
+.orderDetail-payPrice {
+  line-height: 80rpx;
+}
+.orderDetail-payPrice__title {
+  float: left;
+  font-size: 28rpx;
+  color: #eab86a;
+}
+.orderDetail-payPrice__count {
+  float: right;
+  color: #eab86a;
+  font-size: 32rpx;
+}
+/*.orderDetail-payPrice__count text {
+  float: right;
+}*/
+.orderDetail-info {
+  padding: 30rpx 20rpx;
+  background-color: #ffffff;
+  margin-top: 16rpx;
+}
+.orderDetail-info__line {
+  line-height: 42rpx;
+  color: #bbbbbb;
+  font-size: 24rpx;
+}
+.orderDetail-btnbg {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  width: 100%;
+  height: 88rpx;
+  background-color: #fff;
+  border-top: 1rpx solid #dddddd;
+}
+.orderDetail-btn__red {
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #eab86a;
+  font-size: 28rpx;
+  color: #eab86a;
+  text-align: center;
+  line-height: 58rpx;
+  border-radius: 5rpx;
+  margin-right: 20rpx;
+  margin-top: 14rpx;
+  float: right;
+}
+.orderDetail-btn__black {
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #cccccc;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  text-align: center;
+  line-height: 58rpx;
+  border-radius: 5rpx;
+  margin-right: 20rpx;
+  margin-top: 14rpx;
+  float: right;
+}
+.orderDetail-express {
+  background-color: #fff;
+  margin: 20rpx 0;
+  padding: 20rpx 0;
+}
+.orderDetail-express__main {
+  background-color: #fffae4;
+  margin: 0 auto;
+  padding-bottom: 27rpx;
+}
+.orderDetail-express__title {
+  text-align: center;
+  font-size: 28rpx;
+  color: #f7ae87;
+  padding: 28rpx 0 16rpx;
+}
+.orderDetail-express__val {
+  color: #5b93c3;
+  text-align: center;
+  font-size: 28rpx;
+  font-weight: bold;
+}
+.orderDetail-express__btn {
+  width: 88rpx;
+  height: 40rpx;
+  border: 1rpx solid #f7ae87;
+  text-align: center;
+  margin: 16rpx auto 0;
+  line-height: 40rpx;
+  font-size: 24rpx;
+  color: #f7ae87;
+  border-radius: 5rpx;
+}
+.orderDetail-express__com {
+  padding-left: 5rpx;
+}
+.yunfei{
+width: 100%;
+overflow: hidden;
+margin: 5px 0;
+padding-top: 15px;
+font-size: 14px;
+}
+
+
+.comment_box{
+	background: #FFF;
+	padding: 15rpx;
+}
+.comment_box textarea{
+	width: 100%;
+	background: #fafafa;
+	padding: 15rpx;
+	box-sizing: border-box;
+}
+.star_box{}
+.send_comment{
+	position: fixed;
+	bottom: 0;
+	left: 0;
+	background: #FFF;
+	width: 100%;
+	padding: 15rpx;
+	box-sizing: border-box;
+}
+.send_comment button{
+	float: right;
+	box-sizing: border-box;
+	display: block;
+	width: 280rpx;
+	background: #eab86a;
+	color: #FFF;
+	border-radius: 45px;
+	font-size: 32rpx;
+}
+
+.evaluateLv{
+	overflow: hidden;
+}
+.evaluateLv .list-item{
+	float: left;
+	    width: 34rpx;
+	    overflow: hidden;
+}
+.evaluateLv .list-item image{
+	    width: 34rpx;
+	    height: 68rpx;
+}
+.evaluateLv .star_txt{
+	line-height: 160rpx;
+	    font-size: 30rpx;
+	    padding-left: 50rpx;
+	    float: left;
+		color: #eab86a;
+}

+ 4 - 1
packageUser/pages/user/order/order.js

@@ -10,6 +10,9 @@ Page({
     rid = options.id
     this.getRadish()
   },
+  // onShow: function () {
+  //   this.getRadish()
+  // },
   getRadish () {
     var that = this
     var url = 'v1/order/' + rid
@@ -17,7 +20,7 @@ Page({
     }
     var success = function (res) {
       var data = res.data
-      
+      console.log('orderdata',data);
       var total = 0;
       for(var i in data.product_list){
       	total = total + (data.product_list[i].price * data.product_list[i].order_count)

+ 11 - 7
packageUser/pages/user/order/order.wxml

@@ -29,20 +29,23 @@
 	      <image class="order-main__left" src="{{item.cover}}"></image>
 	      <view class="order-main__right">
 	        <h6 class="ellipsisLn">
-	        	<b style="color:#F00" wx:if="{{item.is_zeng}}">[赠品]</b>
-	        {{item.name}}</h6>
+	        	<b style="color:#F00" wx:if="{{item.send}}">[赠品]</b>
+	        {{item.product_name}}</h6>
 	        <view class="order-info__title ellipsisLn">{{item.color_name}} {{item.size_name}}</view>
 	<!--         <view class="order-info__type ellipsis">{{item.detail}}</view> -->
 	        <view class="order-info__price" wx:if="{{order.order_type == 3}}">
-	          <text style="    color: #eab86a;font-size: 24rpx;" wx:if="{{order.status === 'unpay'}}">{{item.robo_balance_price / 100}} 积分</text>
-	          <text style="    color: #eab86a;font-size: 24rpx;" wx:if="{{order.status !== 'unpay'}}">{{item.robo_balance_price / 100}} 积分</text>
+	          <text style="    color: #eab86a;font-size: 24rpx;" wx:if="{{order.status === 'unpay'}}">{{item.price / 100}} 积分</text>
+	          <text style="    color: #eab86a;font-size: 24rpx;" wx:if="{{order.status !== 'unpay'}}">{{item.price / 100}} 积分</text>
 	        </view>
 	        <view class="order-info__price" wx:else>
-	        	<currency symbol="¥" value="{{item.robo_balance_price}}" wx:if="{{order.status === 'unpay'}}" />
-	          <currency symbol="¥" value="{{item.robo_balance_price}}" wx:if="{{order.status !== 'unpay'}}" />
+	        	<currency symbol="¥" value="{{item.price}}" wx:if="{{order.status === 'unpay'}}" />
+	          <currency symbol="¥" value="{{item.price}}" wx:if="{{order.status !== 'unpay'}}" />
 	        </view>
 	        
-	        <view class="order-info__count">x{{item.order_count}}</view>
+	        <view class="order-info__count">x{{item.count}}</view>
+			<view wx:if="{{!item.commend}}" class="order-btn__black">
+				<navigator url="/packageUser/pages/user/comment/comment?id={{item.id}}&pid={{item.product_id}}" open-type="navigate">商品评论 </navigator>
+			</view>
 	      </view>
 	      <view class="clean"></view>
 	    </view>
@@ -113,6 +116,7 @@
     </navigator>
     <view class="orderDetail-btn__red" bindtap="confirmPopup" wx:if="{{order.status === 'dispatch'}}">确认收货</view>
     <view class="orderDetail-btn__black" bindtap="CancelPopup" wx:if="{{order.status === 'unpay'}}">取消订单</view>
+	
 	<view wx:if="{{order.sign && order.express_order_no && order.express_code}}" class="orderDetail-btn__black">
 		<navigator url="/packageUser/pages/user/logistics/logistics?id={{order.order_id}}" open-type="navigate">查看物流 </navigator>
 	</view>

+ 14 - 1
packageUser/pages/user/order/order.wxss

@@ -85,7 +85,7 @@
   color: #bbbbbb;
 }
 .order-info__count {
-  position: absolute;
+  /* position: absolute; */
   bottom: 16rpx;
   right: 0;
   font-size: 24rpx;
@@ -226,4 +226,17 @@ overflow: hidden;
 margin: 5px 0;
 padding-top: 15px;
 font-size: 14px;
+}
+.order-btn__black {
+  float: right;
+  width: 158rpx;
+  height: 58rpx;
+  border: 1rpx solid #cccccc;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  text-align: center;
+  line-height: 58rpx;
+  margin-top: -15rpx;
+  margin-left: 20rpx;
+  border-radius: 5rpx;
 }

+ 17 - 0
packageUser/pages/user/orders/orders.js

@@ -33,6 +33,22 @@ Page({
       this.typeList()
       getApp().globalData.order = false
     }
+	
+	// if (rid) {
+	//   if (rid === 'unpay') {
+	//     this.tabUnpay()
+	//   } else if (rid === 'processing') {
+	//     this.tabProcessing()
+	//   } else if (rid === 'dispatch') {
+	//     this.tabDispatch()
+	//   } else if (rid === 'complete') {
+	//     this.tabComplete()
+	//   } else {
+	//     this.getOrderList()
+	//   }
+	// } else {
+	//   this.getOrderList()
+	// }
   },
   tabAll: function () {
     if (this.data.type !== '') {
@@ -171,6 +187,7 @@ Page({
         })
       }
       var result = that.data.list.concat(res.data.list || [])
+	  console.log('orderlist',result);
       that.setData({
         list: result
       })

+ 6 - 2
packageUser/pages/user/orders/orders.wxml

@@ -20,7 +20,7 @@
         <view class="order-main" wx:for="{{item.product_list}}" wx:for-item="nitem">
           <image class="order-main__left" src="{{nitem.cover}}"></image>
           <view class="order-main__right">
-            <view class="order-info__title ellipsisLn"><b style="color:#F00" wx:if="{{nitem.is_zeng}}">[赠品]</b>{{nitem.name}} <span wx:if="{{nitem.color_name || nitem.size_name}}">|</span> {{nitem.color_name}} {{nitem.size_name}}</view>
+            <view class="order-info__title ellipsisLn"><b style="color:#F00" wx:if="{{nitem.send}}">[赠品]</b>{{nitem.product_name}} <span wx:if="{{nitem.color_name || nitem.size_name}}">|</span> {{nitem.color_name}} {{nitem.size_name}}</view>
             <!-- <view class="order-info__type ellipsis">{{nitem.detail}}</view> -->
               <view class="order-info__price" wx:if="{{item.order_type == 3}}">
 			          <text style="    color: #eab86a;font-size: 24rpx;" wx:if="{{item.status === 'unpay'}}" >{{nitem.price / 100}} 积分</text>
@@ -31,7 +31,11 @@
               	<currency symbol="¥" value="{{nitem.price}}" wx:if="{{item.status !== 'unpay'}}" />
 			        </view>
               <!-- <currency wx:if="{{item.status == 'unpay' || item.pay_way == 'weixinpay'}}" symbol="¥" value="{{nitem.price}}"></currency><text style="color:#bbb"> <text wx:if="{{item.status == 'unpay' || item.pay_way == 'balance'}}"> <text wx:if="{{item.status == 'unpay'}}"> 或</text> {{nitem.price}}提货券</text></text><currency symbol="¥" value="{{nitem.price}}" ></currency><text class="order-info__point">(或{{nitem.price}}提货券)</text> -->
-            <view class="order-info__count">x{{nitem.order_count}}</view>
+            <view class="order-info__count">x{{nitem.count}}</view>
+			<view wx:if="{{!nitem.commend}}" class="order-btn__black">
+				<navigator url="/packageUser/pages/user/comment/comment?id={{nitem.id}}&pid={{nitem.product_id}}" open-type="navigate">商品评论 </navigator>
+			</view>
+			
           </view>
           <view class="clean"></view>
         </view>

+ 1 - 1
packageUser/pages/user/orders/orders.wxss

@@ -95,7 +95,7 @@
   color: #bbbbbb;
 }
 .order-info__count {
-  position: absolute;
+  /* position: absolute; */
   bottom: 16rpx;
   right: 0;
   font-size: 24rpx;

+ 890 - 0
pages/projects/project-comment/project-comment.js

@@ -0,0 +1,890 @@
+var width = 0
+var height = 0
+var ctx
+var _request = require('../../../utils/request.js')
+var _handle = require('../../../utils/handle.js')
+var WxParse = require('../../../utils/wxParse/wxParse.js')
+var util = require('../../../utils/accounting.min.js')
+var fomldsJSON = ''
+Page({
+  posterImage: {},
+  posterLoading: 0,
+  canvasLoading: false,
+  qcodeError: false,
+  data: {
+    productId: 0,
+    indicatorDots: false,
+    autoplay: false,
+    interval: 5000,
+    duration: 1000,
+    project: {},
+	projectComment:{},
+    showDialog: false,
+    showCartDialog: false,
+    animationData: {},
+    count: 1,
+    image: {},
+    bindTel: false,
+    balance: 0,
+    posterPopup: false,
+    posterImage: null,
+    imgindex: 1,
+    popup: false,
+    hour: '00',
+    min: '00',
+    second: '00',
+    timer: '',
+    leftTime: '0',
+    // msecond: '00',
+    clock: '',
+    todaysend: Date.parse(new Date()) / 1000,
+    showpay: true,
+    productSize:'',//产品规格
+    size_list:0,
+    color_list:0,
+    cname:'',
+    sname:'',
+    canpay:true,
+    checkbox:'',
+    noproduct:false,
+    check:{},
+	readOnly:0,
+	lvList:[
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png'
+  ],//星星个数
+  lvListActive1: '/images/star_a_l.png',//选中的
+  lvListActive2:'/images/star_d_l.png',//未选中的
+	lvListActive3: '/images/star_a_r.png',//选中的
+  lvListActive4:'/images/star_d_r.png',//未选中的
+  },
+  onLoad: function (options) {
+    this.data.productId = options.id;
+	// this.setData({
+	//   readOnly: options.read ? options.read : 0
+	// })
+    // this.getBalanceInfo()
+  },
+  onShow: function () {
+    // this.getIphoneX()
+    // this.getProjectDetail()
+	this.getProjectComment()
+    // this.check()
+  },
+  onHide: function () {
+    this.getneedshare()
+  },
+  dpi: function (val) {
+    return val
+  },
+  onSlideChangeEnd: function(e) {
+    var that = this;
+    that.setData({
+      imgindex: e.detail.current + 1
+    })
+  },
+  check () {
+    var that = this
+    var url = 'v1/user/check'
+    var params = {
+    }
+    var success = function (res) {
+    	that.setData({check:res.data})
+      if (res.data.user_id > 0) {
+        that.setData({
+          bindTel: true
+        })
+      }
+      if (res.data.wx_user_id > 0) {
+        that.getneedshare()
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  onShareAppMessage: function (val) {
+    this.shareInfo()
+    this.setData({
+      showpay: true
+    })
+    return _request.share({
+      title: this.data.project.share_content || this.data.project.name,
+      path: '/pages/start/start?url=pages/projects/project-detail/project-detail&id=' + this.data.productId,
+      imageUrl: this.data.project.share_img,
+      sc: 'xcx_product',
+      ri: this.data.productId,
+      rp: this.data.productId,
+    })
+  },
+  // imageLoad: function (e) {
+  //  var _width = e.detail.width,
+  //      _height = e.detail.height,
+  //      ratio = _width / _height;
+  //  var viewWidth = 750,
+  //      viewHeight = 750 / ratio;
+  //   var image = this.data.image;
+  //   image[e.target.dataset.index]={
+  //      width:viewWidth,
+  //      height:viewHeight
+  //   }
+  //   this.setData({
+  //     images:image
+  //   })
+  // },
+  shareInfo () {
+    var that = this
+    var url = "v1/share/info"
+    var params = {
+      sc: 'xcx_product',
+      ri: that.data.productId,
+      rp: that.data.productId,
+      to: 'group'
+    }
+    var success = function (val) {
+      console.log(val)
+    }
+    _request.$post(url, params, success)
+  },
+  detailImg: function (event) {
+    var src = event.currentTarget.dataset.src;
+    var imgList = event.currentTarget.dataset.list;
+    var imgLists = []
+    for (var i = 0; i < imgList.length; i++) {
+      imgLists.push(imgList[i].img)
+    }
+    wx.previewImage({
+      current: src,
+      urls: imgLists
+    })
+  },
+  getProjectDetail () {
+    var that = this
+    var url = "v1/product/" + that.data.productId;
+    var params = {}
+    var success = function (val) {
+      var p = val.data.detail
+      that.setData({
+        project: val.data,
+        clock: val.data.seckill_end
+      });
+      WxParse.wxParse('parse', 'html', p, that, 10)
+
+      if (val.data.seckill_state == 'seckill') {
+        that.starttime()
+      }
+      
+      if(val.data.have_size){
+      	that.getProductSize();
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  getProjectComment() {
+    var that = this
+    var url = "v1/product/" + that.data.productId +'/commends';
+    var params = {}
+    var success = function (val) {
+		var comdata = val.data.list;
+		console.log('comdata',comdata)
+		var showcom = [];
+		let index = 0;
+		for(let i in comdata){
+			// if(index<3){
+				comdata[i]['star'] = that.evaluateLvS(comdata[i].score * 2 / 10 - 1);
+				console.log("comdata[i]['star']",comdata[i]['star'])
+				showcom.push(comdata[i]);
+			// }
+			index++;
+		}
+		console.log('showcom',showcom)
+      that.setData({
+        projectComment: showcom
+      });
+    }
+    _request.$get(url, params, success)
+  },
+  getProductSize(){
+  	var that = this
+    var url = "v1/product_size/" + that.data.productId;
+    var params = {}
+    var success = function (val) {
+    	let cbox = [];
+    	for(let i in val.data){
+    		if(i != 'product' && val.data[i]) cbox.push(i);
+    	}
+    	console.log('cbox',cbox)
+      that.setData({
+        productSize: val.data,
+        checkbox:cbox
+      });
+    }
+    _request.$get(url, params, success)
+  },
+  getProductDetail () {
+    var that = this;
+    console.log(that.data.size_list);
+    console.log(that.data.color_list);
+    var url = "v1/product_detail/" + that.data.productId + "/" + that.data.size_list + "/" + that.data.color_list;
+    var params = {}
+    var success = function (val) {
+			console.log('val',val)
+			if(val.data.product){
+				that.setData({
+					canpay:true,
+					project:val.data.product,
+					productId:val.data.product.id,
+					noproduct:false
+				})
+				that.setData({
+					canpay:true,
+					project:val.data.product,
+					productId:val.data.product.id,
+					noproduct:false
+				})
+			}else{
+				that.setData({
+					canpay:false,
+					noproduct:true
+				})
+			}
+    }
+    var fail = function(err){
+    	
+    }
+    _request.$get(url, params, success, fail)
+  },
+  add: function () {
+    if (this.data.count < this.data.project.left_count) {
+      var count = this.data.count + 1
+      this.setData({
+        count: count
+      })
+    }
+  },
+  mius: function () {
+    if (this.data.count > 1) {
+      var count = this.data.count - 1
+      this.setData({
+        count: count
+      })
+    }
+  },
+  changeCount: function (val) {
+    var count = val.detail.value
+    if (count <= 0) {
+      this.setData({
+        count: 1
+      })
+    } else if (count > this.data.project.left_count) {
+      this.setData({
+        count: this.data.project.left_count
+      })
+    } else {
+      this.setData({
+        count: count
+      })
+    }
+  },
+  // 显示弹框
+  showModal: function (type) {
+    var animation = wx.createAnimation({
+      duration: 200,
+      timingFunction: "ease-out"
+    })
+    this.animation = animation
+    animation.translateY(500).step()
+    if(type == 1){
+    	this.setData({
+	      animationData: animation.export(),
+	      showDialog: true
+	    })
+    }else{
+    	this.setData({
+	      animationData: animation.export(),
+	      showCartDialog: true
+	    })
+    }
+    
+    setTimeout(function () {
+      animation.translateY(0).step()
+      this.setData({
+        animationData: animation.export()
+      })
+    }.bind(this), 200)
+  },
+  // 隐藏弹框
+  hideModal: function (type = 1) {
+    var animation = wx.createAnimation({
+      duration: 200,
+      timingFunction: "ease-out"
+    })
+    this.animation = animation
+    animation.translateY(500).step()
+    this.setData({
+      animationData: animation.export(),
+    })
+    setTimeout(function () {
+      animation.translateY(0).step()
+      if(type == 1){
+      	this.setData({
+	        animationData: animation.export(),
+	        showDialog: false
+	      })
+      }else{
+      	this.setData({
+	        animationData: animation.export(),
+	        showCartDialog: false
+	      })
+      }
+      
+    }.bind(this), 200)
+  },
+  getneedshare () {
+    var that = this
+    var url = "v1/product/" + that.data.productId + "/share"
+    var params = {
+    }
+    var success = function (val) {
+      if (val.data.need_share == 1) {
+        that.setData({
+          showpay: false
+        })
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  toPay: function (e) {
+    _handle.setFormId(e)
+    if (this.data.bindTel) {
+      var that = this
+      that.data.showDialog = !that.data.showDialog
+      if (that.data.showDialog) {
+        that.showModal(1)
+      } else {
+        that.hideModal(1)
+      }
+    } else {
+      wx.navigateTo({
+        url: '/packageUser/pages/user/bind/bind'
+      })
+    }
+  },
+  toCart: function (e) {
+    _handle.setFormId(e)
+    if (this.data.bindTel) {
+      var that = this
+      that.data.showCartDialog = !that.data.showCartDialog
+      if (that.data.showCartDialog) {
+        that.showModal(2)
+      } else {
+        that.hideModal(2)
+      }
+    } else {
+      wx.navigateTo({
+        url: '/packageUser/pages/user/bind/bind'
+      })
+    }
+  },
+  pay: function (e) {
+    _handle.setFormId(e)
+    var that = this
+    
+    //规格
+    let cflag = true;
+		for(let i in that.data.checkbox){
+			if(that.data[that.data.checkbox[i]] == 0) cflag = false;
+		}
+		if(!cflag){
+  		wx.showToast({
+        title: '请先选择商品规格~',
+        icon: 'none',
+        duration: 2000
+      })
+  		return false;
+		}
+    
+    var url = "v1/product/" + that.data.productId + "/order/" + that.data.count
+    var params = {}
+    var success = function (res) {
+      if (res.data.order_id) {
+        wx.navigateTo({
+          url: '../../pay/pay?orderId=' + res.data.order_id
+        })
+        that.hideModal()
+        that.setData({
+          count: 1
+        })
+      }
+    }
+    if (that.data.count <= that.data.project.left_count) {
+      _request.$post(url, params, success)
+    } else {
+      wx.showToast({
+        title: '库存不足~',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  addCart:function(){
+  	var that = this;
+  	//规格
+    let cflag = true;
+		for(let i in that.data.checkbox){
+			if(that.data[that.data.checkbox[i]] == 0) cflag = false;
+		}
+		if(!cflag){
+  		wx.showToast({
+        title: '请先选择商品规格~',
+        icon: 'none',
+        duration: 2000
+      })
+  		return false;
+		}
+  	console.log('that.data.productId',that.data.productId)
+    var url = "v1/cart/" + that.data.productId + "/" + that.data.count
+    var params = {}
+    var success = function (res) {
+    	if(res.data.result){
+    		that.hideModal(2);
+    		wx.showToast({
+	        title: '添加成功,请到购物车查看~',
+	        icon: 'none',
+	        duration: 2000
+	      })
+    	}
+//  	if (res.data.order_id) {
+//      wx.navigateTo({
+//        url: '../../pay/pay?orderId=' + res.data.order_id
+//      })
+//      that.hideModal()
+//      that.setData({
+//        count: 1
+//      })
+//    }
+    }
+    if (that.data.count <= that.data.project.left_count) {
+      _request.$post(url, params, success)
+    } else {
+      wx.showToast({
+        title: '库存不足~',
+        icon: 'none',
+        duration: 2000
+      })
+    }
+  },
+  getIphoneX () {
+    var that = this
+    wx.getSystemInfo({
+      success: function (res) {
+        if (res.model.toLowerCase().indexOf('iphone x') > -1) {
+          that.setData({
+            value: 34
+          })
+        }
+      }
+    })
+  },
+  getBalanceInfo () {
+    var that = this
+    var url = 'v1/user/balance/info'
+    var params = {
+    }
+    var success = function (res) {
+      var result = res.data.total
+      that.setData({
+        balance: result
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  projectImageLoading () {
+    var that = this
+    wx.getImageInfo({
+      src: 'https://cfohow.hiwavo.com/xcx/poster6.jpg',
+      success: function (res) {
+        that.posterImage.bg = res
+        that.posterLoading++
+        if (that.posterLoading === 4) {
+          that.createCtx()
+        }
+      }
+    })
+    if (this.data.project.pics.length > 0) {
+      wx.getImageInfo({
+        src: this.data.project.pics[0].img,
+        success: function (res) {
+          that.posterImage.project = res
+          that.posterLoading++
+          if (that.posterLoading === 4) {
+            that.createCtx()
+          }
+        }
+      })
+    }
+    var url = 'v1/poster/' + this.data.productId
+    var params = {
+      type: 'project'
+    }
+    var success = function (res) {
+      wx.getImageInfo({
+        src: res.data.qrcode_url,
+        success: function (res) {
+          that.posterImage.qcode = res
+          that.posterLoading++
+          if (that.posterLoading === 4) {
+            that.createCtx()
+          }
+        },
+        fail: function (res) {
+        	var url = 'v1/update/poster/' + that.data.productId
+			    var params = {
+			      type: 'project'
+			    }
+			    var success = function (res2) {
+			      wx.getImageInfo({
+			        src: res2.data.qrcode_url,
+			        success: function (res2) {
+			          that.posterImage.qcode = res2
+			          that.posterLoading++
+			          if (that.posterLoading === 4) {
+			            that.createCtx()
+			          }
+			        },
+			        fail: function (res2) {
+			          that.qcodeError = true
+			          if (that.data.posterPopup) {
+			            that.setData({
+			              posterPopup: false
+			            })
+			            wx.showToast({
+			              title: '海报生成失败,请稍后重试',
+			              icon: 'none',
+			              duration: 2000
+			            })
+			            wx.hideLoading()
+			          }
+			        }
+			      })
+			      wx.getImageInfo({
+			        src: res2.data.wx_head,
+			        success: function (res2) {
+			          that.posterImage.head = res2
+			          that.posterLoading++
+			          if (that.posterLoading === 4) {
+			            that.createCtx()
+			          }
+			        }
+			      })
+			    }
+			    _request.$put(url, params, success)
+        	
+//        that.qcodeError = true
+//        if (that.data.posterPopup) {
+//          that.setData({
+//            posterPopup: false
+//          })
+//          wx.showToast({
+//            title: '海报生成失败,请稍后重试',
+//            icon: 'none',
+//            duration: 2000
+//          })
+//          wx.hideLoading()
+//        }
+        }
+      })
+      wx.getImageInfo({
+        src: res.data.wx_head,
+        success: function (res) {
+          that.posterImage.head = res
+          that.posterLoading++
+          if (that.posterLoading === 4) {
+            that.createCtx()
+          }
+        }
+      })
+    }
+    _request.$get(url, params, success)
+  },
+  createPoster () {
+  	let that = this;
+  	if(this.data.check && this.data.check.wx_user_id && this.data.check.wx_user_id > 0 && this.data.check.user_id > 0){
+  		that.projectImageLoading()
+  	
+  	
+	    if (!this.qcodeError) {
+	      if (!this.canvasLoading) {
+	        wx.showLoading({
+	          mask: true,
+	          title: ''
+	        })
+	      }
+	      this.setData({
+	        posterPopup: true
+	      })
+	    } else {
+	      wx.showToast({
+	        title: '海报生成失败,请稍后重试',
+	        icon: 'none',
+	        duration: 2000
+	      })
+	    }
+  	}else{
+  		wx.showToast({
+	        title: '请先完成授权登录',
+	        icon: 'none',
+	        duration: 2000
+	      })
+  	}
+    
+  },
+  posterClose () {
+    this.setData({
+      posterPopup: false
+    })
+  },
+  createCtx () {
+    var that = this
+    ctx = wx.createCanvasContext('myCanvas')
+    ctx.drawImage(this.posterImage.bg.path, 0, 0, this.dpi(this.posterImage.bg.width), this.dpi(this.posterImage.bg.height))
+    ctx.drawImage(this.posterImage.qcode.path, this.dpi(501), this.dpi(1140), this.dpi(180), this.dpi(180))
+    ctx.save()
+      ctx.translate(this.dpi(44),this.dpi(46))
+      ctx.save()
+      ctx.arc(this.dpi(60), this.dpi(59), this.dpi(40), 0, Math.PI * 2, false)
+      ctx.lineWidth = 1
+      ctx.strokeStyle = '#d4d4d4'
+      ctx.stroke()
+      ctx.clip()
+      ctx.drawImage(this.posterImage.head.path, this.dpi(21), this.dpi(20), this.dpi(78), this.dpi(78))
+      ctx.restore()
+      ctx.save()
+      ctx.textBaseline = 'middle'
+      ctx.font = this.dpi(24) + 'px Arial'
+      ctx.fillStyle = '#eab86a'
+      ctx.fillText('源处全球源产地的优质产品!', this.dpi(136), this.dpi(59))
+      ctx.restore()
+      ctx.drawImage(this.posterImage.project.path, this.dpi(20), this.dpi(140), this.dpi(622), this.dpi(622))
+      ctx.beginPath()
+      ctx.moveTo(this.dpi(0), this.dpi(119))
+      ctx.lineTo(this.dpi(662), this.dpi(119))
+      ctx.lineWidth = 1
+      ctx.strokeStyle = '#eab86a'
+      ctx.stroke()
+      ctx.closePath()
+      ctx.save()
+      ctx.translate(this.dpi(20),this.dpi(784))
+      ctx.textBaseline = 'middle'
+      ctx.font = this.dpi(28) + 'px Arial'
+      ctx.fillStyle = '#bbbbbb'
+      ctx.fillText('购买单价', this.dpi(46), this.dpi(50))
+      ctx.fillStyle = '#eab86a'
+      ctx.setTextAlign('right')
+      ctx.font = 'bold ' + this.dpi(54) + 'px Arial'
+      ctx.fillText(util.formatMoney(this.data.project.price / 100, '¥', 2), this.dpi(584), this.dpi(50))
+      ctx.setTextAlign('left')
+      ctx.font = this.dpi(32) + 'px Arial'
+      ctx.fillStyle = '#2b2b2b'
+      this.textAutoLine(this.data.project.name, this.dpi(30), this.dpi(150), this.dpi(40))
+      ctx.restore()
+    ctx.restore()
+    ctx.draw(true, function callback () {
+      that.createImage()
+    })
+  },
+  createImage () {
+    var that = this
+    wx.canvasToTempFilePath({
+      destWidth: 750,
+      destHeight: 1334,
+      canvasId: 'myCanvas',
+      fileType: 'jpg',
+      success: function (res) {
+        that.setData({
+          posterImage: res.tempFilePath
+        })
+        that.canvasLoading = true
+        wx.hideLoading()
+      }
+    })
+  },
+  saveImage () {
+    var that = this
+    wx.showLoading({
+      mask: true,
+      title: ''
+    })
+    wx.saveImageToPhotosAlbum({
+      filePath: this.data.posterImage,
+      success (res) {
+        wx.showToast({
+          title: '已保存相册',
+          icon: 'success',
+          duration: 2000
+        })
+      },
+      fail (res) {
+        wx.getSetting({
+          success (res) {
+            if (!res.authSetting['scope.writePhotosAlbum']) {
+              that.setData({
+                popup: true
+              })
+            }
+          }
+        })
+        wx.hideLoading()
+      }
+    })
+  },
+  setting () {
+    this.setData({
+      popup: false
+    })
+  },
+  roundRect (x, y, w, h, r, color) {
+    ctx.beginPath()
+    ctx.moveTo(x+r, y)
+    ctx.arcTo(x+w, y, x+w, y+h, r)
+    ctx.arcTo(x+w, y+h, x, y+h, r)
+    ctx.arcTo(x, y+h, x, y, r)
+    ctx.arcTo(x, y, x+w, y, r)
+    ctx.closePath()
+    ctx.fillStyle = color
+    ctx.fill()
+  },
+  textAutoLine (str, initX, initY, lineHeight) {
+    let lineWidth = 0
+    let textWidth = this.dpi(580)
+    let lastSubStrIndex= 0
+    for (let i = 0; i < str.length; i++) {
+      lineWidth += ctx.measureText(str[i]).width
+      if (lineWidth > textWidth - initX) {
+        ctx.fillText(str.substring(lastSubStrIndex, i), initX, initY)
+        initY += lineHeight
+        lineWidth = 0
+        lastSubStrIndex = i
+      }
+      if (i === str.length - 1) {
+        ctx.fillText(str.substring(lastSubStrIndex, i + 1), initX, initY)
+      }
+    }
+  },
+  stopPageScroll () {
+    return
+  },
+  starttime () {
+    var that = this
+    that.setData({
+      timer: setInterval(function () {
+        // var date = new Date();
+        // var now = date.getTime();
+        // var endDate =  new Date("2019-01-03 23:14:53");//设置截止时间
+        // var end =  that.data.clock * 1000;//设置截止时间
+        // var end = endDate.getTime();
+        // var leftTime = end - now; //时间差
+        var t = Date.parse(new Date())
+        t = t / 1000;
+        var leftTime = that.data.clock - t
+        var d, h, m, s, ms;
+        if (leftTime >= 0) {
+          // day = parseInt(ctime / 86400)
+          h = parseInt(leftTime / 3600)
+          m = parseInt(leftTime / 60 ) - parseInt(leftTime / 3600) * 60
+          s = parseInt(leftTime) - parseInt(leftTime / 60 ) * 60
+          // d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
+          // h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
+          // m = Math.floor(leftTime / 1000 / 60 % 60);
+          // s = Math.floor(leftTime / 1000 % 60);
+          // ms = Math.floor(leftTime % 1000);
+          // ms = ms < 100 ? "0" + ms : ms
+          s = s < 10 ? "0" + s : s
+          m = m < 10 ? "0" + m : m
+          h = h < 10 ? "0" + h : h
+          that.setData({
+            hour: h,
+            min: m,
+            second: s,
+            // msecond: ms,
+            leftTime: leftTime
+          })
+        }
+        if (leftTime < 0) {
+          clearInterval(that.data.timer);
+          that.setData({
+            leftTime: 0,
+            hour: '00',
+            min: '00',
+            second: '00',
+            // msecond: '00'
+          })
+        }
+      },100),
+    });
+  },
+  checkSize(event){
+  	var type = event.currentTarget.dataset.type;
+  	var id = event.currentTarget.dataset.id;
+  	var list = event.currentTarget.dataset.list;
+  	var tname = event.currentTarget.dataset.tname;
+		var that = this;
+		var tkey = type=='color_list'?'cname':'sname';
+		var reproduct = this.data.productSize;
+//		console.log('reproduct',reproduct)
+		for(var i in reproduct[type]['attr_values']){
+//			console.log('reproduct[type][i].is_select',reproduct[type]['attr_values'][i].is_select)
+			reproduct[type]['attr_values'][i].is_select = false;
+			if(reproduct[type]['attr_values'][i].id == id) reproduct[type]['attr_values'][i].is_select = true;
+		}
+//		console.log('reproduct',reproduct)
+		
+		that.setData({
+			productSize :reproduct,
+			[type]:id,
+			[tkey]:tname
+	 })
+//		console.log('that.data[type]',that.data[type])
+		let cflag = true;
+		for(let i in that.data.checkbox){
+			if(that.data[that.data.checkbox[i]] == 0) cflag = false;
+		}
+		if(cflag){
+  		that.getProductDetail();
+		}
+
+  },
+  back:function(){
+	  wx.navigateBack({})
+  },
+  evaluateLvS(star){
+  	// console.log('star',star);
+  	var that = this;
+  	var lvList = that.data.lvList;
+  	let lvlist2 = [];
+  	lvList.forEach((item,index) => {
+  	// console.log('index',index);
+  		if(index <= star){
+  			if(index % 2 === 0){
+  				lvList[index] = that.data.lvListActive1; 
+  			}else{
+  				lvList[index] = that.data.lvListActive3; 
+  			}
+  		}else{
+  			if(index % 2 === 0){
+  				lvList[index] = that.data.lvListActive2; 
+  			}else{
+  				lvList[index] = that.data.lvListActive4; 
+  			}
+      }
+  		lvlist2.push(lvList[index]);
+   })
+  	return lvlist2;
+  }
+})

+ 8 - 0
pages/projects/project-comment/project-comment.json

@@ -0,0 +1,8 @@
+{
+  "navigationBarTitleText": "商品评价",
+  "usingComponents": {
+    "currency": "../../../component/currency/currency",
+    "format-time": "../../../component/formatTime/formatTime"
+  },
+  "backgroundColor": "#f3f3f3"
+}

+ 30 - 0
pages/projects/project-comment/project-comment.wxml

@@ -0,0 +1,30 @@
+<import src="../../../utils/wxParse/wxParse.wxml"/>
+<view class="app detail-bg">
+  
+  <view class="comment_box">
+	  <view class="comment_box_list">
+		  <view class="comment_list" wx:for="{{projectComment}}">
+				<image src="{{item.head}}"></image>
+				<view class="comment_user">
+					{{item.nick_name}}
+					<view class="comment_star">
+						<view class="evaluateLv"><view class="list-item" wx:for="{{item.star}}" wx:for-item="item2"><image class="block" src="{{item2}}"></image></view></view>
+					</view>
+				</view>
+				<p class="comment_txt">{{item.detail}}</p>
+				<span class="comment_time"><format-time type="formatTime" value="{{item.create_time}}" ></format-time></span>
+		  </view>
+		  <!-- <view class="comment_list">
+				<image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/parner.png"></image>
+				<view class="comment_user">
+					name
+					<view class="comment_star">
+						<view class="evaluateLv"><view class="list-item" wx:for="{{lvList}}" wx:key="item"><image class="block" src="{{item}}" data-index="{{index}}"></image></view></view>
+					</view>
+				</view>
+				<p class="comment_txt">asdfasdfasdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</p>
+				<span class="comment_time">2021-2-2 11:11:11</span>
+		  </view> -->
+		</view>
+  </view>
+  </view>

+ 673 - 0
pages/projects/project-comment/project-comment.wxss

@@ -0,0 +1,673 @@
+@import "../../../utils/wxParse/wxParse.wxss";
+.detail-bg {
+  width: 100%;
+  min-height: 100%;
+  background-color: #f2f4f6;
+  overflow-y: hidden;
+}
+.detail-swiper {
+  height: 750rpx;
+  position: relative;
+}
+.detail-info {
+  width: 100%;
+  background-color: #fff;
+  margin-bottom: 30rpx;
+  padding-bottom: 20rpx;
+}
+.detail-img {
+  width: 100%;
+  height: 750rpx;
+}
+.detail-width {
+  width: 100%;
+  margin: 0 auto;
+  padding: 0 21rpx;
+  box-sizing: border-box;
+}
+.detail-title {
+  display: block;
+  font-size: 32rpx;
+  line-height: 48rpx;
+  letter-spacing: 0;
+  color: #4c4c4c;
+  margin-top: 10rpx;
+  margin-bottom: 10rpx;
+  padding-right:70px;
+}
+.detail-normal {
+  display: inline-block;
+  font-size: 24rpx;
+  color: #bbbbbb;
+}
+.detail-mr {
+  margin-right: 15rpx;
+}
+.detail-price {
+  font-size: 40rpx;
+  color: #eab86a;
+}
+.detail-fl {
+  float: left;
+}
+.detail-fr {
+  float: right;
+}
+.detail-content-title {
+  font-size: 28rpx;
+  text-align: center;
+  display: block;
+  color: #999999;
+  margin-bottom: 30rpx;
+}
+.detail-project-img {
+  width: 100%;
+  display: flex;
+  flex-direction: column;
+}
+.detail-footer {
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  z-index: 1;
+}
+.detail-footer-bar {
+  width: 100%;
+  height: 88rpx;
+  background-color: #FFF;
+  line-height: 44rpx;
+  display: -webkit-box;
+  display: flex;
+  text-align: center;
+}
+.detail-footer-item {
+  display: block;
+  flex: 0.5;
+  height: 88rpx;
+  color: #999;
+  font-size: 28rpx;
+  overflow: hidden;
+}
+.detail-footer-icon {
+  width: 40rpx;
+  height: 40rpx;
+  display: block;
+  margin: 0 auto;
+  padding-top: 12rpx;
+}
+.detail-footer-text {
+  font-size: 20rpx;
+  color: #4c4c4c;
+  position:relative;
+  top:-8rpx;
+}
+.detail-yellow {
+  width: 282rpx;
+  color: #fff;
+  line-height: 88rpx;
+  background:#eab86a;
+}
+.detail-red {
+  color: #fff;
+  font-size: 28rpx;
+  line-height: 88rpx;
+  background: -webkit-linear-gradient(left, #fe5656, #e23232);
+  background: linear-gradient(to right, #fe5656, #e23232);
+}
+.detail-black {
+  width: 282rpx;
+  color: #fff;
+  line-height: 88rpx;
+  background: -webkit-linear-gradient(left, #d8dfe5, #aab6c2);
+  background: linear-gradient(to right, #d8dfe5, #aab6c2);
+}
+.detail-content {
+  margin-bottom: 112rpx;
+}
+.detail-dialog {
+  position: fixed;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0,0,0,0.4);
+  z-index: 99;
+}
+.dialog-panel {
+  position: fixed;
+  bottom: 0;
+  width: 100%;
+  background: #fff;
+  z-index: 100;
+}
+.dialog-project {
+  position: relative;
+  padding-top: 20rpx;
+}
+.dialog-content {
+  padding-bottom: 20rpx;
+  border-bottom: 1rpx solid #eee;
+}
+.dialog-info {
+  float: left;
+  margin-top: 80rpx;
+}
+.dialog-img {
+  float: left;
+  width: 220rpx;
+  height: 220rpx;
+  margin: 0 20rpx;
+}
+.dialog-word {
+  font-size: 28rpx;
+}
+.dialog-red {
+  color: #eab86a;
+  margin-bottom: 20rpx;
+}
+.dialog-gray {
+  color: #bbb;
+  margin-bottom: 10rpx;
+}
+.dialog-black {
+  color: #4c4c4c;
+}
+.dialog-btn {
+  width: 100%;
+  height: 88rpx;
+  line-height: 88rpx;
+  background: #eab86a;
+  color: #fff;
+  font-size: 28rpx;
+  text-align: center;
+  border-radius: 0rpx;
+}
+.select-count {
+  width: 100%;
+  margin-top: 30rpx;
+  padding: 0 20rpx;
+  box-sizing: border-box;
+  margin-bottom: 30rpx;
+}
+.select-word {
+  float: left;
+  font-size: 24rpx;
+  color: #4c4c4c;
+  line-height: 66rpx;
+}
+.select-input {
+  float: right;
+  height: 66rpx;
+  font-size: 0;
+}
+.select-input button {
+  width: 60rpx;
+  height: 66rpx;
+  color: #999;
+  font-size: 48rpx;
+  text-align: center;
+  padding: 0;
+  display: inline-block;
+  background: #fff;
+  border-radius: 0;
+  line-height: 50rpx;
+  box-sizing: border-box;
+}
+/*.select-input button:first-child {
+  border-top-right-radius: 0;
+  border-bottom-right-radius: 0;
+}
+.select-input button:last-child {
+  border-top-left-radius: 0;
+  border-bottom-left-radius: 0;
+}*/
+.select-input button:after {
+  border-radius: 0;
+}
+.select-input input {
+  width: 154rpx;
+  height: 66rpx;
+  background-color: #f3f3f3;
+  color: #4c4c4c;
+  font-size: 28rpx;
+  text-align: center;
+  display: inline-block;
+  border-radius: 0;
+}
+.dialog-cancel {
+  position: absolute;
+  right: 20rpx;
+  top: 20rpx;
+  width: 36rpx;
+  height: 36rpx;
+}
+.detail-content-desc {
+  width: 100%;
+  padding: 0 20rpx 40rpx;
+  box-sizing: border-box;
+  font-size: 28rpx;
+  color: #4c4c4c;
+  line-height: 48rpx;
+  text-align: justify;
+}
+.detail-parse {
+  font-size: 28rpx;
+  color: #4c4c4c;
+  line-height: 48rpx;
+  padding: 0rpx 20rpx;
+}
+.detail-green {
+  position: absolute;
+  left: 26rpx;
+  top: 0;
+  width: 124rpx;
+  height: 172rpx;
+  z-index: 10;
+  background-image: url('https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/geend.png');
+  background-size: 100% 100%;
+}
+.p-footer-icon {
+  width: 40rpx;
+  height: 40rpx;
+  display: block;
+  margin: 0 auto;
+  padding-top: 12rpx;
+}
+.p-footer-text {
+  font-size: 20rpx;
+  color: #4c4c4c;
+  position:relative;
+  top:-8rpx;
+}
+.popup-bg {
+  position: fixed;
+  left: 0;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background-color: rgba(0,0,0,0.5);
+  z-index: 99;
+}
+.popup {
+  position: absolute;
+  left: 50%;
+  top: 300rpx;
+  margin-left: -280rpx;
+  width: 560rpx;
+  height: 440rpx;
+  background-color: #fff;
+  border-radius: 10rpx;
+  overflow: hidden;
+}
+.popup-title {
+  text-align: center;
+  line-height: 32rpx;
+  font-size: 32rpx;
+  padding-top: 30rpx;
+  padding-bottom: 32rpx;
+  color: #4c4c4c;
+  font-weight: bold;
+}
+.popup-logobg {
+  width: 110rpx;
+  height: 110rpx;
+  border-radius: 100%;
+  background-color: #f7f7f7;
+  margin: 0 auto;
+  border:1rpx solid #cfcfcf;
+}
+.popup-image {
+  display: block;
+  width: 67rpx;
+  height: 90rpx;
+  background-image: url('https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/startlogo.png');
+  background-size: 100% 100%;
+  margin: 8rpx auto 0;
+}
+.popup-hint {
+  display: block;
+  font-size: 28rpx;
+  color: #999999;
+  text-align: center;
+  line-height: 50rpx;
+  padding-top: 20rpx;
+}
+.popup-bottom {
+  border:0;
+  border-radius: 0rpx;
+  position: absolute;
+  bottom: 0;
+  width: 100%;
+  height: 88rpx;
+  line-height: 88rpx;
+  left: 0;
+  border-top: 1rpx solid #cccccc;
+  text-align: center;
+  font-size: 32rpx;
+  color: #39a43c;
+}
+.canvas-position {
+  position: absolute;
+  left: 100%;
+  top: 0;
+  width: 0rpx;
+  height: 0rpx;
+  /*overflow: hidden;*/
+}
+.poster {
+  position: fixed;
+  top: 0;
+  width: 100%;
+  height: 100%;
+  background: rgba(0,0,0,0.4);
+  z-index: 99;
+}
+.poster-main {
+  position: absolute;
+  left: 0;
+  bottom: 0;
+  width: 100%;
+  height: 1008rpx;
+  background-color: #fff;
+}
+.poster-img {
+  display: block;
+  width: 375rpx;
+  height: 677rpx;
+  margin: 0 auto;
+  border-radius: 20rpx;
+  box-shadow: 0 10rpx 30rpx rgba(0,0,0,0.3);
+}
+.poster-close {
+  position: absolute;
+  width: 24rpx;
+  height: 24rpx;
+  top: 45rpx;
+  right: 44rpx;
+  background-image: url('https://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/poster/close.png');
+  background-size: 24rpx 24rpx;
+  background-origin: content-box;
+  background-repeat: no-repeat;
+  padding: 30rpx;
+}
+.poster-text {
+  text-align: center;
+  color: #444444;
+  font-size: 30rpx;
+  padding-top: 40rpx;
+}
+.poster-btn {
+  width: 336rpx;
+  height: 96rpx;
+  margin: 30rpx auto 0;
+  background: linear-gradient(to right, #d4932b , #eab86a);
+  border-radius: 96rpx;
+}
+.poster-icon {
+  float: left;
+  width: 40rpx;
+  height: 40rpx;
+  margin-left: 106rpx;
+  margin-top: 26rpx;
+  background-image: url('http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/poster/download.png');
+  background-size: 100% 100%;
+}
+.poster-save {
+  float: left;
+  line-height: 96rpx;
+  font-size: 32rpx;
+  color: #fff;
+  padding-left: 15rpx;
+}
+.seckill-top {
+  position: relative;
+}
+.seckill-title {
+  width: 100%;
+  height: 66rpx;
+  background: -webkit-linear-gradient(left, #ff5c5c, #ff7a67, #ff9a73);
+  background: -o-linear-gradient(right, #ff5c5c, #ff7a67, #ff9a73);
+  background: -moz-linear-gradient(right, #ff5c5c, #ff7a67, #ff9a73);
+  background: linear-gradient(to right, #ff5c5c, #ff7a67, #ff9a73);
+  margin: 0 auto;
+  /* border-radius: 5rpx; */
+  box-sizing: border-box;
+  padding: 0 20rpx;
+}
+.seckill-img {
+  display: block;
+  width: 220rpx;
+  height: 70rpx;
+  position: absolute;
+  left: 20rpx;
+  top: -3rpx;
+}
+.time-text {
+  color: #594848;
+  font-size: 28rpx;
+  float: right;
+  line-height: 66rpx;
+  height: 66rpx;
+  padding-right: 20rpx;
+}
+.time-click {
+  float: right;
+  /* line-height: 58rpx; */
+  margin-top: 13rpx;
+  /* height: 58rpx; */
+  font-size: 20rpx;
+  color: #fff;
+}
+.time-item {
+  float: right;
+  margin-right: 5rpx
+}
+.time-kuang {
+  background: #594848;
+  height: 42rpx;
+  width: 39rpx;
+  text-align: center;
+  line-height: 42rpx;
+  font-size: 24rpx;
+}
+.time-kuang1 {
+  background: #594848;
+  height: 42rpx;
+  width: 59rpx;
+  text-align: center;
+  line-height: 42rpx;
+  margin-left: 10rpx;
+  font-size: 24rpx;
+}
+.time-color {
+  color: #614f4f;
+  font-size: 24rpx;
+}
+.mokuai {
+  width: 65rpx;
+  height: 65rpx;
+  background: #000;
+  opacity: 0.5;
+  text-align: center;
+  color: #fff;
+  font-size: 20rpx;
+  line-height: 65rpx;
+  border-radius: 50%;
+  position: absolute;
+  top: 650rpx;
+  right: 20rpx;
+}
+.detail-pass {
+  color: #4c4c4c;
+  font-size: 24rpx;
+  text-decoration: line-through;
+  padding-left: 20rpx;
+}
+.detail-icon {
+  width: 32rpx;
+  height: 32rpx;
+  display: inline-block;
+  margin-right: 10rpx;
+}
+.detail-stop {
+  height: 70rpx;
+  width: 710rpx;
+  background: #ffefe4;
+  color: #ff9434;
+  font-size: 24rpx;
+  text-align: center;
+  line-height: 70rpx;
+  margin: 20rpx auto 10rpx;
+  border-radius: 10rpx;
+}
+.detail-no {
+  /* height: 300rpx; */
+  width: 100%;
+  background: #eaeef1;
+  padding: 20rpx 20rpx 30rpx;
+  box-sizing: border-box;
+  margin-bottom: 20rpx;
+}
+.detail-no-img {
+  width: 28rpx;
+  height: 34rpx;
+  float: left;
+  padding-top: 10rpx;
+}
+.detail-no-img1 {
+  width: 36rpx;
+  height: 36rpx;
+  float: left;
+  padding-top: 10rpx;
+}
+.detail-no-text {
+  font-size: 32rpx;
+  color: #8d99af;
+  float: right;
+  width: 640rpx;
+  line-height: 50rpx;
+}
+.detail-no-first {
+  border-bottom: #d4d9dd solid 1rpx;
+  box-sizing: border-box;
+  padding-top: 10rpx;
+  padding-bottom: 20rpx;
+  margin-bottom: 30rpx;
+}
+
+
+.sharebtn{
+position: absolute;
+margin-top: -32px;
+right: 0;
+font-size: 14px;
+background: rgba(0,0,0,0.05);
+padding-left: 10px;
+border-radius: 45px 0 0 45px;
+height: 30px;
+line-height: 30px;
+color: #eab86a;
+}
+.sharebtn image{
+width: 20px;
+height: 20px;
+vertical-align: middle;
+margin-top: -2px;
+margin-right: 2px;
+
+}
+
+.wxParse-p image{
+	width:100% !important;
+}
+
+.sizeTitle{display: block;font-size:24rpx}
+.checkList{display: inline-block;}
+.checkList span{
+display: inline-block;
+padding: 12rpx;
+margin: 15rpx;
+text-align: center;
+min-width: 45rpx;
+background: #eee;
+font-size:24rpx;
+}
+.checkList span.active{
+	background:#eab86a;
+	color:#FFF;
+}
+
+
+.comment_box{
+	    background: #FFF;
+	    padding: 15rpx;
+}
+.comment_head{
+	    background: #FFF;
+	    margin: 0 15rpx;
+	    padding: 15rpx;
+}
+.comment_box_list{
+}
+.showmore{
+    display: inline;
+    float: right;
+    font-size: 26rpx;
+    padding-top: 3rpx;
+    color: #eab86a;
+}
+.comment_head h4{}
+.comment_head h4 span{}
+.comment_list{
+padding: 15rpx;
+    background: #f9f9f9;
+    margin: 10rpx 0;
+width: 100%;
+    position: relative;
+    float: left;
+	box-sizing: border-box;
+}
+.comment_list image{
+	width: 80rpx;
+	    height: 80rpx;
+	    border-radius: 50%;
+	    display: inline-block;
+}
+.comment_user{
+	display: inline-block;
+	    padding: 0 15rpx;
+	    color: #666;
+}
+.comment_star{}
+.comment_txt{
+display: block;
+    color: #666;
+}
+.comment_time{
+	position: absolute;
+right: 50rpx;
+top: 25rpx;
+    font-size: 18rpx;
+}
+
+.evaluateLv{
+	overflow: hidden;
+	display: inline;
+}
+.evaluateLv .list-item{
+    float: left;
+    width: 12rpx;
+    overflow: hidden;
+}
+.evaluateLv .list-item image{
+width: 14rpx;
+    height: 26rpx;
+	border-radius: 0;
+}
+.evaluateLv .star_txt{
+	line-height: 160rpx;
+	    font-size: 30rpx;
+	    padding-left: 50rpx;
+	    float: left;
+		color: #eab86a;
+}

+ 68 - 1
pages/projects/project-detail/project-detail.js

@@ -18,6 +18,7 @@ Page({
     interval: 5000,
     duration: 1000,
     project: {},
+	projectComment:{},
     showDialog: false,
     showCartDialog: false,
     animationData: {},
@@ -47,7 +48,23 @@ Page({
     checkbox:'',
     noproduct:false,
     check:{},
-	readOnly:0
+	readOnly:0,
+	lvList:[
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+    '/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png',
+		'/images/star_a_l.png',
+    '/images/star_a_r.png'
+  ],//星星个数
+  lvListActive1: '/images/star_a_l.png',//选中的
+  lvListActive2:'/images/star_d_l.png',//未选中的
+	lvListActive3: '/images/star_a_r.png',//选中的
+  lvListActive4:'/images/star_d_r.png',//未选中的
   },
   onLoad: function (options) {
     this.data.productId = options.id;
@@ -59,6 +76,7 @@ Page({
   onShow: function () {
     this.getIphoneX()
     this.getProjectDetail()
+	this.getProjectComment()
     this.check()
   },
   onHide: function () {
@@ -168,6 +186,31 @@ Page({
     }
     _request.$get(url, params, success)
   },
+  getProjectComment() {
+    var that = this
+    var url = "v1/product/" + that.data.productId +'/commends';
+    var params = {}
+    var success = function (val) {
+		var comdata = val.data.list;
+		// console.log('comdata',comdata)
+		var showcom = [];
+		let index = 0;
+		for(let i in comdata){
+			if(index<3){
+				console.log('comdata[i].score * 2 / 10 - 1',comdata[i].score * 2 / 10 - 1)
+				comdata[i]['star'] = that.evaluateLvS(comdata[i].score * 2 / 10 - 1);
+				console.log("comdata[i]",comdata[i])
+				showcom.push(comdata[i]);
+			}
+			index++;
+		}
+		console.log('showcom',showcom)
+      that.setData({
+        projectComment: showcom
+      });
+    }
+    _request.$get(url, params, success)
+  },
   getProductSize(){
   	var that = this
     var url = "v1/product_size/" + that.data.productId;
@@ -820,5 +863,29 @@ Page({
   },
   back:function(){
 	  wx.navigateBack({})
+  },
+  evaluateLvS(star){
+	// console.log('star',star);
+  	var that = this;
+	var lvList = that.data.lvList;
+	let lvlist2 = [];
+  	lvList.forEach((item,index) => {
+  	// console.log('index',index);
+  		if(index <= star){
+  			if(index % 2 === 0){
+  				lvList[index] = that.data.lvListActive1; 
+  			}else{
+  				lvList[index] = that.data.lvListActive3; 
+  			}
+  		}else{
+  			if(index % 2 === 0){
+  				lvList[index] = that.data.lvListActive2; 
+  			}else{
+  				lvList[index] = that.data.lvListActive4; 
+  			}
+      }
+		lvlist2.push(lvList[index]);
+   })
+	return lvlist2;
   }
 })

+ 33 - 0
pages/projects/project-detail/project-detail.wxml

@@ -83,6 +83,39 @@
       <view class="detail-no-text">不发货地区 : {{project.no_delivery_area}}</view>
     </view>
   </view>
+  
+  <view class="comment_head">
+	  <h4>
+			商品评价
+			<navigator url="../project-comment/project-comment?id={{project.id}}" open-type="navigate" class="showmore">查看更多 > </navigator>
+	  </h4>
+  </view>
+  <view class="comment_box">
+	  <view class="comment_box_list">
+		  <view class="comment_list" wx:for="{{projectComment}}">
+				<image src="{{item.head}}"></image>
+				<view class="comment_user">
+					{{item.nick_name}}
+					<view class="comment_star">
+						<view class="evaluateLv"><view class="list-item" wx:for="{{item.star}}" wx:for-item="item2"><image class="block" src="{{item2}}"></image></view></view>
+					</view>
+				</view>
+				<p class="comment_txt">{{item.detail}}</p>
+				<span class="comment_time"><format-time type="formatTime" value="{{item.create_time}}" ></format-time></span>
+		  </view>
+		  <!-- <view class="comment_list">
+				<image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/parner.png"></image>
+				<view class="comment_user">
+					name
+					<view class="comment_star">
+						<view class="evaluateLv"><view class="list-item" wx:for="{{lvList}}" wx:key="item"><image class="block" src="{{item}}" data-index="{{index}}"></image></view></view>
+					</view>
+				</view>
+				<p class="comment_txt">asdfasdfasdffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</p>
+				<span class="comment_time">2021-2-2 11:11:11</span>
+		  </view> -->
+		</view>
+  </view>
 
   <view class="detail-content">
     <text class="detail-content-title">———— 商品详情 ————</text>

+ 79 - 0
pages/projects/project-detail/project-detail.wxss

@@ -595,4 +595,83 @@ font-size:24rpx;
 .checkList span.active{
 	background:#eab86a;
 	color:#FFF;
+}
+
+
+.comment_box{
+	    background: #FFF;
+	    margin: 0 15rpx;
+	    padding: 15rpx;
+}
+.comment_head{
+	    background: #FFF;
+	    margin: 0 15rpx;
+	    padding: 15rpx;
+}
+.comment_box_list{
+	width: 1160rpx;
+}
+.showmore{
+    display: inline;
+    float: right;
+    font-size: 26rpx;
+    padding-top: 3rpx;
+    color: #eab86a;
+}
+.comment_head h4{}
+.comment_head h4 span{}
+.comment_list{
+padding: 15rpx;
+    background: #f9f9f9;
+    margin: 0 25rpx 0 0;
+width: 320rpx;
+    position: relative;
+    float: left;
+}
+.comment_list image{
+	width: 80rpx;
+	    height: 80rpx;
+	    border-radius: 50%;
+	    display: inline-block;
+}
+.comment_user{
+	display: inline-block;
+	    padding: 0 15rpx;
+	    color: #666;
+}
+.comment_star{}
+.comment_txt{
+display: block;
+    color: #666;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}
+.comment_time{
+	position: absolute;
+	    right: 15rpx;
+top: 25rpx;
+    font-size: 18rpx;
+}
+
+.evaluateLv{
+	overflow: hidden;
+	display: inline;
+}
+.evaluateLv .list-item{
+    float: left;
+    width: 12rpx;
+    overflow: hidden;
+}
+.evaluateLv .list-item image{
+width: 14rpx;
+    height: 26rpx;
+	border-radius: 0;
+}
+.evaluateLv .star_txt{
+	line-height: 160rpx;
+	    font-size: 30rpx;
+	    padding-left: 50rpx;
+	    float: left;
+		color: #eab86a;
 }