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,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()
}