feat: add multi-source breed encyclopedia and two-hour refresh sessions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
const { secure, toast } = require("../../utils/api");
|
||||
Page({
|
||||
data: {
|
||||
mode: "walk",
|
||||
pets: [],
|
||||
selected: [],
|
||||
walk: null,
|
||||
@@ -14,6 +15,10 @@ Page({
|
||||
busy: false,
|
||||
locationError: "",
|
||||
},
|
||||
changeMode(e) {
|
||||
const mode = e.currentTarget.dataset.mode;
|
||||
if (mode !== this.data.mode) this.setData({ mode });
|
||||
},
|
||||
onShow() {
|
||||
this.load();
|
||||
clearInterval(this.clock);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
"disableScroll": true,
|
||||
"usingComponents": {
|
||||
"tab-bar": "/components/tab-bar/index",
|
||||
"pet-picker": "/components/pet-picker/index"
|
||||
"pet-picker": "/components/pet-picker/index",
|
||||
"meetup-panel": "/components/meetup-panel/index"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<page-layout id="page-layout" title="一起去兜风">
|
||||
<view class="screen walk-screen">
|
||||
<view class="walk-modes"><view class="mode {{mode==='walk'?'chosen':''}}" data-mode="walk" bindtap="changeMode">记录遛狗<text wx:if="{{walk&&walk.status==='active'}}" class="recording-dot"></text></view><view class="mode {{mode==='meetups'?'chosen':''}}" data-mode="meetups" bindtap="changeMode">约个伴</view></view>
|
||||
<meetup-panel wx:if="{{mode==='meetups'}}" />
|
||||
<view wx:else class="screen walk-screen">
|
||||
<view class="map-box">
|
||||
<map
|
||||
id="walk-map"
|
||||
|
||||
@@ -111,3 +111,8 @@
|
||||
border-radius: 20rpx;
|
||||
font-size: 26rpx;
|
||||
}
|
||||
|
||||
.walk-modes { margin:12rpx 32rpx 22rpx; padding:7rpx; display:flex; border-radius:99rpx; background:#f5e9de; }
|
||||
.mode { flex:1;padding:16rpx;text-align:center;color:#9d8779;font-size:26rpx;border-radius:99rpx; }
|
||||
.mode.chosen { background:#fff;color:#b95738;box-shadow:0 5rpx 15rpx #604a4010; }
|
||||
.recording-dot { display:inline-block;width:10rpx;height:10rpx;background:#b95738;border-radius:50%;margin-left:10rpx; }
|
||||
|
||||
Reference in New Issue
Block a user