Commit 0d741ce1 authored by liwei's avatar liwei

修改了字体,改为了本地

parent c42bdc62
<script> <script>
export default { export default {
data() {
return {
//字体url
fontUrl:this.$FONT_URL
}
},
onLaunch: function(option) { onLaunch: function(option) {
console.log("进入App.vue页面 "+option.path) console.log("进入App.vue页面 "+option.path)
uni.switchTab({ uni.switchTab({
...@@ -18,6 +24,7 @@ ...@@ -18,6 +24,7 @@
} }
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import '@/uni_modules/uview-ui/index.scss'; @import '@/uni_modules/uview-ui/index.scss';
...@@ -25,32 +32,38 @@ ...@@ -25,32 +32,38 @@
@font-face { @font-face {
font-family: 'PingFang SC-Bold, PingFang SC'; font-family: 'PingFang SC-Bold, PingFang SC';
src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Bold.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Bold.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/SourceHanSansCN-Bold.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'PingFang SC-Regular, PingFang SC'; font-family: 'PingFang SC-Regular, PingFang SC';
src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Regular.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Regular.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/SourceHanSansCN-Regular.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'PingFang SC-Heavy, PingFang SC'; font-family: 'PingFang SC-Heavy, PingFang SC';
src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Heavy.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Heavy.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/SourceHanSansCN-Heavy.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'SourceHanSerifCN-Heavy'; font-family: 'SourceHanSerifCN-Heavy';
src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSerifCN-Heavy-4.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSerifCN-Heavy-4.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/SourceHanSerifCN-Heavy-4.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'Arial-Regular, Arial'; font-family: 'Arial-Regular, Arial';
src: url('https://www.wxmblog.com/wxmapi/ttf/arial.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/arial.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/arial.ttf') format('truetype');
} }
@font-face { @font-face {
font-family: 'Source Han Sans CN-Regular, Source Han Sans CN'; font-family: 'Source Han Sans CN-Regular, Source Han Sans CN';
src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Regular.ttf') format('truetype'); //src: url('https://www.wxmblog.com/wxmapi/ttf/SourceHanSansCN-Regular.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/SourceHanSansCN-Regular.ttf') format('truetype');
} }
/*每个页面公共css */ /*每个页面公共css */
......
// 应用全局配置 // 应用全局配置
module.exports = { module.exports = {
// baseUrl: 'http://106.3.97.198:20162' // baseUrl: 'http://106.3.97.198:20162'
baseUrl: 'http://localhost:8092',//接口URL baseUrl: 'http://192.168.1.8:8092',//接口URL
imgUrl:'http://192.168.1.23/static/images',//图片URL imgUrl:'http://192.168.1.8/static/images',//图片URL
webViewUrl:'http://192.168.1.23:8080'//小程序跳转H5页面的URL fontUrl:'http://192.168.1.8/static/font',//字体URL
webViewUrl:'http://192.168.1.8:8080'//小程序跳转H5页面的URL
} }
// module.exports = { // module.exports = {
......
...@@ -17,6 +17,7 @@ Vue.use(uView) ...@@ -17,6 +17,7 @@ Vue.use(uView)
Vue.prototype.$myRequest = request; // 接口请求 Vue.prototype.$myRequest = request; // 接口请求
Vue.prototype.$BASE_URL = config.baseUrl//接口地址 Vue.prototype.$BASE_URL = config.baseUrl//接口地址
Vue.prototype.$IMG_URL = config.imgUrl;//图片地址 Vue.prototype.$IMG_URL = config.imgUrl;//图片地址
Vue.prototype.$FONT_URL = config.fontUrl;//图片地址
Vue.prototype.$WEBVIEW_URL = config.webViewUrl;//H5跳转地址 Vue.prototype.$WEBVIEW_URL = config.webViewUrl;//H5跳转地址
Vue.prototype.$store = store;//正式接口 Vue.prototype.$store = store;//正式接口
......
...@@ -169,17 +169,6 @@ ...@@ -169,17 +169,6 @@
} }
] ]
}, },
{
"root": "pageslogin",
"pages": [
{
"path": "index",
"style": {
"navigationStyle": "custom"
}
}
]
},
{ {
"root": "pagesme", "root": "pagesme",
"pages": [ "pages": [
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
>{{icon}}</text> >{{icon}}</text>
<!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 --> <!-- 这里进行空字符串判断,如果仅仅是v-if="label",可能会出现传递0的时候,结果也无法显示 -->
<text <text
v-if="label !== ''" v-if="label !== ''"
class="u-icon__label" class="u-icon__label"
:style="{ :style="{
color: labelColor, color: labelColor,
...@@ -35,20 +35,9 @@ ...@@ -35,20 +35,9 @@
</template> </template>
<script> <script>
// #ifdef APP-NVUE
// nvue通过weex的dom模块引入字体,相关文档地址如下:
// https://weex.apache.org/zh/docs/modules/dom.html#addrule
const fontUrl = 'https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf'
const domModule = weex.requireModule('dom')
domModule.addRule('fontFace', {
'fontFamily': "uicon-iconfont",
'src': `url('${fontUrl}')`
})
// #endif
// 引入图标名称,已经对应的unicode // 引入图标名称,已经对应的unicode
import icons from './icons' import icons from './icons'
import props from './props.js';; import props from './props.js';;
/** /**
...@@ -81,7 +70,7 @@ ...@@ -81,7 +70,7 @@
name: 'u-icon', name: 'u-icon',
data() { data() {
return { return {
fontUrl:this.$FONT_URL
} }
}, },
mixins: [uni.$u.mpMixin, uni.$u.mixin,props], mixins: [uni.$u.mpMixin, uni.$u.mixin,props],
...@@ -160,7 +149,8 @@ ...@@ -160,7 +149,8 @@
// 非nvue下加载字体 // 非nvue下加载字体
@font-face { @font-face {
font-family: 'uicon-iconfont'; font-family: 'uicon-iconfont';
src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype'); //src: url('https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf') format('truetype');
src: url('http://192.168.1.8/static/font/font_2225171_8kdcwk4po24.ttf') format('truetype');
} }
/* #endif */ /* #endif */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment