From ecc4df957b55ebbbc099a5abaee0cbf37b7bdefe Mon Sep 17 00:00:00 2001
From: weipengfei <2187978347@qq.com>
Date: Tue, 30 Apr 2024 18:08:36 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/app.js | 4 +-
pages.json | 17 ++-
pages/login/login.vue | 14 +-
pages/my/my.vue | 11 +-
pagesOrder/addressList/addressList.vue | 117 +++++++++--------
pagesOrder/order/component/good.vue | 123 +++++++++++-------
pagesOrder/order/order.vue | 13 +-
pagesOrder/settle/settle.vue | 14 +-
store/user.js | 5 +-
unpackage/dist/dev/mp-weixin/app.js | 2 +-
unpackage/dist/dev/mp-weixin/app.json | 2 +-
unpackage/dist/dev/mp-weixin/common/assets.js | 8 +-
.../dev/mp-weixin/components/addressPopup.js | 4 +-
.../dist/dev/mp-weixin/pages/cart/cart.js | 8 +-
.../dist/dev/mp-weixin/pages/index/index.js | 4 +-
.../dist/dev/mp-weixin/pages/login/login.js | 19 ++-
unpackage/dist/dev/mp-weixin/pages/my/my.js | 21 +--
unpackage/dist/dev/mp-weixin/pages/my/my.wxml | 2 +-
.../pagesOrder/addressList/addressList.js | 10 +-
.../dev/mp-weixin/pagesOrder/detail/detail.js | 4 +-
.../pagesOrder/order/component/good.js | 80 +++++++-----
.../pagesOrder/order/component/good.json | 4 +-
.../pagesOrder/order/component/good.wxml | 2 +-
.../pagesOrder/order/component/good.wxss | 6 +-
.../dev/mp-weixin/pagesOrder/order/order.js | 13 +-
.../dist/dev/mp-weixin/project.config.json | 2 +-
unpackage/dist/dev/mp-weixin/store/user.js | 9 +-
utils/request.js | 2 +-
28 files changed, 318 insertions(+), 202 deletions(-)
diff --git a/config/app.js b/config/app.js
index d77d582..a1d384d 100644
--- a/config/app.js
+++ b/config/app.js
@@ -1,8 +1,8 @@
let BASE_URL
import store from "@/store/user.js"
// 环境
-let env = "dev"
-// let env = "prod"
+// let env = "dev"
+let env = "prod"
switch(env){
case 'prod': BASE_URL = 'https://ceshi-erp.lihaink.cn';break;
diff --git a/pages.json b/pages.json
index 515ed85..69412e3 100644
--- a/pages.json
+++ b/pages.json
@@ -9,20 +9,19 @@
}
},
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
- {
- "path": "pages/index/index",
- "style": {
- "navigationBarTitleText": "购物",
- "disableScroll": true,
- "navigationStyle": "custom"
- }
- },
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false,
-
+ "navigationStyle": "custom"
+ }
+ },
+ {
+ "path": "pages/index/index",
+ "style": {
+ "navigationBarTitleText": "购物",
+ "disableScroll": true,
"navigationStyle": "custom"
}
},
diff --git a/pages/login/login.vue b/pages/login/login.vue
index b38b91f..a0ebc1e 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -75,15 +75,23 @@
const isAgree = ref(false); //是否同意协议
const weixinLogin = () => {
- if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议')
-
+ if (!isAgree.value) return uni.$u.toast('请先阅读并同意协议');
+ uni.showLoading({
+ title: '登录中'
+ })
uni.login({
provider: 'weixin',
success: (res) => {
userLoginWeixinApi({
code: res.code
}).then(res=>{
- console.log(res);
+ userStore.setUserInfo(res.data);
+ userStore.setToken(res.data.token);
+ uni.hideLoading();
+ if(!res.data.supplier) uni.reLaunch({
+ url: '/pages/index/index'
+ })
+ else uni.$u.toast('功能开发中')
})
},
fail: (err) => {
diff --git a/pages/my/my.vue b/pages/my/my.vue
index d7041e3..6bbfaed 100644
--- a/pages/my/my.vue
+++ b/pages/my/my.vue
@@ -6,10 +6,10 @@
-
+
- 151****6699
- ID: 6655
+ {{userInfo.nickname}}
+ ID: {{userInfo.id}}
@@ -56,6 +56,11 @@