first commit

This commit is contained in:
PC-202306242200\Administrator
2026-03-28 23:10:55 +08:00
commit 1c24452b6c
1735 changed files with 150474 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const hooks_useNav = require("../../hooks/useNav.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_swiper2 = common_vendor.resolveComponent("wd-swiper");
const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html");
(_easycom_wd_navbar2 + _easycom_wd_swiper2 + _easycom_mp_html2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_swiper = () => "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.js";
const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_swiper + _easycom_mp_html)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "goods",
setup(__props) {
const { navTo } = hooks_useNav.useNav();
const current = common_vendor.ref(0);
common_vendor.ref(["https://wot-ui.cn/assets/redpanda.jpg", "https://wot-ui.cn/assets/capybara.jpg"]);
const goods = common_vendor.ref({});
common_vendor.onLoad((options) => {
api_index.api.goodsInfo({ id: options.id }).then((res) => {
goods.value = res;
});
});
const toConfirm = () => {
navTo(`/pages/order/confirm?id=${goods.value.id}`, true);
};
const back = () => {
common_vendor.index.navigateBack();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(back),
b: common_vendor.p({
fixed: true,
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
c: common_vendor.w(({
current: current2,
total
}, s0, i0) => {
return {
a: common_vendor.t(current2 + 1),
b: common_vendor.t(total),
c: i0,
d: s0
};
}, {
name: "indicator",
path: "c",
vueId: "7e2880f6-1"
}),
d: common_vendor.t(goods.value.sales),
e: common_vendor.o(($event) => current.value = $event),
f: common_vendor.p({
height: "750rpx",
list: goods.value.images,
autoplay: true,
current: current.value
}),
g: common_vendor.t(goods.value.name),
h: common_vendor.t(goods.value.stock),
i: common_vendor.t(goods.value.specs),
j: common_vendor.t(goods.value.currentPrice),
k: common_vendor.p({
content: goods.value.detail
}),
l: common_assets._imports_0$4,
m: common_assets._imports_1$2,
n: common_vendor.o(toConfirm)
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7e2880f6"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/goods/goods.js.map

View File

@@ -0,0 +1,9 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"usingComponents": {
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
"wd-swiper": "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper",
"mp-html": "../../uni_modules/mp-html/components/mp-html/mp-html"
}
}

View File

@@ -0,0 +1 @@
<view class="goods data-v-7e2880f6"><wd-navbar wx:if="{{b}}" class="data-v-7e2880f6" bindclickLeft="{{a}}" u-i="7e2880f6-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><wd-swiper wx:if="{{f}}" class="data-v-7e2880f6" u-s="{{['indicator']}}" u-i="7e2880f6-1" bind:__l="__l" bindupdateCurrent="{{e}}" u-p="{{f}}"><view wx:for="{{c}}" wx:for-item="v0" wx:key="c" slot="{{v0.d}}"><view class="custom-indicator data-v-7e2880f6">{{v0.a}}/{{v0.b}}</view><view class="goods_sals data-v-7e2880f6">销量{{d}}</view></view></wd-swiper><view class="data-v-7e2880f6" style="height:35rpx"></view><view class="goods_block data-v-7e2880f6"><view class="data-v-7e2880f6"><view class="goods_block_tit data-v-7e2880f6">{{g}}</view><view class="goods_block_stock data-v-7e2880f6">库存{{h}}</view></view><view class="data-v-7e2880f6" style="margin-top:20rpx"><view class="goods_block_spec data-v-7e2880f6">{{i}}</view><view class="goods_block_price data-v-7e2880f6">¥{{j}}</view></view></view><view class="data-v-7e2880f6" style="font-weight:bold;font-size:30rpx;color:#232323;margin:30rpx 0 25rpx;text-align:center">商品详情</view><view class="data-v-7e2880f6" style="background-color:#fff"><mp-html wx:if="{{k}}" class="data-v-7e2880f6" u-i="7e2880f6-2" bind:__l="__l" u-p="{{k}}"/></view><view class="data-v-7e2880f6" style="height:145rpx"></view><view class="data-v-7e2880f6" style="display:flex;align-items:center;justify-content:space-between;padding:35rpx 60rpx;position:fixed;bottom:0;left:0;background-color:#fff;border-radius:24rpx 24rpx 0 0;width:100%"><view class="data-v-7e2880f6" style="display:flex;align-items:center;font-size:24rpx"><button class="data-v-7e2880f6" style="margin-right:24rpx" open-type="share"><image class="data-v-7e2880f6" style="width:40rpx;height:40rpx" src="{{l}}"></image><view class="data-v-7e2880f6">分享</view></button><button class="data-v-7e2880f6" open-type="contact"><image class="data-v-7e2880f6" style="width:40rpx;height:40rpx" src="{{m}}"></image><view class="data-v-7e2880f6">客服</view></button></view><view class="data-v-7e2880f6" style="width:468rpx;height:70rpx;background:#ffffff;border-radius:12rpx;border:1rpx solid #5d7a4e;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:28rpx;color:#5d7a4e" bindtap="{{n}}"> 立即购买 </view></view></view>

View File

@@ -0,0 +1,75 @@
/* 水平间距 */
/* 水平间距 */
.goods.data-v-7e2880f6 {
--wot-swiper-radius: 0;
}
.goods_sals.data-v-7e2880f6 {
width: 166rpx;
height: 44rpx;
background: #ffffff;
border-radius: 46rpx 0rpx 0rpx 46rpx;
opacity: 0.5;
position: absolute;
bottom: 30rpx;
right: 0;
font-weight: 400;
font-size: 24rpx;
color: #232323;
display: flex;
align-items: center;
justify-content: center;
}
.goods_block.data-v-7e2880f6 {
margin: auto;
width: 690rpx;
background: #ffffff;
box-shadow: 0rpx 0rpx 6rpx 2rpx rgba(22, 22, 23, 0.07);
border-radius: 8rpx 8rpx 8rpx 8rpx;
padding: 24rpx;
}
.goods_block view.data-v-7e2880f6 {
display: flex;
align-items: center;
justify-content: space-between;
}
.goods_block_tit.data-v-7e2880f6 {
font-weight: bold;
font-size: 32rpx;
color: #232323;
}
.goods_block_stock.data-v-7e2880f6 {
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
.goods_block_spec.data-v-7e2880f6 {
font-weight: bold;
font-size: 24rpx;
color: #232323;
}
.goods_block_price.data-v-7e2880f6 {
font-weight: bold;
font-size: 38rpx;
color: #ff2929;
}
.custom-indicator.data-v-7e2880f6 {
width: 52rpx;
height: 52rpx;
background: #ffffff;
border-radius: 6rpx 6rpx 6rpx 6rpx;
opacity: 0.5;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #232323;
position: absolute;
top: 170rpx;
right: 24rpx;
}
button.data-v-7e2880f6 {
all: unset;
}
button.data-v-7e2880f6::after {
all: unset;
}

View File

@@ -0,0 +1,75 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_wd_navbar2 + _easycom_z_paging2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_z_paging)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "prefecture",
setup(__props) {
const active = common_vendor.ref(1);
const categoryId = common_vendor.ref("");
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const noticeCateList = common_vendor.ref([]);
common_vendor.onLoad(() => {
api_index.api.noticeCatePage().then((res) => {
noticeCateList.value = res.list;
});
});
const queryList = (pageNo, pageSize) => {
api_index.api.goodsPage({ pageNo, pageSize, type: active.value, categoryId: categoryId.value, recommended: 1 }).then((res) => {
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
const toGoods = (e) => {
common_vendor.index.navigateTo({
url: `/pages/goods/goods?id=${e}`
});
};
const back = () => {
common_vendor.index.navigateBack();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(back),
b: common_vendor.p({
title: "进货专区",
safeAreaInsetTop: true,
["left-arrow"]: true
}),
c: common_vendor.f(dataList.value, (item, index, i0) => {
return {
a: item.cover,
b: common_vendor.t(item.name),
c: common_vendor.t(item.specs),
d: common_vendor.t(item.currentPrice),
e: common_vendor.o(($event) => toGoods(item.id), index),
f: index
};
}),
d: common_vendor.sr(paging, "a9cb5680-1", {
"k": "paging"
}),
e: common_vendor.o(queryList),
f: common_vendor.o(($event) => dataList.value = $event),
g: common_vendor.p({
["use-page-scroll"]: true,
modelValue: dataList.value
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a9cb5680"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/goods/prefecture.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "进货专区",
"navigationStyle": "custom",
"usingComponents": {
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="notice data-v-a9cb5680"><wd-navbar wx:if="{{b}}" class="data-v-a9cb5680" bindclickLeft="{{a}}" u-i="a9cb5680-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><z-paging wx:if="{{g}}" class="r data-v-a9cb5680" u-s="{{['d']}}" u-r="paging" bindquery="{{e}}" u-i="a9cb5680-1" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"><view class="p30 data-v-a9cb5680"><view wx:for="{{c}}" wx:for-item="item" wx:key="f" class="home_block data-v-a9cb5680" bindtap="{{item.e}}"><image class="home_block_left data-v-a9cb5680" src="{{item.a}}"></image><view class="home_block_right data-v-a9cb5680"><view class="home_block_right_title data-v-a9cb5680">{{item.b}}</view><view class="home_block_right_info data-v-a9cb5680">{{item.c}}</view><view class="data-v-a9cb5680" style="display:flex;justify-content:space-between;align-items:center;margin-top:25rpx"><view class="data-v-a9cb5680" style="font-size:36rpx;font-weight:bold;color:#ff2929">¥{{item.d}}</view><view class="home_block_right_button data-v-a9cb5680">下单</view></view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,59 @@
/* 水平间距 */
/* 水平间距 */
.notice_block.data-v-a9cb5680 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 35rpx;
width: 690rpx;
height: 106rpx;
background: #ffffff;
border-radius: 16rpx;
position: relative;
font-weight: 400;
font-size: 24rpx;
color: #232323;
}
.home_block.data-v-a9cb5680 {
width: 690rpx;
height: 250rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex;
align-items: center;
padding-right: 25rpx;
margin-bottom: 25rpx;
}
.home_block_left.data-v-a9cb5680 {
width: 250rpx;
height: 250rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
margin-right: 25rpx;
}
.home_block_right.data-v-a9cb5680 {
flex: 1;
}
.home_block_right_title.data-v-a9cb5680 {
font-weight: 600;
font-size: 28rpx;
color: #232323;
}
.home_block_right_info.data-v-a9cb5680 {
font-weight: 400;
font-size: 24rpx;
color: #232323;
margin-top: 25rpx;
}
.home_block_right_button.data-v-a9cb5680 {
width: 128rpx;
height: 48rpx;
background: #ff2a2a;
box-shadow: 0rpx 2rpx 4rpx 2rpx #dbdbdb;
border-radius: 10rpx 10rpx 10rpx 10rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 20rpx;
color: #ffffff;
}