Commit e2b7b1e1 authored by zhangkaixuan11's avatar zhangkaixuan11

修改 url

parent 75892cf9
...@@ -36,23 +36,23 @@ export default { ...@@ -36,23 +36,23 @@ export default {
} }
}, },
getAgoraConfig: { getAgoraConfig: {
host: Constants.apiPath + '/clazz/agora/config', host: Constants.apiPath + '/clazzapp/agora/config',
params: {} params: {}
}, },
getCurrentLessons: { getCurrentLessons: {
host: Constants.apiPath + '/clazz/student/schedule/current', host: Constants.apiPath + '/clazzapp/student/schedule/current',
params: { params: {
} }
}, },
getRTCToken: (params) => { getRTCToken: (params) => {
return { return {
host: Constants.apiPath + '/clazz/agora/rtctoken', host: Constants.apiPath + '/clazzapp/agora/rtctoken',
params: params params: params
} }
}, },
getRTMToken: (params) => { getRTMToken: (params) => {
return { return {
host: Constants.apiPath + '/clazz/agora/rtmtoken', host: Constants.apiPath + '/clazzapp/agora/rtmtoken',
params: params params: params
} }
}, },
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
}, },
getNetlessToken: (params) => { getNetlessToken: (params) => {
return { return {
host: Constants.apiPath + '/clazz/agora/roomtoken', host: Constants.apiPath + '/clazzapp/agora/roomtoken',
params: params params: params
} }
}, },
...@@ -163,25 +163,25 @@ export default { ...@@ -163,25 +163,25 @@ export default {
}, },
sendLessonActivityInOut:(params)=> {// 进出教室 sendLessonActivityInOut:(params)=> {// 进出教室
return { return {
host: Constants.apiPath + '/clazz/record/sendLessonActivityInOut', host: Constants.apiPath + '/clazzapp/record/sendLessonActivityInOut',
params: params params: params
} }
}, },
studentListHomework:(params)=> {// 作业列表 studentListHomework:(params)=> {// 作业列表
return { return {
host: Constants.apiPath + '/eval/student/listHomework', host: Constants.apiPath + '/evalapp/student/listHomework',
params: params params: params
} }
}, },
submitMediaHomework:(params)=> {// 提交图文作业 submitMediaHomework:(params)=> {// 提交图文作业
return { return {
host: Constants.apiPath + '/eval/student/submitMediaHomework', host: Constants.apiPath + '/evalapp/student/submitMediaHomework',
params: params params: params
} }
}, },
stuGetMediaHomeworkDetail:(id)=> {// 图文作业详情 stuGetMediaHomeworkDetail:(id)=> {// 图文作业详情
return { return {
host: Constants.apiPath + '/eval/student/stuGetMediaHomeworkDetail/'+ id, host: Constants.apiPath + '/evalapp/student/stuGetMediaHomeworkDetail/'+ id,
params: {} params: {}
} }
}, },
......
...@@ -50,8 +50,8 @@ console.log(screenWidth, screenHeight, unitWidth, 'unitWidth'); ...@@ -50,8 +50,8 @@ console.log(screenWidth, screenHeight, unitWidth, 'unitWidth');
let constantsd = { let constantsd = {
// apiPath: 'http://121.36.221.250:3001/mock/11', // apiPath: 'http://121.36.221.250:3001/mock/11',
apiPath: 'https://gateway.chamning.com', // apiPath: 'https://gateway.chamning.com',
// apiPath: 'http://121.36.221.250:8060', apiPath: 'http://121.36.221.250:8160',
imgPath: '', imgPath: '',
StyleSheet, StyleSheet,
token: '', token: '',
...@@ -143,7 +143,6 @@ let constantsd = { ...@@ -143,7 +143,6 @@ let constantsd = {
method: 'GET', method: 'GET',
headers: { headers: {
token: this.token, token: this.token,
tenant:'szVdW4usayB486MYV8U'
}, },
}); });
}, },
...@@ -156,7 +155,6 @@ let constantsd = { ...@@ -156,7 +155,6 @@ let constantsd = {
credentials: 'include', credentials: 'include',
headers: { headers: {
'Content-Type': 'application/x-www-form-urlencoded', 'Content-Type': 'application/x-www-form-urlencoded',
tenant:'szVdW4usayB486MYV8U'
}, },
body: this.getParam(data), body: this.getParam(data),
}); });
...@@ -172,7 +170,6 @@ let constantsd = { ...@@ -172,7 +170,6 @@ let constantsd = {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
apptype: 'ipad', apptype: 'ipad',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -187,7 +184,6 @@ let constantsd = { ...@@ -187,7 +184,6 @@ let constantsd = {
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
apptype: 'ipad', apptype: 'ipad',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -202,7 +198,6 @@ let constantsd = { ...@@ -202,7 +198,6 @@ let constantsd = {
credentials: 'include', credentials: 'include',
headers: { headers: {
token: this.token, token: this.token,
tenant:'szVdW4usayB486MYV8U'
}, },
body: this.getParam(data), body: this.getParam(data),
}); });
...@@ -217,7 +212,6 @@ let constantsd = { ...@@ -217,7 +212,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
'Content-Type': 'application/json', 'Content-Type': 'application/json',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -233,7 +227,6 @@ let constantsd = { ...@@ -233,7 +227,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
'Content-Type': 'application/json', 'Content-Type': 'application/json',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -249,7 +242,6 @@ let constantsd = { ...@@ -249,7 +242,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
'Content-Type': 'application/json', 'Content-Type': 'application/json',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -264,7 +256,6 @@ let constantsd = { ...@@ -264,7 +256,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
'Content-Type': 'application/json', 'Content-Type': 'application/json',
tenant:'szVdW4usayB486MYV8U'
}, },
body: JSON.stringify(data), body: JSON.stringify(data),
}); });
...@@ -302,7 +293,6 @@ let constantsd = { ...@@ -302,7 +293,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
// 'Content-Type': 'multipart/form-data', // 'Content-Type': 'multipart/form-data',
tenant:'szVdW4usayB486MYV8U'
}, },
body: formData, body: formData,
}); });
...@@ -327,7 +317,6 @@ let constantsd = { ...@@ -327,7 +317,6 @@ let constantsd = {
headers: { headers: {
token: this.token, token: this.token,
'Content-Type': 'multipart/form-data', 'Content-Type': 'multipart/form-data',
tenant:'szVdW4usayB486MYV8U'
}, },
body: formData, body: formData,
}); });
...@@ -348,7 +337,6 @@ let fetchCom = async (url,obj)=>{ ...@@ -348,7 +337,6 @@ let fetchCom = async (url,obj)=>{
obj.headers = { obj.headers = {
...obj.headers, ...obj.headers,
token: constantsd.token, token: constantsd.token,
tenant:'szVdW4usayB486MYV8U'
} }
console.log(' obj.headers obj.headers ' ,obj.headers ) console.log(' obj.headers obj.headers ' ,obj.headers )
let res = await fetch(url,obj) let res = await fetch(url,obj)
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"versionCode": 1, "versionCode": 1,
"versionName": "1.0", "versionName": "0.3.2",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }
] ]
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -19,6 +19,11 @@ var LoginCSS = StyleSheet.create( ...@@ -19,6 +19,11 @@ var LoginCSS = StyleSheet.create(
width: Constants.unitWidth * 226, width: Constants.unitWidth * 226,
height: Constants.unitWidth * 46, height: Constants.unitWidth * 46,
}, },
logoText:{
color: '#f9ae2b',
fontSize: Constants.baseFontSize * 2,
height: Constants.unitWidth * 46,
},
tabWrapper: { tabWrapper: {
flexDirection: 'row', flexDirection: 'row',
marginTop: Constants.unitWidth * 60 marginTop: Constants.unitWidth * 60
......
...@@ -16,7 +16,7 @@ import md5 from 'js-md5'; ...@@ -16,7 +16,7 @@ import md5 from 'js-md5';
import RNFetchBlob from 'rn-fetch-blob'; import RNFetchBlob from 'rn-fetch-blob';
import DeviceInfo from 'react-native-device-info'; import DeviceInfo from 'react-native-device-info';
import semver from 'semver' import semver from 'semver'
const appVersion = DeviceInfo.getVersion(); let appVersion = DeviceInfo.getVersion();
// console.log(semver,'RNFetchBlobRNFetchBlobRNFetchBlob') // console.log(semver,'RNFetchBlobRNFetchBlobRNFetchBlob')
console.log(NativeModules.upgrade, 'NativeModulesNativeModules') console.log(NativeModules.upgrade, 'NativeModulesNativeModules')
export default class Login extends Component { export default class Login extends Component {
...@@ -181,6 +181,7 @@ export default class Login extends Component { ...@@ -181,6 +181,7 @@ export default class Login extends Component {
return response.json() return response.json()
}).then(res => { }).then(res => {
console.log(res) console.log(res)
appVersion='0.3.0'
let shouldUpdate = semver.gt(res.data.version, appVersion) let shouldUpdate = semver.gt(res.data.version, appVersion)
if (shouldUpdate) { if (shouldUpdate) {
Alert.alert('发现新版本', '是否下载', Alert.alert('发现新版本', '是否下载',
...@@ -202,7 +203,7 @@ export default class Login extends Component { ...@@ -202,7 +203,7 @@ export default class Login extends Component {
} }
}) })
} else { } else {
this.loginWithPassword();
} }
return; return;
...@@ -383,7 +384,8 @@ export default class Login extends Component { ...@@ -383,7 +384,8 @@ export default class Login extends Component {
Keyboard.dismiss(); Keyboard.dismiss();
}} underlayColor="rgba(255, 255, 255, 0)" activeOpacity={1}> }} underlayColor="rgba(255, 255, 255, 0)" activeOpacity={1}>
<View style={LoginCSS.wrapper}> <View style={LoginCSS.wrapper}>
<Image style={LoginCSS.logo} source={require('../../images/common/logo.png')} /> {/* <Image style={LoginCSS.logo} source={require('../../images/common/logo.png')} /> */}
<Text style={LoginCSS.logoText}>畅凝智慧课堂</Text>
<View style={LoginCSS.tabWrapper}> <View style={LoginCSS.tabWrapper}>
{/* <Button onPress={() => { {/* <Button onPress={() => {
this.setState({ this.setState({
...@@ -425,7 +427,9 @@ export default class Login extends Component { ...@@ -425,7 +427,9 @@ export default class Login extends Component {
</View> </View>
{/* <Image source={require('../../images/common/jiantouba.png')} style={LoginCSS.jiantou}/> */} {/* <Image source={require('../../images/common/jiantouba.png')} style={LoginCSS.jiantou}/> */}
<TextInput maxLength={11} allowFontScaling={false} <TextInput maxLength={11} allowFontScaling={false}
placeholderTextColor="#919191" placeholder="请输入学号v0.3.1" autoComplete="tel"
keyboardType="number-pad"
placeholderTextColor="#919191" placeholder="请输入手机号v0.3.1"
style={LoginCSS.mobile} onChangeText={(text) => { style={LoginCSS.mobile} onChangeText={(text) => {
this.setState({ this.setState({
mobile: text mobile: text
......
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