zhjx vor 7 Jahren
Ursprung
Commit
5ad8b828db
45 geänderte Dateien mit 869 neuen und 87 gelöschten Zeilen
  1. 1 0
      Furniture/api.js
  2. 1 0
      Furniture/app.json
  3. BIN
      Furniture/images/background.png
  4. BIN
      Furniture/images/del.png
  5. BIN
      Furniture/images/full-star.png
  6. BIN
      Furniture/images/jiajudapei.png
  7. BIN
      Furniture/images/judp.png
  8. BIN
      Furniture/images/no-star.png
  9. BIN
      Furniture/images/weather/大暴雨.png
  10. BIN
      Furniture/images/weather/大雨.png
  11. BIN
      Furniture/images/weather/大雪.png
  12. BIN
      Furniture/images/weather/小雨.png
  13. BIN
      Furniture/images/weather/小雪.png
  14. BIN
      Furniture/images/weather/暴雨.png
  15. BIN
      Furniture/images/weather/暴雪.png
  16. BIN
      Furniture/images/weather/沙尘暴.png
  17. BIN
      Furniture/images/weather/特大暴雨.png
  18. BIN
      Furniture/images/weather/阵雪.png
  19. BIN
      Furniture/images/xinpingfabu.png
  20. BIN
      Furniture/images/xpfb.png
  21. BIN
      Furniture/images/yxwk.png
  22. BIN
      Furniture/images/家具搭配图片.png
  23. BIN
      Furniture/images/新品发布图片.png
  24. BIN
      Furniture/img/icon-share-wechat.png
  25. BIN
      Furniture/img/已完成.png
  26. BIN
      Furniture/img/待评价.png
  27. BIN
      Furniture/img/运输中.png
  28. 373 46
      Furniture/page/homePage/detail/detail.js
  29. 78 6
      Furniture/page/homePage/detail/detail.wxml
  30. 151 0
      Furniture/page/homePage/detail/detail.wxss
  31. 21 2
      Furniture/page/homePage/homePage.js
  32. 34 17
      Furniture/page/homePage/homePage.wxml
  33. 137 0
      Furniture/page/newpro/newpro.js
  34. 1 0
      Furniture/page/newpro/newpro.json
  35. 37 0
      Furniture/page/newpro/newpro.wxml
  36. 2 0
      Furniture/page/newpro/newpro.wxss
  37. 23 0
      Furniture/page/newpro/newprodetail.js
  38. 4 0
      Furniture/page/newpro/newprodetail.json
  39. 2 0
      Furniture/page/newpro/newprodetail.wxml
  40. 1 0
      Furniture/page/newpro/newprodetail.wxss
  41. 0 1
      Furniture/pages/infor/infor.js
  42. 0 7
      Furniture/pages/logs/guanggao.js
  43. 0 1
      Furniture/pages/make/make.js
  44. 0 4
      Furniture/pages/packing/packing.js
  45. 3 3
      Furniture/project.config.json

+ 1 - 0
Furniture/api.js

xqd
@@ -5,6 +5,7 @@ var api = {
   setting: _api_root + "setting?store_id=" + app.globalData.store_id,
   news_detail: _api_root + "news_detail?store_id=" + app.globalData.store_id,
   news_list: _api_root + "news_list?store_id=" + app.globalData.store_id,
+  newgoods_list: _api_root + "newgoods_list?store_id=" + app.globalData.store_id,
   goods_list: _api_root + "goods_list?store_id=" + app.globalData.store_id,
   add_comments: _api_root + "add_comments?store_id=" + app.globalData.store_id
 }

+ 1 - 0
Furniture/app.json

xqd
@@ -2,6 +2,7 @@
   "pages": [
     "pages/logs/guanggao",
     "page/homePage/homePage",
+    "page/newpro/newpro",
     "page/user/user",
     "page/lifeCircle/lifeCircle",
     "page/contact/contact",

BIN
Furniture/images/background.png


BIN
Furniture/images/del.png


BIN
Furniture/images/full-star.png


BIN
Furniture/images/jiajudapei.png


BIN
Furniture/images/judp.png


BIN
Furniture/images/no-star.png


BIN
Furniture/images/weather/大暴雨.png


BIN
Furniture/images/weather/大雨.png


BIN
Furniture/images/weather/大雪.png


BIN
Furniture/images/weather/小雨.png


BIN
Furniture/images/weather/小雪.png


BIN
Furniture/images/weather/暴雨.png


BIN
Furniture/images/weather/暴雪.png


BIN
Furniture/images/weather/沙尘暴.png


BIN
Furniture/images/weather/特大暴雨.png


BIN
Furniture/images/weather/阵雪.png


BIN
Furniture/images/xinpingfabu.png


BIN
Furniture/images/xpfb.png


BIN
Furniture/images/yxwk.png


BIN
Furniture/images/家具搭配图片.png


BIN
Furniture/images/新品发布图片.png


BIN
Furniture/img/icon-share-wechat.png


BIN
Furniture/img/已完成.png


BIN
Furniture/img/待评价.png


BIN
Furniture/img/运输中.png


+ 373 - 46
Furniture/page/homePage/detail/detail.js

xqd xqd xqd xqd xqd
@@ -17,6 +17,18 @@ Page({
     news:{},
     news_comments:{},
     comments:[],
+    way:'',
+    jianyi:'',
+
+    stars: [0, 1, 2, 3, 4],
+    normalSrc: '../../../images/no-star.png',
+    selectedSrc: '../../../images/full-star.png',
+    halfSrc: '../../../images/icon-user-sc.png',
+    // key:{'外观':0,'实用性':1,'质感':2,'舒适度':3,'价格':4},//评分
+    key: [0,0,0,0],
+    yjnames:[],
+    theimgs: [],
+    simgs:[],
   },
 
   /**
@@ -24,57 +36,141 @@ Page({
    */
   onLoad: function (options) {
     var that = this
+    var way = options.way
+      that.setData({
+        way:way
+      })
     var id = options.id
     console.log(id)
-    app.request({
-      url:'https://t6.9026.com/api/furniture/news_detail',
-      method:'get',
-      data:{
-        store_id: app.globalData.store_id,
-        newsid:id
-      },
-      success:function(res){
-        console.log(res.data)
-        that.setData({
-          next_page_url: res.data.data.news_comments.next_page_url,
-          news:res.data.data.news,
-          news_comments:res.data.data.news_comments,
-          comments: res.data.data.news_comments.data
-        })
-        var c = that.data.comments
-        for(var i = 0;i<c.length;i++){
-          console.log(c[i].created_at.replace(/\-/g, "/"))
-          var k = c[i].created_at.replace(/\-/g, "/")
-          var d = new Date(k).getTime()
-          var n = new Date().getTime()
-          var t = n - d
-          if(t < 60000){
-            var x = Math.round(t / 1000)
-            c[i].created_at = ''+x+ '秒前'
-          }else if(t >= 60000 && t < 3600000){
-            var x = Math.round(t / 60000)
-            c[i].created_at = '' + x + '分钟前'
-          } else if (t >= 3600000 && t < 86400000){
-            var x = Math.round(t / 3600000)
-            c[i].created_at = '' + x + '小时前'
-          } else if (t >= 86400000 && t < 86400000*3){
-            var x = Math.round(t / 86400000)
-            c[i].created_at = '' + x + '天前'
-          } else {
-            var e = new Date(d)
-            var x = ''+e.getFullYear()+'-'+(e.getMonth()+1)+'-'+e.getDate()
-            c[i].created_at = '' + x
+    if(way == 'wk'){
+      app.request({
+        url: 'https://t6.9026.com/api/furniture/news_detail',
+        method: 'get',
+        data: {
+          store_id: app.globalData.store_id,
+          newsid: id
+        },
+        success: function (res) {
+          console.log(res.data)
+          that.setData({
+            next_page_url: res.data.data.news_comments.next_page_url,
+            news: res.data.data.news,
+            news_comments: res.data.data.news_comments,
+            comments: res.data.data.news_comments.data
+          })
+          var c = that.data.comments
+          for (var i = 0; i < c.length; i++) {
+            console.log(c[i].created_at.replace(/\-/g, "/"))
+            var k = c[i].created_at.replace(/\-/g, "/")
+            var d = new Date(k).getTime()
+            var n = new Date().getTime()
+            var t = n - d
+            if (t < 60000) {
+              var x = Math.round(t / 1000)
+              c[i].created_at = '' + x + '秒前'
+            } else if (t >= 60000 && t < 3600000) {
+              var x = Math.round(t / 60000)
+              c[i].created_at = '' + x + '分钟前'
+            } else if (t >= 3600000 && t < 86400000) {
+              var x = Math.round(t / 3600000)
+              c[i].created_at = '' + x + '小时前'
+            } else if (t >= 86400000 && t < 86400000 * 3) {
+              var x = Math.round(t / 86400000)
+              c[i].created_at = '' + x + '天前'
+            } else {
+              var e = new Date(d)
+              var x = '' + e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate()
+              c[i].created_at = '' + x
+            }
           }
+          that.setData({
+            comments: c
+          })
+          that.news_time()
+          var article = that.data.news.content
+          WxParse.wxParse('article', 'html', article, that, 5)
         }
-        that.setData({
-          comments:c
-        })
-        that.news_time()
-        var article = that.data.news.content
-        WxParse.wxParse('article', 'html', article, that, 5)
-      }
+      })
+    }else if(way == 'xp'){
+      app.request({
+        url: 'https://t6.9026.com/api/furniture/newgoods_index',
+        method: 'get',
+        data: {
+          store_id: app.globalData.store_id,
+          id: id
+        },
+        success: function (res) {
+          console.log(res)
+          that.setData({
+            next_page_url: res.data.data.comments.next_page_url,
+            news: res.data.data.newgoods,
+            news_comments: res.data.data.comments,
+            comments: res.data.data.comments.data
+          })
+          var ngs = res.data.data.newgoods
+          var arr = [ngs.comments_field_1, ngs.comments_field_2, ngs.comments_field_3, ngs.comments_field_4]
+          var p1 = ngs.comments_avg_1
+          var p2 = ngs.comments_avg_2
+          var p3 = ngs.comments_avg_3
+          var p4 = ngs.comments_avg_4
+          console.log(p1,p2,p3,p4)
+          p1 = parseFloat(p1).toFixed(1)
+          p2 = parseFloat(p2).toFixed(1)
+          p3 = parseFloat(p3).toFixed(1)
+          p4 = parseFloat(p4).toFixed(1)
+          console.log(p1, p2, p3, p4)
+          ngs.comments_avg_1=p1
+          ngs.comments_avg_2=p2
+          ngs.comments_avg_3=p3
+          ngs.comments_avg_4=p4
+          console.log(arr)
+          that.setData({
+            yjnames:arr,
+            news:ngs
+          })
+          var c = that.data.comments
+          for (var i = 0; i < c.length; i++) {
+            console.log(c[i].created_at.replace(/\-/g, "/"))
+            var k = c[i].created_at.replace(/\-/g, "/")
+            var d = new Date(k).getTime()
+            var n = new Date().getTime()
+            var t = n - d
+            if (t < 60000) {
+              var x = Math.round(t / 1000)
+              c[i].created_at = '' + x + '秒前'
+            } else if (t >= 60000 && t < 3600000) {
+              var x = Math.round(t / 60000)
+              c[i].created_at = '' + x + '分钟前'
+            } else if (t >= 3600000 && t < 86400000) {
+              var x = Math.round(t / 3600000)
+              c[i].created_at = '' + x + '小时前'
+            } else if (t >= 86400000 && t < 86400000 * 3) {
+              var x = Math.round(t / 86400000)
+              c[i].created_at = '' + x + '天前'
+            } else {
+              var e = new Date(d)
+              var x = '' + e.getFullYear() + '-' + (e.getMonth() + 1) + '-' + e.getDate()
+              c[i].created_at = '' + x
+            }
+          }
+          that.setData({
+            comments: c
+          })
+          that.news_time()
+          var article = that.data.news.content
+          WxParse.wxParse('article', 'html', article, that, 5)
+        }
+      })
+    }
+  },
+  inputjy:function(e){
+    console.log(e.detail.value)
+    var txt = e.detail.value
+    this.setData({
+      jianyi:txt
     })
   },
+  
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
@@ -86,7 +182,18 @@ Page({
    * 生命周期函数--监听页面显示
    */
   onShow: function () {
-
+    var that = this
+    if (wx.getStorageSync('user')) {
+      that.setData({
+        is_login: false,
+        nikename: wx.getStorageSync('user').username,
+        avatar: wx.getStorageSync('user').avatar
+      })
+    } else {
+      that.setData({
+        is_login: true
+      })
+    }
   },
 
   /**
@@ -179,6 +286,37 @@ Page({
       path: '/page/homePage/detail/detail?id='+that.data.news.id
     }
   },
+  fenxiang:function(){
+    this.onShareAppMessage()
+  },
+  commityj:function(){
+    var that = this
+    var key = that.data.key
+    var jianyi = that.data.jianyi
+    var imgs = that.data.simgs
+    app.request({
+      url: 'https://t6.9026.com/api/furniture/newgoods_addcomment',
+      data: {
+        store_id: app.globalData.store_id,
+        newgoods_id:1,
+        comments_field_1:key[0],
+        comments_field_2:key[1],
+        comments_field_3:key[2],
+        comments_field_4:key[3],
+        content:jianyi,
+        picture:imgs,
+      },
+      method: 'post',
+      success: function (res) {
+        console.log(res)
+        wx.showToast({
+          title: '提交成功',
+          icon: 'success',
+          duration: 1000
+        })
+      }
+    })
+  },
   like: function () {
     var that = this
     if (that.data.like == true) {
@@ -479,5 +617,194 @@ Page({
     wx.reLaunch({
       url: '/page/homePage/homePage',
     })
+  },
+  selectstar: function (e) {
+    var that =this;
+    var keys = e.currentTarget.dataset.key
+    var id = e.currentTarget.id
+    // if (this.data.key == 1 && e.currentTarget.dataset.key == 1) {
+    //   //只有一颗星的时候,再次点击,变为0颗
+    //   key = 0;
+    // }
+    var news = that.data.news
+    var key = that.data.key
+    if (id == '1') {
+      key[0]=keys+1
+    } else if (id == '2') {
+      key[1] = keys + 1
+    } else if (id == '3') {
+      key[2] = keys + 1
+    } else if (id == '4') {
+      key[3] = keys + 1
+    }
+    
+    that.setData({
+      key: key
+    })
+  },
+  addimg: function () {
+    var arr = [];
+    var that = this;
+    if (that.data.simgs.length > 2) {
+      wx.showToast({
+        title: '最多添加3张',
+        icon: 'none',
+        duration: 1000
+      })
+      return
+    }
+    wx.chooseImage({
+      count: 3 - that.data.simgs.length,
+      success: function (res) {
+        var successUp = 0; //成功个数
+        var failUp = 0; //失败个数
+        var length = res.tempFilePaths.length; //总共个数
+        var i = 0; //第几个
+        that.uploadDIY(res.tempFilePaths, successUp, failUp, i, length);
+        if (that.data.theimgs.length == 0) {
+          that.setData({
+            theimgs: arr
+          })
+        } else if (that.data.theimgs.length < 4) {
+          console.log(that.data.theimgs)
+          that.data.theimgs.push(arr)
+          var the = that.data.theimgs
+          console.log(the)
+          that.setData({
+            theimgs: the
+          })
+        } else {
+        }
+      },
+    })
+  },
+  del: function (e) {
+    var that = this
+    var u = e.currentTarget.id
+    var simgs = that.data.simgs
+    var index = simgs.indexOf(u)
+    simgs.splice(index, 1)
+    that.setData({
+      simgs: [...simgs]
+    })
+  },
+  uploadDIY(filePaths, successUp, failUp, i, length) {
+    var that = this
+    wx.uploadFile({
+      url: 'https://t6.9026.com/api/attachment/upload',
+      filePath: filePaths[i],
+      name: 'file',
+      method: 'POST',
+      formData: {
+        tag: 'avatar',
+      },
+      success: (resp) => {
+        var data = JSON.parse(resp.data)
+        var simgs = that.data.simgs
+        simgs.push(data.data.url)
+        that.setData({
+          simgs: [...simgs]
+        })
+        if (data.status == true) {
+          successUp++;
+        } else {
+          failUp++;
+        }
+      },
+      fail: (res) => {
+        failUp++;
+      },
+      complete: () => {
+        i++;
+        if (i == length) {
+          // wx.showToast({
+          //   title: '总共' + successUp + '张上传成功,' + failUp + '张上传失败!',
+          //   icon:'none',
+          //   duration:1000
+          // });
+        }
+        else {  //递归调用uploadDIY函数
+          this.uploadDIY(filePaths, successUp, failUp, i, length);
+        }
+      },
+    });
+  },
+  del1:function(e){
+    var that =this
+    var id = e.currentTarget.id
+    var theimgs=that.data.theimgs
+    var l =theimgs.length
+    var t = 0
+    var timgs = []
+    for(var i = 0;i<l;i++){
+      var d = id
+      // d = Number(d)
+      if(i == d){
+        console.log('same-----------')
+      }else{
+        var a= theimgs[i]
+        timgs[t]=a
+        t++
+      }
+    }
+    that.setData({
+      theimgs:timgs
+    })
+  },
+  getaddress:function(){
+    var that = this;
+    wx.getSetting({
+      success(res) {
+        console.log('getset')
+          wx.chooseAddress({
+            success: function (res) {
+              var add = res.cityName + res.countyName + res.detailInfo
+              var name = res.userName
+              var tel = res.telNumber
+              console.log(add,name,tel)
+              app.request({
+                url: 'https://t6.9026.com/api/furniture/newgoods_addbooking',
+                data: {
+                  store_id: app.globalData.store_id,
+                  newgoods_id: 1,
+                  phone:tel,
+                  receiver_name:name,
+                  receiver_address:add,
+                },
+                method: 'post',
+                success: function (res) {
+                  console.log(res)
+                  
+                }
+              })
+            }
+          })
+      },
+      fail(res) {
+        console.log('调用失败')
+      }
+    })
+  },
+  previewImage: function (e) {
+    var that = this;
+      //获取当前图片的下表
+      var index = e.currentTarget.dataset.index;
+      var com = that.data.comments;
+    var l = com.length;
+    var id = e.currentTarget.id;
+      for(var i = 0;i<l;i++){
+        var it = com[i];
+        if(it.id == id){
+          var pictures = it.picture;
+          wx.previewImage({
+            //当前显示下表
+            current: pictures[index],
+            //数据源
+            urls: pictures
+          })
+        }
+      }
+      //数据源
+      
   }
 })

+ 78 - 6
Furniture/page/homePage/detail/detail.wxml

xqd xqd xqd xqd xqd
@@ -5,10 +5,11 @@
     <view class="weui-article">
       <view class="weui-article__h1" style='font-size:42rpx;word-break:break-all;'>{{news.title}}</view>
       <view class='container1' style='margin-left:0rpx;margin-top:0rpx'>
-        <image src='{{news.avatar}}' style='width:80rpx;height:80rpx;border-radius:80rpx;'></image>
+        <image src="{{news.avatar?news.avatar:'https://t6.9026.com/upload/images/20181104/95592b93fb0cccd5236b5aabbbf93376.jpg'}}" style='width:80rpx;height:80rpx;border-radius:80rpx;'></image>
       </view>
       <view class="weui-article__section">
-        <view class="weui-article__title" style='margin-left:100rpx'>天天家居惠</view>
+        <view class="weui-article__title" style='margin-left:100rpx' wx:if="{{way == 'wk'}}">天天家居惠</view>
+        <view class="weui-article__title" style='margin-left:100rpx' wx:if="{{way == 'xp'}}">新品概念论坛</view>
         <view class="weui-article__section">
           <view class="weui-article__h3" style='margin-left:100rpx'>{{news.created_at}}</view>
           <view class="weui-article__p" style='font-size:35rpx;word-break:break-all;'>
@@ -21,9 +22,8 @@
       <text style='font-size:24rpx;float:right;margin-right:30rpx'>{{news.viewed}}</text>
       <image src='../../../images/eyes.png' style='width:40rpx;height:40rpx;float:right;margin-right:10rpx'></image>
       </view>
-      <!-- <image src='../../../images/eyes.png' style='width:40rpx;height:40rpx;margin-top:10rpx;margin-left:550rpx;'></image>
-      <view class='container1' style='margin-top:-54rpx;margin-left:605rpx;font-size:24rpx'>{{news.viewed}}</view> -->
-      <view style='height:160rpx;width:100%;'>
+
+      <view style='height:160rpx;width:100%;' wx:if="{{way=='wk'}}">
         <view class='like' bindtap='like' wx:if="{{like}}">
           <view style=''>
             <image src='https://t6.9026.com/upload/images/20180831/5e4dfbda11f345e34f448ae508f42455.png' style='width:160rpx;height:160rpx;'></image>
@@ -46,10 +46,79 @@
           
         </view>
       </view>
+      <view style='height:120rpx;width:100%;position:relative;display:flex;font-weight:500;' wx:if="{{way=='xp'}}">
+        <button open-type='share' class='fenxiang'>
+            <image src='../../../img/icon-share-wechat.png' class='weixin'></image>
+            <text class='txt1'>欢迎家具界大咖</text>
+            <text class='txt2'>友情转发</text>
+        </button>
+        <view class='yushou' bindtap='getaddress'>预售</view>
+      </view>
+
+    </view>
+    <view style='margin-top:0rpx;background-color:#f5f5f5;width:100%;height:50rpx;padding:10rpx 0 5rpx 15rpx;color:#999;' wx:if="{{way=='xp'}}">
+        客户意见调查
+    </view>
+    <view class='yijian' wx:if="{{way=='xp'}}">
+      <view class='yjbox'>
+        <view class="once">
+          <text class='yjname'>{{news.comments_field_1}}</text>
+          <view class='starb'>
+            <block wx:for="{{stars}}">
+              <image class="star-image" id="1" style="margin-left: 20rpx" src="{{key[0] > item ?selectedSrc : normalSrc}}" data-key="{{item}}" bindtap="selectstar"></image>
+            </block>
+          </view>
+        </view>
+        <view class="once">
+          <text class='yjname'>{{news.comments_field_2}}</text>
+          <view class='starb'>
+            <block wx:for="{{stars}}">
+              <image class="star-image" id="2" style="margin-left: 20rpx" src="{{key[1] > item ?selectedSrc : normalSrc}}" data-key="{{item}}" bindtap="selectstar"></image>
+            </block>
+          </view>
+        </view>
+        <view class="once">
+          <text class='yjname'>{{news.comments_field_3}}</text>
+          <view class='starb'>
+            <block wx:for="{{stars}}">
+              <image class="star-image" id="3" style="margin-left: 20rpx" src="{{key[2] > item ?selectedSrc : normalSrc}}" data-key="{{item}}" bindtap="selectstar"></image>
+            </block>
+          </view>
+        </view>
+        <view class="once">
+          <text class='yjname'>{{news.comments_field_4}}</text>
+          <view class='starb'>
+            <block wx:for="{{stars}}">
+              <image class="star-image" id="4" style="margin-left: 20rpx" src="{{key[3] > item ?selectedSrc : normalSrc}}" data-key="{{item}}" bindtap="selectstar"></image>
+            </block>
+          </view>
+        </view>
+      </view>
+      <textarea class='yjinput' placeholder='输入您的建议...' type="text" bindinput='inputjy'></textarea>
+    </view>
+    <view style='margin-top:0rpx;background-color:#f5f5f5;width:100%;height:50rpx;padding:10rpx 0 5rpx 15rpx;color:#999;' wx:if="{{way=='xp'}}">
+        上传图片
+    </view>
+    <view class='yjsc' wx:if="{{way=='xp'}}">
+      <view class='yjimgs'>
+        <view class='image' wx:for="{{simgs}}" wx:key="{{index}}">
+          <image class='timgs' src="{{item}}"></image>
+          <image src='../../../images/del.png' id="{{index}}" class='del' bindtap='del'></image>
+        </view>
+        <image wx:if="{{simgs.length<4}}" class='addimg image' src='../../../img/add.png' bindtap='addimg' style="border:1rpx solid #ddd;"></image>
+      </view>
+      <text style='color:#ccc;font-size:28rpx;'>感谢提供同行业产品图供参考</text>
+      <button class="jybtn" bindtap='commityj'>提交</button>
     </view>
     <view style='margin-top:0rpx;background-color:#f5f5f5;width:100%;height:50rpx;padding:10rpx 0 5rpx 15rpx;color:#999;'>
         全部评论({{news_comments.total}})
     </view>
+    <view class='avgfen' wx:if="{{way=='xp'}}">
+      <text class='avg'>{{news.comments_field_1}}:<text style='color:rgb(0,178,106);'>{{news.comments_avg_1?news.comments_avg_1:0}}</text>分</text>
+      <text class='avg'>{{news.comments_field_2}}:<text style='color:rgb(0,178,106);'>{{news.comments_avg_2?news.comments_avg_2:0}}</text>分</text>
+      <text class='avg'>{{news.comments_field_3}}:<text style='color:rgb(0,178,106);'>{{news.comments_avg_3?news.comments_avg_3:0}}</text>分</text>
+      <text class='avg'>{{news.comments_field_4}}:<text style='color:rgb(0,178,106);'>{{news.comments_avg_4?news.comments_avg_4:0}}</text>分</text>
+    </view>
     <view class='conment' wx:for='{{comments}}'>
       <view class='container1' style='margin-left:0rpx;margin-top:-10rpx'>
         <image src='{{item.avatar}}' style='width:80rpx;height:80rpx;border-radius:80rpx;'></image>
@@ -60,6 +129,9 @@
       </view> -->
       <view style='font-size:35rpx;margin-left:100rpx;margin-top:30rpx;word-break:break-all;' id='{{item.id}}' bindtap='reply' data-name='{{item.username}}'>
         {{item.content}}
+        <view class='reimg' wx:if="{{item.picture&&item.picture[0]!=''}}">
+          <image id="{{item.id}}" wx:for="{{item.picture}}" wx:for-item="items" class='reim' src="{{items}}" data-index="{{index}}" bindtap='previewImage'></image>
+        </view>
       </view>
       <view style='margin-top:5rpx;background-color:#f5f5f5;margin-left:100rpx;height:50rpx;padding:5rpx 0 0 20rpx;border-radius:10rpx' id='{{item.id}}' bindtap='toConment' wx:if='{{item.replys.total != 0}}'>
         <text style='color:#1E90FF;font-size:30rpx' decode="{{true}}" space="{{true}}">共{{item.replys.total}}条回复  ></text>
@@ -68,7 +140,7 @@
         <image src='/images/huifufengexian.png ' style='width:620rpx;height:2rpx;margin-top:10rpx;margin-left:0rpx'></image>
       </view>
     </view>
-    <view class='sousuo'>
+    <view class='sousuo' wx:if="{{way=='wk'}}">
       <input class='findit' placeholder='{{placeholder}}' bindblur='comment' value='{{comment_content}}' focus='{{focus}}'></input>
       <view class='sweep' bindtap='set_is_reply_false'>
         <!-- <image src='/images/查看评论按钮.png'></image> -->

+ 151 - 0
Furniture/page/homePage/detail/detail.wxss

xqd
@@ -102,4 +102,155 @@
   max-width:690rpx;
 }
 
+.fenxiang{
+  background: #fff; 
+  width:60%;
+  height:100rpx;
+  border-radius:120rpx;
+  border:1rpx solid #eee;
+  margin:20rpx;
+}
+.fenxiang .weixin{
+  position: absolute;
+  width:70rpx;
+  height:70rpx;
+  /* margin:15rpx 20rpx 10rpx 60rpx; */
+  left: 60rpx;
+  top: 15rpx;
+}
+.fenxiang .txt1{
+  position:absolute;
+display:inline-block;
+font-size:27rpx;
+top:5rpx;
+width:230rpx;
+text-align:center;
+left:130rpx;
+
+}
+.fenxiang .txt2{
+  position:absolute;
+font-size:30rpx;
+top:20px;
+display:inlineblock;
+width:130rpx;
+text-align:center;
+left:170rpx
+}
+
+.yushou{
+  width: 20%;
+  height: 80rpx;
+  background: red;
+  color: #fff;
+  border-radius: 200rpx;
+  text-align: center;
+  line-height: 80rpx;
+  margin:30rpx 20rpx;
+}
+
+
 
+
+.yijian{
+  width: 100%;
+  height: auto;
+  margin: 10rpx 3%;
+}
+.yjbox .once{
+  width: 100%;
+  height: 60rpx;
+  display: flex;
+}
+.once .yjname{
+  display: inline-block;
+  width: 200rpx;
+  height: 60rpx;
+  line-height: 60rpx;
+}
+.starb{
+  width: 400rpx;
+  height: 60rpx;
+  display: flex;
+  position: relative;
+}
+.star-image {
+  width: 40rpx;
+  height: 40rpx;
+  margin: 10rpx 0;
+  src: "../../images/normal.png";
+}
+.yjsc{
+  width: 94%;
+  height: auto;
+  margin: 10rpx 3%;
+}
+.yjsc .yjimgs{
+  width: 100%;
+  height: 120rpx;
+  display: flex;
+}
+.yjimgs .image{
+  width: 100rpx;
+  height: 100rpx;
+  margin: 10rpx;
+  position: relative;
+  border:1rpx solid #ccc;
+}
+.yjimgs .image .timgs{
+  width: 100%;
+  height: 100%;
+}
+.yjimgs .image .del{
+  position: absolute;
+  width: 40rpx;
+  height: 40rpx;
+  top: -10rpx;
+  right: -10rpx;
+  z-index: 99;
+}
+.jybtn{
+  display: inline-block;
+  background: #fff;
+  width: 50%;
+  height: 60rpx;
+  font-size:30rpx;
+  line-height:60rpx;
+  text-align:center;
+  margin-left:25%;
+  border:1rpx solid #ccc;
+  color: #bbb;
+  margin-top:20rpx; 
+}
+.yjinput{
+  width:94%;
+  height:120rpx;
+  border:1rpx solid #ccc;
+  color:#999;
+  font-size:30rpx;
+  line-height: 50rpx;
+}
+.avgfen{
+  width: 94%;
+  height: 60rpx;
+  margin: 5rpx 3%;
+  display: flex;
+}
+.avgfen .avg{
+  display: inline-block;
+  width: 25%;
+  height: 40rpx;
+  margin: 10rpx 0;
+  font-size: 26rpx;
+  line-height: 40rpx;
+}
+.reimg{
+  width: 100%;
+  height: 80rpx;
+  /* border:1rpx solid #999; */
+}
+.reimg .reim{
+  width: 70rpx;
+  height: 70rpx;
+  margin: 5rpx 15rpx;
+}

+ 21 - 2
Furniture/page/homePage/homePage.js

xqd xqd xqd xqd
@@ -23,6 +23,7 @@ Page({
     color2: '#666',
     tappid: "",
     tpath: '',
+
   },
   huace: function () {
     var that = this;
@@ -38,7 +39,7 @@ Page({
           console.log('IOS')
           that.setData({
             tappid: 'wx85709316b80a83be',
-            tpath: 'page/index/index'
+            tpath: 'company/pages/index/index'
           })
         } else if (res.platform == "android") {
           console.log('android')
@@ -108,10 +109,21 @@ Page({
           })
           console.log(that.data.news)
         }
+      }), 
+      app.request1({
+        url: api.newgoods_list,
+        success: function (e) {
+          console.log(e)
+          that.setData({
+            //next_page_url: e.data.next_page_url,
+            newsgoods: e.data.data,
+          })
+        }
       }),
       app.request1({
         url: api.goods_list,
         success: function(e) {
+          console.log(e)
           that.setData({
             goods: e.data.data,
           })
@@ -265,7 +277,14 @@ Page({
     console.log(e.currentTarget.dataset.id)
     var news_id = e.currentTarget.dataset.id
     wx.navigateTo({
-      url: 'detail/detail?id=' + news_id,
+      url: 'detail/detail?id=' + news_id+'&way='+'wk',
+    })
+  },
+  togdetail: function (e) {
+    console.log(e.currentTarget.dataset.id)
+    var id = e.currentTarget.dataset.id
+    wx.navigateTo({
+      url: 'detail/detail?id=' + id+'&way='+'xp',
     })
   },
   goShouhou: function() {

+ 34 - 17
Furniture/page/homePage/homePage.wxml

xqd xqd xqd xqd xqd
@@ -30,22 +30,11 @@
         {{ temp }}°
       </view>
     </view>
-    <!-- <view class='weui-flex' style='border-bottom: 2rpx #D3D3D3 solid'>
-      <view class='weui-flex__item'>
-       <navigator target="miniProgram" open-type="navigate" app-id="wx605448628d21d682" path="/pages/index/index" extra-data="" version="release">
-          <image src='../../images/jiajuhuace.png' style='height:215rpx;width:100%;margin:20rpx;margin-top:0;'></image>
-       </navigator>
-      </view>
-      <view class='weui-flex__item' style='margin-left:45rpx;'>
-        <image src='../../images/jiajushouhou.png' style='height:100rpx;width:90%;margin-top:0;' bindtap='goShouhou'></image>
-        <image src='../../images/chajindu.png' style='height:100rpx;width:90%;' bindtap='goJingdu'></image>
-      </view>
-    </view> -->
     <view style='width:100%;border-bottom: 2rpx #D3D3D3 solid;height:230rpx;margin-top:8rpx'>
       <view style='float:left;width:342rpx;'>
       <navigator target="miniProgram" open-type="navigate" app-id="{{tappid}}" path="{{tpath}}" extra-data="" version="release">
-          <image src='../../images/jiajuhuace.png' style='height:215rpx;width:100%;margin:20rpx;margin-top:0;'></image>
-         </navigator>
+          <image src='../../images/jiajuhuace.png' style='height:210rpx;width:304rpx;margin-left:30rpx;margin-top:0;'></image>
+       </navigator>
       </view>
       <view style='float:left;width:408rpx;'>
        <image src='/images/jiajushouhou.png' style='height:100rpx;width:378rpx;' bindtap='goShouhou'></image>
@@ -98,7 +87,7 @@
     </view>
 
     <view class="relative" style='height:360rpx;border-bottom: 2rpx #D3D3D3 solid'>
-      <image class="pic_background" src="../../images/jiajudapei.png"></image>
+      <image class="pic_background" style='width:240rpx;height:65rpx;' src="../../images/judp.png"></image>
       <scroll-view  class="marketlist" scrollX="true">
         <view class="marketlist_one" wx:for="{{goods}}" wx:key="{{item.value}}">
           <navigator target="miniProgram" open-type="navigate" app-id="{{sysinfo.goods_app_id}}" path="{{sysinfo.goods_app_path}}" data-id="{{item.goods_id}}" version="release">
@@ -109,7 +98,7 @@
       </scroll-view>
     </view>
     <view class="relative" style='height:70rpx;border-bottom: 2rpx #D3D3D3 solid'>
-      <image class="pic_background" src="../../images/xinpingfabu.png"></image>
+      <image class="pic_background" style='width:240rpx;height:65rpx;' src="../../images/xpfb.png"></image>
       <view class="container1" wx:if="{{takeup}}">
         <image src='../../images/shouqianniu.png' style='height:28rpx;width:80rpx;margin-left:500rpx' bindtap='takeup'></image>
       </view>
@@ -119,13 +108,40 @@
     </view>
     <view wx:if="{{takeup}}">
 
-     <block wx:for="{{news}}" wx:key="{{index1}}" wx:for-item="item" wx:for-index="index1" >
-      <view class="relative" style='height:200rpx;border-bottom: 2rpx #D3D3D3 solid' catchtap='todetail' data-id='{{item.id}}'>
+     <block wx:for="{{newsgoods}}" wx:key="{{index1}}" wx:for-item="item" wx:for-index="index1" >
+      <view class="relative" style='height:200rpx;border-bottom: 2rpx #D3D3D3 solid' catchtap='togdetail' data-id='{{item.id}}'>
         <image class="pic_background" src="../../images/xinpingfabukuangjia.png"></image>
         <view class="container1" style='width:400rpx;height:200rpx;color:#000;font-size:33rpx;margin-left:30rpx'>
           <text class='news_title'>{{item.title}}</text>
         </view>
         <view class="container1" style='color:#dcdcdc;font-size:26rpx;margin-left:180rpx;margin-top:130rpx'>
+          {{item.comments_total}}条评论
+        </view>
+        <view class="container1">
+          <image src='{{ item.thumb}}' style='height:160rpx;width:270rpx;margin-left:320rpx'></image>
+        </view>
+      </view>
+    </block>
+    </view>
+
+    <view class="relative" style='height:70rpx;border-bottom: 2rpx #D3D3D3 solid'>
+      <image class="pic_background" style='width:240rpx;height:65rpx;' src="../../images/yxwk.png"></image>
+      <view class="container1" wx:if="{{takeup}}">
+        <image src='../../images/shouqianniu.png' style='height:28rpx;width:80rpx;margin-left:500rpx' bindtap='takeup'></image>
+      </view>
+      <view class="container1" wx:if="{{more}}">
+        <image src='../../images/gengduoanniu.png' style='height:28rpx;width:80rpx;margin-left:500rpx' bindtap='more'></image>
+      </view>
+    </view>
+    <view wx:if="{{takeup}}">
+
+     <block wx:for="{{news}}" wx:key="{{index1}}" wx:for-item="item" wx:for-index="index1" >
+      <view class="relative" style='height:200rpx;border-bottom: 2rpx #D3D3D3 solid' catchtap='todetail' data-id='{{item.id}}'>
+        <!-- <image class="pic_background" src="../../images/xinpingfabukuangjia.png"></image> -->
+        <view class="container1" style='width:400rpx;height:200rpx;color:#000;font-size:33rpx;margin-left:30rpx'>
+          <text class='news_title'>{{item.title}}</text>
+        </view>
+        <view class="container1" style='color:#dcdcdc;font-size:26rpx;margin-left:60rpx;margin-top:130rpx'>
           {{ item.viewed}}次浏览
         </view>
         <view class="container1">
@@ -134,6 +150,7 @@
       </view>
     </block>
     </view>
+
   </view>
 </view>
 <!-- <block>

+ 137 - 0
Furniture/page/newpro/newpro.js

xqd
@@ -0,0 +1,137 @@
+// page/newpro/newpro.js
+const app = getApp();
+var a = require("../../wxParse/wxParse.js");
+var api = require("../../api.js");
+var amapFile = require('../../amap-wx.js');
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    goods:[],
+    news:[],
+    takeup: true,
+    more: false,
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+    var that =this
+    app.request1({
+      url: api.goods_list,
+      success: function (e) {
+        console.log(e)
+        var good = e.data.data
+        var l = good.length
+        var goods = []
+        for(var i =0;i<l;i++){
+          var t = good[i]
+          goods[i] = t.img
+        }
+        console.log(goods)
+        that.setData({
+          goods: e.data.data,
+        })
+      }
+    });
+    app.request1({
+      url: api.newgoods_list,
+      success: function (e) {
+        console.log(e)
+        that.setData({
+          next_page_url: e.data.next_page_url,
+          newsgoods: e.data.data,
+        })
+      }
+    })
+  },
+  takeup: function () {
+    var that = this
+    that.setData({
+      takeup: false,
+      more: true
+    })
+  },
+  more: function () {
+    var that = this
+    that.setData({
+      takeup: true,
+      more: false
+    })
+  },
+  togdetail: function (e) {
+    console.log(e.currentTarget.dataset.id)
+    var id = e.currentTarget.dataset.id
+    wx.navigateTo({
+      url: '../homePage/detail/detail?id=' + id + '&way=' + 'xp',
+    })
+  },
+  onReachBottom: function () {
+    var that = this
+    if (that.data.next_page_url) {
+      app.request1({
+        url: that.data.next_page_url,
+        success: function (e) {
+          that.setData({
+            next_page_url: e.data.next_page_url,
+            newsgoods: [...that.data.news.concat(e.data.data)],
+          })
+        }
+      })
+    } else {
+      console.log('no more news')
+    }
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 1 - 0
Furniture/page/newpro/newpro.json

xqd
@@ -0,0 +1 @@
+{}

+ 37 - 0
Furniture/page/newpro/newpro.wxml

xqd
@@ -0,0 +1,37 @@
+<!--page/newpro/newpro.wxml-->
+    <view class="relative" style='height:400rpx;border-bottom: 2rpx #D3D3D3 solid'>
+      <swiper class="swiper" style='height:360rpx;' indicator-dots="true" autoplay="true" interval="5000" indicator-dots="true" duration="1000">
+        <block wx:for="{{goods}}" wx:for-index="index">
+          <swiper-item>
+            <image src="{{item.img}}" class="slide-image" />
+          </swiper-item>
+        </block>
+      </swiper>
+    </view>
+
+    <view class="relative" style='height:70rpx;border-bottom: 2rpx #D3D3D3 solid'>
+      <image class="pic_background" style='width:240rpx;height:65rpx;' src="../../images/xpfb.png"></image>
+      <view class="container1" wx:if="{{takeup}}">
+        <image src='../../images/shouqianniu.png' style='height:28rpx;width:80rpx;margin-left:500rpx' bindtap='takeup'></image>
+      </view>
+      <view class="container1" wx:if="{{more}}">
+        <image src='../../images/gengduoanniu.png' style='height:28rpx;width:80rpx;margin-left:500rpx' bindtap='more'></image>
+      </view>
+    </view>
+    <view wx:if="{{takeup}}">
+
+     <block wx:for="{{newsgoods}}" wx:key="{{index1}}" wx:for-item="item" wx:for-index="index1" >
+      <view class="relative" style='height:200rpx;border-bottom: 2rpx #D3D3D3 solid' catchtap='togdetail' data-id='{{item.id}}'>
+        <image class="pic_background" src="../../images/xinpingfabukuangjia.png"></image>
+        <view class="container1" style='width:400rpx;height:200rpx;color:#000;font-size:33rpx;margin-left:30rpx'>
+          <text class='news_title'>{{item.title}}</text>
+        </view>
+        <view class="container1" style='color:#dcdcdc;font-size:26rpx;margin-left:180rpx;margin-top:130rpx'>
+          {{item.comments_total}}条评论
+        </view>
+        <view class="container1">
+          <image src='{{ item.thumb}}' style='height:160rpx;width:270rpx;margin-left:320rpx'></image>
+        </view>
+      </view>
+    </block>
+    </view>

+ 2 - 0
Furniture/page/newpro/newpro.wxss

xqd
@@ -0,0 +1,2 @@
+/* page/newpro/newpro.wxss */
+@import "../homePage/homePage.wxss";

+ 23 - 0
Furniture/page/newpro/newprodetail.js

xqd
@@ -0,0 +1,23 @@
+// page/newpro/newprodetail.js
+Component({
+  /**
+   * 组件的属性列表
+   */
+  properties: {
+
+  },
+
+  /**
+   * 组件的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 组件的方法列表
+   */
+  methods: {
+
+  }
+})

+ 4 - 0
Furniture/page/newpro/newprodetail.json

xqd
@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 2 - 0
Furniture/page/newpro/newprodetail.wxml

xqd
@@ -0,0 +1,2 @@
+<!--page/newpro/newprodetail.wxml-->
+<text>page/newpro/newprodetail.wxml</text>

+ 1 - 0
Furniture/page/newpro/newprodetail.wxss

xqd
@@ -0,0 +1 @@
+/* page/newpro/newprodetail.wxss */

+ 0 - 1
Furniture/pages/infor/infor.js

xqd
@@ -399,7 +399,6 @@ Page({
       }
     })
   },
-// <<<<<<< HEAD
   detail: function(e) {
     console.log(e.target.id)
     wx.setStorageSync("detail_order_id", e.target.id);

+ 0 - 7
Furniture/pages/logs/guanggao.js

xqd xqd xqd
@@ -1,9 +1,6 @@
 // pages/logs/guanggao.js
-// <<<<<<< HEAD
 const app = getApp()
-// =======
 var st;
-// >>>>>>> 601fcb59c1773a1ffbe24c5d9ab395529140ff5f
 Component({
   /**
    * 组件的属性列表
@@ -31,7 +28,6 @@ Component({
    */
   methods: {
     onLoad:function(){
-// <<<<<<< HEAD
       var a = this;
       var that = this;
       app.request({
@@ -49,9 +45,6 @@ Component({
           })
         }
       })
-// =======
-      var that = this;
-// >>>>>>> 601fcb59c1773a1ffbe24c5d9ab395529140ff5f
       wx.getSystemInfo({
         success: function (f) {
           that.setData({

+ 0 - 1
Furniture/pages/make/make.js

xqd
@@ -189,7 +189,6 @@ Page({
       })
     }
   },
-//<<<<<<< HEAD
   backhome: function () {
     wx.reLaunch({
       url: '/page/homePage/homePage',

+ 0 - 4
Furniture/pages/packing/packing.js

xqd
@@ -478,14 +478,10 @@ Page({
       }
     })
   },
-  // <<<<<<< HEAD
 
   detail: function(e) {
     console.log(e.target.id)
     wx.setStorageSync("detail_order_id", e.target.id);
-    // =======
-    //   detail: function () {
-    // >>>>>>> 601fcb59c1773a1ffbe24c5d9ab395529140ff5f
     wx.navigateTo({
       url: '../packing/packing-detail',
     })

+ 3 - 3
Furniture/project.config.json

xqd
@@ -4,16 +4,16 @@
 		"ignore": []
 	},
 	"setting": {
-		"urlCheck": false,
+		"urlCheck": true,
 		"es6": true,
 		"postcss": true,
 		"minified": true,
 		"newFeature": true
 	},
 	"compileType": "miniprogram",
-	"libVersion": "2.3.0",
+	"libVersion": "2.4.2",
 	"appid": "wx18494553a568fbd1",
-	"projectname": "%E5%A4%A9%E5%A4%A9%E5%AE%B6%E5%B1%85%E6%83%A0",
+	"projectname": "%E5%AE%B6%E5%B1%85%E6%83%A0",
 	"condition": {
 		"search": {
 			"current": -1,