添加收藏茶室接口和完善茶室详情
This commit is contained in:
@ -19,16 +19,18 @@
|
||||
<wd-img :src="`${OSS}images/logo.png`" width="100%" height="100%" mode="aspectFill"></wd-img>
|
||||
</view>
|
||||
<view class="mt-124rpx mx-60rpx box-border">
|
||||
<wd-button open-type="getPhoneNumber" @getphonenumber="login.handleGetPhoneNumber" 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>
|
||||
<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 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>
|
||||
|
||||
<view class="flex items-center mx-32rpx mt-64rpx">
|
||||
<view class="w-32rpx h-32rpx">
|
||||
<wd-checkbox v-model="agree" @change="login.handleAgree" checked-color="#4C9F44" size="large"> </wd-checkbox>
|
||||
<wd-checkbox v-model="agree" @change="Login.handleAgree" checked-color="#4C9F44" size="large"> </wd-checkbox>
|
||||
</view>
|
||||
<view class="font-400 text-26rpx leading-40rpx text-[#8F959E] ml-14rpx flex-1" @click="agree = !agree">
|
||||
我已阅读并同意 <text class="text-[#4C9F44]" @click.stop="login.handleToService">《服务协议》</text> 和<text class="text-[#4C9F44]" @click.stop="login.handleToPrivacy">《隐私政策》</text>,未注册手机号登录后将自动你为您创建账号
|
||||
我已阅读并同意 <text class="text-[#4C9F44]" @click.stop="Login.handleToService">《服务协议》</text> 和<text class="text-[#4C9F44]" @click.stop="Login.handleToPrivacy">《隐私政策》</text>,未注册手机号登录后将自动你为您创建账号
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -36,19 +38,46 @@
|
||||
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { toast } from '@/utils/toast'
|
||||
import { getWxCode } from '@/api/login'
|
||||
import { useUserStore } from '@/store'
|
||||
import { router } from '@/utils/tools'
|
||||
|
||||
const OSS = inject('OSS')
|
||||
|
||||
// 服务协议条款
|
||||
const agree = ref<boolean>(false)
|
||||
|
||||
const login = {
|
||||
const Login = {
|
||||
// 获取手机号
|
||||
handleGetPhoneNumber: (e: object) => {
|
||||
console.log("🚀 ~ e:", e)
|
||||
|
||||
handleLogin: async (e: object) => {
|
||||
if (!agree.value) {
|
||||
toast.info('请同意服务协议和隐私政策')
|
||||
return
|
||||
}
|
||||
|
||||
const userStore = useUserStore()
|
||||
const res = await userStore.wxLogin()
|
||||
if (res) {
|
||||
toast.info('登录成功')
|
||||
router.navigateBack(1, 500)
|
||||
}
|
||||
},
|
||||
|
||||
handleAgree: (e: any) => {
|
||||
console.log('e', e)
|
||||
// 手机登录
|
||||
handleMobileLogin: async () => {
|
||||
const userStore = useUserStore()
|
||||
console.log("🚀 ~ userStore:", userStore)
|
||||
const res = await userStore.mobileLogin('18868040087', 1, 2)
|
||||
if (res) {
|
||||
uni.setStorageSync('latitude', '30.74744')
|
||||
uni.setStorageSync('longitude', '120.78483')
|
||||
toast.info('登录成功')
|
||||
router.navigateBack(1, 500)
|
||||
}
|
||||
},
|
||||
|
||||
handleAgree: async (e: any) => {
|
||||
},
|
||||
|
||||
// 跳转到服务协议页面
|
||||
|
||||
Reference in New Issue
Block a user