123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- const _Http = getApp().globalData.http,
- dMark = require('../../../../utils/deleteMark');
- Component({
- properties: {
- isGroup: true,
- callBack: {
- type: Function
- }
- },
- data: {
- show: false,
- groupName: ''
- },
- methods: {
- addGroup() {
- this.setData({
- show: true
- })
- },
- inputName({
- detail
- }) {
- this.setData({
- groupName: dMark.queryStr(detail.value)
- })
- },
- handleAddGroup() {
- let name = this.data.groupName.trim()
- if (name.length == 0) return wx.showToast({
- title: '群组名称不可为空',
- icon: "none"
- })
- _Http.basic({
- "id": "20220831164203",
- "version": 1,
- "content": {
- "sys_phonebookgroupid": 0,
- "groupname": name
- }
- }).then(res => {
- if (res.msg != '成功') {
- wx.showToast({
- title: res.data,
- icon: "none"
- })
- }
- this.setData({
- groupName: ""
- })
- let pages = getCurrentPages();
- pages[pages.length - 1].getGroup();
- })
- },
- onClose() {
- this.setData({
- show: false
- })
- },
- handleCallBack() {
- this.triggerEvent('callBack')
- }
- }
- })
|