Sfoglia il codice sorgente

试卷状态修改完成

Your Name 3 mesi fa
parent
commit
078b65346a
4 ha cambiato i file con 68 aggiunte e 58 eliminazioni
  1. 4 2
      pages/online/online.js
  2. 1 1
      pages/online/online.wxml
  3. 13 5
      pages/subject/subject.js
  4. 50 50
      project.config.json

+ 4 - 2
pages/online/online.js

@@ -24,10 +24,12 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    console.log(options,33333333333)
     if (options.id){
       this.setData({
         signup_id: options.id,
-        class_id: options.class_id
+        class_id: options.class_id,
+        order_id:options.order_id
       })
     }
     this.setData({
@@ -129,7 +131,7 @@ Page({
       success:res=>{
         
         let video = res.data.data.videos, papers = res.data.data.papers;
-        let flag1=1,flag=1;
+        let flag1=1,flag2=1;
         var video_ids=[],paper_ids=[]
         for(let i=0;i<video.length;i++){
           video_ids.push(video[i].id)

+ 1 - 1
pages/online/online.wxml

@@ -28,7 +28,7 @@
       </view>
     </picker>
   </view> -->
-    <navigator  class="test"  wx:for="{{papers}}" wx:key="*this" url="../subject/subject?id={{item.id}}&status={{item.status}}">
+    <navigator  class="test"  wx:for="{{papers}}" wx:key="*this" url="../subject/subject?id={{item.id}}&status={{item.status}}&class_id={{class_id}}&order_id={{order_id}}">
         <view class="title">{{item.title}}</view>
         <text>{{item.class_hour}}学时/{{item.full_mark}}分/{{item.time_limit}}分钟</text>
         <view class="score" wx:if='{{item.status == 1}}'>

+ 13 - 5
pages/subject/subject.js

@@ -27,16 +27,21 @@ Page({
     // options.status=1
       wx.request({
         url: host+'/api/wx/paper/info',
-        data: { id: options.id},
+        data: { id: options.id,order_id:options.order_id},
+        header: {
+          openid: app.globalData.openid
+        },
         method:'GET',
         success:res=>{
           this.setData({
             data:res.data.data,
             id:options.id,
-            status:options.status,
-            time:res.data.data.time_limit
+            status:res.data.data.mark_status,
+            time:res.data.data.time_limit,
+            class_id:options.class_id,
+            order_id:options.order_id
           })
-          if(options.status == 1) return
+          if(this.data.mark_status == 1) return
           this.countDown(res.data.data.time_limit)
         }
       })
@@ -167,6 +172,9 @@ Page({
               paper_id: _this.data.id,
               questions: _this.data.ans
             },
+            header: {
+              openid: app.globalData.openid
+            },
             method: 'POST',
             success: res => {
               console.log(res.data)
@@ -178,7 +186,7 @@ Page({
                   success(res) {
                     if (res.confirm) {
                       wx.navigateTo({
-                        url: '../online/online?tab=1',
+                        url: '../online/online?tab=1&class_id='+_this.data.class_id+'&id=1'+_this.data.order_id,
                       })
                     }
                   }

+ 50 - 50
project.config.json

@@ -1,52 +1,52 @@
 {
-  "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
-  "packOptions": {
-    "ignore": [],
-    "include": []
-  },
-  "setting": {
-    "urlCheck": true,
-    "es6": true,
-    "postcss": true,
-    "preloadBackgroundData": false,
-    "minified": true,
-    "newFeature": true,
-    "coverView": true,
-    "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
-    "scopeDataCheck": false,
-    "checkInvalidKey": true,
-    "checkSiteMap": true,
-    "uploadWithSourceMap": true,
-    "babelSetting": {
-      "ignore": [],
-      "disablePlugins": [],
-      "outputPath": ""
-    },
-    "useCompilerModule": false,
-    "userConfirmedUseCompilerModuleSwitch": false,
-    "lazyloadPlaceholderEnable": false,
-    "uglifyFileName": false,
-    "enhance": true,
-    "useMultiFrameRuntime": true,
-    "packNpmManually": false,
-    "packNpmRelationList": [],
-    "minifyWXSS": true,
-    "useStaticServer": true,
-    "showES6CompileOption": false,
-    "disableUseStrict": false,
-    "useCompilerPlugins": false,
-    "minifyWXML": true
-  },
-  "compileType": "miniprogram",
-  "libVersion": "2.11.0",
-  "appid": "wxd417822087cf4573",
-  "projectname": "yifeng",
-  "simulatorType": "wechat",
-  "simulatorPluginLibVersion": {},
-  "condition": {},
-  "editorSetting": {
-    "tabIndent": "insertSpaces",
-    "tabSize": 2
-  }
+	"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
+	"packOptions": {
+		"ignore": [],
+		"include": []
+	},
+	"setting": {
+		"urlCheck": true,
+		"es6": true,
+		"postcss": true,
+		"preloadBackgroundData": false,
+		"minified": true,
+		"newFeature": true,
+		"coverView": true,
+		"autoAudits": false,
+		"showShadowRootInWxmlPanel": true,
+		"scopeDataCheck": false,
+		"checkInvalidKey": true,
+		"checkSiteMap": true,
+		"uploadWithSourceMap": true,
+		"babelSetting": {
+			"ignore": [],
+			"disablePlugins": [],
+			"outputPath": ""
+		},
+		"useCompilerModule": false,
+		"userConfirmedUseCompilerModuleSwitch": false,
+		"lazyloadPlaceholderEnable": false,
+		"uglifyFileName": false,
+		"enhance": true,
+		"useMultiFrameRuntime": true,
+		"packNpmManually": false,
+		"packNpmRelationList": [],
+		"minifyWXSS": true,
+		"useStaticServer": true,
+		"showES6CompileOption": false,
+		"disableUseStrict": false,
+		"useCompilerPlugins": false,
+		"minifyWXML": true
+	},
+	"compileType": "miniprogram",
+	"libVersion": "2.11.0",
+	"appid": "wxd417822087cf4573",
+	"projectname": "yifeng",
+	"simulatorType": "wechat",
+	"simulatorPluginLibVersion": {},
+	"editorSetting": {
+		"tabIndent": "insertSpaces",
+		"tabSize": 2
+	},
+	"condition": {}
 }