Commit 8986e695 authored by spc's avatar spc

fixed

parent 67615200
...@@ -46,7 +46,13 @@ export const fetchMemberInfo = () => api.get('/c/user/memberInfo'); ...@@ -46,7 +46,13 @@ export const fetchMemberInfo = () => api.get('/c/user/memberInfo');
*/ */
export const updateBabyInfo = (data) => api.post('/c/user/saveBaby', data); export const updateBabyInfo = (data) => api.post('/c/user/saveBaby', data);
export const fetchUserJSON = () => api.get('/c/front/content',{type:'my'}); export const fetchUserJSON = () => api.get('/c/front/content',{type:'my'});
/** 查询用户是否参与生育补贴和鹤礼2.0*/ /** 查询用户是否参与生育补贴和鹤礼2.0*/
export const checkParticipation = (data) => api.get('/c/fertility/index', data); export const checkParticipation = (data) => api.get('/c/fertility/index', data);
\ No newline at end of file
export const doTerminate = () => api.post('/c/user/terminate');
\ No newline at end of file
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
} }
}, },
"requiredBackgroundModes" : [ "share" ], "requiredBackgroundModes" : [ "share" ],
"embeddedAppIdList": ["wx4205ec55b793245e"] "embeddedAppIdList" : [ "wx4205ec55b793245e" ]
}, },
"mp-alipay" : { "mp-alipay" : {
"usingComponents" : true "usingComponents" : true
...@@ -80,5 +80,6 @@ ...@@ -80,5 +80,6 @@
"uniStatistics" : { "uniStatistics" : {
"enable" : false "enable" : false
}, },
"vueVersion" : "3" "vueVersion" : "3",
"requiredPrivateInfos" : [ "chooseAddress" ]
} }
...@@ -352,49 +352,58 @@ ...@@ -352,49 +352,58 @@
"path": "addressList/addressList", "path": "addressList/addressList",
"style": { "style": {
"navigationBarTitleText": "收货地址管理", "navigationBarTitleText": "收货地址管理",
"navigationStyle": "custom" "navigationStyle": "default"
} }
}, },
{ {
"path": "addressList/addressEdit", "path": "addressList/addressEdit",
"style": { "style": {
"navigationBarTitleText": "填写收货地址", "navigationBarTitleText": "填写收货地址",
"navigationStyle": "custom" "navigationStyle": "default"
} }
}, },
{ {
"path": "more/index", "path": "more/index",
"style": { "style": {
"navigationBarTitleText": "更多", "navigationBarTitleText": "更多",
"navigationStyle": "custom" "navigationStyle": "default"
} }
}, },
{ {
"path" : "goodDetail/goodDetail", "path": "goodDetail/goodDetail",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "settlementCenter/settlementCenter", "path": "settlementCenter/settlementCenter",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : ""
} }
}, },
{ {
"path" : "orderDetail/orderDetail", "path": "orderDetail/orderDetail",
"style" : "style": {
{ "navigationBarTitleText": ""
"navigationBarTitleText" : "" }
},
{
"path": "payResultPage/payResultPage",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "logoffConfirmPage/logoffConfirmPage",
"style": {
"navigationBarTitleText": "注销账号"
} }
}, },
{ {
"path" : "payResultPage/payResultPage", "path" : "orderList/orderList",
"style" : "style" :
{ {
"navigationBarTitleText" : "" "navigationBarTitleText" : "订单列表"
} }
} }
] ]
......
<template> <template>
<view class="address-edit-container"> <view class="address-edit-container">
<view class="page-header">
<view class="back-btn" @tap="goBack">
<image src="/assets/images/back-btn.png" mode="aspectFit" class="back-icon"></image>
</view>
<view class="page-title">填写收货地址</view>
<view v-if="isEditMode" class="delete-btn" @tap="deleteAddress">删除</view>
<view v-else class="placeholder"></view>
</view>
<view class="form-container"> <view class="form-container">
<view class="form-item"> <view class="form-item">
<text class="label">收货人</text> <text class="label">收货人</text>
<input class="input" v-model="formData.name" placeholder="请输入收货人姓名" /> <input class="input" v-model="formData.name" placeholder="请输入收货人姓名" />
<view class="wechat-import" @tap="importFromWechat"> <view class="wechat-import" @tap="importFromWechat">
<text class="wechat-icon">💚</text> <image class="wechat-icon" :src="$baseUrl + 'homepage/Q3Res/wechatIcon.png'" mode="aspectFit">
<text class="wechat-text">微信导入</text> </image>
</view> </view>
</view> </view>
...@@ -403,10 +394,38 @@ export default { ...@@ -403,10 +394,38 @@ export default {
// 微信导入功能 // 微信导入功能
importFromWechat() { importFromWechat() {
// 实际项目中这里应该调用微信API导入地址 wx.chooseAddress({
uni.showToast({ success: (res) => {
title: '微信导入功能待实现', console.log('微信地址导入成功:', res);
icon: 'none'
// 填充表单数据
this.formData.name = res.userName || '';
this.formData.phone = res.telNumber || '';
this.formData.postalCode = res.postalCode || '';
this.formData.province = res.provinceName || '';
this.formData.city = res.cityName || '';
this.formData.district = res.countyName || '';
this.formData.detailAddress = res.detailInfo || '';
// 构建地区字符串
this.formData.region = this.buildRegionString({
province: res.provinceName,
city: res.cityName,
area: res.countyName
});
uni.showToast({
title: '地址导入成功',
icon: 'success'
});
},
fail: (err) => {
console.error('微信地址导入失败:', err);
uni.showToast({
title: '导入失败,请重试',
icon: 'none'
});
}
}); });
} }
} }
...@@ -418,59 +437,8 @@ export default { ...@@ -418,59 +437,8 @@ export default {
padding-bottom: 200rpx; padding-bottom: 200rpx;
} }
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
background-color: #ffffff;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
}
.back-btn {
width: 60rpx;
display: flex;
align-items: center;
justify-content: center;
}
.back-icon {
width: 24rpx;
height: 42rpx;
}
.delete-btn {
box-sizing: border-box;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
border: 1px solid #E34D59;
border-radius: 12rpx;
width: 106rpx;
height: 38rpx;
font-size: 28rpx;
color: #E34D59;
}
.placeholder {
width: 60rpx;
}
.page-title {
font-size: 34rpx;
font-weight: 600;
color: #333333;
flex: 1;
text-align: center;
}
.form-container { .form-container {
margin-top: 120rpx;
padding: 0; padding: 0;
} }
...@@ -507,14 +475,12 @@ export default { ...@@ -507,14 +475,12 @@ export default {
} }
.wechat-icon { .wechat-icon {
font-size: 32rpx; width: 194rpx;
height: 38rpx;
margin-right: 5rpx; margin-right: 5rpx;
} }
.wechat-text {
color: #09BB07;
font-size: 28rpx;
}
.textarea { .textarea {
flex: 1; flex: 1;
......
<template> <template>
<view class="address-list-container"> <view class="address-list-container">
<view class="page-header">
<view class="placeholder"></view>
<view class="placeholder"></view>
</view>
<view class="address-list"> <view class="address-list">
<view v-if="addressList.length > 0"> <view v-if="addressList.length > 0">
<block v-for="(address, index) in addressList" :key="index"> <block v-for="(address, index) in addressList" :key="index">
...@@ -223,26 +219,8 @@ export default { ...@@ -223,26 +219,8 @@ export default {
padding-bottom: 150rpx; padding-bottom: 150rpx;
} }
.page-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx;
background-color: #ffffff;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
}
.back-btn,
.placeholder {
width: 60rpx;
text-align: center;
font-size: 32rpx;
}
.address-list { .address-list {
......
<template>
<view class="logoff-container">
<!-- 警告信息 -->
<view class="warning-section">
<text class="warning-text">当前账号是飞鹤集团旗下产品使用统一账号,注销后,以下平台的手机号也会同步注销,请谨慎操作。</text>
</view>
<!-- 关联平台列表 -->
<view class="platform-section">
<image class="platform-image" :src="$baseUrl + 'homepage/Q3Res/More_appList.png'" mode="aspectFit"></image>
</view>
<!-- 注销前提条件 -->
<view class="prerequisites-section">
<text class="prerequisites-title"> 在您提交的注销申请生效前,平台将进行以下验证,以保证您的账号安全。</text>
<view class="prerequisites-list">
<text class="prerequisites-item">1、当前账号处于安全状态,无被盗、被封风险。</text>
<text class="prerequisites-item">2、账号内没有尚未完成的订单和服务。</text>
<text class="prerequisites-item">3、账号无任何纠纷,包括投诉举报或被投诉举报。</text>
</view>
</view>
<!-- 底部操作区域 -->
<view class="action-section">
<view class="apply-btn" @tap="applyLogoff" :class="{ disabled: !agreed }">申请注销</view>
<view class="agreement-section" @tap="toggleAgreement">
<view class="checkbox" :class="{ checked: agreed }">
<text v-if="agreed" class="checkmark"></text>
</view>
<text class="agreement-text">我已阅读并同意</text>
<text class="agreement-link" @tap.stop="openAgreement">《星妈会账号注销须知》</text>
</view>
</view>
</view>
</template>
<script>
import { doTerminate } from '@/api/user.js';
import { jump, JumpType } from '../../utils';
export default {
data() {
return {
agreed: false
}
},
methods: {
// 切换同意状态
toggleAgreement() {
this.agreed = !this.agreed;
},
// 申请注销
applyLogoff() {
if (!this.agreed) {
uni.showToast({
title: '请先同意注销须知',
icon: 'none'
});
return;
}
uni.showModal({
title: '确认注销',
content: '注销后将无法恢复,确定要继续吗?',
confirmText: '确定注销',
cancelText: '取消',
success: (res) => {
if (res.confirm) {
this.navigateToLogoff();
}
}
});
},
// 跳转到注销页面
navigateToLogoff() {
uni.showLoading({
title: '正在处理注销申请...'
});
doTerminate().then(res => {
uni.hideLoading();
if (res.ok) {
uni.showToast({
title: '注销申请已提交',
icon: 'success'
});
// 可以跳转到登录页面或首页
setTimeout(() => {
uni.reLaunch({
url: '/pages/index/index'
});
}, 1500);
} else {
uni.showToast({
title: res.msg || '注销申请失败',
icon: 'none'
});
}
}).catch(err => {
uni.hideLoading();
console.error('注销接口调用失败:', err);
uni.showToast({
title: '网络错误,请重试',
icon: 'none'
});
});
},
// 打开注销须知
openAgreement() {
jump({
type: JumpType.H5,
url: 'https://mom.feihe.com/member/mine/personalset/accountKnow'
})
}
}
}
</script>
<style scoped>
.logoff-container {
padding: 30rpx;
background-color: #f8f8f8;
min-height: 100vh;
}
.warning-section {
margin-bottom: 30rpx;
width: 618rpx;
margin-left: auto;
margin-right: auto;
}
.warning-text {
font-size: 28rpx;
color: #333333;
line-height: 1.5;
}
.platform-section {
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 30rpx;
width: 618rpx;
margin-left: auto;
margin-right: auto;
}
.platform-image {
width: 618rpx;
height: 638rpx;
}
.prerequisites-section {
margin-bottom: 60rpx;
width: 618rpx;
margin-left: auto;
margin-right: auto;
}
.prerequisites-title {
font-size: 28rpx;
color: #333333;
line-height: 1.5;
margin-bottom: 20rpx;
}
.prerequisites-title::before {
content: '*';
color: #ff4444;
margin-right: 8rpx;
}
.prerequisites-list {
margin-left: 20rpx;
}
.prerequisites-item {
display: block;
font-size: 26rpx;
color: #666666;
line-height: 1.6;
margin-bottom: 10rpx;
}
.action-section {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #ffffff;
padding: 30rpx;
box-shadow: 0 -2rpx 8rpx rgba(0, 0, 0, 0.1);
}
.apply-btn {
width: 100%;
height: 88rpx;
background-color: #D3A458;
color: #ffffff;
font-size: 32rpx;
font-weight: 500;
border-radius: 44rpx;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20rpx;
}
.apply-btn.disabled {
background-color: #cccccc;
color: #999999;
}
.agreement-section {
display: flex;
align-items: center;
justify-content: center;
}
.checkbox {
width: 32rpx;
height: 32rpx;
border: 2rpx solid #ddd;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 12rpx;
}
.checkbox.checked {
background-color: #D3A458;
border-color: #D3A458;
}
.checkmark {
color: #ffffff;
font-size: 20rpx;
font-weight: bold;
}
.agreement-text {
font-size: 24rpx;
color: #666666;
}
.agreement-link {
font-size: 24rpx;
color: #007AFF;
text-decoration: underline;
}
</style>
<template> <template>
<view class="more-container"> <view class="more-container">
<!-- 自定义导航栏 -->
<view class="nav-bar">
<view class="nav-left" @tap="goBack">
<text class="back-icon"></text>
</view>
<view class="nav-title">更多</view>
<view class="nav-right"></view>
</view>
<!-- 内容区域 --> <!-- 内容区域 -->
<view class="content"> <view class="content">
<view class="menu-list"> <view class="menu-list">
...@@ -120,11 +111,6 @@ export default { ...@@ -120,11 +111,6 @@ export default {
} }
}, },
methods: { methods: {
// 返回上一页
goBack() {
uni.navigateBack()
},
// 处理菜单项点击 // 处理菜单项点击
handleItemTap(itemId) { handleItemTap(itemId) {
console.log('点击了菜单项:', itemId) console.log('点击了菜单项:', itemId)
...@@ -154,15 +140,7 @@ export default { ...@@ -154,15 +140,7 @@ export default {
case 'cancelAccount': case 'cancelAccount':
// 跳转到注销账号页面 // 跳转到注销账号页面
// uni.navigateTo({ url: '/pages/cancelAccount/index' }) // uni.navigateTo({ url: '/pages/cancelAccount/index' })
uni.showModal({ uni.navigateTo({ url: '/v3/logoffConfirmPage/logoffConfirmPage' })
title: '确认注销',
content: '确定要注销账号吗?注销后无法恢复。',
success: (res) => {
if (res.confirm) {
console.log('用户确认注销')
}
}
})
break break
default: default:
break break
...@@ -180,51 +158,9 @@ export default { ...@@ -180,51 +158,9 @@ export default {
flex-direction: column; flex-direction: column;
} }
/* 自定义导航栏 */
.nav-bar {
display: flex;
justify-content: space-between;
align-items: center;
height: 92rpx;
background-color: #ffffff;
padding: 0 30rpx;
box-sizing: border-box;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
border-bottom: 1rpx solid #f5f5f5;
}
.nav-left {
width: 60rpx;
height: 92rpx;
display: flex;
align-items: center;
justify-content: center;
}
.back-icon {
font-size: 48rpx;
color: #333333;
}
.nav-title {
font-size: 36rpx;
font-weight: 600;
color: #333333;
flex: 1;
text-align: center;
}
.nav-right {
width: 60rpx;
}
/* 内容区域 */ /* 内容区域 */
.content { .content {
margin-top: 92rpx;
padding: 40rpx 0; padding: 40rpx 0;
flex: 1; flex: 1;
} }
...@@ -276,10 +212,6 @@ export default { ...@@ -276,10 +212,6 @@ export default {
} }
/* 注销账号特殊样式 */ /* 注销账号特殊样式 */
.cancel-account .menu-text {
/* color: #E34D59; */
}
.cancel-text-container { .cancel-text-container {
display: flex; display: flex;
align-items: center; align-items: center;
......
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment