diff --git a/README.md b/README.md
index df8f013..9142b24 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@ https://pic1.zhimg.com/50/v2-dcfbab1219ae4f7a7a6db168bb1580a2_720w.jpg?source=2c
images svn 地址
svn://39.106.86.127:28386/projects/takeda/proj_src/shop/frontend/web/wt
-(/images/)(\S\*(?=["|']))
+(/images/)(\S*(?=["|']))
{{imageUrl}}$2?t={{Timestamp}}
ui问题
diff --git a/project.config.json b/project.config.json
index 56b1eb0..e5e912d 100644
--- a/project.config.json
+++ b/project.config.json
@@ -40,8 +40,26 @@
"libVersion": "2.32.3",
"ignore": [],
"packOptions": {
- "include": [],
- "ignore": []
+ "ignore": [
+ {
+ "value": "src/images/*.*",
+ "type": "glob"
+ },
+ {
+ "value": "src/images/**/*.*",
+ "type": "glob"
+ },
+ {
+ "value": "src/images/**/**/*.*",
+ "type": "glob"
+ }
+ ],
+ "include": [
+ {
+ "value": "src/images/tabbar/*.*",
+ "type": "glob"
+ }
+ ]
},
"appid": "wx2b0bb13edf717c1d"
}
\ No newline at end of file
diff --git a/src/pages/article/index.ts b/src/pages/article/index.ts
index a3be5c5..df36d37 100644
--- a/src/pages/article/index.ts
+++ b/src/pages/article/index.ts
@@ -22,7 +22,7 @@ Page({
this.setData({
BookId: options.id,
});
- app.waitLogin().then(() => {
+ app.waitLogin(false, true).then(() => {
this.getChapterList();
this.getDetail();
});
diff --git a/src/pages/article/index.wxml b/src/pages/article/index.wxml
index e6d8d52..2f8815f 100644
--- a/src/pages/article/index.wxml
+++ b/src/pages/article/index.wxml
@@ -7,8 +7,8 @@
概要解读
{{time}}
-
-
+
+
-
+
目录
-
+
取消收藏
-
+
收藏
@@ -69,7 +69,7 @@
收起
-
+
{{book.BookName}}
diff --git a/src/pages/classify/index.ts b/src/pages/classify/index.ts
index 02483d0..523c307 100644
--- a/src/pages/classify/index.ts
+++ b/src/pages/classify/index.ts
@@ -137,41 +137,47 @@ Page({
handleCollect(e) {
const { index, list } = e.currentTarget.dataset;
const { Id } = this.data[list][index];
- wx.ajax({
- method: 'POST',
- url: '?r=shizhong/book/collect',
- data: { BookId: Id },
- }).then(() => {
- wx.showToast({
- title: '收藏成功',
- icon: 'none',
- });
- this.setData({
- [`${list}[${index}].IsCollect`]: '1',
+ app.waitLogin(false, true).then(() => {
+ wx.ajax({
+ method: 'POST',
+ url: '?r=shizhong/book/collect',
+ data: { BookId: Id },
+ }).then(() => {
+ wx.showToast({
+ title: '收藏成功',
+ icon: 'none',
+ });
+ this.setData({
+ [`${list}[${index}].IsCollect`]: '1',
+ });
});
});
},
handleUnCollect(e) {
const { index, list } = e.currentTarget.dataset;
const { Id } = this.data[list][index];
- wx.ajax({
- method: 'POST',
- url: '?r=shizhong/book/cancel-collect',
- data: { BookId: Id },
- }).then(() => {
- wx.showToast({
- title: '取消收藏',
- icon: 'none',
- });
- this.setData({
- [`${list}[${index}].IsCollect`]: '0',
+ app.waitLogin(false, true).then(() => {
+ wx.ajax({
+ method: 'POST',
+ url: '?r=shizhong/book/cancel-collect',
+ data: { BookId: Id },
+ }).then(() => {
+ wx.showToast({
+ title: '取消收藏',
+ icon: 'none',
+ });
+ this.setData({
+ [`${list}[${index}].IsCollect`]: '0',
+ });
});
});
},
handleDetail(e) {
const { id } = e.currentTarget.dataset;
- wx.navigateTo({
- url: `/pages/article/index?id=${id}`,
+ app.waitLogin(false, true).then(() => {
+ wx.navigateTo({
+ url: `/pages/article/index?id=${id}`,
+ });
});
},
handleBack() {
diff --git a/src/pages/classify/index.wxml b/src/pages/classify/index.wxml
index 374af37..ac29712 100644
--- a/src/pages/classify/index.wxml
+++ b/src/pages/classify/index.wxml
@@ -30,7 +30,7 @@
{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}
-
+
{{item.BrowseNum}}
-
+
已收藏
-
+
收藏
@@ -59,7 +59,7 @@
{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}
-
+
{{item.BrowseNum}}
-
+
已收藏
-
+
收藏
diff --git a/src/pages/collection/index.ts b/src/pages/collection/index.ts
index 6c75785..2b496a5 100644
--- a/src/pages/collection/index.ts
+++ b/src/pages/collection/index.ts
@@ -12,7 +12,7 @@ Page({
list: [],
},
onLoad() {
- app.waitLogin().then(() => {
+ app.waitLogin(false, true).then(() => {
this.getList();
});
},
diff --git a/src/pages/collection/index.wxml b/src/pages/collection/index.wxml
index f65037c..cfea2a4 100644
--- a/src/pages/collection/index.wxml
+++ b/src/pages/collection/index.wxml
@@ -10,13 +10,13 @@
-
+
{{item.BookName}}
{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}
-
+
{{item.BrowseNum}}
-
+
已收藏
-
+
收藏
diff --git a/src/pages/home/index.ts b/src/pages/home/index.ts
index 11b0103..ff29c0f 100644
--- a/src/pages/home/index.ts
+++ b/src/pages/home/index.ts
@@ -3,10 +3,16 @@ const app = getApp();
Page({
data: {
cateList: [] as any,
+ remark: '',
+
+ isLogin: 0,
},
onLoad() {
app.waitLogin().then(() => {
this.getCateList();
+ this.setData({
+ isLogin: app.globalData.isLogin,
+ });
});
},
getCateList() {
@@ -32,6 +38,25 @@ Page({
url: '/pages/search/index',
});
},
+ handleRemark() {
+ const { remark } = this.data;
+ wx.ajax({
+ method: 'POST',
+ url: '?r=shizhong/account/send-feedback',
+ data: {
+ content: remark,
+ },
+ loading: true,
+ }).then(() => {
+ wx.showToast({
+ title: '提交成功',
+ icon: 'success',
+ });
+ this.setData({
+ remark: '',
+ });
+ });
+ },
});
export {};
diff --git a/src/pages/home/index.wxml b/src/pages/home/index.wxml
index fe2014a..7717e13 100644
--- a/src/pages/home/index.wxml
+++ b/src/pages/home/index.wxml
@@ -1,9 +1,12 @@
-
-
-
+
+
+
人人都是家庭健康师,让生活更有质量
-
+
-
+
-
+
@@ -29,23 +27,24 @@
class="card"
wx:for="{{cateList}}"
wx:key="index"
- style="background: url('/images/home-card-bg.png') no-repeat center/100%"
+ style="background: url('{{imageUrl}}home-card-bg.png?t={{Timestamp}}') no-repeat center/100%"
bind:tap="handleDetail"
data-index="{{index}}"
>
{{item.CateName}}
-
- {{item.Intro}}
-
+ {{item.Intro}}
-
diff --git a/src/pages/login/index.wxml b/src/pages/login/index.wxml
index f9fe17d..0fdc67e 100644
--- a/src/pages/login/index.wxml
+++ b/src/pages/login/index.wxml
@@ -1,6 +1,6 @@
@@ -30,11 +30,11 @@
登录
@@ -47,8 +47,8 @@
-
+
登录
-
+
我的收藏
-
+
关注公众号
-
+
联系我们
diff --git a/src/pages/search/index.ts b/src/pages/search/index.ts
index 03d4529..1ba63e0 100644
--- a/src/pages/search/index.ts
+++ b/src/pages/search/index.ts
@@ -14,7 +14,7 @@ Page({
list: [],
},
onLoad() {
- app.waitLogin().then(() => {
+ app.waitLogin(false, true).then(() => {
this.setData({
focus: true,
});
diff --git a/src/pages/search/index.wxml b/src/pages/search/index.wxml
index a707acc..bad9211 100644
--- a/src/pages/search/index.wxml
+++ b/src/pages/search/index.wxml
@@ -15,7 +15,7 @@
-
+
{{item.CateName}}{{item.CateSecondName ? '/'+item.CateSecondName : ''}}
-
+
???
@@ -53,7 +53,7 @@
-
+
抱歉,未搜到相关内容
diff --git a/src/pages/switchLogin/index.wxml b/src/pages/switchLogin/index.wxml
index c62ceda..1aaffeb 100644
--- a/src/pages/switchLogin/index.wxml
+++ b/src/pages/switchLogin/index.wxml
@@ -7,7 +7,7 @@
/>
diff --git a/src/pages/topic/index.wxml b/src/pages/topic/index.wxml
index 6fce632..599a3ee 100644
--- a/src/pages/topic/index.wxml
+++ b/src/pages/topic/index.wxml
@@ -1,6 +1,6 @@
-
+
{{index + 1}}/
{{question.length}}
@@ -50,7 +50,7 @@
diff --git a/typings/index.d.ts b/typings/index.d.ts
index 0b96031..3dcb740 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -10,7 +10,7 @@ interface IAppOption {
scene: null | { [key: string]: any };
};
userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback;
- waitLogin: (waitLoginState?: boolean) => Promise;
+ waitLogin: (waitLoginState?: boolean, requireLogin?: boolean) => Promise;
getMenuInfo: (arg0: WechatMiniprogram.Page.Instance) => void;
getUserInfo: (arg0: WechatMiniprogram.Page.Instance, arg1?: (arg0: any) => void) => void;
}