Browse Source

全部纸厂纸厂名超长省略显示

featrue/v4.4
DESKTOP-A1SENDA\HUzy 4 years ago
parent
commit
839e7cc5f0
2 changed files with 16 additions and 3 deletions
  1. 2
      app.js
  2. 17
      pages/article/allNewInfo/index.wxml

2
app.js

@ -1,7 +1,7 @@
//app.js //app.js
App({ App({
//----------------------------------------------globalData-------------------------------------- //----------------------------------------------globalData--------------------------------------
evn: 0,//0:开发环境,1:测试环境,2:生产环境
evn: 1,//0:开发环境,1:测试环境,2:生产环境
tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'], tmplIds: ['SUjEgwDopCv9xkkSZ4KbS0L7XbAiVQor6GmPg14K760'],
agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'], agentMsgIds: ['kG8DErWDpyzBHCFaLlSKYMF7xVy8UpgogCwV_WSNt10', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: 152, version: 152,

17
pages/article/allNewInfo/index.wxml

@ -29,7 +29,7 @@
<view class="flex flex-justify" style="border-top:2rpx solid #f3f3f3;padding: 0rpx 32rpx;" id="toFactoryDetails" <view class="flex flex-justify" style="border-top:2rpx solid #f3f3f3;padding: 0rpx 32rpx;" id="toFactoryDetails"
data-factoryId="{{item.paperMillId}}" catchtap="toPage"> data-factoryId="{{item.paperMillId}}" catchtap="toPage">
<view class="text-df text-balck" style="flex:1"> <view class="text-df text-balck" style="flex:1">
{{item.shortName}}
{{m2.newString(item.shortName)}}
<view wx:if="{{item.hasFollowed==true}}" class="yesAttention">已关注</view> <view wx:if="{{item.hasFollowed==true}}" class="yesAttention">已关注</view>
<view wx:if="{{item.hasFollowed==false}}" class="noAttention">未关注</view> <view wx:if="{{item.hasFollowed==false}}" class="noAttention">未关注</view>
</view> </view>
@ -92,4 +92,17 @@
<!-- <view class="gzBtn" id="toAttentionPaperFctory" bindtap="toPage"> <!-- <view class="gzBtn" id="toAttentionPaperFctory" bindtap="toPage">
<view class="gzBtnIcon"><image style="width:36rpx;height:36rpx" src="/assets/info/addgzicon.png"></image></view> <view class="gzBtnIcon"><image style="width:36rpx;height:36rpx" src="/assets/info/addgzicon.png"></image></view>
<view class="gzBtnText">关注纸厂</view> <view class="gzBtnText">关注纸厂</view>
</view> -->
</view> -->
<wxs module="m2">
var newString = function (string) {
if (string.length > 4) {
var newString = string.substring(0, 4)
return newString + '...';
}else{
return string
}
}
module.exports.newString = newString;
</wxs>
Loading…
Cancel
Save