Commit c1e3a70a authored by 18868195926's avatar 18868195926

feat: 获取米雅openId

parent 4c187b40
......@@ -59,21 +59,21 @@ class App extends Component {
navigationBarTextStyle: 'black',
navigationStyle: 'custom',
},
tabBar: {
"color": "#a9b7b7",
"selectedColor": "#11cd6e",
"borderStyle": "black" ,
"list": [
{
"pagePath": "pages/index/index",
"text": "首页"
},
{
"pagePath": "pages/mine/index",
"text": "我的"
}
]
}
// tabBar: {
// "color": "#a9b7b7",
// "selectedColor": "#11cd6e",
// "borderStyle": "black" ,
// "list": [
// {
// "pagePath": "pages/index/index",
// "text": "首页"
// },
// {
// "pagePath": "pages/mine/index",
// "text": "我的"
// }
// ]
// }
}
......
......@@ -21,9 +21,9 @@ class Index extends Component {
webview: '',
SDKVersion: '',
}
componentWillReceiveProps (nextProps) {
console.log(this.props, nextProps)
}
// componentWillReceiveProps (nextProps) {
// console.log('死循环', this.props, nextProps)
// }
componentWillUnmount () { }
componentDidMount() {
......@@ -38,11 +38,6 @@ class Index extends Component {
}, () => {
console.log('我是h5的链接', this.state)
})
setTimeout(()=>{
Taro.navigateTo({
url: '/pages/index/index'
})
}, 2000)
}
componentDidShow () { }
......@@ -75,19 +70,16 @@ class Index extends Component {
if(typeof data.slice !== 'function'){
data = [data]
}
let page = decodeURIComponent(this.launch.page)
//处理H5中不能处理的逻辑:通过首页过渡打开目标页面【打开方式, 1:到首页过渡, 2: 不通过首页过渡(专属活动使用较多)】
setTimeout(()=>{
Taro.navigateTo({
url: '/pages/index/index'
})
}, 2000)
// setTimeout(()=>{
// Taro.navigateTo({
// url: '/pages/index/index'
// })
// }, 2000)
data.forEach(item=>{
if(item.type === 'auth'){
this.props.setUserInfo({
payOpenId: item.data.openId,
clientId: Config.clientId
})
}
})
......
......@@ -9,7 +9,7 @@ const INITIAL_STATE = {
}
export default function userInfo (state = INITIAL_STATE, action) {
console.log('action', action)
console.log('action...', action)
switch (action.type) {
case SET_USER_INFO:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment