Commit 5252d1d3f1a7549b4f9e661c48d16405f6065ed4

Authored by 后端研发-倪永富
1 parent 98df6217

新试一下 公告的

components/diy_notice/diy_notice.wxml
  1 +<wxs module="g_filter" src="g_filter.wxs"></wxs>
1 <block wx:if="{{object.style==1}}"> 2 <block wx:if="{{object.style==1}}">
  3 + <block wx:if="{{g_filter.has_char(object.wxapp_url,'plugin')>=0}}">
  4 + <navigator url="{{object.wxapp_url}}" class="s1_gk_a1 pd_top10" style="background-color: {{object.notice_bgcolor}}">
  5 + <view class="big_border">
  6 + <image class="image_c" src="/public/static/images/model/notice.png"></image>
  7 + <view class="marquee">
  8 + <view class="content">
  9 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  10 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  11 + <text style="color: {{object.notice_color}}">{{object.noticetxt}}</text> <text style="display: inline-block; width: 590rpx;line-height:30rpx;"></text>
  12 + </view>
  13 + </view>
  14 + </view>
  15 + </navigator>
  16 + </block>
  17 +
  18 + <block wx:else>
2 <view data-url="{{object.wxapp_url}}" class="s1_gk_a1 pd_top10" bindtap="go_url" style="background-color: {{object.notice_bgcolor}}"> 19 <view data-url="{{object.wxapp_url}}" class="s1_gk_a1 pd_top10" bindtap="go_url" style="background-color: {{object.notice_bgcolor}}">
3 <view class="big_border"> 20 <view class="big_border">
4 <image class="image_c" src="/public/static/images/model/notice.png"></image> 21 <image class="image_c" src="/public/static/images/model/notice.png"></image>
@@ -11,6 +28,10 @@ @@ -11,6 +28,10 @@
11 </view> 28 </view>
12 </view> 29 </view>
13 </view> 30 </view>
  31 + </block>
  32 +
  33 +
  34 +
14 </block> 35 </block>
15 36
16 37
components/diy_notice/g_filter.wxs 0 → 100644
  1 +var g_filters = {
  2 + has_char:function(url,key){
  3 + return url.indexOf(key);
  4 + }
  5 +}
  6 +module.exports = {
  7 + has_char: g_filters.has_char
  8 +}
0 \ No newline at end of file 9 \ No newline at end of file