Browse Source

更新细节样式

306132416@qq.com 4 years ago
parent
commit
6609cc588f

+ 1 - 1
components/gaoyia-parse/parse.vue

@@ -65,7 +65,7 @@ import wxParseTemplate from './components/wxParseTemplate0';
 			},
 			noData: {
 				type: String,
-				default: '<div style="color: red;">无</div>'
+				default: '<div style="margin: 20rpx;">-</div>'
 			},
 			startHandler: {
 				type: Function,

+ 1 - 1
pages/activity/index.vue

@@ -243,7 +243,7 @@ export default {
                 id: "",
                 status: 0,
               };
-              ob.url = getApp().globalData.shareUrl + item.pic_url;
+              ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
               ob.title = item.name;
               ob.way = item.sponsor;
               let time = this.$options.filters["globalTime"](item.start_time);

+ 1 - 1
pages/index/index.vue

@@ -733,7 +733,7 @@ export default {
                 type: "",
                 id: "",
               };
-              ob.url = getApp().globalData.shareUrl + item.pic_url;
+              ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
               ob.title = item.name;
               ob.department = item.sponsor;
               ob.time = this.$options.filters["globalTime"](item.start_time);

+ 1 - 6
pages/policy/index.vue

@@ -42,12 +42,7 @@
         </view>
       </view>
       <view class="policy-content">
-        <view
-          class="policy-content-item"
-          v-for="(item, idx) in policyData"
-          :key="idx"
-          @click="enterPolicyDeatil(item.id)"
-        >
+        <view class="policy-content-item"   v-for="(item, idx) in policyData" :key="idx" @click="enterPolicyDeatil(item.id)"  >
             <p class="policy-content-item-left-title" style="height: 86rpx">
               {{ item.title }}
             </p>

+ 8 - 7
pages/policy/policy_deatil.vue

@@ -18,7 +18,7 @@
     <!-- 企业研发投入补贴 -->
     <div class="card-input-content">
       <div class="card-input">
-        <div class="card-title">{{ infoObj.project_name }}</div>
+        <div class="card-title">{{ infoObj.project_name || '-'}}</div>
         <div class="table">
           <p class="table-item">
             <span>项目金额:</span>
@@ -48,7 +48,7 @@
     <div class="card-situation" v-if="infoObj.project_desc">
       <div class="card-title">项目概况</div>
       <p>
-        {{ infoObj.project_desc }}
+        {{ infoObj.project_desc || '-'}}
       </p>
     </div>
 
@@ -62,13 +62,13 @@
           <div class="term">
             <div class="term-name">项目名称:</div>
             <div class="term-value-group">
-              <p class="term-value-item">{{ infoObj.project_name }}</p>
+              <p class="term-value-item">{{ infoObj.project_name || '-'}}</p>
             </div>
           </div>
           <div class="term">
             <div class="term-name">受理部门:</div>
             <div class="term-value-group">
-              <p class="term-value-item">{{ infoObj.sponsor_name }}</p>
+              <p class="term-value-item">{{ infoObj.sponsor_name || '-'}}</p>
             </div>
           </div>
           <div class="term">
@@ -95,13 +95,14 @@
           <div class="term">
             <div class="term-name">支持金额:</div>
             <div class="term-value-group">
-              <p class="term-value-item">{{ infoObj.project_money }}</p>
+              <p class="term-value-item">{{ infoObj.project_money || '-'}}</p>
             </div>
           </div>
           <div class="term">
             <div class="term-name">资助标准:</div>
             <div class="term-value-group">
-              <p class="term-value-item" v-html="infoObj.lidu"></p>
+              <!-- <p class="term-value-item" v-html="infoObj.lidu"></p> -->
+			    <u-parse :content="infoObj.lidu"  @navigate="navigateUrl" />
             </div>
           </div>
         </div>
@@ -145,7 +146,7 @@
       <div class="item-list">
         <div class="term">
           <div class="term-value-group">
-            <p class="term-value-item">{{ infoObj.contact }}</p>
+            <p class="term-value-item">{{ infoObj.contact || '-'}}</p>
           </div>
         </div>
       </div>

+ 57 - 23
pages/policy/search.vue

@@ -6,23 +6,24 @@
     </view>
      <view class="policy-box">
       <view class="policy-content">
-        <view
-          class="policy-content-item"
-          v-for="(item, idx) in policyData"
-          :key="idx"
-          @click="enterPolicyDeatil(item.id)"
-        >
-          <view class="policy-content-item-left">
-            <p class="policy-content-item-left-title" style="height: 70rpx;">{{ item.title }}</p>
+        <view class="policy-content-item"   v-for="(item, idx) in policyData" :key="idx" @click="enterPolicyDeatil(item.id)"  >
+            <p class="policy-content-item-left-title" style="height: 86rpx">
+              {{ item.title }}
+            </p>
             <view class="policy-content-item-left-time">
               <p class="moment">{{ item.publish_time | globalTime }}</p>
-              <p class="maxMony">{{ item.project_money }}</p>
-              <p class="leftDay">{{ (item.project_end_date | globalTime) || '长期可申报' }}</p>
+              <p class="maxMony" v-if="item.project_money!=='-' && item.project_money ">{{ item.project_money }}</p>
+              <p class="leftDay" v-if=" item.project_end_date && Math.floor( new Date( new Date(item.project_end_date).getTime() -new Date().getTime() ).getTime() /(1 * 24 * 60 * 60 * 1000) ) +1 >= 1">
+                剩{{ Math.floor(new Date(new Date(item.project_end_date).getTime() -new Date().getTime()).getTime() /(1 * 24 * 60 * 60 * 1000)) + 1}}天
+              </p>
+              <p class="leftDay"  v-if="item.project_end_date && Math.floor(new Date(new Date(item.project_end_date).getTime() - new Date().getTime()).getTime() / (1 * 24 * 60 * 60 * 1000)) + 1 < 1 ">
+                申报结束
+              </p>
+              <p class="leftDay" v-if="!item.project_end_date">长期可申报</p>
             </view>
-          </view>
-          <view class="policy-content-item-img">
-            <image :src="'https://kiq.xazhima.com'+item.pic_url" alt="" />
-          </view>
+      <!--    <view class="policy-content-item-img">
+            <image :src="item.pic_url" alt="" mode="aspectFill"/>
+          </view> -->
         </view>
       </view>
     </view>
@@ -105,8 +106,8 @@ export default {
     image {
       position: absolute;
       left: 72rpx;
-	  width: 30rpx;
-	  height: 30rpx;
+      width: 30rpx;
+      height: 30rpx;
     }
     input {
       background-color: #ffffff;
@@ -120,15 +121,44 @@ export default {
     }
   }
   .policy-box {
+    margin-top: 50rpx;
     width: 100%;
     display: flex;
     flex-direction: column;
+    .policy-title {
+      width: 100%;
+      p {
+        background-color: #02a7f0;
+        width: 190rpx;
+        height: 70rpx;
+        color: #ffffff;
+        border-radius: 0 40rpx 40rpx 0rpx;
+        font-size: 30rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+      }
+    }
+    .policy-item-box {
+      display: flex;
+      justify-content: space-between;
+      margin: 0 20rpx;
+      margin-top: 20rpx;
+      .policy-item-name {
+        padding-bottom: 10rpx;
+        font-size: 30rpx;
+      }
+      .active {
+        font-weight: 600;
+        border-bottom: 7rpx solid #02a7f0;
+      }
+    }
     .policy-content {
       width: 100%;
       display: flex;
       box-sizing: border-box;
       flex-direction: column;
-	  margin-top: 10rpx;
+      margin-top: 10rpx;
       .policy-content-item {
         margin: 0 20rpx;
         display: flex;
@@ -139,11 +169,9 @@ export default {
         padding: 30rpx;
         justify-content: space-between;
 		align-items: center;
-        .policy-content-item-left {
-          display: flex;
-          flex-direction: column;
-          width: 75%;
+		flex-direction: column;
           .policy-content-item-left-title {
+			width: 100%;
             text-overflow: -o-ellipsis-lastline;
             overflow: hidden;
             text-overflow: ellipsis;
@@ -151,7 +179,7 @@ export default {
             -webkit-line-clamp: 2;
             line-clamp: 2;
             -webkit-box-orient: vertical;
-            font-size: 28rpx;
+            font-size: 32rpx;
             margin-bottom: 10rpx;
           }
           .policy-content-item-left-time {
@@ -162,6 +190,7 @@ export default {
               color: #c1c1c1;
               font-size: 24rpx;
               margin-right: 20rpx;
+			  white-space: nowrap;
             }
             .maxMony {
               font-size: 24rpx;
@@ -170,6 +199,11 @@ export default {
               padding: 10rpx;
               margin-right: 20rpx;
               border-radius: 12rpx;
+			  overflow: hidden;
+			  text-overflow: ellipsis;
+			  white-space: nowrap;
+			  // width: 46%;
+			  // text-align: center;
             }
             .leftDay {
               font-size: 24rpx;
@@ -178,9 +212,9 @@ export default {
               padding: 10rpx;
               border: 1px solid #f7bbc3;
               border-radius: 12rpx;
+			  white-space: nowrap;
             }
           }
-        }
         .policy-content-item-img {
           image {
             width: 170rpx;

+ 1 - 1
pages/selfCenter/my_activity.vue

@@ -145,7 +145,7 @@ export default {
                 id: "",
                 status: 0,
               };
-              ob.url = getApp().globalData.shareUrl + item.pic_url;
+              ob.url = item.pic_url ? getApp().globalData.shareUrl + item.pic_url : '/static/activity/default.png';
               ob.title = item.name;
               ob.way = item.sponsor;
               let time = this.$options.filters["globalTime"](item.start_time);

BIN
static/activity/default.png