Xiao_123 1 mēnesi atpakaļ
vecāks
revīzija
b8a74f5302
8 mainītis faili ar 114 papildinājumiem un 68 dzēšanām
  1. 1 19
      App.vue
  2. 4 0
      main.js
  3. 24 42
      pages/index/my.vue
  4. 25 1
      static/style/index.css
  5. 0 0
      static/style/index.min.css
  6. 14 1
      static/style/index.scss
  7. 10 5
      utils/config.js
  8. 36 0
      utils/font.js

+ 1 - 19
App.vue

@@ -1,25 +1,6 @@
 <script>
-	// import { onShareAppMessage, onShareTimeline } from '@dcloudio/uni-app'
 	export default {
 		onLaunch: function() {
-			// wx.showShareMenu({
-			// 	withShareTicket: true,
-			// 	menus: ['shareAppMessage', 'shareTimeline']
-			// })
-			// onShareAppMessage(() => {
-			// 	return {
-			// 		title: '门墩儿 专注顶尖招聘',
-			// 		path: '/pages/index/position',
-			// 		imageUrl: '../../static/img/share-poster.jpg'
-			// 	}
-			// })
-			// onShareTimeline(() => {
-			// 	return {
-			// 		title: '门墩儿 专注顶尖招聘',
-			// 		path: '/pages/index/position',
-			// 		imageUrl: '../../static/img/share-poster.jpg'
-			// 	}
-			// })
 			console.log('App Launch')
 			uni.setStorageSync('firstOpen', true)
 
@@ -64,6 +45,7 @@
 	// 设置整个项目的背景色
 	page {
 		background-color: #ffffff;
+		font-family: MiSans-Normal;
 	}
 
 	/* #endif */

+ 4 - 0
main.js

@@ -21,6 +21,10 @@ import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
 const pinia = createPinia()
 pinia.use(piniaPluginPersistedstate)
 
+// 第三方字体库调用
+import { loadFont } from './utils/font.js'
+loadFont() // 下载字体
+
 export function createApp() {
   const app = createSSRApp(App)
   app.use(pinia)

+ 24 - 42
pages/index/my.vue

@@ -17,25 +17,25 @@
 				</view>
 			</view>
 
-			<view style="height: 20rpx; background-color: #f8f8fa;"></view>
-	
-			<view class="card">
-				<uni-list>
-					<uni-list-item
-						v-for="item in list"
-						:clickable="true"
-						:key="item.title"
-						:title="item.title"
-						showArrow
-						:rightText="item.rightTex || ''"
-						@click="handleToLink(item)"
-					>
-					</uni-list-item>
-				</uni-list>
+			<view class="defaultBgc ss-p-t-30">
+				<view class="list-card">
+					<uni-list>
+						<uni-list-item
+							v-for="item in list"
+							:clickable="true"
+							:key="item.title"
+							:title="item.title"
+							showArrow
+							:rightText="item.rightTex || ''"
+							@click="handleToLink(item)"
+						>
+						</uni-list-item>
+					</uni-list>
+				</view>
+		
+				<button v-if="useUserStore.isLogin" class="send-button" style="margin-bottom: 50px;" @tap="handleLogout">退出登录</button>
 			</view>
 	
-			<button v-if="useUserStore.isLogin" class="send-button" style="margin-bottom: 50px;" @tap="handleLogout">退出登录</button>
-	
 			<uni-popup ref="popup" type="dialog">
 				<uni-popup-dialog type="warn" cancelText="取消" confirmText="确定" title="系统提示" content="确认退出账号?" @confirm="handleLogoutConfirm"
 					@close="handleLogoutClose"></uni-popup-dialog>
@@ -163,12 +163,14 @@ const handleLogoutConfirm = () => {
 const handleLogin = () => {
   if (!getAccessToken()) {
 		showAuthModal()
-		return
 	}
 }
 </script>
 
 <style scoped lang="scss">
+.list-card {
+	margin: 0 30rpx 30rpx 30rpx;
+}
 .pb-150 {
 	padding-bottom: 100px;
 }
@@ -197,31 +199,11 @@ const handleLogin = () => {
 	line-height: 120rpx !important;
 }
 :deep(.uni-list-item__content-title) {
-	font-size: 32rpx !important;
-	font-weight: 500;
+	font-size: 28rpx !important;
 }
-.colors{
-	font-size: 24rpx;
-	color: #606266;
-}
-.size-16{
-	color: #3f424f;
-	font-size: 32rpx;
-	margin: 13rpx 0 5rpx 0;
-}
-.itemText {
-	color: #3f424f;
-	font-size: 36rpx;
-}
-.parent{
-	width: 50%;
-	border: 1px solid #f4f4f4;
-	border-radius: 10rpx;
-	margin: 0 30rpx 20rpx 30rpx;
-	padding: 20rpx;
-}
-.parent:first-child{
-	margin: 0 0 20rpx 30rpx;
+
+:deep(.uniui-arrowright) {
+	color: #0E100F !important;
 }
 .shareQrCodePopupContent {
 	width: 75vw;

+ 25 - 1
static/style/index.css

@@ -170,13 +170,29 @@
   font-size: 40rpx;
 }
 
+.MiSans-Semibold {
+  font-family: MiSans-Semibold;
+}
+
+.MiSans-Normal {
+  font-family: MiSans-Normal;
+}
+
+.MiSans-Bold {
+  font-family: MiSans-Bold;
+}
+
+.MiSans-Medium {
+  font-family: MiSans-Medium;
+}
+
 .defaultLink {
   color: #00B760;
   cursor: pointer;
 }
 
 .defaultBgc {
-  background-color: #f2f4f7;
+  background-color: #f7f8fa;
 }
 
 .f-horizon {
@@ -9128,3 +9144,11 @@
 .scrollBox {
   height: 100%;
 }
+
+.uni-forms-item__content {
+  max-width: 100% !important;
+}
+
+.uni-select__input-box {
+  width: 100%;
+}

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
static/style/index.min.css


+ 14 - 1
static/style/index.scss

@@ -60,6 +60,19 @@
 .font-size-19 { font-size: 38rpx; }
 .font-size-20 { font-size: 40rpx; }
 
+.MiSans-Semibold {
+	font-family: MiSans-Semibold;
+}
+.MiSans-Normal {
+	font-family: MiSans-Normal;
+}
+.MiSans-Bold {
+	font-family: MiSans-Bold;
+}
+.MiSans-Medium {
+	font-family: MiSans-Medium;
+}
+
 .defaultLink {
   color:#00B760;
   cursor:pointer;
@@ -68,7 +81,7 @@
 
 .defaultBgc {
   // height: 100vh;
-  background-color: #f2f4f7;
+  background-color: #f7f8fa;
 }
 
 // 火苗

+ 10 - 5
utils/config.js

@@ -1,25 +1,30 @@
 // 开发环境配置
+
 const config = {
   // 生产环境
   produce: {
     baseUrl: 'https://www.menduner.com',
     previewUrl: 'https://kkfileview.menduner.com/', // 预览路径
+    fontBaseUrl: ''
   },
   httpsTest: {
-    baseUrl: 'https://menduner.citupro.com:2443'
+    baseUrl: 'https://menduner.citupro.com:2443',
+    fontBaseUrl: 'https://menduner.citupro.com:3443/dev/menduner/font/'
   },
   httpTest: { 
-    baseUrl: 'http://menduner.citupro.com:7878'
+    baseUrl: 'http://menduner.citupro.com:7878',
+    fontBaseUrl: 'https://menduner.citupro.com:3443/dev/menduner/font/'
   }
 }
 
 export const envObj = config['httpsTest']
 
+// 字体下载地址
+export const fontBaseUrl = config['httpsTest'].fontBaseUrl
+
 export const baseUrl = envObj.baseUrl
 
 // 租户id
 export const tenantId = '155'
 
-export const apiPath = '/app-api'
-
-export const adminPath = '/admin-api'
+export const apiPath = '/app-api'

+ 36 - 0
utils/font.js

@@ -0,0 +1,36 @@
+import { fontBaseUrl } from './config'
+
+// 第三方字体库调用
+export const loadFont = () => {
+	// 所有的.tff文件
+	const fontsArr = [
+		// 'MiSans-Heavy',
+		// 'MiSans-ExtraLight',
+		// 'MiSans-Light',
+		// 'MiSans-Demibold',
+		'MiSans-Semibold',
+		'MiSans-Normal',
+		// 'MiSans-Thin',
+		'MiSans-Bold',
+		// 'MiSans-Regular',
+		'MiSans-Medium'
+	]
+
+	fontsArr.forEach(itm => {
+		wx.loadFontFace({
+			family: `${itm}`,
+			global: true, //是否全局生效
+			source: `url("${fontBaseUrl}${itm}.ttf")`, //字体资源的地址
+			success: function(e) {
+				// console.log(itm, '===>字体调用成功', e);
+			},
+			fail: function(e) {
+				console.log(itm, '===>字体调用失败', e);
+			}
+		})
+	})
+}
+
+// module.exports = {
+// 	loadFont: loadFont
+// }

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels