|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <template>
- <view v-for="(item,index) in state.customerInfoList" @click="change(item.customerId,item.userType)">
- <view class="content">{{item.agentName}}</view>
- </view>
- </template>
- <script setup lang="ts">
- import {
- reactive
- } from "vue";
- import {
- msg,
- navTo
- } from "@/utils/utils";
- import {
- editablePage
- } from "@/utils/network/api.js";
- import {
- getItem
- } from "@/utils/storage.ts"
- import {
- requestNew
- } from "@/utils/network/request.js";
- const fieldStyle = {
- height: '60rpx',
- color: '#333333',
- fontSize: '28rpx'
- };
- import { onLoad } from "@dcloudio/uni-app"
- const state = reactive({
- ocrData: {
- name: '',
- gender: '',
- userCardId: '',
- add: "",
- tel: ''
-
- },
- customerId: '',
- customerInfoList:[],
- type:1 //1修改EC预留手机号 2用户信息变更
- })
-
- const getUserinfo = () => {
- const options = {
- type: 2,
- data: {
- openId: getItem('openId'),
- mobile: getItem("mobile"),
- },
- method: "POST",
- showLoading: true,
- };
- requestNew(editablePage, options).then((res) => {
- state.customerInfoList = res.customerInfoList;
- });
- }
-
- const change = (customerId,userType) => {
- if(state.type==2){
- navTo(`/subpackage/personal-center/setting/personal-information/user-change?customerId=${customerId}`)
- }else{
- if(userType==1){
- navTo(`/subpackage/personal-center/setting/personal-information/choice-verification-way?userType=${userType}&customerId=${customerId}`)
- }else{
- navTo(`/subpackage/personal-center/setting/personal-information/choice-phone?userType=${userType}&customerId=${customerId}`)
- }
- console.log("state.修改EC预留手机号",)
- }
- }
-
-
- onLoad((options) => {
- getUserinfo()
- state.type=options.type
- })
- </script>
-
- <style>
- page {
- background-color: #EEF7F7;
- padding-top: 30rpx;
- }
- </style>
-
- <style lang="scss" scoped>
- .content {
- background-color: white;
- padding: 20rpx;
- margin: 20rpx;
- border-radius: 10rpx;
- font-size: 28rpx;
- }
- </style>
|