作者 lihongjuan

11111

@@ -27,14 +27,14 @@ Component({ @@ -27,14 +27,14 @@ Component({
27 }) 27 })
28 setTimeout(function(){ 28 setTimeout(function(){
29 wx.navigateTo({ 29 wx.navigateTo({
30 - url: '/pages/login/login', 30 + url: '/packageA/pages/login/login',
31 }) 31 })
32 },1500) 32 },1500)
33 return false 33 return false
34 } 34 }
35 let id = e.currentTarget.dataset.id 35 let id = e.currentTarget.dataset.id
36 wx.navigateTo({ 36 wx.navigateTo({
37 - url: '/pages/shop_detail/shop_detail?id=' + id 37 + url: '/packageA/pages/shop_detail/shop_detail?id=' + id
38 }) 38 })
39 }, 39 },
40 }, 40 },
@@ -9,22 +9,21 @@ @@ -9,22 +9,21 @@
9 <view wx:if="{{item.price2!=null}}"> 9 <view wx:if="{{item.price2!=null}}">
10 10
11 <view class='goods_flex'> 11 <view class='goods_flex'>
12 - <view class='score'>积分</view>  
13 - <view class='price'>{{item.price2}}</view> 12 + <view class='price'>¥{{item.goods_price}}</view>
  13 + <view class="lineprice">¥{{item.line_price}}</view>
14 14
15 15
16 - <view class='sell'>已卖出{{item.paynum}}件</view> 16 + <view class='sell'>已卖出{{item.sales}}件</view>
17 </view> 17 </view>
18 18
19 <!-- <view class='oldprice'>{{item.price}}</view> --> 19 <!-- <view class='oldprice'>{{item.price}}</view> -->
20 </view> 20 </view>
21 21
22 <view class='goods_flex' wx:else> 22 <view class='goods_flex' wx:else>
23 - <view class='score'>积分</view>  
24 - <view class='price'>{{item.price}}</view>  
25 -  
26 -  
27 - <view class='sell'>已卖出{{item.paynum}}件</view> 23 + <!-- <view class='score'>积分</view> -->
  24 + <view class='price'>¥{{item.goods_price}}</view>
  25 + <view class="lineprice">¥{{item.line_price}}</view>
  26 + <view class='sell'>已卖出{{item.sales}}件</view>
28 </view> 27 </view>
29 28
30 </view> 29 </view>
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 flex-wrap: wrap; 6 flex-wrap: wrap;
7 padding: 8rpx 0 20rpx; 7 padding: 8rpx 0 20rpx;
8 box-sizing: border-box; 8 box-sizing: border-box;
  9 + margin-bottom:120rpx;
9 } 10 }
10 11
11 .real_goods_item { 12 .real_goods_item {
@@ -90,7 +91,7 @@ @@ -90,7 +91,7 @@
90 } 91 }
91 92
92 .price { 93 .price {
93 - font-size: 36rpx; 94 + font-size:30rpx;
94 font-family: PingFang SC; 95 font-family: PingFang SC;
95 font-weight: bold; 96 font-weight: bold;
96 color: rgba(242, 0, 0, 1); 97 color: rgba(242, 0, 0, 1);
@@ -117,4 +118,11 @@ @@ -117,4 +118,11 @@
117 color:#BDC4CE; 118 color:#BDC4CE;
118 font-size: 24rpx; 119 font-size: 24rpx;
119 text-decoration: line-through 120 text-decoration: line-through
  121 +}
  122 +.lineprice{
  123 + color: rgba(156, 156, 156, 1);
  124 + text-decoration: line-through;
  125 + font-size: 20rpx;
  126 + margin-right:5rpx;
  127 +
120 } 128 }
@@ -68,6 +68,30 @@ @@ -68,6 +68,30 @@
68 "text": "我的", 68 "text": "我的",
69 "iconPath": "images/tabbar/icon_71.png", 69 "iconPath": "images/tabbar/icon_71.png",
70 "selectedIconPath": "images/tabbar/icon_72.png" 70 "selectedIconPath": "images/tabbar/icon_72.png"
  71 + },
  72 + {
  73 + "pagePath": "packageA/pages/index/index",
  74 + "text": "商品",
  75 + "iconPath": "images/tabbar/icon_75.png",
  76 + "selectedIconPath": "images/tabbar/icon_68.png"
  77 + },
  78 + {
  79 + "pagePath": "packageA/pages/message/message",
  80 + "text": "消息",
  81 + "iconPath": "images/tabbar/message.png",
  82 + "selectedIconPath": "images/tabbar/messageactive.png"
  83 + },
  84 + {
  85 + "pagePath": "packageA/pages/shop_cart/shop_cart",
  86 + "text": "购物车",
  87 + "iconPath": "images/tabbar/icon_70.png",
  88 + "selectedIconPath": "images/tabbar/icon_73.png"
  89 + },
  90 + {
  91 + "pagePath": "packageA/pages/my/my",
  92 + "text": "我的",
  93 + "iconPath": "images/tabbar/icon_71.png",
  94 + "selectedIconPath": "images/tabbar/icon_72.png"
71 } 95 }
72 ], 96 ],
73 "selectedColor": "#05091A" 97 "selectedColor": "#05091A"
@@ -31,7 +31,39 @@ Page({ @@ -31,7 +31,39 @@ Page({
31 status2: '', 31 status2: '',
32 title2: '', 32 title2: '',
33 scrollTop:'', 33 scrollTop:'',
34 - pid:'' 34 + pid:'',
  35 + logok:'',
  36 + selected:0,
  37 + list:[{
  38 +         pagePath: "/packageA/pages/index/index",
  39 +         text: "商品",
  40 +         iconPath: "/images/tabbar/icon_75.png",
  41 +         selectedIconPath: "/images/tabbar/icon_68.png"
  42 +       },
  43 +       {
  44 +         pagePath: "/packageA/pages/message/message",
  45 +         text: "消息",
  46 +         iconPath: "/images/tabbar/message.png",
  47 +         selectedIconPath: "/images/tabbar/messageactive.png"
  48 +       },
  49 +       {
  50 +         pagePath: "/packageA/pages/shop_cart/shop_cart",
  51 +         text: "购物车",
  52 +         iconPath: "/images/tabbar/icon_70.png",
  53 +         selectedIconPath: "/images/tabbar/icon_73.png"
  54 +       },
  55 +       {
  56 +         pagePath"/packageA/pages/my/my",
  57 +         text"我的",
  58 +         iconPath"/images/tabbar/icon_71.png",
  59 +         selectedIconPath"/images/tabbar/icon_72.png"
  60 +       }],
  61 + category_id1:'',
  62 + sort:'',
  63 + keyword:'',
  64 + shop_arr:[],
  65 + pricesheng:false,
  66 + xiaoliang:false
35 }, 67 },
36 68
37 scroll(e) { 69 scroll(e) {
@@ -66,11 +98,11 @@ if( app.globalData.index==undefined){ @@ -66,11 +98,11 @@ if( app.globalData.index==undefined){
66 this.get_shopnum() 98 this.get_shopnum()
67 this.getmessagelist(); 99 this.getmessagelist();
68 console.log('998867',this.data.pid) 100 console.log('998867',this.data.pid)
69 - if(this.data.pid){  
70 - this.get_info(this.data.pid, 2);  
71 - }else{  
72 - this.get_info(0, 1);  
73 - } 101 + // if(this.data.pid){
  102 + // this.get_info(this.data.pid, 2);
  103 + // }else{
  104 + // this.get_info(0, 1);
  105 + // }
74 106
75 // 获取活动专区 107 // 获取活动专区
76 this.getzhuanqulist(); 108 this.getzhuanqulist();
@@ -83,9 +115,33 @@ if( app.globalData.index==undefined){ @@ -83,9 +115,33 @@ if( app.globalData.index==undefined){
83 } 115 }
84 //控制显示隐藏 116 //控制显示隐藏
85 this.ishow() 117 this.ishow()
  118 +// 我写的项目
  119 +// 获取一级分类
  120 +this.getonkind();
  121 +// 获取商品列表
  122 +this.getgoodlist()
86 123
87 }, 124 },
88 125
  126 + // 获取一级分类
  127 + getonkind(){
  128 + let that= this;
  129 + let url="/sundry/get_category"
  130 + app.postk(url, {}).then((r) => {
  131 + console.log('商品分类',r)
  132 + let obj = {
  133 + name: '首页',
  134 + id: ''
  135 + }
  136 + r.data.unshift(obj)
  137 + that.setData({
  138 + nav_arr: r.data
  139 + })
  140 + })
  141 + },
  142 +
  143 +
  144 +
89 // 获取个人信息 145 // 获取个人信息
90 getInfoFun() { 146 getInfoFun() {
91 let that= this; 147 let that= this;
@@ -112,7 +168,7 @@ if( app.globalData.index==undefined){ @@ -112,7 +168,7 @@ if( app.globalData.index==undefined){
112 success(res) { 168 success(res) {
113 if (res.confirm) { 169 if (res.confirm) {
114 wx.navigateTo({ 170 wx.navigateTo({
115 - url: '/pages/register/register', 171 + url: '/packageA/pages/register/register',
116 }) 172 })
117 } else if (res.cancel) { 173 } else if (res.cancel) {
118 } 174 }
@@ -138,7 +194,7 @@ if( app.globalData.index==undefined){ @@ -138,7 +194,7 @@ if( app.globalData.index==undefined){
138 success(res) { 194 success(res) {
139 if (res.confirm) { 195 if (res.confirm) {
140 wx.navigateTo({ 196 wx.navigateTo({
141 - url: '/pages/login/login', 197 + url: '/packageA/pages/login/login',
142 }) 198 })
143 } else if (res.cancel) { 199 } else if (res.cancel) {
144 } 200 }
@@ -150,7 +206,7 @@ if( app.globalData.index==undefined){ @@ -150,7 +206,7 @@ if( app.globalData.index==undefined){
150 206
151 } 207 }
152 wx.navigateTo({ 208 wx.navigateTo({
153 - url: '/pages/xianshi/xianshi?title2='+this.data.title2, 209 + url: '/packageA/pages/xianshi/xianshi?title2='+this.data.title2,
154 }) 210 })
155 } 211 }
156 212
@@ -257,15 +313,15 @@ if( app.globalData.index==undefined){ @@ -257,15 +313,15 @@ if( app.globalData.index==undefined){
257 //获取活动专区列表 313 //获取活动专区列表
258 getzhuanqulist() { 314 getzhuanqulist() {
259 let that = this 315 let that = this
260 - let url = '/activity/get_all'; 316 + let url = '/activity/get_list';
261 let data = { 317 let data = {
262 318
263 319
264 } 320 }
265 - app.post(url, data, "POST").then((r) => { 321 + app.postk(url, data, "POST").then((r) => {
266 console.log(r) 322 console.log(r)
267 that.setData({ 323 that.setData({
268 - activity: r.msg 324 + activity: r.data
269 }) 325 })
270 326
271 console.log(that.data.activity) 327 console.log(that.data.activity)
@@ -289,7 +345,7 @@ if( app.globalData.index==undefined){ @@ -289,7 +345,7 @@ if( app.globalData.index==undefined){
289 success(res) { 345 success(res) {
290 if (res.confirm) { 346 if (res.confirm) {
291 wx.navigateTo({ 347 wx.navigateTo({
292 - url: '/pages/register/register', 348 + url: '/packageA/pages/register/register',
293 }) 349 })
294 } else if (res.cancel) { 350 } else if (res.cancel) {
295 } 351 }
@@ -306,7 +362,7 @@ if( app.globalData.index==undefined){ @@ -306,7 +362,7 @@ if( app.globalData.index==undefined){
306 362
307 363
308 wx.navigateTo({ 364 wx.navigateTo({
309 - url: '/pages/login/login', 365 + url: '/packageA/pages/login/login',
310 }) 366 })
311 } else if (res.cancel) { 367 } else if (res.cancel) {
312 } 368 }
@@ -316,7 +372,7 @@ if( app.globalData.index==undefined){ @@ -316,7 +372,7 @@ if( app.globalData.index==undefined){
316 return false 372 return false
317 } 373 }
318 wx.navigateTo({ 374 wx.navigateTo({
319 - url: '/pages/zhuanqu/zhuanqu?id=' + id, 375 + url: '/packageA/pages/zhuanqu/zhuanqu?id=' + id,
320 }) 376 })
321 } 377 }
322 378
@@ -331,7 +387,7 @@ if( app.globalData.index==undefined){ @@ -331,7 +387,7 @@ if( app.globalData.index==undefined){
331 success(res) { 387 success(res) {
332 if (res.confirm) { 388 if (res.confirm) {
333 wx.navigateTo({ 389 wx.navigateTo({
334 - url: '/pages/register/register', 390 + url: '/packageA/pages/register/register',
335 }) 391 })
336 } else if (res.cancel) { 392 } else if (res.cancel) {
337 } 393 }
@@ -350,7 +406,7 @@ if( app.globalData.index==undefined){ @@ -350,7 +406,7 @@ if( app.globalData.index==undefined){
350 406
351 407
352 wx.navigateTo({ 408 wx.navigateTo({
353 - url: '/pages/login/login', 409 + url: '/packageA/pages/login/login',
354 }) 410 })
355 } else if (res.cancel) { 411 } else if (res.cancel) {
356 } 412 }
@@ -360,7 +416,7 @@ if( app.globalData.index==undefined){ @@ -360,7 +416,7 @@ if( app.globalData.index==undefined){
360 return false 416 return false
361 } 417 }
362 wx.navigateTo({ 418 wx.navigateTo({
363 - url: '/pages/classify/classify', 419 + url: '/packageA/pages/classify/classify',
364 }) 420 })
365 }, 421 },
366 //展示所有的小分类 422 //展示所有的小分类
@@ -379,7 +435,7 @@ if( app.globalData.index==undefined){ @@ -379,7 +435,7 @@ if( app.globalData.index==undefined){
379 success(res) { 435 success(res) {
380 if (res.confirm) { 436 if (res.confirm) {
381 wx.navigateTo({ 437 wx.navigateTo({
382 - url: '/pages/register/register', 438 + url: '/packageA/pages/register/register',
383 }) 439 })
384 } else if (res.cancel) { 440 } else if (res.cancel) {
385 } 441 }
@@ -396,7 +452,7 @@ if( app.globalData.index==undefined){ @@ -396,7 +452,7 @@ if( app.globalData.index==undefined){
396 452
397 453
398 wx.navigateTo({ 454 wx.navigateTo({
399 - url: '/pages/login/login', 455 + url: '/packageA/pages/login/login',
400 }) 456 })
401 } else if (res.cancel) { 457 } else if (res.cancel) {
402 } 458 }
@@ -405,12 +461,17 @@ if( app.globalData.index==undefined){ @@ -405,12 +461,17 @@ if( app.globalData.index==undefined){
405 461
406 return false 462 return false
407 } 463 }
408 - let title = this.data.nav_arr[this.data.nav_index].name  
409 - let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0  
410 - let pid = this.data.nav_arr[this.data.nav_index].id  
411 - wx.navigateTo({  
412 - url: '/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid 464 + let title = this.data.nav_arr[this.data.nav_index].name
  465 + let category_id2=e.currentTarget.dataset.id;
  466 + wx.navigateTo({
  467 + url: '/packageA/pages/search/search_result/search_result?title=' + title + '&category_id2=' + category_id2
413 }) 468 })
  469 +
  470 + // let index = e.currentTarget.dataset.index ? e.currentTarget.dataset.index : 0
  471 + // let pid = this.data.nav_arr[this.data.nav_index].id
  472 + // wx.navigateTo({
  473 + // url: '/packageA/pages/search/search_result/search_result?title=' + title + "&index=" + index + '&pid=' + pid
  474 + // })
414 } 475 }
415 476
416 }, 477 },
@@ -432,7 +493,7 @@ if( app.globalData.index==undefined){ @@ -432,7 +493,7 @@ if( app.globalData.index==undefined){
432 success(res) { 493 success(res) {
433 if (res.confirm) { 494 if (res.confirm) {
434 wx.navigateTo({ 495 wx.navigateTo({
435 - url: '/pages/register/register', 496 + url: '/packageA/pages/register/register',
436 }) 497 })
437 } else if (res.cancel) { 498 } else if (res.cancel) {
438 } 499 }
@@ -447,7 +508,7 @@ if( app.globalData.index==undefined){ @@ -447,7 +508,7 @@ if( app.globalData.index==undefined){
447 success(res) { 508 success(res) {
448 if (res.confirm) { 509 if (res.confirm) {
449 wx.navigateTo({ 510 wx.navigateTo({
450 - url: '/pages/login/login', 511 + url: '/packageA/pages/login/login',
451 }) 512 })
452 } else if (res.cancel) { 513 } else if (res.cancel) {
453 } 514 }
@@ -458,12 +519,12 @@ if( app.globalData.index==undefined){ @@ -458,12 +519,12 @@ if( app.globalData.index==undefined){
458 } 519 }
459 if (style == 2) { 520 if (style == 2) {
460 wx.navigateTo({ 521 wx.navigateTo({
461 - url: '/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src 522 + url: '/packageA/pages/outerChain/outerChain?src=' + e.currentTarget.dataset.src
462 }) 523 })
463 } else { 524 } else {
464 - wx.navigateTo({  
465 - url: '/pages/shop_detail/shop_detail?id=' + id  
466 - }) 525 + // wx.navigateTo({
  526 + // url: '/packageA/pages/shop_detail/shop_detail?id=' + id
  527 + // })
467 } 528 }
468 } 529 }
469 530
@@ -475,67 +536,129 @@ if( app.globalData.index==undefined){ @@ -475,67 +536,129 @@ if( app.globalData.index==undefined){
475 // 排序 536 // 排序
476 reorder(e) { 537 reorder(e) {
477 let that = this 538 let that = this
478 - let index = Number(e.currentTarget.dataset.index)  
479 - if (index == 1) {  
480 - if (that.data.price == "price") {  
481 - that.setData({  
482 - price: 'price desc'  
483 - })  
484 - } else {  
485 - that.setData({  
486 - price: 'price'  
487 - })  
488 - }  
489 - } else if (index == 2) {  
490 - if (that.data.paynum == "paynum") {  
491 - that.setData({  
492 - paynum: 'paynum desc'  
493 - })  
494 - } else {  
495 - that.setData({  
496 - paynum: 'paynum'  
497 - })  
498 - }  
499 - }  
500 - this.setData({  
501 - c_index: e.currentTarget.dataset.index,  
502 - page: 1,  
503 - page_type: false 539 + that.setData({
  540 + page:1,
  541 + shop_arr:[]
504 }) 542 })
505 - //调用排序接口  
506 - this.good_list(this.data.pid, e.currentTarget.dataset.index)  
507 - },  
508 - 543 + let index = Number(e.currentTarget.dataset.index);
  544 + that.setData({
  545 + c_index:index,
  546 + sort:index
  547 + })
  548 + if(index==1){
  549 + this.setData({
  550 + pricesheng:!this.data.pricesheng
  551 + })
  552 + if(this.data.pricesheng==true){
  553 + this.setData({
  554 + sort:1
  555 + })
  556 + }else{
  557 + this.setData({
  558 + sort:2
  559 + })
  560 + }
  561 + }
  562 + if(this.data.index==2){
  563 + this.setData({
  564 + xiaoliang:!this.data.xiaoliang
  565 + })
  566 + if(this.data.xiaoliang==true){
  567 + this.setData({
  568 + sort:3
  569 + })
  570 + }else{
  571 + this.setData({
  572 + sort:4
  573 + })
  574 + }
  575 + }
  576 + that.getgoodlist()
  577 +
  578 + // let that = this
  579 + // let index = Number(e.currentTarget.dataset.index)
  580 + // if (index == 1) {
  581 + // if (that.data.price == "price") {
  582 + // that.setData({
  583 + // price: 'price desc'
  584 + // })
  585 + // } else {
  586 + // that.setData({
  587 + // price: 'price'
  588 + // })
  589 + // }
  590 + // } else if (index == 2) {
  591 + // if (that.data.paynum == "paynum") {
  592 + // that.setData({
  593 + // paynum: 'paynum desc'
  594 + // })
  595 + // } else {
  596 + // that.setData({
  597 + // paynum: 'paynum'
  598 + // })
  599 + // }
  600 + // }
  601 + // this.setData({
  602 + // c_index: e.currentTarget.dataset.index,
  603 + // page: 1,
  604 + // page_type: false
  605 + // })
  606 + // //调用排序接口
  607 + // this.good_list(this.data.pid, e.currentTarget.dataset.index)
  608 + },
  609 +// 选择一级分类
509 select_nav(e) { 610 select_nav(e) {
510 let index = Number(e.currentTarget.dataset.index) 611 let index = Number(e.currentTarget.dataset.index)
511 let id = e.currentTarget.dataset.id; 612 let id = e.currentTarget.dataset.id;
  613 + let newclass_arr=this.data.nav_arr[index].child
512 this.setData({ 614 this.setData({
513 - pid:id  
514 - })  
515 -  
516 - this.setData({  
517 - scrollTop: 0 615 + category_id1:id,
  616 + class_arr:newclass_arr,
  617 + nav_index:index
518 }) 618 })
519 - if (index == this.data.nav_index) {  
520 - return  
521 - } else {  
522 - this.setData({  
523 - nav_index: index,  
524 - page: 1,  
525 - page_type: false,  
526 - c_index: 0, //筛选分类下标  
527 - price: 'price desc', //价格排序方式  
528 - paynum: 'paynum desc' //销量排序方式 619 + },
  620 + // 获取商品列表
  621 + getgoodlist(){
  622 + let that=this;
  623 + let url = '/goods/get_goods'
  624 + let param={
  625 + category_id1:this.data.category_id1,
  626 + sort:this.data.sort,
  627 + keyword:this.data.keyword,
  628 + page:this.data.page,
  629 + pageNum:10
  630 + }
  631 + app.postk(url, param).then((res) => {
  632 + if(that.data.page>1){
  633 + if(res.data.length==0){
  634 + wx.showToast({
  635 + title:'没有更多了~',
  636 + icon:'none'
  637 +
  638 + })
  639 + }else{
  640 + this.setData({
  641 + shop_arr:that.data.shop_arr.concat(res.data)
  642 + })
  643 + }
  644 + }else{
  645 + this.setData({
  646 + shop_arr:that.data.shop_arr.concat(res.data)
  647 + })
  648 + }
  649 +
  650 +
  651 + console.log(that.data.shop_arr,'轮播图')
529 }) 652 })
530 - this.get_info(id, 2)  
531 - }  
532 - }, 653 + },
  654 +
533 // 轮播图 655 // 轮播图
534 get_banner() { 656 get_banner() {
535 - let url = app.interface.banner  
536 - app.post(url, {}).then((res) => { 657 + let url = '/sundry/get_slide'
  658 + app.postk(url, {}).then((res) => {
  659 + console.log(res,'轮播图')
537 this.setData({ 660 this.setData({
538 - imgurl: res.msg 661 + imgurl: res.data
539 }) 662 })
540 }) 663 })
541 }, 664 },
@@ -553,45 +676,45 @@ if( app.globalData.index==undefined){ @@ -553,45 +676,45 @@ if( app.globalData.index==undefined){
553 }) 676 })
554 }, 677 },
555 //获取页面信息 678 //获取页面信息
556 - get_info(pid, type) { //type 1为小标题 2为小标题下的小分类  
557 - wx.showLoading({  
558 - title: '加载中'  
559 - })  
560 - let that = this  
561 - let url = app.interface.index  
562 - let params = {  
563 - pid: pid  
564 - }  
565 - app.post(url, params).then((res) => {  
566 - console.log('88776654', res)  
567 - wx.hideLoading()  
568 - if (type == 1) {  
569 - let obj = {  
570 - name: '首页',  
571 - id: ''  
572 - }  
573 - res.msg.unshift(obj)  
574 - that.setData({  
575 - nav_arr: res.msg  
576 - })  
577 - that.get_info(res.msg[0].id, 2)  
578 - } else if (type == 2) {  
579 - console.log('666', res)  
580 - // let obj = {  
581 - // name: '全部',  
582 - // id: ''  
583 - // }  
584 - // res.msg.unshift(obj)  
585 - that.setData({  
586 - class_arr: res.msg,  
587 - cid: ''  
588 - })  
589 - that.good_list(pid, that.data.c_index)  
590 - }  
591 - }).catch((er) => {  
592 - wx.hideLoading()  
593 - })  
594 - }, 679 + // get_info(pid, type) { //type 1为小标题 2为小标题下的小分类
  680 + // wx.showLoading({
  681 + // title: '加载中'
  682 + // })
  683 + // let that = this
  684 + // let url = app.interface.index
  685 + // let params = {
  686 + // pid: pid
  687 + // }
  688 + // app.post(url, params).then((res) => {
  689 + // console.log('88776654', res)
  690 + // wx.hideLoading()
  691 + // if (type == 1) {
  692 + // let obj = {
  693 + // name: '首页',
  694 + // id: ''
  695 + // }
  696 + // res.msg.unshift(obj)
  697 + // that.setData({
  698 + // nav_arr: res.data
  699 + // })
  700 + // that.get_info(res.msg[0].id, 2)
  701 + // } else if (type == 2) {
  702 + // console.log('666', res)
  703 + // // let obj = {
  704 + // // name: '全部',
  705 + // // id: ''
  706 + // // }
  707 + // // res.msg.unshift(obj)
  708 + // that.setData({
  709 + // class_arr: res.data,
  710 + // cid: ''
  711 + // })
  712 + // that.good_list(pid, that.data.c_index)
  713 + // }
  714 + // }).catch((er) => {
  715 + // wx.hideLoading()
  716 + // })
  717 + // },
595 //获取商品列表 718 //获取商品列表
596 good_list(pid, c_index) { 719 good_list(pid, c_index) {
597 wx.showLoading({ 720 wx.showLoading({
@@ -712,7 +835,9 @@ if( app.globalData.index==undefined){ @@ -712,7 +835,9 @@ if( app.globalData.index==undefined){
712 * 生命周期函数--监听页面显示 835 * 生命周期函数--监听页面显示
713 */ 836 */
714 onShow: function() { 837 onShow: function() {
715 - 838 + this.setData({
  839 + logok:app.globalData.baseUrlimg+"assets/img/cb2ad36a391388f19f5f912fa021f8f.png"
  840 + })
716 this.get_banner() 841 this.get_banner()
717 console.log(app.globalData.index) 842 console.log(app.globalData.index)
718 if(app.globalData.index==0){ 843 if(app.globalData.index==0){
@@ -727,9 +852,9 @@ if( app.globalData.index==undefined){ @@ -727,9 +852,9 @@ if( app.globalData.index==undefined){
727 this.getmessagelist(); 852 this.getmessagelist();
728 console.log('998867',this.data.pid) 853 console.log('998867',this.data.pid)
729 if(this.data.pid){ 854 if(this.data.pid){
730 - this.get_info(this.data.pid, 2); 855 + // this.get_info(this.data.pid, 2);
731 }else{ 856 }else{
732 - this.get_info(0, 1); 857 + // this.get_info(0, 1);
733 } 858 }
734 859
735 //控制显示隐藏 860 //控制显示隐藏
@@ -761,39 +886,46 @@ if( app.globalData.index==undefined){ @@ -761,39 +886,46 @@ if( app.globalData.index==undefined){
761 886
762 }, 887 },
763 loadMore(e){ 888 loadMore(e){
764 - console.log(e)  
765 - let that = this  
766 - if (that.data.page_type) {  
767 - wx.showToast({  
768 - title: '暂无更多数据',  
769 - icon: 'none',  
770 - duration: 1000  
771 - })  
772 - return  
773 - }  
774 - that.setData({  
775 - page: that.data.page + 1 889 + let newpage=this.data.page;
  890 + newpage++;
  891 + this.setData({
  892 + page:newpage
776 }) 893 })
777 - that.good_list(that.data.pid, that.data.c_index) 894 + this.getgoodlist()
  895 + // console.log(e)
  896 + // let that = this
  897 + // if (that.data.page_type) {
  898 + // wx.showToast({
  899 + // title: '暂无更多数据',
  900 + // icon: 'none',
  901 + // duration: 1000
  902 + // })
  903 + // return
  904 + // }
  905 + // that.setData({
  906 + // page: that.data.page + 1
  907 + // })
  908 + // that.good_list(that.data.pid, that.data.c_index)
778 }, 909 },
779 /** 910 /**
780 * 页面上拉触底事件的处理函数 911 * 页面上拉触底事件的处理函数
781 */ 912 */
782 onReachBottom: function() { 913 onReachBottom: function() {
783 - console.log(43898438493)  
784 - let that = this  
785 - if (that.data.page_type) {  
786 - wx.showToast({  
787 - title: '暂无更多数据',  
788 - icon: 'none',  
789 - duration: 1000  
790 - })  
791 - return  
792 - }  
793 - that.setData({  
794 - page: that.data.page + 1  
795 - })  
796 - that.good_list(that.data.pid, that.data.c_index) 914 +
  915 + // console.log(43898438493)
  916 + // let that = this
  917 + // if (that.data.page_type) {
  918 + // wx.showToast({
  919 + // title: '暂无更多数据',
  920 + // icon: 'none',
  921 + // duration: 1000
  922 + // })
  923 + // return
  924 + // }
  925 + // that.setData({
  926 + // page: that.data.page + 1
  927 + // })
  928 + // that.good_list(that.data.pid, that.data.c_index)
797 }, 929 },
798 930
799 /** 931 /**
1 { 1 {
2 "navigationBarTitleText": "首页", 2 "navigationBarTitleText": "首页",
3 "usingComponents": { 3 "usingComponents": {
4 - "concat": "/Components/concat/concat",  
5 - "Model_item": "/Components/Model_item/Model_item" 4 + "concat": "/packageA/Components/concat/concat",
  5 + "Model_item": "/packageA/Components/Model_item/Model_item",
  6 + "v-tab-bar": "/custom-tab-bar/custom-tab-bar"
6 } 7 }
7 } 8 }
@@ -8,7 +8,8 @@ @@ -8,7 +8,8 @@
8 </view> 8 </view>
9 9
10 <view class='list' wx:if="{{nav_index!=0}}"> 10 <view class='list' wx:if="{{nav_index!=0}}">
11 - <view class='list_item' wx:if="{{index < length_num}}" wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item"> 11 + <!-- wx:if="{{index < length_num}}" -->
  12 + <view class='list_item' wx:for="{{class_arr}}" wx:key="index" data-id="{{item.id}}" data-index="{{index}}" catchtap="look_item">
12 <view class='item'> 13 <view class='item'>
13 <view class='item_img'> 14 <view class='item_img'>
14 <image src='{{item.image}}' mode='aspectFill' /> 15 <image src='{{item.image}}' mode='aspectFill' />
@@ -85,7 +86,7 @@ @@ -85,7 +86,7 @@
85 </view> --> 86 </view> -->
86 <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao"> 87 <view class="miaosha xianshi" wx:if="{{status2==1&&activitystatus==3&&xianshilist.length!=0}}" bindtap="moremiao">
87 <view class="neigouimg"> 88 <view class="neigouimg">
88 - <image src="/images/neigouk.png" ></image> 89 + <image src="{{logok}}" ></image>
89 </view> 90 </view>
90 </view> 91 </view>
91 </view> 92 </view>
@@ -139,4 +140,5 @@ @@ -139,4 +140,5 @@
139 </view> 140 </view>
140 <concat /> 141 <concat />
141 </view> 142 </view>
142 -</scroll-view>  
  143 +</scroll-view>
  144 +<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
@@ -532,3 +532,5 @@ image { @@ -532,3 +532,5 @@ image {
532 display:flex; 532 display:flex;
533 justify-content: center; 533 justify-content: center;
534 } 534 }
  535 +
  536 +
@@ -9,7 +9,32 @@ Page({ @@ -9,7 +9,32 @@ Page({
9 page: 1, 9 page: 1,
10 messagelist: [], 10 messagelist: [],
11 token:'', 11 token:'',
12 - login_new:'' 12 + login_new:'',
  13 + selected:1,
  14 + list:[{
  15 +         pagePath: "/packageA/pages/index/index",
  16 +         text: "商品",
  17 +         iconPath: "/images/tabbar/icon_75.png",
  18 +         selectedIconPath: "/images/tabbar/icon_68.png"
  19 +       },
  20 +       {
  21 +         pagePath: "/packageA/pages/message/message",
  22 +         text: "消息",
  23 +         iconPath: "/images/tabbar/message.png",
  24 +         selectedIconPath: "/images/tabbar/messageactive.png"
  25 +       },
  26 +       {
  27 +         pagePath: "/packageA/pages/shop_cart/shop_cart",
  28 +         text: "购物车",
  29 +         iconPath: "/images/tabbar/icon_70.png",
  30 +         selectedIconPath: "/images/tabbar/icon_73.png"
  31 +       },
  32 +       {
  33 +         pagePath"/packageA/pages/my/my",
  34 +         text"我的",
  35 +         iconPath"/images/tabbar/icon_71.png",
  36 +         selectedIconPath"/images/tabbar/icon_72.png"
  37 +       }]
13 }, 38 },
14 39
15 /** 40 /**
1 { 1 {
2 - "navigationBarTitleText": "消息列表" 2 + "navigationBarTitleText": "消息列表",
  3 + "usingComponents": {
  4 + "v-tab-bar": "/custom-tab-bar/custom-tab-bar"
  5 + }
3 } 6 }
@@ -22,3 +22,4 @@ @@ -22,3 +22,4 @@
22 </view> 22 </view>
23 </block> 23 </block>
24 24
  25 +<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
@@ -12,7 +12,32 @@ Page({ @@ -12,7 +12,32 @@ Page({
12 autoplay: true, 12 autoplay: true,
13 interval: 3000, 13 interval: 3000,
14 duration: 1500, 14 duration: 1500,
15 - kuaidi:'' 15 + kuaidi:'',
  16 + selected:3,
  17 + list:[{
  18 +         pagePath: "/packageA/pages/index/index",
  19 +         text: "商品",
  20 +         iconPath: "/images/tabbar/icon_75.png",
  21 +         selectedIconPath: "/images/tabbar/icon_68.png"
  22 +       },
  23 +       {
  24 +         pagePath: "/packageA/pages/message/message",
  25 +         text: "消息",
  26 +         iconPath: "/images/tabbar/message.png",
  27 +         selectedIconPath: "/images/tabbar/messageactive.png"
  28 +       },
  29 +       {
  30 +         pagePath: "/packageA/pages/shop_cart/shop_cart",
  31 +         text: "购物车",
  32 +         iconPath: "/images/tabbar/icon_70.png",
  33 +         selectedIconPath: "/images/tabbar/icon_73.png"
  34 +       },
  35 +       {
  36 +         pagePath"/packageA/pages/my/my",
  37 +         text"我的",
  38 +         iconPath"/images/tabbar/icon_71.png",
  39 +         selectedIconPath"/images/tabbar/icon_72.png"
  40 +       }]
16 }, 41 },
17 42
18 /** 43 /**
@@ -48,7 +73,7 @@ Page({ @@ -48,7 +73,7 @@ Page({
48 let ordernum = e.currentTarget.dataset.ordernum; 73 let ordernum = e.currentTarget.dataset.ordernum;
49 console.log(ordernum) 74 console.log(ordernum)
50 wx.navigateTo({ 75 wx.navigateTo({
51 - url: '/pages/logistics/logistics?order=' + ordernum 76 + url: '/packageA/pages/logistics/logistics?order=' + ordernum
52 }) 77 })
53 }, 78 },
54 79
@@ -78,7 +103,7 @@ Page({ @@ -78,7 +103,7 @@ Page({
78 toLoginFun() { 103 toLoginFun() {
79 if (this.data.no_login) { 104 if (this.data.no_login) {
80 wx.navigateTo({ 105 wx.navigateTo({
81 - url: '/pages/register/register', 106 + url: '/packageA/pages/register/register',
82 }) 107 })
83 } 108 }
84 }, 109 },
@@ -93,33 +118,33 @@ Page({ @@ -93,33 +118,33 @@ Page({
93 if (index == 1) { 118 if (index == 1) {
94 // 跳转订单列表 119 // 跳转订单列表
95 wx.navigateTo({ 120 wx.navigateTo({
96 - url: '/pages/order/order_list/order_list?type=' + type, 121 + url: '/packageA/pages/order/order_list/order_list?type=' + type,
97 }) 122 })
98 } else if (index == 2) { 123 } else if (index == 2) {
99 // 跳转收藏列表 124 // 跳转收藏列表
100 wx.navigateTo({ 125 wx.navigateTo({
101 - url: '/pages/Collection/collection', 126 + url: '/packageA/pages/Collection/collection',
102 }) 127 })
103 } else if (index == 3) { 128 } else if (index == 3) {
104 // 跳转积分列表 129 // 跳转积分列表
105 wx.navigateTo({ 130 wx.navigateTo({
106 - url: '/pages/my/my_integral/my_integral', 131 + url: '/packageA/pages/my/my_integral/my_integral',
107 }) 132 })
108 } else if (index == 4) { 133 } else if (index == 4) {
109 // 跳转地址列表 134 // 跳转地址列表
110 wx.navigateTo({ 135 wx.navigateTo({
111 - url: '/pages/address/address', 136 + url: '/packageA/pages/address/address',
112 }) 137 })
113 } else if (index == 6) { 138 } else if (index == 6) {
114 // 跳转地址列表 139 // 跳转地址列表
115 wx.navigateTo({ 140 wx.navigateTo({
116 - url: '/pages/zuji/zuji', 141 + url: '/packageA/pages/zuji/zuji',
117 }) 142 })
118 } 143 }
119 } else if (wx.getStorageSync("token") && index == 5) { 144 } else if (wx.getStorageSync("token") && index == 5) {
120 // 跳转关于列表 145 // 跳转关于列表
121 wx.navigateTo({ 146 wx.navigateTo({
122 - url: '/pages/my/about_us/about_us', 147 + url: '/packageA/pages/my/about_us/about_us',
123 }) 148 })
124 } else { 149 } else {
125 let token=wx.getStorageSync('token'); 150 let token=wx.getStorageSync('token');
@@ -130,7 +155,7 @@ Page({ @@ -130,7 +155,7 @@ Page({
130 }) 155 })
131 setTimeout(function(){ 156 setTimeout(function(){
132 wx.navigateTo({ 157 wx.navigateTo({
133 - url: '/pages/register/register', 158 + url: '/packageA/pages/register/register',
134 }) 159 })
135 },1500) 160 },1500)
136 161
@@ -146,7 +171,7 @@ Page({ @@ -146,7 +171,7 @@ Page({
146 success(res) { 171 success(res) {
147 if (res.confirm) { 172 if (res.confirm) {
148 wx.navigateTo({ 173 wx.navigateTo({
149 - url: '/pages/login/login', 174 + url: '/packageA/pages/login/login',
150 }) 175 })
151 } else if (res.cancel) { 176 } else if (res.cancel) {
152 } 177 }
1 { 1 {
2 "navigationBarTitleText": "个人中心", 2 "navigationBarTitleText": "个人中心",
3 "usingComponents": { 3 "usingComponents": {
4 - "concat": "/Components/concat/concat" 4 + "concat": "/Components/concat/concat",
  5 + "v-tab-bar": "/custom-tab-bar/custom-tab-bar"
5 } 6 }
6 } 7 }
@@ -129,4 +129,5 @@ @@ -129,4 +129,5 @@
129 </view> 129 </view>
130 </view> 130 </view>
131 <concat /> 131 <concat />
132 -</block>  
  132 +</block>
  133 +<v-tab-bar selected="{{selected}}" text="2" list="{{list}}"></v-tab-bar>
@@ -9,7 +9,12 @@ Page({ @@ -9,7 +9,12 @@ Page({
9 page: 1, 9 page: 1,
10 c_index: 0, //筛选分类下标 10 c_index: 0, //筛选分类下标
11 price: 'price desc', //价格排序方式 11 price: 'price desc', //价格排序方式
12 - paynum: 'paynum desc' //销量排序方式 12 + paynum: 'paynum desc' ,//销量排序方式
  13 + category_id2:'',
  14 + shop_arr:[],
  15 + keyword:'',
  16 + sort:''
  17 +
13 }, 18 },
14 19
15 20
@@ -134,30 +139,67 @@ Page({ @@ -134,30 +139,67 @@ Page({
134 wx.setNavigationBarTitle({ 139 wx.setNavigationBarTitle({
135 title: options.title ? options.title : '搜索' 140 title: options.title ? options.title : '搜索'
136 }) 141 })
137 - if (options.index){  
138 - this.setData({  
139 - nav_index: Number(options.index),  
140 - nav_type: true,  
141 - pid: options.pid  
142 - })  
143 - this.get_info(options.pid)  
144 - } else {  
145 - if (options.name){  
146 - this.setData({  
147 - cid: options.name,  
148 - search_type: true  
149 - })  
150 - this.good_list(options.name, 0)  
151 - } else { 142 + this.setData({
  143 + category_id2:options.category_id2
  144 + })
  145 + this.getgoodlist()
  146 + // if (options.index){
  147 + // this.setData({
  148 + // nav_index: Number(options.index),
  149 + // nav_type: true,
  150 + // pid: options.pid
  151 + // })
  152 + // this.get_info(options.pid)
  153 + // } else {
  154 + // if (options.name){
  155 + // this.setData({
  156 + // cid: options.name,
  157 + // search_type: true
  158 + // })
  159 + // this.good_list(options.name, 0)
  160 + // } else {
  161 + // this.setData({
  162 + // cid: options.pid
  163 + // })
  164 + // this.good_list(options.pid, 0)
  165 + // }
  166 +
  167 + // }
  168 +
  169 +
  170 + },
  171 + getgoodlist(){
  172 + let that=this;
  173 + let url = '/goods/get_goods'
  174 + let param={
  175 + category_id2:this.data.category_id2,
  176 + sort:this.data.sort,
  177 + keyword:this.data.keyword,
  178 + page:this.data.page,
  179 + pageNum:10
  180 + }
  181 + app.postk(url, param).then((res) => {
  182 + if(that.data.page>1){
  183 + if(res.data.length==0){
  184 + wx.showToast({
  185 + title:'没有更多了~',
  186 + icon:'none'
  187 +
  188 + })
  189 + }else{
  190 + this.setData({
  191 + shop_arr:that.data.shop_arr.concat(res.data)
  192 + })
  193 + }
  194 + }else{
152 this.setData({ 195 this.setData({
153 - cid: options.pid 196 + shop_arr:that.data.shop_arr.concat(res.data)
154 }) 197 })
155 - this.good_list(options.pid, 0)  
156 } 198 }
157 -  
158 - }  
159 - 199 +
160 200
  201 + console.log(that.data.shop_arr,'轮播图')
  202 + })
161 }, 203 },
162 204
163 /** 205 /**
@@ -10,7 +10,31 @@ Page({ @@ -10,7 +10,31 @@ Page({
10 integral: 0, //总积分 10 integral: 0, //总积分
11 all_num: 0, //总数量 11 all_num: 0, //总数量
12 token:'', 12 token:'',
13 - login_new:'' 13 + login_new:'',
  14 + listarr:[{
  15 +         pagePath: "/packageA/pages/index/index",
  16 +         text: "商品",
  17 +         iconPath: "/images/tabbar/icon_75.png",
  18 +         selectedIconPath: "/images/tabbar/icon_68.png"
  19 +       },
  20 +       {
  21 +         pagePath: "/packageA/pages/message/message",
  22 +         text: "消息",
  23 +         iconPath: "/images/tabbar/message.png",
  24 +         selectedIconPath: "/images/tabbar/messageactive.png"
  25 +       },
  26 +       {
  27 +         pagePath: "/packageA/pages/shop_cart/shop_cart",
  28 +         text: "购物车",
  29 +         iconPath: "/images/tabbar/icon_70.png",
  30 +         selectedIconPath: "/images/tabbar/icon_73.png"
  31 +       },
  32 +       {
  33 +         pagePath"/packageA/pages/my/my",
  34 +         text"我的",
  35 +         iconPath"/images/tabbar/icon_71.png",
  36 +         selectedIconPath"/images/tabbar/icon_72.png"
  37 +       }]
14 }, 38 },
15 39
16 //删除商品 40 //删除商品
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 "navigationBarTitleText": "购物车", 2 "navigationBarTitleText": "购物车",
3 "usingComponents": { 3 "usingComponents": {
4 "concat": "/Components/concat/concat", 4 "concat": "/Components/concat/concat",
5 - "shop_item": "/Components/shop_item/shop_item" 5 + "shop_item": "/Components/shop_item/shop_item",
  6 + "v-tab-bar": "/custom-tab-bar/custom-tab-bar"
6 } 7 }
7 } 8 }
@@ -26,3 +26,4 @@ @@ -26,3 +26,4 @@
26 </view> 26 </view>
27 <concat/> 27 <concat/>
28 </block> 28 </block>
  29 +<v-tab-bar selected="{{selected}}" text="2" list="{{listarr}}"></v-tab-bar>
@@ -98,7 +98,7 @@ Page({ @@ -98,7 +98,7 @@ Page({
98 98
99 getmorelist(){ 99 getmorelist(){
100 let that = this 100 let that = this
101 - let url = '/activity/get_product'; 101 + let url = '/activity/get_detail';
102 let data = { 102 let data = {
103 activity_id:that.data.activeid, 103 activity_id:that.data.activeid,
104 page: that.data.page, 104 page: that.data.page,
@@ -106,7 +106,7 @@ Page({ @@ -106,7 +106,7 @@ Page({
106 order:that.data.order, 106 order:that.data.order,
107 107
108 } 108 }
109 - app.post(url, data, "POST").then((r) => { 109 + app.postk(url, data, "POST").then((r) => {
110 console.log(r) 110 console.log(r)
111 that.setData({ 111 that.setData({
112 activelist: that.data.activelist.concat(r.msg) 112 activelist: that.data.activelist.concat(r.msg)