提交 77e2e151 authored 作者: lihuihui's avatar lihuihui

添加loading

上级 963fd204
......@@ -55,6 +55,7 @@
</div>
</template>
<script>
import { Toast } from 'vant'
import action from '@action'
import topTitle from '../../components/topTitle.vue'
export default {
......@@ -88,8 +89,13 @@ export default {
}
},
getDetail() {
Toast.loading({
message: '加载中...',
duration: 3000
})
const id = this.$route.query.id || this.$route.query.activity_id
action.List.getLiveDetail(id).then((res) => {
Toast.clear()
if (res.code === 0) {
this.detailData = res.data.activity_info
this.liveData = res.data.live_info
......@@ -111,8 +117,13 @@ export default {
return year + '-' + month + '-' + date + ' ' + hours + ':' + minute + ':' + second
},
getDetailUser() {
Toast.loading({
message: '加载中...',
duration: 3000
})
const id = this.$route.query.id || this.$route.query.activity_id
action.List.getDetailUser(id).then((res) => {
Toast.clear()
if (res.code === 0) {
this.userList = res.data.list
}
......
......@@ -52,6 +52,7 @@
</template>
<script>
import { Toast } from 'vant'
import action from '@action'
import tabbar from '../../components/tabbar.vue'
export default {
......@@ -68,7 +69,12 @@ export default {
},
methods: {
getList() {
Toast.loading({
message: '加载中...',
duration: 3000
})
action.List.getLiveList().then((res) => {
Toast.clear()
if (res.code === 0) {
this.listData = res.data.list
}
......
......@@ -108,8 +108,12 @@ export default {
this.form.accountLogin1.activity_id = this.$route.query.activity_id
this.form.accountLogin1.source = this.$route.query.source
}
console.log(this.$route.query.activity_id)
Toast.loading({
message: '加载中...',
duration: 3000
})
action.Login.login(this.loginType ? this.form.accountLogin2 : this.form.accountLogin1).then((res) => {
Toast.clear()
if (res.code === 0) {
this.$router.push({
path: '/details',
......@@ -127,7 +131,12 @@ export default {
param.activity_id = this.$route.query.activity_id
param.source = this.$route.query.source
}
Toast.loading({
message: '加载中...',
duration: 3000
})
action.Login.login(param).then((res) => {
Toast(res.msg)
if (res.code === 5004) {
this.$router.push({
path: '/details',
......@@ -144,7 +153,12 @@ export default {
Toast('填写正确信息')
return false
}
Toast.loading({
message: '加载中...',
duration: 3000
})
action.Login.register(this.form.register).then((res) => {
Toast.clear()
Toast(res.msg)
})
},
......@@ -159,7 +173,12 @@ export default {
return false
}
if (this.time.second === 60) {
Toast.loading({
message: '加载中...',
duration: 3000
})
action.Login.getSendCode({ mobile: this.form.register.mobile }).then((res) => {
Toast.clear()
res.code === 0 && (this.tickCode())
Toast(res.msg)
})
......@@ -172,7 +191,12 @@ export default {
return false
}
if (this.time.second === 60) {
Toast.loading({
message: '加载中...',
duration: 3000
})
action.Login.getSendCode({ mobile: this.form.accountLogin2.mobile }).then((res) => {
Toast.clear()
res.code === 0 && (this.tickCode())
Toast(res.msg)
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论