liyongli 1 year ago
parent
commit
929f6db2e1

BIN
images/jj.png


BIN
images/tg.png


+ 16 - 1
pages/index/index.js

@@ -7,7 +7,22 @@ Page({
     ori: {},
     video_height: 0,
   },
-
+  toNext(e){
+    const item = e.currentTarget.dataset.item || {};
+    if (item.type === 'gzh'){
+      wx.navigateTo({
+        url: "/pages/webview/index?url=" + item.url
+      })
+      return
+    }
+    if (item.type === 'sph'){
+      wx.openChannelsActivity({
+        finderUserName: item.sph_id,
+        feedId: item.sp_id,
+      })
+      return
+    }
+  },
   onLoad(options) {
     ajax({
       urlType: "fileurl",

+ 6 - 2
pages/index/index.wxml

@@ -3,12 +3,16 @@
   <view class="index_main">
     <Container style="margin-top: -100rpx;">
       <video src="{{ori.baseVideoUrl}}" autoplay />
-      <view class="list" wx:for="{{ori.textList}}" wx:key="index">
+      <view class="list" wx:for="{{ori.textList || []}}" wx:key="index">
         <view class="btn">{{item.title}}</view>
-        <view wx:for="{{item.content}}" wx:for-item="v" wx:for-index="i" wx:key="i">
+        <view wx:for="{{item.content || []}}" wx:for-item="v" wx:for-index="i" wx:key="i">
           <view class="list_label">· {{v.title}}</view>
           <view class="list_value">{{v.content}}</view>
         </view>
+        <view class="item" wx:if="{{item.data}}" data-item="{{item.data}}" bind:tap="toNext">
+          <image mode="aspectFit" class="item_image" wx:if="{{item.data.cover}}" src="{{item.data.cover}}" />
+          <view class="title">{{item.data.title}}</view>
+        </view>
       </view>
     </Container>
   </view>

+ 44 - 0
pages/index/index.wxss

@@ -46,4 +46,48 @@ video {
   margin-bottom: 73rpx;
 }
 
+.item {
+  width: 100%;
+  height: 335rpx;
+  background-color: #000;
+  position: relative;
+}
+
+.item_image{
+  width: 100%;
+  height: 335rpx;
+}
+
+.title {
+  color: #fff;
+  position: absolute;
+  bottom: 0;
+  width: 100%;
+  background-color: #00000090;
+  height: 1.5em;
+  line-height: 1.5em;
+  padding: 0 10rpx;
+  box-sizing: border-box;
+  font-size: 30rpx;
+  white-space: nowrap; /* 防止文本换行 */  
+  overflow: hidden; /* 隐藏超出容器的内容 */  
+  text-overflow: ellipsis; /* 在超出内容的地方显示省略号 */  
+}
+
+.item_bg {
+  margin-bottom: 15rpx;
+}
+
+.item_bg:last-child{
+  margin-bottom: 0;
+}
 
+.image {
+  width: 507rpx;
+  display: block;
+  margin: 55rpx auto 0 auto;
+}
+
+.image:last-child {
+  display: none;
+}

+ 1 - 1
pages/previousEditions/index.js

@@ -19,7 +19,7 @@ Page({
       {
         title: "标题",
         url: "https://mp.weixin.qq.com/s/wu39DuMtudT1wtHWz50Caw",
-        cover: "",
+        cover: "https://cxzx.smcic.net/topic/tool/img/2023jrhwmtp.jpg",
         type: "gzh", // gzh - 公众号; sph - 视频号;
       },
       {

+ 2 - 2
pages/previousEditions/index.wxml

@@ -3,9 +3,9 @@
   <view class="index_main">
     <Container style="margin-top: -100rpx;">
       <view class="list">
-        <view bind:tap="toNext" data-index="{{index}}" style="margin-bottom: 15rpx;" wx:for="{{list}}" wx:key="index">
+        <view class="item_bg" bind:tap="toNext" data-index="{{index}}" wx:for="{{list}}" wx:key="index">
           <view class="item">
-            <image wx:if="{{item.cover}}" src="{{item.cover}}" />
+            <image mode="aspectFit" class="item_image" wx:if="{{item.cover}}" src="{{item.cover}}" />
             <view class="title">{{item.title}}</view>
           </view>
           <image wx:if="{{index <= list.length - 1}}" class="image" src="../../images/Line.png" bindload="loadimge" style="{{'height:' + line_height + 'px'}}" />

+ 13 - 0
pages/previousEditions/index.wxss

@@ -25,6 +25,11 @@
   position: relative;
 }
 
+.item_image{
+  width: 100%;
+  height: 335rpx;
+}
+
 .list .title {
   color: #fff;
   position: absolute;
@@ -41,6 +46,14 @@
   text-overflow: ellipsis; /* 在超出内容的地方显示省略号 */  
 }
 
+.item_bg {
+  margin-bottom: 15rpx;
+}
+
+.item_bg:last-child{
+  margin-bottom: 0;
+}
+
 .image {
   width: 507rpx;
   display: block;

+ 34 - 1
pages/userData/index.js

@@ -5,7 +5,40 @@ Page({
    * 页面的初始数据
    */
   data: {
-
+    oriData: {
+      school: "第一小学",
+      add: "西安市XXX区XX街道XX路XX号",
+      teacher: "XXX",
+      phone: 18400000000,
+      num: 50
+    },
+    list: [{
+        works: "https://cxzx.smcic.net/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/R-C.jfif",
+        name: "张云翔",
+        birthday: "2015-03-03",
+        teacher: "李勇利",
+        school: "清华",
+        group: "少儿组",
+        lever: 1,
+        groupType: "国画组",
+        articleGroup: "书法",
+        articleName: "兰亭序",
+        articleDescribe: "展现了中国传统艺术的魅力。墨色浓淡相间,笔触流畅而有力,每一字之间形成和谐的整体。作品中融入了经典诗句,传递出深邃的哲理和人生感悟。每一个字都经过精心构思和书写,字体大小和间距恰到好处,整个作品看起来平衡而舒适。",
+      },
+      {
+        works: "https://cxzx.smcic.net/topic/tool/img/%E5%B0%91%E5%84%BF%E4%B9%A6%E7%94%BB%E5%A4%A7%E8%B5%9B/R-C.jfif",
+        name: "张云翔",
+        group: "少儿组",
+        lever: 2,
+        groupType: "国画组",
+        birthday: "2015-03-03",
+        teacher: "李勇利",
+        school: "清华",
+        articleGroup: "书法",
+        articleName: "兰亭序",
+        articleDescribe: "展现了中国传统艺术的魅力。墨色浓淡相间,笔触流畅而有力,每一字之间形成和谐的整体。作品中融入了经典诗句,传递出深邃的哲理和人生感悟。每一个字都经过精心构思和书写,字体大小和间距恰到好处,整个作品看起来平衡而舒适。",
+      }
+    ]
   },
 
   /**

+ 12 - 8
pages/userData/index.wxml

@@ -8,21 +8,21 @@
         </view>
         <van-row class="list">
           <van-col span="8">学校</van-col>
-          <van-col span="16" style="color:#555555">第一小学</van-col>
+          <van-col span="16" style="color:#555555">{{oriData.school}}</van-col>
         </van-row>
         <van-row class="list">
           <van-col span="8">地址</van-col>
-          <van-col span="16" style="color:#555555">西安市XXX区XX街道XX路XX号</van-col>
+          <van-col span="16" style="color:#555555">{{oriData.add}}</van-col>
         </van-row>
         <van-row class="list">
           <van-col span="8">指导老师</van-col>
-          <van-col span="16" style="color:#555555">xxx</van-col>
+          <van-col span="16" style="color:#555555">{{oriData.teacher}}</van-col>
         </van-row>
         <van-row class="list">
           <van-col span="8">电话</van-col>
-          <van-col span="16" style="color:#555555">1840000000</van-col>
+          <van-col span="16" style="color:#555555">{{oriData.phone}}</van-col>
         </van-row>
-        <view class="list" style="color:#555555">已成功报名50人</view>
+        <view class="list" style="color:#555555">已成功报名{{oriData.num}}人</view>
       </view>
       <view class="card">
         <view style="text-align: right;">
@@ -30,12 +30,16 @@
             <van-search right-icon value="{{ value }}" shape="round" placeholder="" />
           </view>
         </view>
-        <view class="list_bot">
+        <view class="list_bot" wx:for="{{list}}" wx:key="index">
           <image class="list_left" src="../../images/edit.png" />
           <view class="list_center">
-            <view>张XX</view>
+            <view>
+              {{item.name}}
+              <image wx:if="{{item.lever > 0}}" class="tag" src="../../images/tg.png" />
+              <image wx:if="{{item.lever > 1}}" class="tag" style="width: 67rpx;" src="../../images/jj.png" />
+            </view>
             <view style="color: #555;">
-              西安市第一小学 国画组 儿童组
+              {{item.school + " " + item.groupType + " " + item.group}}
             </view>
           </view>
           <image class="list_right" src="../../images/del.png" style="width: 29rpx;height: 29rpx;" />

+ 10 - 0
pages/userData/index.wxss

@@ -28,6 +28,16 @@
   align-items: center;
   justify-content: space-between;
   gap: 10px;
+  margin-bottom: 15rpx;
+}
+.list_bot:last-child{
+  margin-bottom: 0;
+}
+
+.tag {
+  width: 97rpx;
+  height: 20rpx;
+  margin-left: 5rpx;
 }
 
 .list_left {