first commit
This commit is contained in:
103
unpackage/dist/dev/mp-alipay/pages/index/index.acss
vendored
Normal file
103
unpackage/dist/dev/mp-alipay/pages/index/index.acss
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
.shopList.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: content;
|
||||
}
|
||||
.shopList_img.data-v-1cf27b2a {
|
||||
width: 308rpx;
|
||||
height: 44rpx;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
.shopList_list.data-v-1cf27b2a {
|
||||
width: 690rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.shopList_list_view.data-v-1cf27b2a {
|
||||
border-radius: 8rpx 8rpx 8rpx 8rpx;
|
||||
width: 334rpx;
|
||||
background-color: #fff;
|
||||
margin-bottom: 30rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.shopList_list_view_img.data-v-1cf27b2a {
|
||||
width: 334rpx;
|
||||
height: 334rpx;
|
||||
border-radius: 8rpx 8rpx 0rpx 0rpx;
|
||||
}
|
||||
.shopList_list_view_tit.data-v-1cf27b2a {
|
||||
padding: 10rpx 20rpx 0;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
/* 限制显示的行数 */
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #232323;
|
||||
}
|
||||
.shopList_list_view_mon.data-v-1cf27b2a {
|
||||
padding: 0rpx 20rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.shopList_list_view_mon_left.data-v-1cf27b2a {
|
||||
font-weight: bold;
|
||||
font-size: 30rpx;
|
||||
color: #4874e5;
|
||||
}
|
||||
.shopList_list_view_mon_right.data-v-1cf27b2a {
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
background-color: #4874e5;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.home_notice.data-v-1cf27b2a {
|
||||
background-color: #fff;
|
||||
border-radius: 25rpx;
|
||||
padding: 30rpx 40rpx;
|
||||
}
|
||||
.home_notice_title.data-v-1cf27b2a {
|
||||
font-size: 30rpx;
|
||||
font-weight: bold;
|
||||
color: #4874e5;
|
||||
text-align: center;
|
||||
margin-bottom: 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.home_notice_view.data-v-1cf27b2a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 28rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.home_notice_view view.data-v-1cf27b2a {
|
||||
max-width: 600rpx;
|
||||
white-space: nowrap;
|
||||
/*超出的空白区域不换行*/
|
||||
overflow: hidden;
|
||||
/*超出隐藏*/
|
||||
text-overflow: ellipsis;
|
||||
/*文本超出显示省略号*/
|
||||
}
|
||||
.homeIndex ::deep .u-grid-item.data-v-1cf27b2a {
|
||||
margin-top: 0;
|
||||
}
|
||||
.homeIndex button.data-v-1cf27b2a::after {
|
||||
all: unset;
|
||||
}
|
||||
1
unpackage/dist/dev/mp-alipay/pages/index/index.axml
vendored
Normal file
1
unpackage/dist/dev/mp-alipay/pages/index/index.axml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view class="p30 homeIndex data-v-1cf27b2a" style="padding-bottom:150rpx"><status-bar class="data-v-1cf27b2a" u-i="1cf27b2a-0" onVI="__l"/><up-swiper class="data-v-1cf27b2a" onClick="{{a}}" u-i="1cf27b2a-1" onVI="__l" u-p="{{b}}"></up-swiper><view class="mt30 data-v-1cf27b2a"><up-grid class="data-v-1cf27b2a" u-s="{{['d']}}" u-i="1cf27b2a-2" onVI="__l" u-p="{{e}}"><up-grid-item a:for="{{c}}" a:for-item="item" a:key="e" class="data-v-1cf27b2a" u-s="{{['d']}}" onClick="{{item.f}}" u-i="{{item.g}}" onVI="__l" u-p="{{d}}"><button class="data-v-1cf27b2a" open-type="{{item.d}}" style="all:unset;width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column"><view class="data-v-1cf27b2a" style="height:35rpx"></view><up-icon class="data-v-1cf27b2a" u-i="{{item.a}}" onVI="__l" u-p="{{item.b}}"></up-icon><text class="data-v-1cf27b2a" style="font-size:24rpx;color:#333;margin-top:10rpx">{{item.c}}</text><view class="data-v-1cf27b2a" style="height:15rpx"></view></button></up-grid-item></up-grid></view><view class="mt30 data-v-1cf27b2a"><view class="home_notice data-v-1cf27b2a"><view class="home_notice_title data-v-1cf27b2a"><view class="data-v-1cf27b2a">系统公告</view><view style="font-size:28rpx" onTap="{{g}}" class="u-flex-y-center data-v-1cf27b2a"> 更多 <up-icon class="data-v-1cf27b2a" u-i="1cf27b2a-5" onVI="__l" u-p="{{f}}"></up-icon></view></view><view a:for="{{h}}" a:for-item="item" a:key="d" class="data-v-1cf27b2a"><navigator a:if="{{item.a}}" url="{{item.c}}" class="home_notice_view data-v-1cf27b2a"><view class="data-v-1cf27b2a">{{item.b}}</view></navigator></view></view></view><image class="data-v-1cf27b2a" onTap="{{i}}" src="{{j}}" style="width:690rpx;margin:30rpx 0" mode="widthFix"></image><view class="shopList data-v-1cf27b2a"><image class="shopList_img data-v-1cf27b2a" src="{{k}}" mode="widthFix"></image><view class="shopList_list data-v-1cf27b2a"><view a:for="{{l}}" a:for-item="i" a:key="d" class="shopList_list_view data-v-1cf27b2a" onTap="{{i.e}}"><image class="shopList_list_view_img data-v-1cf27b2a" src="{{i.a}}" mode="aspectFit"></image><view class="shopList_list_view_tit data-v-1cf27b2a">{{i.b}}</view><view class="shopList_list_view_mon data-v-1cf27b2a"><view class="shopList_list_view_mon_left data-v-1cf27b2a">¥{{i.c}} 元</view></view></view></view></view><tabbar class="data-v-1cf27b2a" u-i="1cf27b2a-6" onVI="__l" u-p="{{m}}"></tabbar></view>
|
||||
226
unpackage/dist/dev/mp-alipay/pages/index/index.js
vendored
Normal file
226
unpackage/dist/dev/mp-alipay/pages/index/index.js
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const common_assets = require("../../common/assets.js");
|
||||
const hooks_useNav = require("../../hooks/useNav.js");
|
||||
const api_api = require("../../api/api.js");
|
||||
if (!Array) {
|
||||
const _easycom_statusBar2 = common_vendor.resolveComponent("statusBar");
|
||||
const _easycom_up_swiper2 = common_vendor.resolveComponent("up-swiper");
|
||||
const _easycom_up_icon2 = common_vendor.resolveComponent("up-icon");
|
||||
const _easycom_up_grid_item2 = common_vendor.resolveComponent("up-grid-item");
|
||||
const _easycom_up_grid2 = common_vendor.resolveComponent("up-grid");
|
||||
const _easycom_tabbar2 = common_vendor.resolveComponent("tabbar");
|
||||
(_easycom_statusBar2 + _easycom_up_swiper2 + _easycom_up_icon2 + _easycom_up_grid_item2 + _easycom_up_grid2 + _easycom_tabbar2)();
|
||||
}
|
||||
const _easycom_statusBar = () => "../../components/statusBar/statusBar.js";
|
||||
const _easycom_up_swiper = () => "../../uni_modules/uview-plus/components/u-swiper/u-swiper.js";
|
||||
const _easycom_up_icon = () => "../../uni_modules/uview-plus/components/u-icon/u-icon.js";
|
||||
const _easycom_up_grid_item = () => "../../uni_modules/uview-plus/components/u-grid-item/u-grid-item.js";
|
||||
const _easycom_up_grid = () => "../../uni_modules/uview-plus/components/u-grid/u-grid.js";
|
||||
const _easycom_tabbar = () => "../../components/tabbar/tabbar.js";
|
||||
if (!Math) {
|
||||
(_easycom_statusBar + _easycom_up_swiper + _easycom_up_icon + _easycom_up_grid_item + _easycom_up_grid + _easycom_tabbar)();
|
||||
}
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
setup(__props) {
|
||||
const { nav, navTo } = hooks_useNav.useNav();
|
||||
common_vendor.reactive([
|
||||
"https://cdn.uviewui.com/uview/swiper/swiper1.png",
|
||||
"https://cdn.uviewui.com/uview/swiper/swiper2.png",
|
||||
"https://cdn.uviewui.com/uview/swiper/swiper3.png"
|
||||
]);
|
||||
const paging = common_vendor.ref(null);
|
||||
let dataList = common_vendor.ref([]);
|
||||
common_vendor.ref([]);
|
||||
let banner = common_vendor.ref([]);
|
||||
let contentList = common_vendor.ref([]);
|
||||
common_vendor.onShow(async () => {
|
||||
common_vendor.index.hideTabBar();
|
||||
});
|
||||
common_vendor.onLoad(async (options) => {
|
||||
common_vendor.index.hideTabBar();
|
||||
if (options.q) {
|
||||
const q = decodeURIComponent(options.q);
|
||||
const query = getUrlParam(q);
|
||||
if (query.num) {
|
||||
common_vendor.index.setStorageSync("invite_code", query.num);
|
||||
}
|
||||
}
|
||||
bannerList();
|
||||
let _res = await api_api.getContentList({
|
||||
cid: 1
|
||||
});
|
||||
contentList.value = _res.records;
|
||||
getList();
|
||||
});
|
||||
function getList() {
|
||||
api_api.shopPage().then((res) => {
|
||||
dataList.value = res.records;
|
||||
});
|
||||
}
|
||||
function getUrlParam(url, paramName) {
|
||||
let pattern = /([^?&=]+)=([^&]+)/g;
|
||||
let params = {};
|
||||
let match;
|
||||
while ((match = pattern.exec(url)) !== null) {
|
||||
let key = decodeURIComponent(match[1]);
|
||||
let value = decodeURIComponent(match[2]);
|
||||
if (params[key]) {
|
||||
if (Array.isArray(params[key])) {
|
||||
params[key].push(value);
|
||||
} else {
|
||||
params[key] = [params[key], value];
|
||||
}
|
||||
} else {
|
||||
params[key] = value;
|
||||
}
|
||||
}
|
||||
if (!paramName) {
|
||||
return params;
|
||||
} else {
|
||||
if (params[paramName]) {
|
||||
return params[paramName];
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
let bannerList = async () => {
|
||||
let _res = await api_api.bannerInfo();
|
||||
banner.value = _res;
|
||||
};
|
||||
let isPagingRefNotFound = () => {
|
||||
return !paging.value;
|
||||
};
|
||||
common_vendor.onPullDownRefresh(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.reload().catch(() => {
|
||||
});
|
||||
});
|
||||
common_vendor.onPageScroll((e) => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.updatePageScrollTop(e.scrollTop);
|
||||
e.scrollTop < 10 && paging.value.doChatRecordLoadMore();
|
||||
});
|
||||
common_vendor.onReachBottom(() => {
|
||||
if (isPagingRefNotFound())
|
||||
return;
|
||||
paging.value.pageReachBottom();
|
||||
});
|
||||
const baseList = common_vendor.reactive([
|
||||
{
|
||||
img: "/static/icon/dz.png",
|
||||
name: "我的电桩",
|
||||
path: "/pages/piles/piles",
|
||||
login: true
|
||||
},
|
||||
{
|
||||
img: "/static/icon/zd.png",
|
||||
name: "我的账单",
|
||||
path: "/pages/mine/balanceIncome",
|
||||
login: true
|
||||
},
|
||||
{
|
||||
img: "/static/icon/hd.png",
|
||||
name: "活动",
|
||||
path: "/pages/activity/index",
|
||||
login: false
|
||||
},
|
||||
{
|
||||
img: "/static/icon/kf.png",
|
||||
name: "联系客服",
|
||||
call: true
|
||||
}
|
||||
]);
|
||||
let toShop = (e) => {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/pages/shop/shop?id=" + e.id
|
||||
});
|
||||
};
|
||||
let bannerClick = (e) => {
|
||||
let data = banner.value[e];
|
||||
if (data.jumpUrl) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: data.jumpUrl
|
||||
});
|
||||
}
|
||||
};
|
||||
let changeTab = () => {
|
||||
common_vendor.index.switchTab({
|
||||
url: "/pages/market/market"
|
||||
});
|
||||
};
|
||||
return (_ctx, _cache) => {
|
||||
return {
|
||||
a: common_vendor.o(common_vendor.unref(bannerClick)),
|
||||
b: common_vendor.p({
|
||||
list: common_vendor.unref(banner),
|
||||
keyName: "imageUrl",
|
||||
height: "388rpx",
|
||||
indicator: true
|
||||
}),
|
||||
c: common_vendor.f(baseList, (item, index, i0) => {
|
||||
return {
|
||||
a: "1cf27b2a-4-" + i0 + "," + ("1cf27b2a-3-" + i0),
|
||||
b: common_vendor.p({
|
||||
imgMode: "widthFix",
|
||||
name: item.img,
|
||||
size: 27
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: item.openType,
|
||||
e: index,
|
||||
f: common_vendor.o(($event) => common_vendor.unref(navTo)(item.path, item.login, item.call)),
|
||||
g: "1cf27b2a-3-" + i0 + ",1cf27b2a-2"
|
||||
};
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
bgColor: "#fff"
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
border: false,
|
||||
col: "4"
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
name: "arrow-right",
|
||||
color: "#4874e5",
|
||||
size: "14"
|
||||
}),
|
||||
g: common_vendor.o((...args) => common_vendor.unref(changeTab) && common_vendor.unref(changeTab)(...args)),
|
||||
h: common_vendor.f(common_vendor.unref(contentList), (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: index <= 2
|
||||
}, index <= 2 ? {
|
||||
b: common_vendor.t(item.title),
|
||||
c: `/pages/market/detail?id=${item.id}`
|
||||
} : {}, {
|
||||
d: index
|
||||
});
|
||||
}),
|
||||
i: common_vendor.o(($event) => common_vendor.unref(nav)({
|
||||
path: "/pages/setMealList/setMealList"
|
||||
})),
|
||||
j: common_assets._imports_0,
|
||||
k: common_assets._imports_1,
|
||||
l: common_vendor.f(common_vendor.unref(dataList), (i, k0, i0) => {
|
||||
return {
|
||||
a: JSON.parse(i.picture)[0],
|
||||
b: common_vendor.t(i.goodsName),
|
||||
c: common_vendor.t(i.salePrice),
|
||||
d: i,
|
||||
e: common_vendor.o(($event) => common_vendor.unref(toShop)(i))
|
||||
};
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
path: "/pages/index/index"
|
||||
})
|
||||
};
|
||||
};
|
||||
}
|
||||
};
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
|
||||
_sfc_main.__runtimeHooks = 1;
|
||||
my.createPage(MiniProgramPage);
|
||||
13
unpackage/dist/dev/mp-alipay/pages/index/index.json
vendored
Normal file
13
unpackage/dist/dev/mp-alipay/pages/index/index.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"defaultTitle": "",
|
||||
"transparentTitle": "always",
|
||||
"titlePenetrate": "YES",
|
||||
"usingComponents": {
|
||||
"status-bar": "../../components/statusBar/statusBar",
|
||||
"up-swiper": "../../uni_modules/uview-plus/components/u-swiper/u-swiper",
|
||||
"up-icon": "../../uni_modules/uview-plus/components/u-icon/u-icon",
|
||||
"up-grid-item": "../../uni_modules/uview-plus/components/u-grid-item/u-grid-item",
|
||||
"up-grid": "../../uni_modules/uview-plus/components/u-grid/u-grid",
|
||||
"tabbar": "../../components/tabbar/tabbar"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user