diff --git a/pages/home/home.js b/pages/home/home.js index 9d15cf6..b3bb9db 100644 --- a/pages/home/home.js +++ b/pages/home/home.js @@ -32,7 +32,35 @@ Page({ mode: 'scaleToFill', }, categoryGuid: 0, - loadMoreStatus: 0 + loadMoreStatus: 0, + product: { + value: 'all', + options: [{ + value: 'all', + label: '全部产品', + }, + { + value: 'new', + label: '最新产品', + }, + { + value: 'hot', + label: '最火产品', + }, + ], + }, + sorter: { + value: 'default', + options: [{ + value: 'default', + label: '默认排序', + }, + { + value: 'price', + label: '价格从高到低', + }, + ], + }, }, page: { @@ -71,8 +99,8 @@ Page({ pageLoading: true, }); - this.getBanner() - this.getRec() + // this.getBanner() + // this.getRec() // this.getNotice() }, diff --git a/pages/home/home.json b/pages/home/home.json index 234e8f1..06106d9 100644 --- a/pages/home/home.json +++ b/pages/home/home.json @@ -1,7 +1,8 @@ { "navigationBarTitleText": "小程序模板", "onReachBottomDistance": 10, - "navigationBarBackgroundColor": "#ffffff", + "navigationBarBackgroundColor": "#1969A4", + "navigationBarTextStyle": "white", "backgroundTextStyle": "light", "enablePullDownRefresh": true, "usingComponents": { @@ -19,6 +20,8 @@ "t-tag": "tdesign-miniprogram/tag/tag", "price": "/components/price/index", "t-button": "tdesign-miniprogram/button/button", - "van-button": "@vant/weapp/button/index" + "van-button": "@vant/weapp/button/index", + "t-dropdown-menu": "tdesign-miniprogram/dropdown-menu/dropdown-menu", + "t-dropdown-item": "tdesign-miniprogram/dropdown-item/dropdown-item" } } \ No newline at end of file diff --git a/pages/home/home.wxml b/pages/home/home.wxml index 65f87c4..7fd006d 100644 --- a/pages/home/home.wxml +++ b/pages/home/home.wxml @@ -17,31 +17,23 @@ --> - + - + --> - + - - - + + + + + @@ -61,7 +53,7 @@ 房产 - 我感兴趣 + 查看详情 diff --git a/pages/home/home.wxss b/pages/home/home.wxss index bee64c5..7263c95 100644 --- a/pages/home/home.wxss +++ b/pages/home/home.wxss @@ -9,6 +9,7 @@ page { .home-page-header { background: linear-gradient(#fff, #f5f5f5); + /* padding: 20rpx 0 ; */ } .home-page-container { @@ -18,13 +19,13 @@ page { .home-page-container, .home-page-header { display: block; - padding: 0 24rpx; + /* padding: 0 24rpx; */ } .home-page-header .t-search__input-container { background-color: #ffffff; - border-radius: 32rpx !important; - height: 64rpx !important; + /* border-radius: 32rpx !important; */ + height: 80rpx !important; } .home-page-header .t-search__input { @@ -136,6 +137,11 @@ page { padding-bottom: 24rpx; } +.search{ + background-color: #1969A4; + padding: 30rpx 20rpx; +} + .search-content { overflow: hidden; display: flex; diff --git a/pages/login/phone-register/index.js b/pages/login/phone-register/index.js index 5f47eb1..03ccdaa 100644 --- a/pages/login/phone-register/index.js +++ b/pages/login/phone-register/index.js @@ -2,6 +2,10 @@ import { sendPhoneCode } from '~/services/login/phone-register'; +import { + login +} from '~/services/login/login'; +import Toast from '~/miniprogram_npm/@vant/weapp/toast/toast'; Page({ @@ -26,7 +30,7 @@ Page({ return; } const isPhoneNumber = /^[1][3,4,5,7,8,9][0-9]{9}$/.test(this.data.phoneNumber); - if(!isPhoneNumber){ + if (!isPhoneNumber) { wx.showToast({ icon: 'error', title: '手机号格式不正确', @@ -55,6 +59,67 @@ Page({ } }, + /** 用户名 */ + onNameInput(e) { + this.setData({ + phoneNumber: e.detail.value, + }); + }, + + /** 密码 */ + onPasswordInput(e) { + this.setData({ + verifyCode: e.detail.value, + }); + }, + + + toLogin(e) { + let { + phoneNumber, + verifyCode + } = this.data + + // console.log(phoneNumber, '用户名'); + // console.log(verifyCode, '密码'); + + if (!phoneNumber) { + wx.showToast({ + title: '请输入用户名', + icon: 'error', + duration: 2000 + }) + return + } + if (!verifyCode) { + wx.showToast({ + title: '请输入密码', + icon: 'error', + duration: 2000 + }) + return + } + + let data = { + CustomerNickname: phoneNumber, + CustomerPassword: verifyCode + } + + // 登录请求 + login(data).then((res) => { + if (res.code === 200) { + setTimeout(() => { + wx.showToast({ + icon: 'success', + title: '登录成功', + }); + }, 1000); + wx.switchTab({ + url: '/pages/home/home', + }); + } + }) + }, /** diff --git a/pages/login/phone-register/index.wxml b/pages/login/phone-register/index.wxml index 1209517..f875fb7 100644 --- a/pages/login/phone-register/index.wxml +++ b/pages/login/phone-register/index.wxml @@ -18,19 +18,20 @@ - + - 登录 + 登录 diff --git a/pages/table-data/index.json b/pages/table-data/index.json index 52f25d1..11d4838 100644 --- a/pages/table-data/index.json +++ b/pages/table-data/index.json @@ -3,6 +3,7 @@ "navigationBarBackgroundColor": "#F6F7F8", "usingComponents": { "t-cell": "tdesign-miniprogram/cell/cell", - "price": "/components/price/index" + "price": "/components/price/index", + "van-button": "@vant/weapp/button/index" } } \ No newline at end of file diff --git a/pages/table-data/index.wxml b/pages/table-data/index.wxml index 1c2657d..d9d659a 100644 --- a/pages/table-data/index.wxml +++ b/pages/table-data/index.wxml @@ -4,20 +4,57 @@ 渤银理财理财分销对接代销系统采购项目 - + + + 基本信息 + - - + + + + + + + + + + + + + + + + + + 中标信息 + + + + + + + + + + + + + + + + + + 我感兴趣 \ No newline at end of file diff --git a/pages/table-data/index.wxss b/pages/table-data/index.wxss index 00c36d9..efc63c7 100644 --- a/pages/table-data/index.wxss +++ b/pages/table-data/index.wxss @@ -4,6 +4,7 @@ width: 100%; background-color: #F6F7F8; padding: 50rpx 0; + padding-bottom: 250rpx; } .table-data-container{ @@ -24,20 +25,47 @@ .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; */ + box-shadow:#EDEEEF 10px 10px 10px; + background-color: white; +} + +.detail-title-box{ + font-size: 33rpx; + margin-bottom: 25rpx; + font-weight: normal; } .cell-class{ - font-size: 29rpx !important; + font-size: 28rpx !important; color: #989292 !important; } .node-class{ + font-size: 29rpx !important; color: #000 !important; +} + +.detail-title{ + margin-top: 50rpx; +} + + +/* 底部按钮 */ +.footer-btn-box{ + width: 92%; + height: 200rpx; + background-color: #ffffff; + position: fixed; + bottom: 0; + padding: 0 25rpx; + display: flex; + justify-content: center; + align-content: center; +} + +.btn{ + width: 100%; } \ No newline at end of file diff --git a/pages/usercenter/set/index.wxml b/pages/usercenter/set/index.wxml index 7796eab..4521923 100644 --- a/pages/usercenter/set/index.wxml +++ b/pages/usercenter/set/index.wxml @@ -2,7 +2,7 @@ - + + - + --> diff --git a/services/login/login.js b/services/login/login.js index d9fca32..576f0e6 100644 --- a/services/login/login.js +++ b/services/login/login.js @@ -16,16 +16,16 @@ export function login(data) { success: async function (res) { setStorage('userInfo', res.data.user, 86400); setStorage('Authorization', res.data.jwt, 86400); - const pages = getCurrentPages(); //获取小程序页面栈 - const beforePage = pages[pages.length - 1]; //获取上个页面的实例对象 -3是上上一个页面 - wx.navigateBack({ - delta: 1, - }); - beforePage.onLoad(); - wx.showToast({ - icon: 'success', - title: '登录成功', - }); + // const pages = getCurrentPages(); //获取小程序页面栈 + // const beforePage = pages[pages.length - 1]; //获取上个页面的实例对象 -3是上上一个页面 + // wx.navigateBack({ + // delta: 1, + // }); + // beforePage.onLoad(); + // wx.showToast({ + // icon: 'success', + // title: '登录成功', + // }); resolve(res); }, });