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.
 
 
 

65 lines
2.3 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_line_progress2 = common_vendor.resolveComponent("up-line-progress");
_easycom_up_line_progress2();
}
const _easycom_up_line_progress = () => "../../../uni_modules/uview-plus/components/u-line-progress/u-line-progress.js";
if (!Math) {
_easycom_up_line_progress();
}
const _sfc_main = {
__name: "chapter",
setup(__props) {
let usecarStore = store_modules_car.carStore();
function goPage(item) {
usecarStore.setCar("chapter", item.param);
common_vendor.index.navigateTo({
url: "/pages/exercises/brushQuestions/brushQuestions"
});
}
let dataList = common_vendor.ref([]);
async function columnFidFn() {
dataList.value = [];
let obj = {
type: "4",
stepType: usecarStore.carInfo.stepType,
carType: usecarStore.carInfo.carType,
city: usecarStore.carInfo.city
};
const { data: res } = await config_api.columnFid(obj);
for (let i = 0; i < res.length; i++) {
res[i].percentage = res[i].total / res[i].already * 100 % dataList.value.push(res[i]);
}
console.log(dataList.value);
}
columnFidFn();
const colorArr = ["#3776FF", "#64C76C", "#8484FF", "#F05C1C", "#FDD650", "#6FD568", "#52C1D0"];
return (_ctx, _cache) => {
return {
a: common_vendor.f(common_vendor.unref(dataList), (item, index, i0) => {
return {
a: common_vendor.t(index + 1),
b: colorArr[index],
c: common_vendor.t(item.name),
d: "e609badd-0-" + i0,
e: common_vendor.p({
percentage: item.percentage,
height: "8",
activeColor: "#3776FF",
showText: false
}),
f: common_vendor.t(item.already),
g: common_vendor.t(item.total),
h: index,
i: common_vendor.o(($event) => goPage(item), index)
};
})
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e609badd"]]);
wx.createPage(MiniProgramPage);