Эх сурвалжийг харах

feat: 新增APP消息通知打开指定webview页面

zhangyuhan 2 жил өмнө
parent
commit
de86d4c3eb

+ 36 - 3
src/views/msgManage/newUserSendingMsg.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="send-msg">
     <h1>群发消息</h1>
-    <Form ref="send" :model="send" :rules="ruleValidate" :label-width="82">
+    <Form ref="send" :model="send" :rules="ruleValidate" :label-width="112">
       <!-- <FormItem label="发送用户:" prop="userGroupName">
         convertlab用户分组同步
         <Button type="primary" size="small" @click="refreshed" style="margin: 0 40px">刷新分组</Button>
@@ -99,6 +99,11 @@
       <FormItem label="发送时间:" prop="sendTime" style="width:600px" v-show="send.sendMode=='1'">
           <date-sigle ref="sigleRef3" :dateType="'datetime'" :formated="'yyyy-MM-dd HH:mm'" :placeholderd="'请选择发送时间'" @startDate="sendDate" :overTime="0"></date-sigle>
       </FormItem>
+      <FormItem label="App端打开菜单:" prop="menuname" style="width:300px">
+        <Select v-model="send.menuname" placeholder="APP端消息进入展示所属菜单" filterable clearable>
+          <Option v-for="item in menuList" :value="item.key" :key="item.key">{{ item.label }}</Option>
+        </Select>
+      </FormItem>
       <FormItem>
           <Button type="primary" :class="{'is-active':isDis}" @click="sendSub('send')" style="width:100px">保存</Button>
           <Button @click="sendCancel('send')" style="width: 100px;margin-left: 8px">取消</Button>
@@ -221,7 +226,8 @@ export default {
         userType: 1,
         sign: 4,
         sendMode: '2',
-        sendTime: this.send.sendMode=='1'?this.send.sendTime:''
+        sendTime: this.send.sendMode=='1'?this.send.sendTime:'',
+        menuname: this.send.menuname
       }
       console.log(obj)
       this.$refs[name].validate((valid) => {
@@ -287,6 +293,32 @@ export default {
       indeterminate: false,
       checkAll: false,
       groupData: [],
+      menuList: [
+        {
+          key: 'search',
+          label: '首页'
+        },
+        {
+          key: 'subscribe',
+          label: '订阅'
+        },
+        {
+          key: 'message',
+          label: '消息'
+        },
+        {
+          key: 'box',
+          label: '百宝箱'
+        },
+        {
+          key: 'me',
+          label: '我的'
+        },
+        {
+          key: 'other',
+          label: '新的 webview'
+        }
+      ],
       send: {
         userGroupId: [],
         userGroupName: [],
@@ -300,7 +332,8 @@ export default {
         showBuoy: 1,
         showContent: '',
         sendMode: '',
-        sendTime: ''
+        sendTime: '',
+        menuname: 'message'
       },
       ruleValidate: {
         userGroupName: [

+ 34 - 5
src/views/msgManage/selfSending.vue

@@ -30,6 +30,11 @@
       <FormItem label="发送时间:" prop="sendTime" style="width:600px" v-show="sendSelf.sendMode=='1'">
         <date-sigle ref="sigleRef3" :dateType="'datetime'" :formated="'yyyy-MM-dd HH:mm'" :placeholderd="'请选择发送时间'" @startDate="sendDate" :overTime="0"></date-sigle>
       </FormItem>
+      <FormItem label="App端打开菜单:" prop="menuname" style="width:300px">
+        <Select v-model="sendSelf.menuname" placeholder="APP端消息进入展示所属菜单" filterable clearable>
+          <Option v-for="item in menuList" :value="item.key" :key="item.key">{{ item.label }}</Option>
+        </Select>
+      </FormItem>
       <FormItem label="添加用户方式:" prop="userAddWay" style="width: 772px;" class="add-p-e">
         <add-type ref="addRef" :userAddWay="detailData.user_add_way" :isSearch="isSearch" :tableData="tableData" @userStatus="userStatus" @selectArr="selectArr"></add-type>
       </FormItem>
@@ -121,6 +126,7 @@ export default {
           this.sendSelf.iosUrl = rote.iosUrl
           this.sendSelf.weChatUrl = rote.weChatUrl
           this.sendSelf.msgType = rote.msg_type
+          this.sendSelf.menuname = rote.menuname
           let arrs = []
           this.boardList.forEach(v => {
             arrs.push(v.template_name)
@@ -240,6 +246,32 @@ export default {
       indeterminate: false,
       checkAll: false,
       detailData: [],
+      menuList: [
+        {
+          key: 'search',
+          label: '首页'
+        },
+        {
+          key: 'subscribe',
+          label: '订阅'
+        },
+        {
+          key: 'message',
+          label: '消息'
+        },
+        {
+          key: 'box',
+          label: '百宝箱'
+        },
+        {
+          key: 'me',
+          label: '我的'
+        },
+        {
+          key: 'other',
+          label: '新的 webview'
+        }
+      ],
       sendSelf: {
         id: this.$route.query.id || 0,
         templateName: '',
@@ -252,12 +284,9 @@ export default {
         sendMode: '',
         sendTime: '',
         userAddWay: '1',
-        link: '',
-        androidUrl: '',
-        iosUrl: '',
-        weChatUrl: '',
         userArr: [],
-        msgType: ''
+        msgType: '',
+        menuname: 'message'
       },
       ruleValidate: {
         templateName: [

+ 9 - 0
src/views/msgManage/sendDetail.vue

@@ -19,6 +19,7 @@
           <span><p>发送时效:</p> {{detailData.send_mode == 1 ? '定时':'实时'}}</span>
           <span><p>发送时间:</p> {{detailData.send_time || '-'}}</span>
           <span><p>发送状态:</p> {{detailData.send_status?sendPro[detailData.send_status - 1].n:'-'}}</span>
+          <span><p>App端打开菜单:</p> {{detailData.menuname? menuMap[detailData.menuname] :'-'}}</span>
           <span><p>最近一次修改时间:</p> {{detailData.update_time || '-'}}</span>
           <span><p>最近一次修改人:</p> {{detailData.update_user || '-'}}</span>
           <span><p>创建时间:</p> {{detailData.createtime || '-'}}</span>
@@ -84,6 +85,14 @@ export default {
   },
   data () {
     return {
+      menuMap: {
+        search: '首页',
+        subscribe: '订阅',
+        message: '消息',
+        box: '百宝箱',
+        me: '我的',
+        other: '新的 webview',
+      },
       detailData: [],
       loading: false,
       allList: {},

+ 36 - 4
src/views/msgManage/sendingMsg.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="send-msg">
     <h1>群发消息</h1>
-    <Form ref="send" :model="send" :rules="ruleValidate" :label-width="82">
+    <Form ref="send" :model="send" :rules="ruleValidate" :label-width="112">
       <FormItem label="用户:" prop="sendway">
           <RadioGroup v-model="send.sendway">
             <Radio label="1">
@@ -117,6 +117,11 @@
       <FormItem label="发送时间:" prop="sendTime" style="width:600px" v-show="send.sendMode=='1'">
           <date-sigle ref="sigleRef3" :dateType="'datetime'" :formated="'yyyy-MM-dd HH:mm'" :placeholderd="'请选择发送时间'" @startDate="sendDate" :overTime="0"></date-sigle>
       </FormItem>
+      <FormItem label="App端打开菜单:" prop="menuname" style="width:300px">
+        <Select v-model="send.menuname" placeholder="APP端消息进入展示所属菜单" filterable clearable>
+          <Option v-for="item in menuList" :value="item.key" :key="item.key">{{ item.label }}</Option>
+        </Select>
+      </FormItem>
       <FormItem>
           <Button type="primary" :class="{'is-active':isDis}" @click="sendSub('send')" style="width:100px">保存</Button>
           <Button @click="sendCancel('send')" style="width: 100px;margin-left: 8px">取消</Button>
@@ -259,7 +264,8 @@ export default {
         sendMode: this.send.sendMode,
         showBuoy: this.send.showBuoy,
         showContent: this.send.showContent,
-        sendTime: this.send.sendMode=='1'?this.send.sendTime:''
+        sendTime: this.send.sendMode=='1'?this.send.sendTime:'',
+        menuname: this.send.menuname
       }
       console.log(obj)
       this.$refs[name].validate((valid) => {
@@ -327,6 +333,32 @@ export default {
       indeterminate: false, //半选
       checkAll: false, // 全选
       groupData: [],
+      menuList: [
+        {
+          key: 'search',
+          label: '首页'
+        },
+        {
+          key: 'subscribe',
+          label: '订阅'
+        },
+        {
+          key: 'message',
+          label: '消息'
+        },
+        {
+          key: 'box',
+          label: '百宝箱'
+        },
+        {
+          key: 'me',
+          label: '我的'
+        },
+        {
+          key: 'other',
+          label: '新的 webview'
+        }
+      ],
       send: {
         userGroupId: [],
         userGroupName: [],
@@ -339,10 +371,10 @@ export default {
         weChatUrl: '',
         showBuoy: 1,
         sendMode: '',
-        sendTime: '',
         sendway:'',
         showContent: '',
-        sendTime: ''
+        sendTime: '',
+        menuname: 'message'
       },
       ruleValidate: {
         sendway: [{ required: true, message: '请选择用户类型', trigger: 'change'}],