您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

user-change-list.vue 2.0KB

10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
10 个月前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <template>
  2. <view v-for="(item,index) in state.customerInfoList" @click="change(item.customerId,item.userType)">
  3. <view class="content">{{item.agentName?item.agentName:item.customerName}}</view>
  4. </view>
  5. </template>
  6. <script setup lang="ts">
  7. import {
  8. reactive
  9. } from "vue";
  10. import {
  11. msg,
  12. navTo
  13. } from "@/utils/utils";
  14. import {
  15. editablePage
  16. } from "@/utils/network/api.js";
  17. import {
  18. getItem
  19. } from "@/utils/storage.ts"
  20. import {
  21. requestNew
  22. } from "@/utils/network/request.js";
  23. const fieldStyle = {
  24. height: '60rpx',
  25. color: '#333333',
  26. fontSize: '28rpx'
  27. };
  28. import { onLoad } from "@dcloudio/uni-app"
  29. const state = reactive({
  30. ocrData: {
  31. name: '',
  32. gender: '',
  33. userCardId: '',
  34. add: "",
  35. tel: ''
  36. },
  37. customerId: '',
  38. customerInfoList:[],
  39. type:1 //1修改EC预留手机号 2用户信息变更
  40. })
  41. const getUserinfo = () => {
  42. const options = {
  43. type: 2,
  44. data: {
  45. openId: getItem('openId'),
  46. mobile: getItem("mobile"),
  47. },
  48. method: "POST",
  49. showLoading: true,
  50. };
  51. requestNew(editablePage, options).then((res) => {
  52. state.customerInfoList = res.customerInfoList;
  53. });
  54. }
  55. const change = (customerId,userType) => {
  56. if(state.type==2){
  57. navTo(`/subpackage/personal-center/setting/personal-information/user-change?customerId=${customerId}`)
  58. }else{
  59. if(userType==1){
  60. navTo(`/subpackage/personal-center/setting/personal-information/choice-verification-way?userType=${userType}&customerId=${customerId}`)
  61. }else{
  62. navTo(`/subpackage/personal-center/setting/personal-information/choice-phone?userType=${userType}&customerId=${customerId}`)
  63. }
  64. console.log("state.修改EC预留手机号",)
  65. }
  66. }
  67. onLoad((options) => {
  68. getUserinfo()
  69. state.type=options.type
  70. })
  71. </script>
  72. <style>
  73. page {
  74. background-color: #EEF7F7;
  75. padding-top: 30rpx;
  76. }
  77. </style>
  78. <style lang="scss" scoped>
  79. .content {
  80. background-color: white;
  81. padding: 20rpx;
  82. margin: 20rpx;
  83. border-radius: 10rpx;
  84. font-size: 28rpx;
  85. }
  86. </style>