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,108 @@
"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_wd_input2 = common_vendor.resolveComponent("wd-input");
const _easycom_wd_switch2 = common_vendor.resolveComponent("wd-switch");
(_easycom_wd_navbar2 + _easycom_wd_input2 + _easycom_wd_switch2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_input = () => "../../uni_modules/wot-design-uni/components/wd-input/wd-input.js";
const _easycom_wd_switch = () => "../../uni_modules/wot-design-uni/components/wd-switch/wd-switch.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_input + _easycom_wd_switch)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "add",
setup(__props) {
common_vendor.onLoad((options) => {
if (options.id) {
api_index.api.addressInfo({ id: options.id }).then((res) => {
const resData = res || {};
resData.isDefault = resData.isDefault ? true : false;
const formKeys = Object.keys(from.value);
const updateData = {};
formKeys.forEach((key) => {
if (resData.hasOwnProperty(key)) {
updateData[key] = resData[key];
}
});
Object.assign(from.value, updateData);
});
}
});
const from = common_vendor.ref({
receiverName: "",
receiverPhone: "",
receiverArea: "",
receiverAddress: "",
isDefault: true,
status: 0,
id: ""
});
const add_Address = () => {
let data = JSON.parse(JSON.stringify(from.value));
data.isDefault = data.isDefault ? 1 : 0;
if (data.id) {
api_index.api.addressUp(data).then((res) => {
common_vendor.index.navigateBack();
});
} else {
api_index.api.addressAdd(data).then((res) => {
common_vendor.index.navigateBack();
});
}
};
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.o(($event) => from.value.receiverName = $event),
d: common_vendor.p({
type: "text",
["no-border"]: true,
placeholder: "请输入收货人姓名",
modelValue: from.value.receiverName
}),
e: common_vendor.o(($event) => from.value.receiverPhone = $event),
f: common_vendor.p({
type: "number",
["no-border"]: true,
placeholder: "请输入手机号",
modelValue: from.value.receiverPhone
}),
g: common_vendor.o(($event) => from.value.receiverArea = $event),
h: common_vendor.p({
type: "text",
["no-border"]: true,
placeholder: "请输入省市区",
modelValue: from.value.receiverArea
}),
i: common_vendor.o(($event) => from.value.receiverAddress = $event),
j: common_vendor.p({
type: "text",
["no-border"]: true,
placeholder: "请输入详细地址",
modelValue: from.value.receiverAddress
}),
k: common_vendor.o(($event) => from.value.isDefault = $event),
l: common_vendor.p({
size: "20px",
modelValue: from.value.isDefault
}),
m: common_vendor.o(add_Address)
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-ef9226d4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/address/add.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-input": "../../uni_modules/wot-design-uni/components/wd-input/wd-input",
"wd-switch": "../../uni_modules/wot-design-uni/components/wd-switch/wd-switch"
}
}

View File

@@ -0,0 +1 @@
<view class="address-add data-v-ef9226d4"><wd-navbar wx:if="{{b}}" class="data-v-ef9226d4" bindclickLeft="{{a}}" u-i="ef9226d4-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><view class="from-address data-v-ef9226d4"><view class="title data-v-ef9226d4">收货人</view><view class="content data-v-ef9226d4"><wd-input wx:if="{{d}}" class="data-v-ef9226d4" u-i="ef9226d4-1" bind:__l="__l" bindupdateModelValue="{{c}}" u-p="{{d}}"/></view></view><view class="from-address data-v-ef9226d4"><view class="title data-v-ef9226d4">手机号</view><view class="content data-v-ef9226d4"><wd-input wx:if="{{f}}" class="data-v-ef9226d4" u-i="ef9226d4-2" bind:__l="__l" bindupdateModelValue="{{e}}" u-p="{{f}}"/></view></view><view class="from-address data-v-ef9226d4"><view class="title data-v-ef9226d4">所在地区</view><view class="content data-v-ef9226d4"><wd-input wx:if="{{h}}" class="data-v-ef9226d4" u-i="ef9226d4-3" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"/></view></view><view class="from-address data-v-ef9226d4"><view class="title data-v-ef9226d4">详细地址</view><view class="content data-v-ef9226d4"><wd-input wx:if="{{j}}" class="data-v-ef9226d4" u-i="ef9226d4-4" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"/></view></view><view class="from-address data-v-ef9226d4" style="margin-top:30rpx;justify-content:space-between"><view class="title data-v-ef9226d4" style="width:300rpx">设置为默认地址</view><view class="data-v-ef9226d4"><wd-switch wx:if="{{l}}" class="data-v-ef9226d4" u-i="ef9226d4-5" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"/></view></view><view class="bottom-btn data-v-ef9226d4"><view class="button-a data-v-ef9226d4" bindtap="{{m}}">保存</view></view></view>

View File

@@ -0,0 +1,50 @@
/* 水平间距 */
/* 水平间距 */
.address-add.data-v-ef9226d4 {
width: 100%;
padding: 0rpx 0 180rpx;
}
.address-add .from-address.data-v-ef9226d4 {
background-color: #fff;
height: 110rpx;
padding: 0rpx 20rpx;
display: flex;
align-items: center;
}
.address-add .from-address .title.data-v-ef9226d4 {
width: 150rpx;
font-size: 28rpx;
font-weight: bold;
color: #333333;
}
.address-add .from-address .content.data-v-ef9226d4 {
flex: 1;
height: 100rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #f6f6f6;
}
.address-add .bottom-btn.data-v-ef9226d4 {
width: 100%;
height: 150rpx;
padding: 30rpx;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
border-radius: 20rpx 20rpx 0 0;
box-shadow: 0px 6rpx 16rpx 2rpx rgba(170, 170, 170, 0.35);
display: flex;
align-items: center;
justify-content: center;
}
.address-add .bottom-btn .button-a.data-v-ef9226d4 {
width: 690rpx;
height: 90rpx;
background: #799675;
border-radius: 15rpx;
text-align: center;
font-size: 30rpx;
color: #ffffff;
line-height: 90rpx;
}

View File

@@ -0,0 +1,111 @@
"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: "list",
setup(__props) {
const paging = common_vendor.ref(null);
const type = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
common_vendor.onLoad((options) => {
type.value = options.type;
});
common_vendor.onShow(() => {
paging.value.reload();
});
const queryList = (pageNo, pageSize) => {
api_index.api.addressPage({ pageNo, pageSize }).then((res) => {
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
const back = () => {
common_vendor.index.navigateBack();
};
const tn = (e) => {
common_vendor.index.navigateTo({
url: e
});
};
const back_A = (e) => {
if (type.value == 1) {
common_vendor.index.$emit("address", e);
common_vendor.index.navigateBack();
} else {
return;
}
};
const deleAddress = (data) => {
common_vendor.index.showModal({
title: "提示",
content: "是否确认删除?",
success: (res) => {
if (res.confirm) {
api_index.api.addressDel({ id: data.id }).then((res2) => {
paging.value.reload();
});
}
}
});
};
const copyAddress = (data) => {
let aaa = `收货人:${data.receiverName}
手机号码:${data.receiverPhone}
所在地区:${data.receiverArea}
详细地址:${data.receiverAddress}`;
common_vendor.index.setClipboardData({
data: aaa,
success: function() {
common_vendor.index.__f__("log", "at pages/address/list.vue:100", "success");
}
});
};
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: common_vendor.t(item.receiverName),
b: common_vendor.t(item.receiverPhone),
c: common_vendor.t(item.receiverArea),
d: common_vendor.t(item.receiverAddress),
e: common_vendor.o(($event) => deleAddress(item), index),
f: common_vendor.o(($event) => tn(`./add?id=${item.id}`), index),
g: common_vendor.o(($event) => copyAddress(item), index),
h: common_vendor.o(($event) => back_A(item), index),
i: index
};
}),
d: common_vendor.sr(paging, "90a3874e-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
}),
h: common_vendor.o(($event) => tn("./add"))
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-90a3874e"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/address/list.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="address data-v-90a3874e"><wd-navbar wx:if="{{b}}" class="data-v-90a3874e" bindclickLeft="{{a}}" u-i="90a3874e-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><z-paging wx:if="{{g}}" class="r data-v-90a3874e" u-s="{{['d']}}" u-r="paging" bindquery="{{e}}" u-i="90a3874e-1" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"><view class="data-v-90a3874e" style="padding:30rpx"><view wx:for="{{c}}" wx:for-item="item" wx:key="i" class="address-a data-v-90a3874e" bindtap="{{item.h}}"><view class="top data-v-90a3874e"><view class="top-a data-v-90a3874e"><view class="data-v-90a3874e">{{item.a}}</view><view class="data-v-90a3874e">{{item.b}}</view></view><view class="top-b data-v-90a3874e">{{item.c}} {{item.d}}</view></view><view class="bottom data-v-90a3874e"><view class="bottom-r data-v-90a3874e"><view class="data-v-90a3874e" catchtap="{{item.e}}">删除</view><view class="data-v-90a3874e" style="margin-left:50rpx" catchtap="{{item.f}}">编辑</view><view class="data-v-90a3874e" catchtap="{{item.g}}" style="margin:0 50rpx">复制</view></view></view></view></view></z-paging><view class="bottom-btn data-v-90a3874e"><view class="button-a data-v-90a3874e" bindtap="{{h}}">新增收货地址</view></view></view>

View File

@@ -0,0 +1,76 @@
/* 水平间距 */
/* 水平间距 */
.address .address-a.data-v-90a3874e {
width: 100%;
background: #ffffff;
box-shadow: 0px 2rpx 21rpx 0px rgba(184, 184, 184, 0.35);
border-radius: 17rpx;
margin-bottom: 30rpx;
}
.address .address-a .top.data-v-90a3874e {
padding: 40rpx;
border-bottom: 1rpx solid #f3f3f3;
}
.address .address-a .top .top-a.data-v-90a3874e {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 30rpx;
font-weight: bold;
color: #222222;
margin-bottom: 45rpx;
}
.address .address-a .top .top-b.data-v-90a3874e {
font-size: 30rpx;
font-weight: bold;
color: #999999;
}
.address .address-a .bottom.data-v-90a3874e {
padding: 35rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.address .address-a .bottom .bottom-che.data-v-90a3874e {
display: flex;
align-items: center;
font-size: 24rpx;
font-weight: bold;
color: #222222;
}
.address .address-a .bottom .bottom-che image.data-v-90a3874e {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
}
.address .address-a .bottom .bottom-r.data-v-90a3874e {
font-size: 26rpx;
font-weight: bold;
color: #999999;
display: flex;
align-items: center;
}
.address .bottom-btn.data-v-90a3874e {
width: 100%;
height: 150rpx;
padding: 30rpx;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
border-radius: 20rpx 20rpx 0 0;
box-shadow: 0px 6rpx 16rpx 2rpx rgba(170, 170, 170, 0.35);
display: flex;
align-items: center;
justify-content: center;
}
.address .bottom-btn .button-a.data-v-90a3874e {
width: 690rpx;
height: 90rpx;
background: #799675;
border-radius: 15rpx;
text-align: center;
font-size: 30rpx;
color: #ffffff;
line-height: 90rpx;
}

View File

@@ -0,0 +1,118 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
if (!Array) {
const _easycom_wd_search2 = common_vendor.resolveComponent("wd-search");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_wd_search2 + _easycom_z_paging2)();
}
const _easycom_wd_search = () => "../../uni_modules/wot-design-uni/components/wd-search/wd-search.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_wd_search + _easycom_z_paging)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "cate",
setup(__props) {
const current = common_vendor.ref(0);
const goodsCate = common_vendor.ref([]);
common_vendor.ref([]);
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const goodsCateId = common_vendor.ref(null);
const name = common_vendor.ref("");
common_vendor.onLoad(() => {
api_index.api.goodsCate().then((res) => {
goodsCate.value = res.list;
goodsCateId.value = res.list[0].id;
});
});
const queryList = (pageNo, pageSize) => {
if (!goodsCateId.value) {
api_index.api.goodsCate().then((res) => {
goodsCate.value = res.list;
goodsCateId.value = res.list[0].id;
api_index.api.goodsPage({ pageNo, pageSize, categoryId: goodsCateId.value, name: name.value }).then((res2) => {
paging.value.complete(res2.list);
}).catch((res2) => {
paging.value.complete(false);
});
});
} else {
api_index.api.goodsPage({ pageNo, pageSize, categoryId: goodsCateId.value, name: name.value }).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 clear = () => {
name.value = "";
paging.value.reload();
};
const search = (e) => {
name.value = e.value;
paging.value.reload();
};
let swichMenu = (index, id) => {
current.value = index;
goodsCateId.value = id;
paging.value.reload();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(search),
b: common_vendor.o(clear),
c: common_vendor.p({
["placeholder-left"]: true,
placeholder: "搜一搜药品名称",
["hide-cancel"]: true,
customStyle: {
background: "#799675",
height: "80rpx"
}
}),
d: common_vendor.f(goodsCate.value, (item, index, i0) => {
return {
a: common_vendor.t(item.name),
b: index,
c: common_vendor.n(current.value == index ? "u-tab-item-active" : ""),
d: index,
e: common_vendor.o(($event) => common_vendor.unref(swichMenu)(index, item.id), index)
};
}),
e: 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.t(item.originalPrice),
f: index,
g: common_vendor.o(($event) => toGoods(item.id), index)
};
}),
f: common_vendor.sr(paging, "7db0ce29-1", {
"k": "paging"
}),
g: common_vendor.o(queryList),
h: common_vendor.o(($event) => dataList.value = $event),
i: common_vendor.p({
["use-page-scroll"]: true,
["paging-style"]: {
"background-color": "#FFF"
},
modelValue: dataList.value
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7db0ce29"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/cate/cate.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#799675",
"usingComponents": {
"wd-search": "../../uni_modules/wot-design-uni/components/wd-search/wd-search",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="u-wrap data-v-7db0ce29"><wd-search wx:if="{{c}}" class="data-v-7db0ce29" bindsearch="{{a}}" bindclear="{{b}}" u-i="7db0ce29-0" bind:__l="__l" u-p="{{c}}"/><view class="u-menu-wrap data-v-7db0ce29"><scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view data-v-7db0ce29"><view wx:for="{{d}}" wx:for-item="item" wx:key="b" class="{{['u-tab-item', 'data-v-7db0ce29', item.c]}}" data-current="{{item.d}}" catchtap="{{item.e}}"><text class="u-line-1 data-v-7db0ce29">{{item.a}}</text></view></scroll-view><z-paging wx:if="{{i}}" class="r data-v-7db0ce29" u-s="{{['d']}}" u-r="paging" bindquery="{{g}}" u-i="7db0ce29-1" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"><view class="right-box data-v-7db0ce29"><view class="page-view data-v-7db0ce29"><view wx:for="{{e}}" wx:for-item="item" wx:key="f" class="page-view_item data-v-7db0ce29" bindtap="{{item.g}}"><image class="data-v-7db0ce29" src="{{item.a}}" mode="aspectFill"></image><view class="data-v-7db0ce29" style="flex:1"><view class="page-view_item_title data-v-7db0ce29">{{item.b}}</view><view class="page-view_item_info data-v-7db0ce29">{{item.c}}</view><view class="page-view_item_price data-v-7db0ce29"><view class="page-view_item_price_left data-v-7db0ce29">¥{{item.d}}</view><view class="page-view_item_price_right data-v-7db0ce29">¥{{item.e}}</view></view></view></view></view></view></z-paging></view></view>

View File

@@ -0,0 +1,139 @@
/* 水平间距 */
/* 水平间距 */
.u-wrap.data-v-7db0ce29 {
height: 100vh;
display: flex;
flex-direction: column;
}
.u-search-box.data-v-7db0ce29 {
padding: 18rpx 30rpx;
}
.u-menu-wrap.data-v-7db0ce29 {
flex: 1;
display: flex;
overflow: hidden;
}
.u-search-inner.data-v-7db0ce29 {
background-color: #eaeaea;
border-radius: 100rpx;
display: flex;
align-items: center;
padding: 10rpx 16rpx;
}
.u-search-text.data-v-7db0ce29 {
font-size: 26rpx;
color: #799675;
margin-left: 10rpx;
}
.u-tab-view.data-v-7db0ce29 {
width: 200rpx;
height: 100%;
}
.u-tab-item.data-v-7db0ce29 {
height: 110rpx;
background: #f6f6f6;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
font-size: 26rpx;
color: #444;
font-weight: 400;
line-height: 1;
}
.u-tab-item-active.data-v-7db0ce29 {
position: relative;
color: #799675;
font-size: 30rpx;
font-weight: 600;
background: #fff;
}
.u-tab-item-active.data-v-7db0ce29::before {
content: "";
position: absolute;
border-left: 4px solid #799675;
height: 32rpx;
left: 0;
top: 39rpx;
}
.u-tab-view.data-v-7db0ce29 {
height: 100%;
}
.right-box.data-v-7db0ce29 {
width: 550rpx;
flex: 1;
background-color: #fff;
}
.page-view.data-v-7db0ce29 {
padding: 16rpx;
}
.page-view_item.data-v-7db0ce29 {
display: flex;
align-items: center;
margin-bottom: 25rpx;
}
.page-view_item image.data-v-7db0ce29 {
width: 160rpx;
height: 160rpx;
margin-right: 22rpx;
border-radius: 18rpx;
}
.page-view_item_title.data-v-7db0ce29 {
font-size: 28rpx;
font-weight: bold;
color: #232323;
}
.page-view_item_info.data-v-7db0ce29 {
font-weight: 400;
font-size: 24rpx;
color: #232323;
margin: 20rpx 0;
}
.page-view_item_price.data-v-7db0ce29 {
display: flex;
align-items: center;
}
.page-view_item_price_left.data-v-7db0ce29 {
font-weight: bold;
font-size: 38rpx;
color: #ff2929;
margin-right: 35rpx;
}
.page-view_item_price_right.data-v-7db0ce29 {
font-size: 24rpx;
color: #999999;
-webkit-text-decoration-line: line-through;
text-decoration-line: line-through;
}
.class-item.data-v-7db0ce29 {
margin-bottom: 30rpx;
background-color: #fff;
padding: 16rpx;
border-radius: 8rpx;
}
.item-title.data-v-7db0ce29 {
font-size: 26rpx;
color: #000;
font-weight: bold;
}
.item-menu-name.data-v-7db0ce29 {
font-weight: normal;
font-size: 24rpx;
color: #000;
}
.item-container.data-v-7db0ce29 {
display: flex;
flex-wrap: wrap;
}
.thumb-box.data-v-7db0ce29 {
width: 33.333333%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
margin-top: 20rpx;
}
.item-menu-image.data-v-7db0ce29 {
width: 120rpx;
height: 120rpx;
}

View File

@@ -0,0 +1,139 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const store_index = require("../../store/index.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
_easycom_wd_navbar2();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
if (!Math) {
_easycom_wd_navbar();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "equity",
setup(__props) {
const store = store_index.Store();
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
common_vendor.onShow(async () => {
await store.usersGetInfo();
});
const list = [
{
name: "加盟",
info: "购买、批发商品享5折折扣",
text: "赠送货值抵扣券10000元",
icon: "/static/equity/icon1.png",
bei: "/static/equity/bei1.png",
img: "/static/equity/img1.png",
qy: "/static/equity/iconY1.png",
discount: 0.5,
debitVoucher: 1e4
},
{
name: "总代",
info: "购买、批发商品享3.5折折扣",
text: "赠送货值抵扣券40000元",
icon: "/static/equity/icon2.png",
bei: "/static/equity/bei2.png",
img: "/static/equity/img2.png",
qy: "/static/equity/iconY2.png",
discount: 0.35,
debitVoucher: 4e4
},
{
name: "官方",
info: "购买、批发商品享2.5折折扣",
text: "赠送货值抵扣券100000元",
icon: "/static/equity/icon3.png",
bei: "/static/equity/bei3.png",
img: "/static/equity/img3.png",
qy: "/static/equity/iconY3.png",
discount: 0.25,
debitVoucher: 1e5
}
];
const current = common_vendor.ref(0);
const back = () => {
common_vendor.index.navigateBack();
};
const toCon = () => {
common_vendor.index.showModal({
title: "提示",
content: "请联系客服开通权益包",
showCancel: false
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_assets._imports_0$7,
b: common_vendor.o(back),
c: common_vendor.p({
title: "权益包",
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
d: !userInfo.value.userRights
}, !userInfo.value.userRights ? {
e: common_assets._imports_1$5
} : {}, {
f: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 1
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 1 ? {
g: common_assets._imports_2$2
} : {}, {
h: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 2
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 2 ? {
i: common_assets._imports_3$1
} : {}, {
j: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3 ? {
k: common_assets._imports_4$2
} : {}, {
l: userInfo.value.userRights
}, userInfo.value.userRights ? {
m: common_vendor.t(userInfo.value.userRights.rightsDiscount / 10),
n: userInfo.value.userRights.rightsLevel == 1 ? "#754023" : userInfo.value.userRights.rightsLevel == 2 ? "#3874AF" : userInfo.value.userRights.rightsLevel == 3 ? "#AF3838" : ""
} : {}, {
o: userInfo.value.userRights
}, userInfo.value.userRights ? {
p: common_vendor.t(userInfo.value.userRights.pice),
q: userInfo.value.userRights.rightsLevel == 1 ? "#754023" : userInfo.value.userRights.rightsLevel == 2 ? "#3874AF" : userInfo.value.userRights.rightsLevel == 3 ? "#AF3838" : ""
} : {}, {
r: common_assets._imports_5$1,
s: common_vendor.f(list, (item, index, i0) => {
return common_vendor.e({
a: item.qy,
b: current.value == index
}, current.value == index ? {
c: common_assets._imports_6$1
} : {}, {
d: item.bei,
e: item.icon,
f: common_vendor.t(item.info),
g: common_vendor.t(item.text),
h: common_vendor.t(item.name),
i: item.img,
j: index,
k: common_vendor.o(($event) => current.value = index, index)
});
}),
t: common_vendor.o(toCon)
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-abdc3dd4"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/equity/equity.js.map

View File

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

View File

@@ -0,0 +1 @@
<view class="data-v-abdc3dd4"><image class="data-v-abdc3dd4" src="{{a}}" style="width:750rpx;height:768rpx;position:absolute;top:0;left:0;z-index:-1" mode="widthFix"></image><wd-navbar wx:if="{{c}}" class="data-v-abdc3dd4" bindclickLeft="{{b}}" u-i="abdc3dd4-0" bind:__l="__l" u-p="{{c}}"></wd-navbar><view class="data-v-abdc3dd4" style="padding:35rpx 80rpx;position:relative"><image wx:if="{{d}}" class="data-v-abdc3dd4" src="{{e}}" style="width:593rpx;height:345rpx" mode="widthFix"></image><image wx:if="{{f}}" class="data-v-abdc3dd4" src="{{g}}" style="width:593rpx;height:345rpx" mode="widthFix"></image><image wx:if="{{h}}" class="data-v-abdc3dd4" src="{{i}}" style="width:593rpx;height:345rpx" mode="widthFix"></image><image wx:if="{{j}}" class="data-v-abdc3dd4" src="{{k}}" style="width:593rpx;height:345rpx" mode="widthFix"></image><view wx:if="{{l}}" class="data-v-abdc3dd4" style="{{'color:' + n + ';' + 'position:absolute;top:120rpx;left:280rpx;font-size:28rpx'}}">{{m}}折 </view><view wx:if="{{o}}" class="data-v-abdc3dd4" style="{{'color:' + q + ';' + 'position:absolute;top:180rpx;left:140rpx;font-size:28rpx;font-weight:bold'}}"> 抵扣卷剩余:{{p}}</view><button class="equity_kf data-v-abdc3dd4" open-type="contact"><image class="data-v-abdc3dd4" src="{{r}}" style="width:48rpx;height:48rpx;margin-right:10rpx"></image> 联系客服 </button></view><view class="data-v-abdc3dd4" style="padding:0 30rpx"><view class="data-v-abdc3dd4"><text class="data-v-abdc3dd4" style="font-weight:bold;font-size:32rpx;color:#754023">权益包等级</text><text class="data-v-abdc3dd4" style="font-size:24rpx;color:#7e7e7e;margin-left:10rpx">点击下方卡片选择开通等级</text></view><view wx:for="{{s}}" wx:for-item="item" wx:key="j" class="data-v-abdc3dd4" bindtap="{{item.k}}" style="position:relative;width:690rpx;height:224rpx;padding:24rpx 30rpx;margin-top:30rpx"><image class="data-v-abdc3dd4" src="{{item.a}}" style="width:128rpx;position:absolute;top:0;right:12rpx" mode="widthFix"></image><image wx:if="{{item.b}}" class="data-v-abdc3dd4" src="{{item.c}}" style="width:40rpx;height:40rpx;position:absolute;top:20rpx;right:60rpx"></image><image class="data-v-abdc3dd4" src="{{item.d}}" style="width:690rpx;height:224rpx;position:absolute;z-index:-1;top:0;left:0"></image><view class="data-v-abdc3dd4" style="display:flex;align-items:center;margin-bottom:12rpx"><image class="data-v-abdc3dd4" src="{{item.e}}" style="width:104rpx;height:44rpx"></image></view><view class="data-v-abdc3dd4" style="width:100%;background-color:#fff;border-radius:8rpx;padding:24rpx 40rpx;position:relative"><view class="data-v-abdc3dd4" style="font-weight:bold;font-size:24rpx;color:#232323;margin-bottom:8rpx">{{item.f}}</view><view class="data-v-abdc3dd4" style="font-weight:400;font-size:28rpx;color:#232323">{{item.g}}</view><view class="data-v-abdc3dd4" style="width:222rpx;height:42rpx;position:absolute;right:0;bottom:0;z-index:10;text-align:right;display:flex;align-items:center;justify-content:flex-end;padding:0 10rpx"><view class="data-v-abdc3dd4" style="font-weight:bold;font-size:24rpx;color:#ffffff">{{item.h}}特权</view></view><image class="data-v-abdc3dd4" style="width:222rpx;height:42rpx;position:absolute;right:0;bottom:0;z-index:9" src="{{item.i}}"></image></view></view><view class="data-v-abdc3dd4" style="width:690rpx;height:82rpx;background:linear-gradient(180deg, #ffc786 0%, #e99332 100%);border-radius:8rpx;display:flex;align-items:center;justify-content:center;margin-top:50rpx;color:#fff;font-size:30rpx;font-weight:bold" bindtap="{{t}}"> 立即开通 </view></view></view>

View File

@@ -0,0 +1,25 @@
/* 水平间距 */
/* 水平间距 */
.equity.data-v-abdc3dd4 {
display: flex;
align-items: center;
}
.equity_kf.data-v-abdc3dd4 {
position: absolute;
top: 60rpx;
right: 0;
background: rgba(255, 255, 255, 0.68);
border-radius: 30rpx 0rpx 0rpx 30rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #232323;
padding: 5rpx 30rpx 5rpx 30rpx;
}
button.data-v-abdc3dd4 {
all: unset;
}
button.data-v-abdc3dd4::after {
all: unset;
}

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;
}

View File

@@ -0,0 +1,151 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const store_index = require("../../store/index.js");
const utils_fun = require("../../utils/fun.js");
const api_index = require("../../api/index.js");
const hooks_useNav = require("../../hooks/useNav.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_swiper2 = common_vendor.resolveComponent("wd-swiper");
const _easycom_wd_notice_bar2 = common_vendor.resolveComponent("wd-notice-bar");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_wd_navbar2 + _easycom_wd_swiper2 + _easycom_wd_notice_bar2 + _easycom_z_paging2 + _easycom_uni_popup2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_swiper = () => "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper.js";
const _easycom_wd_notice_bar = () => "../../uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_swiper + _easycom_wd_notice_bar + _easycom_z_paging + _easycom_uni_popup)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "index",
setup(__props) {
const store = store_index.Store();
const userInfo = common_vendor.computed(() => store.userInfo || {});
const popup = common_vendor.ref();
const current = common_vendor.ref(0);
common_vendor.ref(false);
const swiperList = common_vendor.ref([]);
const noticeList = common_vendor.ref({
content: ""
});
common_vendor.ref([]);
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const { navTo } = hooks_useNav.useNav();
const queryList = (pageNo, pageSize) => {
api_index.api.goodsPage({ pageNo, pageSize, recommended: 1 }).then((res) => {
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
common_vendor.onLoad(() => {
api_index.api.banner({
imageAddress: 1
}).then((res) => {
swiperList.value = res.list;
});
api_index.api.noticePage({ type: 1 }).then((res) => {
if (res.list != 0) {
noticeList.value = res.list[0];
}
});
});
const openCode = async () => {
await store.usersGetInfo();
popup.value.open();
};
const toGoods = (e) => {
common_vendor.index.navigateTo({
url: `/pages/goods/goods?id=${e}`
});
};
const toPrefecture = () => {
common_vendor.index.navigateTo({
url: "/pages/goods/prefecture"
});
};
const toNotice = () => {
common_vendor.index.navigateTo({
url: "/pages/notice/notice"
});
};
return (_ctx, _cache) => {
return {
a: common_assets._imports_0,
b: common_assets._imports_1,
c: common_vendor.p({
bordered: false,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
d: common_vendor.o(($event) => current.value = $event),
e: common_vendor.p({
customItemClass: "bannerRadius",
height: "292rpx",
list: ["/static/homeY.png"],
autoplay: true,
current: current.value
}),
f: common_vendor.o(toPrefecture),
g: common_assets._imports_2,
h: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/equity/equity", true)),
i: common_assets._imports_3,
j: common_vendor.o(openCode),
k: common_vendor.o(($event) => current.value = $event),
l: common_vendor.p({
list: swiperList.value,
["value-key"]: "image",
autoplay: true,
current: current.value
}),
m: common_assets._imports_4,
n: common_vendor.t(noticeList.value.content),
o: common_vendor.p({
color: "#90B77B",
["background-color"]: "#E2ECDC"
}),
p: common_vendor.o(toNotice),
q: common_vendor.f(dataList.value, (item, index, i0) => {
return {
a: item.cover,
b: common_vendor.t(item.name),
c: common_vendor.t(item.specs),
d: common_vendor.t(item.currentPrice),
e: common_vendor.o(($event) => toGoods(item.id), index),
f: index
};
}),
r: common_vendor.sr(paging, "1cf27b2a-4", {
"k": "paging"
}),
s: common_vendor.o(queryList),
t: common_vendor.o(($event) => dataList.value = $event),
v: common_vendor.p({
["use-page-scroll"]: true,
modelValue: dataList.value
}),
w: common_vendor.o(($event) => _ctx.$refs.popup.close()),
x: common_assets._imports_9,
y: userInfo.value.inviteCodeImg,
z: common_vendor.t(userInfo.value.inviteCode),
A: common_vendor.o(($event) => common_vendor.unref(utils_fun.copy)(userInfo.value.inviteCode)),
B: common_vendor.sr(popup, "1cf27b2a-5", {
"k": "popup"
}),
C: common_vendor.p({
type: "center",
["border-radius"]: "16rpx"
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1cf27b2a"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map

View File

@@ -0,0 +1,11 @@
{
"navigationBarTitleText": "首页",
"navigationStyle": "custom",
"usingComponents": {
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
"wd-swiper": "../../uni_modules/wot-design-uni/components/wd-swiper/wd-swiper",
"wd-notice-bar": "../../uni_modules/wot-design-uni/components/wd-notice-bar/wd-notice-bar",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@@ -0,0 +1 @@
<view class="home data-v-1cf27b2a"><view style="width:100%;height:582rpx" class="home_top data-v-1cf27b2a"><image class="data-v-1cf27b2a" src="{{a}}" style="width:750rpx;height:582rpx;position:absolute;top:0;left:0;z-index:-1"></image><wd-navbar wx:if="{{c}}" class="data-v-1cf27b2a" u-s="{{['left']}}" u-i="1cf27b2a-0" bind:__l="__l" u-p="{{c}}"><view class="data-v-1cf27b2a" style="display:flex;align-items:center" slot="left"><image class="data-v-1cf27b2a" src="{{b}}" style="width:96rpx;height:96rpx;margin-right:25rpx;background-color:rgba(255, 255, 255, 0.3);border-radius:50%"></image><view class="data-v-1cf27b2a" style="color:#fff;font-size:40rpx;font-weight:bold">苗草古方</view></view></wd-navbar><view class="p30 data-v-1cf27b2a" style="display:flex;align-items:center;justify-content:space-between"><view class="data-v-1cf27b2a" style="background-color:#fff;width:324rpx;border-radius:20rpx;overflow:hidden" bindtap="{{f}}"><wd-swiper wx:if="{{e}}" class="data-v-1cf27b2a" u-i="1cf27b2a-1" bind:__l="__l" bindupdateCurrent="{{d}}" u-p="{{e}}"></wd-swiper><view class="data-v-1cf27b2a" style="height:72rpx;display:flex;align-items:center;padding:20rpx;font-size:28rpx;font-weight:bold">进货专区</view></view><view class="home_top_block data-v-1cf27b2a"><view class="home_top_block_view data-v-1cf27b2a" style="color:#776926" bindtap="{{h}}"><image class="data-v-1cf27b2a" src="{{g}}"></image><view class="data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="font-size:32rpx;font-weight:bold">权益包</view><view class="data-v-1cf27b2a" style="font-size:24rpx;margin-top:10rpx">购买权益包</view><view class="data-v-1cf27b2a" style="font-size:24rpx">至高享七折优惠</view></view></view><view class="home_top_block_view data-v-1cf27b2a" style="background:#eef4f1;color:#175b39" bindtap="{{j}}"><image class="data-v-1cf27b2a" src="{{i}}"></image><view class="data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="font-size:32rpx;font-weight:bold">推荐好友</view><view class="data-v-1cf27b2a" style="font-size:24rpx;margin-top:10rpx">推荐好友加盟</view><view class="data-v-1cf27b2a" style="font-size:24rpx">边拿奖励边赚钱</view></view></view></view></view></view><view class="p30 data-v-1cf27b2a"><wd-swiper wx:if="{{l}}" class="data-v-1cf27b2a" u-i="1cf27b2a-2" bind:__l="__l" bindupdateCurrent="{{k}}" u-p="{{l}}"></wd-swiper><view class="mt30 data-v-1cf27b2a" bindtap="{{p}}"><wd-notice-bar wx:if="{{o}}" class="data-v-1cf27b2a" u-s="{{['d']}}" u-i="1cf27b2a-3" bind:__l="__l" u-p="{{o}}"><view class="data-v-1cf27b2a" slot="prefix"><image class="data-v-1cf27b2a" src="{{m}}" style="width:60rpx;height:60rpx"></image></view><view class="data-v-1cf27b2a" style="font-size:28rpx">{{n}}</view></wd-notice-bar></view><z-paging wx:if="{{v}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="paging" bindquery="{{s}}" u-i="1cf27b2a-4" bind:__l="__l" bindupdateModelValue="{{t}}" u-p="{{v}}"><view wx:for="{{q}}" wx:for-item="item" wx:key="f" class="home_block mt30 data-v-1cf27b2a" bindtap="{{item.e}}"><image class="home_block_left data-v-1cf27b2a" src="{{item.a}}"></image><view class="home_block_right data-v-1cf27b2a"><view class="home_block_right_title data-v-1cf27b2a">{{item.b}}</view><view class="home_block_right_info data-v-1cf27b2a">{{item.c}}</view><view class="data-v-1cf27b2a" style="display:flex;justify-content:space-between;align-items:center;margin-top:25rpx"><view class="data-v-1cf27b2a" style="font-size:36rpx;font-weight:bold;color:#ff2929">¥{{item.d}}</view><view class="home_block_right_button data-v-1cf27b2a">下单</view></view></view></view></z-paging></view><uni-popup wx:if="{{C}}" class="r data-v-1cf27b2a" u-s="{{['d']}}" u-r="popup" u-i="1cf27b2a-5" bind:__l="__l" u-p="{{C}}"><view class="shareBlock data-v-1cf27b2a"><view class="data-v-1cf27b2a" style="width:100%;text-align:right"><image bindtap="{{w}}" src="{{x}}" class="shareBlock_close data-v-1cf27b2a"></image></view><image class="shareBlock_code data-v-1cf27b2a" src="{{y}}"></image><view class="shareBlock_info data-v-1cf27b2a">打开微信扫描二维码,注册时输入邀请码</view><view class="shareBlock_codeInfo data-v-1cf27b2a"><view class="shareBlock_codeInfo_left data-v-1cf27b2a"> 邀请码: <text class="data-v-1cf27b2a" style="text-decoration:underline">{{z}}</text></view><view class="shareBlock_codeInfo_right data-v-1cf27b2a" bindtap="{{A}}">点击复制</view></view></view></uni-popup></view>

View File

@@ -0,0 +1,105 @@
/* 水平间距 */
/* 水平间距 */
.home_top.data-v-1cf27b2a {
--wot-swiper-radius: 0;
}
.home_top_block.data-v-1cf27b2a {
height: 364rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.home_top_block_view.data-v-1cf27b2a {
width: 346rpx;
height: 170rpx;
background: #f7f4e5;
border-radius: 30rpx 30rpx 30rpx 30rpx;
padding: 25rpx;
display: flex;
align-items: center;
}
.home_top_block_view image.data-v-1cf27b2a {
width: 100rpx;
height: 100rpx;
margin-right: 24rpx;
}
.home_block.data-v-1cf27b2a {
width: 690rpx;
height: 250rpx;
background: #ffffff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex;
align-items: center;
padding-right: 25rpx;
}
.home_block_left.data-v-1cf27b2a {
width: 250rpx;
height: 250rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
margin-right: 25rpx;
}
.home_block_right.data-v-1cf27b2a {
flex: 1;
}
.home_block_right_title.data-v-1cf27b2a {
font-weight: 600;
font-size: 28rpx;
color: #232323;
}
.home_block_right_info.data-v-1cf27b2a {
font-weight: 400;
font-size: 24rpx;
color: #232323;
margin-top: 25rpx;
}
.home_block_right_button.data-v-1cf27b2a {
width: 128rpx;
height: 48rpx;
background: #ff2a2a;
box-shadow: 0rpx 2rpx 4rpx 2rpx #dbdbdb;
border-radius: 10rpx 10rpx 10rpx 10rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 800;
font-size: 20rpx;
color: #ffffff;
}
.shareBlock.data-v-1cf27b2a {
margin: auto;
width: 650rpx;
height: 688rpx;
background: #ffffff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.shareBlock_close.data-v-1cf27b2a {
width: 68rpx;
height: 68rpx;
}
.shareBlock_code.data-v-1cf27b2a {
width: 392rpx;
height: 392rpx;
}
.shareBlock_info.data-v-1cf27b2a {
font-size: 24rpx;
color: #cccccc;
margin: 24rpx 0;
}
.shareBlock_codeInfo.data-v-1cf27b2a {
display: flex;
align-items: center;
}
.shareBlock_codeInfo_left.data-v-1cf27b2a {
font-weight: bold;
font-size: 32rpx;
color: #232323;
}
.shareBlock_codeInfo_right.data-v-1cf27b2a {
margin-left: 20rpx;
font-size: 24rpx;
color: #999999;
}

View File

@@ -0,0 +1,203 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const utils_fun = require("../../utils/fun.js");
const uni_modules_wotDesignUni_components_composables_useCountDown = require("../../uni_modules/wot-design-uni/components/composables/useCountDown.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
const store_index = require("../../store/index.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
_easycom_wd_navbar2();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
if (!Math) {
_easycom_wd_navbar();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "login",
setup(__props) {
const store = store_index.Store();
const { start, pause, reset, current } = uni_modules_wotDesignUni_components_composables_useCountDown.useCountDown({
time: 60 * 1e3,
onChange(current2) {
},
onFinish() {
codeIngo.value = "重新发送";
}
});
const initialRegisterInfo = {
mobile: "",
password: "",
code: "",
inviteCode: "",
passwordNew: ""
};
const registerInfo = common_vendor.ref({ ...initialRegisterInfo });
common_vendor.onLoad(() => {
if (common_vendor.index.getStorageSync("inviteCode")) {
registerInfo.value.inviteCode = common_vendor.index.getStorageSync("inviteCode");
common_vendor.index.__f__("log", "at pages/login/login.vue:133", registerInfo.value.inviteCode);
} else {
common_vendor.index.__f__("log", "at pages/login/login.vue:135", "未取到邀请码");
}
});
const resetRegisterInfo = () => {
registerInfo.value = { ...initialRegisterInfo };
};
const type = common_vendor.ref("login");
const codeIngo = common_vendor.ref("点击获取验证码");
const activeTab = common_vendor.ref("password");
const formData = common_vendor.ref({
mobile: "",
password: "",
code: ""
});
const submitLoading = common_vendor.ref(false);
const back = () => {
common_vendor.index.navigateBack();
};
const switchTabs = (v) => {
activeTab.value = v;
formData.value = {};
};
const getCode = (e) => {
if (!formData.value.mobile && e == 1) {
utils_fun.toast("请输入手机号");
return;
}
if (!registerInfo.value.mobile && e == 2) {
utils_fun.toast("请输入手机号");
return;
}
if (current.value.seconds) {
utils_fun.toast("请等待倒计时结束");
return;
}
api_index.api.smsCode({
mobile: e == 2 ? registerInfo.value.mobile : formData.value.mobile,
scene: 1
}).then((res) => {
start();
utils_fun.toast("验证码发送成功");
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/login/login.vue:192", err);
utils_fun.toast("验证码发送失败");
});
};
const login = () => {
if (type.value == "register") {
if (!registerInfo.value.mobile)
return utils_fun.toast("请输入手机号码");
if (!registerInfo.value.code)
return utils_fun.toast("请输入验证码");
if (!registerInfo.value.password)
return utils_fun.toast("请输入密码");
if (!registerInfo.value.passwordNew)
return utils_fun.toast("请再次输入密码");
if (registerInfo.value.password != registerInfo.value.passwordNew)
return utils_fun.toast("两次密码输入不一致");
api_index.api.registerApi(registerInfo.value).then((res) => {
common_vendor.index.showModal({
title: "提示",
content: "注册成功",
showCancel: false,
success: (res2) => {
type.value = "login";
resetRegisterInfo();
}
});
});
} else {
if (!formData.value.mobile)
return utils_fun.toast("请输入手机号码");
if (activeTab.value === "password") {
if (!formData.value.password)
return utils_fun.toast("请输入登录密码");
api_index.api.loginApi(formData.value).then((res) => {
common_vendor.index.setStorageSync("Authorization", res.accessToken);
store.setUserId(res.userId);
store.usersGetInfo();
back();
});
} else {
if (!formData.value.code)
return utils_fun.toast("请输入验证码");
api_index.api.smsLoginApi(formData.value).then((res) => {
common_vendor.index.setStorageSync("Authorization", res.accessToken);
store.setUserId(res.userId);
store.usersGetInfo();
back();
});
}
}
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_assets._imports_0$3,
b: common_vendor.o(back),
c: common_vendor.p({
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
d: type.value == "login"
}, type.value == "login" ? common_vendor.e({
e: activeTab.value === "password"
}, activeTab.value === "password" ? {} : {}, {
f: activeTab.value === "password" ? 1 : "",
g: common_vendor.o(($event) => switchTabs("password")),
h: activeTab.value === "code"
}, activeTab.value === "code" ? {} : {}, {
i: activeTab.value === "code" ? 1 : "",
j: common_vendor.o(($event) => switchTabs("code"))
}) : {}, {
k: type.value == "login"
}, type.value == "login" ? common_vendor.e({
l: formData.value.mobile,
m: common_vendor.o(($event) => formData.value.mobile = $event.detail.value),
n: activeTab.value === "password"
}, activeTab.value === "password" ? {
o: formData.value.password,
p: common_vendor.o(($event) => formData.value.password = $event.detail.value)
} : {
q: formData.value.code,
r: common_vendor.o(($event) => formData.value.code = $event.detail.value),
s: common_vendor.t(common_vendor.unref(current).seconds || codeIngo.value),
t: common_vendor.o(($event) => getCode(1))
}) : {}, {
v: type.value == "register"
}, type.value == "register" ? {
w: registerInfo.value.mobile,
x: common_vendor.o(($event) => registerInfo.value.mobile = $event.detail.value),
y: registerInfo.value.code,
z: common_vendor.o(($event) => registerInfo.value.code = $event.detail.value),
A: common_vendor.t(common_vendor.unref(current).seconds || codeIngo.value),
B: common_vendor.o(($event) => getCode(2)),
C: registerInfo.value.password,
D: common_vendor.o(($event) => registerInfo.value.password = $event.detail.value),
E: registerInfo.value.passwordNew,
F: common_vendor.o(($event) => registerInfo.value.passwordNew = $event.detail.value),
G: registerInfo.value.inviteCode,
H: common_vendor.o(($event) => registerInfo.value.inviteCode = $event.detail.value)
} : {}, {
I: type.value == "register"
}, type.value == "register" ? {
J: common_vendor.o(($event) => type.value = "login")
} : {}, {
K: type.value == "login"
}, type.value == "login" ? {
L: common_vendor.o(($event) => type.value = "register")
} : {}, {
M: common_vendor.t(type.value == "register" ? "注册" : "登录"),
N: submitLoading.value,
O: submitLoading.value,
P: common_vendor.o(login)
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-e4e4508d"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/login/login.js.map

View File

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

View File

@@ -0,0 +1 @@
<view class="login-container data-v-e4e4508d"><image class="bg-image data-v-e4e4508d" src="{{a}}" mode="aspectFill"></image><wd-navbar wx:if="{{c}}" class="data-v-e4e4508d" bindclickLeft="{{b}}" u-i="e4e4508d-0" bind:__l="__l" u-p="{{c}}"></wd-navbar><view class="content data-v-e4e4508d"><view class="logo-container data-v-e4e4508d">你好!!</view><view class="welcome-text data-v-e4e4508d"><view class="data-v-e4e4508d">欢迎来到</view><view class="welcome-tag data-v-e4e4508d">苗草古方</view></view><view wx:if="{{d}}" class="tabs data-v-e4e4508d"><view class="{{['tab-item', 'data-v-e4e4508d', f && 'active']}}" bindtap="{{g}}"><text class="data-v-e4e4508d">密码登录</text><view wx:if="{{e}}" class="underline data-v-e4e4508d"></view></view><view class="{{['tab-item', 'data-v-e4e4508d', i && 'active']}}" bindtap="{{j}}"><text class="data-v-e4e4508d">验证码登录</text><view wx:if="{{h}}" class="underline data-v-e4e4508d"></view></view></view><view class="form-container data-v-e4e4508d"><view wx:if="{{k}}" class="data-v-e4e4508d"><view class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入用户名" style="font-weight:600;font-size:36rpx" placeholder-style="color: #999999;font-size: 28rpx;font-weight: 400 !important;" type="number" value="{{l}}" bindinput="{{m}}"/></view><view wx:if="{{n}}" class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入密码" password placeholder-style="color: #999999;;font-size: 28rpx;" value="{{o}}" bindinput="{{p}}"/></view><view wx:else class="input-item code-input data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入验证码" placeholder-style="color: #999999;;font-size: 28rpx;" value="{{q}}" bindinput="{{r}}"/><view class="get-code data-v-e4e4508d" bindtap="{{t}}">{{s}}</view></view></view><view wx:if="{{v}}" class="data-v-e4e4508d"><view class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入用户名" type="number" style="font-weight:600;font-size:36rpx" placeholder-style="color: #999999;font-size: 28rpx;font-weight: 400 !important;" value="{{w}}" bindinput="{{x}}"/></view><view class="input-item code-input data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入验证码" placeholder-style="color: #999999;;font-size: 28rpx;" value="{{y}}" bindinput="{{z}}"/><view class="get-code data-v-e4e4508d" bindtap="{{B}}">{{A}}</view></view><view class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入您的密码" password placeholder-style="color: #999999;;font-size: 28rpx;" value="{{C}}" bindinput="{{D}}"/></view><view class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请再次输入您的密码" password placeholder-style="color: #999999;;font-size: 28rpx;" value="{{E}}" bindinput="{{F}}"/></view><view class="input-item data-v-e4e4508d"><input class="data-v-e4e4508d" placeholder="请输入邀请码(非必填)" placeholder-style="color: #999999;;font-size: 28rpx;" value="{{G}}" bindinput="{{H}}"/></view></view><view wx:if="{{I}}" class="register-text data-v-e4e4508d" bindtap="{{J}}"><text class="data-v-e4e4508d">已有账号?</text><text class="register-link data-v-e4e4508d">立即登录</text></view><view wx:if="{{K}}" class="register-text data-v-e4e4508d" bindtap="{{L}}"><text class="data-v-e4e4508d">还没有账号?</text><text class="register-link data-v-e4e4508d">立即注册</text></view><button class="login-btn data-v-e4e4508d" loading="{{N}}" disabled="{{O}}" bindtap="{{P}}">{{M}}</button></view></view></view>

View File

@@ -0,0 +1,139 @@
/* 水平间距 */
/* 水平间距 */
.login-container.data-v-e4e4508d {
position: relative;
width: 100%;
height: 100vh;
}
.bg-image.data-v-e4e4508d {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
}
.back-btn.data-v-e4e4508d {
position: absolute;
top: 100rpx;
left: 40rpx;
width: 40rpx;
height: 40rpx;
z-index: 10;
}
.content.data-v-e4e4508d {
padding: 0 65rpx;
margin-top: 180rpx;
position: absolute;
}
.logo-container.data-v-e4e4508d {
margin-bottom: 8rpx;
font-weight: bold;
font-size: 44rpx;
color: #232323;
}
.logo.data-v-e4e4508d {
width: 180rpx;
height: 180rpx;
}
.welcome-text.data-v-e4e4508d {
font-weight: bold;
font-size: 44rpx;
color: #232323;
text-align: center;
margin-bottom: 60rpx;
display: flex;
align-items: flex-end;
}
.welcome-tag.data-v-e4e4508d {
color: #5d7a4e;
margin-left: 12rpx;
font-size: 44rpx;
}
.tabs.data-v-e4e4508d {
display: flex;
margin-bottom: 40rpx;
}
.tab-item.data-v-e4e4508d {
position: relative;
margin-right: 60rpx;
}
.tab-item text.data-v-e4e4508d {
font-weight: bold;
font-size: 28rpx;
}
.tab-item.active text.data-v-e4e4508d {
color: #232323;
}
.tab-item:not(.active) text.data-v-e4e4508d {
color: #999999;
}
.underline.data-v-e4e4508d {
width: 104rpx;
height: 4rpx;
background: #5d7a4e;
border-radius: 170rpx;
}
.form-container.data-v-e4e4508d {
width: 100%;
}
.input-item.data-v-e4e4508d {
width: 620rpx;
height: 90rpx;
background: #ffffff;
border-radius: 14rpx;
border: 2rpx solid #f6f6f6;
margin-bottom: 30rpx;
padding: 0 30rpx;
display: flex;
align-items: center;
}
.input-item input.data-v-e4e4508d {
width: 100%;
height: 100%;
font-size: 28rpx;
color: #333333;
}
.code-input input.data-v-e4e4508d {
flex: 1;
}
.code-input .get-code.data-v-e4e4508d {
font-size: 24rpx;
color: #8e8e8e;
margin-left: 20rpx;
}
.register-text.data-v-e4e4508d {
display: flex;
margin-bottom: 210rpx;
font-size: 26rpx;
color: #232323;
}
.register-link.data-v-e4e4508d {
color: #5d7a4e;
margin-left: 10rpx;
}
.login-btn.data-v-e4e4508d {
width: 474rpx;
height: 78rpx;
line-height: 78rpx;
border-radius: 39rpx;
text-align: center;
color: #fff !important;
font-size: 28rpx;
margin: 0 auto;
margin-bottom: 40rpx;
background: #5d7a4e !important;
}
.login-btn.data-v-e4e4508d::after {
border: none;
}
.agreement.data-v-e4e4508d {
display: flex;
justify-content: center;
font-size: 24rpx;
color: #999999;
}
.agreement-link.data-v-e4e4508d {
color: #5d7a4e;
margin: 0 10rpx;
}

View File

@@ -0,0 +1,90 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const utils_fun = require("../../utils/fun.js");
const store_index = require("../../store/index.js");
const hooks_useNav = require("../../hooks/useNav.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_uni_popup2 = common_vendor.resolveComponent("uni-popup");
(_easycom_wd_navbar2 + _easycom_uni_popup2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_uni_popup = () => "../../uni_modules/uni-popup/components/uni-popup/uni-popup.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_uni_popup)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "mine",
setup(__props) {
const { navTo } = hooks_useNav.useNav();
const store = store_index.Store();
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
common_vendor.onShow(async () => {
await store.usersGetInfo();
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_assets._imports_0$2,
b: common_vendor.p({
bordered: false,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
c: userInfo.value.avatar,
d: common_vendor.t(userInfo.value.nickname || "微信用户"),
e: common_vendor.t(userInfo.value.mobile),
f: userInfo.value.inviteCodeImg
}, userInfo.value.inviteCodeImg ? {
g: common_assets._imports_1$1,
h: common_vendor.o(($event) => _ctx.$refs.popup.open())
} : {}, {
i: common_assets._imports_2$1,
j: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/equity/equity", true)),
k: common_assets._imports_0$1,
l: common_vendor.t(userInfo.value.money || 0),
m: common_vendor.t(userInfo.value.performanceReward || 0),
n: common_vendor.t(userInfo.value.directReferralReward || 0),
o: common_vendor.t(userInfo.value.indirectReferralReward || 0),
p: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/wallet/wallet", true)),
q: common_assets._imports_4$1,
r: common_assets._imports_0$1,
s: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/mine/sett", true)),
t: common_assets._imports_5,
v: common_assets._imports_0$1,
w: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/wallet/list", true)),
x: common_assets._imports_6,
y: common_assets._imports_0$1,
z: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/team/team", true)),
A: common_assets._imports_7,
B: common_assets._imports_0$1,
C: common_vendor.o(($event) => common_vendor.unref(navTo)("/pages/address/list", true)),
D: common_assets._imports_5$1,
E: common_assets._imports_0$1,
F: common_vendor.o(($event) => _ctx.$refs.popup.close()),
G: common_assets._imports_9,
H: userInfo.value.inviteCodeImg,
I: common_vendor.t(userInfo.value.inviteCode),
J: common_vendor.o(($event) => common_vendor.unref(utils_fun.copy)(userInfo.value.inviteCode)),
K: common_vendor.sr("popup", "7c2ebfa5-1"),
L: common_vendor.p({
type: "center",
["border-radius"]: "16rpx"
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-7c2ebfa5"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/mine.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"usingComponents": {
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
"uni-popup": "../../uni_modules/uni-popup/components/uni-popup/uni-popup"
}
}

View File

@@ -0,0 +1 @@
<view class="container data-v-7c2ebfa5"><image class="data-v-7c2ebfa5" src="{{a}}" style="width:750rpx;height:762rpx;position:fixed;top:0;left:0;z-index:-1"></image><wd-navbar wx:if="{{b}}" class="data-v-7c2ebfa5" u-i="7c2ebfa5-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><view class="p30 data-v-7c2ebfa5"><view class="user-header data-v-7c2ebfa5"><image class="avatar data-v-7c2ebfa5" src="{{c}}"></image><view class="user-info data-v-7c2ebfa5"><view class="username data-v-7c2ebfa5">{{d}}</view><view class="phone data-v-7c2ebfa5">{{e}}</view></view><view wx:if="{{f}}" class="invite-code data-v-7c2ebfa5" bindtap="{{h}}"><image class="data-v-7c2ebfa5" style="width:38rpx;height:38rpx" src="{{g}}"></image><text class="data-v-7c2ebfa5">邀请码</text></view></view><view class="promo-bar data-v-7c2ebfa5"><text class="data-v-7c2ebfa5">购买权益包至高享2.5折优惠</text><view class="go-shop data-v-7c2ebfa5" bindtap="{{j}}"><text class="data-v-7c2ebfa5">去下单</text><image class="data-v-7c2ebfa5" src="{{i}}" style="width:26rpx;height:26rpx"></image></view></view><view class="wallet-section data-v-7c2ebfa5" bindtap="{{p}}"><view class="section-title data-v-7c2ebfa5"><text class="data-v-7c2ebfa5">我的钱包</text><image class="data-v-7c2ebfa5" src="{{k}}" style="width:34rpx;height:34rpx"></image></view><view class="wallet-cards data-v-7c2ebfa5"><view class="wallet-item data-v-7c2ebfa5"><text class="amount red data-v-7c2ebfa5">{{l}}</text><text class="label data-v-7c2ebfa5">余额</text><text class="desc data-v-7c2ebfa5">包含奖励</text></view><view class="wallet-item data-v-7c2ebfa5"><text class="amount data-v-7c2ebfa5">{{m}}</text><text class="label data-v-7c2ebfa5">业绩奖励</text><text class="desc data-v-7c2ebfa5">售出分成</text></view><view class="wallet-item data-v-7c2ebfa5"><text class="amount data-v-7c2ebfa5">{{n}}</text><text class="label data-v-7c2ebfa5">直推奖励</text></view><view class="wallet-item data-v-7c2ebfa5"><text class="amount data-v-7c2ebfa5">{{o}}</text><text class="label data-v-7c2ebfa5">间推奖励</text></view></view></view><view class="function-list data-v-7c2ebfa5"><view class="function-item data-v-7c2ebfa5" bindtap="{{s}}"><image class="data-v-7c2ebfa5" src="{{q}}"></image><text class="data-v-7c2ebfa5">个人信息</text><image class="data-v-7c2ebfa5" src="{{r}}" style="width:34rpx;height:34rpx"></image></view><view class="function-item data-v-7c2ebfa5" bindtap="{{w}}"><image class="data-v-7c2ebfa5" src="{{t}}"></image><text class="data-v-7c2ebfa5">我的账单</text><image class="data-v-7c2ebfa5" src="{{v}}" style="width:34rpx;height:34rpx"></image></view><view class="function-item data-v-7c2ebfa5" bindtap="{{z}}"><image class="data-v-7c2ebfa5" src="{{x}}"></image><text class="data-v-7c2ebfa5">我的团队</text><image class="data-v-7c2ebfa5" src="{{y}}" style="width:34rpx;height:34rpx"></image></view><view class="function-item data-v-7c2ebfa5" bindtap="{{C}}"><image class="data-v-7c2ebfa5" src="{{A}}"></image><text class="data-v-7c2ebfa5">地址管理</text><image class="data-v-7c2ebfa5" src="{{B}}" style="width:34rpx;height:34rpx"></image></view><button class="function-item data-v-7c2ebfa5" open-type="contact"><image class="data-v-7c2ebfa5" src="{{D}}"></image><text class="data-v-7c2ebfa5">联系客服</text><image class="data-v-7c2ebfa5" src="{{E}}" style="width:34rpx;height:34rpx"></image></button></view></view><uni-popup wx:if="{{L}}" class="r data-v-7c2ebfa5" u-s="{{['d']}}" u-r="popup" u-i="7c2ebfa5-1" bind:__l="__l" u-p="{{L}}"><view class="shareBlock data-v-7c2ebfa5"><view class="data-v-7c2ebfa5" style="width:100%;text-align:right"><image bindtap="{{F}}" src="{{G}}" class="shareBlock_close data-v-7c2ebfa5"></image></view><image class="shareBlock_code data-v-7c2ebfa5" src="{{H}}"></image><view class="shareBlock_info data-v-7c2ebfa5">打开微信扫描二维码,注册时输入邀请码</view><view class="shareBlock_codeInfo data-v-7c2ebfa5"><view class="shareBlock_codeInfo_left data-v-7c2ebfa5"> 邀请码: <text class="data-v-7c2ebfa5" style="text-decoration:underline">{{I}}</text></view><view class="shareBlock_codeInfo_right data-v-7c2ebfa5" bindtap="{{J}}">点击复制</view></view></view></uni-popup></view>

View File

@@ -0,0 +1,240 @@
/* 水平间距 */
/* 水平间距 */
.container.data-v-7c2ebfa5 {
width: 100%;
min-height: 100vh;
display: flex;
flex-direction: column;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, sans-serif;
}
/* 用户信息头部 */
.user-header.data-v-7c2ebfa5 {
background-size: cover;
padding: 40rpx 30rpx 60rpx;
display: flex;
/* align-items: center; */
position: relative;
}
.user-header.data-v-7c2ebfa5::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.avatar.data-v-7c2ebfa5 {
width: 152rpx;
height: 152rpx;
border-radius: 50%;
margin-right: 20rpx;
background-color: #eee;
}
.user-info.data-v-7c2ebfa5 {
flex: 1;
z-index: 1;
height: 152rpx;
display: flex;
flex-direction: column;
justify-content: center;
}
.username.data-v-7c2ebfa5 {
font-size: 34rpx;
font-weight: bold;
color: #333;
}
.phone.data-v-7c2ebfa5 {
font-size: 30rpx;
color: #666;
margin-top: 24rpx;
}
.invite-code.data-v-7c2ebfa5 {
display: flex;
align-items: center;
flex-direction: column;
z-index: 1;
}
.invite-code text.data-v-7c2ebfa5 {
font-size: 24rpx;
color: #232323;
margin-top: 10rpx;
}
.qrcode-btn.data-v-7c2ebfa5 {
display: flex;
align-items: center;
font-size: 26rpx;
color: #666;
}
.arrow.data-v-7c2ebfa5 {
margin-left: 6rpx;
color: #999;
}
/* 优惠提示栏 */
.promo-bar.data-v-7c2ebfa5 {
width: 638rpx;
height: 70rpx;
background: #799675;
border-radius: 16rpx 16rpx 0rpx 0rpx;
padding: 0 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 28rpx;
margin: 0 auto;
font-weight: bold;
font-size: 24rpx;
color: #ffff94;
}
.go-shop.data-v-7c2ebfa5 {
display: flex;
align-items: center;
}
/* 钱包区域 */
.wallet-section.data-v-7c2ebfa5 {
background-color: white;
margin: 0rpx 0 20rpx;
padding: 30rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.section-title.data-v-7c2ebfa5 {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10rpx 0 20rpx;
font-size: 32rpx;
font-weight: bold;
color: #333;
border-bottom: 1px solid #eee;
margin-bottom: 20rpx;
}
.wallet-cards.data-v-7c2ebfa5 {
display: flex;
justify-content: space-between;
}
.wallet-item.data-v-7c2ebfa5 {
display: flex;
flex-direction: column;
flex: 1;
text-align: center;
}
.label.data-v-7c2ebfa5 {
font-size: 28rpx;
color: #666;
}
.amount.data-v-7c2ebfa5 {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 10rpx;
}
.red.data-v-7c2ebfa5 {
color: #ff4d4f;
}
.desc.data-v-7c2ebfa5 {
font-size: 20rpx;
color: #999;
margin-top: 6rpx;
}
/* 订单区域 */
.order-section.data-v-7c2ebfa5 {
background-color: white;
margin-bottom: 20rpx;
padding: 30rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.order-types.data-v-7c2ebfa5 {
display: flex;
justify-content: space-between;
margin-top: 20rpx;
}
.order-type.data-v-7c2ebfa5 {
display: flex;
flex-direction: column;
align-items: center;
width: 22%;
}
.order-type image.data-v-7c2ebfa5 {
width: 56rpx;
height: 56rpx;
margin-bottom: 10rpx;
}
.order-type text.data-v-7c2ebfa5 {
font-size: 26rpx;
color: #232323;
}
/* 功能列表 */
.function-list.data-v-7c2ebfa5 {
background-color: white;
margin-bottom: 20rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.function-item.data-v-7c2ebfa5 {
display: flex;
align-items: center;
padding: 30rpx;
border-bottom: 1rpx solid #f7f7f7;
}
.function-item image.data-v-7c2ebfa5 {
width: 48rpx;
height: 48rpx;
margin-right: 20rpx;
}
.function-item text.data-v-7c2ebfa5 {
flex: 1;
font-size: 28rpx;
color: #333;
font-weight: bold;
}
.info.data-v-7c2ebfa5 {
color: #232323 !important;
font-weight: 500 !important;
text-align: right;
}
button.data-v-7c2ebfa5 {
all: unset;
}
button.data-v-7c2ebfa5::after {
all: unset;
}
.shareBlock.data-v-7c2ebfa5 {
margin: auto;
width: 650rpx;
height: 688rpx;
background: #ffffff;
border-radius: 16rpx 16rpx 16rpx 16rpx;
padding: 20rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.shareBlock_close.data-v-7c2ebfa5 {
width: 68rpx;
height: 68rpx;
}
.shareBlock_code.data-v-7c2ebfa5 {
width: 392rpx;
height: 392rpx;
}
.shareBlock_info.data-v-7c2ebfa5 {
font-size: 24rpx;
color: #cccccc;
margin: 24rpx 0;
}
.shareBlock_codeInfo.data-v-7c2ebfa5 {
display: flex;
align-items: center;
}
.shareBlock_codeInfo_left.data-v-7c2ebfa5 {
font-weight: bold;
font-size: 32rpx;
color: #232323;
}
.shareBlock_codeInfo_right.data-v-7c2ebfa5 {
margin-left: 20rpx;
font-size: 24rpx;
color: #999999;
}

View File

@@ -0,0 +1,133 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const utils_fun = require("../../utils/fun.js");
const uni_modules_wotDesignUni_components_composables_useCountDown = require("../../uni_modules/wot-design-uni/components/composables/useCountDown.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
const api_index = require("../../api/index.js");
const store_index = require("../../store/index.js");
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "mobile",
setup(__props) {
const store = store_index.Store();
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
common_vendor.onShow(async () => {
await store.usersGetInfo();
});
const codeIngo1 = common_vendor.ref("获取验证码");
const codeIngo2 = common_vendor.ref("获取验证码");
const formData = common_vendor.ref({
code: "",
mobile: "",
oldCode: ""
});
const {
start: start1,
pause: pause1,
reset: reset1,
current: current1
} = uni_modules_wotDesignUni_components_composables_useCountDown.useCountDown({
time: 60 * 1e3,
onChange(current) {
},
onFinish() {
codeIngo1.value = "重新发送";
}
});
const {
start: start2,
pause: pause2,
reset: reset2,
current: current2
} = uni_modules_wotDesignUni_components_composables_useCountDown.useCountDown({
time: 60 * 1e3,
onChange(current) {
},
onFinish() {
codeIngo2.value = "重新发送";
}
});
const getCode1 = (e) => {
if (!userInfo.value.mobile) {
utils_fun.toast("请输入旧手机号");
return;
}
if (current1.value.seconds) {
utils_fun.toast("请等待倒计时结束");
return;
}
api_index.api.smsCode({
mobile: userInfo.value.mobile,
scene: 2
}).then((res) => {
start1();
utils_fun.toast("验证码发送成功");
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/mine/mobile.vue:126", err);
utils_fun.toast("验证码发送失败");
});
};
const getCode2 = (e) => {
if (!formData.value.mobile) {
utils_fun.toast("请输入旧手机号");
return;
}
if (current2.value.seconds) {
utils_fun.toast("请等待倒计时结束");
return;
}
api_index.api.smsCode({
mobile: formData.value.mobile,
scene: 2
}).then((res) => {
start2();
utils_fun.toast("验证码发送成功");
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/mine/mobile.vue:152", err);
utils_fun.toast("验证码发送失败");
});
};
const handleSubmit = () => {
api_index.api.updateMobile(formData.value).then((res) => {
common_vendor.index.showModal({
title: "提示",
content: "修改成功",
showCancel: false,
success: async () => {
await store.usersGetInfo();
common_vendor.index.navigateBack();
}
});
});
};
return (_ctx, _cache) => {
return {
a: userInfo.value.mobile,
b: formData.value.oldCode,
c: common_vendor.o(($event) => formData.value.oldCode = $event.detail.value),
d: common_vendor.t(common_vendor.unref(current1).seconds || codeIngo1.value),
e: common_vendor.o(getCode1),
f: formData.value.mobile,
g: common_vendor.o(($event) => formData.value.mobile = $event.detail.value),
h: formData.value.code,
i: common_vendor.o(($event) => formData.value.code = $event.detail.value),
j: common_vendor.t(common_vendor.unref(current2).seconds || codeIngo2.value),
k: common_vendor.o(getCode2),
l: common_vendor.o(handleSubmit)
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-9262aba8"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/mobile.js.map

View File

@@ -0,0 +1,5 @@
{
"navigationBarTitleText": "修改手机号",
"navigationBarBackgroundColor": "#fff",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="page-container data-v-9262aba8"><view class="form-group data-v-9262aba8"><text class="label data-v-9262aba8">旧手机号:</text><input class="input data-v-9262aba8" type="number" placeholder="请输入旧手机号" disabled value="{{a}}" maxlength="11"/></view><view class="form-group code-group data-v-9262aba8"><text class="label data-v-9262aba8">短信验证码:</text><input class="input data-v-9262aba8" type="number" placeholder="请输入短信验证码" maxlength="6" value="{{b}}" bindinput="{{c}}"/><view class="code-btn data-v-9262aba8" bindtap="{{e}}">{{d}}</view></view><view class="form-group data-v-9262aba8"><text class="label data-v-9262aba8">新手机号:</text><input class="input data-v-9262aba8" type="number" placeholder="请输入新手机号" maxlength="11" value="{{f}}" bindinput="{{g}}"/></view><view class="form-group code-group data-v-9262aba8"><text class="label data-v-9262aba8">短信验证码:</text><input class="input data-v-9262aba8" type="number" placeholder="请输入短信验证码" maxlength="6" value="{{h}}" bindinput="{{i}}"/><view class="code-btn data-v-9262aba8" bindtap="{{k}}">{{j}}</view></view><button class="confirm-btn data-v-9262aba8" bindtap="{{l}}">确定</button><view class="tips data-v-9262aba8"><text class="tips-title data-v-9262aba8">温馨提醒:</text><text class="tips-item data-v-9262aba8">1. 一个手机号只能作为一个账户的登录名;</text><text class="tips-item data-v-9262aba8">2. 手机号修改成功后,原手机号将不支持登录。</text></view></view>

View File

@@ -0,0 +1,69 @@
.page-container.data-v-9262aba8 {
padding: 30rpx;
background-color: #fff;
}
/* 表单组通用样式 */
.form-group.data-v-9262aba8 {
display: flex;
align-items: center;
margin-bottom: 40rpx;
}
.label.data-v-9262aba8 {
font-size: 26rpx;
color: #333;
width: 180rpx; /* 固定标签宽度,保证输入框对齐 */
font-weight: bold;
}
.input.data-v-9262aba8 {
flex: 1;
height: 60rpx;
line-height: 60rpx;
border-bottom: 1px solid #eee; /* 底部下划线 */
font-size: 28rpx;
color: #666;
}
/* 验证码按钮组 */
.code-group.data-v-9262aba8 {
justify-content: space-between; /* 输入框与按钮左右分布 */
}
.code-btn.data-v-9262aba8 {
width: 175rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 28rpx;
color: #5d7a4e;
border: 1rpx solid #5d7a4e;
text-align: center;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}
/* 确定按钮 */
.confirm-btn.data-v-9262aba8 {
width: 100%;
height: 80rpx;
line-height: 80rpx;
font-size: 32rpx;
color: #fff;
background-color: #5d7a4e; /* 深绿 */
border-radius: 10rpx;
margin-top: 50rpx;
}
/* 温馨提示 */
.tips.data-v-9262aba8 {
margin-top: 60rpx;
font-size: 26rpx;
color: #999;
line-height: 44rpx;
}
.tips-title.data-v-9262aba8 {
display: block;
margin-bottom: 20rpx;
font-weight: 500;
}
.tips-item.data-v-9262aba8 {
display: block;
}

View File

@@ -0,0 +1,122 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const utils_fun = require("../../utils/fun.js");
const store_index = require("../../store/index.js");
const uni_modules_wotDesignUni_components_wdMessageBox_index = require("../../uni_modules/wot-design-uni/components/wd-message-box/index.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_message_box2 = common_vendor.resolveComponent("wd-message-box");
(_easycom_wd_navbar2 + _easycom_wd_message_box2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_message_box = () => "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_message_box)();
}
const _sfc_main = {
__name: "sett",
setup(__props) {
const message = uni_modules_wotDesignUni_components_wdMessageBox_index.useMessage();
const store = store_index.Store();
const back = () => {
common_vendor.index.navigateBack();
};
const userInfo = common_vendor.computed(() => store.userInfo || {});
const form = common_vendor.ref({
avatar: "",
nickname: "",
mobile: "",
sex: 0
});
common_vendor.onShow(async () => {
await store.usersGetInfo();
});
common_vendor.onLoad(async () => {
const storage = common_vendor.index.getStorageSync("userInfo");
if (storage) {
const getData = await getUser();
common_vendor.index.setStorageSync("userInfo", getData);
form.value = { ...getData };
}
});
function prompt() {
message.prompt({
title: "请输入昵称",
inputValue: form.value.nickname
}).then(async (res) => {
await api_index.api.usersUpdate({ nickname: res.value || "微信用户" });
await store.usersGetInfo();
}).catch((error) => {
common_vendor.index.__f__("log", "at pages/mine/sett.vue:104", error);
});
}
common_vendor.ref("");
const chooseAvatar = async (e) => {
try {
if (e.detail.avatarUrl) {
const imgUrl = await utils_fun.uploadFiles(e.detail.avatarUrl);
await api_index.api.usersUpdate({ avatar: imgUrl, mobile: userInfo.value.mobile, nickname: userInfo.value.nickname || "微信用户" });
await store.usersGetInfo();
}
} catch (err) {
common_vendor.index.__f__("error", "at pages/mine/sett.vue:121", "选择头像失败:", err);
}
};
const logout = async () => {
common_vendor.index.showModal({
title: "提示",
content: `是否确认退出登录?`,
success: function(res) {
if (res.confirm) {
store.logoutUser();
} else if (res.cancel) {
common_vendor.index.__f__("log", "at pages/mine/sett.vue:154", "用户点击取消");
}
}
});
};
const toPhone = () => {
common_vendor.index.navigateTo({
url: "/pages/mine/mobile"
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(back),
b: common_vendor.p({
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
title: "个人信息",
safeAreaInsetTop: true
}),
c: common_assets._imports_0$6,
d: userInfo.value.avatar
}, userInfo.value.avatar ? {
e: userInfo.value.avatar
} : {
f: common_assets._imports_1$4
}, {
g: common_vendor.o(chooseAvatar),
h: common_vendor.t(userInfo.value.nickname || "微信用户"),
i: common_assets._imports_0$1,
j: common_vendor.o(prompt),
k: common_vendor.t(userInfo.value.mobile),
l: common_assets._imports_0$1,
m: common_vendor.o(toPhone),
n: userInfo.value.userRights
}, userInfo.value.userRights ? {
o: common_vendor.t(userInfo.value.userRights.rights.rightsName)
} : {}, {
p: common_vendor.o(logout)
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-eefb1794"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/mine/sett.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "",
"navigationStyle": "custom",
"usingComponents": {
"wd-navbar": "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar",
"wd-message-box": "../../uni_modules/wot-design-uni/components/wd-message-box/wd-message-box"
}
}

View File

@@ -0,0 +1 @@
<view class="container data-v-eefb1794"><wd-navbar wx:if="{{b}}" class="data-v-eefb1794" bindclickLeft="{{a}}" u-i="eefb1794-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><image class="data-v-eefb1794" src="{{c}}" style="width:750rpx;height:690rpx;position:absolute;top:0;left:0;z-index:-1" mode="widthFix"></image><view class="data-v-eefb1794" style="padding:30rpx"><view class="card data-v-eefb1794"><view class="avatar-row data-v-eefb1794"><text class="label data-v-eefb1794">头像</text><button class="avatar-btn data-v-eefb1794" open-type="chooseAvatar" bindchooseavatar="{{g}}"><view class="avatar-uploader data-v-eefb1794"><image wx:if="{{d}}" src="{{e}}" class="avatar-image data-v-eefb1794"></image><view wx:else class="avatar-placeholder data-v-eefb1794"><image class="data-v-eefb1794" src="{{f}}"></image></view></view></button></view><view class="form-row data-v-eefb1794" bindtap="{{j}}"><text class="label required data-v-eefb1794">账户名称</text><view class="form-row-right data-v-eefb1794" style="font-size:28rpx"><view class="data-v-eefb1794">{{h}}</view><image class="data-v-eefb1794" src="{{i}}" style="opacity:0.5;width:30rpx;height:30rpx" mode="widthFix"></image></view></view><view class="form-row data-v-eefb1794" bindtap="{{m}}"><text class="label required data-v-eefb1794">手机号</text><view class="form-row-right data-v-eefb1794" style="font-size:28rpx"><view class="data-v-eefb1794">{{k}}</view><image class="data-v-eefb1794" src="{{l}}" style="opacity:0.5;width:30rpx;height:30rpx" mode="widthFix"></image></view></view><view class="form-row data-v-eefb1794"><text class="label required data-v-eefb1794">等级</text><view wx:if="{{n}}" class="data-v-eefb1794" style="font-size:28rpx">{{o}}</view><view wx:else class="data-v-eefb1794" style="font-size:28rpx">-</view></view></view><view class="save-btn data-v-eefb1794" bindtap="{{p}}">退出登录</view></view><wd-message-box class="data-v-eefb1794" u-i="eefb1794-1" bind:__l="__l"/></view>

View File

@@ -0,0 +1,92 @@
/* 水平间距 */
/* 水平间距 */
.card.data-v-eefb1794 {
border-radius: 16rpx;
padding: 0 30rpx;
background-color: #fff;
}
.avatar-row.data-v-eefb1794 {
height: 170rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.avatar-row .avatar-btn.data-v-eefb1794 {
width: 90rpx;
height: 90rpx;
margin: 0;
padding: 0;
border-radius: 50%;
}
.avatar-row .avatar-btn.data-v-eefb1794::after {
border-width: 0;
}
.avatar-row .label.data-v-eefb1794 {
font-size: 28rpx;
color: #232323;
}
.avatar-uploader.data-v-eefb1794 {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
position: relative;
}
.avatar-uploader .avatar-image.data-v-eefb1794 {
width: 100%;
height: 100%;
}
.avatar-uploader .avatar-placeholder.data-v-eefb1794 {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.avatar-uploader .avatar-placeholder image.data-v-eefb1794 {
width: 90rpx;
height: 90rpx;
background-color: #f5f5f5;
}
.form-row.data-v-eefb1794 {
height: 82rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1rpx solid #f5f5f5;
}
.form-row .label.data-v-eefb1794 {
font-size: 28rpx;
color: #232323;
}
.form-row .input.data-v-eefb1794 {
flex: 1;
text-align: right;
font-size: 24rpx;
color: #232323;
padding-left: 20rpx;
}
.form-row .input-disabled.data-v-eefb1794 {
color: #999;
}
.form-row-right.data-v-eefb1794 {
display: flex;
align-items: center;
justify-content: space-between;
}
.form-row-right image.data-v-eefb1794 {
margin-left: 10rpx;
}
.save-btn.data-v-eefb1794 {
margin-top: 35rpx;
width: 690rpx;
height: 110rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 8rpx 2rpx rgba(0, 88, 219, 0.06);
border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
font-size: 30rpx;
color: #5d7a4e;
}

View File

@@ -0,0 +1,39 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
const utils_fun = require("../../utils/fun.js");
if (!Array) {
const _easycom_mp_html2 = common_vendor.resolveComponent("mp-html");
_easycom_mp_html2();
}
const _easycom_mp_html = () => "../../uni_modules/mp-html/components/mp-html/mp-html.js";
if (!Math) {
_easycom_mp_html();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "details",
setup(__props) {
const articleItem = common_vendor.ref({});
common_vendor.onLoad((options) => {
api_index.api.noticeInfo({ id: options.id }).then((res) => {
articleItem.value = res;
});
});
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.t(articleItem.value.title),
b: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(articleItem.value.createTime, "yyyy-MM-dd hh:mm:ss")),
c: articleItem.value.video
}, articleItem.value.video ? {
d: articleItem.value.cover,
e: articleItem.value.video
} : {}, {
f: common_vendor.p({
content: articleItem.value.content
})
});
};
}
});
wx.createPage(_sfc_main);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/notice/details.js.map

View File

@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "公告",
"navigationBarBackgroundColor": "#fff",
"usingComponents": {
"mp-html": "../../uni_modules/mp-html/components/mp-html/mp-html"
}
}

View File

@@ -0,0 +1 @@
<view style="padding:30rpx"><view style="font-size:34rpx">{{a}}</view><view style="height:20rpx"></view><view style="color:#999;font-size:30rpx">发布时间:{{b}}</view><view style="height:20rpx"></view><video wx:if="{{c}}" style="width:690rpx;height:388rpx" poster="{{d}}" src="{{e}}" direction="{{90}}"></video><view style="height:20rpx"></view><view><mp-html wx:if="{{f}}" u-i="1c73d952-0" bind:__l="__l" u-p="{{f}}"/></view><view style=""></view></view>

View File

View File

@@ -0,0 +1,101 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.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: "notice",
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 toDeitl = (item) => {
if (active.value == 1) {
common_vendor.index.showModal({
title: "通知",
content: item.content,
showCancel: false
});
} else {
common_vendor.index.navigateTo({
url: "/pages/notice/details?id=" + item.id
});
}
};
const activeChange = (e, cateId) => {
active.value = e;
categoryId.value = cateId;
paging.value.reload();
};
const queryList = (pageNo, pageSize) => {
api_index.api.noticePage({ pageNo, pageSize, type: active.value, categoryId: categoryId.value }).then((res) => {
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
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.n(active.value == 1 ? "active" : ""),
d: common_vendor.o(($event) => activeChange(1, "")),
e: common_vendor.f(noticeCateList.value, (item, index, i0) => {
return {
a: common_vendor.t(item.categoryName),
b: common_vendor.n(active.value == 2 && categoryId.value == item.id ? "active" : ""),
c: common_vendor.o(($event) => activeChange(2, item.id), index),
d: index
};
}),
f: common_vendor.f(dataList.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(active.value == 1 ? item.content : item.title)
}, active.value == 2 ? {
b: common_assets._imports_0$1
} : {}, {
c: index,
d: common_vendor.o(($event) => toDeitl(item), index)
});
}),
g: common_vendor.t(active.value == 1 ? "通知" : active.value == 2 ? noticeCateList.value.find((val) => val.id == categoryId.value).categoryName : ""),
h: active.value == 2,
i: common_vendor.sr(paging, "1c2e4c1e-1", {
"k": "paging"
}),
j: common_vendor.o(queryList),
k: common_vendor.o(($event) => dataList.value = $event),
l: common_vendor.p({
["use-page-scroll"]: true,
modelValue: dataList.value
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-1c2e4c1e"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/notice/notice.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-1c2e4c1e"><wd-navbar wx:if="{{b}}" class="data-v-1c2e4c1e" bindclickLeft="{{a}}" u-i="1c2e4c1e-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><view class="nav-tabs data-v-1c2e4c1e"><view class="{{['tab-item', 'data-v-1c2e4c1e', c]}}" bindtap="{{d}}">通知</view><view wx:for="{{e}}" wx:for-item="item" wx:key="d" class="{{['tab-item', 'data-v-1c2e4c1e', item.b]}}" bindtap="{{item.c}}">{{item.a}}</view></view><z-paging wx:if="{{l}}" class="r data-v-1c2e4c1e" u-s="{{['d']}}" u-r="paging" bindquery="{{j}}" u-i="1c2e4c1e-1" bind:__l="__l" bindupdateModelValue="{{k}}" u-p="{{l}}"><view class="p30 data-v-1c2e4c1e"><view wx:for="{{f}}" wx:for-item="item" wx:key="c" class="notice_block data-v-1c2e4c1e" bindtap="{{item.d}}"><view class="data-v-1c2e4c1e">{{g}}{{item.a}}</view><image wx:if="{{h}}" class="data-v-1c2e4c1e" style="width:40rpx;height:40rpx" src="{{item.b}}"></image></view></view></z-paging></view>

View File

@@ -0,0 +1,49 @@
/* 水平间距 */
/* 水平间距 */
.notice.data-v-1c2e4c1e {
/* 导航标签样式 */
}
.notice_block.data-v-1c2e4c1e {
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;
}
.notice .nav-tabs.data-v-1c2e4c1e {
display: flex;
/* justify-content: space-around; */
background-color: #ffffff;
padding: 24rpx 0;
border-bottom: 1rpx solid #eee;
}
.notice .tab-item.data-v-1c2e4c1e {
font-size: 15px;
color: #999;
position: relative;
padding: 0 10px;
z-index: 9;
}
.notice .tab-item.active.data-v-1c2e4c1e {
color: #333;
font-weight: bold;
}
.notice .tab-item.active.data-v-1c2e4c1e::after {
content: "";
position: absolute;
bottom: 0rpx;
right: 20rpx;
width: 40rpx;
height: 12rpx;
background: #627c54;
border-radius: 24rpx 24rpx 24rpx 24rpx;
z-index: 5;
opacity: 0.8;
}

View File

@@ -0,0 +1,218 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const store_index = require("../../store/index.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_input_number2 = common_vendor.resolveComponent("wd-input-number");
const _easycom_wd_textarea2 = common_vendor.resolveComponent("wd-textarea");
(_easycom_wd_navbar2 + _easycom_wd_input_number2 + _easycom_wd_textarea2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_input_number = () => "../../uni_modules/wot-design-uni/components/wd-input-number/wd-input-number.js";
const _easycom_wd_textarea = () => "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_input_number + _easycom_wd_textarea)();
}
const _sfc_main = {
__name: "confirm",
setup(__props) {
const store = store_index.Store();
const userInfo = common_vendor.computed(() => {
if (!store.userInfo.userRights) {
dataFrom.value.payType = 1;
}
return store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: { balance: 0 },
userRights: null
};
});
const goods = common_vendor.ref({});
const address = common_vendor.ref(null);
const dataFrom = common_vendor.ref({
goodsId: null,
goodsNum: 1,
totalAmount: 0,
payableAmount: 0,
payAmount: 0,
payType: 1,
receiverId: null,
note: "",
orderType: 1
});
const totalAmount = common_vendor.computed(() => {
return goods.value.currentPrice * dataFrom.value.goodsNum;
});
const paymentAmount = common_vendor.computed(() => {
var _a, _b;
if (dataFrom.value.payType === 1) {
const discount = ((_b = (_a = userInfo.value.userRights) == null ? void 0 : _a.rights) == null ? void 0 : _b.rightsDiscount) || 100;
return totalAmount.value * discount / 100;
}
return totalAmount.value;
});
const submitOrder = () => {
var _a;
let data = JSON.parse(JSON.stringify(dataFrom.value));
if (!address.value) {
common_vendor.index.showToast({
title: "请选择收货地址",
icon: "none"
});
return;
}
common_vendor.index.showLoading({
mask: true
});
data.receiverId = (_a = address.value) == null ? void 0 : _a.id;
if (data.payType == 1) {
data.payAmount = paymentAmount.value;
data.totalAmount = totalAmount.value;
data.payableAmount = paymentAmount.value;
data.totalAmount = totalAmount.value;
}
if (data.payType == 2) {
data.deductibleAmount = totalAmount.value;
data.totalAmount = totalAmount.value;
data.deductionAmount = totalAmount.value;
data.totalAmount = totalAmount.value;
}
if (data.payType == 3) {
if (userInfo.value.userRights.pice < totalAmount.value) {
data.deductibleAmount = userInfo.value.userRights.pice;
data.deductionAmount = userInfo.value.userRights.pice;
data.payAmount = totalAmount.value - userInfo.value.userRights.pice;
data.payableAmount = totalAmount.value - userInfo.value.userRights.pice;
data.totalAmount = totalAmount.value;
} else {
data.deductibleAmount = totalAmount.value;
data.totalAmount = totalAmount.value;
data.deductionAmount = totalAmount.value;
data.totalAmount = totalAmount.value;
data.payType = 2;
}
}
api_index.api.orderCreate(data).then((res) => {
common_vendor.index.hideLoading();
common_vendor.index.navigateTo({
url: "/pages/order/success?id=" + res
});
}).catch(() => {
common_vendor.index.hideLoading();
});
};
common_vendor.onLoad(async (options) => {
dataFrom.value.goodsId = options.id;
await store.usersGetInfo();
api_index.api.goodsInfo({ id: options.id }).then((res) => {
goods.value = res;
});
api_index.api.addressPage({ isDefault: 1 }).then((res) => {
if (res.list.length) {
address.value = res.list[0];
dataFrom.value.receiverId = address.value.id;
}
});
common_vendor.index.$on("address", (e) => {
address.value = e;
});
});
const min = (a, b) => Math.min(a, b);
const max = (a, b) => Math.max(a, b);
const formatPrice = (price) => `¥ ${parseFloat(price).toFixed(2)}`;
const selectAddress = () => {
common_vendor.index.navigateTo({
url: "/pages/address/list?type=1"
});
};
const viewProduct = () => {
common_vendor.index.navigateTo({
url: "/pages/goods/goods?id=" + goods.value.id
});
};
const back = () => {
common_vendor.index.navigateBack();
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(back),
b: common_vendor.p({
title: "下单",
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
c: address.value
}, address.value ? {
d: common_vendor.t(address.value.receiverArea),
e: common_vendor.t(address.value.receiverAddress),
f: common_vendor.t(address.value.receiverName),
g: common_vendor.t(address.value.receiverPhone)
} : {}, {
h: common_assets._imports_0$1,
i: common_vendor.o(selectAddress),
j: goods.value.cover,
k: common_vendor.t(goods.value.name),
l: common_vendor.t(goods.value.specs),
m: common_vendor.t(goods.value.currentPrice),
n: common_vendor.o(viewProduct),
o: common_assets._imports_0$1,
p: common_vendor.o(($event) => dataFrom.value.goodsNum = $event),
q: common_vendor.p({
modelValue: dataFrom.value.goodsNum
}),
r: common_vendor.o(($event) => dataFrom.value.note = $event),
s: common_vendor.p({
placeholder: "请填写订单备注",
modelValue: dataFrom.value.note
}),
t: common_vendor.t(userInfo.value.money || 0),
v: dataFrom.value.payType === 1 ? 1 : "",
w: common_vendor.o(($event) => dataFrom.value.payType = 1),
x: dataFrom.value.payType === 1 && userInfo.value.userRights
}, dataFrom.value.payType === 1 && userInfo.value.userRights ? {
y: common_vendor.t(userInfo.value.userRights.rights.rightsName),
z: common_vendor.t(userInfo.value.userRights.rights.rightsDiscount / 10)
} : {}, {
A: userInfo.value.userRights
}, userInfo.value.userRights ? {
B: common_vendor.t(userInfo.value.userRights.pice || 0),
C: dataFrom.value.payType === 2 ? 1 : "",
D: common_vendor.o(($event) => dataFrom.value.payType = 2)
} : {}, {
E: dataFrom.value.payType === 2
}, dataFrom.value.payType === 2 ? {} : {}, {
F: userInfo.value.userRights
}, userInfo.value.userRights ? common_vendor.e({
G: totalAmount.value > userInfo.value.userRights.pice + userInfo.value.money
}, totalAmount.value > userInfo.value.userRights.pice + userInfo.value.money ? {
H: common_vendor.t(min(userInfo.value.money, totalAmount.value - userInfo.value.userRights.pice)),
I: common_vendor.t(min(userInfo.value.userRights.pice, totalAmount.value - userInfo.value.money))
} : common_vendor.e({
J: common_vendor.t(max(0, totalAmount.value - userInfo.value.userRights.pice)),
K: min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice) > totalAmount.value
}, min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice) > totalAmount.value ? {
L: common_vendor.t(totalAmount.value)
} : {
M: common_vendor.t(min(totalAmount.value - (totalAmount.value - userInfo.value.userRights.pice), userInfo.value.userRights.pice))
}), {
N: dataFrom.value.payType === 3 ? 1 : "",
O: common_vendor.o(($event) => dataFrom.value.payType = 3)
}) : {}, {
P: dataFrom.value.payType === 3
}, dataFrom.value.payType === 3 ? {} : {}, {
Q: common_vendor.t(formatPrice(paymentAmount.value)),
R: common_vendor.o(submitOrder)
});
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-324e7894"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/confirm.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-input-number": "../../uni_modules/wot-design-uni/components/wd-input-number/wd-input-number",
"wd-textarea": "../../uni_modules/wot-design-uni/components/wd-textarea/wd-textarea"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,166 @@
/* 水平间距 */
/* 水平间距 */
.container.data-v-324e7894 {
display: flex;
flex-direction: column;
background-color: #f5f5f5;
position: relative;
}
.address-card.data-v-324e7894 {
margin: 25rpx;
margin-bottom: 0;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
}
.address-content.data-v-324e7894 {
display: flex;
justify-content: space-between;
align-items: center;
}
.address-text.data-v-324e7894 {
flex: 1;
}
.province-city.data-v-324e7894 {
font-size: 15px;
margin-bottom: 5px;
}
.address-detail.data-v-324e7894 {
font-size: 14px;
color: #666;
}
.arrow-right.data-v-324e7894 {
color: #ccc;
font-size: 18px;
}
.product-section.data-v-324e7894 {
margin: 25rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 0;
}
.section-title.data-v-324e7894 {
font-size: 15px;
color: #333;
margin-bottom: 15px;
font-weight: 500;
}
.product-list.data-v-324e7894 {
display: flex;
justify-content: space-between;
align-items: center;
}
.product-item.data-v-324e7894 {
display: flex;
align-items: center;
}
.product-image.data-v-324e7894 {
width: 80px;
height: 80px;
border-radius: 4px;
margin-right: 10px;
}
.product-info.data-v-324e7894 {
flex: 1;
}
.product-name.data-v-324e7894 {
font-size: 14px;
margin-bottom: 5px;
}
.product-spec.data-v-324e7894 {
font-size: 13px;
color: #999;
margin: 10rpx 0;
}
.product-price.data-v-324e7894 {
font-size: 36rpx;
font-weight: bold;
color: #ff2929;
}
.price-section.data-v-324e7894 {
margin: 25rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 0;
}
.price-item.data-v-324e7894 {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15px;
}
.price-item-pay.data-v-324e7894 {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15rpx;
padding: 24rpx 0rpx;
border: 1rpx solid #f7f7f7;
border-radius: 10rpx;
background-color: #f7f7f7;
}
.price-total.data-v-324e7894 {
display: flex;
align-items: center;
justify-content: space-between;
}
.price-label.data-v-324e7894 {
font-size: 14px;
color: #333;
}
.price-value.data-v-324e7894 {
font-size: 14px;
color: #333;
}
.total.data-v-324e7894 {
color: #ff2929;
font-weight: 500;
}
.remark-section.data-v-324e7894 {
margin: 25rpx;
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 0;
}
.remark-content.data-v-324e7894 {
border-radius: 16rpx;
border: 1rpx solid #f7f7f7;
overflow: hidden;
height: 100rpx;
}
.footer.data-v-324e7894 {
position: fixed;
left: 0;
right: 0;
bottom: 0;
display: flex;
justify-content: space-between;
align-items: center;
height: 100rpx;
padding: 0 30rpx;
background-color: #fff;
border-top: 1rpx solid #eee;
}
.total-price.data-v-324e7894 {
font-size: 15px;
color: #333;
}
.pay-button.data-v-324e7894 {
background-color: #799675;
color: #fff;
font-size: 16px;
padding: 0 30px;
height: 36px;
line-height: 36px;
border-radius: 18px;
}
.active-border.data-v-324e7894 {
background-color: rgba(121, 150, 117, 0.1);
border: 1rpx solid #799675;
}
.active-border .price-label.data-v-324e7894 {
color: #799675;
}

View File

@@ -0,0 +1,93 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
const utils_fun = require("../../utils/fun.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: "order",
setup(__props) {
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const queryFrom = common_vendor.ref({
orderType: 1,
payStatus: "",
orderStatus: ""
});
const changeStatus = (e) => {
queryFrom.value.orderStatus = e;
paging.value.reload();
};
const queryList = (pageNo, pageSize) => {
api_index.api.orderPage({ pageNo, pageSize, ...queryFrom.value }).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
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.p({
title: "订单",
safeAreaInsetTop: true
}),
b: common_vendor.n(queryFrom.value.orderStatus === "" ? "active" : ""),
c: common_vendor.o(($event) => changeStatus("")),
d: common_vendor.n(queryFrom.value.orderStatus === 0 ? "active" : ""),
e: common_vendor.o(($event) => changeStatus(0)),
f: common_vendor.n(queryFrom.value.orderStatus == 1 ? "active" : ""),
g: common_vendor.o(($event) => changeStatus(1)),
h: common_vendor.n(queryFrom.value.orderStatus == 2 ? "active" : ""),
i: common_vendor.o(($event) => changeStatus(2)),
j: common_vendor.f(dataList.value, (item, index, i0) => {
return common_vendor.e({
a: common_vendor.t(item.orderNo),
b: item.orderStatus === 0
}, item.orderStatus === 0 ? {} : {}, {
c: item.orderStatus == 1
}, item.orderStatus == 1 ? {} : {}, {
d: item.goods.cover,
e: common_vendor.t(item.goods.name),
f: common_vendor.t(item.goods.specs),
g: common_vendor.t(item.goodsNum),
h: item.deductionAmount
}, item.deductionAmount ? {
i: common_vendor.t(item.deductionAmount)
} : {}, {
j: common_vendor.t(item.payableAmount),
k: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(item.createTime, "yyyy-MM-dd hh:mm:ss")),
l: item.orderStatus == 1
}, item.orderStatus == 1 ? {
m: common_vendor.o(($event) => toGoods(item.goodsId), index)
} : {}, {
n: index
});
}),
k: common_vendor.sr(paging, "93207a4f-0", {
"k": "paging"
}),
l: common_vendor.o(queryList),
m: common_vendor.o(($event) => dataList.value = $event),
n: common_vendor.p({
modelValue: dataList.value
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-93207a4f"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/order/order.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="container data-v-93207a4f"><z-paging wx:if="{{n}}" class="r data-v-93207a4f" u-s="{{['d']}}" u-r="paging" bindquery="{{l}}" u-i="93207a4f-0" bind:__l="__l" bindupdateModelValue="{{m}}" u-p="{{n}}"><wd-navbar wx:if="{{a}}" class="data-v-93207a4f" u-i="93207a4f-1,93207a4f-0" bind:__l="__l" u-p="{{a}}"></wd-navbar><view class="nav-tabs data-v-93207a4f"><view class="{{['tab-item', 'data-v-93207a4f', b]}}" bindtap="{{c}}">全部</view><view class="{{['tab-item', 'data-v-93207a4f', d]}}" bindtap="{{e}}">待付款</view><view class="{{['tab-item', 'data-v-93207a4f', f]}}" bindtap="{{g}}">已完成</view><view class="{{['tab-item', 'data-v-93207a4f', h]}}" bindtap="{{i}}">已取消</view></view><view class="order-list data-v-93207a4f"><view wx:for="{{j}}" wx:for-item="item" wx:key="n" class="order-item data-v-93207a4f"><view class="order-header data-v-93207a4f"><text class="order-id data-v-93207a4f">{{item.a}}</text><text wx:if="{{item.b}}" class="order-status pending data-v-93207a4f">待付款</text><text wx:if="{{item.c}}" class="order-status completed data-v-93207a4f">已完成</text></view><view class="order-content data-v-93207a4f"><image class="product-image data-v-93207a4f" src="{{item.d}}" mode="aspectFill"></image><view class="product-info data-v-93207a4f"><view class="product-name data-v-93207a4f"><view class="data-v-93207a4f">{{item.e}}</view></view><view class="product-spec data-v-93207a4f"><view class="data-v-93207a4f">{{item.f}}</view><view class="product-count data-v-93207a4f">×{{item.g}}</view></view><view class="product-price data-v-93207a4f"><view wx:if="{{item.h}}" class="data-v-93207a4f" style="font-size:26rpx">已抵扣金额:¥{{item.i}}</view><view wx:else class="data-v-93207a4f"></view><text class="data-v-93207a4f" style="font-weight:bold">¥{{item.j}}</text></view></view></view><view class="order-footer data-v-93207a4f"><view class="order-time data-v-93207a4f">{{item.k}}</view><view class="order-actions data-v-93207a4f"><view wx:if="{{item.l}}" class="btn-buy-again data-v-93207a4f" bindtap="{{item.m}}">再次购买</view></view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,173 @@
.container.data-v-93207a4f {
padding: 0;
background-color: #f5f5f5;
min-height: 100vh;
}
/* 导航标签样式 */
.nav-tabs.data-v-93207a4f {
display: flex;
/* justify-content: space-around; */
background-color: #ffffff;
padding: 24rpx 0;
border-bottom: 1rpx solid #eee;
}
.tab-item.data-v-93207a4f {
font-size: 15px;
color: #999;
position: relative;
padding: 0 10px;
z-index: 9;
}
.tab-item.active.data-v-93207a4f {
color: #333;
font-weight: bold;
}
.tab-item.active.data-v-93207a4f::after {
content: '';
position: absolute;
bottom: 0rpx;
right: 20rpx;
width: 40rpx;
height: 12rpx;
background: #627c54;
border-radius: 24rpx 24rpx 24rpx 24rpx;
z-index: 5;
opacity: 0.5;
}
/* 订单列表样式 */
.order-list.data-v-93207a4f {
padding: 10px;
}
.order-item.data-v-93207a4f {
background-color: #fff;
margin-bottom: 36rpx;
border-radius: 16rpx;
padding: 36rpx;
}
.order-header.data-v-93207a4f {
font-size: 28rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #eeeeee;
padding-bottom: 24rpx;
color: #232323;
}
.order-id.data-v-93207a4f {
font-size: 14px;
color: #333;
}
.order-status.data-v-93207a4f {
font-size: 14px;
font-weight: 500;
}
.pending.data-v-93207a4f {
color: #ff5722;
}
.completed.data-v-93207a4f {
color: #4caf50;
}
.cancelled.data-v-93207a4f {
color: #f44336;
}
.order-content.data-v-93207a4f {
display: flex;
padding: 20rpx 0;
}
.product-image.data-v-93207a4f {
width: 150rpx;
height: 150rpx;
border-radius: 8rpx;
margin-right: 20rpx;
background-color: #f0f0f0;
}
.product-info.data-v-93207a4f {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.product-name.data-v-93207a4f {
font-size: 28rpx;
color: #232323;
font-weight: 600;
display: flex;
align-items: center;
justify-content: space-between;
}
.product-spec.data-v-93207a4f {
font-size: 28rpx;
color: #666;
margin-top: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.product-count.data-v-93207a4f {
font-size: 24rpx;
color: #232323;
text-align: right;
}
.product-price.data-v-93207a4f {
font-size: 36rpx;
color: #ff3d3d;
/* font-weight: bold; */
text-align: right;
display: flex;
align-items: center;
justify-content: space-between;
}
.order-footer.data-v-93207a4f {
display: flex;
justify-content: space-between;
align-items: center;
padding: 24rpx 0 0;
border-top: 1rpx solid #f5f5f5;
}
.order-time.data-v-93207a4f {
font-size: 24rpx;
color: #232323;
}
.order-actions.data-v-93207a4f {
display: flex;
gap: 10px;
}
.btn-cancel.data-v-93207a4f,
.btn-pay.data-v-93207a4f,
.btn-reorder.data-v-93207a4f,
.btn-buy-again.data-v-93207a4f {
width: 150rpx;
height: 56rpx;
border-radius: 28rpx;
/* border: 1rpx solid #999999; */
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
}
.btn-cancel.data-v-93207a4f {
border: 1rpx solid #999999;
color: #999;
}
.btn-pay.data-v-93207a4f {
color: #ff6f00;
border: 1rpx solid #ff6f00;
}
.btn-reorder.data-v-93207a4f {
color: #ffffff;
background-color: #458f3b;
border: none;
}
.btn-buy-again.data-v-93207a4f {
color: #ffffff;
background-color: #f44336;
border: none;
}
.btn-cancel.data-v-93207a4f:active,
.btn-pay.data-v-93207a4f:active,
.btn-reorder.data-v-93207a4f:active,
.btn-buy-again.data-v-93207a4f:active {
opacity: 0.8;
}

File diff suppressed because one or more lines are too long

View File

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

View File

@@ -0,0 +1 @@
<view class="app data-v-2795c576" style="{{p}}"><wd-navbar wx:if="{{a}}" class="data-v-2795c576" u-i="2795c576-0" bind:__l="__l" u-p="{{a}}"></wd-navbar><view class="header data-v-2795c576"><image src="{{b}}" class="success-image data-v-2795c576"></image><view class="success-title data-v-2795c576">{{c}}</view><view class="hr data-v-2795c576"></view></view><view class="info-box data-v-2795c576"><view class="info-amount data-v-2795c576">¥ {{d}}</view><view wx:if="{{e}}" class="left-circle data-v-2795c576"></view><view wx:if="{{f}}" class="right-circle data-v-2795c576"></view><view wx:if="{{g}}" class="info-main data-v-2795c576"><view wx:if="{{h}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">抵扣金额</view><view class="right data-v-2795c576" style="color:#ff2929">¥{{i}}</view></view><view wx:if="{{j}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">订单编号</view><view class="right data-v-2795c576">{{k}}</view></view><view wx:if="{{l}}" class="info-cell data-v-2795c576"><view class="left data-v-2795c576">付款时间</view><view class="right data-v-2795c576">{{m}}</view></view></view></view><view class="button-query data-v-2795c576" bindtap="{{n}}">查看订单</view><view class="button-query1 data-v-2795c576" bindtap="{{o}}">返回首页</view><view class="footer-hr data-v-2795c576"></view></view>

View File

@@ -0,0 +1,115 @@
/* 水平间距 */
/* 水平间距 */
.app.data-v-2795c576 {
--bgcolor: #f3f3f3;
background-color: var(--bgcolor);
min-height: calc(100vh - var(--window-bottom) - var(--window-top));
}
.header.data-v-2795c576 {
background-color: var(--main);
text-align: center;
color: #ffffff;
padding: 80rpx 30rpx 50rpx 30rpx;
}
.header .success-image.data-v-2795c576 {
width: 120rpx;
height: 120rpx;
}
.header .success-title.data-v-2795c576 {
font-size: 34rpx;
margin-top: 40rpx;
font-weight: bold;
}
.header .hr.data-v-2795c576 {
margin-top: 40rpx;
width: 100%;
height: 30rpx;
border-radius: 20rpx;
opacity: 0.1;
background-color: #000000;
}
.info-box.data-v-2795c576 {
width: calc(100% - 100rpx);
margin: 0 50rpx;
position: relative;
margin-top: -64rpx;
background-color: #ffffff;
}
.info-box .info-amount.data-v-2795c576 {
height: 150rpx;
line-height: 150rpx;
text-align: center;
color: var(--main);
font-weight: bold;
font-size: 60rpx;
border-bottom: 4rpx dashed #f3f3f3;
}
.info-box .left-circle.data-v-2795c576 {
background-color: var(--bgcolor);
position: absolute;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
top: 130rpx;
left: -20rpx;
}
.info-box .right-circle.data-v-2795c576 {
background-color: var(--bgcolor);
position: absolute;
width: 40rpx;
height: 40rpx;
border-radius: 50%;
top: 130rpx;
right: -20rpx;
}
.info-box .info-main.data-v-2795c576 {
padding: 30rpx;
font-size: 26rpx;
color: #333333;
}
.info-box .info-main .info-cell.data-v-2795c576 {
display: flex;
line-height: 50rpx;
}
.info-box .info-main .info-cell .left.data-v-2795c576 {
width: 200rpx;
text-align: left;
}
.info-box .info-main .info-cell .right.data-v-2795c576 {
flex: 1;
text-align: right;
}
.uni-ad.data-v-2795c576 {
margin-top: 50rpx;
min-height: 100rpx;
}
.uni-ad .ad-interactive.data-v-2795c576 {
text-align: center;
}
.button-query.data-v-2795c576 {
background-color: var(--main);
color: #ffffff;
width: calc(100% - 120rpx);
margin: 50rpx 60rpx 0 60rpx;
padding: 20rpx 30rpx;
border-radius: 50rpx;
text-align: center;
box-sizing: border-box;
}
.button-query.data-v-2795c576:active {
opacity: 0.7;
}
.button-query1.data-v-2795c576 {
border: 1rpx solid var(--main);
color: var(--main);
width: calc(100% - 120rpx);
margin: 50rpx 60rpx 0 60rpx;
padding: 20rpx 30rpx;
border-radius: 50rpx;
text-align: center;
box-sizing: border-box;
}
.footer-hr.data-v-2795c576 {
height: 100rpx;
display: block;
}

View File

@@ -0,0 +1,14 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const _sfc_main = {
data() {
return {};
},
methods: {}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/protocol/protocol.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view></view>

View File

@@ -0,0 +1,131 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const utils_fun = require("../../utils/fun.js");
const store_index = require("../../store/index.js");
if (!Array) {
const _easycom_wd_datetime_picker2 = common_vendor.resolveComponent("wd-datetime-picker");
const _easycom_uni_dateformat2 = common_vendor.resolveComponent("uni-dateformat");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_wd_datetime_picker2 + _easycom_uni_dateformat2 + _easycom_z_paging2)();
}
const _easycom_wd_datetime_picker = () => "../../uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker.js";
const _easycom_uni_dateformat = () => "../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_wd_datetime_picker + _easycom_uni_dateformat + _easycom_z_paging)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "team",
setup(__props) {
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const count = common_vendor.ref({});
const showLoading = common_vendor.ref(true);
const timeTrue = common_vendor.ref(false);
const store = store_index.Store();
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
common_vendor.onShow(() => {
});
common_vendor.onLoad(() => {
timeTrue.value = isTimestampInCurrentMonth((/* @__PURE__ */ new Date()).getTime());
timeCount();
});
function timeCount() {
if (userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3) {
api_index.api.getTeamMonthlyPerformanceAward({ month: utils_fun.timeFormat(value.value, "yyyy-MM-ddThh:mm:ss") }).then((res) => {
count.value = res;
});
}
}
const value = common_vendor.ref((/* @__PURE__ */ new Date()).getTime());
common_vendor.ref({});
const queryList = (pageNo, pageSize) => {
api_index.api.usersGetInfoTeam({ pageNo, pageSize }).then((res) => {
paging.value.complete(res.list);
timeCount();
}).catch((res) => {
paging.value.complete(false);
});
};
const confirm = (e) => {
timeTrue.value = isTimestampInCurrentMonth(e.value);
paging.value.reload();
};
function isTimestampInCurrentMonth(timestamp) {
const ts = timestamp < 1e12 ? timestamp * 1e3 : timestamp;
const date = new Date(ts);
const now = /* @__PURE__ */ new Date();
const currentYear = now.getFullYear();
const currentMonth = now.getMonth();
const targetYear = date.getFullYear();
const targetMonth = date.getMonth();
return currentYear === targetYear && currentMonth === targetMonth;
}
return (_ctx, _cache) => {
return common_vendor.e({
a: userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3
}, userInfo.value.userRights && userInfo.value.userRights.rightsLevel == 3 ? {
b: common_assets._imports_0$5,
c: common_assets._imports_1$3,
d: common_vendor.o(confirm),
e: common_vendor.o(($event) => showLoading.value = true),
f: common_vendor.o(($event) => showLoading.value = false),
g: common_vendor.o(($event) => value.value = $event),
h: common_vendor.p({
type: "year-month",
modelValue: value.value
}),
i: common_vendor.t(count.value.investmentAmount),
j: common_vendor.t(timeTrue.value ? "可" : "已"),
k: common_vendor.t(count.value.expectedReturn),
l: common_vendor.t(count.value.totalExpectedReturn)
} : {}, {
m: userInfo.value.puser
}, userInfo.value.puser ? {
n: common_vendor.t(userInfo.value.puser ? `${userInfo.value.puser.nickname} ${userInfo.value.puser.mobile}` : "无")
} : {}, {
o: common_vendor.f(dataList.value, (item, index, i0) => {
return common_vendor.e({
a: item.avatar,
b: common_vendor.t(item.nickname || "微信用户"),
c: common_vendor.t(item.mobile),
d: "dc51e287-2-" + i0 + ",dc51e287-0",
e: common_vendor.p({
format: "yyyy-MM-dd hh:mm:ss",
date: item.createTime
}),
f: item.userRights
}, item.userRights ? {
g: common_vendor.t(item.userRights.rights.rightsName)
} : {}, {
h: index
});
}),
p: common_vendor.sr(paging, "dc51e287-0", {
"k": "paging"
}),
q: common_vendor.o(queryList),
r: common_vendor.o(($event) => dataList.value = $event),
s: common_vendor.p({
["refresher-enabled"]: showLoading.value,
modelValue: dataList.value
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-dc51e287"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/team/team.js.map

View File

@@ -0,0 +1,8 @@
{
"navigationBarTitleText": "我的团队",
"usingComponents": {
"wd-datetime-picker": "../../uni_modules/wot-design-uni/components/wd-datetime-picker/wd-datetime-picker",
"uni-dateformat": "../../uni_modules/uni-dateformat/components/uni-dateformat/uni-dateformat",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="data-v-dc51e287"><z-paging wx:if="{{s}}" class="r data-v-dc51e287" u-s="{{['d']}}" u-r="paging" bindquery="{{q}}" u-i="dc51e287-0" bind:__l="__l" bindupdateModelValue="{{r}}" u-p="{{s}}"><view class="p30 data-v-dc51e287"><view wx:if="{{a}}" class="data-v-dc51e287" style="position:relative;width:690rpx;height:228rpx;padding:30rpx 25rpx;box-shadow:0rpx 2rpx 8rpx 2rpx rgba(0,88,219,0.06);border-radius:16rpx;overflow:hidden"><image class="data-v-dc51e287" style="width:690rpx;height:228rpx;position:absolute;top:0;left:0;z-index:-1" src="{{b}}"></image><view class="data-v-dc51e287" style="display:flex;align-items:center;justify-content:space-between;margin-bottom:30rpx"><view class="data-v-dc51e287" style="font-size:32rpx;font-weight:bold"> 团队业绩奖励 <text class="data-v-dc51e287" style="font-weight:500;font-size:28rpx;color:#999">(元)</text></view><wd-datetime-picker wx:if="{{h}}" class="data-v-dc51e287" u-s="{{['d']}}" bindconfirm="{{d}}" bindclose="{{e}}" bindopen="{{f}}" u-i="dc51e287-1,dc51e287-0" bind:__l="__l" bindupdateModelValue="{{g}}" u-p="{{h}}"><view class="data-v-dc51e287" style="font-size:28rpx;font-weight:bold;color:#5d7a4e;display:flex;align-items:center"> 11月 <image class="data-v-dc51e287" src="{{c}}" style="width:34rpx;height:34rpx"></image></view></wd-datetime-picker></view><view class="data-v-dc51e287" style="display:flex;align-items:center;justify-content:space-between;font-size:26rpx;margin-bottom:30rpx"><view class="data-v-dc51e287">本月团队业绩:{{i}}</view><view class="data-v-dc51e287">{{j}}获得业绩奖励:{{k}}</view></view><view class="data-v-dc51e287" style="font-size:26rpx"> 累计获得奖励: <text class="data-v-dc51e287" style="color:#fe3535">{{l}}</text></view></view><view wx:if="{{m}}" class="data-v-dc51e287" style="font-size:30rpx;background-color:#fff;border-radius:8rpx;padding:25rpx;margin-bottom:25rpx"> 推荐人:{{n}}</view><view class="data-v-dc51e287" style="font-weight:bold;font-size:32rpx;margin:30rpx 0">团队成员列表</view><view wx:for="{{o}}" wx:for-item="item" wx:key="h" class="user-card data-v-dc51e287"><view class="avatar-container data-v-dc51e287"><image class="avatar data-v-dc51e287" src="{{item.a}}" mode="aspectFit"></image><view class="avatar-container_name data-v-dc51e287">{{item.b}}</view></view><view class="data-v-dc51e287" style="display:flex;align-items:center;justify-content:space-between;margin-top:20rpx"><view class="phone-time-row data-v-dc51e287"><view class="phone data-v-dc51e287">{{item.c}}</view><view class="time data-v-dc51e287"><uni-dateformat wx:if="{{item.e}}" class="data-v-dc51e287" u-i="{{item.d}}" bind:__l="__l" u-p="{{item.e}}"></uni-dateformat></view></view><view class="action-section data-v-dc51e287"><view wx:if="{{item.f}}" class="action-btn join data-v-dc51e287">{{item.g}}</view><view wx:else class="action-btn join data-v-dc51e287">无</view><view class="level-text data-v-dc51e287">当前等级</view></view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,68 @@
/* 水平间距 */
/* 水平间距 */
.user-card.data-v-dc51e287 {
border-radius: 16rpx;
width: 690rpx;
height: 244rpx;
background: #ffffff;
padding: 30rpx;
margin-bottom: 30rpx;
box-shadow: 0rpx 2rpx 8rpx 2rpx rgba(0, 88, 219, 0.06);
}
.avatar-container.data-v-dc51e287 {
display: flex;
align-items: center;
}
.avatar-container_name.data-v-dc51e287 {
font-weight: bold;
font-size: 28rpx;
color: #232323;
}
.avatar-container .avatar.data-v-dc51e287 {
width: 72rpx;
height: 72rpx;
border-radius: 50%;
margin-right: 20rpx;
background-color: #999;
}
.info-section.data-v-dc51e287 {
flex: 1;
}
.username.data-v-dc51e287 {
font-size: 36rpx;
color: #333333;
font-weight: 500;
margin-bottom: 20rpx;
display: block;
}
.phone-time-row.data-v-dc51e287 {
margin-top: 10rpx;
}
.phone.data-v-dc51e287 {
font-weight: 400;
font-size: 28rpx;
color: #232323;
}
.time.data-v-dc51e287 {
margin-top: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #999;
}
.action-section.data-v-dc51e287 {
display: flex;
flex-direction: column;
align-items: center;
}
.action-btn.data-v-dc51e287 {
font-weight: bold;
font-size: 28rpx;
color: #5d7a4e;
margin-bottom: 4rpx;
}
.level-text.data-v-dc51e287 {
margin-top: 20rpx;
font-weight: 400;
font-size: 24rpx;
color: #999;
}

View File

@@ -0,0 +1,114 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const store_index = require("../../store/index.js");
const utils_fun = require("../../utils/fun.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_picker2 = common_vendor.resolveComponent("wd-picker");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_wd_navbar2 + _easycom_wd_picker2 + _easycom_z_paging2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_picker = () => "../../uni_modules/wot-design-uni/components/wd-picker/wd-picker.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_picker + _easycom_z_paging)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "list",
setup(__props) {
const store = store_index.Store();
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const columns = common_vendor.ref([]);
const showLoading = common_vendor.ref(true);
const typeName = common_vendor.ref("");
const queryPrams = common_vendor.ref({
bizType: ""
});
common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
const queryList = (pageNo, pageSize) => {
api_index.api.moneyRecord({ pageNo, pageSize, ...queryPrams.value }).then((res) => {
columns.value = Object.entries(res.bizType).map(([value, label]) => ({
value,
label
}));
columns.value.unshift({
label: "全部",
value: ""
});
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
const handleConfirm = (e) => {
if (!e.value) {
typeName.value = "";
} else {
typeName.value = e.selectedItems.label;
}
paging.value.reload();
};
const back = () => {
common_vendor.index.navigateBack();
};
return (_ctx, _cache) => {
return {
a: common_vendor.o(back),
b: common_vendor.p({
title: "我的账单",
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
c: common_assets._imports_0$8,
d: common_vendor.t(typeName.value || "筛选"),
e: common_assets._imports_1$6,
f: common_vendor.o(($event) => showLoading.value = true),
g: common_vendor.o(($event) => showLoading.value = false),
h: common_vendor.o(handleConfirm),
i: common_vendor.o(($event) => queryPrams.value.bizType = $event),
j: common_vendor.p({
columns: columns.value,
["use-default-slot"]: true,
modelValue: queryPrams.value.bizType
}),
k: common_vendor.f(dataList.value, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(item.createTime, "yyyy-MM-dd hh:mm:ss")),
c: common_vendor.t(item.money),
d: index
};
}),
l: common_vendor.sr(paging, "a88fa429-1", {
"k": "paging"
}),
m: common_vendor.o(queryList),
n: common_vendor.o(($event) => dataList.value = $event),
o: common_vendor.p({
["refresher-enabled"]: showLoading.value,
["use-page-scroll"]: true,
modelValue: dataList.value
})
};
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-a88fa429"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/wallet/list.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-picker": "../../uni_modules/wot-design-uni/components/wd-picker/wd-picker",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="data-v-a88fa429"><wd-navbar wx:if="{{b}}" class="data-v-a88fa429" bindclickLeft="{{a}}" u-i="a88fa429-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><z-paging wx:if="{{o}}" class="r data-v-a88fa429" u-s="{{['d']}}" u-r="paging" bindquery="{{m}}" u-i="a88fa429-1" bind:__l="__l" bindupdateModelValue="{{n}}" u-p="{{o}}"><view class="p30 data-v-a88fa429"><view class="data-v-a88fa429"><view class="data-v-a88fa429" style="display:flex;align-items:center;justify-content:space-between"><image class="data-v-a88fa429" style="width:74rpx;height:34rpx" mode="widthFix" src="{{c}}"></image><wd-picker wx:if="{{j}}" class="data-v-a88fa429" u-s="{{['d']}}" bindclose="{{f}}" bindopen="{{g}}" bindconfirm="{{h}}" u-i="a88fa429-2,a88fa429-1" bind:__l="__l" bindupdateModelValue="{{i}}" u-p="{{j}}"><view class="data-v-a88fa429" style="display:flex;align-items:center;font-size:28rpx">{{d}} <image class="data-v-a88fa429" style="margin-left:15rpx;width:35rpx;height:35rpx" src="{{e}}"></image></view></wd-picker></view><view wx:for="{{k}}" wx:for-item="item" wx:key="d" class="wall_list data-v-a88fa429"><view class="data-v-a88fa429"><view class="data-v-a88fa429" style="margin-bottom:25rpx;font-size:28rpx">{{item.a}}</view><view class="data-v-a88fa429" style="font-size:24rpx;color:#999">{{item.b}}</view></view><view class="data-v-a88fa429" style="font-size:32rpx;font-weight:bold;color:#799675">¥{{item.c}}</view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,24 @@
/* 水平间距 */
/* 水平间距 */
.block_wall.data-v-a88fa429 {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.block_wall_tit.data-v-a88fa429 {
display: flex;
align-items: center;
}
.wall_list.data-v-a88fa429 {
width: 690rpx;
height: 118rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 8rpx 2rpx rgba(0, 88, 219, 0.06);
border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
margin-top: 30rpx;
}

View File

@@ -0,0 +1,163 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const common_assets = require("../../common/assets.js");
const api_index = require("../../api/index.js");
const store_index = require("../../store/index.js");
const utils_fun = require("../../utils/fun.js");
if (!Array) {
const _easycom_wd_navbar2 = common_vendor.resolveComponent("wd-navbar");
const _easycom_wd_picker2 = common_vendor.resolveComponent("wd-picker");
const _easycom_z_paging2 = common_vendor.resolveComponent("z-paging");
(_easycom_wd_navbar2 + _easycom_wd_picker2 + _easycom_z_paging2)();
}
const _easycom_wd_navbar = () => "../../uni_modules/wot-design-uni/components/wd-navbar/wd-navbar.js";
const _easycom_wd_picker = () => "../../uni_modules/wot-design-uni/components/wd-picker/wd-picker.js";
const _easycom_z_paging = () => "../../uni_modules/z-paging/components/z-paging/z-paging.js";
if (!Math) {
(_easycom_wd_navbar + _easycom_wd_picker + _easycom_z_paging)();
}
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
__name: "wallet",
setup(__props) {
const rewardReportInfo = common_vendor.ref({});
const store = store_index.Store();
const paging = common_vendor.ref(null);
const dataList = common_vendor.ref([]);
const columns = common_vendor.ref([]);
const showLoading = common_vendor.ref(true);
const typeName = common_vendor.ref("");
const toeasTrue = common_vendor.ref(false);
const queryPrams = common_vendor.ref({
bizType: ""
});
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
common_vendor.onShow(async () => {
if (userInfo.value.branchCompany) {
api_index.api.rewardReport().then((res) => {
rewardReportInfo.value = res;
});
}
});
const queryList = (pageNo, pageSize) => {
api_index.api.moneyRecord({ pageNo, pageSize, ...queryPrams.value }).then((res) => {
columns.value = Object.entries(res.bizType).map(([value, label]) => ({
value,
label
}));
columns.value.unshift({
label: "全部",
value: ""
});
paging.value.complete(res.list);
}).catch((res) => {
paging.value.complete(false);
});
};
const handleConfirm = (e) => {
if (!e.value) {
typeName.value = "";
} else {
typeName.value = e.selectedItems.label;
}
paging.value.reload();
};
const back = () => {
common_vendor.index.navigateBack();
};
const tishi = () => {
common_vendor.index.showModal({
title: "提示",
content: "每月初结算上月业绩“团队补货”为团队补货回款本月整个团队总补货回款为20W则月度团队补货收益为20W×12%=24000元",
showCancel: false
});
};
const toeas = () => {
toeasTrue.value = !toeasTrue.value;
};
const toZhuan = () => {
common_vendor.index.navigateTo({
url: "/pages/wallet/zhaun"
});
};
return (_ctx, _cache) => {
return common_vendor.e({
a: common_vendor.o(back),
b: common_vendor.p({
title: "钱包",
bordered: false,
["left-arrow"]: true,
["custom-style"]: "background-color: transparent !important;",
safeAreaInsetTop: true
}),
c: common_assets._imports_0$9,
d: common_assets._imports_1$7,
e: common_vendor.o(toeas),
f: `/static/icons/yan${toeasTrue.value ? "s" : ""}.png`,
g: common_vendor.t(toeasTrue.value ? "****" : userInfo.value.money),
h: common_assets._imports_2$3,
i: common_vendor.o(toZhuan),
j: common_vendor.t(userInfo.value.performanceReward || 0),
k: common_vendor.t(userInfo.value.directReferralReward || 0),
l: common_vendor.t(userInfo.value.indirectReferralReward || 0),
m: common_vendor.t(userInfo.value.specialReward || 0),
n: userInfo.value.branchCompany
}, userInfo.value.branchCompany ? {
o: common_assets._imports_3$2,
p: common_vendor.o(tishi),
q: common_vendor.t(rewardReportInfo.value.total_monthly_performance),
r: common_vendor.f(rewardReportInfo.value.money_count, (item, index, i0) => {
return {
a: common_vendor.t(item.money || 0),
b: common_vendor.t(item.name),
c: common_vendor.t(item.count || 0),
d: index
};
}),
s: common_vendor.t(rewardReportInfo.value.restock_reward || 0)
} : {}, {
t: common_assets._imports_0$8,
v: common_vendor.t(typeName.value || "筛选"),
w: common_assets._imports_1$6,
x: common_vendor.o(($event) => showLoading.value = true),
y: common_vendor.o(($event) => showLoading.value = false),
z: common_vendor.o(handleConfirm),
A: common_vendor.o(($event) => queryPrams.value.bizType = $event),
B: common_vendor.p({
columns: columns.value,
["use-default-slot"]: true,
modelValue: queryPrams.value.bizType
}),
C: common_vendor.f(dataList.value, (item, index, i0) => {
return {
a: common_vendor.t(item.title),
b: common_vendor.t(common_vendor.unref(utils_fun.timeFormat)(item.createTime, "yyyy-MM-dd hh:mm:ss")),
c: common_vendor.t(item.money),
d: index
};
}),
D: common_vendor.sr(paging, "4c380209-0", {
"k": "paging"
}),
E: common_vendor.o(queryList),
F: common_vendor.o(($event) => dataList.value = $event),
G: common_vendor.p({
["refresher-enabled"]: showLoading.value,
modelValue: dataList.value
})
});
};
}
});
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-4c380209"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/wallet/wallet.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-picker": "../../uni_modules/wot-design-uni/components/wd-picker/wd-picker",
"z-paging": "../../uni_modules/z-paging/components/z-paging/z-paging"
}
}

View File

@@ -0,0 +1 @@
<view class="data-v-4c380209"><z-paging wx:if="{{G}}" class="r data-v-4c380209" u-s="{{['d']}}" u-r="paging" bindquery="{{E}}" u-i="4c380209-0" bind:__l="__l" bindupdateModelValue="{{F}}" u-p="{{G}}"><wd-navbar wx:if="{{b}}" class="data-v-4c380209" bindclickLeft="{{a}}" u-i="4c380209-1,4c380209-0" bind:__l="__l" u-p="{{b}}"></wd-navbar><view class="p30 data-v-4c380209"><image class="data-v-4c380209" src="{{c}}" mode="widthFix" style="position:absolute;top:0;left:0;width:100%;z-index:-1"></image><view class="data-v-4c380209" style="position:relative"><image class="data-v-4c380209" src="{{d}}" style="width:690rpx;height:382rpx;position:absolute;top:0;left:0;z-index:-1"></image><view class="data-v-4c380209" style="padding:24rpx 30rpx;font-size:36rpx;font-weight:bold;margin-bottom:24rpx">我的钱包</view><view class="data-v-4c380209" style="display:flex;align-items:center;margin-bottom:14rpx;padding:0 30rpx"><view class="data-v-4c380209" style="font-size:24rpx;color:#666a6d;margin:0 10rpx">我的余额(元)</view><image class="data-v-4c380209" bindtap="{{e}}" src="{{f}}" style="width:35rpx;height:35rpx"></image></view><view class="data-v-4c380209" style="font-size:58rpx;font-weight:bold;color:#69a24a;padding:0 30rpx;margin-bottom:25rpx;display:flex;align-items:center;justify-content:space-between">{{g}} <view class="data-v-4c380209" bindtap="{{i}}" style="color:#8ec287;padding:8rpx 30rpx;border-radius:30rpx;font-size:28rpx;background-color:rgba(255, 255, 255, 0.8);font-weight:400;display:flex;align-items:center"><image class="data-v-4c380209" src="{{h}}" style="width:35rpx;height:35rpx"></image><text class="data-v-4c380209" style="margin-left:10rpx">划转</text></view></view><view class="data-v-4c380209" style="width:690rpx;height:110rpx;background:#e9f2e7;border-radius:8rpx;display:flex;align-items:center;justify-content:space-between;padding:0 30rpx;margin-bottom:35rpx"><view class="block_wall data-v-4c380209"><view class="block_wall_tit data-v-4c380209" style="font-size:24rpx"><view class="data-v-4c380209">业绩奖励</view></view><view class="data-v-4c380209" style="font-size:32rpx;font-weight:bold">{{j}}</view></view><view class="block_wall data-v-4c380209"><view class="block_wall_tit data-v-4c380209" style="font-size:24rpx"><view class="data-v-4c380209">直推奖励</view></view><view class="data-v-4c380209" style="font-size:32rpx;font-weight:bold">{{k}}</view></view><view class="block_wall data-v-4c380209"><view class="block_wall_tit data-v-4c380209" style="font-size:24rpx"><view class="data-v-4c380209">间推奖励</view></view><view class="data-v-4c380209" style="font-size:32rpx;font-weight:bold">{{l}}</view></view><view class="block_wall data-v-4c380209"><view class="block_wall_tit data-v-4c380209" style="font-size:24rpx"><view class="data-v-4c380209">特殊奖励</view></view><view class="data-v-4c380209" style="font-size:32rpx;font-weight:bold">{{m}}</view></view></view></view><view wx:if="{{n}}" class="wallet-section data-v-4c380209"><view class="section-title data-v-4c380209"><view class="data-v-4c380209"><text class="data-v-4c380209">市场报单业绩</text><text class="data-v-4c380209" style="font-size:24rpx;font-weight:500">(元)</text><image class="data-v-4c380209" src="{{o}}" bindtap="{{p}}" style="width:28rpx;height:28rpx"></image></view><view class="data-v-4c380209" style="font-size:26rpx">合计:{{q}}元</view></view><view class="wallet-cards data-v-4c380209"><view wx:for="{{r}}" wx:for-item="item" wx:key="d" class="wallet-item data-v-4c380209"><text class="amount red data-v-4c380209">{{item.a}}</text><text class="label data-v-4c380209">{{item.b}}</text><text class="desc data-v-4c380209">已招募{{item.c}}个</text></view><view class="wallet-item data-v-4c380209"><text class="amount data-v-4c380209">{{s}}</text><text class="label data-v-4c380209">团队补货</text></view></view></view><view class="data-v-4c380209"><view class="data-v-4c380209" style="display:flex;align-items:center;justify-content:space-between"><image class="data-v-4c380209" style="width:74rpx;height:34rpx" mode="widthFix" src="{{t}}"></image><wd-picker wx:if="{{B}}" class="data-v-4c380209" u-s="{{['d']}}" bindclose="{{x}}" bindopen="{{y}}" bindconfirm="{{z}}" u-i="4c380209-2,4c380209-0" bind:__l="__l" bindupdateModelValue="{{A}}" u-p="{{B}}"><view class="data-v-4c380209" style="display:flex;align-items:center;font-size:28rpx">{{v}} <image class="data-v-4c380209" style="margin-left:15rpx;width:35rpx;height:35rpx" src="{{w}}"></image></view></wd-picker></view><view wx:for="{{C}}" wx:for-item="item" wx:key="d" class="wall_list data-v-4c380209"><view class="data-v-4c380209"><view class="data-v-4c380209" style="margin-bottom:25rpx;font-size:28rpx">{{item.a}}</view><view class="data-v-4c380209" style="font-size:24rpx;color:#999">{{item.b}}</view></view><view class="data-v-4c380209" style="font-size:32rpx;font-weight:bold;color:#799675">¥{{item.c}}</view></view></view></view></z-paging></view>

View File

@@ -0,0 +1,69 @@
/* 水平间距 */
/* 水平间距 */
.block_wall.data-v-4c380209 {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}
.block_wall_tit.data-v-4c380209 {
display: flex;
align-items: center;
}
.wall_list.data-v-4c380209 {
width: 690rpx;
height: 118rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 8rpx 2rpx rgba(0, 88, 219, 0.06);
border-radius: 8rpx 8rpx 8rpx 8rpx;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 30rpx;
margin-top: 30rpx;
}
/* 钱包区域 */
.wallet-section.data-v-4c380209 {
background-color: white;
margin: 0rpx 0 20rpx;
padding: 30rpx;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.section-title.data-v-4c380209 {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 0 20rpx;
font-size: 32rpx;
font-weight: bold;
color: #333;
border-bottom: 1px solid #eee;
margin-bottom: 20rpx;
}
.wallet-cards.data-v-4c380209 {
display: flex;
justify-content: space-between;
}
.wallet-item.data-v-4c380209 {
display: flex;
flex-direction: column;
flex: 1;
text-align: center;
color: #333;
}
.label.data-v-4c380209 {
font-size: 28rpx;
color: #666;
}
.amount.data-v-4c380209 {
font-size: 36rpx;
font-weight: bold;
margin-bottom: 10rpx;
color: #799675;
}
.desc.data-v-4c380209 {
font-size: 20rpx;
color: #999;
margin-top: 6rpx;
}

View File

@@ -0,0 +1,98 @@
"use strict";
const common_vendor = require("../../common/vendor.js");
const api_index = require("../../api/index.js");
const store_index = require("../../store/index.js");
const utils_fun = require("../../utils/fun.js");
const uni_modules_wotDesignUni_components_composables_useCountDown = require("../../uni_modules/wot-design-uni/components/composables/useCountDown.js");
require("../../uni_modules/wot-design-uni/locale/index.js");
require("../../uni_modules/wot-design-uni/dayjs/index.js");
const _sfc_main = {
__name: "zhaun",
setup(__props) {
let dataForm = common_vendor.ref({
toPhone: "",
smsCode: "",
money: ""
});
const codeIngo = common_vendor.ref("获取验证码");
const { start, pause, reset, current } = uni_modules_wotDesignUni_components_composables_useCountDown.useCountDown({
time: 60 * 1e3,
onChange(current2) {
},
onFinish() {
codeIngo.value = "重新发送";
}
});
const getCode = (e) => {
if (!userInfo.value.mobile) {
utils_fun.toast("请输入手机号");
return;
}
if (current.value.seconds) {
utils_fun.toast("请等待倒计时结束");
return;
}
api_index.api.smsCode({
mobile: userInfo.value.mobile,
scene: 6
}).then((res) => {
start();
utils_fun.toast("验证码发送成功");
}).catch((err) => {
common_vendor.index.__f__("log", "at pages/wallet/zhaun.vue:86", err);
utils_fun.toast("验证码发送失败");
});
};
const store = store_index.Store();
const userInfo = common_vendor.computed(
() => store.userInfo || {
inviteCode: "",
nickname: "",
mobile: "",
avatar: "",
paywallet: {
balance: 0
}
}
);
const confirm = () => {
if (!dataForm.value.toPhone)
return common_vendor.index.showToast({ title: "请输入划转手机号", icon: "none" });
if (!dataForm.value.money)
return common_vendor.index.showToast({ title: "请输入划转金额", icon: "none" });
if (!dataForm.value.smsCode)
return common_vendor.index.showToast({ title: "请输入验证码", icon: "none" });
api_index.api.transfer2other(dataForm.value).then((res) => {
common_vendor.index.showModal({
title: "提示",
content: "划转成功",
showCancel: false,
success: () => {
common_vendor.index.reLaunch({
url: "/pages/mine/mine"
});
}
});
});
};
return (_ctx, _cache) => {
return {
a: common_vendor.t(userInfo.value.money),
b: common_vendor.unref(dataForm).money,
c: common_vendor.o(($event) => common_vendor.unref(dataForm).money = $event.detail.value),
d: common_vendor.unref(dataForm).toPhone,
e: common_vendor.o(($event) => common_vendor.unref(dataForm).toPhone = $event.detail.value),
f: userInfo.value.mobile,
g: common_vendor.o(($event) => userInfo.value.mobile = $event.detail.value),
h: common_vendor.unref(dataForm).smsCode,
i: common_vendor.o(($event) => common_vendor.unref(dataForm).smsCode = $event.detail.value),
j: common_vendor.t(common_vendor.unref(current).seconds || codeIngo.value),
k: common_vendor.o(getCode),
l: common_vendor.o(confirm)
};
};
}
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-711f8035"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/wallet/zhaun.js.map

View File

@@ -0,0 +1,4 @@
{
"navigationBarTitleText": "余额划转",
"usingComponents": {}
}

View File

@@ -0,0 +1 @@
<view class="data-v-711f8035" style="padding:30rpx"><view class="card_zhaun data-v-711f8035" style="color:#949494">当前余额:{{a}}</view><view class="card_zhaun data-v-711f8035"><view class="card_zhaun_flex data-v-711f8035"><view class="card_zhaun_flex_title data-v-711f8035">划转金额</view><input class="data-v-711f8035" type="number" placeholder="请输入金额" value="{{b}}" bindinput="{{c}}"/></view><view class="card_zhaun_flex data-v-711f8035"><view class="card_zhaun_flex_title data-v-711f8035">划转给(手机号)</view><input class="data-v-711f8035" type="number" placeholder="请输入手机号" value="{{d}}" bindinput="{{e}}"/></view><view class="card_zhaun_flex data-v-711f8035"><view class="card_zhaun_flex_title data-v-711f8035">当前手机号</view><input class="data-v-711f8035" type="number" disabled placeholder="请输入手机号" value="{{f}}" bindinput="{{g}}"/></view><view class="card_zhaun_flex data-v-711f8035"><view class="card_zhaun_flex_title data-v-711f8035">验证码</view><view class="data-v-711f8035" style="display:flex;align-items:center;justify-content:space-between;border-bottom:1rpx solid #e8e8e8"><input class="data-v-711f8035" style="border:0" type="number" placeholder="请输入验证码" value="{{h}}" bindinput="{{i}}"/><view class="code-btn data-v-711f8035" bindtap="{{k}}">{{j}}</view></view></view></view><view class="card_zhaun data-v-711f8035"><view class="data-v-711f8035" style="color:#f29100">温馨提示</view><view class="data-v-711f8035" style="height:10rpx"></view><view class="data-v-711f8035" style="font-size:28rpx;color:#909399"><view class="data-v-711f8035">1.划转金额实时到账,不扣手续费;</view><view class="data-v-711f8035" style="height:10rpx"></view><view class="data-v-711f8035">2.划转成功后实时生效,不支持撤回。</view></view></view><view class="bottom-btn data-v-711f8035"><view class="button-a data-v-711f8035" bindtap="{{l}}">确认</view></view></view>

View File

@@ -0,0 +1,54 @@
/* 水平间距 */
/* 水平间距 */
.card_zhaun.data-v-711f8035 {
padding: 30rpx;
background-color: #fff;
border-radius: 16rpx;
margin-bottom: 25rpx;
}
.card_zhaun_flex.data-v-711f8035 {
margin-bottom: 20rpx;
}
.card_zhaun_flex_title.data-v-711f8035 {
font-size: 28rpx;
margin-bottom: 20rpx;
}
.card_zhaun_flex input.data-v-711f8035 {
font-size: 28rpx;
border-bottom: 1rpx solid #e8e8e8;
padding: 5rpx 0;
}
.bottom-btn.data-v-711f8035 {
width: 100%;
height: 150rpx;
padding: 30rpx;
background-color: #ffffff;
position: fixed;
bottom: 0;
left: 0;
border-radius: 20rpx 20rpx 0 0;
box-shadow: 0px 6rpx 16rpx 2rpx rgba(170, 170, 170, 0.35);
display: flex;
align-items: center;
justify-content: center;
}
.bottom-btn .button-a.data-v-711f8035 {
width: 690rpx;
height: 90rpx;
background: #799675;
border-radius: 15rpx;
text-align: center;
font-size: 30rpx;
color: #ffffff;
line-height: 90rpx;
}
.code-btn.data-v-711f8035 {
width: 175rpx;
height: 60rpx;
line-height: 60rpx;
font-size: 28rpx;
color: #5d7a4e;
border: 1rpx solid #5d7a4e;
text-align: center;
border-radius: 14rpx 14rpx 14rpx 14rpx;
}