Merge branch 'main' of https://gitea.lihaink.cn/sjeam/digital_village_uni
# Conflicts: # src/store/user.ts
This commit is contained in:
commit
831d6adeb8
@ -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()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -33,12 +33,16 @@
|
||||
>
|
||||
<view class="content p-2 text-left" style="align-items: normal">
|
||||
<view class="px-2 flex-content-column">
|
||||
<view class="p-1 font-size-4 color-black">{{ detail.author }}</view>
|
||||
<view class="p-1 font-size-4 color-black font-bold">{{ detail.author }}</view>
|
||||
<view class="p-1 ellipsis-2 font-size-3">
|
||||
{{ detail.description }}
|
||||
</view>
|
||||
|
||||
<view class="p-1 font-size-3" style="align-items: end" @click="location(detail)">
|
||||
<view
|
||||
class="p-1 font-size-3 color-gary"
|
||||
style="align-items: end"
|
||||
@click="location(detail)"
|
||||
>
|
||||
<text class="pe-2 font-size-3">
|
||||
<wd-icon name="location" size="28rpx" color="#87d76b"></wd-icon>
|
||||
泸州市龙马潭区海吉星路
|
||||
@ -61,7 +65,7 @@
|
||||
<view class="p-8"></view>
|
||||
<view class="p-2">
|
||||
<wd-card custom-class="card-content m-2">
|
||||
<view class="m-2 p-2 font-size-4 color-black">场所介绍</view>
|
||||
<view class="m-2 p-2 font-size-4 color-black font-bold">场所介绍</view>
|
||||
<view class="m-2 px-2 pb-2" style="backdrop-filter: blur(2rpx); border-radius: 10rpx">
|
||||
<!-- <wd-textarea v-html="detail.content" /> -->
|
||||
<rich-text :nodes="detail.content"></rich-text>
|
||||
@ -73,8 +77,8 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl px-2 text-sm font-size-4">更多推荐</text>
|
||||
<text class="px-2 text-xl text-sm font-size-3 color-gray-500"></text>
|
||||
<text class="text-xl px-2 text-sm font-size-4 font-bold">更多推荐</text>
|
||||
<text class="px-2 text-xl text-sm font-size-3 color-black"></text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -92,7 +96,7 @@
|
||||
<view class="ps-1 font-size-3 ellipsis-2">{{ item.description }}</view>
|
||||
|
||||
<view class="p-1 font-size-3" style="align-items: end">
|
||||
<text class="pe-2 font-size-3">泸州市龙马潭区海吉星路</text>
|
||||
<text class="pe-2 font-size-3 color-black">泸州市龙马潭区海吉星路</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="relative" style="width: 280rpx; height: 200rpx">
|
||||
@ -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)
|
||||
|
@ -24,15 +24,13 @@
|
||||
:height="'100%'"
|
||||
:src="banner_list.image"
|
||||
/>
|
||||
<view
|
||||
<!-- <view
|
||||
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-black bg-opacity-30"
|
||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||
>
|
||||
<text class="block font-size-4 text-left">{{ banner_list.name }}</text>
|
||||
<text class="block font-size-3 text-left">
|
||||
<!-- 因举办古韵悠然的传统民俗文化节热度飙升,在这里,你能感受到乡村文化的深厚底蕴和无穷魅力。 -->
|
||||
</text>
|
||||
</view>
|
||||
<text class="block font-size-3 text-left"></text>
|
||||
</view> -->
|
||||
</view>
|
||||
</wd-card>
|
||||
</view>
|
||||
@ -42,11 +40,10 @@
|
||||
<wd-grid :column="4">
|
||||
<view @click="changeTab(item)" v-for="item in category">
|
||||
<wd-grid-item use-slot>
|
||||
<view>
|
||||
<wd-img radius="10rpx" :width="'160rpx'" :height="'100rpx'" :src="item.image" />
|
||||
|
||||
<view class="px-2">
|
||||
<wd-img radius="10rpx" :width="'180rpx'" :height="'100rpx'" :src="item.image" />
|
||||
<view
|
||||
class="absolute bottom-5 text-center left-5 right-5 text-white text-center text-gray-500 font-size-3 bg-black bg-opacity-20"
|
||||
class="absolute bottom-4 text-center left-0 right-0 text-white text-center font-size-4 bg-black bg-opacity-0"
|
||||
>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
@ -73,12 +70,12 @@
|
||||
</view>
|
||||
<view class="relative" style="width: 280rpx; height: 200rpx">
|
||||
<wd-img :width="'100%'" :height="'100%'" radius="20rpx" :src="item.cover" alt="joy" />
|
||||
<view
|
||||
<!-- <view
|
||||
class="m-2 p-1 absolute bottom-0 text-right right-0 text-white bg-black bg-opacity-20"
|
||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||
>
|
||||
<text class="block font-size-3 text-left">{{ item.category_name }}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</wd-card>
|
||||
|
@ -36,7 +36,7 @@
|
||||
:indicator="{ type: 'dots-bar' }"
|
||||
@change="onChange"
|
||||
></wd-swiper>
|
||||
<view
|
||||
<!-- <view
|
||||
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-black bg-opacity-40"
|
||||
style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
|
||||
>
|
||||
@ -44,7 +44,7 @@
|
||||
<text class="block font-size-3 text-left ellipsis-2">
|
||||
{{ title }}
|
||||
</text>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</wd-card>
|
||||
</view>
|
||||
@ -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 @@
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<wd-img radius="20rpx" :width="'100rpx'" :height="'100rpx'" :src="item.icon" />
|
||||
<view class="ps-2 pt-2 pb-2 text-center font-size-3 font-blod">
|
||||
<view class="ps-2 pt-2 pb-2 text-center font-size-3 font-blod color-black">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
@ -104,13 +104,13 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl text-sm font-size-4">当季产品</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500">
|
||||
<text class="text-xl text-sm font-size-4 font-bold color-black">当季产品</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gary">
|
||||
好物上新季,特产抢先购
|
||||
</text>
|
||||
</view>
|
||||
<wd-button
|
||||
type="primary"
|
||||
type="success"
|
||||
size="small"
|
||||
@click="
|
||||
more({
|
||||
@ -119,7 +119,7 @@
|
||||
})
|
||||
"
|
||||
>
|
||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||
<wd-text text="更多" bold color="#4AC242FF" size="28rpx"></wd-text>
|
||||
</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
@ -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 @@
|
||||
<view style="height: 200rpx; width: 300rpx">
|
||||
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.image" />
|
||||
</view>
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.store_name }}</view>
|
||||
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.store_info }}</view>
|
||||
<view class="ps-2 pt-2 pb-2">
|
||||
<view>
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold color-black ellipsis">
|
||||
{{ item.store_name }}
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="ps-2 pt-1 font-size-3 ellipsis">{{ item.store_info }}</view>
|
||||
</view>
|
||||
<view class="ps-2 pt-1 pb-2">
|
||||
<view class="text-sm text-gray-500 text-left">
|
||||
<wd-text size="20rpx" color="red" :text="item.price" mode="price" prefix="¥" />
|
||||
<wd-text size="20rpx" color="red" text="券后价" mode="text" prefix=" " />
|
||||
<wd-text size="32rpx" color="red" :text="item.price" mode="price" prefix="¥" />
|
||||
<!-- <wd-text size="20rpx" color="red" text="券后价" mode="text" prefix=" " />
|
||||
<wd-text
|
||||
size="18rpx"
|
||||
color="gray"
|
||||
@ -156,7 +162,7 @@
|
||||
mode="price"
|
||||
decoration="line-through"
|
||||
prefix="¥"
|
||||
/>
|
||||
/> -->
|
||||
</view>
|
||||
</view>
|
||||
</wd-card>
|
||||
@ -170,13 +176,11 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl text-sm font-size-4">美丽乡村</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500">
|
||||
美丽乡村风貌展示厅
|
||||
</text>
|
||||
<text class="text-xl text-sm font-size-4 font-bold color-black">美丽乡村</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gary">美丽乡村风貌展示厅</text>
|
||||
</view>
|
||||
<wd-button type="primary" size="small" @click="switchTab(eat_id)">
|
||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||
<wd-button type="success" size="small" @click="switchTab(eat_id)">
|
||||
<wd-text text="更多" bold color="#4AC242FF" size="28rpx"></wd-text>
|
||||
</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
@ -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"
|
||||
>
|
||||
<text class="block font-size-4 text-left ellipsis-2">{{ current_item.title }}</text>
|
||||
<text class="block font-size-4 text-left ellipsis-2">
|
||||
{{ current_item.title }}
|
||||
</text>
|
||||
<view class="font-size-3 text-left ellipsis-2">
|
||||
{{ current_item.description }}
|
||||
</view>
|
||||
@ -230,13 +236,11 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl text-sm font-size-4">特产好物</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500">
|
||||
精选好物,不容错过
|
||||
</text>
|
||||
<text class="text-xl text-sm font-size-4 font-bold color-black">特产好物</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gary">精选好物,不容错过</text>
|
||||
</view>
|
||||
<wd-button type="primary" size="small" @click="switchTab(live_id)">
|
||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||
<wd-button type="success" size="small" @click="switchTab(live_id)">
|
||||
<wd-text text="更多" bold color="#4AC242FF" size="28rpx"></wd-text>
|
||||
</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
@ -260,22 +264,13 @@
|
||||
<view style="height: 200rpx">
|
||||
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" />
|
||||
</view>
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.title }}</view>
|
||||
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view>
|
||||
<view class="ps-2 pt-2 pb-2">
|
||||
<!-- <view class="text-sm text-gray-500 text-left">
|
||||
<wd-text size="20rpx" color="red" :text="item.price" mode="price" prefix="¥" />
|
||||
<wd-text size="20rpx" color="red" text="券后价" mode="text" prefix=" " />
|
||||
<wd-text
|
||||
size="18rpx"
|
||||
color="gray"
|
||||
:text="item.ot_price"
|
||||
mode="price"
|
||||
decoration="line-through"
|
||||
prefix="¥"
|
||||
/>
|
||||
</view> -->
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold color-black ellipsis">
|
||||
{{ item.title }}发放接口连接啊发生金坷拉激发
|
||||
</view>
|
||||
<view class="ps-2 pt-2 font-size-3 ellipsis">
|
||||
{{ item.description }}
|
||||
</view>
|
||||
<view class="ps-2 pt-2 pb-2"></view>
|
||||
</wd-card>
|
||||
</view>
|
||||
</view>
|
||||
@ -288,13 +283,13 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl text-sm font-size-4">热门咨询</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500">
|
||||
<text class="text-xl text-sm font-size-4 font-bold color-black">热门咨询</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gary">
|
||||
热门咨询,一键掌握新鲜事
|
||||
</text>
|
||||
</view>
|
||||
<wd-button type="primary" size="small" @click="switchTab(play_id)">
|
||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||
<wd-button type="success" size="small" @click="switchTab(play_id)">
|
||||
<wd-text text="更多" bold color="#4AC242FF" size="28rpx"></wd-text>
|
||||
</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
@ -309,13 +304,15 @@
|
||||
<wd-img :width="'100%'" :height="'100%'" radius="20rpx" :src="item.cover" alt="joy" />
|
||||
</view>
|
||||
<view class="ps-2 flex-content-column">
|
||||
<view class="ps-1 font-size-3 font-bold">{{ item.title }}</view>
|
||||
<view class="px-1 font-size-3 ellipsis-2">{{ item.description }}</view>
|
||||
<view class="p-1 font-size-3" style="align-items: end">
|
||||
<view class="ps-1 font-size-3 font-bold ellipsis-2 color-black">
|
||||
{{ item.title }}
|
||||
</view>
|
||||
<view class="px-1 font-size-3 ellipsis-2 color-gary">{{ item.description }}</view>
|
||||
<view class="p-1 font-size-3 color-gary" style="align-items: end">
|
||||
<text class="pe-2 font-size-3">2025-8-23</text>
|
||||
<wd-tag custom-class="space font-size-3" type="danger" round>
|
||||
<!-- <wd-tag custom-class="space font-size-3" type="danger" round>
|
||||
{{ item.category_name }}
|
||||
</wd-tag>
|
||||
</wd-tag> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -328,13 +325,11 @@
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-xl text-sm font-size-4">景区旅游</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500">
|
||||
好玩儿路线一网打尽
|
||||
</text>
|
||||
<text class="text-xl text-sm font-size-4 font-bold color-black">景区旅游</text>
|
||||
<text class="ps-2 text-xl text-sm font-size-3 color-gary">好玩儿路线一网打尽</text>
|
||||
</view>
|
||||
<wd-button type="primary" size="small" @click="switchTab(purchase_id)">
|
||||
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
|
||||
<wd-button type="success" size="small" @click="switchTab(purchase_id)">
|
||||
<wd-text text="更多" bold color="#4AC242FF" size="28rpx"></wd-text>
|
||||
</wd-button>
|
||||
</view>
|
||||
</template>
|
||||
@ -349,7 +344,9 @@
|
||||
<view style="height: 200rpx">
|
||||
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" />
|
||||
</view>
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.author }}</view>
|
||||
<view class="ps-2 pt-2 font-size-4 font-bold color-black ellipsis">
|
||||
{{ item.author }}
|
||||
</view>
|
||||
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view>
|
||||
<view class="ps-2 pt-2 pb-2">
|
||||
<!-- <view class="text-sm text-gray-500 text-left">
|
||||
|
@ -104,7 +104,7 @@
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<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">
|
||||
<view class="ps-2 pt-2 pb-2 text-center color-black font-size-3">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
@ -112,7 +112,7 @@
|
||||
</view>
|
||||
</wd-grid>
|
||||
</wd-card>
|
||||
<button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button>
|
||||
<!-- <button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button> -->
|
||||
</view>
|
||||
<fly-login v-model="show" />
|
||||
</view>
|
||||
|
@ -142,11 +142,11 @@
|
||||
},
|
||||
]"
|
||||
></wd-col-picker>
|
||||
<!-- <button v-if="type === 1" class="mt-2" @click="goBack">返回</button> -->
|
||||
</wd-popup>
|
||||
</wd-card>
|
||||
</view>
|
||||
<button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button>
|
||||
<button class="mt-2" @click="goBack">返回</button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -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()
|
||||
}
|
||||
},
|
||||
|
||||
//地址改版事件
|
||||
|
@ -58,7 +58,7 @@ function more(item) {
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-sm text-xl font-size-4">看看附近</text>
|
||||
<text class="text-sm text-xl font-size-4 font-bold">看看附近</text>
|
||||
<text class="ps-2 text-sm text-xl font-size-3 color-gray-500">
|
||||
好物上新季,特产抢先购
|
||||
</text>
|
||||
@ -135,7 +135,7 @@ function more(item) {
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" />
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 text-gray-500">
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 color-black">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
@ -152,7 +152,7 @@ function more(item) {
|
||||
<template #title>
|
||||
<view class="title">
|
||||
<view>
|
||||
<text class="text-sm text-xl font-size-4">游玩必备</text>
|
||||
<text class="text-sm text-xl font-size-4 font-bold">游玩必备</text>
|
||||
<text class="ps-2 text-sm text-xl font-size-3 color-gray-500">
|
||||
好物上新季,特产抢先购
|
||||
</text>
|
||||
@ -194,7 +194,7 @@ function more(item) {
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" />
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 text-gray-500">
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 color-black">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
@ -250,7 +250,7 @@ function more(item) {
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" />
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 text-gray-500">
|
||||
<view class="pb-2 ps-2 pt-2 text-center font-size-3 color-black">
|
||||
{{ item.name }}
|
||||
</view>
|
||||
</view>
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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 登录参数
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
@ -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',
|
||||
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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user