增加新模块
This commit is contained in:
+306
@@ -0,0 +1,306 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const choiceness = () => "../../components/choiceness/choiceness.js";
|
||||
const _sfc_main = {
|
||||
components: { choiceness },
|
||||
data() {
|
||||
return {
|
||||
swiperList: [
|
||||
"/static/home/banner02.png",
|
||||
"/static/home/banner01.png"
|
||||
],
|
||||
currentNum: 0,
|
||||
sortList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "家居百货",
|
||||
url: "/static/home/sort/1.png"
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "水果生鲜",
|
||||
url: "/static/home/sort/2.png"
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "爆款新品",
|
||||
url: "/static/home/sort/3.png"
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "服装服饰",
|
||||
url: "/static/home/sort/4.png"
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: "箱包皮具",
|
||||
url: "/static/home/sort/5.png"
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: "手机数码",
|
||||
url: "/static/home/sort/6.png"
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
name: "营养保健",
|
||||
url: "/static/home/sort/7.png"
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
name: "个护家清",
|
||||
url: "/static/home/sort/8.png"
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
name: "厨房生活",
|
||||
url: "/static/home/sort/9.png"
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
name: "全部",
|
||||
url: "/static/home/sort/10.png"
|
||||
}
|
||||
],
|
||||
languageShow: false,
|
||||
// 语言选项
|
||||
languageList: [
|
||||
{
|
||||
name: "中文",
|
||||
key: "CN"
|
||||
},
|
||||
{
|
||||
name: "英文",
|
||||
key: "EN"
|
||||
}
|
||||
],
|
||||
currentLanguage: {},
|
||||
yxProduct: [
|
||||
{
|
||||
id: 1,
|
||||
name: "中文中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "中文中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
}
|
||||
],
|
||||
hotList: [
|
||||
{
|
||||
id: 1,
|
||||
name: "中文中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "中文中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: "中文中文中文中文中文",
|
||||
url: "/static/common/product_def.png",
|
||||
price: 99
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
jumpTurntable() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/turntable/turntable"
|
||||
});
|
||||
},
|
||||
jumpPrdference() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/preference/preference"
|
||||
});
|
||||
},
|
||||
jumpWelcome() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/welcome/welcome"
|
||||
});
|
||||
},
|
||||
jumpSearch() {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/search/search"
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_choiceness2 = common_vendor.resolveComponent("choiceness");
|
||||
const _easycom_up_action_sheet2 = common_vendor.resolveComponent("up-action-sheet");
|
||||
(_easycom_up_image2 + _easycom_up_swiper2 + _easycom_choiceness2 + _easycom_up_action_sheet2)();
|
||||
}
|
||||
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_choiceness = () => "../../components/choiceness/choiceness.js";
|
||||
const _easycom_up_action_sheet = () => "../../uni_modules/uview-plus/components/u-action-sheet/u-action-sheet.js";
|
||||
if (!Math) {
|
||||
(_easycom_up_image + _easycom_up_swiper + _easycom_choiceness + _easycom_up_action_sheet)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return {
|
||||
a: common_vendor.o(_ctx.jumpMine),
|
||||
b: common_vendor.p({
|
||||
src: "/static/home/logo.png",
|
||||
width: "104",
|
||||
height: "30",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.p({
|
||||
src: "/static/home/search.png",
|
||||
width: "18",
|
||||
height: "18",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
d: common_vendor.o((...args) => $options.jumpSearch && $options.jumpSearch(...args)),
|
||||
e: common_vendor.p({
|
||||
src: "/static/common/down.png",
|
||||
width: "10",
|
||||
height: "10",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
f: common_vendor.o(($event) => $data.languageShow = true),
|
||||
g: common_vendor.t($data.currentNum + 1),
|
||||
h: common_vendor.t($data.swiperList.length),
|
||||
i: common_vendor.p({
|
||||
list: $data.swiperList,
|
||||
height: "140",
|
||||
radius: "10"
|
||||
}),
|
||||
j: common_vendor.f($data.sortList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "07e72d3c-4-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "40",
|
||||
height: "32",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.id
|
||||
};
|
||||
}),
|
||||
k: common_vendor.o($options.jumpTurntable),
|
||||
l: common_vendor.p({
|
||||
src: "/static/home/turntable.png",
|
||||
width: "100%",
|
||||
height: "134",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
src: "/static/common/right_y_st2.png",
|
||||
width: "12",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
n: common_vendor.o((...args) => $options.jumpPrdference && $options.jumpPrdference(...args)),
|
||||
o: common_vendor.f($data.yxProduct, (item, k0, i0) => {
|
||||
return {
|
||||
a: "07e72d3c-7-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "100%",
|
||||
height: "100",
|
||||
bgColor: "#f1f6ff00",
|
||||
shape: "square",
|
||||
radius: "16"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.id
|
||||
};
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
src: "/static/common/right_y_st2.png",
|
||||
width: "12",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
q: common_vendor.o((...args) => $options.jumpWelcome && $options.jumpWelcome(...args)),
|
||||
r: common_vendor.f($data.yxProduct, (item, k0, i0) => {
|
||||
return {
|
||||
a: "07e72d3c-9-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "100%",
|
||||
height: "100",
|
||||
bgColor: "#f1f6ff00",
|
||||
shape: "square",
|
||||
radius: "16"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.id
|
||||
};
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
src: "/static/home/hot.png",
|
||||
width: "20",
|
||||
height: "20",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
src: "/static/common/right_y_st.png",
|
||||
width: "12",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
v: common_vendor.f($data.hotList, (item, k0, i0) => {
|
||||
return {
|
||||
a: "07e72d3c-12-" + i0,
|
||||
b: common_vendor.p({
|
||||
src: item.url,
|
||||
width: "100%",
|
||||
height: "100",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: "07e72d3c-13-" + i0,
|
||||
e: common_vendor.t(item.price),
|
||||
f: item.id
|
||||
};
|
||||
}),
|
||||
w: common_vendor.p({
|
||||
src: "/static/home/hot_price.png",
|
||||
width: "12",
|
||||
height: "12",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
src: "/static/common/right.png",
|
||||
width: "16",
|
||||
height: "16",
|
||||
bgColor: "#f1f6ff00"
|
||||
}),
|
||||
y: common_vendor.o(($event) => $data.languageShow = false),
|
||||
z: common_vendor.p({
|
||||
actions: $data.languageList,
|
||||
show: $data.languageShow,
|
||||
cancelText: "取消"
|
||||
})
|
||||
};
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-07e72d3c"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/home/home.js.map
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"choiceness": "../../components/choiceness/choiceness",
|
||||
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image",
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"up-action-sheet": "../../uni_modules/uview-plus/components/u-action-sheet/u-action-sheet"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+266
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user