帧视界壹通告,付费看视频的微信小程序
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.

317 lines
8.1 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="auth-firm">
  3. <!--顶部导航栏-->
  4. <navbar leftClick @leftClick="$utils.navigateBack" title="认证企业" />
  5. <!--身份信息页面-->
  6. <view class="container">
  7. <view class="form-item">
  8. <view class="label">法人真实姓名</view>
  9. <view class="input">
  10. <input type="text" v-model="certifiedIndividual.name" />
  11. </view>
  12. </view>
  13. <uv-divider :hairline="false" lineColor="#c0c0c0" dot></uv-divider>
  14. <view class="form-item">
  15. <view class="label">法人身份证号</view>
  16. <view class="input">
  17. <input type="text" v-model="certifiedIndividual.card" />
  18. </view>
  19. </view>
  20. <uv-divider :hairline="false" lineColor="#c0c0c0" dot></uv-divider>
  21. <view class="form-item">
  22. <view class="label">营业执照</view>
  23. <view class="avatarFace" @click="uploadImage('tradeImage')">
  24. <image v-if="certifiedIndividual.tradeImage" :src="certifiedIndividual.tradeImage" style="width: 100%;height: 100%"></image>
  25. <image v-else src="../static/auth/3.png" style="width: 50%;height: 50%"></image>
  26. </view>
  27. </view>
  28. <uv-divider :hairline="false" lineColor="#c0c0c0" dot></uv-divider>
  29. <view class="form-item">
  30. <view class="label">其他资质</view>
  31. <view class="qtzz">
  32. <!-- <image v-if="certifiedIndividual.otherImage" :src="certifiedIndividual.otherImage"
  33. style="width: 100%;height: 100%"></image>
  34. <image v-else src="../static/auth/2.png" style="width: 100%;height: 100%"></image> -->
  35. <uv-upload :fileList="fileList" :maxCount="5" multiple width="150rpx" height="150rpx"
  36. @delete="deleteImage" @afterRead="afterRead" :previewFullImage="true"></uv-upload>
  37. </view>
  38. </view>
  39. </view>
  40. <!--请仔细阅读平台用户协议隐私协议-->
  41. <view class="agree">
  42. <!-- <view> -->
  43. <uv-checkbox-group v-model="checkboxValue" placement="column" size="35" activeColor="#008000"
  44. inactiveColor="#999999">
  45. <uv-checkbox shape='circle' :checked="true" name="apple" :label="labelValue ? labelValue : ''"
  46. iconSize="35">
  47. </uv-checkbox>
  48. </uv-checkbox-group>
  49. 请仔细阅读平台<span style="color:#009dff">用户协议</span><span style="color:#009dff">隐私协议</span>
  50. <!-- </view> -->
  51. </view>
  52. <!--下一步按钮-->
  53. <button @click="onNextClick" class="bottomBtn"
  54. v-if="certifiedIndividual.state != 1">
  55. 立即认证
  56. </button>
  57. <confirmationPopup ref="confirmationPopup" title="提示" cancel :cancelText="cancelText[type]" @confirm="submit"
  58. round="0" @cancel="$refs.confirmationPopup.close()" :confirmText="confirmText[type]">
  59. <view class="confirmationPopup" v-if="type == 0">
  60. <uv-parse :content="content"></uv-parse>
  61. </view>
  62. <view class="confirmationPopup" style="padding: 70rpx 20rpx;" v-if="type == 1">
  63. 本次认证需付费确认
  64. </view>
  65. </confirmationPopup>
  66. <!-- 平台审核弹框 -->
  67. <confirmationPopup ref="confirmationPopupUpload" title="提示" confirmText="确认" @confirm="confirm()">
  68. <view class="confirmationPopup">
  69. <image src="/static/image/publish/upload.png" style="width: 150rpx;height: 150rpx;" mode=""></image>
  70. <view class="info">
  71. 已由平台进行审核时间周期为24小时
  72. </view>
  73. </view>
  74. </confirmationPopup>
  75. </view>
  76. </template>
  77. <script>
  78. import '../../common.css'; // 引入公共 CSS 文件
  79. import confirmationPopup from '@/components/toast/confirmationPopup.vue';
  80. import {
  81. mapState,
  82. mapGetters
  83. } from 'vuex'
  84. export default {
  85. components: {
  86. confirmationPopup,
  87. },
  88. data() {
  89. return {
  90. name: 'xiaohua',
  91. idCard: '2101472154874512',
  92. cancelText: ['不同意', '取消'],
  93. confirmText: ['同意', '同意并支付'],
  94. type: 0,
  95. labelValue: '', // 如果labelValue为空,则不会显示任何内容
  96. checkboxValue: [],
  97. fileList: [],
  98. form: {},
  99. authMoney: 0,
  100. content: '',
  101. }
  102. },
  103. computed: {
  104. ...mapState(['certifiedIndividual']),
  105. ...mapState(['configList']),
  106. ...mapGetters(['isVedio'])
  107. },
  108. mounted() {
  109. this.openConfigMenu("getPrivacyPolicy")
  110. },
  111. onShow() {
  112. let self = this
  113. console.log(this.certifiedIndividual);
  114. this.certifiedIndividual.otherImage && this.certifiedIndividual.otherImage.split(',')
  115. .forEach(url => {
  116. self.fileList.push({
  117. url
  118. })
  119. })
  120. },
  121. methods: {
  122. //打开配置信息菜单
  123. openConfigMenu(key) {
  124. this.content = this.configList[key]
  125. // this.$refs.popup.open('bottom');
  126. },
  127. deleteImage(e) {
  128. this.fileList.splice(e.index, 1)
  129. },
  130. afterRead(e) {
  131. let self = this
  132. e.file.forEach(file => {
  133. self.$Oss.ossUpload(file.url).then(url => {
  134. self.fileList.push({
  135. url
  136. })
  137. })
  138. })
  139. },
  140. uploadImage(key) {
  141. this.$Oss.ossUploadImage({
  142. success: url => {
  143. this.$nextTick(() => {
  144. // this.form.tradeImage = url
  145. this.$set(this.certifiedIndividual, key, url);
  146. // this.$set(this.form, key, url);
  147. })
  148. }
  149. })
  150. },
  151. onNextClick() {
  152. this.form.imageStraight = this.certifiedIndividual.imageStraight
  153. this.form.imageReverseSide = this.certifiedIndividual.imageReverseSide
  154. // this.form.tradeImage = this.certifiedIndividual.tradeImage
  155. if (this.$utils.verificationAll(this.certifiedIndividual, {
  156. imageReverseSide: '请上传身份证背面',
  157. imageStraight: '请上传身份证正面',
  158. card: '请输入身份证号',
  159. tradeImage: '请上传营业执照',
  160. })) {
  161. return
  162. }
  163. this.$refs.confirmationPopup.open()
  164. },
  165. submit() {
  166. this.$refs.confirmationPopup.close()
  167. if (this.type == 0) {
  168. setTimeout(() => {
  169. this.type = 1
  170. this.$refs.confirmationPopup.open()
  171. }, 500)
  172. } else {
  173. this.certifiedIndividual.otherImage = this.fileList.map((item) => item.url).join(",")
  174. // this.form.imageStraight = this.certifiedIndividual.imageStraight
  175. // this.form.imageReverseSide = this.certifiedIndividual.imageReverseSide
  176. // this.form.tradeImage = this.certifiedIndividual.tradeImage
  177. this.$api('infoSubmitCompanyCertification', this.certifiedIndividual,
  178. res => {
  179. if (res.code == 200) {
  180. if(this.certifiedIndividual.state == 2){
  181. return self.$refs.confirmationPopupUpload.open()
  182. }
  183. const self = this
  184. uni.requestPayment({
  185. provider: 'wxpay', // 服务提提供商
  186. timeStamp: res.result.timeStamp, // 时间戳
  187. nonceStr: res.result.nonceStr, // 随机字符串
  188. package: res.result.packageValue,
  189. signType: res.result.signType, // 签名算法
  190. paySign: res.result.paySign, // 签名
  191. success: function(res) {
  192. // console.log('支付成功', res);
  193. // uni.showToast({
  194. // title: '认证成功',
  195. // icon: 'none'
  196. // })
  197. self.$refs.confirmationPopupUpload.open()
  198. },
  199. fail: function(err) {
  200. console.log('支付失败', err);
  201. self.$refs.confirmationPopup.close()
  202. uni.showToast({
  203. icon: 'none',
  204. title: "支付失败"
  205. })
  206. }
  207. });
  208. }
  209. })
  210. }
  211. },
  212. confirm() {
  213. uni.redirectTo({
  214. url: '/pages/index/center'
  215. })
  216. },
  217. }
  218. }
  219. </script>
  220. <style scoped lang="scss">
  221. * {
  222. box-sizing: border-box;
  223. margin: 0;
  224. padding: 0;
  225. }
  226. .auth-firm {
  227. .container {
  228. padding: 100rpx 50rpx 50rpx 50rpx;
  229. //border: 1px solid red;
  230. .header {
  231. margin-bottom: 40rpx;
  232. font-size: 28rpx;
  233. color: #666;
  234. }
  235. .form-item {
  236. margin-bottom: 40rpx;
  237. .label {
  238. font-size: 36rpx;
  239. margin-bottom: 10px;
  240. display: block;
  241. }
  242. .input {
  243. font-size: 30rpx;
  244. margin-top: 40rpx;
  245. background-color: #f7f7f7;
  246. padding: 20rpx;
  247. border: 1px solid #66666633;
  248. }
  249. .avatarFace {
  250. width: 150rpx;
  251. height: 150rpx;
  252. }
  253. .qtzz {
  254. // width: 150rp;
  255. height: 150rpx;
  256. }
  257. }
  258. }
  259. .agree {
  260. display: flex;
  261. justify-content: center;
  262. position: fixed;
  263. bottom: 12%;
  264. left: 5%;
  265. }
  266. .confirmationPopup {
  267. max-height: 60vh;
  268. overflow-y: auto;
  269. overflow-x: hidden;
  270. width: 600rpx;
  271. padding: 20rpx;
  272. text-align: center;
  273. }
  274. }
  275. </style>