7 files modified
2 files added
| | |
| | | <text class="mess">{{Pdata.GroupContent}}</text> |
| | | </view> |
| | | <view class="data-wrap"> |
| | | <!-- <text class="data">{{Pdata.postTime}}</text> --> |
| | | <!-- <text class="data">{{Pdata.time}}</text> --> |
| | | </view> |
| | | |
| | | </view> |
| | |
| | | var datas = this.Pdata; |
| | | //alert(datas.name) |
| | | uni.navigateTo({ |
| | | url: '/pages/groupChat/chatingQZ?chatID=' + datas.id.toString() |
| | | url: '/pages/groupChat/chatingQZ?chatID=' + datas.id.toString()+ '&data=' + JSON.stringify( |
| | | datas) |
| | | }); |
| | | }, |
| | | TXLchating() { |
| | |
| | | // "enablePullDownRefresh": false |
| | | } |
| | | } |
| | | ], |
| | | ,{ |
| | | "path" : "pages/groupChat/newGroup/newGroup", |
| | | "style" : |
| | | { |
| | | "navigationBarTitleText": "新建群组", |
| | | "navigationBarBackgroundColor": "#0BB9C8", |
| | | "navigationBarTextStyle": "white" |
| | | } |
| | | |
| | | } |
| | | ], |
| | | "globalStyle": { |
| | | "navigationBarTextStyle": "black", |
| | | "navigationBarTitleText": "", |
| | |
| | | }, |
| | | onLoad(option) { |
| | | this.recipientId = option.chatID; |
| | | var data = JSON.parse(option.data) |
| | | this.recName = data.GroupName; |
| | | this._getMsg(this.nowpage) |
| | | // this.nextPage() |
| | | }, |
| | |
| | | var that = this; |
| | | that.senId = WxStorage.get("ids"); |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroupc/selectList", |
| | | url:this.$store.state.piAPI + "/chatgroupc/selectList", |
| | | method:"post", |
| | | header: { |
| | | 'content-type': 'application/x-www-form-urlencoded', |
| | |
| | | } |
| | | |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chatgroupc/submit", |
| | | url:this.$store.state.piAPI + "/chatgroupc/submit", |
| | | method:"post", |
| | | data:{ |
| | | senderId: that.senId, |
| | |
| | | |
| | | var that = this; |
| | | uni.request({ |
| | | url:"http://s16s652780.51mypc.cn/api/chat-records/getSingleMessagePage", |
| | | url:this.$store.state.piAPI + "/chat-records/getSingleMessagePage", |
| | | method:"get", |
| | | data:{ |
| | | senderId: WxStorage.get("ids"), |
| | |
| | | <u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959" |
| | | height="100" @change="change" style="background-color:rgba(255,255,255,0.8)"></u-tabs> |
| | | </view> |
| | | <swiper id="swiperBox" :style="{ height: swiperHeight + 'px' }" :current="current" @change="tabsChange"> |
| | | <swiper id="swiperBox" style="height: 100%;" :current="current" @change="tabsChange"> |
| | | <swiper-item class="swiper-item" v-for="(item, indexs) in list" :key="indexs"> |
| | | <view v-if="indexs == 0" class="main"> |
| | | <div> |
| | |
| | | <view v-if="indexs == 2" class="main"> |
| | | <div> |
| | | <div class="m-main"> |
| | | |
| | | <view class="applys" @click="newGroup"> |
| | | <view class="head-wraps"> |
| | | <image src="../../static/qunzhu.png" class="head" /> |
| | | <view v-if=false class="tip">233</view> |
| | | </view> |
| | | <view class="content-wrap"> |
| | | <text class="name">群组创建</text> |
| | | <text class="mess">何事秋风悲画扇</text> |
| | | </view> |
| | | <view class="data-wrap"> |
| | | <text class="data"></text> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- <view class="inTitle">{{Task}}</view> --> |
| | | <view class="inTmain"> |
| | | <contacts v-for="(item,index) in dataListQZ" :key="index" :Pdata="item" :fromW="indexs" |
| | |
| | | |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/chatgroup/selectList", |
| | | method: "POST", |
| | | method: "GET", |
| | | data: { |
| | | senderId: WxStorage.get("ids") |
| | | id: WxStorage.get("ids") |
| | | }, |
| | | contentType:"application/x-www-form-urlencoded", |
| | | success: (res) => { |
| | | var resdata = res.data.data; |
| | | for (var i = 0; i < resdata.length; i++) { |
| | |
| | | } |
| | | } |
| | | that.dataListQZ = resdata; |
| | | that.swiperHeight = resdata.length * 85; |
| | | } |
| | | }); |
| | | } |
| | |
| | | addFriend(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/groupChat/addFriend?' |
| | | }); |
| | | }, |
| | | newGroup(){ |
| | | uni.navigateTo({ |
| | | url: '/pages/groupChat/newGroup/newGroup?' |
| | | }); |
| | | } |
| | | }, |
| | |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .head-wraps { |
| | | position: relative; |
| | | |
| | | |
| | | image { |
| | | width: 96rpx; |
| | | height: 96rpx; |
| | | border-radius: 20upx; |
| | | background-color: rgba(85, 170, 255, 1.0); |
| | | } |
| | | |
| | | .tip { |
| | | position: absolute; |
| | | top: -6rpx; |
| | | left: 68rpx; |
| | | height: 36rpx; |
| | | min-width: 20rpx; |
| | | min-height: 20rpx; |
| | | background-color: rgba(255, 93, 91, 1); |
| | | border-radius: 18rpx; |
| | | padding: 0 6rpx; |
| | | font-size: 24upx; |
| | | color: rgba(255, 228, 49, 1); |
| | | line-height: 36rpx; |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .content-wrap { |
| | | margin-left: 32rpx; |
| New file |
| | |
| | | <template> |
| | | <view class="registerUser"> |
| | | <u-form :model="form" ref="uForm"> |
| | | <u-form-item :label="item.title" :prop="item.froms" label-width="200" :left-icon="item.img" |
| | | :required="item.requireds" v-for="(item, index) in list" :key="index"> |
| | | <u-input v-model="form[item.froms]" :placeholder="item.placeholder" /> |
| | | </u-form-item> |
| | | <u-form-item label="群成员" prop="role" left-icon="man-add" label-width="200" :required="true"> |
| | | <u-checkbox-group @change="checkboxGroupChange"> |
| | | <u-checkbox v-model="item.checked" v-for="(item, index) in friend" :key="index" |
| | | :name="item.friendid"> |
| | | {{item.realName}} |
| | | </u-checkbox> |
| | | </u-checkbox-group> |
| | | </u-form-item> |
| | | </u-form> |
| | | <u-button class="submit" @click="submit"> |
| | | 创建</u-button> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import WxStorage from "../../../static/lib/wxStorage.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | | friend: [], |
| | | list: [{ |
| | | title: '群名称', |
| | | img: 'chat', |
| | | froms: 'groupname', |
| | | requireds: true, |
| | | placeholder: '请输入群名称' |
| | | }, |
| | | { |
| | | title: '群介绍', |
| | | img: 'order', |
| | | froms: 'groupcontent', |
| | | requireds: true, |
| | | placeholder: '请输入群介绍' |
| | | }, |
| | | { |
| | | title: '群公告', |
| | | img: 'bell', |
| | | froms: 'groupnotice', |
| | | requireds: true, |
| | | placeholder: '请输入群公告' |
| | | }, |
| | | ], |
| | | form: { |
| | | groupname: '', |
| | | groupcontent: '', |
| | | groupnotice: '', |
| | | groupmember: '', |
| | | }, |
| | | rules: { |
| | | groupname: [{ |
| | | required: true, |
| | | message: '请输入群名称', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | groupcontent: [{ |
| | | required: true, |
| | | message: '请输入群介绍', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }], |
| | | groupnotice: [{ |
| | | required: true, |
| | | message: '请输入群公告', |
| | | // 可以单个或者同时写两个触发验证方式 |
| | | trigger: ['change', 'blur'], |
| | | }] |
| | | }, |
| | | } |
| | | }, |
| | | onReady() { |
| | | this.$refs.uForm.setRules(this.rules); |
| | | }, |
| | | onLoad() { |
| | | this.getFriend(); |
| | | }, |
| | | methods: { |
| | | submit() { |
| | | var that = this; |
| | | this.$refs.uForm.validate(valid => { |
| | | if (valid) { |
| | | var d = that.form; |
| | | if (d.groupmember == "") { |
| | | uni.showToast({ |
| | | title: '请至少选择一个群成员', |
| | | icon: "none", |
| | | duration: 1000 |
| | | }); |
| | | return; |
| | | } |
| | | d.time = that.currTime(); |
| | | d.groupid = WxStorage.get("ids"); |
| | | uni.request({ |
| | | url: that.$store.state.piAPI + "/chatgroup/submit", |
| | | method: "POST", |
| | | data: d, |
| | | success: (res) => { |
| | | uni.showToast({ |
| | | title: '创建成功', |
| | | icon: "none", |
| | | duration: 1000 |
| | | }); |
| | | |
| | | uni.switchTab({ |
| | | url: '/pages/groupChat/groupChat?' |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | currTime() { |
| | | var date = new Date(); |
| | | var Y = date.getFullYear() + '-'; |
| | | var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'; |
| | | var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '; |
| | | var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'; |
| | | var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':'; |
| | | var s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()); |
| | | return Y + M + D + h + m + s; |
| | | }, |
| | | checkboxGroupChange(e) { |
| | | var arr = ""; |
| | | for (var i = 0; i < e.length; i++) { |
| | | arr += e[i] + ","; |
| | | } |
| | | var obj = arr.substr(0, arr.length - 1); |
| | | this.form.groupmember = obj; |
| | | }, |
| | | getFriend() { |
| | | var that = this; |
| | | uni.request({ |
| | | url: this.$store.state.piAPI + "/friend/page?current=1&size=9999", |
| | | method: "get", |
| | | data: { |
| | | applicant: WxStorage.get("ids") |
| | | }, |
| | | success: (res) => { |
| | | var resdata = res.data.data.records; |
| | | that.friend = resdata; |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .warp { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | } |
| | | |
| | | .rect { |
| | | text-align: center; |
| | | width: 120px; |
| | | height: 120px; |
| | | } |
| | | |
| | | .submit { |
| | | margin: 30rpx 50rpx 50rpx; |
| | | border: none; |
| | | width: 572rpx; |
| | | height: 86rpx; |
| | | line-height: 86rpx; |
| | | box-sizing: border-box; |
| | | border-radius: 15rpx; |
| | | background-color: #14b9c8; |
| | | color: #ffffff; |
| | | |
| | | &::after { |
| | | content: none; |
| | | } |
| | | |
| | | &::before { |
| | | content: none; |
| | | } |
| | | |
| | | &[disabled='true'] { |
| | | background: #e4e4e4; |
| | | font-size: 36rpx; |
| | | font-family: Source Han Sans CN; |
| | | font-weight: 500; |
| | | color: #ffffff; |
| | | } |
| | | } |
| | | |
| | | .registerUser { |
| | | padding: 0 1.2rem; |
| | | } |
| | | </style> |
| | |
| | | if (valid) { |
| | | console.log(this.form); |
| | | var d = this.form; |
| | | var url = 'http://s16s652780.51mypc.cn/api/zc/inster', |
| | | var url = this.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | |
| | | depl(){ |
| | | var that = this; |
| | | uni.request({ |
| | | url: "http://s16s652780.51mypc.cn/api/blade-system/dept/trees", |
| | | url: this.$store.state.piAPI + "/blade-system/dept/trees", |
| | | method: 'get', |
| | | success: (res) => { |
| | | var routerArr = res.data.data; |
| | |
| | | // console.log('验证通过'); |
| | | console.log(this.form); |
| | | var d = this.form; |
| | | var url = 'http://s16s652780.51mypc.cn/api/zc/inster', |
| | | var url = this.$store.state.piAPI + '/zc/inster', |
| | | data = { |
| | | // deptid: , |
| | | password: d.pass, |
| | |
| | | useName: '过客 ', |
| | | }, |
| | | logPath: '', |
| | | // piAPI: 'http://223.82.109.183:2080/api', |
| | | // piAPI: 'http://223.82.109.183:2080/api', |
| | | piAPI: 'http://223.82.109.183:2080/api', |
| | | api: 'http://223.82.109.183:2080/api', |
| | | piAPI: 'http://localhost:81/', |
| | | // piAPI: 'http://localhost:81/', |
| | | // piAPI: 'http://192.168.0.108:81', |
| | | puserName: '', |
| | | puserID: '', |