贺智强 6 rokov pred
rodič
commit
5a08af7d00

+ 34 - 0
wechat/app.wxss

xqd
@@ -81,3 +81,37 @@ page,block,view,scroll-view,swiper,movable-view,icon,text,progress,button,checkb
   margin-left: auto;
   margin-right: auto;
 }
+
+.flex-row {
+    display: -webkit-box;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-box-orient: horizontal;
+    flex-direction: row;
+}
+
+.flex-col {
+    display: -webkit-box;
+    display: -webkit-flex;
+    display: flex;
+    -webkit-box-orient: vertical;
+    flex-direction: column;
+}
+
+.flex-grow-0 {
+    min-width: 0;
+    -webkit-box-flex: 0;
+    -ms-flex-positive: 0;
+    flex-grow: 0;
+    -ms-flex-negative: 0;
+    flex-shrink: 0;
+}
+
+.flex-grow-1 {
+    min-width: 0;
+    -webkit-box-flex: 1;
+    -ms-flex-positive: 1;
+    flex-grow: 1;
+    -ms-flex-negative: 1;
+    flex-shrink: 1;
+}

+ 5 - 0
wechat/pages/announce-detail/index.js

xqd xqd
@@ -21,6 +21,10 @@ Page({
       success: res => {
         if (res.data.status == 'success') {
           console.log(res.data.article)
+
+          that.setData({
+            item: res.data.article
+          });
           WxParse.wxParse('article', 'html', res.data.article.content, that, 5);
         }
       }
@@ -75,4 +79,5 @@ Page({
   onShareAppMessage: function () {
 
   }
+  
 })

+ 6 - 0
wechat/pages/announce-detail/index.wxml

xqd
@@ -1,4 +1,10 @@
 <!--pages/announce-detail/index.wxml-->
 <!--pages/article-detail/index.wxml-->
 <import src="/wxParse/wxParse.wxml"/>
+<view class="body">
+  <view class="title">{{item.title}}</view>
+  <view class="flex-row info">
+    <view class="flex-grow-1">{{item.publish_date}}</view>
+  </view>
 <template is="wxParse" data="{{wxParseData:article.nodes}}"/>
+</view>

+ 96 - 1
wechat/pages/announce-detail/index.wxss

xqd
@@ -1,2 +1,97 @@
 /* pages/announce-detail/index.wxss */
-@import "/wxParse/wxParse.wxss";
+@import "/wxParse/wxParse.wxss";
+
+
+.body {
+    background: #fff;
+    padding: 32rpx 24rpx 110rpx;
+    overflow-x: hidden;
+    border-top: 1rpx solid #e3e3e3;
+}
+
+.body .title {
+    font-weight: bold;
+    margin-bottom: 42rpx;
+}
+
+.body .info {
+    font-size: 9pt;
+    color: #888;
+    margin-bottom: 34rpx;
+}
+
+.bar {
+    position: fixed;
+    z-index: 10;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+    background: #fff;
+    border-top: 1rpx solid #e3e3e3;
+}
+
+.bar .btn {
+    color: #555;
+    font-size: 9pt;
+    text-align: center;
+    padding: 10rpx 30rpx;
+    display: inline-block;
+    background: none;
+    line-height: inherit;
+}
+
+.bar .btn:after {
+    display: none;
+}
+
+.bar .btn image {
+    width: 42rpx;
+    height: 42rpx;
+    display: block;
+    margin: 0 auto 10rpx;
+}
+
+.wxParse-p {
+    padding-left: 0;
+    padding-right: 0;
+}
+
+.goods-link {
+    overflow: hidden;
+    height: 220rpx!important;
+    position: relative;
+    margin-bottom: 10rpx;
+}
+
+.goods-link image {
+    width: 184rpx!important;
+    height: 184rpx!important;
+    background: #fff;
+    top: 16rpx;
+    left: 16rpx;
+    position: absolute;
+    display: block;
+}
+
+.goods-link .goods-info {
+    padding: 32rpx 24rpx 24rpx 232rpx!important;
+    height: 100%;
+}
+
+.goods-link .goods-name {
+    -webkit-line-clamp: 2;
+    display: -webkit-box;
+    -webkit-box-orient: vertical;
+    overflow: hidden;
+    margin-bottom: 16rpx;
+}
+
+.goods-link .buy-btn {
+    display: inline-block;
+    float: right;
+    font-size: 9pt!important;
+    border: 1rpx solid #ff4544!important;
+    color: #ff4544;
+    border-radius: 5rpx!important;
+    padding: 5rpx 10rpx!important;
+}

+ 3 - 2
wechat/pages/announce/announce.wxml

xqd
@@ -1,7 +1,8 @@
 <view class='sg-container'>
   <view wx:for='{{ list }}' class='info-content'>
-    <view class='info-bg' catchtap='redirectToAnnounce' data-id='{{ item.id }}'>
-      <view class="info-label">{{ item.title||'未命名' }}</view>
+    <view class='info-bg flex-row' catchtap='redirectToAnnounce' data-id='{{ item.id }}'>
+      <view class="info-label flex-grow-1">{{ item.title||'未命名' }}</view>
+      <view class=" flex-grow-0" style='line-height:100rpx;padding-right:20rpx'>{{item.publish_date}}</view>
     </view>
   </view>
 </view>