Commit 04399a1c by 张立顺

功能开发完成

2 parents 534f690a aef1a86c
Showing 47 changed files with 2223 additions and 162 deletions
/**
* 申请门店开通
*/
import api from '~/utils/request/request'
const common = 'scrm.api.carlife.common.'
// export
\ No newline at end of file
/**
* 拓客户,看线索接口
*/
import api from '~/utils/request/request'
const common = 'scrm.api.carlife.common.'
// 拓客户
// 看线索
{
<<<<<<< HEAD
"pages": ["login/loading/loading", "pages/tab/index/index", "pages/tab/output/output", "pages/tab/mine/mine", "pages/webView/webView", "pages/apply/apply", "login/index/index", "login/accountItems/accountItems", "pages/mineDetail/customerManagement/customerManagement", "pages/mineDetail/messageBox/messageBox"],
"requiredPrivateInfos": ["getLocation"],
=======
"pages": [
"login/loading/loading",
"pages/tab/index/index",
"pages/tab/output/output",
"pages/tab/mine/mine",
"pages/webView/webView",
"login/index/index",
"login/accountItems/accountItems",
"pages/apply/apply",
"pages/checkProduct/checkProduct",
"packageOutput/pages/summary/summary",
"packageOutput/pages/openBusiness/openBusiness"
],
"requiredPrivateInfos": [
"getLocation"
],
>>>>>>> aef1a86cdee1049cc02766d36fe62a2bd0c284e5
"lazyCodeLoading": "requiredComponents",
"window": {
"backgroundTextStyle": "light",
......
// pages/tab/output/components/senceBox/senceBox.js
Component({
/**
* 组件的属性列表
*/
properties: {
senceActive: {
type: Number,
value: -1
},
hasOpenIcon: {
type: Boolean,
value: true
},
formData: {
type: Object,
value: () => { }
},
sencePriceList: {
type: Array,
value: () => []
}
},
/**
* 组件的初始数据
*/
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
custSenceList: [{
title: '新车洽谈场景',
subTitle: '1.0新车权益销售'
}, {
title: '新车交付场景',
subTitle: '1.1新车精品升级'
}, {
title: '0-12个月',
subTitle: '1.2新车线上转化'
}, {
title: '12个月以上',
subTitle: '1.3存量用户众筹'
}]
},
/**
* 组件的方法列表
*/
methods: {
handleClick(e) {
let { idx } = e.currentTarget.dataset
this.triggerEvent('handleSenceChange', { senceIdx: idx })
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--pages/tab/output/components/senceBox/senceBox.wxml-->
<view class="flex sence">
<view class="sence-item {{ formData['sence' + (index + 1)] ? 'open' : ''}} {{ (senceActive != -1 && senceActive == index + 1) ? 'active' : ''}}" wx:for="{{custSenceList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{hasOpenIcon && formData['sence' + (index + 1)] && senceActive != (index + 1)}}" class="open-icon">已开通</view>
<image wx:if="{{formData['sence' + (index + 1)]}}" class="sence-img" src="{{IMGURL}}output/caract0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="sence-img" src="{{IMGURL}}output/car0{{index + 1}}.png?v={{img_version}}" />
<view class="sence-title">{{item.title}}</view>
<view>{{item.subTitle}}</view>
<view class="total-price" wx:if="{{sencePriceList.length}}">¥ {{sencePriceList[index].total}}</view>
</view>
</view>
\ No newline at end of file
/* pages/tab/output/components/senceBox/senceBox.wxss */
.flex {
display: flex;
}
.sence {
text-align: center;
width: 100%;
}
.sence-item {
box-sizing: border-box;
position: relative;
width: 25%;
background: #F7F8FC;
margin-right: 4rpx;
font-size: 18rpx;
color: #8A8C90;
padding: 32rpx 0 28rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
}
.sence-item:last-child {
margin-right: 0;
}
.sence-title {
font-size: 24rpx;
height: 44rpx;
line-height: 44rpx;
margin: 10rpx 0 4rpx;
}
/* 已开通 - start */
.open.sence-item {
background: #F0F7FF;
}
.open-icon {
box-sizing: border-box;
position: absolute;
left: 0.5rpx;
top: 0.5rpx;
width: 56rpx;
height: 32rpx;
line-height: 24rpx;
background: #FEEBD6;
border-radius: 6rpx 0 8rpx 0;
font-size: 16rpx;
color: #EF971E;
padding: 4rpx;
}
/* 已开通 - end */
/* 选中 - start */
.active.sence-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
border: 2rpx solid #3666FE;
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40);
/* background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/carselect.png') no-repeat;
background-size: 100% 100%; */
}
/* 选中 - end */
.sence-title {
color: #323436;
font-weight: 600;
}
.sence-img {
width: 56rpx;
height: 56rpx;
}
.total-price {
height: 40rpx;
line-height: 40rpx;
margin-top: 22rpx;
font-size: 24rpx;
color: #3666FE;
font-weight: 600;
}
\ No newline at end of file
......@@ -3,7 +3,9 @@ import USERAPI from '~/api/usersApi/index'
import { selectAccountLogin, setLoginInfo, loginModal } from '~/login/lib/index'
import md5 from '~/utils/lib/md5'
import network from '~/utils/network'
import { imgUrlMixin } from '~/mixins/index'
import {
imgUrlMixin
} from '~/mixins/index'
let thisPage
Component({
behaviors: [imgUrlMixin],
......@@ -135,6 +137,7 @@ Component({
target = {
1: 'phoneSmsLogin',
2: 'accountLogin'
<<<<<<< HEAD
}[loginType],
obj =
loginType == 1
......@@ -143,6 +146,37 @@ Component({
code: formData.code
}
: {
=======
} [loginType],
obj = loginType == 1 ? {
mobile: formData.phone,
code: formData.code
} : {
userName: formData.account,
password: md5(formData.password)
}
this.setBtnLoading()
USERAPI[target](obj).then(({
code,
data,
message
}) => {
this.setBtnLoading(false)
if (code == '0') {
if (loginType == 1) this.checkLoginUserInfo(data)
else {
const {
autoLogin
} = thisPage.data, {
loginUserInfoList,
sessionId
} = data,
validTime = 3600 * 24 * 30 * 1e3,
autoLoginFailureTime = Date.now() + validTime
if (autoLogin) {
wx.$storage.set('auto_login_object', {
failureTime: autoLoginFailureTime,
>>>>>>> aef1a86cdee1049cc02766d36fe62a2bd0c284e5
userName: formData.account,
password: md5(formData.password)
}
......@@ -172,7 +206,12 @@ Component({
this.setData({
smsError: true
})
<<<<<<< HEAD
wx.$api.showToast(message || '系统异常')
=======
} else wx.$storage.rm('auto_login_object')
setLoginInfo(loginUserInfoList[0], sessionId)
>>>>>>> aef1a86cdee1049cc02766d36fe62a2bd0c284e5
}
})
.catch(err => {
......
// packageOutput/pages/openBusiness/openBusiness.js
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
// 场景业务
formData: {
sence1: true,
sence2: true,
sence3: true,
sence4: true
},
senceActive: 1,
// 活动内容
activityList: [],
senceActivityObj: {
sence1: [{
name: '360实景导航',
price: 10
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}, {
name: 'AR实景导航',
price: 20
}],
sence2: [{
name: '座椅通风',
price: 30
}, {
name: '座椅通风',
price: 40
}],
sence3: [{
name: '氛围灯',
price: 50
}, {
name: '氛围灯',
price: 60
}],
sence4: [{
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80
}]
}
},
handleSenceChange(e) {
var idx = e.detail.senceIdx
this.setData({
senceActive: idx
})
this.setCurActivity()
// console.log('换内容---')
},
setCurActivity() {
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.senceActivityObj['sence' + (this.data.senceActive)]))
})
},
handleActClick(e) {
var idx = e.currentTarget.dataset.idx
this.setData({
['activityList[' + idx +'].checked']: !this.data.activityList[idx].checked
})
},
handleConfirm() {
var params = {
senceActive: this.data.senceActive,
activityIdxList: this.data.activityList.filter(item => item.checked == true)
}
if(!params.activityIdxList.length) {
wx.$api.showToast('请选产品/活动')
return true
}
console.log(params)
wx.showToast({
title: '提交成功',
icon: 'success'
})
// equityApi.addClueRescue(obj).then(res => {
// wx.hideLoading()
// wx.showModal({
// content: '您的救援服务单已提交成功',
// confirmText: '返回',
// showCancel: false,
// confirmColor: '#FC5B32'
// }).then(res => {
// if (res.confirm) {
// wx.switchTab({
// url: '/pages/tab/index/index'
// })
// }
// })
// })
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setCurActivity()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"sence-box": "../../../components/SenceBox/SenceBox"
}
}
\ No newline at end of file
/* packageOutput/pages/openBusiness/openBusiness.wxss */
page {
background-color: #FFFFFF;
}
.openBusiness {
padding-bottom: 100rpx;
.bg-img {
width: 100%;
height: 360rpx;
}
.layout {
padding: 32rpx;
font-size: 28rpx;
color: #323436;
.m-b-32 {
margin-bottom: 32rpx;
}
.form {
height: 40rpx;
line-height: 40rpx;
.label {
color: #8A8C90;
}
}
.head {
position: relative;
height: 50rpx;
line-height: 50rpx;
font-size: 36rpx;
font-weight: 600;
color: #323436;
&::before {
display: inline-block;
content: '';
width: 6rpx;
height: 28rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
margin-right: 16rpx;
}
}
.box {
&-title {
font-weight: 600;
padding: 0 0 16rpx 12rpx;
}
.title-tip {
font-size: 22rpx;
color: #323436;
}
}
.activity-box {
display: flex;
flex-wrap: wrap;
.activity-item {
box-sizing: border-box;
width: calc((100% - 40rpx) / 3);
height: 64rpx;
line-height: 44rpx;
text-align: center;
background: #F2F3F7;
font-size: 28rpx;
padding: 10rpx;
margin: 0 20rpx 16rpx 0;
border-radius: 4rpx;
}
.activity-item:nth-child(3n) {
margin-right: 0;
}
.activity-item.active {
background: #F0F7FF;
border: 2rpx solid #3E71FE;
color: #3666FE;
border: 1rpx solid #3E71FE;
}
}
}
.btn-blue {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #3666FE;
font-size: 34rpx;
color: #FFFFFF;
}
}
\ No newline at end of file
<!--packageOutput/pages/openBusiness/openBusiness.wxml-->
<view class="openBusiness">
<image class="bg-img" src="{{IMGURL}}output/bg-open-business.png?v={{img_version}}"/>
<view class="layout">
<view class="form m-b-32">
<text class="label">开通门店:</text>
<text>嘀加鹏辉奥迪4S店</text>
</view>
<view class="head m-b-32">开通门店产品/活动</view>
<!-- 场景活动 -->
<view class="box">
<view class="box-title">业务场景</view>
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" hasOpenIcon="{{false}}" bindhandleSenceChange="handleSenceChange"></sence-box>
</view>
<!-- 活动 -->
<view class="box">
<view class="box-title">产品/活动<text class="title-tip">(可多选)</text></view>
<view class="activity-box">
<view class="activity-item text-hide {{ item.checked ? 'active' : '' }}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActClick" data-idx="{{index}}">{{item.name}}</view>
</view>
</view>
</view>
<view class="btn-blue" bindtap="handleConfirm">申请开通</view>
</view>
\ No newline at end of file
// packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.js
Component({
/**
* 组件的属性列表
*/
properties: {
// orderObj: {
// type: Object,
// value: () => { }
// },
},
/**
* 组件的初始数据
*/
data: {
orderFormList: [{
label: '总场次',
name: 'zongcc'
}, {
label: '总订单',
name: 'orderNum'
}, {
label: '成交金额',
name: 'price',
prefix: '¥'
}],
merchantFormList: [{
label: '活动时间',
name: 'time'
}, {
label: '订单数',
name: 'orderNum'
}, {
label: '产值',
name: 'orderPrice',
className: 'red',
prefix: '¥'
}, {
label: '预估产值',
name: 'ygcz',
prefix: '¥'
}],
tableHeadList: [{
label: '',
width: '',
width: '24rpx'
}, {
label: '业务员',
name: 'ywy',
}, {
label: '转发',
name: 'zf',
}, {
label: '浏览',
name: 'll'
}, {
label: '成交',
name: 'cj',
width: '92rpx'
}, {
label: '产值',
name: 'cz',
prefix: '¥'
}],
// 数据--
orderObj: {
zongcc: 28,
orderNum: 198,
price: 12000
},
merchantDataList: [{
name: '嘀加鹏辉奥迪4S店(深圳)',
time: '09/28 11:19~09/30 12:39',
orderNum: '100',
orderPrice: '1280.00',
ygcz: '2280.00',
rankList: [{
ywy: '隋瑗',
zf: '4897',
ll: '927',
cj: '166',
cz: '9991280.00'
}, {
ywy: '隋瑗',
zf: '4897',
ll: '927',
cj: '166',
cz: '9991280.00'
}, {
ywy: '隋瑗',
zf: '4897',
ll: '927',
cj: '166',
cz: '9991280.00'
}, {
ywy: '隋瑗',
zf: '4897',
ll: '927',
cj: '166',
cz: '9991280.00'
}, {
ywy: '隋瑗',
zf: '4897',
ll: '927',
cj: '166',
cz: '9991280.00'
}]
}],
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxss */
.layout {
margin: 20rpx 20rpx;
.box {
background-color: #FFFFFF;
border-radius: 8rpx;
margin-bottom: 20rpx;
}
.flex {
display: flex;
}
.order {
display: flex;
justify-content: space-between;
align-items: center;
&-block {
width: 33.3%;
text-align: center;
font-weight: 500;
font-size: 26rpx;
color: #393B3E;
padding: 20rpx 0;
}
&-txt {
height: 40rpx;
line-height: 40rpx;
margin-bottom: 14rpx;
font-weight: 600;
}
&-label {
font-size: 20rpx;
color: #8A8C90;
}
}
.merchant {
padding: 0 32rpx 32rpx;
.head {
display: flex;
justify-content: space-between;
align-items: center;
height: 70rpx;
line-height: 70rpx;
font-size: 28rpx;
font-weight: 600;
border-bottom: 1rpx dashed #CCCED1;
margin-bottom: 16rpx;
&-title {
width: 70%;
}
&-link {
font-size: 24rpx;
color: #3666FE;
line-height: 32rpx;
}
}
.content {
// 表单
&-row {
display: flex;
height: 40rpx;
line-height: 40rpx;
font-size: 26rpx;
color: #8A8C90;
margin-bottom: 16rpx;
}
&-label {
width: 104rpx;
flex-shrink: 0;
margin-right: 16rpx;
}
&-txt {
color: #323436;
}
&-txt.red {
color: #F35251;
}
// 排名
&-rank {
background: #F7F8FC;
border-radius: 20rpx;
margin-top: 16rpx;
.rank-head {
position: relative;
height: 52rpx;
line-height: 52rpx;
text-align: center;
font-size: 20rpx;
color: #5A6066;
margin-bottom: 20rpx;
border-bottom: 1rpx solid rgba(204, 206, 209, 0.50);
.activity-status {
position: absolute;
top: 0;
right: 22rpx;
font-size: 24rpx;
}
}
.rank-table {
color: #5A6066;
font-size: 20rpx;
.tr {
display: flex;
height: 32rpx;
line-height: 32rpx;
padding-bottom: 16rpx;
.th,
.td {
width: calc((100% - 116rpx) / 4);
}
}
}
}
// 建议
&-suggest {
margin-top: 32rpx;
.suggest-title {
width: 116rpx;
height: 36rpx;
line-height: 36rpx;
font-weight: 600;
font-size: 20rpx;
color: #3E71FE;
background: rgba(62, 113, 254, 0.12);
border-radius: 4rpx;
}
.suggest-txt {
font-size: 24rpx;
color: #323436;
line-height: 40rpx;
margin: 12rpx 0 16rpx;
}
.suggest-block {
line-height: 40rpx;
background: #FFF9F2;
border-radius: 20rpx;
padding: 16rpx;
.suggest-step {
display: flex;
.step-label {
width: 54rpx;
font-size: 20rpx;
color: #323436;
margin-right: 18rpx;
}
.step-txt {
width: calc(100% - 72rpx);
font-size: 22rpx;
color: #8A8C90;
}
}
}
}
}
}
}
\ No newline at end of file
<!--packageOutput/pages/summary/components/outputCrowdfund/outputCrowdfund.wxml-->
<view class="layout">
<view class="box order">
<view class="order-block" wx:for="{{orderFormList}}" wx:key="index">
<view class="order-txt">
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{orderObj[item.name]}}
</view>
<view class="order-label">{{item.label}}</view>
</view>
</view>
<view class="box merchant" wx:for="{{merchantDataList}}" wx:key="index">
<view class="head">
<view class="text-hide head-title">{{item.name}}</view>
<view class="head-link" bindtap="handleCopy">复制活动链接</view>
</view>
<view class="content">
<view class="content-row" wx:for="{{merchantFormList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="content-label">{{subItem.label}}</view>
<view class="content-txt {{subItem.className}}">
<text wx:if="{{subItem.prefix}}">{{subItem.prefix}}</text>
{{item[subItem.name]}}
</view>
</view>
<!-- 排名 -->
<view class="content-rank">
<view class="rank-head">
<view>员工转发数据排名</view>
<view class="activity-status">已开始3天</view>
</view>
<view class="rank-table">
<view class="tr">
<view class="th" style="width: {{subItem.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">{{subItem.label}}</view>
</view>
<view wx:if="{{item.rankList.length}}">
<block wx:for="{{item.rankList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view class="tr">
<view class="td" style="width: {{i.width || ''}};" wx:for="{{tableHeadList}}" wx:for-item="i" wx:for-index="j" wx:key="j">
<text wx:if="{{i.prefix}}">{{i.prefix}}</text>
{{subItem[i.name]}}
</view>
</view>
</block>
</view>
<view class="tr" wx:else>
<view>暂无数据</view>
</view>
</view>
</view>
<!-- 诊断 -->
<view class="content-suggest">
<view class="suggest-title"># 活动诊断</view>
<view class="suggest-txt">距离活动结束剩余8天,分享员工占比低于40%,点击转化率低于5%;推荐以下建议:</view>
<view class="suggest-block">
<view class="suggest-step">
<view class="step-label">建议1</view>
<view class="step-txt">与4S店关键人沟通下注册员工的转发执行情况。</view>
</view>
<view class="suggest-step">
<view class="step-label">建议2</view>
<view class="step-txt">触达车主人数太少,建议与4S店关键人沟通注册员工的转发执行情况。</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
// packageOutput/pages/summary/components/outputTransform/outputTransform.js
Component({
/**
* 组件的属性列表
*/
properties: {
formData: {
type: Object,
value: () => {}
}
},
/**
* 组件的初始数据
*/
data: {
formDataList: [{
label: '到店贴膜量',
name: 'toShopCount'
}, {
label: '体验量',
name: 'experienceCount'
}, {
label: '成交订单',
name: 'upgradeCount'
}, {
label: '营业额',
name: 'totalOrderMoney'
}, {
label: '客单价',
name: '',
prefix: '¥'
}, {
label: '引流体验量',
name: '',
suffix: '%'
}, {
label: '体验转化率',
name: '',
suffix: '%'
}]
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageOutput/pages/summary/components/outputTransform/outputTransform.wxss */
.layout {
display: flex;
flex-wrap: wrap;
.block {
width: calc(100% / 3);
text-align: center;
padding: 32rpx 0;
font-size: 32rpx;
color: #323436;
font-weight: 600;
.label {
font-size: 26rpx;
color: #5A6066;
font-weight: 400;
margin-top: 8rpx;
}
}
}
\ No newline at end of file
<!--packageOutput/pages/summary/components/outputTransform/outputTransform.wxml-->
<view class="layout">
<view class="block" wx:for="{{formDataList}}" wx:key="index">
<view>
<text wx:if="{{item.prefix}}">{{item.prefix}}</text>
{{formData[item.name]}}
<text wx:if="{{item.suffix}}">{{item.suffix}}</text>
</view>
<view class="label">{{item.label}}</view>
</view>
</view>
\ No newline at end of file
// packageOutput/pages/summary/summary.js
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
merchantName: '阿哈哈哈哈',
formData: {
sence1: false,
sence2: true,
sence3: false,
sence4: true
},
senceActive: 4,
sencePriceList: [{
total: 0
}, {
total: 1000.45
}, {
total: 0
}, {
total: 14580.45
}],
// 活动内容
scrollLeft: 0,
activityActive: 0,
activityList: [],
senceActivityObj: {
sence1: [{
name: '360实景导航',
price: 10
}, {
name: 'AR实景导航',
price: 20,
isOpen: true
}, {
name: 'AR实景导航',
price: 20,
isOpen: true
}, {
name: 'AR实景导航',
price: 20,
isOpen: true
}, {
name: 'AR实景导航',
price: 20,
isOpen: false
}, {
name: 'AR实景导航',
price: 20,
isOpen: true
}],
sence2: [{
name: '座椅通风',
price: 30,
isOpen: true,
toShopCount: 120,
experienceCount: 200,
upgradeCount: 300,
totalOrderMoney: 365
}, {
name: '座椅通风',
price: 40
}],
sence3: [{
name: '氛围灯',
price: 50
}, {
name: '氛围灯',
price: 60,
isOpen: true
}],
sence4: [{
name: '数字化',
price: 70,
isOpen: true
}, {
name: '数字化',
price: 80
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80,
isOpen: true
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80,
isOpen: true
}, {
name: '数字化',
price: 70
}, {
name: '数字化',
price: 80,
isOpen: true
}]
},
// 产值
searchForm: {
sence2Idx: 0,
sence3Idx: 0,
sence4Idx: 0
},
baseData: {
timeList: ['全部', '本月', '本日'],
actStatusList: ['全部', '申请中', '活动中', '已结束']
}
},
handleSenceChange(e) {
var idx = e.detail.senceIdx
this.setData({
senceActive: idx,
activityActive: 0
})
this.setCurActivity()
// console.log('换内容---')
},
handleActChange(e) {
var idx = e.currentTarget.dataset.idx
this.setData({
activityActive: idx
})
// console.log('换内容--')
},
setCurActivity() {
console.log(this.data.activityActive)
this.setData({
activityList: JSON.parse(JSON.stringify(this.data.senceActivityObj['sence' + (this.data.senceActive)]))
})
// activityActive为0时,触发置顶(左)
if (this.data.activityActive == 0) {
this.setData({
scrollLeft: 0
})
}
},
handleSelect() {
wx.showActionSheet({
itemList: this.data.senceActive != 4 ? this.data.baseData.timeList : this.data.baseData.actStatusList,
success: res => {
this.setData({
['searchForm.sence' + this.data.senceActive + 'Idx']: res.tapIndex
})
console.log('调接口---')
}
})
},
handleJump(e) {
console.log(this.data.activityList[this.data.activityActive])
wx.$router.go('packageOutput.openBusiness')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(({ id, merchantName }) => {
this.setData({
merchantName: merchantName
})
})
this.setCurActivity()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
wx.setNavigationBarTitle({
title: this.data.merchantName,
})
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"sence-box": "../../../components/SenceBox/SenceBox",
"output-transform": "./components/outputTransform/outputTransform",
"output-crowdfund": "./components/outputCrowdfund/outputCrowdfund"
}
}
\ No newline at end of file
/* packageOutput/pages/summary/summary.wxss */
// page {
// background-color: #FFFFFF;
// background-color: #F2F3F7;
// }
.summary {
.flex {
display: flex;
}
.p-rl-20 {
padding: 0 20rpx;
}
.bg-white {
background-color: #FFFFFF;
}
.bg-grey {
background-color: #F2F3F7;
}
.layout {
color: #323436;
height: 100vh;
// padding: 12rpx 20rpx 0;
// padding-top: 12rpx;
margin-bottom: 90rpx;
.title {
font-size: 32rpx;
font-weight: 600;
padding: 12rpx 20rpx 12rpx 40rpx;
border-bottom: 1rpx dashed #CCCED1;
}
.sence-box {
padding: 27rpx 20rpx 24rpx;
}
.activity-box {
height: 64rpx;
.activity-item {
box-sizing: border-box;
flex-shrink: 0;
height: 64rpx;
line-height: 64rpx;
font-size: 24rpx;
padding: 0 16rpx;
margin-right: 16rpx;
border-radius: 4rpx;
}
.activity-item:last-child {
margin-right: 0;
}
.activity-item.open {
color: #323436;
border: 2rpx solid #DDE3F0;
}
.activity-item.no-open {
color: #CCCED1;
border: 2rpx solid #DDE3F0;
}
.activity-item.active {
background: #3666FE;
box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40), 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32);
color: #FFFFFF;
border-width: 0;
}
}
.activity-content {
.activity-title {
display: flex;
justify-content: space-between;
align-items: center;
font-weight: 400;
.select {
font-size: 24rpx;
color: #323436;
.icon-arrow {
width: 24rpx;
height: 24rpx;
margin: 6rpx 0 0 6rpx;
}
}
}
.activity-title.no-border {
border-width: 0;
}
.content-empty {
text-align: center;
margin-top: 48rpx;
.img-empty {
width: 512rpx;
height: 512rpx;
}
}
}
}
.btn-blue {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #3666FE;
font-size: 28rpx;
color: #FFFFFF;
}
}
\ No newline at end of file
<!--packageOutput/pages/summary/summary.wxml-->
<view class="summary">
<view class="layout {{ (senceActive == 4 && activityList[activityActive].isOpen) ? 'bg-grey' : 'bg-white'}}">
<view class="title bg-white">选产品/活动</view>
<view class="sence-box bg-white">
<sence-box formData="{{formData}}" sencePriceList="{{sencePriceList}}" senceActive="{{senceActive}}" bindhandleSenceChange="handleSenceChange"></sence-box>
</view>
<!-- 活动 -->
<view class="p-rl-20 bg-white">
<scroll-view scroll-x="{{true}}" class="activity-box" scroll-left="{{scrollLeft}}">
<view class="flex">
<view class="activity-item {{ activityActive == index ? 'active' : ''}} {{item.isOpen ? 'open' : 'no-open'}}" wx:for="{{activityList}}" wx:key="index" bindtap="handleActChange" data-idx="{{index}}">{{item.name}}</view>
</view>
</scroll-view>
</view>
<!-- 活动内容 -->
<view class="activity-content">
<view wx:if="{{activityList[activityActive].isOpen && senceActive != 1}}">
<view class="activity-title title bg-white {{ senceActive == 4 ? 'no-border' : ''}}">
<view>看产值</view>
<view class="select" bindtap="handleSelect">
<text wx:if="{{senceActive == 2 || senceActive == 3}}" class="select-txt">{{baseData.timeList[senceActive == 2 ? searchForm.sence2Idx : searchForm.sence3Idx]}}</text>
<text wx:if="{{senceActive == 4}}" class="select-txt">{{baseData.actStatusList[searchForm.sence4Idx]}}</text>
<image class="icon-arrow" src="{{IMGURL}}output/arrow.png?v={{img_version}}"></image>
</view>
</view>
<output-transform wx:if="{{senceActive == 2 || senceActive == 3}}" formData="{{activityList[activityActive]}}"></output-transform>
<output-crowdfund wx:if="{{senceActive == 4}}"></output-crowdfund>
</view>
<view wx:else class="content-empty bg-white">
<image class="img-empty" src="{{IMGURL}}output/sum-empty.png?v={{img_version}}" />
</view>
</view>
</view>
<view wx:if="{{!activityList[activityActive].isOpen}}" class="btn-blue" bindtap="handleJump">点击开通</view>
</view>
\ No newline at end of file
// pages/apply/apply.js
const navStyle = 'background-color: transparent;'
import {IMG_URL} from '~/utils/constantData.js'
const navStyle = "background-color: transparent;";
import { IMG_URL } from "~/utils/constantData.js";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = '../../images/'
let IMG_URLLocal = "../../images/";
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
IMG_URL:IMG_URLLocal,
carObj:{
name:'kafdkf',
model:'dfdsf3443',
selNum:132,
contact:'',
phone:'',
}
IMG_URL,
carObj: {
name: "kafdkf",
model: "dfdsf3443",
selNum: 132,
contact: "",
phone: "",
},
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail
let { height, statusBarHeight } = e.detail;
this.setData({
tabBarStyle: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88*2
})
// console.log(e)
// console.log(this.data.headerHeight)
});
},
// 提交信息
applyFn(){
console.log(123)
applyFn() {
let { name } = this.data.carObj;
console.log("name: ", name);
if (!name) {
wx.pro.showToast({
title: "请输入店名",
icon: "error",
});
return;
}
console.log(123);
},
bindinputFn(e) {
// console.log("e: ", e);
let name = e.currentTarget.dataset.name;
let content = e.detail.value;
this.setData({
[`carObj.${name}`]:content
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(params){
console.log('params: ', params);
onLoad(options) {},
onRoute(params) {
console.log("params: ", params);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
onShareAppMessage() {},
});
<!-- pages/apply/apply.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">申请业务</navigation-bar>
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
申请业务
</navigation-bar>
<view class="apply">
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" />
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view>
<image class="head" src="{{IMG_URL}}index/apply-title.png" style="height:{{tabBarStyle}}px;" />
<image class="introduce" src="{{IMG_URL}}index/apply-title.png" />
<view class="content" hover-class="none" hover-stop-propagation>
<view class="top">
<view class="line" hover-class="none" hover-stop-propagation="false" />
<view class="title" hover-class="none" hover-stop-propagation="false">开通门店账号</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" value="{{carObj.name}}" bindinput="bindinputFn" data-name="name" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面车型</view>
<input class="inp" value="{{carObj.model}}" bindinput="bindinputFn" data-name="model" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">店面新车销量/基盘客户</view>
<input class="inp" value="{{carObj.selNum}}" bindinput="bindinputFn" data-name="selNum" maxlength="{{30}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">门店联系人</view>
<input class="inp" value="{{carObj.contact}}" bindinput="bindinputFn" data-name="contact" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">联系人手机号</view>
<input class="inp" value="{{carObj.phone}}" bindinput="bindinputFn" data-name="phone" placeholder="请输入手机号" />
</view>
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
开店名称
<text class="point">*</text>
</view>
<input class="inp" value="{{carObj.name}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面车型
</view>
<input class="inp" value="{{carObj.model}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
店面新车销量/基盘客户
</view>
<input class="inp" value="{{carObj.selNum}}" placeholder="请输入30个字符以内" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
门店联系人
</view>
<input class="inp" value="{{carObj.contact}}" placeholder="请输入联系人" />
</view>
<view class="inp-wrap">
<view class="title" hover-class="none" hover-stop-propagation="false">
联系人手机号
</view>
<input class="inp" value="{{carObj.phone}}" placeholder="请输入手机号" />
</view>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
<button class="btn" bindtap="applyFn">提交开店信息</button>
</view>
\ No newline at end of file
// pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;";
const navStyle = "background-color: #fff";
Page({
/**
* 页面的初始数据
*/
data: {
navStyle,
headerHeight:0,
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail;
this.setData({
headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"product": "../tab/index/components/product/product"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"backgroundColor": "#FC5B32",
"enablePullDownRefresh": true
}
/* pages/checkProduct/checkProduct.wxss */
\ No newline at end of file
<!--pages/checkProduct/checkProduct.wxml-->
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">特色产品</navigation-bar>
<view style="height:{{headerHeight}}px">
</view>
<product stickyTop="{{headerHeight}}" actNum="{{actNum}}" />
// pages/tab/index/components/chat/chat.js
import { IMG_URL } from "~/utils/constantData.js";
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
kfUrl: "",
widgetStatus: false,
IMG_URL,
img_version: Date.now(),
},
/**
* 组件的方法列表
*/
methods: {
openKF(e) {
let { kfUrl, widgetStatus } = this.data;
if (kfUrl)
wx.pro.openCustomerServiceChat({
extInfo: {
url: kfUrl,
},
corpId: "ww6fe4fbe0d050a2b5",
success(res) {
console.log(res);
},
fail({ errMsg }) {
console.log(errMsg);
wx.$util.showToast(errMsg);
},
});
else
this.setData({
widgetStatus: !widgetStatus,
});
},
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/chat/chat.wxss */
.widget-box {
position: fixed;
right: 40rpx;
bottom: 232rpx;
font-size: 20rpx;
color: #fff;
display: flex;
align-items: flex-end;
}
.widget {
height: 140rpx;
width: 112rpx;
box-sizing: border-box;
}
.widget-box .open {
position: relative;
z-index: 2;
}
.online-text {
position: absolute;
top: 74rpx;
left: 50%;
transform: translateX(-50%);
width: 80rpx;
height: 28rpx;
font-size: 20rpx;
}
\ No newline at end of file
<!--pages/tab/index/components/chat/chat.wxml-->
<!-- wx:if="{{widgetStatus}}" -->
<view class="model" catchtouchmove="noScroll">
<view class="close-icon" bindtap="showFlex">
<image webp src="{{IMG_URL}}index/kf-close.png?v={{img_version}}"></image>
</view>
<view class="bgkf">
<image webp src="{{IMG_URL}}index/kfbg.png?v={{img_version}}"></image>
<view class="qr-box">
<view class="qr-icon">
<image webp src="{{IMG_URL}}index/qr-bg.png?v={{img_version}}"></image>
</view>
<view class="userinfo-wrap">
<view class="icon">
<image webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/user.png"></image>
</view>
<view class="name">hello</view>
<view class="qr-code">
<image webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/qr.png" show-menu-by-longpress="{{customerlist[0].qrCode}}"></image>
</view>
</view>
<view class="kf-text">
<image webp src="{{IMG_URL}}index/kf-text.png?v={{img_version}}"></image>
</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -24,7 +24,7 @@ Component({
"项目亮点",
"转化漏斗",
"合作流程",
"合作案例",
// "合作案例",
],
heightArr: [],
allHeight: 0,
......@@ -40,27 +40,44 @@ Component({
},
observers: {
actNum: function () {
console.log(1231)
let navList;
let tab = [
"场景说明",
"营销链路",
"项目亮点",
"转化漏斗",
"合作流程",
// "合作案例",
];
let num = this.data.actNum;
switch (num) {
case 0:
navList = ['数字无忧权益卡']
navList = ["数字无忧权益卡"];
break;
case 1:
navList = ['汽车太阳膜']
navList = ["汽车太阳膜"];
break;
case 2:
navList = ['漆面保护膜','改色膜']
navList = ["漆面保护膜", "改色膜"];
break;
case 3:
navList = ['数字化美容','座椅通风','AR导航','氛围灯','360全景导航']
navList = [
"数字化美容",
"座椅通风",
"AR导航",
"氛围灯",
"360全景导航",
];
break;
}
this.setData({
navList
navList,
tab,
intoViewId: `to-0`,
});
// 每次切换场景,重新获取流程图高度
this.getImgHeight();
},
},
......@@ -75,7 +92,6 @@ Component({
});
},
changeNav(event) {
console.log(event, event.target.dataset.index, 111);
this.setData({
activeNavIdx: event.target.dataset.index,
});
......@@ -87,6 +103,7 @@ Component({
this.setData({
curTabIdx: idx,
});
// console.log(this.data.curTabIdx1)
},
getImgHeight() {
......@@ -106,5 +123,36 @@ Component({
})
.exec();
},
// 图片流程5 点击往下获取更多
// 没登陆用户(登陆后解锁全部)
getMoreFn(e) {
let { actNum } = this.data;
console.log('inactNumdex: ', actNum);
let tab = [
"场景说明",
"营销链路",
"项目亮点",
"转化漏斗",
"合作流程",
// "合作案例",
];
switch (actNum) {
case 0:
tab.push("合作案例");
break;
case 1:
tab.push("合作案例");
break;
case 2:
break;
case 3:
tab.push("合作案例");
break;
}
this.setData({
tab,
});
},
},
});
......@@ -149,7 +149,22 @@
height: 1200rpx;
white-space: nowrap;
.img-item {
height: 300rpx;
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 {
......@@ -169,6 +184,7 @@
// }
// }
// 流程图一
.img-item11 {
width: 100%;
height: 1110rpx;
......@@ -193,3 +209,80 @@
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 {
width: 100%;
height: 752rpx;
}
// 流程图三
.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;
}
......@@ -47,10 +47,10 @@
scroll-y="{{true}}"
>
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item{{actNum+1}}{{index+1}}">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}">
<!-- {{item}} -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<button wx:if="{{ actNum != 2 && index == 4}}" class="more-btn" data-index="{{index}}" bindtap="getMoreFn">点击查看更多详情</button>
</view>
</block>
</scroll-view>
......
......@@ -278,15 +278,21 @@ Page({
},
});
},
// 打电话
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);
},
// 聊天
chatFn() {},
// 估值
valuationFn() {},
/**
* 生命周期函数--监听页面显示
*/
......
{
"usingComponents": {
"product": "./components/product/product",
"vas-toast": "./components/likeToast/likeToast"
"vas-toast": "./components/likeToast/likeToast",
"chat":"./components/chat/chat"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
......
......@@ -240,25 +240,44 @@ page {
justify-content: space-between;
.item-wrap {
position: relative;
width: 106px;
height: 116px;
width: 86px;
height: 90px;
border-radius:10px;
}
.item {
// padding-top: 10px;
width: 86px;
height: 90px;
background: #f7f8fc;
border-radius: 6px;
}
.act {
background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
background-size: 100% 100%;
// 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 0 10px #999;
&::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;
}
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 10px auto 2px;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
......@@ -289,16 +308,16 @@ page {
}
}
.chat {
position: absolute;
right: 0;
position: fixed;
right: -4px;
top: 60%;
width: 50px;
height: 50px;
width: 60px;
height: 60px;
border-radius: 50%;
z-index: 1;
}
.output-value {
position: absolute;
position: fixed;
right: 5px;
top: 70%;
width: 40px;
......
......@@ -3,14 +3,6 @@
<view class="reclaim">
<view class="header-wrap" style="height:{{headerHeight}}rpx; background-image: url('{{IMG_URL}}index/head.png')">
<view class="header">
<!-- <view class="left">
<view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left">
看线索
</view>
<view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right">
看产品
</view>
</view> -->
<tab tab="{{tabList}}" itemWidth="{{'35%'}}" index="{{tabIndx}}" bindclick="changeTabIndx" class="tabContainer" />
<view class="right" bindtap="gotoApply">
<image class="img" src="{{IMG_URL}}index/apply.png" />
......@@ -126,5 +118,6 @@
<view class="guide" wx:if="{{guideShow}}">
<image bindtap="guideFn" class="guide-img" src="{{IMG_URL}}index/guide{{guideSrcIndex}}.png" />
</view>
<image class="chat" src="{{IMG_URL}}index/contact.png"></image>
<image class="output-value" src="{{IMG_URL}}index/valuation.png"></image>
\ No newline at end of file
<image class="chat" bindtap="chatFn" src="{{IMG_URL}}index/contact.png" />
<image class="output-value" bindtap="valuationFn" src="{{IMG_URL}}index/valuation.png" />
<!-- <chat></chat> -->
\ No newline at end of file
......@@ -7,17 +7,80 @@ Component({
},
options: {
styleIsolation: 'shared'
},
/**
* 组件的初始数据
*/
data: {
IMGURL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
list: [{
id: 1,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}, {
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}]
}, {
id: 2,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}, {
id: 3,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}, {
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}]
}, {
id: 4,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}]
},
/**
* 组件的方法列表
*/
methods: {
getList() {
console.log('调接口------')
},
onReachBottom() {
console.log('client触底----')
this.getList()
},
handleJump(e) {
let { id, merchantname } = e.currentTarget.dataset
wx.$router.go('packageOutput.summary', { id, merchantName: merchantname })
}
}
})
{
"component": true,
"usingComponents": {}
"usingComponents": {
"sence-box": "../../../../../components/SenceBox/SenceBox"
}
}
\ No newline at end of file
/* pages/tab/output/components/client/client.wxss */
\ No newline at end of file
/* pages/tab/output/components/client/client.wxss */
.client {
color: #323436;
padding: 16rpx 0 60rpx;
}
.flex {
display: flex;
}
.flex-between {
display: flex;
justify-content: space-between;
}
.profit-box {
box-sizing: border-box;
position: relative;
width: 100%;
height: 96rpx;
line-height: 96rpx;
color: #8A8C90;
padding: 0 20rpx 0 32rpx;
margin-bottom: 16rpx;
background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/bg-profit.png') no-repeat;
background-size: 100% 96rpx;
.price-txt {
font-size: 26rpx;
}
}
.price-txt {
font-weight: 600;
color: #F35251;
}
.box {
box-sizing: border-box;
width: 100%;
background: #FFFFFF;
border-radius: 8rpx;
padding: 28rpx 0 32rpx;
margin-bottom: 16rpx;
.head {
position: relative;
height: 40rpx;
line-height: 40rpx;
font-size: 28rpx;
color: #323436;
padding-right: 20rpx;
&::before {
position: absolute;
left: 0;
top: 4rpx;
content: '';
width: 6rpx;
height: 32rpx;
background: #3666FE;
border-radius: 0 4rpx 4rpx 0;
}
.name {
width: 70%;
margin-left: 32rpx;
}
.price-txt {
font-size: 22rpx;
}
}
&-content {
padding: 22rpx 10rpx 0;
// .sence {
// // height: 198rpx;
// text-align: center;
// width: 100%;
// &-item {
// position: relative;
// width: 25%;
// background: #F7F8FC;
// margin-right: 4rpx;
// font-size: 18rpx;
// color: #8A8C90;
// padding: 32rpx 0 28rpx;
// border-radius: 12rpx;
// margin-bottom: 20rpx;
// &:last-child {
// margin-right: 0;
// }
// }
// &-title {
// font-size: 24rpx;
// height: 44rpx;
// line-height: 44rpx;
// margin: 10rpx 0 4rpx;
// }
// .active.sence-item {
// background: #F0F7FF;
// .active-icon {
// box-sizing: border-box;
// position: absolute;
// left: 0;
// top: 0;
// width: 56rpx;
// height: 32rpx;
// line-height: 24rpx;
// background: #FEEBD6;
// border-radius: 6rpx 0 8rpx 0;
// font-size: 16rpx;
// color: #EF971E;
// padding: 4rpx;
// }
// .sence-title {
// color: #323436;
// }
// }
// &-img {
// width: 56rpx;
// height: 56rpx;
// }
// }
}
&-bottom {
padding: 0 22rpx;
.tip-blue {
width: 56rpx;
height: 28rpx;
font-weight: 400;
font-size: 20rpx;
color: #3E71FE;
padding: 4rpx 8rpx;
text-align: center;
background: rgba(62, 113, 254, 0.12);
border-radius: 4rpx;
}
.bottom-content {
width: calc(100% - 56rpx);
margin-left: 16rpx;
.tip-row {
font-size: 20rpx;
color: #323436;
line-height: 32rpx;
.time {
color: #8A8C90;;
}
}
}
}
}
\ No newline at end of file
<!--pages/tab/output/components/client/client.wxml-->
<text>pages/tab/output/components/client/client.wxml</text>
<view class="client">
<view class="profit-box flex-between">
<text>总收益</text>
<text class="price-txt">¥680000.00</text>
</view>
<view class="box" wx:for="{{list}}" wx:key="index" bindtap="handleJump" data-id="{{item.id}}" data-merchantName="{{item.merchantName}}">
<view class="head flex-between">
<view class="name text-hide">{{item.merchantName}}</view>
<view class="price-txt">¥{{item.totalMoney}}</view>
</view>
<!-- 场景内容 -->
<view class="box-content">
<sence-box formData="{{item}}"></sence-box>
<!-- 通知 -->
<view class="box-bottom">
<view wx:if="{{item.newList.length}}" class="flex">
<view class="tip-blue">最新</view>
<view class="bottom-content">
<view class="flex-between tip-row" wx:for="{{item.newList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx">
<view>{{subItem.content}}</view>
<view class="time">{{subItem.time}}</view>
</view>
</view>
</view>
<view wx:else class="flex">
<view class="tip-blue">通知</view>
<view class="bottom-content">
<view class="tip-row">
<view>运营建议:您的门店尚未开展活动,暂无产值。建议开通新产品拓展营收范围。</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
......@@ -8,33 +8,29 @@ class Draw {
[_canvasObject_] = null;
[_canvas_] = null
constructor(canvasObject) {
wx.getSystemInfo().then(({
pixelRatio
}) => {
this[_canvasObject_] = canvasObject
this[_pixelRatio_] = canvasObject.pixelRatio || pixelRatio || 2
const height = this.toRpx(canvasObject.height),
width = this.toRpx(canvasObject.width),
canvas = wx.createOffscreenCanvas({
type: '2d',
width,
height
}),
ctx = canvas.getContext('2d')
this[_canvas_] = canvas
this[_ctx_] = ctx
this[_ctx_].clearRect(0, 0, width, height)
this.drawFill({
x: 0,
y: 0,
this[_canvasObject_] = canvasObject
this[_pixelRatio_] = canvasObject.pixelRatio || 2
const height = this.toRpx(canvasObject.height),
width = this.toRpx(canvasObject.width),
canvas = wx.createOffscreenCanvas({
type: '2d',
width,
height,
color: canvasObject.backgroundColor || 'rgb(255, 255, 255)'
})
this[_ctx_].save()
height
}),
ctx = canvas.getContext('2d')
this[_canvas_] = canvas
this[_ctx_] = ctx
this[_ctx_].clearRect(0, 0, width, height)
this.drawFill({
x: 0,
y: 0,
width,
height,
color: canvasObject.backgroundColor || 'rgb(255, 255, 255)'
})
this[_ctx_].save()
}
drawImages(imageParams, callback) {
async drawImages(imageParams, callback) {
this[_ctx_].beginPath()
this[_ctx_].save()
let {
......@@ -60,13 +56,14 @@ class Draw {
this[_ctx_].clip()
}
let image = this[_canvas_].createImage()
new Promise(resolve => {
image.onload = resolve
image.src = `${url}?v=${Date.now()}`
}).then(() => {
this[_ctx_].drawImage(image, x, y, width, height)
this[_ctx_].restore()
if (callback) callback()
image.src = `${url}?v=${Date.now()}`
return new Promise(resolve => {
image.onload = () => {
this[_ctx_].drawImage(image, x, y, width, height)
this[_ctx_].restore()
if (callback) callback()
resolve(imageParams)
}
})
}
toRpx(val) {
......@@ -171,6 +168,7 @@ class Draw {
height: boxHeight,
color: textParams.background
})
}
const drawOneLineText = () => {
let textArr = text.toString().split(''),
......@@ -249,10 +247,7 @@ class Draw {
} else {
drawOneLineText()
}
} else {
drawOneLineText()
}
} else drawOneLineText()
this[_ctx_].stroke()
}
drawLine(lineParams, callback) {
......@@ -391,10 +386,33 @@ class Draw {
})
}
base64src(url).then(img => {
console.log('img', img)
createLocalImg(img, callBack)
})
}
async begin(data = {}) {
return new Promise(async (resolve, reject) => {
const drawFun = () => {
data.textList && data.textList.length && data.textList.map(e => {
this.drawText(e)
})
data.lineList && data.lineList.length && data.lineList.map(e => {
this.drawLine(e)
})
wx.nextTick(() => {
this.toDataURL(res => resolve(res))
})
}
if (data.imageList && data.imageList.length) {
await this.drawImages(data.imageList[0])
if (data.imageList.length > 1)
for (let index = 1; index < data.imageList.length; index++) {
await this.drawImages(data.imageList[index])
if (index == data.imageList.length - 1) drawFun()
}
else drawFun()
}
})
}
}
const checkTextDecoration = textDecoration => {
return textDecoration && (textDecoration === 'underline' || textDecoration === 'overline' || textDecoration === 'line-through')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!