first commit
This commit is contained in:
151
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
151
unpackage/dist/dev/mp-weixin/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const store_index = require("../../store/index.js");
|
||||
const utils_fun = require("../../utils/fun.js");
|
||||
const api_index = require("../../api/index.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
if (!Array) {
|
||||
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
|
||||
const _easycom_wd_swiper2 = common_vendor.resolveComponent("wd-swiper");
|
||||
const _easycom_wd_notice_bar2 = common_vendor.resolveComponent("wd-notice-bar");
|
||||
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
|
||||
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
|
||||
(_easycom_wd_navbar2 + _easycom_wd_swiper2 + _easycom_wd_notice_bar2 + _easycom_z_paging2 + _easycom_uni_popup2)();
|
||||
}
|
||||
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
|
||||
const _easycom_wd_swiper = () => "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.js";
|
||||
const _easycom_wd_notice_bar = () => "../../uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.js";
|
||||
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
|
||||
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
|
||||
if (!Math) {
|
||||
(_easycom_wd_navbar + _easycom_wd_swiper + _easycom_wd_notice_bar + _easycom_z_paging + _easycom_uni_popup)();
|
||||
}
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const store = store_index.Store();
|
||||
const userInfo = common_vendor.computed(() => store.userInfo || {});
|
||||
const popup = common_vendor.ref();
|
||||
const current = common_vendor.ref(0);
|
||||
common_vendor.ref(false);
|
||||
const swiperList = common_vendor.ref([]);
|
||||
const noticeList = common_vendor.ref({
|
||||
content: ""
|
||||
});
|
||||
common_vendor.ref([]);
|
||||
const paging = common_vendor.ref(null);
|
||||
const dataList = common_vendor.ref([]);
|
||||
const { navTo } = hooks_useNav.useNav();
|
||||
const queryList = (pageNo, pageSize) => {
|
||||
api_index.api.goodsPage({ pageNo, pageSize, recommended: 1 }).then((res) => {
|
||||
paging.value.complete(res.list);
|
||||
}).catch((res) => {
|
||||
paging.value.complete(false);
|
||||
});
|
||||
};
|
||||
common_vendor.onLoad(() => {
|
||||
api_index.api.banner({
|
||||
imageAddress: 1
|
||||
}).then((res) => {
|
||||
swiperList.value = res.list;
|
||||
});
|
||||
api_index.api.noticePage({ type: 1 }).then((res) => {
|
||||
if (res.list != 0) {
|
||||
noticeList.value = res.list[0];
|
||||
}
|
||||
});
|
||||
});
|
||||
const openCode = async () => {
|
||||
await store.usersGetInfo();
|
||||
popup.value.open();
|
||||
};
|
||||
const toGoods = (e) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/pages/goods/goods?id=${e}`
|
||||
});
|
||||
};
|
||||
const toPrefecture = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/goods/prefecture"
|
||||
});
|
||||
};
|
||||
const toNotice = () => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/notice/notice"
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_assets._imports_0,
|
||||
b: common_assets._imports_1,
|
||||
c: common_vendor.p({
|
||||
bordered: false,
|
||||
["custom-style"]: "background-color: transparent !important;",
|
||||
safeAreaInsetTop: true
|
||||
}),
|
||||
d: common_vendor.o(($event) => current.value = $event),
|
||||
e: common_vendor.p({
|
||||
customItemClass: "bannerRadius",
|
||||
height: "292rpx",
|
||||
list: ["/static/homeY.png"],
|
||||
autoplay: true,
|
||||
current: current.value
|
||||
}),
|
||||
f: common_vendor.o(toPrefecture),
|
||||
g: common_assets._imports_2,
|
||||
h: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/equity/equity", true)),
|
||||
i: common_assets._imports_3,
|
||||
j: common_vendor.o(openCode),
|
||||
k: common_vendor.o(($event) => current.value = $event),
|
||||
l: common_vendor.p({
|
||||
list: swiperList.value,
|
||||
["value-key"]: "image",
|
||||
autoplay: true,
|
||||
current: current.value
|
||||
}),
|
||||
m: common_assets._imports_4,
|
||||
n: common_vendor.t(noticeList.value.content),
|
||||
o: common_vendor.p({
|
||||
color: "#90B77B",
|
||||
["background-color"]: "#E2ECDC"
|
||||
}),
|
||||
p: common_vendor.o(toNotice),
|
||||
q: common_vendor.f(dataList.value, (item, index, i0) => {
|
||||
return {
|
||||
a: item.cover,
|
||||
b: common_vendor.t(item.name),
|
||||
c: common_vendor.t(item.specs),
|
||||
d: common_vendor.t(item.currentPrice),
|
||||
e: common_vendor.o(($event) => toGoods(item.id), index),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
r: common_vendor.sr(paging, "1cf27b2a-4", {
|
||||
"k": "paging"
|
||||
}),
|
||||
s: common_vendor.o(queryList),
|
||||
t: common_vendor.o(($event) => dataList.value = $event),
|
||||
v: common_vendor.p({
|
||||
["use-page-scroll"]: true,
|
||||
modelValue: dataList.value
|
||||
}),
|
||||
w: common_vendor.o(($event) => _ctx.$refs.popup.close()),
|
||||
x: common_assets._imports_9,
|
||||
y: userInfo.value.inviteCodeImg,
|
||||
z: common_vendor.t(userInfo.value.inviteCode),
|
||||
A: common_vendor.o(($event) => common_vendor.unref(utils_fun.copy)(userInfo.value.inviteCode)),
|
||||
B: common_vendor.sr(popup, "1cf27b2a-5", {
|
||||
"k": "popup"
|
||||
}),
|
||||
C: common_vendor.p({
|
||||
type: "center",
|
||||
["border-radius"]: "16rpx"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
});
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map
|
||||
11
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
11
unpackage/dist/dev/mp-weixin/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"navigationBarTitleText": "首页",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
|
||||
"wd-swiper": "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper",
|
||||
"wd-notice-bar": "../../uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar",
|
||||
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
|
||||
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
|
||||
}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/pages/index/index.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="home data-v-1cf27b2a"><view style="width:100%;height:582rpx" class="home_top data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{a}}" style="width:750rpx;height:582rpx;position:absolute;top:0;left:0;z-index:-1"></image><wd-navbar wx:if="{{c}}" class="data-v-1cf27b2a" u-s="{{['left']}}" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{c}}"><view class="data-v-1cf27b2a" style="display:flex;align-items:center" slot="left"><image class="data-v-1cf27b2a" src="{{b}}" style="width:96rpx;height:96rpx;margin-right:25rpx;background-color:rgba(255, 255, 255, 0.3);border-radius:50%"></image><view class="data-v-1cf27b2a" style="color:#fff;font-size:40rpx;font-weight:bold">苗草古方</view></view></wd-navbar><view class="p30 data-v-1cf27b2a" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-1cf27b2a" style="background-color:#fff;width:324rpx;border-radius:20rpx;overflow:hidden" bindtap="{{f}}"><wd-swiper wx:if="{{e}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" bindupdateCurrent="{{d}}" u-p="{{e}}"></wd-swiper><view class="data-v-1cf27b2a" style="height:72rpx;display:flex;align-items:center;padding:20rpx;font-size:28rpx;font-weight:bold">进货专区</view></view><view class="home_top_block data-v-1cf27b2a"><view class="home_top_block_view data-v-1cf27b2a" style="color:#776926" bindtap="{{h}}"><image class="data-v-1cf27b2a" src="{{g}}"></image><view class="data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="font-size:32rpx;font-weight:bold">权益包</view><view class="data-v-1cf27b2a" style="font-size:24rpx;margin-top:10rpx">购买权益包</view><view class="data-v-1cf27b2a" style="font-size:24rpx">至高享七折优惠</view></view></view><view class="home_top_block_view data-v-1cf27b2a" style="background:#eef4f1;color:#175b39" bindtap="{{j}}"><image class="data-v-1cf27b2a" src="{{i}}"></image><view class="data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="font-size:32rpx;font-weight:bold">推荐好友</view><view class="data-v-1cf27b2a" style="font-size:24rpx;margin-top:10rpx">推荐好友加盟</view><view class="data-v-1cf27b2a" style="font-size:24rpx">边拿奖励边赚钱</view></view></view></view></view></view><view class="p30 data-v-1cf27b2a"><wd-swiper wx:if="{{l}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" bindupdateCurrent="{{k}}" u-p="{{l}}"></wd-swiper><view class="mt30 data-v-1cf27b2a" bindtap="{{p}}"><wd-notice-bar wx:if="{{o}}" class="data-v-1cf27b2a" u-s="{{['d']}}" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{o}}"><view class="data-v-1cf27b2a" slot="prefix"><image class="data-v-1cf27b2a" src="{{m}}" style="width:60rpx;height:60rpx"></image></view><view class="data-v-1cf27b2a" style="font-size:28rpx">{{n}}</view></wd-notice-bar></view><z-paging wx:if="{{v}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="paging" bindquery="{{s}}" u-i="1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"><view wx:for="{{q}}" wx:for-item="item" wx:key="f" class="home_block mt30 data-v-1cf27b2a" bindtap="{{item.e}}"><image class="home_block_left data-v-1cf27b2a" src="{{item.a}}"></image><view class="home_block_right data-v-1cf27b2a"><view class="home_block_right_title data-v-1cf27b2a">{{item.b}}</view><view class="home_block_right_info data-v-1cf27b2a">{{item.c}}</view><view class="data-v-1cf27b2a" style="display:flex;justify-content:space-between;align-items:center;margin-top:25rpx"><view class="data-v-1cf27b2a" style="font-size:36rpx;font-weight:bold;color:#ff2929">¥{{item.d}}</view><view class="home_block_right_button data-v-1cf27b2a">下单</view></view></view></view></z-paging></view><uni-popup wx:if="{{C}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="popup" u-i="1cf27b2a-5" bind:__l="__l" u-p="{{C}}"><view class="shareBlock data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="width:100%;text-align:right"><image bindtap="{{w}}" src="{{x}}" class="shareBlock_close data-v-1cf27b2a"></image></view><image class="shareBlock_code data-v-1cf27b2a" src="{{y}}"></image><view class="shareBlock_info data-v-1cf27b2a">打开微信扫描二维码,注册时输入邀请码</view><view class="shareBlock_codeInfo data-v-1cf27b2a"><view class="shareBlock_codeInfo_left data-v-1cf27b2a"> 邀请码: <text class="data-v-1cf27b2a" style="text-decoration:underline">{{z}}</text></view><view class="shareBlock_codeInfo_right data-v-1cf27b2a" bindtap="{{A}}">点击复制</view></view></view></uni-popup></view>
|
||||
105
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
105
unpackage/dist/dev/mp-weixin/pages/index/index.wxss
vendored
Normal file
@@ -0,0 +1,105 @@
|
||||
/* 水平间距 */
|
||||
/* 水平间距 */
|
||||
.home_top.data-v-1cf27b2a {
|
||||
--wot-swiper-radius: 0;
|
||||
}
|
||||
.home_top_block.data-v-1cf27b2a {
|
||||
height: 364rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.home_top_block_view.data-v-1cf27b2a {
|
||||
width: 346rpx;
|
||||
height: 170rpx;
|
||||
background: #f7f4e5;
|
||||
border-radius: 30rpx 30rpx 30rpx 30rpx;
|
||||
padding: 25rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.home_top_block_view image.data-v-1cf27b2a {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
.home_block.data-v-1cf27b2a {
|
||||
width: 690rpx;
|
||||
height: 250rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 25rpx;
|
||||
}
|
||||
.home_block_left.data-v-1cf27b2a {
|
||||
width: 250rpx;
|
||||
height: 250rpx;
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
.home_block_right.data-v-1cf27b2a {
|
||||
flex: 1;
|
||||
}
|
||||
.home_block_right_title.data-v-1cf27b2a {
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.home_block_right_info.data-v-1cf27b2a {
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
color: #232323;
|
||||
margin-top: 25rpx;
|
||||
}
|
||||
.home_block_right_button.data-v-1cf27b2a {
|
||||
width: 128rpx;
|
||||
height: 48rpx;
|
||||
background: #ff2a2a;
|
||||
box-shadow: 0rpx 2rpx 4rpx 2rpx #dbdbdb;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: 800;
|
||||
font-size: 20rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.shareBlock.data-v-1cf27b2a {
|
||||
margin: auto;
|
||||
width: 650rpx;
|
||||
height: 688rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.shareBlock_close.data-v-1cf27b2a {
|
||||
width: 68rpx;
|
||||
height: 68rpx;
|
||||
}
|
||||
.shareBlock_code.data-v-1cf27b2a {
|
||||
width: 392rpx;
|
||||
height: 392rpx;
|
||||
}
|
||||
.shareBlock_info.data-v-1cf27b2a {
|
||||
font-size: 24rpx;
|
||||
color: #cccccc;
|
||||
margin: 24rpx 0;
|
||||
}
|
||||
.shareBlock_codeInfo.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.shareBlock_codeInfo_left.data-v-1cf27b2a {
|
||||
font-weight: bold;
|
||||
font-size: 32rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.shareBlock_codeInfo_right.data-v-1cf27b2a {
|
||||
margin-left: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
Reference in New Issue
Block a user