diff --git a/src/components/fly-login/fly-login.vue b/src/components/fly-login/fly-login.vue
index 4d827d6..10ea692 100644
--- a/src/components/fly-login/fly-login.vue
+++ b/src/components/fly-login/fly-login.vue
@@ -49,7 +49,7 @@ const onChange = (e) => {
console.log(value)
}
-const onSubmit = () => {
+const onSubmit = async () => {
// 1、上传刚刚的图片,并返回网络地址
// 2、把用户信息存起来
// if (avatarUrl.value === defaultAvatarUrl) {
@@ -70,7 +70,8 @@ const onSubmit = () => {
emit('update:modelValue', false)
// console.log('保存用户信息')
// userStore.setUserInfo({ nickname: nickname.value, avatar: avatarUrl.value })
- userStore.wxLogin()
+ await userStore.wxLogin()
+ await userStore.getUserInfo()
}
diff --git a/src/pages/about/detail.vue b/src/pages/about/detail.vue
index 617563e..c64fc5d 100644
--- a/src/pages/about/detail.vue
+++ b/src/pages/about/detail.vue
@@ -33,12 +33,16 @@
>
- {{ detail.author }}
+ {{ detail.author }}
{{ detail.description }}
-
+
泸州市龙马潭区海吉星路
@@ -61,7 +65,7 @@
- 场所介绍
+ 场所介绍
@@ -73,8 +77,8 @@
- 更多推荐
-
+ 更多推荐
+
@@ -92,7 +96,7 @@
{{ item.description }}
- 泸州市龙马潭区海吉星路
+ 泸州市龙马潭区海吉星路
diff --git a/src/pages/about/index.vue b/src/pages/about/index.vue
index 7e2eedb..bcded52 100644
--- a/src/pages/about/index.vue
+++ b/src/pages/about/index.vue
@@ -24,15 +24,13 @@
:height="'100%'"
:src="banner_list.image"
/>
-
{{ banner_list.name }}
-
-
-
-
+
+ -->
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 93c8faf..34a79e1 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -36,7 +36,7 @@
:indicator="{ type: 'dots-bar' }"
@change="onChange"
>
-
@@ -44,7 +44,7 @@
{{ title }}
-
+ -->
@@ -88,7 +88,7 @@
-
+
{{ item.name }}
@@ -104,8 +104,8 @@
- 当季产品
-
+ 当季产品
+
好物上新季,特产抢先购
@@ -143,7 +143,9 @@
- {{ item.store_name }}
+
+ {{ item.store_name }}
+
{{ item.store_info }}
@@ -170,10 +172,8 @@
- 美丽乡村
-
- 美丽乡村风貌展示厅
-
+ 美丽乡村
+ 美丽乡村风貌展示厅
@@ -230,10 +230,8 @@
- 特产好物
-
- 精选好物,不容错过
-
+ 特产好物
+ 精选好物,不容错过
@@ -260,22 +258,9 @@
- {{ item.title }}
+ {{ item.title }}
{{ item.description }}
-
-
-
+
@@ -288,8 +273,8 @@
- 热门咨询
-
+ 热门咨询
+
热门咨询,一键掌握新鲜事
@@ -309,9 +294,11 @@
- {{ item.title }}
+
+ {{ item.title }}
+
{{ item.description }}
-
+
2025-8-23
{{ item.category_name }}
@@ -328,10 +315,8 @@
- 景区旅游
-
- 好玩儿路线一网打尽
-
+ 景区旅游
+ 好玩儿路线一网打尽
@@ -349,7 +334,7 @@
- {{ item.author }}
+ {{ item.author }}
{{ item.description }}
diff --git a/src/pages/my/setting.vue b/src/pages/my/setting.vue
index 0e8aca7..878212e 100644
--- a/src/pages/my/setting.vue
+++ b/src/pages/my/setting.vue
@@ -142,11 +142,11 @@
},
]"
>
+
-
@@ -179,6 +179,7 @@ import {
export default defineComponent({
data() {
return {
+ type: 0, // 0 点击进入 1 跳转登录
hasLogin: false,
showPhone: false,
showName: false,
@@ -216,7 +217,14 @@ export default defineComponent({
}
},
async onLoad(option) {
- this.show = option.show || false
+ this.type = option.type || 0
+ if (this.type === 1) {
+ //跳转登录
+ } else {
+ //点击进入
+ this.show = true
+ }
+
this.getArea()
this.getUserInfo()
},
@@ -323,6 +331,10 @@ export default defineComponent({
this.show = false
//重新获取地址信息
userStore.getUserInfo()
+ //跳转页面,设置后返回
+ if (this.type === 1) {
+ this.goBack()
+ }
},
//地址改版事件
diff --git a/src/pages/service/index.vue b/src/pages/service/index.vue
index ff40ec1..c125035 100644
--- a/src/pages/service/index.vue
+++ b/src/pages/service/index.vue
@@ -58,7 +58,7 @@ function more(item) {
- 看看附近
+ 看看附近
好物上新季,特产抢先购
@@ -135,7 +135,7 @@ function more(item) {
-
+
{{ item.name }}
@@ -152,7 +152,7 @@ function more(item) {
- 游玩必备
+ 游玩必备
好物上新季,特产抢先购
@@ -194,7 +194,7 @@ function more(item) {
-
+
{{ item.name }}
@@ -250,7 +250,7 @@ function more(item) {
-
+
{{ item.name }}
diff --git a/src/service/crmeb/product.ts b/src/service/crmeb/product.ts
index e38ec99..41f1e1a 100644
--- a/src/service/crmeb/product.ts
+++ b/src/service/crmeb/product.ts
@@ -29,7 +29,7 @@ export function getProductAPI(cate_pid: string) {
}
// 用户中心
export function getInfoAPI() {
- return http.post('/api/user/info', {})
+ return http.get('/api/user/info', {})
}
export function setInfoPI(data: any) {
diff --git a/src/store/user.ts b/src/store/user.ts
index bc279bf..1561634 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -36,7 +36,7 @@ export const useUserStore = defineStore(
// val.avatar = 'https://oss.laf.run/ukw0y1-site/avatar.jpg?feige'
}
//判断是否设置村庄
- val.isset = userInfoState.village ? true : false
+ val.isset = val.village ? true : false
userInfo.value = val
}
const setUserAvatar = (avatar: string) => {
@@ -55,13 +55,16 @@ export const useUserStore = defineStore(
*/
const getUserInfo = async () => {
const res = await _getUserInfo()
- const userInfo = res.data
- setUserInfo(userInfo)
+ const user = res.data
+ const newData = userInfo.value
+ newData.isset = user.village ? true : false
+ userInfo.value = newData
// uni.setStorageSync('userInfo', userInfo)
// uni.setStorageSync('token', userInfo.token)
// TODO 这里可以增加获取用户路由的方法 根据用户的角色动态生成路由
return res
}
+
/**
* 用户登录
* @param credentials 登录参数
diff --git a/src/style/index.scss b/src/style/index.scss
index 53e5523..438999f 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -45,7 +45,7 @@ page {
}
.color-black {
- color: #333333 !important;
+ color: #333333ff !important;
}
.default-color {
@@ -142,6 +142,7 @@ $container-width: 100%;
$padding-width: 20rpx;
.ellipsis {
display: inline-block;
+ color: #333333ff !important;
width: calc($container-width - $padding-width); /* 确保容器有宽度 */
/* 防止文字换行 */
@@ -152,6 +153,7 @@ $padding-width: 20rpx;
/* 确保元素有宽度 */
}
.ellipsis-2 {
+ color: #333333ff !important;
display: -webkit-box;
// font-weight: 500;
font-size: 40rpx;
@@ -166,6 +168,7 @@ $padding-width: 20rpx;
}
.ellipsis-5 {
+ color: #333333ff !important;
display: -webkit-box;
// font-weight: 500;
font-size: 40rpx;
diff --git a/src/uni.scss b/src/uni.scss
index 3ddd3ba..95fbca0 100644
--- a/src/uni.scss
+++ b/src/uni.scss
@@ -23,7 +23,7 @@ $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
-$uni-text-color: #333; // 基本色
+$uni-text-color: #333333ff; // 基本色
$uni-text-color-inverse: #fff; // 反色
$uni-text-color-grey: #999; // 辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
diff --git a/src/utils/index.ts b/src/utils/index.ts
index 9601496..c14e1b5 100644
--- a/src/utils/index.ts
+++ b/src/utils/index.ts
@@ -220,32 +220,30 @@ import { useUserStore } from '@/store'
export function hasLogin() {
const hasLogin = useUserStore().userInfo.id ? true : false
// console.log(useUserStore().userInfo)
-
- // console.log('是否登录', hasLogin)
- // console.log('是否登录sss', useUserStore().userInfo)
- // //强制跳转设置村庄
- // if (hasLogin && !useUserStore().userInfo.isset) {
- // // if (!this.phone) {
- // // uni.showToast({
- // // title: '请填写手机号',
- // // icon: 'none',
- // // })
- // // return
- // // }
- // uni.showModal({
- // title: '温馨提示',
- // content: ' 您尚未完善个人信息,是否前往设置你的个人地址?',
- // success: function (res) {
- // if (res.confirm) {
- // uni.navigateTo({
- // url: '/pages/my/setting',
- // })
- // }
- // },
- // })
-
- // return
- // }
+ console.log('是否登录', hasLogin)
+ console.log('是否登录sss', useUserStore().userInfo)
+ //强制跳转设置村庄
+ if (hasLogin && !useUserStore().userInfo.isset) {
+ // if (!this.phone) {
+ // uni.showToast({
+ // title: '请填写手机号',
+ // icon: 'none',
+ // })
+ // return
+ // }
+ uni.showModal({
+ title: '温馨提示',
+ content: ' 您尚未完善个人信息,是否前往设置你的个人地址?',
+ success: function (res) {
+ if (res.confirm) {
+ uni.navigateTo({
+ url: '/pages/my/setting?type=1',
+ })
+ }
+ },
+ })
+ return
+ }
//返回是否登录
return hasLogin
}