|
@@ -86,47 +86,52 @@
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
...mapState(['hasLogin', 'userInfo']),
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
|
|
- console.log("checkSession", res)
|
|
|
|
- if (res.data.data == "INVALID") {
|
|
|
|
- this.isShowAlert = true;
|
|
|
|
- // uni.showModal({
|
|
|
|
- // title: '提示',
|
|
|
|
- // content: '当前登入信息验证失败,是否重新登录?',
|
|
|
|
- // showCancel: true,
|
|
|
|
- // confirmText: '登录',
|
|
|
|
- // success: (e) => {
|
|
|
|
- // if (e.confirm) {
|
|
|
|
- // uni.navigateTo({
|
|
|
|
- // url: '/pages/public/login'
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // },
|
|
|
|
- // fail: () => {},
|
|
|
|
- // complete: () => {}
|
|
|
|
- // })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- var that = this
|
|
|
|
- uni.request({
|
|
|
|
- url: 'https://live.eliangeyun.com/api/v1/device/channellist',
|
|
|
|
- method: 'GET',
|
|
|
|
- success: (res) => {
|
|
|
|
- if (res.statusCode === 200) {
|
|
|
|
- that.videoList = res.data.ChannelList
|
|
|
|
|
|
+ let companyName = uni.getStorageSync('compName1').company;
|
|
|
|
+ console.log(companyName)
|
|
|
|
+ if(companyName == '黑龙江中天昊元贸易有限公司'||companyName == '吉林昊友城元粮食贸易有限公司'){
|
|
|
|
+ this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
|
|
|
|
+ console.log("checkSession", res)
|
|
|
|
+ if (res.data.data == "INVALID") {
|
|
|
|
+ this.isShowAlert = true;
|
|
|
|
+ // uni.showModal({
|
|
|
|
+ // title: '提示',
|
|
|
|
+ // content: '当前登入信息验证失败,是否重新登录?',
|
|
|
|
+ // showCancel: true,
|
|
|
|
+ // confirmText: '登录',
|
|
|
|
+ // success: (e) => {
|
|
|
|
+ // if (e.confirm) {
|
|
|
|
+ // uni.navigateTo({
|
|
|
|
+ // url: '/pages/public/login'
|
|
|
|
+ // })
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+ // fail: () => {},
|
|
|
|
+ // complete: () => {}
|
|
|
|
+ // })
|
|
}
|
|
}
|
|
- },
|
|
|
|
- fail: (res) => {
|
|
|
|
- console.log("fail::", res)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
|
|
|
|
- phone: this.userInfo.phone
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.data.code == 200) {
|
|
|
|
- this.init(res.data.data[0].compId)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
+ var that = this
|
|
|
|
+ uni.request({
|
|
|
|
+ url: 'https://live.eliangeyun.com/api/v1/device/channellist',
|
|
|
|
+ method: 'GET',
|
|
|
|
+ success: (res) => {
|
|
|
|
+ if (res.statusCode === 200) {
|
|
|
|
+ that.videoList = res.data.ChannelList
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ fail: (res) => {
|
|
|
|
+ console.log("fail::", res)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.$api.doRequest('get', '/openServiceInfo/selectCommonCompany', {
|
|
|
|
+ phone: this.userInfo.phone
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.data.code == 200) {
|
|
|
|
+ this.init(res.data.data[0].compId)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
console.log("hasLogin", this.hasLogin)
|
|
console.log("hasLogin", this.hasLogin)
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|