|
|
|
|
@ -41,6 +41,7 @@ class User extends Component<any, any> {
|
|
|
|
|
isNotRegister: false, // 是否未注册
|
|
|
|
|
isShowCustomerService: false, // 反馈留言
|
|
|
|
|
messageInfo: "", // 用户留言
|
|
|
|
|
isDev: false,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -87,10 +88,14 @@ class User extends Component<any, any> {
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
gourls = (e) => {
|
|
|
|
|
let registerArray = ["/pages/message/message"];
|
|
|
|
|
let url = e.currentTarget.dataset.url;
|
|
|
|
|
let mobile = Taro.getStorageSync("mobile");
|
|
|
|
|
if (url === "/pages/register/register" && mobile) {
|
|
|
|
|
url = "/pages/userInfoDetail/userInfoDetail";
|
|
|
|
|
if (!mobile) {
|
|
|
|
|
if (registerArray.includes(url)) {
|
|
|
|
|
this.setState({ isNotRegister: true });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Taro.navigateTo({
|
|
|
|
|
url,
|
|
|
|
|
@ -110,8 +115,11 @@ class User extends Component<any, any> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showCustomerService = () => {
|
|
|
|
|
let { messageInfo } = this.state;
|
|
|
|
|
console.log("messageInfo", messageInfo);
|
|
|
|
|
let mobile = Taro.getStorageSync("mobile");
|
|
|
|
|
if (!mobile) {
|
|
|
|
|
this.setState({ isNotRegister: true });
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.setState({ isShowCustomerService: true });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -138,6 +146,9 @@ class User extends Component<any, any> {
|
|
|
|
|
onInputTextarea = (e) => {
|
|
|
|
|
this.setState({ messageInfo: e.detail.value });
|
|
|
|
|
};
|
|
|
|
|
closeDev = () => {
|
|
|
|
|
this.setState({ isDev: false });
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
@ -147,10 +158,30 @@ class User extends Component<any, any> {
|
|
|
|
|
messagecount,
|
|
|
|
|
isNotRegister,
|
|
|
|
|
isShowCustomerService,
|
|
|
|
|
isDev,
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Block>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isDev}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="页面正在开发中"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
close={this.closeDev}
|
|
|
|
|
confirm={this.closeDev}
|
|
|
|
|
/>
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isNotRegister}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="暂未授权注册,请点击注册"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
type="1"
|
|
|
|
|
close={this.closeRegisterAlert}
|
|
|
|
|
confirm={this.closeRegisterAlert}
|
|
|
|
|
/>
|
|
|
|
|
<Navbar transparent={true}></Navbar>
|
|
|
|
|
<View className="user_bg_card">
|
|
|
|
|
<Image
|
|
|
|
|
@ -203,7 +234,9 @@ class User extends Component<any, any> {
|
|
|
|
|
<View
|
|
|
|
|
className="block"
|
|
|
|
|
data-url="/pages/instrument_manage/instrument_manage?isback=1"
|
|
|
|
|
onClick={this.gourl}
|
|
|
|
|
onClick={() => {
|
|
|
|
|
this.setState({ isDev: true });
|
|
|
|
|
}}
|
|
|
|
|
>
|
|
|
|
|
<Image
|
|
|
|
|
className="bg_img"
|
|
|
|
|
@ -268,7 +301,7 @@ class User extends Component<any, any> {
|
|
|
|
|
</View>
|
|
|
|
|
<View
|
|
|
|
|
className="block flex aitems"
|
|
|
|
|
onClick={this.gourl}
|
|
|
|
|
onClick={this.gourls}
|
|
|
|
|
data-url="/pages/integral_list/integral_list"
|
|
|
|
|
>
|
|
|
|
|
<View className="img">
|
|
|
|
|
@ -335,17 +368,6 @@ class User extends Component<any, any> {
|
|
|
|
|
</View>
|
|
|
|
|
</View>
|
|
|
|
|
|
|
|
|
|
<PopupAlert
|
|
|
|
|
isShow={isNotRegister}
|
|
|
|
|
title="提示"
|
|
|
|
|
content="暂未授权注册,请点击注册"
|
|
|
|
|
confirmButtonText="确定"
|
|
|
|
|
textAlgin="center"
|
|
|
|
|
type="1"
|
|
|
|
|
close={this.closeRegisterAlert}
|
|
|
|
|
confirm={this.closeRegisterAlert}
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<PopupDrawer
|
|
|
|
|
isShow={isShowCustomerService}
|
|
|
|
|
isClose={true}
|
|
|
|
|
|