抖音版适配

master
yujialong 6 months ago
parent eadeccee20
commit 0f1a67fa54
  1. 24
      apis/request.js
  2. 10
      pages.json
  3. 11
      pages/index/index.vue
  4. 5
      pages/workbench/workbench.vue

@ -1,5 +1,6 @@
import config from '@/config/request'
let HTTP_COUNT = 0 // loading次数
let logouted = 0
const request = options => {
HTTP_COUNT++
@ -29,18 +30,21 @@ const request = options => {
if (status === 200) {
resolve(data)
} else if (status == 401) {
if (!logouted) {
// 登录过期
uni.clearStorageSync()
uni.showToast({
title: message,
icon: 'none'
})
setTimeout(() => {
uni.navigateTo({
url: '../login/login'
})
}, 1500)
// uni.clearStorageSync()
// uni.showToast({
// title: message,
// icon: 'none'
// })
// setTimeout(() => {
// uni.navigateTo({
// url: '../login/login'
// })
// }, 1500)
reject(data)
logouted = 1
}
} else if (status == 10028 || status == 10014) { // 用户不存在
resolve(data)
} else if (!status) {

@ -1,18 +1,18 @@
{
"pages": [
{
"path" : "pages/login/login",
"path" : "pages/index/index",
"style" :
{
"navigationBarTitleText": "登录",
"navigationStyle": "custom",
"enablePullDownRefresh": false
}
},
{
"path" : "pages/index/index",
"path" : "pages/login/login",
"style" :
{
"navigationStyle": "custom",
"navigationBarTitleText": "登录",
"enablePullDownRefresh": false
}
},
@ -275,7 +275,7 @@
"current": 0, //list
"list": [{
"name": "test", //
"path": "pages/login/login" //
"path": "pages/index/index" //
}]
},
"globalStyle": {

@ -112,8 +112,14 @@
onShow() {
this.keyword = ''
this.per = true
//
if (uni.getStorageSync('token')) {
this.getInfo()
this.getShopCart()
} else {
this.getTags()
this.getProducts()
}
},
methods: {
//
@ -126,7 +132,7 @@
},
//
getAuth() {
uni.getStorageSync('token') && getUserRolesPermissionMenu({
getUserRolesPermissionMenu({
teamId: this.list.find(e => e.teamId == this.teamId).partnerClassificationId,
platformId: 4
}).then(({ permissionMenu }) => {
@ -323,6 +329,9 @@
.all {
font-size: 24rpx;
border-radius: 20px;
&::after {
border: none;
}
}
.block {
margin: 20rpx 0;

@ -147,12 +147,13 @@
marketingServiceCharge: 0,
projectBenefit: 0,
},
headerTop: 0
headerTop: '8px',
}
},
onShow() {
// #ifdef MP-WEIXIN
this.headerTop = uni.getMenuButtonBoundingClientRect().top + 8 + 'px'
console.log(44, this.headerTop)
// #endif
this.per = true
this.getInfo()
},

Loading…
Cancel
Save