diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index dcfa655..12f0746 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -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) { diff --git a/src/pages/my/components/wx-login.vue b/src/pages/my/components/wx-login.vue index e9b9673..8b95a46 100644 --- a/src/pages/my/components/wx-login.vue +++ b/src/pages/my/components/wx-login.vue @@ -103,7 +103,7 @@ > - + {{ item.name }} diff --git a/src/utils/index.ts b/src/utils/index.ts index 2ff4924..9601496 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -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', - // }) - // return - // } - uni.showModal({ - title: '温馨提示', - content: ' 您尚未完善个人信息,是否前往设置你的个人地址?', - success: function (res) { - if (res.confirm) { - uni.navigateTo({ - url: '/pages/my/setting', - }) - } - }, - }) + // 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 - } + // return + // } //返回是否登录 return hasLogin }