208 lines
5.0 KiB
JavaScript
208 lines
5.0 KiB
JavaScript
"use strict";
|
|
const common_vendor = require("../../common/vendor.js");
|
|
const common_assets = require("../../common/assets.js");
|
|
const _sfc_main = {
|
|
data() {
|
|
return {
|
|
currendIndex: 0,
|
|
swiperList: [1, 2, 3, 4],
|
|
dataList: [
|
|
{
|
|
id: 1,
|
|
title: "坂本日常",
|
|
color: "#90BB76",
|
|
url: ""
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常",
|
|
color: "#FDA6AA",
|
|
url: ""
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常",
|
|
color: "#96ABEB",
|
|
url: ""
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常",
|
|
color: "#F9D051",
|
|
url: ""
|
|
}
|
|
],
|
|
tabList: [
|
|
{
|
|
id: 1,
|
|
title: "全部"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "吧唧"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "立牌"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "色纸"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "拍立得"
|
|
}
|
|
],
|
|
goodsLsit: [
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常坂本日常坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
},
|
|
{
|
|
id: 1,
|
|
title: "坂本日常坂本日常坂本日常坂本日常",
|
|
imgUrl: "",
|
|
type: "",
|
|
price: "20"
|
|
}
|
|
]
|
|
};
|
|
},
|
|
methods: {
|
|
clickTab(index) {
|
|
this.currendIndex = index;
|
|
},
|
|
setTabBg(index) {
|
|
if (this.currendIndex == index) {
|
|
return {
|
|
backgroundColor: "#F5D677",
|
|
border: "1rpx solid transparent"
|
|
};
|
|
} else {
|
|
return {
|
|
backgroundColor: "transparent",
|
|
border: "1rpx solid #9A8F79"
|
|
};
|
|
}
|
|
},
|
|
toDetails(id) {
|
|
common_vendor.index.navigateTo({
|
|
url: "/pages/home/product-details?id=" + id
|
|
});
|
|
}
|
|
}
|
|
};
|
|
if (!Array) {
|
|
const _easycom_uni_notice_bar2 = common_vendor.resolveComponent("uni-notice-bar");
|
|
_easycom_uni_notice_bar2();
|
|
}
|
|
const _easycom_uni_notice_bar = () => "../../uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar.js";
|
|
if (!Math) {
|
|
_easycom_uni_notice_bar();
|
|
}
|
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
return {
|
|
a: common_assets._imports_0,
|
|
b: common_assets._imports_1,
|
|
c: common_assets._imports_2,
|
|
d: `100%`,
|
|
e: common_vendor.p({
|
|
scrollable: true,
|
|
single: true,
|
|
speed: 8,
|
|
["background-color"]: "transparent",
|
|
color: "#6B5E4B",
|
|
text: "感谢您的理解与支持"
|
|
}),
|
|
f: common_vendor.f($data.swiperList, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item),
|
|
b: index
|
|
};
|
|
}),
|
|
g: common_vendor.f($data.dataList, (item, index, i0) => {
|
|
return {
|
|
a: `2px solid ${item.color}`,
|
|
b: common_vendor.t(item.title),
|
|
c: common_vendor.o(($event) => $options.toDetails($data.dataList[index].id))
|
|
};
|
|
}),
|
|
h: common_vendor.f($data.tabList, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.o(($event) => $options.clickTab(index)),
|
|
c: common_vendor.s($options.setTabBg(index))
|
|
};
|
|
}),
|
|
i: common_vendor.f($data.goodsLsit, (item, index, i0) => {
|
|
return {
|
|
a: common_vendor.t(item.title),
|
|
b: common_vendor.t(item.price)
|
|
};
|
|
})
|
|
};
|
|
}
|
|
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
wx.createPage(MiniProgramPage);
|
|
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home-page.js.map
|