editCompanyDesc.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <template>
  2. <view class="switch-roles">
  3. <nav-bar title="公司信息" color="#000"></nav-bar>
  4. <view class="roles-content">
  5. <view class="content">
  6. <view class="progress-num"> <text>5</text>/8 </view>
  7. <view class="title">
  8. <view>编辑公司简介</view>
  9. </view>
  10. <view class="desc"> 可以简单介绍一下公司发展状况、服务领域、主要产品等信息</view>
  11. <view class="small-desc">一句短介绍</view>
  12. <view class="content-index">
  13. <view class="check-box">
  14. <textarea
  15. v-model="text"
  16. placeholder="填写公司介绍(最少10个字)"
  17. maxlength="500"
  18. class="textarea"
  19. ></textarea>
  20. <view class="word-count">
  21. <text>{{ text ? text.length : 0 }}</text> /500</view
  22. >
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="submit-btn" @click="goJobPostingSecond">下一步</view>
  28. </view>
  29. </template>
  30. <script>
  31. import navBar from "@/components/nav-bar/index.vue";
  32. export default {
  33. data() {
  34. return {
  35. text: "",
  36. companyData:{}
  37. };
  38. },
  39. components: {
  40. navBar,
  41. },
  42. onLoad(options) {
  43. if (options.companyData) {
  44. this.companyData = JSON.parse(options.companyData);
  45. }
  46. },
  47. methods: {
  48. goJobPostingSecond(){
  49. const companyData = this.companyData
  50. if (this.text === '') {
  51. uni.showToast({
  52. title: "请填写公司介绍",
  53. icon: "none",
  54. });
  55. return;
  56. }
  57. if (this.text.length < 10) {
  58. uni.showToast({
  59. title: "公司介绍最少10个字",
  60. icon: "none",
  61. });
  62. return;
  63. }
  64. companyData.companyContent=this.text
  65. uni.navigateTo({ url: "/my/renzheng/companyLogo?companyData=" +
  66. encodeURIComponent(JSON.stringify(companyData)) })
  67. }
  68. },
  69. };
  70. </script>
  71. <style lang="scss" scoped>
  72. .switch-roles {
  73. background-color: #fff;
  74. position: absolute;
  75. left: 0;
  76. right: 0;
  77. top: 0;
  78. bottom: 0;
  79. display: flex;
  80. flex-direction: column;
  81. .check-box {
  82. width: 100%;
  83. border-radius: 12rpx;
  84. background: rgba(240, 240, 240, 1);
  85. padding: 34rpx;
  86. padding-top: 40rpx;
  87. box-sizing: border-box;
  88. margin: 20rpx 0;
  89. .word-count {
  90. font-family: DM Sans;
  91. font-size: 20rpx;
  92. font-weight: 400;
  93. line-height: 26rpx;
  94. text-align: right;
  95. text {
  96. color: #016bf6;
  97. }
  98. }
  99. }
  100. .roles-content {
  101. width: 100%;
  102. flex: 1;
  103. overflow: hidden;
  104. overflow-y: auto;
  105. .content {
  106. padding: 40rpx;
  107. box-sizing: border-box;
  108. display: flex;
  109. flex-direction: column;
  110. align-items: center;
  111. justify-content: center;
  112. .progress-num {
  113. color: #016bf6;
  114. font-family: DM Sans;
  115. font-size: 24rpx;
  116. font-weight: 500;
  117. width: 100%;
  118. padding-bottom: 20rpx;
  119. box-sizing: border-box;
  120. text {
  121. font-size: 48rpx;
  122. font-weight: 700;
  123. }
  124. }
  125. .title {
  126. color: #333;
  127. width: 100%;
  128. font-family: DM Sans;
  129. font-size: 48rpx;
  130. font-weight: 700;
  131. display: flex;
  132. justify-content: space-between;
  133. align-items: center;
  134. margin-bottom: 20rpx;
  135. }
  136. .desc {
  137. color: rgba(102, 102, 102, 1);
  138. width: 100%;
  139. font-family: DM Sans;
  140. font-size: 24rpx;
  141. font-weight: 400;
  142. line-height: 32rpx;
  143. letter-spacing: 0.5%;
  144. text-align: left;
  145. box-sizing: border-box;
  146. margin-bottom: 20rpx;
  147. }
  148. .small-desc {
  149. color: rgba(34, 37, 42, 1);
  150. font-family: DM Sans;
  151. font-size: 32rpx;
  152. font-weight: 400;
  153. line-height: 48rpx;
  154. width: 100%;
  155. }
  156. .content-index {
  157. width: 100%;
  158. }
  159. }
  160. }
  161. .submit-btn {
  162. flex-shrink: 0;
  163. border-radius: 999px;
  164. background: #ff6600;
  165. color: rgba(255, 255, 255, 1);
  166. font-family: DM Sans;
  167. font-size: 32rpx;
  168. font-weight: 400;
  169. line-height: 48rpx;
  170. display: flex;
  171. justify-content: center;
  172. align-items: center;
  173. padding: 24rpx 32rpx;
  174. box-sizing: border-box;
  175. margin: 30rpx 40rpx;
  176. margin-top: 20rpx;
  177. }
  178. }
  179. ::v-deep .textarea-placeholder {
  180. color: rgba(153, 153, 153, 1);
  181. font-family: DM Sans;
  182. font-size: 20rpx !important;
  183. font-weight: 400;
  184. line-height: 26rpx;
  185. }
  186. ::v-deep .uni-textarea-textarea {
  187. font-size: 20rpx;
  188. }
  189. </style>