From c8def77dc357aedcc3f784696d75286f2f842908 Mon Sep 17 00:00:00 2001 From: zhangjing <994797151@qq.com> Date: Thu, 24 Jun 2021 10:18:50 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=91=A8=E4=BA=94=E7=A6=8F=E5=88=A9=E8=AE=A2?= =?UTF-8?q?=E9=98=85]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/interfaces/index.js | 14 +- api/interfaces/user.js | 2 +- app.json | 3 +- pages/account/account.js | 19 +- pages/account/account.wxml | 11 +- pages/account/account.wxss | 24 +- pages/frozen/frozen.js | 1 + pages/frozen/frozen.json | 4 +- pages/frozen/frozen.wxml | 210 ++++++++++++- pages/frozen/frozen.wxss | 346 ++++++++++++++++++++++ pages/index/index.js | 70 ++++- pages/index/index.wxml | 70 ++--- pages/index/index.wxss | 319 +++++++++++--------- pages/makeForm/makeForm.js | 126 ++++++++ pages/makeForm/makeForm.json | 6 + pages/makeForm/makeForm.wxml | 73 +++++ pages/makeForm/makeForm.wxss | 303 +++++++++++++++++++ pages/welfare/welfare.js | 20 +- pages/welfare/welfare.wxml | 7 +- pages/welfare/welfare.wxss | 49 +++ project.private.config.json | 11 + static/icon/frozen_arrow.png | Bin 0 -> 1604 bytes static/img/frozen_back.png | Bin 0 -> 102492 bytes static/img/frozen_btn.png | Bin 0 -> 20697 bytes static/img/frozen_icon.png | Bin 0 -> 3408 bytes static/img/frozen_identity.png | Bin 0 -> 17533 bytes static/img/frozen_img.png | Bin 0 -> 15015 bytes static/img/makeForm_checked.png | Bin 0 -> 2677 bytes static/img/makeForm_price_back.png | Bin 0 -> 2490 bytes static/img/makeForm_price_back_active.png | Bin 0 -> 3576 bytes static/img/makeForm_title_00.png | Bin 0 -> 187040 bytes static/img/makeForm_title_01.png | Bin 0 -> 20365 bytes static/img/makeForm_title_02.png | Bin 0 -> 4133 bytes static/img/subscribe.png | Bin 0 -> 22729 bytes static/img/welfare_back.png | Bin 30332 -> 0 bytes static/img/welfare_back_00.png | Bin 0 -> 9313 bytes static/img/welfare_back_01.png | Bin 0 -> 8859 bytes static/img/welfare_icon_00.png | Bin 0 -> 16466 bytes static/img/welfare_icon_01.png | Bin 0 -> 2339 bytes static/img/welfare_stra.png | Bin 0 -> 6295 bytes static/img/welfare_title.png | Bin 0 -> 17005 bytes 41 files changed, 1487 insertions(+), 201 deletions(-) create mode 100644 pages/makeForm/makeForm.js create mode 100644 pages/makeForm/makeForm.json create mode 100644 pages/makeForm/makeForm.wxml create mode 100644 pages/makeForm/makeForm.wxss create mode 100644 static/icon/frozen_arrow.png create mode 100644 static/img/frozen_back.png create mode 100644 static/img/frozen_btn.png create mode 100644 static/img/frozen_icon.png create mode 100644 static/img/frozen_identity.png create mode 100644 static/img/frozen_img.png create mode 100644 static/img/makeForm_checked.png create mode 100644 static/img/makeForm_price_back.png create mode 100644 static/img/makeForm_price_back_active.png create mode 100644 static/img/makeForm_title_00.png create mode 100644 static/img/makeForm_title_01.png create mode 100644 static/img/makeForm_title_02.png create mode 100644 static/img/subscribe.png delete mode 100644 static/img/welfare_back.png create mode 100644 static/img/welfare_back_00.png create mode 100644 static/img/welfare_back_01.png create mode 100644 static/img/welfare_icon_00.png create mode 100644 static/img/welfare_icon_01.png create mode 100644 static/img/welfare_stra.png create mode 100644 static/img/welfare_title.png diff --git a/api/interfaces/index.js b/api/interfaces/index.js index a650a2d..8f256f5 100644 --- a/api/interfaces/index.js +++ b/api/interfaces/index.js @@ -73,6 +73,15 @@ const fridayPay = (trade_no) => req({url: "payments/welfare/wechat",method: "POS //洗车券-获取跳转地址 const washcarUrl = (welfare_id, right_config_id) => req({url: "washcar/infourl", data: {welfare_id: welfare_id, right_config_id: right_config_id}}) +//首页轮播-跳转本页面 --业务数据查看 +const busineSee = (business) => req({url: "business/" + business}) + +//首页轮播-跳转本页面 --业务数据预约表单 +const busineForm = (business_id, business_item_id, type, mobile, username) => req({url: "business/create",method: "POST", data: {business_id: business_id, business_item_id: business_item_id, type: type, mobile: mobile, username: username}}) + +//订阅 +const subscribe = (subscribe) => req({url: "wechat/" + subscribe + "/welfare_subscribe",method: "POST"}) + export default({ index, choice, @@ -97,5 +106,8 @@ export default({ newidxCity, fridayInfo, fridayPay, - washcarUrl + washcarUrl, + busineSee, + busineForm, + subscribe }) diff --git a/api/interfaces/user.js b/api/interfaces/user.js index 60925c3..c894ccd 100644 --- a/api/interfaces/user.js +++ b/api/interfaces/user.js @@ -38,7 +38,7 @@ const jssdk = (coupon_id) => req({url: "coupons/jssdk?coupon_id=" + coupon_id}) const cards = (code, pass) => req({url: "user/cards/activate", method: "POST", data:{code : code, pass : pass}}) // 积分账变记录 -const logs = (type, page) => req({url: "account/logs", data:{type : type, page : page}}) +const logs = (type, channel, page) => req({url: "account/logs", data:{type : type, channel: channel, page : page}}) // 冻结列表 const ungrants = (type,) => req({url: "account/ungrants", data:{type : type}}) diff --git a/app.json b/app.json index 2d8f097..57d1dad 100644 --- a/app.json +++ b/app.json @@ -26,7 +26,8 @@ "pages/frozen/frozen", "pages/welfare/welfare", "pages/classify/classify", - "pages/washcar/washcar" + "pages/washcar/washcar", + "pages/makeForm/makeForm" ], "window": { "backgroundTextStyle": "light", diff --git a/pages/account/account.js b/pages/account/account.js index 0f66061..204bb7b 100644 --- a/pages/account/account.js +++ b/pages/account/account.js @@ -9,8 +9,23 @@ Page({ number : '', //账户余额 accounts : '', //账户列表 blockeds : '', //待发放余额 - page : {}, //分页信息 - lodingStats : false, //加载状态 + page : {}, //分页信息 + lodingStats : false, //加载状态 + screenArray: [ + { + channel: 'all', + name: '全部' + }, + { + channel: 'in', + name: '入账' + }, + { + channel: 'out', + name: '出账' + } + ], //账变记录筛选数组 + screenIndex: 0 //账变记录筛选index }, /** diff --git a/pages/account/account.wxml b/pages/account/account.wxml index 676387b..1b5aa9d 100644 --- a/pages/account/account.wxml +++ b/pages/account/account.wxml @@ -20,7 +20,16 @@ - 入账记录 + + 账变记录 + + + {{screenArray[screenIndex].name}} + + + + + diff --git a/pages/account/account.wxss b/pages/account/account.wxss index d643194..b7a103f 100644 --- a/pages/account/account.wxss +++ b/pages/account/account.wxss @@ -1,7 +1,12 @@ /* 积分 */ -.integra-cont-name { +.integra-cont-title { padding: 40rpx 20rpx 10rpx; + display: flex; +} + +.integra-cont-name { font-weight: 600; + flex: 1; } .integra-list { @@ -12,6 +17,18 @@ box-sizing: border-box; } +.integra-cont-picker { + display: flex; + color: #797979; + font-size: 30rpx; +} + +.integra-cont-icon { + width: 28rpx; + height: 28rpx; + margin: 6rpx 0 0 10rpx; +} + .integra-top { padding: 30rpx 20rpx 0; background-color: #dfb48b; @@ -96,10 +113,11 @@ .integra-list { padding: 30rpx 20rpx; position: relative; + box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, .1); box-sizing: border-box; } -.integra-list::after { +/* .integra-list::after { position: absolute; content: ''; left: 0; @@ -107,7 +125,7 @@ width: 100%; height: 2rpx; background: #eaeaea; -} +} */ .integra-list:last-child::after { display: none; diff --git a/pages/frozen/frozen.js b/pages/frozen/frozen.js index 725a08e..03f9de4 100644 --- a/pages/frozen/frozen.js +++ b/pages/frozen/frozen.js @@ -10,6 +10,7 @@ Page({ * 页面的初始数据 */ data: { + current : 0, //轮播标 type : '', //类型 frozenData : [], //数组列表 blockeds : '', //待发放金额 diff --git a/pages/frozen/frozen.json b/pages/frozen/frozen.json index aa6068c..5ad6186 100644 --- a/pages/frozen/frozen.json +++ b/pages/frozen/frozen.json @@ -1,4 +1,6 @@ { "usingComponents": {}, - "navigationBarTitleText": "待发放" + "navigationBarTitleText": "待发放", + "navigationBarBackgroundColor": "#24315d", + "navigationBarTextStyle": "white" } \ No newline at end of file diff --git a/pages/frozen/frozen.wxml b/pages/frozen/frozen.wxml index 25b4fb9..8163a06 100644 --- a/pages/frozen/frozen.wxml +++ b/pages/frozen/frozen.wxml @@ -1,5 +1,5 @@ - + - + + + + + + + + + + + 向右滑动 + + + + 向左滑动 + + + + + + + + + \ No newline at end of file diff --git a/pages/frozen/frozen.wxss b/pages/frozen/frozen.wxss index adcbeee..f8efa5a 100644 --- a/pages/frozen/frozen.wxss +++ b/pages/frozen/frozen.wxss @@ -98,4 +98,350 @@ .frozenList-yellow { color: #317afa; font-weight: 600; +} + + +/* 最新样式 2021-06-22 */ +page { + background-image: linear-gradient(to bottom, #24315d, #24315d); +} + +.banner-swiper { + height: 100vh; +} + +.grantSwiper { + width: 100%; + height: 100vh; + padding: 0 80rpx; + box-sizing: border-box; +} + +.banner-height { + height: 460rpx; + margin-top: 30rpx; +} + +.grantTop { + position: relative; + width: 100%; + height: 300rpx; + color: #ffdf95; +} + +.grantTop-img { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; +} + +.grantTop-text, +.grantTop-tips { + position: absolute; + z-index: 9; + left: 0; + width: 100%; +} + +.grantTop-text { + top: 0; + padding: 40rpx 60rpx; + box-sizing: border-box; +} + +.grantTop-text image { + width: 120rpx; + height: 40rpx; +} + +.grantTop-price { + text-align: center; + font-size: 60rpx; +} + +.grantTop-price text { + font-size: 30rpx; + display: block; + color: #fff; +} + +.grantTop-tips { + bottom: 0; + font-size: 26rpx; + display: flex; + line-height: 70rpx; + height: 70rpx; + padding: 0 40rpx; + box-sizing: border-box; +} + +.grantTop-time { + flex: 1; +} + +.grantTitle { + background-color: #3d4963; + border-radius: 15rpx; + margin: 40rpx 0; + width: 100%; + display: flex; + color: #d3d5e1; + height: 90rpx; + overflow: hidden; +} + +.grantTitle-name, +.grantTitle-tel { + box-sizing: border-box; + height: 90rpx; + line-height: 90rpx; + font-size: 32rpx; +} + +.grantTitle-name { + padding-left: 30rpx; + font-weight: 600; + background-image:-webkit-linear-gradient(left,#fbdebe,#e5ad7a); + -webkit-background-clip:text; + -webkit-text-fill-color:transparent; + flex: 1; +} + +.grantTitle-tel { + padding: 0 30rpx 0 20rpx; + background-color: #192845; + position: relative; +} + +.grantTitle-tel::after { + position: absolute; + content: ''; + left: -20rpx; + top: 0; + width:0; + height:0; + border-left: 20rpx solid transparent; + border-right: 20rpx solid transparent; + border-bottom: 90rpx solid #192845; +} + +.grantIssue-title { + height: 120rpx; +} + +.grantIssue-title-name { + line-height: 44rpx; + display: flex; +} + +.grantIssue-title-name image { + width: 44rpx; + height: 44rpx; + margin-right: 20rpx; +} + +.grantIssue-title-name text { + font-weight: 600; + font-size: 34rpx; + background-image:-webkit-linear-gradient(left,#fbdebe,#e5ad7a); + -webkit-background-clip:text; + -webkit-text-fill-color:transparent; +} + +.grantIssue-title-tips { + font-size: 26rpx; + margin: 10rpx 0 30rpx; + color: #d2d6e2; +} + +.grantIssue-title-tips text { + color: #dcbc8d; +} + +.grantIssue { + height: calc(100vh - 550rpx); +} + +.grantIssue-list { + overflow-y: scroll; + height: calc(100% - 140rpx); +} + +.grantIssue-label { + position: relative; + height: 180rpx; + margin-bottom: 30rpx; + border-radius: 10rpx; + overflow: hidden; + background-color: #f9dabb; +} + +.grantIssue-label:last-child { + margin-bottom: 0; +} + +.grantIssue-label-img { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; +} + +.grantIssue-label-cont { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + z-index: 6; + padding: 20rpx; + box-sizing: border-box; + display: flex; +} +.grantIssue-label-left { + width: 120rpx; + text-align: center; + margin-top: 20rpx; +} + +.grantIssue-left-top { + color: #e9083d; + font-size: 26rpx; +} + +.grantIssue-left-top text { + font-size: 34rpx; + font-weight: 600; + padding: 0 6rpx; +} + +.grantIssue-left-number { + background:-webkit-linear-gradient(left,#ffdca4,#f8af52); + color: #b13509; + border-radius: 30rpx; + display: inline-block; + font-size: 22rpx; + height: 42rpx; + line-height: 42rpx; + padding: 0 15rpx; + margin-top: 12rpx; +} + +.grantIssue-label-right { + width: 90rpx; + font-weight: 600; + text-align: center; + font-size: 30rpx; + color: #3d2a26; + line-height: 140rpx; +} + +.grantIssue-label-center { + width: calc(100% - 250rpx); + margin: 20rpx 20rpx 0 20rpx; +} + +.grantIssue-center-top { + font-size: 26rpx; + color: #0f004a; + font-weight: 600; + margin-bottom: 8rpx; +} + +.grantIssue-center-top text { + font-size: 40rpx; + padding-right: 10rpx; +} + +.grantIssue-center-time { + font-size: 26rpx; + color: #757575; +} + +.grantIssue-label-tips { + position: absolute; + width: 140rpx; + height: 100%; + right: 0; + top: 0; +} + + +/* 滑动箭头 */ +.frozenArrow-left, +.frozenArrow-right { + position: fixed; + z-index: 9; + top: 35%; + width: 40rpx; + height: 40rpx; + text-align: center; + writing-mode:lr-tb; + color: #f0cba8; + font-size: 24rpx; +} + +.frozenArrow-left image, +.frozenArrow-right image { + width: 24rpx; + height: 24rpx; +} + +.frozenArrow-left { + left: 10rpx; + -webkit-animation: bounce-left 1s linear infinite; + animation: bounce-left 1s linear infinite; +} + +.frozenArrow-right { + right: 10rpx; + -webkit-animation: bounce-right 1s linear infinite; + animation: bounce-right 1s linear infinite; +} + +.frozenArrow-left image { + transform:rotate(180deg); + -moz-transform:rotate(180deg); + -webkit-transform:rotate(180deg); +} + +@keyframes bounce-left { + 25% {transform: translateX(3px);} + 50%, 100% {transform: translateX(0);} + 75% {transform: translateX(-3px);} +} + +@keyframes bounce-right { + 25% {transform: translateX(-3px);} + 50%, 100% {transform: translateX(0);} + 75% {transform: translateX(3px);} +} + + +/* 指示点 */ +.dots { + display: flex; + justify-content: center; + align-items: center; + width: 100%; + position: fixed; + bottom: 20rpx; + height: 40rpx; +} + +.dots view { + width: 14rpx; + height: 14rpx; + margin: 0 6rpx; + border-radius: 50%; + background-color: #c5c5c5; +} + +.dots .active { + width: 24rpx; + border-radius: 40rpx; + background-color: #f46851; } \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 0d2bd30..71ab954 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -20,7 +20,7 @@ Page({ longitude : 0, //经度 latitude : 0, //纬度 adverts : [], //轮播图 - stateType : "silver", + stateType : "shaky", cardArr : [], //权益数组 activities : [], //周五福利 isUser : false, //用户登录状态 @@ -70,6 +70,7 @@ Page({ indexInfo() { if(this.data.stateType == 'shaky') { wx.$api.index.index(this.data.city, this.data.longitude, this.data.latitude).then(res=>{ + console.log(res.data.adverts) this.setData({ adverts : res.data.adverts, cardArr : res.data.rights, @@ -95,6 +96,7 @@ Page({ }) } else { wx.$api.index.choice(this.data.stateType,this.data.city, this.data.longitude, this.data.latitude).then(res=>{ + console.log(res.data.adverts) this.setData({ adverts : res.data.adverts, cardArr : res.data.categorys, @@ -166,15 +168,39 @@ Page({ }, /** - * 点击图片放大 + * 点击轮播图片 */ clickImg(e) { - if(e.currentTarget.dataset.img == "") return - let imgUrl = [e.currentTarget.dataset.img] - wx.previewImage({ - urls : imgUrl, //需要预览的图片http链接列表,注意是数组 - current : imgUrl[0] // 当前显示图片的http链接,默认是第一个 - }) + console.log(e.currentTarget.dataset) + let newChannel = e.currentTarget.dataset.channel, + newImg = e.currentTarget.dataset.img, + newUrl = e.currentTarget.dataset.url + + // 点击图片放大 + if (newChannel == 'image') { + if(newImg == "") return + let imgUrl = [newImg] + wx.previewImage({ + urls : imgUrl, //需要预览的图片http链接列表,注意是数组 + current : imgUrl[0] // 当前显示图片的http链接,默认是第一个 + }) + } + + // 跳转内网 + if (newChannel == 'pages') { + wx.navigateTo({ + url: newUrl + }) + } + + // 跳转外网 + if (newChannel == 'url') { + let url= encodeURIComponent(newUrl) + wx.redirectTo({ + // 跳转到webview页面 + url: `/pages/webView/webView?url=${url}` + }); + } }, /** @@ -293,6 +319,32 @@ Page({ else {//正常轮转时,记录正确页码索引 this.setData({ swiperCurrent: e.detail.current }); } - + }, + + /** + * 订阅 + */ + subscribeTap() { + wx.requestSubscribeMessage({ + tmplIds: ['g8cEL-Tf2_Pdh8VyBdsYbhv09VVm8om-ZblhXIaVDiY'], + success: res=> { + if(res.errMsg == "requestSubscribeMessage:ok") { + wx.$api.index.subscribe(1).then(res=>{ + wx.showLoading({ + title: res.data, + icon : 'none', + }) + setTimeout(function () { + wx.hideLoading(); + }, 1000) + }).catch(err=>{ + + }) + } + }, + fail: err => { + console.log(err) + } + }) } }) \ No newline at end of file diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 91ccd1d..4d705c4 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -5,7 +5,9 @@ - + {{address.city}}{{address.area}} @@ -27,19 +29,11 @@