作者 lihongjuan

1

@@ -2,20 +2,20 @@ @@ -2,20 +2,20 @@
2 width: 96rpx; 2 width: 96rpx;
3 height: 210rpx; 3 height: 210rpx;
4 position: fixed; 4 position: fixed;
5 - right: 32rpx; 5 + right: -24rpx;
6 bottom: 100rpx; 6 bottom: 100rpx;
7 } 7 }
8 8
9 .item { 9 .item {
10 - width: 96rpx;  
11 - height: 96rpx; 10 + width: 60rpx;
  11 + height: 60rpx;
12 padding: 0; 12 padding: 0;
13 border: none !important; 13 border: none !important;
14 margin: 0 !important; 14 margin: 0 !important;
15 } 15 }
16 16
17 .item:first-child { 17 .item:first-child {
18 - margin-bottom: 16rpx !important; 18 + margin-bottom: 30rpx !important;
19 } 19 }
20 20
21 .item image { 21 .item image {
1 { 1 {
2 "pages": [ 2 "pages": [
  3 + "pages/startindex/startindex",
3 "pages/index/index", 4 "pages/index/index",
4 "pages/register/register", 5 "pages/register/register",
5 "pages/login/login", 6 "pages/login/login",
6 -  
7 "pages/zuji/zuji", 7 "pages/zuji/zuji",
8 -  
9 -  
10 "pages/messagedetail/messagedetail", 8 "pages/messagedetail/messagedetail",
11 "pages/message/message", 9 "pages/message/message",
12 -  
13 "pages/shop_cart/shop_cart", 10 "pages/shop_cart/shop_cart",
14 "pages/classify/classify", 11 "pages/classify/classify",
15 "pages/my/my", 12 "pages/my/my",
@@ -34,7 +31,7 @@ @@ -34,7 +31,7 @@
34 "pages/taocanpay/taocanpay", 31 "pages/taocanpay/taocanpay",
35 "pages/orderdetail/orderdetail", 32 "pages/orderdetail/orderdetail",
36 "pages/xianshi/xianshi" 33 "pages/xianshi/xianshi"
37 - 34 +
38 ], 35 ],
39 "window": { 36 "window": {
40 "backgroundTextStyle": "light", 37 "backgroundTextStyle": "light",
@@ -62,7 +59,6 @@ @@ -62,7 +59,6 @@
62 "iconPath": "images/tabbar/icon_70.png", 59 "iconPath": "images/tabbar/icon_70.png",
63 "selectedIconPath": "images/tabbar/icon_73.png" 60 "selectedIconPath": "images/tabbar/icon_73.png"
64 }, 61 },
65 -  
66 { 62 {
67 "pagePath": "pages/my/my", 63 "pagePath": "pages/my/my",
68 "text": "我的", 64 "text": "我的",
@@ -101,6 +101,7 @@ Page({ @@ -101,6 +101,7 @@ Page({
101 icon: 'none', 101 icon: 'none',
102 duration: 1300 102 duration: 1300
103 }) 103 })
  104 +
104 } else { 105 } else {
105 a.post(u, d).then((r) => { 106 a.post(u, d).then((r) => {
106 if (r.code == 200) { 107 if (r.code == 200) {
@@ -49,57 +49,43 @@ @@ -49,57 +49,43 @@
49 </view> 49 </view>
50 </view> --> 50 </view> -->
51 <!-- 活动区域 --> 51 <!-- 活动区域 -->
52 - <view class="actity" wx:if="{{status1==1}}">  
53 - <!-- <view class="miaoshaoname">活动专区</view> -->  
54 -  
55 - <view class="active flexone">  
56 -  
57 - <view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">  
58 - <view class="activeitem">  
59 - <image src="{{item.image}}"></image> 52 + <view wx:if="{{nav_index==0}}">
  53 +
  54 + <view class="actity" wx:if="{{status1==1}}">
  55 + <!-- <view class="miaoshaoname">活动专区</view> -->
  56 + <view class="active flexone">
  57 + <view wx:for="{{activity}}" class="actbox" wx:key="" bindtap="seeactive" data-id="{{item.id}}">
  58 + <view class="activeitem">
  59 + <image src="{{item.image}}"></image>
  60 + </view>
  61 + <view class="activename">{{item.name}}</view>
60 </view> 62 </view>
61 - <view class="activename">{{item.name}}</view>  
62 - </view>  
63 -  
64 -  
65 -  
66 -  
67 - </view>  
68 - </view>  
69 -  
70 - <!-- 秒杀商城 -->  
71 - <!-- wx:if="{{activitystatus==3}}" -->  
72 -  
73 - <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">  
74 - <view class="miaoshatop flextwo">  
75 - <view class="miaoshatopleft flexone">  
76 - <view class="miaoshaoname">{{title2}}</view>  
77 - <!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> -->  
78 - </view>  
79 - <view class="miaosharight" bindtap="moremiao">  
80 - 查看更多>  
81 </view> 63 </view>
82 </view> 64 </view>
83 65
84 - <view class="miaoshalist">  
85 - <view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">  
86 - <view class="goodimg">  
87 - <image src="{{item.images[0]}}"></image> 66 + <!-- 秒杀商城 -->
  67 + <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}">
  68 + <view class="miaoshatop flextwo">
  69 + <view class="miaoshatopleft flexone">
  70 + <view class="miaoshaoname">{{title2}}</view>
  71 + <!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> -->
  72 + </view>
  73 + <view class="miaosharight" bindtap="moremiao">
  74 + 查看更多>
88 </view> 75 </view>
89 - 76 + </view>
  77 + <view class="miaoshalist">
  78 + <view class="miaoshalistitem" wx:for="{{xianshilist}}" wx:key="" bindtap="look_more" data-id="{{item.id}}">
  79 + <view class="goodimg">
  80 + <image src="{{item.images[0]}}"></image>
  81 + </view>
90 <view class="price">¥{{item.price2!=null?item.price2:item.price}}</view> 82 <view class="price">¥{{item.price2!=null?item.price2:item.price}}</view>
91 -  
92 - 83 + </view>
93 </view> 84 </view>
94 -  
95 </view> 85 </view>
96 86
97 -  
98 </view> 87 </view>
99 88
100 -  
101 -  
102 -  
103 <!-- 公告栏 --> 89 <!-- 公告栏 -->
104 <navigator class="notice" url="../notice/notice"> 90 <navigator class="notice" url="../notice/notice">
105 <image src="/images/notice.png" class="notice_tips" /> 91 <image src="/images/notice.png" class="notice_tips" />
@@ -297,7 +297,7 @@ image { @@ -297,7 +297,7 @@ image {
297 .notice_tips { 297 .notice_tips {
298 width: 72rpx; 298 width: 72rpx;
299 height: 72rpx; 299 height: 72rpx;
300 - margin-right: 56rpx; 300 + margin-right:30rpx;
301 } 301 }
302 302
303 .notice_word { 303 .notice_word {
@@ -323,10 +323,11 @@ image { @@ -323,10 +323,11 @@ image {
323 } 323 }
324 324
325 .notice_item .word { 325 .notice_item .word {
326 - max-width: 380rpx; 326 + max-width: 370rpx;
327 white-space: nowrap; 327 white-space: nowrap;
328 overflow: hidden; 328 overflow: hidden;
329 text-overflow: ellipsis; 329 text-overflow: ellipsis;
  330 + flex:1;
330 } 331 }
331 332
332 .notice_item .time { 333 .notice_item .time {
@@ -12,7 +12,7 @@ page { @@ -12,7 +12,7 @@ page {
12 .mssageitem { 12 .mssageitem {
13 padding: 32rpx 32rpx; 13 padding: 32rpx 32rpx;
14 box-sizing: border-box; 14 box-sizing: border-box;
15 - height: 145rpx; 15 +
16 border-radius: 10rpx; 16 border-radius: 10rpx;
17 border-bottom: 1rpx solid #f5f5f5; 17 border-bottom: 1rpx solid #f5f5f5;
18 } 18 }
@@ -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 + total:''
17 }, 18 },
18 //加减商品数量 19 //加减商品数量
19 num_change(e) { 20 num_change(e) {
@@ -32,11 +33,11 @@ Page({ @@ -32,11 +33,11 @@ Page({
32 if (num < 1) { 33 if (num < 1) {
33 return 34 return
34 } 35 }
35 - } 36 + }
36 that.setData({ 37 that.setData({
37 [`info.coudanProduct[${index}].num`]: num 38 [`info.coudanProduct[${index}].num`]: num
38 }) 39 })
39 - if (check){ 40 + if (check) {
40 coudan.forEach((item, index) => { 41 coudan.forEach((item, index) => {
41 if (item.id == id) { 42 if (item.id == id) {
42 item.num = num 43 item.num = num
@@ -49,12 +50,28 @@ Page({ @@ -49,12 +50,28 @@ Page({
49 // 计算凑单费用 50 // 计算凑单费用
50 get_choudan() { 51 get_choudan() {
51 let coudan_arr = this.data.coudan_arr 52 let coudan_arr = this.data.coudan_arr
52 - let choudan_money = 0  
53 - for (let obj of coudan_arr){  
54 - choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money 53 + let choudan_money = 0;
  54 +
  55 +
  56 + for (let obj of coudan_arr) {
  57 + console.log(obj)
  58 + console.log(obj.price2)
  59 + if (obj.price2!= null) {
  60 + console.log(111)
  61 + choudan_money = (obj.price2 * 100 * obj.num) / 100 + choudan_money
  62 + } else {
  63 + console.log(222)
  64 + choudan_money = (obj.price * 100 * obj.num) / 100 + choudan_money
  65 + }
55 } 66 }
  67 +
  68 + console.log(typeof (choudan_money))
  69 + console.log(choudan_money)
  70 +
  71 +
56 this.setData({ 72 this.setData({
57 - choudan_money: choudan_money 73 + choudan_money: choudan_money*100
  74 + // choudan_money: Math.floor(choudan_money* 100) / 100
58 }) 75 })
59 }, 76 },
60 show_cover() { 77 show_cover() {
@@ -98,13 +115,14 @@ Page({ @@ -98,13 +115,14 @@ Page({
98 let num = e.currentTarget.dataset.num 115 let num = e.currentTarget.dataset.num
99 let index = e.currentTarget.dataset.index 116 let index = e.currentTarget.dataset.index
100 let id = e.currentTarget.dataset.id 117 let id = e.currentTarget.dataset.id
101 - let price = e.currentTarget.dataset.price 118 + let price = e.currentTarget.dataset.price;
  119 + let price2 = e.currentTarget.dataset.price2;
102 if (check) { 120 if (check) {
103 check = 0 121 check = 0
104 coudan.forEach((item, index) => { 122 coudan.forEach((item, index) => {
105 if (item.id == id) { 123 if (item.id == id) {
106 coudan.splice(index, 1) 124 coudan.splice(index, 1)
107 - coudan_arr.splice(index,1) 125 + coudan_arr.splice(index, 1)
108 } 126 }
109 }) 127 })
110 } else { 128 } else {
@@ -117,7 +135,8 @@ Page({ @@ -117,7 +135,8 @@ Page({
117 coudan_arr.push({ 135 coudan_arr.push({
118 id: id, 136 id: id,
119 num: num, 137 num: num,
120 - price: Number(price) 138 + price: Number(price),
  139 + price2:Number(price2)
121 }) 140 })
122 } 141 }
123 that.setData({ 142 that.setData({
@@ -136,9 +155,21 @@ Page({ @@ -136,9 +155,21 @@ Page({
136 info: info 155 info: info
137 } 156 }
138 app.post(url, params).then((res) => { 157 app.post(url, params).then((res) => {
  158 + console.log('99999', res, Number(res.msg.total))
  159 +
  160 + res.msg.total = Number(res.msg.total * 100)
  161 + res.msg.yunfei = Number(res.msg.yunfei * 100)
  162 + let total = (res.msg.total + res.msg.yunfei).toFixed("1");
  163 + console.log(total)
  164 +
139 that.setData({ 165 that.setData({
140 - info: res.msg 166 + info: res.msg,
  167 + total:total
  168 +
141 }) 169 })
  170 +
  171 + console.log('9988756', that.data.info)
  172 +
142 }) 173 })
143 }, 174 },
144 175
@@ -153,7 +184,7 @@ Page({ @@ -153,7 +184,7 @@ Page({
153 } 184 }
154 app.post(url, params).then((res) => { 185 app.post(url, params).then((res) => {
155 that.setData({ 186 that.setData({
156 - "info.yunfei": res.msg.yunfei 187 + "info.yunfei": Number(res.msg.yunfei)
157 }) 188 })
158 }) 189 })
159 }, 190 },
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <view class='recommend' wx:if="{{info.coudanProduct.length>0}}"> 26 <view class='recommend' wx:if="{{info.coudanProduct.length>0}}">
27 <view class='re_one'>*您支付后还剩{{info.choudan}}积分为您推荐了以下凑单产品!</view> 27 <view class='re_one'>*您支付后还剩{{info.choudan}}积分为您推荐了以下凑单产品!</view>
28 <scroll-view class='re_goods' scroll-x scroll-left="0"> 28 <scroll-view class='re_goods' scroll-x scroll-left="0">
29 - <view class='re_item' wx:for='{{info.coudanProduct}}' wx:key='index' bindtap='chooseGoods' data-index="{{index}}" data-id="{{item.id}}" data-num="{{item.num?item.num:1}}" data-check='{{item.check}}' data-price='{{item.price}}'> 29 + <view class='re_item' wx:for='{{info.coudanProduct}}' wx:key='index' bindtap='chooseGoods' data-index="{{index}}" data-id="{{item.id}}" data-num="{{item.num?item.num:1}}" data-check='{{item.check}}' data-price='{{item.price}}' data-price2="{{item.price2}}">
30 <view class='re_re_item {{item.check?"active":""}}'> 30 <view class='re_re_item {{item.check?"active":""}}'>
31 <view class='triangle' wx:if='{{item.check}}'> 31 <view class='triangle' wx:if='{{item.check}}'>
32 <image src='/images/bingo.png' class='bingo'></image> 32 <image src='/images/bingo.png' class='bingo'></image>
@@ -36,7 +36,8 @@ @@ -36,7 +36,8 @@
36 </view> 36 </view>
37 <view class='re_bottom'> 37 <view class='re_bottom'>
38 <view class='re_re_name'>{{item.name}}</view> 38 <view class='re_re_name'>{{item.name}}</view>
39 - <view class='re_re_score'>{{item.price}}积分</view> 39 + <view class='re_re_score'wx:if="{{item.price!=null}}">{{item.price2}}积分</view>
  40 + <view class='re_re_score' wx:else>{{item.price}}积分</view>
40 </view> 41 </view>
41 42
42 <!-- 数量操作 --> 43 <!-- 数量操作 -->
@@ -63,7 +64,7 @@ @@ -63,7 +64,7 @@
63 64
64 <view class='mask_two'> 65 <view class='mask_two'>
65 <view>邮费</view> 66 <view>邮费</view>
66 - <view class='score' style="color:rgba(242, 0, 0, 1)">{{info.yunfei}}积分</view> 67 + <view class='score' style="color:rgba(242, 0, 0, 1)">{{info.yunfei/100}}积分</view>
67 </view> 68 </view>
68 </view> 69 </view>
69 </view> 70 </view>
@@ -72,7 +73,8 @@ @@ -72,7 +73,8 @@
72 <view class="footer"> 73 <view class="footer">
73 <view class="submit" catchtap="show_cover">提交</view> 74 <view class="submit" catchtap="show_cover">提交</view>
74 <view class="jifen"> 合计: 75 <view class="jifen"> 合计:
75 - <text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text> 76 + <!-- <text>{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</text> -->
  77 + <text>{{choudan_money?(choudan_money + info.total + info.yunfei)/100: (info.total + info.yunfei)/100}}积分</text>
76 </view> 78 </view>
77 <view class="num">共{{info.totalnum}}件</view> 79 <view class="num">共{{info.totalnum}}件</view>
78 </view> 80 </view>
@@ -106,14 +108,14 @@ @@ -106,14 +108,14 @@
106 108
107 <view class="cover_box" wx:if="{{cover_type}}"> 109 <view class="cover_box" wx:if="{{cover_type}}">
108 <view class="cover_order"> 110 <view class="cover_order">
109 - <view class="all_money">{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</view> 111 + <view class="all_money">{{choudan_money?(choudan_money + total)/100: (total)/100}}积分</view>
110 <view class="money_item"> 112 <view class="money_item">
111 <text>商品积分</text> 113 <text>商品积分</text>
112 - <text>{{choudan_money?choudan_money + info.total:info.total}}积分</text> 114 + <text>{{choudan_money?(choudan_money + info.total)/100:info.total/100}}积分</text>
113 </view> 115 </view>
114 <view class="money_item"> 116 <view class="money_item">
115 <text>邮费</text> 117 <text>邮费</text>
116 - <text>{{info.yunfei}}积分</text> 118 + <text>{{info.yunfei/100}}积分</text>
117 </view> 119 </view>
118 <view class="cover_submit" catchtap="submit">确认支付</view> 120 <view class="cover_submit" catchtap="submit">确认支付</view>
119 <image src="/images/close.png" class="cover_close" catchtap="show_cover" /> 121 <image src="/images/close.png" class="cover_close" catchtap="show_cover" />
@@ -40,11 +40,54 @@ Page({ @@ -40,11 +40,54 @@ Page({
40 }) 40 })
41 }, 41 },
42 //查看订单详情 42 //查看订单详情
43 - look_detail(e) {  
44 - console.log(6666)  
45 - wx.navigateTo({  
46 - url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id+'&type='+e.currentTarget.dataset.type, 43 + orderagain(e) {
  44 + let item=e.currentTarget.dataset.item;
  45 + let num=e.currentTarget.dataset.num;
  46 + let goodid=[]
  47 + item.forEach(function(value,index,array){
  48 + goodid.push(value.id)
47 }) 49 })
  50 +
  51 + let that = this
  52 + let url = a.interface.addshop
  53 + let params = {
  54 + num: num,
  55 + product_id: goodid.join(",")
  56 + }
  57 + a.post(url, params).then((res) => {
  58 + // that.setData({
  59 + // "info.shop": Number(that.data.info.shop) + that.data.num,
  60 + // num: 1
  61 + // })
  62 + wx.showModal({
  63 + title: '提示',
  64 + content: '加入成功,是否跳到购物车',
  65 + success(res) {
  66 + if (res.confirm) {
  67 + console.log('用户点击确定')
  68 + wx.switchTab({
  69 + url: '/pages/shop_cart/shop_cart',
  70 + })
  71 +
  72 +
  73 + } else if (res.cancel) {
  74 +
  75 + }
  76 + }
  77 + })
  78 +
  79 +
  80 +
  81 + // wx.switchTab({
  82 + // url: '/pages/shop_cart/shop_cart',
  83 + // })
  84 + })
  85 +
  86 +
  87 + // console.log(6666)
  88 + // wx.navigateTo({
  89 + // url: '/pages/order/order_detail/order_detail?id=' + e.currentTarget.dataset.id+'&type='+e.currentTarget.dataset.type,
  90 + // })
48 }, 91 },
49 /** 92 /**
50 * 生命周期函数--监听页面加载 93 * 生命周期函数--监听页面加载
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 <view class='score'>{{item.address_name}}</view> 38 <view class='score'>{{item.address_name}}</view>
39 </view> 39 </view>
40 <view class='mask_two'> 40 <view class='mask_two'>
41 - <view>收电话:</view> 41 + <view>收货电话</view>
42 <view class='score'>{{item.address_mobile}}</view> 42 <view class='score'>{{item.address_mobile}}</view>
43 </view> 43 </view>
44 44
@@ -105,7 +105,7 @@ @@ -105,7 +105,7 @@
105 <view class='score'>{{item.address_name}}</view> 105 <view class='score'>{{item.address_name}}</view>
106 </view> 106 </view>
107 <view class='mask_two'> 107 <view class='mask_two'>
108 - <view>收电话:</view> 108 + <view>收货电话</view>
109 <view class='score'>{{item.address_mobile}}</view> 109 <view class='score'>{{item.address_mobile}}</view>
110 </view> 110 </view>
111 111
@@ -118,7 +118,7 @@ @@ -118,7 +118,7 @@
118 <view class='score'>{{item.youfei}}积分</view> 118 <view class='score'>{{item.youfei}}积分</view>
119 </view> 119 </view>
120 <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> 121 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
122 <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>
123 <view style='clear:both;'></view> 123 <view style='clear:both;'></view>
124 </view> 124 </view>
@@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
167 <view class='score'>{{item.address_name}}</view> 167 <view class='score'>{{item.address_name}}</view>
168 </view> 168 </view>
169 <view class='mask_two'> 169 <view class='mask_two'>
170 - <view>收电话:</view> 170 + <view>收货电话</view>
171 <view class='score'>{{item.address_mobile}}</view> 171 <view class='score'>{{item.address_mobile}}</view>
172 </view> 172 </view>
173 173
@@ -188,7 +188,7 @@ @@ -188,7 +188,7 @@
188 </view> 188 </view>
189 </view> 189 </view>
190 <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> 191 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
192 <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>
193 <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>
194 <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>
@@ -236,7 +236,7 @@ @@ -236,7 +236,7 @@
236 <view class='score'>{{item.address_name}}</view> 236 <view class='score'>{{item.address_name}}</view>
237 </view> 237 </view>
238 <view class='mask_two'> 238 <view class='mask_two'>
239 - <view>收电话:</view> 239 + <view>收货电话</view>
240 <view class='score'>{{item.address_mobile}}</view> 240 <view class='score'>{{item.address_mobile}}</view>
241 </view> 241 </view>
242 242
@@ -259,7 +259,7 @@ @@ -259,7 +259,7 @@
259 259
260 <view class='btn_box'> 260 <view class='btn_box'>
261 261
262 - <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="look_detail" data-id="{{item.id}}" data-type="2">再来一单</view> 262 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
263 263
264 <view class='cancel_order' catchtap="delete_item" data-d="{{item.order_odd}}">删除</view> 264 <view class='cancel_order' catchtap="delete_item" data-d="{{item.order_odd}}">删除</view>
265 <view style='clear:both;'></view> 265 <view style='clear:both;'></view>
@@ -304,7 +304,7 @@ @@ -304,7 +304,7 @@
304 <view class='score'>{{item.address_name}}</view> 304 <view class='score'>{{item.address_name}}</view>
305 </view> 305 </view>
306 <view class='mask_two'> 306 <view class='mask_two'>
307 - <view>收电话:</view> 307 + <view>收货电话</view>
308 <view class='score'>{{item.address_mobile}}</view> 308 <view class='score'>{{item.address_mobile}}</view>
309 </view> 309 </view>
310 310
@@ -326,7 +326,7 @@ @@ -326,7 +326,7 @@
326 </view> 326 </view>
327 <view class='btn_box'> 327 <view class='btn_box'>
328 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> 329 + <view class='go_pay' data-d="{{item.order_odd}}" data-t="2" bindtap="orderagain" data-id="{{item.id}}" data-type="2" data-item="{{item.orderitem}}" data-num="{{item.total_num}}">再来一单</view>
330 330
331 <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>
332 <view style='clear:both;'></view> 332 <view style='clear:both;'></view>
@@ -189,7 +189,7 @@ page { @@ -189,7 +189,7 @@ page {
189 } 189 }
190 190
191 .score { 191 .score {
192 - width: 500rpx; 192 + width: 419rpx;
193 overflow: hidden; 193 overflow: hidden;
194 text-overflow: ellipsis; 194 text-overflow: ellipsis;
195 white-space: nowrap; 195 white-space: nowrap;
@@ -129,7 +129,12 @@ Page({ @@ -129,7 +129,12 @@ Page({
129 for (let obj of list) { 129 for (let obj of list) {
130 if (obj.check_type) { 130 if (obj.check_type) {
131 all_num = obj.num + all_num 131 all_num = obj.num + all_num
132 - var item_integral = Number(obj.product.price) * 100 * Number(obj.num) / 100 132 + if (obj.product.price2!=null){
  133 + var item_integral = Number(obj.product.price2) * 100 * Number(obj.num) / 100
  134 + }else{
  135 + var item_integral = Number(obj.product.price) * 100 * Number(obj.num) / 100
  136 + }
  137 +
133 integral = integral + item_integral 138 integral = integral + item_integral
134 139
135 } 140 }
@@ -68,15 +68,15 @@ @@ -68,15 +68,15 @@
68 <view wx:if="{{info.price2!=null}}"> 68 <view wx:if="{{info.price2!=null}}">
69 <view class='two_ones'> 69 <view class='two_ones'>
70 <view class='scores'>积分</view> 70 <view class='scores'>积分</view>
71 - <view class='prices'>{{info.price}}</view> 71 + <view class='prices'>{{info.price2}}</view>
72 </view> 72 </view>
73 - <view class="oldprice">{{info.price2}}</view> 73 + <view class="oldprice">{{info.price}}</view>
74 </view> 74 </view>
75 75
76 76
77 <view class='two_ones' wx:else> 77 <view class='two_ones' wx:else>
78 <view class='scores'>积分</view> 78 <view class='scores'>积分</view>
79 - <view class='prices'>{{info.price2}}</view> 79 + <view class='prices'>{{info.price}}</view>
80 </view> 80 </view>
81 </view> 81 </view>
82 </view> 82 </view>
  1 +// pages/startindex/startindex.js
  2 +const app = getApp()
  3 +Page({
  4 +
  5 + /**
  6 + * 页面的初始数据
  7 + */
  8 + data: {
  9 + thumbnail: '',
  10 + sec:'',
  11 + endTime:''
  12 + },
  13 +
  14 + /**
  15 + * 生命周期函数--监听页面加载
  16 + */
  17 + onLoad: function (options) {
  18 +
  19 + },
  20 +
  21 + getpic() {
  22 + let that = this;
  23 + var url = '/wb/advertising';
  24 + var params = {
  25 +
  26 + }
  27 + app.post(url, params).then((res) => {
  28 + console.log(res);
  29 + that.setData({
  30 + thumbnail: res.msg.image,
  31 + endTime: res.msg.sec
  32 + })
  33 +
  34 + that.countDown()
  35 + }).catch((err) => {
  36 +
  37 + })
  38 +
  39 + },
  40 + jump(){
  41 + wx.switchTab({
  42 +
  43 + url: '/pages/index/index',
  44 + })
  45 + },
  46 +
  47 + // 倒计时
  48 + countDown() {
  49 + console.log(788)
  50 + var that = this;
  51 +
  52 + var time = that.data.endTime;
  53 + var interval = setInterval(function () {
  54 + // 秒数
  55 + let day = parseInt(time / (60 * 60 * 24));
  56 + let hou = parseInt(time % (60 * 60 * 24) / 3600);
  57 + let min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
  58 + let sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
  59 +
  60 + that.setData({
  61 + // day: that.timeFormat(day),
  62 + // hou: that.timeFormat(hou),
  63 + // min: that.timeFormat(min),
  64 + sec: sec
  65 + })
  66 +
  67 + time--;
  68 + if (time <= 0) {
  69 + clearInterval(interval);
  70 + wx.switchTab({
  71 + url: '/pages/index/index',
  72 + })
  73 +
  74 + }
  75 + }.bind(this), 1000);
  76 + },
  77 +
  78 +
  79 + // timeFormat(param) {
  80 + // return param < 10 ? '0' + param : param;
  81 + // },
  82 + /**
  83 + * 生命周期函数--监听页面初次渲染完成
  84 + */
  85 + onReady: function () {
  86 +
  87 + },
  88 +
  89 + /**
  90 + * 生命周期函数--监听页面显示
  91 + */
  92 + onShow: function () {
  93 + let that = this;
  94 + that.getpic()
  95 + setTimeout(function () {
  96 + wx.navigateTo({
  97 +
  98 + url: '/pages/homepage/homepage',
  99 + })
  100 + }, 2500)
  101 + },
  102 +
  103 + /**
  104 + * 生命周期函数--监听页面隐藏
  105 + */
  106 + onHide: function () {
  107 +
  108 + },
  109 +
  110 + /**
  111 + * 生命周期函数--监听页面卸载
  112 + */
  113 + onUnload: function () {
  114 +
  115 + },
  116 +
  117 + /**
  118 + * 页面相关事件处理函数--监听用户下拉动作
  119 + */
  120 + onPullDownRefresh: function () {
  121 +
  122 + },
  123 +
  124 + /**
  125 + * 页面上拉触底事件的处理函数
  126 + */
  127 + onReachBottom: function () {
  128 +
  129 + },
  130 +
  131 + /**
  132 + * 用户点击右上角分享
  133 + */
  134 + onShareAppMessage: function () {
  135 +
  136 + }
  137 +})
  1 +{
  2 + "usingComponents": {},
  3 + "navigationStyle": "custom"
  4 +}
  1 +<view class="pagebox">
  2 +
  3 + <image src="{{thumbnail}}"></image>
  4 +
  5 + <view class="jump" bindtap="jump">{{sec}}跳过</view>
  6 +
  7 +</view>
  1 +page {
  2 + width: 750rpx;
  3 + height: 100%;
  4 + overflow-y: hidden;
  5 +}
  6 +
  7 +.pagebox {
  8 + width: 750rpx;
  9 + height: 100%;
  10 +}
  11 +
  12 +image {
  13 + width: 100%;
  14 + height: 100%;
  15 +}
  16 +
  17 +.jump {
  18 + width: 150rpx;
  19 + height: 50rpx;
  20 + border-radius: 40rpx;
  21 + color: #fff;
  22 + font-size: 24rpx;
  23 + text-align: center;
  24 + line-height: 50rpx;
  25 + background: #333;
  26 + opacity: 0.5;
  27 + position: absolute;
  28 + top: 135rpx;
  29 + right: 35rpx;
  30 + letter-spacing: 6rpx;
  31 +}
@@ -29,10 +29,10 @@ @@ -29,10 +29,10 @@
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 + <!-- x{{item.sold}} -->
  33 + <view class="commontwo ">{{item.name}} <text class="sold"></text></view>
33 <view class="leftbottom flexone "> 34 <view class="leftbottom flexone ">
34 - <view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>  
35 - 35 + <view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>
36 </view> 36 </view>
37 </view> 37 </view>
38 38
@@ -142,7 +142,7 @@ Page({ @@ -142,7 +142,7 @@ Page({
142 console.log(res) 142 console.log(res)
143 that.setData({ 143 that.setData({
144 info: res.msg, 144 info: res.msg,
145 - totalmoney: Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100) 145 + totalmoney: (Number(res.msg.total) + Number(res.msg.yunfei * 100 / 100)).toFixed("1")
146 }) 146 })
147 console.log('999',that.data.totalmoney) 147 console.log('999',that.data.totalmoney)
148 148
@@ -28,7 +28,8 @@ @@ -28,7 +28,8 @@
28 <image src="{{item.images[0]}}" mode="widthFix "></image> 28 <image src="{{item.images[0]}}" mode="widthFix "></image>
29 </view> 29 </view>
30 <view class="listleft "> 30 <view class="listleft ">
31 - <view class="commontwo ">{{item.name}} <text class="sold">x{{item.sold}}</text></view> 31 + <!-- x{{item.sold}} -->
  32 + <view class="commontwo ">{{item.name}} <text class="sold"></text></view>
32 <view class="leftbottom flexone "> 33 <view class="leftbottom flexone ">
33 <view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view> 34 <view class="botleft ">¥{{item.price2==null?item.price:item.price2}}</view>
34 35
@@ -121,7 +122,7 @@ @@ -121,7 +122,7 @@
121 122
122 <view class="cover_box" wx:if="{{cover_type}}"> 123 <view class="cover_box" wx:if="{{cover_type}}">
123 <view class="cover_order"> 124 <view class="cover_order">
124 - <view class="all_money">{{choudan_money?choudan_money + info.total + info.yunfei*100/100: info.total + info.yunfei*100/100}}积分</view> 125 + <view class="all_money">{{choudan_money?choudan_money + totalmoney: totalmoney}}积分</view>
125 <view class="money_item"> 126 <view class="money_item">
126 <text>商品积分</text> 127 <text>商品积分</text>
127 <text>{{choudan_money?choudan_money + info.total:info.total}}积分</text> 128 <text>{{choudan_money?choudan_money + info.total:info.total}}积分</text>
@@ -495,7 +495,8 @@ page { @@ -495,7 +495,8 @@ page {
495 background: #fff; 495 background: #fff;
496 } 496 }
497 .listleft{ 497 .listleft{
498 - margin-left:10rpx; 498 + width:500rpx;
  499 + /* margin-left:10rpx; */
499 } 500 }
500 .commontwo { 501 .commontwo {
501 color: #232323; 502 color: #232323;
@@ -518,7 +519,7 @@ image{ @@ -518,7 +519,7 @@ image{
518 width: 218rpx; 519 width: 218rpx;
519 height: 156rpx; 520 height: 156rpx;
520 font-size: 0; 521 font-size: 0;
521 - margin-left: 32rpx; 522 + margin-right: 32rpx;
522 } 523 }
523 524
524 .leftbottom { 525 .leftbottom {
@@ -22,8 +22,14 @@ @@ -22,8 +22,14 @@
22 <view class="goodsouname morehidden">{{item.name}}</view> 22 <view class="goodsouname morehidden">{{item.name}}</view>
23 23
24 <view class="miaogood flextwo"> 24 <view class="miaogood flextwo">
25 - <view class="miaogoodleft">  
26 - <view class="saleprice">¥288</view> 25 + <view class="miaogoodleft flexone" wx:if="{{item.price2!=null}}">
  26 + <view class="saleprice" >¥{{item.price2}}</view>
  27 + <view class=" oldprice">¥{{item.price}}</view>
  28 + <!-- <view class="yuansaleprice">¥{{}}</view> -->
  29 + </view>
  30 + <view class="miaogoodleft flexone" wx:else>
  31 + <view class="saleprice" >¥{{item.price}}</view>
  32 +
27 <!-- <view class="yuansaleprice">¥{{}}</view> --> 33 <!-- <view class="yuansaleprice">¥{{}}</view> -->
28 </view> 34 </view>
29 <view class="buynow buyactive" wx:if="{{status==1}}">未开始</view> 35 <view class="buynow buyactive" wx:if="{{status==1}}">未开始</view>
@@ -74,6 +74,11 @@ @@ -74,6 +74,11 @@
74 margin-top:8rpx; 74 margin-top:8rpx;
75 text-decoration: line-through; 75 text-decoration: line-through;
76 } 76 }
  77 +.saleprice{
  78 + font-size: 28rpx;
  79 +}
  80 +.oldprice{
  81 + margin-left:20rpx;}
77 .buynow{ 82 .buynow{
78 width:150rpx; 83 width:150rpx;
79 height:60rpx; 84 height:60rpx;
@@ -110,7 +115,7 @@ @@ -110,7 +115,7 @@
110 width:200rpx; 115 width:200rpx;
111 height:200rpx; 116 height:200rpx;
112 font-size: 0; 117 font-size: 0;
113 - margin-right:20rpx; 118 + margin-right:40rpx;
114 flex:0 0 auto; 119 flex:0 0 auto;
115 overflow: hidden 120 overflow: hidden
116 121