qiyexiufu.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <template>
  2. <view class="main" v-if="isshow!='0'">
  3. <view class="flex align-center margin-bottom-sm callback" style="color: #fff;" @click="callback">
  4. <image style="width: 50rpx;height: 50rpx;margin-right: 10rpx;" src="../../static/index/callback_white.png"
  5. mode=""></image>返回首页
  6. </view>
  7. <image class="topbg" :src="imgHost+'/static/index/top.png'"></image>
  8. <!-- <view class="top">
  9. <image src="../../static/index/r2-2x.png" mode=""></image>
  10. </view> -->
  11. <view class="" style="position: relative;z-index: 1;margin-top: 96px;">
  12. <view class="flex flex-direction justify-center align-center">
  13. <image src="/static/index/3166d3d1d9b79004291261c7e8357a3.jpg" style="width: 200rpx;height: 200rpx;"
  14. mode=""></image>
  15. <view class="text-bold text-black margin-top-xs">
  16. 企业信用征信评估
  17. </view>
  18. </view>
  19. <view class="title">
  20. 请上传您的企业征信信用报告:
  21. </view>
  22. <view class="title-item">
  23. 温馨提示:请按照信用报告的顺序上传
  24. </view>
  25. <view class="upload">
  26. <view class="cu-bar bg-white border-bottom">
  27. <view class="action">图片上传</view>
  28. <view class="action">{{ imgList.length }}/100</view>
  29. </view>
  30. <view class="cu-form-group">
  31. <view class="grid col-4 grid-square flex-sub">
  32. <view class="bg-img" v-for="(item, index) in imgList" :key="index" @tap="ViewImage"
  33. :data-url="imgList[index]">
  34. <image :src="imgList[index]" mode="aspectFill"></image>
  35. <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index"><text
  36. class="cuIcon-close"></text></view>
  37. </view>
  38. <view class="solids" @tap="ChooseImage" v-if="imgList.length < 100"><text
  39. class="cuIcon-cameraadd"></text></view>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="title">
  44. 请上传您的企业营业执照:
  45. </view>
  46. <view class="title-item">
  47. 温馨提示:请按照营业执照的顺序上传
  48. </view>
  49. <view class="upload">
  50. <view class="cu-bar bg-white border-bottom">
  51. <view class="action">图片上传</view>
  52. <view class="action">{{ license_image_url == ''? '0':'1' }}/1</view>
  53. </view>
  54. <view class="cu-form-group">
  55. <view class="grid col-4 grid-square flex-sub">
  56. <view class="bg-img" :data-url="license_image_url" v-if="license_image_url !== ''">
  57. <image :src="license_image_url" mode="aspectFill"></image>
  58. <view class="cu-tag bg-red" @tap.stop="DelImgs" :data-index="index">
  59. <text class="cuIcon-close"></text>
  60. </view>
  61. </view>
  62. <view class="solids" @tap="ChooseLicenseImage" v-if="license_image_url.length < 1">
  63. <text class="cuIcon-cameraadd"></text>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. <view class="title">
  69. 企业负责人相关信息:
  70. </view>
  71. <view class="input-container">
  72. <view class="input-border round">
  73. <text class="label">真实姓名:</text>
  74. <input type="text" v-model="realName" placeholder="请输入您的真实姓名" class="input-item" />
  75. </view>
  76. </view>
  77. <view class="input-container">
  78. <view class="input-border round">
  79. <text class="label">联系方式:</text>
  80. <input type="text" v-model="realPhone" placeholder="请输入您的联系方式" class="input-item" />
  81. </view>
  82. </view>
  83. <!-- <view class="upl" @click="ChooseLicenseImage">
  84. +
  85. </view> -->
  86. <!-- <image :src="license_image_url" style="width: 200rpx;height: 200rpx;"></image> -->
  87. <view class="sub" @click="submit">
  88. 提交
  89. </view>
  90. <!-- 提示框 -->
  91. <view class="cu-modal" :class="modalName == 'Modal' ? 'show' : ''">
  92. <view class="cu-dialog top">
  93. <view class="cu-bar bg-white justify-end">
  94. <view class="content">提示</view>
  95. <view class="action" @tap="hideModal">
  96. <text class="cuIcon-close yellow" />
  97. </view>
  98. </view>
  99. <view class="padding-xl">
  100. 您已提交成功,后台审核评估后会在一个工作日左右与您联系,请耐心等待。
  101. </view>
  102. </view>
  103. </view>
  104. <!-- 未登录 -->
  105. <view class="cu-modal" :class="modalName == 'WxModal' ? 'show' : ''">
  106. <view class="cu-dialog">
  107. <view class="cu-bar bg-white justify-end">
  108. <view class="content">您还未登录</view>
  109. <view class="action" @tap="modalName = ''">
  110. <text class="cuIcon-close yellow" />
  111. </view>
  112. </view>
  113. <view class="padding-xl">
  114. <view class="top-title" style="">
  115. <!-- <text class="top-title1">您还未登录</text></br> -->
  116. <text class="top-title1">请先登录再进行操作</text>
  117. </view>
  118. <view class="flex justify-around">
  119. <button type="primary" @tap="modalName = ''" class="cu-btn round greyBg lg">暂不登录</button>
  120. <button type="primary" @click="gotologin" class="cu-btn round yellowBg lg"
  121. hover-class="btn-hover">立刻登录</button>
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </template>
  129. <script>
  130. import {
  131. mapState,
  132. mapMutations,
  133. mapGetters,
  134. mapActions
  135. } from 'vuex';
  136. export default {
  137. computed: {
  138. ...mapGetters({
  139. hasLogin: 'verifyJwt'
  140. }),
  141. ...mapState(['user'])
  142. },
  143. onLoad(op) {
  144. console.log(op)
  145. let obj = uni.getStorageSync("configDatas")
  146. this.isshow = obj.is_show
  147. this.imgHost = this.$imgHost
  148. // //#ifdef H5
  149. // if (window.location.href.split("?")[1] != undefined) {
  150. // let id = window.location.href.split("?")[1].split("=")[1]
  151. // console.log(parseInt(id))
  152. // uni.setStorageSync('up_id', id)
  153. // }
  154. // //#endif
  155. },
  156. onShow() {
  157. // this.sharefun(this.user.id)
  158. // console.log(this.user.id)
  159. // console.log(window.location.href)
  160. },
  161. data() {
  162. return {
  163. percent: 0,
  164. imgList: [],
  165. license_image_url: '',
  166. modalName: '',
  167. isshow: "",
  168. imgHost: '',
  169. index: "",
  170. realName: "",
  171. realPhone: ""
  172. }
  173. },
  174. methods: {
  175. ...mapActions({
  176. getUser: 'getUser' // 将 `this.getUser()` 映射为 `this.$store.dispatch('getUser')`
  177. }),
  178. ...mapMutations({
  179. setJwt: 'setJwt',
  180. login: 'login'
  181. }),
  182. callback() {
  183. uni.switchTab({
  184. url: "/pages/index/index"
  185. })
  186. },
  187. gotologin() {
  188. this.modalName = '';
  189. uni.navigateTo({
  190. url: "../login/login",
  191. fail: (err) => {
  192. console.log(err)
  193. }
  194. })
  195. },
  196. sharefun(id) {
  197. if (!this.hasLogin) {
  198. return false;
  199. }
  200. if (this.$wechat.is_weixin()) {
  201. this.$wechat.share({
  202. title: '聚联诚集团信用评估系统V3.0评估入口',
  203. desc: '点击链接,开始您的个人信用评估',
  204. imgUrl: "https://zhengda.oss-cn-chengdu.aliyuncs.com/juyin/static/index/20201222144549.png",
  205. }, window.location.href, id, true)
  206. }
  207. },
  208. async submit() {
  209. if (!this.hasLogin) {
  210. this.modalName = 'WxModal';
  211. return false;
  212. }
  213. if (this.realName == '') {
  214. uni.showToast({
  215. title: "请输入真实姓名",
  216. icon: "none"
  217. })
  218. return false
  219. }
  220. if (this.realPhone == '') {
  221. uni.showToast({
  222. title: "请输入联系方式",
  223. icon: "none"
  224. })
  225. return false
  226. }
  227. if ( this.license_image_url !== '') {
  228. let imgs = [];
  229. for (let img of this.imgList) {
  230. var data = await this.$request.upload('/api/common/uploadImg', img, {});
  231. if (data.code != 200) {
  232. uni.showModal({
  233. title: '错误信息',
  234. content: data.message,
  235. showCancel: false
  236. });
  237. return;
  238. }
  239. imgs.push(data.data.file_url);
  240. }
  241. var data = await this.$request.upload('/api/common/uploadImg', this.license_image_url, {});
  242. if (data.code != 200) {
  243. uni.showModal({
  244. title: '错误信息',
  245. content: data.message,
  246. showCancel: false
  247. });
  248. return;
  249. }
  250. this.license_image_url = data.data.file_url;
  251. let param = {
  252. type: 2,
  253. license_image_url: this.license_image_url,
  254. 'credit_image_urls': JSON.stringify(imgs),
  255. contact_name: this.realName,
  256. contact_phone: this.realPhone
  257. };
  258. uni.navigateTo({
  259. url: "agreement?data=" + JSON.stringify(param)
  260. })
  261. // let res = await this.$request.post('/api/order/sumbitOrder', param, true);
  262. // if (res.code != 200) {
  263. // uni.showModal({
  264. // title: '错误信息',
  265. // content: res.message,
  266. // showCancel: false
  267. // });
  268. // return;
  269. // }
  270. // uni.showToast({
  271. // icon: 'success',
  272. // title: '提交成功'
  273. // });
  274. // this.modalName = 'Modal'
  275. // setTimeout(function() {
  276. // this.modalName = ''
  277. // uni.navigateBack();
  278. // }, 3500);
  279. } else {
  280. uni.showToast({
  281. title: '图片必须选择',
  282. icon:"none"
  283. });
  284. }
  285. },
  286. ChooseLicenseImage() {
  287. uni.chooseImage({
  288. count: 1, //默认9
  289. sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
  290. sourceType: ['album'], //从相册选择
  291. success: res => {
  292. this.license_image_url = res.tempFilePaths[0];
  293. }
  294. });
  295. },
  296. ChooseImage() {
  297. uni.chooseImage({
  298. count: 100, //默认9
  299. sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
  300. sourceType: ['album'], //从相册选择
  301. success: res => {
  302. if (this.imgList.length != 0) {
  303. this.imgList = this.imgList.concat(res.tempFilePaths);
  304. } else {
  305. this.imgList = res.tempFilePaths;
  306. }
  307. }
  308. });
  309. },
  310. ViewImage(e) {
  311. uni.previewImage({
  312. urls: this.imgList,
  313. current: e.currentTarget.dataset.url
  314. });
  315. },
  316. DelImg(e) {
  317. this.imgList.splice(e.currentTarget.dataset.index, 1);
  318. },
  319. DelImgs: function() {
  320. this.license_image_url = ''
  321. },
  322. hideModal: function() {
  323. uni.switchTab({
  324. url: '/pages/index/index'
  325. })
  326. }
  327. }
  328. }
  329. </script>
  330. <style>
  331. page {
  332. margin: 0;
  333. padding: 0;
  334. background: #f5f5f5;
  335. }
  336. .callback {
  337. position: absolute;
  338. z-index: 11111;
  339. top: 30rpx;
  340. left: 15rpx;
  341. }
  342. .input-container {
  343. width: 100%;
  344. padding: 0 30rpx;
  345. margin: 15px 0;
  346. }
  347. .input-border {
  348. width: 100%;
  349. height: 90rpx;
  350. padding: 0 30rpx 0 40rpx;
  351. box-shadow: 6rpx 6rpx 8rpx rgba(26, 26, 26, 0.2);
  352. display: flex;
  353. align-items: center;
  354. background-color: #fff;
  355. }
  356. .label {
  357. width: 30%;
  358. font-size: 30rpx;
  359. }
  360. .input-item {
  361. width: 100%;
  362. height: 100%;
  363. font-size: 32rpx;
  364. font-family: PingFangSC-Regular, sans-serif;
  365. font-weight: 300;
  366. color: rgba(143, 143, 144, 1);
  367. }
  368. .main {
  369. width: 100%;
  370. height: auto;
  371. position: relative;
  372. overflow: hidden;
  373. /* margin-bottom: 55px; */
  374. }
  375. .main .topbg {
  376. width: 100%;
  377. position: absolute;
  378. top: 0;
  379. left: 0;
  380. height: 36vw;
  381. /* z-index: -1; */
  382. }
  383. .yellowBg {
  384. background: #f5cc57 !important;
  385. }
  386. .greyBg {
  387. background: grey !important;
  388. }
  389. /* .top{
  390. width: 100vw;
  391. height: 42vw;
  392. }
  393. .top image{
  394. width: 100%;
  395. height: 100%;
  396. padding: 10px;
  397. background-repeat: no-repeat;
  398. background: cover;
  399. } */
  400. /* .upload{
  401. width: 100%;
  402. height: auto;
  403. background: #fff;
  404. padding: 15px;
  405. } */
  406. .upload {
  407. width: 90vw;
  408. height: auto;
  409. background: #fff;
  410. margin: 0 5vw;
  411. }
  412. /* .upload .title{
  413. width: 100%;
  414. height: 40px;
  415. line-height: 40px;
  416. } */
  417. .title {
  418. width: 90vw;
  419. /* height: 45px; */
  420. /* line-height: 45px; */
  421. font-size: 32rpx;
  422. font-weight: 400;
  423. margin: 5vw 5vw 2vw 5vw;
  424. }
  425. .title-item {
  426. color: #F5CC57;
  427. margin: 0 5vw;
  428. margin-bottom: 20rpx;
  429. }
  430. .upload .upl {
  431. width: 100px;
  432. height: 100px;
  433. border: 1px solid #8799a3;
  434. color: #8799a3;
  435. border-radius: 5px;
  436. line-height: 100px;
  437. text-align: center;
  438. font-size: 30px;
  439. margin: 10px calc(50% - 57px);
  440. }
  441. /* .upload .sub{
  442. width: 80px;
  443. height: 30px;
  444. line-height: 30px;
  445. text-align: center;
  446. color: #fff;
  447. background: #F1C554;
  448. border-radius: 30px;
  449. margin: 50px calc( 50% - 47px ) 10px calc( 50% - 47px );
  450. } */
  451. .sub {
  452. width: 90vw;
  453. height: 80rpx;
  454. line-height: 80rpx;
  455. margin: 5vw;
  456. text-align: center;
  457. color: #fff;
  458. background: #f1c554;
  459. border-radius: 100rpx;
  460. }
  461. .border-bottom {
  462. border-bottom: 1px solid #D8D8D8;
  463. }
  464. .cu-form-group {
  465. padding-top: 15px;
  466. }
  467. .yellow {
  468. color: #f5cc57;
  469. }
  470. </style>