From 165b21e927c58d24ed82f3b88d89247b9fc106bc Mon Sep 17 00:00:00 2001 From: zhangxingye <892562066@qq.com> Date: Sat, 22 Feb 2025 17:53:52 +0800 Subject: [PATCH] 1.5.0 --- uni-app/src/stores/member.ts | 10 +- uni-app/src/stores/system.ts | 9 +- uni-app/src/styles/common.scss | 76 +++++++++- uni-app/src/styles/diy_form.scss | 174 +++++++++++++++++++++++ uni-app/src/styles/official-iconfont.css | 98 ++++++++++++- 5 files changed, 357 insertions(+), 10 deletions(-) create mode 100644 uni-app/src/styles/diy_form.scss diff --git a/uni-app/src/stores/member.ts b/uni-app/src/stores/member.ts index 49da20915..b96fee2b0 100644 --- a/uni-app/src/stores/member.ts +++ b/uni-app/src/stores/member.ts @@ -48,6 +48,8 @@ const useMemberStore = defineStore('member', { if (callback) callback(); }).catch(() => { this.logout() + uni.removeStorageSync('wap_member_mobile'); + uni.removeStorageSync('wap_member_id'); }) }, logout(isRedirect: boolean = false) { @@ -60,16 +62,20 @@ const useMemberStore = defineStore('member', { logout().then(() => { removeToken() uni.removeStorageSync('wap_member_info'); - uni.removeStorageSync('openid'); + // uni.removeStorageSync('openid'); uni.removeStorageSync('unionid'); uni.removeStorageSync('isbindmobile'); + uni.removeStorageSync('nickname'); + uni.removeStorageSync('avatar'); isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' }) }).catch(() => { removeToken() uni.removeStorageSync('wap_member_info'); - uni.removeStorageSync('openid'); + // uni.removeStorageSync('openid'); uni.removeStorageSync('unionid'); uni.removeStorageSync('isbindmobile'); + uni.removeStorageSync('nickname'); + uni.removeStorageSync('avatar'); isRedirect && redirect({ url: '/app/pages/index/index', mode: 'switchTab' }) }) }, diff --git a/uni-app/src/stores/system.ts b/uni-app/src/stores/system.ts index 4337a3b3e..7c0414b02 100644 --- a/uni-app/src/stores/system.ts +++ b/uni-app/src/stores/system.ts @@ -53,7 +53,8 @@ const useSystemStore = defineStore('system', { // #endif getInitInfo({ - url + url, + openid: uni.getStorageSync('openid') }).then((res: any) => { if (res.data) { let data = res.data; @@ -66,6 +67,9 @@ const useSystemStore = defineStore('system', { this.mapConfig.is_open = data.map_config.is_open; this.mapConfig.valid_time = data.map_config.valid_time; uni.setStorageSync('mapConfig', this.mapConfig); + + // 主题色 + uni.setStorageSync('theme_color_list', data.theme_list); // 站点信息 this.site = data.site_info @@ -93,6 +97,9 @@ const useSystemStore = defineStore('system', { configStore.login.desc = data.login_config.desc // 描述 uni.setStorageSync('login_config', configStore.login) + // 如果会员已存在则小程序端快捷登录时不再弹出授权弹框 + uni.setStorageSync('member_exist',data.member_exist) + this.initStatus = 'finish'; // 初始化完成 if (callback) callback() } diff --git a/uni-app/src/styles/common.scss b/uni-app/src/styles/common.scss index cf1af4c75..d369caa65 100644 --- a/uni-app/src/styles/common.scss +++ b/uni-app/src/styles/common.scss @@ -3,7 +3,6 @@ --primary-color-dark: #398ade; --primary-color-disabled: #9acafc; --primary-color-light: #ecf5ff; - --primary-color-light: #ecf5ff; --page-bg-color: #f6f6f6; --text-color-light6: #666; --text-color-light9: #999; @@ -67,7 +66,8 @@ button[type='primary'],uni-button[type='primary']{ // 提交按钮背景颜色 .primary-btn-bg{ - background: linear-gradient( 94deg, #FB7939 0%, #FE120E 99%), #EF000C; + // background: linear-gradient( 94deg, #FB7939 0%, #FE120E 99%), #EF000C; + background: linear-gradient( 94deg, var(--primary-help-color) 0%, var(--primary-color) 99%), var(--primary-color); } // 侧边栏宽度 .sidebar-margin{ @@ -171,7 +171,38 @@ button[type='primary'],uni-button[type='primary']{ border-radius: 100rpx; } } - +// 空页面 +.empty-page-popup{ + margin: var(--top-m) auto 0; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border-radius: var(--rounded-big); + height: 340rpx; + background-color: #fff; + box-sizing: border-box; + .img{ + width: 320rpx; + height: 240rpx; + } + .desc{ + font-size: 26rpx; + color: var(--text-color-light9); + } + .btn{ + display: flex; + align-items: center; + justify-content: center; + min-width: 260rpx; + height: 66rpx; + font-size: 26rpx; + margin-top: 40rpx; + color: var(--primary-color); + border: 2rpx solid var(--primary-color); + border-radius: 100rpx; + } +} // 搜索input .search-input{ @apply flex-1 flex items-center; @@ -184,6 +215,7 @@ button[type='primary'],uni-button[type='primary']{ @apply flex-1; font-size: 24rpx; padding-right: 32rpx; + height: 100%; } .clear{ font-size: 24rpx; @@ -394,6 +426,11 @@ button[type='primary'],uni-button[type='primary']{ align-items: center; justify-content: center; } +.flex-between-center{ + display: flex; + align-items: center; + justify-content: space-between;; +} /* 单行超出隐藏 */ .using-hidden { @@ -483,4 +520,35 @@ button[type='primary'],uni-button[type='primary']{ cursor: inherit !important; } /* #endif */ -/******************** u-switch end **********************/ \ No newline at end of file +/******************** u-switch end **********************/ + +/******************** 表单组件兼容性 start **********************/ +/* #ifdef MP */ +.form-item-frame .u-checkbox .u-checkbox__icon-wrap{ + width: 30rpx !important; + height: 30rpx !important; +} +.form-item-frame .u-radio-group .u-radio__icon-wrap{ + width: 30rpx !important; + height: 30rpx !important; +} +.form-item-frame .u-picker .u-toolbar__wrapper__cancel, .form-item-frame .u-picker .u-toolbar__wrapper__confirm{ + font-size: 28rpx !important; +} +/* #endif */ + +.form-item-frame .calendar-wrap .u-calendar ::v-deep .u-calendar-header__title, .form-item-frame .calendar-wrap .u-calendar ::v-deep .u-calendar-header__subtitle, .form-item-frame .calendar-wrap .u-calendar ::v-deep .u-calendar-month__title{ + display: block; +} +.form-item-frame .calendar-wrap .u-calendar .u-calendar-header__title, .u-calendar-header__subtitle, .u-calendar-month__title{ + display: block; +} +/******************** 表单组件兼容性 end **********************/ + + +.information-filling .u-form .u-form-item__body__left__content__label{ + font-size: 28rpx !important; +} +.information-filling .u-line{ + border-color: #dddddd !important; +} \ No newline at end of file diff --git a/uni-app/src/styles/diy_form.scss b/uni-app/src/styles/diy_form.scss new file mode 100644 index 000000000..b8f271fe9 --- /dev/null +++ b/uni-app/src/styles/diy_form.scss @@ -0,0 +1,174 @@ +.form-item-frame{ + @apply overflow-hidden relative; + .base-layout-one{ + @apply relative flex flex-col; + .layout-one-label{ + @apply flex items-center; + line-height: 1.3; + margin-bottom: 16rpx; + .is-hidden{ + @apply border-solid; + font-size: 20rpx; + line-height: 20rpx; + border-width: 2rpx; + border-color: #999; + padding: 4rpx; + border-radius: 6rpx; + margin-left: 6rpx; + color: #999; + } + .required{ + color: #ec0003; + padding-top: 4rpx; + margin-left: 4rpx; + } + .name{ + @apply overflow-ellipsis; + } + } + .layout-one-remark{ + margin-bottom: 16rpx; + line-height: 1.2; + } + .layout-one-error-message{ + font-size: 28rpx; + color: red; + margin-bottom: 16rpx; + } + .layout-one-content{ + display: flex; + align-items: center; + min-height: 80rpx; + padding: 0 16rpx; + border: 2rpx solid #F2F2F2; + border-radius: 16rpx; + box-sizing: border-box; + } + .layout-one-input-placeholder{ + color: var(--text-color-light9); + } + .layout-one-attribute-wrap{ + @apply flex items-center; + margin-top: 16rpx; + .layout-one-attribute-item{ + font-size: 24rpx; + color: #999; + margin-right: 6rpx; + } + } + .detail-one-content{ + padding: 5rpx 10rpx; + display: flex; + margin-bottom: 34rpx; + flex-direction: column; + .detail-one-content-label{ + color: #999; + font-size: 26rpx; + margin-bottom: 16rpx; + line-height: 1; + } + .detail-one-content-value{ + font-size: 28rpx; + margin-top: 5rpx; + line-height: 1.4; + word-wrap: break-word; + } + } + } + .base-layout-two{ + @apply relative; + .layout-two-is-hidden{ + font-size: 20rpx; + border: 2rpx solid #999; + padding: 4rpx; + border-radius: 6rpx; + margin-left: 6rpx; + color: #999; + } + .layout-two-wrap{ + @apply flex items-center border-solid box-border; + border-width: 0; + border-bottom-width: 2rpx; + border-color: #F2F2F2; + padding: 0 16rpx; + .layout-two-label{ + @apply flex items-center; + width: 27%; + padding-right: 20rpx; + .required{ + color: #ec0003; + padding-top: 4rpx; + margin-right: 6rpx; + } + .name{ + @apply overflow-ellipsis; + } + } + .layout-two-content{ + width: 73%; + min-height: 90rpx; + text-align: right; + display: flex; + align-items: center; + justify-content: flex-end; + &.no-flex{ + display: block; + } + } + .layout-two-input-placeholder{ + color: var(--text-color-light9); + } + &.no-border{ + padding: 0; + border-width: 0; + .layout-two-content{ + min-height: 72rpx; + } + } + } + .layout-two-remark{ + margin-top: 16rpx; + line-height: 1.2; + } + .layout-two-error-message{ + font-size: 28rpx; + color: red; + margin-bottom: 16rpx; + } + .layout-two-attribute-wrap{ + @apply flex items-center; + margin-top: 16rpx; + .layout-two-attribute-item{ + font-size: 24rpx; + color: #999; + margin-right: 6rpx; + } + } + .detail-two-content{ + padding: 0rpx 10rpx; + font-size: 28rpx; + margin-bottom: 34rpx; + display: flex; + justify-content: space-between; + .detail-two-content-label{ + + } + .detail-two-content-value { + line-height: 1.4; + word-wrap: break-word; + word-break: break-word; + white-space: pre-wrap; + text-align: right; + } + + } + } + .form-item-mask{ + @apply absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 10; + } +} \ No newline at end of file diff --git a/uni-app/src/styles/official-iconfont.css b/uni-app/src/styles/official-iconfont.css index 195384d56..3130f6b63 100644 --- a/uni-app/src/styles/official-iconfont.css +++ b/uni-app/src/styles/official-iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "nc-iconfont"; /* Project id 4567203 */ - src: url('//at.alicdn.com/t/c/font_4567203_8cgr9qgefz9.woff2?t=1734663182190') format('woff2'), - url('//at.alicdn.com/t/c/font_4567203_8cgr9qgefz9.woff?t=1734663182190') format('woff'), - url('//at.alicdn.com/t/c/font_4567203_8cgr9qgefz9.ttf?t=1734663182190') format('truetype'); + src: url('//at.alicdn.com/t/c/font_4567203_50vcy2zhvll.woff2?t=1739764873517') format('woff2'), + url('//at.alicdn.com/t/c/font_4567203_50vcy2zhvll.woff?t=1739764873517') format('woff'), + url('//at.alicdn.com/t/c/font_4567203_50vcy2zhvll.ttf?t=1739764873517') format('truetype'); } .nc-iconfont { @@ -13,6 +13,98 @@ -moz-osx-font-smoothing: grayscale; } +.nc-icon-cuohaoV6mm1:before { + content: "\e85a"; +} + +.nc-icon-cuohao-3V6mm:before { + content: "\e859"; +} + +.nc-icon-a-xiangyouV6mm:before { + content: "\e849"; +} + +.nc-icon-a-xiangyouV6xx1:before { + content: "\e797"; +} + +.nc-icon-xiaoxiV6mm1:before { + content: "\e83c"; +} + +.nc-icon-guanbiV6xx2:before { + content: "\e857"; +} + +.nc-icon-guanbiV6xx-1:before { + content: "\e856"; +} + +.nc-icon-fenxiangV6mm2:before { + content: "\e854"; +} + +.nc-icon-fenxiangV6xx4:before { + content: "\e853"; +} + +.nc-icon-a-sousuoV6xx-34:before { + content: "\e855"; +} + +.nc-icon-sousuoV6xx11:before { + content: "\e851"; +} + +.nc-icon-a-shipinV6xx-28-1:before { + content: "\e850"; +} + +.nc-icon-a-gengduoV6xx-28:before { + content: "\e84f"; +} + +.nc-icon-fenxiangV6mm1:before { + content: "\e847"; +} + +.nc-icon-tupiandaohangpc:before { + content: "\e7dc"; +} + +.nc-icon-shequfenleiV6xx-1:before { + content: "\e84a"; +} + +.nc-icon-gouwuV6xx1:before { + content: "\e844"; +} + +.nc-icon-a-xiangyouV6xx2:before { + content: "\e848"; +} + +.nc-icon-dianxinxiV6xx1:before { + content: "\e842"; +} + +.nc-icon-a-dianzanV6xx-36:before { + content: "\e7df"; +} + +.nc-icon-fenxiangV6xx3:before { + content: "\e846"; +} + +.nc-icon-xiaoxiV6xx1:before { + content: "\e83d"; +} + +.nc-icon-liebiaoV6xx1:before { + content: "\e841"; +} + .nc-icon-daifujineV6xx:before { content: "\e83b"; }