first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style lang="less">
@import "./common/less/common/_";
/*每个页面公共css */
</style>

View File

@@ -0,0 +1,12 @@
// import service from "@/common/service/_";
export default {
BaseUrl: 'http://127.0.0.1:3000/api/json',
// BaseUrl: 'http://127.0.0.1:3000/api/json',
ApiUrl: {
"home": "/index"
},
// NotVuePlugins: [
// { n: '$api', v: service }
// ]
}

View File

@@ -0,0 +1,94 @@
import config from "@/common/config";
export default class Http {
static http;
static singleton () {
if (this.http instanceof this) {
return this.http;
} else {
this.http = new this;
return this.http;
}
}
get(url = "", data = {}, header = {}) {
this.loading();
return new Promise((succ, error) => {
uni.request({
url: config.BaseUrl + url,
data: data,
method: 'GET',
header: Object.assign(
header,
{
token: localStorage.getItem("token")
}
),
success: (res) => {
succ(this.StateProcessing(res.data))
},
fail: (err) => {
throw new Error(err)
}
});
})
}
post(url = "", data = {}, header = {}) {
this.loading();
return new Promise((succ, error) => {
uni.request({
url: config.BaseUrl + url,
data: data,
method: 'POST',
header: Object.assign(
header,
{
token: localStorage.getItem("token")
}
),
success: (res) => {
succ(this.StateProcessing(res.data))
},
fail: (err) => {
throw new Error(err)
}
});
})
}
/**
* 加载进度条
*/
loading() {
uni.showLoading({
title: '加载中...'
});
}
/**
* 状态码处理
*/
StateProcessing(data) {
uni.hideLoading();
switch (data.status) {
case 200:
return data.result;
break;
case 404:
uni.showToast({
title: data.msg,
icon: 'none',
duration: 2000
});
throw new Error(data.msg);
break;
}
}
}

View File

@@ -0,0 +1,4 @@
@import "normalize.less";
@import "base.less";
@import "colors.less";
@import "mixins.less";

View File

@@ -0,0 +1,23 @@
@import "./normalize.less";
body,ul,li,p,h1,h2,h3,h4,h5,h6 {
margin: 0;
padding: 0;
list-style: none;
}
a {
text-decoration: none;
color: #000;
}
input {
outline: none;
}
.content {
margin-top: 45px;
}
img {
width: 100%;
}

View File

@@ -0,0 +1,2 @@
@themeColor: #ff6700;
@whileColor: #fff;

View File

@@ -0,0 +1,16 @@
.ellipsis() {
white-space:nowrap;
text-overflow:ellipsis;
overflow:hidden;
word-wrap: break-word;
}
.no-scrollbar() {
&::-webkit-scrollbar {
display: none !important;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
opacity: 0 !important;
}
}

View File

@@ -0,0 +1,419 @@
/*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Change the default font family in all browsers (opinionated).
* 2. Prevent adjustments of font size after orientation changes in IE and iOS.
*/
html {
font-family: sans-serif; /* 1 */
-ms-text-size-adjust: 100%; /* 2 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/**
* Remove the margin in all browsers (opinionated).
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
* 2. Add the correct display in IE.
*/
article,
aside,
details, /* 1 */
figcaption,
figure,
footer,
header,
main, /* 2 */
menu,
nav,
section,
summary { /* 1 */
display: block;
}
/**
* Add the correct display in IE 9-.
*/
audio,
canvas,
progress,
video {
display: inline-block;
}
/**
* Add the correct display in iOS 4-7.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Add the correct display in IE 10-.
* 1. Add the correct display in IE.
*/
template, /* 1 */
[hidden] {
display: none;
}
/* Links
========================================================================== */
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent; /* 1 */
-webkit-text-decoration-skip: objects; /* 2 */
}
/**
* Remove the outline on focused links when they are also active or hovered
* in all browsers (opinionated).
*/
a:active,
a:hover {
outline-width: 0;
}
/* Text-level semantics
========================================================================== */
/**
* 1. Remove the bottom border in Firefox 39-.
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* Add the correct font style in Android 4.3-.
*/
dfn {
font-style: italic;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Add the correct background and color in IE 9-.
*/
mark {
background-color: #ff0;
color: #000;
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10-.
*/
img {
border-style: none;
}
/**
* Hide the overflow in IE.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct margin in IE 8.
*/
figure {
margin: 1em 40px;
}
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/* Forms
========================================================================== */
/**
* 1. Change font properties to `inherit` in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
select,
textarea {
font: inherit; /* 1 */
margin: 0; /* 2 */
}
/**
* Restore the font weight unset by the previous rule.
*/
optgroup {
font-weight: bold;
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
* controls in Android 4.
* 2. Correct the inability to style clickable types in iOS and Safari.
*/
button,
html [type="button"], /* 1 */
[type="reset"],
[type="submit"] {
-webkit-appearance: button; /* 2 */
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on OS X.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Correct the text style of placeholders in Chrome, Edge, and Safari.
*/
::-webkit-input-placeholder {
color: inherit;
opacity: 0.54;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}

View File

@@ -0,0 +1,147 @@
.info {
margin-bottom: 50px;
.header {
display: flex;
height: 40px;
align-items: center;
justify-content: space-between;
position: fixed;
left: 0;
top: 10px;
width: 100%;
z-index: 999;
padding: 0 15px;
box-sizing: border-box;
i {
width: 35px;
height: 35px;
border-radius: 100%;
text-align: center;
line-height: 35px;
background: #00000080;
color: #fff;
font-size: 14px;
}
}
.info_text {
padding: 0 15px;
.pabcd{
display: flex;
align-items: flex-end;
.abcd {
color: @themeColor;
font-size: 25px;
}
.aabcd{
font-size: 12px;
align-items: flex-end;
margin-bottom: 7px;
margin-left: 9px;
}
}
.title{
font-size: 17px;
margin-top: 8px;
margin-bottom: 8px;
}
.mess{
font-size: 12px;
margin-top: 6px;
margin-bottom: 6px;
border-bottom: 2px solid rgb(241, 241, 241);
height: 37px;
padding: 4px;
}
.config{
display: flex;
justify-content: space-between;
font-size: 12px;
height: 46px;
text-align: center;
line-height: 46px;
box-sizing: border-box;
.spanTxt1{
margin-right: 20px;
}
.span_linee{
border-bottom: 2px solid rgb(241, 241, 241);
flex: 1;
display: flex;
justify-content: space-between;
.van-icon{
line-height: 46px;
}
}
}
.remarks{
display: flex;
justify-content: space-between;
background-color: #fcfcfc;
line-height: 32px;
margin-top: 4px;
.van-icon{
font-size: 12px;
color: #cecece;
line-height: 32px;
}
.van-cell{
padding: 10px 0;
display: flex;
img{
width: 12px;
height: 12px;
margin-right: 4.7px;
}
.remarks_right{
display: flex;
li{
margin-right: 16px;
span{
font-size: 12px;
}
}
}
}
.van-popup{
box-sizing: border-box;
padding-left: 20px;
padding-right: 20px;
.p1{
font-size: 16px;
text-align: center;
margin-top: 10px;
}
.pp1{
display: flex;
font-size: 12px;
line-height: 15px;
margin-top: 20px;
img{
width: 12px;
height: 12px;
margin-right: 9px;
}
}
}
}
}
.figures{
p{
text-align: center;
}
}
.van-goods-action{
.txtt{
font-size: 16px;
}
}
}

View File

@@ -0,0 +1,68 @@
@import "../common/_.less";
.login {
padding: 0 0.48rem;
.user_header {
margin-bottom: 25px;
text-align: center;
margin-top: 20px;
.logo_header {
width: 80px;
height: 80px;
margin-bottom: 12px;
}
p {
font-size: 18px;
color: #000;
font-weight: 400;
}
}
.user_login {
margin: 20px auto;
position: relative;
}
.user_reg {
position: relative;
.showpwd {
right: 0 !important;
bottom: 3.7rem !important;
}
}
input {
border: none;
border-bottom: 0.02667rem solid #d3d3d3;
width: 100%;
margin-bottom: 13px;
font-size: 16px;
padding-bottom: 15px;
padding-right: 20px;
box-sizing: border-box;
}
.showpwd {
position: absolute;
right: 15px;
bottom: 27px;
}
.submit {
width: 100%;
height: 47px;
border-radius: 20px;
background: @themeColor;
text-align: center;
line-height: 47px;
color: #fff;
font-size: 18px;
}
.action {
margin-top: 10px;
display: flex;
align-items: center;
justify-content: space-between;
position: fixed;
bottom: 15px;
width: calc(100% - 36px);
span {
font-size: 13px;
color: #d3d3d3;
}
}
}

View File

@@ -0,0 +1,31 @@
.me {
.me_header {
display: flex;
height: 85px;
align-items: center;
padding: 0 15px;
box-sizing: border-box;
background: url("https://m.mi.com/static/img/bg.63c8e19851.png") center 0 #f37d0f;
background-size: auto 100%;
img {
width: 44px;
height: 44px;
margin-right: 10px;
}
span {
color: #fff;
font-size: 12px;
}
}
.van-grid-item {
text-align: center;
p {
font-size: 14px;
margin-top: 10px;
}
}
.van-image {
width: 35px;
height: 35px;
}
}

View File

@@ -0,0 +1,26 @@
@import "../common/_.less";
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}

View File

@@ -0,0 +1,7 @@
import http from "@/common/http"
import config from "@/common/config";
export default class BaseService {
$http = http.singleton();
$config = config;
}

View File

@@ -0,0 +1,13 @@
import BaseService from "./BaseService";
export default class HomeService extends BaseService {
async home(data = {}, header = {}) {
return await this.$http.get(
this.$config.ApiUrl.home,
data,
{
bmy: 'liubing'
}
);
}
}

View File

@@ -0,0 +1,4 @@
import HomeService from "./HomeService"
export default {
home: new HomeService()
}

View File

@@ -0,0 +1,108 @@
<template>
<view v-if="width" :style="'width:'+width+';'+(square?'height:'+width:'')" class="uni-grid-item">
<view :class="{ 'uni-grid-item--border': showBorder, 'uni-grid-item--border-top': showBorder && index < column, 'uni-highlight': highlight }"
:style="{ 'border-right-color': borderColor ,'border-bottom-color': borderColor ,'border-top-color': borderColor }"
class="uni-grid-item__box" @click="_onClick">
<slot />
</view>
</view>
</template>
<script>
export default {
name: 'UniGridItem',
inject: ['grid'],
props: {
index:{
type: Number,
default: 0
}
},
data() {
return {
column: 0,
showBorder: true,
square: true,
highlight: true,
left: 0,
top: 0,
openNum: 2,
width: 0,
borderColor: '#e5e5e5'
}
},
created() {
this.column = this.grid.column
this.showBorder = this.grid.showBorder
this.square = this.grid.square
this.highlight = this.grid.highlight
this.top = this.hor === 0 ? this.grid.hor : this.hor
this.left = this.ver === 0 ? this.grid.ver : this.ver
this.borderColor = this.grid.borderColor
this.grid.children.push(this)
// this.grid.init()
this.width = this.grid.width
},
beforeDestroy() {
this.grid.children.forEach((item, index) => {
if (item === this) {
this.grid.children.splice(index, 1)
}
})
},
methods: {
_onClick() {
this.grid.change({
detail: {
index: this.index
}
})
}
}
}
</script>
<style lang="scss" scoped>
.uni-grid-item {
/* #ifndef APP-NVUE */
height: 100%;
display: flex;
/* #endif */
}
.uni-grid-item__box {
/* #ifndef APP-NVUE */
display: flex;
width: 100%;
/* #endif */
position: relative;
flex: 1;
flex-direction: column;
// justify-content: center;
// align-items: center;
}
.uni-grid-item--border {
position: relative;
border-bottom-color: $uni-border-color;
border-bottom-style: solid;
border-bottom-width: 1px;
border-right-color: $uni-border-color;
border-right-style: solid;
border-right-width: 1px;
}
.uni-grid-item--border-top {
border-top-color: $uni-border-color;
border-top-style: solid;
border-top-width: 1px;
/* #ifndef APP-NVUE */
height: 100%;
box-sizing: border-box;
/* #endif */
}
.uni-highlight:active {
background-color: $uni-bg-color-hover;
}
</style>

View File

@@ -0,0 +1,120 @@
<template>
<view class="uni-grid-wrap">
<view :id="elId" ref="uni-grid" class="uni-grid" :class="{ 'uni-grid--border': showBorder }" :style="{ 'border-left-style':'solid','border-left-color':borderColor, 'border-left-width':showBorder?'1px':0 }">
<slot />
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = uni.requireNativePlugin('dom');
// #endif
export default {
name: 'UniGrid',
props: {
// 每列显示个数
column: {
type: Number,
default: 3
},
// 是否显示边框
showBorder: {
type: Boolean,
default: true
},
// 边框颜色
borderColor: {
type: String,
default: '#e5e5e5'
},
// 是否正方形显示,默认为 true
square: {
type: Boolean,
default: true
},
highlight: {
type: Boolean,
default: true
}
},
provide() {
return {
grid: this
}
},
data() {
const elId = `Uni_${Math.ceil(Math.random() * 10e5).toString(36)}`
return {
elId,
width: 0
}
},
created() {
this.children = []
},
mounted() {
this.init()
},
methods: {
init() {
setTimeout(() => {
this._getSize((width) => {
this.children.forEach((item, index) => {
item.width = width
})
})
}, 50)
},
change(e) {
this.$emit('change', e)
},
_getSize(fn) {
// #ifndef APP-NVUE
uni.createSelectorQuery()
.in(this)
.select(`#${this.elId}`)
.boundingClientRect()
.exec(ret => {
this.width = parseInt((ret[0].width-1) / this.column) + 'px'
fn(this.width)
})
// #endif
// #ifdef APP-NVUE
dom.getComponentRect(this.$refs['uni-grid'], (ret) => {
this.width = parseInt((ret.size.width-1) / this.column) + 'px'
fn(this.width)
})
// #endif
}
}
}
</script>
<style lang="scss" scoped>
.uni-grid-wrap {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex: 1;
flex-direction: column;
/* #ifdef H5 */
width: 100%;
/* #endif */
}
.uni-grid {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
// flex: 1;
flex-direction: row;
flex-wrap: wrap;
}
.uni-grid--border {
border-left-color: $uni-border-color;
border-left-style: solid;
border-left-width: 1px;
}
</style>

View File

@@ -0,0 +1,16 @@
import Vue from 'vue'
import App from './App'
import service from "./common/service/_";
// import config from "./common/config";
// config.NotVuePlugins.forEach(item => Vue.prototype[item.n] = item.v)
Vue.config.productionTip = false
Vue.prototype.$api = service;
App.mpType = 'app'
const app = new Vue({
...App
})
app.$mount()

View File

@@ -0,0 +1,72 @@
{
"name" : "uniappstudy",
"appid" : "__UNI__280FFF6",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
/* 5+App */
"app-plus" : {
"usingComponents" : true,
"nvueCompiler" : "uni-app",
"compilerVersion" : 3,
"splashscreen" : {
"alwaysShowBeforeRender" : true,
"waiting" : true,
"autoclose" : true,
"delay" : 0
},
/* */
"modules" : {},
/* */
"distribute" : {
/* android */
"android" : {
"permissions" : [
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {},
/* SDK */
"sdkConfigs" : {
"ad" : {}
}
}
},
/* */
"quickapp" : {},
/* */
"mp-weixin" : {
"appid" : "",
"setting" : {
"urlCheck" : false
},
"usingComponents" : true
},
"mp-alipay" : {
"usingComponents" : true
},
"mp-baidu" : {
"usingComponents" : true
},
"mp-toutiao" : {
"usingComponents" : true
},
"uniStatistics" : {
"enable" : false
}
}

View File

@@ -0,0 +1,47 @@
{
"pages": [
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "hhhh",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/about/about",
"style" :
{
"navigationBarTitleText": ""
}
}
,{
"path" : "pages/info/info",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#fff000"
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#3cc51f",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"pagePath": "pages/index/index",
"text": "组件"
}, {
"pagePath": "pages/about/about",
"text": "接口"
}]
}
}

View File

@@ -0,0 +1,22 @@
<template>
<view>
关于我
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,83 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{ title }}</text>
</view>
<ul>
<li
v-for="(item, index) in newsList"
:key="index"
@click="EnterInfo(item)"
>
{{ item.title }}
</li>
</ul>
<button type="primary" @click="EnterAbout">我是按钮</button>
<uni-grid :column="3">
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
<uni-grid-item>
<text class="text">文本</text>
</uni-grid-item>
</uni-grid>
</view>
</template>
<script>
export default {
data() {
return {
title: "Hello",
newsList: [
{ id: 1, title: "哈哈哈1" },
{ id: 2, title: "哈哈哈2" },
{ id: 3, title: "哈哈哈3" },
{ id: 4, title: "哈哈哈4" },
],
};
},
created() {
//#ifdef APP-PLUS
uni.setScreenBrightness({
value: 0.5,
success: function () {
console.log('success');
}
});
//#endif
this.GetHome();
},
methods: {
async GetHome() {
let res = await this.$api.home.home();
console.log(res)
setTimeout(async ()=>{
let aaaa = await this.$api.home.home();
},2000)
},
EnterInfo(i) {
uni.navigateTo({
url: `/pages/info/info?id=${i.id}&title=${i.title}`,
});
},
EnterAbout() {
uni.switchTab({
url: "/pages/about/about",
});
},
},
};
</script>
<style lang="less" scoped>
@import "@/common/less/views/index.less";
</style>

View File

@@ -0,0 +1,28 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
id: null,
title: null
}
},
onLoad(option) {
this.id = option.id;
this.title = option.title;
console.log(this.id)
},
methods: {
}
}
</script>
<style>
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -0,0 +1,76 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
$uni-color-primary: #007aff;
$uni-color-success: #4cd964;
$uni-color-warning: #f0ad4e;
$uni-color-error: #dd524d;
/* 文字基本颜色 */
$uni-text-color:#333;//基本色
$uni-text-color-inverse:#fff;//反色
$uni-text-color-grey:#999;//辅助灰色,如加载更多的提示信息
$uni-text-color-placeholder: #808080;
$uni-text-color-disable:#c0c0c0;
/* 背景颜色 */
$uni-bg-color:#ffffff;
$uni-bg-color-grey:#f8f8f8;
$uni-bg-color-hover:#f1f1f1;//点击状态颜色
$uni-bg-color-mask:rgba(0, 0, 0, 0.4);//遮罩颜色
/* 边框颜色 */
$uni-border-color:#c8c7cc;
/* 尺寸变量 */
/* 文字尺寸 */
$uni-font-size-sm:24rpx;
$uni-font-size-base:28rpx;
$uni-font-size-lg:32rpx;
/* 图片尺寸 */
$uni-img-size-sm:40rpx;
$uni-img-size-base:52rpx;
$uni-img-size-lg:80rpx;
/* Border Radius */
$uni-border-radius-sm: 4rpx;
$uni-border-radius-base: 6rpx;
$uni-border-radius-lg: 12rpx;
$uni-border-radius-circle: 50%;
/* 水平间距 */
$uni-spacing-row-sm: 10px;
$uni-spacing-row-base: 20rpx;
$uni-spacing-row-lg: 30rpx;
/* 垂直间距 */
$uni-spacing-col-sm: 8rpx;
$uni-spacing-col-base: 16rpx;
$uni-spacing-col-lg: 24rpx;
/* 透明度 */
$uni-opacity-disabled: 0.3; // 组件禁用态的透明度
/* 文章场景相关 */
$uni-color-title: #2C405A; // 文章标题颜色
$uni-font-size-title:40rpx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36rpx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30rpx;