Browse Source

update

1. uni-app  考试列表增加关联培训,  考试详情增加跳转培训操作.  课件列表上增加学习进度显示,  app.vue中增加静默登录操作.
2. vue 中考试试卷设置中  限制考试时间开关默认打开, 并默认设置3天.  调整timymce编辑器中 粘贴word格式不保留的问题.  考培档案中增加表格排序项, 及调整季度按钮传参不正确的问提.
moccus 2 years ago
parent
commit
2a3c3575cf

+ 49 - 19
exam-06173-uni/App.vue

@@ -1,39 +1,69 @@
 <script>
+	import {
+		login
+	} from '@/api/user.js'
+	import md5 from 'js-md5'
 	export default {
-		onLaunch: function() {
-			
+		onLoad: function(option) {
+			if(option && option.user){
+				this.getUserInfo({
+					smsCode: "",
+					captchaKey: "",
+					captchaValue: "",
+					username: option.user,
+					password: "",
+					mark: ""
+				}).then(res => {
+					if(this.loginCallBack){
+						this.loginCallBack()
+					}
+				})
+			}
 		},
 		onShow: function() {
-			
+
 		},
 		onHide: function() {
-			
+
+		},
+		methods: {
+			getUserInfo(params) {
+				return new Promise((resolve, reject) => {
+					login({
+						...params,
+						mark: md5(params.username + 'gdnxfdexam321')
+					}).then(res => {
+						// 保存本地token
+						uni.setStorageSync('token', res.token);
+						resolve(res)
+					}).catch(err => {
+						reject(err)
+					})
+				})
+			}
 		}
 	}
-	
 </script>
 
 <style lang="scss">
-
-	
 	/* uni.css - 通用组件、模板样式库,可以当作一套ui库应用 */
 	@import './style/uni.css';
-	
-	
+
+
 	/* 考试相关样式 */
-	@import './style/style.css';	
-	
-	
-	
+	@import './style/style.css';
+
+
+
 	/* 重写样式 */
-	.uni-load-more__text{
+	.uni-load-more__text {
 		font-size: 14px !important;
 	}
-	
-	
-	
-	
-	
+
+
+
+
+
 	.page-box {
 		padding: 20px;
 		font-size: 14px;

+ 4 - 2
exam-06173-uni/common/config.js

@@ -5,8 +5,10 @@ let urls = {
 
 if(process.env.NODE_ENV === 'development'){
     // 开发环境
-    urls.api = 'http://localhost:8617'
-    urls.socket = 'ws://localhost:8617'
+    // urls.api = 'http://localhost:8617'
+    // urls.socket = 'ws://localhost:8617'
+	urls.api = 'http://124.70.18.168:8617'
+	urls.socket = 'ws://124.70.18.168:8617'
 }else{
     // t2预发布环境
     // urls.api = 'https://t2-api.jeegen.com'

+ 101 - 0
exam-06173-uni/node_modules/js-md5/CHANGELOG.md

@@ -0,0 +1,101 @@
+# Change Log
+
+## v0.7.3 / 2017-12-18
+### Fixed
+- incorrect result when first bit is 1 of bytes. #18
+
+## v0.7.2 / 2017-10-31
+### Improved
+- performance of hBytes increment.
+
+## v0.7.1 / 2017-10-29
+### Fixed
+- incorrect result when file size >= 4G.
+
+## v0.7.0 / 2017-10-29
+### Fixed
+- incorrect result when file size >= 512M.
+
+## v0.6.1 / 2017-10-07
+### Fixed
+- ArrayBuffer.isView issue in IE10.
+
+### Improved
+- performance of input check.
+
+## v0.6.0 / 2017-07-28
+### Added
+- support base64 string output.
+
+## v0.5.0 / 2017-07-14
+### Added
+- support for web worker. #11
+
+### Changed
+- throw error if input type is incorrect.
+- prevent webpack to require dependencies.
+
+## v0.4.2 / 2017-01-18
+### Fixed
+- `root` is undefined in some special environment. #7
+
+## v0.4.1 / 2016-03-31
+### Removed
+- length detection in node.js.
+### Deprecated
+- `buffer` and replace by `arrayBuffer`.
+
+## v0.4.0 / 2015-12-28
+### Added
+- support for update hash.
+- support for bytes array output.
+- support for ArrayBuffer output.
+- support for AMD.
+
+## v0.3.0 / 2015-03-07
+### Added
+- support byte Array, Uint8Array and ArrayBuffer input.
+
+## v0.2.2 / 2015-02-01
+### Fixed
+- bug when special length.
+### Improve
+- performance for node.js.
+
+## v0.2.1 / 2015-01-13
+### Improve
+- performance.
+
+## v0.2.0 / 2015-01-12
+### Removed
+- ascii parameter.
+### Improve
+- performance.
+
+## v0.1.4 / 2015-01-11
+### Improve
+- performance.
+### Added
+- test cases.
+
+## v0.1.3 / 2015-01-05
+### Added
+- bower package.
+- travis.
+- coveralls.
+### Improved
+- performance.
+### Fixed
+- JSHint warnings.
+
+## v0.1.2 / 2014-07-27
+### Fixed
+- accents bug
+
+## v0.1.1 / 2014-01-05
+### Changed
+- license
+
+## v0.1.0 / 2014-01-04
+### Added
+- initial release

+ 20 - 0
exam-06173-uni/node_modules/js-md5/LICENSE.txt

@@ -0,0 +1,20 @@
+Copyright 2014-2017 Chen, Yi-Cyuan
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 76 - 0
exam-06173-uni/node_modules/js-md5/README.md

@@ -0,0 +1,76 @@
+# js-md5
+[![Build Status](https://travis-ci.org/emn178/js-md5.svg?branch=master)](https://travis-ci.org/emn178/js-md5)
+[![Coverage Status](https://coveralls.io/repos/emn178/js-md5/badge.svg?branch=master)](https://coveralls.io/r/emn178/js-md5?branch=master)  
+[![NPM](https://nodei.co/npm/js-md5.png?stars&downloads)](https://nodei.co/npm/js-md5/)
+
+A simple MD5 hash function for JavaScript supports UTF-8 encoding.
+
+## Demo
+[MD5 Online](http://emn178.github.io/online-tools/md5.html)  
+[MD5 File Checksum Online](http://emn178.github.io/online-tools/md5_checksum.html)
+
+## Download
+[Compress](https://raw.github.com/emn178/js-md5/master/build/md5.min.js)  
+[Uncompress](https://raw.github.com/emn178/js-md5/master/src/md5.js)
+
+## Installation
+You can also install js-md5 by using Bower.
+
+    bower install md5
+
+For node.js, you can use this command to install:
+
+    npm install js-md5
+
+## Notice
+`buffer` method is deprecated. This maybe confuse with Buffer in node.js. Please use `arrayBuffer` instead.
+
+## Usage
+You could use like this:
+```JavaScript
+md5('Message to hash');
+var hash = md5.create();
+hash.update('Message to hash');
+hash.hex();
+```
+If you use node.js, you should require the module first:
+```JavaScript
+md5 = require('js-md5');
+```
+It supports AMD:
+```JavaScript
+require(['your/path/md5.js'], function(md5) {
+// ...
+});
+```
+[See document](https://emn178.github.com/js-md5/doc/)
+
+## Example
+```JavaScript
+md5(''); // d41d8cd98f00b204e9800998ecf8427e
+md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
+md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
+
+// It also supports UTF-8 encoding
+md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
+
+// It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
+md5([]); // d41d8cd98f00b204e9800998ecf8427e
+md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
+
+// Different output
+md5(''); // d41d8cd98f00b204e9800998ecf8427e
+md5.hex(''); // d41d8cd98f00b204e9800998ecf8427e
+md5.array(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
+md5.digest(''); // [212, 29, 140, 217, 143, 0, 178, 4, 233, 128, 9, 152, 236, 248, 66, 126]
+md5.arrayBuffer(''); // ArrayBuffer
+md5.buffer(''); // ArrayBuffer, deprecated, This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+md5.base64(''); // 1B2M2Y8AsgTpgAmY7PhCfg==
+```
+
+## License
+The project is released under the [MIT license](http://www.opensource.org/licenses/MIT).
+
+## Contact
+The project's website is located at https://github.com/emn178/js-md5  
+Author: Chen, Yi-Cyuan (emn178@gmail.com)

File diff suppressed because it is too large
+ 10 - 0
exam-06173-uni/node_modules/js-md5/build/md5.min.js


+ 45 - 0
exam-06173-uni/node_modules/js-md5/package.json

@@ -0,0 +1,45 @@
+{
+  "name": "js-md5",
+  "version": "0.7.3",
+  "description": "A simple MD5 hash function for JavaScript supports UTF-8 encoding.",
+  "main": "src/md5.js",
+  "devDependencies": {
+    "expect.js": "~0.3.1",
+    "jsdoc": "^3.4.0",
+    "mocha": "~2.3.4",
+    "nyc": "^11.3.0",
+    "requirejs": "^2.1.22",
+    "uglify-js": "^3.1.9",
+    "webworker-threads": "^0.7.11"
+  },
+  "scripts": {
+    "test": "nyc mocha tests/node-test.js",
+    "report": "nyc --reporter=html --reporter=text mocha tests/node-test.js",
+    "coveralls": "nyc report --reporter=text-lcov | coveralls",
+    "doc": "rm -rf doc;jsdoc src README.md -d doc",
+    "compress": "uglifyjs src/md5.js -c -m eval --comments --output build/md5.min.js",
+    "build": "npm run-script compress;npm run-script doc"
+  },
+  "repository": {
+    "type": "git",
+    "url": "https://github.com/emn178/js-md5.git"
+  },
+  "keywords": [
+    "md5",
+    "hash",
+    "encryption",
+    "cryptography",
+    "HMAC"
+  ],
+  "license": "MIT",
+  "author": "Chen, Yi-Cyuan <emn178@gmail.com>",
+  "homepage": "https://github.com/emn178/js-md5",
+  "bugs": {
+    "url": "https://github.com/emn178/js-md5/issues"
+  },
+  "nyc": {
+    "exclude": [
+      "tests"
+    ]
+  }
+}

+ 683 - 0
exam-06173-uni/node_modules/js-md5/src/md5.js

@@ -0,0 +1,683 @@
+/**
+ * [js-md5]{@link https://github.com/emn178/js-md5}
+ *
+ * @namespace md5
+ * @version 0.7.3
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
+ * @copyright Chen, Yi-Cyuan 2014-2017
+ * @license MIT
+ */
+(function () {
+  'use strict';
+
+  var ERROR = 'input is invalid type';
+  var WINDOW = typeof window === 'object';
+  var root = WINDOW ? window : {};
+  if (root.JS_MD5_NO_WINDOW) {
+    WINDOW = false;
+  }
+  var WEB_WORKER = !WINDOW && typeof self === 'object';
+  var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
+  if (NODE_JS) {
+    root = global;
+  } else if (WEB_WORKER) {
+    root = self;
+  }
+  var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
+  var AMD = typeof define === 'function' && define.amd;
+  var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
+  var HEX_CHARS = '0123456789abcdef'.split('');
+  var EXTRA = [128, 32768, 8388608, -2147483648];
+  var SHIFT = [0, 8, 16, 24];
+  var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
+  var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+  var blocks = [], buffer8;
+  if (ARRAY_BUFFER) {
+    var buffer = new ArrayBuffer(68);
+    buffer8 = new Uint8Array(buffer);
+    blocks = new Uint32Array(buffer);
+  }
+
+  if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
+    Array.isArray = function (obj) {
+      return Object.prototype.toString.call(obj) === '[object Array]';
+    };
+  }
+
+  if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
+    ArrayBuffer.isView = function (obj) {
+      return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
+    };
+  }
+
+  /**
+   * @method hex
+   * @memberof md5
+   * @description Output hash as hex string
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {String} Hex string
+   * @example
+   * md5.hex('The quick brown fox jumps over the lazy dog');
+   * // equal to
+   * md5('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method digest
+   * @memberof md5
+   * @description Output hash as bytes array
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Array} Bytes array
+   * @example
+   * md5.digest('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method array
+   * @memberof md5
+   * @description Output hash as bytes array
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Array} Bytes array
+   * @example
+   * md5.array('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method arrayBuffer
+   * @memberof md5
+   * @description Output hash as ArrayBuffer
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @example
+   * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method buffer
+   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+   * @memberof md5
+   * @description Output hash as ArrayBuffer
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @example
+   * md5.buffer('The quick brown fox jumps over the lazy dog');
+   */
+  /**
+   * @method base64
+   * @memberof md5
+   * @description Output hash as base64 string
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {String} base64 string
+   * @example
+   * md5.base64('The quick brown fox jumps over the lazy dog');
+   */
+  var createOutputMethod = function (outputType) {
+    return function (message) {
+      return new Md5(true).update(message)[outputType]();
+    };
+  };
+
+  /**
+   * @method create
+   * @memberof md5
+   * @description Create Md5 object
+   * @returns {Md5} Md5 object.
+   * @example
+   * var hash = md5.create();
+   */
+  /**
+   * @method update
+   * @memberof md5
+   * @description Create and update Md5 object
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Md5} Md5 object.
+   * @example
+   * var hash = md5.update('The quick brown fox jumps over the lazy dog');
+   * // equal to
+   * var hash = md5.create();
+   * hash.update('The quick brown fox jumps over the lazy dog');
+   */
+  var createMethod = function () {
+    var method = createOutputMethod('hex');
+    if (NODE_JS) {
+      method = nodeWrap(method);
+    }
+    method.create = function () {
+      return new Md5();
+    };
+    method.update = function (message) {
+      return method.create().update(message);
+    };
+    for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
+      var type = OUTPUT_TYPES[i];
+      method[type] = createOutputMethod(type);
+    }
+    return method;
+  };
+
+  var nodeWrap = function (method) {
+    var crypto = eval("require('crypto')");
+    var Buffer = eval("require('buffer').Buffer");
+    var nodeMethod = function (message) {
+      if (typeof message === 'string') {
+        return crypto.createHash('md5').update(message, 'utf8').digest('hex');
+      } else {
+        if (message === null || message === undefined) {
+          throw ERROR;
+        } else if (message.constructor === ArrayBuffer) {
+          message = new Uint8Array(message);
+        }
+      }
+      if (Array.isArray(message) || ArrayBuffer.isView(message) ||
+        message.constructor === Buffer) {
+        return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
+      } else {
+        return method(message);
+      }
+    };
+    return nodeMethod;
+  };
+
+  /**
+   * Md5 class
+   * @class Md5
+   * @description This is internal class.
+   * @see {@link md5.create}
+   */
+  function Md5(sharedMemory) {
+    if (sharedMemory) {
+      blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+      this.blocks = blocks;
+      this.buffer8 = buffer8;
+    } else {
+      if (ARRAY_BUFFER) {
+        var buffer = new ArrayBuffer(68);
+        this.buffer8 = new Uint8Array(buffer);
+        this.blocks = new Uint32Array(buffer);
+      } else {
+        this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+      }
+    }
+    this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
+    this.finalized = this.hashed = false;
+    this.first = true;
+  }
+
+  /**
+   * @method update
+   * @memberof Md5
+   * @instance
+   * @description Update hash
+   * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+   * @returns {Md5} Md5 object.
+   * @see {@link md5.update}
+   */
+  Md5.prototype.update = function (message) {
+    if (this.finalized) {
+      return;
+    }
+
+    var notString, type = typeof message;
+    if (type !== 'string') {
+      if (type === 'object') {
+        if (message === null) {
+          throw ERROR;
+        } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
+          message = new Uint8Array(message);
+        } else if (!Array.isArray(message)) {
+          if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
+            throw ERROR;
+          }
+        }
+      } else {
+        throw ERROR;
+      }
+      notString = true;
+    }
+    var code, index = 0, i, length = message.length, blocks = this.blocks;
+    var buffer8 = this.buffer8;
+
+    while (index < length) {
+      if (this.hashed) {
+        this.hashed = false;
+        blocks[0] = blocks[16];
+        blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+        blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+        blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+        blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+      }
+
+      if (notString) {
+        if (ARRAY_BUFFER) {
+          for (i = this.start; index < length && i < 64; ++index) {
+            buffer8[i++] = message[index];
+          }
+        } else {
+          for (i = this.start; index < length && i < 64; ++index) {
+            blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
+          }
+        }
+      } else {
+        if (ARRAY_BUFFER) {
+          for (i = this.start; index < length && i < 64; ++index) {
+            code = message.charCodeAt(index);
+            if (code < 0x80) {
+              buffer8[i++] = code;
+            } else if (code < 0x800) {
+              buffer8[i++] = 0xc0 | (code >> 6);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            } else if (code < 0xd800 || code >= 0xe000) {
+              buffer8[i++] = 0xe0 | (code >> 12);
+              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            } else {
+              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+              buffer8[i++] = 0xf0 | (code >> 18);
+              buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);
+              buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+              buffer8[i++] = 0x80 | (code & 0x3f);
+            }
+          }
+        } else {
+          for (i = this.start; index < length && i < 64; ++index) {
+            code = message.charCodeAt(index);
+            if (code < 0x80) {
+              blocks[i >> 2] |= code << SHIFT[i++ & 3];
+            } else if (code < 0x800) {
+              blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            } else if (code < 0xd800 || code >= 0xe000) {
+              blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            } else {
+              code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+              blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+              blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+            }
+          }
+        }
+      }
+      this.lastByteIndex = i;
+      this.bytes += i - this.start;
+      if (i >= 64) {
+        this.start = i - 64;
+        this.hash();
+        this.hashed = true;
+      } else {
+        this.start = i;
+      }
+    }
+    if (this.bytes > 4294967295) {
+      this.hBytes += this.bytes / 4294967296 << 0;
+      this.bytes = this.bytes % 4294967296;
+    }
+    return this;
+  };
+
+  Md5.prototype.finalize = function () {
+    if (this.finalized) {
+      return;
+    }
+    this.finalized = true;
+    var blocks = this.blocks, i = this.lastByteIndex;
+    blocks[i >> 2] |= EXTRA[i & 3];
+    if (i >= 56) {
+      if (!this.hashed) {
+        this.hash();
+      }
+      blocks[0] = blocks[16];
+      blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+      blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+      blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+      blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+    }
+    blocks[14] = this.bytes << 3;
+    blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
+    this.hash();
+  };
+
+  Md5.prototype.hash = function () {
+    var a, b, c, d, bc, da, blocks = this.blocks;
+
+    if (this.first) {
+      a = blocks[0] - 680876937;
+      a = (a << 7 | a >>> 25) - 271733879 << 0;
+      d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
+      d = (d << 12 | d >>> 20) + a << 0;
+      c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
+      c = (c << 17 | c >>> 15) + d << 0;
+      b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
+      b = (b << 22 | b >>> 10) + c << 0;
+    } else {
+      a = this.h0;
+      b = this.h1;
+      c = this.h2;
+      d = this.h3;
+      a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
+      a = (a << 7 | a >>> 25) + b << 0;
+      d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
+      d = (d << 12 | d >>> 20) + a << 0;
+      c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
+      c = (c << 17 | c >>> 15) + d << 0;
+      b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
+      b = (b << 22 | b >>> 10) + c << 0;
+    }
+
+    a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
+    a = (a << 7 | a >>> 25) + b << 0;
+    d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
+    d = (d << 12 | d >>> 20) + a << 0;
+    c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
+    c = (c << 17 | c >>> 15) + d << 0;
+    b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
+    b = (b << 22 | b >>> 10) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
+    b = (b << 20 | b >>> 12) + c << 0;
+    a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
+    a = (a << 5 | a >>> 27) + b << 0;
+    d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
+    d = (d << 9 | d >>> 23) + a << 0;
+    c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
+    c = (c << 14 | c >>> 18) + d << 0;
+    b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
+    b = (b << 20 | b >>> 12) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[5] - 378558;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[8] - 2022574463;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[11] + 1839030562;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[14] - 35309556;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[1] - 1530992060;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[4] + 1272893353;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[7] - 155497632;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[10] - 1094730640;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[13] + 681279174;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[0] - 358537222;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[3] - 722521979;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[6] + 76029189;
+    b = (b << 23 | b >>> 9) + c << 0;
+    bc = b ^ c;
+    a += (bc ^ d) + blocks[9] - 640364487;
+    a = (a << 4 | a >>> 28) + b << 0;
+    d += (bc ^ a) + blocks[12] - 421815835;
+    d = (d << 11 | d >>> 21) + a << 0;
+    da = d ^ a;
+    c += (da ^ b) + blocks[15] + 530742520;
+    c = (c << 16 | c >>> 16) + d << 0;
+    b += (da ^ c) + blocks[2] - 995338651;
+    b = (b << 23 | b >>> 9) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[0] - 198630844;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[5] - 57434055;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[10] - 1051523;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[15] - 30611744;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
+    b = (b << 21 | b >>> 11) + c << 0;
+    a += (c ^ (b | ~d)) + blocks[4] - 145523070;
+    a = (a << 6 | a >>> 26) + b << 0;
+    d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
+    d = (d << 10 | d >>> 22) + a << 0;
+    c += (a ^ (d | ~b)) + blocks[2] + 718787259;
+    c = (c << 15 | c >>> 17) + d << 0;
+    b += (d ^ (c | ~a)) + blocks[9] - 343485551;
+    b = (b << 21 | b >>> 11) + c << 0;
+
+    if (this.first) {
+      this.h0 = a + 1732584193 << 0;
+      this.h1 = b - 271733879 << 0;
+      this.h2 = c - 1732584194 << 0;
+      this.h3 = d + 271733878 << 0;
+      this.first = false;
+    } else {
+      this.h0 = this.h0 + a << 0;
+      this.h1 = this.h1 + b << 0;
+      this.h2 = this.h2 + c << 0;
+      this.h3 = this.h3 + d << 0;
+    }
+  };
+
+  /**
+   * @method hex
+   * @memberof Md5
+   * @instance
+   * @description Output hash as hex string
+   * @returns {String} Hex string
+   * @see {@link md5.hex}
+   * @example
+   * hash.hex();
+   */
+  Md5.prototype.hex = function () {
+    this.finalize();
+
+    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+
+    return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
+      HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
+      HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
+      HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
+      HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
+      HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
+      HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
+      HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
+      HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
+      HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
+      HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
+      HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
+      HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
+      HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
+      HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
+      HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
+  };
+
+  /**
+   * @method toString
+   * @memberof Md5
+   * @instance
+   * @description Output hash as hex string
+   * @returns {String} Hex string
+   * @see {@link md5.hex}
+   * @example
+   * hash.toString();
+   */
+  Md5.prototype.toString = Md5.prototype.hex;
+
+  /**
+   * @method digest
+   * @memberof Md5
+   * @instance
+   * @description Output hash as bytes array
+   * @returns {Array} Bytes array
+   * @see {@link md5.digest}
+   * @example
+   * hash.digest();
+   */
+  Md5.prototype.digest = function () {
+    this.finalize();
+
+    var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+    return [
+      h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF,
+      h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF,
+      h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF,
+      h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF
+    ];
+  };
+
+  /**
+   * @method array
+   * @memberof Md5
+   * @instance
+   * @description Output hash as bytes array
+   * @returns {Array} Bytes array
+   * @see {@link md5.array}
+   * @example
+   * hash.array();
+   */
+  Md5.prototype.array = Md5.prototype.digest;
+
+  /**
+   * @method arrayBuffer
+   * @memberof Md5
+   * @instance
+   * @description Output hash as ArrayBuffer
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @see {@link md5.arrayBuffer}
+   * @example
+   * hash.arrayBuffer();
+   */
+  Md5.prototype.arrayBuffer = function () {
+    this.finalize();
+
+    var buffer = new ArrayBuffer(16);
+    var blocks = new Uint32Array(buffer);
+    blocks[0] = this.h0;
+    blocks[1] = this.h1;
+    blocks[2] = this.h2;
+    blocks[3] = this.h3;
+    return buffer;
+  };
+
+  /**
+   * @method buffer
+   * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+   * @memberof Md5
+   * @instance
+   * @description Output hash as ArrayBuffer
+   * @returns {ArrayBuffer} ArrayBuffer
+   * @see {@link md5.buffer}
+   * @example
+   * hash.buffer();
+   */
+  Md5.prototype.buffer = Md5.prototype.arrayBuffer;
+
+  /**
+   * @method base64
+   * @memberof Md5
+   * @instance
+   * @description Output hash as base64 string
+   * @returns {String} base64 string
+   * @see {@link md5.base64}
+   * @example
+   * hash.base64();
+   */
+  Md5.prototype.base64 = function () {
+    var v1, v2, v3, base64Str = '', bytes = this.array();
+    for (var i = 0; i < 15;) {
+      v1 = bytes[i++];
+      v2 = bytes[i++];
+      v3 = bytes[i++];
+      base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+        BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
+        BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
+        BASE64_ENCODE_CHAR[v3 & 63];
+    }
+    v1 = bytes[i];
+    base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+      BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
+      '==';
+    return base64Str;
+  };
+
+  var exports = createMethod();
+
+  if (COMMON_JS) {
+    module.exports = exports;
+  } else {
+    /**
+     * @method md5
+     * @description Md5 hash function, export to global in browsers.
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {String} md5 hashes
+     * @example
+     * md5(''); // d41d8cd98f00b204e9800998ecf8427e
+     * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
+     * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
+     *
+     * // It also supports UTF-8 encoding
+     * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
+     *
+     * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
+     * md5([]); // d41d8cd98f00b204e9800998ecf8427e
+     * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
+     */
+    root.md5 = exports;
+    if (AMD) {
+      define(function () {
+        return exports;
+      });
+    }
+  }
+})();

+ 2 - 1
exam-06173-uni/package.json

@@ -18,6 +18,7 @@
   "dependencies": {
     "cos-js-sdk-v5": "^1.3.7",
     "cos-wx-sdk-v5": "^1.1.7",
-    "image-tools": "^1.4.0"
+    "image-tools": "^1.4.0",
+		"js-md5": "0.7.3"
   }
 }

+ 39 - 8
exam-06173-uni/pages/course/index.vue

@@ -14,13 +14,28 @@
 		</view>
 
 		<yf-more-list url="/api/course/course/user-paging" :params="queryParams" ref="moreList">
-			<template v-slot:item="{ data }" >
+			<template v-slot:item="{ data }">
 				<uni-list-item :show-arrow="true" :title="data.title" :note="'类型:'+data.catId_dictText"
-				link="navigateTo" :to="'/pages/course/detail?id='+data.id">
+					link="navigateTo" :to="'/pages/course/detail?id='+data.id">
+					<template v-slot:body>
+						<view class="" style="width: 100%;">
+							{{data.title}}
+						</view>
+						<view class="" style="width: 100%;display: flex; flex-direction: column;">
+							<view class="" style="font-size: 14px;">
+								类型:{{data.catId_dictText}}
+							</view>
+							<view class="" style="display: flex;align-items: center;font-size: 14px;">
+								学习进度:<progress show-info style="width: 200px;"
+									:percent="Number(data.proportion * 100).toFixed(0)"
+									activeColor="#10AEFF" stroke-width="6" />
+							</view>
+						</view>
+					</template>
 				</uni-list-item>
 			</template>
 		</yf-more-list>
-		
+
 	</view>
 </template>
 
@@ -35,7 +50,7 @@
 
 				current: 0,
 				tabs: ['全部', '未学习', '学习中', '已学完'],
-				queryParams:{
+				queryParams: {
 					title: '',
 					learnState: "0",
 					onlyLearn: false
@@ -45,7 +60,7 @@
 			}
 		},
 		onPullDownRefresh() {
-			if(this.$refs.moreList){
+			if (this.$refs.moreList) {
 				this.$refs.moreList.initData()
 			}
 		},
@@ -55,18 +70,18 @@
 			this.$refs.moreList.loadData()
 		},
 		onShow() {
-			if(this.$refs.moreList){
+			if (this.$refs.moreList) {
 				this.$refs.moreList.initData()
 			}
 		},
 		mounted() {
-			if(this.onlyLearn!=null){
+			if (this.onlyLearn != null) {
 				this.queryParams.onlyLearn = this.onlyLearn
 			}
 		},
 
 		methods: {
-			
+
 			// 搜索课程
 			search(e) {
 				this.queryParams.title = e
@@ -132,3 +147,19 @@
 		margin-right: 5px;
 	}
 </style>
+<style scoped>
+	::v-deep .uni-list-item__container {
+		flex-direction: column;
+	}
+
+	::v-deep .uni-progress-inner-bar {
+		background-color: unset;
+		background-image: linear-gradient(to right, #3587d8, #6855ff);
+	}
+	::v-deep .uni-progress-info{
+		font-size: 14px;
+	}
+	::v-deep .uni-progress-bar,::v-deep .uni-progress-inner-bar{
+		border-radius: 6px;
+	}
+</style>

+ 39 - 30
exam-06173-uni/pages/exam/detail.vue

@@ -8,6 +8,10 @@
 				<view>考试时长:{{checkData.totalTime}}分钟</view>
 				<view>试卷总分:{{checkData.totalScore}}</view>
 				<view>及格分数:{{checkData.qualifyScore}}</view>
+				<view>关联培训:
+					<text v-if="checkData.associate === 1" style="color: rgb(24, 144, 255)" @click="funJumpCourse">是</text>
+					<text v-if="checkData.associate !== 1">否</text>
+				</view>
 			</view>
 		</uni-card>
 
@@ -24,32 +28,32 @@
 
 		<view v-else>
 
-				<view v-if="checkData.late" class="empty">
-					<view>您已经迟到超过{{checkData.lateMax}}分钟,不允许进入考试!</view>
-					<view>
-						<button type="primary" @tap="backList">返回</button>
-					</view>
-				</view>
-				<view v-else-if="checkData.overTime" class="empty">
-					<view>考试未开始或已结束!</view>
+			<view v-if="checkData.late" class="empty">
+				<view>您已经迟到超过{{checkData.lateMax}}分钟,不允许进入考试!</view>
+				<view>
 					<button type="primary" @tap="backList">返回</button>
 				</view>
-				<view v-else-if="checkData.chance>0 && checkData.examCount>=checkData.chance" class="empty">
-					<view>开始次数超限,总共有{{checkData.chance}}次考试机会!</view>
-					<button type="primary" @tap="backList">返回</button>
-				</view>
-				<view v-else>
-
-					<uni-card title="考试密码" v-if="checkData.openType ===9 ">
-						<uni-easyinput v-model="password" placeholder="请输入密码" type="password" />
-					</uni-card>
+			</view>
+			<view v-else-if="checkData.overTime" class="empty">
+				<view>考试未开始或已结束!</view>
+				<button type="primary" @tap="backList">返回</button>
+			</view>
+			<view v-else-if="checkData.chance>0 && checkData.examCount>=checkData.chance" class="empty">
+				<view>开始次数超限,总共有{{checkData.chance}}次考试机会!</view>
+				<button type="primary" @tap="backList">返回</button>
+			</view>
+			<view v-else>
 
-					<view style="padding: 20px;">
-						<button type="primary" @tap="startExam">开始考试</button>
-					</view>
+				<uni-card title="考试密码" v-if="checkData.openType ===9 ">
+					<uni-easyinput v-model="password" placeholder="请输入密码" type="password" />
+				</uni-card>
 
+				<view style="padding: 20px;">
+					<button type="primary" @tap="startExam">开始考试</button>
 				</view>
 
+			</view>
+
 
 		</view>
 
@@ -59,7 +63,6 @@
 </template>
 
 <script>
-
 	import {
 		checkInfo,
 		createPaper,
@@ -109,7 +112,7 @@
 				let that = this
 
 				// 如果要人脸识别
-				if(this.checkData.faceOn){
+				if (this.checkData.faceOn) {
 					//打印请求返回的数据
 					uni.navigateTo({
 						url: '/pages/exam/face?examId=' + this.examId + '&password=' + this.password
@@ -136,7 +139,7 @@
 						url: '/pages/exam/exam?id=' + data.id
 					});
 
-				}).catch(err=>{
+				}).catch(err => {
 
 
 					// 有正在进行的考试
@@ -144,7 +147,7 @@
 						uni.showModal({
 							title: '提示信息',
 							content: '您有其它正在进行的考试,是否继续进入该考试?',
-							success: function (res) {
+							success: function(res) {
 								if (res.confirm) {
 									that.backExam()
 								}
@@ -159,19 +162,25 @@
 				uni.navigateBack()
 			},
 
-			backExam(){
+			backExam() {
 				checkProcess().then(data => {
-				      if (data && data.id) {
+					if (data && data.id) {
 						this.continueExam(data.id)
-				      }
+					}
+				})
+			},
+			
+			funJumpCourse(){
+				uni.navigateTo({
+					url:'/pages/course/detail?id='+ this.checkData.courseId
 				})
 			},
 
 			// 继续考试
 			continueExam(id) {
-			  uni.redirectTo({
-			  	url: '/pages/exam/exam?id=' + id
-			  });
+				uni.redirectTo({
+					url: '/pages/exam/exam?id=' + id
+				});
 			},
 		},
 		onUnload() {

+ 65 - 43
exam-06173-uni/pages/exam/index.vue

@@ -1,78 +1,100 @@
 <template>
 	<view class="container">
-		
+
 		<!-- 设置圆角 -->
 		<view style="padding: 10px 30px 10px 30px;">
 			<uni-search-bar :radius="100" @input="search" placeholder="搜索考试"></uni-search-bar>
 		</view>
-		
-		
+
+
 		<view style="background: #f5f5f5">
 			<uni-segmented-control :current="current" :values="tabs" @clickItem="changeTab" styleType="text"
 				activeColor="#007aff">
 			</uni-segmented-control>
 		</view>
-		
-		
+
+
 		<yf-more-list url="/api/exam/exam/online-paging" :params="queryParams" ref="moreList">
-						
+
 			<template v-slot:item="{ data }">
-				<uni-list-item
-				 :show-arrow="true" 
-				 :title="data.title" 
-				 :note="'发布时间:'+data.createTime"
-				 :rightText="data.timeLimit?'限时': '不限时'"
-				 link="navigateTo"
-				 :to="'/pages/exam/detail?id='+data.id"
-				 >
-				 </uni-list-item>
+				<!-- 				link="navigateTo"
+				:to="'/pages/exam/detail?id='+data.id" -->
+				 <!-- :clickable="true" @click="funJump(data)" -->
+				<uni-list-item :show-arrow="true" :title="data.title"
+					:note="'关联培训:'+ (data.associate === 1? '是': '否') +' \n 发布时间:'+data.createTime"
+					:rightText="data.timeLimit?'限时': '不限时'" :to="'/pages/exam/detail?id='+data.id" link="navigateTo">
+				</uni-list-item>
 			</template>
 		</yf-more-list>
-		
+
 
 	</view>
 </template>
 
 <script>
-
-	
-	import { checkProcess } from '@/api/exam.js'
+	import {
+		checkProcess
+	} from '@/api/exam.js'
 	export default {
 		data() {
 			return {
 				current: 0,
-				tabs: ['全部','考试中','未开始','已结束'],
+				tabs: ['全部', '考试中', '未开始', '已结束'],
 				queryParams: {
 					title: '',
 					examState: ''
 				}
 			}
 		},
-		onPullDownRefresh(){
+		onPullDownRefresh() {
 			// 加载数据
 			this.$refs.moreList.loadData()
 			this.checkExam()
 		},
-	
+
 		onReachBottom() {
 			// 加载数据
 			this.$refs.moreList.loadData()
 		},
 		onShow() {
-			if(this.$refs.moreList){
+			if (this.$refs.moreList) {
 				this.$refs.moreList.initData()
 			}
 			this.checkExam()
 		},
 
 		methods: {
-			
-			
-			checkExam(){
-				
+			funJump(obj) {
+				if (obj.associate === 1) {
+					uni.showModal({
+						cancelText: "取消", // 取消按钮的文字  
+						confirmText: "确认", // 确认按钮文字 
+						title: '培训提示',
+						content: '该考试已关联培训,是否跳转培训?',
+						success: res => {
+							if (res.confirm) {
+								uni.navigateTo({
+									url: '/pages/course/detail?id=' + obj.courseId
+								})
+							}else{
+								uni.navigateTo({
+									url: '/pages/exam/detail?id=' + obj.id
+								})
+							}
+						}
+					});
+				} else {
+					uni.navigateTo({
+						url: '/pages/exam/detail?id=' + obj.id
+					})
+				}
+			},
+
+			checkExam() {
+
 				checkProcess().then(data => {
-				      if (data && data.id) {
-				      
+					if (data && data.id) {
+
 						uni.showModal({
 							cancelText: "取消", // 取消按钮的文字  
 							confirmText: "确认", // 确认按钮文字 
@@ -84,36 +106,36 @@
 								}
 							}
 						});
-						
-				      }
+
+					}
 				})
-				
+
 			},
 
 			// 考试详情页
 			search(e) {
 				this.queryParams.title = e
 			},
-			
-			changeTab(e){
-				
+
+			changeTab(e) {
+
 				if (this.current != e.currentIndex) {
 					this.current = e.currentIndex;
 				}
-				
+
 				let state = null;
-				if(e.currentIndex!=0){
+				if (e.currentIndex != 0) {
 					state = e.currentIndex - 1
 				}
-				
+
 				this.queryParams.examState = state
 			},
-			
-			 // 继续考试
+
+			// 继续考试
 			continueExam(id) {
-			  uni.redirectTo({
-			  	url: '/pages/exam/exam?id=' + id
-			  });
+				uni.redirectTo({
+					url: '/pages/exam/exam?id=' + id
+				});
 			},
 		}
 	}

+ 7 - 1
exam-06173-uni/pages/index/index.vue

@@ -101,7 +101,13 @@
 		},
 
 		onShow() {
-			this.fetchNoticePaging();
+			if(uni.getStorageSync('token')){
+				this.fetchNoticePaging();
+			}else{
+				getApp().loginCallBack = () => {
+					this.fetchNoticePaging()
+				}
+			}
 		},
 
 		methods: {

+ 11 - 11
exam-06173-uni/pages/login/login.vue

@@ -2,10 +2,10 @@
 	<view class="page-box">
 
 
-
+<!-- 
 			<uni-segmented-control :current="current" :values="items" @clickItem="onClickItem" styleType="button"
 				activeColor="#007aff">
-			</uni-segmented-control>
+			</uni-segmented-control> -->
 
 
 			<view style="margin-top: 30px;">
@@ -39,10 +39,10 @@
 					<button type="primary" @tap="handleLogin">登录</button>
 				</view>
 
-				<view class="login-opt">
+			<!-- 	<view class="login-opt">
 					<a @tap="$navs.toReg">立即注册</a>
 					<a @tap="$navs.toForgot">忘记密码?</a>
-				</view>
+				</view> -->
 
 
 		</view>
@@ -52,29 +52,29 @@
 
 		<view class="other-login">
 
-			<view class="tt">其它登录方式</view>
+			<!-- <view class="tt">其它登录方式</view> -->
 
 
-			<view style="display: flex; align-items: center;">
+			<!-- <view style="display: flex; align-items: center;"> -->
 
 
 
 				<!-- #ifdef MP-WEIXIN -->
-				<view class="types">
+	<!-- 			<view class="types">
 					<image src="../../static/images/we-chat.png" style="width: 35px; height: 35px;" @click="appLoginWx">
 					</image>
 					<view>微信登录</view>
-				</view>
+				</view> -->
 				<!-- #endif -->
 
 
-				<view class="types">
+		<!-- 		<view class="types">
 					<image src="../../static/images/face-id.png" style="width: 35px; height: 35px;"
 						@click="appLoginFace"></image>
 					<view>人脸登录</view>
-				</view>
+				</view> -->
 
-			</view>
+			<!-- </view> -->
 
 
 

+ 1 - 1
exam-06173-vue/.env.demo

@@ -2,4 +2,4 @@
 NODE_ENV = demo
 
 # 演示环境接口
-VUE_APP_BASE_API = 'https://exam-api.yfhl.net'
+VUE_APP_BASE_API = 'http://124.70.18.168:8617'

+ 1 - 1
exam-06173-vue/.env.development

@@ -3,4 +3,4 @@ ENV = 'development'
 # 固定调试端口
 PORT = 9617
 # 开发接口设置
-VUE_APP_BASE_API = 'http://10.155.32.18:8617'
+VUE_APP_BASE_API = 'http://124.70.18.168:8617'

BIN
exam-06173-vue/dist.rar


+ 1 - 1
exam-06173-vue/src/components/DicListSelect/index.vue

@@ -9,7 +9,7 @@
     reserve-keyword
     clearable
     automatic-dropdown
-    popper-class="filter-item"
+    class="filter-item"
     @change="handlerChange"
   >
     <el-option

+ 4 - 1
exam-06173-vue/src/components/Tinymce/index.vue

@@ -103,7 +103,10 @@ export default {
         branding: false,
         plugins: plugins,
         end_container_on_empty_block: true,
-        powerpaste_word_import: 'clean',
+        // powerpaste_word_import: 'clean',  //粘贴时为简洁模式
+        powerpaste_word_import: 'propmt', // 粘贴word时 为完整模式
+        // powerpaste_html_import: 'propmt', // 粘贴html时, 为完整模式
+
         code_dialog_height: 450,
         code_dialog_width: 1000,
         advlist_bullet_styles: 'square',

+ 7 - 1
exam-06173-vue/src/views/admin/exam/exam/form.vue

@@ -417,6 +417,9 @@ import { apiFindSimple } from "@/api/tmpl/tmpl";
 import UserRefs from "@/components/UserRefs";
 import DepartRefs from "@/components/DepartRefs";
 
+let timeStart = new Date()
+let timeEnd = new Date()
+timeEnd.setDate(timeEnd.getDate()+3)
 export default {
   name: "ExamDetail",
   components: {
@@ -445,7 +448,7 @@ export default {
         timeType: 0,
       },
 
-      dateValues: [],
+      dateValues: [timeStart.formatDate("yyyy-MM-dd hh:mm:ss"), timeEnd.formatDate("yyyy-MM-dd hh:mm:ss")],
 
       postForm: {
         title: "",
@@ -455,6 +458,7 @@ export default {
         departIds: [],
         // 限制考试次数
         chance: 1,
+        timeLimit: true, // 限制考试时间
         totalTime: 30,
         // 分钟数
         camInterval: 5,
@@ -463,6 +467,8 @@ export default {
         // 离开5次每次10秒
         leaveCount: 5,
         leaveCheck: 10,
+        startTime: timeStart.formatDate("yyyy-MM-dd hh:mm:ss"),
+        endTime: timeEnd.formatDate("yyyy-MM-dd hh:mm:ss"),
         capture: 0,
         // 开放权限
         openType: 1,

+ 52 - 30
exam-06173-vue/src/views/admin/stat/total/archives.vue

@@ -57,28 +57,40 @@
           <el-table-column
             prop="ecTotalUser"
             label="应培训人数"
+            sortable
             align="center"
           />
           <el-table-column
             prop="ecActualUser"
             label="实培训人数"
+            sortable
             align="center"
           />
-          <el-table-column prop="pxl" label="培训率" align="center" />
-          <el-table-column prop="rjxs" label="人均学时" align="center" />
-          <el-table-column prop="ecTotalMin" label="累计学时" align="center" />
+          <el-table-column prop="pxl" label="培训率" sortable align="center" >
+            <template slot-scope="scope">{{scope.row.pxl}}%</template>
+          </el-table-column>
+          <el-table-column prop="rjxs" label="人均学时" sortable align="center" >
+            <template slot-scope="scope">{{scope.row.rjxs}}%</template>
+          </el-table-column>
+          <el-table-column prop="ecTotalMin" sortable label="累计学时" align="center" />
           <el-table-column
             prop="ecTotalUser"
             label="应考试人数"
             align="center"
+            sortable
           />
           <el-table-column
             prop="eeActualUser"
             label="实考试人数"
             align="center"
+            sortable
           />
-          <el-table-column prop="ksl" label="考试率" align="center" />
-          <el-table-column prop="kshgl" label="考试合格率" align="center" />
+          <el-table-column prop="ksl" label="考试率" sortable align="center">
+            <template slot-scope="scope">{{scope.row.ksl}}%</template>
+          </el-table-column>
+          <el-table-column prop="kshgl" label="考试合格率" sortable align="center">
+            <template slot-scope="scope">{{scope.row.kshgl}}%</template>
+          </el-table-column>
           <el-table-column
             fixed="right"
             label="操作"
@@ -120,18 +132,24 @@
               prop="courseNum"
               label="参与课程数"
               align="center"
+              sortable
             />
-            <el-table-column prop="totalMin" label="总学时" align="center" />
-            <el-table-column prop="wcl" label="完成率" align="center" />
+            <el-table-column prop="totalMin" label="总学时" sortable align="center" />
+            <el-table-column prop="wcl" label="完成率" sortable align="center">
+              <template slot-scope="scope">{{scope.row.wcl}}%</template>
+            </el-table-column>
           </el-table-column>
           <el-table-column label="考试记录" align="center">
             <el-table-column
               prop="tryCount"
               label="参与考试次数"
               align="center"
+              sortable
             />
-            <el-table-column prop="passed" label="及格次数" align="center" />
-            <el-table-column prop="jgl" label="及格率" align="center" />
+            <el-table-column prop="passed" label="及格次数" sortable align="center" />
+            <el-table-column prop="jgl" label="及格率" sortable align="center">
+              <template slot-scope="scope">{{scope.row.jgl}}%</template>
+            </el-table-column>
           </el-table-column>
           <el-table-column
             fixed="right"
@@ -189,10 +207,10 @@ export default {
         let seriesData = [[], []];
 
         res.data.forEach((ele) => {
-          ele.pxl = `${this.renderNumber(ele.ecActualUser, ele.ecTotalUser)}`;
-          ele.rjxs = `${this.renderNumber(ele.ecActualUser, ele.ecTotalMin)}`;
-          ele.ksl = `${this.renderNumber(ele.eeActualUser, ele.eeTotalUser)}`;
-          ele.kshgl = `${this.renderNumber(ele.eePassUser, ele.eeActualUser)}`;
+          ele.pxl = this.renderNumber(ele.ecActualUser, ele.ecTotalUser, true);
+          ele.ksl = this.renderNumber(ele.eeActualUser, ele.eeTotalUser, true);
+          ele.rjxs = this.renderNumber(ele.ecActualUser, ele.ecTotalMin, true);
+          ele.kshgl = this.renderNumber(ele.eePassUser, ele.eeActualUser, true);
 
           xAxisData.push(ele.deptName);
           seriesData[0].push(
@@ -218,16 +236,16 @@ export default {
       }).then((res) => {
         if (!this.selectDeptCode) {
           res.data.forEach((ele) => {
-            ele.wcl = `${this.renderNumber(ele.learnCourse, ele.courseNum)}`;
-            ele.jgl = `${this.renderNumber(ele.passed / ele.tryCount)}`;
+            ele.wcl = this.renderNumber(ele.learnCourse, ele.courseNum, true);
+            ele.jgl = this.renderNumber(ele.passed, ele.tryCount, true);
           });
           this.zgTableData = res.data;
         } else {
           let zgTableData = [];
           res.data.forEach((ele) => {
             if (ele.deptCode === this.selectDeptCode) {
-              ele.wcl = `${this.renderNumber(ele.learnCourse, ele.courseNum)}`;
-              ele.jgl = `${this.renderNumber(ele.passed / ele.tryCount)}`;
+              ele.wcl = this.renderNumber(ele.learnCourse, ele.courseNum, true);
+              ele.jgl = this.renderNumber(ele.passed, ele.tryCount, true);
               zgTableData.push(ele);
             }
           });
@@ -244,11 +262,7 @@ export default {
         if (!(num1 / num2)) {
           return renderChart ? 0 : "0%";
         } else {
-          return `${
-            renderChart
-              ? parseInt((num1 / num2) * 100)
-              : ((num1 / num2) * 100).toFixed(2) + "%"
-          }`;
+          return renderChart ? parseInt((num1 / num2) * 100) : ((num1 / num2) * 100).toFixed(2) + "%";
         }
       }
     },
@@ -342,19 +356,27 @@ export default {
         const day = days[month + 1];
 
         this.date = [
-          new Date(new Date() - 3600 * 1000 * 24 * 360).formatDate("yyyy-MM") +
+          new Date().formatDate("yyyy-MM") +
             "-01",
           new Date().formatDate("yyyy-MM") + `-${day}`,
         ];
       } else if (radio === "bjd") {
-        const month = (date.getMonth() + 3) % 12;
-        const day = days[month + 1];
-
+        const monthList = [1,4,7,10]
+        const nowDate = new Date()
+        let minMonth = 1;
+        for(let i=0;i<monthList.length;i++){
+          if(nowDate.getMonth()+1 >= monthList[i]){
+            minMonth = monthList[i]
+          }
+        }
+        const maxMonth = minMonth + 2
+        nowDate.setMonth(maxMonth)
+        nowDate.setDate(0)
+        const day = nowDate.getDate()
         this.date = [
-          new Date(new Date() - 3600 * 1000 * 24 * 360).formatDate("yyyy-MM") +
-            "-01",
-          new Date().formatDate("yyyy") +
-            `-${month < 10 ? "0" + month : month}-${day}`,
+          nowDate.formatDate("yyyy")+ `-${(minMonth < 10 ? "0" + minMonth : maxMonth)}-01`,
+            nowDate.formatDate("yyyy") +
+            `-${(maxMonth < 10 ? "0" + maxMonth : maxMonth)}-${day}`,
         ];
       } else if (radio === "jn") {
         this.date = [