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