liyongli hai 1 ano
pai
achega
339c5985b1

+ 0 - 1
pages/admin/index.wxml

@@ -8,7 +8,6 @@
       <view>学校:{{item.school}}</view>
       <view>指导老师:{{item.teacher}}</view>
       <view>指导老师电话:{{item.teacherPhone}}</view>
-      <view wx:if="{{item.message}}" class="jj_content" style="-webkit-line-clamp: 5;">上次拒绝原因:{{item.teacherPhone}}</view>
       <view class="jj_content">{{item.articleDescribe}}</view>
       <view class="zuopin_gongju_tool">
         <view class="zuopin_gongju_item">

+ 33 - 1
pages/expert/index.js

@@ -1,4 +1,7 @@
 // pages/expert/index.js
+import {
+  ajax
+} from "../../utils/util";
 Page({
 
   /**
@@ -28,6 +31,9 @@ Page({
       }
     ]
   },
+  page: 1,
+  size: 10,
+  total: 0,
 
   showimge(e){
     wx.previewImage({
@@ -35,11 +41,37 @@ Page({
     })
   },
 
+  getData() {
+    ajax({
+      urlType: "apiurl",
+      api: "/article/list-audit",
+      method: "post",
+      data: {
+        page: this.page,
+        size: this.size
+      }
+    }).then(res => {
+      if (res.code !== 0) return wx.showToast({
+        title: '请求失败',
+        icon: "none"
+      })
+      const data = res.data || {};
+      data.data.length && (this.page += 1);
+      this.total = data.total;
+      this.setData({
+        list: [...this.data.list, ...data.data]
+      })
+    })
+  },
+
+  scrollbottom(){
+    this.getData();
+  },
   /**
    * 生命周期函数--监听页面加载
    */
   onLoad(options) {
-
+    this.getData();
   },
 
   /**

+ 20 - 18
pages/expert/index.wxml

@@ -1,22 +1,24 @@
 <!--pages/expert/index.wxml-->
-<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>
-      <view class="col">
-        <view>姓名:{{item.name}}</view>
-        <view>指导老师:{{item.teacher}}</view>
-        <view>作品名称:{{item.articleName}}</view>
-        <view>作品简介:{{item.articleDescribe}}</view>
-        <view class="zuopin_gongju_tool">
-          <view class="zuopin_gongju_item">
-            <view class="zuopin_gongju_btn zuopin_gongju_btn_err">通过</view>
-          </view>
-          <view class="zuopin_gongju_item">
-            <view class="zuopin_gongju_btn">拒绝</view>
+<scroll-view 	scroll-y="{{true}}" bindscrolltolower="scrollbottom">
+  <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>
+        <view class="col">
+          <view>姓名:{{item.name}}</view>
+          <view>指导老师:{{item.teacher}}</view>
+          <view>作品名称:{{item.articleName}}</view>
+          <view>作品简介:{{item.articleDescribe}}</view>
+          <view class="zuopin_gongju_tool">
+            <view class="zuopin_gongju_item">
+              <view class="zuopin_gongju_btn zuopin_gongju_btn_err">晋级</view>
+            </view>
+            <view class="zuopin_gongju_item">
+              <view class="zuopin_gongju_btn">未晋级</view>
+            </view>
           </view>
         </view>
       </view>
-    </view>
-  </Container>
-</view>
+    </Container>
+  </view>
+</scroll-view>

+ 2 - 0
pages/us/index.js

@@ -9,6 +9,7 @@ Page({
   data: {
     userUrl: wx.getStorageSync('userUrl') || '',
     phone: wx.getStorageSync('phone') || '',
+    userGroup: wx.getStorageSync('userGroup') || '',
     baseUrl: __wxConfig.accountInfo.icon || ""
   },
   getphone(e) {
@@ -21,6 +22,7 @@ Page({
         icon: 'none'
       })
       wx.setStorageSync('token', res.data.token);
+      wx.setStorageSync('userGroup', res.data.userGroup);
       wx.setStorageSync('phone', res.data.phoneInfo.phoneNumber);
       this.setData({
         phone: res.data.phoneInfo.phoneNumber

+ 2 - 2
pages/us/index.wxml

@@ -18,13 +18,13 @@
           证书下载
         </view>
       </van-cell>
-      <van-cell is-link url="/pages/expert/index" border="{{ false }}" >
+      <van-cell wx:if="{{userGroup === 'Expert'}}" is-link url="/pages/expert/index" border="{{ false }}" >
         <view slot="title" class="title">
           <image src="../../images/expert.png" class="icon" />
           专家评审
         </view>
       </van-cell>
-      <van-cell is-link url="/pages/admin/index" border="{{ false }}" >
+      <van-cell wx:if="{{userGroup === 'Administrator'}}" is-link url="/pages/admin/index" border="{{ false }}" >
         <view slot="title" class="title">
           <image src="../../images/shgl.png" class="icon" />
           管理员审核

+ 13 - 1
project.private.config.json

@@ -5,5 +5,17 @@
     "compileHotReLoad": true,
     "urlCheck": true
   },
-  "condition": {}
+  "condition": {
+    "miniprogram": {
+      "list": [
+        {
+          "name": "pages/expert/index",
+          "pathName": "pages/expert/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        }
+      ]
+    }
+  }
 }