Skip to content

Commit 495af67

Browse files
committed
添加新的 icon
更换企业信息的 icon 更换图文详情的 url 企业信息菜单最小宽度计算问题
1 parent ff2a6b1 commit 495af67

File tree

10 files changed

+38
-13
lines changed

10 files changed

+38
-13
lines changed

demos/iconfont.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ <h2 class="icon_info"></h2>
132132
{ wrapperClassName: "", description: "maximize-window" },
133133
{ wrapperClassName: "", description: "spin" },
134134
{ wrapperClassName: "", description: "waiting" },
135+
{ wrapperClassName: "", description: "try" },
136+
{ wrapperClassName: "", description: "intro" },
137+
{ wrapperClassName: "", description: "guide" },
135138
];
136139
var html = _.map(templateData, function(item){
137140
if(!item) return "";

src/font/iconfont.eot

456 Bytes
Binary file not shown.

src/font/iconfont.svg

Lines changed: 9 additions & 0 deletions
Loading

src/font/iconfont.ttf

456 Bytes
Binary file not shown.

src/font/iconfont.woff

312 Bytes
Binary file not shown.

src/js/app/modules/chat.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function _setNotice(){
172172
// test
173173
// notice.content = [
174174
// {
175-
// name: "菜单",
175+
// name: "自考介绍",
176176
// sub_button: [
177177
// {
178178
// type: "view",
@@ -182,7 +182,12 @@ function _setNotice(){
182182
// ]
183183
// },
184184
// {
185-
// name: "222",
185+
// type: "media_id",
186+
// name: "报考指南",
187+
// media_id: "75cffa4b-e462-40e8-a517-0ff807db29a6"
188+
// },
189+
// {
190+
// name: "课程试听",
186191
// sub_button: [
187192
// {
188193
// type: "media_id",
@@ -195,11 +200,6 @@ function _setNotice(){
195200
// media_id: "4150c891-9917-4482-909c-ab7c9954110a"
196201
// }
197202
// ]
198-
// },
199-
// {
200-
// type: "media_id",
201-
// name: "333",
202-
// media_id: "75cffa4b-e462-40e8-a517-0ff807db29a6"
203203
// }
204204
// ];
205205

src/js/app/modules/tenantInfo/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ module.exports = function(){
1818
menuArr = notice.content;
1919
container.innerHTML = _.template(tpl)({
2020
menu: menuArr,
21+
icons: ["icon-intro", "icon-guide", "icon-try"]
2122
});
2223
createMenu();
2324
utils.live(".tip-btn", "click", onMenuClick, container);
@@ -91,8 +92,8 @@ module.exports = function(){
9192
title: article.title,
9293
digest: article.digest,
9394
description: article.digest,
94-
// url: "/v1/webimplugin/tenants/" + article.tenantId + "/robot/article/html/" + article.articleId,
95-
url: "/v1/Tenants/" + article.tenantId + "/robot/article/html/" + article.articleId,
95+
url: "/v1/webimplugin/tenants/" + article.tenantId + "/robot/article/html/" + article.articleId,
96+
// url: "/v1/Tenants/" + article.tenantId + "/robot/article/html/" + article.articleId,
9697
thumbUrl: "/v1/Tenant/" + article.tenantId + "/MediaFiles/" + article.thumb_media_id,
9798
picurl: "/v1/Tenant/" + article.tenantId + "/MediaFiles/" + article.thumb_media_id,
9899
prop: article.prop,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<% _.each(menu, function(itm, menuId){ %>
22
<div class="tip-btn" menuId="<%= menuId %>">
3-
<i class="icon-list"></i>
3+
<i class="<%= icons[menuId] %>"></i>
44
<span><%= itm.name %></span>
55
</div>
66
<% }) %>

src/scss/body.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,8 @@
193193
background-color: #fff;
194194
color: #535252;
195195
max-width: 30%;
196-
min-width: 132px;
196+
min-width: 92px; // (132 iphone/3 - 16 padding = 116) * 0.8 = 92
197+
box-sizing: border-box;
197198
padding: 0 8px;
198199
box-shadow: 0 0 5px rgba(102, 102, 102, 0.3);
199200
li {
@@ -267,7 +268,7 @@
267268
}
268269
.tip-btn:first-child:nth-last-child(3),
269270
.tip-btn:first-child:nth-last-child(3) ~ .tip-btn {
270-
width: 33%;
271+
width: 33.3%;
271272
}
272273
.tip-btn {
273274
@extend %em-mix-ellipsis;

src/scss/icon.scss

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,4 +347,15 @@
347347
@extend .icon-base;
348348
content: "\e9"
349349
}
350-
350+
.icon-intro:before {
351+
@extend .icon-base;
352+
content: "\a002"
353+
}
354+
.icon-guide:before {
355+
@extend .icon-base;
356+
content: "\a003"
357+
}
358+
.icon-try:before {
359+
@extend .icon-base;
360+
content: "\a001"
361+
}

0 commit comments

Comments
 (0)