Commit abbcd607 by luyt

fix:首页模块拆分

1 parent 71c2adc1
// pages/tab/index/components/indexClue/indexClue.js
import { IMG_URL } from "~/utils/constantData.js";
import { unreadApi, pageApi, tagApi } from "~/api/index.js";
const IMAGES = Object.freeze({
arrow: `${IMG_URL}/index/point.png`,
actArrow: `${IMG_URL}/index/actArrow.png`,
});
Component({
/**
* 组件的属性列表
*/
properties: {
headerHeight: Number,
disLikeRecordFlag: Boolean,
},
/**
* 组件的初始数据
*/
data: {
IMAGES,
IMG_URL,
typeList: [
{
0: "无电话",
1: "有电话",
2: "联系电话",
selectIndex: 2,
key: "hasPhone",
},
{
0: "非意向客户",
1: "是意向客户",
2: "意向客户",
selectIndex: 2,
key: "starTag",
},
{
0: "来自访客",
1: "来自门店",
2: "线索来源",
selectIndex: 2,
key: "clueSource",
},
{
2: "重置",
selectIndex: 2,
},
],
clueList: [],
// 看线索部分
unreadClueCount: 0,
cluePageSize: 1000,
clueCurrentPage: 1,
disLikeFlag: true,
clueParams: {}, //看线索参数
},
lifetimes: {
attached: function () {
// 看线索
this.getClueInit();
},
},
/**
* 组件的方法列表
*/
methods: {
//点击收藏
showToast: function (e) {
wx.$storage.set("disLikeRecordFlag", false);
let disLikeRecordFlag = wx.$storage.get("disLikeRecordFlag");
this.setData({
disLikeFlag: false,
disLikeRecordFlag,
});
let { type, item } = e.currentTarget.dataset;
console.log("type,item: ", type, item);
let tipObj = {};
if (item.starTag == 1) {
tipObj = {
type: "fail",
title: "取消标记为意向客户",
};
} else {
tipObj = {
type: "success",
title: "成功标记为意向客户",
};
}
this.triggerEvent("showToggleToast", tipObj);
// this.data.showToggleToast(tipObj)
// this.data.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,
});
//发请求
let { sessionId } = wx.$storage.get();
let params = {
clueId: item.clueId,
sessionId,
};
this.getTagApi(params);
},
//看线索重置
resetCluelist() {
let { typeList } = this.data;
typeList.forEach((item) => {
item.selectIndex = 2;
});
this.setData({
typeList,
clueParams: {},
});
//重置数据
this.clearclueData();
this.getPageApi();
},
filterTypeFn(e) {
let { typeList } = this.data;
let index = e.currentTarget.dataset.index;
// 重置筛选
if (index == 3) {
return this.resetCluelist();
}
let itemList = Object.values(typeList[index]).slice(0, 2);
itemList.push("全部");
let _this = this;
wx.pro.showActionSheet({
itemList,
success(res) {
//重置数据
_this.clearclueData();
// 选中全部
let selectIndex = res.tapIndex;
// console.log('selectIndex: ', selectIndex);
typeList[index].selectIndex = selectIndex;
let params = typeList.reduce((obj, item, index) => {
console.log(" item: ", item);
if (item["key"]) {
let itemIndx = item.selectIndex;
// key: 'clueSource'
if (item["key"] == "clueSource") {
// itemIndx += 1
obj[item["key"]] = itemIndx == 2 ? "" : itemIndx + 1;
} else {
obj[item["key"]] = itemIndx == 2 ? "" : itemIndx;
}
}
return obj;
}, {});
console.log(params);
// 清空数据
_this.setData({ typeList, clueParams: params });
_this.getPageApi(params);
},
fail(res) {
console.log(res.errMsg);
},
});
},
//重置数据
clearclueData() {
this.setData({
clueList: [],
clueCurrentPage: 1,
// hasPhone: '',
// starTag: '',
// clueSource: '',
});
},
// 打电话
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);
},
getClueInit(param) {
// console.log(22222)
this.getUnreadApi(param);
this.getPageApi(param);
},
//未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param);
if (code == 0) {
this.setData({
unreadClueCount: data.unreadClueCount,
});
}
},
//获取浏览线索数据列表
async getPageApi(param) {
let { cluePageSize, clueCurrentPage, clueList } = this.data;
let params = {
pageSize: cluePageSize,
currentPage: clueCurrentPage,
...param,
};
let { code, data } = await pageApi(params);
if (code == 0) {
let arr = data.list.map((item) => {
if (item.visitList.length > 5) {
item.getMoreFlag = true;
}
return item;
});
//添加分页数据
// let concatArr = []
// if(arr.length > 0) {
// concatArr = clueList.concat(arr)
// }
this.setData({
clueList: arr,
});
let arrinx = arr.findIndex((e) => e.clueType == 1 && e.starTag == 0);
this.setData({
disLikeFlagIdx: arrinx,
triggered: false,
});
}
},
//喜欢收藏功能
async getTagApi(param) {
let { clueParams } = this.data;
let res = await tagApi(param);
console.log("res: ", res);
if (res.code == 0) {
let clueListPamas = {
...param,
...clueParams,
};
this.getPageApi(clueListPamas);
}
},
// 上拉刷新
scrolltolowerFn() {
console.log("scrolltolowerFn: ");
let { clueCurrentPage, clueParams } = this.data;
console.log("clueCurrentPage: ", clueCurrentPage);
let params = {
...clueParams,
clueCurrentPage: clueCurrentPage++,
};
this.setData({
clueCurrentPage,
});
this.getPageApi(params);
},
// 下拉刷新
refreshList() {
// console.log('onPullDownRefresh: ');
let { clueParams } = this.data;
this.getClueInit(clueParams);
// this.resetCluelist()
// this.onLoad()
wx.pro.showToast({
title: "刷新成功",
icon: "loading",
duration: 1500,
});
},
gotoApply(e) {
let { type, item } = e.currentTarget.dataset;
// let { } = e.currentTarget.dataset
// console.log(item)
// return
if (type == "active") {
let { userInfo } = wx.$storage.get();
let pMerchantName = userInfo.subLoginUser.merchantName;
let pMerchantId = userInfo.subLoginUser.merchantId;
let sceneActive;
switch (this.data.actNum) {
case 0:
sceneActive = 1;
break;
case 1:
sceneActive = 2;
break;
case 2:
sceneActive = 3;
break;
case 3:
sceneActive = 4;
break;
}
// let pMerchantId = userInfo.subLoginUser.merchantId
// console.log("type,item: ", type, item);
const params = {
merchantInfo: {
pMerchantId,
pMerchantName,
merchantId: item.visitList[0].merchantId,
merchantName: item.visitList[0].merchantName,
},
sceneActive,
clueId: item.clueId,
// sceneCodeList: ['SC001', 'SC002','SC003','SC004']
};
//申请活动
wx.$router.go("packageOutput.openBusiness", params);
} else {
//申请门店
// let { type, item } = e.currentTarget.dataset
wx.$router.go("apply", item?.clueId || "");
}
// wx.$router.go('apply',1235)
},
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,
});
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/indexClue/indexClue.wxss */
.clue-wrap {
padding: 0px 10px 0;
background-color: #f2f3f7;
// margin-top: -16rpx;
// overflow: scroll;
.types {
// margin-bottom: 8px;
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
// position: sticky;
// top: 280rpx;
z-index: 2;
background-color: #f2f3f7;
// margin-top: -32rpx;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
.active {
color: #3964fe;
}
}
.list-wrap {
height: calc(100% - 80rpx);
}
.list {
// overflow: scroll;
box-sizing: border-box;
// padding-bottom: 8rpx;
.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;
}
.disLike-tit {
width: 172rpx;
background: rgba(0, 0, 0, 0.60);
padding: 8rpx 0rpx;
font-family: PingFangSC-Regular;
font-size: 20rpx;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
border-radius: 8rpx;
position: absolute;
right: 0rpx;
top: 61rpx;
}
.disLike-titsan {
width: 0;
height: 0;
border: 18rpx solid;
border-color: transparent transparent #686868;
position: absolute;
right: 27rpx;
top: 30rpx;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 28rpx;
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 {
box-sizing: border-box;
// overflow: hidden;
transition: all 3s ease;
}
// .height {
// height: 200rpx;
// }
// .auto {
// height: auto;
// }
.hiddenMore {
display: none !important;
}
.showMore {
display: flex !important;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
// margin-top: 4px;
// margin-bottom: 4px;
box-sizing: border-box;
// height: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 24rpx;
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: 24rpx;
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;
}
}
.noDataImg {
width: 512rpx;
height: 512rpx;
margin-left: 100rpx;
position: relative;
.noDataTxt {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCED1;
position: absolute;
bottom: 32rpx;
left: 50%;
transform: translateX(-50%);
}
}
.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: 24rpx;
color: #393b3e;
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/index/components/indexClue/indexClue.wxml-->
<view
class="clue-wrap"
style="height: calc(100vh - {{headerHeight/2}}px)"
hover-class="none"
hover-stop-propagation="false">
<view class="types">
<view
class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}"
wx:for="{{typeList}}"
wx:key="*this"
data-index="{{index}}"
style="{{index == 0 ? 'margin-left: 0px;' : ''}}"
bindtap="filterTypeFn">
{{item[item['selectIndex']] }}
<image
webp
class="point"
wx:if="{{index != 3}}"
src="{{item['selectIndex']!=2&&index != 3? IMAGES.actArrow : IMAGES.arrow}}" />
</view>
</view>
<!-- bindscrolltolower="scrolltolowerFn" -->
<scroll-view
scroll-y="true"
class="list-wrap"
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<view class="list" hover-class="none" hover-stop-propagation="false">
<view class="msg" wx:for="{{clueList}}" wx:key="index">
<!-- 门店助手 -->
<view class="shop" wx:if="{{item.clueType == 2}}">
<view class="name-wrap">
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image
webp
class="avatar"
src="{{IMG_URL}}index/man.png"
wx:if="{{item.clueType != 3}}" />
</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.visitList}}"
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">
访问页面:
</view>
<view
class="detail"
selectable="false"
space="false"
decode="false">
{{itemName.productDesc}}
</view>
</view>
<view
class="time"
selectable="false"
space="false"
decode="false">
{{itemName.clueDate}}
</view>
</view>
<view class="shop-source" hover-class="none" hover-stop-propagation="false">
所属门店:{{itemName.merchantName}}
</view>
</view>
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view>
<view class="phone-wrap" wx:if="{{item.phone}}">
<view class="phone">{{item.phone}}</view>
<image
webp
class="phone-img"
data-phone="{{item.phone}}"
bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" />
<image
webp
class="copy"
data-phone="{{item.phone}}"
bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" />
</view>
</view>
<view
class="btn"
hover-class="none"
hover-stop-propagation="false"
data-type="active"
data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}"
bindtap="gotoApply">
开通活动
</view>
</view>
</view>
<!-- 生意助手 -->
<view wx:else>
<image
webp
class="like"
wx:if="{{item.clueType == 1 && item.starTag == 1}}"
src="{{IMG_URL}}index/like.png"
data-type="like"
data-outidx="{{index}}"
data-item="{{item}}"
bindtap="showToast" />
<image
webp
class="like"
wx:if="{{item.clueType == 1 && item.starTag == 0}}"
src="{{IMG_URL}}index/dislike.png"
data-type="dislike"
data-outidx="{{index}}"
data-item="{{item}}"
bindtap="showToast" />
<view class="disLike-tit" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}">
标记为意向客户
</view>
<view class="disLike-titsan" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}" />
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image
webp
class="avatar"
src="{{IMG_URL}}index/avatar.png"
wx:if="{{item.clueType != 3}}" />
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<!-- {{item.getMoreFlag?'height':'auto'}} -->
<view class="want-more ">
<view
class="record {{idx>4&&item.getMoreFlag?'hiddenMore':''}} {{idx>4&&!item.getMoreFlag?'showMore':''}}"
wx:for="{{item.visitList}}"
wx:key="id"
wx:for-index="idx"
wx:for-item="itemName">
<view class="action-wrap">
<view
class="action"
selectable="false"
space="false"
decode="false">访问页面:
</view>
<view
class="detail"
selectable="false"
space="false"
decode="false">
{{itemName.productDesc}}
</view>
</view>
<view
class="time"
selectable="false"
space="false"
decode="false">
{{itemName.clueDate}}
</view>
</view>
</view>
<view
class="want-btn"
wx:if="{{item.visitList.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"
wx:if="{{item.phone}}">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image
webp
class="phone-img"
data-phone="{{item.phone}}"
bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" />
<image
webp
class="copy"
data-phone="{{item.phone}}"
bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" />
</view>
<view
class="btn"
hover-class="none"
hover-stop-propagation="false"
data-type="shop"
bindtap="gotoApply"
data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}">
+开店面
</view>
</view>
</view>
</view>
<view class="bottomTips" wx:if="{{clueList.length>8}}">到底啦!</view>
<view class="noDataImg" wx:if="{{!clueList.length}}">
<image webp src="{{IMG_URL}}index/trEmpty.png " />
<text class="noDataTxt">没有符合条件的线索~</text>
</view>
</view>
</scroll-view>
</view>
// pages/tab/index/components/indexProduct/indexProduct.js
Component({
/**
* 组件的属性列表
*/
properties: {
actNum:Number,
img_version:null,
senceData:Array,
headerHeight:Number
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
// 选车场景切换
selectCar(e) {
// console.log('e: ', e)
let { num } = e.currentTarget.dataset
this.triggerEvent('selectCar',num)
},
}
})
{
"component": true,
"usingComponents": {
"product": "../product/product"
}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/indexProduct/indexProduct.wxss */
.content-product {
.scene {
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin: 32rpx 32rpx 0;
.scene-wrap {
display: flex;
}
.item-wrap {
margin-right: 16rpx;
margin-bottom: 40rpx;
position: relative;
width: 172rpx;
height: 180rpx;
border-radius: 8rpx;
border: 1px solid #f7f8fc;
box-sizing: border-box;
}
.item {
position: relative;
// padding-top: 10px;
width: 172rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.open-img {
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
box-sizing: border-box;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image: linear-gradient(145deg, #f0f7ff 0%, #ffffff 73%);
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32),
0 8rpx 20rpx 0 rgba(180, 186, 204, 0.4);
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
// .open-img{
// display: none;
// }
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
.name {
margin-bottom: 2px;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.msg {
font-weight: 500;
font-size: 18rpx;
color: #323436;
text-align: center;
}
}
}
<!--pages/tab/index/components/indexProduct/indexProduct.wxml-->
<view
class="content-product"
hover-class="none"
hover-stop-propagation="false">
<view class="scene">
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view
class="item-wrap {{actNum== index ? 'act':''}}"
data-num="{{index}}"
data-scenestatus="{{item.sceneStatus}}"
bindtap="selectCar"
wx:for="{{senceData}}"
wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</view>
{ {
"usingComponents": { "usingComponents": {
"product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"shareModel": "./components/shareModel/shareModel", "crowdfund-poster": "./components/CrowdfundPoster/CrowdfundPoster",
"crowdfund-poster": "./components/CrowdfundPoster/CrowdfundPoster" "indexProduct":"./components/indexProduct/indexProduct",
"indexClue":"./components/indexClue/indexClue"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 50, "onReachBottomDistance": 50,
......
...@@ -94,378 +94,7 @@ page { ...@@ -94,378 +94,7 @@ page {
// .content{ // .content{
// position: relative; // position: relative;
// } // }
.clue {
padding: 0px 10px 0;
background-color: #f2f3f7;
// margin-top: -16rpx;
// overflow: scroll;
.types {
// margin-bottom: 8px;
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
// position: sticky;
// top: 280rpx;
z-index: 2;
background-color: #f2f3f7;
// margin-top: -32rpx;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
.active {
color: #3964fe;
}
}
.list-wrap {
height: calc(100% - 80rpx);
}
.list {
// overflow: scroll;
box-sizing: border-box;
// padding-bottom: 8rpx;
.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;
}
.disLike-tit {
width: 172rpx;
background: rgba(0, 0, 0, 0.60);
padding: 8rpx 0rpx;
font-family: PingFangSC-Regular;
font-size: 20rpx;
color: #FFFFFF;
line-height: 36rpx;
text-align: center;
border-radius: 8rpx;
position: absolute;
right: 0rpx;
top: 61rpx;
}
.disLike-titsan {
width: 0;
height: 0;
border: 18rpx solid;
border-color: transparent transparent #686868;
position: absolute;
right: 27rpx;
top: 30rpx;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 28rpx;
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 {
box-sizing: border-box;
// overflow: hidden;
transition: all 3s ease;
}
// .height {
// height: 200rpx;
// }
// .auto {
// height: auto;
// }
.hiddenMore {
display: none !important;
}
.showMore {
display: flex !important;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
// margin-top: 4px;
// margin-bottom: 4px;
box-sizing: border-box;
// height: 40rpx;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 24rpx;
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: 24rpx;
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;
}
}
.noDataImg {
width: 512rpx;
height: 512rpx;
margin-left: 100rpx;
position: relative;
.noDataTxt {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCED1;
position: absolute;
bottom: 32rpx;
left: 50%;
transform: translateX(-50%);
}
}
.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: 24rpx;
color: #393b3e;
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
}
.scene {
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin: 32rpx 32rpx 0;
.scene-wrap {
display: flex;
}
.item-wrap {
margin-right: 16rpx;
margin-bottom: 40rpx;
position: relative;
width: 172rpx;
height: 180rpx;
border-radius: 8rpx;
border: 1px solid #f7f8fc;
box-sizing: border-box;
}
.item {
position: relative;
// padding-top: 10px;
width: 172rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.open-img {
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
box-sizing: border-box;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40);
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
// .open-img{
// display: none;
// }
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
.name {
margin-bottom: 2px;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.msg {
font-weight: 500;
font-size: 18rpx;
color: #323436;
text-align: center;
}
}
} }
.guide { .guide {
......
...@@ -19,274 +19,22 @@ ...@@ -19,274 +19,22 @@
</view> </view>
</view> </view>
<!-- 托客户内容 --> <!-- 托客户内容 -->
<view <indexProduct wx:if="{{tabIndx == 1 }}"
class="content" bindselectCar="selectCar"
wx:if="{{tabIndx == 1 }}" senceData="{{senceData}}"
hover-class="none" actNum="{{actNum}}"
hover-stop-propagation="false"> img_version="{{img_version}}"
<view class="scene"> headerHeight="{{headerHeight}}"></indexProduct>
<!-- wx:if="{{item.sceneStatus == 1}}" -->
<scroll-view scroll-x="{{true}}">
<view class="scene-wrap">
<view
class="item-wrap {{actNum== index ? 'act':''}}"
data-num="{{index}}"
data-scenestatus="{{item.sceneStatus}}"
bindtap="selectCar"
wx:for="{{senceData}}"
wx:key="name">
<view class="item">
<!-- <image class="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</view>
<!-- 看线索内容 --> <!-- 看线索内容 -->
<view <indexClue
class="clue" wx:if="{{tabIndx == 0 }}"
style="height: calc(100vh - {{headerHeight/2}}px)" headerHeight="{{headerHeight}}"
wx:if="{{tabIndx == 0 }}" disLikeRecordFlag="{{disLikeRecordFlag}}"
hover-class="none" bindshowToggleToast="showToggleToast"
hover-stop-propagation="false"> ></indexClue>
<view class="types">
<view
class="type {{item['selectIndex']!=2&&index != 3?'active':'' }}"
wx:for="{{typeList}}"
wx:key="*this"
data-index="{{index}}"
style="{{index == 0 ? 'margin-left: 0px;' : ''}}"
bindtap="filterTypeFn">
{{item[item['selectIndex']] }}
<image
webp
class="point"
wx:if="{{index != 3}}"
src="{{item['selectIndex']!=2&&index != 3? IMAGES.actArrow : IMAGES.arrow}}" />
</view>
</view>
<!-- bindscrolltolower="scrolltolowerFn" -->
<scroll-view
scroll-y="true"
class="list-wrap"
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<view class="list" hover-class="none" hover-stop-propagation="false">
<view class="msg" wx:for="{{clueList}}" wx:key="index">
<!-- 门店助手 -->
<view class="shop" wx:if="{{item.clueType == 2}}">
<view class="name-wrap">
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image
webp
class="avatar"
src="{{IMG_URL}}index/man.png"
wx:if="{{item.clueType != 3}}" />
</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.visitList}}"
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">
访问页面:
</view>
<view
class="detail"
selectable="false"
space="false"
decode="false">
{{itemName.productDesc}}
</view>
</view>
<view
class="time"
selectable="false"
space="false"
decode="false">
{{itemName.clueDate}}
</view>
</view>
<view class="shop-source" hover-class="none" hover-stop-propagation="false">
所属门店:{{itemName.merchantName}}
</view>
</view>
</view>
<view class="info" hover-class="none" hover-stop-propagation="false">
<view>
<view class="phone-wrap" wx:if="{{item.phone}}">
<view class="phone">{{item.phone}}</view>
<image
webp
class="phone-img"
data-phone="{{item.phone}}"
bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" />
<image
webp
class="copy"
data-phone="{{item.phone}}"
bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" />
</view>
</view>
<view
class="btn"
hover-class="none"
hover-stop-propagation="false"
data-type="active"
data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}"
bindtap="gotoApply">
开通活动
</view>
</view>
</view>
<!-- 生意助手 -->
<view wx:else>
<image
webp
class="like"
wx:if="{{item.clueType == 1 && item.starTag == 1}}"
src="{{IMG_URL}}index/like.png"
data-type="like"
data-outidx="{{index}}"
data-item="{{item}}"
bindtap="showToast" />
<image
webp
class="like"
wx:if="{{item.clueType == 1 && item.starTag == 0}}"
src="{{IMG_URL}}index/dislike.png"
data-type="dislike"
data-outidx="{{index}}"
data-item="{{item}}"
bindtap="showToast" />
<view class="disLike-tit" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}">
标记为意向客户
</view>
<view class="disLike-titsan" wx:if="{{item.clueType == 1 && item.starTag == 0 && disLikeFlag && disLikeRecordFlag}}" hidden="{{index != disLikeFlagIdx}}" />
<view class="name" hover-class="none" hover-stop-propagation="false">
{{item.nickName}}
<image
webp
class="avatar"
src="{{IMG_URL}}index/avatar.png"
wx:if="{{item.clueType != 3}}" />
</view>
<view class="line" hover-class="none" hover-stop-propagation="false" />
<!-- {{item.getMoreFlag?'height':'auto'}} -->
<view class="want-more ">
<view
class="record {{idx>4&&item.getMoreFlag?'hiddenMore':''}} {{idx>4&&!item.getMoreFlag?'showMore':''}}"
wx:for="{{item.visitList}}"
wx:key="id"
wx:for-index="idx"
wx:for-item="itemName">
<view class="action-wrap">
<view
class="action"
selectable="false"
space="false"
decode="false">访问页面:
</view>
<view
class="detail"
selectable="false"
space="false"
decode="false">
{{itemName.productDesc}}
</view>
</view>
<view
class="time"
selectable="false"
space="false"
decode="false">
{{itemName.clueDate}}
</view>
</view>
</view>
<view
class="want-btn"
wx:if="{{item.visitList.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"
wx:if="{{item.phone}}">
<view class="phone-wrap">
<view class="phone">{{item.phone}}</view>
<image
webp
class="phone-img"
data-phone="{{item.phone}}"
bindtap="phoneCallFn"
src="{{IMG_URL}}index/phone.png" />
<image
webp
class="copy"
data-phone="{{item.phone}}"
bindtap="setCopyDataFn"
src="{{IMG_URL}}index/copy.png" />
</view>
<view
class="btn"
hover-class="none"
hover-stop-propagation="false"
data-type="shop"
bindtap="gotoApply"
data-item="{{item}}"
wx:if="{{item.applyStatus == 0}}">
+开店面
</view>
</view>
</view>
</view>
<view class="bottomTips" wx:if="{{clueList.length>8}}">到底啦!</view>
<view class="noDataImg" wx:if="{{!clueList.length}}">
<image webp src="{{IMG_URL}}index/trEmpty.png " />
<text class="noDataTxt">没有符合条件的线索~</text>
</view>
</view>
</scroll-view>
</view>
</view> </view>
<!-- 收藏、取消提示框 --> <!-- 收藏、取消提示框 -->
<vas-toast isShow="{{true}}" id='toast' /> <vas-toast id='toast' />
<!-- 引导图 --> <!-- 引导图 -->
<view class="guide" wx:if="{{guideShow}}" style="overflow-y:hidden;"> <view class="guide" wx:if="{{guideShow}}" style="overflow-y:hidden;">
<image <image
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!