diff --git a/miniprogram/app.json b/miniprogram/app.json index e390c4ddac4e31d645fd86efab65e2dce9036d33..f4d1efd21480f4cfc0ef36ea5c145c51fcef699d 100644 --- a/miniprogram/app.json +++ b/miniprogram/app.json @@ -22,13 +22,14 @@ "window": { "backgroundColor": "#F6F6F6", "backgroundTextStyle": "light", - "navigationBarBackgroundColor": "#F6F6F6", + "navigationBarBackgroundColor": "#07c160", "navigationBarTitleText": "同乘码", - "navigationBarTextStyle": "black" + "navigationBarTextStyle": "white" }, "sitemapLocation": "sitemap.json", "style": "v2", "tabBar": { + "borderStyle": "white", "list": [ { "pagePath": "pages/index/index", diff --git a/miniprogram/app.wxss b/miniprogram/app.wxss index 82678d6779dba96f4169175465956d0373c81264..f4170d28cf1561ea7826012c57bae26e7c9346b7 100644 --- a/miniprogram/app.wxss +++ b/miniprogram/app.wxss @@ -18,7 +18,6 @@ button::after{ border: none; } - page { background: #f6f6f6; display: flex; diff --git a/miniprogram/pages/index/index.js b/miniprogram/pages/index/index.js index 974114538c16c45f20283e3bd9a588972dae8d17..d5f515ea371a16160e320f80909a262fe9da282a 100644 --- a/miniprogram/pages/index/index.js +++ b/miniprogram/pages/index/index.js @@ -35,7 +35,8 @@ Page({ name: '其他', value: 'other' } - ] + ], + introductionVisible: false }, onLoad: function() { @@ -49,14 +50,6 @@ Page({ // url: '../room/room?roomId=da51bd8c5e3e49f40c2d9444070f9b02', // }) - const titles = ['快速建群', '我的同乘'] - const tabs = titles.map(item => ({ - title: item - })) - this.setData({ - tabs - }) - var ddstr = getDateStr() this.setData({ date: ddstr @@ -99,7 +92,7 @@ Page({ case "other": this.setData({ typeName: '其他工具', - hitValue: '如小龙村到小马村的三轮车' + hitValue: '如江村到新村的三轮车' }) break } @@ -118,8 +111,8 @@ Page({ } }, - onGetUserInfo(e){ - if(!e.detail.userInfo){ + onGetUserInfo(e) { + if (!e.detail.userInfo) { wx.showToast({ title: '请允许获取信息', icon: 'none', @@ -177,14 +170,14 @@ Page({ }) }, - joinRoom: function(){ + joinRoom: function() { var roomId = this.data.roomId var openId = app.globalData.openid var userInfo = this.data.userInfo - if(!userInfo) - var self = this - if(!openId){ - setTimeout(function(){ + if (!userInfo) + var self = this + if (!openId) { + setTimeout(function() { self.joinRoom(roomId, userInfo) }, 2000) return @@ -197,7 +190,7 @@ Page({ src: userInfo.avatarUrl, userInfo: userInfo, }, - success: function(e){ + success: function(e) { console.log("join succ", e) }, fail: console.log @@ -361,5 +354,17 @@ Page({ default: break } + }, + + showIntroduction: function(e) { + this.setData({ + introductionVisible: true + }) + }, + + closeIntroduction: function(e) { + this.setData({ + introductionVisible: false + }) } }) \ No newline at end of file diff --git a/miniprogram/pages/index/index.json b/miniprogram/pages/index/index.json index 5deac75690d49f737d155d6329608bcb413da303..eb0d4bdfb2817e507235b410c2212a9ef538ea11 100644 --- a/miniprogram/pages/index/index.json +++ b/miniprogram/pages/index/index.json @@ -9,6 +9,7 @@ "mp-checkbox-group": "../components/checkbox-group/checkbox-group", "mp-form": "../components/form/form", "mp-slideview": "../components/slideview/slideview", - "mp-icon": "../components/icon/icon" + "mp-icon": "../components/icon/icon", + "mp-dialog": "../components/dialog/dialog" } } \ No newline at end of file diff --git a/miniprogram/pages/index/index.wxml b/miniprogram/pages/index/index.wxml index b119fb36344c0fda2b691d8726e074183f3cfd50..1cafb19b411e46c3407fc1cf1aa3d80048ea5e49 100644 --- a/miniprogram/pages/index/index.wxml +++ b/miniprogram/pages/index/index.wxml @@ -1,66 +1,81 @@ - - - - 全国新冠肺炎疫情 - 同乘码 + + + + + 全国新冠肺炎疫情同乘信息 + 查看说明 + - - - - -
- 乘坐信息 - - - - 交通类型 - - - - {{radioItems[trafficIndex].name}} - - - - - - {{typeName}} - - - - + + + + + + + + + + 交通类型 + + + + {{radioItems[trafficIndex].name}} + + + + + + {{typeName}} + + + + + + + + 日期 + + + + {{date}} + + + + + + + + + - - - 日期 - - - - {{date}} - - - - - - - - + + + + + + + + + + + + + + 1. 乘坐交通工具时生成二维码, 给同乘的旅客扫码进群 + 2. 进群后, 如有疫情请主动上报, 同时平台也会收集信息, 有疫情时主动微信通知进群的旅客 + 3. 同一日期同一趟交通工具多次生成的同一个二维码, 重复生成不影响 + + - - - - - - - - - - 使用说明: - 1 乘坐交通工具时生成二维码, 给同乘的旅客扫码进群 - 2 进群后, 如有疫情请主动上报, 同时平台也会收集信息, 有疫情时主动微信通知进群的旅客 - 3 同一日期同一趟交通工具多次生成的同一个二维码, 重复生成不影响 - \ No newline at end of file + + \ No newline at end of file diff --git a/miniprogram/pages/index/index.wxss b/miniprogram/pages/index/index.wxss index 95111f1d6a9b4b45b110f43e159cb636119daeee..6ea00d3e41387ecbeba7451f527b943853571127 100644 --- a/miniprogram/pages/index/index.wxss +++ b/miniprogram/pages/index/index.wxss @@ -154,6 +154,13 @@ page { word-break: break-all; } +.yq-border-test { + border: 1px #000 solid; +} + +.yq-no-border { + border-style: none; +} .yq-m-l { margin-left: 15rpx; @@ -163,10 +170,13 @@ page { margin-left: 30rpx; } +.yq-m-t { + margin-top: 15rpx; +} .yq-title { - font-size: 12px; - padding-left: 15px; + font-size: 16px; + line-height: 16px; } .yq-subtitle { @@ -184,9 +194,39 @@ page { padding: 5px; } +.yq-root { + width: 100%; +} + .yq-banner { + width: 100%; + position: relative; background-color: rgb(7, 193, 96); color: white; + height: 90px; +} + +.yq-traffic-info-container { + width: 100%; + height: auto; + position: absolute; + top: 40px; +} + +.yq-traffic-info { + width: 90%; + height: auto; + margin: 0 auto; + background-color: white; + border-radius: 10px; +} + +.yq-body { + width: 100%; + /* height: 500px; */ + position: relative; + top: 200px; + background-color: #f6f6f6; } .yq-main { @@ -195,10 +235,31 @@ page { padding-left: 15px; } +.yq-center { + text-align: center; + margin-left: auto; + margin-right: auto; +} + .yq-test { margin-left: -5px; } +.yq-show-info { + font-size: 10px; + line-height: 16px; + background-color: #0aad58; + opacity: 0.5; + border-radius: 5px; + padding: 3px 5px; +} + +.yq-footer { + width: 100%; + height: 1px; + background-color: #f6f6f6; +} + .tab-bar-title__selected { font-size: 16px; font-weight: bold;