20912bef by 华明祺

feat(personal): 实现个人中心页面及绑定/解绑学员功能

- 新增个人中心页面,包含会员卡展示、用户信息、功能入口
- 实现绑定学员弹框,支持输入姓名和证件号进行绑定
- 添加绑定状态判断,已绑定时按钮切换为解绑
- 实现解绑功能,调用unbindUser接口
- 新增退出登录按钮
- 添加bindUser和unbindUser API接口
1 parent dc453c5f
<script>
import config from '@/config.js';
import {
getInfo
getInfo,
getWebInfo
} from '@/common/login.js';
import * as api from '@/common/api.js';
import config from '@/config.js';
let loginUrl = ['login/login', 'login/register', 'personal/addVip_per']
let firstload = false
export default {
globalData: {
isLogin: false,
baseUrl_api: '',
user: null,
userType: '',
userInfo: null,
deptType: '',
genFlag: '',
authenticationStatus: '',
memberInfo: null,
isExam: false
user: null
},
onLaunch: function(options) {
console.log('App Launch', options);
this.globalData.baseUrl_api = config.baseUrl_api;
if (loginUrl.indexOf(options.path) == -1) {
let userName = uni.getStorageSync('userName')
if (userName) {
getInfo().then(() => {
this.globalData.isLogin = true;
firstload = true
let firstLoadCallback = getApp().firstLoadCallback;
if (firstLoadCallback) {
firstLoadCallback();
}
this.globalData.isLogin = true
uni.reLaunch({
url: '/pages/index/home'
})
}).catch(() => {
firstload = true
uni.redirectTo({
uni.reLaunch({
url: '/login/login'
})
})
} else {
this.globalData.isLogin = false;
firstload = true
uni.redirectTo({
return
}
let webUserName = uni.getStorageSync('webUserName')
if (webUserName) {
getWebInfo().then(() => {
uni.reLaunch({
url: '/personal/home'
})
}).catch(() => {
uni.reLaunch({
url: '/login/login'
})
})
return
}
}
this.globalData.isLogin = false
uni.reLaunch({
url: '/login/login'
})
},
onShow: function() {
console.log('App Show', firstload, this.globalData.isLogin);
// if (firstload && !this.globalData.isLogin) {
// uni.redirectTo({
// url: '/login/login'
// })
// }
console.log('App Show');
},
onHide: function() {
console.log('App Hide');
......
import request from './request.js'
import config from '@/config.js'
import * as loginServer from '@/common/login.js';
// 激活
export function active(data) {
......@@ -1415,6 +1414,14 @@ export function createMemberPayRange(data) {
})
}
// 获取最近认证记录
export function getMyRecent() {
return request({
url: '/system/certifiedNew/getMyRecent',
method: 'get'
})
}
// 获取订单详情
export function getOrderInfo(orderId) {
return request({
......@@ -1422,3 +1429,19 @@ export function getOrderInfo(orderId) {
method: 'get'
})
}
// 绑定学员
export function bindUser(data) {
return request({
url: `/person/info/bindUser`,
method: 'post',
params: data
})
}
export function unbindUser() {
return request({
url: `/person/info/unbindUser`,
method: 'post'
})
}
\ No newline at end of file
......
import {
useUserStore
} from '../store/modules/user'
import request from './request'
import * as api from '@/common/api.js'
function pcLogin(data) {
return request({
......@@ -39,8 +41,15 @@ function logout() {
url: '/logout',
method: 'post'
}).then(() => {
const userStore = useUserStore()
const app = getApp()
uni.removeStorageSync('token')
uni.removeStorageSync('userName')
uni.removeStorageSync('webUserName')
userStore.setUser(null)
app.globalData.isLogin = false
})
}
......@@ -85,15 +94,17 @@ function getInfo() {
url: '/getInfo',
method: 'get'
}).then(res => {
const userStore = useUserStore()
const app = getApp()
const user = res.data.user
// const personInfo = res.data.personInfo
uni.setStorageSync('userName', user.userName)
// uni.setStorageSync('perId', personInfo.perId||-1)
app.globalData.user = res.data.user
uni.removeStorageSync('webUserName')
userStore.setUser(user)
app.globalData.deptType = user.dept.deptType
app.globalData.genFlag = user.dept.genFlag
// user.dept.deptType = '3'
app.globalData.changePassFlag = user.changePassFlag
switch (user.dept.deptType) {
case '1': // 中跆协
app.globalData.userType = '1'
......@@ -109,8 +120,24 @@ function getInfo() {
app.globalData.userType = '3'
break
}
})
}
app.globalData.userInfo = user
function getWebInfo() {
return request({
url: '/person/info/getInfo',
method: 'get'
}).then(res => {
const userStore = useUserStore()
const user = res.data.user
delete res.data.user
const perInfo = res.data
uni.setStorageSync('webUserName', user.userName)
uni.removeStorageSync('userName')
userStore.setUser(user)
userStore.setPerInfo(perInfo)
})
}
......@@ -134,6 +161,38 @@ function getMyOwnMemberInfo() {
app.globalData.isExam = res.data?.memberInfo?.isPoints
})
}
function wxLogin() {
return new Promise((resolve, reject) => {
uni.login({
provider: 'weixin',
success: (res) => {
resolve(res)
},
fail: (res) => {
uni.showToast({
title: '获取用户信息失败',
icon: 'none',
duration: 2000
})
reject(res)
}
})
}).then(res => {
return pcLoginByCode(res.code)
})
}
function pcLoginByCode(code) {
return request({
url: `/loginByJsCode?jsCode=${code}`,
method: "POST"
}).then((res) => {
uni.setStorageSync('token', 'Bearer ' + res.data);
}).then(getWebInfo)
}
export {
pcLogin,
getCodeImg,
......@@ -144,5 +203,7 @@ export {
groupMemberRegister,
getMyOwnMemberInfo,
logout,
getInfo
getInfo,
getWebInfo,
wxLogin
}
\ No newline at end of file
......
......@@ -26,7 +26,8 @@
考试信息
</view>
<view class="userlist">
<view class="item" v-for="(n,index) in infoList" :key="index" @click="goDetail(n)" style="background-color: #fffafa;">
<view class="item" v-for="(n,index) in infoList" :key="index" @click="goDetail(n)"
style="background-color: #fffafa;">
<view class="w100">
<view class="text-primary">{{n.examCode}}</view>
<view class="name">{{n.name}}</view>
......@@ -82,7 +83,6 @@
onLoad((option) => {
if ('form' in option) {
form.value = JSON.parse(decodeURIComponent(option.form))
console.log(111,form.value)
}
type.value = option.type
// console.log(222,form.value)
......@@ -120,13 +120,13 @@
})
}
function goDetail(item){
function goDetail(item) {
const form = encodeURIComponent(JSON.stringify(item))
let path = `/level/applyDetail?examId=${item.examId}&form=${form}`
uni.navigateTo({
url: path
});
}
}
</script>
<style scoped lang="scss">
......@@ -139,15 +139,25 @@ function goDetail(item){
border-radius: 15rpx;
.tt {
color: #0A1629;margin: 0 0 30rpx;
color: #0A1629;
margin: 0 0 30rpx;
font-size: 30rpx;
}
.ddd{font-size: 28rpx;color: #333; margin: 0 0 10rpx;
.lab{color: #999;display: inline-block;text-align: justify;
text{word-break: break-all;}
.ddd {
font-size: 28rpx;
color: #333;
margin: 0 0 10rpx;
.lab {
color: #999;
display: inline-block;
text-align: justify;
text {
word-break: break-all;
}
}
}
}
</style>
\ No newline at end of file
......
<template>
<view class="page-bg">
<view class="nav-bar" style="margin-top:-30px" >
<view class="nav-bar" style="margin-top:-30px">
<view class="back-btn" @click="goBack">
<uni-icons type="left" size="20" color="#fff"></uni-icons>
</view>
......@@ -134,9 +134,11 @@
});
}
})
function goBack(){
function goBack() {
uni.navigateBack()
}
function changeActive(n) {
isActive.value = n
}
......@@ -173,7 +175,7 @@
pcLogin(form.value).then((res) => {
app.globalData.isLogin = true
uni.redirectTo({
url: '/pages/index/index'
url: '/pages/index/home'
})
})
} else if (isActive.value == 1) {
......@@ -205,7 +207,7 @@
.then(() => {
app.globalData.isLogin = true
uni.redirectTo({
url: '/pages/index/index'
url: '/pages/index/home'
})
})
}
......@@ -286,7 +288,10 @@
</script>
<style scoped lang="scss">
.wNumber {position: absolute;width: 100%;bottom:-50rpx;
.wNumber {
position: absolute;
width: 100%;
bottom: -50rpx;
text-align: center;
color: rgba(255, 255, 255, 0.7);
font-size: 24rpx;
......@@ -330,7 +335,9 @@
position: relative;
}
.loginbox {position: relative;
.loginbox {
position: relative;
.loginNav {
width: 700rpx;
margin: 0 auto -53rpx;
......
import App from './App'
import store from './store'
// #ifndef VUE3
import Vue from 'vue'
Vue.config.productionTip = false
......@@ -6,6 +8,7 @@ App.mpType = 'app'
const app = new Vue({
...App
})
app.use(store)
app.$mount()
// #endif
......@@ -15,6 +18,7 @@ import {
} from 'vue'
export function createApp() {
const app = createSSRApp(App)
app.use(store)
return {
app
}
......
......@@ -129,10 +129,10 @@
if (orderErr) {
uni.hideLoading()
isPaying.value = false
uni.showToast({
title: '创建订单失败',
icon: 'none'
})
// uni.showToast({
// title: '创建订单失败',
// icon: 'none'
// })
return
}
......@@ -141,7 +141,7 @@
if (data.payFlag == 0) {
uni.hideLoading()
isPaying.value = false
uni.navigateTo({
uni.redirectTo({
url: `/myCenter/sucPay?orderId=${data.orderId}`
})
return
......@@ -153,7 +153,7 @@
uni.hideLoading()
isPaying.value = false
uni.navigateTo({
uni.redirectTo({
url: `/myCenter/sucPay?orderId=${data.orderId}`
})
}
......
......@@ -49,44 +49,59 @@
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
// 核心数据
const formData = ref({}) // 订单统计数据
const rangeId = ref('') // 核心业务ID
const payType = ref('0') // 支付方式(默认0=民生付)
const payLoading = ref(false) // 支付按钮加载状态
// 页面加载接收参数
onLoad(async (options) => {
import {
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
// 核心数据
const formData = ref({}) // 订单统计数据
const rangeId = ref('') // 核心业务ID
const payType = ref('0') // 支付方式(默认0=民生付)
const payLoading = ref(false) // 支付按钮加载状态
// 页面加载接收参数
onLoad(async (options) => {
console.log('订单ID:', options.rangeId)
if (options.rangeId) {
rangeId.value = options.rangeId
await getCount()
}
})
})
async function getCount() {
async function getCount() {
try {
const res = await api.getNewCountByRangeId(rangeId.value)
formData.value = res.data || { all: 0, new: 0, old: 0 }
formData.value = res.data || {
all: 0,
new: 0,
old: 0
}
} catch (e) {
formData.value = { all: 0, new: 0, old: 0 }
formData.value = {
all: 0,
new: 0,
old: 0
}
}
}
}
// 支付方式切换
function handlePayTypeChange(e) {
// 支付方式切换
function handlePayTypeChange(e) {
payType.value = e.detail.value
}
}
// 立即支付核心逻辑
async function handlePay() {
// 立即支付核心逻辑
async function handlePay() {
// 基础校验
if (!rangeId.value || rangeId.value === '-1') {
return uni.showToast({ title: '订单ID异常', icon: 'none' })
return uni.showToast({
title: '订单ID异常',
icon: 'none'
})
}
try {
......@@ -95,7 +110,7 @@ async function handlePay() {
if (res.data?.orderId) {
api.pcallBack2(res.data.orderId)
uni.navigateTo({
uni.redirectTo({
url: `/myCenter/sucPay?rangeId=${rangeId.value}from=payOrder`
})
}
......@@ -104,25 +119,30 @@ async function handlePay() {
} catch (err) {
const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试'
uni.showToast({ title: errMsg, icon: 'none' })
uni.showToast({
title: errMsg,
icon: 'none'
})
} finally {
payLoading.value = false
}
}
}
</script>
<style scoped lang="scss">
.pay-order-container {
.pay-order-container {
padding: 30rpx;
background-color: #fff;
min-height: 100vh;
box-sizing: border-box;
}
.icon{
width:30px;
}
// 页面头部
.page-header {
}
.icon {
width: 30px;
}
// 页面头部
.page-header {
text-align: center;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
......@@ -133,10 +153,10 @@ async function handlePay() {
font-weight: 600;
color: #333;
}
}
}
// 订单信息区域
.order-info {
// 订单信息区域
.order-info {
margin-bottom: 60rpx;
.info-item {
......@@ -174,10 +194,10 @@ async function handlePay() {
font-size: 38rpx;
}
}
}
}
// 支付方式区域
.pay-type-section {
// 支付方式区域
.pay-type-section {
margin-bottom: 80rpx;
.section-title {
......@@ -205,10 +225,10 @@ async function handlePay() {
}
}
}
}
}
// 底部支付按钮
.fixed-bottom {
// 底部支付按钮
.fixed-bottom {
position: fixed;
bottom: 0;
left: 0;
......@@ -230,5 +250,5 @@ async function handlePay() {
background-color: #E60012;
color: #fff;
}
}
}
</style>
\ No newline at end of file
......
......@@ -9,14 +9,12 @@
<view class="time">{{n.auditTime||'待审批'}}</view>
<view class="content">
<view class="status">
<text v-if="n.auditResult==0"> 审核中</text>
<text v-if="n.auditResult==1" class="text-success">审核通过</text>
<text v-if="n.auditResult==2" class="text-danger"> 审核拒绝</text>
<text v-if="n.auditResult==3" class="text-warning"> 已撤回</text>
<text v-if="n.auditResult==0" class="text-danger"> 审核拒绝</text>
</view>
<!-- <view class="name">{{index+1}}</view> -->
<view class="deptName">{{n.auditDeptName}}</view>
<view v-if="n.auditStatus==2">
<view v-if="n.auditResult==0">
备注:{{n.auditMsg||'/' }}
</view>
</view>
......@@ -31,6 +29,7 @@
import * as api from '@/common/api.js'
import config from '@/config.js'
import _ from 'underscore'
import to from 'await-to-js'
import {
onMounted,
ref
......@@ -42,16 +41,15 @@
const app = getApp();
const userType = ref('')
const recordList = ref([])
onLoad((option) => {
getMyCertStageFN()
})
function getMyCertStageFN() {
api.getMyCertStage().then(res => {
recordList.value = res.data
console.log(res)
onLoad(async (option) => {
await getMyRecentFN()
})
async function getMyRecentFN() {
const [err, res] = await to(api.getMyRecent())
if (!err && res.data && res.data.auditLogs) {
recordList.value = JSON.parse(res.data.auditLogs)
}
}
</script>
......
......@@ -4,6 +4,7 @@
"crypto-js": "^4.1.1",
"dayjs": "^1.11.6",
"lodash": "^4.17.21",
"pinia": "^3.0.4",
"underscore": "^1.13.6"
},
"devDependencies": {
......
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -10,7 +10,8 @@
<view v-html="form.content"></view>
<view v-if="attachmentMp4.length>0">
<video v-for="(f,index) in attachmentMp4" :key="index" controls :src="config.baseUrl_api + f.url"></video>
<video v-for="(f,index) in attachmentMp4" :key="index" controls
:src="config.baseUrl_api + f.url"></video>
</view>
<view v-if="attachmentFile.length>0" class="mt20">
<!-- 附件-->
......@@ -39,8 +40,8 @@
import _ from 'underscore'
import config from '@/config.js'
const form = ref({})
const attachmentFile = ref([])
const attachmentMp4 = ref([])
const attachmentFile = ref([])
const attachmentMp4 = ref([])
onLoad((option) => {
getData(option.noteId)
......@@ -58,15 +59,17 @@ const attachmentMp4 = ref([])
if (form.value.attacthJson) {
const attachment = JSON.parse(form.value.attacthJson)
attachmentFile.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') === -1) || []
attachmentFile.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') === -1) ||
[]
attachmentMp4.value = _.filter(attachment, (a) => a.url.toLowerCase().indexOf('.mp4') !== -1) || []
}
})
}
function downLoad(url){
function downLoad(url) {
console.log(url)
var str = config.baseUrl_api + url
if (url.indexOf('png') > -1 ||url.indexOf('jpg') > -1 ||url.indexOf('jpeg') > -1) {
if (url.indexOf('png') > -1 || url.indexOf('jpg') > -1 || url.indexOf('jpeg') > -1) {
uni.previewImage({
urls: [str],
success: function(res) {
......@@ -83,6 +86,7 @@ const attachmentMp4 = ref([])
goWebView(str)
}
}
function goWebView(url) {
url = url.replace("http://", "https://")
uni.showLoading({
......@@ -91,7 +95,6 @@ const attachmentMp4 = ref([])
uni.downloadFile({
url: url,
success: function(res) {
console.log('111')
uni.hideLoading();
var filePath = res.tempFilePath;
uni.showLoading({
......@@ -101,14 +104,13 @@ const attachmentMp4 = ref([])
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('222')
uni.hideLoading();
},
fail: function(err) {
console.log(err.errMsg)
uni.hideLoading();
let msg
if(err.errMsg.indexOf('not supported')>-1){
if (err.errMsg.indexOf('not supported') > -1) {
msg = '不支持该文件类型'
} else {
msg = err.errMsg
......@@ -140,6 +142,7 @@ const attachmentMp4 = ref([])
background: #fff;
min-height: 100vh;
}
.title {
font-size: 36rpx;
font-weight: 500;
......@@ -158,6 +161,7 @@ const attachmentMp4 = ref([])
color: #7B7F83;
font-size: 22rpx;
}
.content {
line-height: 1.6;
color: #4C5359;
......@@ -178,7 +182,10 @@ const attachmentMp4 = ref([])
word-wrap: break-word !important;
white-space: normal !important;
}
.content rich-text img{max-width: 100%;}
.content rich-text img {
max-width: 100%;
}
image {
max-width: 100%;
......
......@@ -138,10 +138,10 @@
if (orderErr) {
uni.hideLoading()
isPaying.value = false
uni.showToast({
title: '创建订单失败',
icon: 'none'
})
// uni.showToast({
// title: '创建订单失败',
// icon: 'none'
// })
return
}
......@@ -161,7 +161,7 @@
isPaying.value = false
// 支付成功,跳转页面
uni.navigateTo({
uni.redirectTo({
url: `/personal/sucPay?orderId=${orderRes.data.orderId}`
})
}
......
......@@ -31,32 +31,36 @@
</template>
<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
// 核心数据
const formData = ref({}) // 订单统计数据
const price = ref('') // 核心业务ID
const payType = ref('0') // 支付方式(默认0=民生付)
const payLoading = ref(false) // 支付按钮加载状态
// 页面加载接收参数
onLoad(async (options) => {
import {
ref
} from 'vue'
import {
onLoad
} from '@dcloudio/uni-app';
import * as api from '@/common/api.js'
// 核心数据
const formData = ref({}) // 订单统计数据
const price = ref('') // 核心业务ID
const payType = ref('0') // 支付方式(默认0=民生付)
const payLoading = ref(false) // 支付按钮加载状态
// 页面加载接收参数
onLoad(async (options) => {
console.log('订单ID:', options.price)
if (options.price) {
price.value = options.price
}
})
})
// 支付方式切换
function handlePayTypeChange(e) {
// 支付方式切换
function handlePayTypeChange(e) {
payType.value = e.detail.value
}
}
// 立即支付核心逻辑
async function handlePay() {
// 立即支付核心逻辑
async function handlePay() {
try {
......@@ -65,7 +69,7 @@ async function handlePay() {
if (res.data?.orderId) {
api.pcallBack2(res.data.orderId)
uni.navigateTo({
uni.redirectTo({
url: `/personal/sucPay`
})
}
......@@ -74,25 +78,30 @@ async function handlePay() {
} catch (err) {
const errMsg = err?.data?.msg || err?.message || '支付失败,请稍后重试'
uni.showToast({ title: errMsg, icon: 'none' })
uni.showToast({
title: errMsg,
icon: 'none'
})
} finally {
payLoading.value = false
}
}
}
</script>
<style scoped lang="scss">
.pay-order-container {
.pay-order-container {
padding: 30rpx;
background-color: #fff;
min-height: 100vh;
box-sizing: border-box;
}
.icon{
width:30px;
}
// 页面头部
.page-header {
}
.icon {
width: 30px;
}
// 页面头部
.page-header {
text-align: center;
padding: 20rpx 0;
border-bottom: 1px solid #eee;
......@@ -103,10 +112,10 @@ async function handlePay() {
font-weight: 600;
color: #333;
}
}
}
// 订单信息区域
.order-info {
// 订单信息区域
.order-info {
margin-bottom: 60rpx;
.info-item {
......@@ -144,10 +153,10 @@ async function handlePay() {
font-size: 38rpx;
}
}
}
}
// 支付方式区域
.pay-type-section {
// 支付方式区域
.pay-type-section {
margin-bottom: 80rpx;
.section-title {
......@@ -175,10 +184,10 @@ async function handlePay() {
}
}
}
}
}
// 底部支付按钮
.fixed-bottom {
// 底部支付按钮
.fixed-bottom {
position: fixed;
bottom: 0;
left: 0;
......@@ -200,5 +209,5 @@ async function handlePay() {
background-color: #E60012;
color: #fff;
}
}
}
</style>
\ No newline at end of file
......
......@@ -64,7 +64,8 @@
<uni-forms-item label="头像" required>
<uni-file-picker v-model="photoArr" @delete="delPhoto" return-type="object" limit="1"
@select="upPhoto" :del-ico="false" :image-styles="imageStylesTx"></uni-file-picker>
<image mode="aspectFill" v-if="baseFormData.photo2" style="height:200rpx;width:200rpx;" :src="config.baseUrl_api + baseFormData.photo2"/>
<image mode="aspectFill" v-if="baseFormData.photo2" style="height:200rpx;width:200rpx;"
:src="config.baseUrl_api + baseFormData.photo2" />
</uni-forms-item>
</view>
</uni-forms>
......@@ -80,7 +81,8 @@
<view class="fixedBottom"><button class="btn-red" @click="goSubmit">确 定</button></view>
<!-- 会员须知 -->
<uni-popup ref="popup" type="bottom" background-color="#fff" animation :disable-scroll="true" :mask-click="false">
<uni-popup ref="popup" type="bottom" background-color="#fff" animation :disable-scroll="true"
:mask-click="false">
<view class="tt">入会须知</view>
<view class="popBody">
_{{baseFormData.name}}_欢迎您申请成为中国跆拳道协会(以下简称中国跆协)会员,请确保本次申请是经过您本人或监护人授权同意后的自愿行为,请您务必仔细阅读本入会须知。
......@@ -297,7 +299,7 @@
baseFormData.value.photo = data.data.fang;
baseFormData.value.photo2 = data.data.yuan;
photoArr.value = {
url: config.baseUrl_api+baseFormData.value.photo,
url: config.baseUrl_api + baseFormData.value.photo,
name: '头像',
extname: 'jpg'
}
......@@ -492,8 +494,8 @@
content: '请确认信息正确',
success: function(res) {
if (res.confirm) {
if(baseFormData.value.idcType=='4'){
baseFormData.value.idcType='0'
if (baseFormData.value.idcType == '4') {
baseFormData.value.idcType = '0'
}
delete baseFormData.value.card
......@@ -523,16 +525,16 @@
uni.showModal({
content: '保存成功',
title: '提示',
confirmText:'继续添加',
cancelColor:'返回首页',
confirmText: '继续添加',
cancelColor: '返回首页',
success: function(res) {
uni.redirectTo({
url: `/personalVip/addVip?tab=${current.value}&idcType=${baseFormData.value.idcType}`
});
},
fail:function(){
fail: function() {
uni.reLaunch({
url:`/pages/index/index`
url: `/pages/index/home`
})
}
})
......@@ -542,6 +544,7 @@
}
});
}
function getUserInfo() {
api.getInfo(perId.value).then(res => {
baseFormData.value = res.data
......@@ -553,7 +556,6 @@
</script>
<style lang="scss">
/* 字段名左对齐 */
.uni-forms-item .uni-forms-item__label {
text-align: left !important;
......@@ -582,11 +584,10 @@
/* 文本内容右对齐 */
.uni-forms-item .uni-forms-item__content text,
.uni-forms-item .uni-forms-item__content > text {
.uni-forms-item .uni-forms-item__content>text {
display: inline-block !important;
white-space: nowrap !important;
}
</style>
<style lang="scss" scoped>
......@@ -598,9 +599,11 @@
right: 0;
bottom: 0;
}
:deep(.uni-popup) {
overflow: hidden !important;
}
:deep(.segmented-control) {
height: 100rpx;
}
......@@ -676,6 +679,7 @@
:deep(.item-text-overflow) {
text-align: left;
}
:deep(.fixUniFormItemStyle .uni-data-picker__input-box) {
justify-content: flex-start !important;
text-align: left !important;
......
No preview for this file type
import {
createPinia
} from "pinia";
const store = createPinia()
export default store
\ No newline at end of file
import {
defineStore
} from "pinia";
import {
ref
} from 'vue'
export const useUserStore = defineStore('user', () => {
const user = ref(null)
const perInfo = ref(null)
const setUser = (value) => {
user.value = value
}
const setPerInfo = (value) => {
perInfo.value = value
}
return {
user,
setUser,
perInfo,
setPerInfo
}
})
\ No newline at end of file
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!