正在显示
100 个修改的文件
包含
0 行增加
和
1485 行删除
Components/Model_item/Model_item.js
已删除
100644 → 0
1 | -const app=getApp() | ||
2 | -Component({ | ||
3 | - /** | ||
4 | - * 组件的属性列表 | ||
5 | - */ | ||
6 | - properties: { | ||
7 | - list: Array | ||
8 | - }, | ||
9 | - | ||
10 | - /** | ||
11 | - * 组件的初始数据 | ||
12 | - */ | ||
13 | - data: { | ||
14 | - | ||
15 | - }, | ||
16 | - | ||
17 | - /** | ||
18 | - * 组件的方法列表 | ||
19 | - */ | ||
20 | - methods: { | ||
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 | - // } | ||
35 | - let id = e.currentTarget.dataset.id | ||
36 | - let token=wx.getStorageSync('token'); | ||
37 | - if(token==''){ | ||
38 | - wx.showToast({ | ||
39 | - title: '请先登录', | ||
40 | - icon:'none', | ||
41 | - duration: 1300 | ||
42 | - }) | ||
43 | - setTimeout(function(){ | ||
44 | - wx.navigateTo({ | ||
45 | - url: '/pages/register/register', | ||
46 | - }) | ||
47 | - },1300) | ||
48 | - }else{ | ||
49 | - wx.navigateTo({ | ||
50 | - url: '/pages/shop_detail/shop_detail?id=' + id | ||
51 | - }) | ||
52 | - } | ||
53 | - }, | ||
54 | - }, | ||
55 | - lifetimes: { | ||
56 | - created() { | ||
57 | - // 在组件实例刚刚被创建时执行 | ||
58 | - | ||
59 | - | ||
60 | - }, | ||
61 | - attached() { | ||
62 | - // 在组件实例进入页面节点树时执行 | ||
63 | - }, | ||
64 | - ready() { | ||
65 | - // 在组件在视图层布局完成后执行 | ||
66 | - this.setData({ | ||
67 | - list: this.properties.list | ||
68 | - }) | ||
69 | - | ||
70 | - }, | ||
71 | - detached() { | ||
72 | - // 在组件实例被从页面节点树移除时执行 | ||
73 | - }, | ||
74 | - } | ||
75 | -}) |
Components/Model_item/Model_item.json
已删除
100644 → 0
Components/Model_item/Model_item.wxml
已删除
100644 → 0
1 | -<view class='real_goods'> | ||
2 | - <view class="real_goods_item" wx:for="{{list}}" wx:key="index" data-id="{{item.id}}" bindtap="{{item.sold==0?'':'look_more'}}"> | ||
3 | - <view class='real_goods_img'> | ||
4 | - <image src='{{item.images[0]}}' mode="aspectFill" /> | ||
5 | - <image src='/images/mei.png' class="tip" wx:if="{{item.sold == 0}}" /> | ||
6 | - </view> | ||
7 | - <view class='real_goods_bottom'> | ||
8 | - <view class='goods_title'>{{item.name}}</view> | ||
9 | - | ||
10 | - | ||
11 | - <view class='goods_flex'> | ||
12 | - <!-- <view class='score'>积分</view> | ||
13 | - <view class='price'>{{item.price2}}</view> | ||
14 | - | ||
15 | - | ||
16 | - <view class='sell'>已卖出{{item.paynum}}件</view> --> | ||
17 | - <view class='price'>¥{{item.min_goods_price}}</view> | ||
18 | - <view class="lineprice" wx:if="{{item.min_goods_price!=null}}">¥{{item.line_price}}</view> | ||
19 | - | ||
20 | - </view> | ||
21 | - <view class='sell'>已卖出{{item.sales}}件</view> | ||
22 | - <!-- <view class='oldprice'>{{item.price}}</view> --> | ||
23 | - </view> | ||
24 | - <view class="pink_cover" wx:if="{{item.sold==0}}" /> | ||
25 | - </view> | ||
26 | -</view> |
Components/Model_item/Model_item.wxss
已删除
100644 → 0
1 | -.real_goods { | ||
2 | - width: 750rpx; | ||
3 | - margin: 0 auto; | ||
4 | - /* background: #f9f9f9; */ | ||
5 | - display: flex; | ||
6 | - flex-wrap: wrap; | ||
7 | - padding: 8rpx 0 20rpx; | ||
8 | - box-sizing: border-box; | ||
9 | - margin-bottom:120rpx; | ||
10 | - padding: 0 32rpx; | ||
11 | - box-sizing: border-box; | ||
12 | -} | ||
13 | - | ||
14 | -.real_goods_item { | ||
15 | - width: 332rpx; | ||
16 | - margin-bottom: 20rpx; | ||
17 | - border-radius: 10rpx; | ||
18 | - background: #fff; | ||
19 | - overflow: hidden; | ||
20 | - position: relative; | ||
21 | - display:flex; | ||
22 | - flex-direction: column; | ||
23 | - align-items: center; | ||
24 | - margin-right:6rpx | ||
25 | -} | ||
26 | -.real_goods_item:nth-child(2n){ | ||
27 | - border-left:16rpx solid #f5f5f5; | ||
28 | - margin-right: 0; | ||
29 | -} | ||
30 | - | ||
31 | -.real_goods_img { | ||
32 | - width: 332rpx; | ||
33 | - height: 332rpx; | ||
34 | - margin-bottom: 16rpx; | ||
35 | - border-top-left-radius: 10rpx; | ||
36 | - border-top-right-radius: 10rpx; | ||
37 | - overflow: hidden; | ||
38 | - position: relative; | ||
39 | -} | ||
40 | - | ||
41 | -.real_goods_img image { | ||
42 | - width: 100%; | ||
43 | - height: 100%; | ||
44 | -} | ||
45 | - | ||
46 | -.tip { | ||
47 | - width: 87rpx !important; | ||
48 | - height: 80rpx !important; | ||
49 | - position: absolute; | ||
50 | - right: 0; | ||
51 | - top: 0; | ||
52 | - z-index: 2; | ||
53 | -} | ||
54 | - | ||
55 | -.real_goods_bottom { | ||
56 | - padding: 16rpx 32rpx 28rpx 32rpx; | ||
57 | - box-sizing: border-box; | ||
58 | - background: #fff; | ||
59 | -} | ||
60 | - | ||
61 | -.goods_title { | ||
62 | - | ||
63 | - font-size: 26rpx; | ||
64 | - font-family: PingFang SC; | ||
65 | - font-weight: 500; | ||
66 | - line-height: 36rpx; | ||
67 | - color: rgba(5, 9, 26, 1); | ||
68 | - overflow: hidden; | ||
69 | - text-overflow: ellipsis; | ||
70 | - display: -webkit-box; | ||
71 | - -webkit-box-orient: vertical; | ||
72 | - -webkit-line-clamp: 2; | ||
73 | - margin-bottom: 10rpx; | ||
74 | -} | ||
75 | - | ||
76 | -.goods_flex { | ||
77 | - height: 50rpx; | ||
78 | - display: flex; | ||
79 | - align-items: center; | ||
80 | -} | ||
81 | - | ||
82 | -.score { | ||
83 | - width: 64rpx; | ||
84 | - height: 32rpx; | ||
85 | - background: rgba(242, 0, 0, 1); | ||
86 | - border-radius: 2rpx; | ||
87 | - text-align: center; | ||
88 | - color: #fff; | ||
89 | - font-size: 22rpx; | ||
90 | - font-family: PingFang SC; | ||
91 | - font-weight: 400; | ||
92 | - margin-right: 12rpx; | ||
93 | -} | ||
94 | - | ||
95 | -.price { | ||
96 | - font-size: 30rpx; | ||
97 | - font-family: PingFang SC; | ||
98 | - font-weight: bold; | ||
99 | - color: rgba(242, 0, 0, 1); | ||
100 | - margin-right: 20rpx; | ||
101 | -} | ||
102 | - | ||
103 | -.sell { | ||
104 | - font-size: 20rpx; | ||
105 | - font-family: PingFang SC; | ||
106 | - font-weight: 400; | ||
107 | - color: rgba(156, 156, 156, 1); | ||
108 | -} | ||
109 | - | ||
110 | -.pink_cover{ | ||
111 | - width: 100%; | ||
112 | - height: 100%; | ||
113 | - background: #ccc; | ||
114 | - opacity: 0.3; | ||
115 | - position: absolute; | ||
116 | - left: 0; | ||
117 | - top: 0; | ||
118 | -} | ||
119 | -.oldprice{ | ||
120 | - color:#BDC4CE; | ||
121 | - font-size: 24rpx; | ||
122 | - text-decoration: line-through | ||
123 | -} | ||
124 | - | ||
125 | -.lineprice{ | ||
126 | - color: rgba(156, 156, 156, 1); | ||
127 | - text-decoration: line-through; | ||
128 | - font-size: 20rpx; | ||
129 | - margin-right:5rpx; | ||
130 | - | ||
131 | -} |
Components/concat/concat.js
已删除
100644 → 0
Components/concat/concat.json
已删除
100644 → 0
Components/concat/concat.wxml
已删除
100644 → 0
Components/concat/concat.wxss
已删除
100644 → 0
1 | -.concat_box { | ||
2 | - width: 96rpx; | ||
3 | - height: 210rpx; | ||
4 | - position: fixed; | ||
5 | - right: -24rpx; | ||
6 | - bottom: 127rpx; | ||
7 | -} | ||
8 | - | ||
9 | -.item { | ||
10 | - width: 60rpx; | ||
11 | - height: 60rpx; | ||
12 | - padding: 0; | ||
13 | - border: none !important; | ||
14 | - margin: 0 !important; | ||
15 | - position: relative; | ||
16 | -} | ||
17 | -.dadianhua{ | ||
18 | - width: 60rpx; | ||
19 | - height: 60rpx; | ||
20 | - border-radius: 50%; | ||
21 | - position: absolute; | ||
22 | - left:0; | ||
23 | - top:0; | ||
24 | - border:none; | ||
25 | - outline:none; | ||
26 | - opacity: 0; | ||
27 | -} | ||
28 | - | ||
29 | -.item:first-child { | ||
30 | - margin-bottom: 30rpx !important; | ||
31 | -} | ||
32 | - | ||
33 | -.item image { | ||
34 | - width: 100%; | ||
35 | - height: 100%; | ||
36 | -} |
Components/shop_item/shop_item.js
已删除
100644 → 0
1 | -Component({ | ||
2 | - /** | ||
3 | - * 组件的属性列表 | ||
4 | - */ | ||
5 | - properties: { | ||
6 | - check_num: Number, //已选择商品数量 | ||
7 | - list: Array, | ||
8 | - type: Number, | ||
9 | - checkAll: Boolean | ||
10 | - }, | ||
11 | - | ||
12 | - /** | ||
13 | - * 组件的初始数据 | ||
14 | - */ | ||
15 | - data: { | ||
16 | - | ||
17 | - }, | ||
18 | - | ||
19 | - /** | ||
20 | - * 组件的方法列表 | ||
21 | - */ | ||
22 | - methods: { | ||
23 | - //查看商品详情 | ||
24 | - look_detail(e) { | ||
25 | - let id = e.currentTarget.dataset.id; | ||
26 | - | ||
27 | - // wx.navigateTo({ | ||
28 | - // url: '/pages/shop_detail/shop_detail?id=' + id | ||
29 | - // }) | ||
30 | - }, | ||
31 | - enter(){ | ||
32 | - console.log(this.data.list) | ||
33 | - }, | ||
34 | - //加减商品数量 | ||
35 | - num_change(e) { | ||
36 | - console.log(e) | ||
37 | - let num = Number(e.currentTarget.dataset.num) | ||
38 | - let type = e.currentTarget.dataset.type | ||
39 | - let index = e.currentTarget.dataset.index | ||
40 | - let id = e.currentTarget.dataset.id | ||
41 | - let product_id = e.currentTarget.dataset.product_id; | ||
42 | - let spec_sku_id=e.currentTarget.dataset.specid; | ||
43 | - console.log('属性idid ',spec_sku_id) | ||
44 | - if (type == 1) { | ||
45 | - num++ | ||
46 | - } else { | ||
47 | - num-- | ||
48 | - if (num < 1) { | ||
49 | - //触发删除商品的接口 | ||
50 | - | ||
51 | - this.triggerEvent('delete_shop', { | ||
52 | - index: index, | ||
53 | - id: id | ||
54 | - }) | ||
55 | - return | ||
56 | - } | ||
57 | - } | ||
58 | - this.triggerEvent('change_num', { | ||
59 | - num: num, | ||
60 | - index: index, | ||
61 | - type: type, | ||
62 | - product_id: product_id, | ||
63 | - spec_sku_id:spec_sku_id | ||
64 | - }) | ||
65 | - }, | ||
66 | - lookdetail(e){ | ||
67 | - let id=e.currentTarget.dataset.id; | ||
68 | - wx.navigateTo({ | ||
69 | - url: '/pages/shop_detail/shop_detail?id=' + id | ||
70 | - }) | ||
71 | - }, | ||
72 | - //改变商品选中状态 | ||
73 | - check_item(e){ | ||
74 | - let index = e.currentTarget.dataset.index | ||
75 | - let check_type = e.currentTarget.dataset.check_type ? e.currentTarget.dataset.check_type:false | ||
76 | - let check_num = Number(this.data.check_num) | ||
77 | - | ||
78 | - if (!check_type){ | ||
79 | - check_num ++ | ||
80 | - } else { | ||
81 | - check_num -- | ||
82 | - } | ||
83 | - this.triggerEvent('check_type', { | ||
84 | - index: index, | ||
85 | - check_type: !check_type, | ||
86 | - check_num: check_num, | ||
87 | - | ||
88 | - }) | ||
89 | - } | ||
90 | - }, | ||
91 | - | ||
92 | - lifetimes: { | ||
93 | - created() { | ||
94 | - // 在组件实例刚刚被创建时执行 | ||
95 | - | ||
96 | - | ||
97 | - }, | ||
98 | - attached() { | ||
99 | - // 在组件实例进入页面节点树时执行 | ||
100 | - }, | ||
101 | - ready() { | ||
102 | - // 在组件在视图层布局完成后执行 | ||
103 | - this.setData({ | ||
104 | - list: this.properties.list, | ||
105 | - type: this.properties.type, | ||
106 | - checkAll: this.properties.checkAll, | ||
107 | - check_num: this.properties.check_num ? this.properties.check_num:0 | ||
108 | - }) | ||
109 | - | ||
110 | - console.log(this.data.list) | ||
111 | - | ||
112 | - }, | ||
113 | - detached() { | ||
114 | - // 在组件实例被从页面节点树移除时执行 | ||
115 | - }, | ||
116 | - } | ||
117 | -}) |
Components/shop_item/shop_item.json
已删除
100644 → 0
Components/shop_item/shop_item.wxml
已删除
100644 → 0
1 | -<view class="item" wx:for="{{list}}" wx:key="index"> | ||
2 | - <view class="top" bindtap="lookdetail" data-id="{{item.goods_id}}"> | ||
3 | - <image class="check_box" src="{{item.check_type?'/images/check@.png':'/images/check.png'}}" wx:if="{{type == 1 || type == 2}}" catchtap="check_item" data-check_type="{{item.check_type}}" data-index="{{index}}"/> | ||
4 | - <view class="content {{type==3?'active':''}}"> | ||
5 | - <image class="show_img" src="{{type == 3?item.image:type==4?item.image:type==2?item.image:item.image}}" mode="aspectFill" bindtap="{{type == 1 || type == 2?'look_detail':''}}" data-id="{{item.product_id}}" /> | ||
6 | - <view class="right {{type==3||type==1||type==4?'ractive':''}}"> | ||
7 | - <!-- <view class="word">{{type == 3||type==1||type==4?item.name:type==2?item.product_name:item.product.name}}</view> --> | ||
8 | - <view class="word">{{item.name}}</view> | ||
9 | - <view class="guige"> | ||
10 | - <view class="guigeitem" wx:for="{{item.spec}}" wx:key="index">{{item.spec_name}}:{{item.spec_value}}</view> | ||
11 | - </view> | ||
12 | - <view class="info"> | ||
13 | - <view class="jifen"> | ||
14 | - <text wx:if="{{type==1}}">{{item.goods_price}}</text> | ||
15 | - <text wx:if="{{type==2}}">{{item.goods.min_goods_price}}</text> | ||
16 | - <text style="margin-left: 10rpx;color:#ccc;font-size: 28rpx;" wx:if="{{type == 3 || type == 4}}">X{{item.number}}</text> | ||
17 | - </view> | ||
18 | - <view class="num_box" wx:if="{{type == 1}}"> | ||
19 | - <image class="num_btn" src="/images/reduce.png" data-index="{{index}}" data-type="2" data-num="{{item.number}}" data-id="{{item.car_id}}" data-product_id="{{item.id}}" catchtap="num_change" data-specid="{{item.spec_sku_id}}"/> | ||
20 | - <text>{{item.number}}</text> | ||
21 | - <image class="num_btn" src="/images/add.png" data-index="{{index}}" data-type="1" data-num="{{item.number}}" data-id="{{item.car_id}}" data-specid="{{item.spec_sku_id}}" data-product_id="{{item.id}}" catchtap="num_change"/> | ||
22 | - </view> | ||
23 | - </view> | ||
24 | - </view> | ||
25 | - </view> | ||
26 | - </view> | ||
27 | - <view class="info_box" wx:if="{{type == 3}}"> | ||
28 | - <view class="f_item"> | ||
29 | - <view class="shop" bindtap="enter"> | ||
30 | - 商品积分 | ||
31 | - <text wx:if="{{item.price2!=null}}">{{item.price2*100*item.num/100}}积分</text> | ||
32 | - <text wx:else>{{item.price*100*item.num/100}}积分</text> | ||
33 | - </view> | ||
34 | - </view> | ||
35 | - </view> | ||
36 | -</view> |
Components/shop_item/shop_item.wxss
已删除
100644 → 0
1 | -.item { | ||
2 | - width: 100%; | ||
3 | - background: #fff; | ||
4 | - padding: 0 24rpx; | ||
5 | - box-sizing: border-box; | ||
6 | - margin-top: 20rpx; | ||
7 | -} | ||
8 | - | ||
9 | -.item:first-child { | ||
10 | - margin-top: 0; | ||
11 | -} | ||
12 | - | ||
13 | -.item .top { | ||
14 | - padding: 36rpx 0; | ||
15 | - box-sizing: border-box; | ||
16 | - display: flex; | ||
17 | - align-items: center; | ||
18 | -} | ||
19 | - | ||
20 | -.check_box { | ||
21 | - width: 36rpx; | ||
22 | - height: 36rpx; | ||
23 | - padding: 30rpx 30rpx 30rpx 0; | ||
24 | -} | ||
25 | - | ||
26 | -.content { | ||
27 | - width: 564rpx; | ||
28 | - display: flex; | ||
29 | - justify-content: space-between; | ||
30 | - align-items: center; | ||
31 | -} | ||
32 | - | ||
33 | -.show_img { | ||
34 | - width: 164rpx; | ||
35 | - height: 164rpx; | ||
36 | - margin-right: 24rpx; | ||
37 | -} | ||
38 | - | ||
39 | -.right { | ||
40 | - width: 376rpx; | ||
41 | -} | ||
42 | - | ||
43 | -.word { | ||
44 | - width: 100%; | ||
45 | - height: 76rpx; | ||
46 | - font-size: 28rpx; | ||
47 | - font-family: PingFang SC; | ||
48 | - font-weight: 400; | ||
49 | - overflow: hidden; | ||
50 | - text-overflow: ellipsis; | ||
51 | - display: -webkit-box; | ||
52 | - word-break: break-all; | ||
53 | - -webkit-box-orient: vertical; | ||
54 | - -webkit-line-clamp: 2; | ||
55 | -} | ||
56 | - | ||
57 | -.info { | ||
58 | - display: flex; | ||
59 | - align-items: center; | ||
60 | - justify-content: space-between; | ||
61 | - margin-top: 32rpx; | ||
62 | -} | ||
63 | - | ||
64 | -.jifen { | ||
65 | - display: flex; | ||
66 | - align-items: center; | ||
67 | -} | ||
68 | - | ||
69 | -.jifen .name { | ||
70 | - width: 64rpx; | ||
71 | - height: 36rpx; | ||
72 | - background: rgba(242, 0, 0, 1); | ||
73 | - border-radius: 4rpx; | ||
74 | - font-size: 22rpx; | ||
75 | - font-family: PingFang SC; | ||
76 | - font-weight: 400; | ||
77 | - color: #fff; | ||
78 | - display: flex; | ||
79 | - justify-content: center; | ||
80 | - align-items: center; | ||
81 | - margin-right: 20rpx; | ||
82 | -} | ||
83 | - | ||
84 | -.jifen text { | ||
85 | - font-size: 26rpx; | ||
86 | - font-family: PingFang SC; | ||
87 | - font-weight: bold; | ||
88 | - color: rgba(242, 0, 0, 1); | ||
89 | -} | ||
90 | - | ||
91 | -.num_box { | ||
92 | - display: flex; | ||
93 | - align-items: center; | ||
94 | - justify-content: space-between; | ||
95 | -} | ||
96 | - | ||
97 | -.num_box .num_btn { | ||
98 | - width: 36rpx; | ||
99 | - height: 36rpx; | ||
100 | -} | ||
101 | - | ||
102 | -.num_box text { | ||
103 | - font-size: 30rpx; | ||
104 | - font-family: PingFang SC; | ||
105 | - font-weight: 400; | ||
106 | - color: rgba(19, 26, 46, 1); | ||
107 | - margin: 0 24rpx; | ||
108 | -} | ||
109 | - | ||
110 | -.active { | ||
111 | - width: 100%; | ||
112 | -} | ||
113 | - | ||
114 | -.ractive { | ||
115 | - width: 448rpx; | ||
116 | -} | ||
117 | - | ||
118 | -.info_box { | ||
119 | - width: 100%; | ||
120 | - margin-top: 26rpx; | ||
121 | -} | ||
122 | - | ||
123 | -.f_item { | ||
124 | - width: 100%; | ||
125 | - padding: 28rpx 0; | ||
126 | - box-sizing: border-box; | ||
127 | - border-bottom: 1px solid #eee; | ||
128 | -} | ||
129 | - | ||
130 | -.f_item .shop { | ||
131 | - width: 100%; | ||
132 | - font-size: 28rpx; | ||
133 | - font-family: PingFang SC; | ||
134 | - font-weight: 400; | ||
135 | - color: rgba(19, 26, 46, 1); | ||
136 | - display: flex; | ||
137 | - justify-content: space-between; | ||
138 | - align-items: center; | ||
139 | -} | ||
140 | - | ||
141 | -.f_item .shop text:last-child { | ||
142 | - color: #8e8e8e; | ||
143 | -} | ||
144 | - | ||
145 | -.youfei { | ||
146 | - font-size: 24rpx; | ||
147 | - font-family: PingFang SC; | ||
148 | - font-weight: 400; | ||
149 | - line-height: 34rpx; | ||
150 | - color: rgba(142, 142, 142, 1); | ||
151 | - margin-top: 10rxp; | ||
152 | -} | ||
153 | - | ||
154 | -.jifen_num { | ||
155 | - width: 100%; | ||
156 | - padding: 28rpx 0; | ||
157 | - box-sizing: border-box; | ||
158 | - display: flex; | ||
159 | - flex-direction: row-reverse; | ||
160 | - align-items: center; | ||
161 | - font-size: 28rpx; | ||
162 | - font-family: PingFang SC; | ||
163 | - font-weight: Regular; | ||
164 | - color: #131a2e; | ||
165 | -} | ||
166 | - | ||
167 | -.jifen_num text:last-child { | ||
168 | - font-size: 32rpx; | ||
169 | - color: rgba(242, 0, 0, 1); | ||
170 | - font-family: PingFang SC Bold; | ||
171 | - font-weight: Bold; | ||
172 | -} | ||
173 | - | ||
174 | -.jifen_num text:first-child { | ||
175 | - color: rgba(242, 0, 0, 1); | ||
176 | - margin-left: 10rpx; | ||
177 | -} | ||
178 | - | ||
179 | -.oldprice { | ||
180 | - color: #bdc4ce; | ||
181 | - font-size: 24rpx; | ||
182 | - text-decoration: line-through; | ||
183 | - margin-top:10rpx; | ||
184 | -} | ||
185 | -.guigeitem{ | ||
186 | - color: rgba(156, 156, 156, 1); | ||
187 | - font-size:28rpx; | ||
188 | - margin-right:20rpx; | ||
189 | - margin-bottom:10rpx; | ||
190 | - | ||
191 | -} | ||
192 | -.guige{ | ||
193 | - display:flex; | ||
194 | - flex-wrap: wrap; | ||
195 | - align-items: center; | ||
196 | -} |
app.js
已删除
100644 → 0
1 | -App({ | ||
2 | - onLaunch: function () { | ||
3 | - this.getmessagelist() | ||
4 | - let token=wx.getStorageSync('token'); | ||
5 | - console.log('woshitoe',token) | ||
6 | - if(token!=""){ | ||
7 | - this.getInfoFun() | ||
8 | - } | ||
9 | - | ||
10 | - //自动更新版本 | ||
11 | - const updateManager = wx.getUpdateManager() | ||
12 | - updateManager.onCheckForUpdate(function (res) { | ||
13 | - // 请求完新版本信息的回调 | ||
14 | - | ||
15 | - }) | ||
16 | - updateManager.onUpdateReady(function () { | ||
17 | - wx.showModal({ | ||
18 | - title: '更新提示', | ||
19 | - content: '新版本已经准备好,是否重启应用?', | ||
20 | - success: function (res) { | ||
21 | - if (res.confirm) { | ||
22 | - // 新的版本已经下载好,调用 applyUpdate 应用新版本并重启 | ||
23 | - updateManager.applyUpdate() | ||
24 | - } | ||
25 | - } | ||
26 | - }) | ||
27 | - }) | ||
28 | - updateManager.onUpdateFailed(function () { | ||
29 | - // 新的版本下载失败 | ||
30 | - wx.showModal({ | ||
31 | - title: '更新提示', | ||
32 | - content: '新版本下载失败', | ||
33 | - showCancel: false | ||
34 | - }) | ||
35 | - }) | ||
36 | - }, | ||
37 | - post: function (url, data, showLoad) { | ||
38 | - | ||
39 | - wx.showNavigationBarLoading() | ||
40 | - var promise = new Promise((resolve, reject) => { | ||
41 | - //init | ||
42 | - let that = this; | ||
43 | - let postData = data | ||
44 | - // let baseUrl = 'https://binhai.w.broing.cn/api'; | ||
45 | - // let baseUrl ='http://binhaitest.w.brotop.cn/api' | ||
46 | - // 现在用的 | ||
47 | - // let baseUrl = 'https://binhai.w.broing.cn/api' | ||
48 | - let baseUrl = 'http://binhaitest.w.brotop.cn/api' | ||
49 | - //网络请求 | ||
50 | - wx.request({ | ||
51 | - url: baseUrl + url, | ||
52 | - data: postData, | ||
53 | - method: 'POST', | ||
54 | - header: { | ||
55 | - 'content-type': 'application/x-www-form-urlencoded', | ||
56 | - 'token': wx.getStorageSync('token') || '' | ||
57 | - }, | ||
58 | - success: function (res) { //返回取得的数据 | ||
59 | - console.log('ssssssssssssssssssssssssssssssssssss',res) | ||
60 | - if (res.data.code == '200') { | ||
61 | - resolve(res.data) | ||
62 | - } else if (res.data.code == '5000') { | ||
63 | - wx.hideLoading(); | ||
64 | - reject(res.data) | ||
65 | - // wx.removeStorageSync('token'); | ||
66 | - wx.removeStorageSync('login'); | ||
67 | - // wx.navigateTo({ | ||
68 | - // url: '/pages/register/register?type=1', | ||
69 | - // }) | ||
70 | - } else { | ||
71 | - wx.showModal({ | ||
72 | - title: '提示', | ||
73 | - content: res.data.msg, | ||
74 | - showCancel: false | ||
75 | - }) | ||
76 | - reject(res.data) | ||
77 | - } | ||
78 | - setTimeout(function () { | ||
79 | - wx.hideNavigationBarLoading() | ||
80 | - }, 600) | ||
81 | - }, | ||
82 | - fail: function (e) { | ||
83 | - reject('网络出错'); | ||
84 | - wx.hideNavigationBarLoading() | ||
85 | - } | ||
86 | - }) | ||
87 | - }); | ||
88 | - return promise; | ||
89 | - }, | ||
90 | - | ||
91 | - // 开放商城公共接口 | ||
92 | - postk: function (url, data, showLoad) { | ||
93 | - wx.showNavigationBarLoading() | ||
94 | - var promise = new Promise((resolve, reject) => { | ||
95 | - //init | ||
96 | - let that = this; | ||
97 | - let postData = data | ||
98 | - // let baseUrl = 'https://binhai.w.broing.cn/api'; | ||
99 | - // let baseUrl ='http://binhaitest.w.brotop.cn/api' | ||
100 | - let baseUrl = 'http://binhaidispark.t.brotop.cn/api' | ||
101 | - | ||
102 | - | ||
103 | - //网络请求 | ||
104 | - wx.request({ | ||
105 | - url: baseUrl + url, | ||
106 | - data: postData, | ||
107 | - method: 'POST', | ||
108 | - header: { | ||
109 | - 'content-type': 'application/x-www-form-urlencoded', | ||
110 | - 'token': wx.getStorageSync('token') || '' | ||
111 | - }, | ||
112 | - success: function (res) { //返回取得的数据 | ||
113 | - if (res.data.code == '1') { | ||
114 | - resolve(res.data) | ||
115 | - } else if (res.data.code == '5000') { | ||
116 | - wx.hideLoading(); | ||
117 | - reject(res.data) | ||
118 | - wx.removeStorageSync('token'); | ||
119 | - wx.removeStorageSync('login'); | ||
120 | - // wx.navigateTo({ | ||
121 | - // url: '/pages/register/register?type=1', | ||
122 | - // }) | ||
123 | - } else { | ||
124 | - wx.showModal({ | ||
125 | - title: '提示', | ||
126 | - content: res.data.msg, | ||
127 | - showCancel: false | ||
128 | - }) | ||
129 | - reject(res.data) | ||
130 | - } | ||
131 | - setTimeout(function () { | ||
132 | - wx.hideNavigationBarLoading() | ||
133 | - }, 600) | ||
134 | - }, | ||
135 | - fail: function (e) { | ||
136 | - reject('网络出错'); | ||
137 | - wx.hideNavigationBarLoading() | ||
138 | - } | ||
139 | - }) | ||
140 | - }); | ||
141 | - return promise; | ||
142 | - }, | ||
143 | - | ||
144 | - upload(filetype, file) { | ||
145 | - | ||
146 | - var promise = new Promise((resolve, reject) => { | ||
147 | - wx.showNavigationBarLoading() | ||
148 | - wx.showLoading({ | ||
149 | - title: '上传中', | ||
150 | - }) | ||
151 | - let url = 'http://binhaidispark.t.brotop.cn/api/common/upload'; | ||
152 | - | ||
153 | - let head = { | ||
154 | - 'token': wx.getStorageSync('token'), | ||
155 | - 'XX-Device-Type': '' | ||
156 | - } | ||
157 | - let typename = { | ||
158 | - filetype: filetype | ||
159 | - } | ||
160 | - wx.uploadFile({ | ||
161 | - url: url, //仅为示例,非真实的接口地址 | ||
162 | - filePath: file, | ||
163 | - name: 'file', | ||
164 | - header: head, | ||
165 | - formData: typename, | ||
166 | - success: function (res) { | ||
167 | - console.log('上传文件后', res) | ||
168 | - let temdata = JSON.parse(res.data); | ||
169 | - console.log(temdata) | ||
170 | - let urlobj = { | ||
171 | - url: temdata.data.url | ||
172 | - } | ||
173 | - resolve(urlobj); | ||
174 | - | ||
175 | - }, | ||
176 | - fail: function (res) { | ||
177 | - reject('网络出错'); | ||
178 | - wx.hideNavigationBarLoading() | ||
179 | - wx.hideLoading() | ||
180 | - }, | ||
181 | - complete: () => { | ||
182 | - wx.hideNavigationBarLoading() | ||
183 | - wx.hideLoading() | ||
184 | - }, | ||
185 | - }) | ||
186 | - }); | ||
187 | - return promise; | ||
188 | - }, | ||
189 | - | ||
190 | - | ||
191 | - // 获取个人信息 | ||
192 | - getInfoFun() { | ||
193 | - let that= this; | ||
194 | - let u = that.interface.readteacher; | ||
195 | - that.post(u, {}).then((r) => { | ||
196 | - console.log('3489523498',r) | ||
197 | - if (r.code == 200) { | ||
198 | - | ||
199 | - wx.setStorageSync('login', r.msg.login_new) | ||
200 | - // that.globalData.login_new=r.msg.login_new; | ||
201 | - // console.log( that.globalData.login_new) | ||
202 | - // t.setData({ | ||
203 | - // obj: r.msg | ||
204 | - // }) | ||
205 | - } | ||
206 | - }) | ||
207 | - }, | ||
208 | - | ||
209 | - getmessagelist() { | ||
210 | - let that = this | ||
211 | - let url = '/information/get_all'; | ||
212 | - let data = { | ||
213 | - page: 1, | ||
214 | - pageNum: 10, | ||
215 | - | ||
216 | - } | ||
217 | - this.post(url, data, "POST").then((r) => { | ||
218 | - // console.log(r) | ||
219 | - // that.setData({ | ||
220 | - // messagelist: that.data.messagelist.concat(r.msg) | ||
221 | - // }) | ||
222 | - | ||
223 | - let newlist = []; | ||
224 | - r.msg.forEach(function (value, index, array) { | ||
225 | - console.log(newlist) | ||
226 | - if (value.status == 1) { | ||
227 | - newlist.push(value) | ||
228 | - } | ||
229 | - }) | ||
230 | - | ||
231 | - console.log('77889944556',newlist) | ||
232 | - if (newlist.length != 0) { | ||
233 | - wx.showTabBarRedDot({ | ||
234 | - index: 1, | ||
235 | - success: function (red) { | ||
236 | - | ||
237 | - wx.setTabBarBadge({ | ||
238 | - index: 1, | ||
239 | - text: newlist.length.toString(), | ||
240 | - }) | ||
241 | - } | ||
242 | - }) | ||
243 | - } | ||
244 | - | ||
245 | - | ||
246 | - }).catch((err) => { }) | ||
247 | - }, | ||
248 | - | ||
249 | - onShow: function() { | ||
250 | - console.log('hahahahhahahahhhahh') | ||
251 | - }, | ||
252 | - | ||
253 | - | ||
254 | - //接口管理 | ||
255 | - interface: { | ||
256 | - openid: '/getopenid/get', // 获取openid | ||
257 | - getcode: '/getopenid/getcode', // 获取验证码 | ||
258 | - readteacher: '/getopenid/readteacher', // 获取个人信息 | ||
259 | - login: '/getopenid/smslogin', // 登录 | ||
260 | - jifenlist: '/order/jifenlist', // 积分列表 | ||
261 | - address: '/address/index', // 地址列表 | ||
262 | - addaddress: '/address/add', // 添加地址 | ||
263 | - editaddress: '/address/edit', // 修改地址 | ||
264 | - deladdress: '/address/delete', // 删除地址 | ||
265 | - mraddress: '/address/mo', // 修改默认地址 | ||
266 | - adshow: '/address/editshow', //地址详情(数据回显) | ||
267 | - about: '/wb/wb', // 关于我们 | ||
268 | - order: '/order/orderlist', // 获取订单列表 | ||
269 | - payorder: '/order/payorder', // 订单页点击支付 | ||
270 | - disorder: '/order/disorder', // 订单列表取消订单 | ||
271 | - orderrefund: '/order/orderrefund', // 退换货详情 | ||
272 | - // upload: 'https://binhai.w.broing.cn/api/common/upload', // 上传图片 | ||
273 | - upload: 'http://binhaitest.w.brotop.cn/api', | ||
274 | - refund: '/order/refund', // 退货提交 | ||
275 | - | ||
276 | - delorder: '/order/delorder', // 删除订单 | ||
277 | - okorder: '/order/okorder', // 确认订单 | ||
278 | - orderInfo: '/order/orderInfo', // 订单详情 | ||
279 | - kuaidi: '/kuaidi/kuaidi', //物流信息 | ||
280 | - collectdel: '/product/collectdel', //收藏删除 | ||
281 | - collectList: '/getopenid/collectlist', //收藏列表 | ||
282 | - deleteseach: '/product/deleteseach', //删除搜索历史 | ||
283 | - order_pay: '/order/pay', //订单支付 | ||
284 | - now_add: '/order/now_add', //点击结算 | ||
285 | - hotsreach: '/product/hotsreach', // 热门搜索 | ||
286 | - searchhis: '/product/searchhis', // 商品搜索历史 | ||
287 | - search: '/product/search', // 商品搜索结果列表 | ||
288 | - getPid: '/cap/getpid', // 分类页面 | ||
289 | - prev_pay: '/shop/prev_pay', // 购物车点击结算 | ||
290 | - gwcshop: '/shop/gwcshop', //购物车数量修改保存 | ||
291 | - deletes: '/shop/deletes', //购物车删除 | ||
292 | - shopcar: '/shop/shopcar', // 购物车页面 | ||
293 | - now_prev_pay: '/shop/now_prev_pay', // 直接购买 | ||
294 | - addshop: '/shop/addshop', // 添加购物车 | ||
295 | - collect: '/product/collect', // 收藏 | ||
296 | - getInfo: '/product/getInfo', //商品详情 | ||
297 | - good_list: '/product/get', // 商品 | ||
298 | - index: '/cap/get', // 首页大小分类 | ||
299 | - banner: '/banner/index', // 轮播图 | ||
300 | - notice: '/cap/notice', // 公告 | ||
301 | - youfei: '/shop/youfei1', // 单算邮费 | ||
302 | - youfei1: '/shop/youfei', // 購物車邮费 | ||
303 | - | ||
304 | - shopcarNum: '/shop/shopcarnum', // 购物车数量 | ||
305 | - orderlist: '/shop/orderlist', // 订单各状态数量 | ||
306 | - | ||
307 | - order_read: '/shop/read', // 订单数 | ||
308 | - }, | ||
309 | - globalData: { | ||
310 | - login_new:"", | ||
311 | - baseUrlimg :'http://binhaidispark.t.brotop.cn/' | ||
312 | - } | ||
313 | -}) |
app.json
已删除
100644 → 0
1 | -{ | ||
2 | - "pages": [ | ||
3 | - "pages/index/index", | ||
4 | - "pages/coupon/coupon", | ||
5 | - "pages/lingqucoupon/lingqucoupon", | ||
6 | - "pages/register/register", | ||
7 | - "pages/login/login", | ||
8 | - "pages/startindex/startindex", | ||
9 | - "pages/zuji/zuji", | ||
10 | - "pages/messagedetail/messagedetail", | ||
11 | - "pages/message/message", | ||
12 | - "pages/shop_cart/shop_cart", | ||
13 | - "pages/classify/classify", | ||
14 | - "pages/my/my", | ||
15 | - "pages/shop_detail/shop_detail", | ||
16 | - "pages/order/order", | ||
17 | - "pages/Collection/collection", | ||
18 | - "pages/order/return_goods/return_goods", | ||
19 | - "pages/my/about_us/about_us", | ||
20 | - "pages/my/my_integral/my_integral", | ||
21 | - "pages/address/address", | ||
22 | - "pages/address/edit_address/edit_address", | ||
23 | - "pages/address/add_address/add_address", | ||
24 | - "pages/search/search", | ||
25 | - "pages/search/search_result/search_result", | ||
26 | - "pages/order/order_list/order_list", | ||
27 | - "pages/order/order_detail/order_detail", | ||
28 | - "pages/logistics/logistics", | ||
29 | - "pages/notice/notice", | ||
30 | - "pages/outerChain/outerChain", | ||
31 | - "pages/zhuanqu/zhuanqu", | ||
32 | - "pages/taocandetail/taocandetail", | ||
33 | - "pages/taocanpay/taocanpay", | ||
34 | - "pages/orderdetail/orderdetail", | ||
35 | - "pages/xianshi/xianshi", | ||
36 | - "pages/coupon", | ||
37 | - "pages/pinpaibox/pinpaibox" | ||
38 | - ], | ||
39 | - "subpackages": [ | ||
40 | - { | ||
41 | - "root": "packageA", | ||
42 | - "pages": [ | ||
43 | - "pages/index/index", | ||
44 | - "pages/register/register", | ||
45 | - "pages/login/login", | ||
46 | - "pages/startindex/startindex", | ||
47 | - "pages/zuji/zuji", | ||
48 | - "pages/messagedetail/messagedetail", | ||
49 | - "pages/message/message", | ||
50 | - "pages/shop_cart/shop_cart", | ||
51 | - "pages/classify/classify", | ||
52 | - "pages/my/my", | ||
53 | - "pages/shop_detail/shop_detail", | ||
54 | - "pages/order/order", | ||
55 | - "pages/Collection/collection", | ||
56 | - "pages/order/return_goods/return_goods", | ||
57 | - "pages/my/about_us/about_us", | ||
58 | - "pages/my/my_integral/my_integral", | ||
59 | - "pages/address/address", | ||
60 | - "pages/address/edit_address/edit_address", | ||
61 | - "pages/address/add_address/add_address", | ||
62 | - "pages/search/search", | ||
63 | - "pages/search/search_result/search_result", | ||
64 | - "pages/order/order_list/order_list", | ||
65 | - "pages/order/order_detail/order_detail", | ||
66 | - "pages/logistics/logistics", | ||
67 | - "pages/notice/notice", | ||
68 | - "pages/outerChain/outerChain", | ||
69 | - "pages/zhuanqu/zhuanqu", | ||
70 | - "pages/taocandetail/taocandetail", | ||
71 | - "pages/taocanpay/taocanpay", | ||
72 | - "pages/orderdetail/orderdetail", | ||
73 | - "pages/xianshi/xianshi" | ||
74 | - ] | ||
75 | - } | ||
76 | - ], | ||
77 | - "window": { | ||
78 | - "backgroundTextStyle": "light", | ||
79 | - "navigationBarBackgroundColor": "#3D9AF8", | ||
80 | - "navigationBarTitleText": "海创诚品", | ||
81 | - "navigationBarTextStyle": "white" | ||
82 | - }, | ||
83 | - "tabBar": { | ||
84 | - "custom": true, | ||
85 | - "list": [ | ||
86 | - { | ||
87 | - "pagePath": "pages/index/index", | ||
88 | - "text": "商品", | ||
89 | - "iconPath": "images/tabbar/icon_75.png", | ||
90 | - "selectedIconPath": "images/tabbar/icon_68.png" | ||
91 | - }, | ||
92 | - { | ||
93 | - "pagePath": "pages/message/message", | ||
94 | - "text": "消息", | ||
95 | - "iconPath": "images/tabbar/message.png", | ||
96 | - "selectedIconPath": "images/tabbar/messageactive.png" | ||
97 | - }, | ||
98 | - { | ||
99 | - "pagePath": "pages/shop_cart/shop_cart", | ||
100 | - "text": "购物车", | ||
101 | - "iconPath": "images/tabbar/icon_70.png", | ||
102 | - "selectedIconPath": "images/tabbar/icon_73.png" | ||
103 | - }, | ||
104 | - { | ||
105 | - "pagePath": "pages/my/my", | ||
106 | - "text": "我的", | ||
107 | - "iconPath": "images/tabbar/icon_71.png", | ||
108 | - "selectedIconPath": "images/tabbar/icon_72.png" | ||
109 | - } | ||
110 | - ], | ||
111 | - "selectedColor": "#05091A" | ||
112 | - }, | ||
113 | - "sitemapLocation": "sitemap.json" | ||
114 | -} |
app.wxss
已删除
100644 → 0
1 | - | ||
2 | -.container { | ||
3 | - height: 100%; | ||
4 | - display: flex; | ||
5 | - flex-direction: column; | ||
6 | - align-items: center; | ||
7 | - justify-content: space-between; | ||
8 | - padding: 200rpx 0; | ||
9 | - box-sizing: border-box; | ||
10 | -} | ||
11 | -.flex{ | ||
12 | - display:flex; | ||
13 | -} | ||
14 | -.flexone { | ||
15 | - display: flex; | ||
16 | - align-items: center; | ||
17 | - } | ||
18 | - | ||
19 | - .flextwo { | ||
20 | - display: flex; | ||
21 | - align-items: center; | ||
22 | - justify-content: space-between; | ||
23 | - } | ||
24 | - | ||
25 | - .flexthree { | ||
26 | - display: flex; | ||
27 | - align-items: center; | ||
28 | - justify-content: center; | ||
29 | - } | ||
30 | - .flex { | ||
31 | - display: flex; | ||
32 | -} | ||
33 | - | ||
34 | -.flexone { | ||
35 | - display: flex; | ||
36 | - align-items: center; | ||
37 | -} | ||
38 | - | ||
39 | -.flextwo { | ||
40 | - display: flex; | ||
41 | - align-items: center; | ||
42 | - justify-content: space-between; | ||
43 | -} | ||
44 | - | ||
45 | -.flexthree { | ||
46 | - display: flex; | ||
47 | - align-items: center; | ||
48 | - justify-content: center; | ||
49 | -} | ||
50 | - | ||
51 | - | ||
52 | -.empty { | ||
53 | - font-size: 36rpx; | ||
54 | - font-family: PingFang SC; | ||
55 | - font-weight: 400; | ||
56 | - color: #ccc; | ||
57 | - margin-top: 200rpx; | ||
58 | - text-align: center; | ||
59 | -} | ||
60 | -.oldprice{ | ||
61 | - color:#BDC4CE; | ||
62 | - font-size: 24rpx; | ||
63 | - text-decoration: line-through | ||
64 | -} | ||
65 | -::-webkit-scrollbar { | ||
66 | - width: 0; | ||
67 | - height: 0; | ||
68 | - color: transparent; | ||
69 | - } | ||
70 | - .lineprice{ | ||
71 | - color:#8E8E8E; | ||
72 | - text-decoration: line-through; | ||
73 | - font-size:28rpx; | ||
74 | - margin-left:20rpx; | ||
75 | - } | ||
76 | -/*优惠券列表 */ | ||
77 | -.couponpageitem{ | ||
78 | - width:686rpx; | ||
79 | - height:276rpx; | ||
80 | - background: linear-gradient(135deg,#d6b17d 1%, #cda263); | ||
81 | -border-radius: 8rpx; | ||
82 | -margin:24rpx auto 0; | ||
83 | -} | ||
84 | -.couponpageitem{ | ||
85 | - display:flex; | ||
86 | - align-items: center; | ||
87 | - padding: 52rpx 24rpx; | ||
88 | - box-sizing: border-box; | ||
89 | -} | ||
90 | -.finishling{ | ||
91 | - width:208rpx; | ||
92 | - height:46rpx; | ||
93 | - font-size: 0; | ||
94 | - position: relative; | ||
95 | -} | ||
96 | -.finishling image{ | ||
97 | - width:100%; | ||
98 | - height: 100%; | ||
99 | -} | ||
100 | -.coupontop{ | ||
101 | - display:flex; | ||
102 | -} | ||
103 | -.couponright{ | ||
104 | - display:flex; | ||
105 | - padding-left: 16rpx; | ||
106 | - box-sizing: border-box; | ||
107 | -} | ||
108 | -.bigmoney{ | ||
109 | - color:#fff; | ||
110 | - font-size: 70rpx; | ||
111 | -} | ||
112 | -.smalltext{ | ||
113 | - color:#fff; | ||
114 | - font-size: 24rpx; | ||
115 | - margin-bottom: 20rpx; | ||
116 | -} | ||
117 | -.coupontitle{ | ||
118 | - color:#fff; | ||
119 | - font-size: 32rpx; | ||
120 | -} | ||
121 | -.afterling{ | ||
122 | - color:#CEA365; | ||
123 | - font-size: 22rpx; | ||
124 | - position: absolute; | ||
125 | - top:8rpx; | ||
126 | - right:10rpx; | ||
127 | -} | ||
128 | -.fullmoney{ | ||
129 | - color:#fff; | ||
130 | - font-size: 28rpx; | ||
131 | - margin-top:20rpx | ||
132 | -} | ||
133 | -.useright{ | ||
134 | - width: 160rpx; | ||
135 | -height: 64rpx; | ||
136 | -background: #ffffff; | ||
137 | -border-radius: 200rpx; | ||
138 | -box-shadow: 0px 16rpx 16rpx 0px rgba(82,48,0,0.17); | ||
139 | -color:#CEA467; | ||
140 | -font-size: 28rpx; | ||
141 | -text-align: center; | ||
142 | -line-height: 64rpx; | ||
143 | -margin-top:46rpx | ||
144 | -} | ||
145 | -.rightright{ | ||
146 | - margin-left:32rpx; | ||
147 | -} | ||
148 | -.couponleft{ | ||
149 | - display:flex; | ||
150 | - align-items: baseline; | ||
151 | - width:99rpx; | ||
152 | - position: relative; | ||
153 | - padding-right: 10rpx; | ||
154 | - /* box-sizing:border-box; */ | ||
155 | - flex:0 0 auto; | ||
156 | - /* border-right:1rpx solid #fff; */ | ||
157 | -} | ||
158 | -.couponleftk{ | ||
159 | - display:flex; | ||
160 | - align-items: baseline; | ||
161 | - width:240rpx; | ||
162 | - position: relative; | ||
163 | - padding-right: 10rpx; | ||
164 | - /* box-sizing:border-box; */ | ||
165 | - flex:0 0 auto; | ||
166 | - /* border-right:1rpx solid #fff; */ | ||
167 | -} | ||
168 | -.couponleft::after{ | ||
169 | - display:block; | ||
170 | - content:''; | ||
171 | - width:1rpx; | ||
172 | - height:104rpx; | ||
173 | - background: #ffff; | ||
174 | - position: absolute; | ||
175 | - top:0; | ||
176 | - right:1rpx; | ||
177 | - | ||
178 | -} | ||
179 | -.couponleftk::after{ | ||
180 | - display:block; | ||
181 | - content:''; | ||
182 | - width:1rpx; | ||
183 | - height:104rpx; | ||
184 | - background: #ffff; | ||
185 | - position: absolute; | ||
186 | - top:0; | ||
187 | - right:1rpx; | ||
188 | -} | ||
189 | -.nodata{ | ||
190 | - color:#999; | ||
191 | - font-size:32rpx; | ||
192 | - text-align: center; | ||
193 | - margin-top:100rpx | ||
194 | -} | ||
195 | -.flextwo{ | ||
196 | - display:flex; | ||
197 | - align-items: center; | ||
198 | - justify-content: space-between; | ||
199 | -} | ||
200 | -.flexthree{ | ||
201 | - display:flex; | ||
202 | - align-items: center; | ||
203 | - justify-content: flex-end; | ||
204 | -} |
custom-tab-bar/custom-tab-bar.js
已删除
100644 → 0
1 | -let type=wx.getStorageSync('selecttype'); | ||
2 | -console.log(type,'类型') | ||
3 | - | ||
4 | -Component({ | ||
5 | - data: { | ||
6 | - selected: 0, | ||
7 | - text:'', | ||
8 | - color: "#7A7E83", | ||
9 | - selectedColor: "#05091A", | ||
10 | - list:[ { | ||
11 | - pagePath: "/packageA/pages/index/index", | ||
12 | - text: "商品", | ||
13 | - iconPath: "/images/tabbar/icon_75.png", | ||
14 | - selectedIconPath: "/images/tabbar/icon_68.png" | ||
15 | - }, | ||
16 | - { | ||
17 | - pagePath: "/packageA/pages/message/message", | ||
18 | - text: "消息", | ||
19 | - iconPath: "/images/tabbar/message.png", | ||
20 | - selectedIconPath: "/images/tabbar/messageactive.png" | ||
21 | - }, | ||
22 | - { | ||
23 | - pagePath: "/packageA/pages/shop_cart/shop_cart", | ||
24 | - text: "购物车", | ||
25 | - iconPath: "/images/tabbar/icon_70.png", | ||
26 | - selectedIconPath: "/images/tabbar/icon_73.png" | ||
27 | - }, | ||
28 | - { | ||
29 | - pagePath: "/packageA/pages/my/my", | ||
30 | - text: "我的", | ||
31 | - iconPath: "/images/tabbar/icon_71.png", | ||
32 | - selectedIconPath: "/images/tabbar/icon_72.png" | ||
33 | - }] | ||
34 | - | ||
35 | - }, | ||
36 | - properties: { | ||
37 | - selected: { | ||
38 | - type: Number, // 接收父组件传过来的值 | ||
39 | - value: '' | ||
40 | - }, | ||
41 | - text: { | ||
42 | - type: Number, // 接收父组件传过来的值 | ||
43 | - value: '' | ||
44 | - }, | ||
45 | - list: { | ||
46 | - type:Array, // 接收父组件传过来的值 | ||
47 | - value: '' | ||
48 | - }, | ||
49 | - }, | ||
50 | - attached() { | ||
51 | - }, | ||
52 | - onLoad(){ | ||
53 | - | ||
54 | - }, | ||
55 | - onShow: function(){ | ||
56 | - console.log(this.data.text,'我是text') | ||
57 | - if(this.data.text==1){ | ||
58 | - this.setData({ | ||
59 | - list:[ | ||
60 | - { | ||
61 | - pagePath: "/pages/index/index", | ||
62 | - text: "商品", | ||
63 | - iconPath: "/images/tabbar/icon_75.png", | ||
64 | - selectedIconPath: "/images/tabbar/icon_68.png" | ||
65 | - }, | ||
66 | - { | ||
67 | - pagePath: "/pages/message/message", | ||
68 | - text: "消息", | ||
69 | - iconPath: "/images/tabbar/message.png", | ||
70 | - selectedIconPath: "/images/tabbar/messageactive.png" | ||
71 | - }, | ||
72 | - { | ||
73 | - pagePath: "/pages/shop_cart/shop_cart", | ||
74 | - text: "购物车", | ||
75 | - iconPath: "/images/tabbar/icon_70.png", | ||
76 | - selectedIconPath: "/images/tabbar/icon_73.png" | ||
77 | - }, | ||
78 | - { | ||
79 | - pagePath: "/pages/my/my", | ||
80 | - text: "我的", | ||
81 | - iconPath: "/images/tabbar/icon_71.png", | ||
82 | - selectedIconPath: "/images/tabbar/icon_72.png" | ||
83 | - } | ||
84 | - ] | ||
85 | - }) | ||
86 | - }else{ | ||
87 | - this.setData({ | ||
88 | - list:[ | ||
89 | - { | ||
90 | - pagePath: "/packageA/pages/index/index", | ||
91 | - text: "商品", | ||
92 | - iconPath: "/images/tabbar/icon_75.png", | ||
93 | - selectedIconPath: "/images/tabbar/icon_68.png" | ||
94 | - }, | ||
95 | - { | ||
96 | - pagePath: "/packageA/pages/message/message", | ||
97 | - text: "消息", | ||
98 | - iconPath: "/images/tabbar/message.png", | ||
99 | - selectedIconPath: "/images/tabbar/messageactive.png" | ||
100 | - }, | ||
101 | - { | ||
102 | - pagePath: "/packageA/pages/shop_cart/shop_cart", | ||
103 | - text: "购物车", | ||
104 | - iconPath: "/images/tabbar/icon_70.png", | ||
105 | - selectedIconPath: "/images/tabbar/icon_73.png" | ||
106 | - }, | ||
107 | - { | ||
108 | - pagePath: "/packageA/pages/my/my", | ||
109 | - text: "我的", | ||
110 | - iconPath: "/images/tabbar/icon_71.png", | ||
111 | - selectedIconPath: "/images/tabbar/icon_72.png" | ||
112 | - } | ||
113 | - ] | ||
114 | - }) | ||
115 | - } | ||
116 | - }, | ||
117 | - | ||
118 | - methods: { | ||
119 | - switchTab(e) { | ||
120 | - const data = e.currentTarget.dataset | ||
121 | - const url = data.path; | ||
122 | - console.log('343434734783489743',this.data.text) | ||
123 | - if(this.data.text==1){ | ||
124 | - console.log(38434477) | ||
125 | - wx.switchTab({url}) | ||
126 | - }else{ | ||
127 | - console.log(url) | ||
128 | - wx.redirectTo({url}) | ||
129 | - } | ||
130 | - | ||
131 | - } | ||
132 | - }, | ||
133 | - | ||
134 | - }) |
custom-tab-bar/custom-tab-bar.wxml
已删除
100644 → 0
1 | -<view class="tab-bar"> | ||
2 | - <view class="tab-bar-border"></view> | ||
3 | - <view wx:for="{{list}}" wx:key="index" class="tab-bar-item" data-path="{{item.pagePath}}" data-index="{{index}}" bindtap="switchTab"> | ||
4 | - <image src="{{selected === index ? item.selectedIconPath : item.iconPath}}"></image> | ||
5 | - <view style="color: {{selected === index ? selectedColor : color}}">{{item.text}}</view> | ||
6 | - | ||
7 | - </view> | ||
8 | -</view> |
custom-tab-bar/custom-tab-bar.wxss
已删除
100644 → 0
1 | -.tab-bar { | ||
2 | - position: fixed; | ||
3 | - bottom: 0; | ||
4 | - left: 0; | ||
5 | - right: 0; | ||
6 | - height: 48px; | ||
7 | - background: white; | ||
8 | - display: flex; | ||
9 | - padding-bottom: env(safe-area-inset-bottom); | ||
10 | -} | ||
11 | - | ||
12 | -.tab-bar-border { | ||
13 | - background-color: rgba(0, 0, 0, 0.33); | ||
14 | - position: absolute; | ||
15 | - left: 0; | ||
16 | - top: 0; | ||
17 | - width: 100%; | ||
18 | - height: 1px; | ||
19 | - transform: scaleY(0.5); | ||
20 | -} | ||
21 | - | ||
22 | -.tab-bar-item { | ||
23 | - flex: 1; | ||
24 | - text-align: center; | ||
25 | - display: flex; | ||
26 | - justify-content: center; | ||
27 | - align-items: center; | ||
28 | - flex-direction: column; | ||
29 | - position: relative; | ||
30 | -} | ||
31 | - | ||
32 | -.tab-bar-item image { | ||
33 | - width: 27px; | ||
34 | - height: 27px; | ||
35 | -} | ||
36 | - | ||
37 | -.tab-bar-item view { | ||
38 | - font-size: 10px; | ||
39 | -} | ||
40 | -.connect{ | ||
41 | - width:240rpx!important; | ||
42 | - height:100rpx; | ||
43 | - position: absolute; | ||
44 | - top:0; | ||
45 | - left:0; | ||
46 | - background: transparent; | ||
47 | - padding: none!important; | ||
48 | - | ||
49 | -} |
images/38.png
已删除
100644 → 0
595 字节
images/39.png
已删除
100644 → 0
533 字节
images/40.png
已删除
100644 → 0
578 字节
images/__MACOSX/._编组 14.png
已删除
100644 → 0
176 字节
images/add.png
已删除
100644 → 0
1.0 KB
images/alcheck.png
已删除
100644 → 0
499 字节
images/all.png
已删除
100644 → 0
976 字节
images/bingo.png
已删除
100644 → 0
165 字节
images/bodadianhua_icon.png
已删除
100644 → 0
634 字节
images/bubble.png
已删除
100644 → 0
7.6 KB
images/changxiang.png
已删除
100644 → 0
18.6 KB
images/check.png
已删除
100644 → 0
844 字节
images/check@.png
已删除
100644 → 0
673 字节
images/close.png
已删除
100644 → 0
1.2 KB
images/dapai.png
已删除
100644 → 0
301.9 KB
images/del.png
已删除
100644 → 0
662 字节
images/delete.png
已删除
100644 → 0
450 字节
images/dianhua.png
已删除
100644 → 0
3.3 KB
images/gosee.png
已删除
100644 → 0
1.2 KB
images/gou.png
已删除
100644 → 0
3.2 KB
images/haowu.png
已删除
100644 → 0
15.0 KB
images/huo.png
已删除
100644 → 0
4.7 KB
images/icon_13.png
已删除
100644 → 0
843 字节
images/icon_14.png
已删除
100644 → 0
994 字节
images/icon_15.png
已删除
100644 → 0
984 字节
images/icon_16.png
已删除
100644 → 0
1.0 KB
images/icon_29.png
已删除
100644 → 0
1.1 KB
images/icon_30.png
已删除
100644 → 0
1.5 KB
images/icon_31.png
已删除
100644 → 0
1.7 KB
images/icon_32.png
已删除
100644 → 0
991 字节
images/icon_33.png
已删除
100644 → 0
750 字节
images/icon_34.png
已删除
100644 → 0
860 字节
images/icon_35.png
已删除
100644 → 0
560 字节
images/icon_37.png
已删除
100644 → 0
909 字节
images/icon_41.png
已删除
100644 → 0
278 字节
images/icon_43.png
已删除
100644 → 0
543 字节
images/icon_46.png
已删除
100644 → 0
3.7 KB
images/icon_48.png
已删除
100644 → 0
494 字节
images/icon_50.png
已删除
100644 → 0
7.9 KB
images/icon_51.png
已删除
100644 → 0
813 字节
images/icon_54.png
已删除
100644 → 0
966 字节
images/icon_55.png
已删除
100644 → 0
3.3 KB
images/icon_58.png
已删除
100644 → 0
1.0 KB
images/icon_59.png
已删除
100644 → 0
4.6 KB
images/icon_60.png
已删除
100644 → 0
388 字节
images/icon_61.png
已删除
100644 → 0
1.2 KB
images/icon_62.png
已删除
100644 → 0
1.1 KB
images/icon_64.png
已删除
100644 → 0
1.1 KB
images/icon_65.png
已删除
100644 → 0
4.5 KB
images/icon_78.png
已删除
100644 → 0
4.9 KB
images/icon_79.png
已删除
100644 → 0
53.6 KB
images/icon_80.png
已删除
100644 → 0
5.5 KB
images/icon_81.png
已删除
100644 → 0
1.8 KB
images/icon_82.png
已删除
100644 → 0
1.7 KB
images/icon_83.png
已删除
100644 → 0
1.0 KB
images/icon_84.png
已删除
100644 → 0
2.2 KB
images/icon_85.png
已删除
100644 → 0
7.6 KB
images/img_chailv.png
已删除
100644 → 0
52.0 KB
images/img_gonghui.png
0 → 100644
46.6 KB
images/img_laobao.png
已删除
100644 → 0
40.3 KB
images/img_shengri.png
0 → 100644
39.7 KB
images/jingzhi.png
已删除
100644 → 0
18.6 KB
images/kefu_icon.png
已删除
100644 → 0
847 字节
images/line.png
已删除
100644 → 0
295 字节
images/login_bg.png
已删除
100644 → 0
20.7 KB
images/logo.png
已删除
100644 → 0
6.3 KB
images/manjian.png
已删除
100644 → 0
3.7 KB
images/mei.png
已删除
100644 → 0
740 字节
images/more.png
已删除
100644 → 0
2.2 KB
images/notice.png
已删除
100644 → 0
2.2 KB
images/reduce.png
已删除
100644 → 0
961 字节
images/rehot.png
已删除
100644 → 0
23.1 KB
images/sc.png
已删除
100644 → 0
1007 字节
images/sc@.png
已删除
100644 → 0
688 字节
images/search.png
已删除
100644 → 0
782 字节
images/select.png
已删除
100644 → 0
338 字节
images/select_active.png
已删除
100644 → 0
347 字节
images/success.png
已删除
100644 → 0
4.5 KB
images/tabbar/icon_68.png
已删除
100644 → 0
1.9 KB
images/tabbar/icon_70.png
已删除
100644 → 0
1.0 KB
images/tabbar/icon_71.png
已删除
100644 → 0
1.1 KB
images/tabbar/icon_72.png
已删除
100644 → 0
1.7 KB
-
请 注册 或 登录 后发表评论