Commit 206896c3 by liwk

增加客户

1 parent 9369d199
.sprite-icon { background-image: url(../images/sprite.png);background-size: 40px 20px;}
.icon-attract-customer-share { width: 10px; height: 10px; background-position: -30px 0px;}
.icon-active { width: 20px; height: 20px; background-position: 0px 0px;}
\ No newline at end of file \ No newline at end of file
.sprite-icon { background-image: url(../images/sprite.png);background-size: 108px 74px;}
.icon-active { width: 20px; height: 20px; background-position: 0px -54px;}
.icon-attract-customer-share { width: 10px; height: 10px; background-position: -92px -26px;}
.icon-customer-copy { width: 18px; height: 20px; background-position: -60px -54px;}
.icon-customer-add { width: 28px; height: 20px; background-position: -54px 0px;}
.icon-customer-phone { width: 20px; height: 20px; background-position: -30px -54px;}
.icon-avatar { width: 44px; height: 44px; background-position: 0px 0px;}
.icon-customer-active { width: 16px; height: 16px; background-position: -92px 0px;}
.icon-arrow { width: 7px; height: 11px; background-position: -92px -46px;}
\ No newline at end of file \ No newline at end of file

1.64 KB | W: | H:

5.83 KB | W: | H:

src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
src/assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -8,6 +8,15 @@ const pages = { ...@@ -8,6 +8,15 @@ const pages = {
title: '渠道活码', title: '渠道活码',
backgroundColor: '#F7F7F7' backgroundColor: '#F7F7F7'
} }
}],
customer: [{
name: 'index',
meta: {
title: '查看客户详情',
backgroundColor: '#F7F7F7'
}
}, {
}] }]
} }
const redirect = '' const redirect = ''
......
...@@ -121,15 +121,12 @@ const jumpChildrenPage = (to, params) => { ...@@ -121,15 +121,12 @@ const jumpChildrenPage = (to, params) => {
} }
/**拷贝 */ /**拷贝 */
const setClipboardData = data => { const setClipboardData = data => {
let transfer = document.createElement('input') wx.setClipboardData({
document.body.appendChild(transfer) data,
transfer.value = data success(res) {
transfer.focus() Toast('复制成功')
transfer.select() }
if (document.execCommand('copy')) document.execCommand('copy') })
transfer.blur()
Toast('内容已复制')
document.body.removeChild(transfer)
} }
/**接口请求时失败让用户刷新 */ /**接口请求时失败让用户刷新 */
......
<template>
<div :class="['layout',`page-type-${tabIndex}`]">
<tab
:list="['待添加','待通过','已通过','全部']"
@change="change"
sticky
:index="tabIndex"
></tab>
<div class="tips flex">
您共有5位客户待添加!
<div class="time">2021/7/24</div>
</div>
<template>
<template>
<scroll-view
class="content"
@ReachBottom="onReachBottom"
ref="scrollView"
>
<template v-for="(item,index) in 10">
<div
:key="index"
class="item flex"
>
<template v-if="tabIndex == 2">
<div class="checked-box">
<template v-if="index % 2 == 0">
<div class="sprite-icon icon-customer-active"></div>
</template>
<template v-else>
<div class="checked"></div>
</template>
</div>
<div class="avatar">
<div class="sprite-icon icon-avatar"></div>
</div>
<div class="info">
<div class="phone flex">
恒河猴
<div class="wx">@微信</div>
</div>
<div class="time">2021年7月24日添加</div>
</div>
<div class="sprite-icon icon-arrow"></div>
</template>
<template v-else>
<template v-if="tabIndex == 3">
<div class="avatar">
<div class="sprite-icon icon-avatar"></div>
</div>
</template>
<div class="info">
<div class="phone">13931970596</div>
恒河猴
</div>
<template v-if="tabIndex != 1">
<div class="btns flex">
<div class="btn flex">
<div class="sprite-icon icon-customer-add"></div>
加好友
</div>
<div class="line"></div>
<div
class="btn flex"
@click="makePhoneCall(13931970596)"
>
<div class="sprite-icon icon-customer-phone"></div>
拨打电话
</div>
</div>
</template>
</template>
</div>
</template>
</scroll-view>
</template>
</template>
<template v-if="tabIndex == 0">
<div class="copy-box">
<div class="sprite-icon icon-customer-copy"></div>
<div class="title">客户好友申请文案</div>
<div>
我是深圳福田宝马4S店的售后经理王俊凯,添加企业微信,帮你解决您购车售后任何问题。
</div>
</div>
</template>
<template v-if="tabIndex == 2">
<div class="checked-control flex">
<div class="checked-box">
<template v-if="true">
<div class="sprite-icon icon-customer-active"></div>
</template>
<template v-else>
<div class="checked"></div>
</template>
</div>
<div class="all">全选</div>
已选1个客户
<div class="btn text-center">批量打标签</div>
</div>
</template>
</div>
</template>
<script type='text/ecmascript-6'>
export default {
name: '',
data () {
return {
tabIndex: 0
}
},
mounted () {
},
methods: {
change (e) {
console.log(e)
this.tabIndex = e
},
onReachBottom () {
console.log('触底')
this.$refs.scrollView.loading = false
this.$refs.scrollView.finished = true
}
}
}
</script>
<style scoped lang='scss'>
.layout {
.tips {
height: 40px;
font-size: 16px;
font-weight: 500;
color: #545454;
padding: 0 16px;
box-shadow: 0px 1px 0px 0px #e9e9e9;
background-color: #f7f7f7;
.time {
font-size: 12px;
margin-left: auto;
}
}
.content {
height: calc(100vh - 90px);
.item {
height: 79px;
border-bottom: 1px solid rgba(195, 195, 195, 0.3);
padding: 0 16px;
.avatar {
margin-right: 16px;
}
.info {
font-size: 14px;
color: #333333;
.phone {
font-weight: 600;
font-size: 16px;
margin-bottom: 6px;
.wx {
font-weight: 400;
color: #6760ff;
}
}
.time {
color: #999999;
}
}
.btns {
margin-left: auto;
.line {
margin: 0 13px 0 16px;
width: 1px;
height: 42px;
background: rgba(0, 0, 0, 0.1);
}
.btn {
flex-direction: column;
font-size: 12px;
color: #666666;
.sprite-icon {
margin-bottom: 7px;
}
}
}
.icon-arrow {
margin-left: auto;
}
}
}
}
.page-type-0 {
.content {
height: calc(100vh - 220px);
}
.copy-box {
height: 130px;
box-sizing: border-box;
padding: 10px 16px;
font-weight: 500;
font-size: 14px;
color: #333333;
word-break: break-all;
position: relative;
background: #ffffff;
box-shadow: 0px 1px 0px 0px #e9e9e9;
.sprite-icon {
position: absolute;
top: 10px;
right: 15px;
}
.title {
margin-bottom: 16px;
}
}
}
.page-type-2 {
.content {
height: calc(100vh - 164px);
}
.checked-box {
margin-right: 16px;
.checked {
width: 14px;
height: 14px;
border-radius: 2px;
border: 1px solid rgba(0, 0, 0, 0.15);
}
}
.checked-control {
font-size: 14px;
color: #333333;
padding: 0 16px;
height: 74px;
.all {
font-size: 16px;
font-weight: 600;
margin-right: 16px;
}
.btn {
width: 148px;
height: 36px;
background: #5850ff;
box-shadow: 0px 2px 4px 0px rgba(88, 80, 255, 0.3);
border-radius: 21px;
margin-left: auto;
color: #ffffff;
}
}
}
</style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!