继续适配调节

This commit is contained in:
Double-_-Z 2025-02-08 13:39:32 +08:00
parent e8097e42f0
commit 8d1764c264
8 changed files with 51 additions and 13 deletions

View File

@ -87,11 +87,16 @@ export default {
}, },
// #endif // #endif
onShow(){ onShow(){
// //
// #ifndef MP
let index = uni.getStorageSync('current'); let index = uni.getStorageSync('current');
this.current = index?index:0; this.current = index?index:0;
this.isLogin = this.$store.state.vuex_token; this.isLogin = this.$store.state.vuex_token;
// #ifdef MP
if(this.current === 2){
this.changeCurrent(this.current);
}
// #endif
// #ifndef MP
if(this.current === 1){ if(this.current === 1){
uni.pageScrollTo({scrollTop: 0}); uni.pageScrollTo({scrollTop: 0});
} }

View File

@ -267,7 +267,7 @@
})); }));
that.$u.vuex('vuex_token', res.data.token); that.$u.vuex('vuex_token', res.data.token);
// that.$u.vuex('vuex_token', 'fbc545a91cc94fe89296828a25a7e08e@9085553879028596738'); // that.$u.vuex('vuex_token', 'fbc545a91cc94fe89296828a25a7e08e@9085553879028596738');
that.$u.vuex('user_message', JSON.stringify(res.data.user)); await that.$u.vuex('user_message', JSON.stringify(res.data.user));
if(that.nextUrl===''){ if(that.nextUrl===''){
uni.navigateBack({complete() { uni.navigateBack({complete() {
setTimeout(()=>{ setTimeout(()=>{
@ -393,6 +393,11 @@
.pixel-input{ .pixel-input{
width: 320rpx; width: 320rpx;
} }
// #ifdef MP
/deep/.u-form-item{
margin: 0 40rpx;
}
// #endif
} }
.lgc-btn{ .lgc-btn{
margin-top: 50rpx; margin-top: 50rpx;

View File

@ -216,7 +216,7 @@ export default {
title: '注销', title: '注销',
content: '是否确认退出登录?', content: '是否确认退出登录?',
confirmColor: '#94d500', confirmColor: '#94d500',
success: function (res) { success: async(res) => {
if (res.confirm) { if (res.confirm) {
that.$u.vuex('vuex_token', ''); that.$u.vuex('vuex_token', '');
that.$u.vuex('user_message', {}); that.$u.vuex('user_message', {});

View File

@ -314,6 +314,10 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// #ifdef MP
border-radius: 16rpx;
overflow: hidden;
// #endif
.sil-image{ .sil-image{
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
@ -336,6 +340,9 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
transition: 0.5s; transition: 0.5s;
// #ifdef MP
overflow: hidden;
// #endif
.sil-image{ .sil-image{
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;

View File

@ -236,10 +236,14 @@ export default {
}, },
// //
back(){ back(){
// uni.navigateBack(); // #ifdef MP
uni.navigateBack();
// #endif
// #ifndef MP
uni.redirectTo({ uni.redirectTo({
url: '/pages/mobile_web/recharge/recharge' url: '/pages/mobile_web/recharge/recharge'
}) })
// #endif
}, },
// //
toAgree() { toAgree() {

View File

@ -136,10 +136,14 @@
methods:{ methods:{
// //
back(){ back(){
// uni.navigateBack(); // #ifdef MP
uni.navigateBack();
// #endif
// #ifndef MP
uni.redirectTo({ uni.redirectTo({
url: '/pages/mobile_web/index/index' url: '/pages/mobile_web/index/index'
}) })
// #endif
}, },
// //
goTop() { goTop() {

View File

@ -169,7 +169,7 @@ export default {
methods:{ methods:{
// //
async init(){ async init(){
this.$refs.uWaterfall.clear(); await this.$refs.uWaterfall.clear();
if(this.current){ if(this.current){
this.collectList = []; this.collectList = [];
this.collectForm = {current: 1,size: 10,isFinish: false,total: 0}; this.collectForm = {current: 1,size: 10,isFinish: false,total: 0};

View File

@ -8,10 +8,14 @@
<view class="mobile-workshops" :style="{ backgroundImage: `url(${myFileUrl+background})` }"> <view class="mobile-workshops" :style="{ backgroundImage: `url(${myFileUrl+background})` }">
<!-- #endif --> <!-- #endif -->
<view class="mwt-top"> <view class="mwt-top">
<!-- #ifdef MP -->
<view class="app-top" :style="{height: `${StatusBar}px`,background: topLevel===0? '#ffffff00' : `rgba(255, 255, 255,${topLevel})`}"></view>
<view :style="{height: `${StatusBar}px`}"></view>
<view class="mobile-logo" :style="{height: `${CustomBarHeight}px`,backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
<!-- #endif -->
<!-- #ifndef MP -->
<view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}"> <view class="mobile-logo" :style="{backgroundColor: `rgba(255, 255, 255,${topLevel})`}">
<!-- #ifdef H5 --> <!-- #endif -->
<!-- <u-icon name="arrow-left" size="40" color="#c2ea04" class="back" @click="back"></u-icon> -->
<!-- #endif -->
<image :src="myFileUrl+logo"></image> <image :src="myFileUrl+logo"></image>
</view> </view>
<view class="mw-title"> <view class="mw-title">
@ -202,6 +206,11 @@ export default {
}, },
data(){ data(){
return{ return{
// #ifdef MP
//
StatusBar: this.StatusBar || 0,
CustomBarHeight: this.Custom.height+(this.Custom.top-this.StatusBar)*2 || 0,
// #endif
// //
loading: false, loading: false,
// //
@ -405,10 +414,14 @@ export default {
}, },
// //
back(){ back(){
// uni.navigateBack(); // #ifdef MP
uni.navigateBack();
// #endif
// #ifndef MP
uni.redirectTo({ uni.redirectTo({
url: '/pages/mobile_web/index/index' url: '/pages/mobile_web/index/index'
}) })
// #endif
}, },
// //
selectImage(){ selectImage(){
@ -857,7 +870,7 @@ export default {
justify-content: space-between; justify-content: space-between;
min-height: 100vh; min-height: 100vh;
background-size: cover; background-size: cover;
// #ifdef APP // #ifdef APP || MP
.app-top{ .app-top{
width: 100%; width: 100%;
position: fixed; position: fixed;
@ -866,7 +879,7 @@ export default {
} }
// #endif // #endif
.mwt-top{ .mwt-top{
// #ifdef APP // #ifdef APP || MP
.app-top{ .app-top{
width: 100%; width: 100%;
position: fixed; position: fixed;