Fix uniapp v2 login and sass compatibility
This commit is contained in:
@@ -505,8 +505,8 @@
|
||||
margin: 0rpx 20rpx 0rpx 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
/deep/ .uni-input-placeholder,
|
||||
/deep/ .uni-input-input{
|
||||
::v-deep .uni-input-placeholder,
|
||||
::v-deep .uni-input-input{
|
||||
color: #bbb;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
width: 28rpx;
|
||||
|
||||
@@ -640,7 +640,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
width: 28rpx;
|
||||
|
||||
@@ -96,7 +96,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
width: 28rpx;
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
color: #fff !important;
|
||||
@@ -380,7 +380,7 @@
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
/deep/checkbox .uni-checkbox-input {
|
||||
::v-deep checkbox .uni-checkbox-input {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -610,7 +610,7 @@
|
||||
// radio-group{
|
||||
// display: flex;
|
||||
// }
|
||||
/deep/ uni-radio-input{
|
||||
::v-deep uni-radio-input{
|
||||
margin-right: 12rpx;
|
||||
.uni-radio-input.uni-radio-input-checked:before {
|
||||
font-size: 26rpx;
|
||||
@@ -646,7 +646,7 @@
|
||||
input{
|
||||
text-align: right;
|
||||
}
|
||||
/deep/.uni-input-input{
|
||||
::v-deep .uni-input-input{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
.picker{
|
||||
|
||||
@@ -457,7 +457,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.disabled .uni-radio-input {
|
||||
::v-deep .disabled .uni-radio-input {
|
||||
background-color: #F8F8F8;
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
/deep/.recommend{
|
||||
::v-deep .recommend{
|
||||
padding: 40rpx 20rpx 0 20rpx;
|
||||
}
|
||||
.my-account{
|
||||
|
||||
@@ -220,7 +220,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
/deep/.uni-switch-input {
|
||||
::v-deep .uni-switch-input {
|
||||
width: 84rpx;
|
||||
height: 48rpx;
|
||||
margin: -8rpx 0;
|
||||
|
||||
@@ -497,12 +497,12 @@
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
|
||||
.distribution-posters /deep/.active {
|
||||
.distribution-posters ::v-deep .active {
|
||||
transform: none;
|
||||
transition: all 0.2s ease-in 0s;
|
||||
}
|
||||
|
||||
.distribution-posters /deep/ .quiet {
|
||||
.distribution-posters ::v-deep .quiet {
|
||||
transform: scale(0.89);
|
||||
transition: all 0.2s ease-in 0s;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/deep/uni-radio .uni-radio-input {
|
||||
::v-deep uni-radio .uni-radio-input {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -384,7 +384,7 @@
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
color: #fff !important;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<button hover-class="none" @tap="wechatLogin" class="bg-color btn1">授权登录</button>
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef MP -->
|
||||
<template v-if="configData.wechat_auth_switch">
|
||||
<template v-if="isWechatAuth">
|
||||
<button hover-class="none" v-if="bindPhone" open-type="getPhoneNumber" @getphonenumber="getphonenumber"
|
||||
class="bg-color btn1">授权登录</button>
|
||||
<button hover-class="none" v-else-if="!bindPhone" @tap="getAuthLogin"
|
||||
@@ -39,7 +39,7 @@
|
||||
<button v-else hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo"
|
||||
class="bg-color btn1">授权登录</button>
|
||||
</template>
|
||||
<button v-if="configData.phone_auth_switch" hover-class="none" @tap="phoneLogin" class="btn2">手机号登录</button>
|
||||
<button v-if="isPhoneAuth" hover-class="none" @tap="phoneLogin" class="btn2">手机号登录</button>
|
||||
<button hover-class="none" @tap="cancelLogin" class="btn3">取消登录</button>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
@@ -117,7 +117,7 @@
|
||||
canUseGetUserProfile: false,
|
||||
canGetPrivacySetting: false,
|
||||
mp_is_new: this.$Cache.get('MP_VERSION_ISNEW') || false,
|
||||
configData: this.$Cache.get('BASIC_CONFIG'),
|
||||
configData: this.$Cache.get('BASIC_CONFIG') || {},
|
||||
imgHost: HTTP_REQUEST_URL,
|
||||
loginBg:'',
|
||||
protocol: false,
|
||||
@@ -129,6 +129,26 @@
|
||||
editUserModal,
|
||||
privacyAgreementPopup
|
||||
},
|
||||
computed: {
|
||||
routineAuthTypes() {
|
||||
const types = this.configData.routine_auth_type;
|
||||
if (Array.isArray(types)) return types.map(item => Number(item));
|
||||
if (typeof types === 'string') return types.split(',').map(item => Number(item));
|
||||
return [];
|
||||
},
|
||||
hasAuthConfig() {
|
||||
return this.routineAuthTypes.length > 0 ||
|
||||
this.configData.wechat_auth_switch !== undefined ||
|
||||
this.configData.phone_auth_switch !== undefined;
|
||||
},
|
||||
isWechatAuth() {
|
||||
if (!this.hasAuthConfig) return true;
|
||||
return Number(this.configData.wechat_auth_switch) === 1 || this.routineAuthTypes.includes(1);
|
||||
},
|
||||
isPhoneAuth() {
|
||||
return Number(this.configData.phone_auth_switch) === 1 || this.routineAuthTypes.includes(2);
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
if (uni.getUserProfile) {
|
||||
this.canUseGetUserProfile = true
|
||||
@@ -556,7 +576,7 @@
|
||||
page {
|
||||
background: #fff;
|
||||
}
|
||||
/deep/ checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
::v-deep checkbox .wx-checkbox-input.wx-checkbox-input-checked {
|
||||
border: 1px solid var(--view-theme) !important;
|
||||
background-color: var(--view-theme) !important;
|
||||
width: 28rpx;
|
||||
|
||||
Reference in New Issue
Block a user