小说小程序前端代码仓库(小程序)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

116 lines
2.5 KiB

<template>
<view class="creator-page">
<uv-navbar title="请成为创作者" fixed placeholder></uv-navbar>
<view class="form-card">
<view class="form-item">
<text class="required">*</text>
<text class="label">笔名</text>
<input v-model="penName" placeholder="请输入" class="input" placeholder-class="input-placeholder" />
</view>
<view class="form-item">
<text class="required">*</text>
<text class="label">简介</text>
<textarea v-model="intro" placeholder="请输入" class="textarea" placeholder-class="input-placeholder" />
</view>
</view>
<view class="footer-btn-area">
<button class="submit-btn" @click="submit">成为创作者</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
penName: '',
intro: ''
}
},
methods: {
submit() {
if (!this.penName) {
uni.showToast({ title: '请输入笔名', icon: 'none' })
return
}
if (!this.intro) {
uni.showToast({ title: '请输入简介', icon: 'none' })
return
}
// 这里可以添加提交逻辑
uni.showToast({ title: '申请成功', icon: 'success' })
setTimeout(() => {
uni.navigateBack()
}, 800)
}
}
}
</script>
<style scoped lang="scss">
.creator-page {
min-height: 100vh;
background: #f7f8fa;
display: flex;
flex-direction: column;
}
.form-card {
background: #fff;
border-radius: 20rpx;
margin: 40rpx 32rpx 0 32rpx;
padding: 32rpx 24rpx;
box-shadow: 0 4rpx 24rpx 0 rgba(0,0,0,0.04);
}
.form-item {
display: flex;
flex-direction: column;
margin-bottom: 32rpx;
position: relative;
}
.required {
color: #e23d3d;
font-size: 28rpx;
margin-right: 4rpx;
}
.label {
font-size: 28rpx;
color: #222;
font-weight: bold;
margin-bottom: 12rpx;
}
.input, .textarea {
width: 100%;
height: 80rpx;
border: none;
border-bottom: 1.5rpx solid #ececec;
font-size: 28rpx;
background: transparent;
padding: 18rpx 0 12rpx 0;
margin-bottom: 2rpx;
}
.input-placeholder {
color: #d2d2d2;
font-size: 26rpx;
}
.textarea {
min-height: 120rpx;
resize: none;
}
.footer-btn-area {
margin-top: auto;
padding: 48rpx 32rpx 32rpx 32rpx;
background: transparent;
margin-bottom: 80rpx;
}
.submit-btn {
width: 100%;
height: 88rpx;
background: #0a2e6d;
color: #fff;
font-size: 32rpx;
border-radius: 44rpx;
font-weight: bold;
letter-spacing: 2rpx;
transition: background 0.2s;
}
</style>