word.js 3.51 KB
const ATT_TYPE = {
  TEXT: 1,
  IMAGE: 2,
  VEDIO: 3,
  URL: 4,
  MINIPROGRAM: 5,
  FILE: 6,
  ACTIVITY: 7,
  MATERIAL: 10
}
export default {
  data() {
    return {
      btnList: [
        {
          name: '表情',
          funcName: '',
          type: 'expression',
          limitSize: 10
        },
        {
          name: '图片',
          funcName: '',
          type: 'img',
          // togetherItem: [ATT_TYPE.TEXT], //只允许文本和图片
          // limitSize: 10,    //限制图片大小
          // limitNum: 2,      //限制图片数量
          // limitWidth: 10000, //限制单张图片宽度
          // limitHeight: 10000,//限制单张图片高度
          // Isdraggable: true, //图片拖拽
          uploadApi: this.$apis.common.pictureUpload
        },
        {
          name: '昵称',
          type: 'nickname',
          funName: 'nickname'
        },
        {
          name: '活动',
          type: 'activity',
          funName: 'activity',
          funParams: [
            {
              itemName: '权益卡试用',
              itemValue: 3,
              itemType: 'card',
              getInterfaceApi: this.$apis.welcomeword.getCard,
              params: {
                tryAble: 1,
                merchantId: this.$globalState.session.merchantId
              }
            },
            {
              itemName: '权益套餐',
              itemValue: 4,
              itemType: 'package',
              getInterfaceApi: this.$apis.welcomeword.getPackage,
              params: {}
            },
            {
              itemName: '商城券',
              itemValue: 2,
              itemType: 'coupon',
              getInterfaceApi: this.$apis.welcomeword.getMerchant,
              params: {
                discountTypes: [2, 3, 4],
                directionalFlag: 1, // 1所有人可用2定向礼包专用3关联优惠券
                validType: 'valid'
              }
            },
            {
              itemName: '秒杀活动',
              itemValue: 5,
              itemType: 'activity',
              getInterfaceApi: this.$apis.welcomeword.getActivity,
              params: {
                activityStatus: 2,
                currentPage: 1
              }
            },
            {
              itemName: '无忧服务',
              itemValue: 6,
              itemType: 'merchant',
              getInterfaceApi: this.$apis.welcomeword.merchant,
              merchantOpen: {
                merchantOpenApi: this.$apis.welcomeword.merchantOpen,
                params: {
                  merchantId: this.$globalState.session.merchantId
                }
              },
              params: {
                merchantId: this.$globalState.session.merchantId
              }
            }
          ]
        },
        {
          name: '素材',
          type: 'material',
          funName: 'material',
          groupListApi: this.$apis.welcomeword.getGroupListApi,
          materialListApi: this.$apis.welcomeword.getMaterialListApi
          // videoNo: true,
          // pdfNo: true
        }
        // {
        //   name: '模板',
        //   type: 'message',
        //   funName: 'message',
        //   getSearchApi: this.$apis.welcomeword.createdNameList,
        //   templateApi: this.$apis.welcomeword.templatePage,
        //   templateUpdateApi: this.$apis.welcomeword.templateUpdate,
        //   templateSaveApi: this.$apis.welcomeword.templateSave,
        //   templateDetailApi: this.$apis.welcomeword.templateDetail
        // }
      ]
    }
  }
}