Browse Source

修复bug

master
前端-胡立永 1 month ago
parent
commit
88b6c2e997
4 changed files with 6 additions and 15 deletions
  1. +1
    -11
      api/http.js
  2. +1
    -1
      pages_login/wxLogin.vue
  3. +3
    -2
      pages_login/wxUserInfo.vue
  4. +1
    -1
      pages_order/huodong-detail.vue

+ 1
- 11
api/http.js View File

@ -20,7 +20,7 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
uni.request({ uni.request({
url: Vue.prototype.$config.baseUrl + uri, url: Vue.prototype.$config.baseUrl + uri,
data: enhanceData(data),
data,
method: method, method: method,
header: { header: {
'X-Access-Token': uni.getStorageSync('token'), 'X-Access-Token': uni.getStorageSync('token'),
@ -71,16 +71,6 @@ function http(uri, data, callback, method = 'GET', showLoading, title) {
return promise return promise
} }
function enhanceData(data) {
const userid = uni.getStorageSync("userid")
if (!data) {
data = {}
}
if (userid) {
data.userid = userid
}
return data
}
export default { export default {
http: http, http: http,

+ 1
- 1
pages_login/wxLogin.vue View File

@ -10,7 +10,7 @@
<!-- 登录按钮 --> <!-- 登录按钮 -->
<view @click="login" class="login-btn"> <view @click="login" class="login-btn">
<uni-icons type="weixin" size="30" color="#fff"></uni-icons>
<!-- <uni-icons type="weixin" size="30" color="#fff"></uni-icons> -->
<text class="wx">微信授权登录</text> <text class="wx">微信授权登录</text>
</view> </view>


+ 3
- 2
pages_login/wxUserInfo.vue View File

@ -237,10 +237,11 @@
align-items: center; align-items: center;
background: $uni--bg-color-btn; background: $uni--bg-color-btn;
color: #fff; color: #fff;
width: 220rpx;
width: 240rpx;
height: 60rpx; height: 60rpx;
border-radius: 30rpx; border-radius: 30rpx;
font-size: 28rpx;
font-size: 26rpx;
flex-shrink: 0;
} }
} }
</style> </style>

+ 1
- 1
pages_order/huodong-detail.vue View File

@ -301,7 +301,7 @@
}) })
}, },
confirmClick(typePrice) { confirmClick(typePrice) {
console.log(this.userInfo);
if(!this.userInfo.nickName || if(!this.userInfo.nickName ||
!this.userInfo.headImage || !this.userInfo.headImage ||
!this.userInfo.phone || !this.userInfo.phone ||


Loading…
Cancel
Save