fix: 首页和我的应用排序按 seq 排列

This commit is contained in:
2026-07-29 20:27:36 +08:00
parent 8c9613044c
commit ec6a5dd956
35 changed files with 18361 additions and 17013 deletions

View File

@@ -351,9 +351,16 @@
this.isShow = false
},
back() {
uni.navigateBack({
delta: this.configData.wechat_auth_switch ? 2 : 1
})
const pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack({
delta: this.configData.wechat_auth_switch ? 2 : 1
})
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
},
privacy(type) {
uni.navigateTo({

View File

@@ -149,6 +149,16 @@ export default {
</view>
</navigator>
</view>
<!-- #ifdef MP -->
<view class="list rd-24rpx mx-20">
<view class="item acea-row row-between-wrapper" @click="outLogin">
<view>退出登录</view>
<view class="grab">
<text class="iconfont icon-ic_rightarrow"></text>
</view>
</view>
</view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view class="log-out list rd-24rpx mx-20 acea-row row-center-wrapper" @click="outLogin" v-if="!this.$wechat.isWeixin()">退出登录</view>
<!-- #endif -->

File diff suppressed because it is too large Load Diff

View File

@@ -24,19 +24,23 @@
<view class="wechat-login">
<view class="btn-wrapper">
<!-- #ifdef H5 -->
<button hover-class="none" @tap="wechatLogin" class="bg-color btn1">授权登录</button>
<button hover-class="none" @tap="handleAuthBtnTap" class="bg-color btn1">授权登录</button>
<!-- #endif -->
<!-- #ifdef MP -->
<template v-if="configData.wechat_auth_switch">
<button hover-class="none" v-if="bindPhone" open-type="getPhoneNumber" @getphonenumber="getphonenumber"
<button hover-class="none" v-if="bindPhone && protocol" open-type="getPhoneNumber" @getphonenumber="getphonenumber"
class="bg-color btn1">授权登录</button>
<button hover-class="none" v-else-if="!bindPhone" @tap="getAuthLogin"
<button hover-class="none" v-else-if="bindPhone && !protocol" @tap="handleAuthBtnTap"
class="bg-color btn1">授权登录</button>
<button hover-class="none" v-else-if="mp_is_new" @tap="userLogin"
<button hover-class="none" v-else-if="!bindPhone" @tap="handleAuthBtnTap"
class="bg-color btn1">授权登录</button>
<button v-else-if="canUseGetUserProfile && code" hover-class="none" @tap="getUserProfile"
class="bg-color btn1">授权登录</button>
<button v-else hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo"
<button hover-class="none" v-else-if="mp_is_new" @tap="onAuthorizeLoginTap('mp_userLogin')"
class="bg-color btn1">授权登录</button>
<button v-else-if="canUseGetUserProfile && code" hover-class="none" @tap="onAuthorizeLoginTap('mp_userProfile')"
class="bg-color btn1">授权登录</button>
<button v-else-if="protocol" hover-class="none" open-type="getUserInfo" @getuserinfo="setUserInfo"
class="bg-color btn1">授权登录</button>
<button v-else hover-class="none" @tap="onAuthorizeLoginTap('mp_userinfo')"
class="bg-color btn1">授权登录</button>
</template>
<button v-if="configData.phone_auth_switch" hover-class="none" @tap="phoneLogin" class="btn2">手机号登录</button>
@@ -67,6 +71,23 @@
<privacyAgreementPopup v-if="canGetPrivacySetting" @onReject="onReject" @onAgree="onAgree">
</privacyAgreementPopup>
<!-- #endif -->
<view v-if="showProtocolDialog" class="protocol-modal">
<view class="protocol-modal__mask" @tap="rejectProtocol"></view>
<view class="protocol-modal__box">
<view class="protocol-modal__title">用户协议与隐私协议</view>
<view class="protocol-modal__content">
<text>已阅读并同意</text>
<text class="font-num" @tap.stop="privacy('user')">《用户协议》</text>
<text>与</text>
<text class="font-num" @tap.stop="privacy('privacy')">《隐私协议》</text>
</view>
<view class="protocol-modal__actions">
<view class="protocol-modal__btn" @tap="rejectProtocol">不同意</view>
<view class="protocol-modal__btn protocol-modal__btn--primary bg-color" @tap="agreeProtocol">同意并继续</view>
</view>
</view>
</view>
</view>
</template>
@@ -123,6 +144,8 @@
protocol: false,
bindPhone: false,
isShow: false,
showProtocolDialog: false,
pendingAuthorizeAction: '',
};
},
components: {
@@ -169,8 +192,62 @@
uni.removeStorageSync('form_type_cart');
},
methods: {
handleAuthBtnTap() {
let action = '';
// #ifdef H5
action = 'h5_wechat';
// #endif
// #ifdef MP
action = this.bindPhone ? 'mp_phone' : 'mp_auth';
// #endif
this.openProtocolDialog(action);
},
onAuthorizeLoginTap(action) {
this.openProtocolDialog(action);
},
openProtocolDialog(action) {
this.pendingAuthorizeAction = action || '';
this.showProtocolDialog = true;
},
agreeProtocol() {
const action = this.pendingAuthorizeAction;
this.pendingAuthorizeAction = '';
this.showProtocolDialog = false;
this.protocol = true;
this.$nextTick(() => {
this.runAuthorizeAction(action, {
afterAgree: true
});
});
},
rejectProtocol() {
this.pendingAuthorizeAction = '';
this.showProtocolDialog = false;
},
runAuthorizeAction(action, options = {}) {
if (!action) return;
if (action === 'h5_wechat') return this.wechatLogin();
if (action === 'mp_auth') return this.getAuthLogin();
if (action === 'mp_userLogin') return this.userLogin();
if (action === 'mp_userProfile') return this.getUserProfile();
if (action === 'mp_phone' || action === 'mp_userinfo') {
if (options.afterAgree) {
return this.$util.Tips({
title: '请点击授权登录继续'
});
}
return;
}
},
cancelLogin(){
uni.navigateBack()
const pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack();
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
},
wechatAuthLogin(d, back_url) {
let that = this;
@@ -286,10 +363,24 @@
this.protocol = true
},
onReject() {
uni.navigateBack();
const pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack();
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
},
back() {
uni.navigateBack();
const pages = getCurrentPages();
if (pages.length > 1) {
uni.navigateBack();
} else {
uni.switchTab({
url: '/pages/index/index'
});
}
},
home() {
uni.switchTab({
@@ -531,7 +622,7 @@
},
// 公众号登录
wechatLogin() {
if (!this.protocol && this.configData.store_user_agreement) {
if (!this.protocol) {
return this.$util.Tips({
title: '请先阅读并同意协议'
});
@@ -690,4 +781,69 @@
height: 40rpx;
}
}
.protocol-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 20000;
display: flex;
align-items: center;
justify-content: center;
}
.protocol-modal__mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.55);
}
.protocol-modal__box {
position: relative;
z-index: 1;
width: 620rpx;
background: #fff;
border-radius: 24rpx;
overflow: hidden;
}
.protocol-modal__title {
padding: 40rpx 40rpx 0;
font-size: 32rpx;
font-weight: 500;
color: #333333;
text-align: center;
}
.protocol-modal__content {
padding: 32rpx 40rpx 40rpx;
font-size: 28rpx;
color: #333333;
line-height: 42rpx;
text-align: center;
}
.protocol-modal__actions {
display: flex;
border-top: 1px solid #EEEEEE;
}
.protocol-modal__btn {
flex: 1;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 30rpx;
color: #666666;
}
.protocol-modal__btn--primary {
color: #ffffff;
}
</style>