Browse Source

调整代码

master
453530270@qq.com 3 years ago
parent
commit
34eeebfa87
  1. 2
      pages/index/components/search.vue
  2. 1
      store/modules/user.js
  3. 1
      utils/request/index.js

2
pages/index/components/search.vue

@ -184,7 +184,7 @@
height: 84rpx; height: 84rpx;
font-size: 28rpx; font-size: 28rpx;
border-radius: 0 10rpx 10rpx 0; border-radius: 0 10rpx 10rpx 0;
background: #fa2209; background: #4399ff;
color: #fff; color: #fff;
display: flex; display: flex;
justify-content: center; justify-content: center;

1
store/modules/user.js

@ -38,6 +38,7 @@ const user = {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
LoginApi.login(data) LoginApi.login(data)
.then(response => { .then(response => {
console.log("login ret:",response)
const result = response.data const result = response.data
loginSuccess(commit, result) loginSuccess(commit, result)
resolve(response) resolve(response)

1
utils/request/index.js

@ -19,7 +19,6 @@ const $http = new request({
// 设置请求头(如果使用报错跨域问题,可能是content-type请求类型和后台那边设置的不一致) // 设置请求头(如果使用报错跨域问题,可能是content-type请求类型和后台那边设置的不一致)
header: { header: {
'Content-Type': 'application/json;charset=utf-8', 'Content-Type': 'application/json;charset=utf-8',
"Access-Control-Allow-Origin":"*"
}, },
// 请求超时时间, 单位ms(默认15000) // 请求超时时间, 单位ms(默认15000)
timeout: 15000, timeout: 15000,

Loading…
Cancel
Save