正在显示
17 个修改的文件
包含
569 行增加
和
264 行删除
1 | //app.js | 1 | //app.js |
2 | App({ | 2 | App({ |
3 | onLaunch: function () { | 3 | onLaunch: function () { |
4 | + | ||
5 | + wx.getSystemInfo({ | ||
6 | + success: res => { | ||
7 | + //导航高度 | ||
8 | + this.globalData.navHeight = res.statusBarHeight + 46; | ||
9 | + }, fail(err) { | ||
10 | + console.log(err); | ||
11 | + } | ||
12 | + }) | ||
13 | + | ||
4 | // 展示本地存储能力 | 14 | // 展示本地存储能力 |
5 | var logs = wx.getStorageSync('logs') || [] | 15 | var logs = wx.getStorageSync('logs') || [] |
6 | logs.unshift(Date.now()) | 16 | logs.unshift(Date.now()) |
@@ -218,6 +228,7 @@ App({ | @@ -218,6 +228,7 @@ App({ | ||
218 | globalData: { | 228 | globalData: { |
219 | userInfo: null, | 229 | userInfo: null, |
220 | cid: null, | 230 | cid: null, |
221 | - class_id: null | 231 | + class_id: null, |
232 | + navHeight: 0 | ||
222 | } | 233 | } |
223 | }) | 234 | }) |
1 | { | 1 | { |
2 | "pages": [ | 2 | "pages": [ |
3 | + | ||
3 | "pages/index/index", | 4 | "pages/index/index", |
5 | + "pages/mine/eOrder/eOrder", | ||
4 | "pages/homeindex/homeindex", | 6 | "pages/homeindex/homeindex", |
5 | "pages/kind/kind", | 7 | "pages/kind/kind", |
6 | "pages/homeindex/search/search", | 8 | "pages/homeindex/search/search", |
@@ -10,7 +12,6 @@ | @@ -10,7 +12,6 @@ | ||
10 | "pages/kind/firm_order1/firm_order1", | 12 | "pages/kind/firm_order1/firm_order1", |
11 | "pages/kind/success/success", | 13 | "pages/kind/success/success", |
12 | "pages/mine/contactUs/contactUs", | 14 | "pages/mine/contactUs/contactUs", |
13 | - "pages/mine/eOrder/eOrder", | ||
14 | "pages/mine/myOrder/myOrder", | 15 | "pages/mine/myOrder/myOrder", |
15 | "pages/mine/addr_2/addr_2", | 16 | "pages/mine/addr_2/addr_2", |
16 | "pages/mine/addr_1/addr_1", | 17 | "pages/mine/addr_1/addr_1", |
@@ -28,3 +28,27 @@ | @@ -28,3 +28,27 @@ | ||
28 | .icon-kefu:before { | 28 | .icon-kefu:before { |
29 | content: "\e658"; | 29 | content: "\e658"; |
30 | } | 30 | } |
31 | + | ||
32 | + | ||
33 | +.ping{ | ||
34 | + display:flex; | ||
35 | + justify-content: center | ||
36 | +} | ||
37 | +.noorder{ | ||
38 | + width:270rpx; | ||
39 | + height:270rpx; | ||
40 | + font-size: 0; | ||
41 | + margin:0 auto; | ||
42 | + | ||
43 | + | ||
44 | +} | ||
45 | +.noorder image{ | ||
46 | + width:100%; | ||
47 | + height:100%; | ||
48 | +} | ||
49 | +.noordertitle{ | ||
50 | + color:#999999; | ||
51 | + font-size: 26rpx; | ||
52 | + text-align: center; | ||
53 | + margin-top:20rpx | ||
54 | +} |
@@ -20,7 +20,8 @@ Page({ | @@ -20,7 +20,8 @@ Page({ | ||
20 | seconds: 0, | 20 | seconds: 0, |
21 | over:true, | 21 | over:true, |
22 | short:[], | 22 | short:[], |
23 | - seemore:true | 23 | + seemore:true, |
24 | + images:[] | ||
24 | }, | 25 | }, |
25 | 26 | ||
26 | /** | 27 | /** |
@@ -35,6 +36,45 @@ Page({ | @@ -35,6 +36,45 @@ Page({ | ||
35 | this.detaiFun(options.id) | 36 | this.detaiFun(options.id) |
36 | 37 | ||
37 | }, | 38 | }, |
39 | + slectpic(e){ | ||
40 | + let that=this; | ||
41 | + console.log(e) | ||
42 | + let idx=e.currentTarget.dataset.idx; | ||
43 | + let newassess = that.data.assess; | ||
44 | + for (var i = 0; i < newassess.length;i++){ | ||
45 | + if(i==idx){ | ||
46 | + that.setData({ | ||
47 | + images: newassess[i].img | ||
48 | + }) | ||
49 | + } | ||
50 | + | ||
51 | + } | ||
52 | + | ||
53 | + console.log(that.data.images) | ||
54 | + }, | ||
55 | + | ||
56 | + // 图片预览 | ||
57 | + previewImage: function (e) { | ||
58 | + | ||
59 | + let that = this; | ||
60 | + console.log(e) | ||
61 | + let idx = e.currentTarget.dataset.idx; | ||
62 | + let newassess = that.data.assess; | ||
63 | + for (var i = 0; i < newassess.length; i++) { | ||
64 | + if (i == idx) { | ||
65 | + that.setData({ | ||
66 | + images: newassess[i].img | ||
67 | + }) | ||
68 | + } | ||
69 | + | ||
70 | + } | ||
71 | + | ||
72 | + var current = e.target.dataset.src | ||
73 | + wx.previewImage({ | ||
74 | + current: current, | ||
75 | + urls: this.data.images | ||
76 | + }) | ||
77 | + }, | ||
38 | 78 | ||
39 | //已成团 | 79 | //已成团 |
40 | group(){ | 80 | group(){ |
@@ -51,9 +91,32 @@ Page({ | @@ -51,9 +91,32 @@ Page({ | ||
51 | }) | 91 | }) |
52 | }, | 92 | }, |
53 | moresee(){ | 93 | moresee(){ |
54 | - this.setData({ | 94 | + let that = this; |
95 | + that.setData({ | ||
55 | seemore:false | 96 | seemore:false |
56 | }) | 97 | }) |
98 | + | ||
99 | + | ||
100 | + let url = "home/index/shopMessage"; | ||
101 | + let header = { | ||
102 | + "XX-Token": wx.getStorageSync('token'), | ||
103 | + "XX-Device-Type": 'wxapp' | ||
104 | + } | ||
105 | + let params = { | ||
106 | + shop_id: that.data.detail_id, | ||
107 | + } | ||
108 | + app.post(url, params, header).then((res) => { | ||
109 | + console.log(res) | ||
110 | + let masarr = [] | ||
111 | + | ||
112 | + that.setData({ | ||
113 | + // short: masarr, | ||
114 | + //assess: res.data | ||
115 | + assess:res.data | ||
116 | + }) | ||
117 | + }).catch((err) => { | ||
118 | + console.log(err) | ||
119 | + }) | ||
57 | }, | 120 | }, |
58 | 121 | ||
59 | 122 | ||
@@ -163,15 +226,18 @@ Page({ | @@ -163,15 +226,18 @@ Page({ | ||
163 | console.log(res) | 226 | console.log(res) |
164 | let masarr=[] | 227 | let masarr=[] |
165 | for (var i = 0; i < res.data.length;i++){ | 228 | for (var i = 0; i < res.data.length;i++){ |
166 | - if(i<10){ | 229 | + if(i<5){ |
167 | masarr.push(res.data[i]) | 230 | masarr.push(res.data[i]) |
168 | } | 231 | } |
169 | 232 | ||
170 | } | 233 | } |
171 | that.setData({ | 234 | that.setData({ |
172 | - short: masarr, | ||
173 | - assess: res.data | 235 | + // short: masarr, |
236 | + //assess: res.data | ||
237 | + assess: masarr | ||
174 | }) | 238 | }) |
239 | + | ||
240 | + console.log(that.data.assess) | ||
175 | }).catch((err) => { | 241 | }).catch((err) => { |
176 | console.log(err) | 242 | console.log(err) |
177 | }) | 243 | }) |
@@ -3,176 +3,200 @@ | @@ -3,176 +3,200 @@ | ||
3 | 3 | ||
4 | <view class="pagecontainer"> | 4 | <view class="pagecontainer"> |
5 | 5 | ||
6 | -<import src="../../../wxParse/wxParse.wxml" /> | ||
7 | -<view class='container'> | ||
8 | - <view class='ware_box'> | ||
9 | - <view class='ware_top'> | ||
10 | - <view class='ware_1'> | ||
11 | - <image src='{{detailCon.thumb}}'></image> | ||
12 | - | ||
13 | - <view wx:if="{{over}}"> | ||
14 | - <view class='ware_1_time' wx:if="{{detailCon.percent!=100}}"> | ||
15 | - {{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒 | ||
16 | - </view> | 6 | + <import src="../../../wxParse/wxParse.wxml" /> |
7 | + <view class='container'> | ||
8 | + <view class='ware_box'> | ||
9 | + <view class='ware_top'> | ||
10 | + <view class='ware_1'> | ||
11 | + <image src='{{detailCon.thumb}}'></image> | ||
17 | 12 | ||
18 | - <view class='ware_1_time' wx:else>已成团</view> | ||
19 | - </view> | ||
20 | - | ||
21 | - <view class='ware_1_over' wx:else> | ||
22 | - <!-- {{detailCon.open_time}} --> | ||
23 | - 已结束 | ||
24 | - </view> | ||
25 | - </view> | ||
26 | - <view class='ware_text'> | ||
27 | - <view class='ware_2'> | ||
28 | - <text class='ware_2Txt1'>{{detailCon.name}}</text> | ||
29 | - <text class='ware_2Txt2'>产地:{{detailCon.origin}}</text> | ||
30 | - </view> | ||
31 | - <view class='ware_3'> | ||
32 | - <progress percent="{{detailCon.percent}}" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" /> | ||
33 | - </view> | ||
34 | - <view class='ware_4'> | ||
35 | - <text>已拼{{detailCon.numb}}份,目标{{detailCon.group}}份</text> | 13 | + <view wx:if="{{over}}"> |
14 | + <view class='ware_1_time' wx:if="{{detailCon.percent!=100}}"> | ||
15 | + {{days}}天{{hours}}小时{{minutes}}分{{seconds}}秒 | ||
16 | + </view> | ||
17 | + | ||
18 | + <view class='ware_1_time' wx:else>已成团</view> | ||
19 | + </view> | ||
20 | + | ||
21 | + <view class='ware_1_over' wx:else> | ||
22 | + <!-- {{detailCon.open_time}} --> | ||
23 | + 已结束 | ||
24 | + </view> | ||
36 | </view> | 25 | </view> |
37 | - <view class='ware_5'> | ||
38 | - <view> | ||
39 | - <text class='ware5_t1'>¥{{detailCon.money_sale}}/</text> | ||
40 | - <text class='ware5_t2'>{{detailCon.shop_type}}</text> | 26 | + <view class='ware_text'> |
27 | + <view class='ware_2'> | ||
28 | + <text class='ware_2Txt1'>{{detailCon.name}}</text> | ||
29 | + <text class='ware_2Txt2'>产地:{{detailCon.origin}}</text> | ||
41 | </view> | 30 | </view> |
42 | - <view class='ware5_box'> | ||
43 | - <view class='ware5_t3'>{{detailCon.text_table}}</view> | ||
44 | - <view class='ware5_t4'>{{detailCon.text_content}}</view> | 31 | + <view class='ware_3'> |
32 | + <progress percent="{{detailCon.percent}}" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" /> | ||
45 | </view> | 33 | </view> |
46 | - | ||
47 | - <view wx:if="{{over}}"> | ||
48 | - <view class='ware_6' bindtap='goConfirm' wx:if="{{detailCon.percent!=100}}"> | ||
49 | - 立即参团 | 34 | + <view class='ware_4'> |
35 | + <text>已拼{{detailCon.numb}}份,目标{{detailCon.group}}份</text> | ||
50 | </view> | 36 | </view> |
37 | + <view class='ware_5'> | ||
38 | + <view> | ||
39 | + <text class='ware5_t1'>¥{{detailCon.money_sale}}/</text> | ||
40 | + <text class='ware5_t2'>{{detailCon.shop_type}}</text> | ||
41 | + </view> | ||
42 | + <view class='ware5_box'> | ||
43 | + <view class='ware5_t3'>{{detailCon.text_table}}</view> | ||
44 | + <view class='ware5_t4'>{{detailCon.text_content}}</view> | ||
45 | + </view> | ||
51 | 46 | ||
52 | - <view class='ware_6' wx:else>已成团</view> | ||
53 | - </view> | ||
54 | - | 47 | + <view wx:if="{{over}}"> |
48 | + <view class='ware_6' bindtap='goConfirm' wx:if="{{detailCon.percent!=100}}"> | ||
49 | + 立即参团 | ||
50 | + </view> | ||
51 | + | ||
52 | + <view class='ware_6' wx:else>已成团</view> | ||
53 | + </view> | ||
55 | 54 | ||
56 | - <view class="waretext" wx:else>活动结束</view> | 55 | + |
56 | + <view class="waretext" wx:else>活动结束</view> | ||
57 | + </view> | ||
57 | </view> | 58 | </view> |
58 | </view> | 59 | </view> |
59 | - </view> | ||
60 | - <view class='ware_bot'> | ||
61 | - <view class='ware_bot_tit'>经典推荐</view> | ||
62 | - <view class='ware_bot_txt'>{{detailCon.recommend}}</view> | 60 | + <view class='ware_bot'> |
61 | + <view class='ware_bot_tit'>经典推荐</view> | ||
62 | + <view class='ware_bot_txt'>{{detailCon.recommend}}</view> | ||
63 | + </view> | ||
63 | </view> | 64 | </view> |
64 | </view> | 65 | </view> |
65 | -</view> | ||
66 | -<!-- 商品规格 --> | ||
67 | -<view class='spec'> | ||
68 | - <view class='spec_txt'>商品规格</view> | ||
69 | - <view class='spec_txt2'>{{detailCon.shop_type1}}</view> | ||
70 | -</view> | ||
71 | -<!-- 商品详情 --> | ||
72 | -<view class='ware_detail'> | ||
73 | - <view class='ware_detail_tit'> | ||
74 | - <view class="ware_detail_box {{index == 1 ? 'ware_active' : ''}}" bindtap='goy' data-id="1">商品详情</view> | ||
75 | - <view class="ware_detail_box {{index == 2 ? 'ware_active' : ''}}" bindtap='goy' data-id="2">用户评价</view> | 66 | + <!-- 商品规格 --> |
67 | + <view class='spec'> | ||
68 | + <view class='spec_txt'>商品规格</view> | ||
69 | + <view class='spec_txt2'>{{detailCon.shop_type1}}</view> | ||
76 | </view> | 70 | </view> |
77 | - <view class='ware_detailC'> | ||
78 | - <view class='ware_detailImg' wx:if="{{index == 1}}"> | ||
79 | - | ||
80 | - <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}" /> --> | ||
81 | - <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | 71 | + <!-- 商品详情 --> |
72 | + <view class='ware_detail'> | ||
73 | + <view class='ware_detail_tit'> | ||
74 | + <view class="ware_detail_box {{index == 1 ? 'ware_active' : ''}}" bindtap='goy' data-id="1">商品详情</view> | ||
75 | + <view class="ware_detail_box {{index == 2 ? 'ware_active' : ''}}" bindtap='goy' data-id="2">用户评价</view> | ||
82 | </view> | 76 | </view> |
83 | - <!-- 用户评价 --> | ||
84 | - <view class='ware_assess' wx:if="{{index == 2}}"> | ||
85 | - <view class='ware_assess_li' wx:for="{{assess}}" wx:key="index"> | ||
86 | - <view class='assess_header'> | ||
87 | - <view class='assess_headerImg'> | ||
88 | - <image src='{{item.avatar}}'></image> | ||
89 | - </view> | ||
90 | - <view class='assess_headerTxt'>{{item.user_nickname}}</view> | ||
91 | - </view> | ||
92 | - <view class='assess_say'> | ||
93 | - {{item.text}} | ||
94 | - </view> | ||
95 | - <block wx:if="{{item.img.length!=0}}"> | ||
96 | - <view class='ware_pic' wx:for="{{item.img}}" wx:key=''> | ||
97 | - <view class='ware_picBox'> | ||
98 | - <image src='{{item}}'></image> | 77 | + <view class='ware_detailC'> |
78 | + <view class='ware_detailImg' wx:if="{{index == 1}}"> | ||
79 | + | ||
80 | + <!-- <template is="wxParse" data="{{wxParseData:content.nodes}}" /> --> | ||
81 | + <template is="wxParse" data="{{wxParseData:article.nodes}}" /> | ||
82 | + </view> | ||
83 | + <!-- 用户评价 --> | ||
84 | + <view class='ware_assess' wx:if="{{index == 2}}"> | ||
85 | + | ||
86 | + <view class="noping" wx:if="{{assess.length==0}}"> | ||
87 | + <view class="noorder"> | ||
88 | + <image src="/img/noorder.png" mode="widthFix"></image> | ||
99 | </view> | 89 | </view> |
90 | + | ||
91 | + <view class="noordertitle">暂无评价</view> | ||
100 | </view> | 92 | </view> |
101 | - </block> | ||
102 | - <view class='assess_time'>2019/07/01</view> | ||
103 | - </view> | ||
104 | - <!-- <view class='ware_assess_li'> | ||
105 | - <view class='assess_header'> | ||
106 | - <view class='assess_headerImg'> | ||
107 | - <image src='../../../img/jujia@2x.png'></image> | ||
108 | - </view> | ||
109 | - <view class='assess_headerTxt'>朱*明</view> | ||
110 | - </view> | ||
111 | - <view class='assess_say'> | ||
112 | - 质量很不错,很喜欢。 | 93 | + |
94 | + <view wx:else> | ||
95 | + <!-- <block wx:if="{{seemore}}"> | ||
96 | + <view class='ware_assess_li 345' wx:for="{{short}}" wx:key="index"> | ||
97 | + <view class='assess_header'> | ||
98 | + <view class='assess_headerImg'> | ||
99 | + <image src='{{item.avatar}}'></image> | ||
113 | </view> | 100 | </view> |
101 | + <view class='assess_headerTxt'>{{item.user_nickname}}</view> | ||
102 | + </view> | ||
103 | + <view class='assess_say'> | ||
104 | + {{item.text}} | ||
105 | + </view> | ||
106 | + <block wx:if="{{item.img.length!=0}}"> | ||
114 | <view class='ware_pic'> | 107 | <view class='ware_pic'> |
115 | - <view class='ware_picBox'> | ||
116 | - <image src='../../../img/gerenzhingxinbeijing@2x.png'></image> | ||
117 | - </view> | ||
118 | - <view class='ware_picBox'> | ||
119 | - <image src='../../../img/gerenzhingxinbeijing@2x.png'></image> | ||
120 | - </view> | 108 | + <view class='ware_picBox' wx:for="{{item.img}}" wx:key=''> |
109 | + <image src='{{item}}'></image> | ||
110 | + </view> | ||
121 | </view> | 111 | </view> |
122 | - <view class='assess_time'>2019/07/01</view> | ||
123 | - </view> --> | ||
124 | - <view class='whole' wx:if="{{seemore}}" bindtap="moresee"> | ||
125 | - 查看全部评价 | 112 | + </block> |
113 | + <view class='assess_time'>2019/07/01</view> | ||
114 | + </view> | ||
115 | + </block> --> | ||
116 | + <block> | ||
117 | + <view class='ware_assess_li 123' wx:for="{{assess}}" wx:key="index" wx:for-item="items" wx:for-index="indexs"> | ||
118 | + <view class='assess_header'> | ||
119 | + <view class='assess_headerImg'> | ||
120 | + <image src='{{items.avatar}}'></image> | ||
121 | + </view> | ||
122 | + <view class='assess_headerTxt'>{{items.user_nickname}}</view> | ||
123 | + </view> | ||
124 | + <view class='assess_say'> | ||
125 | + {{items.text}} | ||
126 | + </view> | ||
127 | + <block wx:if="{{item.img.length!=0}}"> | ||
128 | + <view class='ware_pic' > | ||
129 | + <view class='ware_picBox' wx:for="{{items.img}}" wx:key=''> | ||
130 | + <image src='{{item}}' bindtap="previewImage" data-src="{{item}}" data-idx="{{indexs}}"></image> | ||
131 | + </view> | ||
132 | + </view> | ||
133 | + </block> | ||
134 | + <view class='assess_time'>{{items.create_time}}</view> | ||
135 | + </view> | ||
136 | + </block> | ||
137 | + | ||
138 | + | ||
139 | + | ||
140 | + | ||
141 | + | ||
142 | + | ||
143 | + <block wx:if="{{assess.length==5}}"> | ||
144 | + <view class='whole' wx:if="{{seemore}}" bindtap="moresee"> | ||
145 | + 查看全部评价 | ||
146 | + </view> | ||
147 | + | ||
148 | + </block> | ||
149 | + </view> | ||
150 | + | ||
126 | </view> | 151 | </view> |
127 | </view> | 152 | </view> |
128 | </view> | 153 | </view> |
129 | -</view> | ||
130 | -<!-- footer底部 --> | ||
131 | -<view class='footer'> | ||
132 | - | ||
133 | -<view class="kefu"> | ||
134 | - <view class="iconfont icon-kefu"></view> | ||
135 | - <button class="remaindetail" open-type="contact" style="margin-left: 0"></button> | ||
136 | -</view> | ||
137 | - <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==0}}">加入收藏</view> | ||
138 | - <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==1}}">取消收藏</view> | ||
139 | - | ||
140 | - <view wx:if="{{over}}"> | ||
141 | - <view class='footer_off' bindtap='goConfirm' wx:if='{{detailCon.percent!=100}}'>立即参团</view> | ||
142 | - <view class='footer_off' wx:else bindtap='group'>已成团</view> | 154 | + <!-- footer底部 --> |
155 | + <view class='footer'> | ||
156 | + | ||
157 | + <view class="kefu"> | ||
158 | + <view class="iconfont icon-kefu"></view> | ||
159 | + <button class="remaindetail" open-type="contact" style="margin-left: 0"></button> | ||
160 | + </view> | ||
161 | + <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==0}}">加入收藏</view> | ||
162 | + <view class='footer_add' bindtap='addFun' wx:if="{{detailCon.collect_type==1}}">取消收藏</view> | ||
163 | + | ||
164 | + <view wx:if="{{over}}"> | ||
165 | + <view class='footer_off' bindtap='goConfirm' wx:if='{{detailCon.percent!=100}}'>立即参团</view> | ||
166 | + <view class='footer_off' wx:else bindtap='group'>已成团</view> | ||
167 | + </view> | ||
168 | + | ||
169 | + <view class='footer_over' wx:else bindtap="gameover">活动结束</view> | ||
143 | </view> | 170 | </view> |
144 | - | ||
145 | - <view class='footer_over' wx:else bindtap="gameover">活动结束</view> | ||
146 | -</view> | ||
147 | -<!-- 遮罩层 --> | ||
148 | -<view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view> | ||
149 | -<!-- 弹出层 --> | ||
150 | -<view class="modalDlg" wx:if="{{showModal}}"> | ||
151 | - <view class='modalDlg_p'> | ||
152 | - <view class='m_top'> | ||
153 | - <view class='m_topImg'> | ||
154 | - <image src='{{detailCon.thumb}}'></image> | ||
155 | - </view> | ||
156 | - <view class='m_topTxt'> | ||
157 | - <view class='m_topTxt1'> | ||
158 | - <view class='m_topName'>{{detailCon.name}}</view> | ||
159 | - <image bindtap='m_close' src='../../../img/cha.png'></image> | 171 | + <!-- 遮罩层 --> |
172 | + <view class="mask" catchtouchmove="preventTouchMove" wx:if="{{showModal}}"></view> | ||
173 | + <!-- 弹出层 --> | ||
174 | + <view class="modalDlg" wx:if="{{showModal}}"> | ||
175 | + <view class='modalDlg_p'> | ||
176 | + <view class='m_top'> | ||
177 | + <view class='m_topImg'> | ||
178 | + <image src='{{detailCon.thumb}}'></image> | ||
160 | </view> | 179 | </view> |
161 | - <view class='m_topTxt2'> | ||
162 | - <view class='m_topPrice'>¥{{detailCon.money_sale}}</view> | ||
163 | - <view class='m_topHelf'>{{detailCon.shop_type}}</view> | 180 | + <view class='m_topTxt'> |
181 | + <view class='m_topTxt1'> | ||
182 | + <view class='m_topName'>{{detailCon.name}}</view> | ||
183 | + <image bindtap='m_close' src='../../../img/cha.png'></image> | ||
184 | + </view> | ||
185 | + <view class='m_topTxt2'> | ||
186 | + <view class='m_topPrice'>¥{{detailCon.money_sale}}</view> | ||
187 | + <view class='m_topHelf'>{{detailCon.shop_type}}</view> | ||
188 | + </view> | ||
164 | </view> | 189 | </view> |
165 | </view> | 190 | </view> |
166 | - </view> | ||
167 | - <view class='m_number'> | ||
168 | - <view class='m_numTxt'>购买数量</view> | ||
169 | - <view class='minus_push'> | ||
170 | - <view class='minus' bindtap="bindMinus">-</view> | ||
171 | - <view class='num' bindchange="bindManual">{{num}}</view> | ||
172 | - <view class='push' bindtap="bindPlus">+</view> | 191 | + <view class='m_number'> |
192 | + <view class='m_numTxt'>购买数量</view> | ||
193 | + <view class='minus_push'> | ||
194 | + <view class='minus' bindtap="bindMinus">-</view> | ||
195 | + <view class='num' bindchange="bindManual">{{num}}</view> | ||
196 | + <view class='push' bindtap="bindPlus">+</view> | ||
197 | + </view> | ||
173 | </view> | 198 | </view> |
199 | + <button class='m_btn' bindtap='goFirm_order1' data-id="{{detailCon.shop_id}}">确认</button> | ||
174 | </view> | 200 | </view> |
175 | - <button class='m_btn' bindtap='goFirm_order1' data-id="{{detailCon.shop_id}}">确认</button> | ||
176 | </view> | 201 | </view> |
177 | -</view> | ||
178 | -</view> | 202 | +</view> |
@@ -353,12 +353,13 @@ page { | @@ -353,12 +353,13 @@ page { | ||
353 | } | 353 | } |
354 | 354 | ||
355 | .ware_pic { | 355 | .ware_pic { |
356 | - display: flex; | ||
357 | - width: 100%; | ||
358 | - margin-top: 10rpx; | 356 | + display:flex; |
357 | + margin-top: 16rpx; | ||
358 | + flex-wrap: wrap; | ||
359 | } | 359 | } |
360 | 360 | ||
361 | .ware_picBox { | 361 | .ware_picBox { |
362 | + flex:0 0 auto; | ||
362 | margin-right: 16rpx; | 363 | margin-right: 16rpx; |
363 | } | 364 | } |
364 | 365 |
@@ -22,32 +22,67 @@ Page({ | @@ -22,32 +22,67 @@ Page({ | ||
22 | hours: '', | 22 | hours: '', |
23 | minutes: '', | 23 | minutes: '', |
24 | seconds: '', | 24 | seconds: '', |
25 | + navH: '', | ||
26 | + nav:'' | ||
25 | }, | 27 | }, |
26 | 28 | ||
27 | /** | 29 | /** |
28 | * 生命周期函数--监听页面加载 | 30 | * 生命周期函数--监听页面加载 |
29 | */ | 31 | */ |
30 | onLoad: function (options) { | 32 | onLoad: function (options) { |
33 | + console.log(options) | ||
34 | + if(options.nav!=undefined){ | ||
35 | + this.setData({ | ||
36 | + nav:1 | ||
37 | + }) | ||
38 | + } | ||
31 | 39 | ||
32 | console.log(options.num) | 40 | console.log(options.num) |
33 | this.setData({ | 41 | this.setData({ |
34 | shop_id: options.id, | 42 | shop_id: options.id, |
35 | - shopnum:options.num | 43 | + shopnum:options.num, |
44 | + | ||
45 | + }) | ||
46 | + | ||
47 | + this.setData({ | ||
48 | + navH: app.globalData.navHeight | ||
36 | }) | 49 | }) |
37 | console.log(options.id) | 50 | console.log(options.id) |
38 | 51 | ||
39 | }, | 52 | }, |
53 | + | ||
54 | + go() { | ||
55 | + if (this.data.nav == 1) { | ||
56 | + wx.switchTab({ | ||
57 | + | ||
58 | + url: '/pages/homeindex/homeindex', | ||
59 | + }) | ||
60 | + } else { | ||
61 | + wx.navigateBack({ | ||
62 | + checked: true | ||
63 | + }) | ||
64 | + } | ||
65 | + | ||
66 | + }, | ||
40 | //输入备注 | 67 | //输入备注 |
41 | entertext(e){ | 68 | entertext(e){ |
42 | this.setData({ | 69 | this.setData({ |
43 | text:e.detail.value | 70 | text:e.detail.value |
44 | }) | 71 | }) |
45 | }, | 72 | }, |
73 | + //选择地址 | ||
74 | + selectplace(){ | ||
75 | + wx.navigateTo({ | ||
76 | + url: '/pages/mine/addr_1/addr_1?shop_id='+this.data.shop_id+'&shopnum='+this.data.shopnum, | ||
77 | + }) | ||
78 | + wx.setStorageSync('shopid', this.data.shop_id) | ||
79 | + wx.setStorageSync('shopnum', this.data.shopnum) | ||
80 | + }, | ||
46 | 81 | ||
47 | //添加收货地址 | 82 | //添加收货地址 |
48 | addplace(){ | 83 | addplace(){ |
49 | wx.navigateTo({ | 84 | wx.navigateTo({ |
50 | - url: '/pages/mine/addr_2/addr_2', | 85 | + url: '/pages/mine/addr_2/addr_2?noorder=' + 1 + '&noorderid=' + this.data.shop_id + '&num=' + this.data.shopnum, |
51 | }) | 86 | }) |
52 | }, | 87 | }, |
53 | 88 | ||
@@ -65,13 +100,18 @@ Page({ | @@ -65,13 +100,18 @@ Page({ | ||
65 | } | 100 | } |
66 | app.post(url, params, header).then((res) => { | 101 | app.post(url, params, header).then((res) => { |
67 | console.log(res) | 102 | console.log(res) |
103 | + if(res.data.address_id==0){ | ||
104 | + that.setData({ | ||
105 | + address: true, | ||
106 | + }) | ||
107 | + } | ||
68 | that.setData({ | 108 | that.setData({ |
69 | order_list: res.data, | 109 | order_list: res.data, |
70 | shop_numb: res.data.shop_numb, | 110 | shop_numb: res.data.shop_numb, |
71 | goods: res.data.goods, | 111 | goods: res.data.goods, |
72 | address_id: res.data.address_id, | 112 | address_id: res.data.address_id, |
73 | text: that.data.text, | 113 | text: that.data.text, |
74 | - address:false, | 114 | + |
75 | shopinfo:true | 115 | shopinfo:true |
76 | }) | 116 | }) |
77 | 117 | ||
@@ -147,9 +187,9 @@ Page({ | @@ -147,9 +187,9 @@ Page({ | ||
147 | } | 187 | } |
148 | }) | 188 | }) |
149 | 189 | ||
150 | - that.setData({ | ||
151 | - address:true | ||
152 | - }) | 190 | + // that.setData({ |
191 | + // address:true | ||
192 | + // }) | ||
153 | } else if (err.msg == "商品已到时"){ | 193 | } else if (err.msg == "商品已到时"){ |
154 | wx.showModal({ | 194 | wx.showModal({ |
155 | title: '提示', | 195 | title: '提示', |
@@ -194,14 +234,15 @@ Page({ | @@ -194,14 +234,15 @@ Page({ | ||
194 | }, | 234 | }, |
195 | paynow(){ | 235 | paynow(){ |
196 | let that = this; | 236 | let that = this; |
197 | - // if(that.data.text==''){ | ||
198 | - // wx.showToast({ | ||
199 | - // title: '请输入备注信息', | ||
200 | - // icon:'none' | ||
201 | - // }) | 237 | + console.log(that.data.address_id) |
238 | + if (that.data.address_id==0){ | ||
239 | + wx.showToast({ | ||
240 | + title: '请选择收货地址', | ||
241 | + icon:'none' | ||
242 | + }) | ||
202 | 243 | ||
203 | - // return false | ||
204 | - // } | 244 | + return false |
245 | + } | ||
205 | let url = "home/index/pay"; | 246 | let url = "home/index/pay"; |
206 | let header = { | 247 | let header = { |
207 | "XX-Token": wx.getStorageSync('token'), | 248 | "XX-Token": wx.getStorageSync('token'), |
1 | <!--pages/kind/firm_order1/firm_order1.wxml--> | 1 | <!--pages/kind/firm_order1/firm_order1.wxml--> |
2 | -<view class='container'> | ||
3 | - <!-- 顶部背景 --> | ||
4 | - <view class='header'></view> | ||
5 | - <!-- 订单详情 --> | ||
6 | - <view class='order_box'> | ||
7 | - <!-- 个人信息 --> | ||
8 | - <view class='o_top'> | ||
9 | - <view class='o_topIn'> | ||
10 | - <view class='o_topImg'> | ||
11 | - <image src='../../../img/jujia@2x.png'></image> | ||
12 | - </view> | 2 | +<view> |
3 | + <view class='nav bg-white' style='height:{{navH}}px' catchtap='go'> | ||
4 | + <view class="rowback"> | ||
5 | + <!-- <image src="/img/aicon_08@2x.png"></image> --> | ||
6 | + <view class="iconfont icon-jiantou-copy"></view> | ||
7 | + </view> | ||
13 | 8 | ||
14 | - <view class='o_text' wx:if="{{address==true}}" bindtap="addplace"> | ||
15 | - <view class='name shouhuo'>请选择收货地址</view> | ||
16 | - </view> | ||
17 | - <view class='o_text' wx:else> | ||
18 | - <view class='o_namePhone'> | ||
19 | - <view class='name'>{{order_list.name}}</view> | ||
20 | - <view class='phone'>{{order_list.mobile}}</view> | ||
21 | - </view> | ||
22 | - <view class='address'>{{order_list.address}}</view> | ||
23 | - </view> | ||
24 | - <image class='o_right' src='../../../img/right_1.png'></image> | ||
25 | - </view> | ||
26 | - <image class='o_top_bottom' src='../../../img/kuaidi@2x.png'></image> | 9 | + <view class='nav-title'> |
10 | + 确认订单 | ||
11 | + <image src='../../images/back.png' mode='aspectFit' class='back' bindtap='navBack'></image> | ||
27 | </view> | 12 | </view> |
28 | - <!-- 商品信息 --> | ||
29 | - <view class='o_body' wx:if="{{shopinfo==true}}"> | ||
30 | - <view class='o_body_case'> | ||
31 | - <!-- 信息头部 --> | ||
32 | - <view class='title'> | ||
33 | - <view class='title_icon'> | ||
34 | - <image src='../../../img/shangjia@2x.png'></image> | ||
35 | - </view> | ||
36 | - <view class='title_txt'>商品信息</view> | ||
37 | - </view> | ||
38 | - <!-- 介绍详情 --> | ||
39 | - <view class='goods_detail'> | ||
40 | - <view class='goods_detail_pic'> | ||
41 | - <view class='detail_pic2'> | ||
42 | - <image src='{{order_list.shop.thumb}}'></image> | 13 | + </view> |
14 | + <scroll-view class='bg-gray overflow' style='height:calc(100vh - {{navH}}px)' scroll-y> | ||
15 | + | ||
16 | + <view class='container'> | ||
17 | + <!-- 顶部背景 --> | ||
18 | + <view class='header'></view> | ||
19 | + <!-- 订单详情 --> | ||
20 | + <view class='order_box'> | ||
21 | + <!-- 个人信息 --> | ||
22 | + <view class='o_top' wx:if="{{address==true}}" bindtap="addplace"> | ||
23 | + <view class='o_topIn'> | ||
24 | + <view class='o_topImg'> | ||
25 | + <image src='../../../img/jujia@2x.png'></image> | ||
26 | + </view> | ||
27 | + | ||
28 | + <view class='o_text'> | ||
29 | + <view class='name shouhuo'>请选择收货地址</view> | ||
30 | + </view> | ||
31 | + | ||
32 | + <image class='o_right' src='../../../img/right_1.png'></image> | ||
43 | </view> | 33 | </view> |
44 | - <view class='detail_pic_txt'>{{days}}天{{hours}}小时{{minutes}}分钟{{seconds}}秒</view> | 34 | + <image class='o_top_bottom' src='../../../img/kuaidi@2x.png'></image> |
45 | </view> | 35 | </view> |
46 | - <view class='detail_txt'> | ||
47 | - <view class='txt1'> | ||
48 | - <view class='txt1_name'>{{order_list.shop.name}}</view> | ||
49 | - <view class='txt1_price'>¥{{order_list.shop.money_sale}}</view> | 36 | + |
37 | + <view class='o_top' wx:else bindtap="selectplace"> | ||
38 | + <view class='o_topIn'> | ||
39 | + <view class='o_topImg'> | ||
40 | + <image src='../../../img/jujia@2x.png'></image> | ||
41 | + </view> | ||
42 | + | ||
43 | + | ||
44 | + <view class='o_text' > | ||
45 | + <view class='o_namePhone'> | ||
46 | + <view class='name'>{{order_list.name}}</view> | ||
47 | + <view class='phone'>{{order_list.mobile}}</view> | ||
48 | + </view> | ||
49 | + <view class='address'>{{order_list.address}}</view> | ||
50 | + </view> | ||
51 | + <image class='o_right' src='../../../img/right_1.png'></image> | ||
50 | </view> | 52 | </view> |
51 | - <view class='txt2'> | ||
52 | - <progress percent="{{order_list.shop.percent}}" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" /> | ||
53 | - <view class='order'>x{{order_list.shop_numb}}</view> | 53 | + <image class='o_top_bottom' src='../../../img/kuaidi@2x.png'></image> |
54 | + </view> | ||
55 | + <!-- 商品信息 --> | ||
56 | + <view class='o_body' wx:if="{{shopinfo==true}}"> | ||
57 | + <view class='o_body_case'> | ||
58 | + <!-- 信息头部 --> | ||
59 | + <view class='title'> | ||
60 | + <view class='title_icon'> | ||
61 | + <image src='../../../img/shangjia@2x.png'></image> | ||
62 | + </view> | ||
63 | + <view class='title_txt'>商品信息</view> | ||
64 | + </view> | ||
65 | + <!-- 介绍详情 --> | ||
66 | + <view class='goods_detail'> | ||
67 | + <view class='goods_detail_pic'> | ||
68 | + <view class='detail_pic2'> | ||
69 | + <image src='{{order_list.shop.thumb}}'></image> | ||
70 | + </view> | ||
71 | + <view class='detail_pic_txt'>{{days}}天{{hours}}小时{{minutes}}分钟{{seconds}}秒</view> | ||
72 | + </view> | ||
73 | + <view class='detail_txt'> | ||
74 | + <view class='txt1'> | ||
75 | + <view class='txt1_name'>{{order_list.shop.name}}</view> | ||
76 | + <view class='txt1_price'>¥{{order_list.shop.money_sale}}</view> | ||
77 | + </view> | ||
78 | + <view class='txt2'> | ||
79 | + <progress percent="{{order_list.shop.percent}}" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" /> | ||
80 | + <view class='order'>x{{order_list.shop_numb}}</view> | ||
81 | + </view> | ||
82 | + <view class='txt3'>已拼{{order_list.shop.numb}}份,目标{{order_list.shop.group}}份</view> | ||
83 | + </view> | ||
84 | + </view> | ||
85 | + <!-- 运费 --> | ||
86 | + <view class='freight'> | ||
87 | + <view class='freight_1'>运费</view> | ||
88 | + <view class='freight_2'>¥0.00</view> | ||
89 | + </view> | ||
90 | + <!-- 其他信息 --> | ||
91 | + <view class='othor'> | ||
92 | + <view class='othor1'> | ||
93 | + <view class='othor1_name'>订单号</view> | ||
94 | + <view class='othor1_con'>{{order_list.goods}}</view> | ||
95 | + </view> | ||
96 | + <view class='othor1 '> | ||
97 | + <view class='othor1_name'>备注信息</view> | ||
98 | + <textarea maxlength='30' class='othor1_con othor1_con2' placeholder='请输入备注' placeholder-class="placeholderStyle" bindinput="entertext"></textarea> | ||
99 | + <view></view> | ||
100 | + </view> | ||
101 | + </view> | ||
54 | </view> | 102 | </view> |
55 | - <view class='txt3'>已拼{{order_list.shop.numb}}份,目标{{order_list.shop.group}}份</view> | ||
56 | </view> | 103 | </view> |
57 | </view> | 104 | </view> |
58 | - <!-- 运费 --> | ||
59 | - <view class='freight'> | ||
60 | - <view class='freight_1'>运费</view> | ||
61 | - <view class='freight_2'>¥0.00</view> | ||
62 | - </view> | ||
63 | - <!-- 其他信息 --> | ||
64 | - <view class='othor'> | ||
65 | - <view class='othor1'> | ||
66 | - <view class='othor1_name'>订单号</view> | ||
67 | - <view class='othor1_con'>{{order_list.goods}}</view> | ||
68 | - </view> | ||
69 | - <view class='othor1 '> | ||
70 | - <view class='othor1_name'>备注信息</view> | ||
71 | - <textarea maxlength='30' class='othor1_con othor1_con2' placeholder='请输入备注' placeholder-class="placeholderStyle" bindinput="entertext"></textarea> | ||
72 | - <view></view> | 105 | + </view> |
106 | + <view class='footer' wx:if="{{shopinfo==true}}"> | ||
107 | + <view class='footer_in'> | ||
108 | + <view class='f_txt1'>共{{order_list.shop_numb}}件商品</view> | ||
109 | + <view class='f_txt2'>合计: | ||
110 | + <text class='f_txt3'>¥{{order_list.shop_numb*order_list.shop.money_sale}}</text> | ||
73 | </view> | 111 | </view> |
112 | + <view class='f_btn' bindtap='paynow'>立即支付</view> | ||
74 | </view> | 113 | </view> |
75 | </view> | 114 | </view> |
76 | - </view> | ||
77 | - </view> | ||
78 | -</view> | ||
79 | -<view class='footer' wx:if="{{shopinfo==true}}"> | ||
80 | - <view class='footer_in'> | ||
81 | - <view class='f_txt1'>共{{order_list.shop_numb}}件商品</view> | ||
82 | - <view class='f_txt2'>合计: | ||
83 | - <text class='f_txt3'>¥{{order_list.shop_numb*order_list.shop.money_sale}}</text> | ||
84 | - </view> | ||
85 | - <view class='f_btn' bindtap='paynow'>立即支付</view> | ||
86 | - </view> | 115 | + |
116 | + </scroll-view> | ||
87 | </view> | 117 | </view> |
1 | /* pages/kind/firm_order1/firm_order1.wxss */ | 1 | /* pages/kind/firm_order1/firm_order1.wxss */ |
2 | - | 2 | +@import '../../../iconfont/iconfont.wxss'; |
3 | +.icon-jiantou-copy{ | ||
4 | + font-size:35rpx; | ||
5 | + color:#fff; | ||
6 | + transform:rotate(180deg); | ||
7 | + /* font-weight: bold; */ | ||
8 | + | ||
9 | +} | ||
3 | page { | 10 | page { |
4 | background: #f7f7f7; | 11 | background: #f7f7f7; |
5 | } | 12 | } |
@@ -319,3 +326,66 @@ page { | @@ -319,3 +326,66 @@ page { | ||
319 | color:#999; | 326 | color:#999; |
320 | margin-top:27rpx; | 327 | margin-top:27rpx; |
321 | } | 328 | } |
329 | +/* 高度的设置 */ | ||
330 | + | ||
331 | +.nav { | ||
332 | + width: 100%; | ||
333 | + overflow: hidden; | ||
334 | + position: relative; | ||
335 | + top: 0; | ||
336 | + left: 0; | ||
337 | + z-index: 10; | ||
338 | + background: #6EAC3D | ||
339 | +} | ||
340 | + | ||
341 | +.nav-title { | ||
342 | + width: 100%; | ||
343 | + height: 45px; | ||
344 | + line-height: 45px; | ||
345 | + text-align: center; | ||
346 | + position: absolute; | ||
347 | + bottom: 0; | ||
348 | + left: 0; | ||
349 | + z-index: 10; | ||
350 | + font-family: PingFang-SC-Medium; | ||
351 | + font-size: 28rpx; | ||
352 | + letter-spacing: 2px; | ||
353 | + color:#fff; | ||
354 | +} | ||
355 | + | ||
356 | +.nav .back { | ||
357 | + width: 22px; | ||
358 | + height: 22px; | ||
359 | + position: absolute; | ||
360 | + bottom: 0; | ||
361 | + left: 0; | ||
362 | + padding: 10px 15px; | ||
363 | + | ||
364 | +} | ||
365 | + | ||
366 | +.bg-white { | ||
367 | + background-color: #6EAC3D; | ||
368 | +} | ||
369 | + | ||
370 | +.bg-gray { | ||
371 | + background-color: #f7f7f7; | ||
372 | +} | ||
373 | + | ||
374 | +.overflow { | ||
375 | + overflow: auto; | ||
376 | +} | ||
377 | + | ||
378 | +.hidden { | ||
379 | + overflow: hidden; | ||
380 | +} | ||
381 | +.rowback{ | ||
382 | + width:15rpx; | ||
383 | + height:27rpx; | ||
384 | + font-size: 0; | ||
385 | + margin:79rpx 0 0 30rpx; | ||
386 | + transform:rotate(180deg) | ||
387 | +} | ||
388 | +.rowback image{ | ||
389 | + width:100%; | ||
390 | + height:100%; | ||
391 | +} |
@@ -9,11 +9,21 @@ Page({ | @@ -9,11 +9,21 @@ Page({ | ||
9 | orderlist: [], | 9 | orderlist: [], |
10 | address_id: '', | 10 | address_id: '', |
11 | status: 0, | 11 | status: 0, |
12 | + shop_id:'', | ||
13 | + shopnum:'' | ||
12 | }, | 14 | }, |
13 | /** | 15 | /** |
14 | * 生命周期函数--监听页面加载 | 16 | * 生命周期函数--监听页面加载 |
15 | */ | 17 | */ |
16 | onLoad: function (options) { | 18 | onLoad: function (options) { |
19 | + console.log(options) | ||
20 | + if(options.shop_id!=undefined){ | ||
21 | + this.setData({ | ||
22 | + shop_id:options.shop_id, | ||
23 | + shopnum:options.shopnum | ||
24 | + }) | ||
25 | + | ||
26 | + } | ||
17 | this.getaddresslist() | 27 | this.getaddresslist() |
18 | 28 | ||
19 | // this.setData({ | 29 | // this.setData({ |
@@ -132,7 +142,17 @@ Page({ | @@ -132,7 +142,17 @@ Page({ | ||
132 | * 生命周期函数--监听页面卸载 | 142 | * 生命周期函数--监听页面卸载 |
133 | */ | 143 | */ |
134 | onUnload: function () { | 144 | onUnload: function () { |
145 | + let shopid=wx.getStorageSync("shopid"); | ||
146 | + let shopnum=wx.getStorageSync('shopnum') | ||
147 | + if (shopid!=''){ | ||
148 | + wx.reLaunch({ | ||
149 | + url: '/pages/kind/firm_order1/firm_order1?id=' + shopid + '&num=' + shopnum + '&nav=' + 1, | ||
150 | + }) | ||
151 | + } | ||
135 | 152 | ||
153 | + wx.setStorageSync('shopid', '') | ||
154 | + wx.setStorageSync('shopnum ', '') | ||
155 | + | ||
136 | }, | 156 | }, |
137 | 157 | ||
138 | /** | 158 | /** |
@@ -102,11 +102,12 @@ Page({ | @@ -102,11 +102,12 @@ Page({ | ||
102 | name: res.data.name, | 102 | name: res.data.name, |
103 | mobile: res.data.mobile, | 103 | mobile: res.data.mobile, |
104 | status: res.data.status, | 104 | status: res.data.status, |
105 | + type: res.data.status, | ||
105 | province: res.data.province, | 106 | province: res.data.province, |
106 | city: res.data.city, | 107 | city: res.data.city, |
107 | county: res.data.city, | 108 | county: res.data.city, |
108 | address: res.data.address, | 109 | address: res.data.address, |
109 | - | 110 | + selectregion:res.data.province+res.data.city+res.data.county |
110 | }) | 111 | }) |
111 | 112 | ||
112 | 113 | ||
@@ -189,6 +190,7 @@ Page({ | @@ -189,6 +190,7 @@ Page({ | ||
189 | console.log(that.data.noorder) | 190 | console.log(that.data.noorder) |
190 | if (that.data.noorder==1){ | 191 | if (that.data.noorder==1){ |
191 | setTimeout(function () { | 192 | setTimeout(function () { |
193 | + console.log(that.data.num) | ||
192 | wx.navigateTo({ | 194 | wx.navigateTo({ |
193 | url: '/pages/kind/firm_order1/firm_order1?num='+that.data.num+'&id='+that.data.noorderid, | 195 | url: '/pages/kind/firm_order1/firm_order1?num='+that.data.num+'&id='+that.data.noorderid, |
194 | }) | 196 | }) |
@@ -2,7 +2,17 @@ | @@ -2,7 +2,17 @@ | ||
2 | <view class='container'> | 2 | <view class='container'> |
3 | <view class='mid'> | 3 | <view class='mid'> |
4 | 4 | ||
5 | - <view class="nodata" wx:if='{{collectList.length==0}}'>暂无数据</view> | 5 | + <view class="nodata" wx:if='{{collectList.length==0}}'> |
6 | + | ||
7 | + <view class="noorder"> | ||
8 | + <image src="/img/noorder.png" mode="widthFix"></image> | ||
9 | + </view> | ||
10 | + | ||
11 | + <view class="noordertitle">暂无收藏数据</view> | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + </view> | ||
6 | <block wx:else> | 16 | <block wx:else> |
7 | <view class='mid_item' wx:for="{{collectList}}" wx:key=""> | 17 | <view class='mid_item' wx:for="{{collectList}}" wx:key=""> |
8 | <!-- 顶部 --> | 18 | <!-- 顶部 --> |
@@ -36,6 +36,15 @@ Page({ | @@ -36,6 +36,15 @@ Page({ | ||
36 | // 发表评价 | 36 | // 发表评价 |
37 | submitComment() { | 37 | submitComment() { |
38 | let that = this; | 38 | let that = this; |
39 | + if (that.data.text==''){ | ||
40 | + | ||
41 | + wx.showToast({ | ||
42 | + title: '请输入评论内容', | ||
43 | + icon:'none' | ||
44 | + }) | ||
45 | + | ||
46 | + return false | ||
47 | + } | ||
39 | let url = 'user/index/message'; | 48 | let url = 'user/index/message'; |
40 | let params = { | 49 | let params = { |
41 | goods_id : that.data.goods_id, | 50 | goods_id : that.data.goods_id, |
@@ -101,7 +110,7 @@ Page({ | @@ -101,7 +110,7 @@ Page({ | ||
101 | console.log('上传文件' + JSON.stringify(res)); | 110 | console.log('上传文件' + JSON.stringify(res)); |
102 | let data = JSON.parse(JSON.stringify(res)) | 111 | let data = JSON.parse(JSON.stringify(res)) |
103 | console.log(data) | 112 | console.log(data) |
104 | - let arr=[]; | 113 | + let arr=that.data.images; |
105 | arr.push(data.url) | 114 | arr.push(data.url) |
106 | that.setData({ | 115 | that.setData({ |
107 | images: arr | 116 | images: arr |
@@ -151,12 +160,15 @@ Page({ | @@ -151,12 +160,15 @@ Page({ | ||
151 | // }); | 160 | // }); |
152 | }, | 161 | }, |
153 | delete: function (e) { | 162 | delete: function (e) { |
163 | + let that=this | ||
154 | var index = e.currentTarget.dataset.index; | 164 | var index = e.currentTarget.dataset.index; |
155 | var images = that.data.images; | 165 | var images = that.data.images; |
156 | images.splice(index, 1); | 166 | images.splice(index, 1); |
157 | that.setData({ | 167 | that.setData({ |
158 | images: images | 168 | images: images |
159 | }); | 169 | }); |
170 | + | ||
171 | + console.log(that.data.images) | ||
160 | }, | 172 | }, |
161 | 173 | ||
162 | /** | 174 | /** |
@@ -393,18 +393,3 @@ margin-top:24rpx; | @@ -393,18 +393,3 @@ margin-top:24rpx; | ||
393 | margin-top: 350rpx; | 393 | margin-top: 350rpx; |
394 | font-size: 30rpx; | 394 | font-size: 30rpx; |
395 | } | 395 | } |
396 | -.noorder{ | ||
397 | - width:270rpx; | ||
398 | - height:270rpx; | ||
399 | - font-size: 0 | ||
400 | -} | ||
401 | -.noorder image{ | ||
402 | - width:100%; | ||
403 | - height:100%; | ||
404 | -} | ||
405 | -.noordertitle{ | ||
406 | - color:#999999; | ||
407 | - font-size: 26rpx; | ||
408 | - text-align: center; | ||
409 | - margin-top:20rpx | ||
410 | -} |
@@ -39,7 +39,7 @@ | @@ -39,7 +39,7 @@ | ||
39 | "list": [] | 39 | "list": [] |
40 | }, | 40 | }, |
41 | "miniprogram": { | 41 | "miniprogram": { |
42 | - "current": 7, | 42 | + "current": 8, |
43 | "list": [ | 43 | "list": [ |
44 | { | 44 | { |
45 | "id": -1, | 45 | "id": -1, |
@@ -94,6 +94,13 @@ | @@ -94,6 +94,13 @@ | ||
94 | "id": -1, | 94 | "id": -1, |
95 | "name": "搜索结果", | 95 | "name": "搜索结果", |
96 | "pathName": "pages/homeindex/result/result", | 96 | "pathName": "pages/homeindex/result/result", |
97 | + "query": "", | ||
98 | + "scene": null | ||
99 | + }, | ||
100 | + { | ||
101 | + "id": -1, | ||
102 | + "name": "评价", | ||
103 | + "pathName": "pages/mine/eOrder/eOrder", | ||
97 | "scene": null | 104 | "scene": null |
98 | } | 105 | } |
99 | ] | 106 | ] |
-
请 注册 或 登录 后发表评论