Merge branch 'master' of http://git.luyuan.tk/luyuan/beelink into zj

This commit is contained in:
asd 2020-10-09 14:34:41 +08:00
commit 1dcb0d9dc6
20 changed files with 104 additions and 52 deletions

View File

@ -7,10 +7,14 @@ import { AxiosPromise } from 'axios'
* @param type 0 1
*/
export function sendsms(phone: string, type?: number): Promise<AxiosPromise>{
export function sendsms(phone: string, type?: number): Promise<AxiosPromise>{
return post('SendSms',{phone, type})
}
export function loginpass(phone: string, password: string): Promise<AxiosPromise>{
return post("login",{type: 2,username: phone, password: password})
}
// 下面是示例接口 可以删除

View File

@ -60,7 +60,7 @@
.reply{
padding-top: 28px;
border-top: 1px solid #ededed;
::v-deep() .ant-input{
::v-deep(.ant-input){
font-size: 11px;
}
.send{

View File

@ -1,5 +1,5 @@
import axios from 'axios'
axios.defaults.baseURL = 'http://beelink.com/home/';
axios.defaults.baseURL = '/beelink/public/home/';
axios.defaults.headers.common['Authorization'] = 'token';
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';

4
src/import-png.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
declare module "*.png" {
const value: any;
export default value;
}

21
src/types/index.d.ts vendored Normal file
View File

@ -0,0 +1,21 @@
/**
*
*/
// 图片选择
export interface ImgInfo {
file: string;
}
// 表单提交的验证
export interface FromSend {
preventDefault: Function;
}
// 视频文件
export interface VideoInfo {
type: string;
name: string;
uid: string;
}

View File

@ -89,10 +89,10 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.about ::v-deep() .nav-bottom ::v-deep() .nav-container{
.about ::v-deep(.nav-bottom) ::v-deep(.nav-container){
color:white!important
}
.about ::v-deep() .nav-bottom ::v-deep() .copyright{
.about ::v-deep(.nav-bottom) ::v-deep(.copyright){
color:white!important
}
.about {

View File

@ -48,6 +48,7 @@
<a-input
style="width: 80%"
placeholder="请输入您的邮箱或者手机号"
v-model:value="userinfo.phone"
/>
</a-input-group>
</a-form-item>
@ -58,11 +59,12 @@
placeholder="请输入您的密码"
type="password"
class="shuru"
v-model:value="userinfo.password"
/>
<div class="forget">忘记密码?</div>
</a-input-group>
</a-form-item>
<div class="submit">立即登录</div>
<div class="submit" @click="login">立即登录</div>
</a-form>
</div>
</div>
@ -144,10 +146,10 @@
</template>
<script lang="ts">
import { defineComponent, ref } from "vue";
import { defineComponent, reactive, ref } from "vue";
import LoginTab from "@/components/login/LoginTab.vue";
import NavTop from "@/components/NavTop.vue"
import { sendsms } from '@/api';
import { loginpass, sendsms } from '@/api';
export default defineComponent({
name: "Login",
@ -163,6 +165,10 @@ export default defineComponent({
const tabselected = ref(1); //tab
const time = ref(60);//
const phone = ref(""); //
const userinfo = reactive({
phone: '',
password: ''
})
/**
* @param val 子组件传过来的值
*/
@ -192,22 +198,31 @@ export default defineComponent({
}
}, 1000);
};
function login(): void {
console.log(userinfo.phone,userinfo.password)
loginpass(userinfo.phone,userinfo.password).then((res)=>{
console.log(res)
})
}
return {
formLayout,
tabselected,
Selectnum,
getcode,
time,
phone
phone,
login,
userinfo
};
},
});
</script>
<style lang="scss" scoped>
.login ::v-deep() .ant-select-selection {
.login ::v-deep(.ant-select-selection) {
border: none;
}
.login ::v-deep() .ant-input {
.login ::v-deep(.ant-input) {
border: none;
}
.ant-input:focus {
@ -215,10 +230,10 @@ export default defineComponent({
border-bottom: 1px solid white !important;
box-shadow: none;
}
.login ::v-deep() .ant-form-item-label {
.login ::v-deep(.ant-form-item-label) {
line-height: 14px;
}
.login ::v-deep() .ant-form-item ::v-deep() label {
.login ::v-deep(.ant-form-item) ::v-deep(label) {
color: #0dbba4;
font-size: 11px;
left: 1px;

View File

@ -165,10 +165,10 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.login ::v-deep() .ant-select-selection {
.login ::v-deep(.ant-select-selection) {
border: none;
}
.login ::v-deep() .ant-input {
.login ::v-deep(.ant-input) {
border: none;
}
.ant-input:focus {
@ -176,10 +176,10 @@ export default defineComponent({
border-bottom: 1px solid white !important;
box-shadow: none;
}
.login ::v-deep() .ant-form-item-label {
.login ::v-deep(.ant-form-item-label) {
line-height: 14px;
}
.login ::v-deep() .ant-form-item ::v-deep() label {
.login ::v-deep(.ant-form-item) ::v-deep(label) {
color: #0dbba4;
font-size: 11px;
left: 1px;

View File

@ -191,10 +191,10 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.login ::v-deep() .ant-select-selection {
.login ::v-deep(.ant-select-selection) {
border: none;
}
.login ::v-deep() .ant-input {
.login ::v-deep(.ant-input) {
border: none;
}
.ant-input:focus {
@ -202,10 +202,10 @@ export default defineComponent({
border-bottom: 1px solid white !important;
box-shadow: none;
}
.login ::v-deep() .ant-form-item-label {
.login ::v-deep(.ant-form-item-label) {
line-height: 14px;
}
.login ::v-deep() .ant-form-item ::v-deep() label {
.login ::v-deep(.ant-form-item) ::v-deep(label) {
color: #0dbba4;
font-size: 11px;
left: 1px;

View File

@ -189,21 +189,21 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.cashout ::v-deep() .ant-breadcrumb > span:last-child {
.cashout ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.cashout ::v-deep() .ant-radio-wrapper {
.cashout ::v-deep(.ant-radio-wrapper) {
display: flex;
}
.cashout ::v-deep() .ant-radio-checked ::v-deep() .ant-radio-inner {
.cashout ::v-deep(.ant-radio-checked) ::v-deep(.ant-radio-inner) {
border-color: #08ae98 !important;
}
.cashout ::v-deep() .ant-radio-inner::after {
.cashout ::v-deep(.ant-radio-inner::after) {
background: #08ae98 !important;
}
.cashout ::v-deep() .ant-radio {
// top: 43px;
}
// .cashout ::v-deep(.ant-radio) {
// // top: 43px;
// }
.cashout {
.mingxilist {
width: 1150px;

View File

@ -496,7 +496,7 @@ export default defineComponent({
}
.main-container {
margin-left: 17px;
::v-deep() .input-box {
::v-deep(.input-box) {
display: flex;
align-items: center;
margin-bottom: 28px;
@ -602,7 +602,7 @@ export default defineComponent({
}
}
}
::v-deep() .modal-dialog {
::v-deep(.modal-dialog) {
.close {
width: 14px;
height: 14px;

View File

@ -100,13 +100,13 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.cashout ::v-deep() .ant-breadcrumb > span:last-child {
.cashout ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.cashout ::v-deep() .ant-radio-wrapper {
.cashout ::v-deep(.ant-radio-wrapper) {
display: flex;
}
.cashout ::v-deep() .ant-radio {
.cashout ::v-deep(.ant-radio) {
top: 43px;
}
.cashout {

View File

@ -80,7 +80,7 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.transaction ::v-deep() .ant-breadcrumb > span:last-child {
.transaction ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.transaction{

View File

@ -53,6 +53,7 @@ import { defineComponent, reactive, Ref, ref } from 'vue';
import { PlaySquareOutlined, PlusOutlined } from '@ant-design/icons-vue';
import NavBottom from '@/components/NavBottom.vue';
import { previewCover } from '@/static/js/common';
import { FromSend, ImgInfo, VideoInfo } from '@/types';
export default defineComponent({
name: 'ReleaseWebcast',
@ -81,7 +82,7 @@ export default defineComponent({
/**
* 封面改变触发事件
*/
function coverChange(info: any): void {
function coverChange(info: ImgInfo): void {
// console.log(info);
//
previewCover(info.file).then(url => previewImage.value = url);
@ -108,7 +109,7 @@ export default defineComponent({
/**
* 删除封面
*/
function cancelCover(file: any): void {
function cancelCover(file: number): void {
console.log(file);
}
@ -116,8 +117,8 @@ export default defineComponent({
* 上传文件之前的钩子
* @param file 上传的文件
*/
const beforeVideoUpload = (file: any): boolean => {
// console.log(file);
const beforeVideoUpload = (file: VideoInfo): boolean => {
console.log(file);
if(file.type != '') {
// handleRemove(file);
}
@ -127,7 +128,7 @@ export default defineComponent({
/**
* 表单提交
*/
const onSubmit = (e: any) => {
const onSubmit = (e: FromSend) => {
e.preventDefault();
};
@ -156,7 +157,7 @@ export default defineComponent({
padding: 46px;
border-radius: 17px;
position: relative;
::v-deep() .ant-form {
::v-deep(.ant-form) {
.title {
font-size: 12px;
font-weight: bold;

View File

@ -87,6 +87,7 @@ import { useForm } from '@ant-design-vue/use';
import NavBottom from '@/components/NavBottom.vue';
import RankList from './RankList.vue';
import { previewCover } from '@/static/js/common';
import { FromSend, ImgInfo } from "@/types/index"
export default defineComponent({
name: 'ReleaseWebcast',
@ -144,13 +145,14 @@ export default defineComponent({
});
//
const viewCover: Ref<boolean> = ref(false),
previewImage: Ref<string> = ref('');
const viewCover: Ref<boolean> = ref(false);
const previewImage: Ref<string> = ref('');
/**
* 封面改变触发事件
*/
function coverChange(info: any): void {
function coverChange(info: ImgInfo): void {
// console.log(info);
//
previewCover(info.file).then(url => previewImage.value = url);
@ -162,7 +164,8 @@ export default defineComponent({
/**
* 表单提交
*/
const onSubmit = (e: any) => {
const onSubmit = (e: FromSend) => {
e.preventDefault();
validate().then(() => {
console.log(toRaw(form));
@ -202,7 +205,7 @@ export default defineComponent({
padding: 46px;
border-radius: 17px;
position: relative;
::v-deep() .ant-form {
::v-deep(.ant-form) {
.title {
font-size: 12px;
font-weight: bold;
@ -322,7 +325,7 @@ export default defineComponent({
}
}
.modal-container {
::v-deep() .modal-dialog {
::v-deep(.modal-dialog) {
.close {
width: 14px;
height: 14px;

View File

@ -96,7 +96,7 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.transaction ::v-deep() .ant-breadcrumb > span:last-child {
.transaction ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.transaction{

View File

@ -61,7 +61,7 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.transaction ::v-deep() .ant-breadcrumb > span:last-child {
.transaction ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.transaction{

View File

@ -231,7 +231,7 @@ export default defineComponent({
});
</script>
<style lang="scss" scoped>
.wallet ::v-deep() .ant-breadcrumb > span:last-child {
.wallet ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.wallet {

View File

@ -111,13 +111,13 @@
bottom: 114px;
display: flex;
justify-content: center;
::v-deep() .ant-pagination-next > .ant-pagination-item-link, ::v-deep() .ant-pagination-prev > .ant-pagination-item-link, ::v-deep() .ant-pagination-item, ::v-deep() .ant-pagination-jump-next-custom-icon, ::v-deep() .ant-pagination-jump-prev-custom-icon{
::v-deep(.ant-pagination-next) > .ant-pagination-item-link, ::v-deep(.ant-pagination-prev) > .ant-pagination-item-link, ::v-deep(.ant-pagination-item), ::v-deep(.ant-pagination-jump-next-custom-icon), ::v-deep(.ant-pagination-jump-prev-custom-icon) {
border: 1px solid #08AE98;
}
::v-deep() .ant-pagination-item-active a{
::v-deep(.ant-pagination-item-active) a{
color: #fff;
}
::v-deep() .ant-pagination-item-active{
::v-deep(.ant-pagination-item-active) {
background-color: #08AE98;
}
}

View File

@ -17,6 +17,10 @@ module.exports = {
// 为生产环境修改配置...
} else {
// 为开发环境修改配置...
config.devServer = {
proxy: 'http://case.sy-my.net'
}
}
}
}