diff --git a/api/store/user.js b/api/store/user.js new file mode 100644 index 0000000..5b2b4a2 --- /dev/null +++ b/api/store/user.js @@ -0,0 +1,43 @@ +import { + request +} from "@/utils/request"; + +export default { + + userList(data) { + return request({ + url: "/admin/user/userList", + method: "GET", + data, + }) + }, + + userItem(data) { + return request({ + url: "/admin/user/userItem", + method: "GET", + data, + }) + }, + + + getLog(data) { + return request({ + url: "/admin/user/getLog", + method: "GET", + data, + }) + }, + + changeInformation(data) { + return request({ + url: "/admin/user/changeInformation", + method: "GET", + data, + }) + }, + + + + +}; \ No newline at end of file diff --git a/components/myList/index.vue b/components/myList/index.vue index ce876e2..d1bd651 100644 --- a/components/myList/index.vue +++ b/components/myList/index.vue @@ -5,8 +5,8 @@ - - + + @@ -68,6 +68,9 @@ const query = ref({ /** @type {Ref} */ const loading = ref(false); +/** @type {Ref} */ +const firstLoading = ref(false); + const total = ref(0) const list = ref([]) @@ -92,6 +95,7 @@ const getData = async () => { } loading.value = false; + firstLoading.value = true; }; getData(); diff --git a/pages.json b/pages.json index 1dff52a..f411ec7 100644 --- a/pages.json +++ b/pages.json @@ -124,6 +124,30 @@ "gestureBack": "YES" } } + }, + { + "path": "user/list", + "style": { + "navigationBarTitleText": "用户列表", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } + }, + { + "path": "user/edit", + "style": { + "navigationBarTitleText": "用户信息", + "enablePullDownRefresh": false, + "mp-alipay": { + "transparentTitle": "always", + "titlePenetrate": "YES", + "gestureBack": "YES" + } + } } ] } diff --git a/store/components/myTabbar/index.vue b/store/components/myTabbar/index.vue index 152d58e..5f50bf1 100644 --- a/store/components/myTabbar/index.vue +++ b/store/components/myTabbar/index.vue @@ -1,8 +1,9 @@ - + ({{ status[item.status + 1].content }}) - + 单号:{{ item.order_no }} @@ -97,9 +95,17 @@ ( 会员ID:{{ item.user.id }} ) - + 收货人:{{ item.receiver_name }}   电话:{{ item.receiver_phone }} - 收货地址:{{ item.delivery_address }} {{ item.delivery_address_detail }} + 收货地址:{{ item.delivery_address }} {{ + item.delivery_address_detail }} + + + + + @@ -158,6 +164,7 @@ + + diff --git a/store/user/list.vue b/store/user/list.vue new file mode 100644 index 0000000..e8d6757 --- /dev/null +++ b/store/user/list.vue @@ -0,0 +1,289 @@ + + + + + diff --git a/utils/request.js b/utils/request.js index 1948fa6..27dc5d4 100644 --- a/utils/request.js +++ b/utils/request.js @@ -25,7 +25,7 @@ export function request(options) { url: options.url, timeout: env.NETWORK_TIME_OUT, // data: { ...options.data, store_id: env.store_id, mini_id: env.mini_id, origin: getOrigin() }, - data: { ...options.data, ...env, origin: getOrigin() }, + data: { ...options.data, ...env, }, header: options.header, method: options.method, success: (res) => { @@ -46,20 +46,19 @@ export function request(options) { default: console.log("请求失败(" + statusCode + ")") reject(res) - uni.$u.toast(res?.data?.message || "出错了"); + uni.showToast({ + title: `请求服务器无响应!`, + icon: 'none' + }) break; } }, fail: (res) => { - console.log(res, 'reslogin') - // #ifdef MP-ALIPAY - if (res.statusCode == 401) { - setTimeout(() => { - utils.loginOut(); - }, 300) - } - // #endif + uni.showToast({ + title: `请求服务器无响应!`, + icon: 'none' + }) reject(res.data.data); }, }); diff --git a/utils/utils.js b/utils/utils.js index 815d13a..1a73811 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -57,7 +57,10 @@ export default { uni.setClipboardData({ data, success: () => { - uni.$u.toast(toast); + uni.showToast({ + title: toast, + icon: 'none' + }) }, }); },