瀏覽代碼

字体问题

luxf 1 天之前
父節點
當前提交
61bdc109a9
共有 1 個文件被更改,包括 1 次插入12 次删除
  1. 1 12
      main.js

+ 1 - 12
main.js

@@ -114,18 +114,7 @@ Vue.prototype.loadFontFace = function(fontFamily) {
 	const fontUrls = {
 		'Poppins': 'https://oss.starify.cn/test/Poppins-Regular.ttf'
 	}
-	if (fontFamily === 'Poppins') {
-		// 开发者工具没有该字体
-		wx.getSystemInfo({
-		  success(res) {
-		    // if (res.platform === 'devtools') {
-					loadCloudFontFace(fontUrls[fontFamily], fontFamily + '.ttf', fontFamily)
-		    // }
-		  }
-		})
-	} else {
-		loadCloudFontFace(fontUrls[fontFamily], fontFamily + '.ttf', fontFamily)
-	}
+	loadCloudFontFace(fontUrls[fontFamily], fontFamily + '.ttf', fontFamily)
 }
 
 App.mpType = 'app'