feat: 首次提交
This commit is contained in:
174
common/fui-app.css
Normal file
174
common/fui-app.css
Normal file
@ -0,0 +1,174 @@
|
||||
/* #ifndef APP-NVUE */
|
||||
page {
|
||||
background-color: var(--fui-bg-color-grey, #F1F4FA);
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: var(--fui-color-title, #181818);
|
||||
font-family: -apple-system-font, Helvetica Neue, Helvetica, sans-serif;
|
||||
}
|
||||
/* #endif */
|
||||
|
||||
|
||||
.fui-section__title {
|
||||
font-size: 32rpx;
|
||||
line-height: 32rpx;
|
||||
font-weight: 600;
|
||||
margin-bottom: 32rpx;
|
||||
padding-left: 16rpx;
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
/* #ifdef APP-NVUE */
|
||||
border-left: 2px solid #465CFF;
|
||||
/* #endif */
|
||||
}
|
||||
/* #ifndef APP-NVUE */
|
||||
|
||||
.fui-section__title:not(:first-child) {
|
||||
margin-top: 96rpx;
|
||||
}
|
||||
|
||||
.fui-page__title image {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-left: 16rpx;
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-section__title::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 2px;
|
||||
height: 100%;
|
||||
background: #465CFF;
|
||||
border-radius: 2px;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0 !important;
|
||||
height: 0 !important;
|
||||
color: transparent !important;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fui-ellipsis {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
/* #endif */
|
||||
|
||||
.fui-vip__icon {
|
||||
width: 48rpx;
|
||||
height: 48rpx;
|
||||
margin-left: 16rpx;
|
||||
/* #ifdef H5 */
|
||||
cursor: pointer;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-page__spacing {
|
||||
padding-left: 32rpx;
|
||||
padding-right: 32rpx;
|
||||
/* #ifndef APP-NVUE */
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-page__hd {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
padding: 52rpx 32rpx;
|
||||
}
|
||||
|
||||
.fui-page__bd {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
/* #endif */
|
||||
padding-bottom: 64rpx;
|
||||
}
|
||||
|
||||
|
||||
.fui-page__title {
|
||||
text-align: left;
|
||||
font-size: 36rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.fui-page__desc {
|
||||
margin-top: 8rpx;
|
||||
color: #B2B2B2;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
/* #ifndef APP-NVUE */
|
||||
word-break: break-all;
|
||||
/* #endif */
|
||||
}
|
||||
|
||||
.fui-color__primary {
|
||||
color: #465CFF;
|
||||
}
|
||||
|
||||
.fui-wrap {
|
||||
/* #ifndef APP-NVUE */
|
||||
width: 100%;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
/* #endif */
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/*Flex布局*/
|
||||
.fui-flex {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.fui-flex__center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.fui-flex__between {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.fui-flex__reverse {
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.fui-align__center {
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.fui-flex__column {
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
.fui-flex__1 {
|
||||
flex: 1
|
||||
}
|
57
common/fui-app.js
Normal file
57
common/fui-app.js
Normal file
@ -0,0 +1,57 @@
|
||||
// 本文件由FirstUI授权予新疆天衡创新研究院有限公司(手机号:18614 0 72 5 4 9,身份证尾号:5A07X5)专用,请尊重知识产权,勿私下传播,违者追究法律责任。
|
||||
const fui = {
|
||||
toast: function(text) {
|
||||
text && uni.showToast({
|
||||
title: text,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
},
|
||||
modal: function(title, content, callback, showCancel, confirmColor, confirmText) {
|
||||
uni.showModal({
|
||||
title: title,
|
||||
content: content,
|
||||
showCancel: showCancel || false,
|
||||
// #ifndef MP-TOUTIAO
|
||||
cancelColor: "#7F7F7F",
|
||||
confirmColor: confirmColor || "#465CFF",
|
||||
// #endif
|
||||
confirmText: confirmText || "确定",
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
callback && callback(true)
|
||||
} else {
|
||||
callback && callback(false)
|
||||
}
|
||||
},
|
||||
fail(err){
|
||||
console.log(err)
|
||||
}
|
||||
})
|
||||
},
|
||||
href(url, isMain) {
|
||||
if (isMain) {
|
||||
uni.switchTab({
|
||||
url: url
|
||||
})
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: url
|
||||
});
|
||||
}
|
||||
},
|
||||
jsonp: function(url, callback, callbackname) {
|
||||
// #ifdef H5
|
||||
window[callbackname] = callback;
|
||||
let script = document.createElement("script");
|
||||
script.src = url;
|
||||
script.type = "text/javascript";
|
||||
document.head.appendChild(script);
|
||||
document.head.removeChild(script);
|
||||
// #endif
|
||||
},
|
||||
resUrl:function(){
|
||||
return 'https://res.firstui.cn/static/images'
|
||||
}
|
||||
}
|
||||
export default fui
|
30
common/fui-request.js
Normal file
30
common/fui-request.js
Normal file
@ -0,0 +1,30 @@
|
||||
// 本文件由FirstUI授权予新疆天衡创新研究院有限公司(手机号:1 86 14 0 725 49,身份证尾号:5A07X5)专用,请尊重知识产权,勿私下传播,违者追究法律责任。
|
||||
import http from '@/components/firstui/fui-request'
|
||||
|
||||
//初始化请求配置项
|
||||
http.create({
|
||||
host: 'https://ffa.firstui.cn',
|
||||
header: {
|
||||
// 'content-type': 'application/x-www-form-urlencoded'
|
||||
}
|
||||
})
|
||||
//请求拦截
|
||||
http.interceptors.request.use(config => {
|
||||
//请求之前可在请求头中加入token等信息
|
||||
let token = uni.getStorageSync('firstui_token') || 'testToken';
|
||||
if (config.header) {
|
||||
config.header['token'] = token
|
||||
} else {
|
||||
config.header = {
|
||||
'token': token
|
||||
}
|
||||
}
|
||||
return config
|
||||
})
|
||||
//响应拦截
|
||||
http.interceptors.response.use(response => {
|
||||
//TODO
|
||||
return response
|
||||
})
|
||||
|
||||
export default http
|
Reference in New Issue
Block a user