Kaynağa Gözat

消息功能页面

nnkwrik 6 yıl önce
ebeveyn
işleme
9a1a79e7dd

+ 4 - 3
wx-front/app.json

@@ -23,7 +23,6 @@
     "pages/brandDetail/brandDetail",
     "pages/search/search",
     "pages/category/category",
-    "pages/cart/cart",
     "pages/shopping/checkout/checkout",
     "pages/shopping/address/address",
     "pages/shopping/addressAdd/addressAdd",
@@ -38,7 +37,9 @@
     "pages/ucenter/sold/sold",
     "pages/ucenter/posted/posted",
     "pages/ucenter/about/about",
-    "pages/user/user"
+    "pages/user/user",
+    "pages/chat/chatIndex/chatIndex",
+    "pages/chat/chatForm/chatForm"
   ],
   "window": {
     "backgroundTextStyle": "dark",
@@ -72,7 +73,7 @@
         "text": "发布"
       },
       {
-        "pagePath": "pages/cart/cart",
+        "pagePath": "pages/chat/chatIndex/chatIndex",
         "iconPath": "static/images/ic_menu_chat_nor.png",
         "selectedIconPath": "static/images/ic_menu_chat_pressed.png",
         "text": "消息"

+ 2 - 2
wx-front/app.wxss

@@ -2,7 +2,7 @@
 .container {
   box-sizing: border-box;
   background-color: #f4f4f4;
-  font-family: PingFangSC-Light,helvetica,'Heiti SC';
+  font-family: PingFangSC,helvetica,'Heiti SC';
 } 
 
 view,image,text,navigator{
@@ -13,7 +13,7 @@ view,image,text,navigator{
 }
 
 view,text{
-  font-family: PingFangSC-Light,helvetica,'Heiti SC';
+  font-family: PingFangSC,helvetica,'Heiti SC';
   font-size: 29rpx;
   color: #333;
 }

+ 0 - 79
wx-front/pages/cart/cart.wxml

@@ -1,79 +0,0 @@
-<view class="container">
-  <view class="service-policy">
-    <view class="item">30天无忧退货</view>
-    <view class="item">48小时快速退款</view>
-    <view class="item">满88元免邮费</view>
-  </view>
-  <view class="no-cart" wx:if="{{cartGoods.length <= 0}}">
-    <view class="c">
-      <image src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/noCart-a8fe3f12e5.png" />
-      <text>去添加点什么吧</text>
-    </view>
-  </view>
-  <view class="cart-view" wx:if="{{cartGoods.length > 0}}">
-    <view class="list">
-      <view class="group-item">
-        <view class="goods">
-          <view class="item {{isEditCart ? 'edit' : ''}}" wx:for="{{cartGoods}}" wx:key="{{item.id}}">
-            <view class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
-            <view class="cart-goods">
-              <image class="img" src="{{item.list_pic_url}}"></image>
-              <view class="info">
-                <view class="t">
-                  <text class="name">{{item.goods_name}}</text>
-                  <text class="num">x{{item.number}}</text>
-                </view>
-                <view class="attr">{{ isEditCart ? '已选择:' : ''}}{{item.goods_specifition_name_value}}</view>
-                <view class="b">
-                  <text class="price">¥{{item.retail_price}}</text>
-                  <view class="selnum">
-                    <view class="cut" bindtap="cutNumber" data-item-index="{{index}}">-</view>
-                    <input value="{{item.number}}" class="number" disabled="true" type="number" />
-                    <view class="add" bindtap="addNumber" data-item-index="{{index}}">+</view>
-                  </view>
-                </view>
-              </view>
-            </view>
-          </view>
-        </view>
-      </view>
-
-      <!--<view class="group-item">
-                <view class="header">
-                    <view class="promotion">
-                        <text class="tag">满赠</text>
-                        <text class="txt">再加26元, 3件赠1件蔓越莓干</text>
-                        <image class="icon" src="http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/go-b67cb9718d.png"></image>
-                    </view>
-                    <view class="get">领赠品</view>                
-                </view>
-                <view class="goods">
-                    <view class="item">
-                        <view class="checkbox" ></view>
-                        <view class="cart-goods">
-                            <image class="img" src="http://yanxuan.nosdn.127.net/04e05e9de3a471b1f6479dd137b459a8.png"></image>
-                            <view class="info">
-                                <view class="t">
-                                    <text class="name">秋冬保暖加厚细羊毛被</text>
-                                    <text class="num">x1</text>
-                                </view>
-                                <view class="attr">220*240cm</view>
-                                <view class="b">
-                                    <text class="price">¥199.99</text>
-                                    <view class="open">优惠活动</view>
-                                </view>
-                            </view>
-                        </view>
-                    </view>
-                </view>
-            </view>-->
-    </view>
-    <view class="cart-bottom">
-      <view class="checkbox {{checkedAllStatus ? 'checked' : ''}}" bindtap="checkedAll">全选({{cartTotal.checkedGoodsCount}})</view>
-      <view class="total">{{!isEditCart ? '¥'+cartTotal.checkedGoodsAmount : ''}}</view>
-      <view class="delete" bindtap="editCart">{{!isEditCart ? '编辑' : '完成'}}</view>
-      <view class="checkout" bindtap="deleteCart" wx:if="{{isEditCart}}">删除所选</view>
-      <view class="checkout" bindtap="checkoutOrder" wx:if="{{!isEditCart}}">下单</view>
-    </view>
-  </view>
-</view>

+ 0 - 352
wx-front/pages/cart/cart.wxss

@@ -1,352 +0,0 @@
-page{
-    height: 100%;
-    min-height: 100%;
-    background: #f4f4f4;
-}
-.container{
-    background: #f4f4f4;
-    width: 100%;
-    height: auto;
-    min-height: 100%;
-    overflow: hidden;
-}
-.service-policy{
-    width: 750rpx;
-    height: 73rpx;
-    background: #f4f4f4;
-    padding: 0 31.25rpx;
-    display: flex;
-    flex-flow: row nowrap;
-    align-items: center;
-    justify-content: space-between;
-}
-
-.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;
-}
-
-.no-cart{
-    width: 100%;
-    height: auto;
-    margin: 0 auto;
-}
-
-.no-cart .c{
-    width: 100%;
-    height: auto;
-    margin-top: 200rpx;
-}
-
-.no-cart .c image{
-    margin: 0 auto;
-    display: block;
-    text-align: center;
-    width: 258rpx;
-    height: 258rpx;
-}
-
-.no-cart .c text{
-    margin: 0 auto;
-    display: block;
-    width: 258rpx;
-    height: 29rpx;
-    line-height: 29rpx;
-    text-align: center;
-    font-size: 29rpx;
-    color: #999;
-}
-
-
-.cart-view{
-    width: 100%;
-    height: auto;
-    overflow: hidden;
-    
-}
-
-.cart-view .list{
-    height: auto;
-    width: 100%;
-    overflow: hidden;
-    margin-bottom: 120rpx;
-}
-
-.cart-view .group-item{
-    height: auto;
-    width: 100%;
-    background: #fff;
-    margin-bottom: 18rpx;
-}
-
-.cart-view .item{
-    height: 164rpx;
-    width: 100%;
-    overflow: hidden;
-}
-.cart-view .item .checkbox{
-    float: left;
-    height: 34rpx;
-    width: 34rpx;
-    margin: 65rpx 18rpx 65rpx 26rpx;
-    background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/checkbox-0e09baa37e.png) no-repeat;
-    background-size: 34rpx;
-}
-
-.cart-view .item .checkbox.checked{
-    background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/checkbox-checked-822e54472a.png) no-repeat;
-    background-size: 34rpx;
-}
-
-.cart-view .item .cart-goods{
-    float: left;
-    height: 164rpx;
-    width: 672rpx;
-    border-bottom: 1px solid #f4f4f4;
-}
-
-.cart-view .item .img{
-    float: left;
-    height:125rpx;
-    width: 125rpx;
-    background: #f4f4f4;
-    margin: 19.5rpx 18rpx 19.5rpx 0;
-}
-
-.cart-view .item .info{
-    float: left;
-    height:125rpx;
-    width: 503rpx;
-    margin: 19.5rpx 26rpx 19.5rpx 0;
-}
-
-.cart-view .item .t{
-    margin: 8rpx 0;
-    height: 28rpx;
-    font-size: 25rpx;
-    color: #333;
-    overflow: hidden;
-}
-
-
-.cart-view .item .name{
-    height: 28rpx;
-    max-width: 310rpx;
-    line-height: 28rpx;
-    font-size: 25rpx;
-    color: #333;
-    overflow: hidden;
-}
-
-.cart-view .item .num{
-    height: 28rpx;
-    line-height: 28rpx;
-    float: right;
-}
-
-.cart-view .item .attr{
-    margin-bottom: 17rpx;
-    height: 24rpx;
-    line-height: 24rpx;
-    font-size: 22rpx;
-    color: #666;
-    overflow: hidden;
-}
-
-.cart-view .item .b{
-    height: 28rpx;
-    line-height: 28rpx;
-    font-size: 25rpx;
-    color: #333;
-    overflow: hidden;
-}
-
-.cart-view .item .price{
-    float: left;
-}
-
-.cart-view .item .open{
-    height: 28rpx;
-    width: 150rpx;
-    display: block;
-    float: right;
-    background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/arrowDown-d48093db25.png) right center no-repeat;
-    background-size: 25rpx;
-    font-size: 25rpx;
-    color: #333;
-}
-
-.cart-view .item.edit .t{
-    display: none;
-}
-
-.cart-view .item.edit .attr{
-    text-align: right;
-    background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/arrow-right1-e9828c5b35.png) right center no-repeat;
-    padding-right: 25rpx;
-    background-size: 12rpx 20rpx;
-    margin-bottom: 24rpx;
-    height: 39rpx;
-    line-height: 39rpx;
-    font-size: 24rpx;
-    color: #999;
-    overflow: hidden;
-}
-
-.cart-view .item.edit .b{
-    display: flex;
-    height: 52rpx;
-    overflow: hidden;
-}
-
-.cart-view .item.edit .price{
-    line-height: 52rpx;
-    height: 52rpx;
-    flex: 1;
-}
-
-.cart-view .item .selnum{
-    display: none;
-}
-
-.cart-view .item.edit .selnum{
-    width: 235rpx;
-    height: 52rpx;
-    border: 1rpx solid #ccc;
-    display: flex;
-}
-
-.selnum .cut{
-    width: 70rpx;
-    height: 100%;
-    text-align: center;
-    line-height: 50rpx;
-}
-
-.selnum .number{
-    flex: 1;
-    height: 100%;
-    text-align: center;
-    line-height: 68.75rpx;
-    border-left: 1px solid #ccc;
-    border-right: 1px solid #ccc;
-    float: left;
-}
-
-.selnum .add{
-    width: 80rpx;
-    height: 100%;
-    text-align: center;
-    line-height: 50rpx;
-}
-
-
-.cart-view .group-item .header{
-    width: 100%;
-    height: 94rpx;
-    line-height: 94rpx;
-    padding: 0 26rpx;
-    border-bottom: 1px solid #f4f4f4;
-}
-
-.cart-view .promotion .icon{
-    display: inline-block;
-    height: 24rpx;
-    width: 15rpx;
-}
-
-.cart-view .promotion{
-    margin-top: 25.5rpx;
-    float: left;
-    height: 43rpx;
-    width: 480rpx;
-    /*margin-right: 84rpx;*/
-    line-height: 43rpx;
-    font-size: 0;
-}
-
-.cart-view .promotion .tag{
-    border: 1px solid #f48f18;
-    height: 37rpx;
-    line-height: 31rpx;
-    padding: 0 9rpx;
-    margin-right: 10rpx;
-    color: #f48f18;
-    font-size: 24.5rpx;
-}
-
-.cart-view .promotion .txt{
-    height: 43rpx;
-    line-height: 43rpx;
-    padding-right: 10rpx;
-    color: #333;
-    font-size: 29rpx;
-    overflow: hidden;
-}
-
-.cart-view .get{
-    margin-top: 18rpx;
-    float: right;
-    height: 58rpx;
-    padding-left: 14rpx;
-    border-left: 1px solid #d9d9d9;
-    line-height: 58rpx;
-    font-size: 29rpx;
-    color: #333;
-}
-
-.cart-bottom{
-    position: fixed;
-    bottom:0;
-    left:0;
-    height: 100rpx;
-    width: 100%;
-    background: #fff;
-    display: flex;
-}
-
-.cart-bottom .checkbox{
-    height: 34rpx;
-
-    padding-left: 60rpx;
-    line-height: 34rpx;
-    margin: 33rpx 18rpx 33rpx 26rpx;
-    background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/checkbox-0e09baa37e.png) no-repeat;
-    background-size: 34rpx;
-    font-size: 29rpx;
-}
-
-.cart-bottom .checkbox.checked{
-    background: url(http://nos.netease.com/mailpub/hxm/yanxuan-wap/p/20150730/style/img/icon-normal/checkbox-checked-822e54472a.png) no-repeat;
-    background-size: 34rpx;
-}
-
-.cart-bottom .total{
-    height: 34rpx;
-    flex: 1;
-    margin: 33rpx 10rpx;
-    font-size: 29rpx;
-}
-
-
-.cart-bottom .delete{
-    height: 34rpx;
-    width: auto;
-    margin: 33rpx 18rpx;
-    font-size: 29rpx;
-}
-
-.cart-bottom .checkout{
-    height: 100rpx;
-    width: 210rpx;
-    text-align: center;
-    line-height: 100rpx;
-    font-size: 29rpx;
-    background: #b4282d;
-    color: #fff;
-}

+ 67 - 0
wx-front/pages/chat/chatForm/chatForm.js

@@ -0,0 +1,67 @@
+// pages/chat/chatForm/chatForm.js
+// https://blog.csdn.net/qq_35713752/article/details/78688311
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad: function (options) {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide: function () {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload: function () {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh: function () {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom: function () {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage: function () {
+
+  }
+})

+ 1 - 0
wx-front/pages/chat/chatForm/chatForm.json

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

+ 74 - 0
wx-front/pages/chat/chatForm/chatForm.wxml

@@ -0,0 +1,74 @@
+<view class="top-pop-box">
+  <view class="top-pop">
+    <view class="content">
+      <image class='img' mode='aspectFill' src='http://img.alicdn.com/bao/uploaded/i4/TB2HcB9v7omBKNjSZFqXXXtqVXa_!!0-fleamarket.jpg'></image>
+      <view class='info'>
+        <view class='name'>84青轴红轴键盘</view>
+        <view class='order'>
+          <view class='price'>¥ 249</view>
+          <view class='btn'>立即购买</view>
+        </view>
+        <view class='msg'>交易前聊一聊</view>
+      </view>
+    </view>
+  </view>
+</view>
+
+
+
+<view class='news'>
+  <scroll-view scroll-y="true" scroll-top="5000" wx:key='' class='scroll'>
+    <view class="historycon">
+
+      <!-- 一条记录 -->
+      <view class='history'>
+        <view>
+          <text class='time'>2018-12-12 11:21</text>
+        </view>
+
+        <view class='my_right'>
+          <view class='page_row'>
+            <text class='new_txt'> item.conten</text>
+            <view class='sanjiao my'></view>
+            <image class='new_img' mode='aspectFill' src='https://avatars2.githubusercontent.com/u/29662114?s=460&v=4'></image>
+          </view>
+        </view>
+      </view>
+<!-- 一条记录结束 -->
+
+
+      <view class='history'>
+        <view>
+          <text class='time'>2018-12-12 11:21</text>
+        </view>
+
+        <view class='you_left'>
+          <view class='page_row'>
+
+            <image class='new_img' mode='aspectFill' src='https://avatars2.githubusercontent.com/u/29662114?s=460&v=4'></image>
+            <view class='sanjiao you'></view>
+            <text  class='new_txt'> 您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通您正在与 tabdata.nickname 进行沟通</text>
+
+          </view>
+        </view>
+      </view>
+    </view>
+
+
+  </scroll-view>
+</view>
+
+
+<view class="input-pop-box">
+  <view class="input-pop">
+
+    <view class="input">
+
+      <view class="content">
+        <input class='' focus='{{openComment}}' placeholder="" maxlength='800' confirm-type="done" bindconfirm='done' value='{{}}' />
+
+      </view>
+      <view class='send'>发送</view>
+    </view>
+  </view>
+</view>

+ 242 - 0
wx-front/pages/chat/chatForm/chatForm.wxss

@@ -0,0 +1,242 @@
+/* pages/index/to_news/to_news.wxss */
+
+page {
+  background-color: #f7f7f7;
+}
+
+
+.time {
+  text-align: center;
+  padding: 5rpx 20rpx 5rpx 20rpx;
+  width: 200rpx;
+  font-size: 26rpx;
+  background-color: #ccc;
+  color: #fff;
+  border-radius: 20rpx;
+}
+
+
+/* 聊天内容 */
+
+.news {
+  margin-top: 180rpx;
+  text-align: center;
+  margin-bottom: 120rpx;
+  /* overflow: auto; */
+}
+
+
+
+/* 聊天 */
+
+.page_row {
+  display: flex;
+}
+
+.my_right {
+  float: right;
+  position: relative;
+  /* right: 40rpx; */
+}
+
+.you_left {
+  float: left;
+  position: relative;
+  /* left: 5rpx; */
+}
+
+.new_img {
+  width: 80rpx;
+  height: 80rpx;
+  border-radius: 50%;
+}
+
+.new_txt {
+  max-width: 500rpx;
+  border-radius: 7px;
+  background-color: #ffde57;
+  padding: 20rpx 20rpx 20rpx 20rpx;
+  text-align: left;
+  line-height: 47rpx;
+  font-size: 30rpx;
+}
+
+.sanjiao {
+  top: 20rpx;
+  position: relative;
+  width: 0px;
+  height: 0px;
+  border-width: 10px;
+  border-style: solid;
+}
+
+.my {
+  border-color: transparent transparent transparent #ffde57;
+}
+
+.you {
+  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 {
+  width: 100%;
+  height: auto;
+  max-height: 780rpx;
+  background: #fff;
+  position: fixed;
+  z-index: 9;
+  bottom: 0rpx;
+}
+
+.input-pop-box .input-pop .input {
+  display: flex;
+  background: #fff;
+  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;
+  padding: 10rpx;
+  background: #eee;
+  overflow: hidden;
+  height: 65rpx;
+  width: 550rpx;
+}
+
+.input-pop-box .input-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;
+}
+
+.input-pop-box .input-pop .send {
+  width: 120rpx;
+  height: 65rpx;
+  line-height: 60rpx;
+  text-align: center;
+  border-radius: 20rpx;
+  background: #ffde57;
+  font-size: 30rpx;
+  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: 120px;
+  padding: 10rpx;
+}
+
+.scroll {
+  height: 75vh;
+}

+ 0 - 0
wx-front/pages/cart/cart.js → wx-front/pages/chat/chatIndex/chatIndex.js


+ 0 - 0
wx-front/pages/cart/cart.json → wx-front/pages/chat/chatIndex/chatIndex.json


+ 68 - 0
wx-front/pages/chat/chatIndex/chatIndex.wxml

@@ -0,0 +1,68 @@
+<view class="container">
+
+  <view class='top'>
+    <view class='msg'> 如遇到以下情况可能是诈骗行为:</view>
+    <view class="item-group">
+      <view class="item">1.宝贝价格异常低</view>
+      <view class="item">2.卖家要求QQ沟通</view>
+      <view class="item">3.卖家要求直接汇款</view>
+    </view>
+  </view>
+
+  <!-- <view class="result-empty" wx:if="{{cartGoods.length <= 0}}">
+    <view class="c">
+      <image src="https://i.postimg.cc/v8KbQ4Sx/cry.png" />
+      <text>您还没有聊天记录</text>
+    </view>
+  </view> -->
+
+
+  <view class="result-list">
+
+    <navigator class="chat" url='/pages/chat/chatForm/chatForm'>
+      <view class="item">
+        <view class='avatar-item'>
+          <image class="avatar" mode='aspectFill' src="https://avatars2.githubusercontent.com/u/29662114?s=460&v=4"></image>
+
+          <view class='badge'>  <text class=' num'>99</text></view>
+        </view>
+        <view class="info">
+          <view class="t">
+            <text class="name">测试用户</text>
+          </view>
+          <view class="time">2018-10-12</view>
+          <view class="b">
+            <text class="chat-msg">你好.可以聊一下吗</text>
+          </view>
+        </view>
+        <image class="img" mode='aspectFill' src="http://yanxuan.nosdn.127.net/04e05e9de3a471b1f6479dd137b459a8.png"></image>
+      </view>
+    </navigator>
+
+    <view class="chat">
+      <view class="item">
+        <view class='avatar-item'>
+          <image class="avatar" src="http://yanxuan.nosdn.127.net/04e05e9de3a471b1f6479dd137b459a8.png"></image>
+          <view class='badge'>  <text class=' num'>9</text></view>
+        </view>
+        <view class="info">
+          <view class="t">
+            <text class="name">测试用户</text>
+          </view>
+          <view class="time">2018-10-12</view>
+          <view class="b">
+            <text class="chat-msg">你好.可以聊一下吗</text>
+          </view>
+        </view>
+        <image class="img" src="http://yanxuan.nosdn.127.net/04e05e9de3a471b1f6479dd137b459a8.png"></image>
+      </view>
+    </view>
+
+
+
+
+  </view>
+
+
+
+</view>

+ 189 - 0
wx-front/pages/chat/chatIndex/chatIndex.wxss

@@ -0,0 +1,189 @@
+page {
+  height: 100%;
+  min-height: 100%;
+  background: #f4f4f4;
+}
+
+.container {
+  background: #f4f4f4;
+  width: 100%;
+  height: auto;
+  min-height: 100%;
+  overflow: hidden;
+}
+
+.top {
+  margin-top: 10rpx;
+  background: #ffde57;
+  padding: 15px 0;
+  margin-bottom: 20rpx;
+  border-bottom: 2rpx solid #999;
+  border-top: 2rpx solid #999;
+}
+
+.top .msg {
+  color: #000;
+  margin-left: 30rpx;
+}
+
+.top .item-group {
+  width: 750rpx;
+  padding-bottom: 10px;
+  padding: 0 31.25rpx;
+  display: flex;
+  flex-flow: row nowrap;
+  align-items: center;
+  justify-content: space-between;
+}
+
+.top .item-group .item {
+  align-items: center;
+  font-size: 25rpx;
+  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%;
+  height: auto;
+  overflow: hidden;
+  margin-bottom: 120rpx;
+}
+
+.result-list .chat {
+  height: auto;
+  width: 100%;
+  background: #fff;
+  margin-bottom: 20rpx;
+}
+
+.result-list .item {
+  height: 164rpx;
+  width: 100%;
+  overflow: hidden;
+  border-bottom: 1rpx solid #ddd;
+  border-top: 1rpx solid #ddd;
+}
+
+
+
+.result-list .item .avatar-item {
+  float: left;
+  /* width:190rpx; */
+}
+
+.result-list .item .avatar {
+  float: left;
+  height: 110rpx;
+  width: 110rpx;
+  background: #f4f4f4;
+  margin: 19.5rpx 18rpx 19.5rpx 25rpx;
+  border-radius: 50%;
+}
+
+.result-list .item .badge {
+  background: red;
+  position: relative;
+  left: 110rpx;
+  top: 13px;
+  border: 3rpx solid #fff;
+  border-radius: 50%;
+  padding: 2rpx;
+  width: 32rpx;
+  height: 32rpx;
+}
+
+.result-list .item .badge .num {
+  position: absolute;
+  color: #fff;
+  left: 0rpx;
+  font-size: 20rpx;
+  text-align: center;
+  font-weight: bold;
+  width: 30rpx;
+  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;
+  width: 380rpx;
+  margin: 19.5rpx 0rpx 19.5rpx 20rpx;
+}
+
+.result-list .item .t {
+  margin: 8rpx 0;
+  font-size: 25rpx;
+  color: #333;
+  overflow: hidden;
+}
+
+.result-list .item .name {
+  height: 28rpx;
+  max-width: 310rpx;
+  line-height: 30rpx;
+  font-size: 30rpx;
+  color: #000;
+  overflow: hidden;
+}
+
+.result-list .item .time {
+  margin-bottom: 17rpx;
+  height: 24rpx;
+  line-height: 24rpx;
+  font-size: 22rpx;
+  color: #666;
+  overflow: hidden;
+}
+
+.result-list .item .b {
+  height: 28rpx;
+  line-height: 28rpx;
+  font-size: 25rpx;
+  color: #333;
+  overflow: hidden;
+}
+
+.result-list .item .chat-msg {
+  float: left;
+  color: #666;
+  font-size: 27rpx;
+}

+ 6 - 1
wx-front/pages/goods/goods.js

@@ -277,9 +277,14 @@ Page({
   },
   preview: function (event) {
     let url = event.currentTarget.dataset.url
+    let urls = []
+    for (var i in this.data.gallery){
+      urls.push(this.data.gallery[i].imgUrl)
+    }
 
     wx.previewImage({
-      urls: [url] // 需要预览的图片http链接列表
+      current: url,
+      urls: urls // 需要预览的图片http链接列表
     })
     console.log(url)
   },

+ 1 - 1
wx-front/pages/goods/goods.wxml

@@ -1,7 +1,7 @@
 <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}}" background-size="cover"></image>
+      <image bindtap='preview' data-url="{{item.imgUrl}}" src="{{item.imgUrl}}" mode='aspectFill' background-size="cover"></image>
     </swiper-item>
   </swiper>
   <view class="location-time">

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

@@ -62,6 +62,10 @@ Page({
     });
   },
   onLoad: function(options) {
+    // wx.setTabBarBadge({
+    //   index: 3,
+    //   text: '1'
+    // })
     this.getIndexData();
 
   },

+ 0 - 1
wx-front/pages/post/post.js

@@ -21,7 +21,6 @@ Page({
     tmpImgList:[],
   },
   onLoad: function(options) {
-
     var that = this;
     user.checkLoginAndNav()
 

+ 23 - 23
wx-front/pages/post/post.wxml

@@ -8,37 +8,37 @@
     </view>
 
 
-    <navigator url="../region/region" class='location'>
-      <view class="icon" wx:if='{{!regionId}}'>选择发货地点</view>
-      <view class="icon" wx:else>{{region}}</view>
-    </navigator>
 
-      <view class='img'>
-    <view wx:for="{{imgList}}" wx:key="{{index}}">
 
-      <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>
+    <view class='img'>
+      <view wx:for="{{imgList}}" wx:key="{{index}}">
+
+        <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>
+          </view>
         </view>
-      </view>
-      <view wx:else>
-      <!-- 完成上传 -->
-        <view class='add'>
-          <image class="delete" src="/static/images/delete.png" bindtap='removeImg' data-index='{{index}}'></image>
+        <view wx:else>
+          <!-- 完成上传 -->
+          <view class='add'>
+            <image class="delete" src="/static/images/delete.png" bindtap='removeImg' data-index='{{index}}'></image>
 
-          <image class='upload' bindtap='preview' data-url='{{imgList[index]}}' mode='aspectFill' src='{{imgList[index]}}'></image>
+            <image class='upload' bindtap='preview' data-url='{{imgList[index]}}' mode='aspectFill' src='{{imgList[index]}}'></image>
+          </view>
         </view>
-      </view>
 
-    </view>
+      </view>
       <view wx:if="{{imgList.length < 10}}" class='add' bindtap='addImage'>
-    <text class='txt'>添加图片</text>
-    <image class='icon' src='../../static/images/plus.png'></image>
-  </view>
-
-  </view>
+        <text class='txt'>添加图片</text>
+        <image class='icon' src='../../static/images/plus.png'></image>
+      </view>
 
+    </view>
+    <navigator url="../region/region" class='location'>
+      <view class="icon" wx:if='{{!regionId}}'>选择发货地点</view>
+      <view class="icon" wx:else>{{region}}</view>
+    </navigator>
 
   </view>
 

+ 37 - 55
wx-front/pages/post/post.wxss

@@ -79,61 +79,44 @@ page, .container {
 }
 
 .img {
-
-  padding:0 20rpx 0 20rpx;
-
-
-display:flex;
-flex-wrap:wrap;
-justify-content:flex-start;
-background:#fff;
-
-
+  padding: 5rpx 20rpx 0 20rpx;
+  display: flex;
+  flex-wrap: wrap;
+  justify-content: flex-start;
+  background: #fff;
 }
 
-.img .add .upload{
-height:108rpx;
-width:108rpx;
-border:2rpx solid #ddd;
-
+.img .add .upload {
+  height: 108rpx;
+  width: 108rpx;
+  border: 2rpx solid #ddd;
 }
-.img .add .delete{
-position:absolute;
-height:34rpx;
-width:34rpx;
-float:right;
-transform:translate(270%,-40%);
 
+.img .add .delete {
+  position: absolute;
+  height: 34rpx;
+  width: 34rpx;
+  float: right;
+  transform: translate(270%, -40%);
 }
 
-
-
 .img .add {
   display: block;
-height:110rpx;
-width:110rpx;
-/* margin-right:27rpx; */
-margin-right:20rpx;
-
-
-
-
-background:#fff;
-border:1rpx solid #ddd;
-
-margin-bottom:30rpx;
-
-
+  height: 110rpx;
+  width: 110rpx;
+  /* margin-right:27rpx; */
+  margin-right: 20rpx;
+  background: #f4f4f4;
+  border: 1rpx solid #ddd;
+  margin-bottom: 30rpx;
 }
 
 .img .add .txt {
-margin-top:7px;
-text-align:center;
-display:block;
-color:#999;
-font-size:25rpx;
-
-
+  margin-top: 7px;
+  text-align: center;
+  display: block;
+  color: #999;
+  font-size: 25rpx;
 }
 
 .img .add .icon {
@@ -146,17 +129,18 @@ font-size:25rpx;
 }
 
 .img .blur {
-  filter: blur(1rpx) contrast(50%) ;
+  filter: blur(1rpx) contrast(50%);
   background-size: cover;
+  background-position: center center;
 }
-.img .loading {
-height:55rpx;
-width:46%;
-margin-left:auto;
-margin-right:auto;
-display:block;
-margin-top:30rpx;
 
+.img .loading {
+  height: 55rpx;
+  width: 46%;
+  margin-left: auto;
+  margin-right: auto;
+  display: block;
+  margin-top: 30rpx;
 }
 
 .bottom-btn {
@@ -190,9 +174,7 @@ margin-top:30rpx;
   padding: 30rpx;
   background: #fff;
   padding-top: 10rpx;
-  padding-bottom:70rpx;
-margin-bottom:150rpx;
-
+  padding-bottom: 170rpx;
 }
 
 .detail .element {

+ 1 - 0
wx-front/pages/ucenter/income/income.wxml

@@ -2,6 +2,7 @@
 
 
   <view class="income-list">
+  
 
     <view class="item all">
       <view class="tag">总收入</view>