个人中心的静态页面完成,登录逻辑完成
首页的登录逻辑判断
This commit is contained in:
		
							parent
							
								
									1ad9951258
								
							
						
					
					
						commit
						4fe9dfa923
					
				
							
								
								
									
										28
									
								
								pages.json
									
									
									
									
									
								
							
							
						
						
									
										28
									
								
								pages.json
									
									
									
									
									
								
							@ -20,6 +20,17 @@
 | 
			
		||||
				"group": "商城"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"path": "pages/index/fabu",
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "发布"
 | 
			
		||||
			},
 | 
			
		||||
			"meta": {
 | 
			
		||||
				"sync": true,
 | 
			
		||||
				"title": "发布",
 | 
			
		||||
				"group": "商城"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"path": "pages/index/user",
 | 
			
		||||
			"style": {
 | 
			
		||||
@ -46,18 +57,7 @@
 | 
			
		||||
		{
 | 
			
		||||
			"path": "pages/index/cart",
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "发布"
 | 
			
		||||
			},
 | 
			
		||||
			"meta": {
 | 
			
		||||
				"sync": true,
 | 
			
		||||
				"title": "购物车",
 | 
			
		||||
				"group": "商城"
 | 
			
		||||
			}
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			"path": "pages/index/fabu",
 | 
			
		||||
			"style": {
 | 
			
		||||
				"navigationBarTitleText": "发布"
 | 
			
		||||
				"navigationBarTitleText": "购物车"
 | 
			
		||||
			},
 | 
			
		||||
			"meta": {
 | 
			
		||||
				"sync": true,
 | 
			
		||||
@ -759,7 +759,7 @@
 | 
			
		||||
	],
 | 
			
		||||
	"globalStyle": {
 | 
			
		||||
		"navigationBarTextStyle": "black",
 | 
			
		||||
		"navigationBarTitleText": "星品购",
 | 
			
		||||
		"navigationBarTitleText": "酱小仙",
 | 
			
		||||
		"navigationBarBackgroundColor": "#FFFFFF",
 | 
			
		||||
		"backgroundColor": "#FFFFFF",
 | 
			
		||||
		"navigationStyle": "custom"
 | 
			
		||||
@ -769,7 +769,7 @@
 | 
			
		||||
				"pagePath": "pages/index/index"
 | 
			
		||||
			},
 | 
			
		||||
			{
 | 
			
		||||
				"pagePath": "pages/index/cart"
 | 
			
		||||
				"pagePath": "pages/index/fabu"
 | 
			
		||||
			},
 | 
			
		||||
			{
 | 
			
		||||
				"pagePath": "pages/index/user"
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,6 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <s-layout title="购物车" tabbar="/pages/index/cart" :bgStyle="{ color: '#fff' }">
 | 
			
		||||
	<!-- tabbar="/pages/index/cart" -->
 | 
			
		||||
  <s-layout title="购物车"  :bgStyle="{ color: '#fff' }">
 | 
			
		||||
    <s-empty
 | 
			
		||||
      v-if="state.list.length === 0"
 | 
			
		||||
      text="购物车空空如也,快去逛逛吧~"
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,9 @@
 | 
			
		||||
<template>
 | 
			
		||||
	<view> 发布 </view>
 | 
			
		||||
	<!-- <view> 发布 </view> -->
 | 
			
		||||
	
 | 
			
		||||
	<s-layout title="发布" tabbar="/pages/index/fabu" :bgStyle="{ color: '#fff' }">
 | 
			
		||||
	</s-layout>
 | 
			
		||||
	
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@
 | 
			
		||||
						<view class="locTop-right">
 | 
			
		||||
							<uni-section style="border-radius: 192rpx;padding: 0;" type="line">
 | 
			
		||||
								<uni-search-bar style="border-radius: 192rpx;" radius="23" placeholder="搜索您需要的信息"
 | 
			
		||||
									bgColor="#EEEEEE" clearButton="none" cancelButton="none" @confirm="search" @focus="toPage()"/>
 | 
			
		||||
									bgColor="#EEEEEE" clearButton="none" cancelButton="none" @confirm="search" @focus="toPage('/packageA/search/index')"/>
 | 
			
		||||
							</uni-section>
 | 
			
		||||
							<!-- <uni-search-bar></uni-search-bar> @confirm="search"-->
 | 
			
		||||
						</view>
 | 
			
		||||
@ -118,7 +118,8 @@
 | 
			
		||||
 | 
			
		||||
<script setup>
 | 
			
		||||
	import {
 | 
			
		||||
		computed
 | 
			
		||||
		computed,
 | 
			
		||||
		ref
 | 
			
		||||
	} from 'vue';
 | 
			
		||||
	import {
 | 
			
		||||
		onLoad,
 | 
			
		||||
@ -134,6 +135,8 @@
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	const template = computed(() => sheep.$store('app').template?.home);
 | 
			
		||||
	const isLogin = computed(() => sheep.$store('user').isLogin);
 | 
			
		||||
	const qualification = ref(false)
 | 
			
		||||
 | 
			
		||||
	onLoad((options) => {
 | 
			
		||||
		// #ifdef MP
 | 
			
		||||
@ -171,11 +174,41 @@
 | 
			
		||||
	onPageScroll(() => {});
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	function toPage() {
 | 
			
		||||
		uni.navigateTo({
 | 
			
		||||
			url:'/packageA/search/index'
 | 
			
		||||
		})
 | 
			
		||||
	const toPage = (e) => {
 | 
			
		||||
		if(isLogin.value == true) {
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url: e
 | 
			
		||||
			})
 | 
			
		||||
			qualification.value = true;
 | 
			
		||||
		}else{
 | 
			
		||||
			
 | 
			
		||||
			uni.showToast({
 | 
			
		||||
				title: '请先登录',
 | 
			
		||||
				icon: 'none',
 | 
			
		||||
				duration: 2000
 | 
			
		||||
			})
 | 
			
		||||
			
 | 
			
		||||
			setTimeout(function() {
 | 
			
		||||
				uni.switchTab({
 | 
			
		||||
					url: '/pages/index/user'
 | 
			
		||||
				})
 | 
			
		||||
			}, 2000);
 | 
			
		||||
			
 | 
			
		||||
		}
 | 
			
		||||
		// uni.navigateTo({
 | 
			
		||||
		// 	url:'/packageA/search/index'
 | 
			
		||||
		// })
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	function haveQualification() {
 | 
			
		||||
		console.log('qualification',isLogin.value);
 | 
			
		||||
		if(isLogin.value == true) {
 | 
			
		||||
			qualification.value = true;
 | 
			
		||||
		}else{
 | 
			
		||||
			qualification.value = true;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
 | 
			
		||||
@ -3,86 +3,173 @@
 | 
			
		||||
		:navbarStyle="template.style?.navbar" onShareAppMessage :showFloatButton="true">
 | 
			
		||||
		<!-- 登录信息 -->
 | 
			
		||||
		<view class="myBox">
 | 
			
		||||
				<view @touchmove.prevent scroll-y="true" :show-scrollbar="true"
 | 
			
		||||
					class="con-center flex flex-start flex-column">
 | 
			
		||||
					<view class="header">
 | 
			
		||||
						<!-- 用户信息 -->
 | 
			
		||||
						<view class="hea-left flex">
 | 
			
		||||
							<view class="head-avatar" @click="toLogin">
 | 
			
		||||
								<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;"
 | 
			
		||||
									src="/static/wechat.png"></image>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="headAvatar-info justify-start">
 | 
			
		||||
								<view class="info-name fs-36 weight8 flexD">会飞的蜗牛
 | 
			
		||||
									<view class="authenticationBox weight8 fs-20">已认证</view>
 | 
			
		||||
								</view>
 | 
			
		||||
								<view class="fs-28 weight4" style="margin-top: 30rpx;">剩余拨打次数: 10次</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="head-signInBox">
 | 
			
		||||
								<image style="width: 46rpx;height: 44rpx;" src="https://jiangxiaoxian.0rui.cn/signIn.png" mode=""></image>
 | 
			
		||||
								<view class="signInText" style="margin-left: 10rpx;">签到</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							
 | 
			
		||||
			<view @touchmove.prevent scroll-y="true" :show-scrollbar="true"
 | 
			
		||||
				class="con-center flex flex-start flex-column">
 | 
			
		||||
				<view class="header">
 | 
			
		||||
					<!-- 用户信息 -->
 | 
			
		||||
					<view class="hea-left flex">
 | 
			
		||||
						<view class="head-avatar" v-if="isLogin == true" @click="sheep.$router.go('/pages/user/info')">
 | 
			
		||||
							<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;" :src="baseUrl + userInfo.avatar"></image>
 | 
			
		||||
						</view>
 | 
			
		||||
						
 | 
			
		||||
						<!-- 四个主内容 -->
 | 
			
		||||
						<view class="head-secondBox">
 | 
			
		||||
							<view class="collect">
 | 
			
		||||
								<view class="collect-num">14</view>
 | 
			
		||||
								<view class="collect-text">收藏</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="feetPrint">
 | 
			
		||||
								<view class="feetPrint-num">14</view>
 | 
			
		||||
								<view class="feetPrint-text">足迹</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="feetPrint">
 | 
			
		||||
								<view class="feetPrint-num">14</view>
 | 
			
		||||
								<view class="feetPrint-text">积分</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="collect">
 | 
			
		||||
								<view class="collect-num">14</view>
 | 
			
		||||
								<view class="collect-text">优惠券</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						<view class="head-avatar" v-else @click="toLogin">
 | 
			
		||||
							<image style="width: 130rpx;height: 130rpx;border-radius: 152rpx;" src="/static/wechat.png">
 | 
			
		||||
							</image>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					
 | 
			
		||||
					<!-- 我的订单 -->
 | 
			
		||||
					<view class="myOrder">
 | 
			
		||||
						<view class="myOrder-first">
 | 
			
		||||
							<view style="font-weight: 800;font-size: 34rpx;line-height: 28rpx;color: #3d3d3d;">我的订单</view>
 | 
			
		||||
							<view style="display: flex;align-items: center;justify-content: center;">
 | 
			
		||||
								<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">全部订单</view>
 | 
			
		||||
								<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;" src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
								<!-- <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons> -->
 | 
			
		||||
						<view class="headAvatar-info justify-start">
 | 
			
		||||
							<view class="info-name fs-36 weight8 flexD" v-if="isLogin == true">
 | 
			
		||||
								<view style="font-weight: 800;" @click="toLogin">{{ userInfo.nickname}} </view>
 | 
			
		||||
								<view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 ">未认证</view>
 | 
			
		||||
								<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 ">已认证</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="info-name fs-36 weight8 flexD" v-else>
 | 
			
		||||
								<view style="font-weight: 800;" @click="toLogin">登录/注册</view>
 | 
			
		||||
								<!-- <view class="UnAuthenBox weight8 fs-20" v-if="authenInfo.status == -1 && isLogin == true">未认证</view>
 | 
			
		||||
								<view class="authenticationBox weight8 fs-20" v-if="authenInfo.status == 1 && isLogin == true">已认证</view> -->
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="fs-28 weight4" style="margin-top: 30rpx;">剩余拨打次数: {{ userInfo.mobile_num ? userInfo.mobile_num : 0 }}次</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="myOrder-second">
 | 
			
		||||
							<view class="pendingBox">
 | 
			
		||||
								<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/pendPay.png"></image>
 | 
			
		||||
								<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待支付</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="pendingBox">
 | 
			
		||||
								<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/shipment.png"></image>
 | 
			
		||||
								<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待发货</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="pendingBox">
 | 
			
		||||
								<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/pendingDoods.png"></image>
 | 
			
		||||
								<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待收货</view>
 | 
			
		||||
							</view>
 | 
			
		||||
							<view class="pendingBox">
 | 
			
		||||
								<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/completed.png"></image>
 | 
			
		||||
								<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">已完成</view>
 | 
			
		||||
							</view>
 | 
			
		||||
						<view class="head-signInBox">
 | 
			
		||||
							<image style="width: 46rpx;height: 44rpx;" src="https://jiangxiaoxian.0rui.cn/signIn.png"
 | 
			
		||||
								mode=""></image>
 | 
			
		||||
							<view class="signInText" style="margin-left: 10rpx;">签到</view>
 | 
			
		||||
						</view>
 | 
			
		||||
 | 
			
		||||
					</view>
 | 
			
		||||
 | 
			
		||||
					<!-- 四个主内容 -->
 | 
			
		||||
					<view class="head-secondBox">
 | 
			
		||||
						<view class="collect">
 | 
			
		||||
							<view class="collect-num">14</view>
 | 
			
		||||
							<view class="collect-text">收藏</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="feetPrint">
 | 
			
		||||
							<view class="feetPrint-num">14</view>
 | 
			
		||||
							<view class="feetPrint-text">足迹</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="feetPrint">
 | 
			
		||||
							<view class="feetPrint-num">{{ userInfo.score ? userInfo.score : 0 }}</view>
 | 
			
		||||
							<view class="feetPrint-text">积分</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="collect">
 | 
			
		||||
							<view class="collect-num">14</view>
 | 
			
		||||
							<view class="collect-text">优惠券</view>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
 | 
			
		||||
				<!-- 我的订单 -->
 | 
			
		||||
				<view class="myOrder">
 | 
			
		||||
					<view class="myOrder-first">
 | 
			
		||||
						<view style="font-weight: 800;font-size: 34rpx;line-height: 28rpx;color: #3d3d3d;">我的订单</view>
 | 
			
		||||
						<view style="display: flex;align-items: center;justify-content: center;">
 | 
			
		||||
							<view style="font-size: 26rpx;line-height: 26rpx;font-weight: 400;color: #999999;">全部订单
 | 
			
		||||
							</view>
 | 
			
		||||
							<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
							<!-- <uni-icons type="arrowthinright" color="#999" style="line-height: 40px;"></uni-icons> -->
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="myOrder-second">
 | 
			
		||||
						<view class="pendingBox">
 | 
			
		||||
							<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/pendPay.png"></image>
 | 
			
		||||
							<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待支付</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="pendingBox">
 | 
			
		||||
							<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/shipment.png"></image>
 | 
			
		||||
							<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待发货</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="pendingBox">
 | 
			
		||||
							<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/pendingDoods.png"></image>
 | 
			
		||||
							<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">待收货</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<view class="pendingBox">
 | 
			
		||||
							<image class="pendImg" src="https://jiangxiaoxian.0rui.cn/completed.png"></image>
 | 
			
		||||
							<view class="fs-28 weight4" style="margin-top: 20rpx;color: #3d3d3d;">已完成</view>
 | 
			
		||||
						</view>
 | 
			
		||||
					</view>
 | 
			
		||||
				</view>
 | 
			
		||||
 | 
			
		||||
				<!-- 发布分享等 -->
 | 
			
		||||
				<view class="sixBox">
 | 
			
		||||
					<view class="fabuBox">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/myRelease.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">我的发布
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="line-row" style="margin: 30rpx 0;"></view>
 | 
			
		||||
 | 
			
		||||
					<view class="fabuBox">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/points.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">积分商城
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="line-row" style="margin: 30rpx 0;"></view>
 | 
			
		||||
 | 
			
		||||
					<view class="fabuBox">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/share.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">分享好友
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="line-row" style="margin: 30rpx 0;"></view>
 | 
			
		||||
 | 
			
		||||
					<view class="fabuBox">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/service.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">官方客服
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="line-row" style="margin: 30rpx 0;"></view>
 | 
			
		||||
 | 
			
		||||
					<view class="fabuBox">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/feedBack.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;">意见反馈
 | 
			
		||||
							</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
					<view class="line-row" style="margin: 30rpx 0;"></view>
 | 
			
		||||
 | 
			
		||||
					<view class="fabuBox" @click="toSetting">
 | 
			
		||||
						<view class="flex align-items">
 | 
			
		||||
							<image style="width: 36rpx;height: 36rpx;margin-right: 20rpx;"
 | 
			
		||||
								src="https://jiangxiaoxian.0rui.cn/setUp.png"></image>
 | 
			
		||||
							<view style="font-size: 30rpx;font-weight: 800;line-height: 28rpx;color: #333333;" >设置</view>
 | 
			
		||||
						</view>
 | 
			
		||||
						<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
 | 
			
		||||
							src="https://jiangxiaoxian.0rui.cn/rightMore.png" mode=""></image>
 | 
			
		||||
					</view>
 | 
			
		||||
 | 
			
		||||
					<view style="height: 80rpx;width: 100%;"></view>
 | 
			
		||||
				</view>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				<view style="height: 180rpx;width: 100%;"></view>
 | 
			
		||||
			</view>
 | 
			
		||||
 | 
			
		||||
				<!-- 授权登录 
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
			<!-- 授权登录 
 | 
			
		||||
				<u-popup :show="showLogin == true" type="center" round="20"
 | 
			
		||||
					:customStyle="{ 'width': '644rpx', 'height': '426rpx','position': 'relative'}" :closeable="false"
 | 
			
		||||
					@close="closeLogin" @open="openLogin">
 | 
			
		||||
@ -92,16 +179,16 @@
 | 
			
		||||
						</button>
 | 
			
		||||
					</view>
 | 
			
		||||
				</u-popup>-->
 | 
			
		||||
				
 | 
			
		||||
				<su-popup :show="showLogin == true" type="center" round="10" :isMaskClick="false">
 | 
			
		||||
				 <view class="popup">
 | 
			
		||||
				 	<button class="texbut" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 | 
			
		||||
				 		授权登录
 | 
			
		||||
				 	</button>
 | 
			
		||||
				 </view>
 | 
			
		||||
				</su-popup>
 | 
			
		||||
		
 | 
			
		||||
				<!-- <u-toast ref="uToast"></u-toast> -->
 | 
			
		||||
 | 
			
		||||
			<su-popup :show="showLogin == true" type="center" round="10" :isMaskClick="false">
 | 
			
		||||
				<view class="popup">
 | 
			
		||||
					<button class="texbut" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 | 
			
		||||
						授权登录
 | 
			
		||||
					</button>
 | 
			
		||||
				</view>
 | 
			
		||||
			</su-popup>
 | 
			
		||||
 | 
			
		||||
			<!-- <u-toast ref="uToast"></u-toast> -->
 | 
			
		||||
 | 
			
		||||
		</view>
 | 
			
		||||
 | 
			
		||||
@ -114,7 +201,8 @@
 | 
			
		||||
<script setup>
 | 
			
		||||
	import {
 | 
			
		||||
		computed,
 | 
			
		||||
		ref
 | 
			
		||||
		ref,
 | 
			
		||||
		reactive
 | 
			
		||||
	} from 'vue';
 | 
			
		||||
	import {
 | 
			
		||||
		onShow,
 | 
			
		||||
@ -122,9 +210,16 @@
 | 
			
		||||
		onPullDownRefresh
 | 
			
		||||
	} from '@dcloudio/uni-app';
 | 
			
		||||
	import sheep from '@/sheep';
 | 
			
		||||
	
 | 
			
		||||
	import userApi from '@/sheep/api/user';
 | 
			
		||||
	import third from '@/sheep/api/third';
 | 
			
		||||
	import {
 | 
			
		||||
		baseUrl,
 | 
			
		||||
	} from '@/sheep/config';
 | 
			
		||||
 | 
			
		||||
	const showLogin = ref(false);
 | 
			
		||||
	
 | 
			
		||||
	const iv = ref('');
 | 
			
		||||
	const wxCode = ref('');
 | 
			
		||||
	const encryptedData = ref('');
 | 
			
		||||
 | 
			
		||||
	// 隐藏原生tabBar
 | 
			
		||||
	uni.hideTabBar({
 | 
			
		||||
@ -133,6 +228,8 @@
 | 
			
		||||
 | 
			
		||||
	const template = computed(() => sheep.$store('app').template.user);
 | 
			
		||||
	const isLogin = computed(() => sheep.$store('user').isLogin);
 | 
			
		||||
	const userInfo = computed(() => sheep.$store('user').userInfo);
 | 
			
		||||
	const authenInfo = computed(() => sheep.$store('user').authenInfo);
 | 
			
		||||
 | 
			
		||||
	onShow(() => {
 | 
			
		||||
		sheep.$store('user').updateUserData();
 | 
			
		||||
@ -146,21 +243,90 @@
 | 
			
		||||
	});
 | 
			
		||||
 | 
			
		||||
	onPageScroll(() => {});
 | 
			
		||||
	
 | 
			
		||||
	// 打开登录的弹框
 | 
			
		||||
	function toLogin() {
 | 
			
		||||
		console.log('toLogin',showLogin.value);
 | 
			
		||||
		console.log('toLogin', showLogin.value);
 | 
			
		||||
		showLogin.value = true;
 | 
			
		||||
		console.log('showLogin',showLogin.value);
 | 
			
		||||
		console.log('showLogin', showLogin.value);
 | 
			
		||||
	}
 | 
			
		||||
	// 关闭登录弹框
 | 
			
		||||
	function closeLogin() {
 | 
			
		||||
		console.log('closeLogin');
 | 
			
		||||
		showLogin.value = false;
 | 
			
		||||
	}
 | 
			
		||||
	// 打开登录的弹框
 | 
			
		||||
	function openLogin() {
 | 
			
		||||
		console.log('openLogin');
 | 
			
		||||
		showLogin.value = true;
 | 
			
		||||
	}
 | 
			
		||||
	// 使用微信手机号
 | 
			
		||||
	async function getPhoneNumber(e) {
 | 
			
		||||
		console.log('获取手机号', e, e.detail.errMsg);
 | 
			
		||||
		if (e.detail.errMsg !== 'getPhoneNumber:ok') {} else {
 | 
			
		||||
			encryptedData.value = e.detail.encryptedData // 用于解密
 | 
			
		||||
			iv.value = e.detail.iv // 用于解密
 | 
			
		||||
			getCode()
 | 
			
		||||
			//    let result = await sheep.$platform.useProvider().bindUserPhoneNumber(e.detail);
 | 
			
		||||
			// console.log('result', result);
 | 
			
		||||
			//    if (result) {
 | 
			
		||||
			//      sheep.$store('user').getInfo();
 | 
			
		||||
			//      // closeAuthModal();
 | 
			
		||||
			//   closeLogin();
 | 
			
		||||
			//    }
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	// 获取code和sessionId
 | 
			
		||||
	function getCode() {
 | 
			
		||||
		uni.login({
 | 
			
		||||
			provider: 'weixin',
 | 
			
		||||
			success: (res) => {
 | 
			
		||||
				wxCode.value = res.code
 | 
			
		||||
				// loginResult.value = res
 | 
			
		||||
				// getSessionId();
 | 
			
		||||
				Login();
 | 
			
		||||
			}
 | 
			
		||||
		})
 | 
			
		||||
	}
 | 
			
		||||
	// 登录接口
 | 
			
		||||
	function Login() {
 | 
			
		||||
		const session_id = uni.getStorageSync('sessionId')
 | 
			
		||||
		console.log('session_id', session_id);
 | 
			
		||||
		return new Promise(async (resolve, reject) => {
 | 
			
		||||
			const {
 | 
			
		||||
				code
 | 
			
		||||
			} = await third.wechat.wxLogin({
 | 
			
		||||
				platform: 'miniProgram',
 | 
			
		||||
				payload: encodeURIComponent(
 | 
			
		||||
					JSON.stringify({
 | 
			
		||||
						sessionId: session_id,
 | 
			
		||||
						iv: iv.value,
 | 
			
		||||
						encryptedData: encryptedData.value,
 | 
			
		||||
						code: wxCode.code,
 | 
			
		||||
					}),
 | 
			
		||||
				),
 | 
			
		||||
			});
 | 
			
		||||
			if (code === 1) {
 | 
			
		||||
				resolve(true);
 | 
			
		||||
				showLogin.value = false;
 | 
			
		||||
			}
 | 
			
		||||
			resolve(false);
 | 
			
		||||
		});
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	//设置跳转页面
 | 
			
		||||
	function toSetting() {
 | 
			
		||||
		console.log('isLogin',isLogin.value);
 | 
			
		||||
		if(isLogin.value == true){
 | 
			
		||||
			uni.navigateTo({
 | 
			
		||||
				url:'/pages/user/info'
 | 
			
		||||
			})
 | 
			
		||||
		}else {
 | 
			
		||||
			uni.showToast({
 | 
			
		||||
				title: '请先登录',
 | 
			
		||||
				icon: 'none'
 | 
			
		||||
			})
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
@ -168,7 +334,7 @@
 | 
			
		||||
		width: 70rpx;
 | 
			
		||||
		height: 70rpx;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	.weight4 {
 | 
			
		||||
		font-weight: 400;
 | 
			
		||||
	}
 | 
			
		||||
@ -227,7 +393,7 @@
 | 
			
		||||
	.justify-start {
 | 
			
		||||
		justify-content: start;
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	.myBox {
 | 
			
		||||
		position: fixed;
 | 
			
		||||
		width: 750rpx;
 | 
			
		||||
@ -238,13 +404,15 @@
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.con-center {
 | 
			
		||||
		height: 1314rpx;
 | 
			
		||||
		// padding: 0 30rpx;
 | 
			
		||||
		min-height: 80vh;
 | 
			
		||||
		padding: 30 30rpx;
 | 
			
		||||
 | 
			
		||||
		.header {
 | 
			
		||||
			width: 93%;
 | 
			
		||||
			height: 620rpx;
 | 
			
		||||
			height: 580rpx;
 | 
			
		||||
			padding: 0 30rpx;
 | 
			
		||||
			position: relative;
 | 
			
		||||
			// top: 100rpx;
 | 
			
		||||
			justify-content: space-between;
 | 
			
		||||
			align-items: center;
 | 
			
		||||
			// margin: 0 auto;
 | 
			
		||||
@ -281,7 +449,20 @@
 | 
			
		||||
						justify-content: flex-start;
 | 
			
		||||
						font-weight: 900rpx;
 | 
			
		||||
						align-items: center;
 | 
			
		||||
 | 
			
		||||
						
 | 
			
		||||
						.UnAuthenBox {
 | 
			
		||||
							margin-left: 10rpx;
 | 
			
		||||
							background-color: #EBECEE;
 | 
			
		||||
							border-radius: 8rpx;
 | 
			
		||||
							width: 80rpx;
 | 
			
		||||
							height: 30rpx;
 | 
			
		||||
							color: #8D93B3;
 | 
			
		||||
							display: flex;
 | 
			
		||||
							padding: 5rpx 10rpx 9rpx 10rpx;
 | 
			
		||||
							align-items: center;
 | 
			
		||||
							justify-content: center;
 | 
			
		||||
						}
 | 
			
		||||
						
 | 
			
		||||
 | 
			
		||||
						.authenticationBox {
 | 
			
		||||
							margin-left: 10rpx;
 | 
			
		||||
@ -297,7 +478,7 @@
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
				.head-signInBox {
 | 
			
		||||
					width: 156rpx;
 | 
			
		||||
					height: 70rpx;
 | 
			
		||||
@ -308,7 +489,7 @@
 | 
			
		||||
					background-color: #fff;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					border-radius: 116rpx 0 0 116rpx;
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
					.signInText {
 | 
			
		||||
						font-size: 30rpx;
 | 
			
		||||
						font-weight: 800;
 | 
			
		||||
@ -316,9 +497,9 @@
 | 
			
		||||
						color: #333333;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
				.line {
 | 
			
		||||
					width: 320rpx;
 | 
			
		||||
					height: 1rpx;
 | 
			
		||||
@ -335,7 +516,7 @@
 | 
			
		||||
					line-height: 32rpx;
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
 | 
			
		||||
			.head-secondBox {
 | 
			
		||||
				margin-top: 50rpx;
 | 
			
		||||
				display: flex;
 | 
			
		||||
@ -345,7 +526,7 @@
 | 
			
		||||
				width: 100%;
 | 
			
		||||
				position: relative;
 | 
			
		||||
				top: 190rpx;
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
				.collect {
 | 
			
		||||
					display: grid;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
@ -353,14 +534,14 @@
 | 
			
		||||
					justify-content: center;
 | 
			
		||||
					width: 158rpx;
 | 
			
		||||
					height: 100%;
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
					.collect-num {
 | 
			
		||||
						font-size: 34rpx;
 | 
			
		||||
						font-weight: 800;
 | 
			
		||||
						color: #333333;
 | 
			
		||||
						line-height: 28rpx;
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
					.collect-text {
 | 
			
		||||
						margin-top: 20rpx;
 | 
			
		||||
						font-size: 28rpx;
 | 
			
		||||
@ -369,7 +550,7 @@
 | 
			
		||||
						line-height: 28rpx;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
				.feetPrint {
 | 
			
		||||
					display: grid;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
@ -377,14 +558,14 @@
 | 
			
		||||
					justify-content: center;
 | 
			
		||||
					width: 188rpx;
 | 
			
		||||
					height: 100%;
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
					.feetPrint-num {
 | 
			
		||||
						font-size: 34rpx;
 | 
			
		||||
						font-weight: 800;
 | 
			
		||||
						color: #333333;
 | 
			
		||||
						line-height: 28rpx;
 | 
			
		||||
					}
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
					.feetPrint-text {
 | 
			
		||||
						margin-top: 20rpx;
 | 
			
		||||
						font-size: 28rpx;
 | 
			
		||||
@ -398,40 +579,67 @@
 | 
			
		||||
			.line {}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		.myOrder {
 | 
			
		||||
			width: 630rpx;
 | 
			
		||||
			height: 206rpx;
 | 
			
		||||
			margin: 0 auto;
 | 
			
		||||
			position: relative;
 | 
			
		||||
			bottom: 108rpx;
 | 
			
		||||
			bottom: 90rpx;
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			border-radius: 18rpx;
 | 
			
		||||
			display: block;
 | 
			
		||||
			padding: 40rpx 30rpx;
 | 
			
		||||
			
 | 
			
		||||
 | 
			
		||||
			.myOrder-first {
 | 
			
		||||
				width: 100%;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				justify-content: space-between;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
			}
 | 
			
		||||
			
 | 
			
		||||
 | 
			
		||||
			.myOrder-second {
 | 
			
		||||
				width: 100%;
 | 
			
		||||
				display: flex;
 | 
			
		||||
				margin-top: 40rpx;
 | 
			
		||||
				justify-content: space-between;
 | 
			
		||||
				
 | 
			
		||||
 | 
			
		||||
				.pendingBox {
 | 
			
		||||
					display: block;
 | 
			
		||||
					justify-content: center;
 | 
			
		||||
					align-items: center;
 | 
			
		||||
					
 | 
			
		||||
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
		.sixBox {
 | 
			
		||||
			width: 630rpx;
 | 
			
		||||
			// height: 637rpx;
 | 
			
		||||
			display: block;
 | 
			
		||||
			background-color: #ffffff;
 | 
			
		||||
			border-radius: 18rpx;
 | 
			
		||||
			padding: 30rpx;
 | 
			
		||||
			margin: 0 auto;
 | 
			
		||||
			position: relative;
 | 
			
		||||
			bottom: 50rpx;
 | 
			
		||||
 | 
			
		||||
			.fabuBox {
 | 
			
		||||
				display: flex;
 | 
			
		||||
				align-items: center;
 | 
			
		||||
				justify-content: space-between;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			.line-row {
 | 
			
		||||
				width: 630rpx;
 | 
			
		||||
				height: 1rpx;
 | 
			
		||||
				background: #EEEEEE;
 | 
			
		||||
				border-radius: 0rpx 0rpx 0rpx 0rpx;
 | 
			
		||||
				margin: 30rpx 0;
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -481,10 +689,6 @@
 | 
			
		||||
			align-items: center;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
</style>
 | 
			
		||||
@ -104,7 +104,7 @@
 | 
			
		||||
          </uni-easyinput>
 | 
			
		||||
        </uni-forms-item>
 | 
			
		||||
 | 
			
		||||
        <uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
 | 
			
		||||
       <!-- <uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
 | 
			
		||||
          <uni-easyinput
 | 
			
		||||
            v-model="userInfo.password"
 | 
			
		||||
            :placeholder="userInfo.verification?.password ? '修改登录密码' : '点击设置登录密码'"
 | 
			
		||||
@ -128,7 +128,7 @@
 | 
			
		||||
              </view>
 | 
			
		||||
            </template>
 | 
			
		||||
          </uni-easyinput>
 | 
			
		||||
        </uni-forms-item>
 | 
			
		||||
        </uni-forms-item> -->
 | 
			
		||||
      </view>
 | 
			
		||||
 | 
			
		||||
      <view class="bg-white ss-m-t-14">
 | 
			
		||||
@ -153,7 +153,7 @@
 | 
			
		||||
      </view>
 | 
			
		||||
    </uni-forms>
 | 
			
		||||
 | 
			
		||||
    <view v-if="sheep.$platform.name !== 'H5'">
 | 
			
		||||
    <!-- <view v-if="sheep.$platform.name !== 'H5'">
 | 
			
		||||
      <view class="title-box ss-p-l-30">第三方账号绑定</view>
 | 
			
		||||
 | 
			
		||||
      <view class="account-list ss-flex ss-row-between">
 | 
			
		||||
@ -204,11 +204,12 @@
 | 
			
		||||
          </view>
 | 
			
		||||
        </view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </view>
 | 
			
		||||
    </view> -->
 | 
			
		||||
 | 
			
		||||
    <su-fixed bottom placeholder bg="none">
 | 
			
		||||
      <view class="footer-box ss-p-20">
 | 
			
		||||
        <button class="ss-rest-button logout-btn ui-Shadow-Main" @tap="onSubmit">保存</button>
 | 
			
		||||
        <button class="ss-rest-button logout-btn " @click="onSubmit">保存</button>
 | 
			
		||||
		<button class="ss-rest-button exit-btn " @click="onLogout">退出登录</button>
 | 
			
		||||
      </view>
 | 
			
		||||
    </su-fixed>
 | 
			
		||||
  </s-layout>
 | 
			
		||||
@ -339,6 +340,23 @@ const getUserInfo = async () => {
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
//退出登录
 | 
			
		||||
function onLogout() {
 | 
			
		||||
    uni.showModal({
 | 
			
		||||
      title: '提示',
 | 
			
		||||
      content: '确认退出账号?',
 | 
			
		||||
      success: async function (res) {
 | 
			
		||||
        if (res.confirm) {
 | 
			
		||||
          const result = await sheep.$store('user').logout();
 | 
			
		||||
          if (result) {
 | 
			
		||||
            sheep.$router.go('/pages/index/user');
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
onBeforeMount(async () => {
 | 
			
		||||
  getUserInfo();
 | 
			
		||||
});
 | 
			
		||||
@ -394,13 +412,25 @@ onBeforeMount(async () => {
 | 
			
		||||
.logout-btn {
 | 
			
		||||
  width: 710rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  background: linear-gradient(90deg, var(--ui-BG-Main), var(--ui-BG-Main-gradient));
 | 
			
		||||
  background: linear-gradient(90deg,#FCCA58, #FFBD25);
 | 
			
		||||
  border-radius: 40rpx;
 | 
			
		||||
  font-size: 30rpx;
 | 
			
		||||
  font-weight: 500;
 | 
			
		||||
  color: $white;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.exit-btn {
 | 
			
		||||
  width: 710rpx;
 | 
			
		||||
  height: 80rpx;
 | 
			
		||||
  background: #ffffff;
 | 
			
		||||
  border-radius: 40rpx;
 | 
			
		||||
  border: 2rpx solid #999999;
 | 
			
		||||
  font-size: 30rpx;
 | 
			
		||||
  font-weight: 800;
 | 
			
		||||
  color: #999999;
 | 
			
		||||
  margin-top: 30rpx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.radio-dark {
 | 
			
		||||
  filter: grayscale(100%);
 | 
			
		||||
  filter: gray;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										13
									
								
								sheep/api/login.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								sheep/api/login.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,13 @@
 | 
			
		||||
import request from '@/sheep/request';
 | 
			
		||||
import $platform from '@/sheep/platform';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
	
 | 
			
		||||
	wxLogin: (path) =>
 | 
			
		||||
      `${baseUrl}${apiPath}third.wechat/loginByMobile?platform=miniProgram&payload=${encodeURIComponent(
 | 
			
		||||
        JSON.stringify({
 | 
			
		||||
          path,
 | 
			
		||||
        }),
 | 
			
		||||
      )}`,
 | 
			
		||||
	
 | 
			
		||||
};
 | 
			
		||||
@ -1,129 +1,149 @@
 | 
			
		||||
import request from '@/sheep/request';
 | 
			
		||||
import { baseUrl, apiPath } from '@/sheep/config';
 | 
			
		||||
import {
 | 
			
		||||
	baseUrl,
 | 
			
		||||
	apiPath
 | 
			
		||||
} from '@/sheep/config';
 | 
			
		||||
 | 
			
		||||
export default {
 | 
			
		||||
  // 微信相关
 | 
			
		||||
  wechat: {
 | 
			
		||||
    // 第三方登录
 | 
			
		||||
    login: (params, data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/login',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        params,
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '登陆中',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
	// 微信相关
 | 
			
		||||
	wechat: {
 | 
			
		||||
		// 第三方登录
 | 
			
		||||
		login: (params, data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/login',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				params,
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '登陆中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 绑定微信
 | 
			
		||||
    bind: (params, data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/bind',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
		    params,
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '绑定中',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 绑定微信
 | 
			
		||||
		bind: (params, data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/bind',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				params,
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '绑定中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 解除绑定微信
 | 
			
		||||
    unbind: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/unbind',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '解除绑定',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 解除绑定微信
 | 
			
		||||
		unbind: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/unbind',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '解除绑定',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 公众号授权
 | 
			
		||||
    oauthLogin: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/oauthLogin',
 | 
			
		||||
        method: 'GET',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '登陆中',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 公众号授权
 | 
			
		||||
		oauthLogin: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/oauthLogin',
 | 
			
		||||
				method: 'GET',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '登陆中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 获取小程序sessionKey(后端不会给前端返回真实的sessionKey)
 | 
			
		||||
    getSessionId: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/getSessionId',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showLoading: false,
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 获取小程序sessionKey(后端不会给前端返回真实的sessionKey)
 | 
			
		||||
		getSessionId: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/getSessionId',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showLoading: false,
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 微信小程序 绑定一键获取的手机号
 | 
			
		||||
    bindUserPhoneNumber: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/bindUserPhoneNumber',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '获取中',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 微信小程序 绑定一键获取的手机号
 | 
			
		||||
		bindUserPhoneNumber: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/bindUserPhoneNumber',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '获取中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 网页jssdk
 | 
			
		||||
    jssdk: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/jssdk',
 | 
			
		||||
        method: 'GET',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showError: false,
 | 
			
		||||
          showLoading: false,
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 网页jssdk
 | 
			
		||||
		jssdk: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/jssdk',
 | 
			
		||||
				method: 'GET',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showError: false,
 | 
			
		||||
					showLoading: false,
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 小程序订阅消息
 | 
			
		||||
    subscribeTemplate: (params) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.wechat/subscribeTemplate',
 | 
			
		||||
        method: 'GET',
 | 
			
		||||
        params: {
 | 
			
		||||
          platform: 'miniProgram',
 | 
			
		||||
        },
 | 
			
		||||
        custom: {
 | 
			
		||||
          showError: false,
 | 
			
		||||
          showLoading: false,
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
		// 小程序订阅消息
 | 
			
		||||
		subscribeTemplate: (params) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/subscribeTemplate',
 | 
			
		||||
				method: 'GET',
 | 
			
		||||
				params: {
 | 
			
		||||
					platform: 'miniProgram',
 | 
			
		||||
				},
 | 
			
		||||
				custom: {
 | 
			
		||||
					showError: false,
 | 
			
		||||
					showLoading: false,
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
 | 
			
		||||
    // 获取微信小程序码
 | 
			
		||||
    getWxacode: (path) =>
 | 
			
		||||
      `${baseUrl}${apiPath}third.wechat/wxacode?platform=miniProgram&payload=${encodeURIComponent(
 | 
			
		||||
		// 获取微信小程序码
 | 
			
		||||
		getWxacode: (path) =>
 | 
			
		||||
			`${baseUrl}${apiPath}third.wechat/wxacode?platform=miniProgram&payload=${encodeURIComponent(
 | 
			
		||||
        JSON.stringify({
 | 
			
		||||
          path,
 | 
			
		||||
        }),
 | 
			
		||||
      )}`,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // 苹果相关
 | 
			
		||||
  apple: {
 | 
			
		||||
    // 第三方登录
 | 
			
		||||
    login: (data) =>
 | 
			
		||||
      request({
 | 
			
		||||
        url: 'third.apple/login',
 | 
			
		||||
        method: 'POST',
 | 
			
		||||
        data,
 | 
			
		||||
        custom: {
 | 
			
		||||
          showSuccess: true,
 | 
			
		||||
          loadingMsg: '登陆中',
 | 
			
		||||
        },
 | 
			
		||||
      }),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
		//自定义的登录接口
 | 
			
		||||
		wxLogin: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.wechat/loginByMobile',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '登录中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
	// 苹果相关
 | 
			
		||||
	apple: {
 | 
			
		||||
		// 第三方登录
 | 
			
		||||
		login: (data) =>
 | 
			
		||||
			request({
 | 
			
		||||
				url: 'third.apple/login',
 | 
			
		||||
				method: 'POST',
 | 
			
		||||
				data,
 | 
			
		||||
				custom: {
 | 
			
		||||
					showSuccess: true,
 | 
			
		||||
					loadingMsg: '登陆中',
 | 
			
		||||
				},
 | 
			
		||||
			}),
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
@ -11,6 +11,15 @@ export default {
 | 
			
		||||
        auth: true,
 | 
			
		||||
      },
 | 
			
		||||
    }),
 | 
			
		||||
	authen: () =>
 | 
			
		||||
	  request({
 | 
			
		||||
	    url: 'meal.auth/info',
 | 
			
		||||
	    method: 'GET',
 | 
			
		||||
	    custom: {
 | 
			
		||||
	      showLoading: false,
 | 
			
		||||
	      auth: true,
 | 
			
		||||
	    },
 | 
			
		||||
	  }),
 | 
			
		||||
  update: (data) =>
 | 
			
		||||
    request({
 | 
			
		||||
      url: 'user.user/update',
 | 
			
		||||
@ -337,4 +346,6 @@ export default {
 | 
			
		||||
        auth: true,
 | 
			
		||||
      },
 | 
			
		||||
    }),
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@ -1,15 +1,15 @@
 | 
			
		||||
<!-- 绑定/更换手机号 changeMobile  -->
 | 
			
		||||
<template>
 | 
			
		||||
  <view>
 | 
			
		||||
    <!-- 标题栏 -->
 | 
			
		||||
    <!-- 标题栏 
 | 
			
		||||
    <view class="head-box ss-m-b-60">
 | 
			
		||||
      <view class="head-title ss-m-b-20">
 | 
			
		||||
        {{ userInfo.verification.mobile ? '更换手机号' : '绑定手机号' }}
 | 
			
		||||
      </view>
 | 
			
		||||
      <view class="head-subtitle">为了您的账号安全,请使用本人手机号码</view>
 | 
			
		||||
    </view>
 | 
			
		||||
    </view>-->
 | 
			
		||||
 | 
			
		||||
    <!-- 表单项 -->
 | 
			
		||||
    <!-- 表单项 
 | 
			
		||||
    <uni-forms
 | 
			
		||||
      ref="changeMobileRef"
 | 
			
		||||
      v-model="state.model"
 | 
			
		||||
@ -54,14 +54,15 @@
 | 
			
		||||
        </uni-easyinput>
 | 
			
		||||
      </uni-forms-item>
 | 
			
		||||
    </uni-forms>
 | 
			
		||||
    <button
 | 
			
		||||
    -->
 | 
			
		||||
	<!-- <button
 | 
			
		||||
      v-if="'WechatMiniProgram' === sheep.$platform.name"
 | 
			
		||||
      class="ss-reset-button type-btn"
 | 
			
		||||
      open-type="getPhoneNumber"
 | 
			
		||||
      @getphonenumber="getPhoneNumber"
 | 
			
		||||
    >
 | 
			
		||||
      使用微信手机号
 | 
			
		||||
    </button>
 | 
			
		||||
    </button> -->
 | 
			
		||||
  </view>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -2,12 +2,12 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <view>
 | 
			
		||||
    <!-- 标题栏 -->
 | 
			
		||||
    <view class="head-box ss-m-b-60">
 | 
			
		||||
    <!-- <view class="head-box ss-m-b-60">
 | 
			
		||||
      <view class="head-title ss-m-b-20">重置密码</view>
 | 
			
		||||
      <view class="head-subtitle">为了您的账号安全,设置密码前请先进行安全验证</view>
 | 
			
		||||
    </view>
 | 
			
		||||
    </view> -->
 | 
			
		||||
 | 
			
		||||
    <!-- 表单项 -->
 | 
			
		||||
    <!-- 表单项 
 | 
			
		||||
    <uni-forms
 | 
			
		||||
      ref="resetPasswordRef"
 | 
			
		||||
      v-model="state.model"
 | 
			
		||||
@ -61,10 +61,10 @@
 | 
			
		||||
        </uni-easyinput>
 | 
			
		||||
      </uni-forms-item>
 | 
			
		||||
    </uni-forms>
 | 
			
		||||
 | 
			
		||||
    <button v-if="!isLogin" class="ss-reset-button type-btn" @tap="showAuthModal('accountLogin')">
 | 
			
		||||
-->
 | 
			
		||||
    <!-- <button v-if="!isLogin" class="ss-reset-button type-btn" @tap="showAuthModal('accountLogin')">
 | 
			
		||||
      返回登录
 | 
			
		||||
    </button>
 | 
			
		||||
    </button> -->
 | 
			
		||||
  </view>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,49 +1,58 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <!-- 规格弹窗 -->
 | 
			
		||||
  <su-popup :show="authType !== ''" round="10" :showClose="true" @close="closeAuthModal">
 | 
			
		||||
  <su-popup :show="showLogin == true" type="center" round="10" :isMaskClick="false">
 | 
			
		||||
  	<view class="popup">
 | 
			
		||||
  		<button class="texbut" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
 | 
			
		||||
  			授权登录
 | 
			
		||||
  		</button>
 | 
			
		||||
  	</view>
 | 
			
		||||
  </su-popup>
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
  <!-- <su-popup :show="authType !== ''" round="10" :showClose="true" @close="closeAuthModal">
 | 
			
		||||
    <view class="login-wrap">
 | 
			
		||||
      <!-- 1. 账号密码登录 accountLogin -->
 | 
			
		||||
      1. 账号密码登录 accountLogin
 | 
			
		||||
      <account-login
 | 
			
		||||
        v-if="authType === 'accountLogin'"
 | 
			
		||||
        :agreeStatus="state.protocol"
 | 
			
		||||
        @onConfirm="onConfirm"
 | 
			
		||||
      />
 | 
			
		||||
 | 
			
		||||
      <!-- 2.短信登录  smsLogin -->
 | 
			
		||||
      2.短信登录  smsLogin
 | 
			
		||||
      <sms-login
 | 
			
		||||
        v-if="authType === 'smsLogin'"
 | 
			
		||||
        :agreeStatus="state.protocol"
 | 
			
		||||
        @onConfirm="onConfirm"
 | 
			
		||||
      />
 | 
			
		||||
 | 
			
		||||
      <!-- 3.短信注册 smsRegister-->
 | 
			
		||||
      3.短信注册 smsRegister
 | 
			
		||||
      <sms-register
 | 
			
		||||
        v-if="authType === 'smsRegister'"
 | 
			
		||||
        :agreeStatus="state.protocol"
 | 
			
		||||
        @onConfirm="onConfirm"
 | 
			
		||||
      />
 | 
			
		||||
 | 
			
		||||
      <!-- 4.忘记密码 resetPassword-->
 | 
			
		||||
      4.忘记密码 resetPassword
 | 
			
		||||
      <reset-password v-if="authType === 'resetPassword'" />
 | 
			
		||||
 | 
			
		||||
      <!-- 5.绑定手机号 changeMobile -->
 | 
			
		||||
      5.绑定手机号 changeMobile
 | 
			
		||||
      <change-mobile v-if="authType === 'changeMobile'" />
 | 
			
		||||
 | 
			
		||||
      <!-- 6.修改密码 changePassword-->
 | 
			
		||||
      6.修改密码 changePassword
 | 
			
		||||
      <change-password v-if="authType === 'changePassword'" />
 | 
			
		||||
 | 
			
		||||
      <!-- 7.修改用户名 changeUsername-->
 | 
			
		||||
      7.修改用户名 changeUsername
 | 
			
		||||
      <change-username v-if="authType === 'changeUsername'" />
 | 
			
		||||
 | 
			
		||||
      <!-- 8.微信小程序授权 mpAuthorization-->
 | 
			
		||||
      8.微信小程序授权 mpAuthorization
 | 
			
		||||
      <mp-authorization v-if="authType === 'mpAuthorization'" />
 | 
			
		||||
 | 
			
		||||
      <!-- 第三方登录+注册 -->
 | 
			
		||||
      第三方登录+注册
 | 
			
		||||
      <view
 | 
			
		||||
        v-if="['accountLogin', 'smsLogin'].includes(authType)"
 | 
			
		||||
        class="auto-login-box ss-flex ss-flex-col ss-row-center ss-col-center"
 | 
			
		||||
      >
 | 
			
		||||
        <!-- 立即注册&快捷登录 TextButton -->
 | 
			
		||||
        立即注册&快捷登录 TextButton
 | 
			
		||||
        <view v-if="sheep.$platform.name === 'WechatMiniProgram'" class="ss-flex register-box">
 | 
			
		||||
          <view class="register-title">还没有账号?</view>
 | 
			
		||||
          <button class="ss-reset-button register-btn" @tap="showAuthModal('smsRegister')"
 | 
			
		||||
@ -62,7 +71,7 @@
 | 
			
		||||
          立即注册
 | 
			
		||||
        </button>
 | 
			
		||||
 | 
			
		||||
        <!-- 公众号|App微信登录 -->
 | 
			
		||||
        公众号|App微信登录
 | 
			
		||||
        <button
 | 
			
		||||
          v-if="
 | 
			
		||||
            ['WechatOfficialAccount', 'App'].includes(sheep.$platform.name) &&
 | 
			
		||||
@ -77,7 +86,7 @@
 | 
			
		||||
          ></image>
 | 
			
		||||
        </button>
 | 
			
		||||
 | 
			
		||||
        <!-- iOS登录 -->
 | 
			
		||||
        iOS登录
 | 
			
		||||
        <button
 | 
			
		||||
          v-if="sheep.$platform.os === 'ios' && sheep.$platform.name === 'App'"
 | 
			
		||||
          @tap="thirdLogin('apple')"
 | 
			
		||||
@ -122,7 +131,7 @@
 | 
			
		||||
      </view>
 | 
			
		||||
      <view class="safe-box"></view>
 | 
			
		||||
    </view>
 | 
			
		||||
  </su-popup>
 | 
			
		||||
  </su-popup> -->
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script setup>
 | 
			
		||||
@ -265,4 +274,50 @@
 | 
			
		||||
  .agreement-text {
 | 
			
		||||
    color: $dark-9;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  .popup {
 | 
			
		||||
  	background-image: url('https://jiangxiaoxian.0rui.cn/showLogin.png');
 | 
			
		||||
  	background-size: 100%;
 | 
			
		||||
  	width: 600rpx;
 | 
			
		||||
  	height: 640rpx;
 | 
			
		||||
  	display: flex;
 | 
			
		||||
  	padding-bottom: 44rpx;
 | 
			
		||||
  	flex-direction: column;
 | 
			
		||||
  	align-items: baseline;
 | 
			
		||||
  	justify-content: flex-end;
 | 
			
		||||
  	padding-left: 73rpx;
 | 
			
		||||
  	padding-right: 73rpx;
 | 
			
		||||
  
 | 
			
		||||
  	.img_shouquan {
 | 
			
		||||
  		position: absolute;
 | 
			
		||||
  		width: 680rpx;
 | 
			
		||||
  		height: 857rpx;
 | 
			
		||||
  		left: -25rpx;
 | 
			
		||||
  		top: -390rpx;
 | 
			
		||||
  	}
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
  	#txt2 {
 | 
			
		||||
  		text-align: center;
 | 
			
		||||
  		margin-top: 200rpx;
 | 
			
		||||
  		font-size: 28rpx;
 | 
			
		||||
  		color: #525252;
 | 
			
		||||
  		margin-bottom: 60rpx;
 | 
			
		||||
  		position: relative;
 | 
			
		||||
  		font-weight: 500;
 | 
			
		||||
  	}
 | 
			
		||||
  
 | 
			
		||||
  	.texbut {
 | 
			
		||||
  		width: 507rpx;
 | 
			
		||||
  		height: 90rpx;
 | 
			
		||||
  		border-radius: 45rpx;
 | 
			
		||||
  		background: #ffbd25;
 | 
			
		||||
  		font-size: 34rpx;
 | 
			
		||||
  		color: #3d3d3d;
 | 
			
		||||
  		font-weight: bold;
 | 
			
		||||
  		display: flex;
 | 
			
		||||
  		justify-content: center;
 | 
			
		||||
  		align-items: center;
 | 
			
		||||
  	}
 | 
			
		||||
  }
 | 
			
		||||
</style>
 | 
			
		||||
 | 
			
		||||
@ -50,7 +50,7 @@
 | 
			
		||||
 | 
			
		||||
    <view class="page-modal">
 | 
			
		||||
      <!-- 全局授权弹窗 -->
 | 
			
		||||
      <s-auth-modal />
 | 
			
		||||
      <!-- <s-auth-modal /> -->
 | 
			
		||||
      <!-- 全局分享弹窗 -->
 | 
			
		||||
      <s-share-modal :shareInfo="shareInfo" />
 | 
			
		||||
      <!-- 全局快捷入口 -->
 | 
			
		||||
 | 
			
		||||
@ -63,9 +63,18 @@ const user = defineStore({
 | 
			
		||||
      const { code, data } = await userApi.profile();
 | 
			
		||||
      if (code !== 1) return;
 | 
			
		||||
      this.userInfo = data;
 | 
			
		||||
 | 
			
		||||
	  this.getAuthenInfo();
 | 
			
		||||
      return Promise.resolve(data);
 | 
			
		||||
    },
 | 
			
		||||
	
 | 
			
		||||
	// 获取个人认证信息
 | 
			
		||||
	async getAuthenInfo() {
 | 
			
		||||
	  const { code, data } = await userApi.authen();
 | 
			
		||||
	  if (code !== 1) return;
 | 
			
		||||
	  this.authenInfo = data;
 | 
			
		||||
	  // this.authenInfo();
 | 
			
		||||
	  return Promise.resolve(data);
 | 
			
		||||
	},
 | 
			
		||||
 | 
			
		||||
    // 获取分销商信息
 | 
			
		||||
    async getAgentInfo() {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user