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.

accountList.js 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * @Author: gaorf30153 gaorf30153@hundsun.com
  3. * @Date: 2024-07-03 13:14:28
  4. * @LastEditors: gaorf30153 gaorf30153@hundsun.com
  5. * @LastEditTime: 2024-07-08 14:21:45
  6. * @FilePath: \wxminipro\plugin\pages\accountList\accountList.js
  7. * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  8. */
  9. // plugin/pages/accountList/accountList.js
  10. import { getAccountList } from "../../utils/commonReq.js"
  11. import { setStore } from "../../utils/index.js"
  12. import { certificatesMap } from "../../utils/systemConstant.js"
  13. Page({
  14. data: {
  15. isLoading: false,
  16. accountList: [],
  17. },
  18. onLoad() {
  19. this.setData({
  20. isLoading: true,
  21. })
  22. getAccountList((hasPersion, list) => {
  23. for (let obj of list) {
  24. obj.idTypeName = certificatesMap.get(obj.idType)
  25. }
  26. this.setData({
  27. isLoading: false,
  28. accountList: list,
  29. })
  30. })
  31. },
  32. // 选择户去办理车辆
  33. uploadCar(e) {
  34. let item = e.currentTarget.dataset.item
  35. // 企业户
  36. if (item.accountType == "2") {
  37. setStore("accountId", item.accountId)
  38. wx.redirectTo({
  39. url: `plugin://issuer-plugin/useProtocol?accountId=${item.accountId}`,
  40. })
  41. }
  42. },
  43. // 企业户开户
  44. openCorp() {
  45. wx.navigateTo({
  46. url: "plugin://issuer-plugin/uploadPersion?type=corpHandle",
  47. })
  48. },
  49. })