John-Hong 2 سال پیش
والد
کامیت
e68a1e1dd0

+ 2 - 2
src/App.vue

@@ -64,10 +64,10 @@ export default {
       this.$store.commit('SET_MALL_ID', query.mallid);
       console.log(65, kipAccessToken);
       // TODO true 需要取消
-      if (platform === 'micromessenger' && !kipAccessToken || true) {
+      if (platform === 'micromessenger' && !kipAccessToken) {
         // 如果用户没有登录的话,我们需要让用户完成授权拿到 openid
         const openid = uni.getStorageSync('openid');
-        if (!openid && false) {
+        if (!openid) {
           // 当进入其他页面时,需要先打开路由展示
           this.isInit = true;
           // 前往授权页面

+ 686 - 619
src/components/info/perfectInfo.vue

@@ -1,649 +1,716 @@
 <template>
-	<div class="page" v-if="isShow" id="perfect-info" :style="{paddingTop:CustomBar +'px'}">
-		<div class="head">
-			<div class="box"></div>
-			<div>您的生日是会员权益非常重要的参考信息,且填写后不支持修改,请您填写准确真实的生日信息。</div>
-		</div>
-		<div class="form-wrap">
-			<div class="form__item" style="border-top: none;">
-				<div class="form__label">姓名</div>
-				<div class="form__input">
-					<input type="text" v-model="memberInfo.vipname" placeholder-class="placeholder_input"
-						:disabled="vipnameIsDisabled" placeholder="请输入姓名" />
-				</div>
-			</div>
-			<div class="form__item">
-				<div class="form__label">性别</div>
-				<div class="form__input">
-					<!-- <radio-group @change="bindGenderChange" style="display: flex;">
+  <div
+    class="page"
+    v-if="isShow"
+    id="perfect-info"
+    :style="{ paddingTop: CustomBar + 'px' }"
+  >
+    <div class="head">
+      <div class="box"></div>
+      <div>
+        您的生日是会员权益非常重要的参考信息,且填写后不支持修改,请您填写准确真实的生日信息。
+      </div>
+    </div>
+    <div class="form-wrap">
+      <div class="form__item" style="border-top: none">
+        <div class="form__label">姓名</div>
+        <div class="form__input">
+          <input
+            type="text"
+            v-model="memberInfo.vipname"
+            placeholder-class="placeholder_input"
+            :disabled="vipnameIsDisabled"
+            placeholder="请输入姓名"
+          />
+        </div>
+      </div>
+      <div class="form__item">
+        <div class="form__label">性别</div>
+        <div class="form__input">
+          <!-- <radio-group @change="bindGenderChange" style="display: flex;">
 						<label v-for="(item, index) in genderArray" :key="item.value" style="display: flex; margin-right: 100px;">
 							<radio :value="item.value" :checked="item.value == genderValue" /><uni-view>{{item.label}}</uni-view>
 						</label>
 					</radio-group> -->
-					<uni-data-checkbox
-					v-model="genderValue"
-					:localdata="genderArray"
-					:map="{text: 'label', value: 'value'}"
-					selectedTextColor="#333333"
-					selectedColor="#333333"
-					>
-					</uni-data-checkbox>
-				</div>
-			</div>
-			<div class="form__item">
-				<div class="form__label">出生年月</div>
-				<div class="form__input">
-					<picker mode="date" :value="memberInfo.birthday" :start="startDate" :end="endDate"
-						:disabled="birthdayIsDisabled" @change="bindDateChange">
-						<div class="uni-input" :class="{'placeholder_input':!memberInfo.birthday}">
-							{{memberInfo.birthday || '请选择出生年月'}}
-						</div>
-					</picker>
-				</div>
-			</div>
-			<div class="form__item">
-				<div class="form__label">所在地址</div>
-				<div class="form__input">
-					<!-- <input type="text" v-model="memberInfo.address" placeholder-class="placeholder_input"
+          <uni-data-checkbox
+            v-model="genderValue"
+            :localdata="genderArray"
+            :map="{ text: 'label', value: 'value' }"
+            selectedTextColor="#333333"
+            selectedColor="#333333"
+          >
+          </uni-data-checkbox>
+        </div>
+      </div>
+      <div class="form__item">
+        <div class="form__label">出生年月</div>
+        <div class="form__input">
+          <picker
+            mode="date"
+            :value="memberInfo.birthday"
+            :start="startDate"
+            :end="endDate"
+            :disabled="birthdayIsDisabled"
+            @change="bindDateChange"
+          >
+            <div
+              class="uni-input"
+              :class="{ placeholder_input: !memberInfo.birthday }"
+            >
+              {{ memberInfo.birthday || '请选择出生年月' }}
+            </div>
+          </picker>
+        </div>
+      </div>
+      <div class="form__item">
+        <div class="form__label">所在地址</div>
+        <div class="form__input">
+          <!-- <input type="text" v-model="memberInfo.address" placeholder-class="placeholder_input"
 						placeholder="请输入您的地址" /> -->
-					<input type="text" v-model="allAddress" placeholder="请选择所在地址" class="form__item-ext" placeholder-style="color: #999999"
-						@click="selectCity" disabled />
-				</div>
-			</div>
-			<div v-if="isBeijing" class="form__item">
-				<div class="form__label">公司名称</div>
-				<div class="form__input">
-					<input type="text" v-model="memberInfo.companyName" placeholder-class="placeholder_input"
-						placeholder="公司名称" />
-				</div>
-			</div>
-			<div v-if="showCertificatenum" class="form__item">
-				<div class="form__label">身份证号码</div>
-				<div class="form__input">
-					<input type="text" v-model="memberInfo.certificatenum" placeholder-class="placeholder_input"
-						placeholder="请输入身份证号码" />
-				</div>
-			</div>
+          <input
+            type="text"
+            v-model="allAddress"
+            placeholder="请选择所在地址"
+            class="form__item-ext"
+            placeholder-style="color: #999999"
+            @click="selectCity"
+            disabled
+          />
+        </div>
+      </div>
+      <div v-if="isBeijing" class="form__item">
+        <div class="form__label">公司名称</div>
+        <div class="form__input">
+          <input
+            type="text"
+            v-model="memberInfo.companyName"
+            placeholder-class="placeholder_input"
+            placeholder="公司名称"
+          />
+        </div>
+      </div>
+      <div v-if="showCertificatenum" class="form__item">
+        <div class="form__label">身份证号码</div>
+        <div class="form__input">
+          <input
+            type="text"
+            v-model="memberInfo.certificatenum"
+            placeholder-class="placeholder_input"
+            placeholder="请输入身份证号码"
+          />
+        </div>
+      </div>
 
-			<div v-if="!isTianJin" class="form__item">
-				<div class="form__label">邮箱</div>
-				<div class="form__input">
-					<input type="email" v-model="memberInfo.mailBox" placeholder-class="placeholder_input"
-						placeholder="请输入电子邮箱" />
-				</div>
-			</div>
-			<div v-if="isTianJin" class="form__item">
-				<div class="form__label">详细地址</div>
-				<div class="form__input">
-					<input
-						type="text"
-						v-model="memberInfo.address"
-						placeholder-class="placeholder_input"
-						placeholder="请输入您的地址" />
-				</div>
-			</div>
-			<div v-if="isTianJin" class="form__item">
-				<div class="form__label">有无子女</div>
-				<div class="form__input">
-					<uni-data-checkbox
-						v-model="babyStatus"
-						:localdata="babyStatusArray"
-						:map="{ text: 'label', value: 'value' }"
-						selectedTextColor="#333333"
-						selectedColor="#333333"
-					>
-					</uni-data-checkbox>
-				</div>
-			</div>
-		</div>
-		<div class="btn-wrap">
-			<div class="btn btn--black" style="margin-bottom: 27px;" @click="beComePromoter">保存并提交</div>
-			<div class="btn btn--white" @click="gotoIndex">跳过</div>
-		</div>
-		<simple-address
-			ref="simpleAddress"
-			title="请选择您常驻地区"
-			titleColor="#4d4d4d"
-			:pickerValueDefault="cityPickerValueDefault"
-			@onConfirm="handleAddressConfirm"
-			@onChange="handleAddressChange"
-			themeColor='#007AFF'
-			btnFontSize="32px"
-			cancelColor="#999999"
-			confirmColor="#4d4d4d">
-		</simple-address>
-	</div>
+      <div v-if="!isTianJin" class="form__item">
+        <div class="form__label">邮箱</div>
+        <div class="form__input">
+          <input
+            type="email"
+            v-model="memberInfo.mailBox"
+            placeholder-class="placeholder_input"
+            placeholder="请输入电子邮箱"
+          />
+        </div>
+      </div>
+      <div v-if="isTianJin" class="form__item">
+        <div class="form__label">详细地址</div>
+        <div class="form__input">
+          <input
+            type="text"
+            v-model="memberInfo.address"
+            placeholder-class="placeholder_input"
+            placeholder="请输入您的地址"
+          />
+        </div>
+      </div>
+      <div v-if="isTianJin" class="form__item">
+        <div class="form__label">有无子女</div>
+        <div class="form__input">
+          <uni-data-checkbox
+            v-model="babyStatus"
+            :localdata="babyStatusArray"
+            :map="{ text: 'label', value: 'value' }"
+            selectedTextColor="#333333"
+            selectedColor="#333333"
+          >
+          </uni-data-checkbox>
+        </div>
+      </div>
+    </div>
+    <div class="btn-wrap">
+      <div
+        class="btn btn--black"
+        style="margin-bottom: 27px"
+        @click="beComePromoter"
+      >
+        保存并提交
+      </div>
+      <div class="btn btn--white" @click="gotoIndex">跳过</div>
+    </div>
+    <simple-address
+      ref="simpleAddress"
+      title="请选择您常驻地区"
+      titleColor="#4d4d4d"
+      :pickerValueDefault="cityPickerValueDefault"
+      @onConfirm="handleAddressConfirm"
+      @onChange="handleAddressChange"
+      themeColor="#007AFF"
+      btnFontSize="32px"
+      cancelColor="#999999"
+      confirmColor="#4d4d4d"
+    >
+    </simple-address>
+  </div>
 </template>
 
 <script>
-	import {
-		kipGetUserDetail,
-		kipCompleteUser,
-	} from '@/utils/api-kip.js'
-	import {
-		crmUpdateMemberCompleted,
-	} from '@/utils/api-crm-member.js'
-	import MemberCacheTool from '@/utils/member-cache-tool.js'
-	import KipCacheTool from '@/utils/kip-cache-tool.js'
-	// const app = getApp()
- const app = {}
-	import authorize from '@/components/authorize/authorize.vue'
-	import {
-		checkIdNumber,
-		checkEmail,
-		isTianJinMallid,
-		isBeiJingMallid,
-	} from '@/utils/utils.js'
-	import simpleAddress from '@/components/simple-address/simple-address.vue';
-	import { isCruMarketByKey } from '@/utils/location-util.js'
-	import uniDataCheckbox from './components/uni-data-checkbox/uni-data-checkbox.vue'
-	export default {
-		props: {
-			// 是否显示
-			isShow: {
-				type: Boolean,
-				default: false
-			}
-		},
-		components: {
-			authorize,
-			simpleAddress,
-			uniDataCheckbox
-		},
-		data() {
-			const currentDate = this.getDate({
-				format: true
-			})
-			return {
-				memberInfo: {
-					birthday: '',
-					vipname: '',
-					certificatenum: '',
-					mailBox: '',
-				},
-				vipnameIsDisabled: false,
-				birthdayIsDisabled: false,
-				date: currentDate,
-				pickerText: '',
-				shareVipcode: '',
-				shareShopNo: '',
-				vipcode: '',
-				isSkip: '', //先跳过的值
-				mobile: '',
-				genderArray: [
-					{label:'男士', value: '1'},
-					{label:'女士', value: '2'},
-				],
-				genderValue: '0',
-				allAddress: '',
-				cityPickerValueDefault: [0, 0, 0],
-				isBeijing: false,
-				logincallback: null,
-				isShowHeader: false, // 是否显示导航
-				CustomBar: '',
-				rotesName: '',
-				isTianJin: false,
-				babyStatusArray: [
-					{ label: '有', value: 1 },
-					{ label: '无', value: 2 },
-				],
-				babyStatus: 0,
-			}
-		},
-		computed: {
-			startDate() {
-				return this.getDate('start');
-			},
-			endDate() {
-				return this.getDate('end');
-			},
-			showCertificatenum () {
-				// KO小程序:北京不显示身份证号
-				// 嘉里中心小程序:天津不显示身份证号
-				return !this.isBeijing && !this.isTianJin;
-			},
-		},
-		onLoad: function(option) {
-			console.log(`===> 完善信息页面: onLoad`)
-			if (option) {
-				this.logincallback = option
-			}
-		},
-		created() {
-			// 判读是否是天津,天津的完善信息不同与其他商场
-			const mallid = uni.getStorageSync('mallid');
-			this.isTianJin = isTianJinMallid(mallid)
-			this.isBeijing = isBeiJingMallid(mallid)
-			const member = uni.getStorageSync("member")
-			let routes = getCurrentPages();
-			this.rotesName = routes[routes.length - 1].route
-			console.log(this.rotesName)
-			uni.getSystemInfo({
-				success: e => {
-					// #ifdef MP-WEIXIN
-					let custom = wx.getMenuButtonBoundingClientRect();
-					if (this.rotesName == 'pages/automatic/automaticIndex') {
-						this.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
-					} else {
-						this.CustomBar = 0
-					}
-					// #endif
-				},
-			})
+import { kipGetUserDetail, kipCompleteUser } from '@/utils/api-kip.js';
+import { crmUpdateMemberCompleted } from '@/utils/api-crm-member.js';
+import MemberCacheTool from '@/utils/member-cache-tool.js';
+import KipCacheTool from '@/utils/kip-cache-tool.js';
+// const app = getApp()
+const app = {};
+// import authorize from '@/components/authorize/authorize.vue'
+import {
+  checkIdNumber,
+  checkEmail,
+  isTianJinMallid,
+  isBeiJingMallid,
+} from '@/utils/utils.js';
+import simpleAddress from '@/components/simple-address/simple-address.vue';
+import { isCruMarketByKey } from '@/utils/location-util.js';
+import uniDataCheckbox from './components/uni-data-checkbox/uni-data-checkbox.vue';
+export default {
+  props: {
+    // 是否显示
+    isShow: {
+      type: Boolean,
+      default: false,
+    },
+  },
+  components: {
+    // authorize,
+    simpleAddress,
+    uniDataCheckbox,
+  },
+  data() {
+    const currentDate = this.getDate({
+      format: true,
+    });
+    return {
+      memberInfo: {
+        birthday: '',
+        vipname: '',
+        certificatenum: '',
+        mailBox: '',
+      },
+      vipnameIsDisabled: false,
+      birthdayIsDisabled: false,
+      date: currentDate,
+      pickerText: '',
+      shareVipcode: '',
+      shareShopNo: '',
+      vipcode: '',
+      isSkip: '', //先跳过的值
+      mobile: '',
+      genderArray: [
+        { label: '男士', value: '1' },
+        { label: '女士', value: '2' },
+      ],
+      genderValue: '0',
+      allAddress: '',
+      cityPickerValueDefault: [0, 0, 0],
+      isBeijing: false,
+      logincallback: null,
+      isShowHeader: false, // 是否显示导航
+      CustomBar: '',
+      rotesName: '',
+      isTianJin: false,
+      babyStatusArray: [
+        { label: '有', value: 1 },
+        { label: '无', value: 2 },
+      ],
+      babyStatus: 0,
+    };
+  },
+  computed: {
+    startDate() {
+      return this.getDate('start');
+    },
+    endDate() {
+      return this.getDate('end');
+    },
+    showCertificatenum() {
+      // KO小程序:北京不显示身份证号
+      // 嘉里中心小程序:天津不显示身份证号
+      return !this.isBeijing && !this.isTianJin;
+    },
+  },
+  onLoad: function (option) {
+    console.log(`===> 完善信息页面: onLoad`);
+    if (option) {
+      this.logincallback = option;
+    }
+  },
+  created() {
+    // 判读是否是天津,天津的完善信息不同与其他商场
+    const mallid = uni.getStorageSync('mallid');
+    this.isTianJin = isTianJinMallid(mallid);
+    this.isBeijing = isBeiJingMallid(mallid);
+    const member = uni.getStorageSync('member');
+    let routes = getCurrentPages();
+    this.rotesName = routes[routes.length - 1].route;
+    console.log(this.rotesName);
+    uni.getSystemInfo({
+      success: (e) => {
+        // #ifdef MP-WEIXIN
+        let custom = wx.getMenuButtonBoundingClientRect();
+        if (this.rotesName == 'pages/automatic/automaticIndex') {
+          this.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
+        } else {
+          this.CustomBar = 0;
+        }
+        // #endif
+      },
+    });
+  },
+  async mounted() {
+    console.log(`===> 完善信息页面: onShow`);
+    await this.$onLaunched;
+    this.isBeijing = isCruMarketByKey('北京');
+    const member = uni.getStorageSync('member');
+    this.getUserDetail();
+  },
+  methods: {
+    /**
+     * 获取页面到顶部的距离
+     */
+    getHeight() {
+      let query = uni.createSelectorQuery().in(this);
+      console.log(query, '获取值 gfhffffffffffffffffffffffffffff');
+      query
+        .select('#perfect-info')
+        .boundingClientRect((data) => {
+          console.log('元素距离顶部的距离' + data);
+          if (data.top == 0) {
+            this.isShowHeader = true;
+          } else {
+            this.isShowHeader = false;
+          }
+          // 这个
+        })
+        .exec();
+    },
+    //跳过
+    gotoIndex: function () {
+      this.$emit('closeInfo');
+      // uni.reLaunch({
+      // 	url: '/pages/automatic/automaticIndex'
+      // })
+    },
+    selectCity: function () {
+      this.$refs.simpleAddress.open();
+    },
+    handleAddressChange(e) {
+      this.memberInfo.provinceAddress = e.labelArr[0];
+      this.memberInfo.cityAddress = e.labelArr[1];
+      this.memberInfo.districtAddress = e.labelArr[2];
+      this.allAddress = e.label;
+    },
+    handleAddressConfirm: function (e) {
+      if (!this.allAddress) {
+        this.memberInfo.provinceAddress = e.labelArr[0];
+        this.memberInfo.cityAddress = e.labelArr[1];
+        this.memberInfo.districtAddress = e.labelArr[2];
+        this.allAddress = e.label;
+      }
+    },
+    bindGenderChange: function (e) {
+      console.log(e);
+      this.genderValue = e.target.value;
+      this.memberInfo.sex = this.genderValue;
+    },
+    bindMarriageChange: function (e) {
+      this.marriageIndex = e.target.value;
+      this.memberInfo.marriagestatus = e.target.value;
+    },
+    bindDateChange: function (e) {
+      this.memberInfo.birthday = e.target.value;
+    },
+    //保存
+    beComePromoter: function () {
+      console.log(this.memberInfo);
+      if (this.checkMemberInfo()) {
+        this.saveUserDetail();
+      }
+    },
+    //设置开始和结束时间
+    getDate: function (type) {
+      const date = new Date();
+      let year = date.getFullYear();
+      let month = date.getMonth() + 1;
+      let day = date.getDate();
 
-		},
-		async mounted() {
-			console.log(`===> 完善信息页面: onShow`)
-			await this.$onLaunched;
-			this.isBeijing = isCruMarketByKey('北京');
-			const member = uni.getStorageSync("member")
-			this.getUserDetail()
-		},
-		methods: {
-			/**
-			 * 获取页面到顶部的距离
-			 */
-			getHeight() {
-				let query = uni.createSelectorQuery().in(this);
-				console.log(query, '获取值 gfhffffffffffffffffffffffffffff')
-				query.select('#perfect-info').boundingClientRect(data => {
-					console.log('元素距离顶部的距离' + data)
-					if (data.top == 0) {
-						this.isShowHeader = true
-					} else {
-						this.isShowHeader = false
-					}
-					// 这个
-				}).exec();
-			},
-			//跳过
-			gotoIndex: function() {
-				this.$emit('closeInfo')
-					// uni.reLaunch({
-					// 	url: '/pages/automatic/automaticIndex'
-					// })
-			},
-			selectCity: function() {
-				this.$refs.simpleAddress.open();
-			},
-			handleAddressChange (e) {
-				this.memberInfo.provinceAddress = e.labelArr[0]
-				this.memberInfo.cityAddress = e.labelArr[1]
-				this.memberInfo.districtAddress = e.labelArr[2]
-				this.allAddress = e.label
-			},
-			handleAddressConfirm: function(e) {
-				if(!this.allAddress) {
-					this.memberInfo.provinceAddress = e.labelArr[0]
-					this.memberInfo.cityAddress = e.labelArr[1]
-					this.memberInfo.districtAddress = e.labelArr[2]
-					this.allAddress = e.label
-				}
-			},
-			bindGenderChange: function(e) {
-				console.log(e);
-				this.genderValue = e.target.value
-				this.memberInfo.sex = this.genderValue;
-			},
-			bindMarriageChange: function(e) {
-				this.marriageIndex = e.target.value
-				this.memberInfo.marriagestatus = e.target.value
-			},
-			bindDateChange: function(e) {
-				this.memberInfo.birthday = e.target.value
-			},
-			//保存
-			beComePromoter: function() {
-				console.log(this.memberInfo)
-				if (this.checkMemberInfo()) {
-					this.saveUserDetail();
-				}
-			},
-			//设置开始和结束时间
-			getDate: function(type) {
-				const date = new Date();
-				let year = date.getFullYear();
-				let month = date.getMonth() + 1;
-				let day = date.getDate();
+      if (type === 'start') {
+        year = year - 120;
+      } else if (type === 'end') {
+        year = year + 2;
+      }
+      month = month > 9 ? month : '0' + month;
+      day = day > 9 ? day : '0' + day;
+      return `${year}-${month}-${day}`;
+    },
+    getUserDetail: function () {
+      const _this = this;
+      kipGetUserDetail()
+        .then((resp) => {
+          const result = resp.data;
+          if (result && result.code === '000000') {
+            const userInfo = result.data;
+            _this.handleKipUserToMemberInfo(userInfo);
+          } else {
+            uni.showToast({
+              title: result.message,
+              duration: 2000,
+              icon: 'none',
+            });
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    saveUserDetail: function () {
+      const userInfo = this.handleMemberInfoToKipUser(this.memberInfo);
+      if (userInfo) {
+        uni.showLoading({
+          title: '保存中',
+          mask: true,
+        });
+        const _this = this;
+        kipCompleteUser(userInfo)
+          .then((resp) => {
+            uni.hideLoading();
+            const result = resp.data;
+            if (result && result.code === '000000' && result.data) {
+              uni.showToast({
+                title: '保存成功!',
+                duration: 2000,
+                icon: 'none',
+              });
+              _this.checkIsCompleted(userInfo);
+            } else {
+              uni.showModal({
+                content: result.message,
+                showCancel: false,
+              });
+            }
+          })
+          .catch((err) => {
+            uni.hideLoading();
+            console.error(err);
+          });
+      }
+    },
+    handleKipUserToMemberInfo(userInfo) {
+      if (userInfo && userInfo.extend) {
+        const userDetail = userInfo.extend;
+        this.memberInfo.kipUserId = userInfo.id;
+        // 名称
+        this.memberInfo.vipname = userInfo.realName;
+        if (this.memberInfo.vipname) {
+          this.vipnameIsDisabled = true;
+        }
+        // 性别
+        this.genderValue = userInfo.gender + '';
+        this.memberInfo.sex = userInfo.gender;
 
-				if (type === 'start') {
-					year = year - 120;
-				} else if (type === 'end') {
-					year = year + 2;
-				}
-				month = month > 9 ? month : '0' + month;;
-				day = day > 9 ? day : '0' + day;
-				return `${year}-${month}-${day}`;
-			},
-			getUserDetail: function() {
-				const _this = this;
-				kipGetUserDetail().then(resp => {
-					const result = resp.data;
-					if (result && result.code === '000000') {
-						const userInfo = result.data;
-						_this.handleKipUserToMemberInfo(userInfo)
-					}else{
-						uni.showToast({
-							title: result.message,
-							duration: 2000,
-							icon: 'none'
-						})
-					}
-				}).catch(err => {
-					console.error(err);
-				})
-			},
-			saveUserDetail: function() {
-				const userInfo = this.handleMemberInfoToKipUser(this.memberInfo);
-				if (userInfo) {
-					uni.showLoading({
-						title: '保存中',
-						mask: true,
-					});
-					const _this = this;
-					kipCompleteUser(userInfo).then(resp => {
-						uni.hideLoading();
-						const result = resp.data;
-						if (result && result.code === '000000' && result.data) {
-							uni.showToast({
-								title: '保存成功!',
-								duration: 2000,
-								icon: 'none'
-							})
-							_this.checkIsCompleted(userInfo)
-						} else {
-							uni.showModal({
-								content: result.message,
-								showCancel: false,
-							})
-						}
-					}).catch(err => {
-						uni.hideLoading();
-						console.error(err);
-					})
-				}
-			},
-			handleKipUserToMemberInfo(userInfo) {
-				if (userInfo && userInfo.extend) {
-					const userDetail = userInfo.extend;
-					this.memberInfo.kipUserId = userInfo.id
-					// 名称
-					this.memberInfo.vipname = userInfo.realName
-					if (this.memberInfo.vipname) {
-						this.vipnameIsDisabled = true;
-					}
-					// 性别
-					this.genderValue = userInfo.gender + ''
-					this.memberInfo.sex = userInfo.gender
+        // 生日
+        this.memberInfo.birthday = userInfo.birthDate;
+        if (this.memberInfo.birthday) {
+          this.birthdayIsDisabled = true;
+        }
+        // 邮箱
+        this.memberInfo.mailBox = userInfo.email;
+        if (this.isBeijing) {
+          this.memberInfo.companyName = userDetail.companyName;
+        } else {
+          // 身份证号
+          this.memberInfo.certificatenum = userDetail.certificateNum;
+        }
 
-					// 生日
-					this.memberInfo.birthday = userInfo.birthDate
-					if (this.memberInfo.birthday) {
-						this.birthdayIsDisabled = true;
-					}
-					// 邮箱
-					this.memberInfo.mailBox = userInfo.email
-					if (this.isBeijing) {
-						this.memberInfo.companyName = userDetail.companyName
-					} else {
-						// 身份证号
-						this.memberInfo.certificatenum = userDetail.certificateNum
-					}
+        // 详细地址
+        this.memberInfo.address = userDetail.address;
+        // 所在地
+        const { provinceAddress, cityAddress, districtAddress } = userDetail;
+        if (provinceAddress && cityAddress && districtAddress) {
+          this.memberInfo.provinceAddress = provinceAddress;
+          this.memberInfo.cityAddress = cityAddress;
+          this.memberInfo.districtAddress = districtAddress;
+          this.allAddress =
+            provinceAddress + '-' + cityAddress + '-' + districtAddress;
+        }
+        this.babyStatus = userDetail.babyStatus;
+      }
+    },
+    handleMemberInfoToKipUser(memberInfo) {
+      if (!memberInfo) {
+        return;
+      }
+      const obj = {
+        birthDate: this.memberInfo.birthday,
+        email: this.memberInfo.mailBox,
+        gender: this.genderValue,
+        realName: this.memberInfo.vipname,
+        provinceAddress: this.memberInfo.provinceAddress,
+        cityAddress: this.memberInfo.cityAddress,
+        districtAddress: this.memberInfo.districtAddress,
+      };
+      if (this.isBeijing) {
+        obj.companyName = this.memberInfo.companyName;
+      } else if (this.isTianJin) {
+        obj.babyStatus = this.babyStatus;
+        obj.address = this.memberInfo.address;
+      } else {
+        obj.certificateNum = this.memberInfo.certificatenum;
+      }
+      return obj;
+    },
+    checkMemberInfo() {
+      const { mailBox, certificatenum } = this.memberInfo || {};
+      if (mailBox) {
+        if (!checkEmail(mailBox)) {
+          uni.showToast({
+            title: '邮箱格式错误',
+            duration: 2000,
+            icon: 'none',
+          });
+          return false;
+        }
+      }
+      if (certificatenum) {
+        if (!checkIdNumber(certificatenum)) {
+          uni.showToast({
+            title: '身份证号格式错误',
+            duration: 2000,
+            icon: 'none',
+          });
+          return false;
+        }
+      }
+      return true;
+    },
+    handleSelectCityConfirm(e) {
+      const [provinceAddress, cityAddress, districtAddress] = e.labelArr;
+      this.memberInfo.provinceAddress = e.labelArr[0];
+      this.memberInfo.cityAddress = e.labelArr[1];
+      this.memberInfo.districtAddress = e.labelArr[2];
+      this.allAddress = e.label;
+    },
+    checkIsCompleted(memberInfo) {
+      if (!memberInfo) {
+        console.warn('===>memberInfo is null');
+        return;
+      }
+      const _this = this;
+      const {
+        gender,
+        realName,
+        birthDate,
+        email,
+        certificateNum,
+        provinceAddress,
+        cityAddress,
+        districtAddress,
+        companyName,
+        address,
+        babyStatus,
+      } = memberInfo || {};
 
-					// 详细地址
-					this.memberInfo.address = userDetail.address
-					// 所在地
-					const { provinceAddress, cityAddress, districtAddress } = userDetail
-					if (provinceAddress && cityAddress && districtAddress) {
-						this.memberInfo.provinceAddress = provinceAddress;
-						this.memberInfo.cityAddress = cityAddress;
-						this.memberInfo.districtAddress = districtAddress;
-						this.allAddress = provinceAddress + '-' + cityAddress + '-' +districtAddress
-					}
-					this.babyStatus = userDetail.babyStatus;
-				}
-			},
-			handleMemberInfoToKipUser(memberInfo) {
-				if (!memberInfo) {
-					return
-				}
-				const obj = {
-					"birthDate": this.memberInfo.birthday,
-					"email": this.memberInfo.mailBox,
-					"gender": this.genderValue,
-					"realName": this.memberInfo.vipname,
-					"provinceAddress": this.memberInfo.provinceAddress,
-					"cityAddress": this.memberInfo.cityAddress,
-					"districtAddress": this.memberInfo.districtAddress,
-				}
-				if (this.isBeijing) {
-					obj.companyName = this.memberInfo.companyName
-				}else if (this.isTianJin) {
-					obj.babyStatus = this.babyStatus;
-					obj.address = this.memberInfo.address;
-				} else {
-					obj.certificateNum = this.memberInfo.certificatenum
-				}
-				return obj;
-			},
-			checkMemberInfo() {
-				const { mailBox, certificatenum } = this.memberInfo || {};
-				if (mailBox) {
-					if (!checkEmail(mailBox)) {
-						uni.showToast({
-							title: '邮箱格式错误',
-							duration: 2000,
-							icon: 'none'
-						})
-						return false
-					}
+      let isCompleted = true;
 
-				}
-				if (certificatenum) {
-					if (!checkIdNumber(certificatenum)) {
-						uni.showToast({
-							title: '身份证号格式错误',
-							duration: 2000,
-							icon: 'none'
-						})
-						return false
-					}
-				}
-				return true;
-			},
-			handleSelectCityConfirm (e) {
-				const [ provinceAddress, cityAddress, districtAddress ] = e.labelArr
-				this.memberInfo.provinceAddress = e.labelArr[0]
-				this.memberInfo.cityAddress = e.labelArr[1]
-				this.memberInfo.districtAddress = e.labelArr[2]
-				this.allAddress = e.label
-			},
-			checkIsCompleted (memberInfo) {
-				if (!memberInfo) {
-					console.warn("===>memberInfo is null")
-					return;
-				}
-				const _this = this;
-				const {gender, realName, birthDate, email, certificateNum,
-				 provinceAddress, cityAddress, districtAddress, companyName, address, babyStatus} = memberInfo || {}
+      if (
+        !gender ||
+        !realName ||
+        !birthDate ||
+        !provinceAddress ||
+        !cityAddress ||
+        !districtAddress
+      ) {
+        isCompleted = false;
+      }
 
-				let isCompleted = true;
+      if (this.isBeijing) {
+        if (!companyName) {
+          isCompleted = false;
+        }
+        if (!email) {
+          isCompleted = false;
+        }
+      } else if (this.isTianJin) {
+        if (!babyStatus) {
+          isCompleted = false;
+        }
+        if (!address || address.trim().length == 0) {
+          isCompleted = false;
+        }
+      } else {
+        if (!certificateNum) {
+          isCompleted = false;
+        }
+        if (!email) {
+          isCompleted = false;
+        }
+      }
 
-				if (!gender || !realName || !birthDate || !provinceAddress || !cityAddress || !districtAddress ) {
-					isCompleted = false;
-				}
+      if (!isCompleted) {
+        console.log('===>没有完善信息,直接跳转');
+        _this.gotoIndex();
+        return;
+      }
 
-				if (this.isBeijing) {
-					if (!companyName) {
-						isCompleted = false;
-					}
-					if (!email) {
-						isCompleted = false
-					}
-				}else if (this.isTianJin) {
-					if (!babyStatus) {
-					  isCompleted = false;
-					}
-					if (!address || address.trim().length == 0) {
-					  isCompleted = false;
-					}
-				}else {
-					if (!certificateNum) {
-						isCompleted = false;
-					}
-					if (!email) {
-						isCompleted = false
-					}
-				}
-
-				if (!isCompleted) {
-					console.log('===>没有完善信息,直接跳转')
-					_this.gotoIndex()
-					return;
-				}
-
-				console.log('===>会员信息已完善,请求crm接口')
-				const kipMember = uni.getStorageSync("kipMember")
-				const params = {
-					groupId: app.globalData.groupId,
-					mallid: app.globalData.mallid,
-					kipUserId: kipMember.id
-				}
-				uni.showLoading({
-					title: '保存中',
-					mask: true,
-				});
-				crmUpdateMemberCompleted(_this.$baseURL, params).then(res => {
-					uni.hideLoading();
-					const result= res.data;
-					if (result && result.code == '0') {
-						console.log('===>改变crm会员信息完善成功')
-						_this.gotoIndex()
-					} else {
-						uni.showLoading({
-							title: '保存失败'
-						});
-						console.log('===>改变crm会员信息完善失败')
-						console.error(result.msg);
-						// _this.gotoIndex()
-					}
-				}).catch(err => {
-					console.log('===>改变crm会员信息完善错误')
-					console.error(err);
-					// _this.gotoIndex()
-					uni.showLoading({
-						title: '保存失败'
-					});
-				})
-			},
-		},
-	}
+      console.log('===>会员信息已完善,请求crm接口');
+      const kipMember = uni.getStorageSync('kipMember');
+      const params = {
+        groupId: app.globalData.groupId,
+        mallid: app.globalData.mallid,
+        kipUserId: kipMember.id,
+      };
+      uni.showLoading({
+        title: '保存中',
+        mask: true,
+      });
+      crmUpdateMemberCompleted(_this.$baseURL, params)
+        .then((res) => {
+          uni.hideLoading();
+          const result = res.data;
+          if (result && result.code == '0') {
+            console.log('===>改变crm会员信息完善成功');
+            _this.gotoIndex();
+          } else {
+            uni.showLoading({
+              title: '保存失败',
+            });
+            console.log('===>改变crm会员信息完善失败');
+            console.error(result.msg);
+            // _this.gotoIndex()
+          }
+        })
+        .catch((err) => {
+          console.log('===>改变crm会员信息完善错误');
+          console.error(err);
+          // _this.gotoIndex()
+          uni.showLoading({
+            title: '保存失败',
+          });
+        });
+    },
+  },
+};
 </script>
 
 <style lang="less">
-	.page {
-		width: 100%;
-		font-size: 30px;
-		height: 100vh;
-		background: #F4F7FF;
-		position: fixed;
-		z-index: 999;
-		.pageHeader {
-			width: 100%;
-			height: 88px;
-			display: flex;
-			justify-content: center;
-			align-items: center;
-		}
-	}
-
-	.head {
-		margin: 20px 40px 0 40px;
-		border-left: 1px solid #F4F7FF;
-		border-top: 1px solid #AAB1D4;
-		border-right: 1px solid #F4F7FF;
-		border-bottom: 1px solid #F4F7FF;
-		border-radius: 12px;
-		box-shadow: 0px 0px 9px 0px #AAB1D4;
-		padding: 40px;
-		font-size: 26px;
-		position: relative;
-		overflow: hidden;
-	}
-	.box {
-		position: absolute;
-		left: 0;
-		top: 0;
-		height: 12px;
-		width: 100%;
-		background-color: #737DB5;
-		border-radius: 8px 8px 0 0;
-		opacity: 0.7;
-	}
+.page {
+  width: 100%;
+  font-size: 30px;
+  height: 100vh;
+  background: #f4f7ff;
+  position: fixed;
+  z-index: 999;
+  .pageHeader {
+    width: 100%;
+    height: 88px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+}
 
-	.form-wrap {
-		margin-top: 10px;
-		border-bottom: 1px solid #D8DAE0;
+.head {
+  margin: 20px 40px 0 40px;
+  border-left: 1px solid #f4f7ff;
+  border-top: 1px solid #aab1d4;
+  border-right: 1px solid #f4f7ff;
+  border-bottom: 1px solid #f4f7ff;
+  border-radius: 12px;
+  box-shadow: 0px 0px 9px 0px #aab1d4;
+  padding: 40px;
+  font-size: 26px;
+  position: relative;
+  overflow: hidden;
+}
+.box {
+  position: absolute;
+  left: 0;
+  top: 0;
+  height: 12px;
+  width: 100%;
+  background-color: #737db5;
+  border-radius: 8px 8px 0 0;
+  opacity: 0.7;
+}
 
-		.form__item {
-			position: relative;
-			display: flex;
-			height: 121px;
-			padding-right:30px;
-			align-items: center;
-			border-top: 1px solid #D8DAE0;
-			margin-left: 40px;
+.form-wrap {
+  margin-top: 10px;
+  border-bottom: 1px solid #d8dae0;
 
-			.form__label {
-				color: #333;
-				width: 205px;
-				font-size: 34px;
-				font-family: PingFangHK-Regular, PingFangHK;
-				font-weight: 400;
-			}
+  .form__item {
+    position: relative;
+    display: flex;
+    height: 121px;
+    padding-right: 30px;
+    align-items: center;
+    border-top: 1px solid #d8dae0;
+    margin-left: 40px;
 
-			.form__input {
-				flex: 1;
-				color: #999;
-				input {
-					font-size: 34px;
-					color: #999;
-					font-family: PingFangSC-Regular, PingFang SC;
-				}
-				::v-deep .checklist-text, .placeholder_input {
-					font-size: 34px !important;
-					color: #999;
-					font-family: PingFangSC-Regular, PingFang SC;
-				}
-			}
-		}
-	}
+    .form__label {
+      color: #333;
+      width: 205px;
+      font-size: 34px;
+      font-family: PingFangHK-Regular, PingFangHK;
+      font-weight: 400;
+    }
 
-	.btn-wrap {
-		margin: 80px 34px;
-	}
+    .form__input {
+      flex: 1;
+      color: #999;
+      input {
+        font-size: 34px;
+        color: #999;
+        font-family: PingFangSC-Regular, PingFang SC;
+      }
+      ::v-deep .checklist-text,
+      .placeholder_input {
+        font-size: 34px !important;
+        color: #999;
+        font-family: PingFangSC-Regular, PingFang SC;
+      }
+    }
+  }
+}
 
-	.btn {
-		width: 100%;
-		height: 100px;
-		line-height: 100px;
-		font-size: 40px;
-		border-radius: 50px;
-		text-align: center;
-		font-family: PingFangHK-Regular, PingFangHK;
-	}
-	.btn--black {
-		background-color: #333333;
-		color: #FFFFFF;
-	}
-	.btn--white {
-		border: 1px solid #979797;
-	}
+.btn-wrap {
+  margin: 80px 34px;
+}
 
-	/deep/ .checklist-text {
-		color: #999999;
-	}
+.btn {
+  width: 100%;
+  height: 100px;
+  line-height: 100px;
+  font-size: 40px;
+  border-radius: 50px;
+  text-align: center;
+  font-family: PingFangHK-Regular, PingFangHK;
+}
+.btn--black {
+  background-color: #333333;
+  color: #ffffff;
+}
+.btn--white {
+  border: 1px solid #979797;
+}
 
+/deep/ .checklist-text {
+  color: #999999;
+}
 </style>
-
-

+ 2 - 1
src/pages/login/login.vue

@@ -584,7 +584,8 @@ export default {
                 '==>这里走埋点--手机号码---crmQueryMemberInfo',
                 member
               );
-              uni.setStorageSync()
+              this.$store.commit('SET_USER_INFO', member);
+              this.$store.commit('SET_MEMBER', member);
               // TODO: 埋点公共属性重新赋值
               // _this.$sensors.registerApp({
               //   $open_id: _this.globalData?.member?.openId || '',

+ 152 - 76
src/pages/parkingFee/parkingFee.vue

@@ -3,90 +3,141 @@
     <scroll-view class="wrap-box">
       <div class="parkingFee" ref="parkingFee">
         <div class="parkingFee-top bg">
-          <div :class="{
-            top_menu: true,
-            blue_top_menu: custTypeId === 1,
-            green_top_menu: custTypeId === 2,
-          }" v-if="custTypeId >= 0">
+          <div
+            :class="{
+              top_menu: true,
+              blue_top_menu: custTypeId === 1,
+              green_top_menu: custTypeId === 2,
+            }"
+            v-if="custTypeId >= 0"
+          >
             <div class="menu_item" @click="doRouter">
-              <img :src="
-                require(`./static/images/icon-order.png`)
-              " />
+              <img :src="require(`./static/images/icon-order.png`)" />
               <span>缴费记录</span>
             </div>
             <div class="menu_item" @click="doRouter1">
-              <img :src="
-                require(`./static/images/icon-ticket.png`)
-              " />
+              <img :src="require(`./static/images/icon-ticket.png`)" />
               <span>停车开票</span>
             </div>
             <div class="menu_item" @click="doRouter2">
-              <img :src="
-                require(`./static/images/icon-car.png`)
-              " />
+              <img :src="require(`./static/images/icon-car.png`)" />
               <span>车辆管理</span>
             </div>
           </div>
         </div>
-        <div :class="{
-          'parkingFee-bottom': true,
-          'blue-parkingFee-bottom': custTypeId === 1,
-          'green-parkingFee-bottom': custTypeId === 2,
-          pb65: carList.length < 1,
-        }">
+        <div
+          :class="{
+            'parkingFee-bottom': true,
+            'blue-parkingFee-bottom': custTypeId === 1,
+            'green-parkingFee-bottom': custTypeId === 2,
+            pb65: carList.length < 1,
+          }"
+        >
           <div class="parkingFee-search">
             <div class="search_tip" v-if="custTypeId === 0">
               <div>车辆类型</div>
               <div class="search_tip_pt">
-                <div :class="carType == 0 ? 'search_tip_pt_index' : ''" @click="toggleType(0)">
+                <div
+                  :class="carType == 0 ? 'search_tip_pt_index' : ''"
+                  @click="toggleType(0)"
+                >
                   燃油车牌
                 </div>
-                <div :class="carType == 1 ? 'search_tip_pt_index' : ''" @click="toggleType(1)">
+                <div
+                  :class="carType == 1 ? 'search_tip_pt_index' : ''"
+                  @click="toggleType(1)"
+                >
                   新能源
                 </div>
-                <div :class="carType == 2 ? 'search_tip_pt_index' : ''" @click="toggleType(2)">
+                <div
+                  :class="carType == 2 ? 'search_tip_pt_index' : ''"
+                  @click="toggleType(2)"
+                >
                   特殊车牌
                 </div>
               </div>
             </div>
-            <div :class="{
-              blueClassify: custTypeId === 1,
-              greenClassify: custTypeId === 2,
-            }" v-else>
-              <div :class="{ classifyItem: true, isChecked: carType === index }" v-for="(item, index) in classifyList"
-                :key="index">
+            <div
+              :class="{
+                blueClassify: custTypeId === 1,
+                greenClassify: custTypeId === 2,
+              }"
+              v-else
+            >
+              <div
+                :class="{ classifyItem: true, isChecked: carType === index }"
+                v-for="(item, index) in classifyList"
+                :key="index"
+              >
                 <div @click="toggleType(index)">{{ item }}</div>
               </div>
             </div>
             <div class="input-box">
-              <div class="li" @click="clickShowKeyboard(0)" :class="[active === 0 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(0)"
+                :class="[active === 0 ? 'active' : '']"
+              >
                 {{ numArr[0] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(1)" :class="[active === 1 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(1)"
+                :class="[active === 1 ? 'active' : '']"
+              >
                 {{ numArr[1] }}
               </div>
               <div class="input_box_dian">·</div>
-              <div class="li" @click="clickShowKeyboard(2)" :class="[active === 2 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(2)"
+                :class="[active === 2 ? 'active' : '']"
+              >
                 {{ numArr[2] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(3)" :class="[active === 3 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(3)"
+                :class="[active === 3 ? 'active' : '']"
+              >
                 {{ numArr[3] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(4)" :class="[active === 4 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(4)"
+                :class="[active === 4 ? 'active' : '']"
+              >
                 {{ numArr[4] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(5)" :class="[active === 5 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(5)"
+                :class="[active === 5 ? 'active' : '']"
+              >
                 {{ numArr[5] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(6)" :class="[active === 6 ? 'active' : '']">
+              <div
+                class="li"
+                @click="clickShowKeyboard(6)"
+                :class="[active === 6 ? 'active' : '']"
+              >
                 {{ numArr[6] }}
               </div>
-              <div class="li" @click="clickShowKeyboard(7)" :class="[active === 7 ? 'active' : '']" v-if="carType == 1">
+              <div
+                class="li"
+                @click="clickShowKeyboard(7)"
+                :class="[active === 7 ? 'active' : '']"
+                v-if="carType == 1"
+              >
                 <span v-if="numArr[7]">{{ numArr[7] }}</span>
               </div>
             </div>
-            <button class="search-btn" :class="disabledBtn ? 'disabled-btn' : ''" :disabled="disabledBtn"
-              @click="preHandleSearch">
+            <button
+              class="search-btn"
+              :class="disabledBtn ? 'disabled-btn' : ''"
+              :disabled="disabledBtn"
+              @click="preHandleSearch"
+            >
               查询缴费
             </button>
           </div>
@@ -95,32 +146,44 @@
               <div>历史车辆</div>
             </div>
             <div class="vehicleMgt-content" v-if="carList.length">
-              <div class="item" v-for="(item, index) in carList" :key="index" @click="toHandleSearch(item)"
-                :class="vehicleNumber == item ? 'vehicleMgt-content_cls' : ''">
+              <div
+                class="item"
+                v-for="(item, index) in carList"
+                :key="index"
+                @click="toHandleSearch(item)"
+                :class="vehicleNumber == item ? 'vehicleMgt-content_cls' : ''"
+              >
                 {{ item | formatCarno }}
               </div>
             </div>
           </div>
         </div>
-        <div :class="{
-          top_content: true,
-          blue_top_content: custTypeId === 1,
-          green_top_content: custTypeId === 2,
-        }" :style="{
+        <div
+          :class="{
+            top_content: true,
+            blue_top_content: custTypeId === 1,
+            green_top_content: custTypeId === 2,
+          }"
+          :style="{
             'background-image':
               custTypeId === 1 ? `url(${picUrl}${blueHeadBg});` : '',
-          }">
+          }"
+        >
           <div class="title_box">
             <span class="title">缴费说明</span>
           </div>
           <div class="info" :class="!init_ch ? 'info_show' : ''">
             <span>{{ parkInfoEntity.payinstruction }}</span>
           </div>
-          <div class="top_down" @click="top_display" v-if="
-            !init_ch &&
-            parkInfoEntity.payinstruction &&
-            parkInfoEntity.payinstruction.length > 60
-          ">
+          <div
+            class="top_down"
+            @click="top_display"
+            v-if="
+              !init_ch &&
+              parkInfoEntity.payinstruction &&
+              parkInfoEntity.payinstruction.length > 60
+            "
+          >
             <van-icon name="arrow-down" />
           </div>
           <div class="top_down" @click="top_display" v-else>
@@ -129,13 +192,19 @@
         </div>
       </div>
     </scroll-view>
-    <plate-number ref="plateKeyboard" :carType="carType" :active="active" :ind="ind" :numArr="numArr"
-      @carnoArr="updateCarno"></plate-number>
+    <plate-number
+      ref="plateKeyboard"
+      :carType="carType"
+      :active="active"
+      :ind="ind"
+      :numArr="numArr"
+      @carnoArr="updateCarno"
+    ></plate-number>
   </div>
 </template>
 
 <script>
-import authorize from '../../components/authorize/authorize.vue';
+// import authorize from '../../components/authorize/authorize.vue';
 import plateNumber from '../../components/plate-number/plateNumber.vue';
 import { REG_SOURCE } from '@/constants';
 import { mapGetters } from 'vuex';
@@ -152,7 +221,7 @@ import uni from '../../utils/uniHooks';
 
 export default {
   components: {
-    authorize,
+    // authorize,
     plateNumber,
   },
   data() {
@@ -187,20 +256,27 @@ export default {
     disabledBtn() {
       return this.numArr.findIndex((val) => !val) !== -1;
     },
-    ...mapGetters({
-      groupId: (state) => state.groupId,
+    ...mapGetters([
+      'groupId',
+      'openid',
+      'mallId',
+      'kipUserId',
+      'userInfo',
+      'member',
+    ]),
+    /* groupId: (state) => state.groupId,
       openid: (state) => state.openid,
       mallId: (state) => state.mallId,
       kipUserId: (state) => state.kipUserId,
       userInfo: (state) => state.userInfo,
-    }),
+      member: (state) => state.member, */
   },
   watch: {
     userInfo() {
       this.initPage();
     },
   },
-  async created(params) { },
+  async created(params) {},
   mounted() {
     setTimeout(() => {
       uni.setNavigationBarTitle({
@@ -361,19 +437,19 @@ export default {
     sensorsClick(eventName, params) {
       let optionsQuery = uni.getStorageSync('options_query');
       let fixedParams = {
-        previous_url: this.preUrl || '',
-        // 原previous_url: uni.getStorageSync('previousUrl') || ''
-        // previous_url: 使用sdk预置参数$referrer,
-        $brand_id: uni.getStorageSync('groupId'),
-        $location: uni.getStorageSync('mallid'),
-        $channel: optionsQuery?.channel || '',
-        // $utm_lbs: this.optionsQuery.utm_lbs || '',
-        $utm_channel: optionsQuery?.utm_channel || '',
-        $utm_method: optionsQuery?.utm_method || '',
-        $utm_source: optionsQuery?.utm_source || '',
-        $utm_function: optionsQuery?.utm_function || '',
-        $utm_user: optionsQuery?.utm_user || '',
-      },
+          previous_url: this.preUrl || '',
+          // 原previous_url: uni.getStorageSync('previousUrl') || ''
+          // previous_url: 使用sdk预置参数$referrer,
+          $brand_id: uni.getStorageSync('groupId'),
+          $location: uni.getStorageSync('mallid'),
+          $channel: optionsQuery?.channel || '',
+          // $utm_lbs: this.optionsQuery.utm_lbs || '',
+          $utm_channel: optionsQuery?.utm_channel || '',
+          $utm_method: optionsQuery?.utm_method || '',
+          $utm_source: optionsQuery?.utm_source || '',
+          $utm_function: optionsQuery?.utm_function || '',
+          $utm_user: optionsQuery?.utm_user || '',
+        },
         finalParams = Object.assign(fixedParams, params);
       this.$sensors.track(eventName, finalParams);
     },
@@ -439,8 +515,8 @@ export default {
         carno,
         mallid: this.mallId,
         openid: this.openid,
-        vipcode: this.userInfo.vipcode,
-        mobile: '15267617473',
+        vipcode: this.member.vipcode,
+        mobile: this.member.mobile,
         groupId: this.groupId,
         createuser: 'sys_miniprogram',
       };
@@ -460,7 +536,7 @@ export default {
       // this.sensorsClick(clickEvent, { $car_type: carTypeName })
       // TODO: 暂定埋点传参为车牌类型,是否需要其他参数比如车牌号码;埋点位置是否要放在查询接口回调函数中
       this.$md(params);
-
+      console.log(539, uni.getStorageSync('handleUser'));
       this.$request({
         // url: this.$baseURL + 'api/1.0/park/checkCarIsInPark',
         url: this.$baseURL + 'api/1.0/park/checkCarIsInParkAndCarFee',

+ 2 - 2
src/pages/parkingFee/parkingFeeList.vue

@@ -64,13 +64,13 @@ const app = {};
 let canloading = true;
 let pageNum = 1;
 import moment from 'moment';
-import authorize from '@/components/authorize/authorize.vue';
+// import authorize from '@/components/authorize/authorize.vue';
 import { mapGetters } from 'vuex';
 // import {data as mockData} from './list'
 
 export default {
   components: {
-    authorize,
+    // authorize,
   },
   data() {
     return {

+ 2 - 2
src/pages/parkingFee/parkingReceipt/parkingReceipt.vue

@@ -97,7 +97,7 @@ import moment from 'moment'
 import arrowIcon from '../static/images/arrows.png'
 import noData from '@/static/images/parkingReceipt-noData.png'
 import { mapGetters } from 'vuex'
-import authorize from '@/components/authorize/authorize.vue'
+// import authorize from '@/components/authorize/authorize.vue'
 import MemberCacheTool from '@/utils/member-cache-tool.js'
 import { REG_SOURCE } from '@/constants.js'
 import uni from '@/utils/uniHooks'
@@ -128,7 +128,7 @@ export default {
     }
   },
   components: {
-    authorize,
+    // authorize,
   },
   computed: {
     height() {

+ 2 - 2
src/pages/parkingFee/vehicleManagement.vue

@@ -128,7 +128,7 @@ import {
 } from '@/utils/api-kip.js';
 import { LICENSE_PLATE_TYPE_ARR } from '@/constants.js';
 import { mapGetters } from 'vuex';
-import authorize from '@/components/authorize/authorize.vue';
+// import authorize from '@/components/authorize/authorize.vue';
 import { isCruMarketByKey } from '@/utils/location-util.js';
 import MemberCacheTool from '@/utils/member-cache-tool.js';
 import { REG_SOURCE } from '@/constants.js';
@@ -138,7 +138,7 @@ import { vehicles as vehiclesList } from './list';
 export default {
   components: {
     uniPop,
-    authorize,
+    // authorize,
   },
   computed: {
     ...mapGetters({

+ 3 - 3
src/pages/pointsMall/pointsMall.vue

@@ -1,6 +1,6 @@
 <template>
   <scroll-view scroll-y="true" class="pointsBox">
-    <authorize ref="authorize"></authorize>
+    <!-- <authorize ref="authorize"></authorize> -->
     <div class="points-top">
       <div class="uni-form-item uni-column header-search">
         <div class="search-input">
@@ -588,7 +588,7 @@ const app = {
     regSource:''
   }
 };
-import authorize from '@/components/authorize/authorize.vue'
+// import authorize from '@/components/authorize/authorize.vue'
 import searchIcon from '../../static/images/points-mail-search.png'
 import triUpIcon from '../../static/images/pointsMail/triangle-up.png'
 import triUpActivedIcon from '../../static/images/pointsMail/triangle-up-actived.png'
@@ -678,7 +678,7 @@ export default {
     }
   },
   components: {
-    authorize,
+    // authorize,
     labelTip,
   },
   computed: {

+ 16 - 12
src/store/index.js

@@ -11,6 +11,7 @@ function getValue(state, key) {
   if (!value) {
     value = uni.getStorageSync(key)
   }
+  console.log(1414141414141414, { key, value });
   return value
 }
 const store = new Vuex.Store({
@@ -101,9 +102,9 @@ const store = new Vuex.Store({
         if (!pageId) return;
         let [groupId, kipUserId, mallId, openid, mobile] =
           Decrypt(pageId).split('#');
-          console.log(8181, {
-            groupId, kipUserId, mallId, openid, mobile
-          });
+        console.log(8181, {
+          groupId, kipUserId, mallId, openid, mobile
+        });
 
         // groupId = '8a84853b7c91ac5b017c962dab55030e'
         // kipUserId = '8a84810483bc013e0183d44773bf002a'
@@ -129,7 +130,7 @@ const store = new Vuex.Store({
         const marketListRes = await kipAllCities();
         if (memberRes.code === 0) {
           dispatch('getUserDetail')
-          // commit('SET_USER_INFO', memberRes.data);
+          commit('SET_USER_INFO', memberRes.data);
           commit('SET_MEMBER', memberRes.data);
         }
         console.log(929292, marketListRes);
@@ -145,30 +146,33 @@ const store = new Vuex.Store({
     },
   },
   getters: {
-    groupId (state) {
+    groupId(state) {
       return getValue(state, 'groupId')
     },
-    kipUserId (state) {
+    kipUserId(state) {
       return getValue(state, 'kipUserId')
     },
-    mallId (state) {
+    mallId(state) {
       return getValue(state, 'mallId')
     },
-    openid (state) {
+    openid(state) {
       return getValue(state, 'openid')
     },
-    mobile (state) {
+    mobile(state) {
       return getValue(state, 'mobile')
     },
-    projectId (state) {
+    projectId(state) {
       return getValue(state, 'projectId')
     },
-    userInfo (state) {
+    userInfo(state) {
       return getValue(state, 'userInfo')
     },
-    custTypeId (state) {
+    custTypeId(state) {
       return getValue(state, 'custTypeId')
     },
+    member(state) {
+      return getValue(state, 'member')
+    },
   }
 });
 

+ 14 - 5
src/utils/uniHooks.js

@@ -2,11 +2,18 @@ import axios from 'axios';
 import qs from 'qs'
 import _ from 'lodash';
 import { Encrypt, Decrypt } from './crypto';
-import {Toast} from 'vant'
+import { Toast } from 'vant'
 
 function getStorageSync(key) {
   const value = window.localStorage.getItem(key);
-  return value ? JSON.parse(value) : undefined;
+  console.log(99999999, value);
+  if (value && value.indexOf('"') === 0) {
+    return JSON.parse(value)
+  }
+  if (value && value.indexOf('{') > -1) {
+    return JSON.parse(value)
+  }
+  return value || undefined;
 }
 
 function setStorageSync(key, value) {
@@ -66,7 +73,7 @@ function setNavigationBarTitle({ title }) {
     window?.toWXSendMsg({
       type: 'uni_func',
       funcName: 'setNavigationBarTitle',
-      options: {title},
+      options: { title },
     });
   }
 }
@@ -98,9 +105,11 @@ function request({ url, data, method, header, success, fail }) {
   if (method.toLowerCase() === 'post') {
     params.data = data;
     // 如果是
-    if(/v1\/auth\/phone-login/g.test(url)) {
+    if (/v1\/auth\/phone-login/g.test(url)) {
       params.data = qs.stringify(data);
     }
+    // console.log(params.data, 1141141141141114);
+    // return new Promise().resolve('ok')
   }
   if (success) {
     axios(params)
@@ -141,7 +150,7 @@ function requestPayment(options) {
   );
 }
 
-function getSystemInfoSync () {
+function getSystemInfoSync() {
   return {
     screenWidth: window.document.documentElement.offsetWidth
   }