Commit 5ed7b658 by zhangxw

修改

1 parent a3ee62e9
...@@ -55,13 +55,11 @@ Component({ ...@@ -55,13 +55,11 @@ Component({
tabIndex, tabIndex,
} = this.data } = this.data
wx.$api.getViewInfo(`#tab-${tabIndex}`, old => { wx.$api.getViewInfo(`#tab-${tabIndex}`, old => {
let oldLeft = old[0].left let oldLeft = old?.[0]?.left
let oldWidth = old.width let oldWidth = old?.width
wx.$api.getViewInfo(`#tab-${index}`, res => { wx.$api.getViewInfo(`#tab-${index}`, res => {
let { let left = res?.[0]?.left
left, let width = res?.[0]?.width
width
} = res[0]
if (tabIndex != index) { if (tabIndex != index) {
let readyLeft = oldLeft > left ? left : oldLeft let readyLeft = oldLeft > left ? left : oldLeft
let readyWidth = oldLeft > left ? oldLeft - left : left - oldLeft let readyWidth = oldLeft > left ? oldLeft - left : left - oldLeft
......
...@@ -128,7 +128,7 @@ Page({ ...@@ -128,7 +128,7 @@ Page({
}) })
} }
const params = app.getTabParams('customerType') const params = app.getTabParams('customer')
let myTabIdx let myTabIdx
if (params) { if (params) {
this.setData({myTabIdx: Number(params.type)}) this.setData({myTabIdx: Number(params.type)})
......
...@@ -21,7 +21,7 @@ const h5Obj = { ...@@ -21,7 +21,7 @@ const h5Obj = {
2测试 2测试
3生产 3生产
*/ */
const index = 0 let index = 0
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo); // console.log(systemInfo);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!