测试环境下才有这个测试-账号登陆
This commit is contained in:
@ -31,7 +31,12 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="mt-124rpx mx-60rpx box-border">
|
<view class="mt-124rpx mx-60rpx box-border">
|
||||||
<wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleLogin">立即登录</wd-button>
|
<wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleLogin">立即登录</wd-button>
|
||||||
<!-- <wd-button custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border" @click="Login.handleMobileLogin">测试-账号登录</wd-button> -->
|
<wd-button
|
||||||
|
v-if="env === 'development'"
|
||||||
|
custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border"
|
||||||
|
@click="Login.handleMobileLogin">
|
||||||
|
测试-账号登录
|
||||||
|
</wd-button>
|
||||||
<!-- <wd-button open-type="getUserInfo" @getuserinfo="Login.handleWxLogin" custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border">立即登录</wd-button> -->
|
<!-- <wd-button open-type="getUserInfo" @getuserinfo="Login.handleWxLogin" custom-class="!bg-[#4C9F44] !rounded-8rpx !text-[#fff] !text-30rpx !leading-42rpx !h-90rpx !w-[100%] box-border">立即登录</wd-button> -->
|
||||||
<!-- <view class="text-30rpx font-400 text-[#303133] leading-42rpx text-center mt-32rpx">其它手机号登录</view> -->
|
<!-- <view class="text-30rpx font-400 text-[#303133] leading-42rpx text-center mt-32rpx">其它手机号登录</view> -->
|
||||||
</view>
|
</view>
|
||||||
@ -56,6 +61,7 @@
|
|||||||
import { getMobileByMnp } from '@/api/user'
|
import { getMobileByMnp } from '@/api/user'
|
||||||
|
|
||||||
const OSS = inject('OSS')
|
const OSS = inject('OSS')
|
||||||
|
const env = import.meta.env.VITE_NODE_ENV
|
||||||
|
|
||||||
// 服务协议条款
|
// 服务协议条款
|
||||||
const agree = ref<boolean>(false)
|
const agree = ref<boolean>(false)
|
||||||
@ -134,17 +140,17 @@
|
|||||||
/**
|
/**
|
||||||
* 测试-账号登录
|
* 测试-账号登录
|
||||||
*/
|
*/
|
||||||
// handleMobileLogin: async () => {
|
handleMobileLogin: async () => {
|
||||||
// const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
// console.log("🚀 ~ userStore:", userStore)
|
console.log("🚀 ~ userStore:", userStore)
|
||||||
// const res = await userStore.mobileLogin('15005837859', 1, 2)
|
const res = await userStore.mobileLogin('15005837859', 1, 2)
|
||||||
// if (res) {
|
if (res) {
|
||||||
// uni.setStorageSync('latitude', '30.74744')
|
uni.setStorageSync('latitude', '30.74744')
|
||||||
// uni.setStorageSync('longitude', '120.78483')
|
uni.setStorageSync('longitude', '120.78483')
|
||||||
// toast.info('登录成功')
|
toast.info('登录成功')
|
||||||
// router.navigateBack(1, 500)
|
router.navigateBack(1, 500)
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录成功跳转页面
|
* 登录成功跳转页面
|
||||||
|
|||||||
Reference in New Issue
Block a user