123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <template>
- <view>
- <view v-for="item in userList" v-if="judge(item.id)" >
-
- <web-view :src="go(item.id,item.nickname)" v-bind:id="item.id" >{{item.id}}</web-view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- userList:{
- /* id:'',
- nickname:'',
- password:'',
- remak1:'',
- username:'',
- remak2:'', */
- },
- list:[],
- lastUserName:'',
- userid:'',
- identify:'',
- bool:'',
- }
- },
- onLoad() {
- this.getUserList();
- },
- computed: {
- sisStageIp: function() {
- return this.$store.state.wholeSituationBackStageIp;
- },
- sisStagePort: function() {
- return this.$store.state.wholeSituationBackStagePort;
- },
- backStageIp: function() {
- return this.$store.state.GlobalLocalIp;
- },
- backStagePort: function() {
- return this.$store.state.GlobalLocalPort;
- },
- windpowerstationNameToId: function() {
- return this.$store.state.windpowerstationNameToId;
- },
- },
- methods: {
- judge(id){
- if(id==this.identify){
- return true;
- }
- else{
- return false;
- }
- },
- go(id,nickname){
- let _this=this;
- if(_this.bool == 1){
- return "https://"+_this.backStageIp+":"+_this.backStagePort+"/websocket/usercontroller/view?send="+_this.userid+"&receive="+id+"&sendname="+_this.lastUserName+"&receivename="+nickname;
- }else{
- return "https://"+ _this.backStageIp+":"+_this.backStagePort+"/websocket/usercontroller/viewoffline?send="+_this.userid+"&receive="+id+"&sendname="+_this.lastUserName+"&receivename="+nickname;
- }
- },
- getUserList() {
- this.lastUserName = uni.getStorageSync('gyeeusername');
- this.userid = uni.getStorageSync('userid');
- let _this = this;
- uni.request({
- url: 'http://' + this.sisStageIp + ':' + this.sisStagePort + '/GyeeuserController/selectUserList',
- data: {},
- method: 'GET',
- success: function(res) {
- _this.userList =res.data;
-
-
- },
- fail: () => {
- _this.tips = '网络错误,小程序端请检查合法域名';
- },
- });
-
- },
- childMethod(id,bool){
- console.log(id);
- this.identify=id;
- this.bool = bool;
- this.getUserList();
- }
-
-
- }
- }
- </script>
- <style>
- </style>
|