修改bug

This commit is contained in:
Gao xiaosong
2020-09-27 23:48:01 +08:00
parent e380e64198
commit 4955c2198a
7 changed files with 33 additions and 34 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2467,7 +2467,7 @@ page {
right: 0;
bottom: 0;
border-bottom: 1rpx solid #f5f5f5;
z-index: 999;
z-index: 99;
height: 1rpx;
}

View File

@ -16,7 +16,6 @@
// import request from "@//api/request";
import {
wxappAuth,
getUser
} from "@/api/user";
import dayjs from "dayjs";
import cookie from "@/utils/store/cookie";
@ -56,7 +55,9 @@
if (this.$store.getters.token) {
// 如果token存在直接进行进页面
console.log('登录状态存在,直接进页面')
this.toLaunch();
this.getUser().finally(() => {
this.toLaunch();
})
return;
}
console.log('进行登录操作')
@ -67,15 +68,14 @@
});
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo"]),
...mapActions(["changeAuthorization", "setUserInfo", "getUser"]),
toLaunch() {
console.log("loading home");
this.changeAuthorization(false);
let redirect = cookie.get('redirect')
if (redirect) {
redirect = redirect.split('/pages')[1]
if (redirect && redirect.indexOf('/pages') != -1) {
this.$yrouter.replace({
path: '/pages' + redirect,
path: '/pages' + redirect.split('/pages')[1],
});
cookie.remove('redirect');
} else {

View File

@ -236,13 +236,14 @@
} else {
// 正常途径进来
that.bargainId = that.$yroute.query.id;
that.bargainUid = parseInt(that.$yroute.query.partake);
that.bargainUid = that.$yroute.query.partake || 0
}
if (!this.bargainUid) {
// url未携带用户uid填上登录用户uid跳转
that.bargainUid = that.userInfo.uid;
}
console.log(this)
// 获取商品详情
that.getBargainDetail();

View File

@ -62,7 +62,7 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg>-->
<input type="text" placeholder="输入手机号码" v-model="account" />
<input name="account" type="text" placeholder="输入手机号码" v-model="account" />
</view>
</view>
<view class="item">
@ -70,7 +70,7 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" />
</svg>-->
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<input name="verifyCode" type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="code">{{ text }}</button>
</view>
@ -80,7 +80,7 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_" />
</svg>-->
<input type="password" placeholder="填写您的登录密码" v-model="password" />
<input name="password" type="password" placeholder="填写您的登录密码" v-model="password" />
</view>
</view>
<!-- #ifndef H5 -->
@ -89,7 +89,7 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg>-->
<input type="text" placeholder="输入邀请码" v-model="inviteCode" />
<input name="inviteCode" type="text" placeholder="输入邀请码" v-model="inviteCode" />
</view>
</view>
<!-- #endif -->

View File

@ -13,7 +13,7 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-phone_" />
</svg> -->
<input type="text" placeholder="输入手机号码" />
<input name="phone" type="text" placeholder="输入手机号码" />
</view>
</view>
<view class="item">
@ -21,13 +21,9 @@
<!-- <svg class="icon" aria-hidden="true">
<use xlink:href="#icon-code_1" />
</svg> -->
<input type="text" placeholder="填写验证码" class="codeIput" />
<button
class="code"
:disabled="disabled"
:class="disabled === true ? 'on' : ''"
@click="code"
>{{ text }}</button>
<input name="" type="text" placeholder="填写验证码" class="codeIput" />
<button class="verifyCode" :disabled="disabled" :class="disabled === true ? 'on' : ''"
@click="code">{{ text }}</button>
</view>
</view>
<view class="item">
@ -50,18 +46,20 @@
</template>
<script>
import sendVerifyCode from "@/mixins/SendVerifyCode";
import sendVerifyCode from "@/mixins/SendVerifyCode";
export default {
name: "Register",
mixins: [sendVerifyCode],
methods: {
code: function() {
this.sendCode();
},
goLogin() {
this.$yrouter.push({ path: "/pages/user/Login/index" });
export default {
name: "Register",
mixins: [sendVerifyCode],
methods: {
code: function () {
this.sendCode();
},
goLogin() {
this.$yrouter.push({
path: "/pages/user/Login/index"
});
}
}
}
};
};
</script>