+
-
285
+
{{item.perComments}}
-
3027
+
{{item.perForward}}
-
@@ -32,7 +32,24 @@
-
-
diff --git a/src/common/components/toast/Toast.vue b/src/common/components/toast/Toast.vue
new file mode 100644
index 0000000..9e563ba
--- /dev/null
+++ b/src/common/components/toast/Toast.vue
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
diff --git a/src/common/components/toast/toast.js b/src/common/components/toast/toast.js
new file mode 100644
index 0000000..d017380
--- /dev/null
+++ b/src/common/components/toast/toast.js
@@ -0,0 +1,40 @@
+// 实例化组件
+import Vue from 'vue';
+/* eslint-disable import/no-unresolved */
+import toast from './toast.vue';
+
+const Toast = Vue.extend(toast);
+
+let instance;
+
+// 时间,设置一个定时器 用于关闭toast提示框
+let timer = null;
+// 设置参数
+const toastMsg = (options) => {
+ if (!instance) { // 判断是否实例化
+ // 创建一个实例
+ instance = new Toast();
+ // 挂载到页面
+ document.body.append(instance.$mount().$el);
+ }
+ // 默认时间
+ instance.duration = 1500;
+ if (typeof options === 'string') {
+ instance.message = options;
+ } else if (typeof options === 'object') {
+ instance.type = options.type;
+ instance.message = options.message;
+ instance.duration = options.duration || 1500;
+ } else {
+ return;
+ }
+
+ instance.show = true;
+ timer = setTimeout(() => {
+ instance.show = false;
+ clearTimeout(timer);
+ timer = null;
+ }, instance.duration);
+};
+
+export default toastMsg;
diff --git a/src/common/components/index/TopBarItem.vue b/src/common/components/topbar/TopBarItem.vue
similarity index 100%
rename from src/common/components/index/TopBarItem.vue
rename to src/common/components/topbar/TopBarItem.vue
diff --git a/src/common/components/index/Topbar.vue b/src/common/components/topbar/Topbar.vue
similarity index 74%
rename from src/common/components/index/Topbar.vue
rename to src/common/components/topbar/Topbar.vue
index 9f8ffea..99eec44 100755
--- a/src/common/components/index/Topbar.vue
+++ b/src/common/components/topbar/Topbar.vue
@@ -39,7 +39,6 @@ export default {
diff --git a/src/common/components/index/Videos.vue b/src/common/components/videoList/Videos.vue
similarity index 70%
rename from src/common/components/index/Videos.vue
rename to src/common/components/videoList/Videos.vue
index 3d3f98d..2a8d63e 100755
--- a/src/common/components/index/Videos.vue
+++ b/src/common/components/videoList/Videos.vue
@@ -9,16 +9,15 @@
-
diff --git a/src/views/TPSign.vue b/src/views/TPSign.vue
index 90fbb42..43c2e35 100755
--- a/src/views/TPSign.vue
+++ b/src/views/TPSign.vue
@@ -65,7 +65,7 @@ export default {
this.phone = e.target.value;
const regTel = /^[1][3456789][0-9]{9}$/;
if (!regTel.test(this.phone)) {
- console.log('不附和正则表达式');
+ this.$toast('手机号格式不正确');
this.btnBg = false;
this.disabled = true;
}
@@ -77,15 +77,25 @@ export default {
// eslint-disable-next-line no-useless-escape
const regTel = /^[1][3456789][0-9]{9}$/;
if (this.phone === '') {
- console.log('手机号不能为空');
+ this.$toast({
+ message: '手机号不能为空',
+ type: 'error',
+ duration: 20000,
+ });
this.disabled = true;
this.btnBg = false;
} else if (!regTel.test(this.phone)) {
- console.log('请填写正确的手机号');
+ this.$toast({
+ message: '请填写正确的手机号',
+ type: 'error',
+ });
this.disabled = true;
this.btnBg = false;
} else if (this.password === '') {
- console.log('密码不能为空');
+ this.$toast({
+ message: '密码不能为空',
+ type: 'error',
+ });
this.disabled = true;
this.btnBg = false;
} else {
diff --git a/src/views/index/Index.vue b/src/views/index/Index.vue
index 52b4df5..3f0448a 100755
--- a/src/views/index/Index.vue
+++ b/src/views/index/Index.vue
@@ -1,41 +1,17 @@
-
+
-
+
diff --git a/src/views/me/Me.vue b/src/views/me/Me.vue
index 9a94068..93e9c59 100755
--- a/src/views/me/Me.vue
+++ b/src/views/me/Me.vue
@@ -8,25 +8,25 @@
-
-
爱学习的孩子
-
抖音号:xxxxxx
-
越努力越幸运
+
{{useInfo.name}}
+
抖音号:{{useInfo.sn}}
+
{{useInfo.sub}}
- 23岁
- 中国最富垃圾车
- +添加学校等标签
+ {{useInfo.age}}岁
+ {{useInfo.desc}}
+ +{{useInfo.tag}}
好好学习,天天向上
@@ -40,24 +40,18 @@
-
-
@@ -67,8 +61,10 @@
@@ -206,8 +212,18 @@ export default {
}
}
.tab-wrap {
- .tab-con img {
- width: 30%;
+ background-color: #000;
+ .tab-con {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ .tab-img {
+ width: 33%;
+ &:nth-child(3n) {
+ border-right: 0;
+ }
+ }
}
}
}
diff --git "a/vue 2.5\345\256\236\347\216\260\350\247\206\351\242\221\347\261\273webApp\345\244\247\347\272\262.md" "b/vue 2.5\345\256\236\347\216\260\350\247\206\351\242\221\347\261\273webApp\345\244\247\347\272\262.md"
index 02b16a8..0059973 100644
--- "a/vue 2.5\345\256\236\347\216\260\350\247\206\351\242\221\347\261\273webApp\345\244\247\347\272\262.md"
+++ "b/vue 2.5\345\256\236\347\216\260\350\247\206\351\242\221\347\261\273webApp\345\244\247\347\272\262.md"
@@ -26,33 +26,34 @@
### 首页视频详情:
-### 点击评论分享:
+### 点击评论分享:2
-### 视频自动播放和播放与暂停:
+### 视频自动播放和播放与暂停:2
-### 上滑播放和下拉播放:
+### 上滑播放和下拉播放:3
-### 评论列表:
+### 评论列表:完结
-### 注册登录:
+### 注册登录:3月8日
-### 验证码页面:
+### 验证码页面:3月8日
-### 登录鉴权:
+### 登录鉴权:5
-### 自定义弹出框组件:
+### 自定义弹出框组件:6
-### 用户信息页面:
+### 用户信息页面:7
-### header组件:
+### header组件:8
-### 编辑信息页面:
+### 编辑信息页面:9
-### 我的消息页面:
+### 我的消息页面:10
-### 发布页面获取电脑摄像头:火力全开完成最后的组件:
+### 发布页面获取电脑摄像头:火力全开完成最后的组件:11
+### 打包发布 12
-### 项目总结
+### 项目总结 13
diff --git a/vue.config.js b/vue.config.js
index c773879..8c00bc4 100755
--- a/vue.config.js
+++ b/vue.config.js
@@ -20,16 +20,19 @@ module.exports = {
warnings: false,
errors: true
},
- // host:'0.0.0.0',
- // hot: true,
+ host:'0.0.0.0',
+ hot: true,
// hotOnly: false,
// https: false,
//代理
proxy: {
'/api': {
- target: 'http://192.168.43.154:8080',
+ target: 'http://192.168.88.15:10086',
ws: true,
- changeOrigin: true
+ changeOrigin: true,
+ pathRewrite: {
+ "^/api": "/"
+ }
},
}
diff --git a/yarn.lock b/yarn.lock
index 5c5cd97..9a7232a 100755
--- a/yarn.lock
+++ b/yarn.lock
@@ -1917,6 +1917,13 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.10.1.tgz#e1e82e4f3e999e2cfd61b161280d16a111f86428"
integrity sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==
+axios@^0.21.1:
+ version "0.21.1"
+ resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.1.tgz#22563481962f4d6bde9a76d516ef0e5d3c09b2b8"
+ integrity sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==
+ dependencies:
+ follow-redirects "^1.10.0"
+
babel-eslint@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
@@ -4150,6 +4157,11 @@ follow-redirects@^1.0.0:
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.0.tgz#b42e8d93a2a7eea5ed88633676d6597bc8e384db"
integrity sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==
+follow-redirects@^1.10.0:
+ version "1.13.3"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.13.3.tgz#e5598ad50174c1bc4e872301e82ac2cd97f90267"
+ integrity sha512-DUgl6+HDzB0iEptNQEXLx/KhTmDb8tZUHSeLqpnjpknR70H0nC2t9N73BK6fN4hOvJ84pKlIQVQ4k5FFlBedKA==
+
for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"