Commit ca06f0ab by xinla

Merge remote-tracking branch 'origin/front-sync' into develop

2 parents 0efcb19a ff9e432b
This diff could not be displayed because it is too large.
...@@ -18,10 +18,6 @@ export default { ...@@ -18,10 +18,6 @@ export default {
type: String, type: String,
default: '0' default: '0'
}, },
userId: {
type: String,
default: ''
},
keyword: { keyword: {
type: String, type: String,
default: '' default: ''
...@@ -52,7 +48,11 @@ export default { ...@@ -52,7 +48,11 @@ export default {
this.getList(1) this.getList(1)
} }
}, },
computed: {}, computed: {
userId() {
return this.$store.state.userId
}
},
created() { created() {
this.getList() this.getList()
// this.userId && this.getCollectionList() // this.userId && this.getCollectionList()
...@@ -252,7 +252,19 @@ export default { ...@@ -252,7 +252,19 @@ export default {
:src="item.materialUrl" :src="item.materialUrl"
/> />
<!-- 视频 --> <!-- 视频 -->
<van-image v-if="item.mediaType == 2" width="80" height="80" :src="item.coverUrl" /> <video
v-if="item.mediaType == 2"
class="video"
controls
webkit-playsinline="true"
playsinline="true"
:autoplay="false"
preload="auto"
:poster="item.coverUrl"
>
<source :src="item.materialUrl" type="video/mp4" />
</video>
<!-- <van-image v-if="item.mediaType == 2" width="80" height="80" :src="item.coverUrl" /> -->
<span class="title"> <span class="title">
{{ item.mediaType == 4 ? item.content : item.materialName }} {{ item.mediaType == 4 ? item.content : item.materialName }}
</span> </span>
...@@ -277,8 +289,11 @@ export default { ...@@ -277,8 +289,11 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.content { .content {
// display: flex; // display: flex;
.van-image { .van-image,
.video {
float: left; float: left;
width: 80px;
height: 80px;
margin: 0 10px 5px 0; margin: 0 10px 5px 0;
border: 1px solid #eee; border: 1px solid #eee;
} }
......
...@@ -28,7 +28,7 @@ export default { ...@@ -28,7 +28,7 @@ export default {
beforeCreate() {}, beforeCreate() {},
created() { created() {
// this.$toast('userId:' + this.$store.state.userId) // this.$toast('userId:' + this.$store.state.userId)
this.getList() this.userId && this.getList()
}, },
mounted() {}, mounted() {},
methods: { methods: {
...@@ -79,7 +79,6 @@ export default { ...@@ -79,7 +79,6 @@ export default {
ref="list" ref="list"
:sideId="item.sideId" :sideId="item.sideId"
:mediaType="item.mediaType" :mediaType="item.mediaType"
:userId="userId"
:keyword="keyword" :keyword="keyword"
@collect="refreshCollect" @collect="refreshCollect"
></List> ></List>
......
This diff could not be displayed because it is too large.
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
"style-loader": "^1.2.1", "style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0", "uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.0", "url-loader": "^4.1.0",
"vconsole": "^3.4.0", "vconsole": "^3.11.0",
"webpack": "^4.43.0", "webpack": "^4.43.0",
"webpack-cli": "^3.3.12", "webpack-cli": "^3.3.12",
"webpack-dev-server": "3.11.0", "webpack-dev-server": "3.11.0",
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"> <meta name="viewport"
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
<title>linke-wechat</title> <title>linke-wechat</title>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<img src='' class='posterImg'/> <img src='' class='posterImg' />
<div class="footerLink"> <div class="footerLink">
<div class="sharePic" >分享图片</div> <div class="sharePic">分享图片</div>
<div class="myTaskDetail">我的邀请任务进度</div> <div class="myTaskDetail">我的邀请任务进度</div>
</div> </div>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
// import vconsole from 'vconsole' import vconsole from 'vconsole'
$(function () { $(function () {
var dpr, rem, scale var dpr, rem, scale
var docEl = document.documentElement var docEl = document.documentElement
...@@ -31,6 +31,5 @@ $(function () { ...@@ -31,6 +31,5 @@ $(function () {
window.dpr = dpr window.dpr = dpr
window.rem = rem window.rem = rem
// var myConsole = new vconsole() new vconsole()
console.log('hello')
}) })
...@@ -23,7 +23,7 @@ const request = (url, params, method = 'get') => { ...@@ -23,7 +23,7 @@ const request = (url, params, method = 'get') => {
}, },
error(err) { error(err) {
// console.log(err.status) // console.log(err.status)
alert(url + err.status) alert(url + ',错误码:' + err.status)
reject(err) reject(err)
} }
}) })
......
import config from './contant' import config from './contant'
export function getUrlParam (name) { export function getUrlParam(name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
let r = window.location.search.substr(1).match(reg); let r = window.location.search.substr(1).match(reg)
if (r != null) { if (r != null) {
return unescape(r[2]); return unescape(r[2])
} }
return null; return null
} }
export function getWxCode(){ export function getWxCode() {
let appid = "wxa57479bcd3f15461"; let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid
let code = getUrlParam("code"); //是否存在code let code = getUrlParam('code') //是否存在code
let local = window.location.origin.includes('localhost')?'http://h5.linkwechat.cn/test.html': window.location.href; let local = window.location.origin.includes('localhost')
// let local = 'http://h5.x*****o.com/' ? 'http://h5.linkwechat.cn/test.html'
if (code == null || code === "") { : window.location.href
//不存在就打开上面的地址进行授权 // let local = 'http://h5.x*****o.com/'
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` if (code == null || code === '') {
//不存在就打开上面的地址进行授权
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(
local
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
return false
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
}else{
config.code = code
}
}
\ No newline at end of file \ No newline at end of file
return false
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
} else {
config.code = code
}
}
...@@ -93,7 +93,7 @@ export default { ...@@ -93,7 +93,7 @@ export default {
this.listOneArray = [] this.listOneArray = []
this.list.forEach((element) => { this.list.forEach((element) => {
element.weTags.forEach((d) => { element.weTags.forEach((d) => {
this.listOneArray.push(d) this.listOneArray.push({ tagId: d.tagId, name: d.name })
}) })
}) })
}) })
...@@ -103,7 +103,11 @@ export default { ...@@ -103,7 +103,11 @@ export default {
// this.msgError('请至少选择一个标签') // this.msgError('请至少选择一个标签')
// return // return
// } // }
this.$emit('success', JSON.parse(JSON.stringify(this.selectedList))) // 统一数据格式
let selected = this.listOneArray.filter((i) =>
this.selectedList.some((e) => e.tagId === i.tagId)
)
this.$emit('success', selected)
this.Pvisible = false this.Pvisible = false
}, },
onSelectTag(tag) { onSelectTag(tag) {
...@@ -114,11 +118,8 @@ export default { ...@@ -114,11 +118,8 @@ export default {
this.selectedList.push(tag) this.selectedList.push(tag)
} }
}, },
toJson(data) {
return JSON.stringify(data)
},
setTagSelect(data) { setTagSelect(data) {
return this.checkedTagMap.has(data.tagId) || this.checkedTagMap.has(data.tagName) return this.checkedTagMap.has(data.tagId) || this.checkedTagMap.has(data.name)
} }
} }
} }
......
...@@ -29,12 +29,19 @@ export default { ...@@ -29,12 +29,19 @@ export default {
<template> <template>
<div class="tag-ellipsis"> <div class="tag-ellipsis">
<template v-for="(item, index) in list"> <el-popover placement="bottom" trigger="hover" :disabled="list.length <= +limit">
<el-tag size="medium" v-if="index < limit" :key="index"> <div>
{{ item[defaultProps] || item }} <el-tag v-for="(item, unique) in list" :key="unique">
</el-tag> {{ item[defaultProps] || item }}
</template> </el-tag>
<el-tag v-if="list.length && list.length > limit">...</el-tag> </div>
<div slot="reference">
<el-tag v-for="(item, unique) in list.slice(0, +limit)" :key="unique">
{{ item[defaultProps] || item }}
</el-tag>
<el-tag key="a" v-if="list.length > +limit">...</el-tag>
</div>
</el-popover>
</div> </div>
</template> </template>
......
...@@ -20,7 +20,6 @@ import config from '@/config' ...@@ -20,7 +20,6 @@ import config from '@/config'
import App from './App' import App from './App'
import store from './store' import store from './store'
import router from './router' import router from './router'
import directive from './directive'
import './assets/icons' // icon import './assets/icons' // icon
import './permission' // permission control import './permission' // permission control
...@@ -36,6 +35,21 @@ import { ...@@ -36,6 +35,21 @@ import {
handleTree handleTree
} from '@/utils/common' } from '@/utils/common'
import Pagination from '@/components/Pagination'
import RightToolbar from '@/components/RightToolbar' //自定义表格工具扩展
import Upload from '@/components/Upload'
import ButtonSync from '@/components/ButtonSync'
import TagEllipsis from '@/components/TagEllipsis'
// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Upload', Upload)
Vue.component('ButtonSync', ButtonSync)
Vue.component(TagEllipsis.name, TagEllipsis)
import directive from './directive'
Vue.use(directive)
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.getConfigKey = getConfigKey
...@@ -86,21 +100,6 @@ VueAMap.initAMapApiLoader({ ...@@ -86,21 +100,6 @@ VueAMap.initAMapApiLoader({
v: '1.4.4' v: '1.4.4'
}) })
// 全局组件挂载
import Pagination from '@/components/Pagination'
//自定义表格工具扩展
import RightToolbar from '@/components/RightToolbar'
import Upload from '@/components/Upload'
import ButtonSync from '@/components/ButtonSync'
import CardGroupIndex from '@/components/CardGroupIndex'
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Upload', Upload)
Vue.component('ButtonSync', ButtonSync)
Vue.component(CardGroupIndex.name, CardGroupIndex)
Vue.use(directive)
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
* you want to use MockJs for mock api * you want to use MockJs for mock api
......
...@@ -289,19 +289,7 @@ export default { ...@@ -289,19 +289,7 @@ export default {
</el-table-column> </el-table-column>
<el-table-column label="客户标签" align="center"> <el-table-column label="客户标签" align="center">
<div v-if="row.tagList" slot-scope="{ row }"> <div v-if="row.tagList" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagList.length < 3"> <TagEllipsis :list="row.tagList"></TagEllipsis>
<div>
<el-tag v-for="(unit, unique) in row.tagList" :key="unique">
{{ unit.name }}
</el-tag>
</div>
<div slot="reference">
<el-tag v-for="(unit, unique) in row.tagList.slice(0, 2)" :key="unique">
{{ unit.name }}
</el-tag>
<el-tag key="a" v-if="row.tagList.length > 2">...</el-tag>
</div>
</el-popover>
</div> </div>
<span v-else>无标签</span> <span v-else>无标签</span>
...@@ -401,22 +389,14 @@ export default { ...@@ -401,22 +389,14 @@ export default {
<el-table-column label="客户名" align="center" prop="customerName"></el-table-column> <el-table-column label="客户名" align="center" prop="customerName"></el-table-column>
<el-table-column prop="sent" label="送达状态" align="center"> <el-table-column prop="sent" label="送达状态" align="center">
<template #default="{ row }"> <template #default="{ row }">
<template v-if="row.sent"> <template v-if="row.sent"> 已送达 </template>
已送达 <template v-else> 未送达 </template>
</template>
<template v-else>
未送达
</template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="inGroup" label="是否在群" align="center"> <el-table-column prop="inGroup" label="是否在群" align="center">
<template #default="{ row }"> <template #default="{ row }">
<template v-if="row.inGroup"> <template v-if="row.inGroup"> 在群 </template>
在群 <template v-else> 不在群 </template>
</template>
<template v-else>
不在群
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -431,7 +431,7 @@ export default { ...@@ -431,7 +431,7 @@ export default {
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div class="cp flex aic" @click="goRoute(row)"> <div class="cp flex aic" @click="goRoute(row)">
<el-image <el-image
style="width: 50px; height: 50px; flex:none;" style="width: 50px; height: 50px; flex: none"
:src="row.avatar" :src="row.avatar"
fit="fit" fit="fit"
></el-image> ></el-image>
...@@ -447,19 +447,7 @@ export default { ...@@ -447,19 +447,7 @@ export default {
</el-table-column> </el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="220"> <el-table-column prop="tagNames" label="客户标签" align="center" width="220">
<div v-if="row.tagNames" slot-scope="{ row }"> <div v-if="row.tagNames" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagNames.length < 3"> <TagEllipsis :list="row.tagNames"></TagEllipsis>
<div>
<el-tag v-for="(unit, unique) in row.tagNames" :key="unique">
{{ unit }}
</el-tag>
</div>
<div slot="reference">
<el-tag v-for="(unit, unique) in row.tagNames.slice(0, 2)" :key="unique">
{{ unit }}
</el-tag>
<el-tag key="a" v-if="row.tagNames.length > 2">...</el-tag>
</div>
</el-popover>
</div> </div>
<span v-else>无标签</span> <span v-else>无标签</span>
</el-table-column> </el-table-column>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!