From 56f09c263f883346b2bdb86cda45ec1d878257cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 13 Jan 2026 15:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 16 + api/apiT.js | 10 +- components/CarCard/CarCard.vue | 350 +++++++++++ index.html | 1 + pages.json | 18 + pages/index/changinfo.vue | 270 ++++++++ pages/index/detils.vue | 83 ++- pages/index/index - 副本.vue | 374 +++++++++++ pages/index/index.vue | 324 ++++++---- pages/index/mine - 副本 (2).vue | 179 ++++++ pages/index/mine - 副本.vue | 458 ++++++-------- pages/index/mine.vue | 351 ++++++----- pages/index/myPublish.vue | 184 ++++++ pages/index/publish.vue | 455 +++++++++++++- pages/index/publishedit.vue | 1042 ++++++++++++++++++++++--------- pages/login/feishu-callback.vue | 22 +- pages/login/index.vue | 26 +- static/image/none.png | Bin 0 -> 4321 bytes static/image/photo.png | Bin 0 -> 640 bytes 19 files changed, 3253 insertions(+), 910 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 components/CarCard/CarCard.vue create mode 100644 pages/index/changinfo.vue create mode 100644 pages/index/index - 副本.vue create mode 100644 pages/index/mine - 副本 (2).vue create mode 100644 pages/index/myPublish.vue create mode 100644 static/image/none.png create mode 100644 static/image/photo.png diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ff3465 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,16 @@ +{ + "i18n-ally.localesPaths": [ + "common/locales", + "uni_modules/uni-table/i18n", + "uni_modules/uni-calendar/components/uni-calendar/i18n", + "uni_modules/uni-countdown/components/uni-countdown/i18n", + "uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n", + "uni_modules/uni-fav/components/uni-fav/i18n", + "uni_modules/uni-goods-nav/components/uni-goods-nav/i18n", + "uni_modules/uni-load-more/components/uni-load-more/i18n", + "uni_modules/uni-popup/components/uni-popup/i18n", + "uni_modules/uni-pagination/components/uni-pagination/i18n", + "uni_modules/uni-search-bar/components/uni-search-bar/i18n", + "uni_modules/z-paging/components/z-paging/i18n" + ] +} \ No newline at end of file diff --git a/api/apiT.js b/api/apiT.js index 040dcac..7c04088 100644 --- a/api/apiT.js +++ b/api/apiT.js @@ -1,7 +1,7 @@ // const baseUrl = "https://api.collect.hs.hnzhwlkj.club/"; //这里放置url域名32044 - // const baseUrl = "https://api.collect.xyh.muzili.top/"; //这里放置url域名32044 -const baseUrl = "https://usedcar.dev.hnxinyouhe.com/"; //这里放置url域名32044 - // const baseUrl = "https://114.215.24.240:8106/api/v1/"; //这里放置url域名32044 + const baseUrl = "https://userdcar-server.hnxinyouhe.com/"; //这里放置url域名32044 +// const baseUrl = "https://usedcar.dev.hnxinyouhe.com/"; //这里放置url域名32044 + // const baseUrl = "http://219.157.255.213:36010/"; //这里放置url域名32044 export function request(options){//封装的requset let { url,data,method } = options; data = data || {}, @@ -13,7 +13,7 @@ export function request(options){//封装的requset uni.request({//这里是uniapp网络请求的api url: baseUrl + url, //仅为示例,并非真实接口地址。 data, - header:{'content-type': 'application/x-www-form-urlencoded','Fdesk-Auth-Token':uni.getStorageSync('token'),'Fdesk-Login-Type': 'feishu','Fdesk-System-Code':'fdesk'}, + header:{'Fdesk-Auth-Token':uni.getStorageSync('token'),'Fdesk-Login-Type': 'feishu','Fdesk-System-Code':'fdesk'}, method:method||"GET",//默认请求方式是get success: (res) => { resolve(res) @@ -31,7 +31,7 @@ export function requestx(options){//封装的requset uni.request({//这里是uniapp网络请求的api url: baseUrl + url, //仅为示例,并非真实接口地址。 data, - header:{'content-type': 'application/x-www-form-urlencoded','Authorization': 'Bearer ' + uni.getStorageSync('openid')}, + header:{'Authorization': 'Bearer ' + uni.getStorageSync('openid')}, method:method||"GET",//默认请求方式是get success: (res) => { resolve(res) diff --git a/components/CarCard/CarCard.vue b/components/CarCard/CarCard.vue new file mode 100644 index 0000000..e2868a0 --- /dev/null +++ b/components/CarCard/CarCard.vue @@ -0,0 +1,350 @@ + + + + + + diff --git a/index.html b/index.html index c1ee912..1041d85 100644 --- a/index.html +++ b/index.html @@ -18,5 +18,6 @@
+ diff --git a/pages.json b/pages.json index 20abc73..e019642 100644 --- a/pages.json +++ b/pages.json @@ -68,6 +68,24 @@ "navigationStyle":"custom"// 去掉微信小程序顶部导航 } }, + { + "path" : "pages/index/changinfo", + "style" : + { + "navigationBarTitleText": "个人信息", + "enablePullDownRefresh": false, + "navigationStyle":"custom"// 去掉微信小程序顶部导航 + } + }, + { + "path" : "pages/index/myPublish", + "style" : + { + "navigationBarTitleText": "我的发布", + "enablePullDownRefresh": false, + "navigationStyle":"custom"// 去掉微信小程序顶部导航 + } + }, { "path" : "pages/login/feishu-callback", "style" : diff --git a/pages/index/changinfo.vue b/pages/index/changinfo.vue new file mode 100644 index 0000000..d1515fe --- /dev/null +++ b/pages/index/changinfo.vue @@ -0,0 +1,270 @@ + + + + diff --git a/pages/index/detils.vue b/pages/index/detils.vue index 2a2720d..6cc8453 100644 --- a/pages/index/detils.vue +++ b/pages/index/detils.vue @@ -9,11 +9,11 @@ {{ detail.product_name }} - + 车价(¥) @@ -25,10 +25,10 @@ {{ detail.source_place}} - + 上牌时间 @@ -44,10 +44,13 @@ 里程 {{ detail.mileage }} - + + 马力 + {{ detail.power }} + 车身颜色 - {{ detail.color }} + {{ detail.body_color }} @@ -56,6 +59,15 @@ + + + 车况介绍 + {{ detail.condition_desc }} + + + + + 产品图 @@ -70,11 +82,17 @@ /> - - - - 车况介绍 - {{ detail.condition_desc }} + + 附件 + + +

{{file.name}}

+ 查看 +
+
+ + +
@@ -86,6 +104,7 @@ data() { return { id: '', + appid: '', detail: {}, currentImageIndex: 0 } @@ -111,6 +130,20 @@ onLoad(options) { // 1) 支持通过 id 打开:/pages/index/detils?id=123 this.id = options?.id || '' + // 2) 分享链接里会带 appid,用于未登录时拉起飞书免登 + const appid = options?.appid || uni.getStorageSync('fsappid') || '' + if (appid) uni.setStorageSync('fsappid', appid) + // 3) 如果未登录:先去登录页,登录成功后再回到当前详情页 + const token = uni.getStorageSync('token') + if (!token) { + const redirect = `/pages/index/detils?id=${this.id}${appid ? `&appid=${encodeURIComponent(appid)}` : ''}` + uni.setStorageSync('post_login_redirect', redirect) + // 使用 reLaunch,避免用户打开分享链接后历史栈混乱 + uni.reLaunch({ + url: `/pages/login/index?appid=${encodeURIComponent(appid)}&redirect=${encodeURIComponent(redirect)}` + }) + return + } this.getshows() }, methods: { @@ -146,6 +179,23 @@ current: this.images[this.currentImageIndex], urls: this.images }) + }, + downloadByAnchor(url, filename) { + try { + const a = document.createElement('a') + a.href = url + a.download = filename || '' + a.target = '_blank' + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + } catch (e) { + // 兜底:直接打开 + if (typeof window !== 'undefined') window.open(url, '_blank') + } + }, + reviewFile(file){ + this.downloadByAnchor(file.src, file.name) } } } @@ -329,4 +379,15 @@ color: #ff972f; font-size: 24rpx; } + .fujian{ + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ebebeb; + padding: 8px 10px; + border-radius: 4px; + } + .noneview{ + text-align: center; + } diff --git a/pages/index/index - 副本.vue b/pages/index/index - 副本.vue new file mode 100644 index 0000000..79e490d --- /dev/null +++ b/pages/index/index - 副本.vue @@ -0,0 +1,374 @@ + + + + + diff --git a/pages/index/index.vue b/pages/index/index.vue index 6c66396..d716897 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -20,52 +20,40 @@ - - - - - {{ item.product_name }} - - - - - 车源地 - {{ item.source_place }} - - - 车身颜色 - {{ item.body_color }} - - - - - - 上牌时间 - {{ ym(item.plate_time) }} - - - 里程 - {{ item.mileage }} - - - - + + + + + + diff --git a/pages/index/mine - 副本.vue b/pages/index/mine - 副本.vue index 15b29a8..c5b4a8b 100644 --- a/pages/index/mine - 副本.vue +++ b/pages/index/mine - 副本.vue @@ -1,88 +1,62 @@ + + diff --git a/pages/index/publish.vue b/pages/index/publish.vue index 3ed7172..865367d 100644 --- a/pages/index/publish.vue +++ b/pages/index/publish.vue @@ -4,16 +4,26 @@ 产品名称 * - - + + + 绑定 - + + + + 已绑定:{{ bindState.boundProduct.name || bindState.boundProduct.product_name || bindState.boundProduct.title || '-' }} + 清除 + + + 例:比亚迪海狮07DM + + 车价(¥) @@ -26,12 +36,12 @@ - + 上牌时间 @@ -59,6 +69,12 @@ + + 马力 + + + + 里程 @@ -87,11 +103,65 @@