页面
This commit is contained in:
parent
3814c7c2e6
commit
7f038da49d
@ -51,7 +51,7 @@
|
||||
|
||||
<view class="p-2">
|
||||
<wd-card>
|
||||
<wd-grid :gutter="2" :column="5">
|
||||
<wd-grid :gutter="2" :column="4">
|
||||
<view
|
||||
@click="more(item)"
|
||||
v-for="item in [
|
||||
@ -77,21 +77,21 @@
|
||||
color: 'orange',
|
||||
},
|
||||
{
|
||||
name: '美丽乡村',
|
||||
name: '村集体',
|
||||
url: '/',
|
||||
icon: '/static/icons/home4.png',
|
||||
type: 2,
|
||||
color: 'red',
|
||||
},
|
||||
{
|
||||
name: '景区景点',
|
||||
url: '/pages/about/index',
|
||||
icon: '/static/icons/home5.png',
|
||||
type: 1,
|
||||
color: 'red',
|
||||
},
|
||||
]"
|
||||
>
|
||||
<!-- // {
|
||||
// name: '景区景点',
|
||||
// url: '/pages/about/index',
|
||||
// icon: '/static/icons/home5.png',
|
||||
// type: 1,
|
||||
// color: 'red',
|
||||
// }, -->
|
||||
<wd-grid-item use-slot>
|
||||
<view class="p-2">
|
||||
<wd-img radius="20rpx" :width="'60rpx'" :height="'60rpx'" :src="item.icon" />
|
||||
@ -201,18 +201,9 @@
|
||||
</view>
|
||||
|
||||
<view class="pe-2 ps-2">
|
||||
<view
|
||||
class=" "
|
||||
style=""
|
||||
@click="
|
||||
more({
|
||||
type: 2,
|
||||
url: ' ',
|
||||
})
|
||||
"
|
||||
>
|
||||
<view class=" " style="">
|
||||
<wd-card custom-class="card-content">
|
||||
<view class="relative" style="height: 380rpx">
|
||||
<view class="relative" style="height: 380rpx" @click="goPage(current_item)">
|
||||
<wd-img radius="20rpx" :width="'100%'" :height="'100%'" :src="current_item.cover" />
|
||||
<view
|
||||
class="m-2 p-2 absolute bottom-0 text-center left-0 right-0 text-white bg-gray-300 bg-opacity-5"
|
||||
@ -262,17 +253,7 @@
|
||||
<view class="p-1">
|
||||
<wd-row class=" ">
|
||||
<wd-col :span="12" v-for="(item, index) in index_live">
|
||||
<view
|
||||
class="p-1"
|
||||
style=""
|
||||
@click="
|
||||
more({
|
||||
type: 2,
|
||||
url: ' ',
|
||||
})
|
||||
"
|
||||
v-if="index < 4"
|
||||
>
|
||||
<view class="p-1" style="" @click="goPage(item)" v-if="index < 4">
|
||||
<view class="py-2">
|
||||
<wd-card custom-class="card-content">
|
||||
<view style="height: 300rpx">
|
||||
|
@ -361,8 +361,11 @@ export default defineComponent({
|
||||
}
|
||||
const res = await setBaseAPI(data)
|
||||
console.log(res)
|
||||
|
||||
if (res.code === 1) {
|
||||
//重新调用
|
||||
this.userInfo['avatar'] = this.imgSrc
|
||||
userStore.getUserInfo()
|
||||
}
|
||||
this.showImage = false
|
||||
},
|
||||
@ -382,7 +385,10 @@ export default defineComponent({
|
||||
}
|
||||
const res = await setBaseAPI(data)
|
||||
console.log(res)
|
||||
|
||||
if (res.code === 1) {
|
||||
//重新调用
|
||||
userStore.getUserInfo()
|
||||
}
|
||||
this.showName = false
|
||||
},
|
||||
async onSubmitPhone() {
|
||||
|
@ -33,10 +33,11 @@ export const useUserStore = defineStore(
|
||||
// 若头像为空 则使用默认头像
|
||||
if (!val.avatar) {
|
||||
val.avatar = userInfoState.avatar
|
||||
} else {
|
||||
val.avatar = baseUrl + val.avatar // 地址拼接
|
||||
// val.avatar = 'https://oss.laf.run/ukw0y1-site/avatar.jpg?feige'
|
||||
}
|
||||
// else {
|
||||
// val.avatar = baseUrl + val.avatar // 地址拼接
|
||||
// // val.avatar = 'https://oss.laf.run/ukw0y1-site/avatar.jpg?feige'
|
||||
// }
|
||||
// 判断是否设置村庄
|
||||
val.isset = val.village ? true : false
|
||||
userInfo.value = val
|
||||
@ -60,6 +61,8 @@ export const useUserStore = defineStore(
|
||||
const user = res.data
|
||||
const newData = userInfo.value
|
||||
newData.isset = !!user.village
|
||||
newData.avatar = user.avatar
|
||||
newData.nickname = user.nickname
|
||||
userInfo.value = newData
|
||||
// uni.setStorageSync('userInfo', userInfo)
|
||||
// uni.setStorageSync('token', userInfo.token)
|
||||
|
Loading…
x
Reference in New Issue
Block a user