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..9c548a1 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 }}
- 泸州市龙马潭区海吉星路
+ 泸州市龙马潭区海吉星路
@@ -153,6 +157,10 @@ export default defineComponent({
this.detail = res.data
this.getIndex(this.detail['category_id'])
this.swiperList = res.data['images']
+
+ uni.setNavigationBarTitle({
+ title: this.detail.title, // 运行时修改标题
+ })
},
goPage(item) {
getUrl('/pages/about/detail?id=' + item.id)
diff --git a/src/pages/about/index.vue b/src/pages/about/index.vue
index 7e2eedb..afc4cec 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 }}
-
-
-
-
+
+ -->
@@ -42,11 +40,10 @@
-
-
-
+
+
{{ item.name }}
@@ -73,12 +70,12 @@
-
{{ item.category_name }}
-
+ -->
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 93c8faf..8a39861 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 }}
-
+ -->
@@ -57,21 +57,21 @@
v-for="item in [
{
name: '名优特产',
- url: '/pages/columnGoods/goods_list/index?id=38',
+ url: '/pages/columnGoods/goods_list/index?id=38&title=名优特产',
icon: '/static/icons/village_service.png',
type: 2,
color: 'green',
},
{
name: '当季产品',
- url: '/pages/columnGoods/goods_list/index?id=37',
+ url: '/pages/columnGoods/goods_list/index?id=37&title=当季产品',
icon: '/static/icons/agriculture_service.png',
type: 2,
color: 'blue',
},
{
name: '滞销产品',
- url: '/pages/columnGoods/goods_list/index?id=30',
+ url: '/pages/columnGoods/goods_list/index?id=30&title=滞销产品',
icon: '/static/icons/agriculture_course.png',
type: 2,
color: 'orange',
@@ -88,7 +88,7 @@
-
+
{{ item.name }}
@@ -104,13 +104,13 @@
- 当季产品
-
+ 当季产品
+
好物上新季,特产抢先购
-
+
@@ -133,7 +133,7 @@
@click="
more({
type: 2,
- url: `/pages/goods_details/index?id=${item.product_id} `,
+ url: '/pages/goods_details/index?id=${item.product_id}',
})
"
v-for="item in product_30"
@@ -143,12 +143,18 @@
- {{ item.store_name }}
- {{ item.store_info }}
-
+
+
+ {{ item.store_name }}
+
+
+
+ {{ item.store_info }}
+
+
-
-
+
+
@@ -170,13 +176,11 @@
- 美丽乡村
-
- 美丽乡村风貌展示厅
-
+ 美丽乡村
+ 美丽乡村风貌展示厅
-
-
+
+
@@ -201,7 +205,9 @@
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-gray-300 bg-opacity-5"
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
>
- {{ current_item.title }}
+
+ {{ current_item.title }}
+
{{ current_item.description }}
@@ -230,13 +236,11 @@
- 特产好物
-
- 精选好物,不容错过
-
+ 特产好物
+ 精选好物,不容错过
-
-
+
+
@@ -260,22 +264,13 @@
- {{ item.title }}
- {{ item.description }}
-
-
+
+ {{ item.title }}发放接口连接啊发生金坷拉激发
+
+ {{ item.description }}
+
+
@@ -288,13 +283,13 @@
- 热门咨询
-
+ 热门咨询
+
热门咨询,一键掌握新鲜事
-
-
+
+
@@ -309,13 +304,15 @@
- {{ item.title }}
- {{ item.description }}
-
+
+ {{ item.title }}
+
+ {{ item.description }}
+
2025-8-23
-
+
@@ -328,13 +325,11 @@
- 景区旅游
-
- 好玩儿路线一网打尽
-
+ 景区旅游
+ 好玩儿路线一网打尽
-
-
+
+
@@ -349,7 +344,9 @@
- {{ item.author }}
+
+ {{ item.author }}
+
{{ item.description }}
diff --git a/src/pages/my/setting.vue b/src/pages/my/setting.vue
index 0e8aca7..d7f53f4 100644
--- a/src/pages/my/setting.vue
+++ b/src/pages/my/setting.vue
@@ -142,11 +142,11 @@
},
]"
>
+
-
@@ -179,10 +179,12 @@ import {
export default defineComponent({
data() {
return {
+ type: 0, // 0 点击进入 1 跳转登录
+ show: false,
hasLogin: false,
showPhone: false,
showName: false,
- show: false,
+
address_string: '',
propShowOrder: false,
@@ -216,9 +218,19 @@ export default defineComponent({
}
},
async onLoad(option) {
- this.show = option.show || false
this.getArea()
this.getUserInfo()
+ console.log(option)
+ this.type = parseInt(option.type) || 0
+ console.log('type值', this.type)
+ if (this.type === 1) {
+ //跳转登录
+ this.show = true
+ } else {
+ //点击进入
+ this.show = false
+ }
+ console.log('type值', this.show)
},
methods: {
logout() {
@@ -319,10 +331,14 @@ export default defineComponent({
},
async submitGroup() {
const res = await setGroupAPI(this.addressinfo)
- console.log(res)
+ // console.log(res)
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/pages/web_view/index.vue b/src/pages/web_view/index.vue
index 257853f..bbaa6a1 100644
--- a/src/pages/web_view/index.vue
+++ b/src/pages/web_view/index.vue
@@ -54,7 +54,6 @@ export default defineComponent({
// this.local_url = decodeURIComponent(getUrlCrmebLogin() + option.target)
console.log(getUrlCrmebLogin())
// const target = encodeURIComponent(option.target)
-
const target = option.target
if (isMpWeixin) {
this.local_url = getUrlCrmebLogin() + '?target=' + target
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 09cb1df..50909cc 100644
--- a/src/store/user.ts
+++ b/src/store/user.ts
@@ -57,13 +57,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
+ 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..ee3d03d 100644
--- a/src/style/index.scss
+++ b/src/style/index.scss
@@ -16,6 +16,9 @@
page {
background-color: $uni-bg-color;
// 修改按主题色
+ --wot-color-success: #d8f7d5; // 主题色
+ --wot-button-success-bg-color: #d8f7d5; //按钮成功颜色
+
--wot-color-theme: #87d76b;
--wot-button-primary-bg-color: #87d76b; // 按钮默认颜色
--wot-grid-item-padding: 0rpx 10rpx; //gid布局
@@ -45,7 +48,11 @@ page {
}
.color-black {
- color: #333333 !important;
+ color: #333333ff !important;
+}
+
+.color-gary {
+ color: #999999ff !important;
}
.default-color {
@@ -142,13 +149,16 @@ $container-width: 100%;
$padding-width: 20rpx;
.ellipsis {
display: inline-block;
-
- width: calc($container-width - $padding-width); /* 确保容器有宽度 */
+ font-size: 40rpx;
+ line-height: 40rpx;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 1; /* 限制为1行 */
/* 防止文字换行 */
overflow: hidden;
/* 隐藏超出部分的文字 */
text-overflow: ellipsis;
white-space: nowrap;
+ width: calc($container-width - $padding-width); /* 确保容器有宽度 */
/* 确保元素有宽度 */
}
.ellipsis-2 {
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..36d309a 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('是否登录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
}