作者 lihongjuan

1

@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 } 9 }
10 10
11 .real_goods_item { 11 .real_goods_item {
12 - width: 50%; 12 + width: 367rpx;
13 margin-top: 20rpx; 13 margin-top: 20rpx;
14 border-radius: 10rpx; 14 border-radius: 10rpx;
15 background: #fff; 15 background: #fff;
@@ -21,6 +21,9 @@ @@ -21,6 +21,9 @@
21 align-items: center; 21 align-items: center;
22 22
23 } 23 }
  24 +.real_goods_item:nth-child(2n){
  25 + border-left:16rpx solid #f5f5f5;
  26 +}
24 27
25 .real_goods_img { 28 .real_goods_img {
26 width: 332rpx; 29 width: 332rpx;
@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 height: 210rpx; 3 height: 210rpx;
4 position: fixed; 4 position: fixed;
5 right: 32rpx; 5 right: 32rpx;
6 - bottom: 200rpx; 6 + bottom: 100rpx;
7 } 7 }
8 8
9 .item { 9 .item {
@@ -22,10 +22,14 @@ Component({ @@ -22,10 +22,14 @@ Component({
22 methods: { 22 methods: {
23 //查看商品详情 23 //查看商品详情
24 look_detail(e) { 24 look_detail(e) {
25 - let id = e.currentTarget.dataset.id  
26 - wx.navigateTo({  
27 - url: '/pages/shop_detail/shop_detail?id=' + id  
28 - }) 25 + let id = e.currentTarget.dataset.id;
  26 +
  27 + // wx.navigateTo({
  28 + // url: '/pages/shop_detail/shop_detail?id=' + id
  29 + // })
  30 + },
  31 + enter(){
  32 + console.log(this.data.list)
29 }, 33 },
30 //加减商品数量 34 //加减商品数量
31 num_change(e) { 35 num_change(e) {
@@ -90,6 +94,8 @@ Component({ @@ -90,6 +94,8 @@ Component({
90 check_num: this.properties.check_num ? this.properties.check_num:0 94 check_num: this.properties.check_num ? this.properties.check_num:0
91 }) 95 })
92 96
  97 + console.log(this.data.list)
  98 +
93 }, 99 },
94 detached() { 100 detached() {
95 // 在组件实例被从页面节点树移除时执行 101 // 在组件实例被从页面节点树移除时执行
@@ -8,7 +8,8 @@ @@ -8,7 +8,8 @@
8 <view class="info"> 8 <view class="info">
9 <view class="jifen"> 9 <view class="jifen">
10 <view class="name">积分</view> 10 <view class="name">积分</view>
11 - <text>{{type == 3 || type == 2?item.price:item.product.price}}</text> 11 + <text wx:if='{{item.product.price2!=null||item.price2!=null}}'>{{type == 3 || type == 2?item.price2:item.product.price2}}</text>
  12 + <text wx:else>{{type == 3 || type == 2?item.price:item.product.price}}</text>
12 <text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.num}}</text> 13 <text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.num}}</text>
13 </view> 14 </view>
14 <view class="num_box" wx:if="{{type == 1}}"> 15 <view class="num_box" wx:if="{{type == 1}}">
@@ -17,14 +18,16 @@ @@ -17,14 +18,16 @@
17 <image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.num}}" data-id="{{item.id}}" data-product_id="{{item.product_id}}" catchtap="num_change"/> 18 <image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.num}}" data-id="{{item.id}}" data-product_id="{{item.product_id}}" catchtap="num_change"/>
18 </view> 19 </view>
19 </view> 20 </view>
  21 + <view class="oldprice" wx:if="{{item.product.price2!=null||item.price2!=null}}">{{item.product.price||item.price}}</view>
20 </view> 22 </view>
21 </view> 23 </view>
22 </view> 24 </view>
23 <view class="info_box" wx:if="{{type == 3}}"> 25 <view class="info_box" wx:if="{{type == 3}}">
24 <view class="f_item"> 26 <view class="f_item">
25 - <view class="shop"> 27 + <view class="shop" bindtap="enter">
26 商品积分 28 商品积分
27 - <text>{{item.price*100*item.num/100}}积分</text> 29 + <text wx:if="{{item.price2!=null}}">{{item.price2*100*item.num/100}}积分</text>
  30 + <text wx:else>{{item.price*100*item.num/100}}积分</text>
28 </view> 31 </view>
29 </view> 32 </view>
30 </view> 33 </view>
@@ -175,3 +175,10 @@ @@ -175,3 +175,10 @@
175 color: rgba(242, 0, 0, 1); 175 color: rgba(242, 0, 0, 1);
176 margin-left: 10rpx; 176 margin-left: 10rpx;
177 } 177 }
  178 +
  179 +.oldprice {
  180 + color: #bdc4ce;
  181 + font-size: 24rpx;
  182 + text-decoration: line-through;
  183 + margin-top:10rpx;
  184 +}
@@ -63,6 +63,11 @@ Page({ @@ -63,6 +63,11 @@ Page({
63 } 63 }
64 app.post(url, params).then((res) => { 64 app.post(url, params).then((res) => {
65 wx.hideLoading() 65 wx.hideLoading()
  66 + // let obj={
  67 + // id:'',
  68 + // name:'套餐专区'
  69 + // }
  70 + // res.msg.push(obj)
66 that.setData({ 71 that.setData({
67 nav_arr: res.msg 72 nav_arr: res.msg
68 }) 73 })
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> 11 <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}">
12 <view class='center_child'> 12 <view class='center_child'>
13 <view class='left'> 13 <view class='left'>
14 - <view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='click_category' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view> 14 + <view class='left_item {{status == index?"active":""}}' id='Nav{{index}}' wx:for='{{nav_arr}}' wx:key='index' bindtap='{{item.id!=""?"click_category":"seltaocan"}}' data-index='{{index}}' data-id='{{item.id}}'>{{item.name}}</view>
15 15
16 <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view> 16 <view class='left_item {{taocan == true?"active":""}}' bindtap="seltaocan">套餐专区</view>
17 </view> 17 </view>
@@ -90,13 +90,23 @@ page { @@ -90,13 +90,23 @@ page {
90 height: 100%; 90 height: 100%;
91 background: #fff; 91 background: #fff;
92 position: fixed; 92 position: fixed;
93 - top: 114rpx 93 + top: 114rpx;
  94 + overflow-y: scroll;
  95 +
  96 +
  97 +}
  98 +.leftbox{
  99 + display:flex;
  100 + flex-direction: column;
  101 + justify-content: center;
  102 + align-items: center
94 } 103 }
95 104
96 .fake_left{ 105 .fake_left{
97 width: 21.4%; 106 width: 21.4%;
98 height: 100%; 107 height: 100%;
99 background: #fff; 108 background: #fff;
  109 + overflow-y: scroll
100 } 110 }
101 111
102 .left_item { 112 .left_item {
@@ -205,3 +215,9 @@ page { @@ -205,3 +215,9 @@ page {
205 white-space: nowrap; 215 white-space: nowrap;
206 margin: 0 auto 216 margin: 0 auto
207 } 217 }
  218 +.leftbox{
  219 + display:flex;
  220 + flex-direction: column;
  221 + justify-content: center;
  222 + align-items: center
  223 +}
@@ -29,7 +29,9 @@ Page({ @@ -29,7 +29,9 @@ Page({
29 showtime: false, 29 showtime: false,
30 status1: '', 30 status1: '',
31 status2: '', 31 status2: '',
32 - title2: '' 32 + title2: '',
  33 + scrollTop:'',
  34 + pid:''
33 }, 35 },
34 36
35 scroll(e) { 37 scroll(e) {
@@ -316,7 +318,14 @@ Page({ @@ -316,7 +318,14 @@ Page({
316 318
317 select_nav(e) { 319 select_nav(e) {
318 let index = Number(e.currentTarget.dataset.index) 320 let index = Number(e.currentTarget.dataset.index)
319 - let id = e.currentTarget.dataset.id 321 + let id = e.currentTarget.dataset.id;
  322 + this.setData({
  323 + pid:id
  324 + })
  325 +
  326 + this.setData({
  327 + scrollTop: 0
  328 + })
320 if (index == this.data.nav_index) { 329 if (index == this.data.nav_index) {
321 return 330 return
322 } else { 331 } else {
@@ -387,7 +396,7 @@ Page({ @@ -387,7 +396,7 @@ Page({
387 class_arr: res.msg, 396 class_arr: res.msg,
388 cid: '' 397 cid: ''
389 }) 398 })
390 - that.good_list('', that.data.c_index) 399 + that.good_list(pid, that.data.c_index)
391 } 400 }
392 }).catch((er) => { 401 }).catch((er) => {
393 wx.hideLoading() 402 wx.hideLoading()
@@ -552,11 +561,27 @@ Page({ @@ -552,11 +561,27 @@ Page({
552 onPullDownRefresh: function() { 561 onPullDownRefresh: function() {
553 562
554 }, 563 },
555 - 564 + loadMore(e){
  565 + console.log(e)
  566 + let that = this
  567 + if (that.data.page_type) {
  568 + wx.showToast({
  569 + title: '暂无更多数据',
  570 + icon: 'none',
  571 + duration: 1000
  572 + })
  573 + return
  574 + }
  575 + that.setData({
  576 + page: that.data.page + 1
  577 + })
  578 + that.good_list(that.data.pid, that.data.c_index)
  579 + },
556 /** 580 /**
557 * 页面上拉触底事件的处理函数 581 * 页面上拉触底事件的处理函数
558 */ 582 */
559 onReachBottom: function() { 583 onReachBottom: function() {
  584 + console.log(43898438493)
560 let that = this 585 let that = this
561 if (that.data.page_type) { 586 if (that.data.page_type) {
562 wx.showToast({ 587 wx.showToast({
1 -<scroll-view scroll-y="true" style="height:100%" bindscroll="scroll"> 1 +<scroll-view scroll-y="true" style="height:100%" bindscroll="scroll" scroll-top="{{scrollTop}}" bindscrolltolower="loadMore">
2 <view class='page'> 2 <view class='page'>
3 <view class='top'> 3 <view class='top'>
4 <navigator class='search_box' url="/pages/search/search"> 4 <navigator class='search_box' url="/pages/search/search">
@@ -399,7 +399,7 @@ image { @@ -399,7 +399,7 @@ image {
399 box-sizing: border-box; 399 box-sizing: border-box;
400 background: #fff; 400 background: #fff;
401 border-bottom: 16rpx solid #f5f5f5; 401 border-bottom: 16rpx solid #f5f5f5;
402 - border-top:16rpx solid #f5f5f5; 402 + /* border-top:16rpx solid #f5f5f5; */
403 margin-top:20rpx; 403 margin-top:20rpx;
404 } 404 }
405 405
@@ -51,6 +51,17 @@ Page({ @@ -51,6 +51,17 @@ Page({
51 }) 51 })
52 } 52 }
53 }) 53 })
  54 + }else{
  55 + wx.hideTabBarRedDot({
  56 + index: 1,
  57 + success: function (red) {
  58 +
  59 + // wx.setTabBarBadge({
  60 + // index: 1,
  61 + // text: newlist.length.toString(),
  62 + // })
  63 + }
  64 + })
54 } 65 }
55 66
56 67
@@ -163,6 +163,46 @@ Page({ @@ -163,6 +163,46 @@ Page({
163 163
164 }, 164 },
165 165
  166 + getmessagelist() {
  167 + let that = this
  168 + let url = '/information/get_all';
  169 + let data = {
  170 + page: 1,
  171 + pageNum: 10,
  172 +
  173 + }
  174 + a.post(url, data, "POST").then((r) => {
  175 + // console.log(r)
  176 + // that.setData({
  177 + // messagelist: that.data.messagelist.concat(r.msg)
  178 + // })
  179 +
  180 + let newlist = [];
  181 + r.msg.forEach(function (value, index, array) {
  182 + console.log(newlist)
  183 + if (value.status == 1) {
  184 + newlist.push(value)
  185 + }
  186 + })
  187 +
  188 + console.log('77889944556', newlist)
  189 + if (newlist.length != 0) {
  190 + wx.showTabBarRedDot({
  191 + index: 1,
  192 + success: function (red) {
  193 +
  194 + wx.setTabBarBadge({
  195 + index: 1,
  196 + text: newlist.length.toString(),
  197 + })
  198 + }
  199 + })
  200 + }
  201 +
  202 +
  203 + }).catch((err) => { })
  204 + },
  205 +
166 /** 206 /**
167 * 生命周期函数--监听页面显示 207 * 生命周期函数--监听页面显示
168 */ 208 */
@@ -171,6 +211,7 @@ Page({ @@ -171,6 +211,7 @@ Page({
171 t.getnewwuliu() 211 t.getnewwuliu()
172 t.get_shopnum() 212 t.get_shopnum()
173 t.get_order() 213 t.get_order()
  214 + t.getmessagelist()
174 //获取个人信息 自己写的 215 //获取个人信息 自己写的
175 216
176 // t.getInfoFun() 217 // t.getInfoFun()
@@ -32,6 +32,19 @@ Page({ @@ -32,6 +32,19 @@ Page({
32 }).catch((er) => {}) 32 }).catch((er) => {})
33 }, 33 },
34 34
  35 + // 进入订单详情
  36 + //查看订单详情
  37 + look_detail(e) {
  38 + console.log(6666)
  39 + let id=e.currentTarget.dataset.id;
  40 + if(id!=null){
  41 + wx.navigateTo({
  42 + url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id + '&type=' + e.currentTarget.dataset.type,
  43 + })
  44 + }
  45 +
  46 + },
  47 +
35 /** 48 /**
36 * 生命周期函数--监听页面初次渲染完成 49 * 生命周期函数--监听页面初次渲染完成
37 */ 50 */
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 12
13 <view class="content" wx:if="{{list.length != 0}}"> 13 <view class="content" wx:if="{{list.length != 0}}">
14 <view class="title">积分明细</view> 14 <view class="title">积分明细</view>
15 - <view class="item" wx:for="{{list}}" wx:key="index"> 15 + <view class="item" wx:for="{{list}}" wx:key="index" bindtap="look_detail" data-id="{{item.order_id}}" data-type="1">
16 <view class="left"> 16 <view class="left">
17 <image src="{{item.image}}" mode="aspectFill" /> 17 <image src="{{item.image}}" mode="aspectFill" />
18 </view> 18 </view>
@@ -4,6 +4,7 @@ Page({ @@ -4,6 +4,7 @@ Page({
4 /** 4 /**
5 * 页面的初始数据 5 * 页面的初始数据
6 */ 6 */
  7 +
7 data: { 8 data: {
8 status: 1, 9 status: 1,
9 nav: ['待支付', '待发货', '待收货', '已完成', '退换货'], 10 nav: ['待支付', '待发货', '待收货', '已完成', '退换货'],
@@ -12,7 +13,8 @@ Page({ @@ -12,7 +13,8 @@ Page({
12 daishouhuoorder: [], 13 daishouhuoorder: [],
13 success: [], 14 success: [],
14 tui: [], 15 tui: [],
15 - cover_type: false 16 + cover_type: false,
  17 + totalmoney:""
16 }, 18 },
17 // 展示待支付的去支付弹窗 19 // 展示待支付的去支付弹窗
18 show_cover(e) { 20 show_cover(e) {
@@ -22,6 +24,10 @@ Page({ @@ -22,6 +24,10 @@ Page({
22 this.setData({ 24 this.setData({
23 info: daiorder[index] 25 info: daiorder[index]
24 }) 26 })
  27 + console.log(this.data.info)
  28 + this.setData({
  29 + totalmoney: Number(this.data.info.total_price)+Number(this.data.info.youfei)
  30 + })
25 } 31 }
26 this.setData({ 32 this.setData({
27 cover_type: !this.data.cover_type 33 cover_type: !this.data.cover_type
@@ -15,10 +15,6 @@ @@ -15,10 +15,6 @@
15 </view> 15 </view>
16 <view class='img_right'> 16 <view class='img_right'>
17 <view class='info_titles'>{{zitem.product_name}}</view> 17 <view class='info_titles'>{{zitem.product_name}}</view>
18 - <view class="address">收货地址:</view>  
19 - <view class="address">下单时间:</view>  
20 - <view class="address">收货人:</view>  
21 - <view class="address">收电话:</view>  
22 18
23 <view class='two_ones'> 19 <view class='two_ones'>
24 <view class='scores'>积分</view> 20 <view class='scores'>积分</view>
@@ -30,6 +26,24 @@ @@ -30,6 +26,24 @@
30 </block> 26 </block>
31 <view class='padding'> 27 <view class='padding'>
32 <view class='mask_two'> 28 <view class='mask_two'>
  29 + <view>收货地址</view>
  30 + <view class='score'>{{item.address_area}}{{item.address_address}}</view>
  31 + </view>
  32 + <view class='mask_two'>
  33 + <view>下单时间</view>
  34 + <view class='score'>{{item.createtime}}</view>
  35 + </view>
  36 + <view class='mask_two'>
  37 + <view>收货人</view>
  38 + <view class='score'>{{item.address_name}}</view>
  39 + </view>
  40 + <view class='mask_two'>
  41 + <view>收电话:</view>
  42 + <view class='score'>{{item.address_mobile}}</view>
  43 + </view>
  44 +
  45 +
  46 + <view class='mask_two'>
33 <view>商品积分</view> 47 <view>商品积分</view>
34 <view class='score'>{{item.total_price*100/100}}积分</view> 48 <view class='score'>{{item.total_price*100/100}}积分</view>
35 </view> 49 </view>
@@ -54,20 +68,13 @@ @@ -54,20 +68,13 @@
54 <view class='two'> 68 <view class='two'>
55 <view class='two_item' wx:for="{{daifahuoorder}}" wx:key="index" bindtap="look_detail" data-id="{{item.id}}" data-type="1"> 69 <view class='two_item' wx:for="{{daifahuoorder}}" wx:key="index" bindtap="look_detail" data-id="{{item.id}}" data-type="1">
56 <view class='order_number'>订单编号:{{item.order_odd}}</view> 70 <view class='order_number'>订单编号:{{item.order_odd}}</view>
57 - <block wx:for="{{item.orderitem}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex" > 71 + <block wx:for="{{item.orderitem}}" wx:for-item="zitem" wx:for-index="zindex" wx:key="zindex">
58 <view class='mask_one'> 72 <view class='mask_one'>
59 <view class='mask_img'> 73 <view class='mask_img'>
60 <image src='{{zitem.product_image}}'></image> 74 <image src='{{zitem.product_image}}'></image>
61 </view> 75 </view>
62 <view class='img_right'> 76 <view class='img_right'>
63 <view class='info_titles'>{{zitem.product_name}}</view> 77 <view class='info_titles'>{{zitem.product_name}}</view>
64 -  
65 - <view class="address">收货地址:{{item.address_area}}{{item.address_address}}</view>  
66 - <view class="address">下单时间:{{item.createtime}}</view>  
67 - <view class="address">收货人:{{item.address_name}}</view>  
68 - <view class="address">收电话:{{item.address_mobile}}</view>  
69 -  
70 -  
71 <view class='two_ones'> 78 <view class='two_ones'>
72 <view class='scores'>积分</view> 79 <view class='scores'>积分</view>
73 <view class='prices'>{{zitem.product_money}}</view> 80 <view class='prices'>{{zitem.product_money}}</view>
@@ -84,7 +91,34 @@ @@ -84,7 +91,34 @@
84 <text class='small_red_score'>积分</text> 91 <text class='small_red_score'>积分</text>
85 </view> 92 </view>
86 </view> 93 </view>
  94 +
  95 + <view class='mask_two'>
  96 + <view>收货地址</view>
  97 + <view class='score'>{{item.address_area}}{{item.address_address}}</view>
  98 + </view>
  99 + <view class='mask_two'>
  100 + <view>下单时间</view>
  101 + <view class='score'>{{item.createtime}}</view>
  102 + </view>
  103 + <view class='mask_two'>
  104 + <view>收货人</view>
  105 + <view class='score'>{{item.address_name}}</view>
  106 + </view>
  107 + <view class='mask_two'>
  108 + <view>收电话:</view>
  109 + <view class='score'>{{item.address_mobile}}</view>
  110 + </view>
  111 +
  112 + <view class='mask_two'>
  113 + <view>商品积分</view>
  114 + <view class='score'>{{item.total_price*100/100}}积分</view>
  115 + </view>
  116 + <view class='mask_two no_border'>
  117 + <view>邮费积分</view>
  118 + <view class='score'>{{item.youfei}}积分</view>
  119 + </view>
87 <view class='btn_box'> 120 <view class='btn_box'>
  121 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
88 <view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view> 122 <view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
89 <view style='clear:both;'></view> 123 <view style='clear:both;'></view>
90 </view> 124 </view>
@@ -106,10 +140,10 @@ @@ -106,10 +140,10 @@
106 </view> 140 </view>
107 <view class='img_right'> 141 <view class='img_right'>
108 <view class='info_titles'>{{zitem.product_name}}</view> 142 <view class='info_titles'>{{zitem.product_name}}</view>
109 - <view class="address">收货地址:</view> 143 + <!-- <view class="address">收货地址:</view>
110 <view class="address">下单时间:</view> 144 <view class="address">下单时间:</view>
111 <view class="address">收货人:</view> 145 <view class="address">收货人:</view>
112 - <view class="address">收电话:</view> 146 + <view class="address">收电话:</view> -->
113 147
114 <view class='two_ones'> 148 <view class='two_ones'>
115 <view class='scores'>积分</view> 149 <view class='scores'>积分</view>
@@ -120,6 +154,32 @@ @@ -120,6 +154,32 @@
120 </view> 154 </view>
121 </block> 155 </block>
122 156
  157 + <view class='mask_two'>
  158 + <view>收货地址</view>
  159 + <view class='score'>{{item.address_area}}{{item.address_address}}</view>
  160 + </view>
  161 + <view class='mask_two'>
  162 + <view>下单时间</view>
  163 + <view class='score'>{{item.createtime}}</view>
  164 + </view>
  165 + <view class='mask_two'>
  166 + <view>收货人</view>
  167 + <view class='score'>{{item.address_name}}</view>
  168 + </view>
  169 + <view class='mask_two'>
  170 + <view>收电话:</view>
  171 + <view class='score'>{{item.address_mobile}}</view>
  172 + </view>
  173 +
  174 + <view class='mask_two'>
  175 + <view>商品积分</view>
  176 + <view class='score'>{{item.total_price*100/100}}积分</view>
  177 + </view>
  178 + <view class='mask_two no_border'>
  179 + <view>邮费积分</view>
  180 + <view class='score'>{{item.youfei}}积分</view>
  181 + </view>
  182 +
123 <view class='mask_two no_border'> 183 <view class='mask_two no_border'>
124 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品 184 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
125 <text decode='{{true}}'>&emsp;实付:</text> 185 <text decode='{{true}}'>&emsp;实付:</text>
@@ -128,6 +188,7 @@ @@ -128,6 +188,7 @@
128 </view> 188 </view>
129 </view> 189 </view>
130 <view class='btn_box'> 190 <view class='btn_box'>
  191 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
131 <view class='go_pay' catchtap="queren" data-d="{{item.order_odd}}">确认收货</view> 192 <view class='go_pay' catchtap="queren" data-d="{{item.order_odd}}">确认收货</view>
132 <view class='cancel_order' data-d="{{item.order_odd}}" catchtap="look_logistics">物流查询</view> 193 <view class='cancel_order' data-d="{{item.order_odd}}" catchtap="look_logistics">物流查询</view>
133 <view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view> 194 <view class='cancel_order' data-d="{{item.order_odd}}" data-t="1" bindtap="jumpReturnFun">退货</view>
@@ -151,10 +212,7 @@ @@ -151,10 +212,7 @@
151 </view> 212 </view>
152 <view class='img_right'> 213 <view class='img_right'>
153 <view class='info_titles'>{{zitem.product_name}}</view> 214 <view class='info_titles'>{{zitem.product_name}}</view>
154 - <view class="address">收货地址:</view>  
155 - <view class="address">下单时间:</view>  
156 - <view class="address">收货人:</view>  
157 - <view class="address">收电话:</view> 215 +
158 216
159 <view class='two_ones'> 217 <view class='two_ones'>
160 <view class='scores'>积分</view> 218 <view class='scores'>积分</view>
@@ -165,6 +223,32 @@ @@ -165,6 +223,32 @@
165 </view> 223 </view>
166 </block> 224 </block>
167 225
  226 + <view class='mask_two'>
  227 + <view>收货地址</view>
  228 + <view class='score'>{{item.address_area}}{{item.address_address}}</view>
  229 + </view>
  230 + <view class='mask_two'>
  231 + <view>下单时间</view>
  232 + <view class='score'>{{item.createtime}}</view>
  233 + </view>
  234 + <view class='mask_two'>
  235 + <view>收货人</view>
  236 + <view class='score'>{{item.address_name}}</view>
  237 + </view>
  238 + <view class='mask_two'>
  239 + <view>收电话:</view>
  240 + <view class='score'>{{item.address_mobile}}</view>
  241 + </view>
  242 +
  243 + <view class='mask_two'>
  244 + <view>商品积分</view>
  245 + <view class='score'>{{item.total_price*100/100}}积分</view>
  246 + </view>
  247 + <view class='mask_two no_border'>
  248 + <view>邮费积分</view>
  249 + <view class='score'>{{item.youfei}}积分</view>
  250 + </view>
  251 +
168 <view class='mask_two no_border'> 252 <view class='mask_two no_border'>
169 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品 253 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
170 <text decode='{{true}}'>&emsp;实付:</text> 254 <text decode='{{true}}'>&emsp;实付:</text>
@@ -197,10 +281,7 @@ @@ -197,10 +281,7 @@
197 </view> 281 </view>
198 <view class='img_right'> 282 <view class='img_right'>
199 <view class='info_titles'>{{zitem.product_name}}</view> 283 <view class='info_titles'>{{zitem.product_name}}</view>
200 - <view class="address">收货地址:</view>  
201 - <view class="address">下单时间:</view>  
202 - <view class="address">收货人:</view>  
203 - <view class="address">收电话:</view> 284 +
204 285
205 <view class='two_ones'> 286 <view class='two_ones'>
206 <view class='scores'>积分</view> 287 <view class='scores'>积分</view>
@@ -210,6 +291,31 @@ @@ -210,6 +291,31 @@
210 </view> 291 </view>
211 </view> 292 </view>
212 </block> 293 </block>
  294 + <view class='mask_two'>
  295 + <view>收货地址</view>
  296 + <view class='score'>{{item.address_area}}{{item.address_address}}</view>
  297 + </view>
  298 + <view class='mask_two'>
  299 + <view>下单时间</view>
  300 + <view class='score'>{{item.createtime}}</view>
  301 + </view>
  302 + <view class='mask_two'>
  303 + <view>收货人</view>
  304 + <view class='score'>{{item.address_name}}</view>
  305 + </view>
  306 + <view class='mask_two'>
  307 + <view>收电话:</view>
  308 + <view class='score'>{{item.address_mobile}}</view>
  309 + </view>
  310 +
  311 + <view class='mask_two'>
  312 + <view>商品积分</view>
  313 + <view class='score'>{{item.total_price*100/100}}积分</view>
  314 + </view>
  315 + <view class='mask_two no_border'>
  316 + <view>邮费积分</view>
  317 + <view class='score'>{{item.youfei}}积分</view>
  318 + </view>
213 319
214 <view class='mask_two no_border'> 320 <view class='mask_two no_border'>
215 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品 321 <view class='scorea' decode='{{true}}'>共{{item.total_num}}件商品
@@ -220,6 +326,8 @@ @@ -220,6 +326,8 @@
220 </view> 326 </view>
221 <view class='btn_box'> 327 <view class='btn_box'>
222 328
  329 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view>
  330 +
223 <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="jumpReturnFun">查看详情</view> 331 <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="jumpReturnFun">查看详情</view>
224 <view style='clear:both;'></view> 332 <view style='clear:both;'></view>
225 </view> 333 </view>
@@ -233,7 +341,7 @@ @@ -233,7 +341,7 @@
233 <!-- 待支付订单的支付弹窗 --> 341 <!-- 待支付订单的支付弹窗 -->
234 <view class="cover_box" wx:if="{{cover_type}}"> 342 <view class="cover_box" wx:if="{{cover_type}}">
235 <view class="cover_order"> 343 <view class="cover_order">
236 - <view class="all_money">{{info.total_price + info.youfei*100/100}}积分</view> 344 + <view class="all_money">{{totalmoney}}积分</view>
237 <view class="money_item"> 345 <view class="money_item">
238 <text>商品积分</text> 346 <text>商品积分</text>
239 <text>{{info.total_price}}积分</text> 347 <text>{{info.total_price}}积分</text>
@@ -12,7 +12,7 @@ page { @@ -12,7 +12,7 @@ page {
12 width: 100%; 12 width: 100%;
13 min-height: 100%; 13 min-height: 100%;
14 padding-top: 88rpx; 14 padding-top: 88rpx;
15 - box-sizing: border-box 15 + box-sizing: border-box;
16 } 16 }
17 17
18 .slide_nav { 18 .slide_nav {
@@ -26,7 +26,7 @@ page { @@ -26,7 +26,7 @@ page {
26 -webkit-align-items: center; 26 -webkit-align-items: center;
27 position: fixed; 27 position: fixed;
28 left: 0; 28 left: 0;
29 - top: 0 29 + top: 0;
30 } 30 }
31 31
32 .nav_item { 32 .nav_item {
@@ -77,8 +77,7 @@ page { @@ -77,8 +77,7 @@ page {
77 77
78 .two_item { 78 .two_item {
79 margin-top: 20rpx; 79 margin-top: 20rpx;
80 - /* padding: 36rpx 24rpx 0 30rpx; */  
81 - /* box-sizing: border-box; */ 80 + /* padding: 36rpx 24rpx 0 30rpx; *//* box-sizing: border-box; */
82 background: #fff; 81 background: #fff;
83 border-radius: 8rpx; 82 border-radius: 8rpx;
84 } 83 }
@@ -92,7 +91,7 @@ page { @@ -92,7 +91,7 @@ page {
92 font-weight: 400; 91 font-weight: 400;
93 color: rgba(19, 26, 46, 1); 92 color: rgba(19, 26, 46, 1);
94 padding: 0 24rpx 0 30rpx; 93 padding: 0 24rpx 0 30rpx;
95 - box-sizing: border-box 94 + box-sizing: border-box;
96 } 95 }
97 96
98 .mask_one { 97 .mask_one {
@@ -100,7 +99,7 @@ page { @@ -100,7 +99,7 @@ page {
100 box-sizing: border-box; 99 box-sizing: border-box;
101 display: flex; 100 display: flex;
102 display: -webkit-flex; 101 display: -webkit-flex;
103 - margin-bottom:0rpx; 102 + margin-bottom: 0rpx;
104 } 103 }
105 104
106 .mask_img { 105 .mask_img {
@@ -164,9 +163,9 @@ page { @@ -164,9 +163,9 @@ page {
164 color: rgba(242, 0, 0, 1); 163 color: rgba(242, 0, 0, 1);
165 } 164 }
166 165
167 -.padding{ 166 +.padding {
168 padding: 0 24rpx 0 30rpx; 167 padding: 0 24rpx 0 30rpx;
169 - box-sizing: border-box 168 + box-sizing: border-box;
170 } 169 }
171 170
172 .mask_two { 171 .mask_two {
@@ -181,6 +180,8 @@ page { @@ -181,6 +180,8 @@ page {
181 font-family: PingFang SC; 180 font-family: PingFang SC;
182 font-weight: 400; 181 font-weight: 400;
183 color: rgba(19, 26, 46, 1); 182 color: rgba(19, 26, 46, 1);
  183 + padding: 0 30rpx;
  184 + box-sizing: border-box;
184 } 185 }
185 186
186 .no_border { 187 .no_border {
@@ -188,14 +189,19 @@ page { @@ -188,14 +189,19 @@ page {
188 } 189 }
189 190
190 .score { 191 .score {
  192 + width: 500rpx;
  193 + overflow: hidden;
  194 + text-overflow: ellipsis;
  195 + white-space: nowrap;
191 color: rgba(142, 142, 142, 1); 196 color: rgba(142, 142, 142, 1);
  197 + text-align: right
192 } 198 }
193 199
194 .scorea { 200 .scorea {
195 width: 100%; 201 width: 100%;
196 text-align: right; 202 text-align: right;
197 padding: 0 24rpx 0 30rpx; 203 padding: 0 24rpx 0 30rpx;
198 - box-sizing: border-box 204 + box-sizing: border-box;
199 } 205 }
200 206
201 .red_score, .small_red_score { 207 .red_score, .small_red_score {
@@ -241,6 +247,7 @@ page { @@ -241,6 +247,7 @@ page {
241 } 247 }
242 248
243 /*待支付结束*/ 249 /*待支付结束*/
  250 +
244 .empty { 251 .empty {
245 font-size: 36rpx; 252 font-size: 36rpx;
246 font-family: PingFang SC; 253 font-family: PingFang SC;
@@ -250,8 +257,6 @@ page { @@ -250,8 +257,6 @@ page {
250 text-align: center; 257 text-align: center;
251 } 258 }
252 259
253 -  
254 -  
255 /*支付成功弹框结束*/ 260 /*支付成功弹框结束*/
256 261
257 .cover_box { 262 .cover_box {
@@ -263,8 +268,6 @@ page { @@ -263,8 +268,6 @@ page {
263 top: 0; 268 top: 0;
264 } 269 }
265 270
266 -  
267 -  
268 .cover_order { 271 .cover_order {
269 width: 100%; 272 width: 100%;
270 height: 526rpx; 273 height: 526rpx;
@@ -328,18 +331,16 @@ page { @@ -328,18 +331,16 @@ page {
328 top: 22rpx; 331 top: 22rpx;
329 padding: 10rpx; 332 padding: 10rpx;
330 } 333 }
331 -.shouhuo{  
332 - display:flex;  
333 334
  335 +.shouhuo {
  336 + display: flex;
334 justify-content: space-between; 337 justify-content: space-between;
335 - align-items: center 338 + align-items: center;
336 } 339 }
337 -.address{  
338 - font-size:26rpx;  
339 - color:rgba(19, 26, 46, 1);  
340 -  
341 340
342 - margin-bottom:10rpx; 341 +.address {
  342 + font-size: 26rpx;
  343 + color: rgba(19, 26, 46, 1);
  344 + margin-bottom: 10rpx;
343 /* font-weight: bold; */ 345 /* font-weight: bold; */
344 -  
345 } 346 }
@@ -40,6 +40,46 @@ Page({ @@ -40,6 +40,46 @@ Page({
40 }) 40 })
41 }, 41 },
42 42
  43 + getmessagelist() {
  44 + let that = this
  45 + let url = '/information/get_all';
  46 + let data = {
  47 + page: 1,
  48 + pageNum: 10,
  49 +
  50 + }
  51 + app.post(url, data, "POST").then((r) => {
  52 + // console.log(r)
  53 + // that.setData({
  54 + // messagelist: that.data.messagelist.concat(r.msg)
  55 + // })
  56 +
  57 + let newlist = [];
  58 + r.msg.forEach(function (value, index, array) {
  59 + console.log(newlist)
  60 + if (value.status == 1) {
  61 + newlist.push(value)
  62 + }
  63 + })
  64 +
  65 + console.log('77889944556', newlist)
  66 + if (newlist.length != 0) {
  67 + wx.showTabBarRedDot({
  68 + index: 1,
  69 + success: function (red) {
  70 +
  71 + wx.setTabBarBadge({
  72 + index: 1,
  73 + text: newlist.length.toString(),
  74 + })
  75 + }
  76 + })
  77 + }
  78 +
  79 +
  80 + }).catch((err) => { })
  81 + },
  82 +
43 //改变购物车数量 83 //改变购物车数量
44 change_num(e) { 84 change_num(e) {
45 let index = Number(e.detail.index) 85 let index = Number(e.detail.index)
@@ -199,7 +239,8 @@ submit(){ @@ -199,7 +239,8 @@ submit(){
199 onShow: function() { 239 onShow: function() {
200 this.get_info() 240 this.get_info()
201 this.judge() 241 this.judge()
202 - this.get_shopnum() 242 + this.get_shopnum();
  243 + this.getmessagelist()
203 }, 244 },
204 245
205 /** 246 /**
@@ -65,10 +65,19 @@ @@ -65,10 +65,19 @@
65 </view> 65 </view>
66 <view class='img_right'> 66 <view class='img_right'>
67 <view class='info_title'>{{info.name}}</view> 67 <view class='info_title'>{{info.name}}</view>
  68 + <view wx:if="{{info.price2!=null}}">
68 <view class='two_ones'> 69 <view class='two_ones'>
69 <view class='scores'>积分</view> 70 <view class='scores'>积分</view>
70 <view class='prices'>{{info.price}}</view> 71 <view class='prices'>{{info.price}}</view>
71 </view> 72 </view>
  73 + <view class="oldprice">{{info.price2}}</view>
  74 + </view>
  75 +
  76 +
  77 + <view class='two_ones' wx:else>
  78 + <view class='scores'>积分</view>
  79 + <view class='prices'>{{info.price2}}</view>
  80 + </view>
72 </view> 81 </view>
73 </view> 82 </view>
74 <view class='mask_two'> 83 <view class='mask_two'>
@@ -39,6 +39,14 @@ Page({ @@ -39,6 +39,14 @@ Page({
39 num: num 39 num: num
40 }) 40 })
41 }, 41 },
  42 +
  43 + // 跳到商品详情页
  44 + look_more(e) {
  45 + let id = e.currentTarget.dataset.id
  46 + wx.navigateTo({
  47 + url: '/pages/shop_detail/shop_detail?id=' + id
  48 + })
  49 + },
42 //添加购物车 50 //添加购物车
43 addshop() { 51 addshop() {
44 let that = this 52 let that = this
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <concat/> 4 <concat/>
5 <view class='top'> 5 <view class='top'>
6 6
7 - <image src="{{info.image}}"></image> 7 + <image src="{{info.image}}" mode="widthFix"></image>
8 <!-- <view class='current_box'>{{current+1}}/{{info.images.length}}</view> 8 <!-- <view class='current_box'>{{current+1}}/{{info.images.length}}</view>
9 <swiper class='swiper' current='{{current}}' bindchange='getCurrent'> 9 <swiper class='swiper' current='{{current}}' bindchange='getCurrent'>
10 <swiper-item class='swiper-item' wx:for='{{info.images}}' wx:key='index'> 10 <swiper-item class='swiper-item' wx:for='{{info.images}}' wx:key='index'>
@@ -24,9 +24,9 @@ @@ -24,9 +24,9 @@
24 </view> --> 24 </view> -->
25 </view> 25 </view>
26 <view class="list"> 26 <view class="list">
27 - <view class="listitem flex" bindtap="newdetail" wx:for="{{taocanlist}}" wx:key="no" data-id="{{item.id}}"> 27 + <view class="listitem flex" bindtap="look_more" wx:for="{{taocanlist}}" wx:key="no" data-id="{{item.id}}">
28 <view class="listright"> 28 <view class="listright">
29 - <image src="{{item.images[0]}}" mode="widthFix "></image> 29 + <image src="{{item.images[0]}}" mode="widthFix"></image>
30 </view> 30 </view>
31 <view class="listleft "> 31 <view class="listleft ">
32 <view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view> 32 <view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view>
@@ -24,6 +24,9 @@ page { @@ -24,6 +24,9 @@ page {
24 height: 750rpx; 24 height: 750rpx;
25 position: relative; 25 position: relative;
26 background: #fff; 26 background: #fff;
  27 + display: flex;
  28 + justify-content: center;
  29 + align-items: center
27 } 30 }
28 31
29 .current_box { 32 .current_box {
@@ -534,9 +537,17 @@ page { @@ -534,9 +537,17 @@ page {
534 /*弹框结束*/ 537 /*弹框结束*/
535 .listright { 538 .listright {
536 width: 218rpx; 539 width: 218rpx;
537 - height: 156rpx;  
538 - font-size: 0;  
539 - margin-left: 32rpx; 540 + /* height: 218rpx; */
  541 + display: flex;
  542 + overflow: hidden;
  543 + align-items: center;
  544 + justify-content: center;
  545 + /* font-size: 0;
  546 + margin-left: 32rpx; */
  547 +}
  548 +.listright image{
  549 + width: 100%;
  550 + height: 100%;
540 } 551 }
541 552
542 .leftbottom { 553 .leftbottom {
@@ -557,7 +568,8 @@ page { @@ -557,7 +568,8 @@ page {
557 background: #fff; 568 background: #fff;
558 } 569 }
559 .listleft{ 570 .listleft{
560 - margin-left:10rpx; 571 + width:500rpx;
  572 + margin-left:32rpx;
561 } 573 }
562 .commontwo { 574 .commontwo {
563 color: #232323; 575 color: #232323;
@@ -573,5 +585,5 @@ page { @@ -573,5 +585,5 @@ page {
573 } 585 }
574 image{ 586 image{
575 width:100%; 587 width:100%;
576 - height:100%; 588 + /* height:100%; */
577 } 589 }
@@ -14,6 +14,7 @@ Page({ @@ -14,6 +14,7 @@ Page({
14 area: '', 14 area: '',
15 address: '', 15 address: '',
16 cover_type: false, 16 cover_type: false,
  17 + totalmoney:''
17 }, 18 },
18 //加减商品数量 19 //加减商品数量
19 num_change(e) { 20 num_change(e) {
@@ -51,7 +52,7 @@ Page({ @@ -51,7 +52,7 @@ Page({
51 let coudan_arr = this.data.coudan_arr 52 let coudan_arr = this.data.coudan_arr
52 let choudan_money = 0 53 let choudan_money = 0
53 for (let obj of coudan_arr) { 54 for (let obj of coudan_arr) {
54 - choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money 55 + choudan_money = Number((obj.price * 100 * obj.num)) / 100 + Number(choudan_money)
55 } 56 }
56 this.setData({ 57 this.setData({
57 choudan_money: choudan_money 58 choudan_money: choudan_money
@@ -140,8 +141,16 @@ Page({ @@ -140,8 +141,16 @@ Page({
140 app.post(url, params).then((res) => { 141 app.post(url, params).then((res) => {
141 console.log(res) 142 console.log(res)
142 that.setData({ 143 that.setData({
143 - info: res.msg 144 + info: res.msg,
  145 + totalmoney: Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100)
144 }) 146 })
  147 + console.log('999',that.data.totalmoney)
  148 +
  149 + // that.info.total = Number(that.data.info.total)
  150 + // that.info.yunfei = Number(that.data.info.yunfei);
  151 + // that.setData({
  152 + // info:that.data.info
  153 + // })
145 }) 154 })
146 }, 155 },
147 156
1 { 1 {
2 - "usingComponents": {} 2 +
  3 + "usingComponents": {
  4 +
  5 +
  6 + }
3 } 7 }
@@ -87,7 +87,7 @@ @@ -87,7 +87,7 @@
87 <view class="footer"> 87 <view class="footer">
88 <view class="submit" catchtap="show_cover">提交</view> 88 <view class="submit" catchtap="show_cover">提交</view>
89 <view class="jifen"> 合计: 89 <view class="jifen"> 合计:
90 - <text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text> 90 + <text>{{choudan_money?choudan_money + totalmoney: totalmoney}}积分</text>
91 </view> 91 </view>
92 <view class="num">共{{info.totalnum}}件</view> 92 <view class="num">共{{info.totalnum}}件</view>
93 </view> 93 </view>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 <view class="searchgood commnonpadding" wx:else> 16 <view class="searchgood commnonpadding" wx:else>
17 <view class="searchgooditem flextwo boxsizing" wx:for="{{xianshilist}}" wx:key=""> 17 <view class="searchgooditem flextwo boxsizing" wx:for="{{xianshilist}}" wx:key="">
18 <view class="gooditemleft"> 18 <view class="gooditemleft">
19 - <image src="{{item.images[0]}}" mode=""></image> 19 + <image src="{{item.images[0]}}" mode="widthFix"></image>
20 </view> 20 </view>
21 <view class="gooditemright "> 21 <view class="gooditemright ">
22 <view class="goodsouname morehidden">{{item.name}}</view> 22 <view class="goodsouname morehidden">{{item.name}}</view>
@@ -108,8 +108,15 @@ @@ -108,8 +108,15 @@
108 } 108 }
109 .gooditemleft{ 109 .gooditemleft{
110 width:200rpx; 110 width:200rpx;
111 - height:165rpx; 111 + height:200rpx;
112 font-size: 0; 112 font-size: 0;
  113 + margin-right:20rpx;
  114 + flex:0 0 auto;
  115 + overflow: hidden
  116 +
  117 +}
  118 +.gooditemright{
  119 + flex:1
113 } 120 }
114 .commnonpadding{ 121 .commnonpadding{
115 padding: 0 32rpx; 122 padding: 0 32rpx;
@@ -8,7 +8,63 @@ Page({ @@ -8,7 +8,63 @@ Page({
8 page:1, 8 page:1,
9 zhuanqulist:[], 9 zhuanqulist:[],
10 activeid: '', 10 activeid: '',
11 - activelist:[] 11 + activelist:[],
  12 + c_index:0,
  13 + price:false,
  14 + sale:false,
  15 + order:''
  16 + },
  17 +
  18 + // 排序
  19 + reorder(e) {
  20 + let that = this
  21 + that.setData({
  22 + activelist:[],
  23 + page:1
  24 + })
  25 + let index = Number(e.currentTarget.dataset.index)
  26 + if(index==0){
  27 + this.setData({
  28 + order:''
  29 + })
  30 + }
  31 + if (index == 1) {
  32 + that.setData({
  33 + price:!that.data.price
  34 + })
  35 + if(that.data.price==true){
  36 + that.setData({
  37 + order:1
  38 + })
  39 + }else{
  40 + that.setData({
  41 + order:2
  42 + })
  43 + }
  44 +
  45 + } else if (index == 2) {
  46 + that.setData({
  47 + sale:!that.data.sale
  48 + })
  49 + if(that.data.sale==true){
  50 + that.setData({
  51 + order:3
  52 + })
  53 + }else{
  54 + that.setData({
  55 + order:4
  56 + })
  57 + }
  58 + }
  59 + this.setData({
  60 + c_index: e.currentTarget.dataset.index,
  61 + page: 1,
  62 + page_type: false
  63 + })
  64 +
  65 + that.getmorelist()
  66 + //调用排序接口
  67 + // this.good_list(this.data.cid, e.currentTarget.dataset.index)
12 }, 68 },
13 69
14 /** 70 /**
@@ -47,6 +103,7 @@ Page({ @@ -47,6 +103,7 @@ Page({
47 activity_id:that.data.activeid, 103 activity_id:that.data.activeid,
48 page: that.data.page, 104 page: that.data.page,
49 pageNum: 10, 105 pageNum: 10,
  106 + order:that.data.order,
50 107
51 } 108 }
52 app.post(url, data, "POST").then((r) => { 109 app.post(url, data, "POST").then((r) => {
1 <view class='page'> 1 <view class='page'>
2 2
  3 + <view class='select_box'>
  4 + <view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view>
  5 + <view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格
  6 + <view class='select_img'>
  7 + <image src="{{c_index == 1?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
  8 + </view>
  9 + </view>
  10 + <view class='select_item {{c_index == 2?"active":""}}' data-index="2" bindtap='reorder'>销量
  11 + <view class='select_img'>
  12 + <image src="{{c_index == 2?'/images/select_active.png':'/images/select.png'}}" class='select_img_no_choose' />
  13 + </view>
  14 + </view>
  15 + </view>
3 <!-- 商品列表 --> 16 <!-- 商品列表 -->
4 <view class='real_goods'> 17 <view class='real_goods'>
5 <Model_item list="{{shop_arr}}" /> 18 <Model_item list="{{shop_arr}}" />
@@ -38,7 +51,7 @@ @@ -38,7 +51,7 @@
38 <view class="pink_cover" wx:if="{{item.product.sold == 0}}" /> 51 <view class="pink_cover" wx:if="{{item.product.sold == 0}}" />
39 </view> 52 </view>
40 53
41 - <view wx:else> 54 + <view wx:else class="goodimgbox">
42 <view class='real_goods_img'> 55 <view class='real_goods_img'>
43 <image src='{{item.combo.image}}' mode="aspectFill" /> 56 <image src='{{item.combo.image}}' mode="aspectFill" />
44 <image src='/images/mei.png' class="tip" wx:if="{{item.sold == 0}}" /> 57 <image src='/images/mei.png' class="tip" wx:if="{{item.sold == 0}}" />
@@ -103,12 +103,13 @@ page { @@ -103,12 +103,13 @@ page {
103 background: #f9f9f9; 103 background: #f9f9f9;
104 display: flex; 104 display: flex;
105 flex-wrap: wrap; 105 flex-wrap: wrap;
  106 +
106 /* padding: 8rpx 11rpx 20rpx; */ 107 /* padding: 8rpx 11rpx 20rpx; */
107 box-sizing: border-box; 108 box-sizing: border-box;
108 } 109 }
109 110
110 .real_goods_item { 111 .real_goods_item {
111 - width: 50%; 112 + width: 367rpx;
112 margin-top: 20rpx; 113 margin-top: 20rpx;
113 border-radius: 10rpx; 114 border-radius: 10rpx;
114 background: #fff; 115 background: #fff;
@@ -120,6 +121,44 @@ page { @@ -120,6 +121,44 @@ page {
120 align-items: center 121 align-items: center
121 122
122 } 123 }
  124 +.real_goods_item:nth-child(2n){
  125 + border-left:16rpx solid #f5f5f5;
  126 +}
  127 +
  128 +.select_box {
  129 + height: 88rpx;
  130 + width: 100%;
  131 + background: #fff;
  132 + padding: 0 98rpx;
  133 + box-sizing: border-box;
  134 + display: flex;
  135 + align-items: center;
  136 + justify-content: space-between;
  137 +}
  138 +
  139 +.select_item {
  140 + font-size: 28rpx;
  141 + font-family: PingFang SC;
  142 + font-weight: 400;
  143 + line-height: 40rpx;
  144 + color: rgba(156, 156, 156, 1);
  145 + position: relative;
  146 +}
  147 +
  148 +.select_item.active {
  149 + color: rgba(61, 154, 248, 1);
  150 +}
  151 +
  152 +.select_item.active::after {
  153 + content: '';
  154 + width: 100%;
  155 + height: 4rpx;
  156 + border-radius: 4rpx 4rpx 0 0;
  157 + background: rgba(61, 154, 248, 1);
  158 + position: absolute;
  159 + bottom: -20rpx;
  160 + left: 0;
  161 +}
123 162
124 .real_goods_img { 163 .real_goods_img {
125 width: 332rpx; 164 width: 332rpx;
@@ -127,8 +166,12 @@ page { @@ -127,8 +166,12 @@ page {
127 margin-bottom: 16rpx; 166 margin-bottom: 16rpx;
128 border-top-left-radius: 10rpx; 167 border-top-left-radius: 10rpx;
129 border-top-right-radius: 10rpx; 168 border-top-right-radius: 10rpx;
130 - overflow: hidden; 169 +
131 position: relative; 170 position: relative;
  171 +
  172 +}
  173 + .real_goods_img{
  174 + margin-left:10rpx;
132 } 175 }
133 176
134 .real_goods_img image { 177 .real_goods_img image {
@@ -146,9 +189,11 @@ page { @@ -146,9 +189,11 @@ page {
146 } 189 }
147 190
148 .real_goods_bottom { 191 .real_goods_bottom {
149 - padding: 16rpx 16rpx 28rpx 16rpx; 192 + padding: 16rpx 16rpx 28rpx 31rpx;
150 box-sizing: border-box; 193 box-sizing: border-box;
151 background: #fff; 194 background: #fff;
  195 +
  196 +
152 } 197 }
153 198
154 .goods_title { 199 .goods_title {
@@ -209,3 +254,9 @@ page { @@ -209,3 +254,9 @@ page {
209 left: 0; 254 left: 0;
210 top: 0; 255 top: 0;
211 } 256 }
  257 +.goodimgbox{
  258 + display:flex;
  259 + flex-direction: column;
  260 + justify-content: center;
  261 + align-items: center
  262 +}
@@ -89,6 +89,7 @@ page { @@ -89,6 +89,7 @@ page {
89 width: 100%; 89 width: 100%;
90 height: 100%; 90 height: 100%;
91 } 91 }
  92 +
92 .empty { 93 .empty {
93 font-size: 36rpx; 94 font-size: 36rpx;
94 font-family: PingFang SC; 95 font-family: PingFang SC;
@@ -97,6 +98,7 @@ page { @@ -97,6 +98,7 @@ page {
97 margin: 200rpx auto 0; 98 margin: 200rpx auto 0;
98 text-align: center; 99 text-align: center;
99 } 100 }
  101 +
100 .real_goods { 102 .real_goods {
101 width: 750rpx; 103 width: 750rpx;
102 margin: 0 auto; 104 margin: 0 auto;
@@ -108,16 +110,20 @@ page { @@ -108,16 +110,20 @@ page {
108 } 110 }
109 111
110 .real_goods_item { 112 .real_goods_item {
111 - width: 50%; 113 + width: 367rpx;
112 margin-top: 20rpx; 114 margin-top: 20rpx;
113 border-radius: 10rpx; 115 border-radius: 10rpx;
114 background: #fff; 116 background: #fff;
115 overflow: hidden; 117 overflow: hidden;
116 position: relative; 118 position: relative;
117 - display:flex; 119 + display: flex;
118 flex-direction: column; 120 flex-direction: column;
119 justify-content: center; 121 justify-content: center;
120 - align-items: center 122 + align-items: center;
  123 +}
  124 +
  125 +.real_goods_item:nth-child(2n) {
  126 + border-left: 16rpx solid #f5f5f5;
121 } 127 }
122 128
123 .real_goods_img { 129 .real_goods_img {
@@ -199,7 +205,7 @@ page { @@ -199,7 +205,7 @@ page {
199 color: rgba(156, 156, 156, 1); 205 color: rgba(156, 156, 156, 1);
200 } 206 }
201 207
202 -.pink_cover{ 208 +.pink_cover {
203 width: 100%; 209 width: 100%;
204 height: 100%; 210 height: 100%;
205 background: #ccc; 211 background: #ccc;