Commit c1e3a70a authored by 18868195926's avatar 18868195926

feat: 获取米雅openId

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