From 65d57faed8a6d4e2685b7b23ab72bbb097da5d39 Mon Sep 17 00:00:00 2001 From: educoder_weapp Date: Sat, 29 Feb 2020 08:50:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=88=86=E5=8C=85=EF=BC=8C?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + cloudfunctions/callback/config.json | 7 + cloudfunctions/callback/index.js | 26 + cloudfunctions/callback/package.json | 14 + cloudfunctions/echo/config.json | 5 + cloudfunctions/echo/index.js | 8 + cloudfunctions/echo/package.json | 14 + cloudfunctions/openapi/config.json | 15 + cloudfunctions/openapi/index.js | 83 ++ cloudfunctions/openapi/package.json | 14 + miniprogram/.gitignore | 2 + miniprogram/account/.gitignore | 1 - miniprogram/account/pages/about/about.js | 65 +- miniprogram/account/pages/about/about.json | 4 +- miniprogram/account/pages/about/about.wxml | 5 +- miniprogram/account/pages/about/about.wxss | 16 - .../account/pages/agreement/agreement.js | 73 -- .../account/pages/agreement/agreement.json | 3 - .../account/pages/agreement/agreement.wxml | 4 - .../account/pages/agreement/agreement.wxss | 15 - miniprogram/app.js | 25 +- miniprogram/app.json | 77 +- miniprogram/app.wxss | 30 +- miniprogram/components/add-tips/add-tips.wxml | 2 +- miniprogram/components/add-tips/add-tips.wxss | 3 +- .../components/course-item/course-item.js | 16 + .../course-item.json} | 0 .../components/course-item/course-item.wxml | 10 + .../components/course-item/course-item.wxss | 62 ++ miniprogram/components/course/course.js | 38 - miniprogram/components/course/course.wxml | 5 - miniprogram/components/course/course.wxss | 1 - miniprogram/components/edu-icon/edu-icon.js | 31 - miniprogram/components/edu-icon/edu-icon.wxml | 5 - miniprogram/components/edu-icon/edu-icon.wxss | 942 ------------------ .../components/error-page/error-page.js | 12 + .../error-page.json} | 0 .../components/error-page/error-page.wxml | 5 + .../components/error-page/error-page.wxss | 23 + .../modal/join-course/join-course.js | 42 +- miniprogram/components/my-icon/my-icon.js | 31 - miniprogram/components/my-icon/my-icon.wxml | 6 - miniprogram/components/my-icon/my-icon.wxss | 60 -- miniprogram/components/nav-bar/nav-bar.js | 84 ++ .../my-icon.json => nav-bar/nav-bar.json} | 0 miniprogram/components/nav-bar/nav-bar.wxml | 5 + miniprogram/components/nav-bar/nav-bar.wxss | 62 ++ .../components/require-login/require-login.js | 11 + .../require-login/require-login.json} | 1 + .../require-login/require-login.wxml | 3 + .../require-login/require-login.wxss | 9 + miniprogram/config.js | 29 +- .../components/attachment/attachment.js | 72 ++ .../components/attachment/attachment.json} | 1 + .../components/attachment/attachment.wxml | 17 + .../components/attachment/attachment.wxss} | 0 .../course/components/exercise/exercise.js | 139 +++ .../course/components/exercise/exercise.json | 6 + .../course/components/exercise/exercise.wxml | 27 + .../components/exercise/exercise.wxss} | 36 +- miniprogram/course/images/more.png | Bin 0 -> 512 bytes miniprogram/course/images/navigateback.png | Bin 0 -> 1378 bytes miniprogram/course/images/relaunch.png | Bin 0 -> 1456 bytes miniprogram/course/pages/course/course.js | 118 +++ miniprogram/course/pages/course/course.json | 12 + miniprogram/course/pages/course/course.wxml | 71 ++ miniprogram/course/pages/course/course.wxs | 142 +++ miniprogram/course/pages/course/course.wxss | 153 +++ .../pages/course_invite/course_invite.js | 94 ++ .../pages/course_invite/course_invite.json | 8 + .../pages/course_invite/course_invite.wxml | 15 + .../pages/course_invite/course_invite.wxss | 61 ++ .../pages/course_setting/course_setting.js | 7 +- .../pages/course_setting/course_setting.json | 0 .../pages/course_setting/course_setting.wxml | 0 .../pages/course_setting/course_setting.wxss | 0 miniprogram/debug/debug.js | 13 - .../{ => exercise}/pages/exercise/exercise.js | 13 +- .../pages/exercise/exercise.json | 0 .../pages/exercise/exercise.wxml | 0 .../pages/exercise/exercise.wxss | 0 .../pages/exercise_grade/exercise_grade.js | 0 .../pages/exercise_grade/exercise_grade.json | 0 .../pages/exercise_grade/exercise_grade.wxml | 0 .../pages/exercise_grade/exercise_grade.wxss | 0 .../pages/exercise_result/exercise_result.js | 0 .../exercise_result/exercise_result.json | 0 .../exercise_result/exercise_result.wxml | 0 .../exercise_result/exercise_result.wxss | 0 .../exercise_setting/exercise_setting.js | 10 +- .../exercise_setting/exercise_setting.json | 0 .../exercise_setting/exercise_setting.wxml | 0 .../exercise_setting/exercise_setting.wxss | 0 .../question_setting/question_setting.js | 28 + .../question_setting/question_setting.json | 0 .../question_setting/question_setting.wxml | 0 .../question_setting/question_setting.wxss | 0 miniprogram/images/tab_contact_default.png | Bin 416 -> 596 bytes miniprogram/images/tab_contact_pressed.png | Bin 222 -> 651 bytes miniprogram/images/tab_findmore_default.png | Bin 1932 -> 2180 bytes miniprogram/images/tab_findmore_pressed.png | Bin 1485 -> 1418 bytes miniprogram/images/tab_my_default.png | Bin 0 -> 1198 bytes miniprogram/images/tab_my_pressed.png | Bin 0 -> 1128 bytes miniprogram/images/tab_record_default.png | Bin 943 -> 0 bytes miniprogram/images/tab_record_pressed.png | Bin 773 -> 0 bytes miniprogram/images/tab_settings_default.png | Bin 1179 -> 0 bytes miniprogram/images/tab_settings_pressed.png | Bin 1108 -> 0 bytes miniprogram/images/tab_study_default.png | Bin 1142 -> 2065 bytes miniprogram/images/tab_study_pressed.png | Bin 1104 -> 1384 bytes miniprogram/js/client.js | 24 +- miniprogram/js/edu.js | 20 +- miniprogram/js/key.js | 1 - miniprogram/js/md5.js | 1 + miniprogram/js/models.js | 14 - miniprogram/js/requests.js | 9 - miniprogram/js/utils.js | 15 + miniprogram/pages/code_edit/code_edit.js | 66 -- miniprogram/pages/code_edit/code_edit.wxml | 1 - miniprogram/pages/code_edit/code_edit.wxss | 6 - miniprogram/pages/course/course.js | 43 - miniprogram/pages/course/course.wxml | 15 - miniprogram/pages/course/course.wxss | 8 - .../pages/course_invite/course_invite.js | 37 - .../pages/course_invite/course_invite.json | 3 - .../pages/course_invite/course_invite.wxml | 13 - .../pages/course_invite/course_invite.wxss | 1 - miniprogram/pages/courses/courses.js | 4 +- miniprogram/pages/courses/courses.json | 1 - miniprogram/pages/courses/courses.wxml | 8 +- miniprogram/pages/exercises/exercises.js | 158 --- miniprogram/pages/exercises/exercises.json | 5 - miniprogram/pages/exercises/exercises.wxml | 46 - miniprogram/pages/files/files.js | 107 -- miniprogram/pages/files/files.json | 3 - miniprogram/pages/files/files.wxml | 18 - .../pages/{setting/setting.js => my/my.js} | 20 +- .../{setting/setting.json => my/my.json} | 0 .../{setting/setting.wxml => my/my.wxml} | 10 +- .../{setting/setting.wxss => my/my.wxss} | 0 miniprogram/pages/my_courses/my_courses.js | 57 +- miniprogram/pages/my_courses/my_courses.json | 6 +- miniprogram/pages/my_courses/my_courses.wxml | 34 +- miniprogram/pages/my_courses/my_courses.wxss | 62 +- .../question_setting/question_setting.js | 88 -- 144 files changed, 1705 insertions(+), 2247 deletions(-) create mode 100644 cloudfunctions/callback/config.json create mode 100644 cloudfunctions/callback/index.js create mode 100644 cloudfunctions/callback/package.json create mode 100644 cloudfunctions/echo/config.json create mode 100644 cloudfunctions/echo/index.js create mode 100644 cloudfunctions/echo/package.json create mode 100644 cloudfunctions/openapi/config.json create mode 100644 cloudfunctions/openapi/index.js create mode 100644 cloudfunctions/openapi/package.json delete mode 100644 miniprogram/account/.gitignore delete mode 100644 miniprogram/account/pages/agreement/agreement.js delete mode 100644 miniprogram/account/pages/agreement/agreement.json delete mode 100644 miniprogram/account/pages/agreement/agreement.wxml delete mode 100644 miniprogram/account/pages/agreement/agreement.wxss create mode 100644 miniprogram/components/course-item/course-item.js rename miniprogram/components/{course/course.json => course-item/course-item.json} (100%) create mode 100644 miniprogram/components/course-item/course-item.wxml create mode 100644 miniprogram/components/course-item/course-item.wxss delete mode 100644 miniprogram/components/course/course.js delete mode 100644 miniprogram/components/course/course.wxml delete mode 100644 miniprogram/components/course/course.wxss delete mode 100644 miniprogram/components/edu-icon/edu-icon.js delete mode 100644 miniprogram/components/edu-icon/edu-icon.wxml delete mode 100644 miniprogram/components/edu-icon/edu-icon.wxss create mode 100644 miniprogram/components/error-page/error-page.js rename miniprogram/components/{edu-icon/edu-icon.json => error-page/error-page.json} (100%) create mode 100644 miniprogram/components/error-page/error-page.wxml create mode 100644 miniprogram/components/error-page/error-page.wxss delete mode 100644 miniprogram/components/my-icon/my-icon.js delete mode 100644 miniprogram/components/my-icon/my-icon.wxml delete mode 100644 miniprogram/components/my-icon/my-icon.wxss create mode 100644 miniprogram/components/nav-bar/nav-bar.js rename miniprogram/components/{my-icon/my-icon.json => nav-bar/nav-bar.json} (100%) create mode 100644 miniprogram/components/nav-bar/nav-bar.wxml create mode 100644 miniprogram/components/nav-bar/nav-bar.wxss create mode 100644 miniprogram/components/require-login/require-login.js rename miniprogram/{pages/code_edit/code_edit.json => components/require-login/require-login.json} (54%) create mode 100644 miniprogram/components/require-login/require-login.wxml create mode 100644 miniprogram/components/require-login/require-login.wxss create mode 100644 miniprogram/course/components/attachment/attachment.js rename miniprogram/{pages/course/course.json => course/components/attachment/attachment.json} (54%) create mode 100644 miniprogram/course/components/attachment/attachment.wxml rename miniprogram/{pages/files/files.wxss => course/components/attachment/attachment.wxss} (100%) create mode 100644 miniprogram/course/components/exercise/exercise.js create mode 100644 miniprogram/course/components/exercise/exercise.json create mode 100644 miniprogram/course/components/exercise/exercise.wxml rename miniprogram/{pages/exercises/exercises.wxss => course/components/exercise/exercise.wxss} (62%) create mode 100644 miniprogram/course/images/more.png create mode 100644 miniprogram/course/images/navigateback.png create mode 100644 miniprogram/course/images/relaunch.png create mode 100644 miniprogram/course/pages/course/course.js create mode 100644 miniprogram/course/pages/course/course.json create mode 100644 miniprogram/course/pages/course/course.wxml create mode 100644 miniprogram/course/pages/course/course.wxs create mode 100644 miniprogram/course/pages/course/course.wxss create mode 100644 miniprogram/course/pages/course_invite/course_invite.js create mode 100644 miniprogram/course/pages/course_invite/course_invite.json create mode 100644 miniprogram/course/pages/course_invite/course_invite.wxml create mode 100644 miniprogram/course/pages/course_invite/course_invite.wxss rename miniprogram/{ => course}/pages/course_setting/course_setting.js (96%) rename miniprogram/{ => course}/pages/course_setting/course_setting.json (100%) rename miniprogram/{ => course}/pages/course_setting/course_setting.wxml (100%) rename miniprogram/{ => course}/pages/course_setting/course_setting.wxss (100%) delete mode 100644 miniprogram/debug/debug.js rename miniprogram/{ => exercise}/pages/exercise/exercise.js (96%) rename miniprogram/{ => exercise}/pages/exercise/exercise.json (100%) rename miniprogram/{ => exercise}/pages/exercise/exercise.wxml (100%) rename miniprogram/{ => exercise}/pages/exercise/exercise.wxss (100%) rename miniprogram/{ => exercise}/pages/exercise_grade/exercise_grade.js (100%) rename miniprogram/{ => exercise}/pages/exercise_grade/exercise_grade.json (100%) rename miniprogram/{ => exercise}/pages/exercise_grade/exercise_grade.wxml (100%) rename miniprogram/{ => exercise}/pages/exercise_grade/exercise_grade.wxss (100%) rename miniprogram/{ => exercise}/pages/exercise_result/exercise_result.js (100%) rename miniprogram/{ => exercise}/pages/exercise_result/exercise_result.json (100%) rename miniprogram/{ => exercise}/pages/exercise_result/exercise_result.wxml (100%) rename miniprogram/{ => exercise}/pages/exercise_result/exercise_result.wxss (100%) rename miniprogram/{ => exercise}/pages/exercise_setting/exercise_setting.js (91%) rename miniprogram/{ => exercise}/pages/exercise_setting/exercise_setting.json (100%) rename miniprogram/{ => exercise}/pages/exercise_setting/exercise_setting.wxml (100%) rename miniprogram/{ => exercise}/pages/exercise_setting/exercise_setting.wxss (100%) create mode 100644 miniprogram/exercise/pages/question_setting/question_setting.js rename miniprogram/{ => exercise}/pages/question_setting/question_setting.json (100%) rename miniprogram/{ => exercise}/pages/question_setting/question_setting.wxml (100%) rename miniprogram/{ => exercise}/pages/question_setting/question_setting.wxss (100%) create mode 100644 miniprogram/images/tab_my_default.png create mode 100644 miniprogram/images/tab_my_pressed.png delete mode 100644 miniprogram/images/tab_record_default.png delete mode 100644 miniprogram/images/tab_record_pressed.png delete mode 100644 miniprogram/images/tab_settings_default.png delete mode 100644 miniprogram/images/tab_settings_pressed.png delete mode 100644 miniprogram/js/key.js create mode 100644 miniprogram/js/md5.js delete mode 100644 miniprogram/js/models.js delete mode 100644 miniprogram/pages/code_edit/code_edit.js delete mode 100644 miniprogram/pages/code_edit/code_edit.wxml delete mode 100644 miniprogram/pages/code_edit/code_edit.wxss delete mode 100644 miniprogram/pages/course/course.js delete mode 100644 miniprogram/pages/course/course.wxml delete mode 100644 miniprogram/pages/course/course.wxss delete mode 100644 miniprogram/pages/course_invite/course_invite.js delete mode 100644 miniprogram/pages/course_invite/course_invite.json delete mode 100644 miniprogram/pages/course_invite/course_invite.wxml delete mode 100644 miniprogram/pages/course_invite/course_invite.wxss delete mode 100644 miniprogram/pages/exercises/exercises.js delete mode 100644 miniprogram/pages/exercises/exercises.json delete mode 100644 miniprogram/pages/exercises/exercises.wxml delete mode 100644 miniprogram/pages/files/files.js delete mode 100644 miniprogram/pages/files/files.json delete mode 100644 miniprogram/pages/files/files.wxml rename miniprogram/pages/{setting/setting.js => my/my.js} (78%) rename miniprogram/pages/{setting/setting.json => my/my.json} (100%) rename miniprogram/pages/{setting/setting.wxml => my/my.wxml} (51%) rename miniprogram/pages/{setting/setting.wxss => my/my.wxss} (100%) delete mode 100644 miniprogram/pages/question_setting/question_setting.js diff --git a/.gitignore b/.gitignore index f3dcd24..001d9f8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ api_docs/ .idea/ +res/ # Windows [Dd]esktop.ini diff --git a/cloudfunctions/callback/config.json b/cloudfunctions/callback/config.json new file mode 100644 index 0000000..43aa5fc --- /dev/null +++ b/cloudfunctions/callback/config.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "openapi": [ + "customerServiceMessage.send" + ] + } +} \ No newline at end of file diff --git a/cloudfunctions/callback/index.js b/cloudfunctions/callback/index.js new file mode 100644 index 0000000..c80f887 --- /dev/null +++ b/cloudfunctions/callback/index.js @@ -0,0 +1,26 @@ +const cloud = require('wx-server-sdk') + +cloud.init({ + // API 调用都保持和云函数当前所在环境一致 + env: cloud.DYNAMIC_CURRENT_ENV +}) + +// 云函数入口函数 +exports.main = async (event, context) => { + + console.log(event) + + const { OPENID } = cloud.getWXContext() + + const result = await cloud.openapi.customerServiceMessage.send({ + touser: OPENID, + msgtype: 'text', + text: { + content: '收到:' + event.Content, + } + }) + + console.log(result) + + return result +} diff --git a/cloudfunctions/callback/package.json b/cloudfunctions/callback/package.json new file mode 100644 index 0000000..2372c5c --- /dev/null +++ b/cloudfunctions/callback/package.json @@ -0,0 +1,14 @@ +{ + "name": "callback", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "wx-server-sdk": "latest" + } +} \ No newline at end of file diff --git a/cloudfunctions/echo/config.json b/cloudfunctions/echo/config.json new file mode 100644 index 0000000..16348ce --- /dev/null +++ b/cloudfunctions/echo/config.json @@ -0,0 +1,5 @@ +{ + "permissions": { + "openapi": [] + } +} diff --git a/cloudfunctions/echo/index.js b/cloudfunctions/echo/index.js new file mode 100644 index 0000000..4f83878 --- /dev/null +++ b/cloudfunctions/echo/index.js @@ -0,0 +1,8 @@ +const cloud = require('wx-server-sdk') + +exports.main = async (event, context) => { + // event.userInfo 是已废弃的保留字段,在此不做展示 + // 获取 OPENID 等微信上下文请使用 cloud.getWXContext() + delete event.userInfo + return event +} diff --git a/cloudfunctions/echo/package.json b/cloudfunctions/echo/package.json new file mode 100644 index 0000000..89107db --- /dev/null +++ b/cloudfunctions/echo/package.json @@ -0,0 +1,14 @@ +{ + "name": "echo", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "wx-server-sdk": "latest" + } +} \ No newline at end of file diff --git a/cloudfunctions/openapi/config.json b/cloudfunctions/openapi/config.json new file mode 100644 index 0000000..0074569 --- /dev/null +++ b/cloudfunctions/openapi/config.json @@ -0,0 +1,15 @@ +{ + "permissions": { + "openapi": [ + "wxacode.get", + "subscribeMessage.send", + "subscribeMessage.addTemplate", + "templateMessage.send", + "templateMessage.addTemplate", + "templateMessage.deleteTemplate", + "templateMessage.getTemplateList", + "templateMessage.getTemplateLibraryById", + "templateMessage.getTemplateLibraryList" + ] + } +} \ No newline at end of file diff --git a/cloudfunctions/openapi/index.js b/cloudfunctions/openapi/index.js new file mode 100644 index 0000000..6d38b11 --- /dev/null +++ b/cloudfunctions/openapi/index.js @@ -0,0 +1,83 @@ +// 云函数入口文件 +const cloud = require('wx-server-sdk') + +cloud.init() + +// 云函数入口函数 +exports.main = async (event, context) => { + console.log(event) + switch (event.action) { + case 'requestSubscribeMessage': { + return requestSubscribeMessage(event) + } + case 'sendSubscribeMessage': { + return sendSubscribeMessage(event) + } + case 'getWXACode': { + return getWXACode(event) + } + case 'getOpenData': { + return getOpenData(event) + } + default: { + return + } + } +} + +async function requestSubscribeMessage(event) { + // 此处为模板 ID,开发者需要到小程序管理后台 - 订阅消息 - 公共模板库中添加模板, + // 然后在我的模板中找到对应模板的 ID,填入此处 + return '请到管理后台申请模板 ID 然后在此替换' // 如 'N_J6F05_bjhqd6zh2h1LHJ9TAv9IpkCiAJEpSw0PrmQ' +} + +async function sendSubscribeMessage(event) { + const { OPENID } = cloud.getWXContext() + + const { templateId } = event + + const sendResult = await cloud.openapi.subscribeMessage.send({ + touser: OPENID, + templateId, + miniprogram_state: 'developer', + page: 'pages/openapi/openapi', + // 此处字段应修改为所申请模板所要求的字段 + data: { + thing1: { + value: '咖啡', + }, + time3: { + value: '2020-01-01 00:00', + }, + } + }) + + return sendResult +} + +async function getWXACode(event) { + let {path} = event; + const wxacodeResult = await cloud.openapi.wxacode.get({ + path + }) + + const fileExtensionMatches = wxacodeResult.contentType.match(/\/([^\/]+)/) + const fileExtension = (fileExtensionMatches && fileExtensionMatches[1]) || 'jpg' + + const uploadResult = await cloud.uploadFile({ + cloudPath: `images/wxacode/${path.replace(/[\/?&]/g,"_")}.${fileExtension}`, + fileContent: wxacodeResult.buffer, + }) + + if (!uploadResult.fileID) { + throw new Error(`upload failed with empty fileID and storage server status code ${uploadResult.statusCode}`) + } + + return uploadResult.fileID +} + +async function getOpenData(event) { + return cloud.getOpenData({ + list: event.openData.list, + }) +} diff --git a/cloudfunctions/openapi/package.json b/cloudfunctions/openapi/package.json new file mode 100644 index 0000000..0a39461 --- /dev/null +++ b/cloudfunctions/openapi/package.json @@ -0,0 +1,14 @@ +{ + "name": "openapi", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "wx-server-sdk": "latest" + } +} diff --git a/miniprogram/.gitignore b/miniprogram/.gitignore index a7f4eac..275e7b9 100644 --- a/miniprogram/.gitignore +++ b/miniprogram/.gitignore @@ -1,4 +1,6 @@ js/apiConfig.js +towxml/ +wemark/ # Windows [Dd]esktop.ini diff --git a/miniprogram/account/.gitignore b/miniprogram/account/.gitignore deleted file mode 100644 index fff60ac..0000000 --- a/miniprogram/account/.gitignore +++ /dev/null @@ -1 +0,0 @@ -towxml/ \ No newline at end of file diff --git a/miniprogram/account/pages/about/about.js b/miniprogram/account/pages/about/about.js index e9540cc..0029f94 100644 --- a/miniprogram/account/pages/about/about.js +++ b/miniprogram/account/pages/about/about.js @@ -1,75 +1,20 @@ -const Towxml = require('../../towxml/main'); - if (!global.towxml) - global.towxml = new Towxml(); + global.towxml = require('../../../towxml/index'); Page({ - /** - * 页面的初始数据 - */ - md: '# 服务协议\n\n尊敬的用户,您好!\n欢迎使用本网站,在您使用本网站前,请您认真阅读并遵守《服务协议》(以下简称”本协议”),请您务必审慎阅读、充分理解协议的各条款内容。\n当您在注册过程中点击查看”看过并同意本服务协议”,按照注册流程成功注册为网站的用户即表示您已充分阅读、理解并完全接受本协议中的全部条款。您承诺接受并遵守本协议的约定,届时您不应以未阅读本协议的内容等理由,主张本协议无效或本协议中的某些条款无效,或要求撤销本协议。\n\n## 本网站权利和义务\n1. 尊重用户隐私:尊重用户隐私,保障用户隐私安全是网站的一项基本政策;\n2. 管理网站用户:网站依据国家法律、地方法律和国际法律等的标准以及本行业的规则来管理网站注册用户;\n3. 处理用户反馈:网站的相关人员会及时处理用户反馈的问题并给予及时回复。\n## 用户权利和义务\n1. 用户在使用网站的过程中,必须遵守如下原则:\n2. 遵守中国的有关法律和法规;\n3. 使用网络服务不作非法用途;\n4. 不干扰和混乱网络服务;\n5. 遵守所有使用网络服务的网络协议、规定、程序和惯例;\n6. 不传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的,淫秽等信息资料;\n7. 不传输任何教唆他人构成犯罪行为的资料;\n8. 用户不得故意或者过失损害网站合法权利和利益。及时回复。\n## 关于责任\n鉴于网络服务的特殊性,本网站有权在事先通知的情况下,变更、中断、升级部分网络服务。本网站不担保网络服务不会中断,但承诺在用户可承受的时间内快速恢复服务,同时确保用户数据的安全性和可靠性。\n\n## 免责条款\n鉴于互联网服务的特点,本网站对用户自行上传的资料不承担任何法律责任,希望各网友对网站提供的互动服务中的内容进行监督,若发现存在侵犯任何第三人著作权等合法权益的内容,请及时告知,我们将严格按照《信息网络传播权保护条例》中的规定予以删除。\n\n1. 本网站属于非赢利性网站,转载的文章遵循原作者的版权声明,如果原文没有版权声明,按照目前互联网开放的原则,我们将在不通知作者的情况下,转载文章;如果原文明确注明“禁止转载”,我们一定不会转载。如果我们转载的文章不符合作者的版权声明或者作者不想让我们转载您的文章的话,请来信告知:zhongjin@educoder.net\n2. 本网站转载文章仅为传播更多信息之目的,凡在本网站出现的信息,均仅供参考。本网站将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担责任。\n3. 任何透过本网站网页而链接及得到的资讯、产品及服务,本网站概不负责,亦不负任何法律责任。\n4. 本网站所刊发、转载的文章,其版权均归原作者所有,如其他媒体、网站或个人从本网下载使用,请在转载有关文章时务必尊重该文章的著作权,保留本网注明的“稿件来源”,并自负版权等法律责任。\n## 侵权投诉\nEducoder平台是一个接受外来投稿的平台,部分图片和文字来自互联网或原作者自行编辑。投稿到Educoder平台的文章,默认作者授权其全部图文内容在Educoder平台、在其微信公众号及微博帐号进行发布,Educoder平台对这一部分内容不进行预先审查。\n如您发现平台上文章或图片涉嫌侵犯您的权利请您将所涉及的文章 URL 和侵权理由以邮件形式发送到邮箱(zhongjin@educoder.net),我们将在核实情况后依照《中华人民共和国侵权责任法》及其司法解释对内容进行屏蔽、删除和通知原作者。\n\n## 服务条款的修改\n本网站保留在必要时对本协议修改的权利,一旦发生变动,这些条款可由网站项目组及时更新,且毋须另行通知,修改后的条款一旦在网页上公布即有效代替原来的服务条款。您可随时查阅最新版服务条款。\n\n**本协议最终解释权归本网站所有**。' + md: '# 服务协议\n\n尊敬的用户,您好!\n欢迎使用本平台,在您使用本平台前,请您认真阅读并遵守《服务协议》(以下简称”本协议”),请您务必审慎阅读、充分理解协议的各条款内容。\n当您在注册过程中点击查看”看过并同意本服务协议”,按照注册流程成功注册为平台的用户即表示您已充分阅读、理解并完全接受本协议中的全部条款。您承诺接受并遵守本协议的约定,届时您不应以未阅读本协议的内容等理由,主张本协议无效或本协议中的某些条款无效,或要求撤销本协议。\n\n## 本平台权利和义务\n1. 尊重用户隐私:尊重用户隐私,保障用户隐私安全是平台的一项基本政策;\n2. 管理平台用户:平台依据国家法律、地方法律和国际法律等的标准以及本行业的规则来管理平台注册用户;\n3. 处理用户反馈:平台的相关人员会及时处理用户反馈的问题并给予及时回复。\n## 用户权利和义务\n1. 用户在使用平台的过程中,必须遵守如下原则:\n2. 遵守中国的有关法律和法规;\n3. 使用网络服务不作非法用途;\n4. 不干扰和混乱网络服务;\n5. 遵守所有使用网络服务的网络协议、规定、程序和惯例;\n6. 不传输任何非法的、骚扰性的、中伤他人的、辱骂性的、恐吓性的、伤害性的、庸俗的,淫秽等信息资料;\n7. 不传输任何教唆他人构成犯罪行为的资料;\n8. 用户不得故意或者过失损害平台合法权利和利益。及时回复。\n## 关于责任\n鉴于网络服务的特殊性,本平台有权在事先通知的情况下,变更、中断、升级部分网络服务。本平台不担保网络服务不会中断,但承诺在用户可承受的时间内快速恢复服务,同时确保用户数据的安全性和可靠性。\n\n## 免责条款\n鉴于互联网服务的特点,本平台对用户自行上传的资料不承担任何法律责任,希望各网友对平台提供的互动服务中的内容进行监督,若发现存在侵犯任何第三人著作权等合法权益的内容,请及时告知,我们将严格按照《信息网络传播权保护条例》中的规定予以删除。\n\n1. 本平台属于非赢利性平台,转载的文章遵循原作者的版权声明,如果原文没有版权声明,按照目前互联网开放的原则,我们将在不通知作者的情况下,转载文章;如果原文明确注明“禁止转载”,我们一定不会转载。如果我们转载的文章不符合作者的版权声明或者作者不想让我们转载您的文章的话,请来信告知:zhongjin@educoder.net\n2. 本平台转载文章仅为传播更多信息之目的,凡在本平台出现的信息,均仅供参考。本平台将尽力确保所提供信息的准确性及可靠性,但不保证信息的正确性和完整性,且不对因信息的不正确或遗漏导致的任何损失或损害承担责任。\n3. 任何透过本平台网页而链接及得到的资讯、产品及服务,本平台概不负责,亦不负任何法律责任。\n4. 本平台所刊发、转载的文章,其版权均归原作者所有,如其他媒体、平台或个人从本网下载使用,请在转载有关文章时务必尊重该文章的著作权,保留本网注明的“稿件来源”,并自负版权等法律责任。\n## 侵权投诉\nEducoder平台是一个接受外来投稿的平台,部分图片和文字来自互联网或原作者自行编辑。投稿到Educoder平台的文章,默认作者授权其全部图文内容在Educoder平台、在其微信公众号及微博帐号进行发布,Educoder平台对这一部分内容不进行预先审查。\n如您发现平台上文章或图片涉嫌侵犯您的权利请您将所涉及的文章 URL 和侵权理由以邮件形式发送到邮箱(zhongjin@educoder.net),我们将在核实情况后依照《中华人民共和国侵权责任法》及其司法解释对内容进行屏蔽、删除和通知原作者。\n\n## 服务条款的修改\n本平台保留在必要时对本协议修改的权利,一旦发生变动,这些条款可由平台项目组及时更新,且毋须另行通知,修改后的条款一旦在网页上公布即有效代替原来的服务条款。您可随时查阅最新版服务条款。\n\n**本协议最终解释权归本平台所有**。' , data: { article: {} }, - /** - * 生命周期函数--监听页面加载 - */ onLoad: function (options) { - const _ts = this; - let data = global.towxml.toJson(this.md,'markdown'); - _ts.setData({ - article: data + let article = global.towxml(this.md, 'markdown') + this.setData({ + article }); }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide: function () { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh: function () { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - }, - - /** - * 用户点击右上角分享 - */ onShareAppMessage: function () { } diff --git a/miniprogram/account/pages/about/about.json b/miniprogram/account/pages/about/about.json index 8835af0..1184b39 100644 --- a/miniprogram/account/pages/about/about.json +++ b/miniprogram/account/pages/about/about.json @@ -1,3 +1,5 @@ { - "usingComponents": {} + "usingComponents": { + "towxml": "/towxml/towxml" + } } \ No newline at end of file diff --git a/miniprogram/account/pages/about/about.wxml b/miniprogram/account/pages/about/about.wxml index f8cfd98..0494fa5 100644 --- a/miniprogram/account/pages/about/about.wxml +++ b/miniprogram/account/pages/about/about.wxml @@ -1,4 +1 @@ - - -