Browse Source

前端代码整理,加注释

nnkwrik 6 năm trước cách đây
mục cha
commit
195c7883e2
100 tập tin đã thay đổi với 547 bổ sung5071 xóa
  1. 11 31
      wx-front/app.json
  2. 1 11
      wx-front/config/api.js
  3. 12 13
      wx-front/pages/auth/auth.js
  4. 2 2
      wx-front/pages/auth/auth.wxml
  5. 19 89
      wx-front/pages/auth/auth.wxss
  6. 0 56
      wx-front/pages/brand/brand.js
  7. 0 16
      wx-front/pages/brand/brand.wxml
  8. 0 52
      wx-front/pages/brand/brand.wxss
  9. 0 63
      wx-front/pages/brandDetail/brandDetail.js
  10. 0 3
      wx-front/pages/brandDetail/brandDetail.json
  11. 0 28
      wx-front/pages/brandDetail/brandDetail.wxml
  12. 0 110
      wx-front/pages/brandDetail/brandDetail.wxss
  13. 0 29
      wx-front/pages/catalog/catalog.wxml
  14. 2 8
      wx-front/pages/category/index/index.js
  15. 0 0
      wx-front/pages/category/index/index.json
  16. 30 0
      wx-front/pages/category/index/index.wxml
  17. 6 20
      wx-front/pages/category/index/index.wxss
  18. 2 2
      wx-front/pages/category/list/list.js
  19. 0 0
      wx-front/pages/category/list/list.json
  20. 2 3
      wx-front/pages/category/list/list.wxml
  21. 0 0
      wx-front/pages/category/list/list.wxss
  22. 2 4
      wx-front/pages/chat/chatForm/chatForm.js
  23. 2 8
      wx-front/pages/chat/chatForm/chatForm.wxml
  24. 86 111
      wx-front/pages/chat/chatForm/chatForm.wxss
  25. 47 47
      wx-front/pages/chat/chatIndex/chatIndex.js
  26. 1 4
      wx-front/pages/chat/chatIndex/chatIndex.wxml
  27. 44 39
      wx-front/pages/chat/chatIndex/chatIndex.wxss
  28. 0 115
      wx-front/pages/comment/comment.js
  29. 0 3
      wx-front/pages/comment/comment.json
  30. 0 33
      wx-front/pages/comment/comment.wxml
  31. 0 156
      wx-front/pages/comment/comment.wxss
  32. 12 24
      wx-front/pages/goods/goods.js
  33. 14 26
      wx-front/pages/goods/goods.wxml
  34. 150 485
      wx-front/pages/goods/goods.wxss
  35. 0 105
      wx-front/pages/hotGoods/hotGoods.js
  36. 0 3
      wx-front/pages/hotGoods/hotGoods.json
  37. 0 40
      wx-front/pages/hotGoods/hotGoods.wxml
  38. 0 177
      wx-front/pages/hotGoods/hotGoods.wxss
  39. 0 14
      wx-front/pages/index/index.js
  40. 3 102
      wx-front/pages/index/index.wxml
  41. 11 278
      wx-front/pages/index/index.wxss
  42. 0 14
      wx-front/pages/logs/logs.js
  43. 0 3
      wx-front/pages/logs/logs.json
  44. 0 6
      wx-front/pages/logs/logs.wxml
  45. 0 8
      wx-front/pages/logs/logs.wxss
  46. 0 105
      wx-front/pages/newGoods/newGoods.js
  47. 0 3
      wx-front/pages/newGoods/newGoods.json
  48. 0 40
      wx-front/pages/newGoods/newGoods.wxml
  49. 0 177
      wx-front/pages/newGoods/newGoods.wxss
  50. 0 61
      wx-front/pages/pay/pay.js
  51. 0 3
      wx-front/pages/pay/pay.json
  52. 0 29
      wx-front/pages/pay/pay.wxml
  53. 0 123
      wx-front/pages/pay/pay.wxss
  54. 0 42
      wx-front/pages/payResult/payResult.js
  55. 0 4
      wx-front/pages/payResult/payResult.json
  56. 0 23
      wx-front/pages/payResult/payResult.wxml
  57. 0 59
      wx-front/pages/payResult/payResult.wxss
  58. 12 12
      wx-front/pages/post/category/category.js
  59. 0 0
      wx-front/pages/post/category/category.json
  60. 13 0
      wx-front/pages/post/category/category.wxml
  61. 8 14
      wx-front/pages/post/category/category.wxss
  62. 2 2
      wx-front/pages/post/nav2post/nav2post.js
  63. 0 0
      wx-front/pages/post/nav2post/nav2post.json
  64. 0 0
      wx-front/pages/post/nav2post/nav2post.wxml
  65. 0 0
      wx-front/pages/post/nav2post/nav2post.wxss
  66. 3 3
      wx-front/pages/post/post/post.js
  67. 0 0
      wx-front/pages/post/post/post.json
  68. 4 4
      wx-front/pages/post/post/post.wxml
  69. 0 0
      wx-front/pages/post/post/post.wxss
  70. 4 9
      wx-front/pages/post/region/region.js
  71. 0 0
      wx-front/pages/post/region/region.json
  72. 13 0
      wx-front/pages/post/region/region.wxml
  73. 8 14
      wx-front/pages/post/region/region.wxss
  74. 0 1
      wx-front/pages/postCate/postCate.json
  75. 0 13
      wx-front/pages/postCate/postCate.wxml
  76. 0 14
      wx-front/pages/region/region.wxml
  77. 1 63
      wx-front/pages/search/search.js
  78. 7 22
      wx-front/pages/search/search.wxml
  79. 13 115
      wx-front/pages/search/search.wxss
  80. 0 56
      wx-front/pages/shopping/address/address.js
  81. 0 1
      wx-front/pages/shopping/address/address.json
  82. 0 22
      wx-front/pages/shopping/address/address.wxml
  83. 0 132
      wx-front/pages/shopping/address/address.wxss
  84. 0 324
      wx-front/pages/shopping/addressAdd/addressAdd.js
  85. 0 3
      wx-front/pages/shopping/addressAdd/addressAdd.json
  86. 0 39
      wx-front/pages/shopping/addressAdd/addressAdd.wxml
  87. 0 179
      wx-front/pages/shopping/addressAdd/addressAdd.wxss
  88. 0 117
      wx-front/pages/shopping/checkout/checkout.js
  89. 0 3
      wx-front/pages/shopping/checkout/checkout.json
  90. 0 85
      wx-front/pages/shopping/checkout/checkout.wxml
  91. 0 295
      wx-front/pages/shopping/checkout/checkout.wxss
  92. 0 86
      wx-front/pages/topic/topic.js
  93. 0 1
      wx-front/pages/topic/topic.json
  94. 0 16
      wx-front/pages/topic/topic.wxml
  95. 0 94
      wx-front/pages/topic/topic.wxss
  96. 0 116
      wx-front/pages/topicComment/topicComment.js
  97. 0 3
      wx-front/pages/topicComment/topicComment.json
  98. 0 22
      wx-front/pages/topicComment/topicComment.wxml
  99. 0 108
      wx-front/pages/topicComment/topicComment.wxss
  100. 0 73
      wx-front/pages/topicDetail/topicDetail.js

+ 11 - 31
wx-front/app.json

@@ -1,38 +1,18 @@
 {
   "pages": [
     "pages/index/index",
-    "pages/catalog/catalog",
-    "pages/newGoods/newGoods",
-    "pages/hotGoods/hotGoods",
-    "pages/ucenter/address/address",
-    "pages/ucenter/addressAdd/addressAdd",
-    "pages/ucenter/footprint/footprint",
-    "pages/ucenter/order/order",
-    "pages/ucenter/orderDetail/orderDetail",
-    "pages/ucenter/express/express",
-    "pages/ucenter/feedback/feedback",
-    "pages/ucenter/income/income",
-    "pages/ucenter/collect/collect",
-    "pages/pay/pay",
-    "pages/payResult/payResult",
-    "pages/ucenter/index/index",
-    "pages/topic/topic",
-    "pages/comment/comment",
-    "pages/topicComment/topicComment",
-    "pages/brand/brand",
-    "pages/brandDetail/brandDetail",
     "pages/search/search",
-    "pages/category/category",
-    "pages/shopping/checkout/checkout",
-    "pages/shopping/address/address",
-    "pages/shopping/addressAdd/addressAdd",
     "pages/goods/goods",
-    "pages/topicDetail/topicDetail",
+    "pages/category/list/list",
+    "pages/category/index/index",
     "pages/auth/auth",
-    "pages/post/post",
-    "pages/region/region",
-    "pages/nav2post/nav2post",
-    "pages/postCate/postCate",
+    "pages/post/post/post",
+    "pages/post/region/region",
+    "pages/post/nav2post/nav2post",
+    "pages/post/category/category",
+    "pages/ucenter/income/income",
+    "pages/ucenter/collect/collect",
+    "pages/ucenter/index/index",
     "pages/ucenter/bought/bought",
     "pages/ucenter/sold/sold",
     "pages/ucenter/posted/posted",
@@ -62,13 +42,13 @@
         "text": "首页"
       },
       {
-        "pagePath": "pages/catalog/catalog",
+        "pagePath": "pages/category/index/index",
         "iconPath": "static/images/ic_menu_cate_nor.png",
         "selectedIconPath": "static/images/ic_menu_cate_pressed.png",
         "text": "分类"
       },
       {
-        "pagePath": "pages/nav2post/nav2post",
+        "pagePath": "pages/post/nav2post/nav2post",
         "iconPath": "static/images/ic_menu_add_nor.png",
         "selectedIconPath": "static/images/ic_menu_add_nor.png",
         "text": "发布"

+ 1 - 11
wx-front/config/api.js

@@ -45,19 +45,9 @@ module.exports = {
   //认证
   AuthLoginByWeixin: ApiRootUrl + 'auth/loginByWeixin', //微信登录
 
-
-
-
-
+  //消息
   ChatIndex: ApiRootUrl + 'chat/index', //消息一览
   ChatForm: ApiRootUrl + 'chat/form', //消息框
   ChatFlushUnread: ApiRootUrl + 'chat/flushUnread', //把所有未读设为已读
   ChatWs: WebSocktUrl + 'ws', //消息WebSocket连接
-
-
-
-  
-  
-
-
 };

+ 12 - 13
wx-front/pages/auth/auth.js

@@ -1,9 +1,8 @@
-// pages/auth/auth.js
 var app = getApp();
 var api = require('../../config/api.js');
 var util = require('../../utils/util.js');
 var websocket = require('../../services/websocket.js');
-  
+
 Page({
 
   /**
@@ -13,20 +12,13 @@ Page({
     userInfo: app.globalData.userInfo,
     hasUserInfo: false,
     canIUse: wx.canIUse('button.open-type.getUserInfo'),
-    load:false
-  },
-
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad: function(options) {
-
+    load: false
   },
 
   startLogin: function(e) {
     console.log(e);
     this.setData({
-      load:true
+      load: true
     })
     util.backendLogin(e.detail).then((userInfo) => {
       this.setData({
@@ -36,13 +28,20 @@ Page({
       websocket.wsConnect()
     });
   },
-  
-  goback: function () {
+
+  goback: function() {
     wx.navigateBack({
       delta: 1
     })
   },
 
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function(options) {
+
+  },
+
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 2 - 2
wx-front/pages/auth/auth.wxml

@@ -9,8 +9,8 @@
     </view>
 
     <!-- 不能用 open-type="getUserInfo" 的版本 -->
-    <button wx:if="{{!canIUse}}" class="btn" disabled="true" >微信版本过低,请更新后再尝试授权</button>
-    
+    <button wx:if="{{!canIUse}}" class="btn" disabled="true">微信版本过低,请更新后再尝试授权</button>
+
     <button wx:elif="{{!hasUserInfo}}" class="btn" open-type="getUserInfo" bindgetuserinfo="startLogin">{{load?'请稍等..':'授权登录'}}</button>
     <button wx:else disabled="true" class="btn">授权成功</button>
 

+ 19 - 89
wx-front/pages/auth/auth.wxss

@@ -1,91 +1,21 @@
-.form-box{
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    padding: 0 40rpx;
-    margin-top: 96rpx;
-    background: #fff;
-}
-
-.form-item{
-    position: relative;
-    background: #fff;
-    height: 96rpx;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.form-item .username, .form-item .password, .form-item .code{
-    position: absolute;
-    top: 26rpx;
-    left: 0;
-    display: block;
-    width: 100%;
-    height: 44rpx;
-    background: #fff;
-    color: #333;
-    font-size: 30rpx;
-}
-
-.form-item-code{
-    margin-top:32rpx;
-    height: auto;
-    overflow: hidden;
-    width: 100%;
-}
-
-.form-item-code .form-item{
-    float: left;
-    width: 350rpx;
-}
-
-.form-item-code .code-img{
-    float: right;
-    margin-top: 4rpx;
-    height: 88rpx;
-    width: 236rpx;
-}
-
-.form-item .clear{
-    position: absolute;
-    top: 26rpx;
-    right: 18rpx;
-    z-index: 2;
-    display: block;
-    background: #fff;
-    height: 44rpx;
-    width: 44rpx;
-}
-
-.btn{
-    margin: 60rpx 0 40rpx 0;
-    height: 96rpx;
-    line-height: 96rpx;
-    color: #fff;
-    font-size: 30rpx;
-    width: 100%;
-    background: #ef5a5a;
-    border-radius: 6rpx;
-}
-
-.form-item-text{
-    height: 35rpx;
-    width: 100%;
-}
-
-.form-item-text .register{
-    display: block;
-    height: 34rpx;
-    float: left;
-    font-size: 28rpx;
-    color: #999;
-}
-
-.form-item-text .reset{
-    display: block;
-    height: 34rpx;
-    float: right;
-    font-size: 28rpx;
-    color: #999;
+.form-box {
+  width: 100%;
+  height: auto;
+  overflow: hidden;
+  padding: 0 40rpx;
+  margin-top: 96rpx;
+  background: #fff;
+}
+
+.btn {
+  margin: 60rpx 0 40rpx 0;
+  height: 96rpx;
+  line-height: 96rpx;
+  color: #fff;
+  font-size: 30rpx;
+  width: 100%;
+  background: #ef5a5a;
+  border-radius: 6rpx;
 }
 
 .userinfo {
@@ -103,4 +33,4 @@
 
 .userinfo-nickname {
   color: #aaa;
-}
+}

+ 0 - 56
wx-front/pages/brand/brand.js

@@ -1,56 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-var app = getApp();
-Page({
-  data: {
-    brandList: [],
-    page: 1,
-    size: 10,
-    totalPages: 1
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.getBrandList();
-  },
-  getBrandList: function () {
-    wx.showLoading({
-      title: '加载中...',
-    });
-    let that = this;
-    util.request(api.BrandList, { page: that.data.page, size: that.data.size }).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          brandList: that.data.brandList.concat(res.data.data),
-          totalPages: res.data.totalPages
-        });
-      }
-      wx.hideLoading();
-    });
-  },
-  onReachBottom (){
-    if (this.data.totalPages > this.data.page) {
-      this.setData({
-        page: this.data.page + 1
-      });
-    } else {
-      return false;
-    }
-
-    this.getBrandList();
-  },
-  onReady: function () {
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  }
-})

+ 0 - 16
wx-front/pages/brand/brand.wxml

@@ -1,16 +0,0 @@
-<view class="container">
-    <view class="brand-list" >
-        <navigator url="../brandDetail/brandDetail?id={{item.id}}"  class="item" wx:for="{{brandList}}" wx:key="id">
-            <view class="img-bg">
-                <image src="{{item.app_list_pic_url}}" background-size="cover"></image>
-            </view>
-            <view class="txt-box">
-                <view class="line">
-                    <text class="name" >{{item.name}}</text>
-                    <text class="s">|</text>
-                    <text class="price">{{item.floor_price}}元起</text>
-                </view>
-            </view>
-        </navigator >
-    </view>
-</view>

+ 0 - 52
wx-front/pages/brand/brand.wxss

@@ -1,52 +0,0 @@
-.brand-list .item{
-    display: block;
-    width: 750rpx;
-    height: 416rpx;
-    position: relative;
-    margin-bottom: 4rpx;
-}
-
-.brand-list .item .img-bg{
-    position: absolute;
-    left:0;
-    top:0;
-    z-index: 0;
-    width: 750rpx;
-    height: 417rpx;
-    overflow: hidden;
-}
-
-.brand-list .item .img-bg image{
-    width: 750rpx;
-    height: 416rpx;
-}
-
-.brand-list .item .txt-box{
-    position: absolute;
-    left:0;
-    top:0;
-    display: table;
-    z-index: 0;
-    width: 750rpx;
-    height: 417rpx;
-}
-
-.brand-list .item .line{
-    display: table-cell;
-    vertical-align: middle;
-    text-align: center;
-    height: 63rpx;
-    line-height: 63rpx;
-}
-
-.brand-list .item .line text{
-    font-size: 35rpx;
-    font-weight: 700;
-    text-shadow: 1rpx 1rpx rgba(0,0,0,.32);
-    color: #fff;
-}
-
-.brand-list .item .line .s{
-    padding: 0 10rpx;
-    font-size: 40rpx;
-}

+ 0 - 63
wx-front/pages/brandDetail/brandDetail.js

@@ -1,63 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-
-
-var app = getApp();
-
-Page({
-  data: {
-    id: 0,
-    brand: {},
-    goodsList: [],
-    page: 1,
-    size: 1000
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    var that = this;
-    that.setData({
-      id: parseInt(options.id)
-    });
-    this.getBrand();
-  },
-  getBrand: function () {
-    let that = this;
-    util.request(api.BrandDetail, { id: that.data.id }).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          brand: res.data.brand
-        });
-
-        that.getGoodsList();
-      }
-    });
-  },
-  getGoodsList() {
-    var that = this;
-
-    util.request(api.GoodsList, { brandId: that.data.id, page: that.data.page, size: that.data.size})
-      .then(function (res) {
-        if (res.errno === 0) {
-          that.setData({
-            goodsList: res.data.goodsList
-          });
-        }
-      });
-  },
-  onReady: function () {
-    // 页面渲染完成
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  }
-})

+ 0 - 3
wx-front/pages/brandDetail/brandDetail.json

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

+ 0 - 28
wx-front/pages/brandDetail/brandDetail.wxml

@@ -1,28 +0,0 @@
-<view class="container">
-    <view class="brand-info">
-        <view class="name">
-            <image class="img" src="{{brand.app_list_pic_url}}" background-size="cover"></image>
-            <view class="info-box">
-                <view class="info">
-                    <text class="txt">{{brand.name}}</text>
-                    <text class="line"></text>
-                </view>
-            </view>
-        </view>
-        <view class="desc">
-            {{brand.simple_desc}}
-        </view>
-    </view>
-
-    <view class="cate-item">
-        <view class="b">
-            <block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem">
-            <navigator class="item {{iindex % 2 == 0 ? 'item-b' : ''}}" url="../goods/goods?id={{iitem.id}}">
-                <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
-                <text class="name">{{iitem.name}}</text>
-                <text class="price">¥{{iitem.retail_price}}</text>
-            </navigator>
-            </block>
-        </view>
-    </view>
-</view>

+ 0 - 110
wx-front/pages/brandDetail/brandDetail.wxss

@@ -1,110 +0,0 @@
-page{
-    background: #f4f4f4;
-}
-.brand-info .name{
-    width: 100%;
-    height: 290rpx;
-    position: relative;
-}
-
-.brand-info .img{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 290rpx;
-}
-
-.brand-info .info-box{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 290rpx;
-    text-align: center;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
-.brand-info .info{
-    display: block;
-}
-
-.brand-info .txt{
-    display: block;
-    height: 37.5rpx;
-    font-size: 37.5rpx;
-    color: #fff;
-}
-
-.brand-info .line{
-    margin: 0 auto;
-    margin-top: 16rpx;
-    display: block;
-    height: 2rpx;
-    width: 145rpx;
-    background: #fff;
-}
-
-.brand-info .desc{
-    background: #fff;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    padding: 41.5rpx 31.25rpx;
-    font-size: 30rpx;
-    color: #666;
-    line-height: 41.5rpx;
-    text-align: center;
-}
-
-.cate-item .b{
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  border-top: 1rpx solid #f4f4f4;
-  margin-top: 20rpx;
-}
-
-.cate-item .b .item{
-  float: left;
-  background: #fff;
-  width: 375rpx;
-  padding-bottom: 33.333rpx;
-  border-bottom: 1rpx solid #f4f4f4;
-  height: auto;
-  overflow: hidden;
-  text-align: center;
-}
-
-.cate-item .b .item-b{
- border-right: 1rpx solid #f4f4f4;
-}
-
-.cate-item .item .img{
-    margin-top: 10rpx;
-  width: 302rpx;
-  height: 302rpx;
-}
-
-.cate-item .item .name{
-  display: block;
-  width: 365.625rpx;
-  height: 35rpx;
-  padding: 0 20rpx;
-  overflow: hidden;
-  margin: 11.5rpx 0 22rpx 0;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-.cate-item .item .price{
-  display: block;
-  width: 365.625rpx;
-  height: 30rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #b4282d;
-}

+ 0 - 29
wx-front/pages/catalog/catalog.wxml

@@ -1,29 +0,0 @@
-<view class="container">
-  <view class="search">
-    <navigator url="/pages/search/search" class="input">
-      <image class="icon"></image>
-      <text class="txt">商品搜索,搜索关键字</text>
-    </navigator>
-  </view>
-  <view class="catalog">
-    <scroll-view class="nav" scroll-y="true">
-        <view class="item {{ currentCategoryId == item.id ? 'active' : ''}}" wx:for="{{navList}}"  data-id="{{item.id}}" data-name="{{item.name}}" data-index="{{index}}" bindtap="switchCate"  wx:key="{{item.id}}">{{item.name}}</view>
-    </scroll-view>
-    <scroll-view class="cate" scroll-y="true">
-        <view class="banner">
-            <image class="image" src="https://image.flaticon.com/icons/svg/743/743007.svg"></image>
-        </view>
-        <view class="hd">
-            <text class="line"></text>
-            <text class="txt">{{currentCategoryName}}分类</text>
-            <text class="line"></text>
-        </view>
-        <view class="bd">
-            <navigator url="/pages/category/category?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{currentCategory}}" wx:key="{{item.id}}">
-                <image class="icon" src="{{item.iconUrl}}"></image>
-                <text class="txt">{{item.name}}</text>
-            </navigator>
-        </view>
-    </scroll-view>
-  </view>
-</view>

+ 2 - 8
wx-front/pages/catalog/catalog.js → wx-front/pages/category/index/index.js

@@ -1,23 +1,17 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
+var util = require('../../../utils/util.js');
+var api = require('../../../config/api.js');
 
 Page({
   data: {
     navList: [],
-    categoryList: [],
     currentCategory: {},
     currentCategoryId: 0,
     currentCategoryName: '',
-    scrollLeft: 0,
-    scrollTop: 0,
-    goodsCount: 0,
-    scrollHeight: 0
   },
   onLoad: function(options) {
     this.getCatalog();
   },
   getCatalog: function() {
-    //CatalogList
     let that = this;
     wx.showLoading({
       title: '加载中...',

+ 0 - 0
wx-front/pages/brand/brand.json → wx-front/pages/category/index/index.json


+ 30 - 0
wx-front/pages/category/index/index.wxml

@@ -0,0 +1,30 @@
+<!-- 分类页 -->
+<view class="container">
+  <view class="search">
+    <navigator url="/pages/search/search" class="input">
+      <image class="icon"></image>
+      <text class="txt">商品搜索,搜索关键字</text>
+    </navigator>
+  </view>
+  <view class="catalog">
+    <scroll-view class="nav" scroll-y="true">
+      <view class="item {{ currentCategoryId == item.id ? 'active' : ''}}" wx:for="{{navList}}" data-id="{{item.id}}" data-name="{{item.name}}" data-index="{{index}}" bindtap="switchCate" wx:key="{{item.id}}">{{item.name}}</view>
+    </scroll-view>
+    <scroll-view class="cate" scroll-y="true">
+      <view class="banner">
+        <image class="image" src="https://image.flaticon.com/icons/svg/743/743007.svg"></image>
+      </view>
+      <view class="hd">
+        <text class="line"></text>
+        <text class="txt">{{currentCategoryName}}分类</text>
+        <text class="line"></text>
+      </view>
+      <view class="bd">
+        <navigator url="/pages/category/list/list?id={{item.id}}" class="item {{(index+1) % 3 == 0 ? 'last' : ''}}" wx:for="{{currentCategory}}" wx:key="{{item.id}}">
+          <image class="icon" src="{{item.iconUrl}}"></image>
+          <text class="txt">{{item.name}}</text>
+        </navigator>
+      </view>
+    </scroll-view>
+  </view>
+</view>

+ 6 - 20
wx-front/pages/catalog/catalog.wxss → wx-front/pages/category/index/index.wxss

@@ -68,10 +68,9 @@ page {
 }
 
 .catalog .nav .item.active {
-color:#000;
-font-size:36rpx;
-border-left:6rpx solid #fd9f06;
-
+  color: #000;
+  font-size: 36rpx;
+  border-left: 6rpx solid #fd9f06;
 }
 
 .catalog .cate {
@@ -97,18 +96,6 @@ border-left:6rpx solid #fd9f06;
   width: 100%;
 }
 
-.banner .txt {
-  position: absolute;
-  top: 30rpx;
-  text-align: center;
-  color: #fff;
-  font-size: 28rpx;
-  left: 0;
-  height: 192rpx;
-  line-height: 192rpx;
-  width: 100%;
-}
-
 .catalog .hd {
   height: 108rpx;
   width: 100%;
@@ -150,10 +137,9 @@ border-left:6rpx solid #fd9f06;
 }
 
 .catalog .bd .item .icon {
-  height:80rpx;
-  width:80rpx;
-  margin-left:17px;
-
+  height: 80rpx;
+  width: 80rpx;
+  margin-left: 17px;
 }
 
 .catalog .bd .item .txt {

+ 2 - 2
wx-front/pages/category/category.js → wx-front/pages/category/list/list.js

@@ -1,5 +1,5 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
+var util = require('../../../utils/util.js');
+var api = require('../../../config/api.js');
 
 Page({
   data: {

+ 0 - 0
wx-front/pages/category/category.json → wx-front/pages/category/list/list.json


+ 2 - 3
wx-front/pages/category/category.wxml → wx-front/pages/category/list/list.wxml

@@ -2,7 +2,7 @@
 <view class="container">
     <view class="cate-nav">
         <scroll-view scroll-x="true" class="cate-nav-body" style="width: 750rpx;" scroll-left="{{scrollLeft}}">
-            <view  wx:for="{{navList}}" class="item {{ id == item.id ? 'active' : ''}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">
+            <view  wx:for="{{navList}}" wx:key="{{index}}" class="item {{ id == item.id ? 'active' : ''}}" data-id="{{item.id}}" data-index="{{index}}" bindtap="switchCate">
                 <view class="name">{{item.name}}</view>
             </view>
         </scroll-view>
@@ -11,13 +11,12 @@
 
     <view class="cate-item">
         <view class="b">
-            <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}"   url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:for-item="iitem" wx:for-index="iindex" >
+            <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}"   url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:for-item="iitem" wx:for-index="iindex" wx:key="{{index}}">
                 <image class="img" src="{{iitem.primaryPicUrl}}" background-size="cover"></image>
                 <text class="name">{{iitem.name}}</text>
                 <text class="price">¥{{iitem.price}}</text>
             </navigator>
         </view>
     </view>
-    <!-- TODO 到底后加载更多 -->
     </scroll-view>
 </view>

+ 0 - 0
wx-front/pages/category/category.wxss → wx-front/pages/category/list/list.wxss


+ 2 - 4
wx-front/pages/chat/chatForm/chatForm.js

@@ -20,7 +20,6 @@ Page({
     offsetTime: null,
     size: 10,
     scrollHeight: 0,
-    newScrollHeight: 0,
     noMore: false,
     input: '',
     typing: '',
@@ -59,13 +58,13 @@ Page({
           offsetTime: res.data.offsetTime+"",
         });
         
-
         if (res.data.historyList.length < that.data.size) {
           that.setData({
             noMore: true
           })
         }
         if (that.data.historyList.length < 11) {
+          //首次加载
           wx.setNavigationBarTitle({
             title: that.data.otherSide.nickName
           })
@@ -108,7 +107,6 @@ Page({
       }]
       that.addHistoryList(newHistory)
       that.openListen()
-
     })
   },
   toGoods: function(event) {
@@ -131,7 +129,7 @@ Page({
       query.select('#hei').boundingClientRect()
       query.selectViewport().scrollOffset()
       query.exec(function(res) {
-        console.log("异步设置ScrollHeight" + res[0].top)
+        console.log("ScrollHeight " + res[0].top)
         resolve(res[0].top);
       })
     });

+ 2 - 8
wx-front/pages/chat/chatForm/chatForm.wxml

@@ -15,11 +15,9 @@
 </view>
 
 
-
 <view class='news'>
-  <scroll-view scroll-y="true" bindscrolltoupper="more" scroll-top="{{scrollTop}}" wx:key='' class='scroll' >
+  <scroll-view scroll-y="true" bindscrolltoupper="more" scroll-top="{{scrollTop}}" wx:key='' class='scroll'>
     <view class="historycon">
-      <!-- <view id="hei"></view> -->
 
       <view wx:for="{{historyList}}" wx:key="{{index}}">
 
@@ -57,21 +55,17 @@
       </view>
       <view id="hei"></view>
     </view>
-
-
   </scroll-view>
 </view>
 
 
-
 <view class="input-pop-box">
   <view class="input-pop">
 
     <view class="input">
 
       <view class="content">
-        <input class='' confirm-hold="true" placeholder="" maxlength='800' confirm-type="done" bindconfirm='done' value='{{typing}}' bindinput="inputChange" bindconfirm='sendMsg'/>
-
+        <input class='' confirm-hold="true" placeholder="" maxlength='800' confirm-type="done" bindconfirm='done' value='{{typing}}' bindinput="inputChange" bindconfirm='sendMsg' />
       </view>
       <view class='send' bindtap='sendMsg'>发送</view>
     </view>

+ 86 - 111
wx-front/pages/chat/chatForm/chatForm.wxss

@@ -4,17 +4,72 @@ page {
   background-color: #f7f7f7;
 }
 
+.scroll {
+  height: 75vh;
+}
 
-.time {
-  text-align: center;
-  padding: 5rpx 20rpx 5rpx 20rpx;
-  width: 200rpx;
-  font-size: 26rpx;
-  background-color: #ccc;
-  color: #fff;
-  border-radius: 20rpx;
+/* top */
+
+.top-pop {
+  width: 100%;
+  height: auto;
+  max-height: 780rpx;
+  background: #fff;
+  position: fixed;
+  z-index: 9;
+  top: 0rpx;
+  border-bottom: 1rpx solid #ddd;
+}
+
+.top-pop-box .top-pop .content {
+  display: flex;
+  background: #fff;
+  font-size: 29rpx;
+  color: #333;
+  height: auto;
+  padding: 20rpx 30rpx 20rpx 30rpx;
+  overflow: hidden;
+}
+
+.top-pop-box .top-pop .img {
+  height: 125rpx;
+  width: 125rpx;
+}
+
+.top-pop-box .top-pop .info {
+  padding-left: 30rpx;
+}
+
+.top-pop-box .top-pop .info .price {
+  margin-top: 8rpx;
+  font-size: 28rpx;
+  color: #f94b4b;
+  line-height: 40rpx;
+  width: 160rpx;
+}
+
+.top-pop-box .top-pop .info .name {
+  font-size: 30rpx;
+  color: #000;
+  line-height: 40rpx;
 }
 
+.top-pop-box .top-pop .info .order {
+  display: flex;
+}
+
+.top-pop-box .top-pop .info .msg {
+  font-size: 24rpx;
+  color: #666;
+}
+
+.top-pop-box .top-pop .info .btn {
+  font-size: 24rpx;
+  background: #f94b4b;
+  color: #fff;
+  margin-left: 110px;
+  padding: 10rpx;
+}
 
 /* 聊天内容 */
 
@@ -22,12 +77,33 @@ page {
   margin-top: 180rpx;
   text-align: center;
   margin-bottom: 120rpx;
-  /* overflow: auto; */
 }
 
+.historycon {
+  height: 90%;
+  width: 100%;
+  flex-direction: column;
+  display: flex;
+  border-top: 0px;
+}
 
+.history {
+  margin-top: 15px;
+  margin: 10px;
+  font-size: 14px;
+  line-height: 40px;
+  word-break: break-all;
+}
 
-/* 聊天 */
+.time {
+  text-align: center;
+  padding: 5rpx 20rpx 5rpx 20rpx;
+  width: 200rpx;
+  font-size: 26rpx;
+  background-color: #ccc;
+  color: #fff;
+  border-radius: 20rpx;
+}
 
 .page_row {
   display: flex;
@@ -78,37 +154,13 @@ page {
   border-color: transparent #ffde57 transparent transparent;
 }
 
-
-
-.historycon {
-  height: 90%;
-  width: 100%;
-  flex-direction: column;
-  display: flex;
-  /* margin-top: 100rpx; */
-  border-top: 0px;
-}
-
-
-
-.history {
-  margin-top: 15px;
-  margin: 10px;
-  font-size: 14px;
-  line-height: 40px;
-  word-break: break-all;
-}
-
 /* input */
 
 .input-pop-box {
-  /* width: 100%;
-  height: 100%; */
   position: fixed;
   background: rgba(0, 0, 0, 0.5);
   z-index: 8;
   bottom: 0;
-  /* display: none; */
 }
 
 .input-pop {
@@ -127,16 +179,10 @@ page {
   font-size: 29rpx;
   color: #333;
   height: auto;
-  /* width: 650rpx; */
   padding: 20rpx 30rpx 20rpx 30rpx;
-  /* margin:10px; */
   overflow: hidden;
 }
 
-.input-pop-box .input-pop .title {
-  margin-bottom: 10rpx;
-}
-
 .input-pop-box .input-pop .content {
   border: 1rpx solid #eee;
   border-radius: 20rpx;
@@ -169,74 +215,3 @@ page {
   border: 3rpx solid #333;
   margin-left: 20rpx;
 }
-
-/* top */
-
-
-
-.top-pop {
-  width: 100%;
-  height: auto;
-  max-height: 780rpx;
-  background: #fff;
-  position: fixed;
-  z-index: 9;
-  top: 0rpx;
-  border-bottom: 1rpx solid #ddd;
-}
-
-.top-pop-box .top-pop .content {
-  display: flex;
-  background: #fff;
-  font-size: 29rpx;
-  color: #333;
-  height: auto;
-  /* width: 650rpx; */
-  padding: 20rpx 30rpx 20rpx 30rpx;
-  /* margin:10px; */
-  overflow: hidden;
-}
-
-.top-pop-box .top-pop .img {
-  height: 125rpx;
-  width: 125rpx;
-}
-
-.top-pop-box .top-pop .info {
-  padding-left: 30rpx;
-}
-
-.top-pop-box .top-pop .info .price {
-  margin-top: 8rpx;
-  font-size: 28rpx;
-  color: #f94b4b;
-  line-height: 40rpx;
-  width: 160rpx;
-}
-
-.top-pop-box .top-pop .info .name {
-  font-size: 30rpx;
-  color: #000;
-  line-height: 40rpx;
-}
-
-.top-pop-box .top-pop .info .order {
-  display: flex;
-}
-
-.top-pop-box .top-pop .info .msg {
-  font-size: 24rpx;
-  color: #666;
-}
-
-.top-pop-box .top-pop .info .btn {
-  font-size: 24rpx;
-  background: #f94b4b;
-  color: #fff;
-  margin-left:110px;
-  padding: 10rpx;
-}
-
-.scroll {
-  height: 75vh;
-}

+ 47 - 47
wx-front/pages/chat/chatIndex/chatIndex.js

@@ -10,52 +10,15 @@ Page({
     offsetTime: null,
     size: 10,
   },
-  onLoad: function (options) {
+  onLoad: function(options) {
     // 页面初始化 options为页面跳转所带来的参数
 
   },
-  openListen: function () {
-    let that = this
-    websocket.listenChatIndex().then(res => {
-      console.log("chatIndex监听到消息:" + res)
-
-
-      //存在与目前list中
-      let chatList = this.data.chatList
-      for (var i in chatList) {
-        if (chatList[i].lastChat.chatId == res.chatId) {
-          var target = chatList[i]
-          var newChatList = []
-
-
-          target.unreadCount++;
-          target.u1ToU2 = res.senderId < res.receiverId ? true : false
-          target.lastChat.messageType = res.messageType
-          target.lastChat.messageBody = res.messageBody
-          target.lastChat.sendTime = res.sendTime
-
-          chatList.splice(i, 1);
-          console.log(chatList)
-
-          newChatList.push(target)
-          newChatList = newChatList.concat(chatList)
-
-          that.setData({
-            chatList: newChatList
-          })
-          that.openListen()
-          return
-        }
-      }
-      //不存在, 后端可以专门写个api
-      that.onShow()
-    })
-  },
-  onReady: function () {
+  onReady: function() {
     // 页面渲染完成
 
   },
-  onShow: function () {
+  onShow: function() {
     // 页面显示
     let now = new Date();
     this.setData({
@@ -67,21 +30,21 @@ Page({
       this.openListen();
     }
   },
-  onHide: function () {
+  onHide: function() {
     // 页面隐藏
     websocket.listenBadge()
 
   },
-  onUnload: function () {
+  onUnload: function() {
     // 页面关闭
 
   },
-  getChatList: function () {
+  getChatList: function() {
     let that = this;
     util.request(api.ChatIndex, {
       size: this.data.size,
       offsetTime: this.data.offsetTime
-    }).then(function (res) {
+    }).then(function(res) {
       if (res.errno === 0) {
         console.log(res.data);
         that.setData({
@@ -93,7 +56,7 @@ Page({
       }
     })
   },
-  navForm: function (e) {
+  navForm: function(e) {
     var chatId = e.currentTarget.dataset.id
     var index = e.currentTarget.dataset.index
     var chatList = this.data.chatList
@@ -113,7 +76,44 @@ Page({
     })
 
   },
-  onPullDownRefresh: function () {
+  openListen: function() {
+    let that = this
+    websocket.listenChatIndex().then(res => {
+      console.log("chatIndex监听到消息:" + res)
+
+      //ws监听到新消息,加入当前列表中
+      let chatList = this.data.chatList
+      for (var i in chatList) {
+        //存在与目前list中
+        if (chatList[i].lastChat.chatId == res.chatId) {
+          var target = chatList[i]
+          var newChatList = []
+
+
+          target.unreadCount++;
+          target.u1ToU2 = res.senderId < res.receiverId ? true : false
+          target.lastChat.messageType = res.messageType
+          target.lastChat.messageBody = res.messageBody
+          target.lastChat.sendTime = res.sendTime
+
+          chatList.splice(i, 1);
+          console.log(chatList)
+
+          newChatList.push(target)
+          newChatList = newChatList.concat(chatList)
+
+          that.setData({
+            chatList: newChatList
+          })
+          that.openListen()
+          return
+        }
+      }
+      //不存在, 后端可以专门写个api
+      that.onShow()
+    })
+  },
+  onPullDownRefresh: function() {
     console.log("上拉刷新")
     this.setData({
       chatList: [],
@@ -127,7 +127,7 @@ Page({
 
 
   },
-  onReachBottom: function () {
+  onReachBottom: function() {
     console.log("拉到底")
 
     this.getChatList()

+ 1 - 4
wx-front/pages/chat/chatIndex/chatIndex.wxml

@@ -10,11 +10,9 @@
   </view>
 
 
-
-
   <view class="result-list" wx:if="{{chatList.length > 0}}">
 
-    <view class="chat" bindtap='navForm' data-id='{{item.lastChat.chatId}}' data-index='{{index}}'  wx:for="{{chatList}}" wx:key="{{index}}">
+    <view class="chat" bindtap='navForm' data-id='{{item.lastChat.chatId}}' data-index='{{index}}' wx:for="{{chatList}}" wx:key="{{index}}">
       <view class="item">
         <view class='avatar-item'>
           <image class="avatar" mode='aspectFill' src="{{item.otherSide.avatarUrl}}"></image>
@@ -35,7 +33,6 @@
         <image class="img" mode='aspectFill' src="{{item.goods.primaryPicUrl}}"></image>
       </view>
     </view>
-    
 
   </view>
   <view class="result-empty" wx:else>

+ 44 - 39
wx-front/pages/chat/chatIndex/chatIndex.wxss

@@ -12,6 +12,8 @@ page {
   overflow: hidden;
 }
 
+/* 顶上的提示 */
+
 .top {
   margin-top: 10rpx;
   background: #ffde57;
@@ -42,36 +44,7 @@ page {
   color: #000;
 }
 
-.result-empty {
-  width: 100%;
-  height: auto;
-  margin: 0 auto;
-}
-
-.result-empty .c {
-  width: 100%;
-  height: auto;
-  margin-top: 280rpx;
-}
-
-.result-empty .c image {
-  margin: 0 auto;
-  display: block;
-  text-align: center;
-  width: 180rpx;
-  height: 180rpx;
-}
-
-.result-empty .c text {
-  margin: 30rpx auto;
-  display: block;
-  width: 258rpx;
-  height: 29rpx;
-  line-height: 29rpx;
-  text-align: center;
-  font-size: 29rpx;
-  color: #999;
-}
+/* 消息列表 */
 
 .result-list {
   width: 100%;
@@ -97,7 +70,6 @@ page {
 
 .result-list .item .avatar-item {
   float: left;
-  /* width:190rpx; */
 }
 
 .result-list .item .avatar {
@@ -132,14 +104,6 @@ page {
   line-height: 13px;
 }
 
-.result-list .item .img {
-  float: right;
-  height: 130rpx;
-  width: 130rpx;
-  background: #f4f4f4;
-  margin: 19.5rpx 18rpx 19.5rpx 25rpx;
-}
-
 .result-list .item .info {
   float: left;
   height: 125rpx;
@@ -185,3 +149,44 @@ page {
   color: #666;
   font-size: 27rpx;
 }
+
+.result-list .item .img {
+  float: right;
+  height: 130rpx;
+  width: 130rpx;
+  background: #f4f4f4;
+  margin: 19.5rpx 18rpx 19.5rpx 25rpx;
+}
+
+/* 没有记录 */
+
+.result-empty {
+  width: 100%;
+  height: auto;
+  margin: 0 auto;
+}
+
+.result-empty .c {
+  width: 100%;
+  height: auto;
+  margin-top: 280rpx;
+}
+
+.result-empty .c image {
+  margin: 0 auto;
+  display: block;
+  text-align: center;
+  width: 180rpx;
+  height: 180rpx;
+}
+
+.result-empty .c text {
+  margin: 30rpx auto;
+  display: block;
+  width: 258rpx;
+  height: 29rpx;
+  line-height: 29rpx;
+  text-align: center;
+  font-size: 29rpx;
+  color: #999;
+}

+ 0 - 115
wx-front/pages/comment/comment.js

@@ -1,115 +0,0 @@
-var app = getApp();
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-
-Page({
-  data: {
-    comments: [],
-    allCommentList: [],
-    picCommentList: [],
-    typeId: 0,
-    valueId: 0,
-    showType: 0,
-    allCount: 0,
-    hasPicCount: 0,
-    allPage: 1,
-    picPage: 1,
-    size: 20
-  },
-  getCommentCount: function () {
-    let that = this;
-    util.request(api.CommentCount, { valueId: that.data.valueId, typeId: that.data.typeId}).then(function (res) {
-      if (res.errno === 0) {
-
-        that.setData({
-          allCount: res.data.allCount,
-          hasPicCount: res.data.hasPicCount
-        });
-      }
-    });
-  },
-  getCommentList: function(){
-    let that = this;
-    util.request(api.CommentList, { 
-      valueId: that.data.valueId, 
-      typeId: that.data.typeId, 
-      size: that.data.size,
-      page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage),
-      showType: that.data.showType 
-      }).then(function (res) {
-      if (res.errno === 0) {
-
-        if (that.data.showType == 0) {
-          that.setData({
-            allCommentList: that.data.allCommentList.concat(res.data.data),
-            allPage: res.data.currentPage,
-            comments: that.data.allCommentList.concat(res.data.data)
-          });
-        } else {
-          that.setData({
-            picCommentList: that.data.picCommentList.concat(res.data.data),
-            picPage: res.data.currentPage,
-            comments: that.data.picCommentList.concat(res.data.data)
-          });
-        }
-      }
-    });
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.setData({
-      typeId: options.typeId,
-      valueId: options.valueId
-    });
-    this.getCommentCount();
-    this.getCommentList();
-  },
-  onReady: function () {
-    // 页面渲染完成
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  switchTab: function () {
-    this.setData({
-      showType: this.data.showType == 1 ? 0 :1
-    });
-
-    this.getCommentList();
-  },
-  onReachBottom: function(){
-    console.log('onPullDownRefresh');
-    if ( this.data.showType == 0) {
-
-      if (this.data.allCount / this.data.size < this.data.allPage) {
-        return false;
-      }
-
-      this.setData({
-        'allPage' : this.data.allPage + 1
-      });
-    } else {
-      if (this.data.hasPicCount / this.data.size < this.data.picPage) {
-        return false;
-      }
-
-      this.setData({
-        'picPage': this.data.picPage + 1
-      });
-    }
-
-
-
-    this.getCommentList();
-  }
-})

+ 0 - 3
wx-front/pages/comment/comment.json

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

+ 0 - 33
wx-front/pages/comment/comment.wxml

@@ -1,33 +0,0 @@
-<view class="comments">
-    <view class="h">
-        <view class="item {{ showType == 0 ? 'active' : ''}}" bindtap="switchTab">
-            <view class="txt">全部({{allCount}})</view>
-        </view>
-        <view class="item {{ showType == 0 ? '' : 'active'}}" bindtap="switchTab">
-            <view class="txt">有图({{hasPicCount}})</view>
-        </view>
-    </view>
-  <view class="b">
-    <view class="item" wx:for="{{comments}}" wx:key="{{item.id}}">
-      <view class="info">
-        <view class="user">
-          <image src="{{item.user_info.avatar}}"></image>
-          <text>{{item.user_info.nickname}}</text>
-        </view>
-        <view class="time">{{item.add_time}}</view>
-      </view>
-      <view class="comment">{{item.content}}</view>
-      <view class="imgs" wx:if="{{item.pic_list.length > 0}}">
-        <image class="img" wx:for="{{item.pic_list}}" wx:key="{{pitem.id}}" wx:for-item="pitem" src="{{pitem.pic_url}}"></image>
-      </view>
-      <view class="spec">
-        <!-- <text class="item">白色 2件</text> -->
-      </view>
-      <!--<view class="customer-service" wx:if="{{item.commentReplyVO}}">
-        <text class="u">小选回复:</text>
-        <text class="c">{{item.commentReplyVO.replyContent}}</text>
-      </view>-->
-    </view>
-
-  </view>
-</view>

+ 0 - 156
wx-front/pages/comment/comment.wxss

@@ -1,156 +0,0 @@
-.comments{
-    width: 100%;
-    height: auto;
-    padding-left:30rpx;
-    background: #fff;
-    margin: 20rpx 0;
-}
-
-.comments .h{
-    position: fixed;
-    left:0;
-    top:0;
-    z-index: 1000;
-    width: 100%;
-    display: flex;   
-    background: #fff;
-    height: 84rpx;
-    border-bottom: 1px solid rgba(0,0,0,.15);
-}
-
-.comments .h .item{
-    display: inline-block;
-    height: 82rpx;
-    width: 50%;
-    padding: 0 15rpx;
-    text-align: center;
-}
-
-.comments .h .item .txt{
-    display: inline-block;
-    height: 82rpx;
-    padding: 0 20rpx;
-    line-height: 82rpx;
-    color: #333;
-    font-size: 30rpx;
-    width: 170rpx;
-}
-
-.comments .h .item.active .txt{
-    color: #ab2b2b;
-    border-bottom: 4rpx solid #ab2b2b;
-}
-
-.comments .b{
-    margin-top: 85rpx;
-    height: auto;
-    width: 720rpx;
-}
-
-.comments .b.no-h{
-    margin-top: 0;
-}
-
-.comments .item{
-    height: auto;
-    width: 720rpx;
-    overflow: hidden;
-    border-bottom: 1px solid #d9d9d9;
-    padding-bottom: 25rpx;
-}
-
-.comments .info{
-    height: 127rpx;
-    width: 100%;
-    padding: 33rpx 0 27rpx 0;
-}
-
-.comments .user{
-    float: left;
-    width: auto;
-    height: 67rpx;
-    line-height: 67rpx;
-    font-size: 0;
-}
-
-.comments .user image{
-    float: left;
-    width: 67rpx;
-    height: 67rpx;
-    margin-right: 17rpx;
-    border-radius: 50%;
-}
-
-.comments .user text{
-    display: inline-block;
-    width: auto;
-    height: 66rpx;
-    overflow: hidden;
-    font-size: 29rpx;
-    line-height: 66rpx;
-}
-
-.comments .time{
-    display: block;
-    float: right;
-    width: auto;
-    height: 67rpx;
-    line-height: 67rpx;
-    color: #7f7f7f;
-    font-size: 25rpx;
-    margin-right: 30rpx;
-}
-
-.comments .comment{
-    width: 720rpx;
-    padding-right: 30rpx;
-    line-height: 45.8rpx;
-    font-size: 29rpx;
-    margin-bottom: 16rpx;
-}
-
-.comments .imgs{
-    width: 720rpx;
-    height: 150rpx;
-    margin-bottom: 25rpx;
-}
-
-.comments .imgs .img{
-    height: 150rpx;
-    width: 150rpx;
-    margin-right: 28rpx;
-}
-
-.comments .spec{
-    width: 720rpx;
-    height: 25rpx;
-    font-size: 24rpx;
-    color: #999;
-}
-
-.comments .spec .item{
-    color: #7f7f7f;
-    font-size: 25rpx;
-}
-
-.comments .customer-service{
-    width: 690rpx;
-    height: auto;
-    overflow: hidden;
-    margin-top: 23rpx;
-    background: rgba(0,0,0,.03);
-    padding: 21rpx;
-}
-
-
-.comments .customer-service .u{
-    font-size: 24rpx;
-    color: #333;
-    line-height: 37.5rpx;
-}
-
-.comments .customer-service .c{
-    font-size: 24rpx;
-    color: #999;
-    line-height: 37.5rpx;
-}

+ 12 - 24
wx-front/pages/goods/goods.js

@@ -15,7 +15,6 @@ Page({
     sellerDates: 0,
     sellerHistory: 0,
     relatedGoods: [],
-    cartGoodsCount: 0,
     userHasCollect: 0,
 
     openComment: false,
@@ -47,13 +46,13 @@ Page({
           }, 1000)
           return
         }
-        
+
         //计算卖家来平台第几天
         let registerTime = res.data.seller.registerTime
         registerTime = registerTime.replace('T', ' ').replace(/-/g, '/').split(".")[0];
         let duration = new Date().getTime() - new Date(registerTime).getTime();
         let dates = parseInt(Math.floor(duration) / (1000 * 60 * 60 * 24));
-        console.log("dates " + dates)
+
         that.setData({
           goods: res.data.info,
           gallery: res.data.gallery,
@@ -129,21 +128,9 @@ Page({
       onLoadOption: options,
       id: parseInt(options.id),
       commentContent: ''
-
-      // id: 1181000
     });
 
-    var that = this;
     this.getGoodsInfo();
-
-    // util.request(api.CartGoodsCount).then(function (res) {
-    //   if (res.errno === 0) {
-    //     that.setData({
-    //       cartGoodsCount: res.data.cartTotal.goodsCount
-    //     });
-
-    //   }
-    // });
   },
   onReady: function() {
     // 页面渲染完成
@@ -298,17 +285,18 @@ Page({
     })
     console.log(url)
   },
+
   want: function() {
     util.request(api.GoodsWant + '/' + this.data.id + '/' + this.data.seller.openId, {}, "POST")
-    .then(function(res) {
-      if (res.errno == 0) {
-        wx.navigateTo({
-          url: '/pages/chat/chatForm/chatForm?id=' + res.data,
-        })
-      }else{
-        console.log(res)
-      }
-    })
+      .then(function(res) {
+        if (res.errno == 0) {
+          wx.navigateTo({
+            url: '/pages/chat/chatForm/chatForm?id=' + res.data,
+          })
+        } else {
+          console.log(res)
+        }
+      })
   },
 
   onReachBottom: function() {

+ 14 - 26
wx-front/pages/goods/goods.wxml

@@ -1,4 +1,5 @@
 <view class="container">
+  <!-- 图片 -->
   <swiper class="goodsimgs" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
     <swiper-item wx:for="{{gallery}}" wx:key="{{item.id}}">
       <image bindtap='preview' data-url="{{item.imgUrl}}" src="{{item.imgUrl}}" mode='aspectFill' background-size="cover"></image>
@@ -8,6 +9,7 @@
     <view class="icon time">最后编辑:{{goods.lastEdit}}</view>
     <view class="icon location">地点:{{goods.region}}</view>
   </view>
+  <!-- 商品详情 -->
   <view class="goods-info">
     <view class="c">
       <text class="name">{{goods.name}}</text>
@@ -21,6 +23,7 @@
 
     </view>
   </view>
+  <!-- 标签 -->
   <view class="section-nav section-act">
     <view class="t" wx:if='{{goods.ableExpress||goods.ableMeet||goods.ableSelfTake}}'>
       <view class="tag r" wx:if="{{goods.ableExpress}}">{{!goods.postage?'包邮':'邮费:'+goods.postage+'元'}}</view>
@@ -36,6 +39,7 @@
     </view>
   </view>
 
+  <!-- 卖家信息 -->
   <navigator url="/pages/user/user?userId={{seller.openId}}" class="seller-nav section-act">
     <view class="seller-t">
       <image class="seller-avatar" src="{{seller.avatarUrl}}"></image>
@@ -49,6 +53,7 @@
     <image class="i" src="../../static/images/address_right.png" background-size="cover"></image>
   </navigator>
 
+  <!-- 评论 -->
   <view class="comments" wx:if="{{comment.length > 0}}">
     <view class="h">
       <text class="t">留言</text>
@@ -87,17 +92,16 @@
             </view>
           </view>
 
-          <!-- reoly-end -->
+          <!-- reply-end -->
         </view>
         <!-- comment-end -->
       </view>
-
     </view>
 
   </view>
 
 
-
+  <!-- 相关商品 -->
   <view class="related-goods" wx:if="{{relatedGoods.length > 0}}">
     <view class="h">
       <view class="line"></view>
@@ -115,21 +119,16 @@
   </view>
 </view>
 
-
-
-<view class="attr-pop-box" hidden="{{!openComment}}">
-  <view class="attr-pop">
-    <!-- <view class="close" bindtap="closeComment">
-      <image class="icon" src="/static/images/clear_input.png"></image>
-    </view> -->
-    <view class="post-comment">
+<!-- 评论弹框 -->
+<view class="pop-box" hidden="{{!openComment}}">
+  <view class="pop">
+    <view class="comment-pop">
       <view class="title" wx:if="{{replyUserName}}">
         回复@{{replyUserName}}:
       </view>
       <view class="title" wx:else>
         发表留言:
       </view>
-
       <view class="content">
         <input id='comment-input' class='' focus='{{showInput}}' placeholder="输入文本" maxlength='100' bindblur='closeComment' bindconfirm='postComment' value='{{commentContent}}' />
       </view>
@@ -138,8 +137,8 @@
   </view>
 </view>
 
-
-<view class="attr-pop-box" hidden="{{!openDelete}}">
+<!-- 删除弹框 -->
+<view class="pop-box" hidden="{{!openDelete}}">
   <view class="delete-pop ">
     <view class="close" bindtap="closeDelete">
       <image class="icon" src="/static/images/clear_input.png"></image>
@@ -148,7 +147,7 @@
   </view>
 </view>
 
-
+<!-- 底部按钮 -->
 <view class="bottom-btn">
   <view class="l" bindtap="addCannelCollect">
     <image class="icon" src="{{ collectBackImage }}"></image>
@@ -158,17 +157,6 @@
     <image class="icon" src="/static/images/ic_menu_chat_nor.png"></image>
     留言
   </view>
-  <!-- <view class="l" >
-    <image class="icon" src="/static/images/ic_menu_chat_nor.png"></image>
-    留言
-  </view> -->
-  <!-- <view class="l l-cart">
-    <view class="box">
-      <text class="cart-count">{{cartGoodsCount}}</text>
-      <image bindtap="openCartPage" class="icon" src="/static/images/ic_menu_shoping_nor.png"></image>
-    </view>
-  </view> -->
-  <!-- <view class="c">立即购买</view> -->
   <view class="r" wx:if='{{!goods.isSelling}}' bindtap="addToCart">该商品已出售</view>
   <view class="r" wx:elif="{{isSeller && !goods.isDelete && goods.isSelling}}" bindtap="switchDeletetPop">删除该商品</view>
   <view class="r" wx:else bindtap="want">想要</view>

+ 150 - 485
wx-front/pages/goods/goods.wxss

@@ -2,6 +2,8 @@
   padding-bottom: 100rpx;
 }
 
+/* 商品图片 */
+
 .goodsimgs {
   width: 750rpx;
   height: 750rpx;
@@ -12,30 +14,42 @@
   height: 750rpx;
 }
 
-.service-policy {
-  /* width: 750rpx; */
+/* 最后编辑,地点 */
+
+.location-time .icon {
+  padding-left: 35rpx;
+  display: flex;
+  align-items: center;
+  font-size: 25rpx;
+  color: #666;
+  overflow: hidden;
+}
+
+.location-time .icon.location {
+  background: url(https://i.postimg.cc/Hkf6dJzv/placeholder-2.png) 0 center no-repeat;
+  background-size: 25rpx;
+}
+
+.location-time .icon.time {
+  background: url(https://i.postimg.cc/nrck0qVr/clock.png) 0 center no-repeat;
+  background-size: 25rpx;
+}
+
+.location-time {
   height: 73rpx;
   background: #f4f4f4;
-  padding: 0 31.25rpx;
+  padding: 0 30rpx;
   display: flex;
   flex-flow: row nowrap;
   align-items: center;
   justify-content: space-between;
+  overflow: hidden;
 }
 
-.service-policy .item {
-  background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/servicePolicyRed-518d32d74b.png) 0 center no-repeat;
-  background-size: 10rpx;
-  padding-left: 15rpx;
-  display: flex;
-  align-items: center;
-  font-size: 25rpx;
-  color: #666;
-}
+/* 商品信息 */
 
 .goods-info {
   width: 750rpx;
-  /* height: 306rpx; */
   overflow: hidden;
   background: #fff;
 }
@@ -55,23 +69,16 @@
 }
 
 .goods-info .name {
-  /* height: 41rpx; */
   margin-bottom: 5.208rpx;
   font-size: 41rpx;
   text-align: center;
-  /* line-height: 41rpx; */
 }
 
-.goods-info .desc {
-  /* height: 43rpx; */
-  margin-bottom: 41rpx;
-  font-size: 24rpx;
-  line-height: 36rpx;
-  color: #999;
+.goods-info .flex {
+  display: flex;
 }
 
 .goods-info .price {
-  /* height: 35rpx; */
   font-size: 40rpx;
   line-height: 35rpx;
   color: #f94b4b;
@@ -80,8 +87,13 @@
   text-align: center;
 }
 
-.goods-info .flex {
-  display: flex;
+.goods-info .market-price {
+  font-size: 29rpx;
+  line-height: 35rpx;
+  color: #555;
+  margin-bottom: 30rpx;
+  text-decoration: line-through;
+  text-align: center;
 }
 
 .goods-info .tag {
@@ -97,34 +109,14 @@
   right: 100rpx;
 }
 
-.goods-info .market-price {
-  font-size: 29rpx;
-  line-height: 35rpx;
-  color: #555;
-  /* margin-top: 30rpx; */
-  margin-bottom: 30rpx;
-  text-decoration: line-through;
-  text-align: center;
-}
-
-.goods-info .brand {
-  margin-top: 23rpx;
-  min-height: 40rpx;
-  text-align: center;
+.goods-info .desc {
+  margin-bottom: 41rpx;
+  font-size: 24rpx;
+  line-height: 36rpx;
+  color: #999;
 }
 
-.goods-info .brand text {
-  display: inline-block;
-  width: auto;
-  padding: 2px 30rpx 2px 10.5rpx;
-  line-height: 35.5rpx;
-  border: 1px solid #f48f18;
-  font-size: 25rpx;
-  color: #f48f18;
-  border-radius: 4px;
-  background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/detailTagArrow-18bee52dab.png) 95% center no-repeat;
-  background-size: 10.75rpx 18.75rpx;
-}
+/* 标签 */
 
 .section-nav {
   width: 750rpx;
@@ -161,11 +153,6 @@
   color: #999;
   width: 700rpx;
   height: 70rpx;
-  /* margin-left: 31.25rpx; */
-}
-
-.section-act .label {
-  color: #999;
 }
 
 .section-act .tag {
@@ -192,16 +179,73 @@
   border: 1px solid #f94b4b;
 }
 
-.section-act .text {
+/* 卖家 */
+
+.section-act .seller-t {
+  float: left;
   display: flex;
   align-items: center;
-  height: 37rpx;
-  width: auto;
+  height: 188rpx;
   overflow: hidden;
-  color: #f48f18;
+  line-height: 108rpx;
+  font-size: 29rpx;
+  color: #999;
+  margin-left: 31.25rpx;
+}
+
+.seller-t .seller-avatar {
+  float: right;
+  width: 120rpx;
+  height: 120rpx;
+  margin: 0 16rpx 0 8rpx;
+  border-radius: 50%;
+}
+
+.section-act .seller-info {
+  float: left;
+  align-items: center;
+  height: 188rpx;
+  overflow: hidden;
+  line-height: 108rpx;
   font-size: 29rpx;
+  color: #999;
+  margin-left: 31.25rpx;
+}
+
+.seller-nav {
+  width: 750rpx;
+  height: 188rpx;
+  background: #fff;
+  margin-bottom: 20rpx;
+}
+
+.seller-nav .i {
+  float: right;
+  width: 60rpx;
+  height: 60rpx;
+  margin-right: 30rpx;
+  margin-top: 65rpx;
+}
+
+.seller-nav.seller-info {
+  width: 300rpx;
+  height: 188rpx;
 }
 
+.seller-nav .name {
+  margin-top: 50rpx;
+  font-size: 35rpx;
+  height: 60rpx;
+  line-height: 50rpx;
+}
+
+.seller-nav .history {
+  line-height: 30rpx;
+  font-size: 27rpx;
+}
+
+/* 评论 */
+
 .comments {
   width: 100%;
   height: auto;
@@ -225,16 +269,6 @@
   color: #333;
 }
 
-.comments .h .i {
-  display: block;
-  float: right;
-  width: 164rpx;
-  height: 100.5rpx;
-  line-height: 100.5rpx;
-  background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/address-right-990628faa7.png) right center no-repeat;
-  background-size: 52rpx;
-}
-
 .comments .b {
   height: auto;
   width: 720rpx;
@@ -275,8 +309,6 @@
   overflow: hidden;
 }
 
-
-
 .comments .reply-user text {
   display: inline-block;
   width: auto;
@@ -293,7 +325,7 @@
   height: 67rpx;
   margin-right: 17rpx;
   border-radius: 50%;
-  background-size:cover;
+  background-size: cover;
 }
 
 .navimg-reply {
@@ -303,7 +335,7 @@
   margin-right: 17rpx;
   margin-top: 5rpx;
   border-radius: 50%;
-  background-size:cover;
+  background-size: cover;
 }
 
 .comments .user text {
@@ -337,7 +369,6 @@
 }
 
 .comments .reply-content {
-  /* width: 720rpx; */
   width: 600rpx;
   padding-right: 30rpx;
   line-height: 45.8rpx;
@@ -346,162 +377,7 @@
   margin-left: 115rpx;
 }
 
-.comments .imgs {
-  width: 720rpx;
-  height: auto;
-  margin-bottom: 25rpx;
-}
-
-.comments .imgs .img {
-  height: 150rpx;
-  width: 150rpx;
-  margin-right: 28rpx;
-}
-
-.comments .spec {
-  width: 720rpx;
-  padding-right: 30rpx;
-  line-height: 30rpx;
-  font-size: 24rpx;
-  color: #999;
-  margin-bottom: 30rpx;
-}
-
-.goods-attr {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  padding: 0 31.25rpx 25rpx 31.25rpx;
-  background: #fff;
-}
-
-.goods-attr .t {
-  width: 687.5rpx;
-  height: 104rpx;
-  line-height: 104rpx;
-  font-size: 38.5rpx;
-}
-
-.goods-attr .item {
-  width: 687.5rpx;
-  height: 68rpx;
-  padding: 11rpx 20rpx;
-  margin-bottom: 11rpx;
-  background: #f7f7f7;
-  font-size: 38.5rpx;
-}
-
-.goods-attr .left {
-  float: left;
-  font-size: 25rpx;
-  width: 134rpx;
-  height: 45rpx;
-  line-height: 45rpx;
-  overflow: hidden;
-  color: #999;
-}
-
-.goods-attr .right {
-  float: left;
-  font-size: 36.5rpx;
-  margin-left: 20rpx;
-  width: 480rpx;
-  height: 45rpx;
-  line-height: 45rpx;
-  overflow: hidden;
-  color: #333;
-}
-
-.detail {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-}
-
-.detail image {
-  width: 750rpx;
-  display: block;
-}
-
-.common-problem {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-}
-
-.common-problem .h {
-  position: relative;
-  height: 145.5rpx;
-  width: 750rpx;
-  padding: 56.25rpx 0;
-  background: #fff;
-  text-align: center;
-}
-
-.common-problem .h .line {
-  display: inline-block;
-  position: absolute;
-  top: 72rpx;
-  left: 0;
-  z-index: 2;
-  height: 1px;
-  margin-left: 225rpx;
-  width: 300rpx;
-  background: #ccc;
-}
-
-.common-problem .h .title {
-  display: inline-block;
-  position: absolute;
-  top: 56.125rpx;
-  left: 0;
-  z-index: 3;
-  height: 33rpx;
-  margin-left: 285rpx;
-  width: 180rpx;
-  background: #fff;
-}
-
-.common-problem .b {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  padding: 0rpx 30rpx;
-  background: #fff;
-}
-
-.common-problem .item {
-  height: auto;
-  overflow: hidden;
-  padding-bottom: 25rpx;
-}
-
-.common-problem .question-box .spot {
-  float: left;
-  display: block;
-  height: 8rpx;
-  width: 8rpx;
-  background: #b4282d;
-  border-radius: 50%;
-  margin-top: 11rpx;
-}
-
-.common-problem .question-box .question {
-  float: left;
-  line-height: 30rpx;
-  padding-left: 8rpx;
-  display: block;
-  font-size: 26rpx;
-  padding-bottom: 15rpx;
-  color: #303030;
-}
-
-.common-problem .answer {
-  line-height: 36rpx;
-  padding-left: 16rpx;
-  font-size: 26rpx;
-  color: #787878;
-}
+/* 相关商品 */
 
 .related-goods {
   width: 750rpx;
@@ -586,6 +462,8 @@
   color: #f94b4b;
 }
 
+/* 底部按钮 */
+
 .bottom-btn {
   position: fixed;
   left: 0;
@@ -607,39 +485,6 @@
   justify-content: center;
 }
 
-.bottom-btn .l.l-collect {
-  border-right: none;
-  border-left: none;
-  text-align: center;
-}
-
-.bottom-btn .l.l-cart .box {
-  position: relative;
-  height: 60rpx;
-  width: 60rpx;
-}
-
-.bottom-btn .l.l-cart .cart-count {
-  height: 28rpx;
-  width: 28rpx;
-  z-index: 10;
-  position: absolute;
-  top: 0;
-  right: 0;
-  background: #b4282d;
-  text-align: center;
-  font-size: 18rpx;
-  color: #fff;
-  line-height: 28rpx;
-  border-radius: 50%;
-}
-
-.bottom-btn .l.l-cart .icon {
-  position: absolute;
-  top: 10rpx;
-  left: 0;
-}
-
 .bottom-btn .l .icon {
   display: block;
   height: 44rpx;
@@ -647,17 +492,6 @@
   margin-right: 10rpx;
 }
 
-.bottom-btn .c {
-  float: left;
-  height: 100rpx;
-  line-height: 96rpx;
-  flex: 1;
-  text-align: center;
-  color: #333;
-  border-top: 1px solid #f4f4f4;
-  border-bottom: 1px solid #f4f4f4;
-}
-
 .bottom-btn .r {
   border: 1px solid #f94b4b;
   background: #f94b4b;
@@ -670,17 +504,18 @@
 }
 @import "../../lib/wxParse/wxParse.wxss";
 
-.attr-pop-box {
+/* 弹框 */
+
+.pop-box {
   width: 100%;
   height: 100%;
   position: fixed;
   background: rgba(0, 0, 0, 0.5);
   z-index: 8;
   bottom: 0;
-  /* display: none; */
 }
 
-.attr-pop {
+.pop {
   width: 100%;
   height: auto;
   max-height: 780rpx;
@@ -691,6 +526,44 @@
   bottom: 100rpx;
 }
 
+/* 评论弹框 */
+
+.comment-pop {
+  display: block;
+  background: #fff;
+  font-size: 29rpx;
+  color: #333;
+  height: auto;
+  padding: 20rpx;
+  overflow: hidden;
+}
+
+.comment-pop .title {
+  margin-bottom: 10rpx;
+}
+
+.comment-pop .content {
+  border: 1rpx solid #eee;
+  border-radius: 20rpx;
+  padding: 10rpx;
+  background: #eee;
+  overflow: hidden;
+  height: 65rpx;
+}
+
+.comment-pop input {
+  display: block;
+  height: 1.4rem;
+  text-overflow: clip;
+  overflow: hidden;
+  white-space: nowrap;
+  font-family: UICTFontTextStyleBody;
+  min-height: 1.4rem;
+  margin-bottom: 40rpx;
+}
+
+/* 删除弹框 */
+
 .delete-pop {
   width: 100%;
   height: auto;
@@ -708,7 +581,6 @@
   height: 48rpx;
   right: 31.25rpx;
   overflow: hidden;
-  /* top: 31.25rpx; */
 }
 
 .delete-pop .close .icon {
@@ -729,210 +601,3 @@
   border-radius: 10rpx;
   margin-bottom: 30rpx;
 }
-
-.spec-con {
-  width: 100%;
-  height: auto;
-  overflow: hidden;
-}
-
-.spec-con .name {
-  height: 32rpx;
-  margin-bottom: 22rpx;
-  font-size: 29rpx;
-  color: #333;
-}
-
-.spec-con .values {
-  height: auto;
-  margin-bottom: 31.25rpx;
-  font-size: 0;
-}
-
-.spec-con .value {
-  display: inline-block;
-  height: 62rpx;
-  padding: 0 35rpx;
-  line-height: 56rpx;
-  text-align: center;
-  margin-right: 25rpx;
-  margin-bottom: 16.5rpx;
-  border: 1px solid #333;
-  font-size: 25rpx;
-  color: #333;
-}
-
-.spec-con .value.disable {
-  border: 1px solid #ccc;
-  color: #ccc;
-}
-
-.spec-con .value.selected {
-  border: 1px solid #b4282d;
-  color: #b4282d;
-}
-
-.number-item .selnum {
-  width: 322rpx;
-  height: 71rpx;
-  border: 1px solid #ccc;
-  display: flex;
-}
-
-.number-item .cut {
-  width: 93.75rpx;
-  height: 100%;
-  text-align: center;
-  line-height: 65rpx;
-}
-
-.number-item .number {
-  flex: 1;
-  height: 100%;
-  text-align: center;
-  line-height: 68.75rpx;
-  border-left: 1px solid #ccc;
-  border-right: 1px solid #ccc;
-  float: left;
-}
-
-.number-item .add {
-  width: 93.75rpx;
-  height: 100%;
-  text-align: center;
-  line-height: 65rpx;
-}
-
-.location-time .icon {
-  padding-left: 35rpx;
-  display: flex;
-  align-items: center;
-  font-size: 25rpx;
-  color: #666;
-  overflow: hidden;
-}
-
-.location-time .icon.location {
-  background: url(https://i.postimg.cc/Hkf6dJzv/placeholder-2.png) 0 center no-repeat;
-  background-size: 25rpx;
-  /* width:370rpx; */
-}
-
-.location-time .icon.time {
-  background: url(https://i.postimg.cc/nrck0qVr/clock.png) 0 center no-repeat;
-  background-size: 25rpx;
-  /* width: 330rpx; */
-}
-
-.location-time {
-  /* width: 750rpx; */
-  height: 73rpx;
-  background: #f4f4f4;
-  padding: 0 30rpx;
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: space-between;
-  overflow: hidden;
-}
-
-.seller-avatar {
-  float: right;
-  width: 120rpx;
-  height: 120rpx;
-  margin: 0 16rpx 0 8rpx;
-  border-radius: 50%;
-}
-
-.section-act .seller-t {
-  float: left;
-  display: flex;
-  align-items: center;
-  /* width: 600rpx; */
-  height: 188rpx;
-  overflow: hidden;
-  line-height: 108rpx;
-  font-size: 29rpx;
-  color: #999;
-  margin-left: 31.25rpx;
-}
-
-.section-act .seller-info {
-  float: left;
-  align-items: center;
-  /* width: 600rpx; */
-  height: 188rpx;
-  overflow: hidden;
-  line-height: 108rpx;
-  font-size: 29rpx;
-  color: #999;
-  margin-left: 31.25rpx;
-}
-
-.seller-nav {
-  width: 750rpx;
-  height: 188rpx;
-  background: #fff;
-  margin-bottom: 20rpx;
-}
-
-.seller-nav .i {
-  float: right;
-  width: 60rpx;
-  height: 60rpx;
-  margin-right: 30rpx;
-  margin-top: 65rpx;
-}
-
-.seller-nav.seller-info {
-  width: 300rpx;
-  height: 188rpx;
-}
-
-.seller-nav .name {
-  margin-top: 50rpx;
-  font-size: 35rpx;
-  height: 60rpx;
-  line-height: 50rpx;
-}
-
-.seller-nav .history {
-  line-height: 30rpx;
-  font-size: 27rpx;
-}
-
-.attr-pop-box .attr-pop .post-comment {
-  display: block;
-  background: #fff;
-  font-size: 29rpx;
-  color: #333;
-  height: auto;
-  /* width: 650rpx; */
-  padding: 20rpx;
-  /* margin:10px; */
-  overflow: hidden;
-}
-
-.attr-pop-box .attr-pop .title {
-  margin-bottom: 10rpx;
-}
-
-.attr-pop-box .attr-pop .content {
-  border: 1rpx solid #eee;
-  border-radius: 20rpx;
-  padding: 10rpx;
-  background: #eee;
-  overflow: hidden;
-  height: 65rpx;
-}
-
-.attr-pop-box .attr-pop input {
-  display: block;
-  height: 1.4rem;
-  text-overflow: clip;
-  overflow: hidden;
-  white-space: nowrap;
-  font-family: UICTFontTextStyleBody;
-  min-height: 1.4rem;
-  margin-bottom: 40rpx;
-}

+ 0 - 105
wx-front/pages/hotGoods/hotGoods.js

@@ -1,105 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-var app = getApp();
-
-Page({
-  data: {
-    bannerInfo: {
-      'img_url': '',
-      'name': ''
-    },
-    categoryFilter: false,
-    filterCategory: [],
-    goodsList: [],
-    categoryId: 0,
-    currentSortType: 'default',
-    currentSortOrder: 'desc',
-    page: 1,
-    size: 1000
-  },
-  getData: function () {
-    let that = this;
-    util.request(api.GoodsHot).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-        that.getGoodsList();
-      }
-    });
-  },
-  getGoodsList (){
-    var that = this;
-
-    util.request(api.GoodsList, { isHot: 1, page: that.data.page, size: that.data.size, order: that.data.currentSortOrder, sort: that.data.currentSortType, categoryId: that.data.categoryId})
-      .then(function (res) {
-        if (res.errno === 0) {
-          that.setData({
-            goodsList: res.data.goodsList,
-            filterCategory: res.data.filterCategory
-          });
-        }
-      });
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.getData();
-  },
-  onReady: function () {
-    // 页面渲染完成
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  openSortFilter: function (event) {
-    let currentId = event.currentTarget.id;
-    switch (currentId) {
-      case 'categoryFilter':
-        this.setData({
-          'categoryFilter': !this.data.categoryFilter,
-          'currentSortType': 'category',
-          'currentSortOrder': 'asc'
-        });
-        break;
-      case 'priceSort':
-        let tmpSortOrder = 'asc';
-        if (this.data.currentSortOrder == 'asc') {
-          tmpSortOrder = 'desc';
-        }
-        this.setData({
-          'currentSortType': 'price',
-          'currentSortOrder': tmpSortOrder,
-          'categoryFilter': false
-        });
-
-        this.getData();
-        break;
-      default:
-        //综合排序
-        this.setData({
-          'currentSortType': 'default',
-          'currentSortOrder': 'desc',
-          'categoryFilter': false
-        });
-        this.getData();
-    }
-  },
-  selectCategory: function(event){
-    let currentIndex = event.target.dataset.categoryIndex;
-    this.setData({
-      'categoryFilter': false,
-      'categoryId': this.data.filterCategory[currentIndex].id
-    });
-    this.getData();
-
-  }
-})

+ 0 - 3
wx-front/pages/hotGoods/hotGoods.json

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

+ 0 - 40
wx-front/pages/hotGoods/hotGoods.wxml

@@ -1,40 +0,0 @@
-<view class="container">
-  <view class="brand-info">
-    <view class="name">
-      <image class="img" src="{{bannerInfo.img_url}}" background-size="cover"></image>
-      <view class="info-box">
-        <view class="info">
-          <text class="txt">{{bannerInfo.name}}</text>
-          <text class="line"></text>
-        </view>
-      </view>
-    </view>
-  </view>
-  <view class="sort">
-    <view class="sort-box">
-      <view class="item {{currentSortType == 'default' ? 'active' : ''}}"  bindtap="openSortFilter" id="defaultSort">
-        <text class="txt">综合</text>
-      </view>
-      <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc'  ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
-        <text class="txt">价格</text>
-      </view>
-      <view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
-        <text class="txt">分类</text>
-      </view>
-    </view>
-    <view class="sort-box-category" wx-if="{{categoryFilter}}">
-      <view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="cate-{{item.id}}" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
-    </view>
-  </view>
-  <view class="cate-item">
-    <view class="b">
-      <block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="unique">
-        <navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
-          <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
-          <text class="name">{{iitem.name}}</text>
-          <text class="price">¥{{iitem.retail_price}}</text>
-        </navigator>
-      </block>
-    </view>
-  </view>
-</view>

+ 0 - 177
wx-front/pages/hotGoods/hotGoods.wxss

@@ -1,177 +0,0 @@
-page{
-    background: #f4f4f4;
-}
-
-.brand-info .name{
-    width: 100%;
-    height: 278rpx;
-    position: relative;
-}
-
-.brand-info .img{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 278rpx;
-}
-
-.brand-info .info-box{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 278rpx;
-    text-align: center;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
-.brand-info .info{
-    display: block;
-}
-
-.brand-info .txt{
-    display: block;
-    height: 40rpx;
-    font-size: 37.5rpx;
-    color: #fff;
-}
-
-.brand-info .line{
-    margin: 0 auto;
-    margin-top: 16rpx;
-    display: block;
-    height: 2rpx;
-    width: 145rpx;
-    background: #fff;
-}
-
-.sort{
-    position: relative;
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-}
-
-.sort-box{
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-    overflow: hidden;
-    padding: 0 30rpx;
-    display: flex;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box .item{
-    height: 78rpx;
-    line-height: 78rpx;
-    text-align: center;
-    flex:1;
-    color: #333;
-    font-size: 30rpx;
-}
-
-.sort-box .item .txt{
-    display: block;
-    width: 100%;
-    height: 100%;
-    color: #333;
-}
-
-.sort-box .item.active .txt{
-    color: #b4282d;
-}
-
-.sort-box .item.by-price{
-    background: url(//yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-3127092a69.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.asc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/up-636b92c0a5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.desc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/down-95e035f3e5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box-category{
-    background: #fff;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    padding: 40rpx 40rpx 0 0;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box-category .item{
-    height: 54rpx;
-    line-height: 54rpx;
-    text-align: center;
-    float: left;
-    padding: 0 16rpx;
-    margin: 0 0 40rpx 40rpx;
-    border: 1px solid #666;
-    color: #333;
-    font-size: 24rpx;
-}
-
-.sort-box-category .item.active{
-    color: #b4282d;
-    border: 1px solid #b4282d;
-}
-
-.cate-item .b{
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  border-top: 1rpx solid #f4f4f4;
-  margin-top: 20rpx;
-}
-
-.cate-item .b .item{
-  float: left;
-  background: #fff;
-  width: 375rpx;
-  padding-bottom: 33.333rpx;
-  border-bottom: 1rpx solid #f4f4f4;
-  height: auto;
-  overflow: hidden;
-  text-align: center;
-}
-
-.cate-item .b .item-b{
- border-right: 1rpx solid #f4f4f4;
-}
-
-.cate-item .item .img{
-    margin-top: 10rpx;
-  width: 302rpx;
-  height: 302rpx;
-}
-
-.cate-item .item .name{
-  display: block;
-  width: 365.625rpx;
-  height: 35rpx;
-  padding: 0 20rpx;
-  overflow: hidden;
-  margin: 11.5rpx 0 22rpx 0;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-.cate-item .item .price{
-  display: block;
-  width: 365.625rpx;
-  height: 30rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #b4282d;
-}

+ 0 - 14
wx-front/pages/index/index.js

@@ -11,13 +11,6 @@ Page({
     indexGoods: [],
     page: 1,
     size: 10,
-    // newGoods: [],
-    // hotGoods: [],
-    // topics: [],
-    // brands: [],
-    // floorGoods: [],
-    // banner: [],
-    // channel: []
   },
   onShareAppMessage: function() {
     return {
@@ -31,15 +24,8 @@ Page({
     let that = this;
     util.request(api.IndexUrl).then(function(res) {
       console.log(res.data)
-      // console.log(res.data.hotGoodsList)
-      // console.log(res.data.categoryList)
       if (res.errno === 0) {
         that.setData({
-          // newGoods: res.data.newGoodsList,
-          // hotGoods: res.data.hotGoodsList,
-          // topics: res.data.topicList,
-          // brand: res.data.brandList,
-          // floorGoods: res.data.categoryList,
           indexGoods: res.data.indexGoodsList,
           banner: res.data.banner,
           channel: res.data.channel

+ 3 - 102
wx-front/pages/index/index.wxml

@@ -11,15 +11,15 @@
 
   <!-- 首页分类 -->
   <view class="m-menu">
-    <navigator open-type="{{item.url == '/pages/catalog/catalog' ? 'reLaunch':'navigate'}}" class="item" url="{{item.url}}" wx:for="{{channel}}" wx:key="{{item.id}}">
+    <navigator open-type="{{item.url == '/pages/category/index/index' ? 'reLaunch':'navigate'}}" class="item" url="{{item.url}}" wx:for="{{channel}}" wx:key="{{item.id}}">
       <image src="{{item.iconUrl}}" background-size="cover"></image>
       <text>{{item.name}}</text>
     </navigator>
   </view>
 
 
-  <!-- 商品 -->
-  <view class="a-section a-new" wx:if="{{indexGoods.length > 0}}">
+  <!-- 推荐商品 -->
+  <view class="a-section a-rec" wx:if="{{indexGoods.length > 0}}">
     <view class="h">
       <view>
         <navigator url="../newGoods/newGoods">
@@ -37,103 +37,4 @@
       </view>
     </view>
   </view>
-
-  <!-- 品牌直供 -->
-  <!-- <view class="a-section a-brand">
-    <view class="h">
-      <navigator url="../brand/brand">
-        <text class="txt">品牌制造商直供</text>
-      </navigator>
-    </view>
-    <view class="b">
-      <view class="item item-1" wx:for="{{brand}}" wx:key="item.id">
-        <navigator url="/pages/brandDetail/brandDetail?id={{item.id}}">
-          <view class="wrap">
-            <image class="img" src="{{item.new_pic_url}}" mode="aspectFill"></image>
-            <view class="mt">
-              <text class="brand">{{item.name}}</text>
-              <text class="price">{{item.floor_price}}</text>
-              <text class="unit">元起</text>
-            </view>
-          </view>
-        </navigator>
-      </view>
-    </view>
-  </view> -->
-
-  <!-- 人气商品 -->
-  <!-- <view class="a-section a-popular" wx:if="{{hotGoods.length > 0}}">
-    <view class="h">
-      <view>
-        <navigator url="../hotGoods/hotGoods">
-          <text class="txt">人气推荐</text>
-        </navigator>
-      </view>
-    </view>
-    <view class="b">
-      <view class="item" wx:for="{{hotGoods}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
-        <navigator url="/pages/goods/goods?id={{item.id}}">
-          <image class="img" src="{{item.list_pic_url}}" background-size="cover"></image>
-          <view class="right">
-            <view class="text">
-              <text class="name">{{item.name}}</text>
-              <text class="desc">{{item.goods_brief}}</text>
-              <text class="price">¥{{item.retail_price}}</text>
-            </view>
-          </view>
-        </navigator>
-      </view>
-    </view>
-  </view> -->
-
-  <!-- 专题精选 -->
-  <!-- <view class="a-section a-topic" wx:if="topics.length > 0">
-    <view class="h">
-      <view>
-      <navigator url="../topic/topic" open-type="switchTab">
-        <text class="txt">专题精选</text>
-        </navigator>
-      </view>
-    </view>
-    <view class="b">
-      <scroll-view scroll-x="true" class="list">
-        <view class="item" wx:for="{{topics}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
-          <navigator url="../topicDetail/topicDetail?id={{item.id}}">
-            <image class="img" src="{{item.scene_pic_url}}" background-size="cover"></image>
-            <view class="np">
-              <text class="name">{{item.title}}</text>
-              <text class="price">¥{{item.price_info}}元起</text>
-            </view>
-            <text class="desc">{{item.subtitle}}</text>
-          </navigator>
-        </view>
-      </scroll-view>
-    </view>
-  </view> -->
-
-  <!-- floorGoods[0].goodList -->
-  <!-- <view class="good-grid" wx:for="{{floorGoods}}" wx:key="{{item.id}}">
-    <view class="h">
-      <view>
-        <text>{{item.name}}</text>
-      </view>
-    </view>
-    <view class="b">
-      <block wx:for="{{item.goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="{{iitem.id}}">
-        <view class="item {{iindex % 2 == 0 ? '' : 'item-b'}}">
-          <navigator url="../goods/goods?id={{iitem.id}}" class="a">
-            <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
-            <text class="name">{{iitem.name}}</text>
-            <text class="price">¥{{iitem.retail_price}}</text>
-          </navigator>
-        </view>
-      </block>
-      <view class="item item-b item-more">
-          <navigator url="/pages/category/category?id={{item.id}}" class="more-a">
-            <view class="txt">{{'更多'+item.name+'好物'}}</view>
-            <image class="icon" src="../../static/images/icon_go_more.png" background-size="cover"></image>
-          </navigator>
-      </view>
-    </view>
-  </view> -->
 </view>

+ 11 - 278
wx-front/pages/index/index.wxss

@@ -1,3 +1,5 @@
+/* banner */
+
 .banner {
   width: 750rpx;
   height: 417rpx;
@@ -8,6 +10,8 @@
   height: 417rpx;
 }
 
+/* 首页分类 */
+
 .m-menu {
   display: flex;
   height: 181rpx;
@@ -41,6 +45,8 @@
   color: #333;
 }
 
+/* 推荐商品 */
+
 .a-section {
   width: 750rpx;
   height: auto;
@@ -60,7 +66,6 @@
 
 .a-section .h .txt {
   padding-right: 30rpx;
-  /* background: url("http://ac-3yr0g9cz.clouddn.com/2cdba05369e10f934e54.png") right 4rpx no-repeat; */
   background-size: 16.656rpx 27rpx;
   display: inline-block;
   height: 36rpx;
@@ -68,70 +73,14 @@
   line-height: 36rpx;
 }
 
-.a-brand .b {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  position: relative;
-}
-
-.a-brand .wrap {
-  position: relative;
-}
-
-.a-brand .img {
-  position: absolute;
-  left: 0;
-  top: 0;
-}
-
-.a-brand .mt {
-  position: absolute;
-  z-index: 2;
-  padding: 27rpx 31rpx;
-  left: 0;
-  top: 0;
-}
-
-.a-brand .mt .brand {
-  display: block;
-  font-size: 33rpx;
-  height: 43rpx;
-  color: #333;
-}
-
-.a-brand .mt .price, .a-brand .mt .unit {
-  font-size: 25rpx;
-  color: #999;
-}
-
-.a-brand .item-1 {
-  float: left;
-  width: 375rpx;
-  height: 252rpx;
-  overflow: hidden;
-  border-top: 1rpx solid #fff;
-  margin-left: 1rpx;
-}
-
-.a-brand .item-1:nth-child(2n+1){
-  margin-left: 0;
-  width: 374rpx;
-}
-
-.a-brand .item-1 .img {
-  width: 375rpx;
-  height: 253rpx;
-}
-
-.a-new .b {
+.a-rec .b {
   width: 750rpx;
   height: auto;
   overflow: hidden;
   padding: 0 31rpx 45rpx 31rpx;
 }
 
-.a-new .b .item {
+.a-rec .b .item {
   float: left;
   width: 302rpx;
   margin-top: 10rpx;
@@ -139,16 +88,12 @@
   margin-right: 21rpx;
 }
 
-.a-new .b .item-b {
-  margin-left: 42rpx;
-}
-
-.a-new .b .img {
+.a-rec .b .img {
   width: 302rpx;
   height: 302rpx;
 }
 
-.a-new .b .name {
+.a-rec .b .name {
   text-align: center;
   display: block;
   width: 302rpx;
@@ -159,222 +104,10 @@
   color: #333;
 }
 
-.a-new .b .price {
+.a-rec .b .price {
   display: block;
   text-align: center;
   line-height: 30rpx;
   font-size: 30rpx;
   color: #f94b4b;
 }
-
-.a-popular {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-}
-
-.a-popular .b .item {
-  border-top: 1px solid #d9d9d9;
-  margin: 0 20rpx;
-  height: 264rpx;
-  width: 710rpx;
-}
-
-.a-popular .b .img {
-  margin-top: 12rpx;
-  margin-right: 12rpx;
-  float: left;
-  width: 240rpx;
-  height: 240rpx;
-}
-
-.a-popular .b .right {
-  float: left;
-  height: 264rpx;
-  width: 456rpx;
-  display: flex;
-  flex-flow: row nowrap;
-}
-
-.a-popular .b .text {
-  display: flex;
-  flex-wrap: nowrap;
-  flex-direction: column;
-  justify-content: center;
-  overflow: hidden;
-  height: 264rpx;
-  width: 456rpx;
-}
-
-.a-popular .b .name {
-  width: 456rpx;
-  display: block;
-  color: #333;
-  line-height: 50rpx;
-  font-size: 30rpx;
-}
-
-.a-popular .b .desc {
-  width: 456rpx;
-  display: block;
-  color: #999;
-  line-height: 50rpx;
-  font-size: 25rpx;
-}
-
-.a-popular .b .price {
-  width: 456rpx;
-  display: block;
-  color: #b4282d;
-  line-height: 50rpx;
-  font-size: 33rpx;
-}
-
-.a-topic .b {
-  height: 533rpx;
-  width: 750rpx;
-  padding: 0 0 48rpx 0;
-}
-
-.a-topic .b .list {
-  height: 533rpx;
-  width: 750rpx;
-  white-space: nowrap;
-}
-
-.a-topic .b .item {
-  display: inline-block;
-  height: 533rpx;
-  width: 680.5rpx;
-  margin-left: 30rpx;
-  overflow: hidden;
-}
-
-.a-topic .b .item:last-child {
-  margin-right: 30rpx;
-}
-
-.a-topic .b .img {
-  height: 387.5rpx;
-  width: 680.5rpx;
-  margin-bottom: 30rpx;
-}
-
-.a-topic .b .np {
-  height: 35rpx;
-  margin-bottom: 13.5rpx;
-  color: #333;
-  font-size: 30rpx;
-}
-
-.a-topic .b .np .price {
-  margin-left: 20.8rpx;
-  color: #b4282d;
-}
-
-.a-topic .b .desc {
-  display: block;
-  height: 30rpx;
-  color: #999;
-  font-size: 24rpx;
-  white-space: nowrap;
-  overflow: hidden;
-  text-overflow:ellipsis;
-}
-
-.good-grid {
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-}
-
-.good-grid .h {
-  display: flex;
-  flex-flow: row nowrap;
-  align-items: center;
-  justify-content: center;
-  height: 130rpx;
-  font-size: 33rpx;
-  color: #333;
-}
-
-.good-grid .b {
-  width: 750rpx;
-  padding: 0 6.25rpx;
-  height: auto;
-  overflow: hidden;
-}
-
-.good-grid .b .item {
-  float: left;
-  background: #fff;
-  width: 365rpx;
-  margin-bottom: 6.25rpx;
-  height: 452rpx;
-  overflow: hidden;
-  text-align: center;
-}
-
-.good-grid .b .item .a{
-  height: 452rpx;
-  width: 100%;
-}
-
-.good-grid .b .item-b {
-  margin-left: 6.25rpx;
-}
-
-.good-grid .item .img {
-  margin-top: 20rpx;
-  width: 302rpx;
-  height: 302rpx;
-}
-
-.good-grid .item .name {
-  display: block;
-  width: 365.625rpx;
-  padding: 0 20rpx;
-  overflow: hidden;
-  height: 35rpx;
-  margin: 11.5rpx 0 22rpx 0;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-.good-grid .item .price {
-  display: block;
-  width: 365.625rpx;
-  height: 30rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #b4282d;
-}
-
-.good-grid .more-item{
-  height: 100%;
-  width: 100%;
-}
-
-.more-a{
-  height: 100%;
-  width: 100%;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-}
-
-.good-grid .more-a .txt{
-  height: 33rpx;
-  width: 100%;
-  line-height: 33rpx;
-  color: #333;
-  font-size: 33rpx;
-}
-
-.good-grid .more-a .icon{
-  margin: 60rpx auto 0 auto;
-  width: 70rpx;
-  height: 70rpx;
-}

+ 0 - 14
wx-front/pages/logs/logs.js

@@ -1,14 +0,0 @@
-//logs.js
-var util = require('../../utils/util.js')
-Page({
-  data: {
-    logs: []
-  },
-  onLoad: function () {
-    this.setData({
-      logs: (wx.getStorageSync('logs') || []).map(function (log) {
-        return util.formatTime(new Date(log))
-      })
-    })
-  }
-})

+ 0 - 3
wx-front/pages/logs/logs.json

@@ -1,3 +0,0 @@
-{
-    "navigationBarTitleText": "查看启动日志"
-}

+ 0 - 6
wx-front/pages/logs/logs.wxml

@@ -1,6 +0,0 @@
-<!--logs.wxml-->
-<view class="container log-list">
-  <block wx:for="{{logs}}" wx:for-item="log">
-    <text class="log-item">{{index + 1}}. {{log}}</text>
-  </block>
-</view>

+ 0 - 8
wx-front/pages/logs/logs.wxss

@@ -1,8 +0,0 @@
-.log-list {
-  display: flex;
-  flex-direction: column;
-  padding: 40rpx;
-}
-.log-item {
-  margin: 10rpx;
-}

+ 0 - 105
wx-front/pages/newGoods/newGoods.js

@@ -1,105 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-var app = getApp();
-
-Page({
-  data: {
-    bannerInfo: {
-      'img_url': '',
-      'name': ''
-    },
-    categoryFilter: false,
-    filterCategory: [],
-    goodsList: [],
-    categoryId: 0,
-    currentSortType: 'default',
-    currentSortOrder: 'desc',
-    page: 1,
-    size: 1000
-  },
-  getData: function () {
-    let that = this;
-    util.request(api.GoodsHot).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          bannerInfo: res.data.bannerInfo,
-        });
-        that.getGoodsList();
-      }
-    });
-  },
-  getGoodsList() {
-    var that = this;
-
-    util.request(api.GoodsList, { isNew: 1, page: that.data.page, size: that.data.size, order: that.data.currentSortOrder, sort: that.data.currentSortType, categoryId: that.data.categoryId })
-      .then(function (res) {
-        if (res.errno === 0) {
-          that.setData({
-            goodsList: res.data.goodsList,
-            filterCategory: res.data.filterCategory
-          });
-        }
-      });
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.getData();
-  },
-  onReady: function () {
-    // 页面渲染完成
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  openSortFilter: function (event) {
-    let currentId = event.currentTarget.id;
-    switch (currentId) {
-      case 'categoryFilter':
-        this.setData({
-          'categoryFilter': !this.data.categoryFilter,
-          'currentSortType': 'category',
-          'currentSortOrder': 'asc'
-        });
-        break;
-      case 'priceSort':
-        let tmpSortOrder = 'asc';
-        if (this.data.currentSortOrder == 'asc') {
-          tmpSortOrder = 'desc';
-        }
-        this.setData({
-          'currentSortType': 'price',
-          'currentSortOrder': tmpSortOrder,
-          'categoryFilter': false
-        });
-
-        this.getData();
-        break;
-      default:
-        //综合排序
-        this.setData({
-          'currentSortType': 'default',
-          'currentSortOrder': 'desc',
-          'categoryFilter': false
-        });
-        this.getData();
-    }
-  },
-  selectCategory: function (event) {
-    let currentIndex = event.target.dataset.categoryIndex;
-    this.setData({
-      'categoryFilter': false,
-      'categoryId': this.data.filterCategory[currentIndex].id
-    });
-    this.getData();
-
-  }
-})

+ 0 - 3
wx-front/pages/newGoods/newGoods.json

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

+ 0 - 40
wx-front/pages/newGoods/newGoods.wxml

@@ -1,40 +0,0 @@
-<view class="container">
-  <view class="brand-info">
-    <view class="name">
-      <image class="img" src="{{bannerInfo.img_url}}" background-size="cover"></image>
-      <view class="info-box">
-        <view class="info">
-          <text class="txt">{{bannerInfo.name}}</text>
-          <text class="line"></text>
-        </view>
-      </view>
-    </view>
-  </view>
-  <view class="sort">
-    <view class="sort-box">
-      <view class="item {{currentSortType == 'default' ? 'active' : ''}}"  bindtap="openSortFilter" id="defaultSort">
-        <text class="txt">综合</text>
-      </view>
-      <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc'  ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
-        <text class="txt">价格</text>
-      </view>
-      <view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
-        <text class="txt">分类</text>
-      </view>
-    </view>
-    <view class="sort-box-category" wx-if="{{categoryFilter}}">
-      <view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="cate-{{item.id}}" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
-    </view>
-  </view>
-  <view class="cate-item">
-    <view class="b">
-      <block wx:for="{{goodsList}}" wx:for-index="iindex" wx:for-item="iitem" wx:key="unique">
-        <navigator class="item {{iindex % 2 == 0 ? 'item-b' : '' }}" url="../goods/goods?id={{iitem.id}}">
-          <image class="img" src="{{iitem.list_pic_url}}" background-size="cover"></image>
-          <text class="name">{{iitem.name}}</text>
-          <text class="price">¥{{iitem.retail_price}}</text>
-        </navigator>
-      </block>
-    </view>
-  </view>
-</view>

+ 0 - 177
wx-front/pages/newGoods/newGoods.wxss

@@ -1,177 +0,0 @@
-page{
-    background: #f4f4f4;
-}
-
-.brand-info .name{
-    width: 100%;
-    height: 278rpx;
-    position: relative;
-}
-
-.brand-info .img{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 278rpx;
-}
-
-.brand-info .info-box{
-    position: absolute;
-    top:0;
-    left:0;
-    width: 100%;
-    height: 278rpx;
-    text-align: center;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
-.brand-info .info{
-    display: block;
-}
-
-.brand-info .txt{
-    display: block;
-    height: 40rpx;
-    font-size: 37.5rpx;
-    color: #fff;
-}
-
-.brand-info .line{
-    margin: 0 auto;
-    margin-top: 16rpx;
-    display: block;
-    height: 2rpx;
-    width: 145rpx;
-    background: #fff;
-}
-
-.sort{
-    position: relative;
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-}
-
-.sort-box{
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-    overflow: hidden;
-    padding: 0 30rpx;
-    display: flex;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box .item{
-    height: 78rpx;
-    line-height: 78rpx;
-    text-align: center;
-    flex:1;
-    color: #333;
-    font-size: 30rpx;
-}
-
-.sort-box .item .txt{
-    display: block;
-    width: 100%;
-    height: 100%;
-    color: #333;
-}
-
-.sort-box .item.active .txt{
-    color: #b4282d;
-}
-
-.sort-box .item.by-price{
-    background: url(//yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-3127092a69.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.asc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/up-636b92c0a5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.desc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/down-95e035f3e5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box-category{
-    background: #fff;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    padding: 40rpx 40rpx 0 0;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box-category .item{
-    height: 54rpx;
-    line-height: 54rpx;
-    text-align: center;
-    float: left;
-    padding: 0 16rpx;
-    margin: 0 0 40rpx 40rpx;
-    border: 1px solid #666;
-    color: #333;
-    font-size: 24rpx;
-}
-
-.sort-box-category .item.active{
-    color: #b4282d;
-    border: 1px solid #b4282d;
-}
-
-.cate-item .b{
-  width: 750rpx;
-  height: auto;
-  overflow: hidden;
-  border-top: 1rpx solid #f4f4f4;
-  margin-top: 20rpx;
-}
-
-.cate-item .b .item{
-  float: left;
-  background: #fff;
-  width: 375rpx;
-  padding-bottom: 33.333rpx;
-  border-bottom: 1rpx solid #f4f4f4;
-  height: auto;
-  overflow: hidden;
-  text-align: center;
-}
-
-.cate-item .b .item-b{
- border-right: 1rpx solid #f4f4f4;
-}
-
-.cate-item .item .img{
-    margin-top: 10rpx;
-  width: 302rpx;
-  height: 302rpx;
-}
-
-.cate-item .item .name{
-  display: block;
-  width: 365.625rpx;
-  height: 35rpx;
-  padding: 0 20rpx;
-  overflow: hidden;
-  margin: 11.5rpx 0 22rpx 0;
-  text-align: center;
-  font-size: 30rpx;
-  color: #333;
-}
-
-.cate-item .item .price{
-  display: block;
-  width: 365.625rpx;
-  height: 30rpx;
-  text-align: center;
-  font-size: 30rpx;
-  color: #b4282d;
-}

+ 0 - 61
wx-front/pages/pay/pay.js

@@ -1,61 +0,0 @@
-var app = getApp();
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-
-Page({
-  data: {
-    orderId: 0,
-    actualPrice: 0.00
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.setData({
-      orderId: options.orderId,
-      actualPrice: options.actualPrice
-    })
-  },
-  onReady: function () {
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  //向服务请求支付参数
-  requestPayParam() {
-    let that = this;
-    util.request(api.PayPrepayId, { orderId: that.data.orderId, payType: 1 }).then(function (res) {
-      if (res.errno === 0) {
-        let payParam = res.data;
-        wx.requestPayment({
-          'timeStamp': payParam.timeStamp,
-          'nonceStr': payParam.timeStamp,
-          'package': payParam.nonceStr,
-          'signType': payParam.signType,
-          'paySign': payParam.paySign,
-          'success': function (res) {
-            wx.redirectTo({
-              url: '/pages/payResult/payResult?status=true',
-            })
-          },
-          'fail': function (res) {
-            wx.redirectTo({
-              url: '/pages/payResult/payResult?status=false',
-            })
-          }
-        })
-      }
-    });
-  },
-  startPay() {
-    this.requestPayParam();
-  }
-})

+ 0 - 3
wx-front/pages/pay/pay.json

@@ -1,3 +0,0 @@
-{
-  "navigationBarTitleText": "支付订单"
-}

+ 0 - 29
wx-front/pages/pay/pay.wxml

@@ -1,29 +0,0 @@
-<view class="container">
-    <view class="total">
-      <view class="label">订单金额</view>
-      <view class="txt">{{actualPrice}}元</view>
-    </view>
-    <view class="pay-list">
-        <view class="h">请选择支付方式</view>
-        <view class="b">
-            <!--<view class="item">
-                <view class="checkbox checked"></view>
-                <view class="icon-alipay"></view>
-                <view class="name">支付宝</view>
-            </view>
-            <view class="item">
-                <view class="checkbox"></view>
-                <view class="icon-net"></view>
-                <view class="name">网易支付</view>
-            </view>-->
-            <view class="item">
-                <view class="checkbox checked"></view>
-                <image src="/static/images/wxpay.png" class="icon"></image>
-                <view class="name">微信支付</view>
-            </view>
-        </view>
-    </view>
-    <view class="tips">小程序只支持微信支付,如需其它支付方式,请在网页版支付</view>
-
-    <view class="pay-btn" bindtap="startPay">确定</view>
-</view>

+ 0 - 123
wx-front/pages/pay/pay.wxss

@@ -1,123 +0,0 @@
-page{
-    min-height: 100%;
-    width: 100%;
-    background: #f4f4f4;
-}
-
-.container{
-  padding-top: 20rpx;
-}
-
-.total{
-  height: 104rpx;
-  background: #fff;
-  width: 100%;
-  line-height: 104rpx;
-  padding-left: 30rpx;
-  padding-right: 30rpx;
-}
-
-.total .label{
-  float: left;
-}
-
-.total .txt{
-  float: right;
-}
-
-.pay-list{
-    margin-top: 30rpx;
-    height: auto;
-    width: 100%;
-    overflow: hidden;
-}
-.pay-list .h{
-    width: 100%;
-    height: 24rpx;
-    line-height: 24rpx;
-    margin-left: 31.25rpx;
-    margin-bottom: 31.25rpx;
-}
-
-.pay-list .item{
-    height: 108rpx;
-    padding-left: 31.25rpx;
-    background: #fff;
-    display: flex;
-    align-items: center;
-    border-bottom: 1px solid #f4f4f4;
-}
-
-.pay-list .checkbox{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -448rpx no-repeat;
-    background-size: 38rpx 486rpx;
-    width: 40rpx;
-    height: 40rpx;
-    display: inline-block;
-    vertical-align: middle;
-    margin-right: 30rpx;
-}
-
-.pay-list .checkbox.checked{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat;
-    background-size: 38rpx 486rpx;
-}
-
-.pay-list .icon-alipay{
-    display: inline-block;
-    vertical-align: middle;
-    background-image: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/payMethod-s3c1faebee4-d754da9c65.png);
-    background-repeat: no-repeat;
-    background-size: 56.25rpx 189.583rpx;
-    margin-right: 10.5rpx;
-    width: 56.25rpx;
-    height: 56.25rpx;
-}
-
-.pay-list .icon-net{
-    display: inline-block;
-    vertical-align: middle;
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/payMethod-s3c1faebee4-d754da9c65.png) 0 -66.7rpx no-repeat;
-    background-size: 56.25rpx 189.583rpx;
-    margin-right: 10.5rpx;
-    width: 56.25rpx;
-    height: 56.25rpx;
-}
-
-.pay-list .icon{
-    display: inline-block;
-    vertical-align: middle;
-    margin-right: 10.5rpx;
-    width: 56.25rpx;
-    height: 56.25rpx;
-}
-
-.pay-list .name{
-    display: inline-block;
-    vertical-align: middle;
-    height: 56.25rpx;
-    line-height: 56.25rpx;
-}
-
-.pay-btn{
-    position: fixed;
-    left: 0;
-    bottom: 0;
-    height: 100rpx;
-    width: 100%;
-    text-align: center;
-    line-height: 100rpx;
-    background: #b4282d;
-    color: #fff;
-    font-size: 30rpx;
-}
-
-.tips{
-  height: 40rpx;
-  width: 100%;
-  font-size: 24rpx;
-  color: #999;
-  line-height: 40rpx;
-  padding-left: 30rpx;
-  padding-right: 30rpx;
-}

+ 0 - 42
wx-front/pages/payResult/payResult.js

@@ -1,42 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-const pay = require('../../services/pay.js');
-
-var app = getApp();
-Page({
-  data: {
-    status: false,
-    orderId: 0
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.setData({
-      orderId: options.orderId || 24,
-      status: options.status
-    })
-  },
-  onReady: function () {
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  payOrder() {
-    pay.payOrder(parseInt(this.data.orderId)).then(res => {
-      this.setData({
-        status: true
-      });
-    }).catch(res => {
-      util.showErrorToast('支付失败');
-    });
-  }
-})

+ 0 - 4
wx-front/pages/payResult/payResult.json

@@ -1,4 +0,0 @@
-{
-    "navigationBarTitleText": "付款结果",
-    "navigationBarBackgroundColor": "#fafafa"
-}

+ 0 - 23
wx-front/pages/payResult/payResult.wxml

@@ -1,23 +0,0 @@
-<view class="container">
-  <view class="pay-result">
-    <view class="success" wx:if="{{status == true}}">
-      <view class="msg">付款成功</view>
-      <view class="btns">
-        <navigator class="btn" url="/pages/ucenter/order/order" open-type="redirect">查看订单</navigator>
-        <navigator class="btn" url="/pages/index/index" open-type="switchTab">继续逛</navigator>
-      </view>
-    </view>
-    <view class="error" wx:if="{{status != true}}">
-      <view class="msg">付款失败</view>
-      <view class="tips">
-        <view class="p">请在 <text class="time">1小时</text> 内完成付款</view>
-        <view class="p">否则订单将会被系统取消</view>
-      </view>
-      <view class="btns">
-        <navigator class="btn" url="/pages/ucenter/order/order" open-type="redirect">查看订单</navigator>
-        <view class="btn" bindtap='payOrder'>重新付款</view>
-      </view>
-    </view>
-  </view>
-
-</view>

+ 0 - 59
wx-front/pages/payResult/payResult.wxss

@@ -1,59 +0,0 @@
-page {
-  min-height: 100%;
-  width: 100%;
-  background: #fff;
-}
-
-.container {
-  height: 100%;
-  background: #fff;
-}
-
-.pay-result {
-  background: #fff;
-}
-
-.pay-result .msg {
-  text-align: center;
-  margin: 100rpx auto;
-  color: #2bab25;
-  font-size: 36rpx;
-}
-
-.pay-result .btns {
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
-
-.pay-result .btn {
-  text-align: center;
-  height: 80rpx;
-  margin: 0 20rpx;
-  width: 200rpx;
-  line-height: 78rpx;
-  border: 1px solid #868686;
-  color: #000000;
-  border-radius: 5rpx;
-}
-
-.pay-result .error .msg {
-  color: #b4282d;
-  margin-bottom: 60rpx;
-}
-
-.pay-result .error .tips {
-  color: #7f7f7f;
-  margin-bottom: 70rpx;
-}
-
-.pay-result .error .tips .p {
-  font-size: 24rpx;
-  line-height: 42rpx;
-  text-align: center;
-}
-
-.pay-result .error .tips .p {
-  line-height: 42rpx;
-  text-align: center;
-}

+ 12 - 12
wx-front/pages/postCate/postCate.js → wx-front/pages/post/category/category.js

@@ -1,6 +1,6 @@
 var app = getApp();
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
+var util = require('../../../utils/util.js');
+var api = require('../../../config/api.js');
 
 Page({
 
@@ -16,7 +16,7 @@ Page({
   /**
    * 生命周期函数--监听页面加载
    */
-  onLoad: function (options) {
+  onLoad: function(options) {
     var that = this;
     if (options.id && options.name) {
       that.setData({
@@ -31,7 +31,7 @@ Page({
 
   getCateList() {
     let that = this;
-    util.request(api.PostCateList + '/' + that.data.parentId).then(function (res) {
+    util.request(api.PostCateList + '/' + that.data.parentId).then(function(res) {
       if (res.errno === 0) {
         if (res.data.length > 0) {
           that.setData({
@@ -50,7 +50,7 @@ Page({
       console.log(res)
     });
   },
-  tapCate: function (event) {
+  tapCate: function(event) {
     if (event.currentTarget.dataset.id != this.data.parentId) {
       this.setData({
         parentId: event.currentTarget.dataset.id,
@@ -63,49 +63,49 @@ Page({
   /**
    * 生命周期函数--监听页面初次渲染完成
    */
-  onReady: function () {
+  onReady: function() {
 
   },
 
   /**
    * 生命周期函数--监听页面显示
    */
-  onShow: function () {
+  onShow: function() {
 
   },
 
   /**
    * 生命周期函数--监听页面隐藏
    */
-  onHide: function () {
+  onHide: function() {
 
   },
 
   /**
    * 生命周期函数--监听页面卸载
    */
-  onUnload: function () {
+  onUnload: function() {
 
   },
 
   /**
    * 页面相关事件处理函数--监听用户下拉动作
    */
-  onPullDownRefresh: function () {
+  onPullDownRefresh: function() {
 
   },
 
   /**
    * 页面上拉触底事件的处理函数
    */
-  onReachBottom: function () {
+  onReachBottom: function() {
 
   },
 
   /**
    * 用户点击右上角分享
    */
-  onShareAppMessage: function () {
+  onShareAppMessage: function() {
 
   }
 })

+ 0 - 0
wx-front/pages/catalog/catalog.json → wx-front/pages/post/category/category.json


+ 13 - 0
wx-front/pages/post/category/category.wxml

@@ -0,0 +1,13 @@
+<view class="container">
+
+  <view class="cate">
+    <view wx:for="{{cateList}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
+      <view class="element" bindtap="tapCate" data-id="{{item.id}}" data-name="{{item.name}}">
+        <view class="lable">{{item.name}}</view>
+        <image background-size="cover" class="i" src="/static/images/address_right.png"></image>
+      </view>
+    </view>
+
+  </view>
+
+</view>

+ 8 - 14
wx-front/pages/postCate/postCate.wxss → wx-front/pages/post/category/category.wxss

@@ -3,17 +3,15 @@ page, .container {
   background: #f4f4f4;
 }
 
-
 .cate {
-  margin:30rpx 30rpx 0 30rpx;
+  margin: 30rpx 30rpx 0 30rpx;
   width: 690rpx;
   height: auto;
   overflow: hidden;
-  padding:0 30rpx 30rpx 30rpx;
+  padding: 0 30rpx 30rpx 30rpx;
   background: #fff;
 }
 
-
 .cate .element {
   display: flex;
   height: 70rpx;
@@ -23,16 +21,12 @@ page, .container {
 
 .cate .lable {
   line-height: 60rpx;
-  margin-left:10px;
-  width:600rpx;
-
+  margin-left: 10px;
+  width: 600rpx;
 }
 
-
-.cate .i{
-float:right;
-width:45rpx;
-height:45rpx;
-
+.cate .i {
+  float: right;
+  width: 45rpx;
+  height: 45rpx;
 }
-

+ 2 - 2
wx-front/pages/nav2post/nav2post.js → wx-front/pages/post/nav2post/nav2post.js

@@ -1,4 +1,4 @@
-// pages/topbarNav/topbarNav.js
+
 Page({
 
   /**
@@ -13,7 +13,7 @@ Page({
    */
   onLoad: function (options) {
       wx.navigateTo({
-        url: '/pages/post/post',
+        url: '/pages/post/post/post',
       })
     
     

+ 0 - 0
wx-front/pages/nav2post/nav2post.json → wx-front/pages/post/nav2post/nav2post.json


+ 0 - 0
wx-front/pages/nav2post/nav2post.wxml → wx-front/pages/post/nav2post/nav2post.wxml


+ 0 - 0
wx-front/pages/nav2post/nav2post.wxss → wx-front/pages/post/nav2post/nav2post.wxss


+ 3 - 3
wx-front/pages/post/post.js → wx-front/pages/post/post/post.js

@@ -1,7 +1,7 @@
 var app = getApp();
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-var user = require('../../services/user.js');
+var util = require('../../../utils/util.js');
+var api = require('../../../config/api.js');
+var user = require('../../../services/user.js');
 Page({
   data: {
     desc: '',

+ 0 - 0
wx-front/pages/post/post.json → wx-front/pages/post/post/post.json


+ 4 - 4
wx-front/pages/post/post.wxml → wx-front/pages/post/post/post.wxml

@@ -16,7 +16,7 @@
         <view wx:if="{{imgList[index] == 'false'}}">
           <!-- 上传中 -->
           <view class='add blur' style="background-image: url('{{tmpImgList[index]}}')">
-            <image class='loading' src='../../static/images/loading.png'></image>
+            <image class='loading' src='/static/images/loading.png'></image>
           </view>
         </view>
         <view wx:else>
@@ -31,7 +31,7 @@
       </view>
       <view wx:if="{{imgList.length < 10}}" class='add' bindtap='addImage'>
         <text class='txt'>添加图片</text>
-        <image class='icon' src='../../static/images/plus.png'></image>
+        <image class='icon' src='/static/images/plus.png'></image>
       </view>
 
     </view>
@@ -68,11 +68,11 @@
         </label>
       </checkbox-group>
     </view>
-    <navigator url="../postCate/postCate" class="element">
+    <navigator url="../category/category" class="element">
       <view class="lable">分类</view>
 
       <view class="cate">{{cateName ? cateName : '选择分类'}}</view>
-      <image background-size="cover" class="i" src="../../static/images/address_right.png"></image>
+      <image background-size="cover" class="i" src="/static/images/address_right.png"></image>
     </navigator>
 
     <view class="element">

+ 0 - 0
wx-front/pages/post/post.wxss → wx-front/pages/post/post/post.wxss


+ 4 - 9
wx-front/pages/region/region.js → wx-front/pages/post/region/region.js

@@ -1,6 +1,6 @@
 var app = getApp();
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
+var util = require('../../../utils/util.js');
+var api = require('../../../config/api.js');
 Page({
 
   /**
@@ -50,20 +50,15 @@ Page({
     });
   },
   tapRegion: function(event) {
-    if (event.currentTarget.dataset.id != this.data.parentId){
+    if (event.currentTarget.dataset.id != this.data.parentId) {
       this.setData({
         parentId: event.currentTarget.dataset.id,
         name: this.data.name + ' ' + event.currentTarget.dataset.name,
       })
       this.getRegionList();
     }
-    
-  },
-  // clickSkuValue: function (event) {
-  //   let that = this;
-  //   let specNameId = event.currentTarget.dataset.nameId;
-  //   let specValueId = event.currentTarget.dataset.valueId;
 
+  },
   /**
    * 生命周期函数--监听页面初次渲染完成
    */

+ 0 - 0
wx-front/pages/region/region.json → wx-front/pages/post/region/region.json


+ 13 - 0
wx-front/pages/post/region/region.wxml

@@ -0,0 +1,13 @@
+<view class="container">
+
+  <view class="region">
+    <view wx:for="{{regionList}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
+      <view class="element" bindtap="tapRegion" data-id="{{item.id}}" data-name="{{item.name}}">
+        <view class="lable">{{item.name}}</view>
+        <image background-size="cover" class="i" src="/static/images/address_right.png"></image>
+      </view>
+    </view>
+
+  </view>
+
+</view>

+ 8 - 14
wx-front/pages/region/region.wxss → wx-front/pages/post/region/region.wxss

@@ -3,17 +3,15 @@ page, .container {
   background: #f4f4f4;
 }
 
-
 .region {
-  margin:30rpx 30rpx 0 30rpx;
+  margin: 30rpx 30rpx 0 30rpx;
   width: 690rpx;
   height: auto;
   overflow: hidden;
-  padding:0 30rpx 0 30rpx;
+  padding: 0 30rpx 0 30rpx;
   background: #fff;
 }
 
-
 .region .element {
   display: flex;
   height: 70rpx;
@@ -23,16 +21,12 @@ page, .container {
 
 .region .lable {
   line-height: 60rpx;
-  margin-left:10px;
-  width:600rpx;
-
+  margin-left: 10px;
+  width: 600rpx;
 }
 
-
-.region .i{
-float:right;
-width:45rpx;
-height:45rpx;
-
+.region .i {
+  float: right;
+  width: 45rpx;
+  height: 45rpx;
 }
-

+ 0 - 1
wx-front/pages/postCate/postCate.json

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

+ 0 - 13
wx-front/pages/postCate/postCate.wxml

@@ -1,13 +0,0 @@
-<view class="container">
-
-  <view class="cate">
-    <view class="item" wx:for="{{cateList}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
-      <view class="element" bindtap="tapCate" data-id="{{item.id}}" data-name="{{item.name}}"  >
-        <view class="lable">{{item.name}}</view>
-        <image background-size="cover" class="i" src="../../static/images/address_right.png"></image>
-      </view>
-    </view>
-
-  </view>
-
-</view>

+ 0 - 14
wx-front/pages/region/region.wxml

@@ -1,14 +0,0 @@
-<view class="container">
-
-  <view class="region">
-    <view class="item" wx:for="{{regionList}}" wx:for-index="index" wx:for-item="item" wx:key="{{item.id}}">
-      <view class="element" bindtap="tapRegion" data-id="{{item.id}}" data-name="{{item.name}}"  >
-        <view class="lable">{{item.name}}</view>
-        <image background-size="cover" class="i" src="../../static/images/address_right.png"></image>
-      </view>
-    </view>
-
-
-  </view>
-
-</view>

+ 1 - 63
wx-front/pages/search/search.js

@@ -9,17 +9,10 @@ Page({
     goodsList: [],
     helpKeyword: [],
     historyKeyword: [],
-    // categoryFilter: false,
-    // currentSortType: 'default',
-    // currentSortOrder: '',
-    // filterCategory: [],
     defaultKeyword: '输入关键字',
     hotKeyword: [],
     page: 1,
     size: 10,
-    // currentSortType: 'id',
-    // currentSortOrder: 'desc',
-    // categoryId: 0
   },
   //事件处理函数
   closeSearch: function() {
@@ -55,9 +48,9 @@ Page({
     });
     this.getHelpKeyword();
   },
+  //借用淘宝的输入辅助api
   getHelpKeyword: function() {
     let that = this;
-    // 'https://suggest.taobao.com/sug?code=utf-8&q=a'
     util.request('https://suggest.taobao.com/sug', {
       code: 'utf-8',
       q: that.data.keyword
@@ -101,8 +94,6 @@ Page({
           searchStatus: true,
           categoryFilter: false,
           goodsList: that.data.goodsList.concat(res.data),
-          // page: res.data.currentPage,
-          // size: res.data.numsPerPage
         });
       }
 
@@ -125,59 +116,6 @@ Page({
 
     this.getGoodsList();
   },
-  // openSortFilter: function (event) {
-  //   let currentId = event.currentTarget.id;
-  //   switch (currentId) {
-  //     case 'categoryFilter':
-  //       this.setData({
-  //         'categoryFilter': !this.data.categoryFilter,
-  //         'currentSortOrder': 'asc'
-  //       });
-  //       break;
-  //     case 'priceSort':
-  //       let tmpSortOrder = 'asc';
-  //       if (this.data.currentSortOrder == 'asc') {
-  //         tmpSortOrder = 'desc';
-  //       }
-  //       this.setData({
-  //         'currentSortType': 'price',
-  //         'currentSortOrder': tmpSortOrder,
-  //         'categoryFilter': false
-  //       });
-
-  //       this.getGoodsList();
-  //       break;
-  //     default:
-  //       //综合排序
-  //       this.setData({
-  //         'currentSortType': 'default',
-  //         'currentSortOrder': 'desc',
-  //         'categoryFilter': false
-  //       });
-  //       this.getGoodsList();
-  //   }
-  // },
-  // selectCategory: function (event) {
-  //   let currentIndex = event.target.dataset.categoryIndex;
-  //   let filterCategory = this.data.filterCategory;
-  //   let currentCategory = null;
-  //   for (let key in filterCategory) {
-  //     if (key == currentIndex) {
-  //       filterCategory[key].selected = true;  //checked?
-  //       currentCategory = filterCategory[key];
-  //     } else {
-  //       filterCategory[key].selected = false;
-  //     }
-  //   }
-  //   this.setData({
-  //     'filterCategory': filterCategory,
-  //     'categoryFilter': false,
-  //     categoryId: currentCategory.id,
-  //     page: 1,
-  //     goodsList: []
-  //   });
-  //   this.getGoodsList();
-  // },
   onKeywordConfirm(event) {
     this.getSearchResult(event.detail.value);
   },

+ 7 - 22
wx-front/pages/search/search.wxml

@@ -1,15 +1,15 @@
 <scroll-view class="container" style="height: 100%;">
+  <!-- 输入框 -->
   <view class="search-header">
     <view class="input-box">
       <image class="icon" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/search2-2fb94833aa.png"></image>
-      <!-- TODO 输入辅助 -->
-      <!-- <input name="input" class="keywrod" focus="true" value="{{keyword}}" confirm-type="search" bindinput="inputChange" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" /> -->
-            <input name="input" class="keywrod" focus="true" value="{{keyword}}" confirm-type="search" bindinput="inputChange" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" />
-            <!-- <input name="input" class="keywrod" focus="true" value="{{keyword}}"  bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" /> -->
+      <input name="input" class="keywrod" focus="true" value="{{keyword}}" confirm-type="search" bindinput="inputChange" bindfocus="inputFocus" bindconfirm="onKeywordConfirm" confirm-type="search" placeholder="{{defaultKeyword}}" />
       <image class="del" wx:if="{{keyword}}" bindtap="clearKeyword" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/clearIpt-f71b83e3c2.png"></image>
     </view>
     <view class="right" bindtap="closeSearch">取消</view>
   </view>
+
+  <!-- 热门关键字,历史搜索,搜索辅助 -->
   <view class="no-search" wx:if="{{ !searchStatus}}">
     <view class="serach-keywords search-history" wx:if="{{!keyword && historyKeyword.length}}">
       <view class="h">
@@ -33,26 +33,10 @@
     </view>
   </view>
 
+  <!-- 搜索结果 -->
   <view class="search-result" wx:if="{{ searchStatus && goodsList.length}}">
 
-    <!-- <view class="sort">
-      <view class="sort-box">
-        <view class="item {{currentSortType == 'default' ? 'active' : ''}}" bindtap="openSortFilter" id="defaultSort">
-          <text class="txt">综合</text>
-        </view>
-        <view class="item by-price {{currentSortType == 'price' ? 'active' : ''}} {{currentSortOrder == 'asc'  ? 'asc' : 'desc'}}" bindtap="openSortFilter" id="priceSort">
-          <text class="txt">价格</text>
-        </view>
-        <view class="item {{currentSortType == 'category' ? 'active' : ''}}" bindtap="openSortFilter" id="categoryFilter">
-          <text class="txt">分类</text>
-        </view>
-      </view>
-      <view class="sort-box-category" wx-if="{{categoryFilter}}">
-        <view class="item {{item.checked ? 'active' : ''}}" wx:for="{{filterCategory}}" wx:key="cate-{{item.id}}" data-category-index="{{index}}" bindtap="selectCategory">{{item.name}}</view>
-      </view>
-    </view> -->
-    
-    <view class="cate-item">
+    <view class="result-item">
       <view class="b">
         <navigator class="item {{(iindex + 1) % 2 == 0 ? 'item-b' : ''}}" url="/pages/goods/goods?id={{iitem.id}}" wx:for="{{goodsList}}" wx:for-item="iitem" wx:for-index="iindex">
           <image class="img" src="{{iitem.primaryPicUrl}}" background-size="cover"></image>
@@ -63,6 +47,7 @@
     </view>
   </view>
 
+  <!-- 搜索结果为空 -->
   <view class="search-result-empty" wx:if="{{!goodsList.length && searchStatus}}">
     <image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noSearchResult-7572a94f32.png"></image>
     <text class="text">没有您寻找的商品</text>

+ 13 - 115
wx-front/pages/search/search.wxss

@@ -8,6 +8,7 @@ page{
   background-color: #f4f4f4;
 }
 
+/* 输入框 */
 .search-header{
     position: fixed;
     top: 0;
@@ -69,6 +70,7 @@ page{
     float: right;
 }
 
+/* 热门关键字,历史搜索 */
 .no-search{
     height: auto;
     overflow: hidden;
@@ -131,6 +133,7 @@ page{
     border: 1px solid #f94b4b;
 }
 
+/* 搜索辅助 */
 .shelper-list{
     width: 750rpx;
     height: auto;
@@ -149,130 +152,24 @@ page{
 }
 
 
-.sort{
-    position: fixed;
-    top: 91rpx;
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-}
-
-.sort-box{
-    background: #fff;
-    width: 100%;
-    height: 78rpx;
-    overflow: hidden;
-    padding: 0 30rpx;
-    display: flex;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box .item{
-    height: 78rpx;
-    line-height: 78rpx;
-    text-align: center;
-    flex:1;
-    color: #333;
-    font-size: 30rpx;
-}
-
-.sort-box .item .txt{
-    display: block;
-    width: 100%;
-    height: 100%;
-    color: #333;
-}
-
-.sort-box .item.active .txt{
-    color: #b4282d;
-}
-
-.sort-box .item.by-price{
-    background: url(//yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/no-3127092a69.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.asc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/up-636b92c0a5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box .item.by-price.active.desc{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/down-95e035f3e5.png) 155rpx center no-repeat;
-    background-size: 15rpx 21rpx;
-}
-
-.sort-box-category{
-    background: #fff;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    padding: 40rpx 40rpx 0 0;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.sort-box-category .item{
-    height: 54rpx;
-    line-height: 54rpx;
-    text-align: center;
-    float: left;
-    padding: 0 16rpx;
-    margin: 0 0 40rpx 40rpx;
-    border: 1px solid #666;
-    color: #333;
-    font-size: 24rpx;
-}
-
-.sort-box-category .item.active{
-    color: #b4282d;
-    border: 1px solid #b4282d;
-}
-
-.cate-item{
+/* 搜索结果 */
+.result-item{
     margin-top: 100rpx;
     height: auto;
     overflow: hidden;
 }
 
-.cate-item .h{
-    height: 145rpx;
-    width: 750rpx;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-}
-
-.cate-item .h .name{
-    display: block;
-    height: 35rpx;
-    margin-bottom: 18rpx;
-    font-size: 30rpx;
-    color: #333;
-}
-
-.cate-item .h .desc{
-    display: block;
-    height: 24rpx;
-    font-size: 24rpx;
-    color: #999;
-}
 
-.cate-item .b{
+.result-item .b{
   width: 750rpx;
   padding: 0 6.25rpx;
   height: auto;
   overflow: hidden;
 }
 
-.cate-item .list-filter{
-    height: 80rpx;
-    width: 100%;
-    background: #fff;
-    margin-bottom: 6.25rpx;
-}
 
-.cate-item .b .item{
+
+.result-item .b .item{
   float: left;
   background: #fff;
   width: 365rpx;
@@ -283,16 +180,16 @@ page{
   text-align: center;
 }
 
-.cate-item .b .item-b{
+.result-item .b .item-b{
   margin-left: 6.25rpx;
 }
 
-.cate-item .item .img{
+.result-item .item .img{
   width: 302rpx;
   height: 302rpx;
 }
 
-.cate-item .item .name{
+.result-item .item .name{
   display: block;
   width: 365.625rpx;
   height: 35rpx;
@@ -304,7 +201,7 @@ page{
   color: #333;
 }
 
-.cate-item .item .price{
+.result-item .item .price{
   display: block;
   width: 365.625rpx;
   height: 30rpx;
@@ -313,6 +210,7 @@ page{
   color: #f94b4b;
 }
 
+/* 无搜索结果 */
 .search-result-empty{
     width: 100%;
     height: 100%;

+ 0 - 56
wx-front/pages/shopping/address/address.js

@@ -1,56 +0,0 @@
-var util = require('../../../utils/util.js');
-var api = require('../../../config/api.js');
-var app = getApp();
-
-Page({
-  data: {
-    addressList: [],
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.getAddressList();
-  },
-  onReady: function () {
-    // 页面渲染完成
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  getAddressList (){
-    let that = this;
-    util.request(api.AddressList).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          addressList: res.data
-        });
-      }
-    });
-  },
-  addressAddOrUpdate (event) {
-    console.log(event)
-    wx.navigateTo({
-      url: '/pages/shopping/addressAdd/addressAdd?id=' + event.currentTarget.dataset.addressId
-    })
-  },
-  selectAddress(event){
-    console.log(event.currentTarget.dataset.addressId);
-
-    try {
-      wx.setStorageSync('addressId', event.currentTarget.dataset.addressId);
-    } catch (e) {
-
-    }
-
-    //选择该收货地址
-    wx.redirectTo({
-      url: '/pages/shopping/checkout/checkout'
-    })
-  },
-  onHide: function () {
-    // 页面隐藏
-  },
-  onUnload: function () {
-    // 页面关闭
-  }
-})

+ 0 - 1
wx-front/pages/shopping/address/address.json

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

+ 0 - 22
wx-front/pages/shopping/address/address.wxml

@@ -1,22 +0,0 @@
-<view class="container">
-    <view class="address-list" wx:if="{{ addressList.length > 0 }}">
-        <view class="item" wx:for="{{addressList}}" wx:key="{{item.id}}" bindtap="selectAddress" data-address-id="{{item.id}}">
-            <view class="l">
-                <view class="name">{{item.name}}</view>
-                <view class="default" wx:if="{{item.is_default}}">默认</view>
-            </view>
-            <view class="c">
-                <view class="mobile">{{item.mobile}}</view>
-                <view class="address">{{item.full_region + item.address}}</view>
-            </view>
-            <view class="r">
-                <image catchtap="addressAddOrUpdate" data-address-id="{{item.id}}" class="del" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-edit-7fee7b0d63.png"></image>
-            </view>
-        </view>
-    </view>
-    <view class="empty-view" wx:if="{{ addressList.length <= 0 }}">
-      <image class="icon" src="http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/noAddress-26d570cefa.png"></image>
-      <text class="text">收货地址在哪里</text>
-    </view>
-    <view class="add-address" bindtap="addressAddOrUpdate" data-address-id="0">新建</view>
-</view>

+ 0 - 132
wx-front/pages/shopping/address/address.wxss

@@ -1,132 +0,0 @@
-page{
-    height: 100%;
-    width: 100%;
-    background: #f4f4f4;
-}
-
-.container{
-  height: 100%;
-  width: 100%;
-}
-
-.address-list{
-    padding-left: 31.25rpx;
-    background: #fff url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png) 0 0 repeat-x;
-    background-size: auto 10.5rpx;
-    margin-bottom: 90rpx;
-}
-
-.address-list .item{
-    height: 156.55rpx;
-    align-items: center;
-    display: flex;
-    border-bottom: 1rpx solid #DCD9D9;
-}
-
-.address-list .item:last-child{
-
-    border-bottom: none;
-}
-
-.address-list .l{
-    width: 125rpx;
-    height: 80rpx;
-    overflow: hidden;
-}
-
-.address-list .name{
-    width: 125rpx;
-    height: 43rpx;
-    font-size: 29rpx;
-    color: #333;
-    margin-bottom: 5.2rpx;
-        text-overflow: ellipsis;
-    white-space: nowrap;
-    overflow: hidden;
-}
-
-.address-list .default{
-    width: 62.5rpx;
-    height: 33rpx;
-    line-height: 28rpx;
-    text-align: center;
-    font-size: 20rpx;
-    color: #b4282d;
-    border: 1rpx solid #b4282d;
-    visibility: visible;
-}
-
-
-.address-list .c{
-    flex: 1;
-    height: auto;
-    overflow: hidden;
-}
-
-.address-list .mobile{
-
-    height: 29rpx;
-    font-size: 29rpx;
-    line-height: 29rpx;
-    overflow: hidden;
-    color: #333;
-    margin-bottom: 6.25rpx;
-}
-
-.address-list .address{
-    height: 37rpx;
-    font-size: 25rpx;
-    line-height: 37rpx;
-    overflow: hidden;
-    color: #666;
-}
-
-.address-list .r{
-    width: 52rpx;
-    height: auto;
-    overflow: hidden;
-    margin-right: 16.5rpx;
-}
-
-.address-list .del{
-    display: block;
-    width: 52rpx;
-    height: 52rpx;
-}
-
-.add-address{
-    background: #b4282d;
-    text-align: center;
-    width: 100%;
-    height: 99rpx;
-    line-height: 99rpx;
-    position: fixed;
-    border-radius: 0;
-    border: none;
-    color: #fff;
-    font-size: 29rpx;
-    bottom: 0;
-    left:0;
-}
-
-.empty-view{
-  height: 100%;
-  width: 100%;
-  display: flex;
-  flex-direction: column;
-  align-items: center;
-  justify-content: center;
-}
-
-.empty-view .icon{
-  height: 248rpx;
-  width: 258rpx;
-  margin-bottom: 10rpx;
-}
-
-.empty-view .text{
-  width: auto;
-  font-size: 28rpx;
-  line-height: 35rpx;
-  color: #999;
-}

+ 0 - 324
wx-front/pages/shopping/addressAdd/addressAdd.js

@@ -1,324 +0,0 @@
-var util = require('../../../utils/util.js');
-var api = require('../../../config/api.js');
-var app = getApp();
-Page({
-  data: {
-    address: {
-      id:0,
-      province_id: 0,
-      city_id: 0,
-      district_id: 0,
-      address: '',
-      full_region: '',
-      name: '',
-      mobile: '',
-      is_default: 0
-    },
-    addressId: 0,
-    openSelectRegion: false,
-    selectRegionList: [
-      { id: 0, name: '省份', parent_id: 1, type: 1 },
-      { id: 0, name: '城市', parent_id: 1, type: 2 },
-      { id: 0, name: '区县', parent_id: 1, type: 3 }
-    ],
-    regionType: 1,
-    regionList: [],
-    selectRegionDone: false
-  },
-  bindinputMobile(event) {
-    let address = this.data.address;
-    address.mobile = event.detail.value;
-    this.setData({
-      address: address
-    });
-  },
-  bindinputName(event) {
-    let address = this.data.address;
-    address.name = event.detail.value;
-    this.setData({
-      address: address
-    });
-  },
-  bindinputAddress (event){
-    let address = this.data.address;
-    address.address = event.detail.value;
-    this.setData({
-      address: address
-    });
-  },
-  bindIsDefault(){
-    let address = this.data.address;
-    address.is_default = !address.is_default;
-    this.setData({
-      address: address
-    });
-  },
-  getAddressDetail() {
-    let that = this;
-    util.request(api.AddressDetail, { id: that.data.addressId }).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          address: res.data
-        });
-      }
-    });
-  },
-  setRegionDoneStatus() {
-    let that = this;
-    let doneStatus = that.data.selectRegionList.every(item => {
-      return item.id != 0;
-    });
-
-    that.setData({
-      selectRegionDone: doneStatus
-    })
-
-  },
-  chooseRegion() {
-    let that = this;
-    this.setData({
-      openSelectRegion: !this.data.openSelectRegion
-    });
-
-    //设置区域选择数据
-    let address = this.data.address;
-    if (address.province_id > 0 && address.city_id > 0 && address.district_id > 0) {
-      let selectRegionList = this.data.selectRegionList;
-      selectRegionList[0].id = address.province_id;
-      selectRegionList[0].name = address.province_name;
-      selectRegionList[0].parent_id = 1;
-
-      selectRegionList[1].id = address.city_id;
-      selectRegionList[1].name = address.city_name;
-      selectRegionList[1].parent_id = address.province_id;
-
-      selectRegionList[2].id = address.district_id;
-      selectRegionList[2].name = address.district_name;
-      selectRegionList[2].parent_id = address.city_id;
-
-      this.setData({
-        selectRegionList: selectRegionList,
-        regionType: 3
-      });
-
-      this.getRegionList(address.city_id);
-    } else {
-      this.setData({
-        selectRegionList: [
-          { id: 0, name: '省份', parent_id: 1, type: 1 },
-          { id: 0, name: '城市', parent_id: 1, type: 2 },
-          { id: 0, name: '区县', parent_id: 1, type: 3 }
-        ],
-        regionType: 1
-      })
-      this.getRegionList(1);
-    }
-
-    this.setRegionDoneStatus();
-
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    console.log(options)
-    if (options.id) {
-      this.setData({
-        addressId: options.id
-      });
-      this.getAddressDetail();
-    }
-
-    this.getRegionList(1);
-
-  },
-  onReady: function () {
-
-  },
-  selectRegionType(event) {
-    let that = this;
-    let regionTypeIndex = event.target.dataset.regionTypeIndex;
-    let selectRegionList = that.data.selectRegionList;
-
-    //判断是否可点击
-    if (regionTypeIndex + 1 == this.data.regionType || (regionTypeIndex - 1 >= 0 && selectRegionList[regionTypeIndex-1].id <= 0)) {
-      return false;
-    }
-
-    this.setData({
-      regionType: regionTypeIndex + 1
-    })
-    
-    let selectRegionItem = selectRegionList[regionTypeIndex];
-
-    this.getRegionList(selectRegionItem.parent_id);
-
-    this.setRegionDoneStatus();
-
-  },
-  selectRegion(event) {
-    let that = this;
-    let regionIndex = event.target.dataset.regionIndex;
-    let regionItem = this.data.regionList[regionIndex];
-    let regionType = regionItem.type;
-    let selectRegionList = this.data.selectRegionList;
-    selectRegionList[regionType - 1] = regionItem;
-
-
-    if (regionType != 3) {
-      this.setData({
-        selectRegionList: selectRegionList,
-        regionType: regionType + 1
-      })
-      this.getRegionList(regionItem.id);
-    } else {
-      this.setData({
-        selectRegionList: selectRegionList
-      })
-    }
-
-    //重置下级区域为空
-    selectRegionList.map((item, index) => {
-      if (index > regionType - 1) {
-        item.id = 0;
-        item.name = index == 1 ? '城市' : '区县';
-        item.parent_id = 0;
-      }
-      return item;
-    });
-
-    this.setData({
-      selectRegionList: selectRegionList
-    })
-
-
-    that.setData({
-      regionList: that.data.regionList.map(item => {
-
-        //标记已选择的
-        if (that.data.regionType == item.type && that.data.selectRegionList[that.data.regionType - 1].id == item.id) {
-          item.selected = true;
-        } else {
-          item.selected = false;
-        }
-
-        return item;
-      })
-    });
-
-    this.setRegionDoneStatus();
-
-  },
-  doneSelectRegion() {
-    if (this.data.selectRegionDone === false) {
-      return false;
-    }
-
-    let address = this.data.address;
-    let selectRegionList = this.data.selectRegionList;
-    address.province_id = selectRegionList[0].id;
-    address.city_id = selectRegionList[1].id;
-    address.district_id = selectRegionList[2].id;
-    address.province_name = selectRegionList[0].name;
-    address.city_name = selectRegionList[1].name;
-    address.district_name = selectRegionList[2].name;
-    address.full_region = selectRegionList.map(item => {
-      return item.name;
-    }).join('');
-
-    this.setData({
-      address: address,
-      openSelectRegion: false
-    });
-
-  },
-  cancelSelectRegion() {
-    this.setData({
-      openSelectRegion: false,
-      regionType: this.data.regionDoneStatus ? 3 : 1
-    });
-
-  },
-  getRegionList(regionId) {
-    let that = this;
-    let regionType = that.data.regionType;
-    util.request(api.RegionList, { parentId: regionId }).then(function (res) {
-      if (res.errno === 0) {
-        that.setData({
-          regionList: res.data.map(item => {
-
-            //标记已选择的
-            if (regionType == item.type && that.data.selectRegionList[regionType - 1].id == item.id) {
-              item.selected = true;
-            } else {
-              item.selected = false;
-            }
-
-            return item;
-          })
-        });
-      }
-    });
-  },
-  cancelAddress(){
-    wx.reLaunch({
-      url: '/pages/shopping/address/address',
-    })
-  },
-  saveAddress(){
-    console.log(this.data.address)
-    let address = this.data.address;
-
-    if (address.name == '') {
-      util.showErrorToast('请输入姓名');
-
-      return false;
-    }
-
-    if (address.mobile == '') {
-      util.showErrorToast('请输入手机号码');
-      return false;
-    }
-
-
-    if (address.district_id == 0) {
-      util.showErrorToast('请输入省市区');
-      return false;
-    }
-
-    if (address.address == '') {
-      util.showErrorToast('请输入详细地址');
-      return false;
-    }
-
-
-    let that = this;
-    util.request(api.AddressSave, { 
-      id: address.id,
-      name: address.name,
-      mobile: address.mobile,
-      province_id: address.province_id,
-      city_id: address.city_id,
-      district_id: address.district_id,
-      address: address.address,
-      is_default: address.is_default,
-    }, 'POST').then(function (res) {
-      if (res.errno === 0) {
-        wx.reLaunch({
-          url: '/pages/shopping/address/address',
-        })
-      }
-    });
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  }
-})

+ 0 - 3
wx-front/pages/shopping/addressAdd/addressAdd.json

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

+ 0 - 39
wx-front/pages/shopping/addressAdd/addressAdd.wxml

@@ -1,39 +0,0 @@
-<view class="add-address">
-    <view class="add-form">
-        <view class="form-item">
-            <input class="input" bindinput="bindinputName" placeholder="姓名" value="{{address.name}}" auto-focus/>
-        </view>
-        <view class="form-item">
-            <input class="input" bindinput="bindinputMobile" value="{{address.mobile}}" placeholder="手机号码"/>
-        </view>
-        <view class="form-item">
-            <input class="input" value="{{address.full_region}}" disabled="true" bindtap="chooseRegion" placeholder="省份、城市、区县"/>
-        </view>
-        <view class="form-item">
-            <input class="input" bindinput="bindinputAddress" value="{{address.address}}" placeholder="详细地址, 如街道、楼盘号等"/>
-        </view>
-        <view class="form-default">
-            <text bindtap="bindIsDefault" class="default-input {{address.is_default == 1 ? 'selected' : ''}}">设为默认地址</text>
-        </view>
-    </view>
-
-    <view class="btns">
-        <button class="cannel" bindtap="cancelAddress">取消</button>
-        <button class="save" bindtap="saveAddress">保存</button>
-    </view>
-
-    <view class="region-select" wx:if="{{openSelectRegion}}">
-      <view class="hd">
-        <view class="region-selected">
-          <view class="item {{item.id == 0 ? 'disabled' : ''}} {{(regionType -1) === index ? 'selected' : ''}}" bindtap="selectRegionType" data-region-type-index="{{index}}" wx:for="{{selectRegionList}}" wx:key="{{item.id}}">{{item.name}}</view>
-        </view>
-        <view class="done {{selectRegionDone ? '' : 'disabled'}}" bindtap="doneSelectRegion">确定</view>
-      </view>
-      <view class="bd">
-        <view class="region-list">
-          <view class="item {{item.selected ? 'selected' : ''}}" bindtap="selectRegion" data-region-index="{{index}}" wx:for="{{regionList}}" wx:key="{{item.id}}">{{item.name}}</view>
-        </view>
-      </view>
-    </view>
-</view>
-<view class="bg-mask" bindtap="cancelSelectRegion" wx:if="{{openSelectRegion}}"></view>

+ 0 - 179
wx-front/pages/shopping/addressAdd/addressAdd.wxss

@@ -1,179 +0,0 @@
-page{
-    height: 100%;
-    background: #f4f4f4;
-}
-.add-address .add-form{
-    background: #fff;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-}
-
-.add-address .form-item{
-    height: 116rpx;
-    padding-left: 31.25rpx;
-    border-bottom: 1px solid #d9d9d9;
-    display: flex;
-    align-items: center;
-    padding-right: 31.25rpx;
-}
-
-.add-address .input{
-    flex: 1;
-    height: 44rpx;
-    line-height: 44rpx;
-    overflow: hidden;
-}
-
-.add-address .form-default{
-    border-bottom: 1px solid #d9d9d9;
-    height: 96rpx;
-    background: #fafafa;
-    padding-top: 28rpx;
-    font-size: 28rpx;
-}
-
-.default-input{
-    margin: 0 auto;
-    display: block;
-    width: 240rpx;
-    height: 40rpx;
-    padding-left: 50rpx;
-    line-height: 40rpx;
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 1rpx -448rpx no-repeat;
-    background-size: 38rpx 486rpx;
-    font-size: 28rpx;
-}
-
-.default-input.selected{
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/sprites/checkbox-sed825af9d3-a6b8540d42.png) 0 -192rpx no-repeat;
-    background-size: 38rpx 486rpx;
-}
-
-.add-address .btns{
-    position: fixed;
-    bottom: 0;
-    left: 0;
-    overflow: hidden;
-    display: flex;
-    height: 100rpx;
-    width: 100%;
-}
-
-.add-address .cannel,.add-address .save{
-    flex: 1;
-    height: 100rpx;
-    text-align: center;
-    line-height: 100rpx;
-    font-size: 28rpx;
-    color: #fff;
-    border:none;
-    border-radius: 0;
-}
-
-.add-address .cannel{
-    background: #333;
-}
-
-.add-address .save{
-    background: #b4282d;
-}
-
-
-.region-select{
-  width: 100%;
-  height: 600rpx;
-  background: #fff;
-  position: fixed;
-  z-index: 10;
-  left:0;
-  bottom: 0;
-}
-
-.region-select .hd{
-  height: 108rpx;
-  width: 100%;
-  border-bottom: 1px solid #f4f4f4;
-  padding: 46rpx 30rpx 0 30rpx;
-}
-
-.region-select .region-selected{
-  float: left;
-  height: 60rpx;
-  display: flex;
-}
-
-.region-select .region-selected .item{
-  max-width: 140rpx;
-  margin-right: 30rpx;
-  text-align: left;
-  line-height: 60rpx;
-  height: 100%;
-  color: #333;
-  font-size: 28rpx;
-  overflow: hidden;
-      text-overflow: ellipsis;
-    white-space: nowrap;
-}
-
-.region-select .region-selected .item.disabled{
-  color: #999;
-}
-
-.region-select .region-selected .item.selected{
-  color: #b4282d;
-}
-
-.region-select .done{
-  float: right;
-  height: 60rpx;
-  width: 60rpx;
-  border: none;
-  background: #fff;
-  line-height: 60rpx;
-  text-align: center;
-  color: #333;
-  font-size: 28rpx;
-}
-
-.region-select .done.disabled{
-  color: #999;
-}
-
-
-
-.region-select .bd{
-  height: 492rpx;
-  width: 100%;
-  padding: 0 30rpx;
-}
-
-.region-select .region-list{
-  height: auto;
-  overflow: scroll;
-
-}
-
-.region-select .region-list .item{
-  width: 100%;
-  height: 104rpx;
-  line-height: 104rpx;
-  text-align: left;
-  color: #333;
-  font-size: 28rpx;
-}
-
-.region-select .region-list .item.selected{
-  color: #b4282d;
-}
-
-
-.bg-mask{
-  height: 100%;
-  width: 100%;
-  background: rgba(0, 0, 0, 0.4);
-  position: fixed;
-  top:0;
-  left:0;
-  z-index: 8;
-}

+ 0 - 117
wx-front/pages/shopping/checkout/checkout.js

@@ -1,117 +0,0 @@
-var util = require('../../../utils/util.js');
-var api = require('../../../config/api.js');
-const pay = require('../../../services/pay.js');
-
-var app = getApp();
-
-Page({
-  data: {
-    checkedGoodsList: [],
-    checkedAddress: {},
-    checkedCoupon: [],
-    couponList: [],
-    goodsTotalPrice: 0.00, //商品总价
-    freightPrice: 0.00,    //快递费
-    couponPrice: 0.00,     //优惠券的价格
-    orderTotalPrice: 0.00,  //订单总价
-    actualPrice: 0.00,     //实际需要支付的总价
-    addressId: 0,
-    couponId: 0
-  },
-  onLoad: function (options) {
-
-    // 页面初始化 options为页面跳转所带来的参数
-
-    try {
-      var addressId = wx.getStorageSync('addressId');
-      if (addressId) {
-        this.setData({
-          'addressId': addressId
-        });
-      }
-
-      var couponId = wx.getStorageSync('couponId');
-      if (couponId) {
-        this.setData({
-          'couponId': couponId
-        });
-      }
-    } catch (e) {
-      // Do something when catch error
-    }
-
-
-  },
-  getCheckoutInfo: function () {
-    let that = this;
-    util.request(api.CartCheckout, { addressId: that.data.addressId, couponId: that.data.couponId }).then(function (res) {
-      if (res.errno === 0) {
-        console.log(res.data);
-        that.setData({
-          checkedGoodsList: res.data.checkedGoodsList,
-          checkedAddress: res.data.checkedAddress,
-          actualPrice: res.data.actualPrice,
-          checkedCoupon: res.data.checkedCoupon,
-          couponList: res.data.couponList,
-          couponPrice: res.data.couponPrice,
-          freightPrice: res.data.freightPrice,
-          goodsTotalPrice: res.data.goodsTotalPrice,
-          orderTotalPrice: res.data.orderTotalPrice
-        });
-      }
-      wx.hideLoading();
-    });
-  },
-  selectAddress() {
-    wx.navigateTo({
-      url: '/pages/shopping/address/address',
-    })
-  },
-  addAddress() {
-    wx.navigateTo({
-      url: '/pages/shopping/addressAdd/addressAdd',
-    })
-  },
-  onReady: function () {
-    // 页面渲染完成
-
-  },
-  onShow: function () {
-    // 页面显示
-    wx.showLoading({
-      title: '加载中...',
-    })
-    this.getCheckoutInfo();
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  submitOrder: function () {
-    if (this.data.addressId <= 0) {
-      util.showErrorToast('请选择收货地址');
-      return false;
-    }
-    util.request(api.OrderSubmit, { addressId: this.data.addressId, couponId: this.data.couponId }, 'POST').then(res => {
-      if (res.errno === 0) {
-        const orderId = res.data.orderInfo.id;
-        pay.payOrder(parseInt(orderId)).then(res => {
-          wx.redirectTo({
-            url: '/pages/payResult/payResult?status=1&orderId=' + orderId
-          });
-        }).catch(res => {
-          wx.redirectTo({
-            url: '/pages/payResult/payResult?status=0&orderId=' + orderId
-          });
-        });
-      } else {
-        util.showErrorToast('下单失败');
-      }
-    });
-  }
-})

+ 0 - 3
wx-front/pages/shopping/checkout/checkout.json

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

+ 0 - 85
wx-front/pages/shopping/checkout/checkout.wxml

@@ -1,85 +0,0 @@
-<view class="container">
-    <view class="address-box">
-        <view class="address-item" bindtap="selectAddress" wx:if="{{checkedAddress.id > 0}}">
-            <view class="l">
-                <text class="name">{{checkedAddress.name}}</text>
-                <text class="default" wx:if="{{checkedAddress.is_default === 1}}">默认</text>
-            </view>
-            <view class="m">
-                <text class="mobile">{{checkedAddress.mobile}}</text>
-                <text class="address">{{checkedAddress.full_region + checkedAddress.address}}</text>
-            </view>
-            <view class="r">
-                <image src="/static/images/address_right.png"></image>
-            </view>
-        </view>
-        <view class="address-item address-empty" bindtap="addAddress" wx:if="{{checkedAddress.id <= 0}}">
-            <view class="m">
-               还没有收货地址,去添加
-            </view>
-            <view class="r">
-                <image src="/static/images/address_right.png"></image>
-            </view>
-        </view>
-    </view>
-
-    <view class="coupon-box">
-        <view class="coupon-item">
-            <view class="l">
-                <text class="name">请选择优惠券</text>
-                <text class="txt">{{couponList.length}}张</text>
-            </view>
-            <view class="r">
-                <image src="/static/images/address_right.png"></image>
-            </view>
-        </view>
-    </view>
-
-    <view class="order-box">
-        <view class="order-item">
-            <view class="l">
-                <text class="name">商品合计</text>
-            </view>
-            <view class="r">
-                <text class="txt">¥{{goodsTotalPrice}}</text>
-            </view>
-        </view>
-        <view class="order-item">
-            <view class="l">
-                <text class="name">运费</text>
-            </view>
-            <view class="r">
-                <text class="txt">¥{{freightPrice}}</text>
-            </view>
-        </view>
-        <view class="order-item no-border">
-            <view class="l">
-                <text class="name">优惠券</text>
-            </view>
-            <view class="r">
-                <text class="txt">-¥{{couponPrice}}</text>
-            </view>
-        </view>
-    </view>
-
-    <view class="goods-items">
-        <view class="item" wx:for="{{checkedGoodsList}}" wx:key="{{item.id}}">
-            <view class="img">
-                <image src="{{item.list_pic_url}}"></image>
-            </view>
-            <view class="info">
-                <view class="t">
-                    <text class="name">{{item.goods_name}}</text>
-                    <text class="number">x{{item.number}}</text>
-                </view>
-                <view class="m">{{item.goods_specifition_name_value}}</view>
-                <view class="b">¥{{item.retail_price}}</view>
-            </view>
-        </view>
-    </view>
-
-    <view class="order-total">
-        <view class="l">实付:¥{{actualPrice}}</view>
-        <view class="r" bindtap="submitOrder">去付款</view>
-    </view>
-</view>

+ 0 - 295
wx-front/pages/shopping/checkout/checkout.wxss

@@ -1,295 +0,0 @@
-page{
-    height: 100%;
-    background: #f4f4f4;
-}
-
-.address-box{
-    width: 100%;
-    height: 166.55rpx;
-    background: url('http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/address-bg-bd30f2bfeb.png') 0 0 repeat-x;
-    background-size: 62.5rpx 10.5rpx;
-    margin-bottom: 20rpx;
-    padding-top: 10.5rpx;
-}
-
-.address-item{
-    display: flex;
-    height: 155.55rpx;
-    background: #fff;
-    padding: 41.6rpx 0 41.6rpx 31.25rpx;
-}
-
-.address-item.address-empty{
-  line-height: 75rpx;
-  text-align: center;
-}
-
-.address-box .l{
-    width: 125rpx;
-    height: 100%;
-}
-
-.address-box .l .name{
-    margin-left: 6.25rpx;
-    margin-top: -7.25rpx;
-    display: block;
-    width: 125rpx;
-    height: 43rpx;
-    line-height: 43rpx;
-    font-size: 30rpx;
-    color: #333;
-    margin-bottom: 5rpx;
-
-}
-
-.address-box .l .default{
-    margin-left: 6.25rpx;
-    display: block;
-    width: 62rpx;
-    height: 33rpx;
-    border-radius: 5rpx;
-    border: 1px solid #b4282d;
-    font-size: 20.5rpx;
-    text-align: center;
-    line-height: 29rpx;
-    color: #b4282d;
-}
-
-.address-box .m{
-    flex: 1;
-    height: 72.25rpx;
-    color: #999;
-}
-
-.address-box .mobile{
-    display: block;
-    height: 29rpx;
-    line-height: 29rpx;
-    margin-bottom: 6.25rpx;
-    font-size: 30rpx;
-    color:#333;
-}
-
-.address-box .address{
-    display: block;
-    height: 37.5rpx;
-    line-height: 37.5rpx;
-    font-size: 25rpx;
-    color:#666;
-}
-
-.address-box .r{
-    width: 77rpx;
-    height: 77rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
-.address-box .r image{
-    width: 52.078rpx;
-    height: 52.078rpx;
-}
-
-.coupon-box{
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    background: #fff;
-}
-
-.coupon-box .coupon-item{
-    width: 100%;
-    height: 108.3rpx;
-    overflow: hidden;
-    background: #fff;
-    display: flex;
-    padding-left: 31.25rpx;
-}
-
-.coupon-box .l{
-    flex: 1;
-    height: 43rpx;
-    line-height: 43rpx;
-    padding-top: 35rpx;
-}
-
-.coupon-box .l .name{
-    float: left;
-    font-size: 30rpx;
-    color: #666;
-}
-
-.coupon-box .l .txt{
-    float: right;
-    font-size: 30rpx;
-    color: #666;
-}
-
-.coupon-box .r{
-    margin-top: 15.5rpx;
-    width: 77rpx;
-    height: 77rpx;
-    display: flex;
-    justify-content: center;
-    align-items: center;
-}
-
-.coupon-box .r image{
-    width: 52.078rpx;
-    height: 52.078rpx;
-}
-
-.order-box{
-    margin-top: 20rpx;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    background: #fff;
-}
-
-.order-box .order-item{
-    height: 104.3rpx;
-    overflow: hidden;
-    background: #fff;
-    display: flex;
-    margin-left: 31.25rpx;
-    padding-right: 31.25rpx;
-    padding-top: 26rpx;
-    border-bottom: 1px solid #d9d9d9;
-}
-
-.order-box .order-item .l{
-    float: left;
-    height: 52rpx;
-    width: 50%;
-    line-height: 52rpx;
-    overflow: hidden;
-}
-
-.order-box .order-item .r{
-    float: right;
-    text-align: right;
-    width: 50%;
-    height: 52rpx;
-    line-height: 52rpx;
-    overflow: hidden;
-}
-
-.order-box .order-item.no-border{
-    border-bottom: none;
-}
-
-.goods-items{
-    margin-top: 20rpx;
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    background: #fff;
-    padding-left: 31.25rpx;
-    margin-bottom: 120rpx;
-}
-
-.goods-items .item{
-    height: 192rpx;
-    padding-right: 31.25rpx;
-    display: flex;
-    align-items: center;
-    border-bottom: 1px solid rgba(0,0,0,0.15);
-}
-
-.goods-items .item.no-border{
-    border-bottom: none;
-}
-
-
-.goods-items .item:last-child{
-    border-bottom: none;
-}
-
-.goods-items .img{
-    height: 145.83rpx;
-    width: 145.83rpx;
-    background-color: #f4f4f4;
-    margin-right: 20rpx;
-}
-
-.goods-items .img image{
-    height: 145.83rpx;
-    width: 145.83rpx;
-}
-
-.goods-items .info{
-    flex: 1;
-    height: 145.83rpx;
-    padding-top: 5rpx;
-}
-
-.goods-items .t{
-    height:  33rpx;
-    line-height: 33rpx;
-    margin-bottom: 10rpx;
-    overflow: hidden;
-    font-size: 30rpx;
-    color: #333;
-}
-
-.goods-items .t .name{
-    display: block;
-    float: left;
-}
-
-.goods-items .t .number{
-    display: block;
-    float: right;
-    text-align: right;
-}
-
-.goods-items .m {
-    height:  29rpx;
-    overflow: hidden;
-    line-height: 29rpx;
-    margin-bottom: 25rpx;
-    font-size: 25rpx;
-    color: #666;
-}
-
-.goods-items .b {
-    height:  41rpx;
-    overflow: hidden;
-    line-height: 41rpx;
-    font-size: 30rpx;
-    color: #333;
-}
-
-.order-total{
-    position: fixed;
-    left:0;
-    bottom: 0;
-    height: 100rpx;
-    width: 100%;
-    display: flex;
-}
-
-.order-total .l{
-    flex: 1;
-    height: 100rpx;
-    line-height: 100rpx;
-    color: #b4282d;
-    background: #fff;
-    font-size: 33rpx;
-    padding-left: 31.25rpx;
-    border-top: 1rpx solid rgba(0,0,0,0.2);
-    border-bottom: 1rpx solid rgba(0,0,0,0.2);
-}
-
-.order-total .r{
-    width: 233rpx;
-    height: 100rpx;
-    background: #b4282d;
-    border: 1px solid #b4282d;
-    line-height: 100rpx;
-    text-align: center;
-    color: #fff;
-    font-size: 30rpx;
-}

+ 0 - 86
wx-front/pages/topic/topic.js

@@ -1,86 +0,0 @@
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-var app = getApp()
-Page({
-    data: {
-        // text:"这是一个页面"
-        topicList: [],
-        page: 1,
-        size: 10,
-        count: 0,
-        scrollTop: 0,
-        showPage: false
-    },
-    onLoad: function (options) {
-        // 页面初始化 options为页面跳转所带来的参数
-        this.getTopic();
-
-    },
-    onReady: function () {
-        // 页面渲染完成
-    },
-    onShow: function () {
-        // 页面显示
-    },
-    onHide: function () {
-        // 页面隐藏
-    },
-    onUnload: function () {
-        // 页面关闭
-    },
-    nextPage: function (event) {
-      console.log();
-        var that = this;
-        if (this.data.page+1 > that.data.count / that.data.size) {
-            return true;
-        }
-
-        
-        that.setData({
-            "page": parseInt(that.data.page) + 1
-        });
-
-        this.getTopic();
-        
-    },
-    getTopic: function(){
-       
-        let that = this;
-         that.setData({
-            scrollTop: 0,
-            showPage: false,
-            topicList: []
-        });
-        // 页面渲染完成
-        wx.showToast({
-            title: '加载中...',
-            icon: 'loading',
-            duration: 2000
-        });
-
-        util.request(api.TopicList, { page: that.data.page, size: that.data.size }).then(function (res) {
-          if (res.errno === 0) {
-
-            that.setData({
-              scrollTop: 0,
-              topicList: res.data.data,
-              showPage: true,
-              count: res.data.count
-            });
-          }
-          wx.hideToast();
-        });
-        
-    },
-    prevPage: function (event) {
-        if (this.data.page <= 1) {
-            return false;
-        }
-
-        var that = this;
-        that.setData({
-            "page": parseInt(that.data.page) - 1
-        });
-        this.getTopic();
-    }
-})

+ 0 - 1
wx-front/pages/topic/topic.json

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

+ 0 - 16
wx-front/pages/topic/topic.wxml

@@ -1,16 +0,0 @@
-<view class="container">
-    <scroll-view class="topic-list" scroll-y="true" scroll-top="{{scrollTop}}">
-        <navigator class="item" wx:for="{{topicList}}" wx:key="{{item.id}}" url="../topicDetail/topicDetail?id={{item.id}}">
-            <image class="img" src="{{item.scene_pic_url}}"></image>
-            <view class="info">
-                <text class="title">{{item.title}}</text>
-                <text class="desc">{{item.subtitle}}</text>
-                <text class="price">{{item.price_info}}元起</text>
-            </view>
-        </navigator>
-        <view class="page" wx:if="{{showPage}}">
-            <view class="prev {{ page <= 1 ? 'disabled' : ''}}" bindtap="prevPage">上一页</view>
-            <view class="next {{ (count / size) < page +1 ? 'disabled' : ''}}" bindtap="nextPage">下一页</view>
-        </view>
-    </scroll-view>
-</view>

+ 0 - 94
wx-front/pages/topic/topic.wxss

@@ -1,94 +0,0 @@
-page ,.container{
-   width: 750rpx;
-    height: 100%;
-    overflow: hidden;
-    background: #f4f4f4;
-}
-.topic-list{
-    width: 750rpx;
-    height: 100%;
-    overflow: hidden;
-    background: #f4f4f4;
-}
-
-.topic-list .item{
-    width: 100%;
-    height: 625rpx;
-    overflow: hidden;
-    background: #fff;
-    margin-bottom: 20rpx;
-}
-
-.topic-list .img{
-    width: 100%;
-    height: 415rpx;
-}
-
-.topic-list .info{
-    width: 100%;
-    height: 210rpx;
-    overflow: hidden;
-}
-
-.topic-list .title{
-    display: block;
-    text-align: center;
-    width: 100%;
-    height: 33rpx;
-    line-height: 35rpx;
-    color: #333;
-    overflow: hidden;
-    font-size: 35rpx;
-    margin-top: 30rpx;
-}
-
-.topic-list .desc{
-    display: block;
-    text-align: center;
-    position: relative;
-    width: auto;
-    height: 24rpx;
-    line-height: 24rpx;
-    overflow: hidden;
-    color: #999;
-    font-size: 24rpx;
-    margin-top: 16rpx;
-    margin-bottom: 30rpx;
-}
-
-.topic-list .price{
-    display: block;
-    text-align: center;
-    width: 100%;
-    height: 27rpx;
-    line-height: 27rpx;
-    overflow: hidden;
-    color: #b4282d;
-    font-size: 27rpx;
-}
-
-
-.page{
-    width: 750rpx;
-    height: 108rpx;
-    background: #fff;
-    margin-bottom: 20rpx;
-}
-
-.page view{
-    height: 108rpx;
-    width: 50%;
-    float: left;
-    font-size: 29rpx;
-    color: #333;
-    text-align: center;
-    line-height: 108rpx;
-}
-
-.page .prev{
-    border-right: 1px solid #D9D9D9;
-}
-
-.page .disabled{
-    color: #ccc;
-}

+ 0 - 116
wx-front/pages/topicComment/topicComment.js

@@ -1,116 +0,0 @@
-var app = getApp();
-var util = require('../../utils/util.js');
-
-var api = require('../../config/api.js');
-
-Page({
-  data: {
-    comments: [],
-    allCommentList: [],
-    picCommentList: [],
-    typeId: 0,
-    valueId: 0,
-    showType: 0,
-    allCount: 0,
-    hasPicCount: 0,
-    allPage: 1,
-    picPage: 1,
-    size: 20
-  },
-  getCommentCount: function () {
-    let that = this;
-    util.request(api.CommentCount, { valueId: that.data.valueId, typeId: that.data.typeId}).then(function (res) {
-      if (res.errno === 0) {
-
-        that.setData({
-          allCount: res.data.allCount,
-          hasPicCount: res.data.hasPicCount
-        });
-      }
-    });
-  },
-  getCommentList: function(){
-    let that = this;
-    util.request(api.CommentList, { 
-      valueId: that.data.valueId, 
-      typeId: that.data.typeId, 
-      size: that.data.size,
-      page: (that.data.showType == 0 ? that.data.allPage : that.data.picPage),
-      showType: that.data.showType 
-      }).then(function (res) {
-      if (res.errno === 0) {
-
-        if (that.data.showType == 0) {
-          that.setData({
-            allCommentList: that.data.allCommentList.concat(res.data.data),
-            allPage: res.data.currentPage,
-            comments: that.data.allCommentList.concat(res.data.data)
-          });
-        } else {
-          that.setData({
-            picCommentList: that.data.picCommentList.concat(res.data.data),
-            picPage: res.data.currentPage,
-            comments: that.data.picCommentList.concat(res.data.data)
-          });
-        }
-      }
-    });
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    this.setData({
-      typeId: options.typeId,
-      valueId: options.valueId
-    });
-    this.getCommentCount();
-    this.getCommentList();
-  },
-  onReady: function () {
-    // 页面渲染完成
-
-  },
-  onShow: function () {
-    // 页面显示
-
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  },
-  switchTab: function () {
-    this.setData({
-      showType: this.data.showType == 1 ? 0 :1
-    });
-
-    this.getCommentList();
-  },
-  onReachBottom: function(){
-    console.log('onPullDownRefresh');
-    if ( this.data.showType == 0) {
-
-      if (this.data.allCount / this.data.size < this.data.allPage) {
-        return false;
-      }
-
-      this.setData({
-        'allPage' : this.data.allPage + 1
-      });
-    } else {
-      if (this.data.hasPicCount / this.data.size < this.data.picPage) {
-        return false;
-      }
-
-      this.setData({
-        'picPage': this.data.picPage + 1
-      });
-    }
-
-
-
-    this.getCommentList();
-  }
-})

+ 0 - 3
wx-front/pages/topicComment/topicComment.json

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

+ 0 - 22
wx-front/pages/topicComment/topicComment.wxml

@@ -1,22 +0,0 @@
-<view class="comments">
-  <view class="b">
-    <view class="item" wx:for="{{comments}}" wx:key="{{item.id}}">
-      <view class="info">
-        <view class="user">
-          <image src="{{item.user_info.avatar}}"></image>
-          <text>{{item.user_info.nickname}}</text>
-        </view>
-        <view class="time">{{item.add_time}}</view>
-      </view>
-      <view class="comment">{{item.content}}</view>
-      <view class="imgs" wx:if="{{item.pic_list.length > 0}}">
-        <image class="img" wx:for="{{item.pic_list}}" wx:key="{{pitem.id}}" wx:for-item="pitem" src="{{pitem.pic_url}}"></image>
-      </view>
-      <!--<view class="customer-service" wx:if="{{item.commentReplyVO}}">
-        <text class="u">小选回复:</text>
-        <text class="c">{{item.commentReplyVO.replyContent}}</text>
-      </view>-->
-    </view>
-
-  </view>
-</view>

+ 0 - 108
wx-front/pages/topicComment/topicComment.wxss

@@ -1,108 +0,0 @@
-.comments{
-    width: 100%;
-    height: auto;
-    padding-left:30rpx;
-    background: #fff;
-    margin: 20rpx 0;
-}
-
-.comments .b{
-    height: auto;
-    width: 720rpx;
-}
-
-.comments .b.no-h{
-    margin-top: 0;
-}
-
-.comments .item{
-    height: auto;
-    width: 720rpx;
-    overflow: hidden;
-    border-bottom: 1px solid #d9d9d9;
-    padding-bottom: 25rpx;
-}
-
-.comments .info{
-    height: 127rpx;
-    width: 100%;
-    padding: 33rpx 0 27rpx 0;
-}
-
-.comments .user{
-    float: left;
-    width: auto;
-    height: 67rpx;
-    line-height: 67rpx;
-    font-size: 0;
-}
-
-.comments .user image{
-    float: left;
-    width: 67rpx;
-    height: 67rpx;
-    margin-right: 17rpx;
-    border-radius: 50%;
-}
-
-.comments .user text{
-    display: inline-block;
-    width: auto;
-    height: 66rpx;
-    overflow: hidden;
-    font-size: 29rpx;
-    line-height: 66rpx;
-}
-
-.comments .time{
-    display: block;
-    float: right;
-    width: auto;
-    height: 67rpx;
-    line-height: 67rpx;
-    color: #7f7f7f;
-    font-size: 25rpx;
-    margin-right: 30rpx;
-}
-
-.comments .comment{
-    width: 720rpx;
-    padding-right: 30rpx;
-    line-height: 45.8rpx;
-    font-size: 29rpx;
-    margin-bottom: 16rpx;
-}
-
-.comments .imgs{
-    width: 720rpx;
-    height: 150rpx;
-    margin-bottom: 25rpx;
-}
-
-.comments .imgs .img{
-    height: 150rpx;
-    width: 150rpx;
-    margin-right: 28rpx;
-}
-
-.comments .customer-service{
-    width: 690rpx;
-    height: auto;
-    overflow: hidden;
-    margin-top: 23rpx;
-    background: rgba(0,0,0,.03);
-    padding: 21rpx;
-}
-
-
-.comments .customer-service .u{
-    font-size: 24rpx;
-    color: #333;
-    line-height: 37.5rpx;
-}
-
-.comments .customer-service .c{
-    font-size: 24rpx;
-    color: #999;
-    line-height: 37.5rpx;
-}

+ 0 - 73
wx-front/pages/topicDetail/topicDetail.js

@@ -1,73 +0,0 @@
-var app = getApp();
-var WxParse = require('../../lib/wxParse/wxParse.js');
-var util = require('../../utils/util.js');
-var api = require('../../config/api.js');
-
-Page({
-  data: {
-    id: 0,
-    topic: {},
-    topicList: [],
-    commentCount: 0,
-    commentList: []
-  },
-  onLoad: function (options) {
-    // 页面初始化 options为页面跳转所带来的参数
-    var that = this;
-    that.setData({
-      id: parseInt(options.id)
-    });
-
-    util.request(api.TopicDetail, { id: that.data.id}).then(function (res) {
-      if (res.errno === 0) {
-
-        that.setData({
-          topic: res.data,
-        });
-
-        WxParse.wxParse('topicDetail', 'html', res.data.content, that);
-      }
-    });
-
-    util.request(api.TopicRelated, { id: that.data.id}).then(function (res) {
-      if (res.errno === 0) {
-
-        that.setData({
-          topicList: res.data
-        });
-      }
-    });
-  },
-  getCommentList(){
-    let that = this;
-    util.request(api.CommentList, { valueId: that.data.id, typeId: 1, size: 5 }).then(function (res) {
-      if (res.errno === 0) {
-
-        that.setData({
-          commentList: res.data.data,
-          commentCount: res.data.count
-        });
-      }
-    });
-  },
-  postComment (){
-    wx.navigateTo({
-      url: '/pages/commentPost/commentPost?valueId='+this.data.id + '&typeId=1',
-    })
-  },
-  onReady: function () {
-
-  },
-  onShow: function () {
-    // 页面显示
-    this.getCommentList();
-  },
-  onHide: function () {
-    // 页面隐藏
-
-  },
-  onUnload: function () {
-    // 页面关闭
-
-  }
-})

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác