'样式调整功能去除'

This commit is contained in:
gonghaoxing 2025-10-28 20:22:50 +08:00
parent e636a50c4a
commit 03ef33c8af
3 changed files with 8 additions and 238 deletions

View File

@ -197,22 +197,13 @@
uni.removeStorageSync('userInfo');
}
// loading
const loadingTitle = isParamChanged ? '切换用户中...' : '建行登录中...';
uni.showLoading({
title: loadingTitle,
mask: true,
});
// API
// APIloading
const result = await sheep.$api.third.ccbLogin({
ccbParamSJ: ccbParamSJ,
cityid: cityid || '360100',
CITYID: cityid || '360100',
});
uni.hideLoading();
if (result.code === 1) {
console.log('[CCB] 登录成功');
@ -239,13 +230,6 @@
// 使awaitUI
userStore.setToken(result.data.token);
//
uni.showToast({
title: `登录成功`,
icon: 'success',
duration: 2000,
});
// URL
const cleanUrl = window.location.origin + '/pages/index/index';
window.history.replaceState({}, '', cleanUrl);
@ -254,17 +238,10 @@
}
} catch (error) {
console.error('[CCB] 登录失败:', error.message || error.msg);
uni.hideLoading();
uni.showModal({
title: isParamChanged ? '切换用户失败' : '登录失败',
content: error.message || error.msg || '请检查网络连接',
showCancel: false,
complete: () => {
const cleanUrl = window.location.origin + '/pages/index/index';
window.history.replaceState({}, '', cleanUrl);
},
});
// URL
const cleanUrl = window.location.origin + '/pages/index/index';
window.history.replaceState({}, '', cleanUrl);
} finally {
isLoggingIn = false;
}

View File

@ -82,53 +82,6 @@
</radio-group>
</view>
</uni-forms-item>
<uni-forms-item name="mobile" label="手机号" @tap="onChangeMobile">
<uni-easyinput
v-model="userInfo.mobile"
placeholder="请绑定手机号"
:inputBorder="false"
disabled
:styles="{ disableColor: '#fff' }"
placeholderStyle="color:#BBBBBB;font-size:28rpx;line-height:normal"
:clearable="false"
>
<template v-slot:right>
<view class="ss-flex ss-col-center">
<su-radio v-if="userInfo.verification?.mobile" :modelValue="true" />
<button v-else class="ss-reset-button ss-flex ss-col-center ss-row-center">
<text class="_icon-forward" style="color: #bbbbbb; font-size: 26rpx"></text>
</button>
</view>
</template>
</uni-easyinput>
</uni-forms-item>
<uni-forms-item name="password" label="登录密码" @tap="onSetPassword">
<uni-easyinput
v-model="userInfo.password"
:placeholder="userInfo.verification?.password ? '修改登录密码' : '点击设置登录密码'"
:inputBorder="false"
:styles="{ disableColor: '#fff' }"
disabled
placeholderStyle="color:#BBBBBB;font-size:28rpx;line-height:normal"
:clearable="false"
>
<template v-slot:right>
<view class="ss-flex ss-col-center">
<su-radio
class="ss-flex"
v-if="userInfo.verification?.password"
:modelValue="true"
/>
<button v-else class="ss-reset-button ss-flex ss-col-center ss-row-center">
<text class="_icon-forward" style="color: #bbbbbb; font-size: 26rpx"></text>
</button>
</view>
</template>
</uni-easyinput>
</uni-forms-item>
</view>
<view class="bg-white ss-m-t-14">
@ -153,59 +106,6 @@
</view>
</uni-forms>
<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">
<view v-if="'WechatOfficialAccount' === sheep.$platform.name" class="ss-flex ss-col-center">
<image
class="list-img"
:src="
sheep.$url.static(
'/assets/addons/shopro/uniapp/platform/WechatOfficialAccount.png',
)
"
/>
<text class="list-name">微信公众号</text>
</view>
<view v-if="'WechatMiniProgram' === sheep.$platform.name" class="ss-flex ss-col-center">
<image
class="list-img"
:src="
sheep.$url.static('/assets/addons/shopro/uniapp/platform/WechatMiniProgram.png')
"
/>
<text class="list-name">微信小程序</text>
</view>
<view v-if="'App' === sheep.$platform.name" class="ss-flex ss-col-center">
<image
class="list-img"
:src="sheep.$url.static('/assets/addons/shopro/uniapp/platform/wechat.png')"
/>
<text class="list-name">微信开放平台</text>
</view>
<view class="ss-flex ss-col-center">
<view class="info ss-flex ss-col-center" v-if="state.thirdOauthInfo">
<image
class="avatar ss-m-r-20"
:src="sheep.$url.cdn(state.thirdOauthInfo.avatar)"
></image>
<text class="name">{{ state.thirdOauthInfo.nickname }}</text>
</view>
<view class="bind-box ss-m-l-20">
<button
v-if="state.thirdOauthInfo"
class="ss-reset-button relieve-btn"
@tap="unBindThirdOauth"
>
解绑
</button>
<button v-else class="ss-reset-button bind-btn" @tap="bindThirdOauth">绑定</button>
</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>
@ -215,8 +115,7 @@
</template>
<script setup>
import { computed, ref, reactive, onBeforeMount, unref } from 'vue';
import { mobile, password, username } from '@/sheep/validate/form';
import { computed, reactive, onBeforeMount } from 'vue';
import sheep from '@/sheep';
import { clone } from 'lodash';
import { showAuthModal } from '@/sheep/hooks/useModal';
@ -224,7 +123,6 @@ import { showAuthModal } from '@/sheep/hooks/useModal';
const state = reactive({
model: {},
rules: {},
thirdOauthInfo: null,
});
@ -254,11 +152,6 @@ const onChangeUsername = () => {
!state.model.verification?.username && showAuthModal('changeUsername');
};
//
const onChangeMobile = () => {
showAuthModal('changeMobile');
};
function onChooseAvatar(e) {
const tempUrl = e.detail.avatarUrl || '';
uploadAvatar(tempUrl);
@ -280,41 +173,6 @@ async function uploadAvatar(tempUrl) {
state.model.avatar = url;
}
// /
function onSetPassword() {
if (state.model.verification.password) {
showAuthModal('changePassword');
} else {
showAuthModal('resetPassword');
}
}
//
async function bindThirdOauth() {
let result = await sheep.$platform.useProvider('wechat').bind();
if (result) {
getUserInfo();
}
}
//
function unBindThirdOauth() {
uni.showModal({
title: '解绑提醒',
content: '解绑后您将无法通过微信登录此账号',
cancelText: '再想想',
confirmText: '确定',
success: async function (res) {
if (res.confirm) {
const result = await sheep.$platform.useProvider('wechat').unbind();
if (result) {
getUserInfo();
}
}
},
});
}
//
async function onSubmit() {
const { code, data } = await sheep.$api.user.update({
@ -330,13 +188,6 @@ async function onSubmit() {
const getUserInfo = async () => {
const userInfo = await sheep.$store('user').getInfo();
state.model = clone(userInfo);
if (sheep.$platform.name !== 'H5') {
let { data, code } = await sheep.$api.user.thirdOauthInfo();
if (code === 1) {
state.thirdOauthInfo = data;
}
}
};
onBeforeMount(async () => {
@ -436,64 +287,6 @@ onBeforeMount(async () => {
}
}
//
.account-list {
background-color: $white;
height: 100rpx;
padding: 0 20rpx;
.list-img {
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
}
.list-name {
font-size: 28rpx;
color: #333333;
}
.info {
.avatar {
width: 38rpx;
height: 38rpx;
border-radius: 50%;
overflow: hidden;
}
.name {
font-size: 28rpx;
font-weight: 400;
color: $dark-9;
}
}
.bind-box {
width: 100rpx;
height: 50rpx;
line-height: normal;
display: flex;
justify-content: center;
align-items: center;
font-size: 24rpx;
.bind-btn {
width: 100%;
height: 100%;
border-radius: 25rpx;
background: #f4f4f4;
color: #999999;
}
.relieve-btn {
width: 100%;
height: 100%;
border-radius: 25rpx;
background: var(--ui-BG-Main-opacity-1);
color: var(--ui-BG-Main);
}
}
}
.list-border {
font-size: 28rpx;
font-weight: 400;

View File

@ -22,9 +22,9 @@
</view>
</view>
<view class="right-box ss-m-r-52">
<button class="ss-reset-button" @tap="showShareModal">
<!-- <button class="ss-reset-button" @tap="showShareModal">
<text class="sicon-qrcode"></text>
</button>
</button> -->
</view>
</view>