zhiCheng.vue 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  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:'#00B88F',
  111. success: function(res) {
  112. if (res.confirm) {
  113. console.log('用户点击确定');
  114. uni.navigateTo({
  115. url: '/pages/public/login'
  116. })
  117. } else if (res.cancel) {
  118. console.log('用户点击取消');
  119. }
  120. }
  121. })
  122. return
  123. }
  124. if (!this.form.applyName) {
  125. uni.showToast({
  126. title: '请输入真实姓名',
  127. icon: 'none',
  128. duration: 1000
  129. })
  130. return;
  131. }
  132. if (!this.form.applyAge) {
  133. uni.showToast({
  134. title: '请输入年龄',
  135. icon: 'none',
  136. duration: 1000
  137. })
  138. return;
  139. }
  140. if (!this.form.applyPhone) {
  141. uni.showToast({
  142. title: '请输入联系电话',
  143. icon: 'none',
  144. duration: 1000
  145. })
  146. return;
  147. }
  148. if (!this.form.applyContent) {
  149. uni.showToast({
  150. title: '请输入报考证书',
  151. icon: 'none',
  152. duration: 1000
  153. })
  154. return;
  155. }
  156. if(this.form.status ==1||this.form.status==3){
  157. this.$Request.postJson('/app/apply/updateApply', this.form).then(res => {
  158. if (res.code == 0) {
  159. uni.showToast({
  160. title: '职称修改成功!',
  161. icon: 'none'
  162. })
  163. setTimeout(function() {
  164. uni.switchTab({
  165. url:'/pages/index/index'
  166. })
  167. }, 1000)
  168. }
  169. })
  170. }else{
  171. this.$Request.postJson('/app/apply/insertApply', this.form).then(res => {
  172. if (res.code == 0) {
  173. uni.showToast({
  174. title: '职称提交成功!',
  175. icon: 'none'
  176. })
  177. setTimeout(function() {
  178. uni.switchTab({
  179. url:'/pages/index/index'
  180. })
  181. }, 1000)
  182. }
  183. })
  184. }
  185. }
  186. }
  187. }
  188. </script>
  189. <style lang="less">
  190. page{
  191. background-color: #82a9fe;
  192. }
  193. .text{
  194. margin-top: 50rpx;
  195. width: 100%;
  196. .text-box{
  197. width: 686rpx;
  198. text-align: center;
  199. }
  200. }
  201. .pagebg {
  202. width: 100%;
  203. }
  204. .pagebg image {
  205. width: 100%;
  206. height: 100%;
  207. }
  208. .content {
  209. z-index: 99;
  210. margin: 30upx 30upx;
  211. }
  212. .box {
  213. background: #FFFFFF;
  214. border: 4upx solid #000000;
  215. border-radius: 20upx;
  216. padding: 30upx;
  217. }
  218. .inutline {
  219. border-bottom: 1rpx solid #E9E9E9;
  220. }
  221. .btn{
  222. background: #FFFFFF;
  223. border-radius: 10upx;
  224. text-align: center;
  225. margin-top: 30upx;
  226. padding: 30upx;
  227. color: #000000;
  228. font-weight: bold;
  229. letter-spacing: 2rpx;
  230. }
  231. </style>