已支付订单列表:where.payStatus = 1;
This commit is contained in:
+457
@@ -0,0 +1,457 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_shop_goods_index = require("../../api/shop/goods/index.js");
|
||||
const api_layout_index = require("../../api/layout/index.js");
|
||||
const api_shop_merchant_index = require("../../api/shop/merchant/index.js");
|
||||
const api_booking_users_index = require("../../api/booking/users/index.js");
|
||||
const api_booking_item_index = require("../../api/booking/item/index.js");
|
||||
const api_passport_login_index = require("../../api/passport/login/index.js");
|
||||
const api_shop_users_index = require("../../api/shop/users/index.js");
|
||||
const store_modules_tenant = require("../../store/modules/tenant.js");
|
||||
const tenantStore = store_modules_tenant.useTenantStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
items: ["关注", "推荐"],
|
||||
// 场馆列表
|
||||
merchant: [],
|
||||
// 网站参数
|
||||
fields: {},
|
||||
// 幻灯片广告
|
||||
ads: [],
|
||||
// 幻灯片链接地址
|
||||
pathList: [],
|
||||
// 项目列表
|
||||
itemList: [],
|
||||
// 小程序导航图标
|
||||
navigation: [],
|
||||
// 小程序导航图标(双排)
|
||||
doubleNavigation: [],
|
||||
isLogin: false,
|
||||
userInfo: {},
|
||||
// 骨架屏
|
||||
hideTools: true,
|
||||
mp_menu_display_method: 0,
|
||||
baseList: [
|
||||
{
|
||||
name: "photo",
|
||||
title: "李白"
|
||||
},
|
||||
{
|
||||
name: "lock",
|
||||
title: "韩信"
|
||||
},
|
||||
{
|
||||
name: "star",
|
||||
title: "刘备"
|
||||
},
|
||||
{
|
||||
name: "star",
|
||||
title: "元芳"
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
const app = this;
|
||||
const info = await tenantStore.fetchTenantInfo();
|
||||
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
|
||||
app.isLogin = true;
|
||||
if (!common_vendor.index.getStorageSync("openid")) {
|
||||
api_booking_users_index.getByPhone({
|
||||
phone: info.userInfo.phone
|
||||
}).then((data) => {
|
||||
if (data) {
|
||||
app.userInfo.ouid = data.uid;
|
||||
common_vendor.index.setStorageSync("ouid", data.uid);
|
||||
app.userInfo = Object.assign({}, app.userInfo, data);
|
||||
}
|
||||
});
|
||||
common_vendor.index.login({
|
||||
success: (res) => {
|
||||
api_passport_login_index.getWxOpenId({
|
||||
code: res.code
|
||||
}).then((response) => {
|
||||
common_vendor.index.setStorageSync("openid", response.openid);
|
||||
api_shop_users_index.updateUsers({
|
||||
uid: app.userInfo.ouid,
|
||||
openid: response.openid,
|
||||
sessionKey: response.session_key,
|
||||
unionid: response.unionid
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (info.fields) {
|
||||
info.fields.map((d) => {
|
||||
const key = d.name;
|
||||
app.fields[key] = d.value;
|
||||
if (d.name == "h5_url") {
|
||||
common_vendor.index.setStorageSync(d.name, d.value);
|
||||
}
|
||||
if (d.name == "mp_menu_display_method") {
|
||||
app.mp_menu_display_method = d.value;
|
||||
}
|
||||
});
|
||||
}
|
||||
if (info.ads) {
|
||||
const ad = info.ads.filter((d) => d.adType == "幻灯片");
|
||||
if (ad) {
|
||||
const adsList = JSON.parse(ad[0].images);
|
||||
adsList.map((d) => {
|
||||
app.ads.push(d.url);
|
||||
});
|
||||
app.pathList = JSON.parse(ad[0].path);
|
||||
}
|
||||
app.hideTools = false;
|
||||
}
|
||||
if (info.websiteName) {
|
||||
common_vendor.index.setNavigationBarTitle({
|
||||
title: info.websiteName
|
||||
});
|
||||
}
|
||||
if (info.websiteLogo) {
|
||||
common_vendor.index.setStorageSync("app_logo", info.websiteLogo);
|
||||
app.logo = info.websiteLogo;
|
||||
}
|
||||
if (info.mpMenus) {
|
||||
const arr = info.mpMenus.filter((d) => d.type == 2 && d.rows == 0);
|
||||
const arr1 = info.mpMenus.filter((d) => d.type == 2 && d.rows == 1);
|
||||
info.mpMenus.filter((d) => d.type == 2 && d.rows == 2);
|
||||
app.navigation = [];
|
||||
app.doubleNavigation = [];
|
||||
if (arr1) {
|
||||
app.doubleNavigation.push(arr);
|
||||
app.doubleNavigation.push(arr1);
|
||||
} else {
|
||||
app.doubleNavigation.push(arr);
|
||||
}
|
||||
if (arr) {
|
||||
app.navigation = arr;
|
||||
}
|
||||
}
|
||||
Promise.all([app.getMerchantList(), app.getItemList()]).then((res) => {
|
||||
app.merchant = res[0];
|
||||
app.itemList = res[1];
|
||||
});
|
||||
},
|
||||
getSiteInfo() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_layout_index.getSiteInfo().then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
listAdList() {
|
||||
},
|
||||
pageGoods() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_shop_goods_index.pageGoods({}).then((result) => {
|
||||
resolve(result.list);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
getMerchantList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_shop_merchant_index.listMerchant({}).then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
getItemList() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_booking_item_index.listItem({}).then((result) => {
|
||||
resolve(result);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
change(e) {
|
||||
const { index } = e.detail;
|
||||
const id = this.merchant[index].merchantId;
|
||||
this.openUrl(`/package/booking/index?id=${id}`);
|
||||
},
|
||||
onNavigation(e) {
|
||||
const { index } = e.detail;
|
||||
this.openUrl(this.navigation[index].path);
|
||||
},
|
||||
onItem(e) {
|
||||
const { index } = e.detail;
|
||||
this.openUrl(`/package/booking/merchant?type=` + this.itemList[index].id);
|
||||
},
|
||||
onAds(index) {
|
||||
const { pathList } = this;
|
||||
this.openUrl(pathList[index]);
|
||||
},
|
||||
openUrl(url) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
} else {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uv_swiper2 = common_vendor.resolveComponent("uv-swiper");
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uni_grid_item2 = common_vendor.resolveComponent("uni-grid-item");
|
||||
const _easycom_uni_grid2 = common_vendor.resolveComponent("uni-grid");
|
||||
const _easycom_uv_scroll_list2 = common_vendor.resolveComponent("uv-scroll-list");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
(_easycom_uv_gap2 + _easycom_uv_swiper2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uv_avatar2 + _easycom_uni_grid_item2 + _easycom_uni_grid2 + _easycom_uv_scroll_list2 + _easycom_ws_login2)();
|
||||
}
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uv_swiper = () => "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper.js";
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uni_grid_item = () => "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.js";
|
||||
const _easycom_uni_grid = () => "../../uni_modules/uni-grid/components/uni-grid/uni-grid.js";
|
||||
const _easycom_uv_scroll_list = () => "../../uni_modules/uv-scroll-list/components/uv-scroll-list/uv-scroll-list.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_gap + _easycom_uv_swiper + _easycom_uv_skeleton + _easycom_uni_card + _easycom_uv_avatar + _easycom_uni_grid_item + _easycom_uni_grid + _easycom_uv_scroll_list + _easycom_ws_login)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.ads.length > 0
|
||||
}, $data.ads.length > 0 ? {
|
||||
b: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
c: common_vendor.o($options.onAds),
|
||||
d: common_vendor.p({
|
||||
list: $data.ads,
|
||||
bgColor: "transparent",
|
||||
indicatorMode: "dot",
|
||||
indicator: true,
|
||||
circular: true,
|
||||
autoplay: false,
|
||||
radius: "5"
|
||||
})
|
||||
} : {
|
||||
e: common_vendor.p({
|
||||
rows: "3",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
border: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}, {
|
||||
g: $data.mp_menu_display_method == 0
|
||||
}, $data.mp_menu_display_method == 0 ? common_vendor.e({
|
||||
h: $data.navigation.length > 0
|
||||
}, $data.navigation.length > 0 ? {
|
||||
i: common_vendor.f($data.navigation, (item, index, i0) => {
|
||||
return {
|
||||
a: "83a5a03c-7-" + i0 + "," + ("83a5a03c-6-" + i0),
|
||||
b: common_vendor.p({
|
||||
src: item.icon
|
||||
}),
|
||||
c: common_vendor.t(item.title),
|
||||
d: index,
|
||||
e: "83a5a03c-6-" + i0 + ",83a5a03c-5",
|
||||
f: common_vendor.p({
|
||||
index
|
||||
})
|
||||
};
|
||||
}),
|
||||
j: common_vendor.o($options.onNavigation),
|
||||
k: common_vendor.p({
|
||||
column: 4,
|
||||
highlight: true,
|
||||
showBorder: false
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
})
|
||||
} : {
|
||||
m: common_vendor.p({
|
||||
rows: "3",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
border: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}) : {}, {
|
||||
o: $data.mp_menu_display_method == 1
|
||||
}, $data.mp_menu_display_method == 1 ? common_vendor.e({
|
||||
p: $data.navigation.length > 0
|
||||
}, $data.navigation.length > 0 ? {
|
||||
q: common_vendor.f($data.navigation, (item, index, i0) => {
|
||||
return {
|
||||
a: item.icon,
|
||||
b: common_vendor.t(item.title),
|
||||
c: common_vendor.o(($event) => $options.openUrl(item.path), index),
|
||||
d: index
|
||||
};
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
indicatorActiveColor: "rgb(16, 128, 1)"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
})
|
||||
} : {
|
||||
t: common_vendor.p({
|
||||
avatar: true,
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
border: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}) : {}, {
|
||||
w: $data.mp_menu_display_method == 2 && $data.navigation.length > 0
|
||||
}, $data.mp_menu_display_method == 2 && $data.navigation.length > 0 ? {
|
||||
x: common_vendor.f($data.doubleNavigation, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.f(item, (item1, index1, i1) => {
|
||||
return {
|
||||
a: item1.icon,
|
||||
b: common_vendor.t(item1.title),
|
||||
c: index1,
|
||||
d: common_vendor.n(index1 === item.length - 1 && "scroll-list__line__item--no-margin-right"),
|
||||
e: common_vendor.o(($event) => $options.openUrl(item1.path), index1)
|
||||
};
|
||||
}),
|
||||
b: index
|
||||
};
|
||||
}),
|
||||
y: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
})
|
||||
} : {}, {
|
||||
z: $data.itemList.length > 0
|
||||
}, $data.itemList.length > 0 ? {
|
||||
A: common_vendor.f($data.itemList, (item, index, i0) => {
|
||||
return {
|
||||
a: "83a5a03c-18-" + i0 + "," + ("83a5a03c-17-" + i0),
|
||||
b: common_vendor.p({
|
||||
src: item.image,
|
||||
size: 27,
|
||||
shape: "square",
|
||||
fontSize: "16",
|
||||
randomBgColor: true
|
||||
}),
|
||||
c: common_vendor.t(item.name),
|
||||
d: index,
|
||||
e: "83a5a03c-17-" + i0 + ",83a5a03c-16",
|
||||
f: common_vendor.p({
|
||||
index
|
||||
})
|
||||
};
|
||||
}),
|
||||
B: common_vendor.o($options.onItem),
|
||||
C: common_vendor.p({
|
||||
column: 5,
|
||||
highlight: true,
|
||||
showBorder: false
|
||||
})
|
||||
} : {
|
||||
D: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
border: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}, {
|
||||
F: $data.merchant.length > 0
|
||||
}, $data.merchant.length > 0 ? {
|
||||
G: common_vendor.f($data.merchant, (item, index, i0) => {
|
||||
return {
|
||||
a: item.image,
|
||||
b: common_vendor.t(item.merchantName),
|
||||
c: index,
|
||||
d: "83a5a03c-22-" + i0 + ",83a5a03c-21",
|
||||
e: common_vendor.p({
|
||||
index
|
||||
})
|
||||
};
|
||||
}),
|
||||
H: common_vendor.o($options.change),
|
||||
I: common_vendor.p({
|
||||
column: 3,
|
||||
borderColor: "transparent",
|
||||
highlight: true
|
||||
})
|
||||
} : {
|
||||
J: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
K: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
L: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
M: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
N: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
O: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
P: common_vendor.p({
|
||||
rows: "2",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
Q: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
R: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
})
|
||||
}, {
|
||||
S: common_vendor.sr("login", "83a5a03c-32"),
|
||||
T: common_vendor.o($options.reload),
|
||||
U: common_vendor.p({
|
||||
logo: _ctx.logo
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-83a5a03c"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/pages/index/index.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"navigationBarTitleText": "广西体育中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uv-swiper": "../../uni_modules/uv-swiper/components/uv-swiper/uv-swiper",
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uni-grid-item": "../../uni_modules/uni-grid/components/uni-grid-item/uni-grid-item",
|
||||
"uni-grid": "../../uni_modules/uni-grid/components/uni-grid/uni-grid",
|
||||
"uv-scroll-list": "../../uni_modules/uv-scroll-list/components/uv-scroll-list/uv-scroll-list",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
|
||||
}
|
||||
}
|
||||
+1
File diff suppressed because one or more lines are too long
+223
@@ -0,0 +1,223 @@
|
||||
|
||||
page {
|
||||
/* background: url('https://oss.wsdns.cn/20240502/75fc744657544a38a32f83a825688286.png') no-repeat; */
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.segmented.data-v-83a5a03c {
|
||||
display: block;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
margin: auto;
|
||||
color: #ffffff;
|
||||
}
|
||||
.segmented .item.data-v-83a5a03c {
|
||||
color: #666;
|
||||
font-size: 26rpx;
|
||||
padding: 0 12rpx;
|
||||
}
|
||||
.segmented .active.data-v-83a5a03c {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
}
|
||||
.user-oreder.data-v-83a5a03c {
|
||||
display: flex;
|
||||
padding: 16px 0;
|
||||
}
|
||||
.user-oreder .scroll-item.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
.user-oreder .scroll-item .scrool-item-text.data-v-83a5a03c {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.user-oreder .web-cell-content.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.user-oreder .web-text-center.data-v-83a5a03c {
|
||||
text-align: center;
|
||||
}
|
||||
.menu-list.data-v-83a5a03c {
|
||||
display: flex;
|
||||
padding: 16px 0;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.menu-list .scroll-item.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
.menu-list .scroll-item .scrool-item-text.data-v-83a5a03c {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.menu-list .web-cell-content.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.menu-list .web-text-center.data-v-83a5a03c {
|
||||
text-align: center;
|
||||
}
|
||||
.menu-list .menu-title.data-v-83a5a03c {
|
||||
white-space: nowrap;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.menu-list .grid-item-box.data-v-83a5a03c {
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
}
|
||||
.card-title.data-v-83a5a03c {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.merchant-card-title.data-v-83a5a03c {
|
||||
width: 700rpx;
|
||||
margin: 12rpx auto;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.card-body.data-v-83a5a03c {
|
||||
width: 740rpx;
|
||||
margin: auto;
|
||||
}
|
||||
.card-body .merchant-card.data-v-83a5a03c {
|
||||
margin: 12rpx auto;
|
||||
background: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
border-color: slategrey;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
.card-body .merchant-card .merchant-image.data-v-83a5a03c {
|
||||
width: 200rpx;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
height: 140rpx !important;
|
||||
}
|
||||
.card-body .merchant-card .merchant-name.data-v-83a5a03c {
|
||||
padding: 10rpx;
|
||||
font-weight: 500;
|
||||
font-size: 26rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.card-body .merchant-card .merchant-desc.data-v-83a5a03c {
|
||||
width: 400rpx;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.item-list.data-v-83a5a03c {
|
||||
width: 710rpx;
|
||||
margin: auto;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.item-list .item-bar.data-v-83a5a03c {
|
||||
width: 145rpx;
|
||||
height: 145rpx;
|
||||
padding: 10rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
margin: 10rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
.navigation.data-v-83a5a03c {
|
||||
padding: 0 30rpx 0 30rpx;
|
||||
}
|
||||
.scroll-list.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.scroll-list__item.data-v-83a5a03c {
|
||||
margin-right: 20px;
|
||||
}
|
||||
.scroll-list__item__image.data-v-83a5a03c {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.scroll-list__item__text.data-v-83a5a03c {
|
||||
color: #808080;
|
||||
text-align: center;
|
||||
font-size: 12px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
.scroll-list__line.data-v-83a5a03c {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.scroll-list__line__item.data-v-83a5a03c {
|
||||
margin-right: 30px;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.scroll-list__line__item__image.data-v-83a5a03c {
|
||||
width: 61px;
|
||||
height: 48px;
|
||||
}
|
||||
.scroll-list__line__item__text.data-v-83a5a03c {
|
||||
margin-top: 5px;
|
||||
color: #808080;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.scroll-list__line__item--no-margin-right.data-v-83a5a03c {
|
||||
margin-right: 0;
|
||||
}
|
||||
.scroll-list__line__item__text.data-v-83a5a03c {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* 单元格 */
|
||||
+380
@@ -0,0 +1,380 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_shop_order_index = require("../../api/shop/order/index.js");
|
||||
const api_shop_wechatDeposit_index = require("../../api/shop/wechatDeposit/index.js");
|
||||
const utils_common = require("../../utils/common.js");
|
||||
const _sfc_main = {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
isRefresh: false,
|
||||
isLogin: false,
|
||||
userId: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
type: 1,
|
||||
// 0商城订单 1场地预定
|
||||
sceneType: "showOrderInfo"
|
||||
// 查询订单附加场地信息
|
||||
},
|
||||
canReset: false,
|
||||
loadMore: "more",
|
||||
logo: "",
|
||||
items: ["全部订单", "未支付", "已支付", "已完成", "押金"],
|
||||
orderList: [],
|
||||
styles: [
|
||||
{
|
||||
value: "button",
|
||||
text: "按钮",
|
||||
checked: true
|
||||
},
|
||||
{
|
||||
value: "text",
|
||||
text: "文字"
|
||||
}
|
||||
],
|
||||
colors: ["#333333", "#4cd964", "#dd524d"],
|
||||
current: 0,
|
||||
colorIndex: 0,
|
||||
activeColor: "#108001",
|
||||
styleType: "text",
|
||||
getWeek: utils_common.getWeek,
|
||||
// 骨架屏
|
||||
hideTools: true
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
this.openLogin();
|
||||
},
|
||||
onShow(e) {
|
||||
this.openLogin();
|
||||
this.reload();
|
||||
},
|
||||
// 触底函数
|
||||
onReachBottom() {
|
||||
const app = this;
|
||||
const {
|
||||
where
|
||||
} = this;
|
||||
if (app.canReset) {
|
||||
app.where.page = ++where.page;
|
||||
app.reload();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reload() {
|
||||
const app = this;
|
||||
const {
|
||||
where,
|
||||
userId
|
||||
} = this;
|
||||
if (userId == 0) {
|
||||
app.openLogin();
|
||||
return;
|
||||
}
|
||||
where.userId = userId;
|
||||
app.loadMore = "loading";
|
||||
api_shop_order_index.pageOrder(where).then((res) => {
|
||||
const list = res.list.map((d) => {
|
||||
console.log(d);
|
||||
return d;
|
||||
});
|
||||
if (app.orderList.length < res.count) {
|
||||
console.log("11111: ", 11111);
|
||||
app.orderList = app.orderList.concat(list);
|
||||
app.canReset = true;
|
||||
app.loadMore = "no-more";
|
||||
} else {
|
||||
app.canReset = false;
|
||||
app.loadMore = "no-more";
|
||||
console.log("22222: ", 22222);
|
||||
}
|
||||
common_vendor.index.hideLoading();
|
||||
app.isRefresh = false;
|
||||
}).catch(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "请检查您的网络.",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
app.isRefresh = false;
|
||||
});
|
||||
},
|
||||
onClickItem(e) {
|
||||
const app = this;
|
||||
const {
|
||||
where,
|
||||
userId
|
||||
} = this;
|
||||
const index = e.currentIndex;
|
||||
if (this.current !== e.currentIndex) {
|
||||
this.current = e.currentIndex;
|
||||
}
|
||||
if (userId === 0) {
|
||||
app.openLogin();
|
||||
return;
|
||||
}
|
||||
if (index === 0) {
|
||||
where.payStatus = void 0;
|
||||
where.orderStatus = void 0;
|
||||
}
|
||||
if (index === 1) {
|
||||
where.payStatus = 0;
|
||||
where.orderStatus = void 0;
|
||||
}
|
||||
if (index === 2) {
|
||||
where.payStatus = 1;
|
||||
}
|
||||
if (index === 3) {
|
||||
where.payStatus = 1;
|
||||
where.orderStatus = 1;
|
||||
}
|
||||
if (index === 4) {
|
||||
api_shop_wechatDeposit_index.pageWechatDeposit({
|
||||
uid: common_vendor.index.getStorageSync("user_id")
|
||||
}).then((res) => {
|
||||
app.orderList = res.list;
|
||||
if (res.count == 0) {
|
||||
app.loadMore = "no-more";
|
||||
}
|
||||
common_vendor.index.hideLoading();
|
||||
});
|
||||
return false;
|
||||
}
|
||||
this.where.page = 1;
|
||||
this.orderList = [];
|
||||
this.reload();
|
||||
},
|
||||
openUrl(url) {
|
||||
common_vendor.index.navigateTo({
|
||||
url
|
||||
});
|
||||
},
|
||||
toPay(orderId) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/booking/confirm?id=" + orderId
|
||||
});
|
||||
},
|
||||
closeOrder(item) {
|
||||
common_vendor.index.showModal({
|
||||
title: "确定取消此订单?",
|
||||
success(o) {
|
||||
if (o.confirm) {
|
||||
api_shop_order_index.updateOrder({
|
||||
orderStatus: 2,
|
||||
orderId: item.orderId
|
||||
}).then((msg) => {
|
||||
common_vendor.index.showToast({
|
||||
title: msg,
|
||||
icon: "none"
|
||||
});
|
||||
item.orderStatus = 2;
|
||||
}).catch(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "请检查您的网络.",
|
||||
icon: "none"
|
||||
});
|
||||
common_vendor.index.hideLoading();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 弹出登录提示框
|
||||
async openLogin() {
|
||||
this.userId = common_vendor.index.getStorageSync("user_id");
|
||||
if (!this.userId) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
// 申请开票
|
||||
onInvoice(id) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/user/invoice?id=" + id
|
||||
});
|
||||
},
|
||||
showInvoice(id) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: `/package/user/invoice-show?id=${id}`
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uni_segmented_control2 = common_vendor.resolveComponent("uni-segmented-control");
|
||||
const _easycom_uv_avatar2 = common_vendor.resolveComponent("uv-avatar");
|
||||
const _easycom_uv_count_down2 = common_vendor.resolveComponent("uv-count-down");
|
||||
const _easycom_uv_cell2 = common_vendor.resolveComponent("uv-cell");
|
||||
const _easycom_uv_cell_group2 = common_vendor.resolveComponent("uv-cell-group");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
const _easycom_uni_load_more2 = common_vendor.resolveComponent("uni-load-more");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
(_easycom_uni_segmented_control2 + _easycom_uv_avatar2 + _easycom_uv_count_down2 + _easycom_uv_cell2 + _easycom_uv_cell_group2 + _easycom_uni_card2 + _easycom_uv_skeleton2 + _easycom_uv_gap2 + _easycom_uni_load_more2 + _easycom_ws_login2)();
|
||||
}
|
||||
const _easycom_uni_segmented_control = () => "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.js";
|
||||
const _easycom_uv_avatar = () => "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar.js";
|
||||
const _easycom_uv_count_down = () => "../../uni_modules/uv-count-down/components/uv-count-down/uv-count-down.js";
|
||||
const _easycom_uv_cell = () => "../../uni_modules/uv-cell/components/uv-cell/uv-cell.js";
|
||||
const _easycom_uv_cell_group = () => "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
const _easycom_uni_load_more = () => "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
if (!Math) {
|
||||
(_easycom_uni_segmented_control + _easycom_uv_avatar + _easycom_uv_count_down + _easycom_uv_cell + _easycom_uv_cell_group + _easycom_uni_card + _easycom_uv_skeleton + _easycom_uv_gap + _easycom_uni_load_more + _easycom_ws_login)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.o($options.onClickItem),
|
||||
b: common_vendor.p({
|
||||
current: $data.current,
|
||||
values: $data.items,
|
||||
styleType: $data.styleType,
|
||||
activeColor: $data.activeColor,
|
||||
inActiveColor: "#808080"
|
||||
}),
|
||||
c: $data.orderList.length > 0
|
||||
}, $data.orderList.length > 0 ? {
|
||||
d: common_vendor.f($data.orderList, (item, index, i0) => {
|
||||
return common_vendor.e({
|
||||
a: "1317716d-2-" + i0 + "," + ("1317716d-1-" + i0),
|
||||
b: common_vendor.p({
|
||||
src: item.merchantAvatar,
|
||||
size: "24"
|
||||
}),
|
||||
c: common_vendor.t(item.merchantName),
|
||||
d: item.orderStatus == 2
|
||||
}, item.orderStatus == 2 ? {} : item.orderStatus == 1 ? {} : common_vendor.e({
|
||||
f: item.payStatus == 1
|
||||
}, item.payStatus == 1 ? {} : {}, {
|
||||
g: item.payStatus == 0
|
||||
}, item.payStatus == 0 ? {
|
||||
h: "1317716d-3-" + i0 + "," + ("1317716d-1-" + i0),
|
||||
i: common_vendor.p({
|
||||
time: item.timestamp,
|
||||
format: "mm:ss"
|
||||
})
|
||||
} : {}), {
|
||||
e: item.orderStatus == 1,
|
||||
j: common_vendor.f(item.orderInfo, (sub, subIndex, i1) => {
|
||||
return {
|
||||
a: common_vendor.o(($event) => $options.openUrl(`/package/order/detail?id=${item.orderId}`), subIndex),
|
||||
b: "1317716d-5-" + i0 + "-" + i1 + "," + ("1317716d-4-" + i0),
|
||||
c: common_vendor.p({
|
||||
title: `${sub.fieldName}`,
|
||||
label: `${sub.comments}`,
|
||||
cellStyle: {
|
||||
padding: "0",
|
||||
paddingBottom: "5px"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
d: subIndex
|
||||
};
|
||||
}),
|
||||
k: "1317716d-4-" + i0 + "," + ("1317716d-1-" + i0),
|
||||
l: common_vendor.t(item.totalPrice),
|
||||
m: common_vendor.t(item.payPrice),
|
||||
n: item.payStatus == 0 && item.orderStatus == 0
|
||||
}, item.payStatus == 0 && item.orderStatus == 0 ? {
|
||||
o: common_vendor.o(($event) => $options.closeOrder(item), index),
|
||||
p: common_vendor.o(($event) => $options.toPay(item.orderId), index)
|
||||
} : {}, {
|
||||
q: item.payStatus == 1
|
||||
}, item.payStatus == 1 ? common_vendor.e({
|
||||
r: item.isInvoice == 0
|
||||
}, item.isInvoice == 0 ? {
|
||||
s: common_vendor.o(($event) => $options.onInvoice(item.orderId), index)
|
||||
} : {
|
||||
t: common_vendor.o(($event) => $options.showInvoice(item.orderId), index)
|
||||
}) : {}, {
|
||||
v: "1317716d-1-" + i0,
|
||||
w: index
|
||||
});
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
customStyle: {
|
||||
backgroundColor: "#ffffff"
|
||||
},
|
||||
border: false
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
border: false,
|
||||
["is-shadow"]: false,
|
||||
padding: 0
|
||||
})
|
||||
} : {}, {
|
||||
g: $data.orderList.length == 0 && $data.loadMore != "no-more"
|
||||
}, $data.orderList.length == 0 && $data.loadMore != "no-more" ? {
|
||||
h: common_vendor.p({
|
||||
rows: "3",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
i: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
j: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
k: common_vendor.p({
|
||||
rows: "3",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
l: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
n: common_vendor.p({
|
||||
rows: "3",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
rows: "3",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
})
|
||||
} : {}, {
|
||||
t: $data.orderList.length > 0
|
||||
}, $data.orderList.length > 0 ? {
|
||||
v: common_vendor.p({
|
||||
status: $data.loadMore
|
||||
})
|
||||
} : {}, {
|
||||
w: common_vendor.sr("login", "1317716d-19"),
|
||||
x: common_vendor.o($options.reload),
|
||||
y: common_vendor.p({
|
||||
logo: $data.logo
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/pages/order/order.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uni-segmented-control": "../../uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control",
|
||||
"uv-avatar": "../../uni_modules/uv-avatar/components/uv-avatar/uv-avatar",
|
||||
"uv-count-down": "../../uni_modules/uv-count-down/components/uv-count-down/uv-count-down",
|
||||
"uv-cell": "../../uni_modules/uv-cell/components/uv-cell/uv-cell",
|
||||
"uv-cell-group": "../../uni_modules/uv-cell/components/uv-cell-group/uv-cell-group",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap",
|
||||
"uni-load-more": "../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login"
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view><view class="segmented"><uni-segmented-control wx:if="{{b}}" bindclickItem="{{a}}" u-i="1317716d-0" bind:__l="__l" u-p="{{b}}"/></view><view class="order"><block wx:if="{{c}}"><block wx:for="{{d}}" wx:for-item="item" wx:key="w"><uni-card wx:if="{{f}}" u-s="{{['title','d']}}" u-i="{{item.v}}" bind:__l="__l" u-p="{{f}}"><view class="order-title web-cell" slot="title"><view class="web-cell web-cell-content"><view class="merchant-avatar"><uv-avatar wx:if="{{item.b}}" u-i="{{item.a}}" bind:__l="__l" u-p="{{item.b}}"></uv-avatar></view><text class="merchant-name">{{item.c}}</text></view><block wx:if="{{item.d}}"><text class="btn-status web-text-secondary">已取消</text></block><block wx:elif="{{item.e}}"><text class="btn-status web-text-success">已完成</text></block><block wx:else><text wx:if="{{item.f}}" class="btn-status web-text-success">已支付</text><view wx:if="{{item.g}}" class="btn-status web-text-danger"><uv-count-down wx:if="{{item.i}}" u-i="{{item.h}}" bind:__l="__l" u-p="{{item.i}}"></uv-count-down><text class="no-pay" style="margin-left:10rpx">未支付</text></view></block></view><view class="order-body web-cell web-cell-align-top"><view class="web-cell-content"><uv-cell-group wx:if="{{e}}" u-s="{{['d']}}" u-i="{{item.k}}" bind:__l="__l" u-p="{{e}}"><block wx:for="{{item.j}}" wx:for-item="sub" wx:key="d"><uv-cell wx:if="{{sub.c}}" bindclick="{{sub.a}}" u-i="{{sub.b}}" bind:__l="__l" u-p="{{sub.c}}"/></block></uv-cell-group><view class="total-price"><view class="web-text-heading">合计:¥{{item.l}}</view><view class="web-text-heading" style="font-weight:500"> 实付:¥{{item.m}}</view></view></view></view><view slot="actions" class="card-actions"><view wx:if="{{item.n}}" class="card-actions-item"><button class="mini-btn" size="mini" bindtap="{{item.o}}" style="margin-right:20rpx">取消订单</button><button class="mini-btn" type="primary" size="mini" bindtap="{{item.p}}">去支付</button></view><view wx:if="{{item.q}}" class="card-actions-item"><button wx:if="{{item.r}}" class="mini-btn" size="mini" bindtap="{{item.s}}">申请开票</button><button wx:else class="mini-btn" size="mini" bindtap="{{item.t}}">查看发票</button></view></view></uni-card></block></block><block wx:if="{{g}}"><uni-card wx:if="{{j}}" u-s="{{['d']}}" u-i="1317716d-6" bind:__l="__l" u-p="{{j}}"><uv-skeleton wx:if="{{h}}" u-i="1317716d-7,1317716d-6" bind:__l="__l" u-p="{{h}}"></uv-skeleton><uv-gap wx:if="{{i}}" u-i="1317716d-8,1317716d-6" bind:__l="__l" u-p="{{i}}"></uv-gap></uni-card><uni-card wx:if="{{m}}" u-s="{{['d']}}" u-i="1317716d-9" bind:__l="__l" u-p="{{m}}"><uv-skeleton wx:if="{{k}}" u-i="1317716d-10,1317716d-9" bind:__l="__l" u-p="{{k}}"></uv-skeleton><uv-gap wx:if="{{l}}" u-i="1317716d-11,1317716d-9" bind:__l="__l" u-p="{{l}}"></uv-gap></uni-card><uni-card wx:if="{{p}}" u-s="{{['d']}}" u-i="1317716d-12" bind:__l="__l" u-p="{{p}}"><uv-skeleton wx:if="{{n}}" u-i="1317716d-13,1317716d-12" bind:__l="__l" u-p="{{n}}"></uv-skeleton><uv-gap wx:if="{{o}}" u-i="1317716d-14,1317716d-12" bind:__l="__l" u-p="{{o}}"></uv-gap></uni-card><uni-card wx:if="{{s}}" u-s="{{['d']}}" u-i="1317716d-15" bind:__l="__l" u-p="{{s}}"><uv-skeleton wx:if="{{q}}" u-i="1317716d-16,1317716d-15" bind:__l="__l" u-p="{{q}}"></uv-skeleton><uv-gap wx:if="{{r}}" u-i="1317716d-17,1317716d-15" bind:__l="__l" u-p="{{r}}"></uv-gap></uni-card></block><uni-load-more wx:if="{{t}}" u-i="1317716d-18" bind:__l="__l" u-p="{{v}}"></uni-load-more><ws-login wx:if="{{y}}" class="r" u-r="login" binddone="{{x}}" u-i="1317716d-19" bind:__l="__l" u-p="{{y}}"/></view></view>
|
||||
+97
@@ -0,0 +1,97 @@
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.content {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 150px;
|
||||
text-align: center;
|
||||
}
|
||||
.segmented {
|
||||
padding: 0 12rpx;
|
||||
}
|
||||
.content-text {
|
||||
font-size: 14px;
|
||||
color: #666;
|
||||
}
|
||||
.color-tag {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
.uni-list {
|
||||
flex: 1;
|
||||
}
|
||||
.order .order-title {
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px #eee solid;
|
||||
}
|
||||
.order .order-title .merchant-avatar {
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
.order .order-title .btn-status {
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
}
|
||||
.order .order-body {
|
||||
padding: 16px 0;
|
||||
}
|
||||
.ele-flex {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.card-actions {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
height: 45px;
|
||||
border-top: 1px #eee solid;
|
||||
}
|
||||
.card-actions-item {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
}
|
||||
.card-actions-item-text {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.close {
|
||||
top: 60rpx !important;
|
||||
}
|
||||
.total-price {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
font-size: 30rpx;
|
||||
align-items: flex-start;
|
||||
padding-left: 6rpx;
|
||||
margin-left: 450rpx;
|
||||
}
|
||||
.total-price .web-text-heading {
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
+373
@@ -0,0 +1,373 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const api_shop_goods_index = require("../../api/shop/goods/index.js");
|
||||
const api_shop_goodsCategory_index = require("../../api/shop/goodsCategory/index.js");
|
||||
const uni_modules_uvUiTools_libs_function_index = require("../../uni_modules/uv-ui-tools/libs/function/index.js");
|
||||
const store_modules_tenant = require("../../store/modules/tenant.js");
|
||||
const tenantStore = store_modules_tenant.useTenantStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
goodsList: [],
|
||||
// 瀑布流全部数据
|
||||
list1: [],
|
||||
// 瀑布流第一列数据
|
||||
list2: [],
|
||||
// 瀑布流第二列数据
|
||||
goodsCategoryList: [],
|
||||
// 商品分类
|
||||
leftGap: 10,
|
||||
rightGap: 10,
|
||||
columnGap: 10,
|
||||
// 小程序导航图标
|
||||
navigation: [],
|
||||
// 骨架屏
|
||||
hideTools: true,
|
||||
// 商品分类
|
||||
categoryId: void 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
imageStyle(item) {
|
||||
return (item2) => {
|
||||
const v = common_vendor.index.upx2px(750) - this.leftGap - this.rightGap - this.columnGap;
|
||||
const w = v / 2;
|
||||
const rate = w / item2.w;
|
||||
const h = rate * item2.h;
|
||||
return {
|
||||
width: w + "px",
|
||||
height: h + "px"
|
||||
};
|
||||
};
|
||||
}
|
||||
},
|
||||
async onLoad() {
|
||||
const info = await tenantStore.fetchTenantInfo();
|
||||
if (info.mpMenus) {
|
||||
const arr1 = info.mpMenus.filter((d) => d.type == 3);
|
||||
console.log("info.mpMenus: ", arr1);
|
||||
if (arr1) {
|
||||
this.navigation = arr1;
|
||||
}
|
||||
}
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload() {
|
||||
const app = this;
|
||||
const info = await tenantStore.fetchTenantInfo();
|
||||
if (common_vendor.index.getStorageSync("user_id") && common_vendor.index.getStorageSync("access_token")) {
|
||||
app.isLogin = true;
|
||||
}
|
||||
if (info.mpMenus) {
|
||||
const arr1 = info.mpMenus.filter((d) => d.type == 3);
|
||||
console.log("info.mpMenus: ", arr1);
|
||||
if (arr1) {
|
||||
app.navigation = arr1;
|
||||
}
|
||||
}
|
||||
Promise.all([app.pageGoods(), app.getGoodsCategory()]).then((res) => {
|
||||
app.goodsList = res[0];
|
||||
app.goodsCategoryList = res[1];
|
||||
app.hideTools = false;
|
||||
});
|
||||
},
|
||||
pageGoods() {
|
||||
const { categoryId } = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
api_shop_goods_index.pageGoods({ parentId: categoryId }).then((result) => {
|
||||
resolve(result.list);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
getGoodsCategory() {
|
||||
return new Promise((resolve, reject) => {
|
||||
api_shop_goodsCategory_index.pageGoodsCategory({ parentId: 0 }).then((result) => {
|
||||
resolve(result.list);
|
||||
}).catch(reject);
|
||||
});
|
||||
},
|
||||
navTo(item) {
|
||||
common_vendor.index.navigateTo({
|
||||
url: "/package/goods/detail?id=" + item.goodsId
|
||||
});
|
||||
},
|
||||
onCategory(item) {
|
||||
this.categoryId = item.categoryId;
|
||||
this.goodsList = [];
|
||||
this.list1 = [];
|
||||
this.list2 = [];
|
||||
this.reload();
|
||||
},
|
||||
// 这点非常重要:e.name在这里返回是list1或list2,要手动将数据追加到相应列
|
||||
changeList(e) {
|
||||
console.log("e: ", e);
|
||||
this[e.name].push(e.value);
|
||||
},
|
||||
// 模拟的后端数据
|
||||
getData() {
|
||||
return new Promise((resolve) => {
|
||||
const imgs = [
|
||||
{
|
||||
url: "https://via.placeholder.com/100x110.png/3c9cff/fff",
|
||||
width: 100,
|
||||
height: 110
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/200x220.png/f9ae3d/fff",
|
||||
width: 200,
|
||||
height: 220
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/300x340.png/5ac725/fff",
|
||||
width: 300,
|
||||
height: 340
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/400x400.png/f56c6c/fff",
|
||||
width: 400,
|
||||
height: 400
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/500x510.png/909399/fff",
|
||||
width: 500,
|
||||
height: 510
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/600x606.png/3c9cff/fff",
|
||||
width: 600,
|
||||
height: 606
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/310x422.png/f1a532/fff",
|
||||
width: 310,
|
||||
height: 422
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/320x430.png/3c9cff/fff",
|
||||
width: 320,
|
||||
height: 430
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/330x424.png/f9ae3d/fff",
|
||||
width: 330,
|
||||
height: 424
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/340x435.png/5ac725/fff",
|
||||
width: 340,
|
||||
height: 435
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/350x440.png/f56c6c/fff",
|
||||
width: 350,
|
||||
height: 440
|
||||
},
|
||||
{
|
||||
url: "https://via.placeholder.com/380x470.png/909399/fff",
|
||||
width: 380,
|
||||
height: 470
|
||||
}
|
||||
];
|
||||
let list = [];
|
||||
const doFn = (i) => {
|
||||
const randomIndex = Math.floor(Math.random() * 10);
|
||||
return {
|
||||
id: uni_modules_uvUiTools_libs_function_index.guid(),
|
||||
allowEdit: i == 0,
|
||||
image: imgs[randomIndex].url,
|
||||
w: imgs[randomIndex].width,
|
||||
h: imgs[randomIndex].height,
|
||||
title: i % 2 == 0 ? `(${this.list.length + i + 1})体验uv-ui框架` : `(${this.list.length + i + 1})uv-ui支持多平台`,
|
||||
desc: i % 2 == 0 ? `(${this.list.length + i + 1})欢迎使用uv-ui,uni-app生态专用的UI框架` : `(${this.list.length + i})开发者编写一套代码, 可发布到iOS、Android、H5、以及各种小程序`
|
||||
};
|
||||
};
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < 20; i++) {
|
||||
list.push(doFn(i));
|
||||
}
|
||||
resolve({
|
||||
data: list
|
||||
});
|
||||
}, 200);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_uv_waterfall2 = common_vendor.resolveComponent("uv-waterfall");
|
||||
const _easycom_uv_gap2 = common_vendor.resolveComponent("uv-gap");
|
||||
(_easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_uv_waterfall2 + _easycom_uv_gap2)();
|
||||
}
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_uv_waterfall = () => "../../uni_modules/uv-waterfall/components/uv-waterfall/uv-waterfall.js";
|
||||
const _easycom_uv_gap = () => "../../uni_modules/uv-gap/components/uv-gap/uv-gap.js";
|
||||
if (!Math) {
|
||||
(_easycom_uv_skeleton + _easycom_uni_card + _easycom_uv_waterfall + _easycom_uv_gap)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: $data.navigation.length > 0
|
||||
}, $data.navigation.length > 0 ? {
|
||||
b: common_vendor.f($data.goodsCategoryList, (item, index, i0) => {
|
||||
return {
|
||||
a: item.image,
|
||||
b: common_vendor.t(item.title),
|
||||
c: common_vendor.o(($event) => $options.onCategory(item), index),
|
||||
d: index
|
||||
};
|
||||
})
|
||||
} : {
|
||||
c: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
d: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
e: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
border: false,
|
||||
padding: "12px 4px"
|
||||
})
|
||||
}, {
|
||||
h: !$data.hideTools
|
||||
}, !$data.hideTools ? {
|
||||
i: common_vendor.f($data.list1, (item, index, i0) => {
|
||||
return {
|
||||
a: item.image ? JSON.parse(item.image)[0] : [],
|
||||
b: item.width + "px",
|
||||
c: common_vendor.s($options.imageStyle(item)),
|
||||
d: common_vendor.o(($event) => $options.navTo(item), item.id),
|
||||
e: common_vendor.t(item.goodsName),
|
||||
f: common_vendor.o(($event) => $options.navTo(item), item.id),
|
||||
g: common_vendor.t(item.price),
|
||||
h: item.id
|
||||
};
|
||||
}),
|
||||
j: common_vendor.f($data.list2, (item, index, i0) => {
|
||||
return {
|
||||
a: item.image ? JSON.parse(item.image)[0] : [],
|
||||
b: item.width + "px",
|
||||
c: common_vendor.s($options.imageStyle(item)),
|
||||
d: common_vendor.o(($event) => $options.navTo(item), item.id),
|
||||
e: common_vendor.t(item.goodsName),
|
||||
f: common_vendor.o(($event) => $options.navTo(item), item.id),
|
||||
g: common_vendor.t(item.price),
|
||||
h: item.id
|
||||
};
|
||||
}),
|
||||
k: common_vendor.sr("waterfall", "111bd4f2-5"),
|
||||
l: common_vendor.o($options.changeList),
|
||||
m: common_vendor.o(($event) => $data.goodsList = $event),
|
||||
n: common_vendor.p({
|
||||
["add-time"]: 10,
|
||||
["left-gap"]: $data.leftGap,
|
||||
["right-gap"]: $data.rightGap,
|
||||
["column-gap"]: $data.columnGap,
|
||||
modelValue: $data.goodsList
|
||||
})
|
||||
} : {
|
||||
o: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
avatarShape: "square",
|
||||
avatarSize: "100",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
p: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
q: common_vendor.p({
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
r: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
s: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
avatarShape: "square",
|
||||
avatarSize: "100",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
t: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
v: common_vendor.p({
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
w: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
x: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
avatarShape: "square",
|
||||
avatarSize: "100",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
y: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
z: common_vendor.p({
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
A: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
}),
|
||||
B: common_vendor.p({
|
||||
rows: "0",
|
||||
avatar: true,
|
||||
avatarShape: "square",
|
||||
avatarSize: "100",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
C: common_vendor.p({
|
||||
height: "16"
|
||||
}),
|
||||
D: common_vendor.p({
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
E: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 6px"
|
||||
})
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-111bd4f2"], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/pages/shop/shop.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"navigationBarTitleText": "商城",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"uv-waterfall": "../../uni_modules/uv-waterfall/components/uv-waterfall/uv-waterfall",
|
||||
"uv-gap": "../../uni_modules/uv-gap/components/uv-gap/uv-gap"
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="waterfall data-v-111bd4f2"><block wx:if="{{a}}"><view class="user-oreder web-cell data-v-111bd4f2"><block wx:for="{{b}}" wx:for-item="item" wx:key="d"><view class="web-cell-content web-text-center data-v-111bd4f2" bindtap="{{item.c}}"><image class="data-v-111bd4f2" src="{{item.a}}" style="width:30px;height:30px" mode="widthFix"></image><text class="data-v-111bd4f2">{{item.b}}</text></view></block></view></block><block wx:else><uni-card wx:if="{{g}}" class="data-v-111bd4f2" u-s="{{['d']}}" u-i="111bd4f2-0" bind:__l="__l" u-p="{{g}}"><view class="web-cell data-v-111bd4f2" style="justify-content:center;align-items:center"><uv-skeleton wx:if="{{c}}" class="data-v-111bd4f2" u-i="111bd4f2-1,111bd4f2-0" bind:__l="__l" u-p="{{c}}"></uv-skeleton><uv-skeleton wx:if="{{d}}" class="data-v-111bd4f2" u-i="111bd4f2-2,111bd4f2-0" bind:__l="__l" u-p="{{d}}"></uv-skeleton><uv-skeleton wx:if="{{e}}" class="data-v-111bd4f2" u-i="111bd4f2-3,111bd4f2-0" bind:__l="__l" u-p="{{e}}"></uv-skeleton><uv-skeleton wx:if="{{f}}" class="data-v-111bd4f2" u-i="111bd4f2-4,111bd4f2-0" bind:__l="__l" u-p="{{f}}"></uv-skeleton></view></uni-card></block><block wx:if="{{h}}"><view class="waterfall data-v-111bd4f2"><uv-waterfall wx:if="{{n}}" class="r data-v-111bd4f2" u-s="{{['list1','list2']}}" u-r="waterfall" bindchangeList="{{l}}" u-i="111bd4f2-5" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"><view slot="list1"><view class="data-v-111bd4f2"><view wx:for="{{i}}" wx:for-item="item" wx:key="h" class="waterfall-item data-v-111bd4f2"><view class="waterfall-item__image data-v-111bd4f2" style="{{item.c}}" bindtap="{{item.d}}"><image class="data-v-111bd4f2" src="{{item.a}}" mode="widthFix" style="{{'width:' + item.b}}"></image></view><view class="waterfall-item__ft data-v-111bd4f2"><view class="waterfall-item__ft__title data-v-111bd4f2" bindtap="{{item.f}}"><text class="value data-v-111bd4f2">{{item.e}}</text></view><view class="waterfall-item__ft__desc uv-line-2 data-v-111bd4f2"><text class="web-text-danger data-v-111bd4f2">¥{{item.g}}</text></view></view></view></view></view><view slot="list2"><view class="data-v-111bd4f2"><view wx:for="{{j}}" wx:for-item="item" wx:key="h" class="waterfall-item data-v-111bd4f2"><view class="waterfall-item__image data-v-111bd4f2" style="{{item.c}}" bindtap="{{item.d}}"><image class="data-v-111bd4f2" src="{{item.a}}" mode="widthFix" style="{{'width:' + item.b}}"></image></view><view class="waterfall-item__ft data-v-111bd4f2"><view class="waterfall-item__ft__title data-v-111bd4f2" bindtap="{{item.f}}"><text class="value data-v-111bd4f2">{{item.e}}</text></view><view class="waterfall-item__ft__desc uv-line-2 data-v-111bd4f2"><text class="web-text-danger data-v-111bd4f2">¥{{item.g}}</text></view></view></view></view></view></uv-waterfall></view></block><block wx:else><view class="skeleton data-v-111bd4f2" style="display:flex"><uni-card wx:if="{{r}}" class="data-v-111bd4f2" u-s="{{['d']}}" u-i="111bd4f2-6" bind:__l="__l" u-p="{{r}}"><uv-skeleton wx:if="{{o}}" class="data-v-111bd4f2" u-i="111bd4f2-7,111bd4f2-6" bind:__l="__l" u-p="{{o}}"></uv-skeleton><uv-gap wx:if="{{p}}" class="data-v-111bd4f2" u-i="111bd4f2-8,111bd4f2-6" bind:__l="__l" u-p="{{p}}"></uv-gap><uv-skeleton wx:if="{{q}}" class="data-v-111bd4f2" u-i="111bd4f2-9,111bd4f2-6" bind:__l="__l" u-p="{{q}}"></uv-skeleton></uni-card><uni-card wx:if="{{w}}" class="data-v-111bd4f2" u-s="{{['d']}}" u-i="111bd4f2-10" bind:__l="__l" u-p="{{w}}"><uv-skeleton wx:if="{{s}}" class="data-v-111bd4f2" u-i="111bd4f2-11,111bd4f2-10" bind:__l="__l" u-p="{{s}}"></uv-skeleton><uv-gap wx:if="{{t}}" class="data-v-111bd4f2" u-i="111bd4f2-12,111bd4f2-10" bind:__l="__l" u-p="{{t}}"></uv-gap><uv-skeleton wx:if="{{v}}" class="data-v-111bd4f2" u-i="111bd4f2-13,111bd4f2-10" bind:__l="__l" u-p="{{v}}"></uv-skeleton></uni-card></view><view class="skeleton data-v-111bd4f2" style="display:flex"><uni-card wx:if="{{A}}" class="data-v-111bd4f2" u-s="{{['d']}}" u-i="111bd4f2-14" bind:__l="__l" u-p="{{A}}"><uv-skeleton wx:if="{{x}}" class="data-v-111bd4f2" u-i="111bd4f2-15,111bd4f2-14" bind:__l="__l" u-p="{{x}}"></uv-skeleton><uv-gap wx:if="{{y}}" class="data-v-111bd4f2" u-i="111bd4f2-16,111bd4f2-14" bind:__l="__l" u-p="{{y}}"></uv-gap><uv-skeleton wx:if="{{z}}" class="data-v-111bd4f2" u-i="111bd4f2-17,111bd4f2-14" bind:__l="__l" u-p="{{z}}"></uv-skeleton></uni-card><uni-card wx:if="{{E}}" class="data-v-111bd4f2" u-s="{{['d']}}" u-i="111bd4f2-18" bind:__l="__l" u-p="{{E}}"><uv-skeleton wx:if="{{B}}" class="data-v-111bd4f2" u-i="111bd4f2-19,111bd4f2-18" bind:__l="__l" u-p="{{B}}"></uv-skeleton><uv-gap wx:if="{{C}}" class="data-v-111bd4f2" u-i="111bd4f2-20,111bd4f2-18" bind:__l="__l" u-p="{{C}}"></uv-gap><uv-skeleton wx:if="{{D}}" class="data-v-111bd4f2" u-i="111bd4f2-21,111bd4f2-18" bind:__l="__l" u-p="{{D}}"></uv-skeleton></uni-card></view></block></view>
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
|
||||
page {
|
||||
/* background: url('https://oss.wsdns.cn/20240505/eaa18a0271fa42aa8395bd5eb874808a.png') no-repeat; */
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* 这里是uni-app内置的常用样式变量
|
||||
*
|
||||
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
|
||||
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
|
||||
*
|
||||
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
|
||||
*/
|
||||
/* 颜色变量 */
|
||||
/* 行为相关颜色 */
|
||||
/* 文字基本颜色 */
|
||||
/* 背景颜色 */
|
||||
/* 边框颜色 */
|
||||
/* 尺寸变量 */
|
||||
/* 文字尺寸 */
|
||||
/* 图片尺寸 */
|
||||
/* Border Radius */
|
||||
/* 水平间距 */
|
||||
/* 垂直间距 */
|
||||
/* 透明度 */
|
||||
/* 文章场景相关 */
|
||||
.uv-line-1.data-v-111bd4f2 {
|
||||
display: -webkit-box !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical !important;
|
||||
}
|
||||
.uv-line-2.data-v-111bd4f2 {
|
||||
display: -webkit-box !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical !important;
|
||||
}
|
||||
.uv-line-3.data-v-111bd4f2 {
|
||||
display: -webkit-box !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical !important;
|
||||
}
|
||||
.uv-line-4.data-v-111bd4f2 {
|
||||
display: -webkit-box !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
-webkit-line-clamp: 4;
|
||||
-webkit-box-orient: vertical !important;
|
||||
}
|
||||
.uv-line-5.data-v-111bd4f2 {
|
||||
display: -webkit-box !important;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: break-all;
|
||||
-webkit-line-clamp: 5;
|
||||
-webkit-box-orient: vertical !important;
|
||||
}
|
||||
.waterfall-item.data-v-111bd4f2 {
|
||||
overflow: hidden;
|
||||
margin-top: 10px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.waterfall-item__image.data-v-111bd4f2 {
|
||||
background-color: #fff;
|
||||
}
|
||||
.waterfall-item__ft.data-v-111bd4f2 {
|
||||
padding: 20rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.waterfall-item__ft__title.data-v-111bd4f2 {
|
||||
margin-bottom: 10rpx;
|
||||
line-height: 48rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.waterfall-item__ft__title .value.data-v-111bd4f2 {
|
||||
font-size: 32rpx;
|
||||
color: #303133;
|
||||
}
|
||||
.waterfall-item__ft__desc .value.data-v-111bd4f2 {
|
||||
font-size: 28rpx;
|
||||
color: #606266;
|
||||
}
|
||||
.waterfall-item__ft__btn.data-v-111bd4f2 {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.user-oreder.data-v-111bd4f2 {
|
||||
width: 720rpx;
|
||||
margin: 20rpx auto 8rpx auto;
|
||||
padding: 28rpx 0;
|
||||
border-radius: 16rpx;
|
||||
background: #fff;
|
||||
}
|
||||
.user-oreder .web-cell-content.data-v-111bd4f2 {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.user-oreder .web-text-center.data-v-111bd4f2 {
|
||||
text-align: center;
|
||||
}
|
||||
+239
@@ -0,0 +1,239 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../common/vendor.js");
|
||||
const store_modules_user = require("../../store/modules/user.js");
|
||||
const api_booking_users_index = require("../../api/booking/users/index.js");
|
||||
const api_cms_mpMenu_index = require("../../api/cms/mp-menu/index.js");
|
||||
const api_booking_userCard_index = require("../../api/booking/userCard/index.js");
|
||||
const api_shop_users_index = require("../../api/shop/users/index.js");
|
||||
const utils_common = require("../../utils/common.js");
|
||||
const api_passport_login_index = require("../../api/passport/login/index.js");
|
||||
const store_modules_tenant = require("../../store/modules/tenant.js");
|
||||
const tenantStore = store_modules_tenant.useTenantStore();
|
||||
const userStore = store_modules_user.useUserStore();
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return {
|
||||
statusBarHeight: 104,
|
||||
isLogin: false,
|
||||
userInfo: {},
|
||||
fields: {},
|
||||
logo: "",
|
||||
bookingUser: {},
|
||||
merchantList: [],
|
||||
server: [],
|
||||
order: [],
|
||||
hideUser: true,
|
||||
hideTools: true,
|
||||
// 是否拥有场馆管理员权限
|
||||
hasMerchantRole: false,
|
||||
// 是否拥有场馆职员权限
|
||||
hasMerchantClerkRole: false,
|
||||
// 是否拥有超级管理员权限
|
||||
hasSuperAdminRole: false
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
this.reload();
|
||||
},
|
||||
methods: {
|
||||
async reload(e) {
|
||||
const app = this;
|
||||
common_vendor.index.getSystemInfo({
|
||||
success(data) {
|
||||
if (data) {
|
||||
app.statusBarHeight = data.statusBarHeight + 50;
|
||||
}
|
||||
}
|
||||
});
|
||||
const tenantInfo = await tenantStore.fetchTenantInfo();
|
||||
app.logo = tenantInfo.websiteLogo;
|
||||
if (tenantInfo.fields) {
|
||||
tenantInfo.fields.map((d) => {
|
||||
const key = d.name;
|
||||
app.fields[key] = d.value;
|
||||
});
|
||||
}
|
||||
const userInfo = await userStore.fetchUserInfo();
|
||||
if (Object.keys(userInfo).length > 0) {
|
||||
app.isLogin = true;
|
||||
app.userInfo = userInfo;
|
||||
common_vendor.index.setStorageSync("user_id", app.userInfo.userId);
|
||||
app.hasMerchantRole = userInfo.roles.find((d) => d.roleCode === "merchant");
|
||||
app.hasMerchantClerkRole = userInfo.roles.find((d) => d.roleCode === "merchantClerk");
|
||||
app.hasSuperAdminRole = userInfo.roles.find((d) => d.roleCode === "superAdmin");
|
||||
api_booking_users_index.getByPhone({
|
||||
phone: userInfo.phone
|
||||
}).then((data) => {
|
||||
if (data) {
|
||||
app.hideUser = false;
|
||||
app.userInfo.ouid = data.uid;
|
||||
common_vendor.index.setStorageSync("ouid", data.uid);
|
||||
app.userInfo = Object.assign({}, app.userInfo, data);
|
||||
}
|
||||
});
|
||||
if (!common_vendor.index.getStorageSync("openid")) {
|
||||
common_vendor.index.login({
|
||||
success: (res) => {
|
||||
api_passport_login_index.getWxOpenId({
|
||||
code: res.code
|
||||
}).then((response) => {
|
||||
common_vendor.index.setStorageSync("openid", response.openid);
|
||||
api_shop_users_index.updateUsers({
|
||||
uid: app.userInfo.ouid,
|
||||
openid: response.openid,
|
||||
sessionKey: response.session_key,
|
||||
unionid: response.unionid
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
app.isLogin = false;
|
||||
app.userInfo = {};
|
||||
}
|
||||
api_cms_mpMenu_index.pageMpMenu({ type: 0, limit: 100 }).then((res) => {
|
||||
app.order = res.list.filter((d) => d.rows == 0);
|
||||
app.server = res.list.filter((d) => d.rows == 1);
|
||||
if (!app.hasMerchantRole && !app.hasMerchantClerkRole) {
|
||||
app.server = res.list.filter((d) => d.rows == 1 && d.adminShow == 0);
|
||||
}
|
||||
app.hideTools = false;
|
||||
}).catch(() => {
|
||||
common_vendor.index.showToast({
|
||||
title: "请检查您的网络.",
|
||||
icon: "none"
|
||||
});
|
||||
app.hideTools = false;
|
||||
});
|
||||
api_booking_userCard_index.pageUserCard({ payStatus: 1, userId: common_vendor.index.getStorageSync("user_id") }).then((res) => {
|
||||
console.log("res8888889: ", res);
|
||||
app.userInfo.cards = res.count;
|
||||
app.userInfo.coupon = 1;
|
||||
});
|
||||
},
|
||||
navTo(item) {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
} else {
|
||||
utils_common.openUrl(item);
|
||||
}
|
||||
},
|
||||
// 弹出登录提示框
|
||||
openLogin() {
|
||||
if (!this.isLogin) {
|
||||
this.$refs.login.open("bottom");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
if (!Array) {
|
||||
const _easycom_ws_user_card2 = common_vendor.resolveComponent("ws-user-card");
|
||||
const _easycom_uv_skeleton2 = common_vendor.resolveComponent("uv-skeleton");
|
||||
const _easycom_uni_card2 = common_vendor.resolveComponent("uni-card");
|
||||
const _easycom_ws_my_asset2 = common_vendor.resolveComponent("ws-my-asset");
|
||||
const _easycom_uni_list_item2 = common_vendor.resolveComponent("uni-list-item");
|
||||
const _easycom_uni_list2 = common_vendor.resolveComponent("uni-list");
|
||||
const _easycom_ws_login2 = common_vendor.resolveComponent("ws-login");
|
||||
const _easycom_ws_logout2 = common_vendor.resolveComponent("ws-logout");
|
||||
(_easycom_ws_user_card2 + _easycom_uv_skeleton2 + _easycom_uni_card2 + _easycom_ws_my_asset2 + _easycom_uni_list_item2 + _easycom_uni_list2 + _easycom_ws_login2 + _easycom_ws_logout2)();
|
||||
}
|
||||
const _easycom_ws_user_card = () => "../../uni_modules/ws-user-card/components/ws-user-card/ws-user-card.js";
|
||||
const _easycom_uv_skeleton = () => "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton.js";
|
||||
const _easycom_uni_card = () => "../../uni_modules/uni-card/components/uni-card/uni-card.js";
|
||||
const _easycom_ws_my_asset = () => "../../uni_modules/ws-my-asset/components/ws-my-asset/ws-my-asset.js";
|
||||
const _easycom_uni_list_item = () => "../../uni_modules/uni-list/components/uni-list-item/uni-list-item.js";
|
||||
const _easycom_uni_list = () => "../../uni_modules/uni-list/components/uni-list/uni-list.js";
|
||||
const _easycom_ws_login = () => "../../uni_modules/ws-login/components/ws-login/ws-login.js";
|
||||
const _easycom_ws_logout = () => "../../uni_modules/ws-logout/components/ws-logout/ws-logout.js";
|
||||
if (!Math) {
|
||||
(_easycom_ws_user_card + _easycom_uv_skeleton + _easycom_uni_card + _easycom_ws_my_asset + _easycom_uni_list_item + _easycom_uni_list + _easycom_ws_login + _easycom_ws_logout)();
|
||||
}
|
||||
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
return common_vendor.e({
|
||||
a: common_vendor.s("margin-top: " + $data.statusBarHeight + "px"),
|
||||
b: common_vendor.o($options.openLogin),
|
||||
c: common_vendor.p({
|
||||
data: $data.userInfo,
|
||||
["is-login"]: $data.isLogin
|
||||
}),
|
||||
d: $data.hideTools
|
||||
}, $data.hideTools ? {
|
||||
e: common_vendor.p({
|
||||
rows: "2",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
f: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 8px"
|
||||
}),
|
||||
g: common_vendor.p({
|
||||
rows: "9",
|
||||
loading: $data.hideTools,
|
||||
title: false
|
||||
}),
|
||||
h: common_vendor.p({
|
||||
border: false,
|
||||
padding: "18px 8px"
|
||||
})
|
||||
} : common_vendor.e({
|
||||
i: common_vendor.o($options.openLogin),
|
||||
j: common_vendor.p({
|
||||
data: $data.userInfo,
|
||||
["is-login"]: $data.isLogin
|
||||
}),
|
||||
k: $data.hasMerchantRole || $data.hasMerchantClerkRole
|
||||
}, $data.hasMerchantRole || $data.hasMerchantClerkRole ? {
|
||||
l: common_vendor.f($data.server, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: item.color ? item.color : "#333333",
|
||||
c: common_vendor.o(($event) => $options.navTo(item), index),
|
||||
d: "a9018ea2-8-" + i0 + ",a9018ea2-7",
|
||||
e: common_vendor.p({
|
||||
thumb: item.icon,
|
||||
link: true
|
||||
}),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
m: common_vendor.p({
|
||||
border: false
|
||||
})
|
||||
} : {
|
||||
n: common_vendor.f($data.server, (item, index, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(item.title),
|
||||
b: item.color ? item.color : "#333333",
|
||||
c: common_vendor.o(($event) => $options.navTo(item), index),
|
||||
d: "a9018ea2-10-" + i0 + ",a9018ea2-9",
|
||||
e: common_vendor.p({
|
||||
thumb: item.icon,
|
||||
link: true
|
||||
}),
|
||||
f: index
|
||||
};
|
||||
}),
|
||||
o: common_vendor.p({
|
||||
border: false
|
||||
})
|
||||
}, {
|
||||
p: common_vendor.p({
|
||||
border: false,
|
||||
padding: 0
|
||||
}),
|
||||
q: common_vendor.sr("login", "a9018ea2-11"),
|
||||
r: common_vendor.o($options.reload),
|
||||
s: common_vendor.p({
|
||||
logo: $data.logo
|
||||
}),
|
||||
t: $data.isLogin
|
||||
}, $data.isLogin ? {
|
||||
v: common_vendor.o($options.reload)
|
||||
} : {}));
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "/Users/gxwebsoft/APP/gxtyzx-uniapp-cli/src/pages/user/user.vue"]]);
|
||||
wx.createPage(MiniProgramPage);
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"navigationBarTitleText": "个人中心",
|
||||
"enablePullDownRefresh": false,
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"ws-user-card": "../../uni_modules/ws-user-card/components/ws-user-card/ws-user-card",
|
||||
"uv-skeleton": "../../uni_modules/uv-skeleton/components/uv-skeleton/uv-skeleton",
|
||||
"uni-card": "../../uni_modules/uni-card/components/uni-card/uni-card",
|
||||
"ws-my-asset": "../../uni_modules/ws-my-asset/components/ws-my-asset/ws-my-asset",
|
||||
"uni-list-item": "../../uni_modules/uni-list/components/uni-list-item/uni-list-item",
|
||||
"uni-list": "../../uni_modules/uni-list/components/uni-list/uni-list",
|
||||
"ws-login": "../../uni_modules/ws-login/components/ws-login/ws-login",
|
||||
"ws-logout": "../../uni_modules/ws-logout/components/ws-logout/ws-logout"
|
||||
}
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
<view class="page"><view class="header" style="{{a}}"></view><ws-user-card wx:if="{{c}}" bindopenLogin="{{b}}" u-i="a9018ea2-0" bind:__l="__l" u-p="{{c}}"/><block wx:if="{{d}}"><uni-card wx:if="{{f}}" u-s="{{['d']}}" u-i="a9018ea2-1" bind:__l="__l" u-p="{{f}}"><uv-skeleton wx:if="{{e}}" u-i="a9018ea2-2,a9018ea2-1" bind:__l="__l" u-p="{{e}}"></uv-skeleton></uni-card><uni-card wx:if="{{h}}" u-s="{{['d']}}" u-i="a9018ea2-3" bind:__l="__l" u-p="{{h}}"><uv-skeleton wx:if="{{g}}" u-i="a9018ea2-4,a9018ea2-3" bind:__l="__l" u-p="{{g}}"></uv-skeleton></uni-card></block><block wx:else><ws-my-asset wx:if="{{j}}" binddone="{{i}}" u-i="a9018ea2-5" bind:__l="__l" u-p="{{j}}"></ws-my-asset><uni-card wx:if="{{p}}" u-s="{{['d']}}" u-i="a9018ea2-6" bind:__l="__l" u-p="{{p}}"><block wx:if="{{k}}"><view class="server" style="min-height:200px"><uni-list wx:if="{{m}}" u-s="{{['d']}}" u-i="a9018ea2-7,a9018ea2-6" bind:__l="__l" u-p="{{m}}"><block wx:for="{{l}}" wx:for-item="item" wx:key="f"><uni-list-item wx:if="{{item.e}}" u-s="{{['body']}}" bindclick="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view class="slot-box" slot="body"><text class="slot-text" style="{{'color:' + item.b}}">{{item.a}}</text></view></uni-list-item></block></uni-list></view></block><block wx:else><view class="server" style="min-height:200px"><uni-list wx:if="{{o}}" u-s="{{['d']}}" u-i="a9018ea2-9,a9018ea2-6" bind:__l="__l" u-p="{{o}}"><block wx:for="{{n}}" wx:for-item="item" wx:key="f"><uni-list-item wx:if="{{item.e}}" u-s="{{['body']}}" bindclick="{{item.c}}" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"><view class="slot-box" slot="body"><text class="slot-text" style="{{'color:' + item.b}}">{{item.a}}</text></view></uni-list-item></block></uni-list></view></block></uni-card><ws-login wx:if="{{s}}" class="r" u-r="login" binddone="{{r}}" u-i="a9018ea2-11" bind:__l="__l" u-p="{{s}}"/><ws-logout wx:if="{{t}}" binddone="{{v}}" u-i="a9018ea2-12" bind:__l="__l"></ws-logout></block></view>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
|
||||
page {
|
||||
background: url('https://oss.wsdns.cn/20240502/75fc744657544a38a32f83a825688286.png') no-repeat;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-color: #f0f2f5;
|
||||
width: 750rpx;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
Reference in New Issue
Block a user