Commit 1ac2136e by luyt

feat:看线索

1 parent e427027d
{ {
"pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "pages/webView/webView", "login/index/index","login/accountItems/accountItems"], "pages": [
"requiredPrivateInfos": ["getLocation"], "login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/mine/mine",
"pages/webView/webView",
"login/index/index",
"login/accountItems/accountItems",
"pages/apply/apply"
],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -36,7 +47,7 @@ ...@@ -36,7 +47,7 @@
"subpackages": [], "subpackages": [],
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab", "tab": "/components/Tab/Tab",
"navigation-bar":"/components/NavigationBar/NavigationBar" "navigation-bar": "/components/NavigationBar/NavigationBar"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
...@@ -22,8 +22,13 @@ Component({ ...@@ -22,8 +22,13 @@ Component({
itemWidth: String, itemWidth: String,
align: { align: {
type: String, type: String,
default: '' value: ''
} },
// 是否有红点
redpoint: {
type: Array,
value: ['看线索']
},
}, },
/** /**
......
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view <scroll-view
class="tab-box {{align}} {{outClassName}}" class="tab-box {{align}} {{outClassName}}"
scroll-x scroll-x
enable-flex enable-flex
scroll-with-animation scroll-with-animation
scroll-into-view="{{to}}"> scroll-into-view="{{to}}"
>
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view <view
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
bindtap="click" bindtap="click"
data-count="{{index}}" data-count="{{index}}"
id="to-{{index}}"> id="to-{{index}}"
>
<view class="text">{{item}}</view> <view class="text">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> --> <!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" /> <view class="line" />
...@@ -25,9 +28,13 @@ ...@@ -25,9 +28,13 @@
class="tab {{index==count?'active':''}}" class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}" style="width:{{itemWidth}}"
bindtap="click" bindtap="click"
data-count="{{index}}"> data-count="{{index}}"
<view class="text text-center">{{item}}</view> >
<view class="text text-center">
{{item}}
</view>
<view class="line" style="lineStyle" /> <view class="line" style="lineStyle" />
<view wx:if="{{filterUtils.hasRedpoint(redpoint,item)}}" class="redpoint" />
</view> </view>
</block> </block>
</view> </view>
......
/**
*
* @param array 数组
* @param item 数组中的某一项
* @returns
*/
var hasRedpoint = function (array, item) {
// console.log('array: ', array);
return array.length > 0 && array.indexOf(item) != -1;
};
module.exports = {
hasRedpoint: hasRedpoint,
};
...@@ -71,6 +71,17 @@ ...@@ -71,6 +71,17 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
.redpoint {
position: absolute;
top: 0;
right: 0;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */ /* 外部出进来的自定义样式 */
.project-tab{ .project-tab{
padding-left: 20px; padding-left: 20px;
...@@ -86,3 +97,4 @@ ...@@ -86,3 +97,4 @@
.project-tab .tab .line{ .project-tab .tab .line{
width:auto; width:auto;
} }
// pages/apply/apply.js
const navStyle = 'background-color: transparent;'
import {IMG_URL} from '~/utils/constantData.js'
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = '../../images/'
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
IMG_URL:IMG_URLLocal,
carObj:{
name:'kafdkf',
model:'dfdsf3443',
selNum:132,
contact:'',
phone:'',
}
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88*2
})
// console.log(e)
// console.log(this.data.headerHeight)
},
// 提交信息
applyFn(){
console.log(123)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(params){
console.log('params: ', params);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
}
\ No newline at end of file \ No newline at end of file
/* pages/apply/apply.wxss */
.apply {
.head {
width: 100%;
}
.introduce {
height: 180px;
}
.content {
padding: 16px 17px 0;
.item{
}
.top{
display: flex;
align-items: center;
.line{
width: 3px;
height: 14px;
background:var(--btnColor);
}
.title{
margin-left: 8px;
font-weight: 500;
font-size: 18px;
color: #323436;
}
}
.inp-wrap{
.title{
margin-top: 8px;
margin-bottom: 8px;
font-weight: 500;
font-size: 14px;
color: #323436;
.point{
color: #F35251;
}
}
.inp{
padding: 7px 12px;
border: 1px solid #E3E4E8;
border-radius: 2px;
}
}
}
.btn {
margin-top:40px;
width: 100%;
font-weight: 500;
font-size: 17px;
color: #ffffff;
text-align: center;
background: var(--btnColor);
}
}
<!-- pages/apply/apply.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">申请业务</navigation-bar>
<view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" />
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" value="{{carObj.name}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面车型
</view>
<input class="inp" value="{{carObj.model}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面新车销量/基盘客户
</view>
<input class="inp" value="{{carObj.selNum}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
门店联系人
</view>
<input class="inp" value="{{carObj.contact}}" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
联系人手机号
</view>
<input class="inp" value="{{carObj.phone}}" placeholder="请输入手机号" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
// pages/tab/index/components/likeToast/likeToast.js
import { IMG_URL } from "~/utils/constantData.js";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = "../../../../../images/";
Component({
data: {
IMG_URL,
IMG_URLLocal,
type: "fail",
title: "你还没有勾选呢!",
isShow: false,
animationData: "",
},
methods: {
showToast: function (data) {
const self = this;
if (this._showTimer) {
clearTimeout(this._showTimer);
}
if (this._animationTimer) {
clearTimeout(this._animationTimer);
}
// display需要先设置为block之后,才能执行动画
this.setData({
title: data.title,
type: data.type,
isShow: true,
});
this._animationTimer = setTimeout(() => {
const animation = wx.createAnimation({
duration: 500,
timingFunction: "ease",
delay: 0,
});
animation.opacity(1).step();
self.setData({
animationData: animation.export(),
});
}, 50);
this._showTimer = setTimeout(function () {
self.hideToast();
if (data.compelete && typeof data.compelete === "function") {
data.compelete();
}
}, 1200 || 50 + data.duration);
},
hideToast: function () {
if (this._hideTimer) {
clearTimeout(this._hideTimer);
}
let animation = wx.createAnimation({
duration: 200,
timingFunction: "ease",
delay: 0,
});
animation.opacity(0).step();
this.setData({
animationData: animation.export(),
});
this._hideTimer = setTimeout(() => {
this.setData({
isShow: false,
});
}, 250);
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/likeToast/likeToast.wxss */
.toast-box {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 11;
display: none;
opacity: 0;
}
.show {
display: block;
opacity: 1;
}
.toast-content {
display: flex;
flex-direction: column;
justify-content:center;
align-items:center;
position: absolute;
left: 50%;
top: 50%;
width: 136px;
height: 136px;
background: rgba(0,0,0,0.70);
border-radius: 8px;
box-sizing: bordre-box;
transform: translate(-50%, -50%);
}
.toast-img {
margin-bottom: 20px;
box-sizing: bordre-box;
text-align: center;
}
.toast-icon {
width: 23px;
height: 23px;
}
.toast-title {
margin-left: 28px;
margin-right: 28px;
font-size: 14px;
color: #ffffff;
text-align: center;
}
<!--pages/tab/index/components/likeToast/likeToast.wxml-->
<view class="toast-box {{isShow? 'show':''}}" animation="{{animationData}}">
<view class="toast-content" >
<view class="toast-img">
<block wx:if="{{type==='success'}}">
<image class="toast-icon" src="{{IMG_URLLocal}}index/like.png"/>
</block>
<block wx:if="{{type==='fail'}}">
<image class="toast-icon" src="{{IMG_URLLocal}}index/dislike.png" />
</block>
</view>
<view class="toast-title">{{title}}</view>
</view>
</view>
// pages/tab/discovery/components/product/product.js // pages/tab/discovery/components/product/product.js
// import {imgUrlMixin} from '~/mixins/index' // import {imgUrlMixin} from '~/mixins/index'
import {IMG_URL} from '~/utils/constantData.js'
Component({ Component({
// behaviors: [imgUrlMixin], // behaviors: [imgUrlMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
stickyTop:Number
}, },
/** /**
...@@ -15,11 +17,12 @@ Component({ ...@@ -15,11 +17,12 @@ Component({
data: { data: {
navList:['360全景导航','AR实景导航','座椅通风','氛围灯','数字化美容'], navList:['360全景导航','AR实景导航','座椅通风','氛围灯','数字化美容'],
activeNavIdx: 0, activeNavIdx: 0,
tab:['适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程','适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程'], tab:['场景说明','营销链路','项目亮点','转化漏斗','合作流程','合作案例'],
heightArr:[], heightArr:[],
allHeight:0,
curTabIdx:0, curTabIdx:0,
intoViewId: 'to-0', intoViewId: 'to-0',
IMGURL:'../../../../../images/index/' IMGURL:`${IMG_URL}index/`
}, },
lifetimes:{ lifetimes:{
ready: function (){ ready: function (){
...@@ -61,7 +64,8 @@ Component({ ...@@ -61,7 +64,8 @@ Component({
heightArr.push(s) heightArr.push(s)
}) })
this.data.heightArr = heightArr this.data.heightArr = heightArr
// console.log( this.data.heightArr) // console.log(heightArr[heightArr.length-1])
this.data.allHeight = heightArr[heightArr.length-1]
}).exec() }).exec()
} }
} }
......
// 特色产品 // 特色产品
.prod-wrap{
background-color: #f8fafb;
}
.prod-wrap .big-title{ .prod-wrap .big-title{
margin-left: 40rpx; margin-left: 40rpx;
font-family: PingFangSC-S0pxibold; font-family: PingFangSC-S0pxibold;
...@@ -25,23 +28,28 @@ ...@@ -25,23 +28,28 @@
text-align: center; text-align: center;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
line-height: 64rpx; line-height: 64rpx;
margin-right: 12rpx; margin-right: 16rpx;
background: #FFFFFF; background: #FFFFFF;
border: 2rpx solid #DDE3F0; border: 2rpx solid #DDE3F0;
color: #323436;
} }
.prod-wrap .nav-wrap .active-nav{ .prod-wrap .nav-wrap .active-nav{
background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%); color: #FFFFFF;
border: 2rpx solid rgba(68,97,240,0.50); // background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%);
box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35); background-color: var(--btnColor);
// border: 2rpx solid rgba(68,97,240,0.50);
// box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35);
} }
.prod-wrap .nav-wrap .nav:last-child{ .prod-wrap .nav-wrap .nav:last-child{
margin-right: 0; margin-right: 0;
} }
.prod-item{ .prod-item{
padding-bottom:32rpx;
margin: 16rpx auto 0;
width: 343px;
background-color: #F5F7FB; background-color: #F5F7FB;
border-radius: 48rpx 48rpx 0 0; border-radius: 48rpx 48rpx 0 0;
padding: 40rpx 24rpx 32rpx;
} }
.prod-card{ .prod-card{
...@@ -137,12 +145,17 @@ ...@@ -137,12 +145,17 @@
} }
.project-img{ .project-img{
height: 500rpx; height: 1200rpx;
white-space: nowrap; white-space: nowrap;
.img-item{ .img-item{
height: 300rpx; height: 300rpx;
} }
} }
.stickyTab{
position:sticky;
z-index: 1;
background-color:#f5f7fb;
}
// .out-tab{ // .out-tab{
// .out-text { // .out-text {
// // color: red !important; // // color: red !important;
......
...@@ -10,29 +10,47 @@ ...@@ -10,29 +10,47 @@
<view class="prod-card"> <view class="prod-card">
<view class="card-img"> <view class="card-img">
<text class="img-desc">轻改类</text> <text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png"></image> <image src="{{IMGURL}}discovery_prod1.png" />
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">360全景导航</text> <text class="title">360全景导航</text>
<text class="sale">新车销量 <text class="sale-num">100</text></text> <text class="sale">新车销量 <text class="sale-num">100</text>
<text class="earnings">预估收益 <text class="earnings-num">92.4 万</text></text> </text>
<text class="earnings">预估收益 <text class="earnings-num">92.4 万</text>
</text>
</view> </view>
<view class="share-btn"> <view class="share-btn">
<image class="icon" src="{{IMGURL}}share.png"></image> <image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text> <text>分享</text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="project-wrap"> <view class="project-wrap">
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab> <!-- -->
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}"> <view class="stickyTab" style="top:{{stickyTop}}rpx">
<tab
outClassName="project-tab"
openScroll="{{true}}"
tab="{{tab}}"
index="{{curTabIdx}}"
bindclick="changeTab"
/>
</view>
<!-- style="{height:{{allHeight}}px}" -->
<scroll-view
class="project-img"
scroll-into-view="{{intoViewId}}"
bindscroll="scrolltoupper"
scroll-y="{{true}}"
>
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item"> <view id="to-{{index}}" class="img-item">
{{item}} {{item}}
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
</view> </view>
const navStyle = "background-color: transparent;";
import { IMG_URL } from "~/utils/constantData.js";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = "../../../images/";
const navStyle = 'background-color: transparent;'
Page({ Page({
// behaviors: [kfMixin], // behaviors: [kfMixin],
/** /**
...@@ -7,61 +11,289 @@ Page({ ...@@ -7,61 +11,289 @@ Page({
*/ */
data: { data: {
navStyle, navStyle,
actClass:'right', IMG_URL,
// IMG_URL IMG_URLLocal,
dataArr:[ actClass: "right",
guideSrcIndex: 1,
guideShow: false,
dataArr: [
{ {
src:'../../../images/index/car1.png', src: `${IMG_URL}index/car1.png`,
name:'新车洽谈场景', name: "新车洽谈场景",
msg:'1.0 新车权益销售' msg: "1.0 新车权益销售",
}, },
{ {
src:'../../../images/index/car2.png', src: `${IMG_URL}index/car2.png`,
name:'新车交付场景', name: "新车交付场景",
msg:'1.1 新车精品升级' msg: "1.1 新车精品升级",
}, },
{ {
src:'../../../images/index/car3.png', src: `${IMG_URL}index/car3.png`,
name:'0-12个月', name: "0-12个月",
msg:'1.2 新车线上转化' msg: "1.2 新车线上转化",
}, },
{ {
src:'../../../images/index/car4.png', src: `${IMG_URL}index/car4.png`,
name:'12个月以上', name: "12个月以上",
msg:'1.3 存量用户众筹' msg: "1.3 存量用户众筹",
}, },
] ],
actNum: 0,
tabIndx: 0,
tabList: ["看线索", "看产品"],
typeList: ["联系电话", "意向客户", "线索来源", "重置"],
clueList: [
{
source: "customer",
name: "张三1",
avatar: "",
like: true,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 3,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 4,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 5,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 6,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 7,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
],
phone: 15718122929,
isOpen: false,
getMoreFlag: true,
},
{
source: "customer",
name: "张三",
avatar: "",
like: false,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
},
],
phone: 15718122925,
isOpen: true,
},
{
source: "shop",
name: "张三",
avatar: "",
like: false,
records: [
{
id: 0,
type: 0,
msg: "360全景导航",
time: "10-30 09:26:25",
shop: "嘀加鹏辉奥迪4S店",
},
{
id: 1,
type: 1,
msg: "360全景导航",
time: "10-30 09:26:25",
shop: "嘀加鹏辉奥迪4S店",
},
],
phone: 15718122925,
isOpen: true,
}, },
],
filterType: "", //看线索过滤类型
},
//引导图
guideFn() {
if (this.data.guideSrcIndex === 5) {
this.setData({
guideShow: false,
});
return;
}
this.setData({
guideSrcIndex: ++this.data.guideSrcIndex,
});
// console.log('guideSrcIndex',this.data.guideSrcIndex)
},
// navbar高度设置
navbarReady(e) { navbarReady(e) {
let { height, statusBarHeight } = e.detail let { height, statusBarHeight } = e.detail;
this.setData({
// tabBarStyle: height / 2 + statusBarHeight,
headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
// headTabFn(e){
// // console.log("name",e.currentTarget.dataset.name)
// let name = e.currentTarget.dataset.name
// this.setData({
// actClass:name
// })
// },
// 选车场景切换
selectCar(e) {
let actNum = e.currentTarget.dataset.num;
this.setData({ this.setData({
tabBarStyle: height / 2 + statusBarHeight actNum,
}) });
console.log(e)
}, },
headTabFn(e){ // 头部看线索,产品切换
// console.log("name",e.currentTarget.dataset.name) changeTabIndx(e) {
let name = e.currentTarget.dataset.name console.log("e.detail: ", e.detail);
this.setData({ this.setData({
actClass:name tabIndx: e.detail,
}) });
},
gotoApply() {
// wx.$router.go('apply',1235)
wx.$router.go("apply");
},
getMore(e) {
console.log("显示更多数据");
let index = e.currentTarget.dataset.outidx;
console.log("index: ", index);
let completeStatus = `clueList[${index}].getMoreFlag`;
this.setData({
[completeStatus]: !this.data.clueList[index].getMoreFlag,
});
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {},
},
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () {
this.prompt = this.selectComponent("#toast");
},
showToast: function (e) {
let type = e.currentTarget.dataset.type;
let tipObj = {};
if (type == "like") {
tipObj = {
type: "fail",
title: "取消标记为意向客户",
};
} else {
tipObj = {
type: "success",
title: "成功标记为意向客户",
};
}
this.prompt.showToast({
type: tipObj.type,
title: tipObj.title,
duration: 1000,
compelete: function () {
console.log("toast框隐藏之后,会调用该函数");
//例如:跳转页面wx.navigateTo({ url: 'xxx' });
},
});
//切换收藏标记
let index = e.currentTarget.dataset.outidx;
let completeStatus = `clueList[${index}].like`;
this.setData({
[completeStatus]: !this.data.clueList[index].like,
});
},
filterTypeFn(e) {
let index = e.currentTarget.dataset.index;
let itemList = [];
// console.log("index: ", typeof index);
switch (index) {
case 0:
itemList = ["有", "无"];
break;
case 1:
itemList = ["是", "否"];
break;
case 2:
itemList = ["访客", "门店"];
break;
case 3:
console.log("重置");
return;
}
this.setData({
filterType: "",
});
wx.pro.showActionSheet({
itemList,
success(res) {
console.log(res.tapIndex);
},
fail(res) {
console.log(res.errMsg);
},
complete(res) {
console.log("res: ", res);
},
});
},
phoneCallFn(e) {
let { phone } = e.currentTarget.dataset;
console.log("phone: ", phone);
wx.$api.phoneCall(phone);
},
setCopyDataFn(e) {
let { phone } = e.currentTarget.dataset;
wx.$api.setCopyData(phone);
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
// setTimeout(()=>{
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// })
}, },
/** /**
...@@ -77,8 +309,7 @@ Page({ ...@@ -77,8 +309,7 @@ Page({
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () { onPullDownRefresh: function () {},
},
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
...@@ -87,6 +318,5 @@ Page({ ...@@ -87,6 +318,5 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { onShareAppMessage: function () {},
} });
})
{ {
"usingComponents": { "usingComponents": {
"product": "./components/product/product" "product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
......
...@@ -5,10 +5,12 @@ page { ...@@ -5,10 +5,12 @@ page {
} }
.reclaim{ .reclaim{
.header-wrap{ .header-wrap{
position: relative; position: sticky;
top: 0;
width: 100%; width: 100%;
background-size: 100% 100%; background-size: 100% 100%;
margin-bottom: 16px; margin-bottom: 16px;
z-index: 1;
.header{ .header{
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -18,6 +20,9 @@ page { ...@@ -18,6 +20,9 @@ page {
display: flex; display: flex;
justify-content:space-between; justify-content:space-between;
align-items:center; align-items:center;
.tabContainer{
width: 60%;
}
.left{ .left{
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -67,21 +72,190 @@ page { ...@@ -67,21 +72,190 @@ page {
} }
} }
} }
// .content{
// position: relative;
// }
.clue{
padding: 8px 10px 0;
background-color: #f2f3f7;
.types{
margin-bottom: 8px;
display: flex;
align-items: center;
.type{
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
width: 80px;
height: 24px;
line-height: 24px;
background: #FFFFFF;
border-radius: 14px;
font-size: 12px;
color: #8A8C90;
.point{
margin-left: 2px;
width: 12px;
height: 12px;
}
}
}
.list{
.msg{
padding:10px 16px 16px;
margin-bottom: 8px;
position: relative;
background-color: #fff;
border-radius: 4px;
}
.like{
position: absolute;
right:12px;
top: 0;
width: 23px;
height: 23px;
}
.name{
display: flex;
align-items: center;
// font-weight: 400;
font-size: 14px;
color: #323436;
.avatar{
margin-left: 2px;
width: 20px;
height: 20px;
}
}
.line{
margin-top: 10px;
margin-bottom: 10px;
height:0;
border-bottom:#EEEEEE 1px dashed;
}
.want-more{
overflow: hidden;
}
.want-btn{
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record{
margin-top: 4px;
margin-bottom: 4px;
display: flex;
justify-content:space-between;
align-items: center;
.action-wrap{
display: flex;
align-items: center;
font-size: 12px;
color: #393B3E;
}
// .action{
// }
// .detail{
// }
.time{
font-size: 12px;
color: #8A8C90;
}
}
.info{
margin-top: 10px;
display: flex;
justify-content:space-between;
.phone-wrap{
display: flex;
align-items:center;
}
.phone{
font-size: 12px;
color: #3666FE;
}
.phone-img{
margin-left: 12px;
margin-right: 8px;
width: 20px;
height: 20px;
border-radius:50%;
}
.copy{
width: 20px;
height: 20px;
border-radius:50%;
}
.btn{
width: 85px;
height: 24px;
background: var(--btnColor);
border-radius: 12px;
font-size: 12px;
color: #FFFFFF;
text-align: center;
line-height: 24px;
}
}
.shop{
.name-wrap{
display: flex;
justify-content:space-between;
align-items: center;
}
.source{
font-size: 10px;
color: #8A8C90;
}
.btn{
border: 1px solid var(--btnColor);
border-radius: 12px;
background-color: #fff;
font-size: 12px;
color: var(--btnColor);
}
.shop-action-wrap{
display: flex;
justify-content:space-between;
align-items: center;
}
.shop-record{
width:100%;
}
.shop-source{
margin-top: 4px;
width:100%;
font-size: 12px;
color: #393B3E;
}
}
}
}
.scene{ .scene{
margin: 0 10px 16px; margin: 0 10px 16px;
display: flex; display: flex;
justify-content:space-between; justify-content:space-between;
.item{ .item-wrap{
position: relative; position: relative;
width: 106px;
height: 116px;
}
.item{
width: 86px; width: 86px;
height: 90px; height: 90px;
background: #F7F8FC; background: #F7F8FC;
border-radius: 6px; border-radius: 6px;
} }
.act{ .act{
position: absolute; background-image: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png');
top: 0; background-size: 100% 100%;
left: 0; .item {
background:transparent;
}
} }
.img{ .img{
display:block; display:block;
......
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}"> <wxs src="./index.wxs" module="filterUtils" />
拓客户 <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</navigation-bar>
</navigation-bar>
<view class="reclaim"> <view class="reclaim">
<view class="header-wrap" style="height:{{tabBarStyle*2 + 88}}rpx; background-image: url('../../../images/index/head.png')"> <view class="header-wrap" style="height:{{headerHeight}}rpx; background-image: url('{{IMG_URL}}index/head.png')">
<view class="header"> <view class="header">
<view class="left"> <!-- <view class="left">
<view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left"> <view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left">
看线索 看线索
</view> </view>
<view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right"> <view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right">
看产品 看产品
</view> </view>
</view> -->
<tab tab="{{tabList}}" itemWidth="{{'35%'}}" index="{{tabIndx}}" bindclick="changeTabIndx" class="tabContainer" />
<view class="right" bindtap="gotoApply">
<image class="img" src="{{IMG_URL}}index/apply.png" />
<view class="apply">申请业务</view>
</view> </view>
<view class="right">
<image class="img" src="../../../images/index/apply.png"></image>
<view class="apply">
申请业务
</view> </view>
</view> </view>
<view class="content" wx:if="{{tabIndx == 1 }}" hover-class="none" hover-stop-propagation="false">
<view class="scene">
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" bindtap="selectCar" wx:for="{{dataArr}}" wx:key="name">
<view class="item">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view> </view>
</view> </view>
<view class="scene"> </view>
<view class="item item{{index}}" wx:for="{{dataArr}}" wx:key="name"> <product stickyTop="{{headerHeight}}" />
<image class="img" src="{{item.src}}"></image> </view>
<view class="name"> <view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false">
<view class="types">
<view class="type" wx:for="{{typeList}}" wx:key="*this" data-index="{{index}}" bindtap="filterTypeFn">
{{item}}
<image class="point" wx:if="{{index != 3}}" src="{{IMG_URLLocal}}index/point.png" />
</view>
</view>
<view class="list" hover-class="none" hover-stop-propagation="false">
<view class="msg" wx:for="{{clueList}}" wx:key="phone">
<!-- 生意助手 -->
<view wx:if="{{item.source == 'customer'}}">
<image class="like" wx:if="{{item.like}}" src="{{IMG_URLLocal}}index/like.png" data-type="like" data-outidx="{{index}}" bindtap="showToast" />
<image class="like" wx:else src="{{IMG_URLLocal}}index/dislike.png" data-type="dislike" data-outidx="{{index}}" bindtap="showToast" />
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.name}}
<image class="avatar" src="{{IMG_URLLocal}}index/avatar.png" />
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="want-more" style="height:{{item.getMoreFlag? 100: 'auto'}}px">
<view class="record" wx:for="{{item.records}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">
{{filterUtils.filterType(itemName.type)}}:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.msg}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.time}}
</view>
</view>
</view>
<view class="want-btn" wx:if="{{item.records.length > 5}}" hover-class="none" hover-stop-propagation="false" data-outidx="{{index}}" bindtap="getMore">
{{ item.getMoreFlag ? '更多数据' : '收起数据'}}
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URLLocal}}index/phone.png" />
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URLLocal}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply">
+开店面
</view>
</view>
</view>
<!-- 门店助手 -->
<view class="shop" wx:else>
<view class="name-wrap">
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.name}} {{item.name}}
<image class="avatar" src="{{IMG_URLLocal}}index/avatar.png" />
</view>
<view class="source" hover-class="none" hover-stop-propagation="false">通过门店助手申请</view>
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="record" wx:for="{{item.records}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName">
<view class="shop-record">
<view class="shop-action-wrap">
<view class="action-wrap">
<view class="action" selectable="false" space="false" decode="false">
{{filterUtils.filterType(itemName.type)}}:
</view>
<view class="detail" selectable="false" space="false" decode="false">
{{itemName.msg}}
</view>
</view>
<view class="time" selectable="false" space="false" decode="false">
{{itemName.time}}
</view>
</view>
<view class="shop-source" hover-class="none" hover-stop-propagation="false">
所属门店:{{itemName.shop}}
</view>
</view>
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URLLocal}}index/phone.png" />
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URLLocal}}index/copy.png" />
</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply">
开通活动
</view>
</view>
</view> </view>
<view class="msg">
{{item.msg}}
</view> </view>
</view> </view>
</view> </view>
<product></product>
</view> </view>
<vas-toast isShow="{{true}}" id='toast' />
<view class="guide" wx:if="{{guideShow}}"> <view class="guide" wx:if="{{guideShow}}">
<image bindtap="guideFn" class="guide-img" src="../../../images/entrustCustomers/guide{{guideSrcIndex}}.png"></image> <image bindtap="guideFn" class="guide-img" src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" />
</view> </view>
\ No newline at end of file \ No newline at end of file
/**
*
* @param type 线索类型
* @returns
*/
var filterType = function(type){
var res;
type = +type;
switch (type) {
case 0:
res = '访问页面1'
break;
case 1:
res = '访问页面2'
break;
case 2:
res = '访问页面3'
break;
}
return res;
};
module.exports = {
filterType:filterType
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!