推广小程序前端代码
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.

227 lines
6.1 KiB

2 months ago
  1. <template>
  2. <view>
  3. <view class="head-box"></view>
  4. <uv-navbar autoBack title="编辑资料" leftIconColor="#fff" :bgColor="bgColor" height="100rpx" :titleStyle="{color:'#fff'}"></uv-navbar>
  5. <view class="content">
  6. <view class="title-box">基础信息</view>
  7. <view class="form-box">
  8. <view class="form-box-line">
  9. <view class="label-box">用户名称</view>
  10. <view class="value-box">
  11. <uv-input placeholder="请输入用户名称" inputAlign="right" v-model="info.name" border="none" color="#CCCCCC"></uv-input>
  12. </view>
  13. </view>
  14. <view class="form-box-line">
  15. <view class="label-box">邮箱</view>
  16. <view class="value-box">
  17. <uv-input placeholder="请输入邮箱" inputAlign="right" v-model="nfo.phone" border="none" color="#CCCCCC"></uv-input>
  18. </view>
  19. </view>
  20. <view class="form-box-line">
  21. <view class="label-box">手机号</view>
  22. <view class="value-box">
  23. <uv-input placeholder="请输入手机号" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  24. </view>
  25. </view>
  26. <view class="form-box-line">
  27. <view class="label-box">性别</view>
  28. <view class="value-box">
  29. <uv-input placeholder="请输入性别" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  30. </view>
  31. </view>
  32. <view class="form-box-line">
  33. <view class="label-box">国籍</view>
  34. <view class="value-box">
  35. <uv-input placeholder="请输入国籍" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  36. </view>
  37. </view>
  38. <view class="form-box-line">
  39. <view class="label-box">生日</view>
  40. <view class="value-box">
  41. <uv-input placeholder="请输入生日" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  42. </view>
  43. </view>
  44. <view class="form-box-line">
  45. <view class="label-box">现居住址</view>
  46. <view class="value-box">
  47. <uv-input placeholder="请输入现居住址" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  48. </view>
  49. </view>
  50. <view class="form-box-line">
  51. <view class="label-box">个人状态</view>
  52. <view class="value-box">
  53. <uv-input placeholder="请输入个人状态" inputAlign="right" v-model="nfo.idCard" border="none" color="#CCCCCC"></uv-input>
  54. </view>
  55. </view>
  56. </view>
  57. <view class="title-box">教育</view>
  58. <view class="form-box">
  59. <view class="form-title">学历</view>
  60. <view class="choose-box">
  61. <view class="choose-item" :class="xueliIndex == i ? 'choose-class' :''" v-for="(item,i) in xueliList" :key="i" @click="xueliIndex = i">{{item}}</view>
  62. </view>
  63. <view class="form-title">院校</view>
  64. <view class="choose-box">
  65. <view class="choose-item" :class="yuanxiaoIndex == i ? 'choose-class' :''" v-for="(item,i) in yuanxiaoList" :key="i" @click="yuanxiaoIndex = i">{{item}}</view>
  66. </view>
  67. </view>
  68. <view class="title-box">工作</view>
  69. <view class="form-box">
  70. <view class="form-box-line">
  71. <view class="label-box">行业</view>
  72. <view class="value-box">
  73. <uv-input placeholder="请输入行业" inputAlign="right" v-model="info.name" border="none" color="#CCCCCC"></uv-input>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="title-box">关于我</view>
  78. <view class="form-box">
  79. <uv-textarea v-model="info.name" :customStyle="{background: 'transparent',border:'none'}" height="380rpx" placeholder="请输入自我介绍..."></uv-textarea>
  80. </view>
  81. </view>
  82. <view class="btn-box">
  83. <uv-button text="保存" @click="saveClick" color="#381615" shape="circle" :customStyle="btnCustomStyle"></uv-button>
  84. </view>
  85. </view>
  86. </template>
  87. <script>
  88. export default{
  89. data() {
  90. return {
  91. bgColor:'transparent',
  92. btnCustomStyle:{
  93. color:'#FF5858'
  94. },
  95. info:{
  96. name:'',
  97. phone:'',
  98. idCard:'',
  99. jianli:''
  100. },
  101. xueliIndex:0,
  102. yuanxiaoIndex:0,
  103. xueliList:['本科','硕士','博士','其他'],
  104. yuanxiaoList:['985','211','双一流','QS100','QS200','QS600','其他']
  105. }
  106. },
  107. onPageScroll(e) {
  108. if(e.scrollTop > 50) {
  109. this.bgColor = '#49070c'
  110. }else{
  111. this.bgColor = 'transparent'
  112. }
  113. },
  114. methods:{
  115. saveClick() {
  116. uni.showToast({
  117. title:'保存成功',
  118. icon:'none'
  119. })
  120. }
  121. }
  122. }
  123. </script>
  124. <style lang="scss">
  125. page {
  126. background-color: #060504;
  127. }
  128. </style>
  129. <style lang="scss" scoped>
  130. .head-box {
  131. background: url('@/static/image/nav-bg.png') no-repeat;
  132. background-size: 100% 100%;
  133. width: 100%;
  134. height: 534rpx;
  135. position: absolute;
  136. z-index: -1;
  137. }
  138. .content {
  139. padding: 0 30rpx 170rpx;
  140. padding-top: calc(var(--status-bar-height) + 110rpx);
  141. .title-box {
  142. font-weight: 500;
  143. font-size: 27rpx;
  144. color: #666666;
  145. }
  146. .form-box {
  147. background: #1B1713;
  148. border-radius: 27rpx;
  149. padding:0 40rpx;
  150. margin-top: 20rpx;
  151. margin-bottom: 44rpx;
  152. .form-box-line {
  153. height: 112rpx;
  154. border-bottom: 1px solid #403D3A;
  155. display: flex;
  156. align-items: center;
  157. &:last-child {
  158. border: none;
  159. }
  160. .label-box {
  161. font-weight: 500;
  162. font-size: 29rpx;
  163. color: #CCCCCC;
  164. margin-right: 34rpx;
  165. }
  166. .value-box {
  167. display: flex;
  168. align-items: center;
  169. justify-content: space-between;
  170. flex: 1;
  171. .uv-input {
  172. }
  173. }
  174. }
  175. .form-title {
  176. font-weight: 500;
  177. font-size: 28rpx;
  178. color: #CCCCCC;
  179. padding-top: 32rpx;
  180. }
  181. .choose-box {
  182. margin-top: 28rpx;
  183. display: flex;
  184. flex-wrap: wrap;
  185. .choose-item {
  186. width: 137rpx;
  187. height: 67rpx;
  188. border-radius: 13rpx;
  189. border: 1rpx solid #CCCCCC;
  190. text-align: center;
  191. line-height: 67rpx;
  192. font-weight: 500;
  193. font-size: 26rpx;
  194. color: #CCCCCC;
  195. margin-right: 15rpx;
  196. margin-bottom: 24rpx;
  197. &:nth-child(4n){
  198. margin-right: 0;
  199. }
  200. }
  201. .choose-class {
  202. background-color: #341616;
  203. color: #FF4747;
  204. border: 1rpx solid #FF4747;
  205. }
  206. }
  207. }
  208. }
  209. .btn-box {
  210. background-color: #060504;
  211. position: fixed;
  212. bottom: 0;
  213. left: 0;
  214. right: 0;
  215. padding: 20rpx 40rpx;
  216. height: 150rpx;
  217. z-index: 999;
  218. box-sizing: border-box;
  219. }
  220. </style>