liyongli преди 1 година
родител
ревизия
d1d2ad3905
променени са 5 файла, в които са добавени 12 реда и са изтрити 29 реда
  1. 2 2
      pages/downZS/index.js
  2. 3 24
      pages/expert/index.js
  3. 3 1
      pages/expert/index.wxml
  4. 2 1
      pages/previousEditions/index.json
  5. 2 1
      pages/previousEditions/index.wxml

+ 2 - 2
pages/downZS/index.js

@@ -45,9 +45,9 @@ Page({
         for (let i = 0; i < users.length; i++) {
           const v = users[i];
           ctx.drawImage(img, 0, 0, width, height);
-          ctx.fillStyle = "#91725D";
+          ctx.fillStyle = "#000000";
           ctx.font = (width / 20) + 'px 微软雅黑';
-          ctx.fillText(v.name, width * 0.33, height * 0.4);
+          ctx.fillText(v.name, width * 0.18, height * 0.4);
           wx.canvasToTempFilePath({
             x: 0,
             y: 0,

+ 3 - 24
pages/expert/index.js

@@ -8,34 +8,13 @@ Page({
    * 页面的初始数据
    */
   data: {
-    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: "清华",
-        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: "张云翔",
-        birthday: "2015-03-03",
-        teacher: "李勇利",
-        school: "清华",
-        articleGroup: "书法",
-        articleName: "兰亭序",
-        articleDescribe: "展现了中国传统艺术的魅力。墨色浓淡相间,笔触流畅而有力,每一字之间形成和谐的整体。作品中融入了经典诗句,传递出深邃的哲理和人生感悟。每一个字都经过精心构思和书写,字体大小和间距恰到好处,整个作品看起来平衡而舒适。",
-      }
-    ]
+    list: []
   },
   page: 1,
   size: 10,
   total: 0,
 
-  showimge(e){
+  showimge(e) {
     wx.previewImage({
       urls: [e.currentTarget.dataset.url],
     })
@@ -64,7 +43,7 @@ Page({
     })
   },
 
-  scrollbottom(){
+  scrollbottom() {
     this.getData();
   },
   /**

+ 3 - 1
pages/expert/index.wxml

@@ -3,10 +3,12 @@
   <view class="list_item" wx:for="{{list}}" wx:key="index">
     <Container>
       <view class="row">
-        <image bind:tap="showimge" src="{{item.works}}" data-url="{{item.works}}" mode="aspectFit" class="col-d"></image>
+        <image bind:tap="showimge" src="{{item.articleUrl}}" data-url="{{item.articleUrl}}" mode="aspectFit" class="col-d"></image>
         <view class="col">
           <view>姓名:{{item.name}}</view>
+          <view>{{item.birthday}}</view>
           <view>指导老师:{{item.teacher}}</view>
+          <view>组别:{{item.articleGroup}}</view>
           <view>作品名称:{{item.articleName}}</view>
           <view>作品简介:{{item.articleDescribe}}</view>
           <view class="zuopin_gongju_tool">

+ 2 - 1
pages/previousEditions/index.json

@@ -1,6 +1,7 @@
 {
   "navigationBarTitleText": "往届",
   "usingComponents": {
-    "Container": "../../component/container/index"
+    "Container": "../../component/container/index",
+    "van-empty": "@vant/weapp/empty/index"
   }
 }

+ 2 - 1
pages/previousEditions/index.wxml

@@ -2,7 +2,7 @@
 <scroll-view class="scrollarea" scroll-y type="list">
   <view class="index_main">
     <Container style="margin-top: -100rpx;">
-      <view class="list">
+      <view class="list" wx:if="{{list.length}}">
         <view class="item_bg" bind:tap="toNext" data-index="{{index}}" wx:for="{{list}}" wx:key="index">
           <view class="item">
             <image mode="aspectFit" class="item_image" wx:if="{{item.cover}}" src="{{item.cover}}" />
@@ -11,6 +11,7 @@
           <image wx:if="{{index <= list.length - 1}}" class="image" src="../../images/Line.png" bindload="loadimge" style="{{'height:' + line_height + 'px'}}" />
         </view>
       </view>
+      <van-empty description="暂无数据" wx:else />
     </Container>
   </view>
 </scroll-view>