Commit 9aff21e9 by luyt

feat:添加dev_v3.2.0

1 parent b109ef70
Showing 35 changed files with 3034 additions and 12 deletions
{ {
"pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "login/index/index", "login/accountItems/accountItems", "pages/checkProduct/checkProduct"], "pages": [
"requiredPrivateInfos": ["getLocation"], "login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/mine/mine",
"login/index/index",
"login/accountItems/accountItems"
],
"requiredPrivateInfos": [
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -37,32 +46,47 @@ ...@@ -37,32 +46,47 @@
{ {
"root": "packagesList/packageOutput", "root": "packagesList/packageOutput",
"name": "packageOutput", "name": "packageOutput",
"pages": ["pages/openBusiness", "pages/summary"] "pages": [
"pages/openBusiness",
"pages/summary"
]
}, },
{ {
"root": "packagesList/mineDetail", "root": "packagesList/mineDetail",
"name": "mineDetail", "name": "mineDetail",
"pages": ["pages/messageBox", "pages/customerManagement"] "pages": [
"pages/messageBox",
"pages/customerManagement"
]
}, },
{ {
"root": "packagesList/webView", "root": "packagesList/webView",
"name": "webView", "name": "webView",
"pages": ["pages/webView"] "pages": [
"pages/webView"
]
}, },
{ {
"root": "packagesList/apply", "root": "packagesList/apply",
"name": "apply", "name": "apply",
"pages": ["pages/apply"] "pages": [
"pages/apply"
]
} }
], ],
"preloadRule": { "preloadRule": {
"pages/tab/mine/mine": { "pages/tab/mine/mine": {
"network": "all", "network": "all",
"packages": ["mineDetail"] "packages": [
"mineDetail"
]
}, },
"pages/tab/index/index": { "pages/tab/index/index": {
"network": "all", "network": "all",
"packages": ["apply", "packageOutput"] "packages": [
"apply",
"packageOutput"
]
} }
}, },
"usingComponents": { "usingComponents": {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"description": "", "description": "",
"main": "app.js", "main": "app.js",
"dependencies": { "dependencies": {
"@vant/weapp": "^1.10.5" "@vant/weapp": "^1.10.7"
}, },
"devDependencies": {}, "devDependencies": {},
"scripts": { "scripts": {
......
import { IMG_URL } from "~/utils/constantData.js"; import { IMG_URL } from "~/utils/constantData.js";
var senceData = [ var senceData = [
{ {
name: '新车洽谈场景', name: '新车洽谈场景',
...@@ -266,6 +265,29 @@ var senceData = [ ...@@ -266,6 +265,29 @@ var senceData = [
}, },
] ]
//获取当前场景下的全部 产品分类
const getAllTypePro= (index,type) => {
//获取所有分类
let res = []; //[ { text: '美容类' }, { text: '轻改类' } ]
let list = senceData[index][type]
function someFn(element) {
return element.text == this.category;
}
if(list){
list.forEach(item=>{
if(!res.some(someFn,item)){
res.push({
text:item.category,
type:item.type
})
}
})
}
// console.log('res',res)
return res;
}
// getAllTypePro(3,'productList')
module.exports = { module.exports = {
senceData senceData
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
"usingComponents": { "usingComponents": {
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"indexProduct": "./components/indexProduct/indexProduct", "indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue", "indexClue": "./components/indexClue/indexClue"
"FullscreenVideo": "../../../components/FullscreenVideo/FullscreenVideo"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 50 "onReachBottomDistance": 50
......
// packageOutput/pages/summary/components/CrowdfundPoster/CrowdfundPoster.js
import Draw from '~/utils/Draw'
Component({
/**
* 组件的属性列表
*/
properties: {
item: {
// type: Object,
type: null,
observer(n) {
console.log(n, '=================')
this.getImageInfo(n)
},
}
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
getImageInfo(n) {
let that = this
wx.getImageInfo({
src: `${n.posterUrl}?v=${Date.now()}`,
success: function (res) {
console.log(res)
// w = res.width
// h = res.height
that.init(n, res.width, res.height)
}
})
},
async init(n, ImgWidth, ImgHeight) {
let proportion = ImgWidth / 279
let actualHeight = ImgHeight / proportion
console.log(actualHeight)
wx.$api.showLoading()
const drawfun = new Draw(
{
width: 279,
// height: 554
height: actualHeight
},
this
),
{ userInfo } = wx.$storage.get(),
merchantName = userInfo.merchantName.length > 12 ? `${userInfo.merchantName.substring(0, 12)}...` : userInfo.merchantName,
res = await drawfun.begin({
imageList: [
// {
// x: 0,
// y: 0,
// width: 279,
// height: 66,
// url: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/poster-bg.png'
// },
{
x: 0,
y: 0,
width: 279,
height: actualHeight,
url: n.posterUrl
}
]
// textList: [
// {
// x: 12,
// y: 14,
// fontSize: 14,
// color: '#2D2D33',
// text: merchantName,
// textBaseline: 'top'
// },
// {
// x: 12,
// y: 36,
// fontSize: 14,
// color: '#1B233D',
// text: n.activityName,
// textBaseline: 'top',
// fontWeight: 500
// },
// {
// x: 14 + drawfun.getTextWidth(n.activityName, 14) + 9,
// y: 37,
// fontSize: 10,
// color: '#4466F0',
// text: '众筹',
// textBaseline: 'top',
// border: {
// width: 1,
// color: '#4466F0',
// radius: 2,
// padding: [2, 5],
// opacity: 0.5
// }
// }
// ]
})
console.log(res)
wx.hideLoading()
this.setData({
poster: res.path,
show: true
})
},
download() {
const filePath = this.data.poster,
_this = this
wx.saveImageToPhotosAlbum({
filePath,
success() {
wx.$api.showToast('保存成功')
},
fail(err) {
const auth = _this.selectComponent('#auth')
auth.check()
}
})
},
hide() {
this.setData({
show: false,
poster: ''
})
},
noScroll() {},
authFail(e) {
this.setData({
showAuth: true
})
}
}
})
{
"component": true,
"usingComponents": {
"authorize": "../../../../../components/Authorize/Authorize"
}
}
/* packageOutput/pages/summary/components/CrowdfundPoster/CrowdfundPoster.wxss */
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 998;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(28, 27, 35, 0.60);
}
.imgCon {
// height: calc(100% - 64rpx);
height: 100%;
overflow: scroll;
}
.poster {
position: relative;
background-color: #fff;
box-sizing: border-box;
padding: 32rpx;
// padding-bottom: 10rpx;
width: 558rpx;
// height: 60%;
height: 1108rpx;
// overflow: scroll;
border-radius: 8rpx 8rpx 0 0;
&::after {
content: '';
width: 100%;
height: 132rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/bgImg.webp') no-repeat;
background-size: 100% 132rpx;
position: absolute;
left: 0;
top: 0;
z-index: -1;
}
// bgImg.webp
}
// .btn {
// width: 320rpx;
// height: 88rpx;
// line-height: 88rpx;
// background: #3666FE;
// // background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
// border-radius: 16rpx;
// font-weight: 500;
// font-size: 32rpx;
// color: #FFFFFF;
// text-align: center;
// margin-top: 32rpx;
// }
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 558rpx;
height: 90rpx;
background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx;
font-weight: 500;
font-size: 32rpx;
color: #3666FE;
// margin-top: -2rpx;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 12rpx;
}
}
.tips {
margin: 16rpx 80rpx 0;
font-size: 24rpx;
color: #FFFFFF;
line-height: 36rpx;
}
}
\ No newline at end of file \ No newline at end of file
<block wx:if="{{show}}">
<view class="layout">
<!-- catchtouchmove="noScroll" -->
<view class="bg" bindtap="hide" />
<view class="poster">
<!-- <view class="titleTime">最近更新时间 {{item.updatedTime}}</view> -->
<!-- catchtouchmove="noScroll" -->
<view class="imgCon">
<image src="{{poster}}" mode="widthFix" show-menu-by-longpress />
</view>
</view>
<!-- <view class="btn" bindtap="download">下载图片并转发</view> -->
<view class="btn">
<glsx-image src="output/longtap.png" class="icon" />
长按图片转发
</view>
<view class="titleTime">最近更新时间: {{item.updatedTime}}</view>
<!-- <view class="tips">提示:这是您的专属活动海报,请下载转发给门店员工注册并参与活动分享。请不要将此海报转发给非相关活动参与者,避免活动数据泄漏。</view> -->
</view>
</block>
<authorize
scopeType="writePhotosAlbum"
bindfail="authFail"
show="{{showAuth}}"
isShowCheck="{{false}}"
id="auth" />
// 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 && 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: 'success',
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);
wx.$router.go('packagesList.openBusiness', params)
} else {
//申请门店
// let { type, item } = e.currentTarget.dataset
wx.$router.go('packagesList.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="index"
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>10}}">到底啦!</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: {
refresherFlag:true,
},
/**
* 组件的方法列表
*/
methods: {
// 选车场景切换
selectCar(e) {
// console.log('e: ', e)
let { num } = e.currentTarget.dataset
this.triggerEvent('selectCar',num)
},
refresherrefreshFn(){
this.triggerEvent('refresherrefresh')
setTimeout(()=>{
this.setData({
refresherFlag:false
})
},1000)
}
}
})
{
"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-scroll{
height: 100vh;
// height: calc(100% - 80rpx);
}
.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-->
<!-- class="content-scroll" -->
<!-- style="height: calc(100vh - {{headerHeight/2}}px)" -->
<!-- <scroll-view
scroll-y="true"
refresher-enabled="{{true}}"
refresher-triggered="{{refresherFlag}}"
bindrefresherrefresh="refresherrefreshFn"> -->
<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>
<!-- stickyTop="{{headerHeight}}" -->
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</view>
<!-- </scroll-view> -->
\ No newline at end of file \ No newline at end of file
// 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: fixed;
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_URL}}index/like.png"/>
</block>
<block wx:if="{{type==='fail'}}">
<image class="toast-icon" src="{{IMG_URL}}index/dislike.png" />
</block>
</view>
<view class="toast-title">{{title}}</view>
</view>
</view>
{
"component": true,
"usingComponents": {
"tab": "../../../../../components/Tab/Tab"
}
}
\ No newline at end of file \ No newline at end of file
// 特色产品
.prod-wrap {
background-color: #f8fafb;
border-radius: 20rpx 20rpx 0 0;
}
.prod-wrap .big-title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #323436;
padding: 32rpx 32rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
.phone {
font-weight: 400;
font-size: 24rpx;
color: #6C6C6C;
display: flex;
align-items: center;
.icon {
width: 40rpx;
height: 40rpx;
margin-right: 6rpx;
}
}
}
.prod-wrap .nav-wrap {
white-space: nowrap;
box-sizing: border-box;
margin-top: 28rpx;
margin-bottom: 16rpx;
padding-left: 32rpx;
padding-right: 32rpx;
}
.prod-wrap .nav-wrap .nav {
display: inline-block;
height: 64rpx;
border-radius: 4rpx;
font-size: 24rpx;
letter-spacing: 0;
text-align: center;
font-family: PingFangSC-Regular;
line-height: 64rpx;
margin-right: 16rpx;
background: #ffffff;
border: 2rpx solid #DDE3F0;
color: #323436;
padding: 0 16rpx;
}
.prod-wrap .nav-wrap .active-nav {
color: #ffffff;
font-weight: 500;
// background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%);
background-color: var(--btnColor);
border: 0rpx solid;
// 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 {
margin-right: 0;
}
.prod-item {
padding: 0 32rpx 32rpx;
margin: 16rpx auto 0;
background-color: #f5f7fb;
border-radius: 48rpx 48rpx 0 0;
}
.prod-card {
display: flex;
height: 208rpx;
background-image: linear-gradient(1deg, #ffffff 10%, #fdfcff 100%);
border: 2rpx solid #ffffff;
box-shadow: 0 8rpx 20rpx 0 rgba(197, 205, 235, 0.35);
border-radius: 8rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
position: relative;
}
.prod-card .card-img {
width: 160rpx;
height: 160rpx;
flex-shrink: 0;
border-radius: 4rpx;
}
.img-desc {
position: absolute;
width: 104rpx;
height: 40rpx;
line-height: 40rpx;
background: #d7f5eb;
border-radius: 4rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 24rpx;
color: #24b38c;
letter-spacing: 0;
text-align: center;
}
.prod-info {
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 12rpx 0;
margin-left: 24rpx;
}
.prod-info>text {
display: block;
white-space: nowrap;
height: 40rpx;
line-height: 40rpx;
}
.prod-info .title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.prod-info .sale,
.prod-info .earnings {
font-size: 26rpx;
color: #7a8299;
}
.prod-info .sale-num {
font-size: 26rpx;
color: #323436;
}
.prod-info .earnings-num {
font-size: 28rpx;
// font-family: DINAlternate-Bold;
// font-weight: Bold;
color: #f35251;
}
.share-btn {
height: 56rpx;
line-height: 56rpx;
width: 124rpx;
background: #3666FE;
border-radius: 28rpx;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
}
.share-btn .icon {
width: 32rpx;
height: 32rpx;
margin-right: 2rpx;
}
.project-wrap {
background-color: #f5f7fb;
}
.project-img {
overflow: auto;
// height: 1600rpx;
// white-space: nowrap;
.img-item {
position: relative;
}
.more-btn {
position: absolute;
left: 50%;
bottom: 50px;
transform: translateX(-50%);
width: 311px;
height: 48px;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/btn.png");
background-size: 100% 100%;
font-weight: 500;
font-size: 16px;
color: #ffffff;
text-align: center;
line-height: 64rpx;
}
}
.stickyTab {
position: sticky;
z-index: 2;
background-color: #f5f7fb;
}
.stickyTab-fixed {
position: fixed;
left: 0;
top: 352rpx;
}
// .out-tab{
// .out-text {
// // color: red !important;
// }
// .out-text{
// color:red;
// }
// .out-line{
// }
// }
// 流程图一
.img-item11 {
width: 100%;
height: 1110rpx;
}
.img-item12 {
width: 100%;
height: 1290rpx;
}
.img-item13 {
width: 100%;
height: 596rpx;
}
.img-item14 {
width: 100%;
height: 744rpx;
}
.img-item15 {
width: 100%;
height: 490rpx;
}
.img-item16 {
width: 100%;
height: 1532rpx;
}
// 流程图二
.img-item21 {
width: 100%;
height: 2168rpx;
}
.img-item22 {
width: 100%;
height: 1290rpx;
}
.img-item23 {
width: 100%;
height: 596rpx;
}
.img-item24 {
width: 100%;
height: 830rpx;
}
.img-item25 {
width: 100%;
height: 490rpx;
}
.img-item26 {
height: 752rpx;
.video-item {
width: 100%;
video {
border-radius: 16rpx;
height: 348rpx;
}
}
}
// 流程图三
.img-item31 {
width: 100%;
height: 1110rpx;
}
.img-item32 {
width: 100%;
height: 1290rpx;
}
.img-item33 {
width: 100%;
height: 596rpx;
}
.img-item34 {
width: 100%;
height: 984rpx;
}
.img-item35 {
width: 100%;
height: 490rpx;
}
// .img-item26 {
// width: 100%;
// height: 752rpx;
// }
// 流程图四
.img-item41 {
width: 100%;
height: 678rpx;
}
.img-item42 {
width: 100%;
height: 1266rpx;
}
.img-item43 {
width: 100%;
height: 1398rpx;
}
.img-item44 {
width: 100%;
height: 830rpx;
}
.img-item45 {
width: 100%;
height: 490rpx;
}
.img-item46 {
width: 100%;
height: 1666rpx;
}
// 流程图5
.img-item51 {
width: 100%;
height: 814rpx;
}
.img-item52 {
width: 100%;
height: 998rpx;
}
.img-item53 {
width: 100%;
height: 596rpx;
}
.img-item54 {
width: 100%;
height: 984rpx;
}
.img-item55 {
width: 100%;
height: 490rpx;
}
/* 案例视频 */
.video-bg {
width: 100%;
position: absolute;
top: 280rpx;
}
.video-title {
position: relative;
padding: 96rpx 0 24rpx;
text-align: center;
font-size: 48rpx;
font-weight: 900;
color: #FFFFFF;
letter-spacing: 0;
line-height: 64rpx;
}
.video-title::after {
content: '';
display: block;
width: 48rpx;
height: 4rpx;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: #ffffff;
}
.video-list {
display: flex;
flex-wrap: wrap;
padding: 0rpx 32rpx;
font-size: 0;
}
.check-prod .img-item {
&:last-child {
margin-bottom: 148rpx;
}
}
.video-item {
position: relative;
width: calc(50% - 12rpx);
margin-bottom: 32rpx;
}
.video-item .video-card {
width: 100%;
height: 590rpx;
}
.video-item video {
width: 100%;
height: 590rpx;
// border: 1rpx dashed #AFB0B2;
}
.video-item .download {
position: absolute;
top: 0;
right: 0;
width: 48rpx;
height: 48rpx;
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/down-video.png");
background-repeat: no-repeat;
// font-size: 26rpx;
// color: #666;
z-index: 1;
}
.video-item:nth-child(even) {
margin-left: 22rpx;
}
.video-text {
margin-top: 16rpx;
font-size: 24rpx;
font-weight: 500;
font-size: 24rpx;
color: #343456;
}
.video-tips {
width: 100%;
text-align: center;
font-size: 28rpx;
color: rgba(255, 255, 255, .6);
padding: 16rpx 0 92rpx;
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap">
<view class="big-title">
特色产品
<block wx:if="{{phone}}">
<view class="phone" bindtap="phoneCall" data-phone="{{phone}}">
<!-- <image src="{{IMGURL}}share-phone.png?v={{img_version}}" class="icon"></image> -->
<image webp src="{{IMGURL}}phone.png?v={{img_version}}" class="icon"></image>
请联系我
<view style="color:#3666fe">
{{phone}}
</view>
</view>
</block>
</view>
<scroll-view class="nav-wrap" scroll-x="{{true}}" wx:if="{{!isShare && origin =='home'}}">
<block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block>
</scroll-view>
<view class="prod-item">
<view class="prod-card">
<view class="card-img">
<!-- <text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png?v={{img_version}}" /> -->
<image webp src="{{IMGURL}}prod/{{senceData[actNum].productList[activeNavIdx].img}}.png?v={{img_version}}" />
</view>
<view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<!-- senceData[actNum]['productList'][activeNavIdx].changeSale || -->
<text class="sale" wx:if="{{ actNum!=4}}" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].varType == 1? senceData[actNum]['productList'][activeNavIdx].flow : senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text>
<text class="earnings" wx:if="{{ actNum!=4}}" decode="{{true}}">预估收益&nbsp;<text class="earnings-num font-number">¥{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
<view class="share-btn" wx:if="{{!isShare && origin =='home' && actNum!=4}}" bindtap="onShareFn">
<image webp class="icon" src="{{IMGURL}}share.png?v={{img_version}}" />
<text>去分享</text>
</view>
</view>
</view>
</view>
<view class="project-wrap {{isShow ?'check-prod':''}}">
<!-- stickyTop+88 -->
<!-- style="top:{{isShare ? stickyTop : stickyTop}}rpx" -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx" >
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view>
<!-- wx:if="{{navFixed}}" -->
<!-- <view class="stickyTab stickyTab-fixed">
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab" productHeight />
</view> -->
<!-- style="{height:{{allHeight}}px}" scroll-y="{{true}}" bindscroll="scrolltoupper"-->
<!-- <scroll-view class="project-img" scroll-into-view="{{intoViewId}}"> -->
<view class="project-img" hover-class="none" hover-stop-propagation="false">
<block wx:for="{{tab}}" wx:key="index">
<!-- wx:if="{{showVideo && index==5 && tab.length < 5}}" -->
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index != 5}}">
<!-- wx:if="{{index!=5}}" -->
<image webp class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png?v={{img_version}}" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<view class="video-text">{{item.name}}</view>
</view>
</block>
<!-- <view class="video-tips">- 如需开通请咨询客服 -</view> -->
</view>
</view>
<!-- wx:if="{{ actNum != 2 && index == 4}}" -->
<!-- wx:if="{{isShare && actNum != 2 && index == 4}}" -->
<!-- wx:if="{{ isShare && actNum != 2 && index == 4}}" -->
<button wx:if="{{ isShare && isAuthphone && !getMoreBtn && index == 4}}" class="more-btn" data-index="{{index}}" bindgetphonenumber="getUserInfo" open-type="getPhoneNumber">
点击查看更多详情
</button>
</view>
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index == 5 && outshowVideo}}">
<!-- wx:if="{{index!=5}}" -->
<image webp class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png?v={{img_version}}" />
<view class="video-bg" wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}">
<view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item">
<view class="download" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}">视频下载</view>
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" />
<!-- <image class="video-card" webp bindtap="getVideoUrl" data-title="{{item.name}}" data-src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}" src="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}"></image> -->
<view class="video-text">{{item.name}}</view>
</view>
</block>
</view>
</view>
</view>
</block>
</view>
<!-- </scroll-view> -->
</view>
\ No newline at end of file \ No newline at end of file
// 1.视频默认进来是true,显示,
// 2.扫码,分享链接进来,不显示
// 3.点击更多详情,隐藏更多按钮,显示视频
// 4.视频的位置最后一个 下标5
// var showVideo = function(index){
// if(index == 5){
// a
// }
// };
// module.exports = {
// showVideo:showVideo
// }
// pages/tab/index/components/shareModel/shareModel.js
import { IMG_URL } from "~/utils/constantData.js";
import Draw from "~/utils/Draw.js";
Component({
/**
* 组件的属性列表
*/
properties: {
actNum: Number, //场景选择
isShow: Boolean,
// //分享方法
// onShareAppMessage:Function,
// onShareTimeline:Function,
},
/**
* 组件的初始数据
*/
data: {
IMG_URL: `${IMG_URL}index`,
btnList: [
{
src: `${IMG_URL}index/wechat.png`,
name: "微信转发",
},
// {
// src: `${IMG_URL}index/moments.png`,
// name: "朋友圈分享",
// },
{
src: `${IMG_URL}index/down.png`,
name: "下载为海报",
},
],
// 4种场景下图片所有的高 (单位 rpx)
imgHeightArr: [
[1110, 1290, 596, 744, 490, 1532],
[2168, 1290, 596, 830, 490, 752],
[1110, 1290, 596, 984, 490],
[678, 1266, 1398, 830, 490, 1666],
],
posterUrl: "", //海报url
noVideoimgList:[]
// imgList:[
// {
// src:`${IMG_URL}index/scene${actNum}1.png`,
// },
// ]
},
observers: {
actNum: function (actNum) {
let imgList = [
`${IMG_URL}index/scene${actNum + 1}1.png`,
`${IMG_URL}index/scene${actNum + 1}2.png`,
`${IMG_URL}index/scene${actNum + 1}3.png`,
`${IMG_URL}index/scene${actNum + 1}4.png`,
`${IMG_URL}index/scene${actNum + 1}5.png`,
];
this.setData({
noVideoimgList:imgList
});
if (actNum != 2) {
imgList.push(`${IMG_URL}index/scene${actNum + 1}6.png`);
}
this.setData({
imgList,
});
},
},
/**
* 组件的方法列表
*/
methods: {
// 分享按钮
handleClick(e) {
let { index } = e.currentTarget.dataset;
switch (index) {
case 0:
this.wechatFn();
break;
case 1:
this.download();
break;
}
},
// 微信转发
wechatFn() {
// this.data.onShareAppMessage()
this.modelClose();
},
// 下载海报
async download() {
let { actNum, imgHeightArr } = this.data;
//所有的长度
let imgAllHeight = imgHeightArr[actNum].reduce((total, current) => {
return total + current;
});
// 缺少视频的长度(前4张)+二维码的长度 (单位rpx)
let erCodeHeight =
imgHeightArr[actNum].slice(0, 4).reduce((total, current) => {
return total + current;
}) +
98 * 2;
// console.log("imgAllHeight: ", imgAllHeight);
let drawFun = new Draw({
width: 750,
height: imgAllHeight,
});
let imgList = [
{
x: 0,
y: 0,
width: 750,
height: imgAllHeight,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
},
{
x: 245*2,
y: erCodeHeight-11,
width: 120*2,
height: 120*2,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.png`, //二维码
},
];
let posterUrl = await drawFun.begin({
imageList: imgList,
});
this.setData({
posterUrl: posterUrl.path,
});
console.log('posterUrl.path',posterUrl.path)
if(this.data.posterUrl){
wx.pro.downloadFile({
url: this.data.posterUrl, //仅为示例,并非真实的资源
success (res) {
console.log('res: ', res);
}
})
}
this.modelClose();
},
//模态框关闭
modelClose() {
this.triggerEvent("modelclose", false);
},
// 图片加载事件
onloadFn(event) {
// console.log('event.detail',event.detail)
this.setData({
imgHeight: (event.detail.height * 0.2).toFixed(0),
});
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/tab/index/components/shareModel/shareModel.wxss */
.share-wrap {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
.img-wrap {
position: absolute;
top: 20%;
left: 50%;
transform: translateX(-50%);
// width: 225px;
width: 60%;
height: 311px;
// background-color: red;
overflow: auto;
.img {
width: 100%;
// height: auto;
// height: 60%;
background-color: #fff;
}
}
.btns {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 154px;
background: #ffffff;
border-radius: 8px 8px 0 0;
.top {
display: flex;
justify-content: space-around;
.btn {
padding-top: 16px;
}
.img {
display: block;
margin: 0 auto 8px;
width: 40px;
height: 40px;
}
.name {
font-size: 12px;
color: #323436;
text-align: center;
}
.btn-wechat{
width: auto;
margin: 0;
padding: 0;
background-color: #fff;
}
}
.btom {
margin: 18px auto 0;
width: 343px;
height: 44px;
line-height: 44px;
border: 1px solid #eeeeee;
border-radius: 4px;
text-align: center;
}
}
}
<!-- pages/tab/index/components/shareModel/shareModel.wxml -->
<view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap">
<!-- <image class="img" style="height:{{imgHeight}}px" src="{{IMG_URL}}/longpic{{actNum+1}}.png" bindload="onloadFn" /> -->
<block wx:for="{{imgList}}" wx:key="*this">
<image mode="widthFix" class="img" src="{{item}}"/>
</block>
</view>
<button></button>
<view class="btns">
<view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<block wx:if="{{index == 0}}">
<button open-type="share" class="btn-wechat">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</button>
</block>
<block wx:else>
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</block>
</view>
</view>
<view class="btom" bindtap="modelClose">取消</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
import { IMG_URL } from "~/utils/constantData.js";
var senceData = [
{
name: '新车洽谈场景',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
src: `${IMG_URL}index/car1.png`,
// name: "新车洽谈场景",
msg: "1.0新车权益升级",
"sceneCode":"SC001",
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '100',
// profit: '92.4万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0,
flow:10000,
"productCode":"PC001",
"productName":"数字无忧权益卡",
"category":"服务类",
}
],
videoList: [
{
videoUrl: 'digital_card_30s',
posterUrl: 'digital_card_30s_bitmap',
name: '数字无忧卡服务30秒'
},
{
videoUrl: 'digital_card_money3',
posterUrl: 'digital_card_money3_bitmap',
name: '数字无忧卡3道钱'
},
{
videoUrl: 'digital_card',
posterUrl: 'digital_card_bitmap',
name: '数字无忧卡服务'
},
{
videoUrl: 'digital_card_reason6',
posterUrl: 'digital_card_reason6_bitmap',
name: '数字无忧卡6大理由'
}
]
},
{
name: '新车交付场景',
img: 'scene_delivery.png',
active: 'icon-car21',
playImg: 'img2',
src: `${IMG_URL}index/car2.png`,
// name: "新车交付场景",
msg: "1.1新车精品升级",
"sceneCode":"SC002",
productList: [
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '100',
profit: '1008000',
type: 'membrane',
productType: 'sunMembrane',
path: 'solarFilm',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC002",
"productName":"汽车太阳膜",
"category":"膜类",
}
],
videoList:[
{
videoUrl: 'solar',
posterUrl: 'solar_bitmap',
name: '太阳膜转化售中案例-门店新增产值12w每月'
}
]
},
{
name: '0-6个月',
img: 'scene_within_12mth.png',
active: 'icon-car21',
playImg: 'img2',
src: `${IMG_URL}index/car3.png`,
// name: "0-12个月",
msg: "1.2次新车膨胀金活动",
"sceneCode":"SC003",
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '100',
profit: '180000',
type: 'membrane',
productType: 'protectMembrane',
path: 'paintProtect',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC003",
"productName":"漆面保护膜(车衣)",
"category":"膜类",
},
{
img: 'product-img4',
proName: '改色膜',
price: '100',
profit: '300000',
type: 'membrane',
productType: 'colorMembrane',
path: 'changingFilm',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC004",
"productName":"改色膜",
"category":"膜类",
}
]
},
{
name: '6个月以上',
img: 'scene_more_12mth.png',
active: 'icon-car31',
playImg: 'img3',
src: `${IMG_URL}index/car4.png`,
// name: "12个月以上",
msg: "1.3售后直播众筹活动",
"sceneCode":"SC004",
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '100',
profit: '72000',
type: 'beauty',
productType: 'digitBeauty',
path: 'carBeauty',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC005",
"productName":"数字化美容",
"category":"美容类",
},
{
img: 'product-img6',
proName: '座椅通风',
price: '10000',
profit: '232200',
type: 'light',
productType: 'chair',
path: 'seatVentilate',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC006",
"productName":"座椅通风",
"category":"轻改类",
},
{
img: 'product-img7',
proName: 'AR导航',
price: '10000',
profit: '226800',
type: 'light',
productType: 'ar',
path: 'arNavigation',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC007",
"productName":"AR导航",
"category":"轻改类",
},
{
img: 'product-img8',
proName: '氛围灯',
price: '10000',
profit: '361800',
type: 'light',
productType: 'lamp',
path: 'ambientLighting',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC008",
"productName":"氛围灯",
"category":"轻改类",
},
{
img: 'product-img9',
proName: '360全景导航',
price: '10000',
profit: '388800',
type: 'service',
productType: 'navigation',
path: 'navigationArround',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC009",
"productName":"360全景导航",
"category":"轻改类",
}
],
videoList: [
{
videoUrl: 'seat',
posterUrl: 'seat_bitmap',
name: '座椅通风系统-新增产值20w'
},
{
videoUrl: 'AR',
posterUrl: 'AR_bitmap',
name: '单品AR导航-新增产值20w+'
},
{
videoUrl: 'light',
posterUrl: 'light_bitmap',
name: '单品类氛围灯-新增产值27w'
},
{
videoUrl: '360_AR',
posterUrl: '360_AR_bitmap',
name: '360全景导航-新增产值57w+'
}
]
},
{
name: '3年以上',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
src: `${IMG_URL}index/car1.png`,
// name: "新车洽谈场景",
msg: "3.1新能源0元购",
"sceneCode":"SC001",
productList: [
{
img: 'product-img9',
proName: '新能源0元换购',
price: '100',
// profit: '92.4万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0,
flow:10000,
"productCode" : "PC010",
"productName" : "新能源0元换购",
"category":"置换类",
}
]
},
]
module.exports = {
senceData
}
\ No newline at end of file \ No newline at end of file
{
"usingComponents": {
"vas-toast": "./components/likeToast/likeToast",
"indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue",
"FullscreenVideo": "../../../components/FullscreenVideo/FullscreenVideo"
},
"navigationStyle": "custom",
"onReachBottomDistance": 50
}
page {
height: 100vh;
width: 100vw;
background-color: #F2F3F7 !important;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.reclaim {
.header-wrap {
position: sticky;
top: 0;
width: 100%;
background-size: 100% 100%;
// margin-bottom: 32rpx;
z-index: 2;
.header {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 88rpx;
display: flex;
justify-content: space-between;
align-items: center;
.tabContainer {
width: 60%;
}
.left {
display: flex;
align-items: center;
.clue {
position: relative;
margin-left: 24px;
margin-right: 24px;
font-weight: 400;
font-size: 14px;
color: #8a8c90;
}
.product {
position: relative;
}
.act {
font-weight: 600;
font-size: 22px;
color: #323436;
&::after {
position: absolute;
left: 50%;
bottom: -6px;
transform: translateX(-50%);
display: block;
content: "";
width: 20px;
height: 4px;
background: var(--btnColor);
border-radius: 2px;
}
}
}
.right {
display: flex;
align-items: center;
.img {
width: 40rpx;
height: 40rpx;
}
.apply {
margin-left: 4px;
margin-right: 16px;
font-weight: 400;
font-size: 28rpx;
color: var(--btnColor);
}
}
}
}
// .content{
// position: relative;
// }
}
.guide {
width: 100%;
height: 100%;
.guide-img {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
}
.chat {
position: fixed;
right: -4px;
top: 60%;
width: 64px;
height: 64px;
border-radius: 50%;
z-index: 2;
}
.output-value {
position: fixed;
right: -2px;
top: 70%;
width: 64px;
height: 64px;
// border-radius: 50%;
z-index: 2;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45, 45, 51, 0.50);
z-index: 2;
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
background-color: #fff;
box-shadow: 0 -8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 32rpx 32rpx 0 0;
}
.dialog-header {
display: flex;
justify-content: space-between;
padding: 32rpx 48rpx;
border-bottom: 1rpx solid #eee;
}
.header-btn {
display: inline-block;
font-size: 32rpx;
line-height: 48rpx;
}
.btn-gray {
color: #6C737A;
}
.btn-primary {
background-color: #fff;
border: none;
margin: 0;
padding: 0;
font-weight: 500;
color: #3666FE;
width: auto;
}
.btn-primary::after {
border: none;
}
.dialog-content {
padding: 40rpx 24rpx 60rpx;
}
.dialog-title {
font-weight: 600;
font-size: 36rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
margin-bottom: 24rpx;
}
.dialog-form {
width: 100%;
height: 384rpx;
background-image: linear-gradient(179deg, rgba(240, 247, 255, 0.30) 15%, #F0F7FF 100%);
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 216rpx;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
margin-left: 64rpx;
margin-right: 16rpx;
}
.form-unit {
font-size: 28rpx;
color: #6E6E7A;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #3666FE;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
line-height: 48rpx;
margin-top: 40rpx;
}
}
\ No newline at end of file \ No newline at end of file
<wxs src="./index.wxs" module="filterUtils" />
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</navigation-bar>
<view class="reclaim" style="{{tabIndx == 1 ? 'background: #fff;' : ''}}">
<!-- 头部 -->
<view class="header-wrap" style="height:{{headerHeight}}rpx; background-image: url('{{IMG_URL}}index/head.png')">
<view class="header">
<tab
tab="{{navList}}"
itemWidth="{{'35%'}}"
index="{{tabIndx}}"
tabHeight
unreadClueCount="{{unreadClueCount}}"
bindclick="changeTabIndx"
class="tabContainer" />
<view class="right" data-type="shop" bindtap="gotoApply">
<image webp class="img" src="{{IMG_URL}}index/apply.png" />
<view class="apply">申请业务</view>
</view>
</view>
</view>
<!-- 托客户内容 -->
<indexProduct
wx:if="{{tabIndx == 1 }}"
bindselectCar="selectCar"
senceData="{{senceData}}"
actNum="{{actNum}}"
img_version="{{img_version}}"
headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" />
<!-- 看线索内容 -->
<indexClue
id="indexclue"
wx:if="{{tabIndx == 0 }}"
headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" />
</view>
<!-- 收藏、取消提示框 -->
<vas-toast id='toast' />
<!-- 引导图 -->
<view class="guide" wx:if="{{guideShow}}" style="overflow-y:hidden;">
<image
webp
bindtap="guideFn"
class="guide-img"
src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png?v={{img_version}}" />
</view>
<!-- 在线客服 -->
<image
webp
class="chat"
src="{{IMG_URL}}index/contact.png"
bindtap="goConsult" />
<!-- 预估产值 -->
<image
webp
class="output-value"
bindtap="showCalculate"
src="{{IMG_URL}}index/valuation.png"
wx:if="{{tabIndx == 1}}" />
<!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box">
<form bindsubmit="submit">
<view class="dialog-header">
<view wx:if="{{!isReset}}" class="header-btn btn-gray" bindtap="showCalculate">取消</view>
<view wx:if="{{isReset}}" class="header-btn btn-gray" bindtap="reset">重置</view>
<button class="header-btn btn-primary" form-type="submit">确定</button>
</view>
<view class="dialog-content">
<view class="dialog-title">输入您门店的基本情况</view>
<view class="dialog-form">
<view class="form-item">
<view class="form-label">门店月平均新车销量</view>
<input
class="form-input"
bindfocus="focus"
maxlength="8"
name="sales"
cursor-spacing="10"
value="{{formData.sales}}"
type="number" />
<!-- <view class="form-unit">台</view> -->
</view>
<view class="form-item">
<view class="form-label">3年内售后存量用户</view>
<input
class="form-input"
bindfocus="focus"
maxlength="8"
name="flow"
type="number"
cursor-spacing="10"
value="{{formData.flow}}" />
<!-- <view class="form-unit">人</view> -->
</view>
<button class="dialog-btn" form-type="submit">提交测算</button>
</view>
</view>
</form>
</view>
</view>
<!-- -->
<crowdfund-poster wx:show="{{!guideShow}}" item="{{posterItem}}" />
<!-- 全屏视频组件 -->
<FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" />
/**
*
* @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!