zhiCheng.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <template>
  2. <view style="padding-bottom: 50rpx;">
  3. <view class="pagebg">
  4. <view class="" style="width: 100%;height: 400rpx;">
  5. <swiper :indicator-dots="false" :autoplay="true" :interval="3000" :duration="500" style="width: 100%;height: 100%;">
  6. <swiper-item v-for="(item,index) in swiperList" :key="index">
  7. <image :src="item.imageUrl" style="width: 100%;height: 100%;" mode=""></image>
  8. </swiper-item>
  9. </swiper>
  10. </view>
  11. <view class="content">
  12. <view class="box">
  13. <view>
  14. <view class="text-bold" style="color: #333333;">您的姓名</view>
  15. <view class="inutline">
  16. <u-input v-model="form.applyName" type="text" placeholder="请输入真实姓名"
  17. inputAlign="text-align:left" />
  18. </view>
  19. </view>
  20. <view class="margin-top">
  21. <view class="text-bold" style="color: #333333;">您的年龄</view>
  22. <view class="inutline">
  23. <u-input v-model="form.applyAge" type="text" placeholder="请输入年龄"
  24. inputAlign="text-align:left" />
  25. </view>
  26. </view>
  27. <view class="margin-top">
  28. <view class="text-bold" style="color: #333333;">联系电话</view>
  29. <view class="inutline">
  30. <u-input v-model="form.applyPhone" type="text" placeholder="请输入联系电话"
  31. inputAlign="text-align:left" />
  32. </view>
  33. </view>
  34. <view class="margin-top">
  35. <view class="text-bold" style="color: #333333;">申报类型</view>
  36. <view class="">
  37. <u-input v-model="form.applyContent" type="text" placeholder="请输入申报类型"
  38. inputAlign="text-align:left" />
  39. </view>
  40. </view>
  41. </view>
  42. <view v-if="form.status==3&&form.auditContent">拒绝理由:{{form.auditContent}}</view>
  43. <view class="btn" v-if="form.status==1||form.status==3" @click="submit()">修改职称</view>
  44. <view class="btn" v-else @click="submit()">提交职称</view>
  45. </view>
  46. </view>
  47. <view class="text flex justify-center">
  48. <view class="text-box" v-html="value">
  49. <!-- {{value}} -->
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. export default {
  56. data() {
  57. return {
  58. form: {
  59. applyName: '',
  60. applyPhone: '',
  61. applyAge: '',
  62. applyContent: '',
  63. classify:3
  64. },
  65. userId:'',
  66. value:'',
  67. swiperList:[]
  68. }
  69. },
  70. onLoad() {
  71. this.userId = uni.getStorageSync('userId')
  72. this.getSwiperList()
  73. if(this.userId){
  74. this.getDetails()
  75. this.$Request.get('/app/common/type/318').then(res => {
  76. if (res.code == 0) {
  77. this.value = res.data.value
  78. }
  79. });
  80. }
  81. },
  82. onShow() {
  83. },
  84. methods: {
  85. //获取轮播图
  86. getSwiperList() {
  87. this.$Request.get("/app/banner/selectBannerList", {
  88. classify: 9
  89. }).then(res => {
  90. if (res.code == 0) {
  91. this.swiperList = res.data
  92. }
  93. });
  94. },
  95. getDetails() {
  96. let data = {
  97. classify: 3
  98. }
  99. this.$Request.get('/app/apply/selectApplyByUserIdAndClassify', data).then(res => {
  100. if (res.code == 0 && res.data) {
  101. this.form = res.data
  102. }
  103. })
  104. },
  105. submit() {
  106. if(this.userId==''){
  107. uni.showModal({
  108. title: '提示',
  109. content: '您还未登录,请先登录',
  110. confirmColor:'#016BF6',
  111. success: (res) => {
  112. if (res.confirm) {
  113. console.log('用户点击确定');
  114. this.$queue.toLogin('navigateTo')
  115. } else if (res.cancel) {
  116. console.log('用户点击取消');
  117. }
  118. }
  119. })
  120. return
  121. }
  122. if (!this.form.applyName) {
  123. uni.showToast({
  124. title: '请输入真实姓名',
  125. icon: 'none',
  126. duration: 1000
  127. })
  128. return;
  129. }
  130. if (!this.form.applyAge) {
  131. uni.showToast({
  132. title: '请输入年龄',
  133. icon: 'none',
  134. duration: 1000
  135. })
  136. return;
  137. }
  138. if (!this.form.applyPhone) {
  139. uni.showToast({
  140. title: '请输入联系电话',
  141. icon: 'none',
  142. duration: 1000
  143. })
  144. return;
  145. }
  146. if (!this.form.applyContent) {
  147. uni.showToast({
  148. title: '请输入报考证书',
  149. icon: 'none',
  150. duration: 1000
  151. })
  152. return;
  153. }
  154. if(this.form.status ==1||this.form.status==3){
  155. this.$Request.postJson('/app/apply/updateApply', this.form).then(res => {
  156. if (res.code == 0) {
  157. uni.showToast({
  158. title: '职称修改成功!',
  159. icon: 'none'
  160. })
  161. setTimeout(function() {
  162. uni.switchTab({
  163. url:'/pages/index/index'
  164. })
  165. }, 1000)
  166. }
  167. })
  168. }else{
  169. this.$Request.postJson('/app/apply/insertApply', this.form).then(res => {
  170. if (res.code == 0) {
  171. uni.showToast({
  172. title: '职称提交成功!',
  173. icon: 'none'
  174. })
  175. setTimeout(function() {
  176. uni.switchTab({
  177. url:'/pages/index/index'
  178. })
  179. }, 1000)
  180. }
  181. })
  182. }
  183. }
  184. }
  185. }
  186. </script>
  187. <style lang="less">
  188. page{
  189. background-color: #82a9fe;
  190. }
  191. .text{
  192. margin-top: 50rpx;
  193. width: 100%;
  194. .text-box{
  195. width: 686rpx;
  196. text-align: center;
  197. }
  198. }
  199. .pagebg {
  200. width: 100%;
  201. }
  202. .pagebg image {
  203. width: 100%;
  204. height: 100%;
  205. }
  206. .content {
  207. z-index: 99;
  208. margin: 30upx 30upx;
  209. }
  210. .box {
  211. background: #FFFFFF;
  212. border: 4upx solid #000000;
  213. border-radius: 20upx;
  214. padding: 30upx;
  215. }
  216. .inutline {
  217. border-bottom: 1rpx solid #E9E9E9;
  218. }
  219. .btn{
  220. background: #FFFFFF;
  221. border-radius: 10upx;
  222. text-align: center;
  223. margin-top: 30upx;
  224. padding: 30upx;
  225. color: #000000;
  226. font-weight: bold;
  227. letter-spacing: 2rpx;
  228. }
  229. </style>