Commit 3499f242 by 前端

Merge branch 'v2.10.5' into 'master'

V2.10.5

See merge request !6
2 parents 327d2a67 19b2f366
Showing 95 changed files with 4366 additions and 174 deletions
......@@ -46,7 +46,7 @@ module.exports = {
}, true)
},
/**获取图片版本号 */
getImgVersion() {
getMockConfig() {
return api.getMock()
},
}
......
import api from "./request";
const serverApi = {
//生成二维码
createQrCode: "scrm.api.wechat.miniprogram.createQrcode",
// 解析二维码参数
sceneById:'scrm.api.wechat.get.scene.by.id'
};
export const createQrCodeApi = (data) => {
return api.post(
{
method: serverApi.createQrCode,
...data,
},
true
);
};
export const sceneByIdApi = (data) => {
return api.post(
{
method: serverApi.sceneById,
...data,
}
);
};
\ No newline at end of file
......@@ -11,4 +11,11 @@ module.exports = {
true
);
},
// 智能名片活动申请
activityApply(data) {
return api.post({
method: `entmicro.api.business.card.activity.apply`,
...data,
},true)
}
}
\ No newline at end of file
......@@ -4,9 +4,10 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
0本地
1开发
2测试
3生产
3预发布
4生产
*/
const index = 3;
const index = 4;
const secretKey = {
ip: {},
dev: {
......
//app.js
import * as Sentry from './utils/lib/sentry-miniapp'
const accountInfo = wx.getAccountInfoSync()
//测试和生产才开发sentry
const env = ['trial', 'release']
env.includes(accountInfo.miniProgram.envVersion) &&
Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: 'https://e440585f391e46278c3c72ddabb1d17f@sentry.glsx.com.cn/31'
})
import router from './router/index.js'
import util from './utils/util.js'
import './utils/Track'
import {
ssoApi,
wechatApi
} from './api/api'
import {trackData} from './utils/data'
import { ssoApi, wechatApi } from './api/api'
import { trackData } from './utils/data'
import eventbus from './utils/evenbus'
// 实例化对象存储
import { Storage } from './utils/cache/storage'
const $Storage = new Storage()
App({
onLaunch: function (options) {
console.log(options)
/**挂载到wx对象 */
this.autoUpdate()
wx.$storage = $Storage /** 挂载全局缓存方法 */
wx.$eventbus = eventbus
wx.$util = util
wx.$router = router
wx.$imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
wx.$appId = wx.getAccountInfoSync().miniProgram.appId
const systemInfo = wx.getStorageSync('aicard_system_info')
if (!systemInfo) wx.getSystemInfo({
success(res) {
util.setStorageSync('aicard_system_info', res)
}
})
if (!systemInfo)
wx.getSystemInfo({
success(res) {
util.setStorageSync('aicard_system_info', res)
}
})
if (options.path != 'pages/tab/index/index') {
this.login()
}
// wx.showMeasure = false
wx.showMeasure = !!options.query.scene
},
login(returnResponse) {
let _this = this
let openId = null
let wechatInfo = null
return new Promise((resolve, reject) => {
wx.login({
success({
code
}) {
ssoApi.jsCodeLogin({
code,
appId: wx.$appId
}).then(res => {
wx.$authStatus = res.code != 0
util.setSessionId(res.data.sessionId)
openId = res.data.openId
util.setStorageSync('openId', openId)
console.log(wx.$trackData)
if (wx.$trackData.scene) {
// 初次进入小程序默认埋首页
_this.getScene(wx.$trackData.scene).then(res => {
wx.$trackData.merchant = res.merchantId
wx.$trackData.cardId = res.cardId
console.log('wx.$trackData.cardId', wx.$trackData.cardId)
util.setStorageSync('scene', res)
success({ code }) {
ssoApi
.jsCodeLogin({
code,
appId: wx.$appId
})
.then(res => {
wechatInfo = res.data
util.setStorageSync('aicard_info', wechatInfo)
wx.$authStatus = res.code != 0
util.setSessionId(wechatInfo.sessionId)
openId = wechatInfo.openId
// util.setStorageSync('openId', openId)
console.log(wx.$trackData)
wx.showMeasure = !!wx.$trackData.scene
if (wx.$trackData.scene) {
// 初次进入小程序默认埋首页
_this.getScene(wx.$trackData.scene).then(res => {
wx.$trackData.merchant = res.merchantId
wx.$trackData.cardId = res.cardId
console.log('wx.$trackData.cardId', wx.$trackData.cardId)
util.setStorageSync('scene', res)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, wechatInfo)
})
} else if (wx.$trackData.detailShare) {
// d+产品分享在这里设置埋点
const detailShare = wx.$trackData.detailShare
console.log(1211)
for (let i in trackData) {
console.log(i)
if (trackData[i].pageName == detailShare) {
console.log(trackData[i])
wx.$Track.sendTrack(trackData[i], wechatInfo)
break
}
}
} else if (wx.$trackData.isShare) {
util.setStorageSync('scene', wx.$trackData)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, openId)
})
} else if(wx.$trackData.detailShare) {
// d+产品分享在这里设置埋点
const detailShare = wx.$trackData.detailShare
console.log(1211)
for(let i in trackData) {
console.log(i)
if (trackData[i].pageName == detailShare) {
console.log(trackData[i])
wx.$Track.sendTrack(trackData[i], openId)
break
}
}
} else if (!wx.$trackData.detailShare && wx.$trackData.cardId) {
// 名片分享在这里设置埋点
util.setStorageSync('scene', wx.$trackData)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, openId)
}
ssoApi.getUserInfo({
openId
}).then(result => {
if (returnResponse) {
resolve(result)
} else {
if (result.code == 0) {
util.setUserInfo(result.data)
} else {
util.showToast(result.message || '网络异常')
}
resolve(result)
} else if (!wx.$trackData.detailShare && wx.$trackData.cardId) {
// 名片分享在这里设置埋点
util.setStorageSync('scene', wx.$trackData)
const systemInfo = JSON.parse(wx.getStorageSync('aicard_system_info'))
wx.$trackData.type = systemInfo.environment ? 2 : 1
wx.$Track.sendTrack(trackData.COMPANY, wechatInfo)
}
ssoApi
.getUserInfo({
openId
})
.then(result => {
if (returnResponse) {
resolve(result)
} else {
if (result.code == 0) {
util.setUserInfo(result.data)
} else {
util.showToast(result.message || '网络异常')
}
resolve(result)
}
})
})
.catch(() => {
wx.$authStatus = true
reject()
})
}).catch(() => {
wx.$authStatus = true
reject()
})
}
})
})
},
getScene(scene) {
return new Promise((resolve, reject) => {
wechatApi.getSceneById({
id: decodeURIComponent(scene).split('=')[1]
}).then(({data}) => {
let op = {}
data.scene.split('&').map(item => {
const [key, val] = item.split("=")
op[key] = val
wechatApi
.getSceneById({
id: decodeURIComponent(scene).split('=')[1]
})
.then(({ data }) => {
let op = {}
data.scene.split('&').map(item => {
const [key, val] = item.split('=')
op[key] = val
})
resolve(op)
})
resolve(op)
})
})
},
/**
/**
* 下载小程序新版本并重启应用
*/
autoUpdate: function () {
......@@ -173,6 +201,5 @@ App({
})
}
},
globalData: {
}
})
\ No newline at end of file
globalData: {}
})
......@@ -17,17 +17,29 @@
"pages/productDetail/navigationArround/navigationArround",
"pages/productDetail/paintProtect/paintProtect",
"pages/productDetail/seatVentilate/seatVentilate",
"pages/productDetail/solarFilm/solarFilm"
"pages/productDetail/solarFilm/solarFilm",
"pages/activityApplication/activityApplication",
"pages/newEnergy/newEnergy",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"pages/scene/scene",
"pages/checkProduct/checkProduct"
],
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "广联数科智能名片",
"navigationBarTextStyle": "black"
"navigationBarTextStyle": "black",
"initialRenderingCache": "static"
},
"usingComponents": {
"authorize": "components/Authorize/Authorize",
"phone-number": "components/PhoneNumber/PhoneNumber"
"phone-number": "components/PhoneNumber/PhoneNumber",
"tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar"
},
"resolveAlias": {
"~/*": "/*"
},
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents"
......
.box-center{
position: absolute;
top: 50%;
......
// components/CooperationApply/CooperationApply.js
import WxValidate from "../../utils/WxValidate";
import util from "../../utils/util"
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
tabData: [
{
name: "门店合作申请",
value: 0,
},
{
name: "代理商合作申请",
value: 1,
},
],
tabIndex: 0,
applyForm: {
merchantName: "",
carModel: "",
contactName: "",
contactPhone: "",
},
},
/**
* 组件的方法列表
*/
methods: {
selectTab(e) {
console.log(e.currentTarget.dataset.index);
this.setData({
tabIndex: e.currentTarget.dataset.index,
});
},
// 表单验证规则
initValidate() {
console.log(123123);
const rules = {
merchantName: {
required: true,
},
contactName: {
required: true,
},
contactPhone: {
required: true,
tel: true,
},
};
const messages = {
merchantName: {
required: "请填写门店名称",
},
contactName: {
required: "请填写联系人",
},
contactPhone: {
required: "请填写手机号",
},
};
this.WxValidate = new WxValidate(rules, messages);
},
//报错
showModal(error) {
wx.showToast({
title: error.msg,
icon: "none",
});
},
// 表单输入
handleInput(e) {
let name = e.currentTarget.dataset.name;
let val = e.detail.value;
const form = `applyForm.${name}`;
this.setData({
[form]: val,
});
},
// 校验表单
validateForm() {
let params = this.data.applyForm;
// 校验表单
if (!this.WxValidate.checkForm(params)) {
const error = this.WxValidate.errorList[0];
wx.hideLoading();
this.showModal(error);
return false;
} else {
return [params, this.data.tabIndex];
}
},
// 设置手机号
setPhone(phone) {
this.setData({
['applyForm.contactPhone']: phone,
});
},
},
// 组件页面生周期
lifetimes: {
created: function () {
// 在组件实例刚刚被创建时执行
// 初始化验证规则函数
this.initValidate();
},
attached: function() {
if (util.getUserInfo()&& util.getUserInfo().phone) {
this.setPhone(util.getUserInfo().phone)
console.log(this.data.applyForm)
}
}
},
});
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!-- components/CooperationApply/CooperationApply.wxml -->
<view>
<view class="tab-top">
<view wx:for="{{tabData}}" wx:key="index" class="tab-title {{item.value == tabIndex ? 'tab-title-active' : ''}}" bindtap="selectTab" data-index="{{item.value}}">
{{item.name}}
</view>
</view>
<form>
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">门店名称<text class="require">*</text>
</text>
<input name="merchantName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入门店名称' value="{{applyForm.merchantName}}" bindinput="handleInput" data-name="merchantName" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">{{tabIndex == 0 ? '主营品牌' : '合作品牌'}}</text>
<input name="carModel" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder="{{tabIndex == 0 ? '请输入主营品牌' : '请输入合作品牌'}}"value="{{applyForm.carModel}}" bindinput="handleInput" data-name="carModel" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系人<text class="require">*</text>
</text>
<input name="contactName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入姓名' value="{{applyForm.contactName}}" bindinput="handleInput" data-name="contactName" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">手机号<text class="require">*</text>
</text>
<input name="contactPhone" type='text' maxlength="11" placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入手机号' value="{{applyForm.contactPhone}}" bindinput="handleInput" data-name="contactPhone"></input>
</view>
</view>
</form>
</view>
\ No newline at end of file
/* components/CooperationApply/CooperationApply.wxss */
.tab-top {
display: flex;
justify-content: space-around;
height: 110rpx;
}
.tab-title {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 32rpx;
color: #323436;
text-align: center;
line-height: 110rpx;
}
.tab-title-active {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #323436;
line-height: 110rpx;
position: relative;
}
.tab-title-active::after {
content: '';
width: 80rpx;
height: 6rpx;
position: absolute;
bottom: 5rpx;
left: 50%;
transform: translateX(-50%);
background: #5850FF;
border-radius: 8rpx 8rpx 0 0;
}
.apply-info {
padding: 0 32rpx;
}
.info-list {
/* background: #fff; */
display: flex;
align-content: center;
padding: 36rpx 0;
border-bottom: 1rpx solid #eee;
}
.info-lable {
width: 176rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #2D2D33;
}
.require {
color: #EB4E4E;
}
\ No newline at end of file
// components/navigationBar/navigationBar.js
Component({
/**
* 组件的属性列表
*/
properties: {
navStyle: String,
custom: Boolean,
showBack: Boolean,
pageTitle: {
type: String,
value: '',
observer(n) {
if (n) {
this.title = n
this.setPageTitle()
}
}
}
},
title: '',
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {
setPageTitle() {
let thisPage = wx.$router.getPageInstance()
if (thisPage) thisPage.navigationBarTitleText = this.title
},
init() {
/**
* 获取自定义导航栏信息
*/
wx.getSystemInfo().then(res => {
let {
fontSizeSetting,
statusBarHeight,
screenWidth
} = res
const {
height,
right,
width,
top
} = wx.getMenuButtonBoundingClientRect(),
currentPages = getCurrentPages(), {
showBack
} = this.data
if (showBack && currentPages.length > 1) this.setData({
SHOWBACK: true
})
let navigationBarHeight = height + ((top - statusBarHeight) * 2) + 4 // 4
let navigationBarPadding = screenWidth - right
let navigationBarWidth = screenWidth - (navigationBarPadding * 2 + width) - width
this.setData({
statusBarHeight,
navigationBarHeight,
navigationBarStyle: `font-size:${fontSizeSetting}px;`,
navigationBarTextWidth: `width:${navigationBarWidth}px;padding:0 ${navigationBarPadding}px;`
})
this.emit({
navigationBarHeight,
statusBarHeight
})
})
},
emit({
navigationBarHeight,
statusBarHeight
}) {
let navHeight = navigationBarHeight + statusBarHeight
const thisPage = wx.$router.getPageInstance()
this.triggerEvent('navbarReady', {
height: navHeight,
statusBarHeight
})
this.setData({
showNavBar: true
})
thisPage.setData({
navHeight,
statusBarHeight
})
},
back() {
wx.$router.back()
}
},
lifetimes: {
attached() {
this.init()
this.setPageTitle()
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="navigation-bar" id="navigation-bar" style="padding-top:{{statusBarHeight}}px;height:{{navigationBarHeight}}px;{{navStyle}}">
<block wx:if="{{!custom}}">
<view class="navigation-bar-box" wx:if="{{showNavBar}}" style="{{navigationBarStyle}}">
<block wx:if="{{SHOWBACK}}">
<view class="back " bindtap="back">
<image class="img" src="./images/icon-back.png" />
</view>
</block>
<view class="navigation-bar-titleText" style="{{navigationBarTextWidth}}">
<slot/>
</view>
</view>
</block>
<block wx:else>
<slot/>
</block>
</view>
/* components/navigationBar/navigationBar.wxss */
.navigation-bar {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 99;
background-color: #fff;
transition: all .15s;
}
.navigation-bar-box {
position: relative;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.navigation-bar-titleText {
color: #333333;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-weight: 500;
box-sizing: border-box;
text-align: center;
letter-spacing: 1rpx;
}
.back-box {
width: 76rpx;
height: 100%;
position: absolute;
left: 0;
top: 0;
}
.back {
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
width: 100rpx;
/* height: 34rpx; */
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.back .img {
width: 16rpx;
height: 34rpx;
}
\ No newline at end of file
......@@ -6,7 +6,24 @@ Component({
/**
* 组件的属性列表
*/
properties: {},
properties: {
isHidden: {
type: Boolean,
value: false
},
phoneText: {
type: String,
value: '了解更多案例'
},
isImage: {
type: Boolean,
value: false
},
showIcon: {
type: Boolean,
value: true
}
},
observers: {},
/**
* 组件的初始数据
......@@ -24,17 +41,18 @@ Component({
// e.detail.errMsg == "getPhoneNumber:fail user deny"
detail.errMsg.indexOf('user deny') !== -1
) {
wx.hideLoading()
return;
} else {
// wx.$util.showLoading('正在授权...')
}
// this.triggerEvent("updatePhoneNumber", '18873336682');
wx.$util.showLoading('正在授权...')
getApp()
.login(true)
.then(({ data }) => {
delete detail.errMsg;
if (detail.iv && detail.encryptedData) {
wx.$util.showLoading('正在授权...')
ssoApi.authUserPhone(detail).then(({ data, code, message }) => {
wx.hideLoading()
if (code==0) {
......
<button class="phone-number" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
<image class="icon-arrow" src="{{IMGURL}}home/icon-arrow.png"></image>
了解更多案例
<image class="icon-arrow" src="{{IMGURL}}home/icon-arrow.png"></image>
</button>
\ No newline at end of file
<block wx:if="{{isImage}}">
<button class="imageBtn" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
</button>
</block>
<block wx:else>
<button class="{{isHidden ? 'hidden-phone':'phone-number'}}" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">
<image wx:if="{{showIcon}}" class="icon-arrow" src="{{IMGURL}}home/icon-arrow.png"></image>
{{phoneText}}
<image wx:if="{{showIcon}}" class="icon-arrow" src="{{IMGURL}}home/icon-arrow.png"></image>
</button>
</block>
\ No newline at end of file
......@@ -20,4 +20,24 @@
}
.icon-arrow:last-child {
margin-left: 48rpx;
}
.hidden-phone {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2;
background-color: transparent;
color: transparent;
}
.imageBtn {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
right: 0;
bottom: 0;
background-color: transparent;
}
\ No newline at end of file
// components/Tab/Tab.js
// behaviors: [LocationBehavior],
// import { imgUrlMixin } from '~/mixins/index'
Component({
// behaviors: [imgUrlMixin],
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
outClassName:String,
tab: Array,
openScroll: Boolean,
tabHeight: {
type: Boolean,
value: false
},
productHeight: {
type: Boolean,
value: false
},
index: {
type: Number,
observer: function (n) {
this.setData({
count: n,
to: `to-${n}`
})
}
},
itemWidth: String,
align: {
type: String,
value: ''
},
// 是否有红点
unreadClueCount: {
type: Number,
value: 0
},
},
/**
* 组件的初始数据
*/
data: {
count: 0,
to: '',
// IMGURL:
},
// lifetimes:{
// attached: function() {
// console.log('unreadClueCount',this.data.unreadClueCount)
// }
// },
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { count } = e.currentTarget.dataset
this.setData({
count,
to: `to-${count}`,
unreadClueCount:0
})
this.triggerEvent('click', count)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}">
<scroll-view
class="tab-box {{align}} {{outClassName}}"
style="{{productHeight ? 'height: 72rpx;' : ''}}"
scroll-x
enable-flex
scroll-with-animation
scroll-into-view="{{to}}"
enhanced="{{true}}"
show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
bindtap="click"
data-count="{{index}}"
id="to-{{index}}"
>
<view class="text" style="{{productHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" style="{{productHeight ? 'height: 4rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
<block wx:for="{{tab}}" wx:key="index">
<view
class="tab {{index==count?'active':''}}"
style="width:{{itemWidth}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}"
bindtap="click"
data-count="{{index}}"
>
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
{{item}}
</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- -->
<view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" />
</view>
</block>
</view>
</block>
var hasRedpoint = function (unreadClueCount) {
// console.log('unreadClueCount: ', unreadClueCount);
if(unreadClueCount>0){
return true
}else{
return false;
}
};
module.exports = {
hasRedpoint: hasRedpoint,
};
/* components/Tab/Tab.wxss */
.tab-box {
display: flex;
/* display: grid; */
width: 100%;
height: 92rpx;
box-sizing: border-box;
}
.tab-box.left {
padding-left: 32rpx;
}
.left .tab {
padding-right: 40rpx;
}
/* .flex .tab {
flex: 1;
} */
.tab {
position: relative;
flex-shrink: 0;
}
.tab .text {
height: 84rpx;
display: flex;
align-items: center;
box-sizing: border-box;
color: #A9A9A9;
justify-content: center;
}
.left .text {
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab.active .text {
/* font-weight: 500; */
font-weight: 600;
font-size: 44rpx;
transition: all .25s;
color: #2C2C2C;
font-family: PingFangSC-S0pxibold;
}
.tab .line {
width: 48rpx;
height: var(--borderRadius);
background: var(--btnColor);
border-radius: 2rpx;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
}
.tab.active .line {
transform: scale(1);
}
.tab-box::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.active .redpoint{
display: none;
}
.redpoint {
position: absolute;
top: 10px;
right: 5px;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */
.project-tab{
padding-left: 20px;
padding-right: 20px;
}
.project-tab .tab {
margin-right: 28px;
}
.project-tab .tab.active .text {
font-size: 28rpx;
color: var(--btnColor);
}
.project-tab .tab .line{
width:auto;
}
import componentsMixin from './componentsMixin'
import menuMixin from './menuMixin'
import shareTrackMixin from './shareTrackMixin'
module.exports = {
componentsMixin,
menuMixin
menuMixin,
shareTrackMixin
}
\ No newline at end of file
......@@ -13,7 +13,7 @@ module.exports = Behavior({
const curIntroduceIndex = e.currentTarget.dataset.index;
switch(curIntroduceIndex) {
case 3:
wx.$router.go('addValue');
wx.$router.go('scene');
// wx.$router.go('addTransform', {notIntercept: true});
// wx.showToast({
// title: '敬请期待',
......
import util from '../utils/util'
module.exports = Behavior({
methods: {
shareTrack(name, type) {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
let pathName = `pages/productDetail/${type}/${type}?cardId=`+util.getStorageSync('scene').cardId + "&merchant=" + merchant + '&detailShare=' + `trackData.${name}.pageName`
return {
title: trackData[name].pageName,
path: pathName
}
}
}
})
\ No newline at end of file
// pages/activityApplication/activityApplication.js
// import { trackData } from "../../utils/data";
import { entmicroApi } from "../../api/api";
Page({
/**
* 页面的初始数据
*/
data: {
productTabList: [
{
id: "0",
name: "scene1",
title: "新车洽谈场景",
type: "1.0 新车权益销售",
url: "car4",
},
{
id: "1",
name: "scene2",
title: "新车交付场景",
type: "1.1 新车精品升级",
url: "car1",
},
{
id: "2",
name: "scene3",
title: "0-12个月",
type: "1.2 新车线上转化",
url: "car2",
},
{
id: "3",
name: "scene4",
title: "12个月以上",
type: "1.3 存量用户众筹",
url: "car3",
},
],
productList: {
scene1: [
{
name: "equity",
url: "digital_icon",
nameZh: "数字无忧权益卡",
isSelect: false,
actNum: 0,
activeNavIdx: 0,
},
{
nameZh: "其他",
isSelect: false,
},
],
scene2: [
{
name: "solarFilm",
url: "solar_icon",
nameZh: "汽车太阳膜",
isSelect: false,
actNum: 1,
activeNavIdx: 0,
},
{
nameZh: "其他",
isSelect: false,
},
],
scene3: [
{
name: "paintProtect",
url: "protect_icon",
nameZh: "漆面保护膜",
isSelect: false,
actNum: 2,
activeNavIdx: 0,
},
{
name: "changingFilm",
url: "change_icon",
nameZh: "改色膜",
isSelect: false,
actNum: 2,
activeNavIdx: 1,
},
{
nameZh: "其他",
isSelect: false,
},
],
scene4: [
{
name: "carBeauty",
url: "beauty_icon",
nameZh: "数字化美容",
isSelect: false,
actNum: 3,
activeNavIdx: 0,
},
{
name: "seatVentilate",
url: "seat_icon",
nameZh: "座椅通风",
isSelect: false,
actNum: 3,
activeNavIdx: 1,
},
{
name: "arNavigation",
url: "ar_icon",
nameZh: "AR实景导航",
isSelect: false,
actNum: 3,
activeNavIdx: 2,
},
{
name: "ambientLighting",
url: "light_icon",
nameZh: "氛围灯",
isSelect: false,
actNum: 3,
activeNavIdx: 3,
},
{
name: "navigationArround",
url: "arround_icon",
nameZh: "360全景导航",
isSelect: false,
actNum: 3,
activeNavIdx: 4,
},
{
nameZh: "其他",
isSelect: false,
},
],
},
selectItemIndex: 0,
selectItemName: "scene1",
// applyForm: {
// merchantName: '',
// carModel: '',
// contactName: '',
// contactPhone: ''
// },
foldFlag: false,
sceneNum: "",
sceneName: "",
sceneTip: {
scene1: "合作门店数2200+,单店年增量产值100万+",
scene2: "合作门店数300+,单店年增量产值60万+",
scene3: "正在直播中,目前有17万+用户正在观看",
scene4: "本月活动进行中100+门店,预估产值1000万+",
},
},
// 提交表单
submitApply() {
wx.$util.showLoading("提交中...");
let validFlag = this.selectComponent("#applyForm").validateForm();
if (!validFlag[0]) return;
let params = JSON.parse(JSON.stringify(validFlag[0]));
let applyType = validFlag[1];
// 区分代理商和门店
params.merchantName =
applyType == 0
? params.merchantName + "(活动-门店)"
: params.merchantName + "(活动-代理商)";
// 如果选择了业务场景
if (this.data.sceneName) {
let selectFlag = 0;
let productItems = [];
this.data.productList[this.data.sceneName].forEach((item) => {
if (item.isSelect) {
selectFlag = selectFlag + 1;
productItems.push(item.nameZh);
}
});
if (!selectFlag) {
wx.hideLoading();
wx.showToast({
title: "请至少选择一个产品",
icon: "none",
});
return;
}
let businessItem = this.data.productTabList.find((item) => {
return item.id == this.data.sceneNum;
});
params.businessScenario = businessItem.title;
params.productItems = productItems.join(",");
}
params.cardId = wx.$util.getStorageSync("scene").cardId;
params.merchant =
wx.$util.getStorageSync("scene").merchant ||
wx.$util.getStorageSync("scene").merchantId;
params.openId = wx.$util.getStorageSync("aicard_info").openId;
params.unionId = wx.$util.getStorageSync("aicard_info").unionId;
console.log(params);
entmicroApi.activityApply(params).then(({ data, code, message }) => {
if (code == 0) {
wx.hideLoading();
wx.showToast({
msg: "提交成功",
});
wx.$router.go("applySuccess");
} else {
wx.hideLoading();
wx.showToast({
title: message,
icon: "none",
});
}
});
},
// 选择活动tab
selectProduct(e) {
this.setData({
selectItemIndex: e.currentTarget.dataset.item.id,
selectItemName: e.currentTarget.dataset.item.name,
});
},
// 跳转产品详情页
goPage(e) {
let actNum = e.currentTarget.dataset.item.actNum;
let activeNavIdx = e.currentTarget.dataset.item.activeNavIdx;
console.log(actNum, activeNavIdx, "000");
wx.$router.go("scene", { actNum, activeNavIdx });
},
// 展开收起
handleFold() {
this.setData({
foldFlag: !this.data.foldFlag,
});
},
// 选择业务场景
selectScene(e) {
// 遍历之前业务场景下产品是否已选择,选择了的话取消选中
if (this.data.sceneName) {
let newProductList;
newProductList = this.data.productList[this.data.sceneName].map(
(item) => {
if (item.isSelect) item.isSelect = false;
return item;
}
);
let selectList = `productList.${this.data.sceneName}`;
this.setData({
[selectList]: newProductList,
});
}
this.setData({
sceneNum: e.currentTarget.dataset.item.id,
sceneName: e.currentTarget.dataset.item.name,
});
},
// 选择业务场景产品
selectScenePro(e) {
var index = e.currentTarget.dataset.index;
var item = this.data.productList[this.data.sceneName][index];
item.isSelect = !item.isSelect;
this.setData({
productList: this.data.productList,
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 禁用分享转发
wx.hideShareMenu({
menus: ["shareAppMessage", "shareTimeline"],
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// const options = wx.getEnterOptionsSync();
// if (options.query.cardId) {
// wx.$trackData = options.query;
// }
// getApp()
// .login()
// .then(({ data }) => {
// if (!wx.$trackData.detailShare) {
// wx.$Track.sendTrack(trackData.ACTIVITYAPPLICATION);
// }
// });
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
{
"usingComponents": {
"apply-content": "../../components/CooperationApply/CooperationApply"
},
"navigationBarTitleText": "活动申请"
}
<!-- pages/activityApplication/activityApplication.wxml -->
<view class="apply-content">
<image class="apply-background" mode="widthFix" webp src="{{IMGURL}}application/application_top.png?v={{img_version}}"></image>
<view class="box-background">
<!-- 产品展示 -->
<view class="product-box">
<!-- 产品选择tab -->
<view class="product-tab-box">
<!-- tab栏 -->
<block wx:for="{{productTabList}}" wx:key="index">
<view class="product-item {{item.id == selectItemIndex ? 'product-item-active' : ''}}" bindtap="selectProduct" data-item="{{item}}">
<view class="product-item-title {{item.id == selectItemIndex ? 'product-item-title-active' : ''}}">
{{item.title}}
</view>
<view class="product-item-type {{item.id == selectItemIndex ? 'product-item-type-active' : ''}}">
{{item.type}}
</view>
<view wx:if="{{item.id == selectItemIndex}}" class="selected-item">
<view class="selected-item-top"></view>
<view class="selected-item-bottom"></view>
</view>
</view>
</block>
</view>
<view class="product-tip">
<image class="tip-icon" wx:if="{{selectItemName == 'scene3'}}" mode="widthFix" webp src="{{IMGURL}}application/tip_icon.png?v={{img_version}}"></image>
<image class="tip-icon" wx:else="" mode="widthFix" webp src="{{IMGURL}}application/tip_icon2.png?v={{img_version}}"></image>
<text class="tip-text">{{sceneTip[selectItemName]}}</text>
</view>
<block wx:for="{{productList[selectItemName]}}" wx:key="index">
<image wx:if="{{item.name}}" class="product-img" mode="widthFix" webp src="{{IMGURL}}application/{{item.url}}.png?v={{img_version}}" bindtap="goPage" data-item="{{item}}"></image>
</block>
</view>
</view>
<!-- 申请表单 -->
<view class="apply-box">
<!-- 表单 -->
<apply-content id="applyForm"></apply-content>
<!-- 展开收起 -->
<view class="apply-fold" bindtap="handleFold">
<text wx:if="{{!foldFlag}}">选择业务场景</text>
<text wx:else>收起</text>
<image wx:if="{{!foldFlag}}" class="fold-icon" mode="widthFix" webp src="{{IMGURL}}application/down_icon.png?v={{img_version}}"></image>
<image wx:else class="fold-icon" mode="widthFix" webp src="{{IMGURL}}application/up_icon.png?v={{img_version}}"></image>
</view>
<block wx:if="{{foldFlag}}">
<!-- 业务场景 -->
<view class="fold-title">业务场景</view>
<view class="product-tab-box fold-box">
<view wx:for="{{productTabList}}" wx:key="index" class="item-wrap {{item.id == sceneNum ? 'act':''}}" bindtap="selectScene" data-item="{{item}}">
<view class="fold-scene-item {{item.id == sceneNum ? 'fold-scene-item-active':''}}">
<image class="fold-img" mode="widthFix" webp src="{{IMGURL}}application/{{item.url}}.png?v={{img_version}}"></image>
<view class="product-item-title {{item.id == sceneNum ? 'product-item-title-active':''}}">
{{item.title}}
</view>
<view class="product-item-type {{item.id == sceneNum ? 'product-item-type-active':''}}">
{{item.type}}
</view>
</view>
</view>
</view>
<!-- 选择产品 -->
<block wx:if="{{sceneNum}}">
<view>
<text class="fold-title">选择产品</text>
<text class="fold-tip">(可多选)</text>
</view>
<view class="fold-product">
<block wx:for="{{productList[sceneName]}}">
<view class="item {{item.isSelect ? 'item-selected': ''}}" bindtap="selectScenePro" data-index="{{index}}">
<view>{{item.nameZh}}</view>
<image wx:if="{{item.isSelect}}" class="selected-img" mode="widthFix" webp src="{{IMGURL}}application/selected_icon.png?v={{img_version}}"></image>
</view>
</block>
</view>
</block>
</block>
</view>
<view class="btn-box">
<button class="submit-btn" bindtap="submitApply">提交申请</button>
</view>
</view>
\ No newline at end of file
/* pages/activityApplication/activityApplication.wxss */
.apply-content {
/* overflow: auto; */
}
.apply-background {
width: 100%;
}
.box-background {
background-image: linear-gradient(179deg, #E3E8FF 0%, #FEFEFE 100%);
}
.product-tab-box {
display: flex;
margin-bottom: 38rpx;
}
.product-item {
/* width: 166rpx; */
width: calc(100%/4);
height: 120rpx;
margin-right: 12rpx;
background: #F5F5FC;
border-radius: 8rpx;
}
.product-item:last-child {
margin-right: 0;
}
.product-item-active {
background: #FFFFFF;
}
.product-item-title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 24rpx;
color: #323436;
letter-spacing: 0;
text-align: center;
line-height: 44rpx;
margin-top: 24rpx;
}
.product-item-title-active {
color: #5850FF;
}
.product-item-type {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 18rpx;
color: #8A8C90;
letter-spacing: 0;
text-align: center;
line-height: 24rpx;
}
.product-item-type-active {
color: #807AFF;
}
.selected-item {
margin-top: 27rpx;
/* width: 166rpx; */
position: relative;
}
.selected-item-top {
/* width: 166rpx; */
height: 4rpx;
border-bottom-left-radius: 4rpx;
border-bottom-right-radius: 4rpx;
background: #5850FF;
}
.selected-item-bottom {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
width: 0px;
height: 0px;
border: 12rpx solid #5850FF;
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
}
.product-img {
width: calc((100% - 32rpx)/3);
height: 216rpx;
margin-right: 16rpx;
margin-bottom: 20rpx;
box-shadow: 0 6rpx 24rpx 0 rgba(175, 181, 219, 0.40);
}
.product-img:nth-child(3n+2) {
margin-right: 0;
}
.product-box {
margin-bottom: 56rpx;
padding: 0 26rpx;
background-image: linear-gradient(179deg, #DBE3FF 0%, #FEFEFE 100%);
}
.product-tip {
display: flex;
align-items: center;
width: 704rpx;
height: 44rpx;
background-image: linear-gradient(133deg, rgba(0, 51, 255, 0.08) 0%, #FFFFFF 100%);
border-radius: 24rpx;
margin-bottom: 32rpx;
}
.tip-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.tip-text {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #5850FF;
line-height: 36rpx;
}
.apply-box {
width: 702rpx;
/* height: 680rpx; */
background: #FFFFFF;
box-shadow: 0 6rpx 24rpx 0 rgba(175, 181, 219, 0.40);
border-radius: 12rpx;
margin: 0 24rpx;
margin-bottom: 30rpx;
/* position: absolute;
top: 420rpx;
left: 24rpx; */
}
.submit-btn {
width: 622rpx;
height: 80rpx;
background: #5850FF;
border-radius: 8rpx;
margin-top: 60rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
font-family: PingFangSC-Medium;
line-height: 80rpx;
}
.btn-box {
padding-bottom: 60rpx;
}
.apply-fold {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF;
text-align: center;
padding: 76rpx 0 40rpx 0;
}
.fold-icon {
width: 24rpx;
height: 24rpx;
vertical-align: middle;
margin-left: 8rpx;
}
.fold-title {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #323436;
padding-left: 32rpx;
}
.fold-tip {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 22rpx;
color: #6E6E7A;
}
.fold-box {
padding: 44rpx 16rpx;
}
.fold-scene-item {
/* width: 160rpx; */
width: 100%;
height: 180rpx;
background: #F7F7FC;
border-radius: 12rpx;
text-align: center;
}
.fold-scene-item-active {
background-image: linear-gradient(145deg, #E6E6FF 0%, #FFFFFF 73%);
}
.fold-img {
width: 56rpx;
height: 56rpx;
margin-top: 20rpx;
}
.item-wrap {
position: relative;
/* width: 160rpx; */
width: calc(100%/4);
height: 180rpx;
border-radius: 12rpx;
margin-right: 12rpx;
}
.item-wrap:last-child {
margin-right: 0
}
.act {
border: 2rpx solid #5850FF;
}
.act::after {
position: absolute;
left: 50%;
bottom: -15rpx;
display: block;
content: "";
width: 14rpx;
height: 14rpx;
border-bottom: 2rpx solid #5850FF;
border-right: 2rpx solid #5850FF;
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
.item {
/* width: 216rpx; */
width: calc((100% - 24rpx)/3);
height: 64rpx;
background: #F5F5FA;
border-radius: 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
text-align: center;
margin-right: 12rpx;
margin-bottom: 20rpx;
position: relative;
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: center;
}
.item:nth-child(3n) {
margin-right: 0;
}
.fold-product {
display: flex;
flex-wrap: wrap;
padding: 36rpx 16rpx 64rpx 16rpx;
}
.item-selected {
color: #5850FF;
font-weight: 600;
border: 2rpx solid #9B96FF;
}
.selected-img {
width: 30rpx;
height: 22rpx;
position: absolute;
top: -1rpx;
right: -1rpx;
}
\ No newline at end of file
......@@ -54,9 +54,9 @@ Page({
//报错
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
wx.showToast({
title: error.msg,
icon: 'none',
})
},
......
......@@ -7,7 +7,11 @@ Page({
data: {
},
toBack() {
wx.navigateBack({
delta: 2,
})
},
/**
* 生命周期函数--监听页面加载
*/
......
{
"usingComponents": {},
"navigationBarTitleText": "合作申请"
"navigationBarTitleText": "活动申请"
}
\ No newline at end of file
......@@ -4,10 +4,9 @@
<image class="success-img" mode="widthFix" webp src="{{IMGURL}}home/success.png" bindload="imgSuccess" data-name="logo"></image>
</view>
<view class="success-title">申请成功</view>
<view class="success-text">您的合伙人对外宣传合作案例页面已生成,</view>
<view class="success-text">点击下方按钮进入您的方案管理页面,</view>
<view class="success-text">可对具体案例页面进行分享。</view>
<button class="share-btn">
进入您的可分享页面
<view class="success-text">您的申请已提交,</view>
<view class="success-text">请耐心等待顾问专员与您联系。</view>
<button class="share-btn" bindtap="toBack">
返回首页
</button>
</view>
......@@ -6,7 +6,7 @@
.success-img {
width: 448rpx;
height: 192rpx;
margin-top: 240rpx;
margin-top: 192rpx;
}
.success-title {
......@@ -14,7 +14,7 @@
font-weight: 500;
font-size: 56rpx;
color: #2D2D33;
margin: 32rpx 0;
margin: 80rpx 0 32rpx;
}
.success-text {
......@@ -29,9 +29,10 @@
width: 622rpx;
height: 80rpx;
font-size: 28rpx;
color: #ffffff;
background: #5850FF;
color: #5850FF;
border-radius: 8rpx;
line-height: 80rpx;
margin-top: 160rpx;
margin-top: 208rpx;
border: 2rpx solid #9B96FF;
background-color: #fff;
}
\ No newline at end of file
{
"usingComponents": {
"product": "../scene/components/product/product"
},
"navigationStyle": "custom",
"onReachBottomDistance": 10,
"enablePullDownRefresh": true
}
/* pages/checkProduct/checkProduct.wxss */
@import "../../style/common.wxss";
page {
background-color: #F7F7F7;
color: #282829;
font-size: 28rpx;
--themeColor: #F13C3D;
--btnColor: #3666FE;
--borderRadius: 8rpx;
--margin: 32rpx;
}
image {
width: 100%;
height: 100%;
vertical-align: top;
}
.icon-mine-arrow {
width: 16rpx !important;
height: 28rpx !important;
transform: translateY(7rpx);
}
.productCon {
box-sizing: border-box;
padding-top: 88px;
display: block;
}
// 分享模态框
.share-wrap {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 2;
.img-wrap {
position: absolute;
top: 15%;
left: 50%;
transform: translateX(-50%);
// width: 225px;
width: 60%;
height: 54%;
// background-color: red;
overflow: auto;
border-radius: 16rpx;
.prod-item {
background-color: #f5f7fb;
.prod-item {
padding: 0 32rpx 32rpx;
margin: 16rpx auto 0;
// background-color: #f5f7fb;
// border-radius: 48rpx 48rpx 0 0;
}
.prod-card {
display: flex;
height: 120rpx;
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: 20rpx;
padding: 0 24rpx;
// box-sizing: border-box;
position: relative;
}
.prod-card .card-img {
padding-top: 10rpx;
width: 100rpx;
height: 100rpx;
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-weight: 500;
font-size: 16rpx;
color: #323436;
}
.prod-info .sale,
.prod-info .earnings {
font-size: 16rpx;
color: #7a8299;
}
.prod-info .sale-num {
font-size: 14rpx;
color: #323436;
}
.prod-info .earnings-num {
font-size: 14rpx;
font-weight: Bold;
color: #f35251;
}
}
.img {
width: 100%;
// height: auto;
// height: 60%;
background-color: #fff;
}
}
}
.btns-wrap {
padding-bottom: 84rpx;
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 120rpx;
background: #ffffff;
z-index: 1;
// 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;
// }
.name0{
width: 256rpx;
height: 88rpx;
border: 1px solid #EEEEEE;
border-radius: 8rpx;
font-size: 28rpx;
color: #8A8C90;
text-align: center;
line-height:88rpx;
}
.name1{
width: 414rpx;
height: 88rpx;
background: #3666FE;
border-radius: 8rpx;
font-size: 28rpx;
color: #FFFFFF;
line-height:88rpx;
}
.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;
}
}
/* 用户授权 */
.user-profile {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 3;
background-color: transparent;
}
<!-- pages/checkProduct/checkProduct.wxml -->
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
{{senceData[actNum].productList[activeNavIdx].proName}}
</navigation-bar>
<!-- <view style="height:{{headerHeight}}px">
</view> -->
<!-- style="padding-top:{{headerHeight}}px" -->
<product stickyTop="{{headerHeight}}" class="productCon" isAuthphone="{{isAuthphone}}" actNum="{{actNum}}" wrapactiveNavIdx="{{activeNavIdx}}" senceData="{{senceData}}" outshowVideo="{{outshowVideo}}" isShare="{{isShare}}" isShow="{{isShow}}" bindauthorized="authorizedFn" />
<!-- 分享弹框 -->
<!-- <view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap">
<view class="prod-item">
<view class="prod-card">
<view class="card-img">
<image src="{{IMG_URL}}index/prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
</view>
<view class="prod-info">
<text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale" 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" decode="{{true}}">
预估收益&nbsp;
<text class="earnings-num">
{{senceData[actNum]['productList'][activeNavIdx].profit}}
</text>
</text>
</view>
</view>
</view>
</view>
<button></button>
</view> -->
<!-- 用于图片加载事件 -->
<!-- <image class="img" src="{{IMG_URL}}index/longpic{{actNum+1}}.png" bindload="onloadFn" /> -->
<!-- <view class="btns-wrap" wx:if="{{isShow}}">
<view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<block wx:if="{{index == 1}}">
<button open-type="share" class="btn-wechat">
<view class="name{{index}}">{{item.name}}</view>
</button>
</block>
<block wx:else>
<view class="name{{index}}">{{item.name}}</view>
</block>
</view>
</view>
</view> -->
<!-- 授权昵称 -->
<!-- !hasUserInfo && !isShow -->
<!-- <view wx:if="{{!hasUserInfo && isShare && isAuthphone}}" class="user-profile" bindtap="getUserProfile"></view> -->
\ No newline at end of file
var measureList = Object.freeze([
{
name: '新车1.0',
iconName: 'icon1',
product: [
{
name: '车损险升级',
parentName: '新车1.0',
value: '0-0',
isCheck: false,
rate: '0.5',
averagePrice: 1200,
flowCost: '0.4',
flowCostText: '40%',
serviceDividendRatio: '0.23'
}
]
},
{
name: '新车1.1',
iconName: 'icon2',
product: [
{
name: '太阳膜升级',
parentName: '新车1.1',
value: '1-0',
isCheck: false,
rate: '0.55',
averagePrice: 1400,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.65'
}
]
},
{
name: '新车1.2',
iconName: 'icon3',
tips: '0-6个月',
product: [
{
name: '膨胀金活动-车衣',
parentName: '新车1.2',
tips: '0-6个月',
value: '2-0',
isCheck: false,
rate: '0.09',
averagePrice: 5000,
flowCost: '0.1',
flowCostText: '10%',
serviceDividendRatio: '0.85'
},
{
name: '膨胀金活动-改色膜',
parentName: '新车1.2',
tips: '0-6个月',
value: '2-1',
isCheck: false,
rate: '0.06',
averagePrice: 2999,
flowCost: '0.1',
flowCostText: '10%',
serviceDividendRatio: '0.74'
}
]
},
{
name: '新车1.3',
iconName: 'icon4',
tips: '售后活动',
product: [
{
name: '360全景导航',
parentName: '新车1.3',
tips: '售后活动',
value: '3-0',
isCheck: false,
rate: '0.015',
averagePrice: 2680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.16'
},
{
name: 'AR导航',
parentName: '新车1.3',
tips: '售后活动',
value: '3-1',
isCheck: false,
rate: '0.015',
averagePrice: 1680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.24'
},
{
name: '氛围灯',
parentName: '新车1.3',
tips: '售后活动',
value: '3-2',
isCheck: false,
rate: '0.015',
averagePrice: 2680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.22'
},
{
name: '座椅通风',
parentName: '新车1.3',
tips: '售后活动',
value: '3-3',
isCheck: false,
rate: '0.01',
averagePrice: 2580,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.21'
},
{
name: '智能香氛',
parentName: '新车1.3',
tips: '售后活动',
value: '3-4',
isCheck: false,
rate: '0.015',
averagePrice: 1680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.24'
}
]
}
])
export default {
measureList
}
\ No newline at end of file
// pages/measure/measure.js
import Util from '../../../utils/util'
import measureData from '../constant/data'
const checkMap = new Map()
Page({
/**
* 页面的初始数据
*/
data: {
measureList: measureData.measureList,
isDisabled: true,
checkArray: [],
formData: {
storeNumber: '',
carNumber: '',
customNumber: ''
}
},
// 提交
submit() {
const reg = /^[1-9]\d*$/
// for(let i in this.data.formData) {
// if (!reg.test(this.data.formData[i])) {
// wx.showToast({
// title: '请输入正整数',
// icon: 'none',
// duration: 1000
// })
// this.setData({
// isDisabled: true
// })
// return
// }
// }
if (!this.data.isDisabled) {
console.log(this.data.checkArray)
let checkArray = []
this.data.measureList.forEach(item => {
item.product.forEach(i => {
if (i.isCheck) {
checkArray.push(i)
}
})
})
console.log(checkArray)
const params = Object.assign({checkArray}, this.data.formData)
console.log(params)
wx.$router.go("measureResult", params);
}
},
// 选择产品
checkProduct(e) {
const value = e.target.dataset.value
const index = +value.split('-')[0]
const productIndex = +value.split('-')[1]
const name = `measureList[${index}].product[${productIndex}].isCheck`
const val = this.data.measureList[index].product[productIndex].isCheck
!val ? checkMap.set(value, !val) : checkMap.delete(value)
console.log(checkMap)
this.setData({
[name]: !val,
checkArray: [...checkMap.keys()]
})
this.validForm()
console.log(this.data.checkArray)
},
// 必填校验
validForm() {
const flag = this.data.formData.storeNumber && this.data.formData.carNumber && this.data.formData.customNumber && this.data.checkArray.length
this.setData({
isDisabled: !flag
})
return flag
},
// 表单输入
handleInput(e) {
let name = e.currentTarget.dataset.name
let val = this.validateNumber(e.detail.value)
console.log(val)
const form = `formData.${name}`
this.setData({
[form]: val
})
this.validForm()
},
// 输入正整数校验
validateNumber(val) {
console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "展业测算"
}
\ No newline at end of file
<!--pages/measure/measure.wxml-->
<view class="wrapper-measure">
<image class="header-bg" webp src="{{IMGURL}}measure/header-bg.png?v={{img_version}}"></image>
<view class="form first-form">
<view class="form-title">请输入门店基本信息</view>
<view class="form-label">您的门店数</view>
<input class="form-value" value="{{formData.storeNumber}}" bindinput="handleInput" data-name="storeNumber" maxlength="4" type="number" placeholder="请输入门店数"/>
<view class="form-label">单店每月平均新车数</view>
<input class="form-value" value="{{formData.carNumber}}" bindinput="handleInput" data-name="carNumber" maxlength="4" type="number" placeholder="请输入单店每月平均新车数"/>
<view class="form-label">单店3年以上存量客户数</view>
<input class="form-value" value="{{formData.customNumber}}" bindinput="handleInput" data-name="customNumber" maxlength="6" type="number" placeholder="请输入您的单店3年以上存量客户数"/>
</view>
<view class="form second-form">
<view class="form-title">请选择场景/产品</view>
<block wx:for="{{measureList}}" wx:for-item="i" wx:key="index">
<view class="scenario">
<image class="icon" webp src="{{IMGURL}}measure/{{i.iconName}}.png?v={{img_version}}"></image>
{{i.name}}
<view wx:if="{{i.tips}}" class="title-tip">({{i.tips}})</view>
</view>
<view class="product-list">
<view class="product-item {{j.isCheck ? 'active':''}}" wx:for="{{i.product}}" wx:for-item="j" wx:key="index" data-value="{{j.value}}" bindtap="checkProduct">
<image hidden="{{!j.isCheck}}" class="iconCheck" webp src="{{IMGURL}}measure/icon-check.png?v={{img_version}}"></image>
{{j.name}}</view>
</view>
</block>
</view>
<view class="submit {{isDisabled ? 'disabled' : ''}}" bindtap="submit">开始测算</view>
</view>
/* pages/measure/measure.wxss */
.wrapper-measure {
position: relative;
padding: 0 24rpx 90rpx;
}
.header-bg {
position: absolute;
top: -224rpx;
left: 0;
width: 100%;
z-index: -1;
}
.form {
width: 100%;
box-sizing: border-box;
background: #fff;
box-shadow: 0 4rpx 32rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
padding: 32rpx 40rpx;
}
.form-title {
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
}
.first-form {
margin-top: 224rpx;
}
.second-form {
margin-top: 48rpx;
}
.form-label {
font-size: 28rpx;
margin-top: 32rpx;
}
.form-value {
margin-top: 16rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
padding: 0 20rpx;
box-sizing: border-box;
font-size: 28rpx;
font-size: 28rpx;
line-height: 48rpx;
}
.scenario {
display: flex;
align-items: center;
width: 100%;
padding: 10rpx 24rpx;
background: #F5F5FA;
border-radius: 8rpx;
margin-top: 48rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
line-height: 44rpx;
box-sizing: border-box;
}
.scenario .icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.title-tip {
font-weight: 400;
font-size: 24rpx;
color: #6E6E7A;
letter-spacing: 0;
line-height: 44rpx;
}
.product-list {
/* display: flex; */
width: 100%;
}
.product-item {
position: relative;
display: inline-block;
width: calc(50% - 42rpx);
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 8rpx;
text-align: center;
padding: 14rpx;
margin-top: 18rpx;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
text-align: center;
line-height: 44rpx;
}
.product-item.active {
background-image: linear-gradient(0deg, #E8E8FF 14%, #FAFAFF 89%);
border: 2rpx solid #9994FF;
}
.product-item:nth-child(even) {
margin-left: 18rpx;
}
.iconCheck {
position: absolute;
width: 30rpx;
height: 22rpx;
top: -2rpx;
right: -2rpx;
}
.submit {
margin: 48rpx 32rpx;
padding: 24rpx 245rpx;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
}
.submit.disabled {
background: #D3D3DB;
}
\ No newline at end of file
// pages/measureResult/measureResult.js
import Util from '../../../utils/util'
import measureData from '../constant/data'
Page({
/**
* 页面的初始数据
*/
data: {
visible: false,
measureList: null,
formData: {
storeNumber: 1,
carNumber: 1,
customNumber: 1,
checkArray: []
},
checkList: [],
singleList: ['baseCustomersNumber', 'valueAddNumber', 'storeIncomeNumber', 'serviceIncomeNumber', 'singleValueAddNumber', 'singleStoreIncomeNumber', 'singleServiceIncomeNumber'],
countList: ['valueAddCount', 'storeIncomeCount', 'serviceIncomeCount', 'singleValueAddCount', 'singleStoreIncomeCount', 'singleServiceIncomeCount'],
countData: {},
dialogData: {
rate: '',
averagePrice: ''
}
},
// 计算公式
formula(name, item, list) {
console.log(name, item)
const {storeNumber, carNumber, customNumber} = this.data.formData
const {rate, averagePrice, flowCost, serviceDividendRatio, parentName} = item
console.log(storeNumber, carNumber, customNumber)
let value = 0
switch(name) {
// 增值产量(总)
case 'valueAddCount':
list.forEach(i => {
value = value + (+i.valueAddNumber)
})
break
// 4s店收入/年
case 'storeIncomeCount':
list.forEach(i => {
value = value + (+i.storeIncomeNumber)
})
break
// 服务商收入/年
case 'serviceIncomeCount':
list.forEach(i => {
value = value + (+i.serviceIncomeNumber)
})
break
// 单店均值
case 'singleValueAddCount':
let val = 0
list.forEach(i => {
val = val + (+i.valueAddNumber)
})
value = (val / storeNumber).toFixed(0)
break
// 单店均值
case 'singleStoreIncomeCount':
let val1 = 0
list.forEach(i => {
val1 = val1 + (+i.storeIncomeNumber)
})
value = (val1 / storeNumber).toFixed(0)
break
// 单店均值
case 'singleServiceIncomeCount':
let val2 = 0
list.forEach(i => {
val2 = val2 + (+i.serviceIncomeNumber)
})
value = (val2 / storeNumber).toFixed(0)
break
// 基盘客户数
case 'baseCustomersNumber':
if (parentName == '新车1.3') {
value = customNumber * storeNumber
} else {
value = carNumber * 12 * storeNumber
}
break
// 增量产值/年(单个产品)总
case 'valueAddNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice).toFixed(0)
}
break
// 单店产值
case 'singleValueAddNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice / storeNumber).toFixed(0)
}
break
// 4s店收入/年
case 'storeIncomeNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice * flowCost).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * flowCost).toFixed(0)
}
break
// 服务商收入/年
case 'serviceIncomeNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice * serviceDividendRatio).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * serviceDividendRatio).toFixed(0)
}
break
// 4s店收入/年,单店
case 'singleStoreIncomeNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice * flowCost / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * flowCost / storeNumber).toFixed(0)
}
break
// 服务商收入/年,单店
case 'singleServiceIncomeNumber':
if (parentName == '新车1.3') {
value = (customNumber * storeNumber* rate * averagePrice * serviceDividendRatio / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * serviceDividendRatio / storeNumber).toFixed(0)
}
break
}
return value;
},
// 开始计算
getCalculate(checkArray, isCount = false) {
const checkList = checkArray
if (!isCount) {
const singleList = this.data.singleList
checkList.forEach(item => {
singleList.forEach(i => {
const value = this.formula(i, item)
item[i] = value
})
})
return checkList
} else {
const {countList} = this.data
const countData = {}
console.log(checkList)
checkList.forEach(i => {
countList.forEach(j => {
const value = this.formula(j, i, checkList)
countData[j] = value
})
})
return countData
}
},
// 编辑
toEdit(e) {
console.log(e)
const {item, index} = e.currentTarget.dataset
console.log(item)
this.setData({
visible: true,
'dialogData.rate': (item.rate * 10000 / 100).toFixed(2),
'dialogData.averagePrice': item.averagePrice,
'dialogData.index': index
});
},
showCalculate() {
this.setData({
visible: false
})
},
clickDialog(e) {
console.log(e.changedTouches[0].clientY);
if (e.changedTouches[0].clientY < 451) {
this.setData({
visible: false
});
}
},
submit(e) {
console.log(e, this.data.dialogData)
const {rate, averagePrice, index} = this.data.dialogData
console.log(index)
// const reg = /^[1-9]\d*$/
// const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
if (!rate) {
wx.showToast({
title: '请输入转化率',
icon: 'none',
duration: 2000
})
return
}
if (!averagePrice) {
wx.showToast({
title: '请输入客均单价',
icon: 'none',
duration: 2000
})
return
}
this.setData({
[`checkList[${index}].rate`]: rate / 100,
[`checkList[${index}].averagePrice`]: averagePrice,
visible: false
})
console.log(this.data)
const checkList = this.getCalculate(this.data.checkList)
const countData = this.getCalculate(this.data.checkList, true)
console.log(checkList, countData)
this.setData({
checkList,
countData
})
},
// 输入框输入
handleInput(e) {
console.log(e)
let value = e.detail.value
const name = e.target.dataset.name
const reg = /^[1-9]\d*$/
const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
console.log(value <100 && value > 0, (reg.test(value) || reg1.test(value)))
if (name == 'rate') {
if (value <= 0) {
value = null
} else if (value > 100) {
value = value.slice(0,2)
} else if (value > 0 && value < 100) {
const valueArr = value.split('.')
if (valueArr.length == 2) {
const decimal = value.split('.')[1].slice(0,2)
const integer = value.split('.')[0]
value = integer + '.' + decimal
}
} else {
console.log(value)
value = value.slice(0, value.length - 1)
}
} else {
value = this.validateNumber(value)
}
console.log(value)
const form = `dialogData.${name}`
this.setData({
[form]: value
})
// this.setData({
// 'dialogData.rate': value
// })
},
// 输入正整数校验
validateNumber(val) {
console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(res => {
console.log(res)
const list = Util.deepClone(res)
this.setData({
formData: list
})
const checkList = this.getCalculate(list.checkArray)
const countData = this.getCalculate(list.checkArray, true)
console.log(checkList)
this.setData({
checkList,
countData,
})
console.log(countData)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
measureList: measureData.measureList
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "测算结果"
}
\ No newline at end of file
<!--pages/measureResult/measureResult.wxml-->
<view class="wrapper">
<image class="header-bg {{formData.storeNumber > 1 ? '':'banner1'}}" webp src="{{IMGURL}}measure/{{formData.storeNumber > 1 ? 'banner2':'banner1'}}.png?v={{img_version}}"></image>
<view class="wrapper-header">
<view class="store-number">门店数量:{{formData.storeNumber}}</view>
<view class="header-box">
<view class="card-item">
<view class="card-label m-b-8">增量产值/年</view>
<view class="card-value">{{filter.formatValue(countData.valueAddCount)}}</view>
</view>
<view class="card-item">
<view class="card-label m-b-8">4S店收入/年</view>
<view class="card-value">{{filter.formatValue(countData.storeIncomeCount)}}</view>
</view>
<view class="card-item">
<view class="card-label m-b-8">服务商收入/年</view>
<view class="card-value">{{filter.formatValue(countData.serviceIncomeCount)}}</view>
</view>
<view class="m-b-24" wx:if="{{formData.storeNumber > 1}}">
<view class="card-item ">
<view class="card-label m-b-8 gray">单店均值</view>
<view class="card-value card-single-value">{{filter.formatValue(countData.singleValueAddCount)}}</view>
</view>
<view class="card-item">
<view class="card-label m-b-8 gray">单店均值</view>
<view class="card-value card-single-value">{{filter.formatValue(countData.singleStoreIncomeCount)}}</view>
</view>
<view class="card-item">
<view class="card-label m-b-8 gray">单店均值</view>
<view class="card-value card-single-value">{{filter.formatValue(countData.singleServiceIncomeCount)}}</view>
</view>
</view>
</view>
</view>
<block wx:if="{{formData.storeNumber == 1}}">
<view class="card-box" wx:for="{{checkList}}" wx:for-item="m" wx:key="i" wx:for-index="i">
<view class="card-title">
<view class="card-left">
{{m.parentName}}
<view class="card-product"> {{m.tips}} {{m.name}}</view>
</view>
<view class="card-edit" data-item="{{m}}" data-index="{{i}}" bindtap="toEdit">
<image class="icon-edit" webp src="{{IMGURL}}measure/icon-edit.png?v={{img_version}}"></image>
编辑
</view>
</view>
<view class="card-content">
<view class="card-item">
<view class="card-label gray m-b-4">基盘客户数</view>
<view class="card-value gray value-number">{{filter.formatValue(m.baseCustomersNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">转化率</view>
<view class="card-value color value-number">{{filter.decimalFormat(m.rate)}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">客单均价</view>
<view class="card-value color value-number">{{m.averagePrice}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">增量产值/年</view>
<view class="card-value normal value-number">{{filter.formatValue(m.valueAddNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">流量成本</view>
<view class="card-value normal value-number">{{m.flowCost * 100}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">4S店收入/年</view>
<view class="card-value normal value-number">{{filter.formatValue(m.storeIncomeNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">服务商分润比例</view>
<view class="card-value normal">{{m.serviceDividendRatio * 100}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-4">服务商收入/年</view>
<view class="card-value normal">{{filter.formatValue(m.serviceIncomeNumber)}}</view>
</view>
</view>
</view>
</block>
<block wx:else>
<view class="card-box" wx:for="{{checkList}}" wx:for-item="n" wx:key="j" wx:for-index="j">
<view class="card-title">
<view class="card-left">
{{n.parentName}}
<view class="card-product"> {{n.tips}} {{n.name}}</view>
</view>
<view class="card-edit" data-item="{{n}}" data-index="{{j}}" bindtap="toEdit">
<image class="icon-edit" webp src="{{IMGURL}}measure/icon-edit.png?v={{img_version}}"></image>
编辑
</view>
</view>
<view class="card-content">
<view class="card-item">
<view class="card-label gray m-b-8">基盘客户数</view>
<view class="card-value gray value-number">{{filter.formatValue(n.baseCustomersNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">转化率</view>
<view class="card-value color value-number">{{filter.decimalFormat(n.rate)}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">客单均价</view>
<view class="card-value color value-number">{{n.averagePrice}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">增量产值/年</view>
<view class="card-value normal value-number">{{filter.formatValue(n.valueAddNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">单店产值/年</view>
<view class="card-value normal value-number">{{filter.formatValue(n.singleValueAddNumber)}}</view>
</view>
<view>
<view class="card-item">
<view class="card-label gray m-b-8">流量成本</view>
<view class="card-value normal value-number">{{n.flowCost * 100}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">4S店收入/年</view>
<view class="card-value normal">{{filter.formatValue(n.storeIncomeNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">单店收入/年</view>
<view class="card-value normal">{{filter.formatValue(n.singleStoreIncomeNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">服务商分润比例</view>
<view class="card-value normal value-number">{{n.serviceDividendRatio * 100}}%</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">服务商收入/年</view>
<view class="card-value normal">{{filter.formatValue(n.serviceIncomeNumber)}}</view>
</view>
<view class="card-item">
<view class="card-label gray m-b-8">单店服务商收入/年</view>
<view class="card-value normal">{{filter.formatValue(n.singleServiceIncomeNumber)}}</view>
</view>
</view>
</view>
</view>
</block>
</view>
<!-- 测算弹窗 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
<view class="dialog-box">
<form bindsubmit="submit">
<view class="dialog-header">
<view hidden="{{isReset}}" class="header-btn btn-gray" bindtap="showCalculate">取消</view>
<view hidden="{{!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>
<view class="input-box">
<input class="form-input" bindfocus="focus" bindinput="handleInput" maxlength="8" data-name="rate" value="{{dialogData.rate}}" type="number" />
<view class="form-unit">%</view>
</view>
</view>
<view class="form-item">
<view class="form-label">客均单价</view>
<view class="input-box">
<input class="form-input" bindfocus="focus" maxlength="6" data-name="averagePrice" bindinput="handleInput" type="number" value="{{dialogData.averagePrice}}" />
<view class="form-unit">元</view>
</view>
</view>
</view>
</view>
</form>
</view>
</view>
<wxs module="filter">
function formatValue(value) {
var val = value
if (typeof value == 'number') {
val = value.toString()
}
if (val.length > 8 ) {
return (val / 100000000).toFixed(0) + '亿'
} else if (val.length > 7) {
return (val / 10000).toFixed(0) + '万'
} else {
return val
}
// console.log(value, typeof value, value.toString().length, value.toString().length >= 8 ? (value / 10000).toFixed(0) + '万' : value)
// return value.toString().length >= 8 ? (value / 10000).toFixed(0) + '万' : value
}
function decimalFormat(value) {
return (value * 100).toFixed(2)
}
module.exports.formatValue = formatValue
module.exports.decimalFormat = decimalFormat
</wxs>
\ No newline at end of file
/* pages/measureResult/measureResult.wxss */
.wrapper {
padding-bottom: 90rpx;
}
.header-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
.banner1 {
height: 400rpx;
}
.wrapper-header {
padding: 48rpx 32rpx;
}
.store-number {
position: relative;
font-weight: 600;
font-size: 34rpx;
color: #2D2D2E;
}
.store-number::after {
content: '';
display: inline-block;
position: absolute;
left: 0;
bottom: -24rpx;
width: 48rpx;
height: 6rpx;
background-color: #F5A623;
}
.header-box {
margin-top: 62rpx;
}
.card-item {
display: inline-block;
width: calc(100%/3);
}
.card-label {
font-weight: 400;
font-size: 24rpx;
color: #2D2D33;
line-height: 36rpx;
}
.card-value {
font-weight: 700;
font-size: 40rpx;
color: #FFA034;
line-height: 48rpx;
}
.m-b-8 {
margin-bottom: 8rpx;
}
.m-b-4 {
margin-bottom: 4rpx;
}
.m-b-24 {
margin-top: 24rpx;
}
.card-box {
background: #FFFFFF;
box-shadow: 0 4rpx 24rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
margin: 0 24rpx 20rpx;
}
.card-title {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
line-height: 48rpx;
padding: 24rpx 32rpx;
border-bottom: 1rpx solid #F0F1F5;
}
.card-product {
display: inline-block;
font-weight: 400;
font-size: 28rpx;
color: #333333;
margin-left: 15rpx;
}
.card-edit {
display: flex;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #5850FF;
}
.icon-edit {
width: 28rpx;
height: 28rpx;
}
.card-content {
padding: 23rpx 32rpx 32rpx;
}
.value-number {
margin-bottom: 32rpx;
}
.card-label.gray {
color: #6E6E7A;
font-weight: 400;
}
.card-value.gray {
font-size: 32rpx;
color: #6E6E7A;
font-weight: 400;
}
.card-value.card-single-value {
font-size: 32rpx;
color: #1B233D;
font-weight: 400;
}
.card-value.color {
color: #5850FF;
font-weight: 400;
font-size: 32rpx;
}
.card-value.normal {
color: #2D2D33;
font-weight: 400;
font-size: 32rpx;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45,45,51,0.50);
}
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
height: 540rpx;
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: #5850FF;
}
.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; */
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: 100%;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
}
.input-box {
position: relative;
/* margin-left: 64rpx; */
margin-right: 16rpx;
width: 446rpx;
}
.form-unit {
position: absolute;
right: -10rpx;
top: 50%;
transform: translateY(-50%);
font-size: 28rpx;
color: #9E9EA8;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #5850FF;
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
// pages/newEnergy/newEnergy.js
// import {
// trackData
// } from "../../utils/data";
import {
entmicroApi
} from "../../api/api"
import Util from "../../utils/util";
Page({
/**
* 页面的初始数据
*/
data: {
applyShow: false,
hasPhoneNumber: false
},
toSuccess() {
wx.$router.go("applySuccess");
},
// 展开申请
toApply() {
this.setData({
applyShow: !this.data.applyShow
})
this.selectComponent('#applyForm').setPhone(Util.getUserInfo().phone)
this.goBottom()
},
// 授权手机号
updatePhoneNumber(e) {
console.log(e);
if (e.detail) {
this.setData({
applyShow: !this.data.applyShow,
});
this.selectComponent('#applyForm').setPhone(e.detail)
}
},
// 提交申请
submitApply() {
wx.$util.showLoading('提交中...')
let validFlag = this.selectComponent('#applyForm').validateForm()
if (!validFlag[0]) return
let params = JSON.parse(JSON.stringify(validFlag[0]))
let applyType = validFlag[1]
// 区分代理商和门店
params.merchantName = applyType == 0 ? params.merchantName + '(新能源-门店)' : params.merchantName + '(新能源-代理商)'
params.cardId = wx.$util.getStorageSync("scene").cardId
params.merchant = wx.$util.getStorageSync("scene").merchant || wx.$util.getStorageSync("scene").merchantId
params.openId = wx.$util.getStorageSync('aicard_info').openId
params.unionId = wx.$util.getStorageSync('aicard_info').unionId
console.log(params);
entmicroApi.activityApply(params).then(({
data,
code,
message
}) => {
if (code == 0) {
wx.hideLoading()
wx.showToast({
msg: '提交成功'
})
wx.$router.go("applySuccess");
} else {
wx.hideLoading()
wx.showToast({
title: message,
icon: 'none',
})
}
})
},
getPhone() {
console.log(Util.getUserInfo())
if (Util.getUserInfo() && Util.getUserInfo().phone) {
this.setData({
hasPhoneNumber: true
});
}
},
// 跳到页面底部
goBottom() {
console.log(111);
wx.createSelectorQuery().select('#wrapperBox').boundingClientRect(function(rect){
console.log('rectheight',rect.height);
/* 将页面移动到最底部(用xxx的height定位) */
wx.pageScrollTo({
scrollTop: rect.height
})
}).exec()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getPhone()
wx.hideShareMenu({
menus: ['shareAppMessage', 'shareTimeline']
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
// const options = wx.getEnterOptionsSync()
// if (options.query.cardId) {
// wx.$trackData = options.query
// }
// getApp()
// .login()
// .then(({
// data
// }) => {
// if (!wx.$trackData.detailShare) {
// wx.$Track.sendTrack(trackData.NEWENERGY);
// }
// });
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
\ No newline at end of file
{
"usingComponents": {
"apply-content": "../../components/CooperationApply/CooperationApply",
"phone-number": "../../components/PhoneNumber/PhoneNumber"
},
"navigationBarTitleText": "数字化+新能源汽车"
}
\ No newline at end of file
<!-- pages/newEnergy/newEnergy.wxml -->
<view id="wrapperBox" class="wrapper-bg">
<image class="newenergy-img newenergy-img1" mode="widthFix" webp src="{{IMGURL}}home/newenergy1.png?v={{img_version}}"></image>
<image class="newenergy-img newenergy-img2" mode="widthFix" webp src="{{IMGURL}}home/newenergy2.png?v={{img_version}}"></image>
<image class="newenergy-img newenergy-img3" mode="widthFix" webp src="{{IMGURL}}home/newenergy3.png?v={{img_version}}"></image>
<!-- 申请表单 -->
<view class="apply-box" wx:if="{{applyShow}}">
<image class="apply-bg" mode="widthFix" webp src="{{IMGURL}}home/apply_bg.png?v={{img_version}}"></image>
<view>
<apply-content id="applyForm" class="apply-content"></apply-content>
<button class="btn-apply submit-btn" bindtap="submitApply">提交申请</button>
</view>
</view>
</view>
<view class="btn-box" wx:if="{{!applyShow}}">
<phone-number wx:if="{{!hasPhoneNumber}}" bind:updatePhoneNumber="updatePhoneNumber" showIcon="{{false}}" phoneText="合作申请"></phone-number>
<button wx:else class="btn-apply" bindtap="toApply">合作申请</button>
</view>
\ No newline at end of file
/* pages/newEnergy/newEnergy.wxss */
.wrapper-bg {
background-color: #505CFF;
padding-bottom: 110rpx;
}
.newenergy-img {
width: 100%;
margin-top: 24rpx;
}
.newenergy-img1 {
height: 816rpx;
}
.newenergy-img2 {
height: 1696rpx;
}
.newenergy-img3 {
height: 1092rpx;
}
.btn-box {
position: fixed;
bottom: 0;
width: 100%;
height: 120rpx;
background: #FFFFFF;
box-shadow: 0 -4rpx 8rpx 0 rgba(196,199,204,0.20);
}
.btn-apply {
align-items: center;
height: 72rpx;
line-height: 72rpx;
font-size: 28rpx;
color: #FFFFFF;
background: #5850FF;
background-image: linear-gradient(180deg, #4791FF 0%, #5850FF 100%, #643DFF 100%);
border-radius: 8rpx;
margin: 15rpx 48rpx;
}
.apply-box {
position: relative;
}
.apply-bg {
width: 100%;
height: 844rpx;
}
.apply-content {
position: absolute;
top: 112rpx;
left: 27rpx;
width: 700rpx;
}
.submit-btn {
position: absolute;
bottom: 48rpx;
width: 654rpx;
}
\ No newline at end of file
// pages/productDetail/ambientLighting/ambientLighting.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -14,7 +14,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.LIGHT.pageName,
path: 'pages/productDetail/ambientLighting/ambientLighting?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.LIGHT.pageName
}
this.shareTrack('LIGHT', 'ambientLighting')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.LIGHT.pageName,
// path: 'pages/productDetail/ambientLighting/ambientLighting?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.LIGHT.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/arNavigation/arNavigation.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.ARNAVIGATION.pageName,
path: 'pages/productDetail/arNavigation/arNavigation?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.ARNAVIGATION.pageName
}
this.shareTrack('ARNAVIGATION', 'arNavigation')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.ARNAVIGATION.pageName,
// path: 'pages/productDetail/arNavigation/arNavigation?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.ARNAVIGATION.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/carBeauty/carBeauty.js
import { trackData } from "../../../utils/data";
import util from "../../../utils/util";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -58,11 +59,13 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.CARBEAUTY.pageName,
path:
"pages/productDetail/carBeauty/carBeauty?cardId=" +
util.getStorageSync("scene").cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.CARBEAUTY.pageName
};
this.shareTrack('CARBEAUTY', 'carBeauty')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.CARBEAUTY.pageName,
// path:
// "pages/productDetail/carBeauty/carBeauty?cardId=" +
// util.getStorageSync("scene").cardId+"&merchant="+merchant+'&detailShare=' +trackData.CARBEAUTY.pageName
// };
},
});
// pages/productDetail/changingFilm/changingFilm.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.CHANGEFILM.pageName,
path: 'pages/productDetail/changingFilm/changingFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.CHANGEFILM.pageName
}
this.shareTrack('CHANGEFILM', 'changingFilm')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.CHANGEFILM.pageName,
// path: 'pages/productDetail/changingFilm/changingFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.CHANGEFILM.pageName
// }
}
})
\ No newline at end of file
......@@ -2,9 +2,9 @@
import {
trackData
} from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -29,6 +29,7 @@ Page({
*/
onShow() {
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
......@@ -75,9 +76,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.EQUITYCARD.pageName,
path: 'pages/productDetail/equity/equity?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.EQUITYCARD.pageName
}
this.shareTrack('EQUITYCARD', 'equity')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.EQUITYCARD.pageName,
// path: 'pages/productDetail/equity/equity?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.EQUITYCARD.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/lossPhase/lossPhase.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.LOSSPGASE.pageName,
path: 'pages/productDetail/lossPhase/lossPhase?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.LOSSPGASE.pageName
}
this.shareTrack('LOSSPGASE', 'lossPhase')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.LOSSPGASE.pageName,
// path: 'pages/productDetail/lossPhase/lossPhase?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.LOSSPGASE.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/navigationArround/navigationArround.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.NAVIGATIONARROUND.pageName,
path: 'pages/productDetail/navigationArround/navigationArround?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.NAVIGATIONARROUND.pageName
}
this.shareTrack('NAVIGATIONARROUND', 'navigationArround')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.NAVIGATIONARROUND.pageName,
// path: 'pages/productDetail/navigationArround/navigationArround?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.NAVIGATIONARROUND.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/paintProtect/paintProtect.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.PAINTPROTECT.pageName,
path: 'pages/productDetail/paintProtect/paintProtect?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.PAINTPROTECT.pageName
}
this.shareTrack('PAINTPROTECT', 'paintProtect')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.PAINTPROTECT.pageName,
// path: 'pages/productDetail/paintProtect/paintProtect?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.PAINTPROTECT.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/seatVentilate/seatVentilate.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -73,9 +73,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
return {
title: trackData.SEATVENTILATE.pageName,
path: 'pages/productDetail/seatVentilate/seatVentilate?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.SEATVENTILATE.pageName
}
this.shareTrack('SEATVENTILATE', 'seatVentilate')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.SEATVENTILATE.pageName,
// path: 'pages/productDetail/seatVentilate/seatVentilate?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.SEATVENTILATE.pageName
// }
}
})
\ No newline at end of file
// pages/productDetail/solarFilm/solarFilm.js
import { trackData } from "../../../utils/data";
import util from '../../../utils/util'
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
......@@ -75,10 +75,11 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage() {
console.log(util.getStorageSync('scene'))
return {
title: trackData.SOLARFILM.pageName,
path: 'pages/productDetail/solarFilm/solarFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+util.getStorageSync("scene").merchantId+'&detailShare=' +trackData.SOLARFILM.pageName
}
this.shareTrack('SOLARFILM', 'solarFilm')
// let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
// return {
// title: trackData.SOLARFILM.pageName,
// path: 'pages/productDetail/solarFilm/solarFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.SOLARFILM.pageName
// }
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {
"tab": "../../../../components/Tab/Tab"
}
}
\ No newline at end of file
// 特色产品
.prod-wrap {
background-color: #f8fafb;
border-radius: 20rpx 20rpx 0 0;
}
.prod-wrap .big-title {
margin-left: 32rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #323436;
padding-top: 32rpx;
}
.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 {
// 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;
}
// .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 {
width: 100%;
height: 590rpx;
// border: 1rpx dashed #AFB0B2;
}
.video-item .download {
position: absolute;
top: 0;
right: 2px;
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
<!-- pages/tab/discovery/components/product/product.wxml -->
<view class="prod-wrap" >
<view class="big-title">特色产品</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" /> -->
<image src="{{IMGURL}}prod/{{senceData[actNum].productList[activeNavIdx].img}}.png" />
</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">¥{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view>
<view class="share-btn" wx:if="{{!isShare && origin =='home' && actNum!=4}}" bindtap="onShareFn">
<image class="icon" src="{{IMGURL}}share.png" />
<text>分享</text>
</view>
</view>
</view>
</view>
<view class="project-wrap">
<!-- stickyTop+88 -->
<view class="stickyTab" style="top:{{isShare ? stickyTop : stickyTop}}rpx">
<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 class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<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 && actNum != 2 && index == 4}}"
class="more-btn"
data-index="{{index}}"
bindgetphonenumber="getUserInfo"
open-type="getPhoneNumber"
>
点击查看更多详情
</button> -->
</view>
<!-- wx:if="{{index == 5 && outshowVideo}}" -->
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}" wx:if="{{index == 5}}">
<!-- wx:if="{{index!=5}}" -->
<image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene{{actNum+1}}{{index+1}}.png" />
<!-- wx:if="{{!isShare && index==5 && senceData[actNum].videoList.length}}" -->
<view class="video-bg">
<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}}" />
<view class="video-text">{{item.name}}</view>
</view>
</block>
</view>
</view>
</view>
</block>
</view>
<!-- </scroll-view> -->
</view>
// 1.视频默认进来是true,显示,
// 2.扫码,分享链接进来,不显示
// 3.点击更多详情,隐藏更多按钮,显示视频
// 4.视频的位置最后一个 下标5
// var showVideo = function(index){
// if(index == 5){
// a
// }
// };
// module.exports = {
// showVideo:showVideo
// }
// import { IMG_URL } from "~/utils/constantData.js";
let IMG_URL = wx.$imgUrl
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-12个月',
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: '12个月以上',
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
{
"usingComponents": {
"product": "./components/product/product"
},
"navigationStyle": "custom",
"onReachBottomDistance":50
}
<page-meta page-style="overflow: {{hasPhoneNumber ? 'visible' : 'hidden'}}" />
<navigation-bar showBack="{{true}}" bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
D+增值转化
</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 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">
<!-- 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="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
<product isShow="{{false}}" stickyTop="{{headerHeight}}" actNum="{{actNum}}" senceData="{{senceData}}" origin="home" bindsharehandle="sharehandle" wrapactiveNavIdx="{{wrapactiveNavIdx}}" />
</view>
</view>
<!-- 收藏、取消提示框 -->
<!-- <vas-toast isShow="{{true}}" 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"
/>
</view> -->
<!-- 在线客服 -->
<!-- <image class="chat" src="{{IMG_URL}}index/contact.png" bindtap="goConsult" /> -->
<!-- 预估产值 -->
<image 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" 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" value="{{formData.flow}}" />
<!-- <view class="form-unit">人</view> -->
</view>
<button class="dialog-btn" form-type="submit">提交测算</button>
</view>
</view>
</form>
</view>
</view>
<block wx:if="{{!hasPhoneNumber}}">
<phone-number isHidden="{{true}}" bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</block>
\ No newline at end of file
No preview for this file type
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!