From f43c3b3e54d2cc6705a92e55bc8218db28d3dd55 Mon Sep 17 00:00:00 2001 From: Abbh1 <86962549+Abbh1@users.noreply.github.com> Date: Mon, 20 Nov 2023 21:49:46 +0800 Subject: [PATCH] =?UTF-8?q?init:=20=E5=88=9D=E5=A7=8B=E5=8C=96=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=88=97=E8=A1=A8=E5=92=8C=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 4 +- app.json | 1 + pages/home/home.js | 12 ++++- pages/home/home.json | 6 ++- pages/home/home.wxml | 30 +++++++++++- pages/home/home.wxss | 64 ++++++++++++++++++++++++++ pages/login/login.wxml | 4 +- pages/login/phone-register/index.wxml | 12 ++--- pages/table-data/index.js | 66 +++++++++++++++++++++++++++ pages/table-data/index.json | 8 ++++ pages/table-data/index.wxml | 23 ++++++++++ pages/table-data/index.wxss | 43 +++++++++++++++++ project.config.json | 2 +- style/theme.wxss | 31 +++++++++++++ 14 files changed, 291 insertions(+), 15 deletions(-) create mode 100644 pages/table-data/index.js create mode 100644 pages/table-data/index.json create mode 100644 pages/table-data/index.wxml create mode 100644 pages/table-data/index.wxss diff --git a/app.js b/app.js index 50367a9..3bd097d 100644 --- a/app.js +++ b/app.js @@ -1,8 +1,8 @@ import updateManager from './common/updateManager'; -// export const ServerBasePath = 'http://localhost:8888/api/'; +export const ServerBasePath = 'http://localhost:8888/api/'; // export const ServerBasePath = 'http://192.168.1.102:8888/api/'; -export const ServerBasePath = 'http://emo-api.aerwen.net/api/'; +// export const ServerBasePath = 'http://emo-api.aerwen.net/api/'; App({ onLaunch: function () {}, diff --git a/app.json b/app.json index 0434e0c..f4dba36 100644 --- a/app.json +++ b/app.json @@ -2,6 +2,7 @@ "pages": [ "pages/home/home", "pages/home/search/index", + "pages/table-data/index", "pages/login/login", "pages/login/authorize-avatar-name/index", "pages/login/phone-register/index", diff --git a/pages/home/home.js b/pages/home/home.js index 6966598..9d15cf6 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -114,7 +114,7 @@ Page({ getEmoticonDataList(params).then((res) => { if (res.code == 200) { this.page.num++; - + this.setData({ lastUpdatedList: this.data.lastUpdatedList.concat(res.data.result), loadMoreStatus: 0 @@ -156,4 +156,14 @@ Page({ } }, + gotoDetail(e) { + const { + dataset + } = e.currentTarget; + const id = dataset?.value; + wx.navigateTo({ + url: `/pages/table-data/index?id=${id}`, + }); + } + }); \ No newline at end of file diff --git a/pages/home/home.json b/pages/home/home.json index 1ba1b65..234e8f1 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -15,6 +15,10 @@ "t-tabs": "tdesign-miniprogram/tabs/tabs", "t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel", "load-more": "/components/load-more/index", - "t-notice-bar": "tdesign-miniprogram/notice-bar/notice-bar" + "t-notice-bar": "tdesign-miniprogram/notice-bar/notice-bar", + "t-tag": "tdesign-miniprogram/tag/tag", + "price": "/components/price/index", + "t-button": "tdesign-miniprogram/button/button", + "van-button": "@vant/weapp/button/index" } } \ No newline at end of file diff --git a/pages/home/home.wxml b/pages/home/home.wxml index d3c37bf..65f87c4 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -27,7 +27,7 @@ - + + + + + + + 渤银理财理财分销对接代销系统采购项目 + + 中标价格: + + 价格待定 + + + 2023-11-18 + - + 2023-12-20 + + + 房产 + + 我感兴趣 + + + + + + \ No newline at end of file diff --git a/pages/home/home.wxss b/pages/home/home.wxss index b5e3dfd..bee64c5 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -163,3 +163,67 @@ page { left: 3rpx; box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1) inset; } + + +/* 表格数据 */ +.table-data-list-box{ + padding: 40rpx 0; +} + +.table-data-list-item-box{ + width: 100%; + background-color: white; + border-radius: 20rpx; + padding-top: 30rpx; + padding-bottom: 20rpx; +} + +.table-data-list-item{ + margin-left: 40rpx; + margin-right: 20rpx; +} + +.table-data-list-item .title{ + font-size: 30rpx; + letter-spacing: 1rpx; + margin-bottom: 10rpx; +} + +.table-data-list-item .tag-box{ + display: flex; + flex-wrap: wrap; + margin-bottom: 15rpx; +} + +.table-data-list-item .tag{ + font-size: 28rpx !important; + margin-right: 10rpx; + margin-bottom: 10rpx; +} + +.table-data-list-item .price-box{ + display: flex; + margin: 15rpx 0; +} + +.table-data-list-item .price-box .price-title{ + font-size: 29rpx; + font-weight: bold; +} + +.time-box{ + display: flex; + margin: 15rpx 0; + color: grey; +} + +.time-box .time-text{ + font-size: 29rpx; +} + +.time-box .time-line{ + margin: 0 10rpx; +} + +.table-data-list-item .btn{ +} \ No newline at end of file diff --git a/pages/login/login.wxml b/pages/login/login.wxml index 4aa9944..50d62d4 100644 --- a/pages/login/login.wxml +++ b/pages/login/login.wxml @@ -12,8 +12,8 @@ diff --git a/pages/table-data/index.js b/pages/table-data/index.js new file mode 100644 index 0000000..d6e5d7b --- /dev/null +++ b/pages/table-data/index.js @@ -0,0 +1,66 @@ +// pages/table-data/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/table-data/index.json b/pages/table-data/index.json new file mode 100644 index 0000000..52f25d1 --- /dev/null +++ b/pages/table-data/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "详情", + "navigationBarBackgroundColor": "#F6F7F8", + "usingComponents": { + "t-cell": "tdesign-miniprogram/cell/cell", + "price": "/components/price/index" + } +} \ No newline at end of file diff --git a/pages/table-data/index.wxml b/pages/table-data/index.wxml new file mode 100644 index 0000000..1c2657d --- /dev/null +++ b/pages/table-data/index.wxml @@ -0,0 +1,23 @@ + + + + + + 渤银理财理财分销对接代销系统采购项目 + + + 价格待定 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/table-data/index.wxss b/pages/table-data/index.wxss new file mode 100644 index 0000000..00c36d9 --- /dev/null +++ b/pages/table-data/index.wxss @@ -0,0 +1,43 @@ +/* pages/table-data/index.wxss */ + +.table-data-page{ + width: 100%; + background-color: #F6F7F8; + padding: 50rpx 0; +} + +.table-data-container{ + width: 90%; + margin: 0 auto; +} + +.title-box .title{ + font-size: 35rpx; + letter-spacing: 1rpx; + font-weight: bold; +} + +.price-box{ + margin-top: 30rpx; +} + +.detail-box{ + width: 100%; + margin-top: 50rpx; + /* padding: 20rpx 0; */ + background-color: white; + box-shadow:#EDEEEF 10px 10px 10px; +} + +.detail-margin-box{ + /* margin: 0 10rpx; */ +} + +.cell-class{ + font-size: 29rpx !important; + color: #989292 !important; +} + +.node-class{ + color: #000 !important; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index c90e3e6..09c7c18 100644 --- a/project.config.json +++ b/project.config.json @@ -48,7 +48,7 @@ }, "compileType": "miniprogram", "libVersion": "2.23.1", - "appid": "wxcdeaf70fb4239637", + "appid": "wxb9b9846ca6ad841b", "projectname": "tdesign-miniprogram-starter-retail", "simulatorType": "wechat", "simulatorPluginLibVersion": {}, diff --git a/style/theme.wxss b/style/theme.wxss index 24da6b1..1cc0bbd 100644 --- a/style/theme.wxss +++ b/style/theme.wxss @@ -75,4 +75,35 @@ .mb-30 { margin-bottom: 30rpx; +} + +.w1{ + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; + white-space: normal !important; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; +} + +.w2{ + display: -webkit-box; + overflow: hidden; + text-overflow: ellipsis; + word-wrap: break-word; + white-space: normal !important; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.price-class { + color: #FA4126 !important; + font-size: 35rpx; + font-weight: bold; +} + +.black{ + color: #000 !important; + font-weight: normal !important; } \ No newline at end of file