Skip to content

Commit 8d9a009

Browse files
committed
Fixed link
Signed-off-by: Kang Huaishuai <[email protected]>
1 parent 7df90af commit 8d9a009

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+183
-224
lines changed

.pcit.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ steps:
88
99
export NODE_PATH=/usr/local/lib/node_modules
1010
11-
npm -g i fs-extra miniprogram-ci typescript \
11+
npm -g i miniprogram-ci typescript \
1212
--registry https://registry.npm.taobao.org
1313
1414
cd client && npm install --registry https://registry.npm.taobao.org && cd ..
1515
16-
npm run towxml:build
17-
1816
npm run gitbook:summary:generate
1917
npm run gitbook:summary:towxml
2018

.vscode/settings.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77
"fileMatch": [
88
"client/app.json"
99
],
10-
"url": "/schema/app.json"
10+
"url": "/schema/app.schema.json"
1111
},
1212
{
1313
"fileMatch": [
1414
"client/sitemap.json"
1515
],
16-
"url": "/schema/sitemap.json"
16+
"url": "/schema/sitemap.schema.json"
1717
},
1818
{
1919
"fileMatch": [
2020
"project.config.json"
2121
],
22-
"url": "/schema/projectconfig.json"
22+
"url": "/schema/projectconfig.schema.json"
2323
},
2424
{
2525
"fileMatch": [
2626
"client/theme.json"
2727
],
28-
"url": "/schema/theme.json"
28+
"url": "/schema/theme.schema.json"
2929
},
3030
{
3131
"fileMatch": [
3232
"client/pages/*.json"
3333
],
34-
"url": "/schema/page.json"
34+
"url": "/schema/page.schema.json"
3535
},
3636
]
3737
}

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121

2222
## 开发者
2323

24-
- `$ npm -g i typescript fs-extra miniprogram-ci`
24+
- `$ npm -g i typescript miniprogram-ci`
2525
- **可选** 复制 `SUMMARY.md``summary/summary.source.md`
2626
- 安装依赖 `$ cd client ; npm install`
2727
- 执行 `$ npm run gitbook:summary:generate`
2828
- 执行 `$ npm run gitbook:summary:towxml`
29-
- 执行 `$ npm run towxml:build`
30-
- [ 微信开发者工具 -> 工具 -> 构建 npm ](项目贡献者) 或者 `$ npm run npm:build`(项目所有者)
29+
- [ 微信开发者工具 -> 工具 -> 构建 npm ](项目贡献者) 或者 `$ npm run npm:build`(项目所有者[因为需要私钥])
3130
- 编译
3231
- 上传预览 `$ npm run upload` (项目所有者)
3332

client/app.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@
55
"pages/index/index",
66
"pages/donate/index",
77
"pages/news/index",
8-
"pages/mdContent/index"
8+
"pages/mdContent/index",
9+
"pages/registry/index"
910
],
1011
"window": {
1112
"backgroundTextStyle": "@bgTxtStyle",
1213
"navigationBarTitleText": "Docker 从入门到实践",
1314
"navigationBarTextStyle": "white",
1415
"navigationBarBackgroundColor": "@navBgColor",
16+
"backgroundColor": "@bgColor",
1517
"backgroundColorTop": "@bgColorTop",
1618
"backgroundColorBottom": "@bgColorBottom",
1719
"navigationStyle": "custom",
@@ -58,5 +60,6 @@
5860
"sitemapLocation": "sitemap.json",
5961
"workers": "workers",
6062
"darkmode": true,
61-
"themeLocation": "theme.json"
63+
"themeLocation": "theme.json",
64+
"lazyCodeLoading": "requiredComponents"
6265
}

client/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@
44
"scripts": {
55
"compile": "npx tsc",
66
"compile:pro": "npx tsc --inlineSources false --inlineSourceMap false",
7-
"yarn:update": "yarn upgrade-interactive --latest",
8-
"towxml:build": "cd node_modules/towxml && npm run build"
7+
"yarn:update": "yarn upgrade-interactive --latest"
98
},
109
"dependencies": {
11-
"wx-markdown": "github:khs1994/wx-markdown"
10+
"@khs1994/wx-markdown": "0.0.3"
1211
},
1312
"devDependencies": {
14-
"miniprogram-api-typings": "^2.10.3"
13+
"miniprogram-api-typings": "^3.0.2"
1514
},
1615
"license": "MIT"
1716
}

client/pages/book/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Page({
1414

1515
share() {
1616
let imgUrl =
17-
'https://user-images.githubusercontent.com/16733187/57310918-3c3afd80-711d-11e9-8816-266e5ede70bb.jpg';
17+
'https://dpsigs.coding.net/p/docker_practice/d/docker-practice.com/git/raw/master/book_20200905223833.jpg';
1818
wx.previewImage({
1919
current: imgUrl,
2020
urls: [imgUrl],

client/pages/book/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!-- jd.com 导购页面 -->
2-
<image mode="aspectFit" src="cloud://pro-02adcb.7072-pro-02adcb/images/jd_book_mini.jpg"
2+
<image mode="aspectFit" src="https://dpsigs.coding.net/p/docker_practice/d/docker-practice.com/git/raw/master/book_20200905223833.jpg"
33
style="height:70vh;width:100vw" show-menu-by-longpress="{{true}}"
44
/>
55

client/pages/docker/content/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"i-notice-bar": "/src/ui/iviewui/dist/notice-bar/index",
77
"i-button": "/src/ui/iviewui/dist/button/index",
88
"i-spin": "/src/ui/iviewui/dist/spin/index",
9-
"markdown": "wx-markdown/component/index"
9+
"markdown": "@khs1994/wx-markdown/component/index"
1010
},
1111
"enablePullDownRefresh": true,
1212
"backgroundColor": "#36a1f0",

client/pages/docker/content/index.ts

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ const app = getApp<IMyApp>();
1717
const cache = new Cache();
1818
const ad = new Ad();
1919

20+
let title = '';
21+
2022
wx.onNetworkStatusChange((res) => {
2123
wx.showToast({
2224
title: `${res.networkType.toUpperCase()} 已连接`,
@@ -53,9 +55,10 @@ Page({
5355
showFixedStatusBar: false,
5456
fontType: '默认',
5557
showAd: true,
56-
ad: isqq
57-
? ['f2ba7917096dc03c7d798df304a90c49', 'a4f45b9d8d5704ab70bebfd0780854a8']
58-
: ['adunit-3ea71b7cfce6c721', 'adunit-1246f0a5e441ea4c'],
58+
ad: [],
59+
// ad: isqq
60+
// ? ['f2ba7917096dc03c7d798df304a90c49', 'a4f45b9d8d5704ab70bebfd0780854a8']
61+
// : ['adunit-3ea71b7cfce6c721', 'adunit-1246f0a5e441ea4c'],
5962
cache: true,
6063
},
6164

@@ -197,11 +200,20 @@ Page({
197200
};
198201
},
199202

203+
onShareTimeline() {
204+
return {
205+
title: 'Docker 从入门到实践 ' + title,
206+
// query: '',
207+
// imageUrl: '',
208+
};
209+
},
210+
200211
// 系统事件 end
201212

202213
// 处理加载事件
203214
async load(options: any, requestFirst: boolean = false) {
204215
const key = options.key;
216+
title = options.title;
205217

206218
let [folder, next_key, before_key] = [
207219
getFolder(key),
@@ -368,9 +380,11 @@ Page({
368380
title: '加载中...',
369381
});
370382

371-
const [, key] =
383+
const [_title, key] =
372384
type === 'next' ? <any>this.data.next_key : <any>this.data.before_key;
373385

386+
title = _title;
387+
374388
// 隐藏广告 功能按钮
375389
this.setData!({
376390
// spinShow: true,

client/pages/docker/content/index.wxml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ key="{{key}}"
4646

4747
<view wx:if="{{show}}">
4848

49-
<i-button shape="circle" bind:click="pushNote" size="large" type="primary">在 GitHub 反馈本节内容</i-button>
50-
5149
<i-button shape="circle" bind:click="favorites" size="large" type="warning">收藏</i-button>
5250

5351
<i-button shape="circle" bind:click="buyBook" size="large" type="error">进阶学习 (实体书) 📕</i-button>

client/pages/docker/content/readme.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Docker 自身仍在快速发展中,生态环境也在蓬勃成长。建议初
1717
1818
### 长按图片(或截屏)保存 扫码加入微信群
1919
20-
![](https://user-images.githubusercontent.com/16733187/65308302-55b87f80-dbbc-11e9-9d42-57eac554fb3b.jpg)
20+
![](https://dpsigs.coding.net/p/docker_practice/d/docker-practice.com/git/raw/master/wechat.jpg)
2121
2222
`;

client/pages/docker/index/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"usingComponents": {
33
"i-notice-bar": "/src/ui/iviewui/dist/notice-bar/index",
44
"i-spin": "/src/ui/iviewui/dist/spin/index",
5-
"markdown": "wx-markdown/component/index"
5+
"markdown": "@khs1994/wx-markdown/component/index"
66
},
77
"navigationStyle": "default",
88
"enablePullDownRefresh": false

client/pages/docker/summary/index.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
"i-notice-bar": "/src/ui/iviewui/dist/notice-bar/index"
44
},
55
"navigationStyle": "default",
6-
"enablePullDownRefresh": true
6+
"enablePullDownRefresh": true,
7+
"initialRenderingCache": "static"
78
}

client/pages/docker/summary/index.ts

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import daShang from '../../../src/utils/DaShang';
55
import openGithub from '../../../src/utils/OpenGithub';
66
import qiandao from '../../../src/utils/Qiandao';
77
import { isSign, uploadAdError } from '../../../src/utils/Qiandao';
8-
import Ad from '../../../src/utils/Ad';
8+
//import Ad from '../../../src/utils/Ad';
99
import DB from '../../../src/Framework/src/Support/DB';
1010
// import Cloud from '../../../src/Framework/src/Support/Cloud';
1111

12-
const ad = new Ad();
12+
//const ad = new Ad();
1313
const db = DB.getInstance();
1414
// const cloud = Cloud.getInstance();
1515

@@ -36,6 +36,8 @@ let interstitialAd: any;
3636
import getSummary from '../../../src/utils/getSummary';
3737
import isqq from '../../../src/utils/isqq';
3838

39+
let isHide = false;
40+
3941
Page({
4042
/**
4143
* 页面的初始数据
@@ -50,8 +52,6 @@ Page({
5052
],
5153
isqq,
5254
showAd: true,
53-
isHide: false,
54-
interstitialAd: null,
5555
theme: 'white',
5656
noticeMessage:
5757
'《Docker 技术入门与实战》第三版已经面世,介绍最新的容器技术栈,欢迎大家阅读使用并反馈建议。',
@@ -193,12 +193,7 @@ Page({
193193

194194
ad(id: string) {
195195
if (id === 'bus') {
196-
ad.bus();
197-
return;
198-
}
199-
200-
if (id === 'yuebao') {
201-
ad.yuebao();
196+
// ad.bus();
202197
return;
203198
}
204199

@@ -300,13 +295,9 @@ Page({
300295
: 'adunit-6ef44789d84b9392',
301296
});
302297

303-
this.setData!({
304-
interstitialAd,
305-
});
306-
307298
setTimeout(() => {
308299
try {
309-
if (!this.data.isHide) {
300+
if (!isHide) {
310301
interstitialAd
311302
.show()
312303
.then(() => {})
@@ -371,11 +362,9 @@ Page({
371362
* 生命周期函数--监听页面显示
372363
*/
373364
onShow: function () {
374-
this.setData!({
375-
isHide: false,
376-
});
365+
isHide = false;
377366

378-
if (!this.data.interstitialAd) {
367+
if (!interstitialAd) {
379368
return;
380369
}
381370

@@ -399,9 +388,7 @@ Page({
399388
* 生命周期函数--监听页面隐藏
400389
*/
401390
onHide: function () {
402-
this.setData!({
403-
isHide: true,
404-
});
391+
isHide = true;
405392
},
406393

407394
/**

client/pages/docker/summary/index.wxml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,18 @@
33
</view>
44

55
<i-notice-bar icon="systemprompt" loop
6-
speed="1200" backgroundcolor="#fff" color="#36a1f0" bind:tap="buyBook">
6+
speed="1200" backgroundcolor="{{theme === 'white' ? '#fff': '#000'}}" color="#36a1f0" bind:tap="buyBook">
77
{{noticeMessage}}
88
</i-notice-bar>
99

1010
<!-- <ad unit-id="{{isqq ? 'a4f45b9d8d5704ab70bebfd0780854a8' : 'adunit-3ea71b7cfce6c721'}}" binderror="adError" ad-intervals="30"></ad> -->
1111

12-
<ad unit-id="adunit-86d99366312002b6" ad-type="video" ad-theme="{{theme}}"></ad>
12+
<view class="adContainer" wx:if="{{theme === 'white'}}">
13+
<ad unit-id="adunit-86d99366312002b6" ad-type="video" ad-theme="white"></ad>
14+
</view>
15+
<view class="adContainer" wx:else>
16+
<ad unit-id="adunit-86d99366312002b6" ad-type="video" ad-theme="black"></ad>
17+
</view>
1318

1419
<view class="page">
1520
<view class="page__hd">
@@ -28,12 +33,12 @@ speed="1200" backgroundcolor="#fff" color="#36a1f0" bind:tap="buyBook">
2833
<view id="{{item.id}}" class="weui-flex kind-list__item-hd {{item.open ? 'kind-list__item-hd_show' : ''}}" bindtap="kindToggle">
2934
<view wx:if="{{item.color}}" class="weui-flex__item" style="color: {{item.color}}">{{item.name}}</view>
3035
<view wx:else class="weui-flex__item">{{item.name}}</view>
31-
<image lazy-load="{{true}}" class="kind-list__img" src="/images/icon_nav_{{item.id}}.svg"></image>
36+
<!-- <image wx:if="{{theme === 'white'}}" lazy-load="{{true}}" class="kind-list__img" src="/images/icon_nav_{{item.id}}.svg"></image> -->
3237
</view>
3338
<view class="kind-list__item-bd {{item.open ? 'kind-list__item-bd_show' : ''}}">
3439
<view class="weui-cells {{item.open ? 'weui-cells_show' : ''}}">
3540
<block wx:for="{{item.pages}}" wx:for-item="page" wx:key="id">
36-
<navigator url="../content/index?key={{page.id}}&pro={{page.pro === undefined ? 0:1}}" class="weui-cell weui-cell_access">
41+
<navigator url="../content/index?key={{page.id}}&title={{page.name}}&pro={{page.pro === undefined ? 0:1}}" class="weui-cell weui-cell_access">
3742
<view class="weui-cell__bd">{{page.name}}</view>
3843
<view class="weui-cell__ft weui-cell__ft_in-access"></view>
3944
</navigator>
@@ -45,7 +50,12 @@ speed="1200" backgroundcolor="#fff" color="#36a1f0" bind:tap="buyBook">
4550
</view>
4651
</view>
4752

48-
<ad unit-id="{{isqq ? 'f2ba7917096dc03c7d798df304a90c49' : 'adunit-4478ecdd36509a60'}}" ad-type="grid" grid-opacity="0.8" grid-count="5" ad-theme="{{theme}}"></ad>
53+
<view class="adContainer" wx:if="{{theme === 'white'}}">
54+
<ad unit-id="{{isqq ? 'f2ba7917096dc03c7d798df304a90c49' : 'adunit-4478ecdd36509a60'}}" ad-type="grid" grid-opacity="0.8" grid-count="5" ad-theme="light"></ad>
55+
</view>
56+
<view class="adContainer" wx:else>
57+
<ad unit-id="{{isqq ? 'f2ba7917096dc03c7d798df304a90c49' : 'adunit-4478ecdd36509a60'}}" ad-type="grid" grid-opacity="0.8" grid-count="5" ad-theme="black"></ad>
58+
</view>
4959

5060
</view>
5161
<view class="weui-footer">

client/pages/mdContent/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"usingComponents": {
3-
"markdown": "wx-markdown/component/index",
3+
"markdown": "@khs1994/wx-markdown/component/index",
44
"i-button": "/src/ui/iviewui/dist/button/index"
55
},
66
"navigationStyle": "default",

client/pages/mdContent/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,4 +257,13 @@ Page({
257257
'https://gitee.com/docker_practice/docker_practice/raw/master/_images/cover.jpg',
258258
};
259259
},
260+
261+
onShareTimeline(): any {
262+
return {
263+
title: '今日分享 -- ' + title,
264+
query: `key=${key}&title=${title}`,
265+
imageUrl:
266+
'https://gitee.com/docker_practice/docker_practice/raw/master/_images/cover.jpg',
267+
};
268+
},
260269
});

client/pages/news/index.wxml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<ad unit-id="{{isqq ? 'f2ba7917096dc03c7d798df304a90c49' : 'adunit-4478ecdd36509a60'}}" ad-type="grid" grid-opacity="0.8" grid-count="5" ad-theme="white"></ad>
1+
<ad-custom unit-id="adunit-8e6404aa46256998" ad-theme="black"></ad-custom>
2+
<!-- <ad unit-id="{{isqq ? 'f2ba7917096dc03c7d798df304a90c49' : 'adunit-4478ecdd36509a60'}}" ad-type="grid" grid-opacity="0.8" grid-count="5" ad-theme="white"></ad> -->
23

34
<view class="page__bd page__bd_spacing">
45
<view class="kind-list">

client/pages/registry/index.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"usingComponents": {}
3+
}

client/pages/registry/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Page({});

0 commit comments

Comments
 (0)