Commit 09e0fd4a9fb7095fd349163f5c1b7e02f9ab6ee1
1 parent
cb36fbf0
1.自定义模板 导航要显示背景颜色,显示字体颜色
2.自定义模板 拼团,秒杀要显示活动的名称
Showing
7 changed files
with
22 additions
and
14 deletions
components/diy_nav/diy_nav.wxss
@@ -134,7 +134,7 @@ | @@ -134,7 +134,7 @@ | ||
134 | .big_two { | 134 | .big_two { |
135 | display: inline-block; | 135 | display: inline-block; |
136 | width: 100%; | 136 | width: 100%; |
137 | - min-height: 280rpx; | 137 | + /* min-height: 280rpx; */ |
138 | /* 先设置最小容器单位,min-height:280rpx;然后再设置auto */ | 138 | /* 先设置最小容器单位,min-height:280rpx;然后再设置auto */ |
139 | height: auto; | 139 | height: auto; |
140 | } | 140 | } |
@@ -163,7 +163,7 @@ image { | @@ -163,7 +163,7 @@ image { | ||
163 | /* 文字1 */ | 163 | /* 文字1 */ |
164 | 164 | ||
165 | .test { | 165 | .test { |
166 | - width: 60rpx; | 166 | + /* width: 60rpx; */ |
167 | height: 40rpx; | 167 | height: 40rpx; |
168 | margin-left: 30rpx; | 168 | margin-left: 30rpx; |
169 | font-size: 30rpx; | 169 | font-size: 30rpx; |
components/diy_nav/diy_nav_part1.wxml
1 | - <view style='width:{{100/nav_list.length}}%' | 1 | + <view style='width:{{100/nav_list.length}}%;background-color: {{item.bgcolor}};' |
2 | class="{{object.seticon==1?'big_view_one':object.seticon==2?'big_view_two':'bicder_picture'}}"> | 2 | class="{{object.seticon==1?'big_view_one':object.seticon==2?'big_view_two':'bicder_picture'}}"> |
3 | <block wx:if="{{item.navicon==null}}"> | 3 | <block wx:if="{{item.navicon==null}}"> |
4 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 4 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' |
5 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" | 5 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" |
6 | src="{{imghost}}/miniapp/images/nav-icon.png"></image> | 6 | src="{{imghost}}/miniapp/images/nav-icon.png"></image> |
7 | - <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}"> | 7 | + <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}" style="color:{{item.txtcolor}};"> |
8 | {{item.title}} | 8 | {{item.title}} |
9 | </view> | 9 | </view> |
10 | </block> | 10 | </block> |
@@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
12 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 12 | <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' |
13 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" | 13 | class="{{object.seticon==1?'print_one':object.seticon==2?'print_two':'image_none'}}" |
14 | src="{{item.navicon}}"></image> | 14 | src="{{item.navicon}}"></image> |
15 | - <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}"> | 15 | + <view class="{{object.seticon==1?'font_one':object.seticon==2?'font_bicder_two':'font_three'}}" style="color:{{item.txtcolor}};"> |
16 | {{item.title}} | 16 | {{item.title}} |
17 | </view> | 17 | </view> |
18 | </block> | 18 | </block> |
components/diy_nav/diy_nav_part2.wxml
1 | - <view class="one_div"> | 1 | + <view class="one_div" style='background-color: {{item.bgcolor}};padding:10rpx 0rpx;border-radius: 5rpx; '> |
2 | <view class="picture_one"> | 2 | <view class="picture_one"> |
3 | <block wx:if="{{item.navicon!=null}}"> | 3 | <block wx:if="{{item.navicon!=null}}"> |
4 | - <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 4 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;margin-top: 10rpx;' |
5 | src="{{item.navicon}}"> | 5 | src="{{item.navicon}}"> |
6 | </image> | 6 | </image> |
7 | </block> | 7 | </block> |
8 | 8 | ||
9 | <block wx:if="{{item.navicon==null}}"> | 9 | <block wx:if="{{item.navicon==null}}"> |
10 | - <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;' | 10 | + <image style='width:{{object.sliderExample*2}}rpx;height:{{object.sliderExample*2}}rpx;margin-top: 10rpx;' |
11 | src="{{imghost}}/miniapp/images/nav-icon.png"> | 11 | src="{{imghost}}/miniapp/images/nav-icon.png"> |
12 | </image> | 12 | </image> |
13 | </block> | 13 | </block> |
14 | 14 | ||
15 | </view> | 15 | </view> |
16 | - <view class="test">{{item.title}}</view> | 16 | + <view class="test" style="color:{{item.txtcolor}};">{{item.title}}</view> |
17 | </view> | 17 | </view> |
components/diy_pingd_buy/diy_pingd_buy.wxml
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | </view> | 45 | </view> |
46 | 46 | ||
47 | <view class='sp_wz_p'> | 47 | <view class='sp_wz_p'> |
48 | - <view class='sp_wzi_p'>{{aitem.goods_name}}</view> | 48 | + <view class='sp_wzi_p'>{{aitem.title}}</view> |
49 | <view class='sp_jg_p'>¥{{aitem.price}}</view> | 49 | <view class='sp_jg_p'>¥{{aitem.price}}</view> |
50 | <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>--> | 50 | <!--<view class='sp_jgx_p'>¥{{aitem.market_price}}</view>--> |
51 | 51 |
components/diy_seckill/diy_seckill.wxml
@@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
52 | </view> | 52 | </view> |
53 | 53 | ||
54 | <view class='sp_wz'> | 54 | <view class='sp_wz'> |
55 | - <view class='sp_wzi'>{{aitem.goods_name}}</view> | 55 | + <view class='sp_wzi'>{{aitem.title}}</view> |
56 | <view class='sp_jg'>¥{{aitem.price}}</view> | 56 | <view class='sp_jg'>¥{{aitem.price}}</view> |
57 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> | 57 | <view class='sp_jgx'>¥{{aitem.market_price}}</view> |
58 | </view> | 58 | </view> |
@@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
75 | </view> | 75 | </view> |
76 | 76 | ||
77 | <view class="o1_right"> | 77 | <view class="o1_right"> |
78 | - <view class="sp_wzi">{{aitem.goods_name}}</view> | 78 | + <view class="sp_wzi">{{aitem.title}}</view> |
79 | <view class="o1_sj_kill"> | 79 | <view class="o1_sj_kill"> |
80 | <text>{{aitem.djs.day}}</text> 天 | 80 | <text>{{aitem.djs.day}}</text> 天 |
81 | <text>{{aitem.djs.hou}}</text> : | 81 | <text>{{aitem.djs.hou}}</text> : |
components/diy_shopname/diy_shopname.js
@@ -65,7 +65,15 @@ Component({ | @@ -65,7 +65,15 @@ Component({ | ||
65 | go_new_wares:function () { | 65 | go_new_wares:function () { |
66 | var url="/pages/goods/goodsList/goodsList?is_new=1"; | 66 | var url="/pages/goods/goodsList/goodsList?is_new=1"; |
67 | getApp().goto(url); | 67 | getApp().goto(url); |
68 | - } | 68 | + }, |
69 | + //主图的图片显示 | ||
70 | + berror:function(e){ | ||
71 | + var err=e.currentTarget.dataset.err; | ||
72 | + var url=this.data.imghost+'/public/static/images/model/bg.jpg'; | ||
73 | + var ob={}; | ||
74 | + ob[err]=url; | ||
75 | + this.setData(ob); | ||
76 | + } | ||
69 | 77 | ||
70 | } | 78 | } |
71 | }) | 79 | }) |
72 | \ No newline at end of file | 80 | \ No newline at end of file |
components/diy_shopname/diy_shopname.wxml
@@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
3 | <view class="big"> | 3 | <view class="big"> |
4 | 4 | ||
5 | <view class="big_picture_border"> | 5 | <view class="big_picture_border"> |
6 | - <image class="big_picture" src='{{object.srcimg}}'></image> | 6 | + <image class="big_picture" src='{{object.srcimg}}' binderror="berror" data-err="object.srcimg"></image> |
7 | </view> | 7 | </view> |
8 | <block wx:if="{{object.style==1}}"> | 8 | <block wx:if="{{object.style==1}}"> |
9 | 9 |