diff --git a/app.json b/app.json index 2e4e7cf..00f99fa 100644 --- a/app.json +++ b/app.json @@ -10,7 +10,8 @@ "pages/help/package/index", "pages/help/success/index", "pages/help/community/index", - "pages/help/address/index" + "pages/help/address/index/index", + "pages/help/address/edit/index" ], "window": { "navigationBarTextStyle": "black", diff --git a/app.wxss b/app.wxss index 1a8e052..eb00a7a 100644 --- a/app.wxss +++ b/app.wxss @@ -6,6 +6,10 @@ page{ color: #222222; } +button{ + border-radius: 24rpx; + box-sizing: border-box; +} button label{ display: inline-block; margin-left: 10rpx; @@ -38,18 +42,67 @@ button[type=default]{ button[type=primary][plain]{ border-color: #1A4DEB; color:#1A4DEB; + padding:28rpx 25rpx; } button[type=primary][plain]:hover{ border-color: #1A4DEB; color:#1A4DEB; } - -radio-group label,radio-group radio{ +radio-group{ + line-height: 34rpx; +} +radio-group radio{ + display: inline-block; vertical-align: middle; + overflow: hidden; } radio-group label{ - margin-left:14rpx; + display: inline-block; + vertical-align: middle; +} + +radio-group radio+label{ + margin-left:10rpx; +} +radio-group label+label{ + margin-left:20rpx; +} + +radio{ + width: 34rpx; + height: 34rpx; + position: relative; +} +radio .wx-radio-input{ + border-radius: 50%; + border-color: #1A4DEB; + box-sizing: border-box; + width: 100%; + height: 100%; + line-height: 20px; + position: absolute; + top: 0;left:0; +} +radio .wx-radio-input.wx-radio-input-checked{ + background-color:transparent; + border-color: #1A4DEB; +} +radio .wx-radio-input.wx-radio-input-checked::before{ + content: ''; + position: absolute; + width: 22rpx; + height:22rpx; + left:4rpx;top:4rpx; + border-radius: 50%; + background: #1A4DEB; + transform: none; + -webkit-transform:none +} +checkbox .wx-checkbox-input{ + width: 40rpx; + height: 40rpx; + border-radius: 50%; } .page-container{ @@ -57,4 +110,7 @@ radio-group label{ border-radius: 20rpx; padding:30rpx; margin:20rpx; +} +.page-container.shadow{ + box-shadow: 0px 6px 6px 1px rgba(0, 0, 0, 0.05); } \ No newline at end of file diff --git a/assets/icon/help/edit@2x.png b/assets/icon/help/edit@2x.png new file mode 100644 index 0000000..b71a9fe Binary files /dev/null and b/assets/icon/help/edit@2x.png differ diff --git a/assets/imgs/for_test/jd.png b/assets/imgs/for_test/jd.png new file mode 100644 index 0000000..14d6754 Binary files /dev/null and b/assets/imgs/for_test/jd.png differ diff --git a/components/address/index.js b/components/address/index.js new file mode 100644 index 0000000..128dd2c --- /dev/null +++ b/components/address/index.js @@ -0,0 +1,36 @@ +// components/address/index.js +Component({ + + /** + * 组件的属性列表 + */ + properties: { + saveText:{ + type:String, + value:"保存" + }, + deleteText:{ + type:String, + value:'' + } + }, + + /** + * 组件的初始数据 + */ + data: { + building:['一栋','二栋','三栋','四栋','五栋'], + }, + + /** + * 组件的方法列表 + */ + methods: { + save(){ + this.triggerEvent('save') + }, + del(){ + this.triggerEvent('delete') + } + } +}) \ No newline at end of file diff --git a/components/address/index.json b/components/address/index.json new file mode 100644 index 0000000..c07b0d2 --- /dev/null +++ b/components/address/index.json @@ -0,0 +1,5 @@ +{ + "component": true, + "usingComponents": {}, + "styleIsolation": "shared" +} \ No newline at end of file diff --git a/components/address/index.wxml b/components/address/index.wxml new file mode 100644 index 0000000..91aa150 --- /dev/null +++ b/components/address/index.wxml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/address/index.wxss b/components/address/index.wxss new file mode 100644 index 0000000..4edea08 --- /dev/null +++ b/components/address/index.wxss @@ -0,0 +1,42 @@ +.page-container.editor{ + padding-top:0; + font-size: 30rpx; +} +.editor .item{ + display: flex; + align-items: center; + border-bottom: 1rpx solid rgba(153, 153, 153, 0.2); + min-height: 130rpx; +} +.editor .item.no-border{ + border:none; +} + +.editor .item .key{ +} +.editor .item .key::before{ + content: '*'; + color: #EB0000; +} +.editor .item label.value{ + line-height: 1.5; + height: auto; + align-self: center; +} +.editor .item .value{ + flex:1; + margin-left: 30rpx; + height: 100%; + padding:15rpx 0; + box-sizing: border-box; +} +.editor .item .right-icon{ + width:34rpx;height:34rpx; +} + +.editor .radio-group{ + font-size: 24rpx; +} +.editor button+button{ + margin-top:30rpx; +} \ No newline at end of file diff --git a/components/navbar/index.wxml b/components/navbar/index.wxml index c4dc779..7f55008 100644 --- a/components/navbar/index.wxml +++ b/components/navbar/index.wxml @@ -1,5 +1,5 @@ - + \ No newline at end of file diff --git a/components/navbar/index.wxss b/components/navbar/index.wxss index 55a278b..4114c0b 100644 --- a/components/navbar/index.wxss +++ b/components/navbar/index.wxss @@ -6,8 +6,4 @@ display: flex; align-items: center; justify-content: center; -} -.nav-bar .logo{ - width:168rpx; - height:42rpx; } \ No newline at end of file diff --git a/pages/help/address/edit/index.js b/pages/help/address/edit/index.js new file mode 100644 index 0000000..388d23f --- /dev/null +++ b/pages/help/address/edit/index.js @@ -0,0 +1,83 @@ +// pages/help/address/edit/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + deleteAddress(){ + console.log('delete'); + wx.showModal({ + title: '确定删除此地址吗', + content: '', + complete: (res) => { + if (res.cancel) { + + } + if (res.confirm) { + + } + } + }) + }, + saveAddress(){ + console.log('save'); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/help/address/edit/index.json b/pages/help/address/edit/index.json new file mode 100644 index 0000000..a5410ba --- /dev/null +++ b/pages/help/address/edit/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "address-editor":"/components/address" + } +} \ No newline at end of file diff --git a/pages/help/address/edit/index.wxml b/pages/help/address/edit/index.wxml new file mode 100644 index 0000000..83c6280 --- /dev/null +++ b/pages/help/address/edit/index.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pages/help/address/edit/index.wxss b/pages/help/address/edit/index.wxss new file mode 100644 index 0000000..885ffb7 --- /dev/null +++ b/pages/help/address/edit/index.wxss @@ -0,0 +1 @@ +/* pages/help/address/edit/index.wxss */ \ No newline at end of file diff --git a/pages/help/address/index.json b/pages/help/address/index.json deleted file mode 100644 index 8835af0..0000000 --- a/pages/help/address/index.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "usingComponents": {} -} \ No newline at end of file diff --git a/pages/help/address/index.wxml b/pages/help/address/index.wxml deleted file mode 100644 index 1082fb7..0000000 --- a/pages/help/address/index.wxml +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/pages/help/address/index.wxss b/pages/help/address/index.wxss deleted file mode 100644 index 0559813..0000000 --- a/pages/help/address/index.wxss +++ /dev/null @@ -1,33 +0,0 @@ -.editor{ - font-size: 30rpx; -} -.editor .item{ - display: flex; - align-items: center; - border-bottom: 1rpx solid rgba(153, 153, 153, 0.2); -} -.editor .item:last-child{ - border:none; -} - -.editor .item .key{ -} -.editor .item .key::before{ - content: '*'; - color: #EB0000; -} -.editor .item .value{ - flex:1; - margin-left: 30rpx; - padding: 50rpx 0; -} - - - - - -.weui-form{padding:0;} - -.weui-label{ - width: auto; -} \ No newline at end of file diff --git a/pages/help/address/index.js b/pages/help/address/index/index.js similarity index 77% rename from pages/help/address/index.js rename to pages/help/address/index/index.js index 3d66e14..8517f53 100644 --- a/pages/help/address/index.js +++ b/pages/help/address/index/index.js @@ -5,7 +5,10 @@ Page({ * 页面的初始数据 */ data: { - + items: [ + { name: '1', value: 'cell standard' }, + { name: '2', value: 'cell standard', checked: 'true' }, + ], }, /** @@ -62,5 +65,11 @@ Page({ */ onShareAppMessage() { + }, + + goToAddressEditor(){ + wx.navigateTo({ + url: '/pages/help/address/edit/index', + }) } }) \ No newline at end of file diff --git a/pages/help/address/index/index.json b/pages/help/address/index/index.json new file mode 100644 index 0000000..a5410ba --- /dev/null +++ b/pages/help/address/index/index.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "address-editor":"/components/address" + } +} \ No newline at end of file diff --git a/pages/help/address/index/index.wxml b/pages/help/address/index/index.wxml new file mode 100644 index 0000000..ef3eada --- /dev/null +++ b/pages/help/address/index/index.wxml @@ -0,0 +1,26 @@ + + + + 常用地址 + + + 朝阳时代西锦 3栋2单元1802 + 何灵 13486745777 + + + + + + 朝阳时代西锦 3栋2单元1802 + 何灵 13486745777 + + + + + + 朝阳时代西锦 3栋2单元1802 + 何灵 13486745777 + + + + \ No newline at end of file diff --git a/pages/help/address/index/index.wxss b/pages/help/address/index/index.wxss new file mode 100644 index 0000000..f3410d0 --- /dev/null +++ b/pages/help/address/index/index.wxss @@ -0,0 +1,29 @@ + + + +.address-list{ + padding-top:36rpx +} +.address-list .head{ + font-size:34rpx; + font-weight:500; +} +.address-list .item{ + display: flex; + margin-top:60rpx; +} +.address-list .item .text{ + flex:1; +} +.address-list .item .title{ + font-size:30rpx; +} +.address-list .item .sub-title{ + margin-top: 24rpx; + font-size:26rpx; + color: #7C7C7C; +} +.address-list .item .icon{ + width:36rpx;height:36rpx; + padding:10rpx; +} \ No newline at end of file diff --git a/pages/help/index/index.js b/pages/help/index/index.js index 401ae2c..cfc7dd2 100644 --- a/pages/help/index/index.js +++ b/pages/help/index/index.js @@ -75,7 +75,7 @@ Page({ }, goToAddress(){ wx.navigateTo({ - url: '/pages/help/address/index', + url: '/pages/help/address/index/index', }) } }) \ No newline at end of file diff --git a/pages/help/index/index.wxml b/pages/help/index/index.wxml index 3644e5b..cb60292 100644 --- a/pages/help/index/index.wxml +++ b/pages/help/index/index.wxml @@ -1,6 +1,8 @@ - + + + 选择小区 diff --git a/pages/help/index/index.wxss b/pages/help/index/index.wxss index 55cfea9..7a10066 100644 --- a/pages/help/index/index.wxss +++ b/pages/help/index/index.wxss @@ -5,6 +5,10 @@ position:absolute; z-index:-1; } +.nav-bar .logo{ + width:168rpx; + height:42rpx; +} .choose-community{ padding:90rpx 40rpx 70rpx; position: relative; diff --git a/pages/savemoney/index/index.js b/pages/savemoney/index/index.js index 07a0042..9d04b9f 100644 --- a/pages/savemoney/index/index.js +++ b/pages/savemoney/index/index.js @@ -5,9 +5,14 @@ Page({ * 页面的初始数据 */ data: { - + tabIndex:0, + tabItems:["全部","养车用车","美容剪发","洗衣洗鞋"] + }, + changeTab(event){ + const tabIndex = event.currentTarget.dataset.index; + this.setData({tabIndex}) + }, - /** * 生命周期函数--监听页面加载 */ diff --git a/pages/savemoney/index/index.json b/pages/savemoney/index/index.json index 8835af0..e5c8349 100644 --- a/pages/savemoney/index/index.json +++ b/pages/savemoney/index/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "nav-bar":"/components/navbar" + }, + "navigationStyle": "custom" } \ No newline at end of file diff --git a/pages/savemoney/index/index.wxml b/pages/savemoney/index/index.wxml index 5f02ed8..d3a5e11 100644 --- a/pages/savemoney/index/index.wxml +++ b/pages/savemoney/index/index.wxml @@ -1,2 +1,33 @@ - -pages/savemoney/index/index.wxml \ No newline at end of file + + + 消费金 (元) + 3.3 + 买券自动抵扣 + + + + + + + + + + 京东养车 + + 燎原路228号御景湾 + 100m + + + + 【5座】标准洗车 + + + + 【5座】标准洗车 + + + + \ No newline at end of file diff --git a/pages/savemoney/index/index.wxss b/pages/savemoney/index/index.wxss index 2088fc4..43bff68 100644 --- a/pages/savemoney/index/index.wxss +++ b/pages/savemoney/index/index.wxss @@ -1 +1,97 @@ -/* pages/savemoney/index/index.wxss */ \ No newline at end of file + +.consume{ + border-radius: 18rpx; + background: linear-gradient(270deg, #3566FF 0%, #1A4DEB 60%); + box-shadow: 0 10rpx 10rpx 0 rgba(54, 98, 236, 0.2); + margin:20rpx; + padding:40rpx 30rpx; + color:#fff; + position:relative; +} +.consume .title{ + font-size: 32rpx; +} +.consume .money{ + font-size: 70rpx; + font-weight: 600; + margin-top:40rpx; +} +.consume .tips{ + position:absolute; + right:0;top:32rpx; + border-radius: 60rpx 0 0 60rpx; + background-color: #1A4DEB; + line-height: 40rpx; + font-size: 22rpx; + padding:0 16rpx; +} + +.btns{ + display: flex; + justify-content: space-between; + margin:24rpx; +} +.btns .item{ + font-weight: normal; + border-radius: 12rpx; + font-size: 26rpx; + margin:0; + padding:18rpx 34rpx; + line-height: 1; +} +.btns .item:not([type=primary]){ + background-color: #fff; +} + +.shop-list .item{ + display: flex; +} +.shop-list .item .logo{ + width:180rpx;height:180rpx; +} +.shop-list .item .content{ + flex:1; + margin-left:18rpx; +} +.shop-list .item .line1{ + font-size:34rpx; + font-weight: 600; +} +.shop-list .item .line2{ + font-size: 26rpx; + display: flex; + color:#888888; + margin-top:26rpx; + padding-bottom:16rpx; +} +.shop-list .item .line2-1{ + flex:1; +} +.shop-list .item .line-coupon{ + font-size: 26rpx; + margin-top: 20rpx; + position: relative; +} +.shop-list .item .line-coupon::before{ + content: '惠'; + width:34rpx;height:34rpx; + font-size:22rpx; + border-radius: 8rpx; + background-color: #FF8400; + color: #fff; + display: inline-block; + text-align: center; + line-height: 34rpx; + vertical-align: top; + margin-right: 8rpx; +} +.shop-list .item .money{ + font-size: 32rpx; + color:#EB0000; + font-weight:500 +} +.shop-list .item .money-disable{ + font-size: 28rpx; + color: #888888; + text-decoration: line-through; +} \ No newline at end of file