Commit 090809a4 by xinla

H5优化

1 parent 7f513d26
# 测试环境配置
ENV = 'test'
# 基础api
VUE_APP_BASE_API = 'http://demo.linkwechat.cn/api'
# 路由基础路径
VUE_APP_BASE_URL = '/'
...@@ -13,13 +13,11 @@ const routes = [ ...@@ -13,13 +13,11 @@ const routes = [
title: '首页' title: '首页'
} }
}, },
// 聊天素材
{ {
path: '/chat', path: '/chat',
name: 'chat', name: 'chat',
// route level code-splitting component: () => import('../views/chat'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ '../views/chat'),
meta: { meta: {
title: 'chat' title: 'chat'
} }
...@@ -28,11 +26,7 @@ const routes = [ ...@@ -28,11 +26,7 @@ const routes = [
{ {
path: '/portrait', path: '/portrait',
name: 'portrait', name: 'portrait',
// route level code-splitting component: () => import('../views/portrait/index'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ '../views/portrait/index'),
meta: { meta: {
title: 'portrait' title: 'portrait'
} }
...@@ -41,13 +35,7 @@ const routes = [ ...@@ -41,13 +35,7 @@ const routes = [
{ {
path: '/customerDetail', path: '/customerDetail',
name: 'customerDetail', name: 'customerDetail',
// route level code-splitting component: () => import('../views/portrait/customerDetail.vue'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "about" */ '../views/portrait/customerDetail.vue'
),
hidden: true, hidden: true,
meta: { meta: {
title: '' title: ''
...@@ -57,11 +45,7 @@ const routes = [ ...@@ -57,11 +45,7 @@ const routes = [
{ {
path: '/community', path: '/community',
name: 'community', name: 'community',
// route level code-splitting component: () => import('../views/portrait/community.vue'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ '../views/portrait/community.vue'),
hidden: true, hidden: true,
meta: { meta: {
title: '' title: ''
...@@ -71,35 +55,22 @@ const routes = [ ...@@ -71,35 +55,22 @@ const routes = [
{ {
path: '/groupCode', path: '/groupCode',
name: 'groupCode', name: 'groupCode',
// route level code-splitting component: () => import('../views/groupCode/index'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ '../views/groupCode/index'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '',
noAuth: true noAuth: true
} }
}, },
// 群活码扫描跳转页面 // 标签建群+群sop
{ {
path: '/task', path: '/task',
// name: 'task', // name: 'task',
// route level code-splitting component: () => import('../views/communityOperating/task/index'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "about" */ '../views/communityOperating/task/index'
),
children: [ children: [
{ {
path: '', path: '',
component: () => component: () => import('../views/communityOperating/task/list'),
import(
/* webpackChunkName: "about" */ '../views/communityOperating/task/list'
),
hidden: true, hidden: true,
meta: { meta: {
title: '' title: ''
...@@ -109,10 +80,7 @@ const routes = [ ...@@ -109,10 +80,7 @@ const routes = [
{ {
path: 'state', path: 'state',
name: 'taskState', name: 'taskState',
component: () => component: () => import('../views/communityOperating/task/state.vue'),
import(
/* webpackChunkName: "about" */ '../views/communityOperating/task/state.vue'
),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '',
...@@ -126,17 +94,11 @@ const routes = [ ...@@ -126,17 +94,11 @@ const routes = [
noAuth: true noAuth: true
} }
}, },
// 群活码扫描跳转页面 // 关键词群
{ {
path: '/keywords', path: '/keywords',
name: 'keywords', name: 'keywords',
// route level code-splitting component: () => import('../views/communityOperating/keywords/index'),
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(
/* webpackChunkName: "about" */ '../views/communityOperating/keywords/index'
),
hidden: true, hidden: true,
meta: { meta: {
title: '' title: ''
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div> <div>
<div class="task-wrapper"> <div class="task-wrapper">
<div class="header"> <div class="header">
<span> 老客标签建群 </span> <span> 标签建群 </span>
<div>{{ task.createTime }}</div> <div>{{ task.createTime }}</div>
</div> </div>
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
{{ task.welcomeMsg }} {{ task.welcomeMsg }}
</div> </div>
<div class="copy-wrapper" v-show="showCopy"> <div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg"> 复制 </van-button> <van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg">
复制
</van-button>
</div> </div>
</div> </div>
...@@ -187,11 +189,19 @@ export default { ...@@ -187,11 +189,19 @@ export default {
let groupCodeInfo = this.task.groupCodeInfo let groupCodeInfo = this.task.groupCodeInfo
if (window.location.hash[0] === '#') { if (window.location.hash[0] === '#') {
return ( return (
window.location.origin + window.location.pathname + '#/groupCode?id=' + (groupCodeInfo && groupCodeInfo.id) window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
) )
} }
return window.location.origin + window.location.pathname + 'groupCode?id=' + (groupCodeInfo && groupCodeInfo.id) return (
window.location.origin +
window.location.pathname +
'groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
} }
}, },
......
...@@ -6,11 +6,25 @@ ...@@ -6,11 +6,25 @@
</van-tabs> </van-tabs>
<div class="type-area"> <div class="type-area">
<van-button round size="small" @click="taskType = 0" :type="taskType === 0 ? 'info' : 'default'">全部</van-button> <van-button
<van-button round size="small" @click="taskType = 1" :type="taskType === 1 ? 'info' : 'default'" round
>老客标签建群</van-button size="small"
@click="taskType = 0"
:type="taskType === 0 ? 'info' : 'default'"
>全部</van-button
> >
<van-button round size="small" @click="taskType = 2" :type="taskType === 2 ? 'info' : 'default'" <van-button
round
size="small"
@click="taskType = 1"
:type="taskType === 1 ? 'info' : 'default'"
>标签建群</van-button
>
<van-button
round
size="small"
@click="taskType = 2"
:type="taskType === 2 ? 'info' : 'default'"
>群SOP</van-button >群SOP</van-button
> >
</div> </div>
...@@ -29,7 +43,12 @@ ...@@ -29,7 +43,12 @@
></OldCustomerPanel> ></OldCustomerPanel>
</template> </template>
<template v-else> <template v-else>
<SOPPanel :key="task.ruleId" :task="task" :state="isDone ? true : false" @refresh="getTasks"></SOPPanel> <SOPPanel
:key="task.ruleId"
:task="task"
:state="isDone ? true : false"
@refresh="getTasks"
></SOPPanel>
</template> </template>
</template> </template>
</template> </template>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!