Procházet zdrojové kódy

取消专区分享

junyuanz před 4 roky
rodič
revize
0dcede34ef

+ 2 - 1
app.json

@@ -16,6 +16,7 @@
     "pages/helpfarm/othercustom/othercustom",
     "pages/helpfarm/group/group",
     "pages/projects/project-detail/project-detail",
+    "pages/projects/project-detail-noshare/project-detail-noshare",
     "pages/projects/project-comment/project-comment",
     "pages/projects/project-success/project-success",
     "pages/pay/pay",
@@ -132,7 +133,7 @@
   "sitemapLocation": "sitemap.json",
   "plugins": {
 	    "live-player-plugin": {
-	        "version": "1.2.9",
+	        "version": "1.2.10",
 	        "provider": "wx2b03c6e691cd7370"
 	    }
 	}

+ 80 - 2
pages/areacart/areacart.js

@@ -17,7 +17,8 @@ Page({
     currentX: 0,
     perpage:10,
     nowpage:1,
-    cartMore:true
+    cartMore:true,
+	showDialog: false,
   },
   handleMovableChange: function(e) {
     // this.data.currentX = e.detail.x;
@@ -47,6 +48,7 @@ Page({
 	this.getCartList();
   	this.setData({submitlock: false});
   	this.setData({selectedall: false});
+	this.getIphoneX()
   },
   onShow: function () {
 //	this.getCartListAndSelected();
@@ -402,7 +404,83 @@ Page({
   toProject:function(val){
 	  var id = val.currentTarget.dataset.val
 	  wx.navigateTo({
-	    url: '/pages/projects/project-detail/project-detail?id=' + id + '&read=1'
+	    url: '/pages/projects/project-detail-noshare/project-detail-noshare?id=' + id + '&read=1'
 	  })
+  },
+  getIphoneX () {
+    var that = this
+    wx.getSystemInfo({
+      success: function (res) {
+        if (res.model.toLowerCase().indexOf('iphone x') > -1) {
+          that.setData({
+            value: 34
+          })
+        }
+      }
+    })
+  },
+  selectSize:function(val){
+	  var that = this
+	  var id = val.currentTarget.dataset.val
+	  that.setData({
+	    selectProjectid: id
+	  });
+	  
+	  console.log('id',id);
+	  that.getProjectDetail();
+	  that.getProductSize();
+	  
+	  var animation = wx.createAnimation({
+	    duration: 200,
+	    timingFunction: "ease-out"
+	  })
+	  this.animation = animation
+	  animation.translateY(500).step()
+	  this.setData({
+		animationData: animation.export(),
+		showDialog: true
+	  })
+	  
+	  setTimeout(function () {
+	    animation.translateY(0).step()
+	    this.setData({
+	      animationData: animation.export()
+	    })
+	  }.bind(this), 200)
+	  
+	  
+	  
+  },
+  getProjectDetail() {
+    var that = this
+    var url = "v1/product/" + that.data.selectProjectid;
+    var params = {}
+    var success = function (val) {
+      var p = val.data.detail
+      that.setData({
+        selectProject: val.data
+      });
+      if(val.data.have_size){
+      	that.getProductSize();
+      }
+    }
+    _request.$get(url, params, success)
+  },
+  getProductSize(){
+  	var that = this
+    var url = "v1/product_size/" + that.data.selectProjectid;
+    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({
+        selectProjectSize: val.data,
+        checkbox:cbox
+      });
+    }
+    _request.$get(url, params, success)
   }
 })

+ 30 - 1
pages/areacart/areacart.wxml

@@ -62,6 +62,9 @@
 										<p>{{pack.item_title}} x{{pack.nums}}</p>
 									</view>
 								</view>
+								<!-- <view wx:if="{{item.have_size}}">
+									<view class="typeselect" bindtap="selectSize" data-val="{{item.id}}">未选择规格</view>
+								</view> -->
 						        <view class="cartlist_type">零售价:<currency symbol="¥" value="{{item.user_sale_price}}" /> </view>
 						        <currency class="cartlist_price" symbol="¥" value="{{item.price}}" />
 						        <view class="cartlist_num">
@@ -165,4 +168,30 @@
     <view class="btn-confirm" bindtap="onConfirm" data-status="confirm">前往兑换</view>
   </view>
 </view>
--->
+-->
+
+<view wx:if="{{showDialog}}">
+  <view class="dialog-panel" animation="{{animationData}}" style="padding-bottom: {{value}}rpx;">
+    <view class="dialog-project">
+      <image class="dialog-cancel" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/cancel.png" bindtap="toPay"></image>
+      <view class="dialog-content">
+        <image class="dialog-img" src="{{selectProject.pics[0].img}}"></image>
+        
+        <view class="dialog-info" style="margin-top: 20rpx;">
+          <h6 style="font-size: 35rpx;font-weight: bold;color: #666;">{{selectProject.name}}</h6>
+          <view class="dialog-word dialog-black" style="margin-top: 15rpx;color: #999;">库存{{selectProject.left_count}}件   <text wx:if="{{selectProject.have_size && (sname || cname)}}">(已选:{{cname}} {{sname}})</text></view>
+          <view class="dialog-word dialog-red" style="font-size: 35rpx;margin-top: 25rpx;">
+            <currency symbol="¥" value="{{selectProject.price}}"></currency>
+          </view>
+        </view>
+        <view class="clean"></view>
+      </view>
+
+      <form bindsubmit="pay" report-submit="{{true}}" >
+        <button class="dialog-btn" formType="submit" wx:if="{{showpay}}" disabled="{{canpay?'':'true'}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
+      </form>
+      <button class="dialog-btn" open-type="share" wx:if="{{!showpay}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
+    </view>
+  </view>
+  <view class="detail-dialog" bindtap="toPay"></view>
+</view>

+ 10 - 0
pages/areacart/areacart.wxss

@@ -578,4 +578,14 @@ movable-view {
 	    line-height: 36rpx;
 	    color: #666;
 		margin: 10rpx 0 ;
+}
+
+.typeselect{
+font-size: 22rpx;
+    border: 1px solid #ddd;
+    display: inline-block;
+    padding: 3rpx 35rpx;
+    border-radius: 45px;
+    color: #666;
+    margin-top: 5rpx;
 }

+ 1 - 1
pages/centcart/centcart.wxml

@@ -72,7 +72,7 @@
 										<p>{{pack.item_title}} x{{pack.nums}}</p>
 									</view>
 								</view>
-						        <view class="cartlist_type">零售价:{{item.user_sale_price / 100}} 积分</view>
+						        <view class="cartlist_type"><!-- 零售价:{{item.user_sale_price / 100}} 积分 --></view>
 						        <!--<currency class="cartlist_price" symbol="¥" value="{{item.price}}" />-->
 						        <text style="    color: #F44336;font-size: 32rpx;">{{item.price / 100}} 积分</text>
 						        <view class="cartlist_num">

+ 3 - 3
pages/home/home.wxml

@@ -352,8 +352,8 @@
 			</view>
         </view>
 		 
-		 
-         <view wx:else class="video-box">
+		 <view wx:else class="project">
+         <view class="video-box">
           <video class="project-video" custom-cache="{{false}}" bindtap='videoTap' data-index="{{index}}"  id='video{{index}}' show-fullscreen-btn="{{false}}" enable-progress-gesture="{{false}}" src="{{item.video_url}}" controls="{{false}}" show-center-play-btn='{{false}}'>
           	<cover-image class="playImg" src="../../images/footer/play.png"  wx:if="{{!item.video_play}}"></cover-image>
           </video>
@@ -368,7 +368,7 @@
           <view class="clean"></view>
           <button bindtap="toProject" data-val="{{item.id}}" class="video-buybtn">立即购买</button>
          </view>
-		 
+		</view>
 		 
         </view>
       </view>

+ 908 - 0
pages/projects/project-detail-noshare/project-detail-noshare.js

@@ -0,0 +1,908 @@
+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()
+	
+	// if(options.read != 1){
+		this.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,
+			 })
+		}
+	// }
+  },
+  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 (options) {
+	 // 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){
+				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;
+    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-detail-noshare/project-detail-noshare.json

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

+ 318 - 0
pages/projects/project-detail-noshare/project-detail-noshare.wxml

@@ -0,0 +1,318 @@
+<import src="../../../utils/wxParse/wxParse.wxml"/>
+<view class="app detail-bg">
+  <view class="detail-green" wx:if="{{project.is_support_poor === 1}}"></view>
+  <view class="detail-info">
+    <swiper indicator-dots="{{indicatorDots}}"
+      autoplay="{{autoplay}}" bindchange='onSlideChangeEnd' interval="{{interval}}" indicator-dots="{{false}}" duration="{{duration}}" class="detail-swiper">
+      <block wx:for="{{project.pics}}" wx:key="id">
+        <swiper-item>
+          <image src="{{item.img}}" class="detail-img" />
+        </swiper-item>
+      </block>
+    </swiper>
+    <view class="mokuai" wx:if="{{project.pics.length > 1}}">{{imgindex}}/{{project.pics.length}}</view>
+    <view class="seckill-top" wx:if="{{project.is_under_seckill}}">
+      <view class="seckill-title">
+        <view class="seckill-time">
+          <view class="time-click">
+            <!--<view class="time-item time-kuang1">{{msecond}}</view>-->
+            <view class="time-item time-kuang">{{second}}</view>
+            <view class="time-item time-color"> : </view>
+            <view class="time-item time-kuang">{{min}}</view>
+            <view class="time-item time-color"> : </view>
+            <view class="time-item time-kuang">{{hour}}</view>
+          </view>
+          <view class="time-text">本期剩余时间</view>
+        </view>
+      </view>
+      <view><image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/neverse/otherskill.png" class="seckill-img" /></view>
+    </view>
+    
+    <text class="detail-width detail-title">{{project.name}}</text>
+    <button open-type="share" class="sharebtn" wx:if="{{readOnly != 1}}"><image src="../../../images/footer/share.png" /><text>分享</text></button>
+    <!--<view class="detail-width">
+      <text class="detail-normal detail-mr">价格</text>
+      <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
+    </view>-->
+
+	<view class="project-pack-list" wx:if="{{project.package}}">
+		<view wx:for="{{project.package_list}}" wx:for-item="pack" wx:for-index="ind">
+			<p>{{pack.item_title}} x{{pack.nums}}</p>
+		</view>
+	</view>
+	
+    <view class="detail-width">
+      <view  style="color: #999;text-decoration: line-through;font-size: 23rpx;">
+        <text class="detail-normal detail-mr" style="color: #999;text-decoration: line-through;font-size: 23rpx;margin-right:0">零售价:</text>
+        <currency symbol="¥" value="{{project.user_sale_price}}"></currency>
+      </view>
+      <view class="detail-fl">
+        <text class="detail-normal detail-mr">价格</text>
+        <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
+        <text class="detail-pass" wx:if="{{project.is_under_seckill}}">({{project.seckill_show_price / 100}}元)</text>
+      </view>
+      <!-- <view class="detail-fl" wx:if="{{balance === 0 || balance < project.price}}">
+        <text class="detail-normal detail-mr">价格</text>
+        <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>
+      </view>
+      <view class="detail-fl" wx:if="{{balance !== 0 && balance >= project.price}}">
+        <text class="detail-normal detail-mr">兑换</text>
+        <text class="detail-normal" style="font-size:30rpx;color:#eab86a;">{{project.price}}提货券</text>
+      </view> -->
+      
+      <view class="detail-fr">
+        <text class="detail-normal">已售出{{project.sold_count}}件</text>
+      </view>
+      <view class="clean"></view>
+      <view class="detail-stop" wx:if="{{todaysend < project.deliver_start_time && todaysend > project.deliver_stop_time}}">因物流停运 , <format-time type="formatmonth2" value="{{project.deliver_stop_time}}"></format-time>下单的 , 将于<format-time type="formatmonth2" value="{{project.deliver_start_time}}"></format-time>发货</view>
+      <!--<view style="float:left">
+        <view class="detail-normal detail-mr">支持</view>
+        <image class="detail-icon" wx:if="{{project.robo_balance_price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/rabbitpay_icon.png" />
+        <image class="detail-icon" wx:if="{{project.mall_balance_price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/integralpay_icon.png" />
+        <image class="detail-icon" wx:if="{{project.price}}" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/icon/weixinpay.png" />
+      </view>-->
+      <!-- <view class="detail-fr">
+        <text class="detail-normal">已售出{{project.sold_count}}件</text>
+      </view>-->
+      <!--<view class="clean"></view>-->
+    </view>
+  </view>
+
+  <view class="detail-no" wx:if="{{project.specification || project.no_delivery_area}}">
+    <view class="detail-no-first" wx:if="{{project.specification}}">    
+      <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/product/product-icon/maindetail.png" class="detail-no-img"/>
+      <view class="detail-no-text">规格 : {{project.specification}}</view>
+    </view>
+    <view wx:if="{{project.no_delivery_area}}">    
+      <image src="http://fohow.oss-cn-shenzhen.aliyuncs.com/product/product-icon/noaddress.png" class="detail-no-img1"/>
+      <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>
+<!--     <view class="detail-content-desc">
+      {{project.detail}}
+    </view> -->
+    <view class="detail-parse">
+      <template is="wxParse" data="{{wxParseData:parse.nodes}}"/>
+<!--       <image wx:for="{{project.detail_pics}}" src="{{item.img}}" class="detail-project-img" bindload="imageLoad" data-list="{{project.detail_pics}}" data-src="{{item.img}}" data-index="{{index}}" bindtap="detailImg" wx:key="id" style="width:{{images[index].width}}rpx; height:{{images[index].height}}rpx;"></image> -->
+    </view>
+  </view>
+
+
+  <view class="detail-footer" wx:if="{{readOnly == 0}}">
+    <view class="detail-footer-bar" style="padding-bottom: {{value}}rpx;">
+      <view class="detail-footer-item" style="flex: 0.18;">
+        <navigator url="../../home/home" open-type="switchTab">
+          <image src="../../../images/footer/home.png" class="detail-footer-icon"></image>
+          <text class="detail-footer-text">首页</text>
+        </navigator>
+      </view>
+      
+      <view class="detail-footer-item" style="flex: 0.18;">
+        <navigator url="../../cart/cart" open-type="switchTab">
+          <image src="../../../images/footer/shoppingcart.png" class="p-footer-icon"></image>
+          <text class="p-footer-text">购物车</text>
+        </navigator>
+      </view>
+      <!--
+      <view class="detail-footer-item" style="flex: 0.18;">
+        <navigator url="../../helpfarm/othercustom/othercustom" open-type="navigate">
+          <image src="../../../images/footer/weixin.png" class="p-footer-icon"></image>
+          <text class="p-footer-text">客服</text>
+        </navigator>
+      </view>
+      -->
+      <view class="detail-footer-item" style="flex: 0.18;" bindtap="createPoster">
+        <image src="../../../images/footer/poster.png" class="p-footer-icon"></image>
+        <text class="p-footer-text">分享</text>
+      </view>
+      <!-- <view class="detail-footer-item" style="flex: 0.5;">
+        <image src="../../../images/footer/shoppingcart.png" class="detail-footer-icon"></image>
+        <text class="detail-footer-text">购物车</text>
+      </view> -->
+      <button class="detail-footer-item detail-yellow" bindtap="toCart" wx:if="{{project.seckill_show_price <= 0 && project.left_count > 0}}">
+        <text>加入购物车</text>
+      </button>
+      <form bindsubmit="toPay" report-submit="{{true}}" wx:if="{{project.left_count > 0 && project.seckill_state !='end'}}" class="detail-footer-item">
+        <button class=" detail-red"  formType="submit">
+          立即购买
+        </button>
+      </form>
+      <form wx:if="{{project.left_count > 0 && project.seckill_state =='end'}}" class="detail-footer-item">
+        <button class="detail-red" disabled="disabled" style="background: #ccc !important;color: #FFF !important;">
+          秒杀已结束
+        </button>
+      </form>
+      <view class="detail-footer-item detail-black" wx:if="{{project.left_count <= 0}}">
+        <text>已售罄</text>
+      </view>
+    </view>
+  </view>
+  <view class="detail-footer" wx:if="{{readOnly == 1}}">
+	  <button bindtap="back" style="background: #fff;color: #eab86a;"> 返回</button>
+  </view>
+</view>
+
+<view wx:if="{{showDialog}}">
+  <view class="dialog-panel" animation="{{animationData}}" style="padding-bottom: {{value}}rpx;">
+    <view class="dialog-project">
+      <image class="dialog-cancel" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/cancel.png" bindtap="toPay"></image>
+      <view class="dialog-content">
+        <image class="dialog-img" src="{{project.pics[0].img}}"></image>
+        
+        <view class="dialog-info" style="margin-top: 20rpx;">
+          <h6 style="font-size: 35rpx;font-weight: bold;color: #666;">{{project.name}}</h6>
+          <view class="dialog-word dialog-black" style="margin-top: 15rpx;color: #999;">库存{{project.left_count}}件   <text wx:if="{{project.have_size && (sname || cname)}}">(已选:{{cname}} {{sname}})</text></view>
+          <view class="dialog-word dialog-red" style="font-size: 35rpx;margin-top: 25rpx;">
+            <!-- {{project.price}}提货券 -->
+            <currency symbol="¥" value="{{project.price}}"></currency>
+          </view>
+          <!-- <view class="dialog-word dialog-gray">或{{project.price}}提货券</view> -->
+        </view>
+        <view class="clean"></view>
+      </view>
+
+      <view class="select-count">
+        <view class="select-word">数量</view>
+        <view class="select-input">
+          <button bindtap="mius">-</button>
+          <input type="number" value="{{count}}" bindinput="changeCount" />
+          <button bindtap="add">+</button>
+        </view>
+        <view class="clean"></view>
+      </view>
+      
+      <view wx:if="{{project.have_size}}" class="select-count">
+      	<view wx:for="{{productSize}}" wx:for-item="i" wx:key="{{index}}">
+      		<view wx:if="{{index != 'product'}}">
+				<h5 class="sizeTitle">{{i.name}}</h5>
+				<view wx:for="{{i.attr_values}}" wx:for-index="index2" wx:for-item="j" class="checkList">
+					<span bindtap="checkSize" data-type='{{index}}' data-tname="{{j.name}}" data-list="{{index2}}" data-id="{{j.id}}" class="{{j.is_select?'active':''}}">
+					{{j.name}}
+					</span>
+				</view>
+			</view>
+        </view>
+      </view>
+      
+      
+      <form bindsubmit="pay" report-submit="{{true}}" >
+        <button class="dialog-btn" formType="submit" wx:if="{{showpay}}" disabled="{{canpay?'':'true'}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
+      </form>
+      <button class="dialog-btn" open-type="share" wx:if="{{!showpay}}"><text wx:if="{{!noproduct}}">立即购买</text><text wx:if="{{noproduct}}">暂无库存</text></button>
+    </view>
+  </view>
+  <view class="detail-dialog" bindtap="toPay"></view>
+</view>
+
+<view wx:if="{{showCartDialog}}">
+  <view class="dialog-panel" animation="{{animationData}}" style="padding-bottom: {{value}}rpx;">
+    <view class="dialog-project">
+      <image class="dialog-cancel" src="http://fohow.oss-cn-shenzhen.aliyuncs.com/xcx/image/cancel.png" bindtap="toCart"></image>
+      <view class="dialog-content">
+        <image class="dialog-img" src="{{project.pics[0].img}}"></image>
+        <view class="dialog-info" style="margin-top: 20rpx;">
+          <h6 style="font-size: 35rpx;font-weight: bold;color: #666;">{{project.name}}</h6>
+          <view class="dialog-word dialog-black" style="margin-top: 15rpx;color: #999;">库存{{project.left_count}}件   <text wx:if="{{project.have_size && (sname || cname)}}">(已选:{{cname}} {{sname}})</text></view>
+          <view class="dialog-word dialog-red" style="font-size: 35rpx;margin-top: 25rpx;">
+            <!-- {{project.price}}提货券 -->
+            <currency symbol="¥" value="{{project.price}}"></currency>
+          </view>
+          <!-- <view class="dialog-word dialog-gray">或{{project.price}}提货券</view> -->
+        </view>
+        <view class="clean"></view>
+      </view>
+
+      <view class="select-count">
+        <view class="select-word">数量</view>
+        <view class="select-input">
+          <button bindtap="mius">-</button>
+          <input type="number" value="{{count}}" bindinput="changeCount" />
+          <button bindtap="add">+</button>
+        </view>
+        <view class="clean"></view>
+      </view>
+      
+      <view wx:if="{{project.have_size}}" class="select-count">
+      	<view wx:for="{{productSize}}" wx:for-item="i" wx:key="{{index}}">
+			<view wx:if="{{index != 'product'}}">
+				<h5 class="sizeTitle">{{i.name}}</h5>
+				<view wx:for="{{i.attr_values}}" wx:for-index="index2" wx:for-item="j" class="checkList">
+					<span bindtap="checkSize" data-type='{{index}}' data-tname="{{j.name}}" data-list="{{index2}}" data-id="{{j.id}}" class="{{j.is_select?'active':''}}">
+					{{j.name}}
+					</span>
+				</view>
+			</view>
+        </view>
+      </view>
+      
+      <button class="detail-yellow" bindtap="addCart" style="width:100%" disabled="{{!canpay?'true':''}}"><text wx:if="{{!noproduct}}">加入购物车</text><text wx:if="{{noproduct}}">暂无库存</text></button>
+    </view>
+  </view>
+  <view class="detail-dialog" bindtap="toCart"></view>
+</view>
+
+<view class="poster" wx:if="{{posterPopup}}" catchtouchmove="stopPageScroll">
+  <view class="poster-main">
+    <view style="height: 60rpx;"></view>
+    <view class="poster-close" bindtap="posterClose"></view>
+    <image class="poster-img" src="{{posterImage}}"></image>
+    <view class="poster-text">保存图片,叫伙伴们来围观吧</view>
+    <view class="poster-btn" bindtap="saveImage">
+      <view class="poster-icon"></view>
+      <view class="poster-save" >保存</view>
+      <view class="clear"></view>
+    </view>
+  </view>
+  
+</view>
+
+<view class="canvas-position">
+  <canvas class="canvas" style="width: 750px; height: 1334px" canvas-id="myCanvas" ></canvas>
+</view>
+
+<view class="popup-bg" wx:if="{{popup}}">
+  <view class="popup" >
+    <view class="popup-title">提示</view>
+    <view class="popup-logobg">
+      <view class="popup-image" ></view>
+    </view>
+    <text class="popup-hint">FOHOW玖玖申请同意相册保存\n以确保正常使用保存相册功能</text>
+    <button class="popup-bottom" open-type="openSetting" bindopensetting="setting">确认</button>
+  </view>
+</view>

+ 685 - 0
pages/projects/project-detail-noshare/project-detail-noshare.wxss

@@ -0,0 +1,685 @@
+@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;
+	    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;
+}
+.project-pack-list{
+	    background: #f7f7f7;
+	    font-size: 24rpx;
+	    padding: 15rpx;
+	    line-height: 36rpx;
+	    color: #666;
+		margin: 20rpx;
+}

+ 13 - 13
pages/projects/project-detail/project-detail.js

@@ -109,19 +109,19 @@ Page({
     }
     _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,
-    })
+  onShareAppMessage: function (options) {
+	 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,

+ 1 - 1
pages/projects/project-detail/project-detail.wxml

@@ -29,7 +29,7 @@
     </view>
     
     <text class="detail-width detail-title">{{project.name}}</text>
-    <button open-type="share" class="sharebtn"><image src="../../../images/footer/share.png" /><text>分享</text></button>
+    <button open-type="share" class="sharebtn" wx:if="{{readOnly != 1}}"><image src="../../../images/footer/share.png" /><text>分享</text></button>
     <!--<view class="detail-width">
       <text class="detail-normal detail-mr">价格</text>
       <currency symbol="¥" value="{{project.price}}" class="detail-price"></currency>