This commit is contained in:
小李 2026-07-25 17:56:39 +08:00
parent bd3a2e9cce
commit 5d4c0d30e0
3 changed files with 575 additions and 567 deletions

View File

@ -6,7 +6,8 @@
recentNativeData: 0 // recentNativeData: 0 //
}, },
onLaunch: function(options) { onLaunch: function(options) {
uni.setStorageSync('AppUser', {})
uni.setStorageSync('userInfo', {})
// console.log=()=>{} // console.log=()=>{}
// === wgt === // === wgt ===
console.log('=== App Launch 开始 ===') console.log('=== App Launch 开始 ===')

View File

@ -2,14 +2,14 @@
<view :class="`${phone}-style`"> <view :class="`${phone}-style`">
<!-- 导航样式 --> <!-- 导航样式 -->
<view class="nav-bar-box" :class="{ 'border-nav-bar-box': isScroll }"> <view class="nav-bar-box" :class="{ 'border-nav-bar-box': isScroll }">
<NavBar :isBack="false" :bgColor="isScroll ? data.navBar.bgColor : '#fff'" :buttonGroup="buttonGroup" <NavBar :isBack="false" :bgColor="isScroll ? navBarBgColor : '#fff'" :buttonGroup="buttonGroup"
@button-click="util.clickTitlePopupButton" tipLayerType="message-list-tip" isTipLayer @button-click="util.clickTitlePopupButton" tipLayerType="message-list-tip" isTipLayer isClickNavBarOpenPopup
isClickNavBarOpenPopup tipLayerText="添加短信" @add="emit('add')"> tipLayerText="添加短信" @add="emit('add')">
<!-- 左侧文字图标 --> <!-- 左侧文字图标 -->
<template v-slot:left> <template v-slot:left>
<view v-if="phone == 'iphone'" class="flex flex-align-center"> <view v-if="phone == 'iphone'" class="flex flex-align-center">
<image @click="util.goBack" class="left-icon" src="/static/image/phone-message/iphone/back.png" <image @click="util.goBack" class="left-icon" src="/static/image/phone-message/iphone/back.png" mode="">
mode=""></image> </image>
<text class="left-text">过滤条件</text> <text class="left-text">过滤条件</text>
</view> </view>
<view v-if="(phone == 'huawei' && isScroll) || phone == 'vivo'" class="flex flex-align-center"> <view v-if="(phone == 'huawei' && isScroll) || phone == 'vivo'" class="flex flex-align-center">
@ -44,8 +44,7 @@
</view> </view>
<!-- huawei --> <!-- huawei -->
<view v-if="phone == 'huawei'"> <view v-if="phone == 'huawei'">
<image v-if="isScroll" class="right-icon" <image v-if="isScroll" class="right-icon" src="/static/image/phone-message/huawei/nav-search.png" mode="">
src="/static/image/phone-message/huawei/nav-search.png" mode="">
</image> </image>
<image class="right-icon" src="/static/image/phone-message/huawei/add.png" mode=""></image> <image class="right-icon" src="/static/image/phone-message/huawei/add.png" mode=""></image>
<image class="right-icon" src="/static/image/phone-message/huawei/more.png" mode=""></image> <image class="right-icon" src="/static/image/phone-message/huawei/more.png" mode=""></image>
@ -72,20 +71,20 @@
<image class="icon" :src="`/static/image/phone-message/${props.phone}/search.png`"> <image class="icon" :src="`/static/image/phone-message/${props.phone}/search.png`">
</image> </image>
<input class="input flex-1" :placeholder="showInfo.placeholder" type="text" disabled> <input class="input flex-1" :placeholder="showInfo.placeholder" type="text" disabled>
<image v-if="phone != 'mi'" class="icon" <image v-if="phone != 'mi'" class="icon" :src="`/static/image/phone-message/${props.phone}/mic.png`">
:src="`/static/image/phone-message/${props.phone}/mic.png`">
</image> </image>
</view> </view>
</view> </view>
<slot> <slot>
</slot> </slot>
</view> </view>
<view class="bottom-placeholder"></view> <view class="bottom-placeholder" :style="{'margin-top':$store.state.safeBottomAz+'px'}"></view>
<!-- 底部样式 --> <!-- 底部样式 -->
<template v-if="phone == 'mi' || phone == 'oppo'"> <template v-if="phone == 'mi' || phone == 'oppo'">
<image class="add-message" @click="emit('add')" <image class="add-message" @click="emit('add')"
:src="`/static/image/phone-message/${props.phone}/add-message.png`"></image> :src="`/static/image/phone-message/${props.phone}/add-message.png`"></image>
<view class="bottom-box flex"> <view class="bottom-box " :style="{height: (74+$store.state.safeBottomAz)+'px'}">
<view class="flex" :style="{height: '148rpx'}">
<view class="item flex-1 h100"> <view class="item flex-1 h100">
<image class="icon" :src="`/static/image/phone-message/${props.phone}/bottom-left.png`"></image> <image class="icon" :src="`/static/image/phone-message/${props.phone}/bottom-left.png`"></image>
<text>{{ showInfo.bottomLtext }}</text> <text>{{ showInfo.bottomLtext }}</text>
@ -95,27 +94,28 @@
<text class="grey">{{ showInfo.bottomRtext }}</text> <text class="grey">{{ showInfo.bottomRtext }}</text>
</view> </view>
</view> </view>
</view>
</template> </template>
</view> </view>
</template> </template>
<script setup> <script setup>
import NavBar from '@/components/nav-bar/nav-bar.vue' import NavBar from '@/components/nav-bar/nav-bar.vue'
import { import {
ref,
reactive, reactive,
computed computed
} from 'vue' } from 'vue'
import { import {
util util
} from '@/utils/common.js'; } from '@/utils/common.js';
const emit = defineEmits(['add', 'setSim', 'setNoticeCount']) const emit = defineEmits(['add', 'setSim', 'setNoticeCount'])
const props = defineProps({ const props = defineProps({
// //
phone: { phone: {
type: String, type: String,
@ -130,9 +130,9 @@ const props = defineProps({
type: Number, type: Number,
default: 0 default: 0
} }
}) })
const buttonGroup = computed(() => { const buttonGroup = computed(() => {
const groups = [{ const groups = [{
name: "添加短信", name: "添加短信",
click: () => { click: () => {
@ -155,25 +155,27 @@ const buttonGroup = computed(() => {
} }
return groups return groups
}) })
const data = reactive({ const navBarBgColor = computed(() => {
return props.phone === 'iphone' ? '#F8F8F8' : '#FFFFFF';
})
const data = reactive({
navBar: { navBar: {
title: '信息', title: '信息',
bgColor: '#FFFFFF',
}, },
}) })
// //
const showInfo = computed(() => { const showInfo = computed(() => {
let text, placeholder, secondText, bottomLtext, bottomRtext let text, placeholder, secondText, bottomLtext, bottomRtext
switch (props.phone) { switch (props.phone) {
case "iphone": case "iphone":
text = "信息" text = "信息"
placeholder = '搜索' placeholder = '搜索'
data.navBar.bgColor = '#F8F8F8'
break; break;
case "mi": case "mi":
text = "主要" text = "主要"
@ -198,29 +200,34 @@ const showInfo = computed(() => {
default: default:
break; break;
} }
return { text, placeholder, secondText, bottomLtext, bottomRtext } return {
}) text,
placeholder,
secondText,
bottomLtext,
bottomRtext
}
})
</script> </script>
<style> <style>
@import '@/common/main.css'; @import '@/common/main.css';
page { page {
background-color: #FFFFFF; background-color: #FFFFFF;
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
::v-deep .uni-navbar__header-btns { ::v-deep .uni-navbar__header-btns {
width: 100px !important; width: 100px !important;
flex: 1; flex: 1;
} }
::v-deep .uni-navbar__header { ::v-deep .uni-navbar__header {
align-items: center !important; align-items: center !important;
} }
.bottom-box { .bottom-box {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
left: 0; left: 0;
@ -250,10 +257,10 @@ page {
color: #999999; color: #999999;
} }
} }
} }
// //
.iphone-style { .iphone-style {
.mg-r-30 { .mg-r-30 {
margin-right: 60rpx; margin-right: 60rpx;
} }
@ -324,10 +331,10 @@ page {
} }
} }
} }
// //
.mi-style { .mi-style {
.right-icon { .right-icon {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
@ -382,10 +389,10 @@ page {
width: 100%; width: 100%;
} }
} }
// oppo // oppo
.oppo-style { .oppo-style {
.mg-r-52 { .mg-r-52 {
margin-right: 52rpx; margin-right: 52rpx;
} }
@ -429,7 +436,7 @@ page {
.bottom-box { .bottom-box {
height: 148rpx;
background-color: #FAFAFA; background-color: #FAFAFA;
border-top: 1rpx solid #DCDCDC; border-top: 1rpx solid #DCDCDC;
@ -450,10 +457,10 @@ page {
} }
} }
} }
// //
.huawei-style { .huawei-style {
::v-deep .uni-navbar__header-container { ::v-deep .uni-navbar__header-container {
flex: 0; flex: 0;
@ -520,10 +527,10 @@ page {
} }
} }
} }
} }
// vivo // vivo
.vivo-style { .vivo-style {
::v-deep .uni-navbar__header-container { ::v-deep .uni-navbar__header-container {
flex: 0; flex: 0;
} }
@ -585,5 +592,5 @@ page {
} }
} }
} }
} }
</style> </style>

View File

@ -36,7 +36,7 @@ export function createApp() {
app.config.globalProperties.$system = plus.os.name; app.config.globalProperties.$system = plus.os.name;
// #endif // #endif
app.config.globalProperties.$systemInfo = systemInfo; app.config.globalProperties.$systemInfo = systemInfo;
uni.setStorageSync('version', '1.0.7.sp5'); uni.setStorageSync('version', '1.0.7.sp6');
app.config.globalProperties.$version = uni.getStorageSync('version'); app.config.globalProperties.$version = uni.getStorageSync('version');
// 环境development→测试production→正式跟构建环境走无需手改 // 环境development→测试production→正式跟构建环境走无需手改
const isTest = process.env.NODE_ENV === 'development'; const isTest = process.env.NODE_ENV === 'development';