修改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; right: 0;
bottom: 0; bottom: 0;
border-bottom: 1rpx solid #f5f5f5; border-bottom: 1rpx solid #f5f5f5;
z-index: 999; z-index: 99;
height: 1rpx; height: 1rpx;
} }

View File

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

View File

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

View File

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

View File

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