页面
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 12:14:11 +08:00
parent ee9c32bf7a
commit 95e24b2100
12 changed files with 96 additions and 92 deletions

View File

@ -49,7 +49,7 @@ const onChange = (e) => {
console.log(value) console.log(value)
} }
const onSubmit = () => { const onSubmit = async () => {
// 1 // 1
// 2 // 2
// if (avatarUrl.value === defaultAvatarUrl) { // if (avatarUrl.value === defaultAvatarUrl) {
@ -70,7 +70,8 @@ const onSubmit = () => {
emit('update:modelValue', false) emit('update:modelValue', false)
// console.log('') // console.log('')
// userStore.setUserInfo({ nickname: nickname.value, avatar: avatarUrl.value }) // userStore.setUserInfo({ nickname: nickname.value, avatar: avatarUrl.value })
userStore.wxLogin() await userStore.wxLogin()
await userStore.getUserInfo()
} }
</script> </script>

View File

@ -33,12 +33,16 @@
> >
<view class="content p-2 text-left" style="align-items: normal"> <view class="content p-2 text-left" style="align-items: normal">
<view class="px-2 flex-content-column"> <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"> <view class="p-1 ellipsis-2 font-size-3">
{{ detail.description }} {{ detail.description }}
</view> </view>
<view class="p-1 font-size-3" style="align-items: end" @click="location(detail)"> <view
class="p-1 font-size-3 color-black"
style="align-items: end"
@click="location(detail)"
>
<text class="pe-2 font-size-3"> <text class="pe-2 font-size-3">
<wd-icon name="location" size="28rpx" color="#87d76b"></wd-icon> <wd-icon name="location" size="28rpx" color="#87d76b"></wd-icon>
泸州市龙马潭区海吉星路 泸州市龙马潭区海吉星路
@ -61,7 +65,7 @@
<view class="p-8"></view> <view class="p-8"></view>
<view class="p-2"> <view class="p-2">
<wd-card custom-class="card-content m-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"> <view class="m-2 px-2 pb-2" style="backdrop-filter: blur(2rpx); border-radius: 10rpx">
<!-- <wd-textarea v-html="detail.content" /> --> <!-- <wd-textarea v-html="detail.content" /> -->
<rich-text :nodes="detail.content"></rich-text> <rich-text :nodes="detail.content"></rich-text>
@ -73,8 +77,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl px-2 text-sm font-size-4">更多推荐</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-gray-500"></text> <text class="px-2 text-xl text-sm font-size-3 color-black"></text>
</view> </view>
</view> </view>
</template> </template>
@ -92,7 +96,7 @@
<view class="ps-1 font-size-3 ellipsis-2">{{ item.description }}</view> <view class="ps-1 font-size-3 ellipsis-2">{{ item.description }}</view>
<view class="p-1 font-size-3" style="align-items: end"> <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> </view>
<view class="relative" style="width: 280rpx; height: 200rpx"> <view class="relative" style="width: 280rpx; height: 200rpx">

View File

@ -24,15 +24,13 @@
:height="'100%'" :height="'100%'"
:src="banner_list.image" :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" 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" 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-4 text-left">{{ banner_list.name }}</text>
<text class="block font-size-3 text-left"> <text class="block font-size-3 text-left"></text>
<!-- 因举办古韵悠然的传统民俗文化节热度飙升在这里你能感受到乡村文化的深厚底蕴和无穷魅力 --> </view> -->
</text>
</view>
</view> </view>
</wd-card> </wd-card>
</view> </view>

View File

@ -36,7 +36,7 @@
:indicator="{ type: 'dots-bar' }" :indicator="{ type: 'dots-bar' }"
@change="onChange" @change="onChange"
></wd-swiper> ></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" 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" style="backdrop-filter: blur(2rpx); border-radius: 10rpx"
> >
@ -44,7 +44,7 @@
<text class="block font-size-3 text-left ellipsis-2"> <text class="block font-size-3 text-left ellipsis-2">
{{ title }} {{ title }}
</text> </text>
</view> </view> -->
</view> </view>
</wd-card> </wd-card>
</view> </view>
@ -88,7 +88,7 @@
<wd-grid-item use-slot> <wd-grid-item use-slot>
<view class="p-2"> <view class="p-2">
<wd-img radius="20rpx" :width="'100rpx'" :height="'100rpx'" :src="item.icon" /> <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 }} {{ item.name }}
</view> </view>
</view> </view>
@ -104,8 +104,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl text-sm font-size-4">当季产品</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-gray-500"> <text class="ps-2 text-xl text-sm font-size-3 color-black">
好物上新季特产抢先购 好物上新季特产抢先购
</text> </text>
</view> </view>
@ -143,7 +143,9 @@
<view style="height: 200rpx; width: 300rpx"> <view style="height: 200rpx; width: 300rpx">
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.image" /> <wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.image" />
</view> </view>
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.store_name }}</view> <view class="ps-2 pt-2 font-size-4 font-bold color-black">
{{ item.store_name }}
</view>
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.store_info }}</view> <view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.store_info }}</view>
<view class="ps-2 pt-2 pb-2"> <view class="ps-2 pt-2 pb-2">
<view class="text-sm text-gray-500 text-left"> <view class="text-sm text-gray-500 text-left">
@ -170,10 +172,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl text-sm font-size-4">美丽乡村</text> <text class="text-xl text-sm font-size-4 font-bold">美丽乡村</text>
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500"> <text class="ps-2 text-xl text-sm font-size-3 color-black">美丽乡村风貌展示厅</text>
美丽乡村风貌展示厅
</text>
</view> </view>
<wd-button type="primary" size="small" @click="switchTab(eat_id)"> <wd-button type="primary" size="small" @click="switchTab(eat_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text> <wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
@ -230,10 +230,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl text-sm font-size-4">特产好物</text> <text class="text-xl text-sm font-size-4 font-bold">特产好物</text>
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500"> <text class="ps-2 text-xl text-sm font-size-3 color-black">精选好物不容错过</text>
精选好物不容错过
</text>
</view> </view>
<wd-button type="primary" size="small" @click="switchTab(live_id)"> <wd-button type="primary" size="small" @click="switchTab(live_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text> <wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
@ -260,22 +258,9 @@
<view style="height: 200rpx"> <view style="height: 200rpx">
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" /> <wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" />
</view> </view>
<view class="ps-2 pt-2 font-size-4 font-bold">{{ item.title }}</view> <view class="ps-2 pt-2 font-size-4 font-bold color-black">{{ item.title }}</view>
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view> <view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view>
<view class="ps-2 pt-2 pb-2"> <view class="ps-2 pt-2 pb-2"></view>
<!-- <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>
</wd-card> </wd-card>
</view> </view>
</view> </view>
@ -288,8 +273,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl text-sm font-size-4">热门咨询</text> <text class="text-xl text-sm font-size-4 font-bold">热门咨询</text>
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500"> <text class="ps-2 text-xl text-sm font-size-3 color-black">
热门咨询一键掌握新鲜事 热门咨询一键掌握新鲜事
</text> </text>
</view> </view>
@ -309,9 +294,11 @@
<wd-img :width="'100%'" :height="'100%'" radius="20rpx" :src="item.cover" alt="joy" /> <wd-img :width="'100%'" :height="'100%'" radius="20rpx" :src="item.cover" alt="joy" />
</view> </view>
<view class="ps-2 flex-content-column"> <view class="ps-2 flex-content-column">
<view class="ps-1 font-size-3 font-bold">{{ item.title }}</view> <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">{{ item.description }}</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="p-1 font-size-3 color-black" style="align-items: end">
<text class="pe-2 font-size-3">2025-8-23</text> <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 }} {{ item.category_name }}
@ -328,10 +315,8 @@
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <view>
<text class="text-xl text-sm font-size-4">景区旅游</text> <text class="text-xl text-sm font-size-4 font-bold">景区旅游</text>
<text class="ps-2 text-xl text-sm font-size-3 color-gray-500"> <text class="ps-2 text-xl text-sm font-size-3 color-black">好玩儿路线一网打尽</text>
好玩儿路线一网打尽
</text>
</view> </view>
<wd-button type="primary" size="small" @click="switchTab(purchase_id)"> <wd-button type="primary" size="small" @click="switchTab(purchase_id)">
<wd-text text="更多" color="#ffffff" size="24rpx"></wd-text> <wd-text text="更多" color="#ffffff" size="24rpx"></wd-text>
@ -349,7 +334,7 @@
<view style="height: 200rpx"> <view style="height: 200rpx">
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" /> <wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="item.cover" />
</view> </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">{{ item.author }}</view>
<view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view> <view class="ps-2 pt-2 font-size-3 ellipsis">{{ item.description }}</view>
<view class="ps-2 pt-2 pb-2"> <view class="ps-2 pt-2 pb-2">
<!-- <view class="text-sm text-gray-500 text-left"> <!-- <view class="text-sm text-gray-500 text-left">

View File

@ -104,7 +104,7 @@
<wd-grid-item use-slot> <wd-grid-item use-slot>
<view class="p-2"> <view class="p-2">
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :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"> <view class="ps-2 pt-2 pb-2 text-center color-black font-size-3">
{{ item.name }} {{ item.name }}
</view> </view>
</view> </view>
@ -112,7 +112,7 @@
</view> </view>
</wd-grid> </wd-grid>
</wd-card> </wd-card>
<button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button> <!-- <button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button> -->
</view> </view>
<fly-login v-model="show" /> <fly-login v-model="show" />
</view> </view>

View File

@ -142,11 +142,11 @@
}, },
]" ]"
></wd-col-picker> ></wd-col-picker>
<button v-if="type === 1" class="mt-2" @click="goBack">返回</button>
</wd-popup> </wd-popup>
</wd-card> </wd-card>
</view> </view>
<button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button> <button v-if="hasLogin" class="mt-2" @click="logout">退出登录</button>
<button class="mt-2" @click="goBack">返回</button>
</view> </view>
</template> </template>
@ -179,6 +179,7 @@ import {
export default defineComponent({ export default defineComponent({
data() { data() {
return { return {
type: 0, // 0 1
hasLogin: false, hasLogin: false,
showPhone: false, showPhone: false,
showName: false, showName: false,
@ -216,7 +217,14 @@ export default defineComponent({
} }
}, },
async onLoad(option) { async onLoad(option) {
this.show = option.show || false this.type = option.type || 0
if (this.type === 1) {
//
} else {
//
this.show = true
}
this.getArea() this.getArea()
this.getUserInfo() this.getUserInfo()
}, },
@ -323,6 +331,10 @@ export default defineComponent({
this.show = false this.show = false
// //
userStore.getUserInfo() userStore.getUserInfo()
//
if (this.type === 1) {
this.goBack()
}
}, },
// //

View File

@ -58,7 +58,7 @@ function more(item) {
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <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 class="ps-2 text-sm text-xl font-size-3 color-gray-500">
好物上新季特产抢先购 好物上新季特产抢先购
</text> </text>
@ -135,7 +135,7 @@ function more(item) {
<wd-grid-item use-slot> <wd-grid-item use-slot>
<view class="p-2"> <view class="p-2">
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" /> <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 }} {{ item.name }}
</view> </view>
</view> </view>
@ -152,7 +152,7 @@ function more(item) {
<template #title> <template #title>
<view class="title"> <view class="title">
<view> <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 class="ps-2 text-sm text-xl font-size-3 color-gray-500">
好物上新季特产抢先购 好物上新季特产抢先购
</text> </text>
@ -194,7 +194,7 @@ function more(item) {
<wd-grid-item use-slot> <wd-grid-item use-slot>
<view class="p-2"> <view class="p-2">
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" /> <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 }} {{ item.name }}
</view> </view>
</view> </view>
@ -250,7 +250,7 @@ function more(item) {
<wd-grid-item use-slot> <wd-grid-item use-slot>
<view class="p-2"> <view class="p-2">
<wd-img radius="20rpx" width="100rpx" height="100rpx" :src="item.icon" /> <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 }} {{ item.name }}
</view> </view>
</view> </view>

View File

@ -29,7 +29,7 @@ export function getProductAPI(cate_pid: string) {
} }
// 用户中心 // 用户中心
export function getInfoAPI() { export function getInfoAPI() {
return http.post('/api/user/info', {}) return http.get('/api/user/info', {})
} }
export function setInfoPI(data: any) { export function setInfoPI(data: any) {

View File

@ -36,7 +36,7 @@ export const useUserStore = defineStore(
// val.avatar = 'https://oss.laf.run/ukw0y1-site/avatar.jpg?feige' // 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 userInfo.value = val
} }
const setUserAvatar = (avatar: string) => { const setUserAvatar = (avatar: string) => {
@ -55,13 +55,16 @@ export const useUserStore = defineStore(
*/ */
const getUserInfo = async () => { const getUserInfo = async () => {
const res = await _getUserInfo() const res = await _getUserInfo()
const userInfo = res.data const user = res.data
setUserInfo(userInfo) const newData = userInfo.value
newData.isset = user.village ? true : false
userInfo.value = newData
// uni.setStorageSync('userInfo', userInfo) // uni.setStorageSync('userInfo', userInfo)
// uni.setStorageSync('token', userInfo.token) // uni.setStorageSync('token', userInfo.token)
// TODO 这里可以增加获取用户路由的方法 根据用户的角色动态生成路由 // TODO 这里可以增加获取用户路由的方法 根据用户的角色动态生成路由
return res return res
} }
/** /**
* *
* @param credentials * @param credentials

View File

@ -45,7 +45,7 @@ page {
} }
.color-black { .color-black {
color: #333333 !important; color: #333333ff !important;
} }
.default-color { .default-color {
@ -142,6 +142,7 @@ $container-width: 100%;
$padding-width: 20rpx; $padding-width: 20rpx;
.ellipsis { .ellipsis {
display: inline-block; display: inline-block;
color: #333333ff !important;
width: calc($container-width - $padding-width); /* 确保容器有宽度 */ width: calc($container-width - $padding-width); /* 确保容器有宽度 */
/* 防止文字换行 */ /* 防止文字换行 */
@ -152,6 +153,7 @@ $padding-width: 20rpx;
/* 确保元素有宽度 */ /* 确保元素有宽度 */
} }
.ellipsis-2 { .ellipsis-2 {
color: #333333ff !important;
display: -webkit-box; display: -webkit-box;
// font-weight: 500; // font-weight: 500;
font-size: 40rpx; font-size: 40rpx;
@ -166,6 +168,7 @@ $padding-width: 20rpx;
} }
.ellipsis-5 { .ellipsis-5 {
color: #333333ff !important;
display: -webkit-box; display: -webkit-box;
// font-weight: 500; // font-weight: 500;
font-size: 40rpx; font-size: 40rpx;

View File

@ -23,7 +23,7 @@ $uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d; $uni-color-error: #dd524d;
/* 文字基本颜色 */ /* 文字基本颜色 */
$uni-text-color: #333; // 基本色 $uni-text-color: #333333ff; // 基本色
$uni-text-color-inverse: #fff; // 反色 $uni-text-color-inverse: #fff; // 反色
$uni-text-color-grey: #999; // 辅助灰色如加载更多的提示信息 $uni-text-color-grey: #999; // 辅助灰色如加载更多的提示信息
$uni-text-color-placeholder: #808080; $uni-text-color-placeholder: #808080;

View File

@ -220,32 +220,30 @@ import { useUserStore } from '@/store'
export function hasLogin() { export function hasLogin() {
const hasLogin = useUserStore().userInfo.id ? true : false const hasLogin = useUserStore().userInfo.id ? true : false
// console.log(useUserStore().userInfo) // console.log(useUserStore().userInfo)
console.log('是否登录', hasLogin)
// console.log('是否登录', hasLogin) console.log('是否登录sss', useUserStore().userInfo)
// console.log('是否登录sss', useUserStore().userInfo) //强制跳转设置村庄
// //强制跳转设置村庄 if (hasLogin && !useUserStore().userInfo.isset) {
// if (hasLogin && !useUserStore().userInfo.isset) { // if (!this.phone) {
// // if (!this.phone) { // uni.showToast({
// // uni.showToast({ // title: '请填写手机号',
// // title: '请填写手机号', // icon: 'none',
// // icon: 'none', // })
// // }) // return
// // return // }
// // } uni.showModal({
// uni.showModal({ title: '温馨提示',
// title: '温馨提示', content: ' 您尚未完善个人信息,是否前往设置你的个人地址?',
// content: ' 您尚未完善个人信息,是否前往设置你的个人地址?', success: function (res) {
// success: function (res) { if (res.confirm) {
// if (res.confirm) { uni.navigateTo({
// uni.navigateTo({ url: '/pages/my/setting?type=1',
// url: '/pages/my/setting', })
// }) }
// } },
// }, })
// }) return
}
// return
// }
//返回是否登录 //返回是否登录
return hasLogin return hasLogin
} }