1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- import {
- ApiModel
- } from "../../../utils/api";
- const _Http = new ApiModel();
- Component({
- /**
- * 组件的属性列表
- */
- properties: {
- //数据
- itemData: {
- type: Object
- },
- //创建者id
- role: {
- type: Boolean
- },
- //是否显示底部
- isShowBottom: {
- type: Boolean,
- value: true
- }
- },
- /**
- * 组件的初始数据
- */
- data: {},
- /**
- * 组件的方法列表
- */
- methods: {
- change() {
- this.setData({
- role: !this.data.role
- })
- },
- //浏览图片
- preViewImage(e) {
- const {
- type,
- url
- } = e.target.dataset;
- if (type == "emoji") return;
- let urls = [];
- urls.push(url)
- wx.previewImage({
- urls: urls,
- })
- },
- //去查看统计
- toStats(e) {
- const {
- type
- } = e.target.dataset;
- if (type != undefined) wx.navigateTo({
- url: '/pages/chatRoom/stats?type=' + type + '&timsubjectid=' + this.data.itemData.timsubjectid + '&timdialogid=' + this.data.itemData.timdialogid,
- })
- },
- //回复话题
- writBack() {
- // return console.log(this.data.itemData)
- _Http.basic({
- "accesstoken": wx.getStorageSync('userData').token,
- "classname": "system.im.imdialog.imdialog",
- "method": "subjectAnswer",
- "content": {
- "timsubjectid": this.data.itemData.timsubjectid
- }
- }).then(res => {
- console.log("回复话题", res)
- if (res.msg != '成功') return wx.showToast({
- title: res.data,
- icon: "none"
- });
- _Http.basic({
- "accesstoken": wx.getStorageSync('userData').token,
- "classname": "system.im.imdialog.imdialog",
- "method": "quickcontact",
- "content": {
- "tenterprise_userid": this.data.itemData.sendfrom.userid,
- "message": this.data.itemData
- }
- }).then(res => {
- console.log("回复创建一对一聊天", res)
- if (res.msg != '成功') return wx.showToast({
- title: res.data,
- icon: "none"
- });
- wx.navigateTo({
- url: '/pages/chatRoom/dialogbox?id=' + res.data[0].timdialogid,
- })
- })
- })
- }
- }
- })
|