|
@@ -1,12 +1,12 @@
|
|
import { Component } from 'react'
|
|
import { Component } from 'react'
|
|
import Taro from '@tarojs/taro'
|
|
import Taro from '@tarojs/taro'
|
|
import { connect } from 'react-redux'
|
|
import { connect } from 'react-redux'
|
|
-import {View, Input, Image} from '@tarojs/components'
|
|
|
|
-import {login,getWorkingHours,setOpenId} from '../../utils/servers/servers';
|
|
|
|
|
|
+import { View, Input, Image } from '@tarojs/components'
|
|
|
|
+import { login, getWorkingHours, setOpenId } from '../../utils/servers/servers';
|
|
|
|
|
|
import { add, minus, asyncAdd } from '../../actions/counter'
|
|
import { add, minus, asyncAdd } from '../../actions/counter'
|
|
|
|
|
|
-import { AtButton,AtIcon,AtModal } from 'taro-ui'
|
|
|
|
|
|
+import { AtButton, AtIcon, AtModal } from 'taro-ui'
|
|
|
|
|
|
import NavBar from '../../components/common/NavBar';
|
|
import NavBar from '../../components/common/NavBar';
|
|
|
|
|
|
@@ -17,33 +17,33 @@ import 'taro-ui/dist/style/components/loading.scss';
|
|
import 'taro-ui/dist/style/components/icon.scss';
|
|
import 'taro-ui/dist/style/components/icon.scss';
|
|
import 'taro-ui/dist/style/components/modal.scss';
|
|
import 'taro-ui/dist/style/components/modal.scss';
|
|
|
|
|
|
-import selectIcon from '../../image/select.png' ;
|
|
|
|
|
|
+import selectIcon from '../../image/select.png';
|
|
|
|
|
|
import './index.less'
|
|
import './index.less'
|
|
|
|
|
|
@connect(({ counter }) => ({
|
|
@connect(({ counter }) => ({
|
|
counter
|
|
counter
|
|
}), (dispatch) => ({
|
|
}), (dispatch) => ({
|
|
- add () {
|
|
|
|
|
|
+ add() {
|
|
dispatch(add())
|
|
dispatch(add())
|
|
},
|
|
},
|
|
- dec () {
|
|
|
|
|
|
+ dec() {
|
|
dispatch(minus())
|
|
dispatch(minus())
|
|
},
|
|
},
|
|
- asyncAdd () {
|
|
|
|
|
|
+ asyncAdd() {
|
|
dispatch(asyncAdd())
|
|
dispatch(asyncAdd())
|
|
}
|
|
}
|
|
}))
|
|
}))
|
|
class Login extends Component {
|
|
class Login extends Component {
|
|
constructor(props) {
|
|
constructor(props) {
|
|
super(props);
|
|
super(props);
|
|
- this.state={
|
|
|
|
- username:'',
|
|
|
|
- password:'',
|
|
|
|
- isOpened:false,
|
|
|
|
- openedType:0,
|
|
|
|
- usernameList:Taro.getStorageSync('usernameList') || [],
|
|
|
|
- rememberPassword:true
|
|
|
|
|
|
+ this.state = {
|
|
|
|
+ username: '',
|
|
|
|
+ password: '',
|
|
|
|
+ isOpened: false,
|
|
|
|
+ openedType: 0,
|
|
|
|
+ usernameList: Taro.getStorageSync('usernameList') || [],
|
|
|
|
+ rememberPassword: true,
|
|
}
|
|
}
|
|
this.login = this.login.bind(this);
|
|
this.login = this.login.bind(this);
|
|
this.authorization = this.authorization.bind(this);
|
|
this.authorization = this.authorization.bind(this);
|
|
@@ -52,7 +52,7 @@ class Login extends Component {
|
|
this.getWorkingHours = this.getWorkingHours.bind(this);
|
|
this.getWorkingHours = this.getWorkingHours.bind(this);
|
|
}
|
|
}
|
|
|
|
|
|
- componentDidShow () {
|
|
|
|
|
|
+ componentDidShow() {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -60,21 +60,21 @@ class Login extends Component {
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- authorization(){
|
|
|
|
|
|
+ authorization() {
|
|
this.setState({
|
|
this.setState({
|
|
- loading:true,
|
|
|
|
|
|
+ loading: true,
|
|
})
|
|
})
|
|
- let _this= this;
|
|
|
|
|
|
+ let _this = this;
|
|
Taro.getSetting({
|
|
Taro.getSetting({
|
|
withSubscriptions: true,
|
|
withSubscriptions: true,
|
|
- success:(res)=>{
|
|
|
|
|
|
+ success: (res) => {
|
|
//console.log(res.subscriptionsSetting,'res.subscriptionsSetting')
|
|
//console.log(res.subscriptionsSetting,'res.subscriptionsSetting')
|
|
- if(res.subscriptionsSetting.mainSwitch){
|
|
|
|
- if(res.subscriptionsSetting['j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I'] === "reject" || res.subscriptionsSetting['pWia-KJPFwDM8ReDu_BOa9FJn31VFc81bp3yxfBmIRI'] === "reject" || res.subscriptionsSetting['vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'] === "reject"){
|
|
|
|
|
|
+ if (res.subscriptionsSetting.mainSwitch) {
|
|
|
|
+ if (res.subscriptionsSetting['j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I'] === "reject" || res.subscriptionsSetting['pWia-KJPFwDM8ReDu_BOa9FJn31VFc81bp3yxfBmIRI'] === "reject" || res.subscriptionsSetting['vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'] === "reject") {
|
|
this.setState({
|
|
this.setState({
|
|
- isOpened:true,
|
|
|
|
- loading:false,
|
|
|
|
- openedType:1
|
|
|
|
|
|
+ isOpened: true,
|
|
|
|
+ loading: false,
|
|
|
|
+ openedType: 1
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -84,36 +84,36 @@ class Login extends Component {
|
|
'j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I',
|
|
'j7WH3EwQnxGxwuV2HwmJhryxySPE8vOiV5cVOpp-42I',
|
|
'vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'
|
|
'vo28uzT2sLS-9ioroNyZbMSvu0mMvf6le2pDZVN891U'
|
|
], //此处写在后台获取的模板ID,可以写多个模板ID,看自己的需求
|
|
], //此处写在后台获取的模板ID,可以写多个模板ID,看自己的需求
|
|
- success: function (s) {
|
|
|
|
- _this.setState({
|
|
|
|
- loading:false,
|
|
|
|
- })
|
|
|
|
- _this.login();
|
|
|
|
|
|
+ success: function (s) {
|
|
|
|
+ _this.setState({
|
|
|
|
+ loading: false,
|
|
|
|
+ })
|
|
|
|
+ _this.login();
|
|
},
|
|
},
|
|
fail: function (err) {
|
|
fail: function (err) {
|
|
_this.setState({
|
|
_this.setState({
|
|
- loading:false,
|
|
|
|
|
|
+ loading: false,
|
|
})
|
|
})
|
|
//console.log(err)
|
|
//console.log(err)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.setState({
|
|
this.setState({
|
|
- isOpened:true,
|
|
|
|
- loading:false,
|
|
|
|
|
|
+ isOpened: true,
|
|
|
|
+ loading: false,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- fail:()=>{
|
|
|
|
|
|
+ fail: () => {
|
|
this.setState({
|
|
this.setState({
|
|
- loading:false,
|
|
|
|
|
|
+ loading: false,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- login(){
|
|
|
|
- if(!this.state.username){
|
|
|
|
|
|
+ login() {
|
|
|
|
+ if (!this.state.username) {
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
title: '请输入用户名',
|
|
title: '请输入用户名',
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -121,7 +121,7 @@ class Login extends Component {
|
|
})
|
|
})
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if(!this.state.password){
|
|
|
|
|
|
+ if (!this.state.password) {
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
title: '请输入密码',
|
|
title: '请输入密码',
|
|
icon: 'none',
|
|
icon: 'none',
|
|
@@ -130,87 +130,87 @@ class Login extends Component {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
- loading:true,
|
|
|
|
|
|
+ loading: true,
|
|
})
|
|
})
|
|
login({
|
|
login({
|
|
- username:this.state.username,
|
|
|
|
- password:this.state.password
|
|
|
|
- }).then((msg)=>{
|
|
|
|
|
|
+ username: this.state.username,
|
|
|
|
+ password: this.state.password
|
|
|
|
+ }).then((msg) => {
|
|
this.setState({
|
|
this.setState({
|
|
- loading:false
|
|
|
|
|
|
+ loading: false
|
|
});
|
|
});
|
|
- if(!msg.data.openId){
|
|
|
|
|
|
+ if (!msg.data.openId) {
|
|
Taro.login({
|
|
Taro.login({
|
|
- success: (res)=>{
|
|
|
|
|
|
+ success: (res) => {
|
|
setOpenId({
|
|
setOpenId({
|
|
- code:res.code,
|
|
|
|
- }).then(v=>{
|
|
|
|
- if(v.error.length === 0){
|
|
|
|
- this.setUsernameList(this.state.username,this.state.password);
|
|
|
|
|
|
+ code: res.code,
|
|
|
|
+ }).then(v => {
|
|
|
|
+ if (v.error.length === 0) {
|
|
|
|
+ this.setUsernameList(this.state.username, this.state.password);
|
|
Taro.eventCenter.trigger('getStorageSync');
|
|
Taro.eventCenter.trigger('getStorageSync');
|
|
this.getWorkingHours(msg.data.departmentId);
|
|
this.getWorkingHours(msg.data.departmentId);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
Taro.showToast({
|
|
Taro.showToast({
|
|
- title:v.error[0].message,
|
|
|
|
- icon:'none',
|
|
|
|
|
|
+ title: v.error[0].message,
|
|
|
|
+ icon: 'none',
|
|
})
|
|
})
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- fail:()=>{
|
|
|
|
- Taro.showToast({title:'系统错误,请稍后重试'})
|
|
|
|
|
|
+ fail: () => {
|
|
|
|
+ Taro.showToast({ title: '系统错误,请稍后重试' })
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- }else{
|
|
|
|
- this.setUsernameList(this.state.username,this.state.password);
|
|
|
|
|
|
+ } else {
|
|
|
|
+ this.setUsernameList(this.state.username, this.state.password);
|
|
Taro.eventCenter.trigger('getStorageSync');
|
|
Taro.eventCenter.trigger('getStorageSync');
|
|
this.getWorkingHours(msg.data.departmentId);
|
|
this.getWorkingHours(msg.data.departmentId);
|
|
}
|
|
}
|
|
- }).catch((err)=>{
|
|
|
|
|
|
+ }).catch((err) => {
|
|
//console.log(err)
|
|
//console.log(err)
|
|
this.setState({
|
|
this.setState({
|
|
- loading:false
|
|
|
|
|
|
+ loading: false
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- getWorkingHours(depId){
|
|
|
|
|
|
+ getWorkingHours(depId) {
|
|
getWorkingHours({
|
|
getWorkingHours({
|
|
depId
|
|
depId
|
|
- }).then((msg)=>{
|
|
|
|
- if(msg.error.length === 0){
|
|
|
|
|
|
+ }).then((msg) => {
|
|
|
|
+ if (msg.error.length === 0) {
|
|
let obj = Taro.getStorageSync('userInfor');
|
|
let obj = Taro.getStorageSync('userInfor');
|
|
obj.workTimeInfor = msg.data;
|
|
obj.workTimeInfor = msg.data;
|
|
Taro.setStorageSync('userInfor', obj);
|
|
Taro.setStorageSync('userInfor', obj);
|
|
Taro.switchTab({
|
|
Taro.switchTab({
|
|
url: '/pages/punchClock/index',
|
|
url: '/pages/punchClock/index',
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
- Taro.showToast({title:msg.error[0].message,icon:'none'})
|
|
|
|
|
|
+ } else {
|
|
|
|
+ Taro.showToast({ title: msg.error[0].message, icon: 'none' })
|
|
}
|
|
}
|
|
- }).catch((err)=>{
|
|
|
|
|
|
+ }).catch((err) => {
|
|
// console.log(err)
|
|
// console.log(err)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- setUsernameList(username,password){
|
|
|
|
- if(!this.state.rememberPassword){
|
|
|
|
|
|
+ setUsernameList(username, password) {
|
|
|
|
+ if (!this.state.rememberPassword) {
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
- let index = usernameList.findIndex(v=>v.username === username);
|
|
|
|
- if(index !== -1){
|
|
|
|
- usernameList.splice(index,1)
|
|
|
|
|
|
+ let index = usernameList.findIndex(v => v.username === username);
|
|
|
|
+ if (index !== -1) {
|
|
|
|
+ usernameList.splice(index, 1)
|
|
}
|
|
}
|
|
Taro.setStorageSync('usernameList', usernameList);
|
|
Taro.setStorageSync('usernameList', usernameList);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
- let index = usernameList.findIndex(v=>v.username === username);
|
|
|
|
- if(index === -1){
|
|
|
|
|
|
+ let index = usernameList.findIndex(v => v.username === username);
|
|
|
|
+ if (index === -1) {
|
|
usernameList.push({
|
|
usernameList.push({
|
|
username,
|
|
username,
|
|
password
|
|
password
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
- usernameList[index]={
|
|
|
|
|
|
+ } else {
|
|
|
|
+ usernameList[index] = {
|
|
username,
|
|
username,
|
|
password
|
|
password
|
|
}
|
|
}
|
|
@@ -219,25 +219,25 @@ class Login extends Component {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- getUsernameList(value = this.state.username){
|
|
|
|
|
|
+ getUsernameList(value = this.state.username) {
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
let usernameList = Taro.getStorageSync('usernameList') || [];
|
|
let arr = [];
|
|
let arr = [];
|
|
- for(let i of usernameList){
|
|
|
|
- if(i.username.indexOf(value) !== -1){
|
|
|
|
|
|
+ for (let i of usernameList) {
|
|
|
|
+ if (i.username.indexOf(value) !== -1) {
|
|
arr.push(i)
|
|
arr.push(i)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.setState({
|
|
this.setState({
|
|
- usernameList:arr,
|
|
|
|
- isopenUsernameList:true
|
|
|
|
|
|
+ usernameList: arr,
|
|
|
|
+ isopenUsernameList: true
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
- render () {
|
|
|
|
|
|
+ render() {
|
|
return (
|
|
return (
|
|
- <View className='login' onClick={()=>{
|
|
|
|
|
|
+ <View className='login' onClick={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- isopenUsernameList:false
|
|
|
|
|
|
+ isopenUsernameList: false
|
|
})
|
|
})
|
|
}}>
|
|
}}>
|
|
<NavBar
|
|
<NavBar
|
|
@@ -245,32 +245,33 @@ class Login extends Component {
|
|
title='科德集团'
|
|
title='科德集团'
|
|
background='#0000'
|
|
background='#0000'
|
|
color='#FFF'
|
|
color='#FFF'
|
|
- onHome={()=>{}}
|
|
|
|
|
|
+ onHome={() => { }}
|
|
/>
|
|
/>
|
|
<View className='welcome'>
|
|
<View className='welcome'>
|
|
- <Image src={BG} className='bg' mode='heightFix'/>
|
|
|
|
|
|
+ <Image src={BG} className='bg' mode='heightFix' />
|
|
<View className='welcomeTitle'>科德科技服务系统</View>
|
|
<View className='welcomeTitle'>科德科技服务系统</View>
|
|
<View className='welcomeTitle'>欢迎您!</View>
|
|
<View className='welcomeTitle'>欢迎您!</View>
|
|
</View>
|
|
</View>
|
|
|
|
+ <privacy />
|
|
<View className='loginContent'>
|
|
<View className='loginContent'>
|
|
<View className='loginItem'>
|
|
<View className='loginItem'>
|
|
- <AtIcon value='user' size='20' color='#999999'/>
|
|
|
|
|
|
+ <AtIcon value='user' size='20' color='#999999' />
|
|
<View className='usernameContent'>
|
|
<View className='usernameContent'>
|
|
<Input
|
|
<Input
|
|
- style={{marginLeft:'15px',width:'100%'}}
|
|
|
|
|
|
+ style={{ marginLeft: '15px', width: '100%' }}
|
|
type='text'
|
|
type='text'
|
|
placeholder='请输入您的系统账户'
|
|
placeholder='请输入您的系统账户'
|
|
value={this.state.username}
|
|
value={this.state.username}
|
|
- onInput={(v)=>{
|
|
|
|
|
|
+ onInput={(v) => {
|
|
this.setState({
|
|
this.setState({
|
|
username: v.detail.value
|
|
username: v.detail.value
|
|
})
|
|
})
|
|
this.getUsernameList(v.detail.value);
|
|
this.getUsernameList(v.detail.value);
|
|
}}
|
|
}}
|
|
- onFocus={()=>{
|
|
|
|
|
|
+ onFocus={() => {
|
|
this.getUsernameList();
|
|
this.getUsernameList();
|
|
}}
|
|
}}
|
|
- onBlur={()=>{
|
|
|
|
|
|
+ onBlur={() => {
|
|
// this.setState({
|
|
// this.setState({
|
|
// isopenUsernameList:false
|
|
// isopenUsernameList:false
|
|
// })
|
|
// })
|
|
@@ -279,17 +280,17 @@ class Login extends Component {
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
<View className='usernameListContent'>
|
|
<View className='usernameListContent'>
|
|
- {this.state.isopenUsernameList && this.state.usernameList.length >0 ? <View className='usernameList'>
|
|
|
|
|
|
+ {this.state.isopenUsernameList && this.state.usernameList.length > 0 ? <View className='usernameList'>
|
|
{
|
|
{
|
|
- this.state.usernameList.map((v,k)=>(
|
|
|
|
- <View key={k} className='usernameItem' onClick={()=>{
|
|
|
|
|
|
+ this.state.usernameList.map((v, k) => (
|
|
|
|
+ <View key={k} className='usernameItem' onClick={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- username:v.username,
|
|
|
|
- password:v.password,
|
|
|
|
- isopenUsernameList:false
|
|
|
|
|
|
+ username: v.username,
|
|
|
|
+ password: v.password,
|
|
|
|
+ isopenUsernameList: false
|
|
})
|
|
})
|
|
}}>
|
|
}}>
|
|
- <AtIcon value='user' size='20' color='#c6c4c4'/>
|
|
|
|
|
|
+ <AtIcon value='user' size='20' color='#c6c4c4' />
|
|
<View className='value'>
|
|
<View className='value'>
|
|
<View className='name'>{v.username}</View>
|
|
<View className='name'>{v.username}</View>
|
|
<View className='password'>*******</View>
|
|
<View className='password'>*******</View>
|
|
@@ -300,13 +301,13 @@ class Login extends Component {
|
|
</View> : null}
|
|
</View> : null}
|
|
</View>
|
|
</View>
|
|
<View className='loginItem'>
|
|
<View className='loginItem'>
|
|
- <AtIcon value='lock' size='20' color='#999999'/>
|
|
|
|
|
|
+ <AtIcon value='lock' size='20' color='#999999' />
|
|
<Input
|
|
<Input
|
|
- style={{marginLeft:'15px',width:'100%'}}
|
|
|
|
|
|
+ style={{ marginLeft: '15px', width: '100%' }}
|
|
type='password'
|
|
type='password'
|
|
placeholder='请输入密码'
|
|
placeholder='请输入密码'
|
|
value={this.state.password}
|
|
value={this.state.password}
|
|
- onInput={(v)=>{
|
|
|
|
|
|
+ onInput={(v) => {
|
|
this.setState({
|
|
this.setState({
|
|
password: v.detail.value
|
|
password: v.detail.value
|
|
})
|
|
})
|
|
@@ -314,16 +315,16 @@ class Login extends Component {
|
|
/>
|
|
/>
|
|
</View>
|
|
</View>
|
|
<View className='rememberPassword'>
|
|
<View className='rememberPassword'>
|
|
- <View className='selectContent' onClick={()=>{
|
|
|
|
|
|
+ <View className='selectContent' onClick={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- rememberPassword:!this.state.rememberPassword
|
|
|
|
|
|
+ rememberPassword: !this.state.rememberPassword
|
|
})
|
|
})
|
|
}}>
|
|
}}>
|
|
- <Image src={selectIcon} className='selectIcon' style={{visibility:this.state.rememberPassword ? "visible" : "hidden"}}/>
|
|
|
|
|
|
+ <Image src={selectIcon} className='selectIcon' style={{ visibility: this.state.rememberPassword ? "visible" : "hidden" }} />
|
|
</View>
|
|
</View>
|
|
记住密码
|
|
记住密码
|
|
</View>
|
|
</View>
|
|
- <AtButton type='primary' circle loading={this.state.loading} onClick={this.authorization}>登录</AtButton>
|
|
|
|
|
|
+ <AtButton type='primary' circle loading={this.state.loading} onClick={this.authorization}>登录</AtButton>
|
|
<View className='tips'>
|
|
<View className='tips'>
|
|
暂无账号?请联系管理员进行添加
|
|
暂无账号?请联系管理员进行添加
|
|
</View>
|
|
</View>
|
|
@@ -336,25 +337,25 @@ class Login extends Component {
|
|
title='提醒'
|
|
title='提醒'
|
|
cancelText='取消'
|
|
cancelText='取消'
|
|
confirmText='确认'
|
|
confirmText='确认'
|
|
- onClose={()=>{
|
|
|
|
|
|
+ onClose={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- isOpened:false,
|
|
|
|
- openedType:0,
|
|
|
|
|
|
+ isOpened: false,
|
|
|
|
+ openedType: 0,
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
- onCancel={()=>{
|
|
|
|
|
|
+ onCancel={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- isOpened:false,
|
|
|
|
- openedType:0
|
|
|
|
|
|
+ isOpened: false,
|
|
|
|
+ openedType: 0
|
|
})
|
|
})
|
|
}}
|
|
}}
|
|
- onConfirm={()=>{
|
|
|
|
|
|
+ onConfirm={() => {
|
|
this.setState({
|
|
this.setState({
|
|
- isOpened:false,
|
|
|
|
- openedType:0
|
|
|
|
- },()=>{
|
|
|
|
|
|
+ isOpened: false,
|
|
|
|
+ openedType: 0
|
|
|
|
+ }, () => {
|
|
Taro.openSetting({
|
|
Taro.openSetting({
|
|
- success:(value)=> {
|
|
|
|
|
|
+ success: (value) => {
|
|
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|