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 {
type: String,
default: '0'
},
userId: {
type: String,
default: ''
},
keyword: {
type: String,
default: ''
......@@ -52,7 +48,11 @@ export default {
this.getList(1)
}
},
computed: {},
computed: {
userId() {
return this.$store.state.userId
}
},
created() {
this.getList()
// this.userId && this.getCollectionList()
......@@ -252,7 +252,19 @@ export default {
: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">
{{ item.mediaType == 4 ? item.content : item.materialName }}
</span>
......@@ -277,8 +289,11 @@ export default {
<style lang="less" scoped>
.content {
// display: flex;
.van-image {
.van-image,
.video {
float: left;
width: 80px;
height: 80px;
margin: 0 10px 5px 0;
border: 1px solid #eee;
}
......
......@@ -28,7 +28,7 @@ export default {
beforeCreate() {},
created() {
// this.$toast('userId:' + this.$store.state.userId)
this.getList()
this.userId && this.getList()
},
mounted() {},
methods: {
......@@ -79,7 +79,6 @@ export default {
ref="list"
:sideId="item.sideId"
:mediaType="item.mediaType"
:userId="userId"
:keyword="keyword"
@collect="refreshCollect"
></List>
......
This diff could not be displayed because it is too large.
......@@ -23,7 +23,7 @@
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.0",
"vconsole": "^3.4.0",
"vconsole": "^3.11.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "3.11.0",
......
<!DOCTYPE html>
<html lang="en">
<head>
<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>
</head>
<body>
<div class="container">
<img src='' class='posterImg'/>
<img src='' class='posterImg' />
<div class="footerLink">
<div class="sharePic" >分享图片</div>
<div class="sharePic">分享图片</div>
<div class="myTaskDetail">我的邀请任务进度</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
// import vconsole from 'vconsole'
import vconsole from 'vconsole'
$(function () {
var dpr, rem, scale
var docEl = document.documentElement
......@@ -31,6 +31,5 @@ $(function () {
window.dpr = dpr
window.rem = rem
// var myConsole = new vconsole()
console.log('hello')
new vconsole()
})
......@@ -23,7 +23,7 @@ const request = (url, params, method = 'get') => {
},
error(err) {
// console.log(err.status)
alert(url + err.status)
alert(url + ',错误码:' + err.status)
reject(err)
}
})
......
import config from './contant'
export function getUrlParam (name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
export function getUrlParam(name) {
let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
let r = window.location.search.substr(1).match(reg)
if (r != null) {
return unescape(r[2])
}
return null
}
export function getWxCode(){
let appid = "wxa57479bcd3f15461";
let code = getUrlParam("code"); //是否存在code
let local = window.location.origin.includes('localhost')?'http://h5.linkwechat.cn/test.html': window.location.href;
// let local = 'http://h5.x*****o.com/'
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`
export function getWxCode() {
let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid
let code = getUrlParam('code') //是否存在code
let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html'
: window.location.href
// let local = 'http://h5.x*****o.com/'
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
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 {
this.listOneArray = []
this.list.forEach((element) => {
element.weTags.forEach((d) => {
this.listOneArray.push(d)
this.listOneArray.push({ tagId: d.tagId, name: d.name })
})
})
})
......@@ -103,7 +103,11 @@ export default {
// this.msgError('请至少选择一个标签')
// 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
},
onSelectTag(tag) {
......@@ -114,11 +118,8 @@ export default {
this.selectedList.push(tag)
}
},
toJson(data) {
return JSON.stringify(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 {
<template>
<div class="tag-ellipsis">
<template v-for="(item, index) in list">
<el-tag size="medium" v-if="index < limit" :key="index">
{{ item[defaultProps] || item }}
</el-tag>
</template>
<el-tag v-if="list.length && list.length > limit">...</el-tag>
<el-popover placement="bottom" trigger="hover" :disabled="list.length <= +limit">
<div>
<el-tag v-for="(item, unique) in list" :key="unique">
{{ item[defaultProps] || item }}
</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>
</template>
......
......@@ -20,7 +20,6 @@ import config from '@/config'
import App from './App'
import store from './store'
import router from './router'
import directive from './directive'
import './assets/icons' // icon
import './permission' // permission control
......@@ -36,6 +35,21 @@ import {
handleTree
} 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.getConfigKey = getConfigKey
......@@ -86,21 +100,6 @@ VueAMap.initAMapApiLoader({
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
* you want to use MockJs for mock api
......
......@@ -289,19 +289,7 @@ export default {
</el-table-column>
<el-table-column label="客户标签" align="center">
<div v-if="row.tagList" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagList.length < 3">
<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>
<TagEllipsis :list="row.tagList"></TagEllipsis>
</div>
<span v-else>无标签</span>
......@@ -401,22 +389,14 @@ export default {
<el-table-column label="客户名" align="center" prop="customerName"></el-table-column>
<el-table-column prop="sent" label="送达状态" align="center">
<template #default="{ row }">
<template v-if="row.sent">
已送达
</template>
<template v-else>
未送达
</template>
<template v-if="row.sent"> 已送达 </template>
<template v-else> 未送达 </template>
</template>
</el-table-column>
<el-table-column prop="inGroup" label="是否在群" align="center">
<template #default="{ row }">
<template v-if="row.inGroup">
在群
</template>
<template v-else>
不在群
</template>
<template v-if="row.inGroup"> 在群 </template>
<template v-else> 不在群 </template>
</template>
</el-table-column>
</el-table>
......
......@@ -431,7 +431,7 @@ export default {
<template slot-scope="{ row }">
<div class="cp flex aic" @click="goRoute(row)">
<el-image
style="width: 50px; height: 50px; flex:none;"
style="width: 50px; height: 50px; flex: none"
:src="row.avatar"
fit="fit"
></el-image>
......@@ -447,19 +447,7 @@ export default {
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="220">
<div v-if="row.tagNames" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagNames.length < 3">
<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>
<TagEllipsis :list="row.tagNames"></TagEllipsis>
</div>
<span v-else>无标签</span>
</el-table-column>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!