作者 倪静楠

评价

@@ -40,34 +40,7 @@ @@ -40,34 +40,7 @@
40 "style": "v2", 40 "style": "v2",
41 "sitemapLocation": "sitemap.json", 41 "sitemapLocation": "sitemap.json",
42 "selectedColor": "#355DFF", 42 "selectedColor": "#355DFF",
43 - "tabBar": {  
44 - "list": [  
45 - {  
46 - "pagePath": "pages/home/home",  
47 - "text": "首页",  
48 - "iconPath": "/images/tab/home.png",  
49 - "selectedIconPath": "/images/tab/home (2).png"  
50 - },  
51 - {  
52 - "pagePath": "pages/classify/classify",  
53 - "text": "分类",  
54 - "iconPath": "/images/tab/classify (2).png",  
55 - "selectedIconPath": "/images/tab/classify.png"  
56 - },  
57 - {  
58 - "pagePath": "pages/shopping-cart/shopping-cart",  
59 - "text": "购物车",  
60 - "iconPath": "/images/tab/cart (2).png",  
61 - "selectedIconPath": "/images/tab/cart.png"  
62 - },  
63 - {  
64 - "pagePath": "pages/user/user",  
65 - "text": "我的",  
66 - "iconPath": "/images/tab/user.png",  
67 - "selectedIconPath": "/images/tab/user (2).png"  
68 - }  
69 - ]  
70 - }, 43 +
71 "plugins": { 44 "plugins": {
72 "chooseLocation": { 45 "chooseLocation": {
73 "version": "1.0.5", 46 "version": "1.0.5",
@@ -3,4 +3,5 @@ page{ @@ -3,4 +3,5 @@ page{
3 width: 100%; 3 width: 100%;
4 height: 100%; 4 height: 100%;
5 overflow-x: hidden; 5 overflow-x: hidden;
  6 + background-color: #f1f2f4;
6 } 7 }
1 // pages/all-evaluate/all-evaluate.js 1 // pages/all-evaluate/all-evaluate.js
  2 +let method = require("../../utils/reuqest.js")
2 Page({ 3 Page({
3 data: { 4 data: {
4 list:[], 5 list:[],
5 - goodsId:'' 6 + goodsId: '',
  7 + page: 1,
  8 + bottomHint: false
  9 + },
  10 + //评价列表
  11 + getList(goodsId) {
  12 + let postData = {
  13 + goodsId: goodsId,
  14 + page: this.data.page,
  15 + size: 10
  16 + }
  17 + method.postRequest("/goods/goodsComment", postData, data => {
  18 + wx.stopPullDownRefresh();
  19 + if (data.statusCode == 0) {
  20 + this.setData({
  21 + list: data.data
  22 + })
  23 + }
  24 + })
6 }, 25 },
7 -  
8 /** 26 /**
9 * 生命周期函数--监听页面加载 27 * 生命周期函数--监听页面加载
10 */ 28 */
11 onLoad: function (options) { 29 onLoad: function (options) {
12 - 30 + this.setData({
  31 + goodsId:options.goodsId
  32 + })
  33 + this.getList(options.goodsid)
13 }, 34 },
14 35
15 /** 36 /**
@@ -23,7 +44,7 @@ Page({ @@ -23,7 +44,7 @@ Page({
23 * 生命周期函数--监听页面显示 44 * 生命周期函数--监听页面显示
24 */ 45 */
25 onShow: function () { 46 onShow: function () {
26 - 47 + this.getList()
27 }, 48 },
28 49
29 /** 50 /**
@@ -43,15 +64,34 @@ Page({ @@ -43,15 +64,34 @@ Page({
43 /** 64 /**
44 * 页面相关事件处理函数--监听用户下拉动作 65 * 页面相关事件处理函数--监听用户下拉动作
45 */ 66 */
  67 + onRefresh() {
  68 + // wx.showNavigationBarLoading();
  69 + this.setData({
  70 + page: 1,
  71 + list:[]
  72 + })
  73 + this.getList()
  74 + },
46 onPullDownRefresh: function () { 75 onPullDownRefresh: function () {
47 - 76 + this.onRefresh()
48 }, 77 },
49 78
50 /** 79 /**
51 * 页面上拉触底事件的处理函数 80 * 页面上拉触底事件的处理函数
52 */ 81 */
53 onReachBottom: function () { 82 onReachBottom: function () {
54 - 83 + this.setData({
  84 + page: this.data.page + 1,
  85 + })
  86 + this.getList();
  87 + this.setData({
  88 + bottomHint: true
  89 + })
  90 + setTimeout(() => {
  91 + this.setData({
  92 + bottomHint: false
  93 + })
  94 + }, 2000)
55 }, 95 },
56 96
57 /** 97 /**
1 { 1 {
2 - "usingComponents": {} 2 + "usingComponents": {},
  3 + "navigationBarTitleText": "全部评价",
  4 + "enablePullDownRefresh": true
3 } 5 }
1 <!--pages/all-evaluate/all-evaluate.wxml--> 1 <!--pages/all-evaluate/all-evaluate.wxml-->
2 -<view class="outerBox"> 2 +<view class="outerBox" wx:for="{{list}}">
3 <view class="userBox"> 3 <view class="userBox">
4 <view class="wxHead"> 4 <view class="wxHead">
5 - <image src="{{}}"></image> 5 + <image src="{{item.wxHeadImg}}"></image>
6 </view> 6 </view>
7 - <view class="wxName"></view> 7 + <view class="wxName">{{item.wxName}}</view>
8 </view> 8 </view>
9 - <view class="text"></view> 9 + <view class="text">{{item.content}}</view>
10 <view class="picBox"> 10 <view class="picBox">
11 <view class="pic" wx:for="{{item.images}}"> 11 <view class="pic" wx:for="{{item.images}}">
12 - <image src="{{item}}"></image> 12 + <image src="{{item}}" ></image>
13 </view> 13 </view>
14 </view> 14 </view>
15 </view> 15 </view>
  16 +<view wx:if="{{list.length==0}}" class="noDataBox">
  17 + <view class="noDataPic">
  18 + <image src="/images/message@2x.png"></image>
  19 + </view>
  20 + <view class="noDataText">这件商品还没有评价,快去评价吧~</view>
  21 +</view>
  22 +<view class="bottomHint" wx:if="{{bottomHint}}">
  23 + 我是有底线的~
  24 +</view>
1 /* pages/all-evaluate/all-evaluate.wxss */ 1 /* pages/all-evaluate/all-evaluate.wxss */
2 -page{ 2 +page {
3 background-color: #f1f2f4; 3 background-color: #f1f2f4;
4 padding-top: 24rpx; 4 padding-top: 24rpx;
  5 +
5 } 6 }
6 -.outerBox{ 7 +
  8 +.outerBox {
7 background-color: #ffffff; 9 background-color: #ffffff;
8 width: 750rpx; 10 width: 750rpx;
9 padding: 32rpx; 11 padding: 32rpx;
  12 + box-sizing: border-box;
  13 + padding-bottom: 20rpx;
10 } 14 }
  15 +
11 .userBox { 16 .userBox {
12 width: 686rpx; 17 width: 686rpx;
13 height: 72rpx; 18 height: 72rpx;
@@ -18,7 +23,7 @@ page{ @@ -18,7 +23,7 @@ page{
18 .wxHead { 23 .wxHead {
19 width: 72rpx; 24 width: 72rpx;
20 height: 72rpx; 25 height: 72rpx;
21 - margin-right:16rpx; 26 + margin-right: 16rpx;
22 background-color: aqua; 27 background-color: aqua;
23 } 28 }
24 29
@@ -28,32 +33,77 @@ page{ @@ -28,32 +33,77 @@ page{
28 } 33 }
29 34
30 .wxName { 35 .wxName {
  36 + color: #333333;
31 height: 100%; 37 height: 100%;
32 - width: 200rpx;  
33 max-width: 500rpx; 38 max-width: 500rpx;
34 - background-color: bisque;  
35 display: flex; 39 display: flex;
36 align-items: center; 40 align-items: center;
37 justify-content: left; 41 justify-content: left;
  42 + font-size: 28rpx;
38 } 43 }
39 44
40 .text { 45 .text {
41 width: 686rpx; 46 width: 686rpx;
42 - height: 200rpx;  
43 font-size: 28rpx; 47 font-size: 28rpx;
44 font-weight: 400; 48 font-weight: 400;
45 text-align: left; 49 text-align: left;
46 color: #333333; 50 color: #333333;
47 - background-color: blueviolet; 51 + word-break: break-all;
48 margin-top: 20rpx; 52 margin-top: 20rpx;
49 } 53 }
50 54
51 .picBox { 55 .picBox {
52 display: flex; 56 display: flex;
53 - height: 200rpx;  
54 width: 100%; 57 width: 100%;
55 } 58 }
56 59
57 .pic { 60 .pic {
  61 + width: 33%;
  62 + display: flex;
  63 + justify-content: center;
  64 +}
  65 +
  66 +.pic image {
  67 + width: 96%;
  68 + height: 200rpx;
  69 +}
58 70
  71 +.bottomHint {
  72 + font-size: 24rpx;
  73 + color: gray;
  74 + display: flex;
  75 + justify-content: center;
  76 + padding-bottom: 10rpx;
  77 +}
  78 +
  79 +.noDataBox {
  80 + margin-top: 200rpx;
  81 +}
  82 +
  83 +.noDataPic {
  84 + width: 200rpx;
  85 + height: 200rpx;
  86 + margin: 0 auto;
  87 +}
  88 +
  89 +.noDataPic image {
  90 + width: 200rpx;
  91 + height: 200rpx;
  92 +}
  93 +
  94 +.noDataText {
  95 + width: 750rpx;
  96 + display: flex;
  97 + align-items: center;
  98 + justify-content: center;
  99 + font-size: 28rpx;
  100 + color: #8e8e8e;
  101 +}
  102 +
  103 +.bottomHint {
  104 + font-size: 24rpx;
  105 + color: gray;
  106 + display: flex;
  107 + justify-content: center;
  108 + padding-bottom: 10rpx;
59 } 109 }
@@ -172,6 +172,7 @@ page{ @@ -172,6 +172,7 @@ page{
172 width:750rpx; 172 width:750rpx;
173 display: flex; 173 display: flex;
174 justify-content: center; 174 justify-content: center;
  175 + margin-top: 10rpx;
175 } 176 }
176 .top1{ 177 .top1{
177 font-size: 28rpx; 178 font-size: 28rpx;
@@ -3,6 +3,8 @@ let method = require("../../utils/reuqest.js"); @@ -3,6 +3,8 @@ let method = require("../../utils/reuqest.js");
3 const util = require("../../utils/util.js"); 3 const util = require("../../utils/util.js");
4 Page({ 4 Page({
5 data: { 5 data: {
  6 + page: 1,
  7 + classifyId: "",
6 idx: 0, //商品规格索引 8 idx: 0, //商品规格索引
7 check: false, //商品规格选择 9 check: false, //商品规格选择
8 goodsData: '', //获取商品库存 10 goodsData: '', //获取商品库存
@@ -20,8 +22,25 @@ Page({ @@ -20,8 +22,25 @@ Page({
20 location: '', 22 location: '',
21 latitude: '', //维度 23 latitude: '', //维度
22 longitude: '', //经度 24 longitude: '', //经度
  25 + bottomHint: false //触底提示
23 }, 26 },
24 - 27 + // tabbar
  28 + toHome() {
  29 + wx.reLaunch({
  30 + url: '/pages/home/home',
  31 + })
  32 + },
  33 + toShopCart() {
  34 + wx.reLaunch({
  35 + url: '/pages/shopping-cart/shopping-cart',
  36 + })
  37 + },
  38 + toUser() {
  39 + wx.reLaunch({
  40 + url: '/pages/user/user',
  41 + })
  42 + },
  43 + //获取定位
25 getLocation() { 44 getLocation() {
26 let that = this; 45 let that = this;
27 wx.getLocation({ 46 wx.getLocation({
@@ -69,7 +88,7 @@ Page({ @@ -69,7 +88,7 @@ Page({
69 url: '/pages/searchRequest/searchRequest?keyword=' + this.data.keyword, 88 url: '/pages/searchRequest/searchRequest?keyword=' + this.data.keyword,
70 }) 89 })
71 }, 90 },
72 - // 导航切换 91 + // 导航菜单
73 catalog() { 92 catalog() {
74 method.getRequest('/category/getCategoryList', data => { 93 method.getRequest('/category/getCategoryList', data => {
75 if (data.statusCode == 0) { 94 if (data.statusCode == 0) {
@@ -84,34 +103,43 @@ Page({ @@ -84,34 +103,43 @@ Page({
84 let that = this; 103 let that = this;
85 let list = that.data.lableArray; 104 let list = that.data.lableArray;
86 let id = e.currentTarget.dataset.id; 105 let id = e.currentTarget.dataset.id;
  106 + this.setData({
  107 + classifyId: id
  108 + })
87 that.dataRequest(id) 109 that.dataRequest(id)
88 }, 110 },
89 //第一次数据请求 111 //第一次数据请求
90 - onData() { 112 + onData(id) {
91 let postData = { 113 let postData = {
92 - categoryId: this.data.lableArray[0].categoryId,  
93 - page: 1, 114 + categoryId:this.data.classifyId,
  115 + page: this.data.page,
94 size: 10 116 size: 10
95 } 117 }
96 method.postRequest('/goods/list', postData, data => { 118 method.postRequest('/goods/list', postData, data => {
  119 + let lists = this.data.page == 1 ? data.data : this.data.list.concat(data.data)
97 if (data.statusCode == 0) { 120 if (data.statusCode == 0) {
98 this.setData({ 121 this.setData({
99 - list: data.data 122 + list: lists
100 }) 123 })
101 } 124 }
102 }) 125 })
103 }, 126 },
104 //分类数据请求 127 //分类数据请求
105 dataRequest: function (id) { 128 dataRequest: function (id) {
  129 + this.setData({
  130 + page:1
  131 + })
106 let postData = { 132 let postData = {
107 categoryId: id, 133 categoryId: id,
108 - page: 1, 134 + page: this.data.page,
109 size: 10 135 size: 10
110 } 136 }
111 method.postRequest('/goods/list', postData, data => { 137 method.postRequest('/goods/list', postData, data => {
  138 + wx.stopPullDownRefresh()
  139 + let lists = this.data.page == 1 ? data.data : this.data.list.concat(data.data)
112 if (data.statusCode == 0) { 140 if (data.statusCode == 0) {
113 this.setData({ 141 this.setData({
114 - list: data.data 142 + list: lists
115 }) 143 })
116 } 144 }
117 }) 145 })
@@ -246,11 +274,24 @@ Page({ @@ -246,11 +274,24 @@ Page({
246 */ 274 */
247 onLoad: function (options) { 275 onLoad: function (options) {
248 // this.dataRequest(); 276 // this.dataRequest();
249 - 277 + this.catalog();
  278 + if (wx.getStorageSync('categoryId')) {
  279 + let id=wx.getStorageSync('categoryId')
  280 + this.setData({
  281 + classifyId: id
  282 + })
  283 + this.dataRequest(this.data.classifyId);
  284 + } else {
  285 + setTimeout(() => {
  286 + this.setData({
  287 + classifyId: this.data.lableArray[0].categoryId
  288 + })
  289 + }, 500)
  290 + this.dataRequest(this.data.classifyId);
  291 + }
250 wx.removeStorageSync('categoryId') 292 wx.removeStorageSync('categoryId')
251 wx.removeStorageSync('index') 293 wx.removeStorageSync('index')
252 this.catalog(); 294 this.catalog();
253 -  
254 }, 295 },
255 296
256 /** 297 /**
@@ -266,11 +307,16 @@ Page({ @@ -266,11 +307,16 @@ Page({
266 onShow: function () { 307 onShow: function () {
267 let categoryId = wx.getStorageSync('categoryId') 308 let categoryId = wx.getStorageSync('categoryId')
268 let index = wx.getStorageSync('classifyIndex') 309 let index = wx.getStorageSync('classifyIndex')
  310 + if(index){
269 this.setData({ 311 this.setData({
270 activeKey: index 312 activeKey: index
271 }); 313 });
272 - // this.location()  
273 - //this.getLocation(); 314 + }else{
  315 + this.setData({
  316 + activeKey:0
  317 + })
  318 + }
  319 + wx.removeStorageSync("classifyIndex")
274 let that = this; 320 let that = this;
275 wx.getLocation({ 321 wx.getLocation({
276 type: 'gcj02', 322 type: 'gcj02',
@@ -306,15 +352,33 @@ Page({ @@ -306,15 +352,33 @@ Page({
306 /** 352 /**
307 * 页面相关事件处理函数--监听用户下拉动作 353 * 页面相关事件处理函数--监听用户下拉动作
308 */ 354 */
  355 + onRefresh() {
  356 + this.setData({
  357 + page: 1,
  358 + list: []
  359 + })
  360 + this.dataRequest(this.data.classifyId);
  361 + },
309 onPullDownRefresh: function () { 362 onPullDownRefresh: function () {
310 - 363 + this.onRefresh()
311 }, 364 },
312 365
313 /** 366 /**
314 * 页面上拉触底事件的处理函数 367 * 页面上拉触底事件的处理函数
315 */ 368 */
316 onReachBottom: function () { 369 onReachBottom: function () {
317 - 370 + this.setData({
  371 + page: Number(this.data.page) + 1
  372 + })
  373 + this.dataRequest(this.data.classifyId);
  374 + this.setData({
  375 + bottomHint: true
  376 + })
  377 + setTimeout(() => {
  378 + this.setData({
  379 + bottomHint: false
  380 + })
  381 + }, 2000)
318 }, 382 },
319 383
320 /** 384 /**
@@ -4,5 +4,6 @@ @@ -4,5 +4,6 @@
4 "van-sidebar": "@vant/weapp/sidebar/index", 4 "van-sidebar": "@vant/weapp/sidebar/index",
5 "van-sidebar-item": "@vant/weapp/sidebar-item/index" 5 "van-sidebar-item": "@vant/weapp/sidebar-item/index"
6 }, 6 },
7 - "navigationBarTitleText": "分类" 7 + "navigationBarTitleText": "分类",
  8 + "enablePullDownRefresh": true
8 } 9 }
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <view class="searchBox"> 9 <view class="searchBox">
10 <view class="search_center" catchtap="goSearch"> 10 <view class="search_center" catchtap="goSearch">
11 <view class="real_search_center"> 11 <view class="real_search_center">
12 - <input class="weui-input" auto-focus placeholder="请输入商品名称" bindinput="getKeyWord" 12 + <input class="weui-input" auto-focus="{{false}}" placeholder="请输入商品名称" bindinput="getKeyWord"
13 placeholder-class="placeholder" /> 13 placeholder-class="placeholder" />
14 <view class="search_right" catchtap="search"> 14 <view class="search_right" catchtap="search">
15 <image src="/images/01-02/sousuo.png"></image> 15 <image src="/images/01-02/sousuo.png"></image>
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </view> 21 </view>
22 <!-- 侧边导航 --> 22 <!-- 侧边导航 -->
23 <view class="navSide"> 23 <view class="navSide">
24 - <van-sidebar active-key="{{ activeKey }}"> 24 + <van-sidebar active-key="{{ activeKey }}" style="background:rgb(247,248,250)">
25 <view wx:for="{{lableArray}}" data-id="{{item.categoryId}}" bindtap="onChange"> 25 <view wx:for="{{lableArray}}" data-id="{{item.categoryId}}" bindtap="onChange">
26 <van-sidebar-item title="{{item.categoryName}}" /> 26 <van-sidebar-item title="{{item.categoryName}}" />
27 </view> 27 </view>
@@ -53,6 +53,9 @@ @@ -53,6 +53,9 @@
53 </view> 53 </view>
54 </view> 54 </view>
55 </scroll-view> 55 </scroll-view>
  56 + <view class="bottomHint" wx:if="{{bottomHint}}">
  57 + 我是有底线的~
  58 + </view>
56 </view> 59 </view>
57 </view> 60 </view>
58 <!-- 加入购物车弹框 --> 61 <!-- 加入购物车弹框 -->
@@ -89,3 +92,32 @@ @@ -89,3 +92,32 @@
89 <view class="confrimBtn" catchtap="confrimCart">确定</view> 92 <view class="confrimBtn" catchtap="confrimCart">确定</view>
90 </view> 93 </view>
91 </view> 94 </view>
  95 +<!-- tabbar -->
  96 +<view class="tabbarBox">
  97 + <ul>
  98 + <li>
  99 + <view class="tabbarPic" bindtap="toHome">
  100 + <image src="/images/tab/home.png"></image>
  101 + </view>
  102 + <text bindtap="toHome">首页</text>
  103 + </li>
  104 + <li>
  105 + <view class="tabbarPic">
  106 + <image src="/images/tab/classify.png"></image>
  107 + </view>
  108 + <text class="check">分类</text>
  109 + </li>
  110 + <li>
  111 + <view class="tabbarPic" bindtap="toShopCart">
  112 + <image src="/images/tab/cart (2).png"></image>
  113 + </view>
  114 + <text bindtap="toShopCart">购物车</text>
  115 + </li>
  116 + <li>
  117 + <view class="tabbarPic" bindtap="toUser">
  118 + <image src="/images/tab/user.png"></image>
  119 + </view>
  120 + <text bindtap="toUser">我的</text>
  121 + </li>
  122 + </ul>
  123 +</view>
@@ -3,6 +3,10 @@ @@ -3,6 +3,10 @@
3 border-color: var(--sidebar-selected-border-color, #406BFF) !important; 3 border-color: var(--sidebar-selected-border-color, #406BFF) !important;
4 } 4 }
5 5
  6 +page {
  7 + background-color: #fff;
  8 +}
  9 +
6 /* 搜索框 */ 10 /* 搜索框 */
7 /* 搜索框 */ 11 /* 搜索框 */
8 .serachMain { 12 .serachMain {
@@ -20,7 +24,7 @@ @@ -20,7 +24,7 @@
20 24
21 .location image { 25 .location image {
22 width: 16rpx; 26 width: 16rpx;
23 - height: 20rpx; 27 + height: 26rpx;
24 position: absolute; 28 position: absolute;
25 } 29 }
26 30
@@ -94,22 +98,17 @@ @@ -94,22 +98,17 @@
94 } 98 }
95 99
96 .searchMain { 100 .searchMain {
97 - /* width: 750rpx;  
98 - height: 92rpx;  
99 - padding: 0 32rpx;  
100 - box-sizing: border-box; */ 101 + box-sizing: border-box;
  102 + background-color: #ffffff;
101 display: flex; 103 display: flex;
102 justify-content: space-between; 104 justify-content: space-between;
103 align-items: center; 105 align-items: center;
104 - /* position: fixed;  
105 - top: 0;  
106 - left: 0;  
107 - z-index: 9; */ 106 + width: 100%;
108 } 107 }
109 108
110 .location { 109 .location {
111 width: 142rpx; 110 width: 142rpx;
112 - height: 60rpx; 111 + height: 70rpx;
113 font-size: 24rpx; 112 font-size: 24rpx;
114 color: #323232; 113 color: #323232;
115 text-indent: 1em; 114 text-indent: 1em;
@@ -123,30 +122,35 @@ @@ -123,30 +122,35 @@
123 } 122 }
124 123
125 .searchBox { 124 .searchBox {
126 - width: 524rpx; 125 + /* width: 524rpx; */
127 height: 72rpx; 126 height: 72rpx;
128 127
129 } 128 }
130 129
131 /* 侧边导航 */ 130 /* 侧边导航 */
132 .navSide { 131 .navSide {
133 - margin-top: 4rpx;  
134 display: flex; 132 display: flex;
  133 + width: 100%;
  134 + background-color: #ffffff;
135 } 135 }
136 136
137 .navContent { 137 .navContent {
138 - margin-left: 32rpx; 138 + background-color: #fff;
  139 + margin-bottom: 100rpx;
139 } 140 }
140 141
141 .scroll-view { 142 .scroll-view {
142 height: calc(100vh - 100rpx); 143 height: calc(100vh - 100rpx);
143 - padding: 16rpx 32rpx 0 0rpx; 144 + /* padding: 16rpx 32rpx 0 0rpx; */
  145 + padding-left: 32rpx;
144 box-sizing: border-box; 146 box-sizing: border-box;
  147 +
145 } 148 }
146 149
147 .navItem { 150 .navItem {
148 - width: 548rpx; 151 + width: 100%;
149 height: 234rpx; 152 height: 234rpx;
  153 + display: flex;
150 padding: 24rpx 32rpx 26rpx 0; 154 padding: 24rpx 32rpx 26rpx 0;
151 box-sizing: border-box; 155 box-sizing: border-box;
152 border-bottom: 2rpx solid #ebedf0; 156 border-bottom: 2rpx solid #ebedf0;
@@ -236,10 +240,20 @@ @@ -236,10 +240,20 @@
236 border-radius: 11rpx; 240 border-radius: 11rpx;
237 justify-content: center; 241 justify-content: center;
238 } 242 }
239 -.exchange image{  
240 - width:40rpx; 243 +
  244 +.exchange image {
  245 + width: 40rpx;
241 height: 40rpx; 246 height: 40rpx;
242 } 247 }
  248 +
  249 +.bottomHint {
  250 + font-size: 24rpx;
  251 + color: gray;
  252 + display: flex;
  253 + justify-content: center;
  254 + background-color: #f1f2f4;
  255 +}
  256 +
243 /* 购物车弹框 */ 257 /* 购物车弹框 */
244 .mask { 258 .mask {
245 position: fixed; 259 position: fixed;
@@ -258,7 +272,7 @@ @@ -258,7 +272,7 @@
258 left: 0; 272 left: 0;
259 border-radius: 10rpx 10rpx 0 0; 273 border-radius: 10rpx 10rpx 0 0;
260 background: #fff; 274 background: #fff;
261 - padding: 30rpx 32rpx ; 275 + padding: 30rpx 32rpx;
262 box-sizing: border-box; 276 box-sizing: border-box;
263 max-height: 94%; 277 max-height: 94%;
264 overflow-y: auto; 278 overflow-y: auto;
@@ -449,3 +463,48 @@ @@ -449,3 +463,48 @@
449 margin-top: 20rpx; 463 margin-top: 20rpx;
450 border-radius: 36rpx; 464 border-radius: 36rpx;
451 } 465 }
  466 +
  467 +/* tabbar */
  468 +.tabbarBox {
  469 + width: 100%;
  470 + height: 98rpx;
  471 + background-color: #fff;
  472 + position: fixed;
  473 + display: flex;
  474 + bottom: 0;
  475 + left: 0;
  476 + padding-top: 12rpx;
  477 + box-sizing: border-box;
  478 +}
  479 +
  480 +.tabbarPic {
  481 + display: flex;
  482 + justify-content: center;
  483 +}
  484 +
  485 +.tabbarBox ul {
  486 + width: 100%;
  487 + display: flex;
  488 +}
  489 +
  490 +ul>li {
  491 + width: 25%;
  492 +}
  493 +
  494 +li text {
  495 + display: block;
  496 + display: flex;
  497 + justify-content: center;
  498 + font-size: 18rpx;
  499 + font-weight: 400;
  500 + color: #bdc4ce;
  501 +}
  502 +
  503 +.check {
  504 + color: #355DFF;
  505 +}
  506 +
  507 +.tabbarPic image {
  508 + width: 48rpx;
  509 + height: 48rpx;
  510 +}
@@ -14,7 +14,6 @@ Page({ @@ -14,7 +14,6 @@ Page({
14 //获取优惠券 14 //获取优惠券
15 getDiscounCard() { 15 getDiscounCard() {
16 let that = this; 16 let that = this;
17 - console.log(that.data.pages, 'pages')  
18 let postData = { 17 let postData = {
19 page: that.data.pages, 18 page: that.data.pages,
20 size: 10, 19 size: 10,
@@ -92,9 +91,8 @@ Page({ @@ -92,9 +91,8 @@ Page({
92 * 页面相关事件处理函数--监听用户下拉动作 91 * 页面相关事件处理函数--监听用户下拉动作
93 */ 92 */
94 onRefresh() { 93 onRefresh() {
95 - wx.showNavigationBarLoading();  
96 this.setData({ 94 this.setData({
97 - pageNum: 1, 95 + pages: 1,
98 cardList: [] 96 cardList: []
99 }) 97 })
100 this.getDiscounCard(); 98 this.getDiscounCard();
@@ -106,9 +104,6 @@ Page({ @@ -106,9 +104,6 @@ Page({
106 /** 104 /**
107 * 页面上拉触底事件的处理函数 105 * 页面上拉触底事件的处理函数
108 */ 106 */
109 - // onReachBottom: function () {  
110 - // util.onReachListData(this, this.data.pageNums, this.data.cardList, this.getDiscounCard);  
111 - // },  
112 onReachBottom: function () { 107 onReachBottom: function () {
113 this.setData({ 108 this.setData({
114 pages: Number(this.data.pages) + 1 109 pages: Number(this.data.pages) + 1
@@ -38,9 +38,24 @@ Page({ @@ -38,9 +38,24 @@ Page({
38 categoryId: '', 38 categoryId: '',
39 times: '', //每日特价倒计时 39 times: '', //每日特价倒计时
40 timeDatas: {}, 40 timeDatas: {},
41 - bottomHint:false //上拉触底 41 + bottomHint: false //上拉触底
  42 + },
  43 + // tabbar
  44 + toClassify(){
  45 + wx.reLaunch({
  46 + url: '/pages/classify/classify',
  47 + })
  48 + },
  49 + toShopCart(){
  50 + wx.reLaunch({
  51 + url: '/pages/shopping-cart/shopping-cart',
  52 + })
  53 + },
  54 + toUser(){
  55 + wx.reLaunch({
  56 + url: '/pages/user/user',
  57 + })
42 }, 58 },
43 -  
44 //搜索 59 //搜索
45 goSearch() { 60 goSearch() {
46 wx.navigateTo({ 61 wx.navigateTo({
@@ -85,7 +100,7 @@ Page({ @@ -85,7 +100,7 @@ Page({
85 let index = e.currentTarget.dataset.index 100 let index = e.currentTarget.dataset.index
86 wx.setStorageSync('categoryId', categoryId) 101 wx.setStorageSync('categoryId', categoryId)
87 wx.setStorageSync('classifyIndex', index) 102 wx.setStorageSync('classifyIndex', index)
88 - wx.switchTab({ 103 + wx.reLaunch({
89 url: '/pages/classify/classify', 104 url: '/pages/classify/classify',
90 }) 105 })
91 }, 106 },
@@ -114,20 +129,25 @@ Page({ @@ -114,20 +129,25 @@ Page({
114 timeData: e.detail, 129 timeData: e.detail,
115 }); 130 });
116 }, 131 },
  132 +
117 countDown() { 133 countDown() {
118 let startTime = null; 134 let startTime = null;
119 let endTime = null; 135 let endTime = null;
120 - // let date = null; 136 + let date = null;
121 // let nowTimes = this.data.nowTimes 137 // let nowTimes = this.data.nowTimes
122 method.getRequest('/goods/getActivity', data => { 138 method.getRequest('/goods/getActivity', data => {
123 if (data.statusCode == 0) { 139 if (data.statusCode == 0) {
124 startTime = new Date().getTime(); 140 startTime = new Date().getTime();
125 - endTime = Date.parse(data.data.endDate); 141 + // endTime = data.data.endDate;
  142 + endTime=this.initTime(data.data.endDate).replace(/-/g,'/') //标准时间转换为普通日期
  143 + endTime=Date.parse(endTime)
  144 + console.log(endTime,'end')
126 this.setData({ 145 this.setData({
127 endTimess: endTime 146 endTimess: endTime
128 }) 147 })
129 date = (Number(endTime) - Number(startTime)); 148 date = (Number(endTime) - Number(startTime));
130 - if (Number(data.data.endTimes) < Number(data.data.nowTimes)) { 149 + console.log(date,'666')
  150 + if (date<=0) {
131 this.setData({ 151 this.setData({
132 countDownShow: false 152 countDownShow: false
133 }) 153 })
@@ -139,7 +159,14 @@ Page({ @@ -139,7 +159,14 @@ Page({
139 } 159 }
140 }) 160 })
141 }, 161 },
  162 +
142 //限时优惠倒计时 163 //限时优惠倒计时
  164 + //标准时间转换为普通时间
  165 + initTime(t) {
  166 + let d = new Date(t).getTime(new Date(t));
  167 + let time = new Date(d + 8 * 3600 * 1000).toJSON().substr(0, 19).replace('T', ' ').replace(/\./g, '-');
  168 + return time;
  169 + },
143 demoDown() { 170 demoDown() {
144 this.setData({ 171 this.setData({
145 timer: setInterval(() => { 172 timer: setInterval(() => {
@@ -186,13 +213,13 @@ Page({ @@ -186,13 +213,13 @@ Page({
186 } 213 }
187 //精确到分 214 //精确到分
188 else if (format == 2) { 215 else if (format == 2) {
189 - time = year + "-" + month + "-" + date + " " + hour + ":" + minu + ":" + sec; 216 + time = year + "/" + month + "/" + date + " " + hour + ":" + minu + ":" + sec;
190 } 217 }
191 return time; 218 return time;
192 }, 219 },
193 dayCountDown() { 220 dayCountDown() {
194 var nowTime = this.getCurrentDate(2) 221 var nowTime = this.getCurrentDate(2)
195 - var nowTimes = Date.parse(nowTime) 222 + var nowTimes = Date.parse(new Date(nowTime))
196 this.setData({ 223 this.setData({
197 nowTimes: nowTimes 224 nowTimes: nowTimes
198 }) 225 })
@@ -460,9 +487,6 @@ Page({ @@ -460,9 +487,6 @@ Page({
460 that.countDown(); 487 that.countDown();
461 that.oneDataRequest(); 488 that.oneDataRequest();
462 that.discountList(); 489 that.discountList();
463 - // setTimeout(() => {  
464 - // that.demoDown();  
465 - // }, 300)  
466 490
467 }, 491 },
468 492
@@ -510,13 +534,13 @@ Page({ @@ -510,13 +534,13 @@ Page({
510 */ 534 */
511 onReachBottom: function () { 535 onReachBottom: function () {
512 this.setData({ 536 this.setData({
513 - bottomHint:true 537 + bottomHint: true
514 }) 538 })
515 - setTimeout(()=>{ 539 + setTimeout(() => {
516 this.setData({ 540 this.setData({
517 - bottomHint:false 541 + bottomHint: false
518 }) 542 })
519 - },2000) 543 + }, 2000)
520 }, 544 },
521 545
522 /** 546 /**
@@ -6,6 +6,6 @@ @@ -6,6 +6,6 @@
6 "van-popup": "@vant/weapp/popup/index", 6 "van-popup": "@vant/weapp/popup/index",
7 "van-count-down": "@vant/weapp/count-down/index" 7 "van-count-down": "@vant/weapp/count-down/index"
8 }, 8 },
9 - "navigationBarTitleText": "首页",  
10 - "navigationStyle": "custom" 9 + "navigationBarTitleText": "首页"
  10 +
11 } 11 }
@@ -42,13 +42,6 @@ @@ -42,13 +42,6 @@
42 <view class="textss">{{minute}}</view> 42 <view class="textss">{{minute}}</view>
43 <view class="maohao">:</view> 43 <view class="maohao">:</view>
44 <view class="textss">{{second}}</view> 44 <view class="textss">{{second}}</view>
45 - <!-- <van-count-down use-slot time="{{ time }}" bind:change="onChange1">  
46 - <text class="item">{{ timeData.hours }}</text>  
47 - <text style="color:#FF593C">:</text>  
48 - <text class="item">{{ timeData.minutes }}</text>  
49 - <text style="color:#FF593C">:</text>  
50 - <text class="item">{{ timeData.seconds }}</text>  
51 - </van-count-down> -->  
52 </view> 45 </view>
53 <view class="moreCount" bindtap="moreCount">{{moreCount}}</view> 46 <view class="moreCount" bindtap="moreCount">{{moreCount}}</view>
54 <view class="arrow" bindtap="moreCount"></view> 47 <view class="arrow" bindtap="moreCount"></view>
@@ -78,11 +71,11 @@ @@ -78,11 +71,11 @@
78 <view class="dayPriceText">{{dayPrice}}</view> 71 <view class="dayPriceText">{{dayPrice}}</view>
79 <view class="dayPriceTime"> 72 <view class="dayPriceTime">
80 <van-count-down use-slot time="{{ times }}" bind:change="onChange2"> 73 <van-count-down use-slot time="{{ times }}" bind:change="onChange2">
81 - <text class="item">{{ timeDatas.hours }}</text> 74 + <text class="item">{{timeDatas.hours<10?'0'+timeDatas.hours:timeDatas.hours }}</text>
82 <text style="color:#FF593C">:</text> 75 <text style="color:#FF593C">:</text>
83 - <text class="item">{{ timeDatas.minutes }}</text> 76 + <text class="item">{{ timeDatas.minutes<10?'0'+timeDatas.minutes:timeDatas.minutes }}</text>
84 <text style="color:#FF593C">:</text> 77 <text style="color:#FF593C">:</text>
85 - <text class="item">{{ timeDatas.seconds }}</text> 78 + <text class="item">{{timeDatas.seconds<10?'0'+timeDatas.seconds:timeDatas.seconds}}</text>
86 </van-count-down> 79 </van-count-down>
87 </view> 80 </view>
88 <view class="morePrice" bindtap="morePrice">{{morePrice}}</view> 81 <view class="morePrice" bindtap="morePrice">{{morePrice}}</view>
@@ -160,7 +153,37 @@ @@ -160,7 +153,37 @@
160 </view> 153 </view>
161 </view> 154 </view>
162 </van-popup> 155 </van-popup>
163 -</view>  
164 -<view class="bottomHint" wx:if="{{bottomHint}}"> 156 + <view class="bottomHint" wx:if="{{bottomHint}}">
165 我是有底线的~ 157 我是有底线的~
166 </view> 158 </view>
  159 +</view>
  160 +
  161 +<!-- tabbar -->
  162 +<view class="tabbarBox" >
  163 + <ul>
  164 + <li>
  165 + <view class="tabbarPic">
  166 + <image src="/images/tab/home (2).png"></image>
  167 + </view>
  168 + <text class="check">首页</text>
  169 + </li>
  170 + <li bindtap="toClassify">
  171 + <view class="tabbarPic">
  172 + <image src="/images/tab/classify (2).png"></image>
  173 + </view>
  174 + <text>分类</text>
  175 + </li>
  176 + <li bindtap="toShopCart">
  177 + <view class="tabbarPic">
  178 + <image src="/images/tab/cart (2).png"></image>
  179 + </view>
  180 + <text>购物车</text>
  181 + </li>
  182 + <li bindtap="toUser">
  183 + <view class="tabbarPic">
  184 + <image src="/images/tab/user.png"></image>
  185 + </view>
  186 + <text>我的</text>
  187 + </li>
  188 + </ul>
  189 +</view>
1 /* pages/home/home.wxss */ 1 /* pages/home/home.wxss */
2 .contenter { 2 .contenter {
3 - padding-left: 32rpx;  
4 - padding-right: 32rpx;  
5 - background-color: #f1f2f4;  
6 - padding-top: 24rpx; 3 + margin-bottom: 100rpx;
  4 +}
  5 +page{
  6 + padding: 24rpx 32rpx 0 32rpx;
  7 + box-sizing: border-box;
7 } 8 }
8 9
9 /* 搜索框 */ 10 /* 搜索框 */
@@ -75,7 +76,6 @@ @@ -75,7 +76,6 @@
75 display: flex; 76 display: flex;
76 justify-content: space-between; 77 justify-content: space-between;
77 align-items: center; 78 align-items: center;
78 - padding: 0 56rpx;  
79 box-sizing: border-box; 79 box-sizing: border-box;
80 } 80 }
81 81
@@ -637,4 +637,43 @@ @@ -637,4 +637,43 @@
637 color: gray; 637 color: gray;
638 display: flex; 638 display: flex;
639 justify-content: center; 639 justify-content: center;
  640 + padding: 8rpx;
  641 +}
  642 +/* tabbar */
  643 +.tabbarBox{
  644 + width: 100%;
  645 + height: 98rpx;
  646 + background-color: #fff;
  647 + position: fixed;
  648 + display: flex;
  649 + bottom: 0;
  650 + left: 0;
  651 + padding-top: 12rpx;
  652 + box-sizing: border-box;
  653 +}
  654 +.tabbarPic{
  655 + display: flex;
  656 + justify-content: center;
  657 +}
  658 +.tabbarBox ul{
  659 + width: 100%;
  660 + display: flex;
  661 +}
  662 +ul>li{
  663 + width: 25%;
  664 +}
  665 +li text{
  666 + display: block;
  667 + display: flex;
  668 + justify-content: center;
  669 + font-size: 18rpx;
  670 + font-weight: 400;
  671 + color: #bdc4ce;
  672 +}
  673 +.check{
  674 + color: #355DFF;
  675 +}
  676 +.tabbarPic image{
  677 + width:48rpx;
  678 + height: 48rpx;
640 } 679 }
@@ -3,6 +3,7 @@ let method = require("../../utils/reuqest.js") @@ -3,6 +3,7 @@ let method = require("../../utils/reuqest.js")
3 Page({ 3 Page({
4 data: { 4 data: {
5 index: '', 5 index: '',
  6 + page: 1,
6 list: [], 7 list: [],
7 }, 8 },
8 //商品详情 9 //商品详情
@@ -49,14 +50,15 @@ Page({ @@ -49,14 +50,15 @@ Page({
49 //获取收藏商品列表 50 //获取收藏商品列表
50 getCollect() { 51 getCollect() {
51 let postData = { 52 let postData = {
52 - currPage: 1, 53 + currPage: this.data.page,
53 pageSize: 10, 54 pageSize: 10,
54 } 55 }
55 method.postRequest("/myUser/myCollection", postData, data => { 56 method.postRequest("/myUser/myCollection", postData, data => {
  57 + let list = this.data.page == 1 ? data.data : this.data.list.concat(data.data);
56 wx.stopPullDownRefresh() 58 wx.stopPullDownRefresh()
57 if (data.statusCode == 0) { 59 if (data.statusCode == 0) {
58 this.setData({ 60 this.setData({
59 - list: data.data 61 + list: list
60 }) 62 })
61 } 63 }
62 }) 64 })
@@ -99,8 +101,8 @@ Page({ @@ -99,8 +101,8 @@ Page({
99 */ 101 */
100 onRefresh() { 102 onRefresh() {
101 this.setData({ 103 this.setData({
102 - page:1,  
103 - list:[] 104 + page: 1,
  105 + list: []
104 }) 106 })
105 this.getCollect(); 107 this.getCollect();
106 }, 108 },
@@ -113,6 +115,10 @@ Page({ @@ -113,6 +115,10 @@ Page({
113 */ 115 */
114 onReachBottom: function () { 116 onReachBottom: function () {
115 this.setData({ 117 this.setData({
  118 + page: this.data.page + 1
  119 + })
  120 + this.getCollect()
  121 + this.setData({
116 bottomHint: true 122 bottomHint: true
117 }) 123 })
118 setTimeout(() => { 124 setTimeout(() => {
@@ -135,9 +135,12 @@ Page({ @@ -135,9 +135,12 @@ Page({
135 }, 135 },
136 //查看全部 136 //查看全部
137 openAll() { 137 openAll() {
138 - this.setData({  
139 - flags: !this.data.flags,  
140 - flag: !this.data.flag 138 + // this.setData({
  139 + // flags: !this.data.flags,
  140 + // flag: !this.data.flag
  141 + // })
  142 + wx.navigateTo({
  143 + url: '/pages/all-evaluate/all-evaluate?goodsid='+this.data.goodsId,
141 }) 144 })
142 }, 145 },
143 //进入购物车 146 //进入购物车
@@ -226,12 +226,13 @@ @@ -226,12 +226,13 @@
226 } 226 }
227 227
228 .noData { 228 .noData {
229 - height: 58rpx; 229 + /* height: 58rpx;
230 color: #999999; 230 color: #999999;
231 font-size: 26rpx; 231 font-size: 26rpx;
232 display: flex; 232 display: flex;
233 align-items: center; 233 align-items: center;
234 - justify-content: center; 234 + justify-content: center; */
  235 + display: none;
235 } 236 }
236 237
237 .evaluateContents { 238 .evaluateContents {
@@ -251,6 +252,7 @@ @@ -251,6 +252,7 @@
251 display: flex; 252 display: flex;
252 justify-content: space-between; 253 justify-content: space-between;
253 margin: 0 auto; 254 margin: 0 auto;
  255 + padding: 30rpx;
254 } 256 }
255 257
256 .evaluateTitle { 258 .evaluateTitle {
1 <!--pages/all-order/all-order.wxml--> 1 <!--pages/all-order/all-order.wxml-->
2 -<!-- <view class="titleLable">  
3 - <van-tabs active="{{active}}" bind:click="onClick">  
4 - <van-tab title="全部订单"></van-tab>  
5 - <van-tab title="待付款"></van-tab>  
6 - <van-tab title="待发货"></van-tab>  
7 - <van-tab title="待收货"></van-tab>  
8 - <van-tab title="待评价"></van-tab>  
9 - </van-tabs>  
10 -</view> --> 2 +
11 <!-- 订单 --> 3 <!-- 订单 -->
12 <view class="container"> 4 <view class="container">
13 - <view class="orderItem" wx:for="{{tabList}}" catchtap="orderDetail" data-orderid="{{item.orderId}}" wx:if="{{item.status==6}}"> 5 + <view class="orderItem" wx:for="{{tabList}}" catchtap="orderDetail" data-orderid="{{item.orderId}}"
  6 + wx:if="{{item.status==6}}">
14 <!-- 订单号 --> 7 <!-- 订单号 -->
15 <view class="top"> 8 <view class="top">
16 <view class="orderNumber">订单号:{{item.orderId}}</view> 9 <view class="orderNumber">订单号:{{item.orderId}}</view>
17 - <view class="status" >退款</view>  
18 - <!-- <view class="status" wx:if="{{item.returnVos[0].status==2}}">审核失败</view>  
19 - <view class="status" wx:if="{{item.returnVos[0].status==3}}">审核通过</view> -->  
20 - <!-- <view class="status" wx:if="{{item.status==1}}">待发货</view> -->  
21 - <!-- <view class="status" wx:if="{{item.status==2}}">待收货</view>  
22 - <view class="status" wx:if="{{item.status==3}}">已完成</view>  
23 - <view class="status" wx:if="{{item.status==4}}">已关闭</view>  
24 - <view class="status" wx:if="{{item.status==5}}">待评价</view>  
25 - <view class="status" wx:if="{{item.status==5}}">已退款</view> --> 10 + <view class="status">退款</view>
  11 +
26 </view> 12 </view>
27 <!-- 商品详情 --> 13 <!-- 商品详情 -->
28 <view class="bottom"> 14 <view class="bottom">
@@ -45,7 +31,7 @@ @@ -45,7 +31,7 @@
45 <view>(含运费¥{{item.freightAmount}})</view> 31 <view>(含运费¥{{item.freightAmount}})</view>
46 </view> 32 </view>
47 <view class="btnBox"> 33 <view class="btnBox">
48 - <view class="third btnPublic" >查看详情</view> 34 + <view class="third btnPublic">查看详情</view>
49 </view> 35 </view>
50 <!-- 按钮 --> 36 <!-- 按钮 -->
51 <!-- <view class="btnBox" wx:if="{{item.status==0}}"> 37 <!-- <view class="btnBox" wx:if="{{item.status==0}}">
@@ -70,6 +56,12 @@ @@ -70,6 +56,12 @@
70 </view> --> 56 </view> -->
71 </view> 57 </view>
72 </view> 58 </view>
  59 +<view class="noData" wx:if="{{tabList.length==0}}">
  60 + <view class="noDataPic">
  61 + <image src="/images/message@2x.png"></image>
  62 + </view>
  63 + <view class="noDataBottom">还没有退款的商品~</view>
  64 +</view>
73 <view class="bottomHint" wx:if="{{bottomHint}}"> 65 <view class="bottomHint" wx:if="{{bottomHint}}">
74 我是有底线的~ 66 我是有底线的~
75 </view> 67 </view>
@@ -172,4 +172,34 @@ page{ @@ -172,4 +172,34 @@ page{
172 justify-content: center; 172 justify-content: center;
173 padding-bottom: 10rpx; 173 padding-bottom: 10rpx;
174 } 174 }
175 - 175 +.noData{
  176 + width: 100%;
  177 + height: 100%;
  178 + margin-top: 300rpx;
  179 +}
  180 +.noDataPic{
  181 + width: 200rpx;
  182 + height: 200rpx;
  183 + margin: 0 auto;
  184 +}
  185 +.noDataPic image{
  186 + width: 200rpx;
  187 + height: 200rpx;
  188 +}
  189 +.noDataTop{
  190 + width: 100%;
  191 + font-size: 30rpx;
  192 + display: flex;
  193 + /* align-items: center; */
  194 + color: #323233;
  195 + justify-content: center;
  196 + font-weight: 500;
  197 +}
  198 +.noDataBottom{
  199 + width: 100%;
  200 + font-size: 24rpx;
  201 + color: #7d7e80;
  202 + display: flex;
  203 + justify-content: center;
  204 + margin-top: 10rpx;
  205 +}
@@ -6,12 +6,13 @@ @@ -6,12 +6,13 @@
6 <view class="userInfo"> 6 <view class="userInfo">
7 <view class="name">{{item.name}}</view> 7 <view class="name">{{item.name}}</view>
8 <view class="tell">{{item.phone}}</view> 8 <view class="tell">{{item.phone}}</view>
9 - <view class="lable" wx:if="{{item.delFlag==1}}" >默认</view> 9 + <view class="lable" wx:if="{{item.delFlag==1}}">默认</view>
10 </view> 10 </view>
11 <view class="address">{{item.area}}{{item.address}}</view> 11 <view class="address">{{item.area}}{{item.address}}</view>
12 <!-- 默认状态 --> 12 <!-- 默认状态 -->
13 - <view data-select="{{defaultType}}" >  
14 - <view class="selectDefault" bindtap="defaultEvent" data-delFlag="{{item.delFlag}}" data-id="{{item.id}}" data-index="{{index}}"> 13 + <view data-select="{{defaultType}}">
  14 + <view class="selectDefault" bindtap="defaultEvent" data-delFlag="{{item.delFlag}}" data-id="{{item.id}}"
  15 + data-index="{{index}}">
15 <view class="defaultPic"> 16 <view class="defaultPic">
16 <image src='{{item.delFlag=="1"?"/images/04-05/default.png":"/images/04-05/undefault.png"}}'></image> 17 <image src='{{item.delFlag=="1"?"/images/04-05/default.png":"/images/04-05/undefault.png"}}'></image>
17 </view> 18 </view>
@@ -40,6 +41,13 @@ @@ -40,6 +41,13 @@
40 </view> 41 </view>
41 </view> 42 </view>
42 </view> 43 </view>
  44 + <view class="noData" wx:if="{{list.length==0}}">
  45 + <view class="noDataPic">
  46 + <image src="/images/message@2x.png"></image>
  47 + </view>
  48 + <view class="noDataTop">一个地址都没有</view>
  49 + <view class="noDataBottom">快去添加收货地址,买买买吧~</view>
  50 + </view>
43 <!-- 超出配送范围 --> 51 <!-- 超出配送范围 -->
44 <!-- <view class="exceedRange" wx:if="{{exceedRange}}"> 52 <!-- <view class="exceedRange" wx:if="{{exceedRange}}">
45 <view class="exceedText">以下超出配送范围</view> 53 <view class="exceedText">以下超出配送范围</view>
@@ -176,7 +176,6 @@ page{ @@ -176,7 +176,6 @@ page{
176 .bottom { 176 .bottom {
177 width: 750rpx; 177 width: 750rpx;
178 height: 119rpx; 178 height: 119rpx;
179 - background-color: #ffffff;  
180 position: fixed; 179 position: fixed;
181 bottom: 0; 180 bottom: 0;
182 left: 0 181 left: 0
@@ -196,3 +195,34 @@ page{ @@ -196,3 +195,34 @@ page{
196 font-weight: 400; 195 font-weight: 400;
197 color: #ffffff; 196 color: #ffffff;
198 } 197 }
  198 +.noData{
  199 + width: 100%;
  200 + height: 100%;
  201 + margin-top: 300rpx;
  202 +}
  203 +.noDataPic{
  204 + width: 200rpx;
  205 + height: 200rpx;
  206 + margin: 0 auto;
  207 +}
  208 +.noDataPic image{
  209 + width: 200rpx;
  210 + height: 200rpx;
  211 +}
  212 +.noDataTop{
  213 + width: 100%;
  214 + font-size: 30rpx;
  215 + display: flex;
  216 + /* align-items: center; */
  217 + color: #323233;
  218 + justify-content: center;
  219 + font-weight: 500;
  220 +}
  221 +.noDataBottom{
  222 + width: 100%;
  223 + font-size: 24rpx;
  224 + color: #7d7e80;
  225 + display: flex;
  226 + justify-content: center;
  227 + margin-top: 10rpx;
  228 +}
@@ -28,6 +28,22 @@ Page({ @@ -28,6 +28,22 @@ Page({
28 }, 28 },
29 bottomHint: false, //上拉提示 29 bottomHint: false, //上拉提示
30 }, 30 },
  31 + // tabbar
  32 + toClassify() {
  33 + wx.reLaunch({
  34 + url: '/pages/classify/classify',
  35 + })
  36 + },
  37 + toHome() {
  38 + wx.reLaunch({
  39 + url: '/pages/home/home',
  40 + })
  41 + },
  42 + toUser() {
  43 + wx.reLaunch({
  44 + url: '/pages/user/user',
  45 + })
  46 + },
31 //购物车列表 47 //购物车列表
32 getList() { 48 getList() {
33 method.getRequest('/cart', data => { 49 method.getRequest('/cart', data => {
@@ -366,7 +382,6 @@ Page({ @@ -366,7 +382,6 @@ Page({
366 * 页面相关事件处理函数--监听用户下拉动作 382 * 页面相关事件处理函数--监听用户下拉动作
367 */ 383 */
368 onRefresh() { 384 onRefresh() {
369 - wx.showNavigationBarLoading();  
370 this.getList(); 385 this.getList();
371 }, 386 },
372 onPullDownRefresh: function () { 387 onPullDownRefresh: function () {
@@ -59,6 +59,9 @@ @@ -59,6 +59,9 @@
59 </view> 59 </view>
60 </view> 60 </view>
61 </view> 61 </view>
  62 + <view class="bottomHint" wx:if="{{bottomHint}}">
  63 + 我是有底线的~
  64 + </view>
62 </view> 65 </view>
63 <!-- <view wx:if="{{carts.length==0}}"> --> 66 <!-- <view wx:if="{{carts.length==0}}"> -->
64 <view wx:if="{{cartnoData}}"> 67 <view wx:if="{{cartnoData}}">
@@ -66,9 +69,7 @@ @@ -66,9 +69,7 @@
66 <view class="cart-no-data-btn" bindtap="goHome">去逛逛</view> 69 <view class="cart-no-data-btn" bindtap="goHome">去逛逛</view>
67 </view> 70 </view>
68 </view> 71 </view>
69 - <view class="bottomHint" wx:if="{{bottomHint}}">  
70 - 我是有底线的~  
71 - </view> 72 +
72 <!-- 立即购买 --> 73 <!-- 立即购买 -->
73 <view class="bottom"> 74 <view class="bottom">
74 <!-- <view class="checkPic"> 75 <!-- <view class="checkPic">
@@ -87,3 +88,32 @@ @@ -87,3 +88,32 @@
87 </view> 88 </view>
88 </view> 89 </view>
89 </view> 90 </view>
  91 +<!-- tabbar -->
  92 +<view class="tabbarBox" >
  93 + <ul>
  94 + <li>
  95 + <view class="tabbarPic" bindtap="toHome">
  96 + <image src="/images/tab/home.png"></image>
  97 + </view>
  98 + <text bindtap="toHome">首页</text>
  99 + </li>
  100 + <li>
  101 + <view class="tabbarPic" bindtap="toClassify">
  102 + <image src="/images/tab/classify (2).png"></image>
  103 + </view>
  104 + <text bindtap="toClassify">分类</text>
  105 + </li>
  106 + <li>
  107 + <view class="tabbarPic">
  108 + <image src="/images/tab/cart.png"></image>
  109 + </view>
  110 + <text class="check">购物车</text>
  111 + </li>
  112 + <li>
  113 + <view class="tabbarPic" bindtap="toUser">
  114 + <image src="/images/tab/user.png"></image>
  115 + </view>
  116 + <text bindtap="toUser">我的</text>
  117 + </li>
  118 + </ul>
  119 +</view>
@@ -274,7 +274,9 @@ page { @@ -274,7 +274,9 @@ page {
274 border-radius: 16rpx; 274 border-radius: 16rpx;
275 /* padding-bottom: 120rpx; */ 275 /* padding-bottom: 120rpx; */
276 } 276 }
277 - 277 +.main{
  278 + margin-bottom: 120rpx;
  279 +}
278 .cart-list { 280 .cart-list {
279 position: relative; 281 position: relative;
280 padding: 20rpx 20rpx 20rpx 285rpx; 282 padding: 20rpx 20rpx 20rpx 285rpx;
@@ -339,6 +341,8 @@ page { @@ -339,6 +341,8 @@ page {
339 bottom: 20rpx; 341 bottom: 20rpx;
340 width: 194rpx; 342 width: 194rpx;
341 height: 44rpx; 343 height: 44rpx;
  344 + display: flex;
  345 + align-items:center;
342 } 346 }
343 347
344 .cart-list .cart-count-box text { 348 .cart-list .cart-count-box text {
@@ -442,10 +446,11 @@ page { @@ -442,10 +446,11 @@ page {
442 display: flex; 446 display: flex;
443 align-items: center; 447 align-items: center;
444 position: fixed; 448 position: fixed;
445 - bottom: 0; 449 + bottom: 98rpx;
446 left: 0; 450 left: 0;
447 background-color: #ffffff; 451 background-color: #ffffff;
448 padding-left: 28rpx; 452 padding-left: 28rpx;
  453 + border-bottom: 2rpx solid #f1f2f4
449 } 454 }
450 455
451 .bottom .checkPic { 456 .bottom .checkPic {
@@ -515,5 +520,43 @@ page { @@ -515,5 +520,43 @@ page {
515 color: gray; 520 color: gray;
516 display: flex; 521 display: flex;
517 justify-content: center; 522 justify-content: center;
518 - padding-bottom: 10rpx; 523 + background-color: #f1f2f4;
  524 +}
  525 +/* tabbar */
  526 +.tabbarBox{
  527 + width: 100%;
  528 + height: 98rpx;
  529 + background-color: #fff;
  530 + position: fixed;
  531 + display: flex;
  532 + bottom: 0;
  533 + left: 0;
  534 + padding-top: 12rpx;
  535 + box-sizing: border-box;
  536 +}
  537 +.tabbarPic{
  538 + display: flex;
  539 + justify-content: center;
  540 +}
  541 +.tabbarBox ul{
  542 + width: 100%;
  543 + display: flex;
  544 +}
  545 +ul>li{
  546 + width: 25%;
  547 +}
  548 +li text{
  549 + display: block;
  550 + display: flex;
  551 + justify-content: center;
  552 + font-size: 18rpx;
  553 + font-weight: 400;
  554 + color: #bdc4ce;
  555 +}
  556 +.check{
  557 + color: #355DFF;
  558 +}
  559 +.tabbarPic image{
  560 + width:48rpx;
  561 + height: 48rpx;
519 } 562 }
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 let method = require("../../utils/reuqest.js") 2 let method = require("../../utils/reuqest.js")
3 Page({ 3 Page({
4 data: { 4 data: {
  5 + phoneNumber:'',
5 userData: '', 6 userData: '',
6 vip: '', 7 vip: '',
7 orderList: [{ 8 orderList: [{
@@ -40,6 +41,22 @@ Page({ @@ -40,6 +41,22 @@ Page({
40 text: '关于我们' 41 text: '关于我们'
41 }] 42 }]
42 }, 43 },
  44 + // tabbar
  45 + toHome() {
  46 + wx.reLaunch({
  47 + url: '/pages/home/home',
  48 + })
  49 + },
  50 + toShopCart() {
  51 + wx.reLaunch({
  52 + url: '/pages/shopping-cart/shopping-cart',
  53 + })
  54 + },
  55 + toClassify() {
  56 + wx.reLaunch({
  57 + url: '/pages/classify/classify',
  58 + })
  59 + },
43 //用户信息 60 //用户信息
44 getUserInfo() { 61 getUserInfo() {
45 method.getRequest("/myUser/queryUserInfo", data => { 62 method.getRequest("/myUser/queryUserInfo", data => {
@@ -124,13 +141,23 @@ Page({ @@ -124,13 +141,23 @@ Page({
124 }, 141 },
125 //在线客服 142 //在线客服
126 myKefu() { 143 myKefu() {
  144 + method.getRequest("/information/queryCustomerPhone",data=>{
  145 + if(data.statusCode==0){
  146 + this.setData({
  147 + phoneNumber:data.data
  148 + })
  149 + }
  150 + })
127 wx.makePhoneCall({ 151 wx.makePhoneCall({
128 - phoneNumber: '111111111000', 152 + phoneNumber: this.data.phoneNumber,
129 success() { 153 success() {
130 console.log('拨打电话成功') 154 console.log('拨打电话成功')
131 }, 155 },
132 fail() { 156 fail() {
133 - console.log('拨打电话失败') 157 + wx.showToast({
  158 + title: this.data.msg,
  159 + icon:'none'
  160 + })
134 } 161 }
135 }) 162 })
136 }, 163 },
@@ -57,3 +57,32 @@ @@ -57,3 +57,32 @@
57 </view> 57 </view>
58 </view> 58 </view>
59 </view> 59 </view>
  60 +<!-- tabbar -->
  61 +<view class="tabbarBox" >
  62 + <ul>
  63 + <li>
  64 + <view class="tabbarPic" bindtap="toHome">
  65 + <image src="/images/tab/home.png"></image>
  66 + </view>
  67 + <text bindtap="toHome">首页</text>
  68 + </li>
  69 + <li>
  70 + <view class="tabbarPic" bindtap="toClassify">
  71 + <image src="/images/tab/classify (2).png"></image>
  72 + </view>
  73 + <text bindtap="toClassify">分类</text>
  74 + </li>
  75 + <li>
  76 + <view class="tabbarPic" bindtap="toShopCart">
  77 + <image src="/images/tab/cart (2).png"></image>
  78 + </view>
  79 + <text bindtap="toShopCart">购物车</text>
  80 + </li>
  81 + <li>
  82 + <view class="tabbarPic">
  83 + <image src="/images/tab/user (2).png"></image>
  84 + </view>
  85 + <text class="check">我的</text>
  86 + </li>
  87 + </ul>
  88 +</view>
@@ -204,3 +204,41 @@ @@ -204,3 +204,41 @@
204 text-align: center; 204 text-align: center;
205 color: #7d7e80; 205 color: #7d7e80;
206 } 206 }
  207 +/* tabbar */
  208 +.tabbarBox{
  209 + width: 100%;
  210 + height: 98rpx;
  211 + background-color: #fff;
  212 + position: fixed;
  213 + display: flex;
  214 + bottom: 0;
  215 + left: 0;
  216 + padding-top: 12rpx;
  217 + box-sizing: border-box;
  218 +}
  219 +.tabbarPic{
  220 + display: flex;
  221 + justify-content: center;
  222 +}
  223 +.tabbarBox ul{
  224 + width: 100%;
  225 + display: flex;
  226 +}
  227 +ul>li{
  228 + width: 25%;
  229 +}
  230 +li text{
  231 + display: block;
  232 + display: flex;
  233 + justify-content: center;
  234 + font-size: 18rpx;
  235 + font-weight: 400;
  236 + color: #bdc4ce;
  237 +}
  238 +.check{
  239 + color: #355DFF;
  240 +}
  241 +.tabbarPic image{
  242 + width:48rpx;
  243 + height: 48rpx;
  244 +}