页面
Some checks are pending
Auto Merge Main to Other Branches / Merge main into i18n (push) Waiting to run
Auto Merge Main to Other Branches / Merge main into base-sard-ui (push) Waiting to run

This commit is contained in:
sjeam 2025-09-06 10:03:27 +08:00
parent 8db7579875
commit c5a67db7a0
3 changed files with 38 additions and 37 deletions

View File

@ -57,24 +57,24 @@
@click="more(item)"
v-for="item in [
{
name: '租赁服务',
url: '/pages/activity/lease/index',
name: '名优特产',
url: '/pages/columnGoods/goods_list/index?id=38',
icon: '/static/icons/village_service.png',
type: 3,
type: 2,
color: 'green',
},
{
name: '农事服务',
url: '/pages/store/home/index?id=13',
name: '当季产品',
url: '/pages/columnGoods/goods_list/index?id=37',
icon: '/static/icons/agriculture_service.png',
type: 3,
type: 2,
color: 'blue',
},
{
name: '店铺街',
url: '/pages/store/shopStreet/index',
name: '滞销产品',
url: '/pages/columnGoods/goods_list/index?id=30',
icon: '/static/icons/agriculture_course.png',
type: 3,
type: 2,
color: 'orange',
},
{
@ -480,12 +480,13 @@ export default defineComponent({
})
},
more(item) {
if (hasLogin() === false) {
const islogin = hasLogin()
if (islogin === false) {
this.show = true
return
}
if (hasLogin() === true) {
console.log(item)
if (islogin === true) {
// console.log(item)
if (item.type == 1) {
getUrl(item.url)
} else if (item.type == 2) {

View File

@ -103,7 +103,7 @@
>
<wd-grid-item use-slot>
<view class="p-2">
<wd-img radius="20rpx" :width="'100rpx'" :height="'100rpx'" :src="item.icon" />
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :src="item.icon" />
<view class="ps-2 pt-2 pb-2 text-center text-gray-500 font-size-3">
{{ item.name }}
</view>

View File

@ -221,31 +221,31 @@ 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',
// 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
// }
uni.showModal({
title: '温馨提示',
content: ' 您尚未完善个人信息,是否前往设置你的个人地址?',
success: function (res) {
if (res.confirm) {
uni.navigateTo({
url: '/pages/my/setting',
})
}
},
})
return
}
//返回是否登录
return hasLogin
}