提交 478f7154 authored 作者: lihuihui's avatar lihuihui

update

上级 7290e2f1
...@@ -19,8 +19,8 @@ export default class LoginAction extends BaseACTION { ...@@ -19,8 +19,8 @@ export default class LoginAction extends BaseACTION {
}) })
} }
login (obj) { login (obj, param) {
return Login.login(obj).then(res => { return Login.login(obj, param).then(res => {
return res || { test: 'OK' } return res || { test: 'OK' }
}).catch(res => { }).catch(res => {
return res || { test: 'OK' } return res || { test: 'OK' }
......
...@@ -15,7 +15,7 @@ export default class LoginAPI extends BaseAPI { ...@@ -15,7 +15,7 @@ export default class LoginAPI extends BaseAPI {
* 登录 * 登录
* @param {[string]} id resource_id * @param {[string]} id resource_id
*/ */
login = (obj) => this.post('/share/v1/live-activity/login', obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }) login = (obj, param) => this.post(`/share/v1/live-activity/login?${param}`, obj, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
/** /**
* 获取用户信息 * 获取用户信息
* @param {[object]} obj * @param {[object]} obj
......
<template> <template>
<div> <div>
<div class="d-padd">
<div class="top-f"> <div class="top-f">
<top-title :title="detailData.name"></top-title> <top-title :title="detailData.name"></top-title>
</div> </div>
...@@ -53,14 +54,20 @@ ...@@ -53,14 +54,20 @@
</div> </div>
</div> </div>
</div> </div>
<div class="tabbar-box">
<tabbar></tabbar>
</div>
</div>
</template> </template>
<script> <script>
import tabbar from '../../components/tabbar.vue'
import { Toast } from 'vant' import { Toast } from 'vant'
import action from '@action' import action from '@action'
import topTitle from '../../components/topTitle.vue' import topTitle from '../../components/topTitle.vue'
export default { export default {
components: { components: {
topTitle topTitle,
tabbar
}, },
data() { data() {
return { return {
...@@ -283,4 +290,13 @@ export default { ...@@ -283,4 +290,13 @@ export default {
} }
} }
} }
.tabbar-box{
width: 100%;
position: fixed;
bottom: 0;
left: 0;
}
.d-padd{
padding-bottom: 1rem;
}
</style> </style>
...@@ -99,48 +99,50 @@ export default { ...@@ -99,48 +99,50 @@ export default {
return false return false
} }
} }
const urlParam = {} let urlParam = ''
const urlParams = {}
if (this.$route.query.activity_id) { if (this.$route.query.activity_id) {
urlParam.activity_id = this.$route.query.activity_id urlParam = `activity_id=${this.$route.query.activity_id}&source=${this.$route.query.source}`
urlParam.source = this.$route.query.source urlParams.activity_id = this.$route.query.activity_id
this.form.accountLogin2.activity_id = this.$route.query.activity_id urlParams.source = this.$route.query.source
this.form.accountLogin2.source = this.$route.query.source // this.form.accountLogin2.activity_id = this.$route.query.activity_id
this.form.accountLogin1.activity_id = this.$route.query.activity_id // this.form.accountLogin2.source = this.$route.query.source
this.form.accountLogin1.source = this.$route.query.source // this.form.accountLogin1.activity_id = this.$route.query.activity_id
// this.form.accountLogin1.source = this.$route.query.source
} }
Toast.loading({ Toast.loading({
message: '加载中...', message: '加载中...',
duration: 3000 duration: 3000
}) })
action.Login.login(this.loginType ? this.form.accountLogin2 : this.form.accountLogin1).then((res) => { action.Login.login(this.loginType ? this.form.accountLogin2 : this.form.accountLogin1, urlParam).then((res) => {
Toast.clear() Toast.clear()
if (res.code === 0) { if (res.code === 0) {
this.$router.push({ this.$router.push({
path: '/details', path: '/details',
query: urlParam query: urlParams
}) })
} }
Toast(res.msg) Toast(res.msg)
}) })
}, },
isLogin() { isLogin() {
const param = { let param = ''
action: 3 const pathParam = {}
}
if (this.$route.query.activity_id) { if (this.$route.query.activity_id) {
param.activity_id = this.$route.query.activity_id param = `activity_id=${this.$route.query.activity_id}&source=${this.$route.query.source}`
param.source = this.$route.query.source pathParam.activity_id = this.$route.query.activity_id
pathParam.source = this.$route.query.source
} }
Toast.loading({ Toast.loading({
message: '加载中...', message: '加载中...',
duration: 3000 duration: 3000
}) })
action.Login.login(param).then((res) => { action.Login.login({ action: 3 }, param).then((res) => {
Toast(res.msg) Toast(res.msg)
if (res.code === 5004) { if (res.code === 5004) {
this.$router.push({ this.$router.push({
path: '/details', path: '/details',
query: param query: pathParam
}) })
// 跳转 // 跳转
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论