| | |
| | | "permission": { |
| | | "scope.userLocation": { |
| | | "desc": "你的位置信息将用于小程序位置接口的效果展示" |
| | | }, |
| | | "clipboard": { |
| | | "desc": "用于复制内容到剪贴板" |
| | | } |
| | | } |
| | | } |
| | |
| | | if (resp.length > 0) { |
| | | const data = resp[0] |
| | | if (data.datas.length) { |
| | | |
| | | data.datas[0].subDatas = data.datas[0].cmsDatas |
| | | const datas = handleDetailQueryRequestData({ |
| | | productId, |
| | |
| | | copyPath() { |
| | | wx.setClipboardData({ |
| | | data: this.data.path, |
| | | success: () => { |
| | | success: (res) => { |
| | | wx.showToast({ |
| | | icon: 'success', |
| | | title: '复制成功', |
| | | }) |
| | | }, |
| | | fail: () => { |
| | | fail: (res) => { |
| | | wx.showToast({ |
| | | icon: 'error', |
| | | title: '请重试', |
| | |
| | | } |
| | | } |
| | | const indexof = listIndex |
| | | const questionId = questionList[indexof].id; |
| | | const idPath = questionList[indexof].idPath; |
| | | const bookId = questionList[indexof].bookId; |
| | | const bookName = "大学生心理健康(第3版)(融媒体版)" |
| | | const formPath = "questionBank" |
| | | // 进行处理 |
| | | const query = { |
| | | "cmsItemId": Number(questionId) |
| | | path: "*", |
| | | queryType: "*", |
| | | productId: bookId, |
| | | cmsPath: "161796", |
| | | cmsType: "*" |
| | | }; |
| | | app.MG.file.checkCmsItem(query) |
| | | .then((res) => { |
| | | const isBuys = res; |
| | | app.MG.store.getProductDetail(query).then(async (res) => { |
| | | const linkPathList = res.datas.cmsDatas[0].datas |
| | | const isBuyList = res.datas.purchasedSaleMethodIdList |
| | | let isBuy = false |
| | | const idParhList = idPath.split("/").reverse() |
| | | for (let index = 0; index < idParhList.length; index++) { |
| | | const item = idParhList[index]; |
| | | const thisItem = linkPathList.find(citem => item == citem.id); |
| | | if (thisItem.saleMethod.length > 0) { |
| | | if (isBuyList.includes(thisItem.saleMethod[0].Id)) { |
| | | isBuy = true |
| | | break |
| | | } else { |
| | | isBuy = false |
| | | break |
| | | } |
| | | } |
| | | } |
| | | this.setData({ |
| | | isBuy: isBuys |
| | | isBuy: isBuy |
| | | }); |
| | | if (!isBuys) { |
| | | if (!isBuy) { |
| | | wx.showModal({ |
| | | icon: 'error', |
| | | title: '温馨提示', |
| | |
| | | } |
| | | // 其他逻辑 |
| | | this.initialize() |
| | | }) |
| | | .catch((err) => { |
| | | }).catch((err) => { |
| | | console.error('检查题库失败:', err); |
| | | wx.showToast({ |
| | | icon: 'error', |
| | |
| | | var localData = { |
| | | "list": [{ |
| | | "name": "测测你的生活品质", |
| | | "id": 162287, |
| | | "idPath": "161796/162214/162217/162287", |
| | | "bookId": 7129, |
| | | "title": "请仔细阅读以下问题,凭你的第一感觉回答。请选择与你相符的答案,即使你感到不太确定,也要回答每个问题。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "身体症状问卷", |
| | | "id": 162288, |
| | | "idPath": "161796/162214/162217/162288", |
| | | "bookId": 7129, |
| | | "title": "下面是与心理因素相关的身体症状列表,请根据自己上一周的情况,在相应的位置上画圈,看看工作量与身体症状之间是否存在联系。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "一般自我效能感量表", |
| | | "id": 162289, |
| | | "idPath": "161796/162214/162217/162289", |
| | | "bookId": 7129, |
| | | "title": "<p>以下10个句子都是关于你平时对自己的一般看法,请你根据自己的实际情况,选择合适的选项。“1”表示完全不正确。“2”表示有点正确,“3”表示多数正确,“4”表示完全正确。答案没有对错之分,对每一个句子无须多考虑。(答案仅自己可见)</p>", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "学习动力自我诊断测试", |
| | | "id": 162290, |
| | | "idPath": "161796/162214/162217/162290", |
| | | "bookId": 7129, |
| | | "title": "这个量表主要为了帮助你了解自己在学习动机、学习兴趣、学习目标上是否存在困扰,共20个题目。请你根据自己的情况,实事求是地对每个题目做“是”或“否”的回答。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "人际关系综合诊断表", |
| | | "id": 162291, |
| | | "idPath": "161796/162214/162217/162291", |
| | | "bookId": 7129, |
| | | "title": "本量表共28个问题,每个问题做“是”或“否”回答。请你认真完成,然后参照计分及分析方法,对测试结果做出解释。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "婚姻稳定性测试", |
| | | "id": 162292, |
| | | "idPath": "161796/162214/162217/162292", |
| | | "bookId": 7129, |
| | | "title": "<p>你选择好终身伴侣了吗?你是怎样看待婚姻的呢?下面的婚姻稳定性测试可以帮你更好地预测未来婚姻的稳定性。</p><p>请仔细阅读每道题,选择符合你的答案。(答案仅自己可见)</p>", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "你的恋爱心理是否成熟?", |
| | | "id": 162293, |
| | | "idPath": "161796/162214/162217/162293", |
| | | "bookId": 7129, |
| | | "title": "请认真阅读以下各项,根据自己的真实情况作答。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "压力心理测试", |
| | | "id": 162294, |
| | | "idPath": "161796/162214/162217/162294", |
| | | "bookId": 7129, |
| | | "title": "请回想一下自己在过去一个月内是否出现过下述情况。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "抑郁自评量表(SDS)", |
| | | "id": 162295, |
| | | "idPath": "161796/162214/162217/162295", |
| | | "bookId": 7129, |
| | | "title": "下面有20条文字,请仔细阅读每一条,把意思弄明白后根据您最近一星期的情况选择适当的选项。“A”表示没有或很少时间有,“B”表示小部分时间有,“C”表示相当多时间有,“D”表示绝大部分时间都有。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "了解你的职业化程度", |
| | | "id": 162296, |
| | | "idPath": "161796/162214/162217/162296", |
| | | "bookId": 7129, |
| | | "title": "职业化指一种工作状态的标准化、规范化和制度化,即在合适的时间、地点用合适的方式完成工作。职业化体现了一个人能准确地扮演好自己的职业角色,尽职尽责地完成自己的工作。作为一名即将走进职场的大学生,你的职业化程度有多高呢?请完成下列测试。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | { |
| | | "name": "职业能力测试", |
| | | "id": 162297, |
| | | "idPath": "161796/162214/162217/162297", |
| | | "bookId": 7129, |
| | | "title": "根据你的实际情况,对下面每种活动做出评定。(答案仅自己可见)", |
| | | "fromType": "json", |
| | |
| | | }, |
| | | { |
| | | "name": "威廉斯创造力倾向量表", |
| | | "id": 162298, |
| | | "idPath": "161796/162214/162217/162298", |
| | | "bookId": 7129, |
| | | "title": "<p>这是一份帮助你了解自己创造力的表单。每一题都要做,不要花太多时间去思考;所有题目都没有正确答案,凭你读完每一句的第一印象作答;虽然没有时间限制,但尽可能以较快的速度完成,越快越好;凭自己的真实感受作答。(答案仅自己可见)</p>", |
| | | "fromType": "json", |
| | |
| | | list.push({ |
| | | value: item.icon, |
| | | link: item.jsek_link, |
| | | |
| | | }) |
| | | } |
| | | this.setData({ |
| | |
| | | const item = e.currentTarget.dataset.book |
| | | // 网页类型跳转到网址复制页,因为url传参不能传 带参数的网络地址,所以此处要把网络地址里的传参摘出来,放到url里 |
| | | let urlData = '' |
| | | if (!item.jsek_link) { |
| | | wx.showModal({ |
| | | title: '提示', |
| | | content: '暂无内容', |
| | | showCancel: false, |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log(res, '3232') |
| | | } |
| | | } |
| | | }) |
| | | return false; |
| | | } |
| | | const flags = item.jsek_link.indexOf("?") |
| | | if (flags > -1) { |
| | | urlData = item.jsek_link.slice(flags + 1, item.jsek_link.length) |