正在显示
24 个修改的文件
包含
397 行增加
和
61 行删除
1 | - | 1 | +const app=getApp() |
2 | Component({ | 2 | Component({ |
3 | /** | 3 | /** |
4 | * 组件的属性列表 | 4 | * 组件的属性列表 |
@@ -19,6 +19,19 @@ Component({ | @@ -19,6 +19,19 @@ Component({ | ||
19 | */ | 19 | */ |
20 | methods: { | 20 | methods: { |
21 | look_more(e) { | 21 | look_more(e) { |
22 | + let login_new=app.globalData.login_new; | ||
23 | + if(login_new==0){ | ||
24 | + wx.showToast({ | ||
25 | + title: '您还不是会员', | ||
26 | + icon:"none" | ||
27 | + }) | ||
28 | + setTimeout(function(){ | ||
29 | + wx.navigateTo({ | ||
30 | + url: '/pages/login/login', | ||
31 | + }) | ||
32 | + },1500) | ||
33 | + return false | ||
34 | + } | ||
22 | let id = e.currentTarget.dataset.id | 35 | let id = e.currentTarget.dataset.id |
23 | wx.navigateTo({ | 36 | wx.navigateTo({ |
24 | url: '/pages/shop_detail/shop_detail?id=' + id | 37 | url: '/pages/shop_detail/shop_detail?id=' + id |
1 | App({ | 1 | App({ |
2 | onLaunch: function () { | 2 | onLaunch: function () { |
3 | this.getmessagelist() | 3 | this.getmessagelist() |
4 | + let token=wx.getStorageSync('token'); | ||
5 | + console.log('woshitoe',token) | ||
6 | + if(token!=""){ | ||
7 | + this.getInfoFun() | ||
8 | + } | ||
9 | + | ||
4 | //自动更新版本 | 10 | //自动更新版本 |
5 | const updateManager = wx.getUpdateManager() | 11 | const updateManager = wx.getUpdateManager() |
6 | updateManager.onCheckForUpdate(function (res) { | 12 | updateManager.onCheckForUpdate(function (res) { |
@@ -78,6 +84,24 @@ App({ | @@ -78,6 +84,24 @@ App({ | ||
78 | return promise; | 84 | return promise; |
79 | }, | 85 | }, |
80 | 86 | ||
87 | + | ||
88 | + // 获取个人信息 | ||
89 | + getInfoFun() { | ||
90 | + let that= this; | ||
91 | + let u = that.interface.readteacher; | ||
92 | + that.post(u, {}).then((r) => { | ||
93 | + console.log('3489523498',r) | ||
94 | + if (r.code == 200) { | ||
95 | + | ||
96 | + that.globalData.login_new=r.msg.login_new; | ||
97 | + console.log( that.globalData.login_new) | ||
98 | + // t.setData({ | ||
99 | + // obj: r.msg | ||
100 | + // }) | ||
101 | + } | ||
102 | + }) | ||
103 | + }, | ||
104 | + | ||
81 | getmessagelist() { | 105 | getmessagelist() { |
82 | let that = this | 106 | let that = this |
83 | let url = '/information/get_all'; | 107 | let url = '/information/get_all'; |
@@ -118,11 +142,13 @@ App({ | @@ -118,11 +142,13 @@ App({ | ||
118 | }).catch((err) => { }) | 142 | }).catch((err) => { }) |
119 | }, | 143 | }, |
120 | 144 | ||
145 | + onShow: function() { | ||
146 | + console.log('hahahahhahahahhhahh') | ||
147 | + }, | ||
148 | + | ||
121 | 149 | ||
122 | //接口管理 | 150 | //接口管理 |
123 | interface: { | 151 | interface: { |
124 | - | ||
125 | - | ||
126 | openid: '/getopenid/get', // 获取openid | 152 | openid: '/getopenid/get', // 获取openid |
127 | getcode: '/getopenid/getcode', // 获取验证码 | 153 | getcode: '/getopenid/getcode', // 获取验证码 |
128 | readteacher: '/getopenid/readteacher', // 获取个人信息 | 154 | readteacher: '/getopenid/readteacher', // 获取个人信息 |
@@ -177,6 +203,6 @@ App({ | @@ -177,6 +203,6 @@ App({ | ||
177 | order_read: '/shop/read', // 订单数 | 203 | order_read: '/shop/read', // 订单数 |
178 | }, | 204 | }, |
179 | globalData: { | 205 | globalData: { |
180 | - | 206 | + login_new:"" |
181 | } | 207 | } |
182 | }) | 208 | }) |
@@ -7,14 +7,12 @@ Page({ | @@ -7,14 +7,12 @@ Page({ | ||
7 | data: { | 7 | data: { |
8 | list: [], | 8 | list: [], |
9 | }, | 9 | }, |
10 | - | ||
11 | /** | 10 | /** |
12 | * 生命周期函数--监听页面加载 | 11 | * 生命周期函数--监听页面加载 |
13 | */ | 12 | */ |
14 | onLoad: function(options) { | 13 | onLoad: function(options) { |
15 | 14 | ||
16 | }, | 15 | }, |
17 | - | ||
18 | // 获取地址列表 | 16 | // 获取地址列表 |
19 | getListFun() { | 17 | getListFun() { |
20 | let t = this; | 18 | let t = this; |
@@ -35,6 +33,7 @@ Page({ | @@ -35,6 +33,7 @@ Page({ | ||
35 | 33 | ||
36 | //选择地址返回确认订单页面 | 34 | //选择地址返回确认订单页面 |
37 | selectAdddressFun(e) { | 35 | selectAdddressFun(e) { |
36 | + console.log(e) | ||
38 | let pages = getCurrentPages(); | 37 | let pages = getCurrentPages(); |
39 | let prevPage = pages[pages.length - 2]; //上一个页面 | 38 | let prevPage = pages[pages.length - 2]; //上一个页面 |
40 | //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 | 39 | //直接调用上一个页面的setData()方法,把数据存到上一个页面中去 |
@@ -8,14 +8,16 @@ | @@ -8,14 +8,16 @@ | ||
8 | </navigator> | 8 | </navigator> |
9 | </view> | 9 | </view> |
10 | <view class='center'> | 10 | <view class='center'> |
11 | - <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> | ||
12 | - <view class='center_child'> | 11 | + <!-- <scroll-view scroll-y class='scroll-view' scroll-into-view="NAV{{status}}"> --> |
12 | + <view class='center_child flexone'> | ||
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='{{item.id!=""?"click_category":"seltaocan"}}' 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 | + | ||
18 | + | ||
17 | </view> | 19 | </view> |
18 | - <view class='fake_left'></view> | 20 | + <!-- <view class='fake_left'></view> --> |
19 | <view class='right' wx:if="{{remain}}"> | 21 | <view class='right' wx:if="{{remain}}"> |
20 | <view class='right_item' id='NAV{{index}}' wx:for='{{good_arr}}' wx:key='index' wx:if="{{good_arr[index].products.length>0}}"> | 22 | <view class='right_item' id='NAV{{index}}' wx:for='{{good_arr}}' wx:key='index' wx:if="{{good_arr[index].products.length>0}}"> |
21 | <view class='right_item_top'> | 23 | <view class='right_item_top'> |
@@ -50,6 +52,6 @@ | @@ -50,6 +52,6 @@ | ||
50 | 52 | ||
51 | 53 | ||
52 | </view> | 54 | </view> |
53 | - </scroll-view> | 55 | + <!-- </scroll-view> --> |
54 | </view> | 56 | </view> |
55 | </view> | 57 | </view> |
@@ -89,9 +89,10 @@ page { | @@ -89,9 +89,10 @@ page { | ||
89 | width: 21.4%; | 89 | width: 21.4%; |
90 | height: 100%; | 90 | height: 100%; |
91 | background: #fff; | 91 | background: #fff; |
92 | - position: fixed; | ||
93 | - top: 114rpx; | 92 | + /* position: fixed; |
93 | + top: 114rpx; */ | ||
94 | overflow-y: scroll; | 94 | overflow-y: scroll; |
95 | + z-index:9999 | ||
95 | 96 | ||
96 | 97 | ||
97 | } | 98 | } |
@@ -143,6 +144,8 @@ page { | @@ -143,6 +144,8 @@ page { | ||
143 | .right { | 144 | .right { |
144 | width: 76.3%; | 145 | width: 76.3%; |
145 | height: 100%; | 146 | height: 100%; |
147 | + overflow-y: scroll; | ||
148 | + | ||
146 | } | 149 | } |
147 | 150 | ||
148 | .right_item { | 151 | .right_item { |
@@ -49,6 +49,23 @@ Page({ | @@ -49,6 +49,23 @@ Page({ | ||
49 | 49 | ||
50 | // console.log(this.data.stick) | 50 | // console.log(this.data.stick) |
51 | }, | 51 | }, |
52 | + | ||
53 | + // 获取个人信息 | ||
54 | + getInfoFun() { | ||
55 | + let that= this; | ||
56 | + let u = app.interface.readteacher; | ||
57 | + app.post(u, {}).then((r) => { | ||
58 | + console.log('3489523498',r) | ||
59 | + if (r.code == 200) { | ||
60 | + | ||
61 | + app.globalData.login_new=r.msg.login_new; | ||
62 | + console.log( app.globalData.login_new) | ||
63 | + // t.setData({ | ||
64 | + // obj: r.msg | ||
65 | + // }) | ||
66 | + } | ||
67 | + }) | ||
68 | + }, | ||
52 | moremiao() { | 69 | moremiao() { |
53 | let token = wx.getStorageSync("token") | 70 | let token = wx.getStorageSync("token") |
54 | if (token == '') { | 71 | if (token == '') { |
@@ -64,8 +81,37 @@ Page({ | @@ -64,8 +81,37 @@ Page({ | ||
64 | } | 81 | } |
65 | } | 82 | } |
66 | }) | 83 | }) |
67 | - | ||
68 | }else{ | 84 | }else{ |
85 | + let login_new=app.globalData.login_new; | ||
86 | + if(login_new==0){ | ||
87 | + // wx.showToast({ | ||
88 | + // title: '您还不是会员', | ||
89 | + // icon:"none" | ||
90 | + // }) | ||
91 | + // setTimeout(function(){ | ||
92 | + // wx.navigateTo({ | ||
93 | + // url: '/pages/login/login', | ||
94 | + // }) | ||
95 | + // },1500) | ||
96 | + // return false | ||
97 | + | ||
98 | + wx.showModal({ | ||
99 | + title: '提示', | ||
100 | + content: '您还不是会员', | ||
101 | + success(res) { | ||
102 | + if (res.confirm) { | ||
103 | + wx.navigateTo({ | ||
104 | + url: '/pages/login/login', | ||
105 | + }) | ||
106 | + } else if (res.cancel) { | ||
107 | + } | ||
108 | + } | ||
109 | + }) | ||
110 | + | ||
111 | + return false | ||
112 | + | ||
113 | + | ||
114 | + } | ||
69 | wx.navigateTo({ | 115 | wx.navigateTo({ |
70 | url: '/pages/xianshi/xianshi?title2='+this.data.title2, | 116 | url: '/pages/xianshi/xianshi?title2='+this.data.title2, |
71 | }) | 117 | }) |
@@ -79,7 +125,6 @@ Page({ | @@ -79,7 +125,6 @@ Page({ | ||
79 | let url = '//wb/wb'; | 125 | let url = '//wb/wb'; |
80 | let data = { | 126 | let data = { |
81 | 127 | ||
82 | - | ||
83 | } | 128 | } |
84 | app.post(url, data, "POST").then((r) => { | 129 | app.post(url, data, "POST").then((r) => { |
85 | console.log('4456789', r) | 130 | console.log('4456789', r) |
@@ -214,6 +259,25 @@ Page({ | @@ -214,6 +259,25 @@ Page({ | ||
214 | } | 259 | } |
215 | }) | 260 | }) |
216 | }else{ | 261 | }else{ |
262 | + let login_new=app.globalData.login_new; | ||
263 | + if(login_new==0){ | ||
264 | + wx.showModal({ | ||
265 | + title: '提示', | ||
266 | + content: '您还不是会员', | ||
267 | + success(res) { | ||
268 | + if (res.confirm) { | ||
269 | + | ||
270 | + | ||
271 | + wx.navigateTo({ | ||
272 | + url: '/pages/login/login', | ||
273 | + }) | ||
274 | + } else if (res.cancel) { | ||
275 | + } | ||
276 | + } | ||
277 | + }) | ||
278 | + | ||
279 | + return false | ||
280 | + } | ||
217 | wx.navigateTo({ | 281 | wx.navigateTo({ |
218 | url: '/pages/zhuanqu/zhuanqu?id=' + id, | 282 | url: '/pages/zhuanqu/zhuanqu?id=' + id, |
219 | }) | 283 | }) |
@@ -222,6 +286,42 @@ Page({ | @@ -222,6 +286,42 @@ Page({ | ||
222 | }, | 286 | }, |
223 | 287 | ||
224 | more() { | 288 | more() { |
289 | + let token = wx.getStorageSync("token") | ||
290 | + if (token == '') { | ||
291 | + wx.showModal({ | ||
292 | + title: '提示', | ||
293 | + content: '请先登录', | ||
294 | + success(res) { | ||
295 | + if (res.confirm) { | ||
296 | + wx.navigateTo({ | ||
297 | + url: '/pages/register/register', | ||
298 | + }) | ||
299 | + } else if (res.cancel) { | ||
300 | + } | ||
301 | + } | ||
302 | + }) | ||
303 | + | ||
304 | + return false | ||
305 | + } | ||
306 | + let login_new=app.globalData.login_new; | ||
307 | + if(login_new==0){ | ||
308 | + wx.showModal({ | ||
309 | + title: '提示', | ||
310 | + content: '您还不是会员', | ||
311 | + success(res) { | ||
312 | + if (res.confirm) { | ||
313 | + | ||
314 | + | ||
315 | + wx.navigateTo({ | ||
316 | + url: '/pages/login/login', | ||
317 | + }) | ||
318 | + } else if (res.cancel) { | ||
319 | + } | ||
320 | + } | ||
321 | + }) | ||
322 | + | ||
323 | + return false | ||
324 | + } | ||
225 | wx.navigateTo({ | 325 | wx.navigateTo({ |
226 | url: '/pages/classify/classify', | 326 | url: '/pages/classify/classify', |
227 | }) | 327 | }) |
@@ -234,12 +334,48 @@ Page({ | @@ -234,12 +334,48 @@ Page({ | ||
234 | }, | 334 | }, |
235 | // 查看小分类 | 335 | // 查看小分类 |
236 | look_item(e) { | 336 | look_item(e) { |
337 | + let token = wx.getStorageSync("token") | ||
338 | + if (token == '') { | ||
339 | + wx.showModal({ | ||
340 | + title: '提示', | ||
341 | + content: '请先登录', | ||
342 | + success(res) { | ||
343 | + if (res.confirm) { | ||
344 | + wx.navigateTo({ | ||
345 | + url: '/pages/register/register', | ||
346 | + }) | ||
347 | + } else if (res.cancel) { | ||
348 | + } | ||
349 | + } | ||
350 | + }) | ||
351 | + }else{ | ||
352 | + let login_new=app.globalData.login_new; | ||
353 | + if(login_new==0){ | ||
354 | + wx.showModal({ | ||
355 | + title: '提示', | ||
356 | + content: '您还不是会员', | ||
357 | + success(res) { | ||
358 | + if (res.confirm) { | ||
359 | + | ||
360 | + | ||
361 | + wx.navigateTo({ | ||
362 | + url: '/pages/login/login', | ||
363 | + }) | ||
364 | + } else if (res.cancel) { | ||
365 | + } | ||
366 | + } | ||
367 | + }) | ||
368 | + | ||
369 | + return false | ||
370 | + } | ||
237 | let title = this.data.nav_arr[this.data.nav_index].name | 371 | let title = this.data.nav_arr[this.data.nav_index].name |
238 | let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0 | 372 | let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0 |
239 | let pid = this.data.nav_arr[this.data.nav_index].id | 373 | let pid = this.data.nav_arr[this.data.nav_index].id |
240 | wx.navigateTo({ | 374 | wx.navigateTo({ |
241 | url: '/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid | 375 | url: '/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid |
242 | }) | 376 | }) |
377 | + } | ||
378 | + | ||
243 | }, | 379 | }, |
244 | //监测轮播图变化 | 380 | //监测轮播图变化 |
245 | swiperChange(e) { | 381 | swiperChange(e) { |
@@ -266,6 +402,25 @@ Page({ | @@ -266,6 +402,25 @@ Page({ | ||
266 | } | 402 | } |
267 | }) | 403 | }) |
268 | } else { | 404 | } else { |
405 | + let login_new=app.globalData.login_new; | ||
406 | + if(login_new==0){ | ||
407 | + wx.showModal({ | ||
408 | + title: '提示', | ||
409 | + content: '您还不是会员', | ||
410 | + success(res) { | ||
411 | + if (res.confirm) { | ||
412 | + | ||
413 | + | ||
414 | + wx.navigateTo({ | ||
415 | + url: '/pages/login/login', | ||
416 | + }) | ||
417 | + } else if (res.cancel) { | ||
418 | + } | ||
419 | + } | ||
420 | + }) | ||
421 | + | ||
422 | + return false | ||
423 | + } | ||
269 | if (style == 2) { | 424 | if (style == 2) { |
270 | wx.navigateTo({ | 425 | wx.navigateTo({ |
271 | url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src | 426 | url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src |
@@ -313,7 +468,7 @@ Page({ | @@ -313,7 +468,7 @@ Page({ | ||
313 | page_type: false | 468 | page_type: false |
314 | }) | 469 | }) |
315 | //调用排序接口 | 470 | //调用排序接口 |
316 | - this.good_list(this.data.cid, e.currentTarget.dataset.index) | 471 | + this.good_list(this.data.pid, e.currentTarget.dataset.index) |
317 | }, | 472 | }, |
318 | 473 | ||
319 | select_nav(e) { | 474 | select_nav(e) { |
@@ -441,13 +596,20 @@ Page({ | @@ -441,13 +596,20 @@ Page({ | ||
441 | } | 596 | } |
442 | }) | 597 | }) |
443 | }, | 598 | }, |
599 | + | ||
600 | + | ||
444 | /** | 601 | /** |
445 | * 生命周期函数--监听页面加载 | 602 | * 生命周期函数--监听页面加载 |
446 | */ | 603 | */ |
447 | onLoad: function(options) { | 604 | onLoad: function(options) { |
448 | - let that = this | 605 | + let that = this; |
606 | + let token=wx.getStorageSync('token'); | ||
607 | + console.log('woshitoe',token) | ||
608 | + if(token!=""){ | ||
609 | + this.getInfoFun() | ||
610 | + } | ||
449 | this.get_banner() | 611 | this.get_banner() |
450 | - this.get_info(0, 1); | 612 | + |
451 | // 获取活动专区 | 613 | // 获取活动专区 |
452 | this.getzhuanqulist(); | 614 | this.getzhuanqulist(); |
453 | this.getxianshi(); | 615 | this.getxianshi(); |
@@ -523,6 +685,22 @@ Page({ | @@ -523,6 +685,22 @@ Page({ | ||
523 | 685 | ||
524 | }).catch((err) => {}) | 686 | }).catch((err) => {}) |
525 | }, | 687 | }, |
688 | + // 获取个人信息 | ||
689 | + getInfoFun() { | ||
690 | + let that= this; | ||
691 | + let u = app.interface.readteacher; | ||
692 | + app.post(u, {}).then((r) => { | ||
693 | + console.log('3489523498',r) | ||
694 | + if (r.code == 200) { | ||
695 | + | ||
696 | + app.globalData.login_new=r.msg.login_new; | ||
697 | + console.log( app.globalData.login_new) | ||
698 | + // t.setData({ | ||
699 | + // obj: r.msg | ||
700 | + // }) | ||
701 | + } | ||
702 | + }) | ||
703 | + }, | ||
526 | /** | 704 | /** |
527 | * 生命周期函数--监听页面初次渲染完成 | 705 | * 生命周期函数--监听页面初次渲染完成 |
528 | */ | 706 | */ |
@@ -534,9 +712,25 @@ Page({ | @@ -534,9 +712,25 @@ Page({ | ||
534 | * 生命周期函数--监听页面显示 | 712 | * 生命周期函数--监听页面显示 |
535 | */ | 713 | */ |
536 | onShow: function() { | 714 | onShow: function() { |
715 | + this.setData({ | ||
716 | + shop_arr:[], | ||
717 | + page:1 | ||
718 | + }) | ||
719 | + let token=wx.getStorageSync('token'); | ||
720 | + console.log('woshitoe',token) | ||
721 | + if(token!=""){ | ||
722 | + this.getInfoFun() | ||
723 | + } | ||
537 | this.get_notice() | 724 | this.get_notice() |
538 | this.get_shopnum() | 725 | this.get_shopnum() |
539 | - this.getmessagelist() | 726 | + this.getmessagelist(); |
727 | + console.log('998867',this.data.pid) | ||
728 | + if(this.data.pid){ | ||
729 | + this.get_info(this.data.pid, 2); | ||
730 | + }else{ | ||
731 | + this.get_info(0, 1); | ||
732 | + } | ||
733 | + | ||
540 | //控制显示隐藏 | 734 | //控制显示隐藏 |
541 | this.ishow() | 735 | this.ishow() |
542 | }, | 736 | }, |
@@ -594,7 +788,7 @@ Page({ | @@ -594,7 +788,7 @@ Page({ | ||
594 | that.setData({ | 788 | that.setData({ |
595 | page: that.data.page + 1 | 789 | page: that.data.page + 1 |
596 | }) | 790 | }) |
597 | - that.good_list(that.data.cid, that.data.c_index) | 791 | + that.good_list(that.data.pid, that.data.c_index) |
598 | }, | 792 | }, |
599 | 793 | ||
600 | /** | 794 | /** |
@@ -64,11 +64,11 @@ | @@ -64,11 +64,11 @@ | ||
64 | </view> | 64 | </view> |
65 | 65 | ||
66 | <!-- 秒杀商城 --> | 66 | <!-- 秒杀商城 --> |
67 | - <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}"> | 67 | + <!-- <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}"> |
68 | <view class="miaoshatop flextwo"> | 68 | <view class="miaoshatop flextwo"> |
69 | <view class="miaoshatopleft flexone"> | 69 | <view class="miaoshatopleft flexone"> |
70 | <view class="miaoshaoname">{{title2}}</view> | 70 | <view class="miaoshaoname">{{title2}}</view> |
71 | - <!-- <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> --> | 71 | + <view class="hourgou" wx:if="{{showtime}}">{{day}}:{{hou}}:{{min}}:{{sec}}</view> |
72 | </view> | 72 | </view> |
73 | <view class="miaosharight" bindtap="moremiao"> | 73 | <view class="miaosharight" bindtap="moremiao"> |
74 | 查看更多> | 74 | 查看更多> |
@@ -82,8 +82,12 @@ | @@ -82,8 +82,12 @@ | ||
82 | <view class="price">¥{{item.price2!=null?item.price2:item.price}}</view> | 82 | <view class="price">¥{{item.price2!=null?item.price2:item.price}}</view> |
83 | </view> | 83 | </view> |
84 | </view> | 84 | </view> |
85 | + </view> --> | ||
86 | + <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao"> | ||
87 | + <view class="neigouimg"> | ||
88 | + <image src="/images/neigouk.png" ></image> | ||
89 | + </view> | ||
85 | </view> | 90 | </view> |
86 | - | ||
87 | </view> | 91 | </view> |
88 | 92 | ||
89 | <!-- 公告栏 --> | 93 | <!-- 公告栏 --> |
@@ -114,13 +118,8 @@ | @@ -114,13 +118,8 @@ | ||
114 | <image src="/images/more.png"></image> | 118 | <image src="/images/more.png"></image> |
115 | </view> | 119 | </view> |
116 | </view> | 120 | </view> |
117 | - | ||
118 | <!-- 小分类 --> | 121 | <!-- 小分类 --> |
119 | - | ||
120 | - | ||
121 | </view> | 122 | </view> |
122 | - | ||
123 | - | ||
124 | <view class='select_box'> | 123 | <view class='select_box'> |
125 | <view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view> | 124 | <view class='select_item {{c_index == 0?"active":""}}' data-index="0" bindtap='reorder'>默认</view> |
126 | <view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格 | 125 | <view class='select_item {{c_index == 1?"active":""}}' data-index="1" bindtap='reorder'>价格 |
@@ -138,6 +137,6 @@ | @@ -138,6 +137,6 @@ | ||
138 | <view class='real_goods'> | 137 | <view class='real_goods'> |
139 | <Model_item list="{{shop_arr}}" /> | 138 | <Model_item list="{{shop_arr}}" /> |
140 | </view> | 139 | </view> |
141 | - <concat/> | 140 | + <concat /> |
142 | </view> | 141 | </view> |
143 | </scroll-view> | 142 | </scroll-view> |
@@ -514,7 +514,7 @@ image { | @@ -514,7 +514,7 @@ image { | ||
514 | 514 | ||
515 | .xianshi { | 515 | .xianshi { |
516 | width: 750rpx; | 516 | width: 750rpx; |
517 | - padding: 8rpx 30rpx; | 517 | + /* padding: 8rpx 30rpx; */ |
518 | box-sizing: border-box; | 518 | box-sizing: border-box; |
519 | background: #fff; | 519 | background: #fff; |
520 | border-bottom:16rpx solid #f5f5f5; | 520 | border-bottom:16rpx solid #f5f5f5; |
@@ -525,3 +525,10 @@ image { | @@ -525,3 +525,10 @@ image { | ||
525 | top: 0; | 525 | top: 0; |
526 | left: 0; | 526 | left: 0; |
527 | } | 527 | } |
528 | +.neigouimg{ | ||
529 | + width:750rpx; | ||
530 | + height:254rpx; | ||
531 | + font-size: 0; | ||
532 | + display:flex; | ||
533 | + justify-content: center; | ||
534 | +} |
@@ -7,7 +7,9 @@ Page({ | @@ -7,7 +7,9 @@ Page({ | ||
7 | */ | 7 | */ |
8 | data: { | 8 | data: { |
9 | page: 1, | 9 | page: 1, |
10 | - messagelist: [] | 10 | + messagelist: [], |
11 | + token:'', | ||
12 | + login_new:'' | ||
11 | }, | 13 | }, |
12 | 14 | ||
13 | /** | 15 | /** |
@@ -88,6 +90,11 @@ Page({ | @@ -88,6 +90,11 @@ Page({ | ||
88 | */ | 90 | */ |
89 | onShow: function() { | 91 | onShow: function() { |
90 | this.setData({ | 92 | this.setData({ |
93 | + token:wx.getStorageSync('token'), | ||
94 | + login_new:app.globalData.login_new | ||
95 | + }) | ||
96 | + | ||
97 | + this.setData({ | ||
91 | messagelist: [], | 98 | messagelist: [], |
92 | page: 1 | 99 | page: 1 |
93 | }) | 100 | }) |
1 | +<block wx:if="{{token==''}}"> | ||
2 | + <navigator class="no_login" catchtap="go_login" url="/pages/register/register" hover-class="none">请先登录</navigator> | ||
3 | +</block> | ||
1 | 4 | ||
5 | +<block wx:elif="{{login_new==''}}"> | ||
6 | + <navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定会员</navigator> | ||
7 | +</block> | ||
8 | + | ||
9 | + <block wx:else> | ||
2 | <view class="empty" wx:if="{{messagelist.length==0}}">暂无更多数据</view> | 10 | <view class="empty" wx:if="{{messagelist.length==0}}">暂无更多数据</view> |
3 | 11 | ||
4 | <view class="messagelist" wx:else> | 12 | <view class="messagelist" wx:else> |
@@ -11,3 +19,5 @@ | @@ -11,3 +19,5 @@ | ||
11 | </view> | 19 | </view> |
12 | 20 | ||
13 | </view> | 21 | </view> |
22 | + </block> | ||
23 | + |
@@ -48,3 +48,11 @@ page { | @@ -48,3 +48,11 @@ page { | ||
48 | .messagename { | 48 | .messagename { |
49 | margin-top: 10rpx; | 49 | margin-top: 10rpx; |
50 | } | 50 | } |
51 | +.no_login{ | ||
52 | + font-size: 36rpx; | ||
53 | + font-family: PingFang SC; | ||
54 | + font-weight: 400; | ||
55 | + color: #ccc; | ||
56 | + margin-top: 200rpx; | ||
57 | + text-align: center; | ||
58 | +} |
1 | const a = getApp() | 1 | const a = getApp() |
2 | Page({ | 2 | Page({ |
3 | - | ||
4 | /** | 3 | /** |
5 | * 页面的初始数据 | 4 | * 页面的初始数据 |
6 | */ | 5 | */ |
@@ -11,8 +10,8 @@ Page({ | @@ -11,8 +10,8 @@ Page({ | ||
11 | indicatorDots: false, | 10 | indicatorDots: false, |
12 | vertical: false, | 11 | vertical: false, |
13 | autoplay: true, | 12 | autoplay: true, |
14 | - interval: 2000, | ||
15 | - duration: 500, | 13 | + interval: 3000, |
14 | + duration: 1500, | ||
16 | kuaidi:'' | 15 | kuaidi:'' |
17 | }, | 16 | }, |
18 | 17 | ||
@@ -39,12 +38,7 @@ Page({ | @@ -39,12 +38,7 @@ Page({ | ||
39 | that.data.kuaidi.forEach(function(value,index,array){ | 38 | that.data.kuaidi.forEach(function(value,index,array){ |
40 | console.log(value.kuaidi[0].kuaidi.Traces) | 39 | console.log(value.kuaidi[0].kuaidi.Traces) |
41 | }) | 40 | }) |
42 | - | ||
43 | - | ||
44 | console.log(that.data.kuaidi) | 41 | console.log(that.data.kuaidi) |
45 | - | ||
46 | - | ||
47 | - | ||
48 | }).catch((err) => { }) | 42 | }).catch((err) => { }) |
49 | }, | 43 | }, |
50 | 44 | ||
@@ -87,6 +81,7 @@ Page({ | @@ -87,6 +81,7 @@ Page({ | ||
87 | let type = e.currentTarget.dataset.i; | 81 | let type = e.currentTarget.dataset.i; |
88 | let index = e.currentTarget.dataset.t; | 82 | let index = e.currentTarget.dataset.t; |
89 | if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1 && index != 5) { | 83 | if (wx.getStorageSync("token") && wx.getStorageSync("login") == 1 && index != 5) { |
84 | + | ||
90 | if (index == 1) { | 85 | if (index == 1) { |
91 | // 跳转订单列表 | 86 | // 跳转订单列表 |
92 | wx.navigateTo({ | 87 | wx.navigateTo({ |
@@ -119,18 +114,39 @@ Page({ | @@ -119,18 +114,39 @@ Page({ | ||
119 | url: '/pages/my/about_us/about_us', | 114 | url: '/pages/my/about_us/about_us', |
120 | }) | 115 | }) |
121 | } else { | 116 | } else { |
117 | + let token=wx.getStorageSync('token'); | ||
118 | + if(token==''){ | ||
119 | + wx.showToast({ | ||
120 | + title: '请先登录', | ||
121 | + icon:"none" | ||
122 | + }) | ||
123 | + setTimeout(function(){ | ||
124 | + wx.navigateTo({ | ||
125 | + url: '/pages/register/register', | ||
126 | + }) | ||
127 | + },1500) | ||
128 | + | ||
129 | + return false | ||
130 | + } | ||
131 | + | ||
132 | + | ||
133 | + let login_new=a.globalData.login_new; | ||
134 | + if(login_new==0){ | ||
122 | wx.showModal({ | 135 | wx.showModal({ |
123 | title: '提示', | 136 | title: '提示', |
124 | - content: '请先登录', | 137 | + content: '您还不是会员', |
125 | success(res) { | 138 | success(res) { |
126 | if (res.confirm) { | 139 | if (res.confirm) { |
127 | wx.navigateTo({ | 140 | wx.navigateTo({ |
128 | - url: '/pages/register/register', | 141 | + url: '/pages/login/login', |
129 | }) | 142 | }) |
130 | } else if (res.cancel) { | 143 | } else if (res.cancel) { |
131 | } | 144 | } |
132 | } | 145 | } |
133 | }) | 146 | }) |
147 | + | ||
148 | + return false | ||
149 | + } | ||
134 | } | 150 | } |
135 | }, | 151 | }, |
136 | //获取购物车数量 | 152 | //获取购物车数量 |
@@ -218,6 +234,8 @@ Page({ | @@ -218,6 +234,8 @@ Page({ | ||
218 | */ | 234 | */ |
219 | onShow: function() { | 235 | onShow: function() { |
220 | let t = this | 236 | let t = this |
237 | + | ||
238 | + t.getInfoFun() | ||
221 | t.getnewwuliu() | 239 | t.getnewwuliu() |
222 | t.get_shopnum() | 240 | t.get_shopnum() |
223 | t.get_order() | 241 | t.get_order() |
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <image class="avator" src="{{obj.image || '/images/icon_59.png'}}"></image> | 3 | <image class="avator" src="{{obj.image || '/images/icon_59.png'}}"></image> |
4 | <!-- 未登录 --> | 4 | <!-- 未登录 --> |
5 | <view class="right" wx:if="{{no_login}}"> | 5 | <view class="right" wx:if="{{no_login}}"> |
6 | - <view class="tips_word">您好,请登录</view> | 6 | + <view class="tips_word">点击登录</view> |
7 | </view> | 7 | </view> |
8 | <!-- 登录 --> | 8 | <!-- 登录 --> |
9 | <view class="right" wx:else> | 9 | <view class="right" wx:else> |
@@ -54,7 +54,8 @@ | @@ -54,7 +54,8 @@ | ||
54 | <!-- 物流信息 --> | 54 | <!-- 物流信息 --> |
55 | <view class="wuliuinfo" wx:if="{{kuaidi.length!=0}}"> | 55 | <view class="wuliuinfo" wx:if="{{kuaidi.length!=0}}"> |
56 | <view class="page-section page-section-spacing swiper"> | 56 | <view class="page-section page-section-spacing swiper"> |
57 | - <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" vertical="true" circular="true"> | 57 | + <!-- vertical="true" --> |
58 | + <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" circular="true"> | ||
58 | <block wx:for="{{kuaidi}}" wx:key="*this"> | 59 | <block wx:for="{{kuaidi}}" wx:key="*this"> |
59 | <swiper-item> | 60 | <swiper-item> |
60 | <view class="swiper-item" bindtap="look_logistics" data-ordernum="{{item.order_odd}}"> | 61 | <view class="swiper-item" bindtap="look_logistics" data-ordernum="{{item.order_odd}}"> |
@@ -128,5 +129,5 @@ | @@ -128,5 +129,5 @@ | ||
128 | </view> | 129 | </view> |
129 | </view> | 130 | </view> |
130 | </view> | 131 | </view> |
131 | - <concat/> | 132 | + <concat /> |
132 | </block> | 133 | </block> |
@@ -24,7 +24,7 @@ Page({ | @@ -24,7 +24,7 @@ Page({ | ||
24 | a.post(u, {}).then((r) => { | 24 | a.post(u, {}).then((r) => { |
25 | if (r.code == 200) { | 25 | if (r.code == 200) { |
26 | t.setData({ | 26 | t.setData({ |
27 | - jifen: r.msg.jifen, | 27 | + jifen: r.msg.jifen==null?0: r.msg.jifen, |
28 | time: r.msg.start + "日到" + r.msg.end + '日', | 28 | time: r.msg.start + "日到" + r.msg.end + '日', |
29 | list: r.msg.res | 29 | list: r.msg.res |
30 | }) | 30 | }) |
@@ -5,7 +5,8 @@ | @@ -5,7 +5,8 @@ | ||
5 | <view class="header_top"> | 5 | <view class="header_top"> |
6 | <view class="tips_word">积分余额</view> | 6 | <view class="tips_word">积分余额</view> |
7 | <view class="jifen">{{jifen}}</view> | 7 | <view class="jifen">{{jifen}}</view> |
8 | - <view class="time">积分可用时间:每月{{time}}之前</view> | 8 | + <!-- <view class="time">积分可用时间:每月{{time}}之前</view> --> |
9 | + <view class="time">积分可用时间:以各公司宣贯为准</view> | ||
9 | </view> | 10 | </view> |
10 | </view> | 11 | </view> |
11 | <view class="line" /> | 12 | <view class="line" /> |
@@ -14,7 +14,18 @@ Page({ | @@ -14,7 +14,18 @@ Page({ | ||
14 | area: '', | 14 | area: '', |
15 | address: '', | 15 | address: '', |
16 | cover_type: false, | 16 | cover_type: false, |
17 | - total:'' | 17 | + total:'', |
18 | + | ||
19 | + info:{ | ||
20 | + address:{ | ||
21 | + address:'', | ||
22 | + area:'', | ||
23 | + id:'', | ||
24 | + tel:'', | ||
25 | + name:'' | ||
26 | + } | ||
27 | + | ||
28 | + } | ||
18 | }, | 29 | }, |
19 | //加减商品数量 | 30 | //加减商品数量 |
20 | num_change(e) { | 31 | num_change(e) { |
@@ -272,9 +283,14 @@ Page({ | @@ -272,9 +283,14 @@ Page({ | ||
272 | * 生命周期函数--监听页面显示 | 283 | * 生命周期函数--监听页面显示 |
273 | */ | 284 | */ |
274 | onShow: function() { | 285 | onShow: function() { |
286 | + | ||
275 | let pages = getCurrentPages(); | 287 | let pages = getCurrentPages(); |
288 | + | ||
276 | let currPage = pages[pages.length - 1] | 289 | let currPage = pages[pages.length - 1] |
290 | + console.log('887766554',currPage.data.id) | ||
277 | if (currPage.data.id) { | 291 | if (currPage.data.id) { |
292 | + console.log('4778785',this.data.info) | ||
293 | + | ||
278 | this.setData({ | 294 | this.setData({ |
279 | "info.address.address": currPage.data.address, | 295 | "info.address.address": currPage.data.address, |
280 | "info.address.area": currPage.data.area, | 296 | "info.address.area": currPage.data.area, |
@@ -282,14 +298,16 @@ Page({ | @@ -282,14 +298,16 @@ Page({ | ||
282 | "info.address.tel": currPage.data.tel, | 298 | "info.address.tel": currPage.data.tel, |
283 | "info.address.name": currPage.data.name | 299 | "info.address.name": currPage.data.name |
284 | }) | 300 | }) |
301 | + console.log(this.data.info) | ||
302 | + console.log(currPage.data.address) | ||
285 | this.get_youfei(currPage.data.id) | 303 | this.get_youfei(currPage.data.id) |
286 | } | 304 | } |
287 | - if (wx.getStorageSync('no_address')) { | ||
288 | - wx.setStorageSync('no_address', false) | ||
289 | - this.setData({ | ||
290 | - "info.address": null | ||
291 | - }) | ||
292 | - } | 305 | + // if (wx.getStorageSync('no_address')) { |
306 | + // wx.setStorageSync('no_address', false) | ||
307 | + // this.setData({ | ||
308 | + // "info.address": null | ||
309 | + // }) | ||
310 | + // } | ||
293 | 311 | ||
294 | }, | 312 | }, |
295 | 313 |
@@ -37,6 +37,9 @@ Page({ | @@ -37,6 +37,9 @@ Page({ | ||
37 | noClick: false, | 37 | noClick: false, |
38 | word: e.currentTarget.dataset.name | 38 | word: e.currentTarget.dataset.name |
39 | }) | 39 | }) |
40 | + wx.navigateTo({ | ||
41 | + url: 'search_result/search_result?title=' + '搜索' + '&name=' + this.data.word | ||
42 | + }) | ||
40 | }, | 43 | }, |
41 | //获取热门搜索标签 | 44 | //获取热门搜索标签 |
42 | get_hot() { | 45 | get_hot() { |
@@ -8,7 +8,9 @@ Page({ | @@ -8,7 +8,9 @@ Page({ | ||
8 | check_num: 0, //选中数量 | 8 | check_num: 0, //选中数量 |
9 | checkAll: false, //全选状态 | 9 | checkAll: false, //全选状态 |
10 | integral: 0, //总积分 | 10 | integral: 0, //总积分 |
11 | - all_num: 0 //总数量 | 11 | + all_num: 0, //总数量 |
12 | + token:'', | ||
13 | + login_new:'' | ||
12 | }, | 14 | }, |
13 | 15 | ||
14 | //删除商品 | 16 | //删除商品 |
@@ -242,6 +244,12 @@ submit(){ | @@ -242,6 +244,12 @@ submit(){ | ||
242 | * 生命周期函数--监听页面显示 | 244 | * 生命周期函数--监听页面显示 |
243 | */ | 245 | */ |
244 | onShow: function() { | 246 | onShow: function() { |
247 | + | ||
248 | + this.setData({ | ||
249 | + token:wx.getStorageSync('token'), | ||
250 | + login_new:app.globalData.login_new | ||
251 | + }) | ||
252 | + | ||
245 | this.get_info() | 253 | this.get_info() |
246 | this.judge() | 254 | this.judge() |
247 | this.get_shopnum(); | 255 | this.get_shopnum(); |
1 | <block wx:if="{{no_login}}"> | 1 | <block wx:if="{{no_login}}"> |
2 | - <navigator class="no_login" catchtap="go_login" url="/pages/register/register">请先登录</navigator> | 2 | + <navigator class="no_login" catchtap="go_login" url="/pages/register/register" hover-class="none">请先登录</navigator> |
3 | </block> | 3 | </block> |
4 | 4 | ||
5 | +<block wx:elif="{{login_new==''}}"> | ||
6 | + <navigator class="no_login" catchtap="go_login" url="/pages/login/login" hover-class="none">请先绑定会员</navigator> | ||
7 | +</block> | ||
8 | + | ||
9 | + | ||
5 | <block wx:else> | 10 | <block wx:else> |
6 | <view class="content"> | 11 | <view class="content"> |
7 | <shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" /> | 12 | <shop_item list="{{list}}" wx:if="{{list.length>0}}" type="1" check_num="{{check_num}}" bindcheck_type="check_type" bindchange_num="change_num" binddelete_shop="delete_shop" /> |
@@ -27,7 +27,6 @@ | @@ -27,7 +27,6 @@ | ||
27 | <view class='three_one'> | 27 | <view class='three_one'> |
28 | <view class='three_one_item {{status==index?"active":""}}' wx:for='{{nav}}' wx:for-index='index' wx:key='{{index}}' bindtap='clickNav' data-index='{{index}}'>{{item}}</view> | 28 | <view class='three_one_item {{status==index?"active":""}}' wx:for='{{nav}}' wx:for-index='index' wx:key='{{index}}' bindtap='clickNav' data-index='{{index}}'>{{item}}</view> |
29 | </view> | 29 | </view> |
30 | - | ||
31 | <view class='three_two'> | 30 | <view class='three_two'> |
32 | <template is="wxParse" data="{{wxParseData:contenta.nodes}}" wx:if="{{status==0}}" /> | 31 | <template is="wxParse" data="{{wxParseData:contenta.nodes}}" wx:if="{{status==0}}" /> |
33 | <template is="wxParse" data="{{wxParseData:contenb.nodes}}" wx:elif="{{status==1}}" /> | 32 | <template is="wxParse" data="{{wxParseData:contenb.nodes}}" wx:elif="{{status==1}}" /> |
@@ -151,9 +151,10 @@ Page({ | @@ -151,9 +151,10 @@ Page({ | ||
151 | }) | 151 | }) |
152 | 152 | ||
153 | time--; | 153 | time--; |
154 | - if (time ==1) { | ||
155 | - console.log(34643) | ||
156 | - that.getCodeFun() | 154 | + // if (time ==1) { |
155 | + // console.log(34643) | ||
156 | + | ||
157 | + // that.getCodeFun() | ||
157 | // let token=wx.getStorageSync('token') | 158 | // let token=wx.getStorageSync('token') |
158 | // wx.navigateTo({ | 159 | // wx.navigateTo({ |
159 | // url: '/pages/register/register', | 160 | // url: '/pages/register/register', |
@@ -168,8 +169,13 @@ Page({ | @@ -168,8 +169,13 @@ Page({ | ||
168 | // }) | 169 | // }) |
169 | // } | 170 | // } |
170 | 171 | ||
171 | - }else if (time<=0){ | 172 | + // } |
173 | + | ||
174 | + if (time<=0){ | ||
172 | clearInterval(interval); | 175 | clearInterval(interval); |
176 | + wx.switchTab({ | ||
177 | + url: '/pages/index/index' | ||
178 | + }) | ||
173 | } | 179 | } |
174 | }.bind(this), 1000); | 180 | }.bind(this), 1000); |
175 | }, | 181 | }, |
@@ -119,6 +119,13 @@ | @@ -119,6 +119,13 @@ | ||
119 | "id": -1, | 119 | "id": -1, |
120 | "name": "首页", | 120 | "name": "首页", |
121 | "pathName": "pages/index/index", | 121 | "pathName": "pages/index/index", |
122 | + "query": "", | ||
123 | + "scene": null | ||
124 | + }, | ||
125 | + { | ||
126 | + "id": -1, | ||
127 | + "name": "注册", | ||
128 | + "pathName": "pages/register/register", | ||
122 | "scene": null | 129 | "scene": null |
123 | } | 130 | } |
124 | ] | 131 | ] |
-
请 注册 或 登录 后发表评论