fix(样式): 修复不同设备默认字体颜色的显示问题

This commit is contained in:
hzj 2025-09-11 19:12:35 +08:00
parent 22805e1765
commit 89e71360eb
4 changed files with 114 additions and 90 deletions

View File

@ -351,6 +351,10 @@ const formatPrice = (value) => {
</script> </script>
<style scoped> <style scoped>
* {
color: black;
}
/* 添加页面样式 */ /* 添加页面样式 */
.fullPage { .fullPage {
width: 100vw; width: 100vw;

View File

@ -137,48 +137,58 @@
</template> </template>
<script setup> <script setup>
import MobileHeader from "../components/MobileHeader.vue"; import MobileHeader from '../components/MobileHeader.vue'
import { ref } from "vue"; import { ref } from 'vue'
import { searchUser } from "@/api/userInfo"; import { searchUser } from '@/api/userInfo'
import { showWarning, } from "@/utils/toast.js"; import { showWarning } from '@/utils/toast.js'
import { useRouter } from "vue-router"; import { useRouter } from 'vue-router'
import {usePageInitializationWithConfig} from "@/utils/pageConfig.js"; import { usePageInitializationWithConfig } from '@/utils/pageConfig.js'
const router = useRouter(); const router = useRouter()
const dialogshow = ref(false); const dialogshow = ref(false)
// //
const popupHelp = () => { const popupHelp = () => {
dialogshow.value = true; dialogshow.value = true
}; }
// //
const closedPopup = () => { const closedPopup = () => {
dialogshow.value = false; dialogshow.value = false
}; }
const targetUserId = ref(""); const targetUserId = ref('')
const checkUserId = async () => { const checkUserId = async () => {
console.log("充值目标用户id", targetUserId.value); console.log('充值目标用户id', targetUserId.value)
try { try {
const targetUserInfo = await searchUser(targetUserId.value); const targetUserInfo = await searchUser(targetUserId.value)
console.log("targetUserInfo:", targetUserInfo); console.log('targetUserInfo:', targetUserInfo)
if (targetUserInfo.status && targetUserInfo.body.id) { if (targetUserInfo.status && targetUserInfo.body.id) {
router.push({ path: "/recharge-freight-agent", query: { targetUserId: targetUserId.value, isFreightAgent: targetUserInfo.body.isFreightAgent } }); router.push({
path: '/recharge-freight-agent',
query: {
targetUserId: targetUserId.value,
isFreightAgent: targetUserInfo.body.isFreightAgent,
},
})
} else { } else {
// id // id
showWarning("User info not found"); showWarning('User info not found')
} }
} catch (error) { } catch (error) {
console.log("error:", error.response.errorMsg); console.log('error:', error.response.errorMsg)
throw error; throw error
} }
}; }
</script> </script>
<style scoped> <style scoped>
* {
color: black;
}
.fullPage { .fullPage {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;

View File

@ -67,7 +67,7 @@
<img <img
:src="userProfile.userAvatar" :src="userProfile.userAvatar"
alt="" alt=""
style="width: 10%; margin: 10px; border-radius: 50%" style="width: 10%; margin: 10px; border-radius: 50%; aspect-ratio: 1/1; object-fit: cover"
/> />
<div style=""> <div style="">
<div style="font-weight: 700; display: flex; align-items: center"> <div style="font-weight: 700; display: flex; align-items: center">
@ -141,72 +141,72 @@
</template> </template>
<script setup> <script setup>
import { onMounted, ref, watch } from "vue"; import { onMounted, ref, watch } from 'vue'
import MobileHeader from "../components/MobileHeader.vue"; import MobileHeader from '../components/MobileHeader.vue'
import { searchUser, searchPayRechargeUser } from "@/api/userInfo"; import { searchUser, searchPayRechargeUser } from '@/api/userInfo'
// import { getUserIdentity } from "@/api/wallet"; // import { getUserIdentity } from "@/api/wallet";
import { getPayAplication, getAppCommodityCard, payPlaceAnOrderRecharge } from "@/api/pay"; import { getPayAplication, getAppCommodityCard, payPlaceAnOrderRecharge } from '@/api/pay'
import { goAirwallex } from "@/utils/payment"; import { goAirwallex } from '@/utils/payment'
import { showError, showWarning, showInfo, showSuccess } from "@/utils/toast.js"; import { showError, showWarning, showInfo, showSuccess } from '@/utils/toast.js'
import { useRoute } from "vue-router"; import { useRoute } from 'vue-router'
import router from "@/router"; import router from '@/router'
import { useCountryStore } from "@/stores/country"; import { useCountryStore } from '@/stores/country'
import { storeToRefs } from "pinia"; import { storeToRefs } from 'pinia'
const countryStore = useCountryStore(); const countryStore = useCountryStore()
const route = useRoute(); const route = useRoute()
const languageList = ref([ const languageList = ref([
{ {
type: "English", type: 'English',
}, },
]); ])
const selectedLanguage = ref({ const selectedLanguage = ref({
type: "English", type: 'English',
}); })
const visibleList = ref(false); const visibleList = ref(false)
const listBt = () => { const listBt = () => {
visibleList.value = !visibleList.value; visibleList.value = !visibleList.value
}; }
const applicationId = ref("1963531459019739137"); const applicationId = ref('1963531459019739137')
const userProfile = ref({}); // const userProfile = ref({}) //
const type = ref(""); // const type = ref('') //
const regionId = ref(""); //id const regionId = ref('') //id
const { list: countryList, selectedCountry } = storeToRefs(countryStore); // const { list: countryList, selectedCountry } = storeToRefs(countryStore) //
const channels = ref([]); // const channels = ref([]) //
const selectedChannelName = ref(""); // const selectedChannelName = ref('') //
const commodityList = ref([]); // const commodityList = ref([]) //
const selectedCommodity = ref({}); // const selectedCommodity = ref({}) //
// //
const goMap = () => { const goMap = () => {
router.push({ path: "/map" }); router.push({ path: '/map' })
}; }
const goPay = async (item, commodity) => { const goPay = async (item, commodity) => {
selectedCommodity.value = commodity; selectedCommodity.value = commodity
let payData = { let payData = {
applicationId: applicationId.value, applicationId: applicationId.value,
payCountryId: selectedCountry.value.id, payCountryId: selectedCountry.value.id,
goodsId: commodity.id, goodsId: commodity.id,
userId: userProfile.value.id, userId: userProfile.value.id,
channelCode: item.channel.channelCode, channelCode: item.channel.channelCode,
};
console.log("payData:", payData);
const payRes = await payPlaceAnOrderRecharge(payData);
const body = payRes.body;
if (!body) {
console.log("Payment not available, please contact administrator!!!");
return;
} }
if (body.factoryCode === "AIRWALLEX") { console.log('payData:', payData)
const payRes = await payPlaceAnOrderRecharge(payData)
const body = payRes.body
if (!body) {
console.log('Payment not available, please contact administrator!!!')
return
}
if (body.factoryCode === 'AIRWALLEX') {
goAirwallex({ goAirwallex({
result: body, result: body,
props: { props: {
@ -215,66 +215,70 @@ const goPay = async (item, commodity) => {
failUrl: `${location.origin}/#/pay-result?redirect=recharge&appType=${type.value}&appId=${applicationId.value}&appStatus=1`, failUrl: `${location.origin}/#/pay-result?redirect=recharge&appType=${type.value}&appId=${applicationId.value}&appStatus=1`,
}, },
callback: (response) => { callback: (response) => {
if (response.code === "FAIL") { if (response.code === 'FAIL') {
showWarning("init fail!!!"); showWarning('init fail!!!')
return; return
} }
}, },
}); })
} }
if (body.requestUrl) { if (body.requestUrl) {
location.href = decodeURIComponent(body.requestUrl); location.href = decodeURIComponent(body.requestUrl)
} }
}; }
// //
const setChannelName = (channelName) => { const setChannelName = (channelName) => {
selectedChannelName.value = selectedChannelName.value != channelName ? channelName : ""; selectedChannelName.value = selectedChannelName.value != channelName ? channelName : ''
}; }
onMounted(async () => { onMounted(async () => {
type.value = route.params.type || "GOLD"; type.value = route.params.type || 'GOLD'
const PayAplication = await getPayAplication(applicationId.value); const PayAplication = await getPayAplication(applicationId.value)
console.log("PayAplication:", PayAplication); console.log('PayAplication:', PayAplication)
if (PayAplication.body && PayAplication.body.appCode) { if (PayAplication.body && PayAplication.body.appCode) {
let params = { let params = {
sysOrigin: PayAplication.body.appCode, sysOrigin: PayAplication.body.appCode,
account: route.query.targetUserId, account: route.query.targetUserId,
type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD' type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD',
}; }
const userInfo = await searchPayRechargeUser(params); const userInfo = await searchPayRechargeUser(params)
if (userInfo.body && userInfo.body.regionId && userInfo.body.countryList.length != 0) { if (userInfo.body && userInfo.body.regionId && userInfo.body.countryList.length != 0) {
userProfile.value = { ...userInfo.body.userProfile, type: "GOLD" }; userProfile.value = { ...userInfo.body.userProfile, type: 'GOLD' }
countryStore.setCountryList(userInfo.body.countryList); countryStore.setCountryList(userInfo.body.countryList)
if (JSON.stringify(selectedCountry.value) == "{}") { if (JSON.stringify(selectedCountry.value) == '{}') {
countryStore.setCountry(userInfo.body.countryList[0]); countryStore.setCountry(userInfo.body.countryList[0])
} }
regionId.value = userInfo.body.regionId; regionId.value = userInfo.body.regionId
let appCommodityCardParams = { let appCommodityCardParams = {
applicationId: applicationId.value, applicationId: applicationId.value,
payCountryId: selectedCountry.value.id, payCountryId: selectedCountry.value.id,
regionId: userInfo.body.regionId, regionId: userInfo.body.regionId,
type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD' type: route.query.isFreightAgent === 'true' ? 'FREIGHT_GOLD' : 'GOLD',
}; }
const appCommodityCard = await getAppCommodityCard(appCommodityCardParams); const appCommodityCard = await getAppCommodityCard(appCommodityCardParams)
console.log("appCommodityCard:", appCommodityCard); console.log('appCommodityCard:', appCommodityCard)
commodityList.value = appCommodityCard.body.commodity; commodityList.value = appCommodityCard.body.commodity
channels.value = appCommodityCard.body.channels; channels.value = appCommodityCard.body.channels
} }
} }
}); })
watch(selectedCountry, (New, Old) => { watch(selectedCountry, (New, Old) => {
console.log(`新值:${New.id},旧值:${Old.id}`); console.log(`新值:${New.id},旧值:${Old.id}`)
}); })
</script> </script>
<style scoped> <style scoped>
* {
color: black;
}
.fullPage { .fullPage {
width: 100vw; width: 100vw;
height: 100vh; height: 100vh;
@ -286,9 +290,11 @@ watch(selectedCountry, (New, Old) => {
.slide-fade-enter-active { .slide-fade-enter-active {
transition: all 0.3s ease-out; transition: all 0.3s ease-out;
} }
.slide-fade-leave-active { .slide-fade-leave-active {
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1); transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
} }
.slide-fade-enter-from, .slide-fade-enter-from,
.slide-fade-leave-to { .slide-fade-leave-to {
transform: translateY(-10px); transform: translateY(-10px);

View File

@ -59,6 +59,10 @@ onMounted(() => {})
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
* {
color: black;
}
.pay-result { .pay-result {
background: #ffffff; background: #ffffff;
min-height: 100%; min-height: 100%;