You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
3.0 KiB
96 lines
3.0 KiB
"use strict";
|
|
const common_vendor = require("../../../common/vendor.js");
|
|
const store_modules_car = require("../../../store/modules/car.js");
|
|
const config_api = require("../../../config/api.js");
|
|
if (!Array) {
|
|
const _easycom_up_navbar2 = common_vendor.resolveComponent("up-navbar");
|
|
const _easycom_u_parse2 = common_vendor.resolveComponent("u-parse");
|
|
(_easycom_up_navbar2 + _easycom_u_parse2)();
|
|
}
|
|
const _easycom_up_navbar = () => "../../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";
|
|
const _easycom_u_parse = () => "../../../uni_modules/uview-plus/components/u-parse/u-parse.js";
|
|
if (!Math) {
|
|
(_easycom_up_navbar + _easycom_u_parse)();
|
|
}
|
|
const _sfc_main = {
|
|
__name: "examIntroduction",
|
|
setup(__props) {
|
|
let usecarStore = store_modules_car.carStore();
|
|
common_vendor.ref(false);
|
|
const currentNav = common_vendor.ref(0);
|
|
const nodes = common_vendor.ref("");
|
|
function changeNav(val, index) {
|
|
currentNav.value = index;
|
|
console.log(index);
|
|
console.log(dataList.value[index]);
|
|
nodes.value = dataList.value[index] ? dataList.value[index].content : "<p>暂无内容</p>";
|
|
}
|
|
let style = {
|
|
img: "max-width:100%;height:auto",
|
|
p: "font-size:32rpx"
|
|
};
|
|
common_vendor.onLoad((option) => {
|
|
if (option.tab)
|
|
currentNav.value = option.tab;
|
|
examProcessInfoFn();
|
|
});
|
|
const tabData = common_vendor.ref([
|
|
{
|
|
name: "考试简介",
|
|
id: 0
|
|
},
|
|
{
|
|
name: "考试准备",
|
|
id: 1
|
|
},
|
|
{
|
|
name: "考试流程",
|
|
id: 2
|
|
},
|
|
{
|
|
name: "注意事项",
|
|
id: 3
|
|
}
|
|
]);
|
|
const dataList = common_vendor.ref([]);
|
|
async function examProcessInfoFn() {
|
|
const { data: res } = await config_api.examProcessInfo(usecarStore.carInfo.stepType);
|
|
if (!res.length)
|
|
return;
|
|
dataList.value = res;
|
|
nodes.value = res[currentNav.value] ? res[currentNav.value].content : "<p>暂无内容</p>";
|
|
}
|
|
return (_ctx, _cache) => {
|
|
var _a;
|
|
return {
|
|
a: common_vendor.p({
|
|
leftText: " ",
|
|
leftIconColor: "#fff",
|
|
safeAreaInsetTop: true,
|
|
autoBack: true,
|
|
fixed: false,
|
|
bgColor: "transparent",
|
|
title: "考试",
|
|
titleStyle: {
|
|
color: "#fff"
|
|
}
|
|
}),
|
|
b: common_vendor.f(tabData.value, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.name),
|
|
b: common_vendor.o(($event) => changeNav(item, index), index),
|
|
c: currentNav.value == index ? 1 : "",
|
|
d: index
|
|
};
|
|
}),
|
|
c: common_vendor.t((_a = tabData.value[currentNav.value]) == null ? void 0 : _a.name),
|
|
d: common_vendor.p({
|
|
content: nodes.value,
|
|
tagStyle: common_vendor.unref(style)
|
|
})
|
|
};
|
|
};
|
|
}
|
|
};
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-3f444d8d"]]);
|
|
wx.createPage(MiniProgramPage);
|