parent
b8ff83019d
commit
89f64b5418
@ -44,6 +44,21 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "login/user_privacy",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "用户协议",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "login/user_about",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "隐私政策",
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"path": "webview/index",
|
"path": "webview/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -54,9 +54,10 @@
|
|||||||
<view class=" box-border flex" style="margin-top: 50rpx;">
|
<view class=" box-border flex" style="margin-top: 50rpx;">
|
||||||
<view class="hint">
|
<view class="hint">
|
||||||
登录代表同意
|
登录代表同意
|
||||||
<text class="link">
|
<text class="link" >
|
||||||
用户协议、隐私政策,
|
<text @click="userAbount(0)">用户协议、</text ><text @click="userAbount(1)">隐私政策,</text>
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
并授权使用您的账号信息(如昵称、头像、收获地址)以便您统一管理
|
并授权使用您的账号信息(如昵称、头像、收获地址)以便您统一管理
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -79,20 +80,20 @@ isWechat.value = true;
|
|||||||
|
|
||||||
|
|
||||||
const loginType = ref(0);
|
const loginType = ref(0);
|
||||||
const account = ref<string>('18181941463');
|
const account = ref<string>('');
|
||||||
const code = ref<string>('1234');
|
const code = ref<string>('');
|
||||||
const password = ref<string>('123456');
|
const password = ref<string>('');
|
||||||
|
|
||||||
const tips = ref<string>();
|
const tips = ref<string>('');
|
||||||
const uCodeRef = ref<InstanceType<typeof uCode> | null>(null);
|
const uCodeRef = ref<InstanceType<typeof uCode> | null>(null);
|
||||||
let redirect = HOME_PATH;
|
let redirect = HOME_PATH;
|
||||||
|
|
||||||
const inputStyle = computed<CSSProperties>(() => {
|
const inputStyle = computed<CSSProperties>(() => {
|
||||||
const style = {} as CSSProperties;
|
const style = {} as CSSProperties;
|
||||||
if (account.value && code.value) {
|
// if (account.value && code.value) {
|
||||||
style.color = '#fff';
|
style.color = '#fff';
|
||||||
style.backgroundColor = uni.$u.color.success;
|
style.backgroundColor = uni.$u.color.success;
|
||||||
}
|
// }
|
||||||
return style;
|
return style;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -123,7 +124,19 @@ function getCode () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//点击详情
|
||||||
|
function userAbount (type ) {
|
||||||
|
|
||||||
|
if(type===0){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/common/login/user_privacy`
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/common/login/user_about`
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
async function wechatLogin () {
|
async function wechatLogin () {
|
||||||
if (isWechat.value === true) {
|
if (isWechat.value === true) {
|
||||||
if (!uni.$u.test.mobile(Number(account.value))) {
|
if (!uni.$u.test.mobile(Number(account.value))) {
|
||||||
@ -167,8 +180,21 @@ async function wechatLogin () {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (isLogin()) {
|
||||||
|
// await userStore.info()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.$u.route({
|
||||||
|
type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
|
||||||
|
url: redirect,
|
||||||
|
});
|
||||||
|
}, 800);
|
||||||
|
} else {
|
||||||
|
uni.$u.toast('登录失败,请重新登录 ');
|
||||||
|
setToken('');
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log('222微信登录');
|
|
||||||
uni.login({
|
uni.login({
|
||||||
provider: 'weixin',
|
provider: 'weixin',
|
||||||
// onlyAuthorize: true,// 微信登录仅请求授权认证
|
// onlyAuthorize: true,// 微信登录仅请求授权认证
|
||||||
@ -193,6 +219,18 @@ async function wechatLogin () {
|
|||||||
// setToken(token.token_type+' '+token.token);
|
// setToken(token.token_type+' '+token.token);
|
||||||
// }
|
// }
|
||||||
uni.$u.toast('登录成功');
|
uni.$u.toast('登录成功');
|
||||||
|
if (isLogin()) {
|
||||||
|
// await userStore.info()
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.$u.route({
|
||||||
|
type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
|
||||||
|
url: redirect,
|
||||||
|
});
|
||||||
|
}, 800);
|
||||||
|
} else {
|
||||||
|
uni.$u.toast(`登录失败,${res.msg}`);
|
||||||
|
setToken('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uni.$u.toast(`登录失败,${res.msg}`);
|
uni.$u.toast(`登录失败,${res.msg}`);
|
||||||
@ -208,18 +246,6 @@ async function wechatLogin () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (isLogin()) {
|
|
||||||
// await userStore.info()
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.$u.route({
|
|
||||||
type: isTabBarPath(redirect) ? 'switchTab' : 'redirectTo',
|
|
||||||
url: redirect,
|
|
||||||
});
|
|
||||||
}, 800);
|
|
||||||
} else {
|
|
||||||
uni.$u.toast('登录失败,请重新登录 ');
|
|
||||||
setToken('');
|
|
||||||
}
|
|
||||||
|
|
||||||
// setToken('1234567890');
|
// setToken('1234567890');
|
||||||
|
|
||||||
|
54
src/pages/common/login/user_about.vue
Normal file
54
src/pages/common/login/user_about.vue
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<style>
|
||||||
|
.flex-sub-cart {
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
/* height: 100%; */
|
||||||
|
bottom: 10rpx;
|
||||||
|
position: fixed;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail_box {
|
||||||
|
border-top: 2rpx solid #dfdfdf;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<view class="fv-page flex-col" style="">
|
||||||
|
<up-navbar class=" " :autoBack="true" style="font-weight: bold;"
|
||||||
|
leftIcon="arrow-left" title="隐私政策" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx"
|
||||||
|
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
|
||||||
|
:fixed="true"></up-navbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from "vue";
|
||||||
|
import { CommonApi, UserApi } from "@/api";
|
||||||
|
import { setToken, getToken, isLogin } from '@/utils/auth';
|
||||||
|
import { image } from "@/uni_modules/uview-plus/libs/function/test";
|
||||||
|
import { url } from "inspector";
|
||||||
|
export default defineComponent({
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (option) {
|
||||||
|
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
54
src/pages/common/login/user_privacy.vue
Normal file
54
src/pages/common/login/user_privacy.vue
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<style>
|
||||||
|
.flex-sub-cart {
|
||||||
|
flex: 1;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
width: 100%;
|
||||||
|
/* height: 100%; */
|
||||||
|
bottom: 10rpx;
|
||||||
|
position: fixed;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail_box {
|
||||||
|
border-top: 2rpx solid #dfdfdf;
|
||||||
|
border-radius: 5rpx;
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<template>
|
||||||
|
<view class="fv-page flex-col" style="">
|
||||||
|
<up-navbar class=" " :autoBack="true" style="font-weight: bold;"
|
||||||
|
leftIcon="arrow-left" title="用户协议" titleColor="#303133" bgColor="#FFFFFFFF" titleWidth="600rpx"
|
||||||
|
height="80rpx" leftIconSize="38rpx" leftIconColor="#303133" :safeAreaInsetTop="true" :placeholder="true"
|
||||||
|
:fixed="true"></up-navbar>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent } from "vue";
|
||||||
|
import { CommonApi, UserApi } from "@/api";
|
||||||
|
import { setToken, getToken, isLogin } from '@/utils/auth';
|
||||||
|
import { image } from "@/uni_modules/uview-plus/libs/function/test";
|
||||||
|
import { url } from "inspector";
|
||||||
|
export default defineComponent({
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (option) {
|
||||||
|
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
Loading…
x
Reference in New Issue
Block a user