This commit is contained in:
qiuyuan 2026-03-03 16:22:37 +08:00
parent cf9ea4751a
commit e92f7e00da
3 changed files with 372 additions and 297 deletions

View File

@ -90,7 +90,7 @@
</view> </view>
<view class="service-grid"> <view class="service-grid">
<view class="service-card card-1" @click="goDetail('neighborList')" hover-class="card-hover"> <!-- <view class="service-card card-1" @click="goDetail('neighborList')" hover-class="card-hover">
<view class="card-content"> <view class="card-content">
<text class="card-title">邻里互助</text> <text class="card-title">邻里互助</text>
<text class="card-desc">近邻互帮互助</text> <text class="card-desc">近邻互帮互助</text>
@ -107,6 +107,15 @@
<view class="card-bg"></view> <view class="card-bg"></view>
</view> </view>
<image class="card-icon" src="/static/imgs/index/weixiu.png" style="width: 80rpx;height: 80rpx;bottom: 32rpx;"></image> <image class="card-icon" src="/static/imgs/index/weixiu.png" style="width: 80rpx;height: 80rpx;bottom: 32rpx;"></image>
</view> -->
<view class="service-card card-1" @click="goDetail('meetingList')" hover-class="card-hover">
<view class="card-content">
<text class="card-title">会客厅预约</text>
<text class="card-desc">社区服务功能</text>
<view class="card-bg"></view>
</view>
<image class="card-icon" src="/static/imgs/index/bangzhu.png"
style="width: 68rpx;height: 68rpx; bottom: 48rpx;"></image>
</view> </view>
</view> </view>
</view> </view>
@ -160,6 +169,8 @@ export default {
goDetail(page) { goDetail(page) {
if(page==='neighbor'){ if(page==='neighbor'){
navigateTo({url: `/pages/${page}/index`}) navigateTo({url: `/pages/${page}/index`})
}else if( page == 'serviceTickets'){
uni.showToast({ title: '此功能暂未开放', icon: 'error' });
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: `/pages/${page}/index` url: `/pages/${page}/index`

View File

@ -1,28 +1,28 @@
<template> <template>
<view class="profile-page"> <view class="profile-page">
<!-- 用户信息区域 --> <!-- 用户信息区域 -->
<view class="user-info-card"> <view class="user-info-card" @click="handleUserInfoClick">
<view class="user-info"> <view class="user-info">
<view class="avatar-section"> <view class="avatar-section">
<view class="avatar-wrapper"> <view class="avatar-wrapper">
<image class="avatar" :src="userInfo.avatarUrl || '/static/imgs/index/nav.png'" <image class="avatar" :src="userInfo.avatarUrl || '/static/imgs/index/nav.png'"
mode="aspectFill" @click="onAvatarClick"></image> mode="aspectFill"></image>
<view class="edit-icon" @click="handleEditClick"> <view class="edit-icon" v-if="isLogin" @click.stop="handleEditClick">
<u-icon name="edit-pen" color="#fff" size="24"></u-icon> <u-icon name="edit-pen" color="#fff" size="24"></u-icon>
</view> </view>
<u-loading-icon v-if="uploading" mode="circle" color="#2979ff" size="28"></u-loading-icon>
</view> </view>
</view> </view>
<view class="name-section" @click="handleEditClick"> <view class="name-section">
<view class="name">{{userInfo.nickName || '未登录用户'}}</view> <view class="name">{{userInfo.nickName || '点击登录/注册'}}</view>
<view class="phone">{{userInfo.phone || ''}}</view> <view class="phone">{{userInfo.phone || '登录后体验更多功能'}}</view>
</view> </view>
<view class="description-card"> <view class="description-card">
<text class="title">个人简介</text> <text class="title">个人简介</text>
<text class="content">{{userInfo.bio || '这家伙很懒,什么都没有写~'}}</text> <text class="content">{{userInfo.bio || (isLogin ? '这家伙很懒,什么都没有写~' : '登录后可查看完整信息')}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 功能按钮区域 --> <!-- 功能按钮区域 -->
<view class="function-card"> <view class="function-card">
<view class="button-item" v-for="(item, index) in choseList" :key="index" @click="goPage(item)"> <view class="button-item" v-for="(item, index) in choseList" :key="index" @click="goPage(item)">
@ -33,42 +33,81 @@
<u-icon name="arrow-right" color="#c8c9cc" size="28"></u-icon> <u-icon name="arrow-right" color="#c8c9cc" size="28"></u-icon>
</view> </view>
</view> </view>
<!-- 修改用户信息弹窗 -->
<u-modal :show="showEditModal" :title="isLogin ? '修改用户信息' : '手机号快捷登录'" :show-confirm-button="isLogin" <!-- 登录弹窗 - 仅在用户主动点击后显示 -->
:show-cancel-button="isLogin" @confirm="handleSubmit" @cancel="handleCancel" confirm-color="#2979ff" <u-modal :show="showLoginModal" title="手机号快捷登录" :show-confirm-button="false" :show-cancel-button="true"
cancel-color="#606266"> @cancel="showLoginModal = false" cancel-text="暂不登录" :closeOnClickOverlay="true">
<view class="modal-content"> <view class="modal-content">
<!-- 未登录时显示授权按钮 --> <view class="auth-section">
<view v-if="!isLogin" class="auth-section"> <view class="auth-title">请先阅读并同意相关协议</view>
<view class="auth-title">请先授权手机号以使用完整功能</view>
<button v-if="!showPhoneButton" class="auth-button" open-type="getUserInfo"
@getuserinfo="onGetUserInfo">
<image class="auth-icon" src="/static/imgs/phone.png"></image>
手机号快捷登录
</button>
<button class="auth-button"
@click="showEditModal=false">
取消登录授权
</button>
<button v-if="showPhoneButton" type="default" open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber" class="auth-button phone-button">
<image class="phone-icon" src="/static/imgs/phone.png"></image>
授权获取手机号
</button>
<view class="auth-agreement"> <view class="auth-agreement">
<checkbox-group @change="handleAgreementChange"> <checkbox-group @change="handleAgreementChange">
<label> <label>
<checkbox :checked="agreementChecked" color="#2979ff" style="transform:scale(0.7)"/> <checkbox :checked="agreementChecked" color="#2979ff" style="transform:scale(0.7)"/>
我已阅读并同意<text class="agreement-link" @click.stop="goToAgreement('userAgreement')">用户协议</text><text class="agreement-link" @click.stop="goToAgreement('agreement')">隐私政策</text> 我已阅读并同意
<text class="agreement-link" @click.stop="goToAgreement('userAgreement')">用户协议</text>
<text class="agreement-link" @click.stop="goToAgreement('agreement')">隐私政策</text>
</label> </label>
</checkbox-group> </checkbox-group>
</view> </view>
<button
class="auth-button"
:class="{ 'disabled': !agreementChecked }"
:disabled="!agreementChecked"
open-type="getUserInfo"
@getuserinfo="onGetUserInfo">
<image class="auth-icon" src="/static/imgs/phone.png"></image>
微信用户一键登录
</button>
<view class="auth-tip">
登录表示您同意我们的用户协议和隐私政策
</view> </view>
<!-- 已登录时显示编辑表单 --> </view>
<view v-else class="edit-section"> </view>
</u-modal>
<!-- 手机号授权弹窗 -->
<u-modal :show="showPhoneModal" title="绑定手机号" :show-confirm-button="false" :show-cancel-button="true"
@cancel="showPhoneModal = false" cancel-text="暂不绑定" :closeOnClickOverlay="true">
<view class="modal-content">
<view class="auth-section">
<view class="auth-title">为了提供更好的服务请绑定手机号</view>
<view class="auth-agreement">
<checkbox-group @change="handleAgreementChange">
<label>
<checkbox :checked="agreementChecked" color="#2979ff" style="transform:scale(0.7)"/>
我已阅读并同意
<text class="agreement-link" @click.stop="goToAgreement('userAgreement')">用户协议</text>
<text class="agreement-link" @click.stop="goToAgreement('agreement')">隐私政策</text>
</label>
</checkbox-group>
</view>
<button
class="auth-button phone-button"
:class="{ 'disabled': !agreementChecked }"
:disabled="!agreementChecked"
open-type="getPhoneNumber"
@getphonenumber="getPhoneNumber">
<image class="phone-icon" src="/static/imgs/phone.png"></image>
授权获取手机号
</button>
</view>
</view>
</u-modal>
<!-- 修改用户信息弹窗 -->
<u-modal :show="showEditModal" title="修改用户信息" :show-confirm-button="true"
:show-cancel-button="true" @confirm="handleSubmit" @cancel="showEditModal = false" confirm-color="#2979ff"
cancel-color="#606266">
<view class="modal-content">
<view class="edit-section">
<view class="form-item"> <view class="form-item">
<text class="form-label">头像</text> <text class="form-label">头像</text>
<view class="avatar-upload-container" @click="onAvatarClick"> <view class="avatar-upload-container" @click="onAvatarClick">
@ -104,6 +143,7 @@
</view> </view>
</view> </view>
</u-modal> </u-modal>
<u-modal <u-modal
:show="showPhoneDialog" :show="showPhoneDialog"
title="联系社区" title="联系社区"
@ -117,6 +157,7 @@
<text class="phone-number">{{communityPhone}}</text> <text class="phone-number">{{communityPhone}}</text>
</view> </view>
</u-modal> </u-modal>
<Copyright/> <Copyright/>
<Footer></Footer> <Footer></Footer>
</view> </view>
@ -133,6 +174,7 @@
IMAGE_BASE_URL, IMAGE_BASE_URL,
BASE_URL BASE_URL
} from '@/utils/config'; } from '@/utils/config';
export default { export default {
components: { components: {
Footer,Copyright Footer,Copyright
@ -140,8 +182,11 @@
data() { data() {
return { return {
isLogin: false, isLogin: false,
showEditModal: false, showLoginModal: false, //
showPhoneButton: false, showPhoneModal: false, //
showEditModal: false, //
showPhoneDialog: false, //
agreementChecked: false, //
avatarList: [], avatarList: [],
formData: { formData: {
name: "", name: "",
@ -155,116 +200,56 @@
}, },
uploading: false, uploading: false,
displayAvatar: '/static/imgs/index/nav.png', displayAvatar: '/static/imgs/index/nav.png',
agreementChecked: false, choseList: [
choseList: [{
key: 1,
url: "/static/imgs/service/service_list.png",
name: '全部工单',
pageUrl: 'myTickets'
},
{ {
key: 2, key: 4,
url: "/static/imgs/service/service_help.png", url: "/static/imgs/service/service_friend.png",
name: '邻里互助', name: '会客厅预约',
pageUrl: 'mySeekHelp' pageUrl: 'meetingList',
needLogin: true //
}, },
{ {
key: 3, key: 3,
url: "/static/imgs/service/service_service.png", url: "/static/imgs/service/service_service.png",
name: '周边服务', name: '周边服务',
pageUrl: 'neighbor' pageUrl: 'neighbor',
}, needLogin: true
{
key: 4,
url: "/static/imgs/service/service_friend.png",
name: '会客厅预约',
pageUrl: 'meetingList'
}, },
{ {
key: 5, key: 5,
url: "/static/imgs/service/service_notice.png", url: "/static/imgs/service/service_notice.png",
name: '设置' name: '设置',
needLogin: true
}, },
{ {
key: 6, key: 6,
url: "/static/imgs/service/service_phone.png", url: "/static/imgs/service/service_phone.png",
name: '联系社区', name: '联系社区',
needLogin: false
}, },
{ {
key: 7, key: 7,
url: "/static/imgs/service/service_xieyi.png", url: "/static/imgs/service/service_xieyi.png",
name: '用户协议', name: '用户协议',
pageUrl: 'userAgreement' pageUrl: 'userAgreement',
needLogin: false
}, },
{ {
key: 8, key: 8,
url: "/static/imgs/service/service_zhengce.png", url: "/static/imgs/service/service_zhengce.png",
name: '隐私政策', name: '隐私政策',
pageUrl: 'agreement' pageUrl: 'agreement',
needLogin: false
} }
], ],
communityPhone: '0513-59000051', communityPhone: '0513-59000051',
showPhoneDialog: false wxCode: '' // code
} }
}, },
onShow() { onShow() {
this.initData(); this.initData();
}, },
methods: { methods: {
//
handleAgreementChange(e) {
this.agreementChecked = e.detail.value.length > 0;
},
//
goToAgreement(type) {
if (type === 'user') {
uni.navigateTo({
url: '/pages/userAgreement/index'
});
} else {
uni.navigateTo({
url: '/pages/agreement/index'
});
}
},
//
onAvatarClick() {
if (!this.isLogin) {
this.showEditModal = true;
return;
}
if (this.uploading) return;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
const tempFilePaths = res.tempFilePaths;
if (tempFilePaths && tempFilePaths.length > 0) {
const file = {
url: tempFilePaths[0]
};
this.handleAvatarUpload({ file });
}
},
fail: (err) => {
console.error('选择图片失败', err);
uni.showToast({
title: '选择图片失败',
icon: 'none'
});
}
});
},
handleCloseModal() {
this.showPhoneDialog = false;
},
// //
async initData() { async initData() {
const token = uni.getStorageSync('token'); const token = uni.getStorageSync('token');
@ -287,48 +272,19 @@
} }
}, },
// //
updateUserInfo(data) { handleUserInfoClick() {
const avatarUrl = data.avatar ? `${IMAGE_BASE_URL}${data.avatar}` : '/static/imgs/index/nav.png'; if (!this.isLogin) {
this.userInfo = { this.showLoginModal = true;
nickName: data.name || data.nickName || '未命名用户', this.agreementChecked = false; //
avatarUrl: avatarUrl,
bio: data.introduce || data.bio || '这家伙很懒,什么都没有写~',
phone: data.phone || ''
};
this.displayAvatar = this.userInfo.avatarUrl;
this.formData = {
name: this.userInfo.nickName,
bio: this.userInfo.bio
};
if (this.userInfo.avatarUrl) {
this.avatarList = [{
url: this.userInfo.avatarUrl
}];
} }
}, },
//
clearUserData() {
this.isLogin = false;
this.userInfo = {
nickName: '未登录用户',
avatarUrl: '/static/imgs/index/nav.png',
bio: '这家家伙很懒,什么都没有写~'
};
this.formData = {
name: '',
bio: ''
};
this.avatarList = [];
uni.removeStorageSync('token');
uni.removeStorageSync('userInfo');
},
// //
handleEditClick() { handleEditClick() {
if (!this.isLogin) { if (!this.isLogin) {
this.showEditModal = true; this.showLoginModal = true;
this.agreementChecked = false;
return; return;
} }
this.formData = { this.formData = {
@ -345,7 +301,19 @@
this.showEditModal = true; this.showEditModal = true;
}, },
// - //
handleAgreementChange(e) {
this.agreementChecked = e.detail.value.length > 0;
},
//
goToAgreement(type) {
uni.navigateTo({
url: `/pages/${type}/index`
});
},
//
onGetUserInfo(e) { onGetUserInfo(e) {
if (!this.agreementChecked) { if (!this.agreementChecked) {
uni.showToast({ uni.showToast({
@ -364,19 +332,20 @@
title: '您拒绝了授权', title: '您拒绝了授权',
icon: 'none' icon: 'none'
}); });
this.showEditModal = false;
} }
}, },
// code - //
wxLogin() { wxLogin() {
uni.showLoading({ uni.showLoading({
title: '登录中...' title: '登录中...'
}); });
this.showEditModal = false; this.showLoginModal = false;
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (loginRes) => { success: (loginRes) => {
this.wxCode = loginRes.code;
this.sendLoginRequest(loginRes.code); this.sendLoginRequest(loginRes.code);
}, },
fail: (err) => { fail: (err) => {
@ -398,12 +367,12 @@
}); });
if (res.success) { if (res.success) {
uni.setStorageSync('token', res.data.access_token); uni.setStorageSync('token', res.data.access_token);
//
if (!res.data.phone) { if (!res.data.phone) {
this.showPhoneButton = true; this.showPhoneModal = true;
uni.showToast({ this.agreementChecked = false;
title: '请授权获取手机号', uni.hideLoading();
icon: 'none'
});
} else { } else {
await this.loginComplete(res.data); await this.loginComplete(res.data);
} }
@ -441,12 +410,14 @@
uni.showLoading({ uni.showLoading({
title: '获取手机号中...' title: '获取手机号中...'
}); });
try { try {
const res = await post('/api/v1/app_auth/weixin/bind_phone', { const res = await post('/api/v1/app_auth/weixin/bind_phone', {
code: e.detail.code code: e.detail.code
}); });
if (res.success) { if (res.success) {
await this.loginComplete(res.data); await this.loginComplete(res.data);
this.showPhoneModal = false;
} else { } else {
throw new Error(res.message || '绑定手机号失败'); throw new Error(res.message || '绑定手机号失败');
} }
@ -463,13 +434,12 @@
// //
async loginComplete(data) { async loginComplete(data) {
try { try {
this.showEditModal = false;
const res = await get('/api/v1/app_auth/mine'); const res = await get('/api/v1/app_auth/mine');
if (res && res.success) { if (res && res.success) {
uni.setStorageSync('userInfo', res.data); uni.setStorageSync('userInfo', res.data);
this.updateUserInfo(res.data); this.updateUserInfo(res.data);
this.isLogin = true; this.isLogin = true;
this.showPhoneButton = false; uni.hideLoading();
uni.showToast({ uni.showToast({
title: '登录成功' title: '登录成功'
}); });
@ -477,6 +447,7 @@
throw new Error(res.message || '获取用户信息失败'); throw new Error(res.message || '获取用户信息失败');
} }
} catch (err) { } catch (err) {
uni.hideLoading();
uni.showToast({ uni.showToast({
title: '登录失败: ' + err.message, title: '登录失败: ' + err.message,
icon: 'none' icon: 'none'
@ -485,16 +456,81 @@
} }
}, },
// //
async handleAvatarUpload(event) { updateUserInfo(data) {
const avatarUrl = data.avatar ? `${IMAGE_BASE_URL}${data.avatar}` : '/static/imgs/index/nav.png';
this.userInfo = {
nickName: data.name || data.nickName || '未命名用户',
avatarUrl: avatarUrl,
bio: data.introduce || data.bio || '这家伙很懒,什么都没有写~',
phone: data.phone || ''
};
this.displayAvatar = this.userInfo.avatarUrl;
this.formData = {
name: this.userInfo.nickName,
bio: this.userInfo.bio
};
if (this.userInfo.avatarUrl) {
this.avatarList = [{
url: this.userInfo.avatarUrl
}];
}
},
//
clearUserData() {
this.isLogin = false;
this.userInfo = {
nickName: '点击登录/注册',
avatarUrl: '/static/imgs/index/nav.png',
bio: '登录后可查看完整信息',
phone: ''
};
this.formData = {
name: '',
bio: ''
};
this.avatarList = [];
},
//
onAvatarClick() {
if (!this.isLogin) { if (!this.isLogin) {
this.showEditModal = true; this.showLoginModal = true;
this.agreementChecked = false;
return; return;
} }
const {
file if (this.uploading) return;
} = event;
uni.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: (res) => {
const tempFilePaths = res.tempFilePaths;
if (tempFilePaths && tempFilePaths.length > 0) {
const file = {
url: tempFilePaths[0]
};
this.handleAvatarUpload({ file });
}
},
fail: (err) => {
console.error('选择图片失败', err);
uni.showToast({
title: '选择图片失败',
icon: 'none'
});
}
});
},
//
async handleAvatarUpload(event) {
const { file } = event;
if (!file || !file.url) return; if (!file || !file.url) return;
this.uploading = true; this.uploading = true;
try { try {
const fileInfo = await new Promise((resolve, reject) => { const fileInfo = await new Promise((resolve, reject) => {
@ -504,9 +540,11 @@
fail: reject fail: reject
}); });
}); });
if (fileInfo.size > 3 * 1024 * 1024) { if (fileInfo.size > 3 * 1024 * 1024) {
throw new Error('图片大小不能超过3MB'); throw new Error('图片大小不能超过3MB');
} }
const avatarUrl = await this.uploadAvatar(file.url); const avatarUrl = await this.uploadAvatar(file.url);
await this.updateUserAvatar(avatarUrl); await this.updateUserAvatar(avatarUrl);
uni.showToast({ uni.showToast({
@ -560,6 +598,7 @@
introduce: this.formData.bio, introduce: this.formData.bio,
name: this.formData.name name: this.formData.name
}); });
const res = await get('/api/v1/app_auth/mine'); const res = await get('/api/v1/app_auth/mine');
if (res && res.success) { if (res && res.success) {
uni.setStorageSync('userInfo', res.data); uni.setStorageSync('userInfo', res.data);
@ -597,15 +636,14 @@
// //
async handleSubmit() { async handleSubmit() {
if (!this.isLogin) return; if (!this.isLogin) return;
const {
name, const { name, bio } = this.formData;
bio
} = this.formData;
let avatarUrl = this.avatarList.length > 0 ? this.avatarList[0].url : ""; let avatarUrl = this.avatarList.length > 0 ? this.avatarList[0].url : "";
if (avatarUrl && avatarUrl.includes(IMAGE_BASE_URL)) { if (avatarUrl && avatarUrl.includes(IMAGE_BASE_URL)) {
avatarUrl = avatarUrl.replace(IMAGE_BASE_URL, ''); avatarUrl = avatarUrl.replace(IMAGE_BASE_URL, '');
} }
if (!name) { if (!name) {
uni.showToast({ uni.showToast({
title: '请输入姓名', title: '请输入姓名',
@ -613,15 +651,18 @@
}); });
return; return;
} }
uni.showLoading({ uni.showLoading({
title: '提交中...' title: '提交中...'
}); });
try { try {
await post('/api/v1/app_auth/bind', { await post('/api/v1/app_auth/bind', {
avatar: avatarUrl, avatar: avatarUrl,
introduce: bio, introduce: bio,
name: name name: name
}); });
const res = await get('/api/v1/app_auth/mine'); const res = await get('/api/v1/app_auth/mine');
if (res && res.success) { if (res && res.success) {
uni.setStorageSync('userInfo', res.data); uni.setStorageSync('userInfo', res.data);
@ -644,25 +685,28 @@
} }
}, },
//
handleCancel() {
this.showEditModal = false;
},
// //
goPage(item) { goPage(item) {
//
if (item.key === 6) { if (item.key === 6) {
this.handleContactCommunity(); this.handleContactCommunity();
return; return;
} }
//
if (item.needLogin && !this.isLogin) {
this.showLoginModal = true;
this.agreementChecked = false;
return;
}
//
if (item.key === 5) { if (item.key === 5) {
this.handleEditClick(); this.handleEditClick();
return; return;
} }
if (!this.checkLogin()) {
this.showEditModal = true; //
return;
}
if (item.pageUrl) { if (item.pageUrl) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/${item.pageUrl}/index` url: `/pages/${item.pageUrl}/index`
@ -670,10 +714,11 @@
} }
}, },
// //
handleContactCommunity() { handleContactCommunity() {
if (!this.checkLogin()) { if (!this.isLogin) {
this.showEditModal = true; this.showLoginModal = true;
this.agreementChecked = false;
return; return;
} }
@ -706,19 +751,6 @@
} }
}); });
this.showPhoneDialog = false; this.showPhoneDialog = false;
},
//
checkLogin() {
const token = uni.getStorageSync('token');
if (!token) {
uni.showToast({
title: '请先登录',
icon: 'none'
});
return false;
}
return true;
} }
} }
} }
@ -732,24 +764,29 @@
box-sizing: border-box; box-sizing: border-box;
padding-bottom: calc(100rpx + 50rpx); padding-bottom: calc(100rpx + 50rpx);
} }
.user-info-card { .user-info-card {
background: #fff; background: #fff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04); box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04);
.user-info { .user-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
} }
.avatar-section { .avatar-section {
margin-bottom: 20rpx; margin-bottom: 20rpx;
.avatar-wrapper { .avatar-wrapper {
position: relative; position: relative;
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
.avatar { .avatar {
width: 100%; width: 100%;
height: 100%; height: 100%;
@ -757,6 +794,7 @@
border: 4rpx solid #fff; border: 4rpx solid #fff;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1); box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.1);
} }
.edit-icon { .edit-icon {
position: absolute; position: absolute;
right: 0; right: 0;
@ -770,81 +808,81 @@
justify-content: center; justify-content: center;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
} }
.u-loading-icon {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.3);
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
} }
} }
.name-section { .name-section {
width: 100%; width: 100%;
align-items: center; align-items: center;
text-align: center; text-align: center;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.name { .name {
font-size: 36rpx; font-size: 36rpx;
font-weight: 600; font-weight: 600;
color: #333; color: #333;
} }
.phone { .phone {
color: #999; color: #999;
font-size: 24rpx; font-size: 24rpx;
} }
} }
.description-card { .description-card {
background: #f8f9fa; background: #f8f9fa;
border-radius: 12rpx; border-radius: 12rpx;
padding: 24rpx; padding: 24rpx;
width: 100%; width: 100%;
text-align: center; text-align: center;
.title { .title {
font-size: 28rpx; font-size: 28rpx;
color: #666; color: #666;
margin-bottom: 12rpx; margin-bottom: 12rpx;
display: block; display: block;
} }
.content { .content {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
line-height: 1.5; line-height: 1.5;
} }
} }
.function-card { .function-card {
background: #fff; background: #fff;
border-radius: 16rpx; border-radius: 16rpx;
padding: 0 30rpx; padding: 0 30rpx;
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04); box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.04);
.button-item { .button-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 28rpx 0; padding: 28rpx 0;
border-bottom: 1rpx solid #f2f3f5; border-bottom: 1rpx solid #f2f3f5;
&:active { &:active {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
} }
.button-content { .button-content {
display: flex; display: flex;
align-items: center; align-items: center;
flex: 1; flex: 1;
} }
.icon { .icon {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
margin-right: 24rpx; margin-right: 24rpx;
} }
.label { .label {
font-size: 30rpx; font-size: 30rpx;
color: #333; color: #333;
@ -852,51 +890,41 @@
} }
} }
} }
.modal-content { .modal-content {
padding: 0 30rpx; padding: 0 30rpx;
width: 90%; width: 90%;
margin: 0 auto; margin: 0 auto;
max-height: 70vh; max-height: 70vh;
overflow-y: auto; overflow-y: auto;
/* 编辑表单区域 */
.edit-section {
padding: 20rpx 0;
.form-item {
margin-bottom: 40rpx;
.form-label {
display: block;
font-size: 28rpx;
color: #606266;
margin-bottom: 16rpx;
font-weight: 500;
} }
.upload-tip {
font-size: 24rpx; //
color: #999;
margin-top: 10rpx;
text-align: center;
}
.word-count {
text-align: right;
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
}
}
}
/* 授权登录区域 - 修改相关文案和图标 */
.auth-section { .auth-section {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
padding: 40rpx 0; padding: 40rpx 0;
.auth-title { .auth-title {
font-size: 32rpx; font-size: 32rpx;
color: #333; color: #333;
margin-bottom: 40rpx; margin-bottom: 30rpx;
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
} }
.auth-agreement {
margin-bottom: 30rpx;
font-size: 24rpx;
color: #666;
.agreement-link {
color: #2979ff;
display: inline-block;
}
}
.auth-button { .auth-button {
display: flex; display: flex;
align-items: center; align-items: center;
@ -912,6 +940,11 @@
box-sizing: border-box; box-sizing: border-box;
box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3); box-shadow: 0 4rpx 12rpx rgba(41, 121, 255, 0.3);
&.disabled {
opacity: 0.5;
pointer-events: none;
}
&::after { &::after {
border: none; border: none;
} }
@ -925,25 +958,44 @@
} }
.phone-button { .phone-button {
background: #07C160; /* 微信绿色,保持原有成功色 */ background: #07C160;
} }
.auth-agreement {
margin-top: 20rpx; .auth-tip {
font-size: 24rpx; font-size: 24rpx;
color: #666; color: #999;
.agreement-link {
color: #2979ff;
}
}
}
.phone-dialog-content {
padding: 40rpx;
text-align: center; text-align: center;
font-size: 32rpx; margin-top: 20rpx;
.phone-number { }
font-weight: bold; }
color: #2979ff;
margin-left: 10rpx; //
.edit-section {
padding: 20rpx 0;
.form-item {
margin-bottom: 40rpx;
.form-label {
display: block;
font-size: 28rpx;
color: #606266;
margin-bottom: 16rpx;
font-weight: 500;
}
.upload-tip {
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
text-align: center;
}
.word-count {
text-align: right;
font-size: 24rpx;
color: #999;
margin-top: 10rpx;
} }
} }
} }
@ -1004,4 +1056,16 @@
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2); box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.2);
} }
} }
.phone-dialog-content {
padding: 40rpx;
text-align: center;
font-size: 32rpx;
.phone-number {
font-weight: bold;
color: #2979ff;
margin-left: 10rpx;
}
}
</style> </style>

View File

@ -484,7 +484,7 @@
.applyInfo) .applyInfo)
console.log("===response", response) console.log("===response", response)
if (!response || !response.success) { if (!response || !response.success) {
throw new Error('会议室预定失败'); throw new Error(response.msg);
} }
if (response.success == true) { if (response.success == true) {
uni.redirectTo({ uni.redirectTo({