Commit ae0e43d9 by 李伟康

Merge branch 'develop' of http://192.168.3.233:8090/saas_plus/business-assistant into develop

2 parents 66e93e83 ac073f6e
...@@ -159,5 +159,8 @@ Component({ ...@@ -159,5 +159,8 @@ Component({
tab, tab,
}); });
}, },
onShareFn(){
this.triggerEvent('sharehandle')
}
}, },
}); });
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
<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">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text> <text class="sale">新车销量 <text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].sale}}</text>
</text> </text>
<text class="earnings">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text> <text class="earnings">预估收益 <text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text> </text>
</view> </view>
<view class="share-btn"> <view class="share-btn" bindtap="onShareFn">
<image class="icon" src="{{IMGURL}}share.png" /> <image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text> <text>分享</text>
</view> </view>
......
// pages/tab/index/components/shareModel/shareModel.js
import { IMG_URL } from "~/utils/constantData.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: "下载为海报",
},
],
// imgList
// 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`,
// // ]
// // 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.wechatFn();
break;
case 2:
this.download();
break;
}
},
// 微信转发
wechatFn() {
// this.data.onShareAppMessage()
this.modelClose();
},
// 朋友圈转发
momentsFn() {
// this.data.onShareTimeline()
this.modelClose();
},
// 下载海报
download() {
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;
height: 311px;
// background-color: red;
overflow: auto;
.img {
width: 100%;
height: auto;
}
}
.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;
}
}
.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" />
</view>
<view class="btns">
<view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</view>
</view>
<view class="btom" bindtap="modelClose">取消</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -40,7 +40,7 @@ Page({ ...@@ -40,7 +40,7 @@ Page({
msg: "1.3 存量用户众筹", msg: "1.3 存量用户众筹",
}, },
], ],
actNum: 0, actNum: 0, //car 场景选择
tabIndx: 1, tabIndx: 1,
navList: ["看线索", "看产品"], navList: ["看线索", "看产品"],
typeList: ["联系电话", "意向客户", "线索来源", "重置"], typeList: ["联系电话", "意向客户", "线索来源", "重置"],
...@@ -161,7 +161,7 @@ Page({ ...@@ -161,7 +161,7 @@ Page({
// tabList: pageData.tabList, // tabList: pageData.tabList,
// 定义数据 // 定义数据
senceData: pageData.senceData, senceData: pageData.senceData,
changeSale: 0, //每次改变的销量 isShow:false,
}, },
//引导图 //引导图
...@@ -293,16 +293,13 @@ Page({ ...@@ -293,16 +293,13 @@ Page({
this.data.senceData.forEach((item, index) => { this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => { item.productList.forEach((i, lastIndex) => {
if (i.profit) { if (i.profit) {
// let name = `senceData[${index}].productList[${lastIndex}].profit`;
let sale = `senceData[${index}].productList[${lastIndex}].sale`; let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`; let name = `senceData[${index}].productList[${lastIndex}].profit`;
// let changeSale = `senceData[${index}].productList[${lastIndex}].changeSale`;
let profit = _this.formula(i.productType, sales, flow); let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit); console.log(name, profit);
this.setData({ this.setData({
[name]: profit, [name]: profit,
[sale]:sales [sale]:sales
// [changeSale]: sales,
}); });
} }
}); });
...@@ -384,7 +381,7 @@ Page({ ...@@ -384,7 +381,7 @@ Page({
} }
console.log(profit.length); console.log(profit.length);
console.log(productType, sales, flow, profit); console.log(productType, sales, flow, profit);
if (profit.length > 6) { if (profit.length > 8) {
return (profit / 10000).toFixed(0) + "万"; return (profit / 10000).toFixed(0) + "万";
} else { } else {
return profit; return profit;
...@@ -405,6 +402,7 @@ Page({ ...@@ -405,6 +402,7 @@ Page({
}); });
return false; return false;
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -492,6 +490,18 @@ Page({ ...@@ -492,6 +490,18 @@ Page({
let { phone } = e.currentTarget.dataset; let { phone } = e.currentTarget.dataset;
wx.$api.setCopyData(phone); wx.$api.setCopyData(phone);
}, },
// 分项弹框关闭
modelcloseFn(e){
this.setData({
isShow: e.detail
})
},
// 分享按钮
sharehandle(){
this.setData(({
isShow: true
}))
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
...@@ -524,4 +534,5 @@ Page({ ...@@ -524,4 +534,5 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () {},
onShareTimeline:function () {},
}); });
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
"usingComponents": { "usingComponents": {
"product": "./components/product/product", "product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast", "vas-toast": "./components/likeToast/likeToast",
"chat":"./components/chat/chat" "chat": "./components/chat/chat",
"shareModel": "./components/shareModel/shareModel"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
} }
...@@ -2,126 +2,247 @@ ...@@ -2,126 +2,247 @@
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</navigation-bar> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</navigation-bar>
<view class="reclaim"> <view class="reclaim">
<!-- 头部 --> <!-- 头部 -->
<view class="header-wrap" style="height:{{headerHeight}}rpx; background-image: url('{{IMG_URL}}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">
<tab tab="{{navList}}" itemWidth="{{'35%'}}" index="{{tabIndx}}" bindclick="changeTabIndx" class="tabContainer" /> <tab
<view class="right" bindtap="gotoApply"> tab="{{navList}}"
<image class="img" src="{{IMG_URL}}index/apply.png" /> itemWidth="{{'35%'}}"
<view class="apply">申请业务</view> index="{{tabIndx}}"
</view> 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>
<!-- 托客户内容 -->
<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>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" bindsharehandle="sharehandle"/>
</view>
<!-- 看线索内容 -->
<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_URL}}index/point.png" />
</view>
</view> </view>
<!-- 托客户内容 --> <view class="list" hover-class="none" hover-stop-propagation="false">
<view class="content" wx:if="{{tabIndx == 1 }}" hover-class="none" hover-stop-propagation="false"> <view class="msg" wx:for="{{clueList}}" wx:key="phone">
<view class="scene"> <!-- 生意助手 -->
<view class="item-wrap {{actNum== index ? 'act':''}}" data-num="{{index}}" bindtap="selectCar" wx:for="{{dataArr}}" wx:key="name"> <view wx:if="{{item.source == 'customer'}}">
<view class="item"> <image
<image class="img" src="{{item.src}}" /> class="like"
<view class="name">{{item.name}}</view> wx:if="{{item.like}}"
<view class="msg">{{item.msg}}</view> src="{{IMG_URL}}index/like.png"
data-type="like"
data-outidx="{{index}}"
bindtap="showToast"
/>
<image
class="like"
wx:else
src="{{IMG_URL}}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_URL}}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>
<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> </view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" /> <view
</view> class="want-btn"
<!-- 看线索内容 --> wx:if="{{item.records.length > 5}}"
<view class="clue" wx:if="{{tabIndx == 0 }}" hover-class="none" hover-stop-propagation="false"> hover-class="none"
<view class="types"> hover-stop-propagation="false"
<view class="type" wx:for="{{typeList}}" wx:key="*this" data-index="{{index}}" bindtap="filterTypeFn"> data-outidx="{{index}}"
{{item}} bindtap="getMore"
<image class="point" wx:if="{{index != 3}}" src="{{IMG_URL}}index/point.png" /> >
{{ 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_URL}}index/phone.png"
/>
<image
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"
bindtap="gotoApply"
>
+开店面
</view>
</view>
</view> </view>
<view class="list" hover-class="none" hover-stop-propagation="false"> <!-- 门店助手 -->
<view class="msg" wx:for="{{clueList}}" wx:key="phone"> <view class="shop" wx:else>
<!-- 生意助手 --> <view class="name-wrap">
<view wx:if="{{item.source == 'customer'}}"> <view class="name" hover-class="none" hover-stop-propagation="false">
<image class="like" wx:if="{{item.like}}" src="{{IMG_URL}}index/like.png" data-type="like" data-outidx="{{index}}" bindtap="showToast" /> {{item.name}}
<image class="like" wx:else src="{{IMG_URL}}index/dislike.png" data-type="dislike" data-outidx="{{index}}" bindtap="showToast" /> <image class="avatar" src="{{IMG_URL}}index/avatar.png" />
<view class="name" hover-class="none" hover-stop-propagation="false"> </view>
{{item.name}} <view class="source" hover-class="none" hover-stop-propagation="false">通过门店助手申请</view>
<image class="avatar" src="{{IMG_URL}}index/avatar.png" /> </view>
</view> <view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="line" hover-class="none" hover-stop-propagation="false" /> <view
<view class="want-more" style="height:{{item.getMoreFlag? 100: 'auto'}}px"> class="record"
<view class="record" wx:for="{{item.records}}" wx:key="id" wx:for-index="idx" wx:for-item="itemName"> wx:for="{{item.records}}"
<view class="action-wrap"> wx:key="id"
<view class="action" selectable="false" space="false" decode="false"> wx:for-index="idx"
{{filterUtils.filterType(itemName.type)}}: wx:for-item="itemName"
</view> >
<view class="detail" selectable="false" space="false" decode="false"> <view class="shop-record">
{{itemName.msg}} <view class="shop-action-wrap">
</view> <view class="action-wrap">
</view> <view
<view class="time" selectable="false" space="false" decode="false"> class="action"
{{itemName.time}} selectable="false"
</view> space="false"
</view> decode="false"
</view> >
<view class="want-btn" wx:if="{{item.records.length > 5}}" hover-class="none" hover-stop-propagation="false" data-outidx="{{index}}" bindtap="getMore"> {{filterUtils.filterType(itemName.type)}}:
{{ item.getMoreFlag ? '更多数据' : '收起数据'}} </view>
</view> <view
<view class="info" hover-class="none" hover-stop-propagation="false"> class="detail"
<view class="phone-wrap"> selectable="false"
<view class="phone">{{item.phone}}</view> space="false"
<image class="phone-img" data-phone="{{item.phone}}" bindtap="phoneCallFn" src="{{IMG_URL}}index/phone.png" /> decode="false"
<image class="copy" data-phone="{{item.phone}}" bindtap="setCopyDataFn" src="{{IMG_URL}}index/copy.png" /> >
</view> {{itemName.msg}}
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="gotoApply"> </view>
+开店面
</view>
</view>
</view> </view>
<!-- 门店助手 --> <view
<view class="shop" wx:else> class="time"
<view class="name-wrap"> selectable="false"
<view class="name" hover-class="none" hover-stop-propagation="false"> space="false"
{{item.name}} decode="false"
<image class="avatar" src="{{IMG_URL}}index/avatar.png" /> >
</view> {{itemName.time}}
<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_URL}}index/phone.png" />
<image 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" bindtap="gotoApply">
开通活动
</view>
</view>
</view> </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_URL}}index/phone.png"
/>
<image
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"
bindtap="gotoApply"
>
开通活动
</view>
</view>
</view> </view>
</view>
</view> </view>
</view>
</view> </view>
<!-- 收藏、取消提示框 --> <!-- 收藏、取消提示框 -->
<vas-toast isShow="{{true}}" id='toast' /> <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="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" /> <image bindtap="guideFn" class="guide-img" src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" />
</view> </view>
<!-- 在线客服 --> <!-- 在线客服 -->
<image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" /> <image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" />
...@@ -129,30 +250,52 @@ ...@@ -129,30 +250,52 @@
<image class="output-value" bindtap="showCalculate" src="{{IMG_URL}}index/valuation.png" /> <image class="output-value" bindtap="showCalculate" src="{{IMG_URL}}index/valuation.png" />
<!-- 预估产值弹框 --> <!-- 预估产值弹框 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}"> <view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box"> <view class="dialog-box">
<form bindsubmit="submit"> <form bindsubmit="submit">
<view class="dialog-header"> <view class="dialog-header">
<view hidden="{{isReset}}" class="header-btn btn-gray" bindtap="showCalculate">取消</view> <view hidden="{{isReset}}" class="header-btn btn-gray" bindtap="showCalculate">取消</view>
<view hidden="{{!isReset}}" class="header-btn btn-gray" bindtap="reset">重置</view> <view hidden="{{!isReset}}" class="header-btn btn-gray" bindtap="reset">重置</view>
<button class="header-btn btn-primary" form-type="submit">确定</button> <button class="header-btn btn-primary" form-type="submit">确定</button>
</view> </view>
<view class="dialog-content"> <view class="dialog-content">
<view class="dialog-title">输入您门店的基本情况</view> <view class="dialog-title">输入您门店的基本情况</view>
<view class="dialog-form"> <view class="dialog-form">
<view class="form-item"> <view class="form-item">
<view class="form-label">门店月平均新车销量</view> <view class="form-label">门店月平均新车销量</view>
<input class="form-input" bindfocus="focus" maxlength="8" name="sales" value="{{formData.sales}}" type="number" /> <input
<!-- <view class="form-unit">台</view> --> class="form-input"
</view> bindfocus="focus"
<view class="form-item"> maxlength="8"
<view class="form-label">3年内售后存量用户</view> name="sales"
<input class="form-input" bindfocus="focus" maxlength="8" name="flow" type="number" value="{{formData.flow}}" /> value="{{formData.sales}}"
<!-- <view class="form-unit">人</view> --> type="number"
</view> />
<button class="dialog-btn" form-type="submit">提交测算</button> <!-- <view class="form-unit">台</view> -->
</view> </view>
</view> <view class="form-item">
</form> <view class="form-label">3年内售后存量用户</view>
</view> <input
class="form-input"
bindfocus="focus"
maxlength="8"
name="flow"
type="number"
value="{{formData.flow}}"
/>
<!-- <view class="form-unit">人</view> -->
</view>
<button class="dialog-btn" form-type="submit">提交测算</button>
</view>
</view>
</form>
</view>
</view> </view>
<!-- <chat></chat> -->
\ No newline at end of file \ No newline at end of file
<!-- 分享弹框 -->
<shareModel
actNum="{{actNum}}"
isShow="{{isShow}}"
bindmodelclose="modelcloseFn"
onShareAppMessage="{{onShareAppMessage}}"
onShareTimeline="{{onShareTimeline}}"
/>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!