This commit is contained in:
郑茂强 2019-02-13 11:19:18 +08:00
parent 2887be11e9
commit 0df437e7bc
3 changed files with 9 additions and 8 deletions

View File

@ -98,6 +98,10 @@ class VoucherPoster extends Component {
this.props.onPassDataToChild(false) this.props.onPassDataToChild(false)
} }
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
this.setState({
voucherName: nextProps.userName,
voucherPhone: nextProps.userPhone,
})
} }
componentDidMount() { componentDidMount() {
@ -111,9 +115,6 @@ class VoucherPoster extends Component {
componentDidHide() { } componentDidHide() { }
render() { render() {
return ( return (
<View className='voucherEventPopUpComponent'> <View className='voucherEventPopUpComponent'>
{/* <!-- The Modal --> */} {/* <!-- The Modal --> */}

View File

@ -1,6 +1,6 @@
//const LOCALURL = "http://192.168.1.230/" const LOCALURL = "http://192.168.1.230/"
const LOCALURL = "https://www.ihome6.com/" //const LOCALURL = "https://www.ihome6.com/"
const URL = { const URL = {
Base: LOCALURL, Base: LOCALURL,
Login: LOCALURL + 'Applet-login', //登入接口 Login: LOCALURL + 'Applet-login', //登入接口

View File

@ -31,7 +31,7 @@ export default function login() {
success(res) { success(res) {
if (res.code) { if (res.code) {
// 发起网络请求 // 发起网络请求
// console.log('手机端微信code',res.code) console.log('手机端微信code',res.code)
Taro.request({ Taro.request({
url: URL.Login, url: URL.Login,
method: 'POST', method: 'POST',
@ -44,7 +44,7 @@ export default function login() {
} }
}) })
.then(response => { .then(response => {
if (response.data.err_code === 888) { if (response.data.err_code === 0) {
console.log('微信登入成功', response) console.log('微信登入成功', response)
Taro.showToast({ Taro.showToast({
title: '微信登入成功', title: '微信登入成功',