RIceWqy 2 years ago
parent 54b943ed6b
commit 1d811f7eee

@ -179,7 +179,15 @@
"path": "pages/member-info-detail/member-info-detail",
"style": {
"backgroundTextStyle": "light",
"navigationBarTitleText": "档案信息",
"navigationBarTitleText": "档案详情",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fafafa"
}
}, {
"path": "pages/member-info-add/member-info-add",
"style": {
"backgroundTextStyle": "light",
"navigationBarTitleText": "会员建档",
"navigationBarTextStyle": "black",
"navigationBarBackgroundColor": "#fafafa"
}

@ -0,0 +1,296 @@
<template>
<view class="container">
<!-- 基本信息 -->
<view class="form-section">
<view class="form-section-title">基本信息</view>
<view class="form-item">
<text class="form-label">姓名:</text>
<input type="text" class="form-input" v-model="form.name" placeholder="请输入姓名"/>
</view>
<view class="form-item">
<text class="form-label">出生日期:</text>
<input type="date" class="form-input" v-model="form.birthDate"/>
</view>
<view class="form-item">
<text class="form-label">性别:</text>
<picker mode="selector" :range="gender" v-model="form.gender">
<view class="picker">{{ form.gender }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">民族:</text>
<input type="text" class="form-input" v-model="form.ethnicity" placeholder="请输入民族"/>
</view>
<view class="form-item">
<text class="form-label">籍贯:</text>
<input type="text" class="form-input" v-model="form.origin" placeholder="请输入籍贯"/>
</view>
<view class="form-item">
<text class="form-label">身份证号码:</text>
<input type="text" class="form-input" v-model="form.idCardNumber" placeholder="请输入身份证号码"/>
</view>
</view>
<!-- 联系信息 -->
<view class="form-section">
<view class="form-section-title">联系信息</view>
<view class="form-item">
<text class="form-label">住址:</text>
<input type="text" class="form-input" v-model="form.address" placeholder="请输入住址"/>
</view>
<view class="form-item">
<text class="form-label">联系电话:</text>
<input type="text" class="form-input" v-model="form.phone" placeholder="请输入联系电话"/>
</view>
<view class="form-item">
<text class="form-label">电子邮件地址:</text>
<input type="text" class="form-input" v-model="form.email" placeholder="请输入电子邮件地址"/>
</view>
<view class="form-item">
<text class="form-label">紧急联系人姓名:</text>
<input type="text" class="form-input" v-model="form.emergencyContactName" placeholder="请输入紧急联系人姓名"/>
</view>
<view class="form-item">
<text class="form-label">紧急联系人电话:</text>
<input type="text" class="form-input" v-model="form.emergencyContactPhone" placeholder="请输入紧急联系人电话"/>
</view>
</view>
<!-- 健康信息 -->
<view class="form-section">
<view class="form-section-title">健康信息</view>
<view class="form-item">
<text class="form-label">健康状况:</text>
<input type="text" class="form-input" v-model="form.healthStatus" placeholder="请输入健康状况"/>
</view>
<view class="form-item">
<text class="form-label">医疗保险信息:</text>
<input type="text" class="form-input" v-model="form.medicalInsuranceInfo" placeholder="请输入医疗保险信息"/>
</view>
<view class="form-item">
<text class="form-label">主要医生联系信息:</text>
<input type="text" class="form-input" v-model="form.primaryDoctorContact" placeholder="请输入主要医生联系信息"/>
</view>
<view class="form-item">
<text class="form-label">长期用药信息:</text>
<input type="text" class="form-input" v-model="form.longTermMedicationInfo" placeholder="请输入长期用药信息"/>
</view>
</view>
<!--
&lt;!&ndash; 预先规划的殡葬信息 &ndash;&gt;
<view class="form-section">
<view class="form-section-title">预先规划的殡葬信息</view>
<view class="form-item">
<text class="form-label">殡葬方式:</text>
<picker mode="selector" :range="burialMethods" v-model="form.funeralMethod" @change="changeBurialMethods">
<view class="picker">{{ form.funeralMethod }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">预期的礼仪类型:</text>
<picker mode="selector" :range="ceremonyTypes" v-model="form.ceremonyType">
<view class="picker">{{ form.ceremonyType }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">墓地信息:</text>
<input type="text" class="form-input" v-model="form.cemeteryInfo" placeholder="请输入墓地信息"/>
</view>
<view class="form-item">
<text class="form-label">是否有预购墓地:</text>
<picker mode="selector" :range="yesNoOptions" v-model="form.prePurchasedGrave">
<view class="picker">{{ form.prePurchasedGrave }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">是否有预定的葬礼地点:</text>
<picker mode="selector" :range="yesNoOptions" v-model="form.preReservedFuneralLocation">
<view class="picker">{{ form.preReservedFuneralLocation }}</view>
</picker>
</view>
<view class="form-item">
<text class="form-label">是否有遗嘱或活葬指示:</text>
<picker mode="selector" :range="yesNoOptions" v-model="form.hasWillOrLivingDirective">
<view class="picker">{{ form.hasWillOrLivingDirective }}</view>
</picker>
</view>
</view>
-->
<!-- 财务信息 -->
<view class="form-section">
<view class="form-section-title">财务信息</view>
<view class="form-item">
<text class="form-label">支付方式:</text>
<input type="text" class="form-input" v-model="form.paymentMethod" placeholder="请输入支付方式"/>
</view>
<view class="form-item">
<text class="form-label">银行账户信息:</text>
<input type="text" class="form-input" v-model="form.bankAccountInfo" placeholder="请输入银行账户信息"/>
</view>
<view class="form-item">
<text class="form-label">预先支付的葬礼费用:</text>
<input type="text" class="form-input" v-model="form.prePaidFuneralCost" placeholder="请输入预先支付的葬礼费用"/>
</view>
</view>
<!-- 法律文件 -->
<view class="form-section">
<view class="form-section-title">法律文件</view>
<view class="form-item">
<text class="form-label">遗嘱复印件:</text>
<!-- 这里假设用户可以上传文件 -->
<button @click="uploadFile('willCopy')"></button>
</view>
<view class="form-item">
<text class="form-label">生前事务代理人指定书:</text>
<button @click="uploadFile('livingWill')"></button>
</view>
<view class="form-item">
<text class="form-label">医疗事务代理人指定书:</text>
<button @click="uploadFile('medicalPowerOfAttorney')"></button>
</view>
<view class="form-item">
<text class="form-label">生命维持治疗决定书:</text>
<button @click="uploadFile('lifeSustainingTreatmentDecision')"></button>
</view>
</view>
<button class="form-button" @click="submitForm"></button>
</view>
</template>
<script setup>
import { ref } from 'vue'
const form = ref({
//
portfolioId: null,
userId: null,
name: '',
birthDate: null,
gender: '',
ethnicity: '',
nativePlace: '',
idCardNumber: '',
//
address: '',
phoneNumber: '',
emailAddress: '',
emergencyContactName: '',
emergencyContactPhone: '',
//
healthStatus: '',
medicalInsuranceInfo: '',
primaryDoctorContact: '',
longTermMedicationInfo: '',
//
funeralMethod: '',
ceremonyType: '',
cemeteryInfo: '',
prePurchasedGrave: '',
preReservedFuneralLocation: '',
hasWillOrLivingDirective: false,
//
paymentMethod: '',
bankAccountInfo: '',
prePaidFuneralCost: 0.0,
//
willCopy: '',
preDeathAgentDesignation: '',
medicalAgentDesignation: '',
lifeSupportDecision: '',
//
portfolioStatus: null,
//
rejectionReason: ''
})
const gender = ref(['男', '女'])
const burialMethods = ref(['火葬', '土葬', '海葬'])
const ceremonyTypes = ref(['宗教', '非宗教', '军人'])
const yesNoOptions = ref(['是', '否'])
const changeBurialMethods = (e) => {
console.log(e)
}
const submitForm = () => {
http.request({
url: '/p/user/portfolio/save',
method: 'POST',
data: form.value
})
.then(({
data
}) => {
uni.hideLoading()
uni.showToast({
title: data.data,
icon: 'none',
duration: 1500
})
})
}
const uploadFile = (key) => {
// URLform.value[key]
}
</script>
<style scoped lang="scss">
.container {
padding: 20px;
}
.form-section {
margin-bottom: 20px;
}
.form-section-title {
margin-bottom: 10px;
font-size: 18px;
color: #333;
}
.form-item {
margin-bottom: 10px;
}
.form-label {
display: block;
font-size: 16px;
color: #666;
}
.form-input {
width: 100%;
height: 40px;
padding: 0 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.form-button {
width: 100%;
height: 40px;
line-height: 40px;
margin-top: 20px;
background-color: #409eff;
color: #fff;
text-align: center;
border-radius: 4px;
}
.picker {
height: 40px;
line-height: 40px;
border: 1px solid #ccc;
border-radius: 4px;
padding-left: 10px;
}
</style>

@ -1,22 +1,67 @@
<template>
<view>
</view>
<view>
<div class="detail-item">
<div class="label">姓名:</div>
<div class="value">{{ profolio.name }}</div>
</div>
<div class="detail-item">
<div class="label">手机:</div>
<div class="value">{{ profolio.phoneNumber }}</div>
</div>
<div class="detail-item">
<div class="label">民族:</div>
<div class="value">{{ profolio.ethnicity }}</div>
</div>
<div class="detail-item">
<div class="label">身份证号:</div>
<div class="value">{{ profolio.idCardNumber }}</div>
</div>
<!-- 其他详细信息的展示 -->
</view>
</template>
<script>
export default {
data() {
return {
<script setup>
import { onMounted, ref } from 'vue'
const portfolio = ref({})
const portfolioId = ref(0)
}
},
methods: {
const fetchProfileDetail = (id) => {
portfolioId.value = id
//
http.request({
url: '/p/user/portfolio/detail',
method: 'POST',
data: {
portfolioId: portfolioId.value
}
}).then((response) => {
console.log(response.data)
portfolio.value = response.data
}).catch((error) => {
console.error('Failed to fetch profile details:', error)
})
}
}
}
onLoad((obj) => {
//
fetchProfileDetail(obj.portfolioId)
})
</script>
<style>
<style scoped>
/* 样式可以根据你的设计进行修改 */
.detail-item {
display: flex;
margin-bottom: 10px;
}
.label {
width: 80px;
font-weight: bold;
}
.value {
flex: 1;
}
</style>

@ -1,3 +1,97 @@
.profile-list {
padding: 20px;
font-family: 'Arial', sans-serif;
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
h2 {
font-size: 24px;
color: #333;
}
.add-button {
padding: 10px;
border: none;
border-radius: 5px;
background-color: #007bff;
color: #fff;
font-size: 16px;
cursor: pointer;
}
}
.profile-container {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
}
.profile-item {
display: flex;
background-color: #fff;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.avatar {
width: 100px;
height: 100px;
background-color: #007bff;
}
.info {
padding: 20px;
.name {
font-size: 18px;
font-weight: bold;
margin-bottom: 10px;
color: #333;
}
.details {
color: #666;
.detail {
margin-bottom: 5px;
}
}
}
.profile-item {
margin-bottom: 15px;
padding: 10px;
border: 1px solid #ddd;
border-radius: 5px;
background-color: #f9f9f9;
}
.name {
font-size: 16px;
font-weight: bold;
}
.phone, .ethnicity, .id-card {
margin-top: 5px;
color: #666;
}
.add-button {
margin-top: 20px;
padding: 10px;
border: 1px solid #007aff;
border-radius: 5px;
background-color: #007aff;
color: #fff;
font-size: 16px;
cursor: pointer;
}
.container {
background-color: #f7f7f7;
padding-bottom: 60rpx;

@ -1,22 +1,63 @@
<template>
<view>
3123123
</view>
<div class="profile-list">
<div class="profile-container">
<div class="profile-item" v-for="profile in portfolios" :key="profile.id">
<!-- <img-show class="avatar" :src="your_image_url" :alt="your_alt_text" />-->
<div class="info" @click="goToDetail(profile.portfolioId)">
<div class="name">{{ profile.name }}</div>
<div class="details">
<div class="detail">手机: {{ profile.phoneNumber }}</div>
<div class="detail">民族: {{ profile.ethnicity }}</div>
<div class="detail">身份证号: {{ profile.idCardNumber }}</div>
</div>
</div>
</div>
</div>
<div class="header">
<router-link to="/pages/member-info-add/member-info-add">
<button class="add-button">新增档案</button>
</router-link>
</div>
</div>
</template>
<script>
export default {
data() {
return {
<script setup>
import { onMounted, ref } from 'vue'
}
},
methods: {
const portfolios = ref([])
onShow(() => {
fetchProfiles()
})
}
}
const fetchProfiles = () => {
http.request({
url: '/p/user/portfolio/page',
method: 'POST'
})
.then(({
data
}) => {
uni.hideLoading()
portfolios.value = data
/* uni.showToast({
title: data.data,
icon: 'none',
duration: 1500
}) */
})
}
const goToDetail = (portfoiloId) => {
// ID
uni.navigateTo({
url: '/pages/member-info-detail/member-info-detail?portfolioId=' + portfoiloId
})
}
//
onMounted(() => {
fetchProfiles()
})
</script>
<style scoped lang="scss">
@use './member-info.scss';
@import "./member-info.scss";
</style>

@ -1,7 +1,7 @@
<template>
<view class="register">
<view class="con">
<image src="@/static/logo.png" style="display: none;" />
<image src="@/static/logo.png" style="display: none;"/>
<!-- 登录 -->
<view class="login-form">
<view :class="['item',errorTips==1? 'error':'']">
@ -10,7 +10,8 @@
账号
</text>
<input type="text" data-type="account" placeholder-class="inp-palcehoder" placeholder="请输入账号名称"
@input="getInputVal">
@input="getInputVal"
>
</view>
<view class="password-hint">
至少4位
@ -29,7 +30,8 @@
密码
</text>
<input type="password" data-type="password" placeholder-class="inp-palcehoder" placeholder="请输入密码"
@input="getInputVal">
@input="getInputVal"
>
</view>
<view class="password-hint">
至少6位
@ -46,7 +48,8 @@
确认密码
</text>
<input type="password" data-type="confirmPassword" placeholder-class="inp-palcehoder"
placeholder="请再次输入密码" @input="getInputValConfirmCredentials">
placeholder="请再次输入密码" @input="getInputValConfirmCredentials"
>
</view>
<view v-if="errorTips==3" class="error-text">
<text class="warning-icon">
@ -63,7 +66,8 @@
手机号
</text>
<input type="tel" data-type="phone" placeholder-class="inp-palcehoder" placeholder="请输入手机号"
@input="getInputValPhone">
@input="getInputValPhone"
>
</view>
<view v-if="errorTips==4" class="error-text">
<text class="warning-icon">
@ -82,8 +86,10 @@
<text class="input-item">
验证码
</text>
<input type="number" data-type="verificationCode" placeholder-class="inp-palcehoder" placeholder="请输入验证码"
@input="getInputValCode">
<input type="number" data-type="verificationCode" placeholder-class="inp-palcehoder"
placeholder="请输入验证码"
@input="getInputValCode"
>
</view>
<view v-if="errorTips==5" class="error-text">
<text class="warning-icon">
@ -103,7 +109,7 @@
<view>
<checkbox-group @change="handleAgreeChange" class="authorized-argee">
<checkbox :value="agree" :checked="agree" />
<checkbox :value="agree" :checked="agree"/>
<span class="agree-text">
我已阅读并同意
<router-link @tap="toAgree" to="/pages/argeement/argeement">
@ -126,165 +132,163 @@
</template>
<script setup>
import {
encrypt
} from '@/utils/crypto.js'
import {
encrypt
} from '@/utils/crypto.js'
/**
* 生命周期函数--监听页面显示
*/
onShow(() => {
//
uni.setNavigationBarTitle({
title: '用户注册'
})
/**
* 生命周期函数--监听页面显示
*/
onShow(() => {
//
uni.setNavigationBarTitle({
title: '用户注册'
})
})
const confirmCredentials = ref(''); //
const phone = ref(''); //
const verificationCode = ref(''); //
const codeSending = ref(false); //
/**
* 发送验证码
*/
const sendVerificationCode = () => {
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!phoneReg.test(phone.value)) {
errorTips.value = 4;
return;
}
codeSending.value = true
http.request({
url: '/sms/send',
method: 'post',
data: {
mobile: phone.value
}
})
.then((data) => {
codeSending.value = false
if (data.code === "00000" ){
uni.showToast({
title: data.data,
icon: 'none',
duration: 1500
})
}
})
const confirmCredentials = ref('') //
const phone = ref('') //
const verificationCode = ref('') //
const codeSending = ref(false) //
/**
* 发送验证码
*/
const sendVerificationCode = () => {
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
if (!phoneReg.test(phone.value)) {
errorTips.value = 4
return
}
const agree = ref(false);
const handleAgreeChange = () => {
codeSending.value = true
http.request({
url: '/sms/send',
method: 'post',
data: {
mobile: phone.value
}
})
.then((data) => {
codeSending.value = false
if (data.code === '00000') {
uni.showToast({
title: data.data,
icon: 'none',
duration: 1500
})
}
})
}
const agree = ref(false)
const handleAgreeChange = () => {
agree.value = !agree.value;
}
agree.value = !agree.value
}
const principal = ref('') //
const credentials = ref('') //
/**
* 输入框的值
*/
const getInputVal = (e) => {
const type = e.currentTarget.dataset.type
if (type == 'account') {
principal.value = e.detail.value
} else if (type == 'password') {
credentials.value = e.detail.value
}
const principal = ref('') //
const credentials = ref('') //
/**
* 输入框的值
*/
const getInputVal = (e) => {
const type = e.currentTarget.dataset.type
if (type == 'account') {
principal.value = e.detail.value
} else if (type == 'password') {
credentials.value = e.detail.value
}
const getInputValConfirmCredentials = (e) => {
}
const getInputValConfirmCredentials = (e) => {
confirmCredentials.value = e.detail.value
confirmCredentials.value = e.detail.value
}
const getInputValCode = (e)=>{
verificationCode.value = e.detail.value
}
const getInputValPhone = (e) => {
}
const getInputValCode = (e) => {
verificationCode.value = e.detail.value
}
const getInputValPhone = (e) => {
phone.value = e.detail.value
phone.value = e.detail.value
}
const errorTips = ref(0) // : 1 2
/**
* 注册
*/
const toRegister = () => {
if (principal.value.length == 0 || principal.value.length < 4) {
errorTips.value = 1
} else if (credentials.value.length == 0 || credentials.value.length < 6) {
errorTips.value = 2
} else {
errorTips.value = 0
//
if (credentials.value !== confirmCredentials.value) {
}
const errorTips = ref(0) // : 1 2
/**
* 注册
*/
const toRegister = () => {
if (principal.value.length == 0 || principal.value.length < 4) {
errorTips.value = 1
} else if (credentials.value.length == 0 || credentials.value.length < 6) {
errorTips.value = 2
} else {
errorTips.value = 0
//
if (credentials.value !== confirmCredentials.value) {
errorTips.value = 3;
return;
}
errorTips.value = 3
return
}
//
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/;
if (!phoneReg.test(phone.value)) {
errorTips.value = 4;
return;
}
//
const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
if (!phoneReg.test(phone.value)) {
errorTips.value = 4
return
}
//
if (verificationCode.value.length !== 6) {
errorTips.value = 5;
return;
//
if (verificationCode.value.length !== 6) {
errorTips.value = 5
return
}
uni.showLoading()
http.request({
url: '/user/register',
method: 'post',
data: {
userName: principal.value,
passWord: encrypt(credentials.value),
verificationCode: verificationCode.value,
phone: phone.value
}
uni.showLoading()
http.request({
url: '/user/register',
method: 'post',
data: {
userName: principal.value,
passWord: encrypt(credentials.value),
verificationCode:verificationCode.value,
phone:phone.value
}
})
.then(() => {
uni.hideLoading()
uni.showToast({
title: '注册成功,请登录',
icon: 'none',
duration: 1500
})
.then(() => {
uni.hideLoading()
uni.showToast({
title: '注册成功,请登录',
icon: 'none',
duration: 1500
setTimeout(() => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
})
setTimeout(() => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
})
}, 1800)
})
}
}
/**
* 去登陆
*/
const toLogin = () => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
})
}
const toAgree = () => {
uni.navigateTo({
url: '/pages/agreement/agreement'
})
}
/**
* 回到首页
*/
const toIndex = () => {
uni.switchTab({
url: '/pages/index/index'
})
}, 1800)
})
}
}
/**
* 去登陆
*/
const toLogin = () => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
})
}
const toAgree = () => {
uni.navigateTo({
url: '/pages/agreement/agreement'
})
}
/**
* 回到首页
*/
const toIndex = () => {
uni.switchTab({
url: '/pages/index/index'
})
}
</script>
<style lang="scss" scoped>
@import "./register.scss";
@import "./register.scss";
</style>

@ -10,17 +10,18 @@
(loginResult.pic.indexOf('http') === -1 ? picDomain + loginResult.pic : loginResult.pic)
:
'/static/images/icon/head04.png'
" />
"
/>
</view>
<view class="userinfo-name">
<view>{{ loginResult.nickName ? loginResult.nickName : "用户昵称" }}</view>
<view>{{ loginResult.nickName ? loginResult.nickName : '用户昵称' }}</view>
</view>
</view>
</view>
<view v-if="!isAuthInfo" class="userinfo-none">
<view class="default-pic" @tap="toLogin">
<image src="@/static/images/icon/head04.png" />
<image src="@/static/images/icon/head04.png"/>
</view>
<view class="none-login" @tap="toLogin">
<button class="unlogin">
@ -42,40 +43,40 @@
</text>
<view class="checkmore" data-sts="0" @tap="toOrderListPage">
<text>查看全部</text>
<text class="arrowhead" />
<text class="arrowhead"/>
</view>
</view>
<view class="procedure">
<view class="items" data-sts="1" @tap="toOrderListPage">
<image src="@/static/images/icon/toPay.png" />
<image src="@/static/images/icon/toPay.png"/>
<text>待支付</text>
<text v-if="orderAmount.unPay>0" class="num-badge">
{{ orderAmount.unPay }}
</text>
</view>
<view class="items" data-sts="2" @tap="toOrderListPage">
<image src="@/static/images/icon/toDelivery.png" />
<image src="@/static/images/icon/toDelivery.png"/>
<text>待发货</text>
<text v-if="orderAmount.payed>0" class="num-badge">
{{ orderAmount.payed }}
</text>
</view>
<view class="items" data-sts="3" @tap="toOrderListPage">
<image src="@/static/images/icon/toTake.png" />
<image src="@/static/images/icon/toTake.png"/>
<text>待收货</text>
<text v-if="orderAmount.consignment>0" class="num-badge">
{{ orderAmount.consignment }}
</text>
</view>
<view class="items" data-sts="5" @tap="toOrderListPage">
<image src="@/static/images/icon/toComment.png" />
<image src="@/static/images/icon/toComment.png"/>
<text>已完成</text>
</view>
</view>
</view>
<!--end 订单状态 -->
<view class="prod-col" style="display: none;" >
<view class="prod-col" style="display: none;">
<view class="col-item" @tap="myCollectionHandle">
<view v-if="loginResult" class="num">
{{ collectionCount }}
@ -114,52 +115,52 @@
<view class="my-menu">
<view class="memu-item" @tap="toMemberInfoPage">
<view class="i-name">
<image src="@/static/images/icon/promotion.png" />
<image src="@/static/images/icon/promotion.png"/>
<text>档案信息</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toScorePage">
<view class="i-name">
<image src="@/static/images/icon/myCoupon.png" />
<image src="@/static/images/icon/myCoupon.png"/>
<text>积分商城</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toMemberPage">
<view class="i-name">
<image src="@/static/images/icon/getCoupon.png" />
<image src="@/static/images/icon/getCoupon.png"/>
<text>会员专区</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toDistCenter" style="display: none;" >
<view class="memu-item" @tap="toDistCenter" style="display: none;">
<view class="i-name">
<image src="@/static/images/icon/promotion.png" />
<image src="@/static/images/icon/promotion.png"/>
<text>分销中心</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toCouponCenter" style="display: none;" >
<view class="memu-item" @tap="toCouponCenter" style="display: none;">
<view class="i-name">
<image src="@/static/images/icon/getCoupon.png" />
<image src="@/static/images/icon/getCoupon.png"/>
<text>领券中心</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toMyCouponPage" style="display: none;" >
<view class="memu-item" @tap="toMyCouponPage" style="display: none;">
<view class="i-name">
<image src="@/static/images/icon/myCoupon.png" />
<image src="@/static/images/icon/myCoupon.png"/>
<text>我的优惠券</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
<view class="memu-item" @tap="toAddressList">
<view class="i-name">
<image src="@/static/images/icon/myAddr.png" />
<image src="@/static/images/icon/myAddr.png"/>
<text>收货地址</text>
</view>
<view class="arrowhead" />
<view class="arrowhead"/>
</view>
</view>
<!--end 列表项 -->
@ -174,158 +175,158 @@
</template>
<script setup>
const picDomain = import.meta.env.VITE_APP_RESOURCES_URL
const picDomain = import.meta.env.VITE_APP_RESOURCES_URL
const isAuthInfo = ref(false)
const loginResult = ref('')
const orderAmount = ref('')
/**
* 生命周期函数--监听页面显示
*/
onShow(() => {
loginResult.value = uni.getStorageSync('loginResult')
isAuthInfo.value = !!loginResult.value
//
if (isAuthInfo.value) {
uni.showLoading()
http.request({
url: '/p/myOrder/orderCount',
method: 'GET',
data: {}
})
.then(({
data
}) => {
uni.hideLoading()
orderAmount.value = data
})
showCollectionCount()
}
})
const toMemberInfoPage = () => {
uni.navigateTo({
url: '/pages/member-info/member-info'
})
}
const toScorePage = () => {
uni.navigateTo({
url: '/pages/score/score'
})
}
const toMemberPage = () => {
uni.navigateTo({
url: '/pages/member/member'
})
}
const toDistCenter = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toCouponCenter = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toMyCouponPage = () => {
/* uni.showToast({
icon: 'none',
title: '该功能未开源'
}) */
uni.navigateTo({
url: '/pages/delivery-address/delivery-address'
})
}
const handleTips = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toAddressList = () => {
uni.navigateTo({
url: '/pages/delivery-address/delivery-address'
})
}
const toOrderListPage = (e) => {
const sts = e.currentTarget.dataset.sts
uni.navigateTo({
url: '/pages/orderList/orderList?sts=' + sts
})
}
const collectionCount = ref(0)
/**
* 查询所有的收藏量
*/
const showCollectionCount = () => {
const isAuthInfo = ref(false)
const loginResult = ref('')
const orderAmount = ref('')
/**
* 生命周期函数--监听页面显示
*/
onShow(() => {
loginResult.value = uni.getStorageSync('loginResult')
isAuthInfo.value = !!loginResult.value
//
if (isAuthInfo.value) {
uni.showLoading()
http.request({
url: '/p/user/collection/count',
method: 'GET',
data: {}
})
url: '/p/myOrder/orderCount',
method: 'GET',
data: {}
})
.then(({
data
}) => {
uni.hideLoading()
collectionCount.value = data
orderAmount.value = data
})
showCollectionCount()
}
})
const toMemberInfoPage = () => {
uni.navigateTo({
url: '/pages/member-info/member-info'
})
}
const toScorePage = () => {
uni.navigateTo({
url: '/pages/score/score'
})
}
const toMemberPage = () => {
uni.navigateTo({
url: '/pages/member/member'
})
}
const toDistCenter = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toCouponCenter = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toMyCouponPage = () => {
/* uni.showToast({
icon: 'none',
title: '该功能未开源'
}) */
uni.navigateTo({
url: '/pages/delivery-address/delivery-address'
})
}
const handleTips = () => {
uni.showToast({
icon: 'none',
title: '该功能未开源'
})
}
const toAddressList = () => {
uni.navigateTo({
url: '/pages/delivery-address/delivery-address'
})
}
/**
* 我的收藏跳转
*/
const myCollectionHandle = () => {
let url = '/pages/prod-classify/prod-classify?sts=5'
const id = 0
const title = '我的收藏商品'
if (id) {
url += '&tagid=' + id + '&title=' + title
}
uni.navigateTo({
url
})
}
const toOrderListPage = (e) => {
const sts = e.currentTarget.dataset.sts
uni.navigateTo({
url: '/pages/orderList/orderList?sts=' + sts
})
}
/**
* 去登陆
*/
const toLogin = () => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
const collectionCount = ref(0)
/**
* 查询所有的收藏量
*/
const showCollectionCount = () => {
uni.showLoading()
http.request({
url: '/p/user/collection/count',
method: 'GET',
data: {}
})
.then(({
data
}) => {
uni.hideLoading()
collectionCount.value = data
})
}
/**
* 我的收藏跳转
*/
const myCollectionHandle = () => {
let url = '/pages/prod-classify/prod-classify?sts=5'
const id = 0
const title = '我的收藏商品'
if (id) {
url += '&tagid=' + id + '&title=' + title
}
uni.navigateTo({
url
})
}
/**
* 退出登录
*/
const logout = () => {
http.request({
url: '/logOut',
method: 'post'
/**
* 去登陆
*/
const toLogin = () => {
uni.navigateTo({
url: '/pages/accountLogin/accountLogin'
})
}
/**
* 退出登录
*/
const logout = () => {
http.request({
url: '/logOut',
method: 'post'
})
.then(() => {
util.removeTabBadge()
uni.removeStorageSync('loginResult')
uni.removeStorageSync('token')
uni.showToast({
title: '退出成功',
icon: 'none'
})
.then(() => {
util.removeTabBadge()
uni.removeStorageSync('loginResult')
uni.removeStorageSync('token')
uni.showToast({
title: '退出成功',
icon: 'none'
orderAmount.value = ''
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
orderAmount.value = ''
setTimeout(() => {
uni.switchTab({
url: '/pages/index/index'
})
}, 1000)
})
}
}, 1000)
})
}
</script>
<style scoped lang="scss">
@use './user.scss';
@use './user.scss';
</style>

Loading…
Cancel
Save