Skip to content

Commit d38b988

Browse files
author
yangxiaozhou
committed
严选
0 parents  commit d38b988

File tree

720 files changed

+89204
-0
lines changed

Some content is hidden

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

720 files changed

+89204
-0
lines changed

chameleon.config.js

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
// 设置静态资源的线上路径
3+
const publicPath = 'https://beatles-chameleon.github.io/cml-yanxuan/dist';
4+
// 设置api请求前缀
5+
const apiPrefix = 'https://beatles-chameleon.github.io';
6+
7+
cml.config.merge({
8+
templateLang: "cml",
9+
templateType: "html",
10+
platforms: ["web","weex","wx"],
11+
buildInfo: {
12+
wxAppId: '123456'
13+
},
14+
wx: {
15+
dev: {
16+
},
17+
build: {
18+
apiPrefix
19+
}
20+
},
21+
web: {
22+
dev: {
23+
analysis: false
24+
},
25+
build: {
26+
analysis: false,
27+
publicPath: `${publicPath}/web/`,
28+
apiPrefix
29+
}
30+
},
31+
weex: {
32+
dev: {
33+
},
34+
build: {
35+
publicPath: `${publicPath}/weex/`,
36+
apiPrefix,
37+
hash: false
38+
},
39+
custom: {
40+
publicPath: `${publicPath}/wx/`,
41+
apiPrefix
42+
}
43+
}
44+
})
45+

deploy.sh

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#!/bin/bash
2+
set -e
3+
4+
# !!!发布前需要修改chameleon.config.js 的 public path
5+
6+
# 当前目录
7+
BD_BIN="${BASH_SOURCE-$0}"
8+
BD_BIN="$(dirname "${BD_BIN}")"
9+
BD_BIN="$(cd "${BD_BIN}"; pwd)"
10+
# 项目仓库根目录
11+
PROJECT_ROOT="${BD_BIN}"
12+
13+
#PROJECT NAME
14+
PROJECT_NAME="wangyi"
15+
16+
PLATFORM=$1
17+
DIST_FOLDER="$PROJECT_ROOT/dist/$PLATFORM"
18+
DIST_FOLDER_STATIC="$DIST_FOLDER/static"
19+
20+
21+
# build
22+
echo "build $PLATFORM"
23+
cml $PLATFORM build
24+
25+
# 发布 entry
26+
echo "publish $PLATFORM entry"
27+
didiup -d $DIST_FOLDER -c $PROJECT_NAME/$PLATFORM
28+
29+
# 目录名存入数组
30+
j=0
31+
for file in $DIST_FOLDER_STATIC/*; do
32+
{
33+
static_folder_list[j]=${file##*/}
34+
j=`expr $j + 1`
35+
}
36+
done
37+
38+
for((i=0;i<${#static_folder_list[*]};i++))
39+
do
40+
{
41+
sub=${static_folder_list[$i]}
42+
# 发布 static
43+
echo "publish $PLATFORM static/$sub"
44+
didiup -d $DIST_FOLDER_STATIC/$sub -c $PROJECT_NAME/$PLATFORM/static/$sub
45+
} &
46+
done

dist/alipay/app.acss

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
.cml-base {
2+
text-align: left;
3+
font-size: 32rpx;
4+
letter-spacing: 1rpx;
5+
font-family: BlinkMacSystemFont, 'Source Sans Pro', 'Helvetica Neue', Helvetica, Arial, sans-serif;
6+
}
7+
8+
.cml-base,
9+
.cml-base::before,
10+
.cml-base::after {
11+
box-sizing: border-box;
12+
-webkit-text-size-adjust: none;
13+
-moz-text-size-adjust: none;
14+
-ms-text-size-adjust: none;
15+
text-size-adjust: none;
16+
}
17+
18+
.cml-view {
19+
display: -webkit-box;
20+
display: -webkit-flex;
21+
display: flex;
22+
box-sizing: border-box;
23+
position: relative;
24+
-webkit-box-orient: vertical;
25+
-webkit-box-direction: normal;
26+
-webkit-flex-direction: column;
27+
flex-direction: column;
28+
-webkit-flex-shrink: 0;
29+
flex-shrink: 0;
30+
-webkit-box-flex: 0;
31+
-webkit-flex-grow: 0;
32+
flex-grow: 0;
33+
-webkit-flex-basis: auto;
34+
flex-basis: auto;
35+
-webkit-box-align: stretch;
36+
-webkit-align-items: stretch;
37+
align-items: stretch;
38+
-webkit-align-content: flex-start;
39+
align-content: flex-start;
40+
border: 0 solid black;
41+
margin: 0;
42+
padding: 0;
43+
min-width: 0;
44+
}
45+
46+
.cml-text {
47+
display: block;
48+
box-sizing: border-box;
49+
position: relative;
50+
white-space: pre-wrap; /* not using 'pre': support auto line feed. 保留空白符序列,但是正常地进行换行 */
51+
word-wrap: break-word; /* 在长单词或 URL 地址内部进行换行。 */
52+
overflow: hidden; /* it'll be clipped if the height is not high enough. */
53+
54+
-webkit-flex-shrink: 0;
55+
56+
flex-shrink: 0;
57+
-webkit-box-flex: 0;
58+
-webkit-flex-grow: 0;
59+
flex-grow: 0;
60+
-webkit-flex-basis: auto;
61+
flex-basis: auto;
62+
border: 0 solid black;
63+
margin: 0;
64+
padding: 0;
65+
min-width: 0;
66+
}
67+
68+
.border-1px,
69+
.border-top-1px,
70+
.border-right-1px,
71+
.border-bottom-1px,
72+
.border-left-1px {
73+
position: relative;
74+
}
75+
76+
.border-top-1px:before,
77+
.border-left-1px:before,
78+
.border-1px:after,
79+
.border-right-1px:after,
80+
.border-bottom-1px:after {
81+
content: "";
82+
display: block;
83+
position: absolute;
84+
-webkit-transform-origin: 0 0;
85+
transform-origin: 0 0;
86+
box-sizing: border-box;
87+
z-index: 2;
88+
}
89+
90+
.border-1px:after {
91+
border: 1rpx solid #ccc;
92+
left: 0;
93+
top: 0;
94+
width: 100%;
95+
height: 100%;
96+
-webkit-transform-origin: 0 0;
97+
transform-origin: 0 0;
98+
}
99+
100+
.border-top-1px:before {
101+
border-top: 1rpx solid #ccc;
102+
left: 0;
103+
top: 0;
104+
width: 100%;
105+
}
106+
107+
.border-right-1px:after {
108+
border-right: 1rpx solid #ccc;
109+
top: 0;
110+
right: 0;
111+
height: 100%;
112+
-webkit-transform-origin: right 0;
113+
transform-origin: right 0;
114+
}
115+
116+
.border-bottom-1px:after {
117+
border-bottom: 1rpx solid #ccc;
118+
left: 0;
119+
bottom: 0;
120+
width: 100%;
121+
-webkit-transform-origin: 0 bottom;
122+
transform-origin: 0 bottom;
123+
}
124+
125+
.border-left-1px:before {
126+
border-left: 1rpx solid #ccc;
127+
top: 0;
128+
left: 0;
129+
height: 100%;
130+
}
131+
132+
.border-none:before, .border-none:after {
133+
display: none;
134+
}

dist/alipay/app.js

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
var __CML__GLOBAL = require('/static/js/manifest.js')
2+
__CML__GLOBAL.App = App;
3+
require('/static/js/common.js')
4+
require('/static/js/app.js')

dist/alipay/app.json

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"pages": [
3+
"pages/index/index",
4+
"pages/list/list",
5+
"pages/detail/detail",
6+
"pages/map/map"
7+
],
8+
"usingComponents": {}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
.iconfont {
2+
font-family: iconfont;
3+
}
4+
.wrapper {
5+
background-color: #f4f4f4;
6+
display: -webkit-box;
7+
display: -webkit-flex;
8+
display: flex;
9+
-webkit-flex-wrap: nowrap;
10+
flex-wrap: nowrap;
11+
-webkit-box-orient: horizontal;
12+
-webkit-box-direction: normal;
13+
-webkit-flex-direction: row;
14+
flex-direction: row;
15+
}
16+
.w-ipx {
17+
margin-top: 40rpx;
18+
margin-bottom: 50rpx;
19+
}
20+
.class-wrapper {
21+
display: -webkit-box;
22+
display: -webkit-flex;
23+
display: flex;
24+
-webkit-box-orient: vertical;
25+
-webkit-box-direction: normal;
26+
-webkit-flex-direction: column;
27+
flex-direction: column;
28+
}
29+
.class-list {
30+
position: absolute;
31+
top: 0;
32+
bottom: 90rpx;
33+
left: 0;
34+
box-sizing: border-box;
35+
width: 162rpx;
36+
margin-top: 113rpx;
37+
/*margin-bottom: 90cpx;*/
38+
border-right-color: #d9d9d9;
39+
background-color: #fff;
40+
border-right-style: solid;
41+
height: 1500rpx;
42+
}
43+
.class-txt {
44+
font-size: 28rpx;
45+
margin-top: 22rpx;
46+
margin-bottom: 26rpx;
47+
margin-left: 10rpx;
48+
margin-right: 10rpx;
49+
text-align: center;
50+
color: #333;
51+
}
52+
.main-list {
53+
position: fixed;
54+
top: 0;
55+
bottom: 90rpx;
56+
left: 162rpx;
57+
right: 0;
58+
box-sizing: border-box;
59+
display: -webkit-box;
60+
display: -webkit-flex;
61+
display: flex;
62+
-webkit-box-orient: vertical;
63+
-webkit-box-direction: normal;
64+
-webkit-flex-direction: column;
65+
flex-direction: column;
66+
-webkit-flex-wrap: nowrap;
67+
flex-wrap: nowrap;
68+
margin-top: 113rpx;
69+
/*margin-bottom: 90cpx;*/
70+
background-color: #fff;
71+
}
72+
.ad-img {
73+
width: 532rpx;
74+
height: 194rpx;
75+
border-radius: 6rpx;
76+
margin: 28rpx;
77+
}
78+
.sub-tlt {
79+
display: block;
80+
text-align: center;
81+
font-size: 24rpx;
82+
color: #333;
83+
margin-top: 10rpx;
84+
margin-bottom: 30rpx;
85+
}
86+
.sub-box {
87+
padding-left: 26rpx;
88+
display: -webkit-box;
89+
display: -webkit-flex;
90+
display: flex;
91+
-webkit-box-orient: horizontal;
92+
-webkit-box-direction: normal;
93+
-webkit-flex-direction: row;
94+
flex-direction: row;
95+
-webkit-flex-wrap: wrap;
96+
flex-wrap: wrap;
97+
}
98+
.sub-i {
99+
display: -webkit-box;
100+
display: -webkit-flex;
101+
display: flex;
102+
-webkit-box-orient: vertical;
103+
-webkit-box-direction: normal;
104+
-webkit-flex-direction: column;
105+
flex-direction: column;
106+
width: 178rpx;
107+
height: 200rpx;
108+
}
109+
.i-img {
110+
width: 150rpx;
111+
margin-left: 14rpx;
112+
margin-right: 14rpx;
113+
height: 150rpx;
114+
}
115+
.i-name {
116+
font-size: 22rpx;
117+
text-align: center;
118+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<view class="wrapper cml-base cml-view">
2+
<classify-header class=" cml-base cml-classify-header"></classify-header>
3+
<view class="class-list border-right-1px cml-base cml-view">
4+
<view class="main-list cml-base cml-view"><cml-buildin-scroller height="{{scrollerHeight}}" class=" cml-base cml-scroller">
5+
<view class="class-wrapper cml-base cml-view">
6+
<text class="class-txt cml-base cml-text" a:for="{{classes}}">{{item}}</text>
7+
</view>
8+
</cml-buildin-scroller></view>
9+
</view>
10+
<view class="main-list cml-base cml-view"><cml-buildin-scroller class="main-list cml-base cml-scroller" height="{{scrollerHeight}}">
11+
<image class="ad-img cml-base cml-image" resize="cover" src="http://yanxuan.nosdn.127.net/3ebd7addcc0d101d116052a57cec2f16.png"></image>
12+
<text class="sub-tlt cml-base cml-text"> --- 推荐区分类 --- </text>
13+
<view class="sub-box cml-base cml-view">
14+
<view class="sub-i cml-base cml-view" a:for="{{subclasses}}" onTap="_cmlEventProxy" data-eventtap="godetail" onCmlPropsEventProxy="_cmlPropsEventProxy">
15+
<image class="i-img cml-base cml-image" resize="contain" src="{{item.img}}"></image>
16+
<text class="i-name cml-base cml-text">{{item.name}}</text>
17+
</view>
18+
</view>
19+
</cml-buildin-scroller></view>
20+
</view>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
var __CML__GLOBAL = require('../../static/js/manifest.js')
2+
__CML__GLOBAL.Component = Component;
3+
require('../../static/js/common.js')
4+
require('../../static/js/components/classify/classify.js')

0 commit comments

Comments
 (0)