diff --git a/components.d.ts b/components.d.ts index 0b75c10..c822f55 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,23 +10,15 @@ declare module 'vue' { export interface GlobalComponents { RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] - VanArea: typeof import('vant/es')['Area'] VanButton: typeof import('vant/es')['Button'] VanCell: typeof import('vant/es')['Cell'] VanCellGroup: typeof import('vant/es')['CellGroup'] - VanCheckbox: typeof import('vant/es')['Checkbox'] - VanCheckboxGroup: typeof import('vant/es')['CheckboxGroup'] VanField: typeof import('vant/es')['Field'] - VanForm: typeof import('vant/es')['Form'] VanIcon: typeof import('vant/es')['Icon'] - VanNoticeBar: typeof import('vant/es')['NoticeBar'] - VanPopover: typeof import('vant/es')['Popover'] - VanPopup: typeof import('vant/es')['Popup'] VanRate: typeof import('vant/es')['Rate'] VanSearch: typeof import('vant/es')['Search'] VanTab: typeof import('vant/es')['Tab'] VanTabs: typeof import('vant/es')['Tabs'] - VanTag: typeof import('vant/es')['Tag'] VanUploader: typeof import('vant/es')['Uploader'] } } diff --git a/eslint.config.ts b/eslint.config.ts index e305e8a..586a1c7 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -2,6 +2,7 @@ import { globalIgnores } from 'eslint/config' import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' import pluginVue from 'eslint-plugin-vue' import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' +const path = require('path') // To allow more languages other than `ts` in `.vue` files, uncomment the following lines: // import { configureVueProject } from '@vue/eslint-config-typescript' @@ -16,6 +17,8 @@ export default defineConfigWithVueTs( { languageOptions: { parserOptions: { + sconfigRootDir: path.resolve(__dirname), + project: './tsconfig.json', requireConfigFile: false, }, }, diff --git a/package.json b/package.json index 06137a6..db83e01 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,12 @@ "dependencies": { "@vant/area-data": "^2.1.0", "axios": "^1.11.0", + "capture-request-log": "^0.0.4", + "js-base64": "^3.7.8", + "lodash": "^4.17.21", "lodash-es": "^4.17.21", "lz-utils-lib": "^1.0.60", + "mobile-detect": "^1.4.5", "normalize.css": "^8.0.1", "pinia": "^3.0.3", "pinia-plugin-persistedstate": "^4.5.0", diff --git a/src/api/commodity.ts b/src/api/commodity.ts new file mode 100644 index 0000000..2582ba1 --- /dev/null +++ b/src/api/commodity.ts @@ -0,0 +1,8 @@ +// 商品维度接口 +const shop = { + searchCommodityList: ['/index/page/list'], // 获取商品列表接口 + getCommodityDetail: ['/index/product/detail'], // 获取商品详情 + getReviewList: ['/comment/list'], // 获取评价接口 +} + +export default shop diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..98756fd --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,4 @@ +// 公共接口 +const common = {} + +export default common diff --git a/src/api/index.ts b/src/api/index.ts new file mode 100644 index 0000000..46cc6fd --- /dev/null +++ b/src/api/index.ts @@ -0,0 +1,22 @@ +import axios from '@/utils/axios' +import user from './user' +import shop from './commodity' +import common from './common' + +const totalApiConfig = { user, shop, common } + +const handleAddArrayPrototype = (obj: Recordable<[string, Recordable]>) => { + Object.values(obj).forEach((arr) => { + const [url, other = {}] = arr + Object.setPrototypeOf(arr, { + post: (data = {}) => axios.post({ url, data, ...other }), + get: (data = {}) => axios.get({ url, params: data, ...other }), + }) + }) +} + +Object.values(totalApiConfig).forEach((apiItem) => { + handleAddArrayPrototype(apiItem as any) +}) + +export default totalApiConfig diff --git a/src/api/user.ts b/src/api/user.ts new file mode 100644 index 0000000..2a2cf90 --- /dev/null +++ b/src/api/user.ts @@ -0,0 +1,7 @@ +// 用户维度接口 +const user = { + getAddressList: ['/buyer/address/list'], + updateAddress: ['/buyer/address/insertOrUpdate'], +} + +export default user diff --git a/src/auto-import.d.ts b/src/auto-import.d.ts index cb86568..bd5e0e4 100644 --- a/src/auto-import.d.ts +++ b/src/auto-import.d.ts @@ -49,6 +49,7 @@ declare global { const shallowReactive: typeof import('vue')['shallowReactive'] const shallowReadonly: typeof import('vue')['shallowReadonly'] const shallowRef: typeof import('vue')['shallowRef'] + const showToast: typeof import('vant/es')['showToast'] const toRaw: typeof import('vue')['toRaw'] const toRef: typeof import('vue')['toRef'] const toRefs: typeof import('vue')['toRefs'] diff --git a/src/main.ts b/src/main.ts index 7aa9c13..4308c30 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,9 +1,11 @@ import 'virtual:uno.css' import 'normalize.css' -import "@/assets/index.scss" +import '@/assets/index.scss' +import '../types/global.d.ts' import { createApp } from 'vue' import { createPinia } from 'pinia' +import piniaPluginPersistedstate from 'pinia-plugin-persistedstate' import VConsole from 'vconsole' import App from './App.vue' @@ -11,7 +13,7 @@ import router from './router' const app = createApp(App) -app.use(createPinia()) +app.use(createPinia().use(piniaPluginPersistedstate)) app.use(router) app.mount('#app') diff --git a/src/settings/index.ts b/src/settings/index.ts new file mode 100644 index 0000000..28be21d --- /dev/null +++ b/src/settings/index.ts @@ -0,0 +1,15 @@ +import type { AppConfigType, PrefixType } from '#/config' +export * from './log' + +export const appConfig: Record = { + dcd: { + name: '东成贷', + prefix: 'dcd', + }, +} + +export const loginPaths = [] + +const LOCAL_PATH = 'test' + +export const baseURL = import.meta.env.DEV ? `/${LOCAL_PATH}/api-interface/app` : '/api-interface/app' diff --git a/src/settings/log.ts b/src/settings/log.ts new file mode 100644 index 0000000..9d01d05 --- /dev/null +++ b/src/settings/log.ts @@ -0,0 +1,12 @@ +export const logConfig = { + // 前端日志管理过滤域名 + interceptDomain: ['https://tapp.dongchengdai.com', 'https://app.dongchengdai.com'], + // 前端日志过滤请求地址 + filterHttpUrl: ['bl-log/web', '/user/baseInfo', '/log/behaviorLogDcd'], + // 前端日志管理接口 + bllogAddUrl: 'https://bllog.yijiesudai.com/bl-log/web/log/add', + // vconsole过滤域名 + vConsoleDomain: '', + // sdk过滤域名 + sdkDomain: '' +} diff --git a/src/stores/app.ts b/src/stores/app.ts deleted file mode 100644 index c711daa..0000000 --- a/src/stores/app.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { defineStore } from 'pinia' - -export const useAppStore = defineStore('app', () => { - const themeColor = '#01CF24' - - return { themeColor } -}) diff --git a/src/stores/index.ts b/src/stores/index.ts new file mode 100644 index 0000000..d99cddb --- /dev/null +++ b/src/stores/index.ts @@ -0,0 +1,11 @@ +import useAppStore from './modules/app' +import useNativeStore from './modules/native' +import useLoginStore from './modules/login' + +const useStore = () => ({ + appStore: useAppStore(), + nativeStore: useNativeStore(), + userStore: useLoginStore(), +}) + +export default useStore diff --git a/src/stores/modules/app.ts b/src/stores/modules/app.ts new file mode 100644 index 0000000..73b43d4 --- /dev/null +++ b/src/stores/modules/app.ts @@ -0,0 +1,32 @@ +import { defineStore } from 'pinia' +import type { AppConfigType, EnvType, PlatType } from '#/config' + +export default defineStore( + 'app', + () => { + const themeColor = '#01CF24' + const env = ref('') + const platform = ref('') + + const setPlatform = (val: PlatType) => { + platform.value = val + } + + const setEnv = () => { + const envs: Recordable = { + app: 'online', + tapp: 'test', + } + const key = location.host.replace(/^([a-z]+).+/g, '$1') + env.value = envs[key] || 'dev' + } + + return { themeColor, env, setPlatform, setEnv } + }, + { + persist: { + key: 'appConfig', + storage: localStorage, + }, + }, +) diff --git a/src/stores/modules/login.ts b/src/stores/modules/login.ts new file mode 100644 index 0000000..27969f6 --- /dev/null +++ b/src/stores/modules/login.ts @@ -0,0 +1,125 @@ +import axios from 'axios' +import Log from 'capture-request-log' +import { handleData } from 'lz-utils-lib' +import { defineStore } from 'pinia' + +import { logConfig } from '@/settings' +import { getPhoneType, log } from '@/utils/common' +// import { secretKeyAesKey } from '@/utils/secret-key' +// import type { PlatType } from '#/config' + +import useAppStore from './app' + +export default defineStore('login', { + state: () => { + return { + userInfo: { + uuid: '', + token: '', + mobile: '', + }, + environment: '', + } + }, + actions: { + async saveLoginInfo(loginData: string) { + const appStore = useAppStore() + try { + const data = handleData.tobase64.decodeObj(decodeURIComponent(loginData)) + console.log('token:', data.userInfo.token) + console.log('environment:', data.environment) + console.log('appPackage:', data.appInfo.appPackage) + console.log('channel:', data.appInfo.channel) + appStore.setEnv() + this.userInfo = { + uuid: data.userInfo.uuid, + token: data.userInfo.token, + mobile: '', + } + /* let platform = '' + if (data.appInfo) { + platform = data.appInfo.appPackage.replace(/_\w+/, '') + appStore.setPlatform(platform as PlatType) + } + if (data.environment) { + this.environment = data.environment + } */ + return Promise.resolve() + } catch (e) { + console.error('传入returnData有误') + } + }, + clearLogin() { + this.$reset() + //testzc VueCookie.delete('loginData') + }, + // 清除path(直接用) + clearPathSearch(keys: string[]) { + let path = location.search.slice(1) + let str = keys.reduce((data, cur) => { + data += cur + '|' + return data + }, '') + str = str.slice(0, -1) + path = path.replace(new RegExp(`((${str})=[^&]+)`, 'g'), () => '') + path = path.replace(/^[&]+/, '') + path = path.replace(/([&]+)/g, '&') + path = path ? `?${path}` : path + const time = setTimeout(() => { + clearTimeout(time) + window.history.replaceState(null, '', `${location.pathname}${path}`) + }, 1000) + }, + // 上传token和git log(可用:微调) + async handleUploadToken(token: string, mobile: string) { + const divGitInfo = (document.querySelector('#div-git-info') as HTMLElement)?.dataset.gitInfo + const oldData = { commitId: '' } + if (divGitInfo) { + divGitInfo.replace(/([^&=]+)=([^&]+)/g, (_, k, v) => (oldData[k as keyof typeof oldData] = v)) + } + /* apiCommon.uploadToken.post({ + mobile, + msg: JSON.stringify([`<东成贷> 联合登录url参数:${oldData.commitId}`, `token=${token}`]), + deviceType: getPhoneType(), + systemCode: 'dongchengdai', + systemCodeName: '东成贷', + projectCode: 'DCD_H5', + projectCodeName: '东成贷H5', + title: 'consoleLog', + type: 'console', + url: location.origin + location.pathname, + }) */ + }, + // 前端日志上报(可用,微调) + async handleCreateLog(app: any) { + const appStore = useAppStore() + let mobile: string + new Log({ + window, + Vue: appStore.env !== 'dev' ? app : undefined, + filterHttpUrl: logConfig.filterHttpUrl, + interceptDomain: logConfig.interceptDomain, + sendError: async (obj: any = {}) => { + const msgOb = JSON.parse(obj.msg || '{}') + const url = msgOb.url ? msgOb.url.replace(/.+app-web/g, '') : '' + Object.assign(obj, { + // mobile, + // secretKeyAesKey: secretKeyAesKey[url], + systemCode: 'dongchengdai', + systemCodeName: '东成贷', + deviceType: getPhoneType(), + projectCode: 'DCD_H5', + projectCodeName: '东成贷H5', + }) + // delete secretKeyAesKey[url] + axios.post(logConfig.bllogAddUrl, obj) + }, + }) + window.log = log + }, + }, + persist: { + key: 'login', + storage: localStorage, + }, +}) diff --git a/src/stores/modules/native.ts b/src/stores/modules/native.ts new file mode 100644 index 0000000..38608f2 --- /dev/null +++ b/src/stores/modules/native.ts @@ -0,0 +1,46 @@ +import type { DCAndNativeNameType, DCNativeNameType } from 'lz-utils-lib' +import { DC, handleData } from 'lz-utils-lib' +import { defineStore } from 'pinia' + +import api from '@/api' +import router from '@/router' +import { handleGoThirdPage } from '@/utils/common' +import { openMinProgram } from '@/utils/wx-minprogram' + +export default defineStore('native', { + state: (): { appInfo: any } => { + return { + appInfo: Object.create(null) as any, + } + }, + getters: { + version(state) { + return state.appInfo.version ? state.appInfo.version : '' + }, + appPackage() { + return 'xcx_dc' + }, + }, + actions: { + jumpRouter(type) { + if (this.appPackage === 'xcx_dc') { + switch (type) { + case 'home': + openMinProgram('index') + break + case 'logout': + openMinProgram('index') + break + case 'login': + openMinProgram('login') + break + default: + } + } + }, + }, + persist: { + key: 'nativeConfig', + storage: localStorage, + }, +}) diff --git a/src/utils/axios.ts b/src/utils/axios.ts new file mode 100644 index 0000000..3c003da --- /dev/null +++ b/src/utils/axios.ts @@ -0,0 +1,97 @@ +import 'vant/es/toast/style' + +import axios, { AxiosError, type AxiosInstance, type AxiosRequestConfig, type AxiosResponse, type InternalAxiosRequestConfig } from 'axios' +import { showToast } from 'vant' + +import { baseURL } from '@/settings' +import useStore from '@/stores' + +import { loadingData } from './page' + +// 创建axios实例 +const service: AxiosInstance = axios.create({ + baseURL, // api 的 base_url + timeout: 150000, // 请求超时时间 +}) + +const noEncryptWhiteList = ['/common/protocol/content', '/portal/common/protocol/content', '/bl-log/web/log/add'] +const noConsoleWhiteList = ['bl-log/web/log/add'] + +// request拦截器 +service.interceptors.request.use( + async (config: InternalAxiosRequestConfig) => { + const { userStore, appStore } = useStore() + if (!/^http/.test(config.url!)) { + config.headers!.token = userStore.userInfo.token || '' + } + if (!(config.headers!['Content-Type'] as string)?.endsWith('multipart/form-data')) { + if (config.method === 'get') { + if (config.params?.isLoading) { + config.isLoading = true + delete config.params.isLoading + loadingData.type === 'submit' && (loadingData.show = true) + } + } else { + config.data.buyerId = 2 // testzc + config.data.buyerWeixin = '我是微信号' // testzc + config.isLoading = config.data.isLoading + delete config.data.isLoading + config.isLoading && loadingData.type === 'submit' && (loadingData.show = true) + } + } + return config + }, + (error: AxiosError) => { + // Do something with request error + console.log(error) // for debug + Promise.reject(error) + }, +) + +// response 拦截器 +service.interceptors.response.use( + (response: AxiosResponse) => { + const { nativeStore } = useStore() + if (response.config.responseType === 'blob' || response.config.third) { + // 如果是文件流,直接过 + return response + } + if (!['200'].includes(response.data.code)) { + showToast({ message: response.data.desc, duration: 3000 }) + if (response.data.code === 401) { + setTimeout(() => { + nativeStore.jumpRouter('login') + }, 1000) + return + } + if (response.config.isLoading && loadingData.type === 'submit') { + loadingData.show = false + } + return Promise.reject(response.data) + } + if (response.data.code === '200' || response.config.toast === false) { + return response.data + } + if (response.config.isLoading && loadingData.type === 'submit') { + loadingData.show = false + } + setTimeout(() => { + showToast({ message: response.data.msg, duration: 3000 }) + }, 100) + return Promise.reject(response.data) + }, + (error: AxiosError) => { + console.log(`err${error}`) // for debug + showToast(error.message) + loadingData.type === 'submit' && (loadingData.show = false) + return Promise.reject(error) + }, +) + +export const request = (config: AxiosRequestConfig): Promise => service.request(config) +export default { + get: (config: AxiosRequestConfig) => request({ ...config, method: 'get' }), + post: (config: AxiosRequestConfig) => request({ ...config, method: 'post' }), + delete: (config: AxiosRequestConfig) => request({ ...config, method: 'delete' }), + put: (config: AxiosRequestConfig) => request({ ...config, method: 'put' }), +} diff --git a/src/utils/common.ts b/src/utils/common.ts new file mode 100644 index 0000000..f371d43 --- /dev/null +++ b/src/utils/common.ts @@ -0,0 +1,99 @@ +import { logConfig } from '@/settings' +import { map } from 'lodash-es' +import MobileDetect from 'mobile-detect' +import { getData } from 'lz-utils-lib' +import useAppStore from '@/stores/modules/app' +import router from '@/router' + +// 获取手机具体型号 +export const getPhoneType = () => { + try { + const deviceType = navigator.userAgent // 获取userAgent信息 + const md = new MobileDetect(deviceType) // 初始化mobile-detect + let os = md.os() // 获取系统 + let model = '' as any + if (os === 'iOS') { + // ios系统的处理 + os = md.os() + ' ' + md.version('iPhone') + model = md.mobile() + } else if (os === 'AndroidOS') { + // Android系统的处理 + os = md.os().replace('OS', '') + ' ' + md.version('Android') + const sss = deviceType.split(';') + const i = sss.findIndex((val) => val.includes('Build/')) + if (i) { + model = sss[i].substring(0, sss[i].indexOf('Build/')).trim() + } + } + return os + ' ' + model + } catch (e) { + return '未知型号' + } +} + +// 判断是线上还是开发环境打印日志 +export const log = (...arg: any) => { + try { + if (logConfig.interceptDomain.includes(location.origin)) { + // 线上环境 + window.captureLog(...arg) + } else { + console.log(...arg) + } + } catch (e) { + console.log(...arg) + } +} + +// url参数变成参数字符串 +export const getQuerystring = (data: Record) => { + return map(data, (val: any, key: string) => `${encodeURIComponent(key)}=${encodeURIComponent(typeof val === 'object' ? JSON.stringify(val) : val)}`).join('&') +} + +/** + * 跳转url + * @param url: https://www.baidu.com; https://lth5.yijiesudai.com/unicom/a; /borrow/money; + */ +export const handleGoThirdPage = (url: string, name?: string, urlParams?: Record) => { + const newParams = { ...getData.getUrlParams(url), ...(urlParams || {}) } + const query = getQuerystring(newParams) + const newUrl = url.split('?')[0] + if (newUrl.includes(`/${import.meta.env.VITE_APP_CODE}/`)) { + const regex = new RegExp(`.*(/${import.meta.env.VITE_APP_CODE})([^?]+).*`) + const path = newUrl.replace(regex, '$2') + router.push({ path, query: newParams }) + } else if (newUrl.endsWith('.pdf')) { + handleGoPdfPage(newUrl, name, url.split('?')[1]) + } else { + window.location.href = newUrl + '?' + query + } +} + +/** + * pdf跳转 + * @param url pdf链接 + */ +export const handleGoPdfPage = (url: string, name: string, search: string = '') => { + const appStore = useAppStore() + /* + // 小程序:等小程序上线后再使用 + if (appStore.platform === 'xcx') { + // window.useLoading({ type: 'submit', show: true }) + // window.wx.miniProgram.postMessage({ data: { pdfUrl: url + '?' + search } }) + window.wx.miniProgram.navigateTo({ url: `/pages/pdf/index?url=${encodeURIComponent(url)}` }) + } else */ + if (getPhoneType().toLocaleLowerCase().startsWith('ios')) { + window.location.href = url + '?' + search + } else { + sessionStorage.setItem('picUrlName', name) + const prefixConfig = { + 'ltf.yijiesudai': '/yjsd', + 'dcd-pri.oss-cn-hangzhou': '/dcd-pri', + 'dcd-pri.dongchengdai.com': '/dcd-pri', + 'ltyijie.oss-cn-hangzhou': '/yjsd', + } + const prefix = prefixConfig[Object.keys(prefixConfig).find((key) => url.includes(key))] + const newUrl = url.replace(/(https?:\/\/)?[^/?]+/, window.location.origin + (appStore.env === 'dev' ? '/test' : '') + prefix) + window.location.href = window.location.origin + '/dcmb/pdfjs/web/viewer.html?file=' + encodeURIComponent(newUrl + '?' + search) + } +} diff --git a/src/utils/page.ts b/src/utils/page.ts new file mode 100644 index 0000000..e9f9476 --- /dev/null +++ b/src/utils/page.ts @@ -0,0 +1,63 @@ +import { closeToast, showLoadingToast, type ToastWrapperInstance } from 'vant' + +interface ApiType { + api: (data?: T) => Promise<{ code: string; msg: string; data: K }> + params?: object +} + +export const useCreatePageData = (apis: ApiType[]) => { + return Promise.all(apis.map((item: ApiType) => item.api(item.params))) +} + +// 提交loading +export const useSubmitLoading = (message = '提交中...') => { + showLoadingToast({ duration: 0, overlay: true, forbidClick: true, message }) +} +useSubmitLoading.close = () => { + closeToast() +} + +// 将日期转为数组 +export const handleDateToArray = (date: Date) => { + return [date.getFullYear().toString(), (date.getMonth() + 1).toString().padStart(2, '0'), date.getDate().toString().padStart(2, '0')] +} + +window.isBgWhite = ref(true) +export const isBgWhite = window.isBgWhite + +// 获取loading +export const loadingData = reactive({ if: null as null | boolean, type: 'enter', show: false }) +window.useLoading = (ob: { type: 'enter' | 'submit'; show: boolean } = { type: 'enter', show: true }) => { + loadingData.if ??= true + return Object.assign(loadingData, ob) +} + +// 提示弹窗 +export const tipDialogData = reactive({ + if: null as null | boolean, + show: false, + showCloseIcon: false, + showCancelBtn: false, + cancelBtnName: '', + title: '', + html: '', + btnName: '', + callback: (() => {}) as (result: boolean) => void | Promise, +}) +window.useTipDialog = ( + callback: (result: boolean) => void | Promise, + config: { + title: string + html: string + btnName: string + showCloseIcon?: boolean + showCancelBtn?: boolean + cancelBtnName?: string + }, +) => { + tipDialogData.showCancelBtn = false + Object.assign(tipDialogData, config) + tipDialogData.if ??= true + tipDialogData.show = true + tipDialogData.callback = callback +} diff --git a/src/utils/wx-minprogram.ts b/src/utils/wx-minprogram.ts new file mode 100644 index 0000000..702a21a --- /dev/null +++ b/src/utils/wx-minprogram.ts @@ -0,0 +1,36 @@ +import api from '@/api' +/** + * 小程序内H5打开小程序页面 + * @param {string} type 小程序页面:index首页,mine我的 + */ +export const openMinProgram = (type = 'index') => { + if (['index', 'mine'].includes(type)) { + window.wx.miniProgram.switchTab({ url: `/pages/${type}/index` }) + } else { + window.wx.miniProgram.redirectTo({ url: `/pages/${type}/index` }) + } +} + +/** + * 小程序外H5打开小程序页面 + * @param {string} type 小程序页面:index首页,mine我的,webview页面 + * @param {string} h5Url 小程序中H5页面地址(type=webview时存在此值) + */ +export const h5OpenMinProgram = (type = 'index', h5Url = '') => { + const params = {} + if (type) { + Object.assign(params, { backUrl: `/pages/${type}/index` }) + } + if (h5Url && !h5Url.startsWith('https')) { + Object.assign(params, { + query: `url=${encodeURIComponent(`${window.location.origin}${h5Url}`)}` + }) + } + api.getSchemeUrl.post(params).then(res => { + if (res.data) { + window.location.href = res.data as any + } else { + showToast('跳转链接有误,请联系客服!') + } + }) +} diff --git a/src/views/commodity-detail/components/address-form.vue b/src/views/commodity-detail/components/address-form.vue index 575fcdc..e63322e 100644 --- a/src/views/commodity-detail/components/address-form.vue +++ b/src/views/commodity-detail/components/address-form.vue @@ -4,17 +4,15 @@
- - - - - - diff --git a/src/views/commodity-detail/components/address-list.vue b/src/views/commodity-detail/components/address-list.vue index 64aec28..aa2dc4f 100644 --- a/src/views/commodity-detail/components/address-list.vue +++ b/src/views/commodity-detail/components/address-list.vue @@ -1,49 +1,86 @@ @@ -62,7 +99,6 @@ const onEditAddress = () => { width: 0; } .item__info__detail { - font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; diff --git a/src/views/commodity-detail/index.vue b/src/views/commodity-detail/index.vue index 0201bf3..a914642 100644 --- a/src/views/commodity-detail/index.vue +++ b/src/views/commodity-detail/index.vue @@ -50,14 +50,22 @@
- + - - + +