Fix capsule-aligned navigation and refresh mini program typography
This commit is contained in:
+30
-5
@@ -1,9 +1,34 @@
|
||||
{
|
||||
"pages": ["pages/home/home", "pages/meetups/meetups", "pages/walk/walk", "pages/tasks/tasks", "pages/pets/pets", "pages/pet-edit/pet-edit", "pages/meetup-edit/meetup-edit", "pages/share/share", "pages/walk-records/walk-records"],
|
||||
"window": { "navigationStyle": "custom", "backgroundColor": "#f6f9f6", "backgroundTextStyle": "dark" },
|
||||
"usingComponents": { "safe-top": "/components/safe-top/index" },
|
||||
"permission": { "scope.userLocation": { "desc": "遛狗时记录轨迹,并在你主动开启分享后展示实时位置" } },
|
||||
"requiredPrivateInfos": ["getLocation", "chooseLocation"],
|
||||
"pages": [
|
||||
"pages/home/home",
|
||||
"pages/meetups/meetups",
|
||||
"pages/walk/walk",
|
||||
"pages/tasks/tasks",
|
||||
"pages/pets/pets",
|
||||
"pages/pet-edit/pet-edit",
|
||||
"pages/meetup-edit/meetup-edit",
|
||||
"pages/share/share",
|
||||
"pages/walk-records/walk-records"
|
||||
],
|
||||
"window": {
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black",
|
||||
"backgroundColor": "#f6f9f6",
|
||||
"backgroundTextStyle": "dark"
|
||||
},
|
||||
"usingComponents": {
|
||||
"page-layout": "/components/page-layout/index",
|
||||
"app-icon": "/components/app-icon/index"
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "遛狗时记录轨迹,并在你主动开启分享后展示实时位置"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": [
|
||||
"getLocation",
|
||||
"chooseLocation"
|
||||
],
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"style": "v2",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
|
||||
+14
-25
@@ -3,8 +3,9 @@ page {
|
||||
overflow: hidden;
|
||||
background: #f6f9f6;
|
||||
color: #173e36;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
|
||||
font-family: ui-rounded, "Hiragino Maru Gothic ProN", "PingFang SC", sans-serif;
|
||||
font-size: 28rpx;
|
||||
line-height: 1.5;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
@@ -12,21 +13,12 @@ page {
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
.page-scroll {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
||||
.page-scroll::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
view,
|
||||
text,
|
||||
button,
|
||||
input,
|
||||
textarea {
|
||||
textarea,
|
||||
picker {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
button {
|
||||
@@ -36,8 +28,8 @@ button::after {
|
||||
border: 0;
|
||||
}
|
||||
.screen {
|
||||
min-height: 100vh;
|
||||
padding: 0 32rpx calc(170rpx + env(safe-area-inset-bottom));
|
||||
min-height: 100%;
|
||||
padding: 16rpx 32rpx calc(170rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
.eyebrow {
|
||||
color: #8fa39b;
|
||||
@@ -45,15 +37,9 @@ button::after {
|
||||
font-weight: 600;
|
||||
letter-spacing: 2rpx;
|
||||
}
|
||||
.title {
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
line-height: 1.2;
|
||||
margin: 12rpx 0 26rpx;
|
||||
}
|
||||
.section-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
margin: 38rpx 0 20rpx;
|
||||
}
|
||||
.muted {
|
||||
@@ -71,7 +57,7 @@ button::after {
|
||||
color: white;
|
||||
border-radius: 23rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
padding: 22rpx 30rpx;
|
||||
line-height: 1.3;
|
||||
}
|
||||
@@ -80,7 +66,7 @@ button::after {
|
||||
color: #28674e;
|
||||
border-radius: 23rpx;
|
||||
font-size: 27rpx;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
padding: 20rpx;
|
||||
}
|
||||
.row {
|
||||
@@ -111,8 +97,7 @@ button::after {
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.field input,
|
||||
.field textarea,
|
||||
.field picker {
|
||||
.field textarea {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
@@ -120,6 +105,10 @@ button::after {
|
||||
font-size: 28rpx;
|
||||
min-height: 76rpx;
|
||||
}
|
||||
.field picker {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.field textarea {
|
||||
height: 170rpx;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
kind: { type: String, value: "paw" },
|
||||
size: { type: Number, value: 48 },
|
||||
color: { type: String, value: "#398668" },
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
<view class="app-icon-icon" style="width: {{size}}rpx; height: {{size}}rpx; color: {{color}}">
|
||||
<view wx:if="{{kind==='water'}}" class="app-icon-drop"></view>
|
||||
<view wx:elif="{{kind==='food'}}" class="app-icon-bowl"><view class="app-icon-bowl-rim"></view></view>
|
||||
<view wx:else class="app-icon-paw">
|
||||
<view class="app-icon-toe app-icon-one"></view><view class="app-icon-toe app-icon-two"></view>
|
||||
<view class="app-icon-toe app-icon-three"></view><view class="app-icon-toe app-icon-four"></view>
|
||||
<view class="app-icon-pad"></view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -0,0 +1,12 @@
|
||||
.app-icon-icon { position: relative; display: flex; align-items: center; justify-content: center; }
|
||||
.app-icon-drop { width: 48%; height: 48%; border: 3rpx solid currentColor; border-radius: 50% 50% 50% 0; transform: rotate(135deg); }
|
||||
.app-icon-bowl { position: relative; width: 70%; height: 40%; border: 3rpx solid currentColor; border-radius: 5rpx 5rpx 50% 50%; }
|
||||
.app-icon-bowl-rim { position: absolute; left: -8%; top: -5rpx; width: 116%; height: 3rpx; border-radius: 4rpx; background: currentColor; }
|
||||
.app-icon-paw { position: relative; width: 85%; height: 85%; }
|
||||
.app-icon-toe, .app-icon-pad { position: absolute; background: currentColor; }
|
||||
.app-icon-toe { width: 17%; height: 24%; border-radius: 50%; }
|
||||
.app-icon-one { left: 0; top: 26%; transform: rotate(-28deg); }
|
||||
.app-icon-two { left: 24%; top: 3%; transform: rotate(-12deg); }
|
||||
.app-icon-three { right: 24%; top: 3%; transform: rotate(12deg); }
|
||||
.app-icon-four { right: 0; top: 26%; transform: rotate(28deg); }
|
||||
.app-icon-pad { left: 24%; top: 48%; width: 52%; height: 42%; border-radius: 50% 50% 45% 45%; }
|
||||
@@ -1,11 +0,0 @@
|
||||
Component({
|
||||
methods: {
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) {
|
||||
wx.navigateBack({ delta: 1 });
|
||||
} else {
|
||||
wx.reLaunch({ url: "/pages/home/home" });
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1,4 +0,0 @@
|
||||
<view class="page-back" bindtap="goBack" aria-role="button" aria-label="返回">
|
||||
<view class="page-back-arrow"></view>
|
||||
<text>返回</text>
|
||||
</view>
|
||||
@@ -1,18 +0,0 @@
|
||||
.page-back {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
min-height: 58rpx;
|
||||
margin-bottom: 22rpx;
|
||||
color: #2a7357;
|
||||
font-size: 26rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
.page-back-arrow {
|
||||
width: 17rpx;
|
||||
height: 17rpx;
|
||||
border-left: 4rpx solid currentColor;
|
||||
border-bottom: 4rpx solid currentColor;
|
||||
transform: rotate(45deg);
|
||||
margin-left: 5rpx;
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
const { navigationGeometry } = require("../../utils/layout");
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
title: String,
|
||||
back: { type: Boolean, value: false },
|
||||
},
|
||||
data: navigationGeometry(),
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.updateLayout();
|
||||
},
|
||||
},
|
||||
pageLifetimes: {
|
||||
resize() {
|
||||
this.updateLayout();
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
updateLayout() {
|
||||
const info = wx.getWindowInfo ? wx.getWindowInfo() : wx.getSystemInfoSync();
|
||||
let menu = {};
|
||||
try {
|
||||
menu = wx.getMenuButtonBoundingClientRect();
|
||||
} catch (_) {}
|
||||
this.setData(navigationGeometry(info, menu));
|
||||
},
|
||||
goBack() {
|
||||
if (getCurrentPages().length > 1) wx.navigateBack({ delta: 1 });
|
||||
else wx.reLaunch({ url: "/pages/home/home" });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -0,0 +1,11 @@
|
||||
<view class="navigation" style="height: {{headerHeight}}px">
|
||||
<view class="navigation-row" style="top: {{top}}px; height: {{rowHeight}}px; width: {{titleWidth}}px">
|
||||
<view wx:if="{{back}}" class="back" bindtap="goBack" aria-role="button" aria-label="返回">
|
||||
<view class="back-arrow"></view>
|
||||
</view>
|
||||
<text class="navigation-title">{{title}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view class="content" style="top: {{headerHeight}}px; height: {{scrollHeight}}px" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<slot />
|
||||
</scroll-view>
|
||||
@@ -0,0 +1,53 @@
|
||||
.navigation {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 25;
|
||||
background: #f6f9f6;
|
||||
}
|
||||
.navigation-row {
|
||||
position: absolute;
|
||||
left: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.navigation-title {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #194f42;
|
||||
font-size: 19px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.back {
|
||||
width: 28px;
|
||||
height: 36px;
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.back-arrow {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-left: 2px solid #194f42;
|
||||
border-bottom: 2px solid #194f42;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
.content {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
@@ -1 +1,6 @@
|
||||
{ "component": true }
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"app-icon": "/components/app-icon/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
bindtap="toggle"
|
||||
>
|
||||
<image wx:if="{{item.avatar_url}}" src="{{item.avatar_url}}" />
|
||||
<text wx:else>🐕</text>
|
||||
<app-icon wx:else size="32" />
|
||||
<text>{{item.name}}</text>
|
||||
<text class="check">{{item.chosen?'✓':'+'}}</text>
|
||||
</view>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
function topHeight() {
|
||||
const windowInfo = wx.getWindowInfo ? wx.getWindowInfo() : wx.getSystemInfoSync();
|
||||
const statusHeight = windowInfo.statusBarHeight || 24;
|
||||
let menuBottom = 0;
|
||||
try {
|
||||
const menu = wx.getMenuButtonBoundingClientRect();
|
||||
menuBottom = menu && menu.bottom ? menu.bottom : 0;
|
||||
} catch (_) {
|
||||
// Some development environments do not expose the menu geometry.
|
||||
}
|
||||
return Math.ceil(Math.max(menuBottom, statusHeight + 44) + 12);
|
||||
}
|
||||
|
||||
Component({
|
||||
data: { height: 100 },
|
||||
lifetimes: {
|
||||
attached() {
|
||||
this.setData({ height: topHeight() });
|
||||
},
|
||||
},
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
<view class="safe-top" style="height: {{height}}px"></view>
|
||||
@@ -1,4 +0,0 @@
|
||||
.safe-top {
|
||||
width: 100%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -1 +1,7 @@
|
||||
{ "disableScroll": true, "usingComponents": { "tab-bar": "/components/tab-bar/index", "pet-picker": "/components/pet-picker/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index",
|
||||
"pet-picker": "/components/pet-picker/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="早安,{{name}}">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<view class="eyebrow">你好,今天也一起好好生活</view>
|
||||
<view class="row top">
|
||||
<view class="title">早安,{{name}}</view>
|
||||
<image src="/assets/logo-corgi-v2.png" class="avatar" />
|
||||
</view>
|
||||
<view class="hero">
|
||||
<view class="hero-copy">
|
||||
<text class="hero-small">今日的主角</text>
|
||||
<text class="hero-title">小短腿,出发吧!</text>
|
||||
<text class="hero-meta">多只狗狗 · 每一天都是好日子</text>
|
||||
<text class="hero-title">出门走走吧</text>
|
||||
<text class="hero-meta">一起出发,收集今天的小快乐</text>
|
||||
<view class="hero-caption">● 陪伴它们的每一天,都值得记录</view>
|
||||
</view>
|
||||
<image src="/assets/corgi-family-five.png" mode="aspectFit" />
|
||||
@@ -21,7 +15,7 @@
|
||||
</view>
|
||||
<view class="card walk-card">
|
||||
<view class="walk-intro">
|
||||
<view class="dog-emoji">🐕</view>
|
||||
<view class="walk-art"><app-icon size="74" /></view>
|
||||
<view>
|
||||
<view class="walk-title">今天的风刚刚好</view>
|
||||
<view class="muted">选择同行的狗狗,一起出门转转。</view>
|
||||
@@ -70,7 +64,7 @@
|
||||
{{item.completed?'✓':''}}
|
||||
</view>
|
||||
<view class="task-icon">
|
||||
{{item.category==='water'?'💧':item.category==='food'?'🥣':'🐾'}}
|
||||
<app-icon kind="{{item.category}}" size="36" />
|
||||
</view>
|
||||
<view class="task-main">
|
||||
<text class="task-name">{{item.title}}</text>
|
||||
@@ -78,9 +72,9 @@
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{!tasks.length}}" class="empty">
|
||||
今天还没有任务,给狗狗安排一件小事吧 🐾
|
||||
今天还没有任务,给狗狗安排一件小事吧
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
<tab-bar current="/pages/home/home" />
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
.top {
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.top .title {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
margin-right: 16rpx;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.avatar {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
flex-shrink: 0;
|
||||
border-radius: 50%;
|
||||
border: 6rpx solid white;
|
||||
box-shadow: 0 5rpx 22rpx #174b3520;
|
||||
}
|
||||
.hero {
|
||||
min-height: 330rpx;
|
||||
background: #194f42;
|
||||
@@ -34,11 +17,11 @@
|
||||
.hero-small {
|
||||
color: #abd9b8;
|
||||
font-size: 23rpx;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
.hero-title {
|
||||
font-size: 43rpx;
|
||||
font-weight: 800;
|
||||
font-size: 38rpx;
|
||||
font-weight: 600;
|
||||
margin: 16rpx 0;
|
||||
}
|
||||
.hero-meta {
|
||||
@@ -61,7 +44,7 @@
|
||||
.link {
|
||||
font-size: 24rpx;
|
||||
color: #398668;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
.walk-card {
|
||||
padding: 26rpx;
|
||||
@@ -71,7 +54,7 @@
|
||||
gap: 22rpx;
|
||||
align-items: center;
|
||||
}
|
||||
.dog-emoji {
|
||||
.walk-art {
|
||||
width: 145rpx;
|
||||
height: 145rpx;
|
||||
border-radius: 26rpx;
|
||||
@@ -82,7 +65,7 @@
|
||||
}
|
||||
.walk-title {
|
||||
font-size: 31rpx;
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
.walk-intro .muted {
|
||||
@@ -169,7 +152,7 @@
|
||||
gap: 6rpx;
|
||||
}
|
||||
.task-name {
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
.task-main .muted {
|
||||
font-size: 22rpx;
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ "disableScroll": true, "usingComponents": { "pet-picker": "/components/pet-picker/index", "page-back": "/components/page-back/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"pet-picker": "/components/pet-picker/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="发起约遛" back="{{true}}">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<page-back />
|
||||
<view class="eyebrow">HOST A WALK</view>
|
||||
<view class="title">发起约遛</view>
|
||||
<view class="field">
|
||||
<view class="field-label">活动名称</view>
|
||||
<input
|
||||
@@ -27,7 +23,7 @@
|
||||
<view class="field">
|
||||
<view class="field-label">集合地点</view>
|
||||
<view class="picker" bindtap="location">
|
||||
📍 {{place_name||'选择地图位置'}}
|
||||
{{place_name||'选择地图位置'}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="field">
|
||||
@@ -54,4 +50,4 @@
|
||||
</view>
|
||||
<button class="primary" bindtap="save" disabled="{{saving}}">发布约遛 →</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
{ "disableScroll": true, "usingComponents": { "tab-bar": "/components/tab-bar/index", "pet-picker": "/components/pet-picker/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index",
|
||||
"pet-picker": "/components/pet-picker/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="约个伴一起遛">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<view class="eyebrow">LET'S WALK TOGETHER</view>
|
||||
<view class="title">约个伴一起遛</view>
|
||||
<view class="banner">
|
||||
<view class="banner-copy">
|
||||
<text>好天气,和新朋友一起走走</text>
|
||||
@@ -24,21 +21,21 @@
|
||||
>
|
||||
<view class="row">
|
||||
<text class="badge">
|
||||
🐾 {{item.participants}} / {{item.max_people}} 人
|
||||
{{item.participants}} / {{item.max_people}} 人
|
||||
</text>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
<strong>{{item.title}}</strong>
|
||||
<view class="meta">📍 {{item.place_name}}</view>
|
||||
<view class="meta">🗓 {{item.date}}</view>
|
||||
<view class="meta">地点 · {{item.place_name}}</view>
|
||||
<view class="meta">时间 · {{item.date}}</view>
|
||||
<view class="desc">{{item.description}}</view>
|
||||
</view>
|
||||
<view wx:if="{{!meetups.length}}" class="empty">
|
||||
还没有约遛,发起第一场吧 🐕
|
||||
还没有约遛,发起第一场吧
|
||||
</view>
|
||||
<button class="primary" bindtap="create">+ 发起一场约遛</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
<view wx:if="{{active}}" class="overlay">
|
||||
<view class="sheet">
|
||||
<view class="row">
|
||||
@@ -46,9 +43,9 @@
|
||||
<text bindtap="close">×</text>
|
||||
</view>
|
||||
<view class="detail">
|
||||
<view bindtap="location">📍 {{active.place_name}} {{active.latitude?'· 点开地图':''}}</view>
|
||||
<view>🗓 {{active.date}}</view>
|
||||
<view>🐕 {{active.participants}} / {{active.max_people}} 人已报名</view>
|
||||
<view bindtap="location">地点 · {{active.place_name}} {{active.latitude?'· 点开地图':''}}</view>
|
||||
<view>时间 · {{active.date}}</view>
|
||||
<view> {{active.participants}} / {{active.max_people}} 人已报名</view>
|
||||
</view>
|
||||
<view class="desc">{{active.description}}</view>
|
||||
<view wx:if="{{active.host_user_id!==userId&&!joined}}">
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
.banner-title {
|
||||
font-size: 35rpx;
|
||||
line-height: 1.3;
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.banner-title.first {
|
||||
@@ -36,7 +36,7 @@
|
||||
.add {
|
||||
font-size: 24rpx;
|
||||
color: #328965;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
.meetup strong {
|
||||
display: block;
|
||||
@@ -92,7 +92,7 @@
|
||||
}
|
||||
.select-title {
|
||||
font-size: 25rpx;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
margin: 30rpx 0 15rpx;
|
||||
}
|
||||
.sheet button {
|
||||
|
||||
@@ -3,7 +3,7 @@ Page({
|
||||
data: {
|
||||
id: "",
|
||||
name: "",
|
||||
breed: "柯基",
|
||||
breed: "",
|
||||
gender: "male",
|
||||
birth_date: "",
|
||||
weight_kg: "",
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
{ "disableScroll": true, "usingComponents": { "page-back": "/components/page-back/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="{{id?'编辑档案':'认识新朋友'}}" back="{{true}}">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<page-back />
|
||||
<view class="eyebrow">PET PROFILE</view>
|
||||
<view class="title">{{id?'编辑档案':'认识新朋友'}}</view>
|
||||
<view class="photo" bindtap="choose">
|
||||
<image wx:if="{{avatar_url}}" src="{{avatar_url}}" mode="aspectFill" />
|
||||
<text wx:else>🐕</text>
|
||||
<view>点击上传照片</view>
|
||||
<app-icon wx:else size="70" />
|
||||
<view class="photo-caption">点击上传照片</view>
|
||||
</view>
|
||||
<view class="field">
|
||||
<view class="field-label">名字 *</view>
|
||||
@@ -20,7 +16,7 @@
|
||||
</view>
|
||||
<view class="field">
|
||||
<view class="field-label">品种</view>
|
||||
<input value="{{breed}}" data-key="breed" bindinput="field" />
|
||||
<input placeholder="填写它的品种" value="{{breed}}" data-key="breed" bindinput="field" />
|
||||
</view>
|
||||
<view class="field">
|
||||
<view class="field-label">性别</view>
|
||||
@@ -65,4 +61,4 @@
|
||||
<button class="primary" bindtap="save" disabled="{{saving}}">保存档案</button>
|
||||
<button wx:if="{{id}}" class="archive" bindtap="archive">归档这只宠物</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.photo view {
|
||||
.photo-caption {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ "disableScroll": true, "usingComponents": { "tab-bar": "/components/tab-bar/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="我的毛孩子">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<view class="eyebrow">MY LITTLE FAMILY</view>
|
||||
<view class="title">我的毛孩子</view>
|
||||
<view class="family">
|
||||
<view>
|
||||
<text>五只柯基,也能一起遛</text>
|
||||
<text>每一位家人,都值得被好好照顾</text>
|
||||
<strong>每一只都有自己的故事</strong>
|
||||
</view>
|
||||
<image src="/assets/corgi-family-five.png" mode="aspectFit" />
|
||||
@@ -27,7 +24,7 @@
|
||||
src="{{item.avatar_url}}"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<text wx:else>🐕</text>
|
||||
<app-icon wx:else size="70" />
|
||||
</view>
|
||||
<view class="pet-info">
|
||||
<strong>{{item.name}}</strong>
|
||||
@@ -39,8 +36,8 @@
|
||||
</view>
|
||||
<text class="arrow">›</text>
|
||||
</view>
|
||||
<view wx:if="{{!pets.length}}" class="empty">给第一只狗狗建个档案吧 🐾</view>
|
||||
<view wx:if="{{!pets.length}}" class="empty">给第一只狗狗建个档案吧 </view>
|
||||
<button class="primary add-button" bindtap="add">+ 新建宠物档案</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
<tab-bar current="/pages/pets/pets" />
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.add {
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
color: #368764;
|
||||
}
|
||||
.pet {
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
{ "disableScroll": true, "usingComponents": { "page-back": "/components/page-back/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="看看它们走到哪儿了" back="{{true}}">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<page-back />
|
||||
<view class="eyebrow">肉垫计划 · 位置分享</view>
|
||||
<view class="title">找到小短腿的脚印</view>
|
||||
<map wx:if="{{markers.length}}"
|
||||
latitude="{{latitude}}"
|
||||
longitude="{{longitude}}"
|
||||
@@ -16,4 +12,4 @@
|
||||
<view class="muted">上次更新 {{updated}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
|
||||
@@ -1 +1,6 @@
|
||||
{ "disableScroll": true, "usingComponents": { "tab-bar": "/components/tab-bar/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="今日小任务">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<view class="eyebrow">LITTLE THINGS, BIG LOVE</view>
|
||||
<view class="title">今日小任务</view>
|
||||
<view class="summary">
|
||||
<view>这一天也要照顾好它们</view>
|
||||
<strong>
|
||||
@@ -32,7 +29,7 @@
|
||||
{{item.completed?'✓':''}}
|
||||
</view>
|
||||
<view class="icon">
|
||||
{{item.category==='water'?'💧':item.category==='food'?'🥣':'🐾'}}
|
||||
<app-icon kind="{{item.category}}" size="36" />
|
||||
</view>
|
||||
<view class="info" data-index="{{index}}" bindtap="edit">
|
||||
<strong>{{item.title}}</strong>
|
||||
@@ -45,12 +42,12 @@
|
||||
<text class="remove" data-index="{{index}}" bindtap="remove">×</text>
|
||||
</view>
|
||||
<view wx:if="{{!tasks.length}}" class="empty">
|
||||
从喝水、喂食开始,安排温柔的小日常 ✨
|
||||
从喝水、喂食开始,安排温柔的小日常
|
||||
</view>
|
||||
</view>
|
||||
<button class="primary" bindtap="open">+ 新建日常任务</button>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
<view wx:if="{{showForm}}" class="overlay">
|
||||
<view class="sheet">
|
||||
<view class="row">
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
.add {
|
||||
color: #2b8a63;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
}
|
||||
.date-nav {
|
||||
display: flex;
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
{ "disableScroll": true, "usingComponents": { "page-back": "/components/page-back/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="{{selected?'这次的脚印':'遛狗记录'}}" back="{{true}}">
|
||||
<view class="screen">
|
||||
<safe-top />
|
||||
<page-back />
|
||||
<text wx:if="{{selected}}" class="back" bindtap="close">‹ 全部记录</text>
|
||||
<view class="eyebrow">OUR LITTLE FOOTPRINTS</view>
|
||||
<view class="title">{{selected?'这次的脚印':'遛狗记录'}}</view>
|
||||
<view wx:if="{{selected}}">
|
||||
<view class="card detail">
|
||||
<strong>{{selected.date}}</strong>
|
||||
@@ -23,10 +19,10 @@
|
||||
<view wx:else>
|
||||
<view wx:for="{{records}}" wx:key="id" class="card record" data-index="{{index}}" bindtap="open">
|
||||
<view class="row"><strong>{{item.date}}</strong><text>›</text></view>
|
||||
<view class="pet-names">🐕 {{item.petNames}}</view>
|
||||
<view class="pet-names"> {{item.petNames}}</view>
|
||||
<view class="record-stats">{{item.duration}} · {{item.distance}} km · {{item.points.length}} 个足迹</view>
|
||||
</view>
|
||||
<view wx:if="{{!loading&&!records.length}}" class="empty">完成一次遛狗,脚印就会出现在这里 🐾</view>
|
||||
<view wx:if="{{!loading&&!records.length}}" class="empty">完成一次遛狗,脚印就会出现在这里 </view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
|
||||
@@ -203,7 +203,7 @@ Page({
|
||||
onShareAppMessage() {
|
||||
const walk = this.data.walk;
|
||||
return {
|
||||
title: "肉垫计划 · 看看我们遛到哪儿了 🐾",
|
||||
title: "肉垫计划 · 看看我们遛到哪儿了",
|
||||
path:
|
||||
walk && walk.share_enabled
|
||||
? "/pages/share/share?token=" + walk.share_token
|
||||
|
||||
@@ -1 +1,7 @@
|
||||
{ "disableScroll": true, "usingComponents": { "tab-bar": "/components/tab-bar/index", "pet-picker": "/components/pet-picker/index" } }
|
||||
{
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index",
|
||||
"pet-picker": "/components/pet-picker/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
<scroll-view class="page-scroll" scroll-y="{{true}}" enhanced="{{true}}" show-scrollbar="{{false}}">
|
||||
<page-layout id="page-layout" title="一起去兜风">
|
||||
<view class="screen walk-screen">
|
||||
<safe-top />
|
||||
<view class="eyebrow">PAWPRINT WALK</view>
|
||||
<view class="title">一起去兜风</view>
|
||||
<view class="map-box">
|
||||
<map
|
||||
id="walk-map"
|
||||
@@ -20,7 +17,7 @@
|
||||
<view class="card session">
|
||||
<view class="eyebrow">{{walk?'快乐进行时':'出门走走吧'}}</view>
|
||||
<view class="session-title">
|
||||
{{walk?'跟小短腿一起探索':'选择今天同行的狗狗'}}
|
||||
{{walk?'跟它们一起探索':'选择今天同行的狗狗'}}
|
||||
</view>
|
||||
<view class="stats">
|
||||
<view>
|
||||
@@ -44,7 +41,7 @@
|
||||
bind:change="pick"
|
||||
/>
|
||||
<view wx:if="{{!pets.length}}" class="empty">
|
||||
先到「宠物」添加你的柯基吧 🐕
|
||||
到「宠物」添加同行的狗狗,再一起出发吧
|
||||
</view>
|
||||
<button
|
||||
wx:if="{{!walk||walk.status==='finished'}}"
|
||||
@@ -81,8 +78,8 @@
|
||||
</view>
|
||||
<button class="records-button" bindtap="records">查看最近的脚印 ›</button>
|
||||
<view class="privacy">
|
||||
🔒 只有你主动打开分享时,朋友才能查看位置。保持小程序打开,位置才会持续更新。
|
||||
只有你主动打开分享时,朋友才能查看位置。保持小程序打开,位置才会持续更新。
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</page-layout>
|
||||
<tab-bar current="/pages/walk/walk" />
|
||||
|
||||
@@ -2,10 +2,6 @@
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
}
|
||||
.walk-screen > .eyebrow,
|
||||
.walk-screen > .title {
|
||||
margin-left: 32rpx;
|
||||
}
|
||||
.map-box {
|
||||
height: 450rpx;
|
||||
position: relative;
|
||||
@@ -30,7 +26,7 @@
|
||||
}
|
||||
.session-title {
|
||||
font-size: 35rpx;
|
||||
font-weight: 800;
|
||||
font-weight: 600;
|
||||
margin: 12rpx 0 30rpx;
|
||||
}
|
||||
.stats {
|
||||
@@ -58,7 +54,7 @@
|
||||
color: #99aa9d;
|
||||
}
|
||||
.picker-title {
|
||||
font-weight: 700;
|
||||
font-weight: 600;
|
||||
margin: 26rpx 0 18rpx;
|
||||
}
|
||||
.main-button {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
function navigationGeometry(info = {}, menu = {}) {
|
||||
const width = info.windowWidth || 375;
|
||||
const height = info.windowHeight || 812;
|
||||
const status = info.statusBarHeight || 24;
|
||||
const validMenu = menu.top >= status && menu.height > 0 && menu.left > 0 && menu.left < width;
|
||||
const top = validMenu ? menu.top : status + 6;
|
||||
const rowHeight = validMenu ? menu.height : 32;
|
||||
const menuLeft = validMenu ? menu.left : width - 100;
|
||||
const headerHeight = top + rowHeight + 12;
|
||||
return {
|
||||
top,
|
||||
rowHeight,
|
||||
titleWidth: Math.max(80, menuLeft - 28),
|
||||
headerHeight,
|
||||
scrollHeight: Math.max(0, height - headerHeight),
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = { navigationGeometry };
|
||||
Reference in New Issue
Block a user