Compare commits
1
Commits
b7c6224e54
..
latest
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0f5dc01674 |
+18
@@ -0,0 +1,18 @@
|
||||
# IDE
|
||||
.idea/
|
||||
|
||||
# 运行产物
|
||||
run/
|
||||
*.log
|
||||
|
||||
# 本地配置(含密钥,不入库)
|
||||
config.yaml
|
||||
|
||||
# 依赖与构建产物
|
||||
node_modules/
|
||||
dist/
|
||||
dist-ssr/
|
||||
|
||||
# 系统文件
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
Generated
-10
@@ -1,10 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Ignored default folder with query files
|
||||
/queries/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
Generated
-10
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="GoImports">
|
||||
<option name="excludedPackages">
|
||||
<array>
|
||||
<option value="golang.org/x/net/context" />
|
||||
</array>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
Generated
-8
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/past-go.iml" filepath="$PROJECT_DIR$/.idea/past-go.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
Generated
-9
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -12,15 +12,23 @@ Page(withDataCache(withListPagination({
|
||||
myName: '我', partnerName: 'TA',
|
||||
weekBoth: 0, weekMy: 0, weekPartner: 0,
|
||||
todayMy: 0, todayPartner: 0,
|
||||
smokingVisible: true,
|
||||
loading: true
|
||||
},
|
||||
|
||||
onLoad: function() {
|
||||
this.setData(getLayout());
|
||||
this.refreshSmokingVisible();
|
||||
this.loadCoupleInfo();
|
||||
this.loadData();
|
||||
},
|
||||
onShow: function() { this.loadCoupleInfo(); this.loadData(); },
|
||||
onShow: function() { this.refreshSmokingVisible(); this.loadCoupleInfo(); this.loadData(); },
|
||||
|
||||
// 读取本地设置:抽烟打卡默认事件是否显示(默认显示)
|
||||
refreshSmokingVisible: function() {
|
||||
var v = wx.getStorageSync('smokingVisible');
|
||||
this.setData({ smokingVisible: (v === '' || v == null) ? true : !!v });
|
||||
},
|
||||
|
||||
onSmokingUpdated: function() { this.loadData(); },
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<smoking-card id="smoking" bind:updated="onSmokingUpdated" />
|
||||
<smoking-card id="smoking" wx:if="{{smokingVisible}}" bind:updated="onSmokingUpdated" />
|
||||
|
||||
<!-- 打卡列表 -->
|
||||
<view class="checkin-cards" wx:if="{{!loading && !loadError && checkins.length > 0}}">
|
||||
|
||||
@@ -25,6 +25,9 @@ Page({
|
||||
subscribeItems: [],
|
||||
subscribeLoading: false,
|
||||
|
||||
// 打卡:抽烟打卡默认事件是否显示
|
||||
smokingVisible: true,
|
||||
|
||||
// 我们past
|
||||
showAboutModal: false,
|
||||
// 联系我们
|
||||
@@ -32,13 +35,15 @@ Page({
|
||||
},
|
||||
|
||||
onLoad: function() {
|
||||
this.setData(getLayout());},
|
||||
this.setData(getLayout());
|
||||
this.refreshSmokingVisible();},
|
||||
|
||||
onPullDownRefresh: function() {
|
||||
wx.stopPullDownRefresh();
|
||||
},
|
||||
|
||||
onShow: async function() {
|
||||
this.refreshSmokingVisible();
|
||||
this.setData({ bindingKnown: false, bindingError:false });
|
||||
try {
|
||||
var info = await api.coupleInfo();
|
||||
@@ -81,6 +86,18 @@ Page({
|
||||
|
||||
noop: function() {},
|
||||
|
||||
// ===== 抽烟打卡默认事件显示开关 =====
|
||||
refreshSmokingVisible: function() {
|
||||
var v = wx.getStorageSync('smokingVisible');
|
||||
this.setData({ smokingVisible: (v === '' || v == null) ? true : !!v });
|
||||
},
|
||||
toggleSmoking: function(e) {
|
||||
var visible = !!e.detail.value;
|
||||
this.setData({ smokingVisible: visible });
|
||||
wx.setStorageSync('smokingVisible', visible);
|
||||
wx.showToast({ title: visible ? '已显示抽烟打卡' : '已隐藏抽烟打卡', icon: 'none' });
|
||||
},
|
||||
|
||||
// ===== 消息通知管理(统一使用一个模板) =====
|
||||
showSubscribeModal: async function() {
|
||||
this.setData({ showSubscribeModal: true, subscribeLoading: true });
|
||||
|
||||
@@ -24,6 +24,15 @@
|
||||
<text class="j-link">›</text>
|
||||
</view>
|
||||
|
||||
<!-- 抽烟打卡默认事件 -->
|
||||
<view class="j-profile-setting">
|
||||
<view class="setting-info">
|
||||
<view class="j-small-title">抽烟打卡</view>
|
||||
<view class="j-caption">在打卡页显示「抽烟记录」默认事件</view>
|
||||
</view>
|
||||
<switch checked="{{smokingVisible}}" bindchange="toggleSmoking" color="#B74768" style="transform:scale(0.75);" />
|
||||
</view>
|
||||
|
||||
<view class="section-heading">关系与账号</view>
|
||||
<!-- 操作记录 -->
|
||||
<view class="j-profile-setting" bindtap="goToHistory">
|
||||
|
||||
Reference in New Issue
Block a user