فهرست منبع

修改字体文件引入

wangfumin 3 ماه پیش
والد
کامیت
d2114625b3
8فایلهای تغییر یافته به همراه29 افزوده شده و 22 حذف شده
  1. 15 14
      app.js
  2. 5 1
      app.wxss
  3. 1 1
      pages/collection/index.wxss
  4. 1 1
      pages/exhibition/index.wxss
  5. 1 1
      pages/index/activity/activity.wxss
  6. 3 1
      pages/index/index.wxss
  7. 1 1
      pages/index/news/news.wxss
  8. 2 2
      pages/user/index.wxml

+ 15 - 14
app.js

@@ -9,16 +9,17 @@ App({
     const logs = wx.getStorageSync('logs') || []
     // logs.unshift(Date.now())
     // wx.setStorageSync('logs', logs)
-    wx.loadFontFace({
-      family: 'heavy',
-      source: "https://klmybwg.4dage.com/mini/wxImg/SOURCEHANSERIFSC-HEAVY.OTF",
-      success(res) {
-        console.log('加载成功:', res + 'heavy')
-      },
-      fail(err) {
-        console.log('加载失败:', err)
-      }
-    })
+    // wx.loadFontFace({
+    //   global: true,
+    //   family: 'heavy',
+    //   source: "https://klmybwg.4dage.com/mini/wxImg/SOURCEHANSERIFSC-HEAVY.OTF",
+    //   success(res) {
+    //     console.log('加载成功:', res + 'heavy')
+    //   },
+    //   fail(err) {
+    //     console.log('加载失败:', err)
+    //   }
+    // })
     // 检查是否已有登录状态
     const token = wx.getStorageSync('token')
     if (token) {
@@ -79,8 +80,8 @@ App({
   // 调用登录接口
   callLoginApi(code) {
     wx.request({
-      // url: 'https://klmybwg.4dage.com/api/museum/wxMini/login',
-      url: 'https://sit-kelamayi.4dage.com/api/museum/wxMini/login',
+      url: 'https://klmybwg.4dage.com/api/museum/wxMini/login',
+      // url: 'https://sit-kelamayi.4dage.com/api/museum/wxMini/login',
       method: 'GET',
       data: {
         code: code
@@ -126,8 +127,8 @@ App({
   // 获取访问token
   getAccessToken() {
     wx.request({
-      // url: 'https://klmybwg.4dage.com/api/museum/wxMini/getAccessToken',
-      url: 'https://sit-kelamayi.4dage.com/api/museum/wxMini/getAccessToken',
+      url: 'https://klmybwg.4dage.com/api/museum/wxMini/getAccessToken',
+      // url: 'https://sit-kelamayi.4dage.com/api/museum/wxMini/getAccessToken',
       method: 'GET',
       header: {
         'content-type': 'application/x-www-form-urlencoded'

+ 5 - 1
app.wxss

@@ -1,5 +1,10 @@
 /**app.wxss**/
+@font-face {
+  font-family: "heavy";
+  src: url("https://klmybwg.4dage.com/mini/wxImg/SOURCEHANSERIFSC-HEAVY.OTF") format('opentype');
+}
 .container {
+  font-family: "heavy";
   height: 100%;
   display: flex;
   flex-direction: column;
@@ -7,5 +12,4 @@
   justify-content: space-between;
   padding: 200rpx 0;
   box-sizing: border-box;
-  font-family: "heavy";
 }

+ 1 - 1
pages/collection/index.wxss

@@ -155,12 +155,12 @@
 }
 
 .item-title {
+  font-family: "heavy";
   font-size: 60rpx;
   font-weight: bold;
   color: #fff;
   margin-bottom: 8rpx;
   line-height: 120%;
-  font-family: "heavy"
 }
 
 .item-description {

+ 1 - 1
pages/exhibition/index.wxss

@@ -155,6 +155,7 @@
 }
 
 .exhibition-title {
+  font-family: "heavy";
   font-size: 32rpx;
   font-weight: bold;
   color: #fff;
@@ -163,7 +164,6 @@
   overflow: hidden;
   text-overflow: ellipsis;
   padding: 0 20rpx;
-  font-family: "heavy";
 }
 
 .exhibition-desc {

+ 1 - 1
pages/index/activity/activity.wxss

@@ -102,11 +102,11 @@
 }
 
 .item-title {
+  font-family: 'heavy';
   font-size: 40rpx;
   font-weight: bold;
   color: #fff;
   margin-bottom: 8rpx;
-  font-family: 'heavy';
 }
 
 .item-description {

+ 3 - 1
pages/index/index.wxss

@@ -143,6 +143,7 @@
 }
 
 .news-title {
+  font-family: "heavy";
   width: 300rpx;
   text-align: right;
   font-size: 32rpx;
@@ -154,7 +155,6 @@
   -webkit-line-clamp: 2;
   -webkit-box-orient: vertical;
   overflow: hidden;
-  font-family: "heavy";
 }
 
 .news-desc {
@@ -209,12 +209,14 @@
 }
 
 .exhibition-title {
+  font-family: "heavy";
   font-size: 32rpx;
   color: #fff;
   font-weight: bold;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
+  padding: 0 16rpx;
 }
 
 /* 活动项 */

+ 1 - 1
pages/index/news/news.wxss

@@ -126,6 +126,7 @@
 }
 
 .exhibition-title {
+  font-family: 'heavy';
   font-size: 48rpx;
   margin: 0;
   color: #fff;
@@ -133,7 +134,6 @@
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
-  font-family: 'heavy';
 }
 
 .view-details-button {

+ 2 - 2
pages/user/index.wxml

@@ -24,9 +24,9 @@
     <view class="user-title">
       我的预约
     </view>
-    <view class="user-zhanwei">
+    <!--<view class="user-zhanwei">
       <image class="zhanwei-img" src="https://klmybwg.4dage.com/mini/wxImg/img_03.png"></image>
-    </view>
+    </view>-->
     <!-- 功能按钮区域 -->
     <view class="function-section">
       <view class="main-buttons">