12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- "use strict";
- var common_vendor = require("../common/vendor.js");
- var api_test = require("../api/test.js");
- require("../common/request.js");
- const _sfc_main = {
- data() {
- return {
- tempId: null,
- item: {}
- };
- },
- onLoad(option) {
- this.tempId = option.tempId;
- },
- onShow() {
- this.getTestDetails();
- },
- onShareAppMessage(res) {
- if (this.$isLogin()) {
- return {
- title: "\u5065\u5EB7\u81EA\u6D4B",
- path: "/pages_index/testDetails?tempId=" + this.tempId,
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- };
- }
- },
- onShareTimeline(res) {
- if (this.utils.isLogin()) {
- return {
- title: "\u5065\u5EB7\u81EA\u6D4B",
- imageUrl: "https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"
- };
- }
- },
- methods: {
- navTo(url) {
- this.$isLogin().then((res) => {
- console.log(res);
- if (res) {
- common_vendor.index.navigateTo({
- url
- });
- } else {
- common_vendor.index.navigateTo({
- url: "/pages/auth/login"
- });
- }
- });
- },
- getTestDetails() {
- let data = { tempId: this.tempId };
- api_test.getTestDetails(data).then((res) => {
- if (res.code == 200) {
- this.item = res.data;
- common_vendor.index.setNavigationBarTitle({
- title: this.item.name + "\u81EA\u6D4B"
- });
- } else {
- common_vendor.index.showToast({
- icon: "none",
- title: "\u8BF7\u6C42\u5931\u8D25"
- });
- }
- }, (rej) => {
- });
- }
- }
- };
- function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
- return {
- a: common_vendor.t($data.item.name),
- b: common_vendor.t($data.item.msg),
- c: $data.item.descs,
- d: common_vendor.o(($event) => $options.navTo("/pages_index/test?tempId=" + $data.item.tempId))
- };
- }
- var MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_index/testDetails.vue"]]);
- _sfc_main.__runtimeHooks = 6;
- wx.createPage(MiniProgramPage);
|