这一版本优化了很多

This commit is contained in:
王利强
2026-06-03 10:16:37 +08:00
parent 8046316216
commit 2af9f1fd59
954 changed files with 58194 additions and 1609 deletions

View File

@@ -3,16 +3,16 @@ const common_vendor = require("../../common/vendor.js");
const request_api = require("../../request/api.js");
if (!Array) {
const _easycom_up_input2 = common_vendor.resolveComponent("up-input");
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
const _easycom_u_popup2 = common_vendor.resolveComponent("u-popup");
const _easycom_up_picker2 = common_vendor.resolveComponent("up-picker");
const _component_TabBar = common_vendor.resolveComponent("TabBar");
(_easycom_up_input2 + _easycom_up_picker2 + _easycom_u_popup2 + _component_TabBar)();
(_easycom_up_input2 + _easycom_u_popup2 + _easycom_up_picker2 + _component_TabBar)();
}
const _easycom_up_input = () => "../../uni_modules/uview-plus/components/u-input/u-input.js";
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
const _easycom_u_popup = () => "../../uni_modules/uview-plus/components/u-popup/u-popup.js";
const _easycom_up_picker = () => "../../uni_modules/uview-plus/components/u-picker/u-picker.js";
if (!Math) {
(_easycom_up_input + _easycom_up_picker + _easycom_u_popup)();
(_easycom_up_input + _easycom_u_popup + _easycom_up_picker)();
}
const _sfc_main = {
__name: "membermanagemen",
@@ -39,10 +39,10 @@ const _sfc_main = {
const userInfoStr = common_vendor.index.getStorageSync("userInfo");
if (userInfoStr) {
userInfo.value = JSON.parse(userInfoStr);
common_vendor.index.__f__("log", "at pages/membermanagemen/membermanagemen.vue:142", "用户信息:", userInfo.value);
common_vendor.index.__f__("log", "at pages/membermanagemen/membermanagemen.vue:147", "用户信息:", userInfo.value);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:145", "获取用户信息失败:", error);
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:150", "获取用户信息失败:", error);
}
};
const list = common_vendor.ref([]);
@@ -51,10 +51,10 @@ const _sfc_main = {
const res = await request_api.getMemberList();
if (res.code === 0 && res.data) {
list.value = res.data;
common_vendor.index.__f__("log", "at pages/membermanagemen/membermanagemen.vue:158", "成员列表:", res.data);
common_vendor.index.__f__("log", "at pages/membermanagemen/membermanagemen.vue:163", "成员列表:", res.data);
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:161", "获取成员列表失败:", error);
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:166", "获取成员列表失败:", error);
}
};
const showPopup = common_vendor.ref(false);
@@ -120,7 +120,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: res.msg || "添加失败", icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:244", "添加成员失败:", error);
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:249", "添加成员失败:", error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
}
};
@@ -147,7 +147,7 @@ const _sfc_main = {
common_vendor.index.showToast({ title: result.msg || `${actionText}失败`, icon: "none" });
}
} catch (error) {
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:275", `${actionText}成员失败:`, error);
common_vendor.index.__f__("error", "at pages/membermanagemen/membermanagemen.vue:280", `${actionText}成员失败:`, error);
common_vendor.index.showToast({ title: "请求失败", icon: "none" });
}
}
@@ -205,20 +205,21 @@ const _sfc_main = {
n: common_vendor.t(selectedRoleName.value || "请选择角色类型"),
o: common_vendor.n(selectedRoleName.value ? "" : "text-gray"),
p: common_vendor.o(($event) => showRolePicker.value = true),
q: common_vendor.o(onRoleConfirm),
r: common_vendor.o(($event) => showRolePicker.value = false),
s: common_vendor.o(($event) => showRolePicker.value = false),
q: common_vendor.o(($event) => showPopup.value = false),
r: common_vendor.o(handleSubmit),
s: common_vendor.o(($event) => showPopup.value = false),
t: common_vendor.p({
show: showRolePicker.value,
columns: roleColumns
}),
v: common_vendor.o(($event) => showPopup.value = false),
w: common_vendor.o(handleSubmit),
x: common_vendor.o(($event) => showPopup.value = false),
y: common_vendor.p({
show: showPopup.value,
mode: "center",
round: "20"
round: "20",
safeAreaInsetBottom: false
}),
v: common_vendor.o(onRoleConfirm),
w: common_vendor.o(($event) => showRolePicker.value = false),
x: common_vendor.o(($event) => showRolePicker.value = false),
y: common_vendor.p({
show: showRolePicker.value,
columns: roleColumns
}),
z: common_vendor.gei(_ctx, "")
};

View File

@@ -2,7 +2,7 @@
"navigationBarTitleText": "成员管理",
"usingComponents": {
"up-input": "../../uni_modules/uview-plus/components/u-input/u-input",
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker",
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup"
"u-popup": "../../uni_modules/uview-plus/components/u-popup/u-popup",
"up-picker": "../../uni_modules/uview-plus/components/u-picker/u-picker"
}
}

View File

@@ -1 +1 @@
<view class="{{['page', 'padding', 'data-v-06d9f81b', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{z}}"><view class="member-card bg-white radius data-v-06d9f81b"><view class="card-header data-v-06d9f81b"><view class="flex align-center data-v-06d9f81b"><view class="border-line data-v-06d9f81b"></view><view class="text-bold margin-left-sm data-v-06d9f81b">{{a}}</view></view><view class="role-tag data-v-06d9f81b">{{b}}</view></view><view class="member-list data-v-06d9f81b"><view wx:for="{{c}}" wx:for-item="item" wx:key="g" class="{{['member-item', 'data-v-06d9f81b', item.h && 'border-bottom']}}"><view class="cu-avatar radius lg bg-gray data-v-06d9f81b" style="background-image:url(https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png)"></view><view class="member-info data-v-06d9f81b"><view class="flex align-center data-v-06d9f81b"><text class="member-name data-v-06d9f81b">{{item.a}}</text><view class="{{['status-tag', 'data-v-06d9f81b', item.c]}}">{{item.b}}</view></view><view class="member-phone text-gray data-v-06d9f81b"><text class="data-v-06d9f81b">手机:{{item.d}}</text></view></view><button class="btn-lock bg-blue data-v-06d9f81b" bindtap="{{item.f}}">{{item.e}}</button></view></view><view class="add-btn-wrapper data-v-06d9f81b"><button class="add-btn data-v-06d9f81b" bindtap="{{d}}"><text class="cuIcon-add data-v-06d9f81b"></text><text class="data-v-06d9f81b">添加成员</text></button></view></view><u-popup wx:if="{{y}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-s="{{['d']}}" bindclose="{{x}}" u-i="06d9f81b-0" bind:__l="__l" u-p="{{y}}"><view class="popup-content data-v-06d9f81b"><view class="popup-header data-v-06d9f81b"><view class="popup-title text-bold data-v-06d9f81b">添加成员</view><view class="popup-close data-v-06d9f81b" bindtap="{{e}}">×</view></view><scroll-view class="popup-body data-v-06d9f81b" scroll-y><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">用户名<text class="text-red data-v-06d9f81b">*</text></view><up-input wx:if="{{g}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-1,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">昵称</view><up-input wx:if="{{i}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-2,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">手机号</view><up-input wx:if="{{k}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-3,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">密码<text class="text-red data-v-06d9f81b">*</text></view><up-input wx:if="{{m}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-4,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">角色类型<text class="text-red data-v-06d9f81b">*</text></view><view class="form-select data-v-06d9f81b" bindtap="{{p}}"><text class="{{['data-v-06d9f81b', o]}}">{{n}}</text><text class="cuIcon-unfold data-v-06d9f81b"></text></view><up-picker wx:if="{{t}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" bindconfirm="{{q}}" bindcancel="{{r}}" bindclose="{{s}}" u-i="06d9f81b-5,06d9f81b-0" bind:__l="__l" u-p="{{t}}"></up-picker></view></scroll-view><view class="popup-footer data-v-06d9f81b"><button class="btn-cancel data-v-06d9f81b" bindtap="{{v}}">取消</button><button class="btn-confirm bg-blue data-v-06d9f81b" bindtap="{{w}}">确定</button></view></view></u-popup><tab-bar class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-6" bind:__l="__l"/></view>
<view class="{{['page', 'padding', 'data-v-06d9f81b', virtualHostClass]}}" style="{{virtualHostStyle}}" hidden="{{virtualHostHidden || false}}" id="{{z}}"><view class="member-card bg-white radius data-v-06d9f81b"><view class="card-header data-v-06d9f81b"><view class="flex align-center data-v-06d9f81b"><view class="border-line data-v-06d9f81b"></view><view class="text-bold margin-left-sm data-v-06d9f81b">{{a}}</view></view><view class="role-tag data-v-06d9f81b">{{b}}</view></view><view class="member-list data-v-06d9f81b"><view wx:for="{{c}}" wx:for-item="item" wx:key="g" class="{{['member-item', 'data-v-06d9f81b', item.h && 'border-bottom']}}"><view class="cu-avatar radius lg bg-gray data-v-06d9f81b" style="background-image:url(https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png)"></view><view class="member-info data-v-06d9f81b"><view class="flex align-center data-v-06d9f81b"><text class="member-name data-v-06d9f81b">{{item.a}}</text><view class="{{['status-tag', 'data-v-06d9f81b', item.c]}}">{{item.b}}</view></view><view class="member-phone text-gray data-v-06d9f81b"><text class="data-v-06d9f81b">手机:{{item.d}}</text></view></view><button class="btn-lock bg-blue data-v-06d9f81b" bindtap="{{item.f}}">{{item.e}}</button></view></view><view class="add-btn-wrapper data-v-06d9f81b"><button class="add-btn data-v-06d9f81b" bindtap="{{d}}"><text class="cuIcon-add data-v-06d9f81b"></text><text class="data-v-06d9f81b">添加成员</text></button></view></view><u-popup wx:if="{{t}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-s="{{['d']}}" bindclose="{{s}}" u-i="06d9f81b-0" bind:__l="__l" u-p="{{t}}"><view class="popup-content data-v-06d9f81b"><view class="popup-header data-v-06d9f81b"><view class="popup-title text-bold data-v-06d9f81b">添加成员</view><view class="popup-close data-v-06d9f81b" bindtap="{{e}}">×</view></view><scroll-view class="popup-body data-v-06d9f81b" scroll-y><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">用户名<text class="text-red data-v-06d9f81b">*</text></view><up-input wx:if="{{g}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-1,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{f}}" u-p="{{g}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">昵称</view><up-input wx:if="{{i}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-2,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{h}}" u-p="{{i}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">手机号</view><up-input wx:if="{{k}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-3,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{j}}" u-p="{{k}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">密码<text class="text-red data-v-06d9f81b">*</text></view><up-input wx:if="{{m}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-4,06d9f81b-0" bind:__l="__l" bindupdateModelValue="{{l}}" u-p="{{m}}"></up-input></view><view class="form-item data-v-06d9f81b"><view class="form-label data-v-06d9f81b">角色类型<text class="text-red data-v-06d9f81b">*</text></view><view class="form-select data-v-06d9f81b" bindtap="{{p}}"><text class="{{['data-v-06d9f81b', o]}}">{{n}}</text><text class="cuIcon-unfold data-v-06d9f81b"></text></view></view><view class="data-v-06d9f81b" style="height:40rpx"></view></scroll-view><view class="popup-footer data-v-06d9f81b"><button class="btn-cancel data-v-06d9f81b" bindtap="{{q}}">取消</button><button class="btn-confirm bg-blue data-v-06d9f81b" bindtap="{{r}}">确定</button></view></view></u-popup><up-picker wx:if="{{y}}" class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" bindconfirm="{{v}}" bindcancel="{{w}}" bindclose="{{x}}" u-i="06d9f81b-5" bind:__l="__l" u-p="{{y}}"></up-picker><tab-bar class="data-v-06d9f81b" virtualHostClass="data-v-06d9f81b" u-i="06d9f81b-6" bind:__l="__l"/></view>

View File

@@ -128,6 +128,10 @@
border: none;
}
.popup-content.data-v-06d9f81b {
position: relative;
z-index: 99;
transform: translateZ(0);
-webkit-transform: translateZ(0);
width: 600rpx;
background: #fff;
border-radius: 20rpx;
@@ -150,6 +154,10 @@
line-height: 1;
}
.popup-body.data-v-06d9f81b {
position: relative;
z-index: 100;
transform: translateZ(0);
-webkit-transform: translateZ(0);
padding: 30rpx;
max-height: 700rpx;
overflow-y: auto;
@@ -183,6 +191,8 @@
height: 90rpx;
line-height: 90rpx;
border-radius: 0;
margin: 0;
padding: 0;
font-size: 30rpx;
}
.popup-footer button.data-v-06d9f81b::after {