Silent 6 年之前
父節點
當前提交
cfd18fc6d2
共有 2 個文件被更改,包括 5 次插入3 次删除
  1. 4 2
      wechat/pages/mycourse/mycourse.js
  2. 1 1
      wechat/pages/mycourse/mycourse.wxml

+ 4 - 2
wechat/pages/mycourse/mycourse.js

xqd xqd
@@ -4,7 +4,8 @@ var api = require('../../utils/api.js');
 
 Page({
   data: {
-    courseInfo: null
+    courseInfo: null,
+    is_new: true
   },
   onLoad: function () {
     let pt_student = wx.getStorageSync('pt_student')
@@ -17,7 +18,8 @@ Page({
       success: res => {
         if (res.data.status == 'success') {
           this.setData({
-            courseInfo: res.data.courseInfo
+            courseInfo: res.data.courseInfo,
+            is_new: res.data.is_new
           })
         }
       }

+ 1 - 1
wechat/pages/mycourse/mycourse.wxml

xqd
@@ -10,7 +10,7 @@
     </zan-cell>
     <zan-cell title="评价讲师" is-link url="/pages/rate/rate?course_name={{ courseInfo.course_name }}&teacher={{ courseInfo.teacher_names }}">
     <view slot="footer">
-      <text class="text-new">NEW</text>
+      <text class="text-new" wx:if="{{ is_new }}">NEW</text>
 
     </view> 
     </zan-cell>