已支付订单列表:where.payStatus = 1;

This commit is contained in:
2024-07-10 22:44:18 +08:00
parent 9dd834adb5
commit 1311eb03b8
611 changed files with 92828 additions and 400 deletions
+373
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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;
}