Commit 86764238 by 胡悦

增删页面

1 parent f9877dbe
Showing 179 changed files with 186 additions and 13561 deletions
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-09 13:58:15
* @LastEditors: huyue
* @LastEditTime: 2022-12-09 15:17:35
*/
import api from './request'
import ssoApi from './ssoApi'
import wechatApi from './wechatApi'
import entmicroApi from './entmicroApi'
const common = 'scrm.api.carlife.common.'
module.exports = {
ssoApi,
entmicroApi,
wechatApi,
commonApi: {
/**上传图片
*/
uploadImg(data) {
return api.post({
method: `${common}uploadImg`,
...data,
noSignAttr: ['file']
})
},
/**视频上传
*/
uploadVideo(data) {
return api.post({
method: `${common}uploadVideo`,
...data,
noSignAttr: ['file']
})
},
// /**根据sceneId 查参数 */
// getSceneById(data) {
// return api.post('dj.api.smartcarlife.common.getSceneById', data)
// },
/** 首页、发现列表 搜索接口 */
search(data) {
return api.post({
method: 'scrm.api.carlife.weapp.homeSearch.search',
pageSize: 10,
...data
})
},
/** 根据sap编码获取商户详情 */
getBySapCode(data) {
return api.post({
method: `scrm.api.carlife.merchant.getBySapCode`,
...data,
}, true)
},
/**获取图片版本号 */
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
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-09 13:58:15
* @LastEditors: huyue
* @LastEditTime: 2022-12-09 13:59:57
*/
const target = ["ip", "dev", "uat", "beta", "prod"];
/**
*
......@@ -7,7 +14,7 @@ const target = ["ip", "dev", "uat", "beta", "prod"];
3预发布
4生产
*/
const index = 4;
const index = 2;
const secretKey = {
ip: {},
dev: {
......
{
"pages": [
"pages/tab/index/index",
"pages/applicationAccount/applicationAccount",
"pages/applicationPartener/applicationPartener",
"pages/applySuccess/applySuccess",
"pages/tab/introduction/introduction",
"pages/addTransform/addTransform/addTransform",
"pages/addTransform/addTransformDetail/addTransformDetail",
"pages/addValue/addValue/addValue",
"pages/productDetail/ambientLighting/ambientLighting",
"pages/productDetail/arNavigation/arNavigation",
"pages/productDetail/carBeauty/carBeauty",
"pages/productDetail/changingFilm/changingFilm",
"pages/productDetail/equity/equity",
"pages/productDetail/lossPhase/lossPhase",
"pages/productDetail/navigationArround/navigationArround",
"pages/productDetail/paintProtect/paintProtect",
"pages/productDetail/seatVentilate/seatVentilate",
"pages/productDetail/solarFilm/solarFilm",
"pages/activityApplication/activityApplication",
"pages/newEnergy/newEnergy",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"pages/scene/scene",
"pages/checkProduct/checkProduct"
"pages/tab/index/index"
],
"window": {
"backgroundTextStyle": "light",
......@@ -32,10 +9,19 @@
"navigationBarTextStyle": "black",
"initialRenderingCache": "static"
},
"subpackages": [
{
"root": "packagesList",
"name": "packagesList",
"pages": [
"pages/index/index",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult"
]
}
],
"usingComponents": {
"authorize": "components/Authorize/Authorize",
"phone-number": "components/PhoneNumber/PhoneNumber",
"tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar"
},
"resolveAlias": {
......
// components/Authorize/Authorize.js
import {
componentsMixin
} from '../../mixins/index'
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
scopeType: String,
/**是否自动打开 */
autoOpen: Boolean,
show: Boolean,
title: {
type: String,
value: '是否打开授权设置?'
},
confirmText: {
type: String,
value: '确定'
},
cancelText: {
type: String,
value: '取消'
},
buttonType: String,
confirmColor: String,
cancelColor: String,
isShowCheck: {
type: Boolean,
value: true
},
init: {
type: Boolean,
observer(n) {
if (n) this.check()
}
}
},
observers: {
'show': function (newVal) {
this.setData({
openSet: newVal
})
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
/**
* 禁止滑动
*/
noScroll: wx.$util.noScroll(),
cancel(e) {
let {
confirm
} = e.currentTarget.dataset
let {
buttonType,
title
} = this.data
let _this = this
if (buttonType == 'getUserInfo' && confirm) {
wx.getUserProfile({
desc: title,
success(res) {
_this.triggerEvent('success', {
message: '授权成功',
data: res
})
}
})
}
this.setData({
openSet: false
})
this.triggerEvent('cancel')
},
/**检验是否已授权位置 */
check() {
const _this = this
let {
buttonType,
scopeType,
autoOpen
} = this.properties
if (buttonType != 'getPhoneNumber') {
let type = `scope.${scopeType}`
buttonType = 'openSetting'
if (type === 'scope.userInfo') buttonType = 'getUserInfo'
this.setData({
buttonType
})
wx.getSetting({
success(res) {
if (!res.authSetting[type]) {
wx.authorize({
scope: type,
success() {
_this.triggerEvent('success', {
message: '授权成功'
})
},
fail() {
_this.triggerEvent('fail', {
message: '未授权'
})
if (autoOpen) {
_this.setData({
openSet: true
})
}
}
})
} else {
_this.triggerEvent('success', {
message: '已授权'
})
}
}
})
}
},
/**授权手机号 */
getPhoneNumber({
detail
}) {
this.triggerEvent('getphonenumber', detail)
}
},
pageLifetimes: {
show: function () {
if (this.data.isShowCheck || this.data.init) this.check()
},
hide: function () {}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="open-seting-bg text-center" wx:if="{{openSet}}" catchtap="cancel" catchtouchmove="noScroll">
<view class="open-set-inner">
<view class="set-title"><text>{{title}}</text></view>
<view class="btn-openset">
<view catchtap="cancel" class="btn text-center" style="color:{{cancelColor}};">{{cancelText}}</view>
<view class="btn text-center" style="color:{{confirmColor}};">
{{confirmText}}
<block wx:if="{{buttonType == 'getPhoneNumber'}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="button-style"></button>
</block>
<block wx:else>
<button open-type="{{buttonType}}" class="button-style" catchtap="cancel" data-confirm></button>
</block>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* components/Authorize/Authorize.wxss */
.open-seting-bg {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 998;
}
.text-center {
display: flex;
align-items: center;
justify-content: center;
}
.open-set-inner {
width: 564rpx;
height: 400rpx;
background: #FFFFFF;
border-radius: 16px;
}
@keyframes show-auth-box {
0% {
opacity: 0;
transform: scale(2);
}
100% {
opacity: 1;
transform: scale(1);
}
}
.set-title {
font-size: 36rpx;
min-height: 286rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
flex-direction: column;
}
.btn-openset {
display: flex;
font-size: 36rpx;
height: 112rpx;
border-top: 2rpx solid #E5E5E5;
font-weight: 500;
letter-spacing: 1rpx;
}
.btn {
flex: 1;
height: 100%;
position: relative;
}
.button-style {
position: absolute;
width: 100% !important;
height: 100%;
box-sizing: border-box;
opacity: 0;
top: 0;
left: 0;
}
\ No newline at end of file
// components/Calendar/Calendar.js
import Calendar from './Calendar_Function'
import _component_ from './Static_Properties'
const CalendarFunction = Symbol('CalendarFunction')
Component({
/**
* 组件的属性列表
*/
properties: _component_.properties,
/**
* 组件的初始数据
*/
data: _component_.data,
/**
* 组件的方法列表
*/
methods: {
noScroll() {},
setCalenderBodyHeight() {
this[CalendarFunction].setCalenderBodyHeight()
},
showCalendar(e) {
let type = e && e.currentTarget && e.currentTarget.dataset.type || ''
let result = type === 'show'
if (!result) {
this.setData({
hideCalendar: true
})
setTimeout(() => {
this.setData({
show: result,
hideCalendar: false
})
}, 300)
} else {
this.setData({
show: result
})
if (!this.data.calenderBodyHeight) this[CalendarFunction].setCalenderBodyHeight()
}
},
dateChange(e) {
let {
current
} = e.detail
this.setData({
current
})
},
choose(e) {
let {
dateType,
minDate,
maxDate
} = this.data
let {
data
} = e.currentTarget.dataset
if ((minDate && Date.parse(minDate) > Date.parse(data)) || (maxDate && Date.parse(maxDate) < Date.parse(data))) return
this[CalendarFunction][dateType](e)
},
done() {
let {
dateType
} = this.data
this[CalendarFunction].done(dateType)
},
changeDate(e) {
let { value } = e.detail
this.setData({
current: value
})
},
showShortcutPicker() {
this.setData({
showShortcut: !this.data.showShortcut
})
},
chooseAll() {
this[CalendarFunction].chooseAll()
}
},
attached() {
this[CalendarFunction] = new Calendar(this)
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='calender-picker' bindtap="showCalendar" data-type='show'>
<slot></slot>
</view>
<!-- 弹框模式 -->
<view class='calender-box' hidden='{{!show}}' catchtouchmove="noScroll">
<view class='calender-bg' bindtap="showCalendar"></view>
<view class='calender-view {{hasRadius}} {{hideCalendar?"hideCalendar":""}} {{isFullSucreen&&!showConfirm?"isFullSucreen":""}}' style="height:{{height}}">
<view class='calender-header'>
<view class='calender-title' wx:if='{{showTitle}}'>
<block wx:if="{{rangeAll && dateType == 'range'}}">
<view class="calender-all" style="color:{{calenderColor}};" bindtap="chooseAll">全选</view>
</block>
{{title||'日期选择'}}
<view class='calender-close' bindtap="showCalendar">
<image src="../images/close.png" webp class='calender-close-image'></image>
</view>
</view>
<block wx:if='{{showSubTitle}}'>
<picker class='calender-subtitle' bindchange="changeDate" bindcancel='showShortcutPicker' value="{{current}}" range="{{dateList}}" wx:if='{{shortcut}}'>
<view class='calender-subtitle-text' bindtap="showShortcutPicker">
{{dateList[current]}}
<view class='arrow {{showShortcut}}'></view>
</view>
</picker>
<view class='calender-subtitle' wx:else>{{dateList[current]}}</view>
</block>
<view class='calendar-weekdays'>
<block wx:for='{{weekdays}}' wx:key='index'>
<view class='calendar-weekday'>{{item}}</view>
</block>
</view>
</view>
<view class='calender-body' style="height:calc(100% - {{calenderBodyHeight}})">
<swiper class='calender-swiper' bindchange='dateChange' current='{{current}}' vertical='{{vertical}}'>
<block wx:for='{{monthList}}' wx:key='index'>
<swiper-item>
<view class='calender-mark box-center' wx:if="{{!hideMark}}">{{item.mark}}</view>
<view class='calender-month'>
<block wx:for='{{item.data}}' wx:for-item='i' wx:for-index='ind' wx:key='ind'>
<view class='calender-day {{ind == 0?i.week:""}} {{i.active?"active":""}} {{i.disable?"disable":""}}' style="background:{{i.active?calenderColor:''}};color:{{i.middle?calenderColor:''}}" bindtap="choose" data-index='{{index}}' data-ind='{{ind}}' data-data='{{i.data}}'>
<view class='calender-middle' style="background:{{calenderColor}};" wx:if='{{i.middle}}'></view>
<view class='box-center text'>
{{i.day}}
<view wx:if='{{dateType==="range"}}' class='calender-tips'>
<view wx:if='{{i.start}}'>{{rangeText.start}}</view>
<view wx:if='{{i.end}}'>{{rangeText.end}}</view>
</view>
</view>
</view>
</block>
</view>
</swiper-item>
</block>
</swiper>
</view>
<view class='calender-footer {{isFullSucreen}}' wx:if='{{showConfirm}}'>
<view class='calender-btn {{dateType === "range" && !rangeDate.end ?"disable":""}} {{dateType === "multiple" && multipleDate.length < 1 ?"disable":""}}' style="background:{{calenderColor}}" bindtap="done">
{{confirmText||'确定'}}
</view>
</view>
</view>
</view>
\ No newline at end of file
/* components/Calendar/Calendar.wxss */
.calender-box {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
z-index: 99;
}
.calender-bg {
position: absolute;
background: rgba(0, 0, 0, .5);
top: 0;
left: 0;
bottom: 0;
right: 0;
}
.calender-view {
position: absolute;
left: 0;
width: 100%;
background: #fff;
animation: show-calender .5s forwards;
color: #333;
}
.calender-view.true {
border-radius: 40rpx 40rpx 0 0;
}
.calender-view.isFullSucreen {
box-sizing: border-box;
padding-bottom: 34px !important;
}
@keyframes show-calender {
from {
bottom: -100%;
}
to {
bottom: 0;
}
}
.calender-view.hideCalendar {
animation: hide-calender .5s forwards;
}
@keyframes hide-calender {
from {
bottom: 0;
}
to {
bottom: -100%;
}
}
.calender-header {
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.10);
}
.calender-title,
.calender-subtitle {
width: 100%;
height: 88rpx;
text-align: center;
position: relative;
font-size: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.calender-all {
position: absolute;
top: 50%;
left: 24rpx;
transform: translateY(-50%);
font-size: 20rpx;
}
.calender-subtitle-text {
display: flex;
align-items: center;
justify-content: center;
}
.calender-subtitle {
font-size: 28rpx;
}
.calender-subtitle .arrow {
width: 14rpx;
height: 14rpx;
border-top: 2rpx solid transparent;
border-right: 2rpx solid #ccc;
border-bottom: 2rpx solid #ccc;
border-left: 2rpx solid transparent;
transform: rotate(45deg) translateY(-4rpx);
margin-left: 16rpx;
transition: all .3s;
}
.calender-subtitle .arrow.true {
transform: rotate(225deg) translateY(0) translateX(-4rpx);
}
.calender-close {
position: absolute;
width: 40rpx;
height: 40rpx;
top: 50%;
right: 24rpx;
transform: translateY(-50%);
display: flex;
align-items: center;
justify-content: center;
}
.calender-close-image {
width: 24rpx;
height: 24rpx;
}
.calendar-weekdays {
display: grid;
grid-template-columns: repeat(7, 1fr);
font-size: 24rpx;
line-height: 60rpx;
}
.calendar-weekday {
text-align: center;
}
.calender-body {
width: 100%;
padding: 20rpx 0;
box-sizing: border-box;
}
.calender-swiper {
height: 100%;
}
.calender-mark {
color: rgba(0, 0, 0, .1);
text-shadow: 0 4rpx 20rpx rgba(0, 0, 0, .1);
font-size: 320rpx;
width: 100%;
text-align: center;
}
.box-center {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.calender-month {
height: 100%;
position: relative;
z-index: 1;
display: grid;
grid-template-rows: repeat(minmax(5, 6), 1fr);
grid-template-columns: repeat(7, 1fr);
}
.calender-day {
position: relative;
font-size: 32rpx;
display: flex;
}
.calender-day.active {
color: #fff;
border-radius: 8rpx;
}
.calender-day.disable {
opacity: .25;
}
.calender-day .calender-middle {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
opacity: 0.1;
}
.calender-day .text {
text-align: center;
width: 100%;
}
.calender-tips {
font-size: 14rpx;
}
.week-1 {
grid-column-start: 2;
}
.week-2 {
grid-column-start: 3;
}
.week-3 {
grid-column-start: 4;
}
.week-4 {
grid-column-start: 5;
}
.week-5 {
grid-column-start: 6;
}
.week-6 {
grid-column-start: 7;
}
.calender-footer {
position: absolute;
width: 100%;
left: 0;
bottom: 0;
padding: 14rpx 32rpx;
box-sizing: border-box;
}
.calender-footer.true {
padding-bottom: 34px !important;
}
.calender-footer .calender-btn {
width: 100%;
height: 72rpx;
font-size: 28rpx;
color: #fff;
border-radius: 999rpx;
display: flex;
justify-content: center;
align-items: center;
}
.calender-footer .calender-btn.disable {
opacity: .3;
}
\ No newline at end of file
const _CalendarObject_ = Symbol('_CalendarObject_')
const _nowDate_ = Symbol('_nowDate_')
const _separator_ = Symbol('_separator_')
class Calendar {
[_CalendarObject_] = {};
[_nowDate_] = new Date();
[_separator_] = '-';
constructor(calendarObject) {
this[_CalendarObject_] = calendarObject
this[_separator_] = calendarObject.data.separator
this.setCalenderHeight()
this.setMonthList()
let {
weekdays,
firstDayOfWeek
} = calendarObject.data
let firstDay = weekdays[firstDayOfWeek - 1]
let [last, first] = weekdays.join('').split(firstDay)
calendarObject.setData({
weekdays: [firstDay, ...first, ...last]
})
}
/**设置日历高度 */
setCalenderHeight() {
let _this = this[_CalendarObject_]
let {
data: calenderHeight
} = _this
let height = '80%'
if (typeof calenderHeight === 'number') {
wx.$util.getPhoneInfo(res => {
let {
windowHeight
} = res
if (calenderHeight > windowHeight) calenderHeight = windowHeight
if (calenderHeight < windowHeight * 0.5) calenderHeight = windowHeight * 0.5
height = `${calenderHeight}px`
})
}
if (typeof calenderHeight === 'string') {
if (calenderHeight.includes('%')) {
height = calenderHeight
let [num] = calenderHeight.split('%')
if (num < 50) height = '50%'
if (num > 100) height = '80%'
} else {
if (calenderHeight < 50) calenderHeight = '50'
if (calenderHeight > 100) calenderHeight = '80'
height = `${calenderHeight}%`
}
}
_this.setData({
isFullSucreen: wx.$util.isFullSucreen(),
height
})
}
/**设置日期高度 */
setCalenderBodyHeight() {
let _this = this[_CalendarObject_]
wx.$util.getViewInfo('.calender-header', header => {
wx.$util.getViewInfo('.calender-footer', footer => {
let headerHeight = header.height
let footerHeight = footer && footer.height || 0
_this.setData({
calenderBodyHeight: `${headerHeight + footerHeight}px`
})
}, _this)
}, _this)
}
/**设置日期列表 */
setMonthList() {
let {
separator,
previous,
minDate,
maxDate,
next
} = this[_CalendarObject_].data
if (maxDate || minDate) {
if (!minDate) {
let nowMonth = new Date().getMonth()
minDate = new Date(new Date().setMonth(nowMonth - previous)).format(`yyyy${separator}MM${separator}dd`)
}
if (!maxDate) {
maxDate = this[_nowDate_].format(`yyyy${separator}MM${separator}dd`)
}
previous = this.getMonthDifference(minDate, this[_nowDate_].format(`yyyy${separator}MM${separator}dd`))
next = this.getMonthDifference(this[_nowDate_].format(`yyyy${separator}MM${separator}dd`), maxDate)
} else {
previous = previous < 0 ? 0 : previous
next = next < 0 ? 0 : next
}
let nowMonth = this[_nowDate_].getMonth()
let now = new Date().setDate(1)
for (let i = nowMonth - previous; i <= nowMonth + next; i++) {
this.init(new Date(now).setMonth(i))
}
}
/**初始化日期 */
init(date) {
let _this = this[_CalendarObject_]
let {
firstDayOfWeek,
allowSameDay,
multipleDate,
monthList,
rangeDate,
dateList,
dateType,
current,
minDate,
maxDate,
value,
} = _this.data
let separator = this[_separator_]
let [year, month] = new Date(date).format(`yyyy${separator}MM`).split(separator)
let days = this.getDayNumber(year, Number(month))
let week = new Date(year, Number(month) - 1, 1).getDay()
let dateFormat = `yyyy${separator}MM${separator}dd`
let today = value || this[_nowDate_].format(dateFormat)
let nextDay = ''
let arr = []
dateList.push(`${year}${separator}${month}`)
if (dateType === 'range') {
nextDay = new Date(new Date().setDate(new Date(new Date(today)).getDate() + 1)).format(dateFormat)
}
let [now_year, now_month, now_day] = today.split(separator)
let [next_year, next_month, next_day] = allowSameDay ? today.split(separator) : nextDay.split(separator)
for (let i = 1; i <= days; i++) {
let todayStr = `${year}${separator}${month}${separator}${now_day}`
let dayStr = `${year}${separator}${month}${separator}${i < 10 ? `0${i}`:i}`
let obj = {
day: i,
data: dayStr,
active: now_year == year && now_month == month && i == Number(now_day)
}
if ((minDate && Date.parse(minDate) > Date.parse(dayStr)) || (maxDate && Date.parse(maxDate) < Date.parse(dayStr))) obj.disable = true
if (dateType === 'multiple') multipleDate.push(todayStr)
if (nextDay) {
if (now_year == year && now_month == month && i == Number(now_day)) {
obj.start = true
rangeDate.start = todayStr
}
if (next_year == year && next_month == month && i == Number(next_day)) {
obj.active = true
obj.end = true
rangeDate.end = `${year}${separator}${next_month}${separator}${next_day}`
}
}
firstDayOfWeek = firstDayOfWeek == 7 ? 0 : firstDayOfWeek
if (i === 1) obj.week = `week-${week - firstDayOfWeek}`
arr.push(obj)
}
monthList.push({
data: arr,
mark: Number(month)
})
if (current <= 1) {
let [nowYear, nowMonth] = today.split(separator)
current = dateList.findIndex(e => e === `${nowYear}${separator}${nowMonth}`)
}
_this.setData({
multipleDate,
date: today,
rangeDate,
monthList,
dateList,
current
})
}
/**当设置最小日期或者最大日期时 自动设置前后月份 */
getMonthDifference(date1, date2) {
let separator = this[_separator_]
//获取年,月数
let [year1, month1] = date1.split(separator)
let [year2, month2] = date2.split(separator)
let months = (parseInt(year2) - parseInt(year1)) * 12 + (parseInt(month2) - parseInt(month1))
return months
}
/**单选 */
single(e) {
let _this = this[_CalendarObject_]
let {
index,
data,
ind
} = e.currentTarget.dataset
let {
showConfirm,
monthList
} = _this.data
monthList.map(x => {
x.data.map(i => i.active = false)
})
monthList[index].data[ind].active = true
_this.setData({
monthList,
date: data
})
if (!showConfirm) this.done()
}
/**多选 */
multiple(e) {
let _this = this[_CalendarObject_]
let {
index,
ind,
} = e.currentTarget.dataset
let {
monthList
} = _this.data
let arr = []
monthList[index].data[ind].active = !monthList[index].data[ind].active
monthList.map(x => x.data.map(i => {
if (i.active) arr.push(i.data)
}))
_this.setData({
[`monthList[${index}].data`]: monthList[index].data,
multipleDate: arr
})
}
/**范围选择 */
range(e) {
const _this = this[_CalendarObject_]
let {
index,
data,
ind
} = e.currentTarget.dataset
let {
allowSameDay,
showConfirm,
monthList,
rangeDate
} = _this.data
const start = Date.parse(rangeDate.start)
if (rangeDate.end || start > Date.parse(data)) {
monthList = this.clearStatus({
monthList,
index,
ind
})
rangeDate.start = data
rangeDate.end = ''
} else {
if (!allowSameDay && Date.parse(data) == Date.parse(rangeDate.start)) return
monthList[index].data[ind].active = true
monthList[index].data[ind].end = true
rangeDate.end = data
monthList.map(x => {
x.data.map(i => {
let day = Date.parse(i.data)
i.middle = day > start && day < Date.parse(data)
})
})
}
_this.setData({
monthList,
rangeDate
})
if (!showConfirm && rangeDate.end) this.done()
}
/**点击完成 */
done() {
let _this = this[_CalendarObject_]
let {
multipleDate,
rangeDate,
dateType,
date
} = _this.data
let targer = {
'single': date,
'multiple': multipleDate,
'range': rangeDate
}
if ((dateType === 'multiple' && multipleDate.length < 1) || (dateType === 'range' && !rangeDate.end)) return
_this.triggerEvent('select', {
date: targer[dateType]
})
_this.showCalendar()
}
/**清空范围选择状态 */
clearStatus(params) {
let {
monthList,
index,
ind
} = params
monthList.map(x => x.data.map(i => {
i.active = false
i.start = false
i.end = false
i.middle = false
}))
monthList[index].data[ind].active = true
monthList[index].data[ind].start = true
return monthList
}
/**
* 获取月份天数
*/
getDayNumber(year, month) {
let days = 31
switch (month) {
case 2:
days = (year % 4 == 0 && year % 100 !== 0) || year % 400 == 0 ? 29 : 28
break;
case 4:
case 6:
case 9:
case 11:
days = 30
break;
}
return days
}
/**日期范围 点击全选 */
chooseAll() {
let _this = this[_CalendarObject_]
let {
monthList,
minDate,
maxDate
} = _this.data
monthList.map((e, index) => {
e.data.map((i, ind) => {
let obj = {
currentTarget: {
dataset: {
index,
ind,
data: i.data
}
}
}
if (i.data == minDate) this.range(obj)
if(i.data == maxDate) this.range(obj)
})
})
}
}
export default Calendar
\ No newline at end of file
export default {
properties: {
calenderHeight: {
type: [String, Number]
},
title: String, // 标题名称
hasRadius: {
type: Boolean,
value: true
}, // 是否圆角
showTitle: {
type: Boolean,
value: true
}, // 是否显示标题
showSubTitle: {
type: Boolean,
value: true
}, // 是否显示副标题
confirmText: String, // 确定按钮文本
showConfirm: {
type: Boolean,
value: true
}, // 是否显示确定按钮
calenderColor: {
type: String,
value: '#00A479'
}, // 日历主题色
previous: {
type: Number,
value: 3
}, // 当前月的前几个月 ,默认3个月
next: {
type: Number,
value: 3
}, // 当前月的后几个月 , 默认3个月
vertical: Boolean, //是否纵向滑动
/** 选择类型默认单选,single单选, multiple多个日期,range日期范围 */
dateType: {
type: String,
value: 'single'
},
value: String, //单选绑定数据
shortcut: Boolean, //日期快捷切换 默认为false
/** 分隔符,默认为 "-" */
separator: {
type: String,
value: '-'
},
/** 日期范围-开始结束文本 */
rangeText: {
type: Object,
value: {
start: '开始',
end: '结束'
}
},
/**是否显示日期范围 全选 */
rangeAll: Boolean,
/** 是否允许日期范围的起止时间为同一天, 默认为false */
allowSameDay: Boolean,
/** 周起始日,默认周日 */
firstDayOfWeek: {
type: [Number, String],
value: 7
},
/**
* 可选最小日期,不传则默认无限制。
* 格式yyyy-MM-dd, 需跟separator一致。 */
minDate: String,
/** 可选最大日期,不传则默认无限制。
* 格式yyyy-MM-dd, 需跟separator一致 */
maxDate: String,
/**隐藏水印 */
hideMark: Boolean
},
data: {
weekdays: ['一', '二', '三', '四', '五', '六', '日'],
monthList: [],
dateList: [],
current: 0,
height: '80%',
rangeDate: {},
multipleDate: []
}
}
\ No newline at end of file
// components/GlCell/GlCell.js
Component({
/**
* 组件的属性列表
*/
properties: {
label:String,
labelWidth:String,
border:Boolean,
haveArrow:Boolean,
value:String,
valueAlign:String,
required:Boolean
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
click(e){
this.triggerEvent('click')
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='cell-box'>
<view class='cell {{border?"border":""}}' bindtap="click">
<view class='cell-label' style="width:{{labelWidth}}">
<text wx:if='{{required}}' class='required'>*</text>{{label||'标题'}}
</view>
<view class='cell-value ' style="width:calc(100% - {{labelWidth}});">
<view class='value {{valueAlign}} {{haveArrow}}'>
<view class='slot'><slot></slot></view>
<view class='details'>{{value}}</view>
</view>
<image wx:if='{{haveArrow}}' webp class='arrow' src="../images/arrow-x.png"></image>
</view>
</view>
</view>
\ No newline at end of file
/* components/GlCell/GlCell.wxss */
.cell-box {
background: #fff;
font-size: 28rpx;
color: #333333;
padding-left: 40rpx;
box-sizing: border-box;
}
.cell {
width: 100%;
height: 90rpx;
box-sizing: border-box;
display: flex;
align-items: center;
}
.cell.border {
border-bottom: 2rpx solid #eee;
}
.cell-label {
width: 25%;
}
.cell-value {
width: 75%;
position: relative;
height: 100%;
}
.cell-value .false {
padding-right: 40rpx !important;
}
.value {
width: 100%;
height: 100%;
display: flex;
align-items: center;
padding-right: 70rpx;
box-sizing: border-box;
}
.required{
color: #f00;
}
.details{
display: none;
}
.slot:empty + .details{
display: block;
}
.cell-value .right {
justify-content: flex-end;
height: 100%;
box-sizing: border-box;
}
.slot{
width: 100%;
}
.slot:empty{
display: none;
}
.arrow {
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 28rpx;
height: 26rpx;
}
// components/glTextarea/glTextarea.js
Component({
/**
* 组件的属性列表
*/
properties: {
maxlength: {
type: Number,
value: -1
},
placeholder: String,
showWordLimit: Boolean,
disabled: Boolean,
value: String,
filterEmoji:{
type:Boolean,
value:true
}
},
/**
* 组件的初始数据
*/
data: {
edit: true,
value: null
},
/**
* 组件的方法列表
*/
methods: {
/**
* 打开文本编辑器
*/
openTextarea() {
if (this.data.disabled) return
this.setData({
edit: false,
textareaFocus: true
})
},
setValue(value) {
if(this.properties.filterEmoji) {
if (wx.$util.haveEmoji(value)) value = wx.$util.replaceEmoji(value)
}
this.setData({
value
})
},
textareaInput(e) {
let {
value
} = e.detail
this.setValue(value)
this.triggerEvent('input', {
value
})
},
textareaBlur(e) {
let {
value
} = e.detail
this.setData({
edit: true
})
this.setValue(value)
this.triggerEvent('blur', {
value
})
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='textarea-box {{maxlength>0&&showWordLimit?"showWordLimit":""}}'>
<block wx:if='{{edit}}'>
<text class='textarea' bindtap="openTextarea" style="color:{{value?'#333':'#999'}}">{{value||placeholder||'请输入'}}</text>
</block>
<block wx:else>
<textarea class='_textarea_' maxlength="{{maxlength}}" value='{{value}}' bindinput='textareaInput' focus='{{textareaFocus}}' bindblur='textareaBlur' bindconfirm='textareaBlur' ></textarea>
</block>
<block wx:if='{{maxlength>0&&showWordLimit}}'>
<view class='wordLimit'>
{{value.length||0}} / {{maxlength}}
</view>
</block>
</view>
\ No newline at end of file
/* components/glTextarea/glTextarea.wxss */
.textarea-box {
width: 100%;
height: 100%;
position: relative;
}
.textarea-box .textarea {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow-y: scroll;
}
._textarea_ {
width: 100%;
height: calc(100% - 40rpx);
}
.textarea-box.showWordLimit .textarea {
height: calc(100% - 40rpx);
}
.wordLimit {
position: absolute;
bottom: 0;
right: 0;
color: #999;
}
// components/Login/Login.js
import {
ssoApi
} from '../../api/api'
import {
componentsMixin
} from '../../mixins/index'
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
show: Boolean,
content: {
type: String,
value: '您还没有登录,请您登录后查看!'
},
returnResponse: {
type: Boolean,
value: true
}
},
observers: {
'show': function (newVal, oldVal) {
let {
returnResponse
} = this.data
if (newVal) {
wx.$util.showLoading()
getApp().login(returnResponse).then(({
code,
data
}) => {
this.triggerEvent('loginInfo', {
code,
data
})
wx.hideLoading()
if (data) {
let {
sessionId
} = data
this.setData({
sessionId,
openSet: code != 0
})
this.sessionId = sessionId
if (data.isLogin == 'Y'&& code == '0') {
let thisPage = wx.$router.getPageInstance()
if (thisPage.loginCallBack) thisPage.loginCallBack(data)
if (thisPage.onRoute) thisPage.onRoute()
}
}
})
} else {
this.hide()
}
},
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
hide() {
this.setData({
openSet: false
})
},
cancel(flag) {
this.hide()
if (flag) this.triggerEvent('cancel')
},
noScroll: wx.$util.noScroll(),
getPhoneNumber({
detail
}) {
if (detail.errMsg && detail.errMsg == 'getPhoneNumber:fail user deny') {
this.cancel(true)
return
}
delete detail.errMsg
if (detail.iv && detail.encryptedData) {
const {
sessionId
} = this.data
wx.$util.showLoading()
detail.sessionId = sessionId
ssoApi.authUserPhone(detail).then(({
data,
code
}) => {
wx.$Track.setTrack({}, 3)
wx.hideLoading()
let thisPage = wx.$router.getPageInstance()
if (code == '0') {
thisPage.setData({
showLogin: false,
userInfo: data
})
wx.$authStatus = false
this.setData({
sessionId: ''
})
wx.$util.setUserInfo(data)
// wx.$util.setSessionId(data.sessionId)
thisPage.onLoad()
thisPage.onShow()
if (thisPage.init) thisPage.init()
if (thisPage.onRoute) thisPage.onRoute()
if (thisPage.loginCallBack) thisPage.loginCallBack(data)
let customerId = wx.$storage.get('srcm_shopmall_customer_id')
let merchantId = wx.$storage.get('srcm_shopmall_merchant_id')
if (customerId) {
ssoApi.updataCustomerPhone({
customerId,
merchantId
}).then(() => {
wx.removeStorageSync('srcm_shopmall_customer_id')
})
}
wx.$util.customerbehavior()
wx.$eventbus.emit('EQUITY')
}
})
}
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class="open-seting-bg text-center" wx:if="{{openSet}}" catchtouchmove="noScroll">
<view class="bg" ></view>
<view class="open-set-inner">
<view class="set-title">
<text class="title">温馨提示</text>
<view class="content">{{content}}</view>
</view>
<view class="btn-openset">
<!-- <view bindtap="cancel" class="btn text-center cancel" >取消</view> -->
<navigator class="btn text-center cancel" target="miniProgram" open-type="exit">取消</navigator>
<view class="btn text-center">
登录
<button open-type="getPhoneNumber" catchgetphonenumber="getPhoneNumber" class="button-style"></button>
</view>
</view>
</view>
</view>
\ No newline at end of file
/* components/Login/Login.wxss */
@import '../Authorize/Authorize.wxss';
.bg {
position: absolute;
left: 0;
top: 0;
z-index: -1;
width: 100%;
height: 100%;
}
.title {
margin-bottom: 60rpx;
font-size: 36rpx;
font-weight: 500;
}
.content {
font-size: 28rpx;
color: #A3A3A3;
}
.btn {
color: #F13C3D;
}
.cancel {
color: #999;
}
\ No newline at end of file
// components/share/share.js
import Draw_Function from './draw_function'
Component({
/**
* 组件的属性列表
*/
properties: {
show: {
type: Boolean,
value: false,
observer: function (newVal, oldVal) {
let {
wxShare
} = this.data
this.check(newVal)
if (!wxShare) {
this.setData({
_show: true
})
}
}
},
toast: {
type: String,
value: '生成中...'
},
canvasObject: Object,
hideCancel: Boolean,
diyDraw: Boolean,
hideWx: Boolean,
wxShare: Boolean
},
ready() {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
/**
* 检查
*/
check(bool) {
if (bool) {
if (this.data.tempFilePath) return
this.getImgData(res => {
this.draw(res)
})
}
},
/**
* 禁止滑动
*/
noScroll: wx.$util.noScroll(),
/**
* 取消
*/
cancel() {
this.setData({
_show: false
})
},
saveImg() {
let _this = this
wx.saveImageToPhotosAlbum({
filePath: _this.data.tempFilePath,
success(e) {
wx.$util.showToast('保存成功')
_this.triggerEvent('callBack')
}
})
},
/**保存 */
save() {
this.saveImg()
wx.nextTick(() => this.cancel())
},
/**
* 检查
*/
checkSetting() {
this.setData({
settingStatus: !this.data.settingStatus
})
},
/**
* 开始生成
*/
draw(images) {
const {
canvasObject,
wxShare
} = this.__data__
let {
height,
width
} = canvasObject
width = width || 300
height = height || 150
wx.$util.getPhoneInfo(phoneInfo => {
wx.$util.getViewInfo('.choose-list', listInfo => {
wx.$util.getViewInfo('.bg', bgInfo => {
let {
windowWidth
} = phoneInfo
let pixelRatio = windowWidth / 750
let viewTop = !wxShare ? (bgInfo.height - listInfo.height - height * pixelRatio) / 2 : 0
this.setData({
canvasStyle: `width:${width * pixelRatio}px;height:${height * pixelRatio}px;top:${viewTop}px;`,
previewStyle: `width:${width * pixelRatio}px;height:${width * pixelRatio * 0.8}px;`,
pixelRatio,
viewTop,
height,
width
})
this.ctx = wx.createCanvasContext('canvasImg', this)
this.ctx.clearRect(0, 0, width, height)
this.draw_canvas({
canvasObject,
images,
width,
height
}, canvas => {
canvas.draw(false, setTimeout(() => {
this.getCanvasImg()
}, 500))
})
})
}, this)
}, this)
},
/**画布 */
draw_canvas(params, callBack) {
const {
canvasObject,
images,
height,
width
} = params
const {
backgroundColor,
textList,
lines
} = canvasObject
const draw_function = new Draw_Function(this)
this.ctx.setFillStyle(backgroundColor || '#fff')
this.ctx.fillRect(0, 0, width, height)
this.ctx.save()
if (this.__data__.diyDraw) {
this.triggerEvent('draw', {
ctx: this.ctx,
canvasObject,
callBack,
height,
images,
width
})
} else {
images && images.length > 0 && (images.map(e => {
draw_function.drawImages(e)
}))
textList && textList.length > 0 && (textList.map(e => {
e.width = canvasObject.width
draw_function.drawText(e)
}))
lines && lines.length > 0 && (lines.map(e => {
draw_function.drawLine(e)
}))
callBack(this.ctx)
}
},
/**
* 画布生成图片
*/
getCanvasImg() {
let _this = this
let {
pixelRatio,
wxShare,
height,
width
} = _this.data
wx.canvasToTempFilePath({
canvasId: 'canvasImg',
width: width * pixelRatio,
height: height * pixelRatio,
fileType: 'jpg',
quality: 1,
x: 0,
y: 0,
success(res) {
let {
tempFilePath
} = res
if (wxShare) {
wx.hideLoading()
_this.checkSetting()
wx.showShareImageMenu({
path: tempFilePath,
success(res) {
console.log(res)
}
})
} else {
setTimeout(() => {
_this.createPreviewImg({
tempFilePath,
width
})
}, 300)
}
},
fail(err) {
wx.hideLoading()
}
}, this)
},
/**生成预览图 */
createPreviewImg(params) {
const p_ctx = wx.createCanvasContext('preview', this)
let {
tempFilePath,
width
} = params
p_ctx.drawImage(tempFilePath, 0, 0, width, width * 0.8)
let _this = this
p_ctx.draw(false, setTimeout(() => {
wx.canvasToTempFilePath({
height: width * 1.6,
width: width * 2,
canvasId: 'preview',
fileType: 'jpg',
quality: 1,
x: 0,
y: 0,
success(preview) {
_this.setData({
tempFilePath
})
_this.triggerEvent('init', {
previewImg: preview.tempFilePath,
tempFilePath
})
wx.hideLoading()
},
fail(err) {
wx.hideLoading()
}
}, this)
}, 500))
},
/**
* 批量转换图片
*/
getImgData(callBack) {
let _this = this
let {
canvasObject,
toast,
} = this.__data__
let {
imgList
} = canvasObject
wx.showLoading({
title: toast,
mask: true,
success() {
if (imgList.length > 0) {
_this.createLocalImg(imgList, 0, res => {
callBack(res)
})
} else {
callBack()
}
}
})
},
/**网络图片转成本地资源 */
createLocalImg(imgList, index = 0, callBack) {
if (index === imgList.length) return callBack(imgList)
wx.$util.promise(resolve => {
wx.getImageInfo({
src: imgList[index].url,
success(res) {
imgList[index].url = res.path
resolve()
},
fail() {
wx.$util.showToast('图片生成失败,请稍后再试')
wx.hideLoading()
console.error(`索引为:${index}的图片转换本地失败,${JSON.stringify(imgList[index].url)}`)
}
})
}).then(() => {
this.createLocalImg(imgList, index + 1, callBack)
})
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='share-box' catchtouchmove='noScroll' wx:if='{{_show}}'>
<view class='bg' bindtap='cancel'></view>
<view class='info {{flag?"flag":""}}' style="top:{{viewTop}}px;" hidden="{{canvasObject.showCanvas}}">
<slot></slot>
</view>
<view class='choose-list' style="height:{{hideCancel?'auto':'298rpx'}}">
<view class='list'>
<view class='list-btn' wx:if='{{!hideWx}}'>
<image src='../images/wx.png' webp class='image'></image>
<view>微信好友</view>
<button open-type='share' bindtap='cancel' class='button'></button>
</view>
<view class='list-btn' bindtap='checkSetting'>
<image src='../images/share.png' webp class='image'></image>
<view>保存分享</view>
</view>
</view>
<view wx:if='{{!hideCancel}}' class='cancel' bindtap='cancel'>取消</view>
</view>
</view>
<view class='canvas {{wxShare?"":"showCanvas"}}' style="{{canvasStyle}}">
<canvas canvas-id='canvasImg' style='width:100%;height:100%;'></canvas>
</view>
<view class='preview' style="{{previewStyle}}">
<canvas canvas-id="preview" style='width:100%;height:100%;'></canvas>
</view>
<authorize scopeType='writePhotosAlbum' checkSetting='{{settingStatus}}' bindsuccess='save'></authorize>
\ No newline at end of file
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.share-box {
position: fixed;
z-index: 999999;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
.share-box .info {
width: auto;
height: auto;
position: absolute;
left: 1000%;
transform: translateX(-50%);
overflow: hidden;
}
.share-box .info.flag{
left: 50%;
animation: showInfo .5s forwards;
}
@keyframes showInfo{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
.share-box .bg {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background: rgba(0, 0, 0, 0.5);
}
.choose-list {
width: 100%;
position: absolute;
left: 0;
background: #f6f6f6;
animation: showChoose .4s forwards;
}
@keyframes showChoose{
0%{
bottom: -100%;
}
100%{
bottom: 0%;
}
}
.choose-list .cancel {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 96rpx;
line-height: 96rpx;
text-align: center;
font-size: 28rpx;
color: #333;
background: #fff;
}
.list {
width: 100%;
height: 182rpx;
background: #fff;
display: flex;
}
.list-btn {
flex: 1;
text-align: center;
font-size: 24rpx;
color: #333;
padding-top: 40rpx;
position: relative;
}
.list-btn .image {
width: 60rpx;
height: 60rpx;
margin-bottom: 10rpx;
}
.list-btn .button {
width: 100%;
height: 100%;
position: absolute;
opacity: 0;
top: 0;
left: 0;
}
.canvas {
position: fixed;
top: -1000%;
left: -1000%;
animation: canvasShow .5s forwards;
}
.preview{
position: fixed;
top: 1000%;
left: 1000%;
z-index: 999999999;
}
@keyframes canvasShow{
0%{
opacity: 0;
}
100%{
opacity: 1;
}
}
.showCanvas{
left: 50%;
transform: translateX(-50%);
z-index: 99999999999;
}
\ No newline at end of file
const _ctx_ = Symbol('_ctx_')
const _pixelRatio_ = Symbol('_pixelRatio_')
class Draw_Function {
[_ctx_] = null;
[_pixelRatio_] = null;
constructor(_this_) {
this[_ctx_] = _this_.ctx
this[_pixelRatio_] = _this_.data.pixelRatio || 2
}
drawImages(imageParams) {
this[_ctx_].beginPath()
this[_ctx_].save()
let {
borderRadius,
height,
width,
url,
x,
y,
} = imageParams
height = this.toRpx(height)
width = this.toRpx(width)
x = this.toRpx(x)
y = this.toRpx(y)
if (borderRadius) {
this.drawRadiusRect({
borderRadius,
height,
width,
x,
y,
})
this[_ctx_].clip()
}
this[_ctx_].drawImage(url, x, y, width, height)
this[_ctx_].restore()
}
toRpx(val) {
return this[_pixelRatio_] * val
}
getTextWidth(text, fontSize) {
if (fontSize) this[_ctx_].setFontSize(fontSize)
return this[_ctx_].measureText(text).width
}
drawFill(x, y, width, height, color) {
this[_ctx_].beginPath()
this[_ctx_].setFillStyle(color || '#000')
this[_ctx_].fillRect(x, y, width, height)
this[_ctx_].stroke()
this[_ctx_].restore()
this[_ctx_].save()
}
drawText(textParams) {
let {
textDecoration,
textBaseline,
lineHeight,
fontWeight,
textAlign,
textWidth,
maxWidth,
fontSize,
opacity,
lineNum,
width,
color,
text,
x,
y,
} = textParams
let text_width = this.getTextWidth(text)
textAlign = textAlign || 'left'
textBaseline = textBaseline || 'normal'
opacity = typeof opacity === 'number' ? opacity : 1
lineHeight = this.toRpx(lineHeight || fontSize || 12)
textWidth = this.toRpx(textWidth || 0)
fontSize = this.toRpx(fontSize || 12)
maxWidth = this.toRpx(maxWidth || width)
width = this.toRpx(width)
x = this.toRpx(x)
y = this.toRpx(y)
let fontX = this.getFontWidth({
textAlign,
fontSize,
text,
x,
})
if (textParams.border) {
let boxX = this.toRpx(textParams.x - 4.5),
boxY = this.toRpx(textParams.y - 0.5),
boxWidth = text_width + this.toRpx(9),
boxHeight = lineHeight + this.toRpx(4)
if (boxWidth > width - fontX - this.getTextWidth('…') - fontSize) {
boxWidth = width - boxX + this.toRpx(9)
}
this.drawFill(boxX, boxY, boxWidth, boxHeight, textParams.border)
}
if (textParams.background) {
let boxX = this.toRpx(textParams.x - 4),
boxY = this.toRpx(textParams.y),
boxWidth = text_width + this.toRpx(8),
boxHeight = lineHeight + this.toRpx(3)
if (boxWidth > width - fontX - this.getTextWidth('…') - fontSize) {
boxWidth = width - boxX + this.toRpx(8)
}
this.drawFill(boxX, boxY, boxWidth, boxHeight, textParams.background)
}
this[_ctx_].beginPath()
this[_ctx_].setGlobalAlpha(opacity)
this[_ctx_].setFontSize(fontSize)
this[_ctx_].setFillStyle(color || '#000')
this[_ctx_].setStrokeStyle(color || '#000')
this[_ctx_].setTextBaseline(textBaseline)
this[_ctx_].setTextAlign(textAlign)
this[_ctx_].setLineWidth(this.toRpx(2))
const drawOneLineText = () => {
let textArr = text.split(''),
newText = '',
ellipsis = false
try {
textArr.map(e => {
newText += e
if (this.getTextWidth(newText) > width - fontX) throw true
})
} catch (error) {
ellipsis = error
}
if (ellipsis) newText += '…'
if (lastFont) newText += lastFont
this[_ctx_].fillText(newText, x, y, maxWidth)
if (checkFontWeight(fontWeight)) this[_ctx_].strokeText(newText, x, textHeight, maxWidth)
if (checkTextDecoration(textDecoration)) {
this.drawDecoration({
textDecoration,
textBaseline,
textAlign,
fontSize,
newText,
opacity,
text,
y,
x
})
}
}
if (lineNum > 1) {
let textArr = text.split(''),
textRowArr = [],
currentText = '',
viewWidth = width - fontX
if (text_width > viewWidth) {
textArr.map(e => {
currentText += e
if (this.getTextWidth(currentText) >= viewWidth && textRowArr.length < lineNum - 1) {
textRowArr.push(currentText)
currentText = ''
}
})
if (currentText.length) textRowArr.push(currentText)
textRowArr.map((e, index) => {
if (this.getTextWidth(e) > viewWidth && index == lineNum - 1) {
try {
let lastText = '',
lastArr = e.split('')
lastArr.map(i => {
lastText += i
if (this.getTextWidth(lastText) > width - fontX - this.getTextWidth('…')) throw lastText
})
} catch (error) {
if (lastFont) e = `${error.substring(0, error.length - lastFont.length)}…${lastFont}`
else e = `${error}…`
}
}
if (lastFont && e.indexOf(lastFont) == -1 && textRowArr.length < 2) e = `${e.substring(0, e.length - lastFont.length)}…${lastFont}`
let textHeight = y + index * (lineHeight || fontSize)
this[_ctx_].fillText(e, x, textHeight, maxWidth)
if (checkFontWeight(fontWeight)) this[_ctx_].strokeText(newText, x, textHeight, maxWidth)
if (checkTextDecoration(textDecoration)) {
this.drawDecoration({
y: textHeight,
textDecoration,
textBaseline,
textAlign,
fontSize,
newText: e,
opacity,
text,
x
})
}
})
} else {
drawOneLineText()
}
} else {
drawOneLineText()
}
this[_ctx_].stroke()
}
drawLine(lineParams) {
this[_ctx_].beginPath()
let {
opacity,
startX,
startY,
width,
color,
endX,
endY,
} = lineParams
startX = this.toRpx(startX)
startY = this.toRpx(startY)
width = this.toRpx(width)
endX = this.toRpx(endX)
endY = this.toRpx(endY)
this[_ctx_].setGlobalAlpha(typeof opacity === 'number' ? opacity : 1)
this[_ctx_].setStrokeStyle(color || '#000')
this[_ctx_].setLineWidth(width || this.toRpx(1))
this[_ctx_].moveTo(startX, startY)
this[_ctx_].lineTo(endX, endY)
this[_ctx_].stroke()
this[_ctx_].restore()
this[_ctx_].save()
}
setLineY = params => {
let {
textDecoration,
textBaseline,
fontSize,
y
} = params
let type = {
'underline': {
'top': y + fontSize,
'middle': y + fontSize / 2,
'bottom': y,
'normal': y,
},
'overline': {
'top': y,
'middle': y - fontSize / 2,
'bottom': y - fontSize,
'normal': y,
},
'line-through': {
'top': y + fontSize / 2,
'middle': y - fontSize / 2,
'bottom': y,
'normal': y,
}
}
return type[textDecoration][textBaseline]
}
setLineX(params) {
let {
textAlign,
text,
x
} = params
let textWidth = this[_ctx_].measureText(text).width
let type = {
'left': x,
'center': x - textWidth / 2,
'right': x - textWidth
}
return type[textAlign]
}
drawRadiusRect(params) {
let {
borderRadius,
height,
width,
x,
y,
} = params
let radius = typeof borderRadius === 'string' ? (Number(borderRadius.split('%')[0]) / 100 * width) / 2 : borderRadius / 2
radius = radius || 0
this[_ctx_].beginPath()
for (let i = 1; i < 5; i++) {
let arcX = i === 1 || i === 4 ? x + width - radius : x + radius
let arcY = i === 1 || i === 2 ? y + height - radius : y + radius
this[_ctx_].arc(arcX, arcY, radius, 2 * Math.PI * ((i - 1) / 4), 2 * Math.PI * (i / 4))
}
}
getFontWidth(params) {
let {
textAlign,
fontSize,
text,
x
} = params
let type = {
'left': x,
'center': x - fontSize * text.length / 2,
'right': x - fontSize * text.length
}
return type[textAlign] < 0 ? 0 : type[textAlign]
}
drawDecoration(params) {
let {
newText,
opacity,
y,
x
} = params
let lineX = x
let lineY = y
lineX = this.setLineX(params)
lineY = this.setLineY(params)
this[_ctx_].setGlobalAlpha(opacity)
this[_ctx_].moveTo(lineX, lineY)
this[_ctx_].lineTo(lineX + this[_ctx_].measureText(newText).width, lineY)
}
}
const checkFontWeight = (fontWeight = '0') => {
return (fontWeight && (typeof fontWeight === 'string' || typeof fontWeight === 'number') && (fontWeight == 'bold' || fontWeight >= 700))
}
const checkTextDecoration = textDecoration => {
return (textDecoration && (textDecoration === 'underline' || textDecoration === 'overline' || textDecoration === 'line-through'))
}
export default Draw_Function
\ No newline at end of file
Component({
/**
* 组件的属性列表
*/
properties: {
tabList: {
type: Array,
value: []
},
height: {
type: String,
value: '100vh'
},
tagIndex: {
type: Number,
value: 0,
observer: function (n, o) {
this.setData({
count: n
})
}
},
key: {
type: String,
value: 'name'
},
showClickLoading:Boolean
},
/**
* 组件的初始数据
*/
data: {
count: 0,
scrollTop: 0
},
/**
* 组件的方法列表
*/
methods: {
click(e) {
let {
item,
index
} = e.currentTarget.dataset
if(this.data.count === index) return
if(this.properties.showClickLoading) wx.$util.showLoading('')
item.index = index
this.setData({
count: index,
scrollTop: 0
})
this.triggerEvent('click', item)
wx.nextTick(()=>{
wx.hideLoading()
})
},
tabScrollTolower(e) {
this.triggerEvent('tabScrollTolower')
},
viewScrollTolower(e) {
this.triggerEvent('viewScrollTolower')
}
},
ready() {
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='tab-box' id='tabView' style="height:{{height}}">
<scroll-view style="height:100%;" scroll-y class='tab' bindscrolltolower='tabScrollTolower'>
<view>
<block wx:for='{{tabList}}' wx:key='index'>
<view class='tab-item {{count==index?"active":""}}' bindtap="click" data-item='{{item}}' data-index='{{index}}'>{{item[key]}}</view>
</block>
</view>
</scroll-view>
<view class='view'>
<scroll-view style="height:100%" scroll-y scroll-top='{{scrollTop}}' bindscrolltolower='viewScrollTolower'>
<slot></slot>
</scroll-view>
</view>
</view>
\ No newline at end of file
/* components/tabView/tabView.wxss */
.tab {
float: left;
width: 26.67%;
box-sizing: border-box;
text-align: center;
background: #f4f4f4;
}
.view {
float: left;
width: 73.33%;
height: 100%;
position: relative;
}
.tab-item {
width: 100%;
height: 96rpx;
line-height: 96rpx;
font-size: 24rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333;
box-sizing: border-box;
padding: 0 10rpx;
}
.active {
font-weight: 700;
background: #fff;
position: sticky;
top: 0;
font-size: 28rpx;
}
// components/TimeHorizon/TimeHorizon.js
Component({
/**
* 组件的属性列表
*/
properties: {
config: {
type: Object,
observer: function (newVal, oldVal) {
let {
havehhmmss,
startData,
startTime,
startLabel,
valueAlign,
endData,
endLabel,
} = newVal
valueAlign = valueAlign || 'left'
this.setData({
havehhmmss,
startData,
startTime,
startLabel,
valueAlign,
endData,
endLabel
})
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
dateChange(e) {
let {
value
} = e.detail
let {
type
} = e.currentTarget.dataset
if (this.data.endData && type === 'start') {
this.setData({
endData: ''
})
}
let {
havehhmmss
} = this.data
if(havehhmmss)
value = havehhmmss ? type === 'start' ? `${value} 00:00:00` : `${value} 23:59:59` : value
this.setData({
[`${type}Data`]: value
})
let {
startData,
endData,
} = this.data
if (startData && endData) this.triggerEvent('change', {
startData,
endData
})
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<view class='time-box'>
<picker class='time-picker' mode="date" value="{{startData}}" start="{{startTime}}" bindchange="dateChange" data-type='start'>
<view class='time-picker-view'>
<view class='time-picker-label'>{{startLabel||'开始时间'}}</view>
<view class='time-picker-value {{!startData?"no-data":""}} {{valueAlign}}'>
{{startData||'请选择'}}
<image class='arrow' webp src="../images/arrow-x.png"></image>
</view>
</view>
</picker>
<picker class='time-picker' mode="date" value="{{endData}}" start="{{startData}}" bindchange="dateChange" data-type='end'>
<view class='time-picker-view'>
<view class='time-picker-label'>{{endLabel||'结束时间'}}</view>
<view class='time-picker-value {{!endData?"no-data":""}} {{valueAlign}}'>
{{endData||'请选择'}}
<image class='arrow' webp src="../images/arrow-x.png"></image>
</view>
</view>
</picker>
</view>
\ No newline at end of file
/* components/TimeHorizon/TimeHorizon.wxss */
.time-box {
background: #fff;
font-size: 28rpx;
color: #333333;
}
.time-picker {
padding-left: 40rpx;
}
.time-picker-view {
display: flex;
align-items: center;
width: 100%;
height: 90rpx;
box-sizing: border-box;
border-bottom: 2rpx solid #eee;
}
.time-picker-label{
width: 25%;
box-sizing: border-box;
}
.time-picker-value{
width: 75%;
display: flex;
align-items: center;
position: relative;
}
.time-picker-value.right{
justify-content: flex-end;
padding-right: 70rpx;
}
.no-data {
color: #999;
}
.arrow {
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 28rpx;
height: 26rpx;
}
// components/shareBtn/shareBtn.js
import { componentsMixin } from "../../mixins/index";
Component({
behaviors: [componentsMixin],
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--components/shareBtn/shareBtn.wxml-->
<button class="btn-share" open-type="share">
<image class="btn-icon" mode="widthFix" webp src="{{IMGURL}}image/productDetail/equity/share.png?v={{img_version}}" />
<text>分享此页面</text>
</button>
\ No newline at end of file
/* components/shareBtn/shareBtn.wxss */
.btn-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.btn-share {
display: flex;
justify-content: center;
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: 0 48rpx;
}
\ No newline at end of file
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-09 13:58:15
* @LastEditors: huyue
* @LastEditTime: 2022-12-09 14:34:08
*/
import { trackData } from "../utils/data";
module.exports = Behavior({
data: {
......@@ -17,13 +24,13 @@ module.exports = Behavior({
})
switch(curIntroduceIndex) {
case 3:
wx.$router.go('scene');
// wx.$router.go('scene');
// wx.$router.go('addTransform', {notIntercept: true});
// wx.showToast({
// title: '敬请期待',
// icon: 'none'
// })
wx.$Track.sendTrack(trackData.DIJIA)
wx.showToast({
title: '敬请期待',
icon: 'none'
})
// wx.$Track.sendTrack(trackData.DIJIA)
break
case 2:
this.setData({
......
// pages/tab/introduction/introduction.js
import {menuMixin} from '../../../mixins/index'
// packagesList/pages/index/index.js
Page({
behaviors: [menuMixin],
/**
* 页面的初始数据
*/
data: {
// 0-员工,1-代理商
customerType: 1
},
/**
......
/* packagesList/pages/index/index.wxss */
\ No newline at end of file
<!--packagesList/pages/index/index.wxml-->
<text>packagesList/pages/index/index.wxml</text>
// pages/measure/measure.js
import Util from '../../../utils/util'
import measureData from '../constant/data'
const checkMap = new Map()
Page({
......@@ -48,7 +47,7 @@ Page({
console.log(checkArray)
const params = Object.assign({checkArray}, this.data.formData)
console.log(params)
wx.$router.go("measureResult", params);
wx.$router.go("/packagesList/pages/measure/measureResult/measureResult", params);
}
},
// 选择产品
......
// pages/measureResult/measureResult.js
import Util from '../../../utils/util'
import Util from '../../../../utils/util'
import measureData from '../constant/data'
Page({
......
......@@ -199,21 +199,14 @@ function formatValue(value, hasUnit = true, onlyUnit = false) {
if (typeof value == 'number') {
val = value.toString()
}
if (val.length > 8 ) {
if (val && val.length > 8 ) {
val = (val / 100000000).toFixed(0)
unit = '亿'
} else if (val.length > 5) {
} else if (val && val.length > 5) {
val = (val / 10000).toFixed(0)
unit = '万'
}
return onlyUnit ? unit : hasUnit ? val + unit : val
// if (val.length > 8 ) {
// return (val / 100000000).toFixed(0) + '亿'
// } else if (val.length > 5) {
// return (val / 10000).toFixed(0) + '万'
// } else {
// return val
// }
}
function decimalFormat(value) {
return (value * 100).toFixed(2)
......
// 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-6个月",
type: "1.2次新车膨胀金活动",
url: "car2",
},
{
id: "3",
name: "scene4",
title: "6个月以上",
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.$storage.get("scene").cardId;
params.merchant =
wx.$storage.get("scene").merchant ||
wx.$storage.get("scene").merchantId;
params.openId = wx.$storage.get("aicard_info").openId;
params.unionId = wx.$storage.get("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() {
},
/**
* 生命周期函数--监听页面隐藏
*/
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: 500;
font-size: 17rpx;
color: #323436;
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
// pages/addTransform/index/index.js
import pageData from '../constant/data'
Page({
/**
* 页面的初始数据
*/
data: {
editForm: {
sales: 100,
userNum: 10000
},
actualForm: {
sales: 100,
userNum: 10000
},
IMGURL: wx.$imgUrl,
height: 'calc(100vh - 100rpx)',
tagIndex: 0,
tabList: pageData.tabList,
introduceObj: {},
cardList: [],
// 玩法介绍
introduceVisible: false,
introduceList: pageData.introduceList,
// 产品详情
detailKeyList: Object.keys(pageData.addDatailObj)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
introduceObj: this.data.tabList[this.data.tagIndex].introduce,
cardList: this.data.tabList[this.data.tagIndex].cardList
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
handleInput(e) {
const attr = e.target.dataset.attr
this.setData({
[`${attr}`]: e.detail.value
})
},
handleTabClick(e) {
let {
index,
introduce,
cardList
} = e.detail
let {
tagIndex
} = this.data
if (index == tagIndex) return
this.setData({
tagIndex: index,
introduceObj: introduce || {},
cardList: cardList || []
})
},
handleCardClick(e) {
var obj = e.detail
if(!this.data.detailKeyList.includes(obj.detailAttrName)) {
wx.$util.showToast('敬请期待')
return true
}
wx.$router.go('addTransformDetail', { proName: obj.proName, attrName: obj.detailAttrName })
},
handleIntroduceClick() {
this.handleIntroduceClose()
},
handleIntroduceClose() {
this.setData({
introduceVisible: !this.data.introduceVisible
})
},
handleConfirm() {
this.setData({
actualForm: this.data.editForm
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "D+增值转化",
"usingComponents": {
"add-tab-view": "../components/AddTabView/AddTabView",
"card": "../components/Card/Card"
},
"backgroundColor": "#F6F5F8"
}
\ No newline at end of file
<!--pages/addTransform/index/index.wxml-->
<view class="layout">
<view class="head">测算您门店的基本情况</view>
<view class="form-box">
<view class="form-row flex">
<text class="form-label">门店月平均新车销量</text>
<input class="form-input" placeholder="请输入" type="number" value="{{editForm.sales}}" bindinput="handleInput" data-attr="editForm.sales" />
<!-- <text class="suffix">台</text> -->
</view>
<view class="form-row flex">
<text class="form-label">3年售后存量用户数</text>
<input class="form-input" placeholder="请输入" type="number" value="{{editForm.userNum}}" bindinput="handleInput" data-attr="editForm.userNum" />
<!-- <text class="suffix">家</text> -->
</view>
<button class="submit-btn" bindtap="handleConfirm">提交测算</button>
</view>
</view>
<view class="layout">
<view class="head">我们的产品和服务</view>
<add-tab-view tabList="{{tabList}}" tagIndex="{{tagIndex}}" height="{{height}}" bindclick="handleTabClick">
<view class="tab-content-box" wx:if="{{cardList.length}}">
<view class="pos-relative" bindtap="handleIntroduceClick">
<view class="card-introduce">
<image class="introduce-img" webp src="{{IMGURL}}{{introduceObj.imgUrl}}?v={{img_version}}" />
<view class="introduce-content">
<view class="introduce-txt">{{introduceObj.title}}</view>
<view class="introduce-btn">查看阶段玩法</view>
</view>
</view>
</view>
<view class="card-title-box">
<view>阶段产品</view>
<view class="tips">预估收益根据您的新车销量 {{ actualForm.sales || 0 }}台 测算所得</view>
</view>
<view wx:for="{{cardList}}" wx:key="index">
<card cardForm="{{item}}" actualForm="{{actualForm}}" tagIndex="{{tagIndex}}" bindclick="handleCardClick"></card>
</view>
</view>
</add-tab-view>
</view>
<!-- 玩法介绍 -->
<view class="pos-relative">
<view class="{{introduceVisible ? 'model' : 'model-hidden'}}" catchtouchmove="noScroll" bindtap="handleIntroduceClose">
<view>
<view class="model-box">
<image class="model-img" webp src="{{IMGURL}}addTransform/card/deliver/model-introduce.png?v={{img_version}}" />
<view class="model-block">
<view class="model-head">
<view class="head-title">{{introduceList[tagIndex].title}}</view>
<view>{{introduceList[tagIndex].subTitle}}</view>
</view>
<view class="model-content">
<view class="content-block" wx:for="{{introduceList[tagIndex].contentList}}" wx:key="index">
<image class="content-icon" src="{{IMGURL}}addTransform/card/deliver/model-{{item.icon}}.png?v={{img_version}}" />
<view>
<view class="content-title">{{item.title}}</view>
<view class="content-row" wx:for="{{item.list}}" wx:for-item="subItem" wx:for-index="subIndex" wx:key="subIndex">
<view class="content-txt" wx:if="{{subItem.name}}">{{subItem.name}}</view>
<view class="content-tip">{{subItem.tip}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="model-btn">知道了</view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/addTransform/index/index.wxss */
page {
background-color: #F6F5F8;
}
.layout {
background: #FFFFFF;
padding-bottom: 32rpx;
margin-bottom: 16rpx;
}
.flex {
display: flex;
}
.head {
font-size: 32rpx;
font-weight: 600;
line-height: 48rpx;
padding: 32rpx 0 16rpx 0;
}
.head::before {
content: '';
display: inline-block;
width: 8rpx;
height: 28rpx;
background: #5850FF;
border-radius: 0 2rpx 2rpx 0;
margin-right: 32rpx;
}
.form-box {
margin: 0 32rpx;
font-size: 28rpx;
color: #2D2D33;
background-image: linear-gradient(179deg, rgba(123, 112, 255, 0.02) 15%, rgba(99, 92, 255, 0.10) 100%);
border-radius: 8rpx;
padding: 24rpx 32rpx;
}
.form-box .form-row {
justify-content: space-around;
align-items: center;
line-height: 72rpx;
margin-bottom: 24rpx;
}
.form-row .form-label {
padding-right: 10rpx;
flex-grow: 1;
}
.form-input {
box-sizing: border-box;
height: 72rpx;
width: 256rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
padding: 0 20rpx;
}
.suffix {
width: 28rpx;
color: #6E6E7A;
margin-left: 16rpx;
}
.submit-btn {
height: 72rpx;
line-height: 72rpx;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
}
.tab-content-box {
margin: 16rpx 16rpx;
}
.pos-relative {
position: relative;
z-index: 1;
}
.card-introduce {
font-size: 28rpx;
width: 100%;
height: 160rpx;
color: #FFFFFF;
}
.introduce-img {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: -1;
}
.introduce-content {
padding: 32rpx 0 28rpx 32rpx;
}
.introduce-txt {
height: 44rpx;
line-height: 44rpx;
font-size: 28rpx;
margin-bottom: 16rpx;
}
.introduce-btn {
box-sizing: border-box;
width: 144rpx;
height: 40rpx;
opacity: 0.8;
font-size: 20rpx;
background: #7E78FF;
border-radius: 4rpx;
padding: 4rpx 12rpx;
}
.card-title-box {
font-size: 28rpx;
color: #2D2D2E;
margin: 32rpx 0;
}
.tips {
font-size: 24rpx;
color: #9E9EA8;
margin-top: 8rpx;
}
.model-hidden {
position: fixed;
left: -1000000;
top: -100000;
}
.model {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
z-index: 99;
background: rgba(0, 0, 0, 0.7);
}
.model-box {
position: relative;
box-sizing: border-box;
width: calc(100vw - 128rpx);
height: 848rpx;
margin: 0 64rpx 48rpx;
}
.model-img {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.model-block {
position: absolute;
font-size: 28rpx;
width: 100%;
height: 100%;
}
.model-head {
display: flex;
width: 100%;
height: 20%;
font-size: 24rpx;
color: #5850FF;
justify-content: center;
align-items: center;
flex-direction: column;
}
.model-head .head-title {
font-size: 40rpx;
font-weight: 600;
margin-bottom: 8rpx;
}
.model-block .model-content {
width: 100%;
padding: 4% 40rpx;
}
.model-content .content-block {
display: flex;
font-size: 24rpx;
margin-bottom: 16rpx;
}
.model-content .content-icon {
width: 64rpx;
height: 64rpx;
margin-right: 16rpx;
}
.model-content .content-row {
display: flex;
margin-bottom: 8rpx;
}
.model-content .content-title {
height: 64rpx;
line-height: 64rpx;
font-size: 28rpx;
color: #2D2D33;
font-weight: 700;
}
.model-content .content-txt {
color: #2D2D33;
margin-right: 16rpx;
font-weight: 600;
}
.model-content .content-tip {
color: #6E6E7A;
}
.model-btn {
height: 88rpx;
line-height: 88rpx;
background: #5850FF;
border: 2rpx solid rgba(255, 255, 255, 0.50);
border-radius: 12rpx;
font-weight: 600;
font-size: 36rpx;
color: #FFFFFF;
text-align: center;
margin: 0 176rpx;
}
\ No newline at end of file
// pages/addTransform/detail/detail.js
import pageData from '../constant/data'
import util from '../../../utils/util'
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL: wx.$imgUrl,
attrName: '',
proName: '',
addDatailObj: pageData.addDatailObj,
detailObj: {},
hasShare: false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (util.getUserInfo().phone) {
this.setData({
hasShare: true
})
}
wx.$router.getData(({
attrName,
proName
}) => {
this.setData({
proName: proName,
attrName: attrName,
detailObj: this.data.addDatailObj[attrName]
})
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "D+增值转化",
"usingComponents": {}
}
\ No newline at end of file
<!--pages/addTransform/detail/detail.wxml-->
<view>
<view class="layout">
<view class="head">
<image class="head-icon" src="{{IMGURL}}addTransform/detail/icon-name.png?v={{img_version}}" />
<text class="head-txt">{{proName}}</text>
</view>
<swiper class="m-b-32" indicator-dots="true" autoplay="true">
<block wx:for="{{detailObj.imgList}}" wx:key="*this">
<swiper-item>
<image class="swiper-img" src="{{IMGURL}}{{item.url}}?v={{img_version}}" />
</swiper-item>
</block>
</swiper>
<view class="content-txt">{{detailObj.text}}</view>
</view>
<view class="layout">
<view class="head">
<image class="head-icon" webp src="{{IMGURL}}addTransform/detail/icon-video.png?v={{img_version}}" />
<text class="head-txt">案例视频</text>
</view>
<video class="video" wx:for="{{detailObj.videoList}}" wx:key="index" title="案例视频:{{proName}}" src="{{IMGURL}}{{item.url}}?v={{img_version}}"></video>
</view>
<view class="fixed-btn" wx:if="{{hasShare}}">
<button class="btn-share" open-type="share">
<image class="btn-icon" webp src="{{IMGURL}}addTransform/detail/share.png?v={{img_version}}"/>
<text>分享此页面</text>
</button>
</view>
</view>
\ No newline at end of file
/* pages/addTransform/detail/detail.wxss */
page {
background-color: #F6F5F8;
padding-bottom: 112rpx;
}
.layout {
background: #FFFFFF;
padding: 32rpx;
margin-bottom: 20rpx;
}
.head {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.head-icon {
width: 48rpx;
height: 48rpx;
}
.head-txt {
font-size: 32rpx;
color: #333333;
font-weight: 600;
margin-left: 20rpx;
}
.swiper-img {
width: 100%;
height: 100%;
}
.m-b-32 {
margin-bottom: 32rpx;
}
.content-txt {
font-size: 28rpx;
color: #111111;
line-height: 48rpx;
}
.video {
width: 100%;
height: 396rpx;
}
.fixed-btn {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
background: #FFFFFF;
padding: 24rpx 0 16rpx;
box-shadow: 0 -4rpx 8rpx 0 rgba(196, 199, 204, 0.20);
}
.btn-icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.btn-share {
display: flex;
justify-content: center;
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: 0 48rpx;
}
\ No newline at end of file
// pages/addTransform/components/AddTabView/AddTabView.js
Component({
/**
* 组件的属性列表
*/
properties: {
tabList: {
type: Array,
value: []
},
height: {
type: String,
value: '100vh'
},
tagIndex: {
type: Number,
value: 0,
observer: function (n, o) {
this.setData({
count: n
})
}
},
key: {
type: String,
value: 'name'
},
showClickLoading:Boolean
},
/**
* 组件的初始数据
*/
data: {
count: 0,
scrollTop: 0,
IMGURL: wx.$imgUrl
},
/**
* 组件的方法列表
*/
methods: {
click(e) {
let {
item,
index
} = e.currentTarget.dataset
if(this.data.count === index) return
if(this.properties.showClickLoading) wx.$util.showLoading('')
item.index = index
this.setData({
count: index,
scrollTop: 0
})
this.triggerEvent('click', item)
wx.nextTick(()=>{
wx.hideLoading()
})
},
tabScrollTolower(e) {
this.triggerEvent('tabScrollTolower')
},
viewScrollTolower(e) {
this.triggerEvent('viewScrollTolower')
}
},
ready() {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--pages/addTransform/components/AddTabView/AddTabView.wxml-->
<view class='tab-box' id='tabView' style="height:{{height}}">
<scroll-view style="height:100%;" scroll-y class='tab' bindscrolltolower='tabScrollTolower'>
<view>
<block wx:for='{{tabList}}' wx:key='index'>
<view class='tab-item {{count==index?"active":""}}' bindtap="click" data-item='{{item}}' data-index='{{index}}'>
<image webp class="tab-bg" src="{{IMGURL}}addTransform/tab-{{index + 1}}.png?v={{img_version}}" />
<view wx:for="{{item[key]}}" wx:key="index" wx:for-item="subItem">{{subItem}}</view>
</view>
</block>
</view>
</scroll-view>
<view class='view'>
<scroll-view style="height:100%" scroll-y scroll-top='{{scrollTop}}' bindscrolltolower='viewScrollTolower'>
<slot></slot>
</scroll-view>
</view>
</view>
\ No newline at end of file
/* pages/addTransform/components/AddTabView/AddTabView.wxss */
.tab {
float: left;
width: 21.34%;
box-sizing: border-box;
text-align: center;
background: #F2F2F7;
}
.view {
box-sizing: border-box;
float: left;
width: 78.66%;
height: 100%;
position: relative;
padding: 0px 16rpx;
}
::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.tab-item {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
height: 240rpx;
font-size: 28rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #6E6E7A;
box-sizing: border-box;
padding: 0 10rpx;
}
.tab-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.active {
font-weight: 700;
background: #fff;
color: #2D2D33;
position: sticky;
top: 0;
font-size: 28rpx;
}
\ No newline at end of file
// pages/addTransform/components/card/Card.js
Component({
/**
* 组件的属性列表
*/
properties: {
cardForm: {
type: Object,
      observer(n) {
        this.setData({
cardForm: n
        })
}
},
actualForm: {
type: Object,
observer(n) {
      this.setData({
actualForm: n
      })
this.calcProfit()
}
},
tagIndex: {
type: Number,
observer(n) {
this.calcProfit()
}
}
},
/**
* 组件的初始数据
*/
data: {
IMGURL: wx.$imgUrl,
typeObj: {
service: {
name: '服务类',
bgColor: 'rgba(255,231,205,0.80)',
color: '#EF971E'
},
membrane: {
name: '膜类',
bgColor: '#E3ECFF',
color: '#4E87FB'
},
beauty: {
name: '美容类',
bgColor: '#EAE9FF',
color: '#5851FF'
},
light: {
name: '轻改类',
bgColor: '#D7F5E5',
color: '#21AB60'
}
},
},
ready() {
},
/**
* 组件的方法列表
*/
methods: {
handleClick() {
this.triggerEvent('click', this.data.cardForm)
},
calcProfit() {
var targetItem = this.data.cardForm
let sales = +this.data.actualForm.sales || 0
let userNum = +this.data.actualForm.userNum || 0
let defaultPrice = +targetItem.priceList[0].value
if(targetItem.detailAttrName) {
switch(targetItem.detailAttrName) {
case 'digitRight':
targetItem.profit = (sales * 0.5 * defaultPrice * 12).toFixed(0) + ''
break
case 'sunMembrane':
targetItem.profit = (sales * 0.8 * 0.7 * defaultPrice * 12).toFixed(0) + ''
break
case 'paintMembrane':
targetItem.profit = (userNum * 0.15 * defaultPrice * 12).toFixed(0) + ''
break
case 'colorMembrane':
targetItem.profit = (userNum * 0.05 * defaultPrice * 12).toFixed(0) + ''
break
case 'digitBeauty':
targetItem.profit = (sales * 0.2 * defaultPrice * 12).toFixed(0) + ''
break
case 'chair':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.01).toFixed(0) + ''
break
case 'ar':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
case 'lamp':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
case 'navigation':
targetItem.profit = (userNum * defaultPrice * 0.9 * 0.15).toFixed(0) + ''
break
default:
break
}
}
this.setData({
cardForm: targetItem
})
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<!--pages/addTransform/components/card/Card.wxml-->
<view class="card-box" bindtap="handleClick">
<image class="img" webp src="{{IMGURL}}{{cardForm.imgUrl}}?v={{img_version}}" />
<view class="card-block">
<view class="m-b-20">
<text class="card-type" style="color: {{typeObj[cardForm.type].color}}; background-color: {{typeObj[cardForm.type].bgColor}}">{{typeObj[cardForm.type].name}}</text>
<text class="card-title">{{cardForm.proName}}</text>
</view>
<view class="flex card-row">
<view wx:for="{{cardForm.priceList}}" wx:key="index" class="price-item">
<text class="m-r-8">{{item.name}}</text>
<text>¥{{item.value}}</text>
</view>
</view>
<view class="flex-space card-row">
<view wx:if="{{cardForm.profit}}">
<text class="m-r-8">预估收益</text>
<text class="profit-txt">¥{{cardForm.profit}}</text>
</view>
<view wx:else="">暂无预估收益,敬请期待</view>
<view class="profit-jump">产品介绍<text class="arrow"></text></view>
</view>
</view>
</view>
\ No newline at end of file
/* pages/addTransform/components/card/Card.wxss */
.card-box {
box-sizing: border-box;
height: 440rpx;
background: #FAFAFA;
box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 16rpx;
margin-bottom: 40rpx;
font-size: 24rpx;
}
.flex {
display: flex;
}
.flex-space {
display: flex;
justify-content: space-between;
}
.card-block {
padding: 32rpx 24rpx 24rpx;
}
.img {
width: 100%;
height: 240rpx;
}
.card-type {
padding: 4rpx 16rpx;
border-radius: 4rpx;
margin-right: 20rpx;
}
.m-b-20 {
margin-bottom: 20rpx;
}
.m-r-8 {
margin-right: 8rpx;
}
.card-title {
font-size: 32rpx;
color: #2D2D33;
font-weight: 600;
}
.card-row {
color: #6E6E7A;
height: 40rpx;
margin-bottom: 4rpx;
}
.price-item {
margin-right: 32rpx;
}
.price-item:last-child {
margin-right: 0;
}
.profit-txt {
font-size: 28rpx;
color: #5850FF;
font-weight: 600;
}
.profit-jump {
color: #9E9EA8;
}
.arrow {
display: inline-block;
width: 12rpx;
height: 12rpx;
border: 2rpx solid #9E9EA8;
border-width: 2rpx 2rpx 0 0;
opacity: 0.7;
transform: rotate(45deg);
margin-left: 10rpx;
}
\ No newline at end of file
var tabList = [{
name: ['新车', '交付期'],
introduce: {
title: '车主处于“已购车待交付车辆”阶段?',
imgUrl: 'addTransform/card/deliver/introduce.png'
},
cardList: [{
proName: '数字无忧卡权益',
detailAttrName: 'digitRight',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'service',
priceList: [{
name: '均客单价',
value: '2000'
}],
profit: '1200000'
}, {
proName: '汽车太阳膜',
detailAttrName: 'sunMembrane',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'membrane',
priceList: [{
name: '合资自主品牌',
value: '1500'
}, {
name: '豪华品牌',
value: '2000'
}],
profit: '10080000'
}]
}, {
name: ['新车', '磨合期'],
introduce: {
title: '车主处于“已购车待交付车辆”阶段?',
imgUrl: 'addTransform/card/deliver/introduce.png'
},
cardList: [{
proName: '漆面保护膜',
detailAttrName: 'paintMembrane',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'membrane',
priceList: [{
name: '均客单价',
value: '12000'
}],
profit: '2160000'
}, {
proName: '改色膜',
detailAttrName: 'colorMembrane',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'membrane',
priceList: [{
name: '均客单价',
value: '5000'
}],
profit: '300000'
}]
}, {
name: ['用车', '热络期'],
introduce: {
title: '车主处于“已购车待交付车辆”阶段?',
imgUrl: 'addTransform/card/deliver/introduce.png'
},
cardList: [{
proName: '数字化美容',
detailAttrName: 'digitBeauty',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'beauty',
priceList: [{
name: '均客单价',
value: '300'
}],
profit: '72000'
}, {
proName: '座椅通风',
detailAttrName: 'chair',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'light',
priceList: [{
name: '均客单价',
value: '2580'
}],
profit: '880'
}, {
proName: 'AR导航',
detailAttrName: 'ar',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'light',
priceList: [{
name: '均客单价',
value: '1680'
}],
profit: '880'
}, {
proName: '氛围灯',
detailAttrName: 'lamp',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'light',
priceList: [{
name: '均客单价',
value: '2680'
}],
profit: '880'
}, {
proName: '360全景导航',
detailAttrName: 'navigation',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'light',
priceList: [{
name: '均客单价',
value: '2880'
}],
profit: '880'
}]
}, {
name: ['用车', '流失期'],
introduce: {
title: '车主处于“已购车待交付车辆”阶段?',
imgUrl: 'addTransform/card/deliver/introduce.png'
},
cardList: [{
proName: '车险续保',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'service',
priceList: [{
name: '均客单价',
value: '2500'
}],
profit: null
}, {
proName: '金融车贷',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'service',
priceList: [{
name: '均客单价',
value: '20000'
}],
profit: null
}, {
proName: '数字化美容',
detailAttrName: 'digitBeauty',
imgUrl: 'addTransform/card/deliver/card-0.png',
type: 'beauty',
priceList: [{
name: '均客单价',
value: '350'
}],
profit: '880'
}]
}]
var introduceList = [{
title: '新车交付期',
subTitle: '已购车/待交付车辆阶段',
contentList: [{
icon: 'play',
title: '销售玩法',
list: [{
name: '',
tip: '新车套餐打包 + 驻点销售升级'
}, {
name: '',
tip: '产品升级 + 线下体验'
}]
}, {
icon: 'crux',
title: '营销关键',
list: [{
name: '流量来源',
tip: '4S店新车、展厅车销售'
}, {
name: '触达工具',
tip: '新车销售打包、太阳膜安装施工'
}, {
name: '配合岗位',
tip: '新车销售岗、精品岗'
}, {
name: '营销频次',
tip: '每月'
}, {
name: '转化关键',
tip: '套餐毛利、流量触达'
}]
}, {
icon: 'income',
title: '增量收入',
list: [{
name: '转化率/渗透率',
tip: '30%'
}, {
name: '预计单月',
tip: '6万/100台新车月销量'
}]
}]
}, {
title: '新车磨合期',
subTitle: '购车第一年(0-12个月内)',
contentList: [{
icon: 'play',
title: '销售玩法',
list: [{
name: '',
tip: '订单膨胀、团购众筹'
}, {
name: '',
tip: '产品升级 + 线下体验'
}]
}, {
icon: 'crux',
title: '营销关键',
list: [{
name: '流量来源',
tip: '4S店新车、展厅车销售'
}, {
name: '触达工具',
tip: '企业微信'
}, {
name: '配合岗位',
tip: '精品岗'
}, {
name: '营销频次',
tip: '每月'
}, {
name: '转化关键',
tip: '内容种草'
}]
}, {
icon: 'income',
title: '增量收入',
list: [{
name: '转化率/渗透率',
tip: '5%'
}, {
name: '预计单月',
tip: '5万'
}]
}]
}, {
title: '用车熟络期',
subTitle: '购车第二年(12-36个月内)',
contentList: [{
icon: 'play',
title: '销售玩法',
list: [{
name: '',
tip: '众筹团购、以旧换新抵扣'
}, {
name: '',
tip: '直播展示+线下体验,秒杀活动+勾子产品'
}]
}, {
icon: 'crux',
title: '营销关键',
list: [{
name: '流量来源',
tip: '4S店售后基盘'
}, {
name: '触达工具',
tip: '企业微信/个人微信'
}, {
name: '配合岗位',
tip: '全员岗位'
}, {
name: '营销频次',
tip: '轻改类每个季度、美容类每个月'
}, {
name: '转化关键',
tip: '内容种草+高性价比'
}]
}, {
icon: 'income',
title: '增量收入',
list: [{
name: '转化率/渗透率',
tip: '2%'
}, {
name: '预计单月',
tip: '5万'
}]
}]
}, {
title: '用车流失期',
subTitle: '购车三年以上(36个月以上)',
contentList: [{
icon: 'play',
title: '销售玩法',
list: [{
name: '',
tip: '权益套餐买送'
}, {
name: '',
tip: '产品升级 + 线下体验'
}]
}, {
icon: 'crux',
title: '营销关键',
list: [{
name: '流量来源',
tip: '4S店续保流失客户'
}, {
name: '触达工具',
tip: '企业微信/个人微信'
}, {
name: '配合岗位',
tip: '续保岗'
}, {
name: '营销频次',
tip: '每月'
}, {
name: '转化关键',
tip: '高性价比'
}]
}, {
icon: 'income',
title: '增量收入',
list: [{
name: '转化率/渗透率',
tip: '10%'
}, {
name: '预计单月',
tip: '2万'
}]
}]
}]
var addDatailObj = {
digitRight: {
imgList: [{
url: 'addTransform/card/deliver/introduce.png'
}, {
url: 'addTransform/card/deliver/card-0.png'
}],
text: '产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案产品介绍文案。',
videoList: [{
url: 'addTransform/detail/video.mp4'
}]
},
sunMembrane: {
imgList: [{
url: 'addTransform/card/deliver/introduce.png'
}, {
url: 'addTransform/card/deliver/card-0.png'
}],
text: '太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜太阳膜。',
videoList: [{
url: 'addTransform/detail/video.mp4'
}]
}
}
export default {
tabList,
introduceList,
addDatailObj
}
\ No newline at end of file
// pages/addValue/addValue/addValue.js
import Util from "../../../utils/util";
import pageData from "../constant/data";
Page({
/**
* 页面的初始数据
*/
data: {
visible: false,
tabList: pageData.tabList,
tabActive: 0,
typeObj: {
service: {
name: "服务类",
class: "service-color",
},
membrane: {
name: "膜类",
class: "membrane-color",
},
beauty: {
name: "美容类",
class: "beauty-color",
},
light: {
name: "轻改类",
class: "light-color",
},
},
formData: {
sales: 100,
flow: 10000,
},
productList: [],
isReset: false,
hasPhoneNumber: false,
lastFormData: {
sales: 100,
flow: 10000,
},
isFirst: true
},
// tab切换
tabChange(e) {
console.log(e);
const index = e.currentTarget.dataset.index;
this.setData({
tabActive: index,
showPlay: false
})
this.showCase()
},
// 提交测算
submit(e) {
console.log(e);
let sales = e ? +e.detail.value.sales : this.data.formData.sales
let flow = e ? +e.detail.value.flow : this.data.formData.flow
const reg = /^[1-9]\d*$/
console.log(reg.test(sales), flow, '---')
if (!reg.test(sales)) {
wx.showToast({
title: '门店月平均新车销量应为正整数',
icon: 'none',
duration: 2000
})
return
}
if (!reg.test(flow)) {
wx.showToast({
title: '3年内售后存量用户应为正整数',
icon: 'none',
duration: 2000
})
return
}
this.setData({
'lastFormData.sales': sales,
'lastFormData.flow': flow
})
const _this = this;
this.data.tabList.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
if (i.profit) {
let name = `tabList[${index}].productList[${lastIndex}].profit`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit)
this.setData({
[name]: profit,
});
}
});
});
this.setData({
visible: false
});
this.showCase()
if (!this.data.isFirst) {
wx.showToast({
title: '测算结果已在页面内同步展示',
icon: 'none',
duration: 2000
})
} else {
this.setData({
isFirst: false
})
}
},
// 计算公式,参数:productType
formula(productType, sales, flow) {
let profit = 0;
switch (productType) {
case "benefitCard":
// 数字无忧权益卡
profit = (sales * 0.5 * 2000 * 12).toFixed(0);
break;
case "sunMembrane":
// 汽车太阳膜
profit = (sales * 0.8 * 0.7 * 1500 * 12).toFixed(0);
break;
case "protectMembrane":
// 漆面保护膜
profit = (flow * 0.15 * 12000 * 12).toFixed(0);
break;
case "colorMembrane":
// 改色膜
profit = (flow * 0.05 * 5000 * 12).toFixed(0);
break;
case "digitBeauty":
// 数字化美容
profit = (sales * 0.2 * 300 * 12).toFixed(0);
break;
case "chair":
// 座椅通风
profit = (flow * 2580 * 0.9 * 0.01).toFixed(0);
break;
case "ar":
// AR导航
profit = (flow * 1680 * 0.9 * 0.015).toFixed(0);
break;
case "lamp":
// 氛围灯
profit = (flow * 2680 * 0.9 * 0.015).toFixed(0);
break;
case "navigation":
// 360全景导航
profit = (flow * 2880 * 0.9 * 0.015).toFixed(0);
break;
}
console.log(profit.length);
console.log(productType, sales, flow, profit);
if (profit.length > 8) {
return (profit / 10000).toFixed(0) + "万";
} else {
return profit;
}
},
reset() {
this.setData({
isReset: false,
formData: {
sales: 100,
flow: 10000,
},
});
},
focus() {
this.setData({
isReset: true,
});
return false;
},
// 显示测算弹窗
showCalculate() {
this.setData({
visible: !this.data.visible,
isReset: false
});
},
clickDialog(e) {
console.log(e.changedTouches[0].clientY);
if (e.changedTouches[0].clientY < 352) {
this.setData({
visible: false,
isReset: false,
formData: this.data.lastFormData
});
}
},
// 跳转产品详情
goDetail(e) {
console.log(e.currentTarget.dataset.item, "===");
wx.$router.go(e.currentTarget.dataset.item);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.submit()
this.showCase()
},
showCase() {
console.log(Util.getUserInfo())
if (Util.getUserInfo() && Util.getUserInfo().phone) {
this.setData({
hasPhoneNumber: true,
productList: this.data.tabList[this.data.tabActive].productList,
});
} else {
this.setData({
productList: this.data.tabList[this.data.tabActive].productList.slice(
0,
2
),
});
}
},
// 更新手机号
updatePhoneNumber(e) {
if (e.detail) {
this.setData({
hasPhoneNumber: true,
productList: this.data.tabList[this.data.tabActive].productList,
});
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
});
<!--pages/addValue/addValue/addValue.wxml-->
<page-meta page-style="overflow: {{visible ? 'hidden' : 'visible'}}" />
<view class="wrapper-banner">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/dijia/banner.png?v={{img_version}}"></image>
<view class="banner-title">我们的产品和服务</view>
<view class="banner-after"></view>
</view>
<view class="tab-list">
<block wx:for="{{tabList}}" wx:key="index" class="">
<view class="tab-item {{tabActive == index ? 'tab-active' : ''}}" data-index="{{index}}" bindtap="tabChange">
<image class="tab-img" webp src="{{IMGURL}}image/dijia/{{tabActive == index ? item.active : item.img}}.png?v={{img_version}}"></image>
<view class="tab-name {{tabActive == index ? 'name-active' : ''}}">{{item.name}}</view>
</view>
</block>
</view>
<!-- 阶段玩法 -->
<view class="tab-play">
<image mode="widthFix" class="default-img" lazy-load webp src="{{IMGURL}}image/dijia/{{tabList[tabActive].playImg}}.png?v={{img_version}}"></image>
<image class="play-img play-img1" lazy-load webp src="{{IMGURL}}image/dijia/{{tabList[tabActive].playImg}}-text1.png?v={{img_version}}"></image>
<image class="play-img play-img2" lazy-load webp src="{{IMGURL}}image/dijia/{{tabList[tabActive].playImg}}-text2.png?v={{img_version}}"></image>
<image class="play-img play-img3" lazy-load webp src="{{IMGURL}}image/dijia/{{tabList[tabActive].playImg}}-text3.png?v={{img_version}}"></image>
</view>
<!-- 特色产品 -->
<view class="product-box">
<view class="product-title">特色产品</view>
<view class="product-tips">一站式解决用户全生命周期各类产品需求</view>
<view class="product-list">
<block wx:for="{{productList}}" wx:key="ind">
<view class="product-item" bindtap="goDetail" data-item="{{item.path}}">
<image webp src="{{IMGURL}}image/dijia/{{item.img}}.png?v={{img_version}}"></image>
<view class="product-content">
<view class="product-type {{typeObj[item.type].class}}">{{typeObj[item.type].name}}</view>
<view class="product-name">{{item.proName}}</view>
<view class="product-price" wx:if="{{item.profit}}">
<view class="product-label">预估收益</view>
<view class="product-value price">¥{{item.profit}}</view>
</view>
<view class="product-price" wx:else>
<view class="product-disabled">暂无预估收益</view>
</view>
<view class="product-introduce">
{{item.profit ? '产品介绍' : '敬请期待'}}
<image wx:if="{{item.profit}}" class="icon-arrow" webp src="{{IMGURL}}image/dijia/icon-arrow.png?v={{img_version}}"></image>
</view>
</view>
</view>
</block>
</view>
<view wx:if="{{!hasPhoneNumber}}" class="understand-more">
<phone-number class="more-btn" bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
</view>
<!-- 案例视频 -->
<block wx:if="{{hasPhoneNumber}}">
<view class="video-bg" wx:if="{{tabList[tabActive].videoList.length}}">
<view class="video-title">案例视频</view>
<view class="video-list">
<block wx:for="{{tabList[tabActive].videoList}}" wx:key="i">
<view class="video-item">
<!-- -->
<video poster="{{IMGURL}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{IMGURL}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></video>
<view class="video-text">{{item.name}}</view>
</view>
</block>
<view class="video-tips">- 如需开通请咨询客服 -</view>
</view>
</view>
</block>
<!-- 测算按钮 -->
<view class="calculate" bindtap="showCalculate">
<image class="icon-calculate" webp src="{{IMGURL}}image/dijia/icon-calculate.png?v={{img_version}}"></image>
</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>
<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>
\ No newline at end of file
/* pages/addValue/addValue/addValue.wxss */
/* tab样式 */
.img {
width: 100%;
}
.wrapper-banner {
position: relative;
}
.banner-title {
position: absolute;
top: 64rpx;
text-align: center;
width: 100%;
font-size: 48rpx;
color: #ffffff;
line-height: 64rpx;
}
.banner-after {
position: absolute;
top: 152rpx;
left: 50%;
transform: translateX(-50%);
background-color: #D8D8D8;
width: 48rpx;
height: 4rpx;
}
.tab-list {
display: flex;
font-size: 0;
}
.tab-item {
width: 25%;
text-align: center;
padding: 20rpx 0;
font-size: 0;
height: 144rpx;
box-sizing: border-box;
}
.tab-active {
position: relative;
}
.tab-active {
background-color: #5850FF;
}
.tab-active::after {
content: '';
display: inline-block;
width: 0;
height: 0;
position: absolute;
top: 144rpx;
left: 50%;
transform: translateX(-50%);
border: 16rpx solid;
border-color: #5850FF transparent transparent transparent;
z-index: 1;
}
.tab-img {
width: 56rpx;
height: 56rpx;
}
.tab-name {
font-size: 28rpx;
color: #6E6E7A;
line-height: 44rpx;
margin-top: 4rpx;
}
.name-active {
color: #fff;
font-weight: 500;
}
/* 阶段玩法样式 */
.tab-play {
position: relative;
padding: 44rpx 24rpx 112rpx;
width: clac(100% - 48rpx);
height: 1236rpx;
background: #2D28A8;
background-image: linear-gradient(180deg, #2D28A8 0%, #201F38 100%);
}
.play-img {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 606rpx
}
.play-img1 {
height: 240rpx;
top: 292rpx;
}
.play-img2 {
height: 424rpx;
top: 548rpx;
}
.play-img3 {
height: 244rpx;
top: 988rpx;
}
/* 特色产品 */
.product-box {
position: relative;
width: 100%;
background-color: #fff;
/* height: 500rpx; */
}
.product-title {
position: relative;
font-size: 48rpx;
color: #2D2D33;
line-height: 64rpx;
text-align: center;
letter-spacing: 0;
padding: 96rpx 0 28rpx;
font-weight: 900;
}
.product-title::after {
content: '';
display: block;
width: 48rpx;
height: 4rpx;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: #5850FF;
}
.product-tips {
margin-top: 32rpx;
text-align: center;
font-size: 28rpx;
color: #9E9EA8;
}
.product-list {
display: flex;
flex-wrap: wrap;
padding: 64rpx 32rpx 128rpx;
width: 100%;
box-sizing: border-box;
}
.product-item {
width: calc(50% - 12rpx);
/* height: 536rpx; */
background-color: #FAFAFA;
box-shadow: 0 8rpx 20rpx 0 rgba(180,186,204,0.32);
border-radius: 16rpx;
margin-bottom: 32rpx;
box-sizing: border-box;
}
.product-item:nth-child(even) {
margin-left: 22rpx;
}
.product-item image {
width: 100%;
height: 200rpx;
}
.product-content {
padding: 32rpx 24rpx;
}
.product-type {
display: inline-block;
/* background-color: #EAE9FF; */
border-radius: 4rpx;
font-weight: 500;
font-size: 24rpx;
/* color: #5851FF; */
padding: 4rpx 16rpx;
}
.beauty-color {
background-color: #EAE9FF;
color: #5851FF;
}
.light-color {
background-color: #D7F5E5;
color: #21AB60;
}
.service-color {
background-color: #FFE7CD;
color: #EF971E;
}
.membrane-color {
background-color: #E3ECFF;
color: #4E87FB;
}
.product-name {
font-weight: 500;
font-size: 32rpx;
color: #2D2D33;
line-height: 40rpx;
margin-top: 24rpx;
margin-bottom: 32rpx;
}
.product-price {
display: flex;
font-size: 24rpx;
color: #6E6E7A;
line-height: 40rpx;
}
.product-price:first-child {
margin-top: 8rpx;
}
.product-value {
color: #333333;
margin-left: 16rpx;
flex: 1;
}
.product-label {
width: 96rpx;
}
.price {
font-weight: Bold;
font-size: 28rpx;
color: #5850FF;
}
.product-introduce {
display: flex;
align-items: center;
margin-top: 24rpx;
font-size: 24rpx;
color: #9E9EA8;
line-height: 40rpx;
}
.product-introduce .icon-arrow {
width: 32rpx;
height: 32rpx;
}
.product-disabled {
color: #9E9EA8;
font-size: 24rpx;
}
/* 案例视频 */
.video-bg {
width: 100%;
/* height: 500rpx; */
background-color: #201F38;
}
.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: 80rpx 32rpx;
font-size: 0;
}
.video-item {
width: calc(50% - 12rpx);
margin-bottom: 80rpx;
}
.video-item video {
width: 100%;
height: 588rpx;
}
.video-item:nth-child(even) {
margin-left: 22rpx;
}
.video-text {
font-size: 32rpx;
color: #FFFFFF;
line-height: 48rpx;
margin-top: 24rpx;
}
.video-tips {
width: 100%;
text-align: center;
font-size: 28rpx;
color: rgba(255,255,255,.6);
padding: 16rpx 0 92rpx;
}
/* 测算 */
.calculate {
position: fixed;
right: 16rpx;
bottom: 160rpx;
}
.icon-calculate {
width: 216rpx;
height: 228rpx;
}
/* 测算弹窗 */
.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: 744rpx;
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;
background-image: linear-gradient(179deg, rgba(123,112,255,0.02) 15%, rgba(99,92,255,0.10) 100%);
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 216rpx;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
margin-left: 64rpx;
margin-right: 16rpx;
}
.form-unit {
font-size: 28rpx;
color: #6E6E7A;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #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;
}
/* 了解更多 */
.understand-more {
position: absolute;
bottom: 0;
width: 100%;
height: 700rpx;
background-image: linear-gradient(180deg, rgba(255,255,255,0.00) 0%, #FFFFFF 68%);
border-radius: 0 0 12rpx 12rpx;
}
.understand-more .more-btn {
width: 100%;
position: absolute;
bottom: 104rpx;
}
var tabList = [
{
name: '新车销售期',
img: 'icon-car1',
active: 'icon-car11',
playImg: 'img1',
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '1500',
// profit: '92.4万',
profit: '9,999,999',
type: 'service',
productType: 'benefitCard',
path: 'equity'
},
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '1500',
profit: '1008万',
type: 'membrane',
productType: 'sunMembrane',
path: 'solarFilm'
}
],
videoList: [
{
videoUrl: 'digital_card_30s',
posterUrl: 'digital_card_30s_bitmap',
name: '数字无忧卡服务30秒'
},
{
videoUrl: 'digital_card',
posterUrl: 'digital_card_bitmap',
name: '数字无忧卡服务'
},
{
videoUrl: 'digital_card_money3',
posterUrl: 'digital_card_money3_bitmap',
name: '数字无忧卡3道钱'
},
{
videoUrl: 'digital_card_reason6',
posterUrl: 'digital_card_reason6_bitmap',
name: '数字无忧卡6大理由'
},
{
videoUrl: 'solar',
posterUrl: 'solar_bitmap',
name: '太阳膜转化售中案例'
}
]
},
{
name: '0-12个月',
img: 'icon-car2',
active: 'icon-car21',
playImg: 'img2',
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '12000',
profit: '216万',
type: 'membrane',
productType: 'protectMembrane',
path: 'paintProtect'
},
{
img: 'product-img4',
proName: '改色膜',
price: '5000',
profit: '30万',
type: 'membrane',
productType: 'colorMembrane',
path: 'changingFilm'
}
]
},
{
name: '12-36个月',
img: 'icon-car3',
active: 'icon-car31',
playImg: 'img3',
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty',
path: 'carBeauty'
},
{
img: 'product-img6',
proName: '座椅通风',
price: '1500',
profit: '1008万',
type: 'light',
productType: 'chair',
path: 'seatVentilate'
},
{
img: 'product-img7',
proName: 'AR导航',
price: '1680',
profit: '22.68万',
type: 'light',
productType: 'ar',
path: 'arNavigation'
},
{
img: 'product-img8',
proName: '氛围灯',
price: '2680',
profit: '36.18万',
type: 'light',
productType: 'lamp',
path: 'ambientLighting'
},
{
img: 'product-img9',
proName: '360全景导航',
price: '2880',
profit: '38.88万',
type: 'service',
productType: 'navigation',
path: 'navigationArround'
}
],
videoList: [
{
videoUrl: 'seat',
posterUrl: 'seat_bitmap',
name: '座椅通风系统'
},
{
videoUrl: 'AR',
posterUrl: 'AR_bitmap',
name: '单品AR导航'
},
{
videoUrl: 'light',
posterUrl: 'light_bitmap',
name: '单品类氛围灯'
},
{
videoUrl: '360_AR',
posterUrl: '360_AR_bitmap',
name: '360全景导航'
}
]
},
{
name: '36个月以上',
img: 'icon-car4',
active: 'icon-car41',
playImg: 'img4',
productList: [
{
img: 'product-img10',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty',
path: 'lossPhase'
},
{
img: 'product-img11',
proName: '车险续保',
price: '2500',
profit: '',
type: 'service'
},
{
img: 'product-img12',
proName: '金融车贷',
price: '200000',
profit: '',
type: 'service'
}
]
}
]
var tabList1 = [
{
name: '新车交付',
img: 'icon-car1',
active: 'icon-car11',
playImg: 'img1',
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '1500',
// profit: '92.4万',
profit: '99999999万',
type: 'service',
productType: 'benefitCard'
},
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '1500',
profit: '1008万',
type: 'membrane',
productType: 'sunMembrane'
}
]
},
{
name: '0-12个月',
img: 'icon-car2',
active: 'icon-car21',
playImg: 'img2',
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '12000',
profit: '216万',
type: 'membrane',
productType: 'protectMembrane'
},
{
img: 'product-img4',
proName: '改色膜',
price: '5000',
profit: '30万',
type: 'membrane',
productType: 'colorMembrane'
}
]
},
{
name: '12-36个月',
img: 'icon-car3',
active: 'icon-car31',
playImg: 'img3',
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty'
},
{
img: 'product-img6',
proName: '座椅通风',
price: '1500',
profit: '1008万',
type: 'light',
productType: 'chair'
}
]
},
{
name: '36个月以上',
img: 'icon-car4',
active: 'icon-car41',
playImg: 'img4',
productList: [
{
img: 'product-img10',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty'
},
{
img: 'product-img11',
proName: '车险续保',
price: '2500',
profit: '',
type: 'service'
}
]
}
]
export default {
tabList
}
\ No newline at end of file
import WxValidate from "../../utils/WxValidate"
// pages/applicationAccount/applicationAccount.js
Page({
/**
* 页面的初始数据
*/
data: {
accountForm: {
applyName: '',
telphone: '',
concerContent: '',
bussinessName: '',
province: []
}
},
// 表单验证规则
initValidate() {
const rules = {
applyName: {
required: true
},
telphone: {
required: true
},
bussinessName: {
required: true
},
province: {
required: true
}
}
const messages = {
applyName: {
required: '请填写申请人名称',
},
telphone: {
required: '请填写联系电话'
},
bussinessName: {
required: '请填写企业/门店名称'
},
province: {
required: '请选择省市'
}
}
this.WxValidate = new WxValidate(rules, messages)
},
//报错
showModal(error) {
wx.showToast({
title: error.msg,
icon: 'none',
})
},
// 提交表单
submitAccount(e) {
console.log(e);
const params = e.detail.value
// 校验表单
if(!this.WxValidate.checkForm(params)) {
const error = this.WxValidate.errorList[0]
this.showModal(error)
return false
}
this.showModal({
msg: '提交成功'
})
},
// 选择省市
bindRegionChange(e) {
console.log(e.detail.value);
this.setData({
"accountForm.province": e.detail.value
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 初始化验证规则函数
this.initValidate()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/applicationAccount/applicationAccount.wxml-->
<view class="apply-account">
<view class="apply-top">
<image class="apply-background" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/apply-background.png" bindload="imgSuccess" data-name="logo"></image>
<view class="apply-title">免费申请体验账号</view>
<button class="add-btn" plain="true">
<image class="apply-code" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/OR-code.png" bindload="imgSuccess" data-name="logo"></image>
添加体验专员
</button>
</view>
<form class="apply-box" bindsubmit="submitAccount">
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">申请人<text class="require"> *</text></text>
<input name="applyName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的姓名' value="{{parternerForm.applyName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系电话<text class="require"> *</text></text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的联系电话' value="{{parternerForm.telphone}}"></input>
</view>
<picker mode="region" value="{{accountForm.province}}" bindchange="bindRegionChange">
<view class='info-list'>
<text class="info-lable">所在省市<text class="require"> *</text></text>
<block wx:if="{{!accountForm.province.length}}">
<view class="province-placeholder">请选择</view>
</block>
<block wx:else>
<view>{{accountForm.province}}</view>
</block>
</view>
</picker>
<view class='info-list'>
<text class="info-lable">企业名称<text class="require"> *</text></text>
<input name="bussinessName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的企业/门店名称' value="{{parternerForm.bussinessName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">关注内容</text>
<textarea name="concerContent" class="concer-content" placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您关注的内容(选填)' maxlength="200" value="{{parternerForm.concerContent}}"></textarea>
</view>
</view>
<button class="submit-btn" form-type="submit">
提交申请
</button>
</form>
<view class="contact-inline">
</view>
</view>
/* pages/applicationAccount/applicationAccount.wxss */
.apply-account {
position: relative;
}
.apply-top {
position: relative;
text-align: center;
}
.apply-background {
width: 100%;
}
.apply-title {
font-family: AlibabaPuHuiTiB;
font-weight: 600;
font-size: 56rpx;
color: #2D2D33;
position: absolute;
top: 128rpx;
left: 182rpx;
}
.apply-code {
width: 32rpx;
height: 32rpx;
vertical-align: middle;
}
.add-btn {
width: 260rpx;
height: 72rpx;
border: 2rpx solid #5850FF !important;
border-radius: 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF !important;
padding-left: 14rpx;
padding-right: 14rpx;
position: absolute;
top: 252rpx;
left: 244rpx;
}
.apply-box {
width: 702rpx;
height: 864rpx;
background: #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(202,211,230,0.40);
border-radius: 12rpx;
margin: 0 auto;
margin-bottom: 30rpx;
position: absolute;
top: 420rpx;
left: 24rpx;
}
.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;
}
.concer-content {
height: 170rpx;
overflow: auto;
}
textarea {
width: 475rpx !important;
}
.province-placeholder {
font-size:28rpx;
color: #9E9EA8;
}
.submit-btn {
width: 622rpx;
height: 80rpx;
background: #5850FF;
border-radius: 8rpx;
margin-top: 40rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
font-family: PingFangSC-Medium;
line-height: 80rpx;
}
.contact-inline {
width: 50rpx;
height: 50rpx;
background-color: aqua;
position: absolute;
right: 10rpx;
top: 930rpx;
}
\ No newline at end of file
// pages/applicationPartener/applicationPartener.js
import WxValidate from "../../utils/WxValidate"
Page({
/**
* 页面的初始数据
*/
data: {
parternerForm: {
applyName: '',
telphone: '',
province: []
}
},
// 表单验证规则
initValidate() {
const rules = {
applyName: {
required: true
},
telphone: {
required: true
},
province: {
required: true
}
}
const messages = {
applyName: {
required: '请填写申请人名称',
},
telphone: {
required: '请填写联系电话'
},
province: {
required: '请选择省市'
}
}
this.WxValidate = new WxValidate(rules, messages)
},
//报错
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
})
},
// 提交表单
submitParterner(e) {
console.log(e);
const params = e.detail.value
// 校验表单
if(!this.WxValidate.checkForm(params)) {
const error = this.WxValidate.errorList[0]
this.showModal(error)
return false
}
this.showModal({
msg: '提交成功'
})
// 跳转申请成功页面
wx.$router.go("applySuccess");
},
// 选择省市
bindRegionChange(e) {
console.log(e.detail.value);
this.setData({
"parternerForm.province": e.detail.value
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 初始化验证规则函数
this.initValidate()
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "合作申请"
}
\ No newline at end of file
<!--pages/applicationPartener/applicationPartener.wxml-->
<view class="apply-partener">
<view class="apply-top">
<image class="apply-background" mode="widthFix" webp src="{{IMGURL}}home/apply-background.png" bindload="imgSuccess" data-name="logo"></image>
<view class="apply-title">申请城市合伙人</view>
<!-- <button class="add-btn" plain="true">
<image class="apply-code" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/OR-code.png" bindload="imgSuccess" data-name="logo"></image>
添加合伙人专员
</button> -->
</view>
<form class="apply-box" bindsubmit="submitParterner">
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">申请人<text class="require"> *</text></text>
<input name="applyName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的姓名' value="{{parternerForm.applyName}}"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系电话<text class="require"> *</text></text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您的联系电话' value="{{parternerForm.telphone}}"></input>
</view>
<picker mode="region" name="province" value="{{parternerForm.province}}" bindchange="bindRegionChange">
<view class='info-list'>
<text class="info-lable">所在省市<text class="require"> *</text></text>
<view class="province-box">
<view>
<block wx:if="{{!parternerForm.province.length}}">
<view class="province-placeholder">请选择</view>
</block>
<block wx:else>
<view>{{parternerForm.province}}</view>
</block></view>
<view class="province-icon"></view>
</view>
</view>
</picker>
<!-- <view class='info-list'>
<text class="info-lable">关注内容</text>
<textarea name="concerContent" class="concer-content" placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='您关注的内容(选填)' maxlength="200" value="{{parternerForm.concerContent}}"></textarea>
</view> -->
</view>
<button class="submit-btn" form-type="submit">
提交申请
</button>
</form>
</view>
\ No newline at end of file
/* pages/applicationPartener/applicationPartener.wxss */
.apply-partener {
position: relative;
}
.apply-top {
position: relative;
text-align: center;
}
.apply-background {
width: 100%;
}
.apply-title {
font-family: AlibabaPuHuiTiB;
font-weight: 600;
font-size: 56rpx;
color: #2D2D33;
position: absolute;
top: 160rpx;
left: 182rpx;
}
.apply-code {
width: 28rpx;
height: 28rpx;
vertical-align: middle;
}
.add-btn {
width: 284rpx;
height: 72rpx;
border: 2rpx solid #5850FF !important;
border-radius: 8rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #5850FF !important;
padding-left: 14rpx;
padding-right: 14rpx;
position: absolute;
top: 512rpx;
left: 232rpx;
}
.apply-box {
width: 702rpx;
height: 640rpx;
background: #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(202,211,230,0.40);
border-radius: 12rpx;
margin: 0 auto;
margin-bottom: 30rpx;
position: absolute;
top: 420rpx;
left: 24rpx;
}
.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;
}
.concer-content {
height: 170rpx;
overflow: auto;
}
.province-box {
width: 460rpx;
display: flex;
justify-content: space-between;
position: relative;
}
.province-icon {
width: 10rpx;
height: 10rpx;
transform: rotate(135deg);
border-top: 1px solid #9E9EA8;
border-left: 1px solid #9E9EA8;
position: absolute;
top: 12rpx;
right: 3rpx;
}
.province-placeholder {
font-size:28rpx;
color: #9E9EA8;
}
textarea {
width: 475rpx !important;
}
.submit-btn {
width: 622rpx;
height: 80rpx;
background: #5850FF;
border-radius: 8rpx;
margin-top: 160rpx;
text-align: center;
font-size: 28rpx;
color: #FFFFFF;
font-weight: 500;
font-family: PingFangSC-Medium;
line-height: 80rpx;
}
// pages/applySuccess/applySuccess.js
Page({
/**
* 页面的初始数据
*/
data: {
},
toBack() {
wx.navigateBack({
delta: 2,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "活动申请"
}
\ No newline at end of file
<!--pages/applySuccess/applySuccess.wxml-->
<view class="success-box">
<view>
<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>
<button class="share-btn" bindtap="toBack">
返回首页
</button>
</view>
/* pages/applySuccess/applySuccess.wxss */
.success-box {
text-align: center;
}
.success-img {
width: 448rpx;
height: 192rpx;
margin-top: 192rpx;
}
.success-title {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 56rpx;
color: #2D2D33;
margin: 80rpx 0 32rpx;
}
.success-text {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #333333;
line-height: 48rpx;
}
.share-btn {
width: 622rpx;
height: 80rpx;
font-size: 28rpx;
color: #5850FF;
border-radius: 8rpx;
line-height: 80rpx;
margin-top: 208rpx;
border: 2rpx solid #9B96FF;
background-color: #fff;
}
\ No newline at end of file
// pages/checkProduct/checkProduct.js
// const navStyle = "background-color: transparent;";
const navStyle = "background-color: #fff";
import { senceData } from "~/pages/scene/constant/data.js";
// import { IMG_URL } from "~/utils/constantData.js";
// import { productBysceneApi } from '~/api/index.js'
import Draw from "~/utils/Draw_new.js";
import { createQrCodeApi, sceneByIdApi } from "~/api/checkProduct.js";
import utils from "~/utils/util.js";
import {trackData, productTrack} from '../../utils/data'
let IMG_URL = wx.$imgUrl
Page({
/**
* 页面的初始数据
*/
noPageAuth: true,
data: {
navStyle,
headerHeight: 0,
senceData,
// 模态框
isShow: false,
// IMG_URL: `${IMG_URL}index`,
btnList: [
{
src: `${IMG_URL}index/down.png`,
name: "下载海报",
},
{
src: `${IMG_URL}index/wechat.png`,
name: "转发给好友",
},
// {
// src: `${IMG_URL}index/moments.png`,
// name: "朋友圈分享",
// },
],
// 4种场景下图片所有的高 (单位 rpx)
imgHeightArr: [
[1110, 1290, 596, 744, 490, 1532],
[2168, 1290, 596, 830, 490, 752],
[1110, 1290, 596, 984, 490],
[678, 1266, 1398, 830, 490, 1666],
],
posterUrl: "", //海报url
noVideoimgList: [],
//分享相关
isShare: false,
// 是否授权昵称
hasUserInfo: false,
phone: "", //授权手机号
userInfo: "",
isAuthphone: true, //授权昵称弹窗显示,更多按钮显示
},
observers: {
actNum: function (actNum) {
let imgList = [
`${IMG_URL}index/scene${actNum + 1}1.png`,
`${IMG_URL}index/scene${actNum + 1}2.png`,
`${IMG_URL}index/scene${actNum + 1}3.png`,
`${IMG_URL}index/scene${actNum + 1}4.png`,
`${IMG_URL}index/scene${actNum + 1}5.png`,
];
this.setData({
noVideoimgList: imgList,
});
if (actNum != 2) {
imgList.push(`${IMG_URL}index/scene${actNum + 1}6.png`);
}
this.setData({
imgList,
});
},
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail;
this.setData({
headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight,
// headerHeight: height / 2 + statusBarHeight + 88 * 2,
});
// console.log(e)
// console.log(this.data.headerHeight)
},
// 分项弹框关闭
modelcloseFn(e) {
this.setData({
isShow: false,
});
},
// 分享按钮
sharehandle() {
this.setData({
isShow: true,
});
},
//如果是直接查看页面,获取合成apiData
getData() {
console.log(123456)
// 看产品
this.compositionData(senceData, [])
// productBysceneApi().then(res => {
// let { code, data } = res
// if (code == 0 && data) {
// // this.setData({
// // apiData: data
// // })
// this.compositionData(senceData, data)
// // this.getFirstSenceIndex();
// }
// })
},
//接口数据,本地数据对接
compositionData(localData, apiData) {
localData.forEach((item, index) => {
apiData.forEach((inner, idx) => {
if (item.name == inner.stage) {
item.sceneStatus = inner.sceneStatus
item.productList.forEach((outChild, outIndex) => {
inner.productList.forEach((innerChild, innerIndex) => {
if (outChild.proName == innerChild.productName) {
outChild.productStatus = innerChild.productStatus
}
})
})
}
})
})
// console.log('localData, apiData: ', localData);
this.setData({
senceData: localData
})
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
console.log("分享options: ", options);
if (!options || utils.isEmptyObj(options)) return;
// if(!Object.keys(options).includes('actNum'))return
let {senceData} = this.data
//选中场景的index,和产品的index
let {
actNum,
activeNavIdx,
// apiData,
outshowVideo,
isShow
// origin //跳转来源 home
} = options;
// if(actNum&&activeNavIdx)return
// 设置标题
let userInfoObj = wx.$storage.get('userInfo')
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
let name
if (userInfoObj.name) {
name = userInfoObj.name
}else if(userInfoObj.merchantName){
name = userInfoObj.merchantName
}else if(userInfoObj.merchantName){
//全称
name = userInfoObj.merchantName
}
this.shareTitle = `${name}给你分享一个活动${senceData[actNum]?.productList[activeNavIdx].proName},戳我参与~`;
// this.getImgInfo(actNum)
this.setData({
actNum,
activeNavIdx,
// apiData,
outshowVideo,
isShow
// origin
// isShare
});
// let apiDataJson = JSON.stringify(apiData);
let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${senceData[actNum].sceneCode}&productCode=${
item?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${
item?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`;
this.shareTrackData = {
sceneCode: senceData[actNum]?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
// actNum,
// activeNavIdx,
// apiData,
};
},
// 分享按钮
handleClick(e) {
let { index } = e.currentTarget.dataset;
let _this = this
switch (index) {
case 0:
wx.showModal({
content: '确认下载海报?',
success: async (res) => {
if(res.confirm){
// let hasAuth = await _this.toSetting()
// if(hasAuth){
_this.download()
// }
}
},
fail: (res) => {},
complete: (res) => {},
})
// this.download();
break;
case 1:
this.wechatFn();
break;
}
},
//授权添加相册
toSetting(){
return new Promise((resolve,reject)=>{
wx.getSetting({
success: (res)=> {
if(res.authSetting['scope.writePhotosAlbum']){
resolve(true)
}else{
wx.openSetting({
success :(resp)=> {
if(resp.authSetting['scope.writePhotosAlbum']){
resolve(true)
}else{
wx.showToast({
title: "下载海报前需要您授权'添加到相册'权限",
icon: "none",
duration: 2500,
});
}
}
})
}
}
})
})
},
// 微信转发
wechatFn() {
// this.data.onShareAppMessage()
// this.modelcloseFn();
},
// 下载海报
async download() {
let { actNum, activeNavIdx, imgHeightArr ,imgPath} = this.data;
const { appId } = wx.getAccountInfoSync().miniProgram
let { userInfo } = wx.$storage.get()
// let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info.appId);
wx.showLoading({
title: "海报生成中...",
});
let params = {
actNum,
activeNavIdx,
isShare: true,
};
// console.log(' wx_user_info.appId', wx_user_info)
let res = await createQrCodeApi({
appId: appId,
// appId:'wx2c28337db96364d2',
path: "pages/checkProduct/checkProduct",
scene: JSON.stringify(params),
});
let _this = this;
wx.getImageInfo({
src: imgPath,
success: async (respp) => {
let imgW = respp.width/4, imgH =respp.height/4;
let pradH = 288*imgW/1029, qrcodeH = 100;
let drawFun = new Draw({
width: imgW ,
height: imgH + pradH
});
console.log('actNum',actNum)
let qrcodeY = actNum== 2 ? 20 : 0
let arr = [456, 222, 0, 496];
let imgList = [
{
x: 0,
y: 0,
width: imgW,
height: pradH,
url: `${IMG_URL}index/canvas/${senceData[actNum].productList[activeNavIdx].img}.png`,
},
{
x: 0,
y: pradH,
width: imgW,
height: imgH,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
},
{
// x: 245 * 2,
// y: erCodeHeight + 30,
// width: 120 * 2,
// height: 120 * 2,
x: imgW-qrcodeH,
y: imgH + pradH -qrcodeH -20,
width: qrcodeH,
height: qrcodeH,
url: res.data, //二维码
},
];
let telephone = userInfo.phone?userInfo.phone:''
let textList = [
{
x: 22,
y: imgH + pradH - 25,
text: `联系我:${telephone}`,
color: '#323436',
fontSize: 10
}
]
// console.log(imgList)
let posterUrl = await drawFun.begin({
imageList: imgList,
textList
});
_this.setData({
posterUrl: posterUrl.path,
});
console.log("posterUrl.path", posterUrl.path);
if (_this.data.posterUrl) {
wx.saveImageToPhotosAlbum({
filePath: _this.data.posterUrl, //仅为示例,并非真实的资源
success(res) {
console.log("res: ", res);
wx.showToast("下载成功!");
},
});
}
// _this.modelcloseFn();
wx.hideLoading()
},
});
},
// //模态框关闭
// modelClose() {
// this.triggerEvent("modelclose", false);
// },
// 图片加载事件
// onloadFn(event) {
// // console.log("event.detail", event.detail);
// this.setData({
// imgHeight: event.detail.height / 5,
// imgWidth: event.detail.width / 5,
// });
// },
// 图片视频加载回调拿到url
getImgInfo(actNum){
wx.showLoading({
title: "加载中",
});
let _this = this;
wx.getImageInfo({
src: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/longpic${
actNum + 1
}.png`,
success: async (res) => {
console.log('res: ', res)
wx.hideLoading()
wx.nextTick(() => {
_this.setData({
// isShow: true,
imgPath:res.path
})
})
}
})
},
// 分享获取懂得用户数
authorizedFn(e) {
let res = e.detail;
this.onLoad(null);
wx.nextTick(() => {
//储存手机号
// console.log("储存手机号",res.phone)
wx.$storage.set("authphone", res.phone);
this.setData({
// isShare: res.isShare,
phone: res.phone,
});
});
},
/**
* 生命周期函数--监听页面加载 (扫码,分享链接)
*/
async onLoad(options) {
console.log(wx.getEnterOptionsSync())
await this.getData()
console.log("分享options12255565: ", options);
// actNum,activeNavIdx isShare
if (!options || utils.isEmptyObj(options)) return;
// this.analysisOption();
// 解析二维码参数
if (options.scene) {
this.setData({
isShare: true,
});
let ercodeParams = await this.analysisQRcode(options.scene);
options = JSON.parse(ercodeParams.scene)
}
let {senceData} = this.data
// 扫码进来
let { actNum, activeNavIdx, isShare } = options;
// const { query: {cardId, merchant} } = wx.getEnterOptionsSync()
const { query, query: {cardId, merchant} } = wx.getEnterOptionsSync()
console.log('actNum, activeNavIdx, isShare: ', actNum, activeNavIdx, isShare);
if (isShare) {
this.setData({
isShow: false,
});
if (cardId) {
wx.$trackData = query
getApp()
.login()
.then(({ data }) => {
const trackName = productTrack[actNum][activeNavIdx]
wx.$Track.sendTrack(trackData[trackName]);
});
}
} else {
wx.showLoading({
title: "加载图片中",
});
}
this.setData({
actNum,
activeNavIdx,
isShare: true,
outshowVideo: false, //显示视频列表
});
// 发请求
console.log()
let senceItem = senceData[actNum];
let item = senceData[actNum]?.productList[activeNavIdx];
this.shareQuery = `sceneCode=${senceItem?.sceneCode}&productCode=${
item?.productCode
}&isShare=${true}&productDesc=${item?.productName}&category=${
item?.category
}&actNum=${actNum}&activeNavIdx=${activeNavIdx}`;
this.shareTrackData = {
sceneCode: senceItem?.sceneCode,
productCode: item?.productCode,
productName: item?.productName,
category: item?.category,
productDesc: item?.productName,
// actNum,
// activeNavIdx,
};
// 有手机号就不用再一次授权昵称,手机号
let phone = wx.$storage.get("authphone");
console.log("储存手机号", phone);
if (phone) {
this.setData({
isAuthphone: false,
outshowVideo: true,
isShare:false,
});
}
},
// 解析二维码回调
// async analysisOption() {},
// 解析扫码进来参数
async analysisQRcode(str) {
let id = str.split("%3D")[1];
let res = await sceneByIdApi({
id,
});
// console.log('res: ', res);
return res;
},
// 获取用户昵称
getUserProfile(e) {
this.setData({
hasUserInfo: true,
});
let _this = this;
// 推荐使用 wx.getUserProfile 获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
desc: "用于完善资料", // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (res) => {
// console.log('res: ', res.userInfo.nickName);
// userInfo.nickName
this.setData({
userInfo: res.userInfo,
});
let wx_user_info = wx.$storage.get("wx_user_info");
// console.log('wx_user_info: ', wx_user_info);
let obj = {
...wx_user_info,
nickName: res.userInfo.nickName,
avatarUrl: res.userInfo.avatarUrl,
};
// console.log('obj',obj)
wx.$storage.set("wx_user_info", obj);
_this.onLoad(null);
},
});
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
// console.log("滚动结束");
wx.$eventbus.emit('evt_page_scroll',{scrollTop:e.scrollTop})
}, 500);
};
})(),
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow(options) {
// wx.nextTick(()=>{
// let {senceData ,actNum, activeNavIdx} = this.data
// console.log('senceData: ', senceData,actNum,activeNavIdx);
// let item = senceData[actNum]?.productList[activeNavIdx].proName;
// console.log('item: ', item);
// wx.setNavigationBarTitle({
// title: item.proName,
// })
// })
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
let {senceData,actNum,activeNavIdx,isShare} = this.data
let product = senceData[actNum]?.productList[activeNavIdx].proName
let merchant = wx.$storage.get("scene").merchant
const cardId = wx.$storage.get('scene').cardId
console.log('product: ', product);
return {
// title: `给你分享一个活动${product},戳我参与~`,
title: `给你分享一个活动,戳我参与~`,
path:`/pages/checkProduct/checkProduct?actNum=${actNum}&activeNavIdx=${activeNavIdx}&isShare=${isShare}&cardId=${cardId}&merchant=${merchant}&shareType=SHARE_D`
}
},
/**
* 浏览埋点
*/
onShareTimeline() {},
onViewTrack: true,
});
{
"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
// 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.$storage.get("scene").cardId
params.merchant = wx.$storage.get("scene").merchant || wx.$storage.get("scene").merchantId
params.openId = wx.$storage.get('aicard_info').openId
params.unionId = wx.$storage.get('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 {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.LIGHT)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "氛围灯"
}
\ No newline at end of file
<!--氛围灯-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative bg_img">
<image mode="widthFix" class="img bg_img" webp src="{{IMGURL}}image/productDetail/ambientLighting/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/ambientLighting/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/ambientLighting/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/ambientLighting/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/ambientLighting/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/ambientLighting/lighe_product.png?v={{img_version}}"></image>
<view class="box-video light-video1">
<video poster="{{IMGURL}}video/light_bitmap.png?v={{img_version}}" title="单品类氛围灯" custom-cache="{{false}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/ambientLighting/ambientLighting.wxss */
.img {
width: 702rpx;
}
.bg_img {
width: 702rpx;
height: 1632rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 1092rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 1092rpx;
border-radius: 16rpx;
}
.light-video1 {
top: 204rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/arNavigation/arNavigation.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.ARNAVIGATION)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "AR导航"
}
\ No newline at end of file
<!--AR导航-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative bg_img">
<image mode="widthFix" class="bg_img" webp src="{{IMGURL}}image/productDetail/AR-navigation/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/AR-navigation/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/AR-navigation/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/AR-navigation/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/AR-navigation/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/AR-navigation/AR_product.png?v={{img_version}}"></image>
<view class="box-video navigation-video1">
<video poster="{{IMGURL}}video/AR_bitmap.png?v={{img_version}}" title="单品AR导航" custom-cache="{{false}}" src="{{IMGURL}}video/AR.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/arNavigation/arNavigation.wxss */
.img {
width: 702rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img {
width: 702rpx;
height: 1632rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 1092rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 1092rpx;
border-radius: 16rpx;
}
.navigation-video1 {
top: 212rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/carBeauty/carBeauty.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.CARBEAUTY);
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
// };
},
});
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "数字化美容"
}
\ No newline at end of file
<!--数字化美容-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative bg_img">
<image mode="widthFix" class="bg_img" webp src="{{IMGURL}}image/productDetail/carBeauty/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/carBeauty/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/carBeauty/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/carBeauty/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/carBeauty/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/carBeauty/beauty_product.png?v={{img_version}}"></image>
<view class="box-video beauty-video1">
<!-- <image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/carBeauty/beauty_bitmap.png?v={{img_version}}"></image> -->
<!-- <video poster="{{IMGURL}}image/productDetail/carBeauty/beauty_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/carBeauty/carBeauty.wxss */
.img {
width: 702rpx;
}
.bg_img {
width: 702rpx;
height: 1672rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 344rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.video_img {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.beauty-video1 {
top: 214rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/changingFilm/changingFilm.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.CHANGEFILM)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "改色膜"
}
\ No newline at end of file
<!--改色膜-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="play_bg" webp src="{{IMGURL}}image/productDetail/changingFilm/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/changingFilm/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/changingFilm/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/changingFilm/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/changingFilm/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view>
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_product.png?v={{img_version}}"></image>
<view class="box-video beauty-video1">
<!-- <image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}"></image>
<video poster="{{IMGURL}}image/productDetail/changingFilm/changing_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/changingFilm/changingFilm.wxss */
.img {
width: 702rpx;
}
.play_bg {
width: 702rpx;
height: 1672rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 344rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.video_img {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.beauty-video1 {
top: 232rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/equity/equity.js
import {
trackData
} from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
console.log(options, 'onshow')
getApp()
.login()
.then(({ data }) => {
console.log(data)
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.EQUITYCARD)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "数字无忧权益卡"
}
\ No newline at end of file
<!-- 无忧权益卡 -->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/equity/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/equity/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/equity/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/equity/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/equity/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/equity/product_instra.png?v={{img_version}}"></image>
<view class="box-video equity-video1">
<view class="video-product">
<video poster="{{IMGURL}}video/digital_card_30s_bitmap.png?v={{img_version}}" title="数字无忧卡服务30秒" custom-cache="{{false}}" src="{{IMGURL}}video/digital_card_30s.mp4?v={{img_version}}"></video>
</view>
<view class="video-product">
<video poster="{{IMGURL}}video/digital_card_money3_bitmap.png?v={{img_version}}" title="数字无忧卡3道钱" custom-cache="{{false}}" src="{{IMGURL}}video/digital_card_money3.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/equity/income_caculate.png?v={{img_version}}"></image>
<!-- 产品特色 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/equity/product_feature.png?v={{img_version}}"></image>
<view class="box-video equity-video1">
<view class="video-product">
<video poster="{{IMGURL}}video/digital_card_bitmap.png?v={{img_version}}" title="数字无忧卡服务" custom-cache="{{false}}" src="{{IMGURL}}video/digital_card.mp4?v={{img_version}}"></video>
</view>
<view class="video-product">
<video poster="{{IMGURL}}video/digital_card_reason6_bitmap.png?v={{img_version}}" title="数字无忧卡6大理由" custom-cache="{{false}}" src="{{IMGURL}}video/digital_card_reason6.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
<!-- 服务流程 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/equity/service_process.png?v={{img_version}}"></image>
<!-- 产品内容 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/equity/product_content.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/equity/equity.wxss */
.img {
width: 710rpx;
}
.play_bg {
width: 702rpx;
height: 1632rpx;
}
.box-content image {
margin-bottom: 56rpx;
}
.box-content image:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 198rpx;
}
.bg_img2 {
top: 454rpx;
}
.bg_img3 {
top: 894rpx;
}
.bg_img4 {
top: 1154rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 620rpx;
display: flex;
justify-content: space-between;
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.video-product {
width: 297rpx;
height: 525rpx;
border-radius: 16rpx;
}
.video-product video {
width: 296rpx;
height: 524rpx;
border-radius: 16rpx;
}
.equity-video1 {
top: 240rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/lossPhase/lossPhase.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.LOSSPGASE)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "流失期-数字化美容"
}
\ No newline at end of file
<!--流失期-数字化美容-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/lossPhase/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/lossPhase/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/lossPhase/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/lossPhase/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/lossPhase/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/lossPhase/loss_product.png?v={{img_version}}"></image>
<view class="box-video beauty-video1">
<image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/lossPhase/loss_bitmap.png?v={{img_version}}"></image>
<!-- <video poster="{{IMGURL}}image/productDetail/lossPhase/loss_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/lossPhase/lossPhase.wxss */
.img {
width: 702rpx;
}
.play_bg {
width: 702rpx;
height: 1672rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 344rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.video_img {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.beauty-video1 {
top: 154rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/navigationArround/navigationArround.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.NAVIGATIONARROUND)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "360全景导航"
}
\ No newline at end of file
<!--360全景导航-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/navigation-360/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/navigation-360/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/navigation-360/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/navigation-360/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/navigation-360/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/navigation-360/product_introduce.png?v={{img_version}}"></image>
<view class="box-video navigation-video1">
<video poster="{{IMGURL}}video/360_AR_bitmap.png?v={{img_version}}" title="360全景导航" custom-cache="{{false}}" src="{{IMGURL}}video/360_AR.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/navigationArround/navigationArround.wxss */
.img {
width: 702rpx;
}
.play_bg {
width: 702rpx;
height: 1632rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 1092rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 1092rpx;
border-radius: 16rpx;
}
.navigation-video1 {
top: 204rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/paintProtect/paintProtect.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.PAINTPROTECT)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "漆面保护膜"
}
\ No newline at end of file
<!--漆面保护膜-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/paintProtect/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/paintProtect/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/paintProtect/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/paintProtect/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/paintProtect/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/paintProtect/paint_product.png?v={{img_version}}"></image>
<view class="box-video beauty-video1">
<!-- <image mode="widthFix" class="video_img" webp src="{{IMGURL}}image/productDetail/paintProtect/paint_bitmap.png?v={{img_version}}"></image> -->
<!-- <video poster="{{IMGURL}}image/productDetail/paintProtect/paint_bitmap.png?v={{img_version}}" src="{{IMGURL}}video/light.mp4?v={{img_version}}"></video> -->
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/paintProtect/paintProtect.wxss */
.img {
width: 702rpx;
}
.play_bg {
width: 702rpx;
height: 1672rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 344rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.video_img {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.beauty-video1 {
top: 204rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/seatVentilate/seatVentilate.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
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.SEATVENTILATE)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "座椅通风系统"
}
\ No newline at end of file
<!--座椅通风-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/seatVentilate/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/seatVentilate/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/seatVentilate/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/seatVentilate/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/seatVentilate/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/seatVentilate/seat_product.png?v={{img_version}}"></image>
<view class="box-video seat-video1">
<video poster="{{IMGURL}}video/seat_bitmap.png?v={{img_version}}" title="座椅通风系统" custom-cache="{{false}}" src="{{IMGURL}}video/seat.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/seatVentilate/seatVentilate.wxss */
.img {
width: 702rpx;
}
.play_bg {
width: 702rpx;
height: 1632rpx;
}
.box-content view {
margin-bottom: 56rpx;
}
.box-content view:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 1092rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 1092rpx;
border-radius: 16rpx;
}
.seat-video1 {
top: 204rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/productDetail/solarFilm/solarFilm.js
import { trackData } from "../../../utils/data";
import {shareTrackMixin} from "../../../mixins/index";
Page({
behaviors: [shareTrackMixin],
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
const options = wx.getEnterOptionsSync()
if (options.query.cardId) {
wx.$trackData = options.query
}
console.log(options, 'onshow')
getApp()
.login()
.then(({ data }) => {
console.log(data)
if (!wx.$trackData.detailShare) {
wx.$Track.sendTrack(trackData.SOLARFILM)
}
});
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
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
{
"usingComponents": {
"share-btn": "../../../components/shareBtn/shareBtn"
},
"navigationBarTitleText": "汽车太阳膜"
}
\ No newline at end of file
<!--汽车太阳膜-->
<view class="box-bg box-relative">
<view class="box-content">
<!-- 阶段玩法 -->
<view class="box-relative play_bg">
<image mode="widthFix" class="img play_bg" webp src="{{IMGURL}}image/productDetail/solarFilm/play_bg.png?v={{img_version}}"></image>
<view class="bg_img1">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/solarFilm/play1.png?v={{img_version}}"></image>
</view>
<view class="bg_img2">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/solarFilm/play2.png?v={{img_version}}"></image>
</view>
<view class="bg_img3">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/solarFilm/play3.png?v={{img_version}}"></image>
</view>
<view class="bg_img4">
<image mode="widthFix" webp src="{{IMGURL}}image/productDetail/solarFilm/play4.png?v={{img_version}}"></image>
</view>
</view>
<!-- 产品介绍 -->
<view class="box-relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/solarFilm/solar_product.png?v={{img_version}}"></image>
<view class="box-video solar-video1">
<video poster="{{IMGURL}}video/solar_bitmap.png?v={{img_version}}" title="太阳膜转化售中案例" custom-cache="{{false}}" src="{{IMGURL}}video/solar.mp4?v={{img_version}}"></video>
</view>
</view>
<!-- 收益测算 -->
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/productDetail/solarFilm/solar_case.png?v={{img_version}}"></image>
</view>
</view>
<view class="btn-bottm">
<share-btn></share-btn>
</view>
\ No newline at end of file
/* pages/productDetail/solarFilm/solarFilm.wxss */
.img {
width: 702rpx;
}
.box-content image {
margin-bottom: 56rpx;
}
.box-content image:last-child {
margin-bottom: 110rpx;
}
.bg_img1,
.bg_img2,
.bg_img3,
.bg_img4 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
.bg_img1 {
top: 248rpx;
}
.bg_img2 {
top: 504rpx;
}
.bg_img3 {
top: 944rpx;
}
.bg_img4 {
top: 1204rpx;
}
.box-relative {
position: relative;
}
.box-video {
width: 616rpx;
height: 344rpx;
position: absolute;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.box-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
.solar-video1 {
top: 240rpx;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
\ No newline at end of file
// pages/tab/discovery/components/product/product.js
// import {imgUrlMixin} from '~/mixins/index'
// import { IMG_URL } from "~/utils/constantData.js";
// import USERAPI from "~/api/usersApi/index";
const videoBaseUrl =
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/";
let IMG_URL = wx.$imgUrl
import { trackData } from "../../../../utils/data";
Component({
// behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {
stickyTop: Number,
actNum: Number,
wrapactiveNavIdx: Number,
senceData: Object, //本地数据
apiData: Object, //后端接口数据
isShare: {
type: Boolean,
value: false,
},
origin: String, //来源
outshowVideo: {
type: Boolean,
value: true,
}, //显示视频列表
isAuthphone: Boolean,
isShow: {
type: Boolean,
// value: false,
},
},
/**
* 组件的初始数据
*/
data: {
navList: ["360全景导航", "AR实景导航", "座椅通风", "氛围灯", "数字化美容"],
activeNavIdx: 0,
tab: [
"场景说明",
"营销链路",
"项目亮点",
"转化漏斗",
"合作流程",
// "案例视频",
],
heightArr: [],
allHeight: 0,
curTabIdx: 0,
intoViewId: "to-0",
IMGURL: `${IMG_URL}index/`,
videoBaseUrl,
getMoreBtn: false,
showVideo: true, //显示视频列表
imgTopArr: [],
trackList: [
['EQUITYCARD'],
['SOLARFILM'],
['PAINTPROTECT', 'CHANGEFILM'],
['CARBEAUTY', 'SEATVENTILATE', 'ARNAVIGATION', 'LIGHT', 'NAVIGATIONARROUND'],
['LOSSPGASE']
]
},
lifetimes: {
ready: function () {
this.init();
this.getImgHeight();
console.log("ready");
// //获取当前路径
// let currentUrl = this.getCurrentPageUrl()
// // console.log('currentUrl: ', currentUrl);
// if(currentUrl == '/pages/tab/index/index'){
// this.setData({
// currentUrl:false
// })
// }else{
// let {isShare} = this.data
// console.log(isShare,'isShare')
// if(isShare){
// this.setData({
// currentUrl:false
// })
// }else{
// this.setData({
// currentUrl:true
// })
// }
// }
//监听页面滚动的距离
wx.$eventbus.on("evt_page_scroll", async (e) => {
// console.log(e)
// let heightTop = this.data.stickyTop// 90 场景高度,8 场景margin-bottom
// let prodArr = await this.getHeight('.prod-wrap')
// // console.log('prodArr: ', prodArr);
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// // console.log('imgArr: ', imgArr);
// let imgHeightArr = []
// imgArr.reduce((pre,cur,index)=>{
// imgHeightArr.push(pre+cur.height)
// return pre+cur.height
// },heightTop)
let imgTopArr = this.data.imgTopArr;
// console.log('imgTopArr: ', imgTopArr);
if (imgTopArr.length == 0) return;
wx.nextTick(() => {
let idx = imgTopArr.findIndex((item) => item > e.scrollTop);
if (idx > -1) {
this.setData({
curTabIdx: idx,
});
}
});
});
if (!this.data.outshowVideo) {
this.setData({
showVideo: false,
});
}
//如果不是分享,初始化的时候调用函数
if (!this.data.isShare) {
// console.log(131546)
this.getMoreFn();
}
},
},
observers: {
actNum: function (newval, oldval) {
let navList;
let tab = [
"场景说明",
"营销链路",
"项目亮点",
"转化漏斗",
"合作流程",
// "案例视频",
];
let num = this.data.actNum;
console.log(num)
switch (num) {
case 0:
navList = ["数字无忧权益卡"];
break;
case 1:
navList = ["汽车太阳膜"];
break;
case 2:
navList = ["漆面保护膜", "改色膜"];
break;
case 3:
navList = [
"数字化美容",
"座椅通风",
"AR导航",
"氛围灯",
"360全景导航",
];
break;
case 4:
navList = ["新能源0元换购"];
break;
}
this.setData({
navList,
tab,
intoViewId: `to-0`,
activeNavIdx: 0,
});
// 每次切换场景,重新获取流程图高度
this.getImgHeight();
this.getMoreFn();
// this
if (this.data.wrapactiveNavIdx) {
this.setData({
activeNavIdx: this.data.wrapactiveNavIdx,
});
}
},
// isShow: function (newval) {
// let { isShare } = this.data;
// if (newval && !isShare) {
// this.setData({
// currentUrl: true,
// });
// }
// },
},
/**
* 组件的方法列表
*/
methods: {
getCurrentPageUrl() {
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const url = `/${currentPage.route}`;
return url;
},
async init() {
try {
const { data, code, message } = await USERAPI.wxCodeLogin();
if (code == "0") {
this.loginToken = data;
}
wx.hideLoading();
} catch ({ errMsg }) {
console.error(errMsg);
// this.reLogin();
}
},
/**获取loginToken */
// reLogin(message) {
// wx.showModal({
// content: message || "获取loginToken失败",
// confirmText: "重试",
// confirmColor: "#3666FE",
// }).then(({ confirm }) => {
// if (confirm) this.init();
// });
// },
// 视频下载
downVideo(e) {
let { url } = e.target.dataset;
console.log(url);
wx.showToast({
title:"正在下载视频..."
});
wx.downloadFile({
url: url,
success(res) {
// console.log(res,111)
if (res.statusCode === 200) {
wx.saveVideoToPhotosAlbum({
filePath: res.tempFilePath,
success(res) {
setTimeout(() => {
wx.showToast({
title:"下载成功!"
});
}, 2000);
},
});
}
},
});
},
saleTextChange(e) {},
changeTab(e) {
let idx = e.detail;
let { imgTopArr, stickyTop } = this.data;
console.log("idx: ", imgTopArr[idx], stickyTop);
// this.setData({
// intoViewId: `to-${idx}`,
// });
// wx.$eventbus.emit('evt_page_index',idx)
//判断当前路径
// let currentUrl = this.getCurrentPageUrl();
// console.log('currentUrl: ', currentUrl);
// if (currentUrl == "/pages/tab/index/index") {
// console.log(123546)
// wx.pageScrollTo({ scrollTop: imgTopArr[idx] - stickyTop + 88 + 34 });
// // wx.pageScrollTo({ scrollTop: imgTopArr[idx] - stickyTop });
// } else {
// -10 处理兼容
wx.pageScrollTo({ scrollTop: imgTopArr[idx]- stickyTop/2 - 36 - 10 });
// }
},
// async changeTab(e){
// let idx = e.detail
// this.setData({
// intoViewId: `to-${idx}`
// })
// let heightTop = this.data.headerHeight + 90 - 16 - 46 // 90 场景高度,16 可能是误差 , 46 tab高度
// let prodArr = await this.getHeight('.prod-wrap')
// heightTop += prodArr[0].height
// let imgArr = await this.getHeight('.img-item')
// for(let i=0;i<idx;i++){
// heightTop += imgArr[i].height
// }
// wx.pageScrollTo({
// scrollTop: heightTop,
// duration: 0
// })
// },
getHeight(cla) {
return new Promise((resolve, reject) => {
let query = wx.createSelectorQuery().in(this);
query
.selectAll(cla)
.boundingClientRect((rect) => {
resolve(rect);
})
.exec();
});
},
changeNav(event) {
const index = event.target.dataset.index
this.setData({
activeNavIdx: index,
});
const trackName = this.data.trackList[this.data.actNum][index]
console.log(trackName)
wx.$Track.sendTrack(trackData[trackName]);
},
// scrolltoupper(event) {
// console.log(event.detail.scrollHeight,event.detail.scrollTop)
// const idx = this.data.heightArr.findIndex(
// (item) => item > event.detail.scrollHeight
// );
// console.log('idx',idx)
// this.setData({
// curTabIdx: idx,
// });
// // console.log(this.data.curTabIdx1)
// },
getImgHeight() {
let query = wx.createSelectorQuery().in(this);
let heightArr = [];
let imgTopArr = [];
let s = 0;
let top;
let _this = this;
query
.selectAll(".img-item")
.boundingClientRect((react) => {
react.forEach((item, index) => {
// console.log('item: ', item);
// if(index == 0){
// console.log('item top: ', item);
// top = item.top
// }
// s = s +item.height;
s = item.top;
// heightArr.push(s);
imgTopArr.push(s);
});
// heightArr = heightArr.map((item)=>{
// item += top
// return item
// })
// this.data.heightArr = heightArr;
// // console.log(heightArr[heightArr.length-1])
// this.data.allHeight = heightArr[heightArr.length - 1];
// console.log('imgTopArr',imgTopArr)
_this.setData({
imgTopArr,
});
})
.exec();
},
// 获取用户信息
getUserInfo({ detail }) {
// console.log(detail);
if (!detail.code) return;
// this.setBtnLoading()
USERAPI.getUserProfile(this.loginToken, detail)
.then((result) => {
// console.log(result)
let userInfo = wx.$storage.get("wx_user_info");
// console.log('userInfo: ', userInfo);
let { phone } = result;
// console.log('phone: ', phone);
wx.$storage.set("wx_user_info", { ...userInfo, phone });
// }
setTimeout(() => {
this.triggerEvent("authorized", {
phone,
// isShare: false,
});
}, 1e3);
//隐藏更多按钮,显示视频列表
this.setData({
getMoreBtn: true,
isShare: false,
outshowVideo: true,
});
this.getMoreFn();
})
.catch(({ errMsg }) => {
wx.showToast({
title:errMsg || "系统异常"
});
// this.setBtnLoading(false)
});
},
// 图片流程5 点击往下获取更多
// 没登陆用户(登陆后解锁全部)
getMoreFn() {
let { actNum } = this.data;
// console.log("inactNumdex: ", actNum);
let tab = [
"场景说明",
"营销链路",
"项目亮点",
"转化漏斗",
"合作流程",
// "案例视频",
];
switch (actNum) {
case 0:
tab.push("案例视频");
break;
case 1:
tab.push("案例视频");
break;
case 2:
break;
case 3:
tab.push("案例视频");
break;
}
this.setData({
tab,
});
},
onShareFn() {
// this.triggerEvent('sharehandle')
// wx.$router.go('apply',1235)
let { actNum, activeNavIdx, apiData } = this.data;
console.log(123456)
wx.$router.go("checkProduct", {
actNum,
activeNavIdx,
apiData,
outshowVideo: true,
isShow:true
// origin:'home' //跟首页类似情况
// isShare: true
});
},
},
});
{
"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 webp src="{{IMGURL}}discovery_prod1.png" /> -->
<image webp 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 webp 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 webp 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 webp 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";
var senceData = [
{
name: '新车洽谈场景',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
src: `${IMG_URL}index/car1.png`,
// name: "新车洽谈场景",
msg: "1.0新车权益升级",
"sceneCode":"SC001",
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '100',
// profit: '92.4万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0,
flow:10000,
"productCode":"PC001",
"productName":"数字无忧权益卡",
"category":"服务类",
}
],
videoList: [
{
videoUrl: 'digital_card_30s',
posterUrl: 'digital_card_30s_bitmap',
name: '数字无忧卡服务30秒'
},
{
videoUrl: 'digital_card_money3',
posterUrl: 'digital_card_money3_bitmap',
name: '数字无忧卡3道钱'
},
{
videoUrl: 'digital_card',
posterUrl: 'digital_card_bitmap',
name: '数字无忧卡服务'
},
{
videoUrl: 'digital_card_reason6',
posterUrl: 'digital_card_reason6_bitmap',
name: '数字无忧卡6大理由'
}
]
},
{
name: '新车交付场景',
img: 'scene_delivery.png',
active: 'icon-car21',
playImg: 'img2',
src: `${IMG_URL}index/car2.png`,
// name: "新车交付场景",
msg: "1.1新车精品升级",
"sceneCode":"SC002",
productList: [
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '100',
profit: '1008000',
type: 'membrane',
productType: 'sunMembrane',
path: 'solarFilm',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC002",
"productName":"汽车太阳膜",
"category":"膜类",
}
],
videoList:[
{
videoUrl: 'solar',
posterUrl: 'solar_bitmap',
name: '太阳膜转化售中案例-门店新增产值12w每月'
}
]
},
{
name: '0-6个月',
img: 'scene_within_12mth.png',
active: 'icon-car21',
playImg: 'img2',
src: `${IMG_URL}index/car3.png`,
// name: "0-12个月",
msg: "1.2次新车膨胀金活动",
"sceneCode":"SC003",
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '100',
profit: '180000',
type: 'membrane',
productType: 'protectMembrane',
path: 'paintProtect',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC003",
"productName":"漆面保护膜(车衣)",
"category":"膜类",
},
{
img: 'product-img4',
proName: '改色膜',
price: '100',
profit: '300000',
type: 'membrane',
productType: 'colorMembrane',
path: 'changingFilm',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC004",
"productName":"改色膜",
"category":"膜类",
}
]
},
{
name: '6个月以上',
img: 'scene_more_12mth.png',
active: 'icon-car31',
playImg: 'img3',
src: `${IMG_URL}index/car4.png`,
// name: "12个月以上",
msg: "1.3售后直播众筹活动",
"sceneCode":"SC004",
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '100',
profit: '72000',
type: 'beauty',
productType: 'digitBeauty',
path: 'carBeauty',
sale:100, //销量
varType: 0,
flow:10000,
"productCode":"PC005",
"productName":"数字化美容",
"category":"美容类",
},
{
img: 'product-img6',
proName: '座椅通风',
price: '10000',
profit: '232200',
type: 'light',
productType: 'chair',
path: 'seatVentilate',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC006",
"productName":"座椅通风",
"category":"轻改类",
},
{
img: 'product-img7',
proName: 'AR导航',
price: '10000',
profit: '226800',
type: 'light',
productType: 'ar',
path: 'arNavigation',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC007",
"productName":"AR导航",
"category":"轻改类",
},
{
img: 'product-img8',
proName: '氛围灯',
price: '10000',
profit: '361800',
type: 'light',
productType: 'lamp',
path: 'ambientLighting',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC008",
"productName":"氛围灯",
"category":"轻改类",
},
{
img: 'product-img9',
proName: '360全景导航',
price: '10000',
profit: '388800',
type: 'service',
productType: 'navigation',
path: 'navigationArround',
sale:10000, //销量
varType: 1,
flow:10000,
"productCode":"PC009",
"productName":"360全景导航",
"category":"轻改类",
}
],
videoList: [
{
videoUrl: 'seat',
posterUrl: 'seat_bitmap',
name: '座椅通风系统-新增产值20w'
},
{
videoUrl: 'AR',
posterUrl: 'AR_bitmap',
name: '单品AR导航-新增产值20w+'
},
{
videoUrl: 'light',
posterUrl: 'light_bitmap',
name: '单品类氛围灯-新增产值27w'
},
{
videoUrl: '360_AR',
posterUrl: '360_AR_bitmap',
name: '360全景导航-新增产值57w+'
}
]
},
{
name: '3年以上',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
src: `${IMG_URL}index/car1.png`,
// name: "新车洽谈场景",
msg: "3.1新能源0元购",
"sceneCode":"SC001",
productList: [
{
img: 'product-img9',
proName: '新能源0元换购',
price: '100',
// profit: '92.4万',
profit: '1200000',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0,
flow:10000,
"productCode" : "PC010",
"productName" : "新能源0元换购",
"category":"置换类",
}
]
},
]
module.exports = {
senceData
}
\ No newline at end of file
const navStyle = "background-color: transparent;";
import util from "../../utils/util";
import { trackData } from "../../utils/data";
// import { IMG_URL } from '~/utils/constantData.js'
// wx.$imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
import { senceData } from "./constant/data";
// `${IMG_URL}index/car2.png`,
//本地图片路径
let IMG_URLLocal = "../../../images/";
// import { productBysceneApi, unreadApi, pageApi, readApi, tagApi } from '~/api/index.js'
let IMG_URL = wx.$imgUrl;
Page({
// behaviors: [kfMixin],
/**
* 页面的初始数据
*/
data: {
navStyle,
// IMGURL: wx.$imgUrl,
IMG_URL,
// IMG_URLLocal,
actClass: "right",
guideSrcIndex: 1,
guideShow: false,
dataArr: [
{
src: `${IMG_URL}index/car1.png`,
name: "新车洽谈场景",
msg: "1.0 新车权益销售",
},
{
src: `${IMG_URL}index/car2.png`,
name: "新车交付场景",
msg: "1.1 新车精品升级",
},
{
src: `${IMG_URL}index/car3.png`,
name: "0-12个月",
msg: "1.2 新车线上转化",
},
{
src: `${IMG_URL}index/car4.png`,
name: "12个月以上",
msg: "1.3 存量用户众筹",
},
],
apiData: [],
actNum: 3, //car 场景选择
wrapactiveNavIdx: 0, // 产品选择
tabIndx: 1,
navList: ["看线索", "看产品"],
typeList: [
{
0: "无电话",
1: "有电话",
2: "联系电话",
selectIndex: 2,
key: "hasPhone",
},
{
0: "非意向客户",
1: "是意向客户",
2: "意向客户",
selectIndex: 2,
key: "starTag",
},
{
0: "来自访客",
1: "来自门店",
2: "线索来源",
selectIndex: 2,
key: "clueSource",
},
{
2: "重置",
selectIndex: 2,
},
],
clueList: [],
// 预估弹框
visible: false,
isReset: false,
formData: {
sales: 100,
flow: 10000,
},
lastFormData: {
sales: 100,
flow: 10000,
},
isFirst: true,
// tabList: pageData.tabList,
// 定义数据
senceData,
isShow: false,
// 看线索部分
unreadClueCount: 0,
cluePageSize: 10,
clueCurrentPage: 1,
hasPhoneNumber: false,
trackList: [
['EQUITYCARD'],
['SOLARFILM'],
['PAINTPROTECT', 'CHANGEFILM'],
['CARBEAUTY', 'SEATVENTILATE', 'ARNAVIGATION', 'LIGHT', 'NAVIGATIONARROUND'],
['LOSSPGASE']
]
},
//引导图
guideFn() {
if (this.data.guideSrcIndex === 5) {
this.setData({
guideShow: false,
});
return;
}
this.setData({
guideSrcIndex: ++this.data.guideSrcIndex,
});
// console.log('guideSrcIndex',this.data.guideSrcIndex)
},
// navbar高度设置
navbarReady(e) {
let { height, statusBarHeight } = e.detail;
this.setData({
// tabBarStyle: height / 2 + statusBarHeight,
headerHeight: height / 2 + statusBarHeight + 88,
// headerHeight: height / 2 + statusBarHeight + 88 * 2
});
// console.log(e)
// console.log(this.data.headerHeight)
},
// headTabFn(e){
// // console.log("name",e.currentTarget.dataset.name)
// let name = e.currentTarget.dataset.name
// this.setData({
// actClass:name
// })
// },
// 选车场景切换
selectCar(e) {
console.log("e: ", e);
let { num, scenestatus } = e.currentTarget.dataset;
// console.log('actNum: ', actNum);
// if(scenestatus == 1){
// }
// 场景切换默认埋点第一个产品
const trackName = this.data.trackList[num][0]
wx.$Track.sendTrack(trackData[trackName]);
this.setData({
actNum: num,
wrapactiveNavIdx:0
});
},
// 头部看线索,产品切换
changeTabIndx(e) {
console.log("e.detail: ", e.detail);
let { sessionId } = wx.$storage.get();
// console.log("sessionId: ", sessionId);
let param = {
sessionId,
};
let first = true;
this.setData({
tabIndx: e.detail,
});
//标记线索已读
if (e.detail == 0 && first) {
first = false;
readApi(param);
}
},
gotoApply(e) {
let { type, item } = e.currentTarget.dataset;
// let { } = e.currentTarget.dataset
if (type == "active") {
let { userInfo } = wx.$storage.get();
let pMerchantName = userInfo.subLoginUser.merchantName;
let pMerchantId = userInfo.subLoginUser.merchantId;
let sceneActive;
switch (this.data.actNum) {
case 0:
sceneActive = 1;
break;
case 1:
sceneActive = 2;
break;
case 2:
sceneActive = 3;
break;
case 3:
sceneActive = 4;
break;
}
// let pMerchantId = userInfo.subLoginUser.merchantId
// console.log("type,item: ", type, item);
const params = {
merchantInfo: {
pMerchantId,
pMerchantName,
merchantId: item.visitList[0].merchantId,
merchantName: item.visitList[0].merchantName,
},
sceneActive,
// sceneCodeList: ['SC001', 'SC002','SC003','SC004']
};
//申请活动
wx.$router.go("packageOutput.openBusiness", params);
} else {
//申请门店
// let { type, item } = e.currentTarget.dataset
wx.$router.go("apply", item?.clueId || "");
}
// wx.$router.go('apply',1235)
},
getMore(e) {
console.log("显示更多数据");
let index = e.currentTarget.dataset.outidx;
console.log("index: ", index);
let completeStatus = `clueList[${index}].getMoreFlag`;
this.setData({
[completeStatus]: !this.data.clueList[index].getMoreFlag,
});
},
// 跳转咨询页面
goConsult() {
console.log("跳转到咨询页面");
wx.pro.openCustomerServiceChat({
extInfo: { url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" },
corpId: "ww047bdc0f1e76cc13",
complete: (r) => {
console.log(r);
},
});
},
// 预估弹框
showCalculate() {
this.setData({
visible: !this.data.visible,
isReset: false,
});
},
clickDialog(e) {
console.log(e.changedTouches[0].clientY);
if (e.changedTouches[0].clientY < 471) {
this.setData({
visible: false,
isReset: false,
formData: this.data.lastFormData,
});
}
},
// 提交测算
submit(e) {
console.log(e);
let sales = e ? +e.detail.value.sales : this.data.formData.sales;
let flow = e ? +e.detail.value.flow : this.data.formData.flow;
console.log("flow", sales, flow);
const reg = /^[1-9]\d*$/;
console.log(reg.test(sales), flow, "---");
if (!reg.test(sales)) {
wx.showToast({
title: "门店月平均新车销量应为正整数",
icon: "none",
duration: 2000,
});
return;
}
if (!reg.test(flow)) {
wx.showToast({
title: "3年内售后存量用户应为正整数",
icon: "none",
duration: 2000,
});
return;
}
this.setData({
"lastFormData.sales": sales,
"lastFormData.flow": flow,
});
const _this = this;
// this.data.tabList.forEach((item, index) => {
// item.productList.forEach((i, lastIndex) => {
// if (i.profit) {
// let name = `tabList[${index}].productList[${lastIndex}].profit`;
// let profit = _this.formula(i.productType, sales, flow);
// console.log(name, profit);
// this.setData({
// [name]: profit,
// });
// }
// });
// });
this.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
if (i.profit) {
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
let flowKey = `senceData[${index}].productList[${lastIndex}].flow`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
this.setData({
[name]: profit,
[sale]: sales,
[flowKey]: flow,
});
}
});
});
// 触发自定义事件 利润 数量
// this.triggerEvent('countProfit', profit, sales)
// let type = this.getProductType(sceneIndex, tabIndex);
// let profit = this.formula(type, sales, flow);
// console.log('profit: ', profit);
this.setData({
visible: false,
});
// this.showCase();
// if (!this.data.isFirst) {
wx.showToast({
title: "测算结果已在页面内同步展示",
icon: "none",
duration: 2000,
});
// } else {
// this.setData({
// isFirst: false
// })
// }
},
// // 获取场景下的产品类型
// getProductType(sceneIndex, tabIndex) {
// let typeArray = [
// ["benefitCard"], //数字无忧权益卡
// ["sunMembrane"], //汽车太阳膜
// ["protectMembrane", "colorMembrane"], //'漆面保护膜','改色膜'
// ["digitBeauty", "chair", "ar", "lamp", "navigation"], //'数字化美容','座椅通风','AR导航','氛围灯','360全景导航'
// ];
// return typeArray[sceneIndex][tabIndex];
// },
// 计算公式,参数:productType
formula(productType, sales, flow) {
let profit = 0;
switch (productType) {
case "benefitCard":
// 数字无忧权益卡
profit = (sales * 0.5 * 2000 * 12).toFixed(0);
break;
case "sunMembrane":
// 汽车太阳膜
profit = (sales * 0.8 * 0.7 * 1500 * 12).toFixed(0);
break;
case "protectMembrane":
// 漆面保护膜
profit = (sales * 0.05 * 3000 * 12).toFixed(0);
break;
case "colorMembrane":
// 改色膜
profit = (sales * 0.05 * 5000 * 12).toFixed(0);
break;
case "digitBeauty":
// 数字化美容
profit = (sales * 0.2 * 300 * 12).toFixed(0);
break;
case "chair":
// 座椅通风
profit = (flow * 2580 * 0.9 * 0.01).toFixed(0);
break;
case "ar":
// AR导航
profit = (flow * 1680 * 0.9 * 0.015).toFixed(0);
break;
case "lamp":
// 氛围灯
profit = (flow * 2680 * 0.9 * 0.015).toFixed(0);
break;
case "navigation":
// 360全景导航
profit = (flow * 2880 * 0.9 * 0.015).toFixed(0);
break;
}
console.log(profit.length);
console.log(productType, sales, flow, profit);
if (profit.length > 9) {
return (profit / 10000).toFixed(0) + "万";
} else {
return profit;
}
},
reset() {
this.setData({
isReset: false,
formData: {
sales: 100,
flow: 10000,
},
});
},
focus() {
this.setData({
isReset: true,
});
return false;
},
// 更新手机号
updatePhoneNumber(e) {
if (e.detail) {
this.setData({
hasPhoneNumber: true,
});
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.hideShareMenu({
menus: ['shareAppMessage', 'shareTimeline']
})
// console.log('options: ', options);
// let { sessionId } = wx.$storage.get()
// // console.log("sessionId: ", sessionId);
// let param = {
// sessionId
// }
// 看产品
this.compositionData(senceData, []);
// productBysceneApi(param).then(res => {
// let { code, data } = res
// if (code == 0) {
// this.setData({
// apiData: data
// })
// this.compositionData(senceData, this.data.apiData)
// // this.getFirstSenceIndex();
// }
// })
// 看线索
// this.getClueInit()
//第一次进来储缓存,以后不再用引导图
let firstLogin = wx.$storage.get("firstLogin");
if (!firstLogin) {
this.setData({
guideShow: true,
});
wx.$storage.set("firstLogin", "firstLogin");
}
if (util.getUserInfo().phone) {
this.setData({
hasPhoneNumber: true,
});
}
},
onRoute(options) {
console.log(options, "options");
if (options.actNum) {
const trackName = this.data.trackList[options.actNum][options.activeNavIdx]
console.log(trackName)
wx.$Track.sendTrack(trackData[trackName]);
} else {
// 无参数默认埋点
wx.$Track.sendTrack(trackData.CARBEAUTY);
}
this.setData({
actNum: options.actNum,
wrapactiveNavIdx: options.activeNavIdx,
});
},
//接口数据,本地数据对接
compositionData(localData, apiData) {
localData.forEach((item, index) => {
apiData.forEach((inner, idx) => {
if (item.name == inner.stage) {
item.sceneStatus = inner.sceneStatus;
item.productList.forEach((outChild, outIndex) => {
inner.productList.forEach((innerChild, innerIndex) => {
if (outChild.proName == innerChild.productName) {
outChild.productStatus = innerChild.productStatus;
}
});
});
}
});
});
// console.log('localData, apiData: ', localData);
this.setData({
senceData: localData,
});
},
getFirstSenceIndex(param) {
let actTndex = this.data.apiData.findIndex((item) => item.sceneStatus == 1);
// console.log('actTndex: ', actTndex);
this.setData({
actNum: actTndex,
});
},
// 看线索相关
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
this.prompt = this.selectComponent("#toast");
},
showToast: function (e) {
let { type, item } = e.currentTarget.dataset;
console.log("type,item: ", type, item);
let tipObj = {};
if (item.starTag == 1) {
tipObj = {
type: "fail",
title: "取消标记为意向客户",
};
} else {
tipObj = {
type: "success",
title: "成功标记为意向客户",
};
}
this.prompt.showToast({
type: tipObj.type,
title: tipObj.title,
duration: 1000,
compelete: function () {
console.log("toast框隐藏之后,会调用该函数");
//例如:跳转页面wx.navigateTo({ url: 'xxx' });
},
});
//切换收藏标记
let index = e.currentTarget.dataset.outidx;
let completeStatus = `clueList[${index}].like`;
this.setData({
[completeStatus]: !this.data.clueList[index].like,
});
//发请求
let { sessionId } = wx.$storage.get();
let params = {
clueId: item.clueId,
sessionId,
};
this.getTagApi(params);
},
filterTypeFn(e) {
let { typeList } = this.data;
let index = e.currentTarget.dataset.index;
// console.log('index: ', index);
// let itemList = []
// let params = {
// clueSource: '',
// hasPhone: '',
// starTag: ''
// }
// console.log('index: ', index)
// 重置筛选
if (index == 3) {
typeList.forEach((item) => {
item.selectIndex = 2;
});
this.setData({
typeList,
});
return this.getPageApi();
}
let itemList = Object.values(typeList[index]).slice(0, 2);
itemList.push("全部");
let _this = this;
wx.pro.showActionSheet({
itemList,
success(res) {
// 选中全部
let selectIndex = res.tapIndex;
// console.log('selectIndex: ', selectIndex);
typeList[index].selectIndex = selectIndex;
let params = typeList.reduce((obj, item, index) => {
console.log(" item: ", item);
if (item["key"]) {
// selectIndex = index == 2 ? selectIndex + 1 : selectIndex
// console.log('selectIndex: ', selectIndex);
let itemIndx = item.selectIndex;
// console.log('itemIndx: ', itemIndx);
// key: 'clueSource'
if (item["key"] == "clueSource") {
itemIndx += 1;
}
obj[item["key"]] = itemIndx == 2 || itemIndx == 3 ? "" : itemIndx;
}
return obj;
}, {});
console.log(params);
// let num
// if (index == 2) {
// num = res.tapIndex + 1
// } else {
// num = res.tapIndex
// }
// switch (index) {
// case 0:
// params.hasPhone = num
// break
// case 1:
// params.starTag = num
// break
// case 2:
// params.clueSource = num
// break
// }
_this.setData({ typeList });
_this.getPageApi(params);
},
fail(res) {
console.log(res.errMsg);
},
});
},
// // 打电话
// phoneCallFn(e) {
// let { phone } = e.currentTarget.dataset
// console.log('phone: ', phone)
// wx.phoneCall(phone)
// },
// // 复制号码
// setCopyDataFn(e) {
// let { phone } = e.currentTarget.dataset
// wx.setCopyData(phone)
// },
getClueInit(param) {
// console.log(22222)
this.getUnreadApi(param);
this.getPageApi(param);
},
//未读消息
async getUnreadApi(param) {
let { code, data } = await unreadApi(param);
if (code == 0) {
this.setData({
unreadClueCount: data.unreadClueCount,
});
}
},
//获取浏览线索数据列表
async getPageApi(param) {
let { cluePageSize, clueCurrentPage } = this.data;
let params = {
...param,
pageSize: 1000,
currentPage: clueCurrentPage,
};
let { code, data } = await pageApi(params);
if (code == 0) {
let arr = data.list.map((item) => {
if (item.visitList.length > 5) {
item.getMoreFlag = true;
}
return item;
});
this.setData({
clueList: arr,
});
}
},
//喜欢收藏功能
async getTagApi(param) {
let res = await tagApi(param);
console.log("res: ", res);
this.getPageApi(param);
},
onReachBottom() {
console.log("滑到底部了");
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
// setTimeout(()=>{
// console.log('this.data.tabBarStyle',this.data.tabBarStyle,this.data.headerHeight)
// })
},
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
// console.log("滚动结束");
wx.$eventbus.emit("evt_page_scroll", { scrollTop: e.scrollTop });
}, 500);
};
})(),
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {},
onShareTimeline: function () {},
});
{
"usingComponents": {
"product": "./components/product/product"
},
"navigationStyle": "custom",
"onReachBottomDistance":50
}
@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);
}
page {
height: 100vh;
width: 100vw;
background-color: #F2F3F7 !important;
}
.reclaim {
.header-wrap {
position: sticky;
top: 0;
width: 100%;
background-size: 100% 100%;
// margin-bottom: 32rpx;
z-index: 2;
.header {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 88rpx;
display: flex;
justify-content: space-between;
align-items: center;
.tabContainer {
width: 60%;
}
.left {
display: flex;
align-items: center;
.clue {
position: relative;
margin-left: 24px;
margin-right: 24px;
font-weight: 400;
font-size: 14px;
color: #8a8c90;
}
.product {
position: relative;
}
.act {
font-weight: 600;
font-size: 22px;
color: #323436;
&::after {
position: absolute;
left: 50%;
bottom: -6px;
transform: translateX(-50%);
display: block;
content: "";
width: 20px;
height: 4px;
background: var(--btnColor);
border-radius: 2px;
}
}
}
.right {
display: flex;
align-items: center;
.img {
width: 40rpx;
height: 40rpx;
}
.apply {
margin-left: 4px;
margin-right: 16px;
font-weight: 400;
font-size: 28rpx;
color: var(--btnColor);
}
}
}
}
// .content{
// position: relative;
// }
.clue {
padding: 0px 10px 0;
background-color: #f2f3f7;
// margin-top: -16rpx;
.types {
// margin-bottom: 8px;
box-sizing: border-box;
padding: 16rpx 0;
display: flex;
align-items: center;
position: sticky;
top: 280rpx;
z-index: 2;
background-color: #f2f3f7;
margin-top: -32rpx;
.type {
margin-left: 8px;
display: flex;
justify-content: center;
align-items: center;
padding: 0 16rpx;
height: 24px;
line-height: 24px;
background: #ffffff;
border-radius: 14px;
font-size: 12px;
color: #8a8c90;
.point {
margin-left: 2px;
width: 12px;
height: 12px;
}
}
.active {
color: #3964fe;
}
}
.list {
box-sizing: border-box;
// padding-bottom: 8rpx;
.msg {
padding: 10px 16px 16px;
margin-bottom: 8px;
position: relative;
background-color: #fff;
border-radius: 4px;
}
.like {
position: absolute;
right: 12px;
top: 0;
width: 23px;
height: 23px;
}
.name {
display: flex;
align-items: center;
// font-weight: 400;
font-size: 14px;
color: #323436;
.avatar {
margin-left: 2px;
width: 20px;
height: 20px;
}
}
.line {
margin-top: 10px;
margin-bottom: 10px;
height: 0;
border-bottom: #eeeeee 1px dashed;
}
.want-more {
overflow: hidden;
}
.want-btn {
margin-top: 10px;
font-size: 12px;
color: var(--btnColor);
}
.record {
margin-top: 4px;
margin-bottom: 4px;
display: flex;
justify-content: space-between;
align-items: center;
.action-wrap {
display: flex;
align-items: center;
font-size: 12px;
color: #393b3e;
}
// .action{
// }
// .detail{
// }
.time {
font-size: 12px;
color: #8a8c90;
}
}
.info {
margin-top: 10px;
display: flex;
justify-content: space-between;
.phone-wrap {
display: flex;
align-items: center;
}
.phone {
font-size: 12px;
color: #3666fe;
}
.phone-img {
margin-left: 12px;
margin-right: 8px;
width: 20px;
height: 20px;
border-radius: 50%;
}
.copy {
width: 20px;
height: 20px;
border-radius: 50%;
}
.btn {
width: 85px;
height: 24px;
background: var(--btnColor);
border-radius: 12px;
font-size: 12px;
color: #ffffff;
text-align: center;
line-height: 24px;
}
}
.noDataImg {
width: 512rpx;
height: 512rpx;
margin-left: 100rpx;
position: relative;
.noDataTxt {
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #CCCED1;
position: absolute;
bottom: 32rpx;
left: 50%;
transform: translateX(-50%);
}
}
.shop {
.name-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.source {
font-size: 10px;
color: #8a8c90;
}
.btn {
border: 1px solid var(--btnColor);
border-radius: 12px;
background-color: #fff;
font-size: 12px;
color: var(--btnColor);
}
.shop-action-wrap {
display: flex;
justify-content: space-between;
align-items: center;
}
.shop-record {
width: 100%;
}
.shop-source {
margin-top: 4px;
width: 100%;
font-size: 12px;
color: #393b3e;
}
}
.bottomTips {
text-align: center;
color: #393b3e;
font-size: 26rpx;
height: 60rpx;
line-height: 40rpx;
}
}
}
.scene {
// margin-top: 32rpx;
// margin-left: 20rpx;
// margin-right: 20rpx;
// margin-bottom: 10rpx;
margin: 32rpx 32rpx 0;
.scene-wrap {
display: flex;
}
.item-wrap {
margin-right: 16rpx;
margin-bottom: 40rpx;
position: relative;
width: 172rpx;
height: 180rpx;
border-radius: 8rpx;
border: 1px solid #f7f8fc;
box-sizing: border-box;
}
.item {
// padding-top: 10px;
width: 172rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.act {
// background-image: url("https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/act.png");
// background-size: 100% 100%;
border: 1px solid var(--btnColor);
// box-shadow: 0 2rpx 4rpx 0 rgba(180, 186, 204, 0.4);
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40);
&::after {
position: absolute;
left: 50%;
bottom: -7px;
display: block;
content: "";
width: 6px;
height: 6px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
.item {
background: transparent;
}
}
.img {
padding-top: 10px;
display: block;
margin: 0 auto 2px;
width: 28px;
height: 28px;
}
.name {
margin-bottom: 2px;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.msg {
font-weight: 500;
font-size: 18rpx;
color: #323436;
text-align: center;
}
}
}
.guide {
width: 100%;
height: 100%;
.guide-img {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 3;
}
}
.chat {
position: fixed;
right: -4px;
top: 60%;
width: 64px;
height: 64px;
border-radius: 50%;
z-index: 2;
}
.output-value {
position: fixed;
right: -2px;
top: 70%;
width: 64px;
height: 64px;
// border-radius: 50%;
z-index: 2;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45, 45, 51, 0.50);
z-index: 2;
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
background-color: #fff;
box-shadow: 0 -8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 32rpx 32rpx 0 0;
}
.dialog-header {
display: flex;
justify-content: space-between;
padding: 32rpx 48rpx;
border-bottom: 1rpx solid #eee;
}
.header-btn {
display: inline-block;
font-size: 32rpx;
line-height: 48rpx;
}
.btn-gray {
color: #6C737A;
}
.btn-primary {
background-color: #fff;
border: none;
margin: 0;
padding: 0;
font-weight: 500;
color: #3666FE;
width: auto;
}
.btn-primary::after {
border: none;
}
.dialog-content {
padding: 40rpx 24rpx 60rpx;
}
.dialog-title {
font-weight: 600;
font-size: 36rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
margin-bottom: 24rpx;
}
.dialog-form {
width: 100%;
height: 384rpx;
background-image: linear-gradient(179deg, rgba(240, 247, 255, 0.30) 15%, #F0F7FF 100%);
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 216rpx;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
margin-left: 64rpx;
margin-right: 16rpx;
}
.form-unit {
font-size: 28rpx;
color: #6E6E7A;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #3666FE;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
line-height: 48rpx;
margin-top: 40rpx;
}
}
// .clue {
// flex: 1;
// overflow: hidden;
// }
\ No newline at end of file
<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
......@@ -3,53 +3,43 @@
* @Author: huyue
* @Date: 2022-08-30 11:26:21
* @LastEditors: huyue
* @LastEditTime: 2022-10-28 10:51:40
* @LastEditTime: 2022-12-09 15:44:51
*/
// pages/tab/index/index.js
import { menuMixin } from "../../../mixins/index";
import Draw from "../../../utils/Draw";
import { ssoApi, entmicroApi } from "../../../api/api";
import { entmicroApi } from "../../../api/api";
import util from "../../../utils/util";
import { trackData } from "../../../utils/data";
Page({
behaviors: [menuMixin],
/**
* 页面的初始数据
*/
data: {
introduceName: "",
tabList: [
{
name: "公司介绍",
icon: "icon-company",
icon1: "icon-company1",
isShow: true
name: "增值转化",
icon: "icon-product",
icon1: "icon-product1"
},
{
name: "方案介绍",
icon: "icon-product",
icon1: "icon-product1",
isShow: true
name: "系统订阅",
icon: "icon-measure",
icon1: "icon-measure"
},
{
name: "视频直播",
icon: "icon-video",
icon1: "icon-video",
isShow: true
name: "公司介绍",
icon: "icon-company",
icon1: "icon-company1"
},
{
name: "展业测算",
icon: "icon-measure",
icon1: "icon-measure",
isShow: false
name: "视频直播",
icon: "icon-video",
icon1: "icon-video"
},
],
curTabIndex: 0,
// 0-员工,1-代理商
customerType: 0,
// 是否授权手机号
hasPhoneNumber: false,
curTab: [trackData.COMPANY, trackData.CUBE],
// 员工名片信息
cardInfo: null,
defaultInfo: {
......@@ -59,14 +49,13 @@ Page({
image: 'https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg',
qrCode: 'https://img.zcool.cn/community/01e47e60ab5b4011013eaf70962e3f.jpg@520w_390h_1c_1e_2o_100sh.jpg'
},
// 是否授权手机号
hasPhoneNumber: false,
curTab: [trackData.COMPANY, trackData.CUBE],
banner: ['company-img3.png', 'company-img31.png'],
current: 0,
clueList: ['clue-img2.webp', 'clue-img3.webp', 'clue-img4.webp', 'clue-img5.webp', 'clue-img6.webp', 'clue-img7.webp', 'clue-img8.webp', 'clue-img9.webp', 'clue-img10.webp', 'clue-img11.webp', 'clue-img12.webp', 'clue-img13.webp'],
clueCurrent: 0,
awardBanner: [{src: 'company-img7.png', name: '组织荣誉'}, {src: 'company-img71.png', name: '行业奖项'}],
awardCurrent: 0,
shareDisabled: true,
autoplay: true
shareDisabled: true
},
introduce(e) {
const curTabIndex = e.currentTarget.dataset.index;
......@@ -74,34 +63,33 @@ Page({
autoplay: false
})
// 视频直播和合作申请是跳转新页面,不需要设置激活样式
// 0-公司介绍 1-方案介绍 2-视频直播 3-合作申请
// 0-增值转化 1-系统订阅 2-公司介绍 3-视频直播
switch (curTabIndex) {
case 0:
case 2:
this.setData({
curTabIndex: curTabIndex,
autoplay: true
})
wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex]);
// wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex]);
break
case 2:
case 3:
wx.openChannelsUserProfile({
finderUserName: 'sphPIdcy0NVpuao',
// feedId: 'export/UzFfAgtgekIEAQAAAAAAOQ8BJrsjzwAAAAstQy6ubaLX4KHWvLEZgBPEmIEUOQV4c62CzNPgMJqRnrGh3TfaajoIU4mGBiio'
})
wx.$Track.sendTrack(trackData.VIDEO);
// wx.$Track.sendTrack(trackData.VIDEO);
break;
case 3:
wx.$router.go("measure");
break
default:
this.setData({
curTabIndex: curTabIndex,
});
wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex]);
// wx.$Track.sendTrack(this.data.curTab[this.data.curTabIndex]);
}
},
// 跳转其他内容
/**
* 跳转其他内容
* name: 跳转事件名称
*/
handleOpen(e) {
console.log(e)
const name = e.target.dataset.name
......@@ -156,6 +144,13 @@ Page({
}
},
jump() {
// wx.navigateTo({
// url: '/packagesList/pages/measure/measure/measure',
// })
wx.$router.go('/packagesList/pages/measure/measure/measure')
},
// 政府与行业资质轮播切换
changePage(e) {
let current = e.detail.current
......@@ -189,7 +184,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$util.showLoading('加载中...')
// wx.$util.showLoading('加载中...')
getApp()
.login()
.then(({ data }) => {
......
/* pages/tab/index/index.wxss */
@import '../../template/channel/channel.wxss';
@import '../../template/menu/menu.wxss';
@import '../../template/company/company.wxss';
@import '../../template/cube/cube.wxss';
@import '../../template/equity/equity.wxss';
@import '../../template/clue/clue.wxss';
@import "./index.skeleton.wxss";
page {
background-color: #F5F5F7;
}
.p-b-20 {
padding-bottom: 20rpx;
}
.image-wrapper {
text-align: center;
background-color: #505CFF;
padding: 48rpx 20rpx;
margin-top: 32rpx;
}
.relative {
position: relative;
}
.absolute {
.main-box {
box-sizing: border-box;
height: 100%;
position: absolute;
width: 100%;
}
.img {
width: 100%;
}
.tab-list {
display: flex;
margin: 0 32rpx;
}
.tab-item {
width: 220rpx;
height: 144rpx;
background: #F5F6FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 24rpx;
color: #6E6D8F;
text-align: center;
margin-top: 24rpx;
position: relative;
margin-right: 16rpx;
}
.tab-item:last-child {
margin-right: 0;
}
.bg-img {
width: 220rpx;
height: 144rpx;
position: absolute;
top: 0;
left: 0;
}
flex-direction: column;
.tab-item-active {
color: #FFFFFF;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size: 220rpx 144rpx;
.main-bottom {
background: #FFFFFF;
padding-top: 24rpx;
flex: 1;
}
}
.tab-apply {
background: #F0F0FF;
font-weight: 600;
color: #5850FF;
}
/** 菜单tab样式开始 */
.tab-list {
display: flex;
margin: 0 32rpx;
.icon-hot {
width: 56rpx;
height: 24rpx;
position: absolute;
top: 0;
right: 0;
}
.tab-item {
width: 220rpx;
height: 144rpx;
background: #F5F6FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 24rpx;
color: #6E6D8F;
text-align: center;
margin-top: 24rpx;
position: relative;
margin-right: 16rpx;
.tab-img {
width: 72rpx;
height: 72rpx;
position: absolute;
top: 16rpx;
left: 50%;
transform: translateX(-50%);
}
&:last-child {
margin-right: 0;
}
.tab-text {
position: absolute;
top: 88rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
}
&-active {
color: #FFFFFF;
background-image: url("https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/icon-bg.png");
background-size: 220rpx 144rpx;
}
.tab-img {
width: 72rpx;
height: 72rpx;
position: absolute;
top: 16rpx;
left: 50%;
transform: translateX(-50%);
}
.main-box {
box-sizing: border-box;
height: 100%;
position: absolute;
width: 100%;
display: flex;
flex-direction: column;
.tab-text {
position: absolute;
top: 88rpx;
left: 50%;
transform: translateX(-50%);
width: 100%;
}
}
}
.main-bottom {
background: #FFFFFF;
padding-top: 24rpx;
flex: 1;
}
/** 菜单tab样式结束 */
/* 了解更多 */
.more-box {
position: relative;
}
.more-btn {
position: absolute;
width: 100%;
bottom: 32rpx;
}
/* 右下角图标 */
.floating-box {
position: fixed;
......@@ -130,7 +75,9 @@ page {
right: 6rpx;
bottom: 90rpx;
}
.floating-icon {
width: 128rpx;
height: 128rpx;
}
\ No newline at end of file
}
/** end */
\ No newline at end of file
<!--
此文件为开发者工具生成,生成时间: 2022/10/21下午2:19:20
使用方法:
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxml 引入模板
```
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="{{loading}}" />
```
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
-->
<template name="skeleton">
<view class="sk-container">
<view class="sk-container"></view>
<view class="main-box">
<view is="components/UserInfo/UserInfo" hidden="{{cardInfo}}">
<view class="UserInfo--user-wrapper">
<view class="UserInfo--user-box">
<view class="UserInfo--user-info" data-item="[object Object]">
<view class="UserInfo--user-company">
<image class="UserInfo--company-logo sk-image"></image>
</view>
<view class="UserInfo--user-name">
<view class="UserInfo--name sk-transparent sk-text-19-4444-883 sk-text">梁懿</view>
<view class="UserInfo--position sk-transparent sk-text-14-2857-261 sk-text">哈哈</view>
</view>
<view class="UserInfo--user-phone">
<image webp="true" class="UserInfo--user-icon sk-image"></image>
<view class="sk-transparent sk-text-12-5000-996 sk-text">15814019200</view>
</view>
<view class="UserInfo--user-address">
<image webp="true" class="UserInfo--user-icon sk-image"></image>
<view class="UserInfo--address sk-transparent sk-text-12-5000-291 sk-text">深圳市南山区留仙大道3370号南山智园崇文园区1号楼14层</view>
</view>
<image lazy-load="true" class="UserInfo--user-avatar sk-image"></image>
<image webp="true" class="UserInfo--add-wechat sk-image"></image>
</view>
<image webp="true" class="UserInfo--user-bg sk-image"></image>
</view>
<view class="UserInfo--btn-group">
<view class="UserInfo--phone-btn">
<image webp="true" class="UserInfo--icon-dial sk-image"></image>
<view class="UserInfo--phone-text sk-transparent sk-text-14-2857-847 sk-text" style="background-position-x: 50%;">拨打电话</view>
</view>
<button class="UserInfo--btn-plain UserInfo--btn sk-transparent sk-button sk-pseudo sk-pseudo-circle">保存名片</button>
<button class="UserInfo--btn-primary UserInfo--btn sk-transparent sk-button sk-pseudo sk-pseudo-circle" open-type="share">分享名片</button>
</view>
</view>
<view is="components/Authorize/Authorize"></view>
</view>
<view class="main-bottom">
<view class="channel-bg">
<image webp="true" class="channel-img sk-image" data-path="left" mode="widthFix" style="height: 86.8063px;"></image>
<image webp="true" class="channel-img sk-image" data-path="right" mode="widthFix" style="height: 85.7969px;"></image>
</view>
<view class="tab-list">
<view class="tab-item tab-item-active sk-image" data-index="0" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-411 sk-text" style="background-position-x: 50%;">公司介绍</view>
</view>
<view class="tab-item" data-index="1" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-670 sk-text" style="background-position-x: 50%;">方案介绍</view>
</view>
<view class="tab-item" data-index="2" data-name="[object Object]">
<image webp="true" class="tab-img sk-image" mode="widthFix" style="height: 36px;"></image>
<view class="tab-text sk-transparent sk-text-14-2857-642 sk-text" style="background-position-x: 50%;">视频直播</view>
</view>
</view>
<view>
<image webp="true" class="img sk-image" mode="widthFix" style="height: 1030.51px;"></image>
</view>
</view>
</view>
</view>
</template>
\ No newline at end of file
/*
此文件为开发者工具生成,生成时间: 2022/10/21下午2:19:20
在 D:\workCode\2022-09\ai-card\pages\tab\index\index.wxss 中引入样式
```
@import "./index.skeleton.wxss";
```
更多详细信息可以参考文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/skeleton.html
*/
.sk-transparent {
color: transparent !important;
}
.sk-text-19-4444-883 {
background-image: linear-gradient(transparent 19.4444%, #EEEEEE 0%, #EEEEEE 80.5556%, transparent 0%) !important;
background-size: 100% 72.0000rpx;
position: relative !important;
}
.sk-text {
background-origin: content-box !important;
background-clip: content-box !important;
background-color: transparent !important;
color: transparent !important;
background-repeat: repeat-y !important;
}
.sk-text-14-2857-261 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 36.4000rpx;
position: relative !important;
}
.sk-text-12-5000-996 {
background-image: linear-gradient(transparent 12.5000%, #EEEEEE 0%, #EEEEEE 87.5000%, transparent 0%) !important;
background-size: 100% 32.0000rpx;
position: relative !important;
}
.sk-text-12-5000-291 {
background-image: linear-gradient(transparent 12.5000%, #EEEEEE 0%, #EEEEEE 87.5000%, transparent 0%) !important;
background-size: 100% 32.0000rpx;
position: relative !important;
}
.sk-text-14-2857-847 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 28.0000rpx;
position: relative !important;
}
.sk-text-14-2857-411 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-text-14-2857-670 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-text-14-2857-642 {
background-image: linear-gradient(transparent 14.2857%, #EEEEEE 0%, #EEEEEE 85.7143%, transparent 0%) !important;
background-size: 100% 33.6000rpx;
position: absolute !important;
}
.sk-button {
color: #EFEFEF !important;
background: #EFEFEF !important;
border: none !important;
box-shadow: none !important;
}
.sk-image {
background: #EFEFEF !important;
}
.sk-pseudo::before, .sk-pseudo::after {
background: #EFEFEF !important;
background-image: none !important;
color: transparent !important;
border-color: transparent !important;
}
.sk-pseudo-rect::before, .sk-pseudo-rect::after {
border-radius: 0 !important;
}
.sk-pseudo-circle::before, .sk-pseudo-circle::after {
border-radius: 50% !important;
}
.sk-container {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: hidden;
background-color: transparent;
}
<!-- pages/tab/index/index.wxml -->
<import src="../../template/channel/channel.wxml" />
<import src="../../template/company/company.wxml" />
<import src="../../template/menu/menu.wxml" />
<import src="index.skeleton.wxml"/>
<template is="skeleton" wx:if="true" />
<view class="main-box" wx:if="{{cardInfo}}" >
<user-info data-skeleton-hide="cardInfo" shareDisabled="{{shareDisabled}}" cardInfo="{{cardInfo}}"></user-info>
<view class="main-box">
<user-info shareDisabled="{{shareDisabled}}" cardInfo="{{cardInfo}}"></user-info>
<view class="main-bottom">
<!-- 面向渠道 -->
<template is="channel" data="{{IMGURL, img_version, hasPhoneNumber}}"></template>
<!-- tab介绍 -->
<view class="tab-list">
<block wx:for="{{tabList}}" wx:key="index">
<view wx:if="{{item.isShow}}" class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }}" data-name="{{item}}" data-index="{{index}}" bindtap="introduce">
<view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }}" data-name="{{item}}" data-index="{{index}}" bindtap="introduce">
<image wx:if="{{curTabIndex !== index}}" class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon1}}.png?v={{img_version}}"></image>
<image wx:else class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon}}.png?v={{img_version}}"></image>
<view class="tab-text">{{item.name}}</view>
<!-- <view class="tab-item {{curTabIndex === index ? 'tab-item-active' : '' }} {{index === 3 ? 'tab-apply' : ''}}" style="width: {{100 / tabList.length + '%'}}" data-name="{{item}}" data-index="{{index}}" bindtap="introduce">
<image wx:if="{{curTabIndex !== index}}" class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon1}}.png?v={{img_version}}"></image>
<image wx:else class="tab-img" mode="widthFix" webp src="{{IMGURL}}home/{{item.icon}}.png?v={{img_version}}"></image>
<view class="tab-text">{{item.name}}</view> -->
<!-- 合作申请hot -->
<!-- <image wx:if="{{index === 3}}" class="icon-hot" webp src="{{IMGURL}}home/icon-hot.png?v={{img_version}}"></image> -->
</view>
</block>
</view>
<!-- 公司介绍 -->
<block wx:if="{{curTabIndex === 0 }}">
<template is="company" data="{{IMGURL, banner, current, img_version, awardBanner, awardCurrent, autoplay}}"></template>
</block>
<!-- 方案介绍 -->
<block wx:if="{{curTabIndex === 1 }}">
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType, hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList, autoplay, clueAutoplay}}"></template>
</block>
<view class="main-content">
<view wx:if="{{curTabIndex == 0}}">
增值转化内容
<button bindtap="jump">跳转详情</button>
</view>
<view wx:if="{{curTabIndex == 1}}">系统订阅</view>
</view>
</view>
<!-- 服务咨询 -->
<view class="floating-box">
<image class="floating-icon" style="margin-bottom: 10rpx;" webp bindtap="handleOpen" data-name="store" src="{{IMGURL}}home/icon-store.png?v={{img_version}}"></image>
......
{
"usingComponents": {}
}
\ No newline at end of file
<!--pages/tab/introduction/introduction.wxml-->
<import src="../../template/menu/menu" />
<import src="../../template/cube/cube" />
<import src="../../template/equity/equity" />
<block>
<template is="menu" data="{{menuList, curIntroduceIndex, templateMethods, customerType}}"></template>
</block>
<block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube"></template>
</block>
<block wx:elif="{{curIntroduceIndex === 1}}">
<template is="equity"></template>
</block>
<button open-type="share">分享</button>
<view class="btn-bottm">
<view class="share-btn" bindtap="share">
<image class="icon-share" webp src="{{IMGURL}}home/icon-share.png"></image>
<view class="share-text">分享此页面</view>
</view>
</view>
\ No newline at end of file
/* pages/tab/introduction/introduction.wxss */
@import '../../template/menu/menu.wxss';
page {
background-color: #f5f5f6;
}
.btn-bottm {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
background-color: #ffffff;
padding: 24rpx 48rpx 12rpx;
box-sizing: border-box;
font-size: 28rpx;
color: #FFFFFF;
}
.share-btn {
display: flex;
justify-content: center;
text-align: center;
padding: 16rpx 0;
width: 100%;
background: #5850FF;
background-image: linear-gradient(180deg, #4791FF 0%, #5850FF 100%, #643DFF 100%);
border-radius: 8rpx;
}
.icon-share {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
\ No newline at end of file
<template name="channel">
<view class="channel-bg">
<!-- <image class="channel-img" mode="widthFix" webp src="https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/home/banner-bg.png" data-name="logo"></image>
<view class="channel-word">
<view class="channel-title">面向渠道</view>
<view class="channel-text">助力数字化转型,实现获客增值</view>
</view> -->
<image class="channel-img" mode="widthFix" webp src="{{IMGURL}}home/banner-left.png?v={{img_version}}" bindtap="jumpBanner" data-path="left"></image>
<view class="channel-img channel-phone">
<image class="channel-image" mode="widthFix" webp src="{{IMGURL}}home/banner-right.png?v={{img_version}}" bindtap="jumpBanner" data-path="right"></image>
<phone-number wx:if="{{!hasPhoneNumber}}" class="channel-image" bind:updatePhoneNumber="updatePhoneNumber" isImage="true"></phone-number>
</view>
</view>
</template>
\ No newline at end of file
.channel-bg {
/* width: 700rpx;
height: 144rpx; */
margin: 0 28rpx;
position: relative;
}
.channel-img {
display: inline-block;
width: calc(50% - 10rpx);
height: 168rpx;
}
.channel-img:first-child {
margin-right: 16rpx;
}
.channel-image {
width: 100%;
}
.channel-phone {
position: relative;
}
.channel-word {
position: absolute;
top: 24rpx;
left: 38rpx;
}
.channel-title {
font-family: AlibabaPuHuiTiM;
font-weight: 600;
font-size: 36rpx;
color: #2D2D33;
line-height: 56rpx;
}
.channel-text {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
}
\ No newline at end of file
<!-- 智能线索 -->
<template name="clue">
<view class="p-b-20">
<view class="relative">
<image mode="widthFix" class="img" lazy-load webp src="{{IMGURL}}image/clue/clue-img1.png?v={{img_version}}"></image>
<view class="clue-video">
<video poster="{{IMGURL}}image/clue/clue-img14.png?v={{img_version}}" src="{{IMGURL}}image/clue/clue.mp4?v={{img_version}}"></video>
</view>
</view>
<view wx:if="{{hasPhoneNumber}}">
<view class="relative m-t-64">
<image mode="widthFix" class="img" lazy-load webp src="{{IMGURL}}image/clue/clue-bg.webp?v={{img_version}}"></image>
<view class="clue">
<!-- <image mode="widthFix" class="img" lazy-load src="{{IMGURL}}image/clue/clue-img2.webp?v={{img_version}}"></image> -->
<swiper class="clue-swiper" autoplay="{{clueAutoplay}}" bindchange="clueChange" current="{{clueCurrent}}" interval="5000" circular>
<block wx:for="{{clueList}}" wx:key="ind">
<swiper-item class="swiper-item">
<image class="clue-img" lazy-load webp src="{{IMGURL}}image/clue/{{item}}?v={{img_version}}"></image>
</swiper-item>
</block>
</swiper>
<view class="dots">
<block wx:for="{{clueList}}" wx:for-index="index" wx:key="index">
<view class="{{clueCurrent == index ? 'active' : ''}}"></view>
</block>
</view>
</view>
</view>
</view>
<view class="more-box" wx:else>
<image mode="widthFix" class="img m-t-16" lazy-load webp src="{{IMGURL}}image/clue/clue-img16.webp?v={{img_version}}"></image>
<view class="more-btn">
<phone-number bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
</view>
</view>
</template>
\ No newline at end of file
.clue {
position: absolute;
top: 348rpx;
left: 50%;
transform: translateX(-50%);
}
.clue-swiper {
height: 984rpx;
width: 630rpx;
text-align: center;
}
.dots {
position: absolute;
bottom: -64rpx;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.dots view {
width: 20rpx;
height: 8rpx;
/* margin: 0 6rpx; */
background-color: #E6E7EB;
}
.dots .active {
background-color: #5850FF;
}
.clue-img {
width: 630rpx;
height: 984rpx;
}
.clue-video {
position: absolute;
width: 616rpx;
height: 344rpx;
bottom: 68rpx;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.clue-video video {
width: 616rpx;
height: 344rpx;
border-radius: 16rpx;
}
\ No newline at end of file
<!-- 公司介绍 -->
<template name="company">
<view>
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/company/company-img1.png?v={{img_version}}"></image>
<!-- 合同客户 -->
<view class="relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/company/bg1.png?v={{img_version}}"></image>
<view class="box2">
<swiper class="swiper" autoplay="{{autoplay}}" duration="5000" interval="5000" circular>
<swiper-item class="swiper-item">
<image class="box2-content" webp src="{{IMGURL}}image/company/company-img2.png?v={{img_version}}"></image>
</swiper-item>
<swiper-item class="swiper-item">
<image class="box2-content" webp src="{{IMGURL}}image/company/company-img21.png?v={{img_version}}"></image>
</swiper-item>
</swiper>
</view>
</view>
<!-- 政府与行业资质 -->
<view class="relative">
<image mode="widthFix" class="img" webp src="{{IMGURL}}image/company/bg2.png?v={{img_version}}"></image>
<view class="box3">
<swiper class="box3-swiper" autoplay="{{autoplay}}" bindchange="changePage" current="{{current}}" indicator-dots="{{false}}" indicator-color="#E6E7EB" indicator-active-color="#5850FF" interval="5000" circular>
<block wx:for="{{banner}}" wx:key="ind">
<swiper-item class="swiper-item">
<image class="box3-img" webp src="{{IMGURL}}image/company/{{item}}?v={{img_version}}"></image>
</swiper-item>
</block>
</swiper>
<view class="company-dots">
<block wx:for="{{banner}}" wx:for-index="index" wx:key="index">
<view class="{{current == index ? 'company-active' : ''}}"></view>
</block>
</view>
</view>
</view>
<!-- 荣誉及奖项 -->
<view class="relative box5">
<image class="box5-title" webp src="{{IMGURL}}image/company/company-img6.png?v={{img_version}}"></image>
<swiper class="box5-swiper" autoplay bindchange="changeBanner" current="{{awardCurrent}}" indicator-dots="{{false}}" indicator-color="#E6E7EB" indicator-active-color="#5850FF" interval="5000" circular>
<block wx:for="{{awardBanner}}" wx:key="ind">
<swiper-item class="swiper-item">
<image class="box5-content" webp src="{{IMGURL}}image/company/{{item.src}}?v={{img_version}}"></image>
</swiper-item>
</block>
</swiper>
<view class="banner-dots">
<block wx:for="{{awardBanner}}" wx:for-index="index" wx:key="index">
<view bindtap="tapBanner" data-current="{{index}}" class="{{awardCurrent == index ? 'banner-active' : ''}}">{{item.name}}</view>
</block>
</view>
</view>
<!-- <image mode="widthFix" class="img" src="{{IMGURL}}image/company/company-img5.png?v={{img_version}}"></image> -->
<image mode="widthFix" webp class="img" src="{{IMGURL}}image/company/company-img5.png?v={{img_version}}"></image>
</view>
</template>
\ No newline at end of file
.box2 {
position: absolute;
width: 716rpx;
top: 240rpx;
left: 50%;
transform: translateX(-50%);
}
.box2-content {
width: 716rpx;
height: 344rpx;
}
.box3 {
position: absolute;
top: 240rpx;
left: 50%;
transform: translateX(-50%);
}
.box3-img, .box3-swiper {
width: 704rpx;
height: 432rpx;
}
.box4 {
width: 100%;
height: 956rpx;
background-color: #fff;
}
.box4-title {
position: absolute;
width: 278rpx;
height: 112rpx;
top: 96rpx;
left: 50%;
transform: translateX(-50%);
}
.box4-content {
position: absolute;
width: 496rpx;
height: 460rpx;
top: 384rpx;
left: 50%;
transform: translateX(-50%);
}
.swiper {
height: 432rpx;
}
.company-dots {
position: absolute;
bottom: -64rpx;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.company-dots view {
width: 96rpx;
height: 8rpx;
background-color: #E6E7EB;
}
.company-dots .company-active {
background-color: #5850FF;
}
.box5 {
width: 100%;
height: 1016rpx;
background-color: #fff;
}
.box5-title {
width: 278rpx;
height: 112rpx;
position: absolute;
top: 96rpx;
left: 50%;
transform: translateX(-50%);
}
.box5-swiper {
position: absolute;
top: 384rpx;
left: 50%;
transform: translateX(-50%);
width: 496rpx;
height: 460rpx;
}
.box5-content {
width: 496rpx;
height: 460rpx;
}
.banner-dots {
position: absolute;
top: 256rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
align-items: center;
width: 656rpx;
font-size: 28rpx;
color: #6E6E7A;
font-weight: 400;
border-radius: 32rpx;
background-color: #F5F6FA;
}
.banner-dots view {
display: flex;
align-items: center;
justify-content: center;
width: 328rpx;
height: 64rpx;
}
.banner-dots .banner-active {
background-color: #fff;
box-shadow: 0 2rpx 12rpx 0 rgba(165,163,204,0.40);
border-radius: 32rpx;
color: #2D2D33;
font-weight: 500;
}
\ No newline at end of file
<!-- 企微魔方 -->
<template name="cube">
<view class="p-b-20">
<view class="cube-img1-box">
<image class="img cube-img1" webp src="{{IMGURL}}image/cube/cube-img3.png?v={{img_version}}"></image>
<image class="cute-text cute-text1" webp src="{{IMGURL}}image/cube/cute-text1.png?v={{img_version}}"></image>
<image class="cute-text cute-text2" webp src="{{IMGURL}}image/cube/cute-text2.png?v={{img_version}}"></image>
<image class="cute-text cute-text3" webp src="{{IMGURL}}image/cube/cute-text3.png?v={{img_version}}"></image>
<image class="cute-text cute-text4" webp src="{{IMGURL}}image/cube/cute-text4.png?v={{img_version}}"></image>
<image class="cute-text cute-text5" webp src="{{IMGURL}}image/cube/cute-text5.png?v={{img_version}}"></image>
</view>
<view wx:if="{{hasPhoneNumber}}">
<image mode="widthFix" lazy-load class="img m-t-64" webp src="{{IMGURL}}image/cube/cube-img1.png?v={{img_version}}"></image>
<view class="relative" style="height: 2772rpx;">
<image class="img m-t-64" style="height: 2772rpx;" webp src="{{IMGURL}}image/cube/cube-img2.png?v={{img_version}}"></image>
<image class="img2-text img2-text1" webp src="{{IMGURL}}image/cube/img2-text1.png?v={{img_version}}"></image>
<image class="img2-text img2-text2" webp src="{{IMGURL}}image/cube/img2-text2.png?v={{img_version}}"></image>
<image class="img2-text img2-text3" webp src="{{IMGURL}}image/cube/img2-text3.png?v={{img_version}}"></image>
<view class="box-video cube-video1">
<video poster="{{IMGURL}}image/cube/arrival-img.png?v={{img_version}}" src="{{IMGURL}}image/cube/arrival.mp4?v={{img_version}}"></video>
</view>
<view class="box-video cube-video2">
<video poster="{{IMGURL}}image/cube/checkout-img.png?v={{img_version}}" src="{{IMGURL}}image/cube/checkout.mp4?v={{img_version}}"></video>
</view>
<view class="box-video cube-video3">
<video poster="{{IMGURL}}image/cube/rescue-img.png?v={{img_version}}" src="{{IMGURL}}image/cube/rescue.mp4?v={{img_version}}"></video>
</view>
</view>
</view>
<view class="more-box" wx:else>
<image mode="widthFix" class="img m-t-16" lazy-load webp src="{{IMGURL}}image/cube/cube-img4.png?v={{img_version}}"></image>
<view class="more-btn">
<phone-number bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
</view>
</view>
</template>
\ No newline at end of file
.m-t-64 {
margin-top: 24rpx;
}
.m-t-16 {
margin-top: 16rpx;
}
.box-video {
position: absolute;
width: 566rpx;
height: 316rpx;
left: 50%;
transform: translateX(-50%);
border-radius: 16rpx;
}
.cube-video1 {
top: 610rpx;
}
.cube-img1 {
width: 710rpx;
height: 2700rpx;
}
.cube-img1-box {
position: relative;
width: 710rpx;
height: 2700rpx;
}
.cute-text {
position: absolute;
left: 50%;
transform: translateX(-50%);
width: 614rpx;
}
.cute-text1 {
width: 606rpx;
height: 284rpx;
top: 128rpx;
}
.cute-text2 {
height: 260rpx;
top: 452rpx;
}
.cute-text3 {
height: 216rpx;
top: 736rpx;
}
.cute-text4 {
height: 216rpx;
top: 976rpx;
}
.cute-text5 {
height: 1380rpx;
top: 1272rpx;
}
.box-video video {
border-radius: 18rpx;
width: 566rpx;
height: 316rpx;
}
.cube-video2 {
bottom: 1026rpx;
}
.cube-video3 {
bottom: 138rpx;
}
.img2-text {
position: absolute;
width: 670rpx;
left: 50%;
transform: translateX(-50%);
}
.img2-text1 {
height: 852rpx;
top: 136rpx;
}
.img2-text2 {
height: 788rpx;
top: 1028rpx;
}
.img2-text3 {
height: 852rpx;
top: 1856rpx;
}
\ No newline at end of file
<!-- 数字化权益 -->
<template name="equity">
<view class="p-b-20">
<view class="relative">
<image mode="widthFix" class="img" lazy-load webp src="{{IMGURL}}image/equity/equity-img1.webp?v={{img_version}}"></image>
<view class="box-video equity-video">
<video poster="{{IMGURL}}image/equity/equity-img7.webp?v={{img_version}}" src="{{IMGURL}}image/equity/equity.mp4?v={{img_version}}"></video>
</view>
</view>
<view wx:if="{{hasPhoneNumber}}">
<image mode="widthFix" class="img m-t-64" lazy-load webp src="{{IMGURL}}image/equity/equity-img2.webp?v={{img_version}}"></image>
<image mode="widthFix" class="img m-t-64" lazy-load webp src="{{IMGURL}}image/equity/equity-img3.webp?v={{img_version}}"></image>
<image mode="widthFix" class="img m-t-64" lazy-load webp src="{{IMGURL}}image/equity/equity-img4.webp?v={{img_version}}"></image>
<image mode="widthFix" class="img m-t-64" lazy-load webp src="{{IMGURL}}image/equity/equity-img5.webp?v={{img_version}}"></image>
</view>
<view class="more-box" wx:else>
<image mode="widthFix" class="img m-t-16" lazy-load webp src="{{IMGURL}}image/equity/equity-img6.webp?v={{img_version}}"></image>
<view class="more-btn">
<phone-number bind:updatePhoneNumber="updatePhoneNumber"></phone-number>
</view>
</view>
</view>
</template>
\ No newline at end of file
.equity-video {
top: 1046rpx;
}
\ No newline at end of file
<import src="../cube/cube" />
<import src="../equity/equity" />
<import src="../clue/clue" />
<template name="menu">
<view class="menu-list">
<block wx:for="{{menuList}}" wx:key="index">
<view class="menu-item {{index === curIntroduceIndex ? 'menu-active' : ''}} {{customerType === 1 && index === curIntroduceIndex ? 'menu-active-agency' : ''}}" bindtap="selectIntroduce" data-index="{{index}}">
{{item}}
</view>
</block>
</view>
<view class="isFullSucreen image-wrapper">
<block wx:if="{{curIntroduceIndex === 0}}">
<template is="cube" data="{{IMGURL, hasPhoneNumber, img_version}}"></template>
</block>
<block wx:if="{{curIntroduceIndex === 1}}">
<template is="equity" data="{{hasPhoneNumber, IMGURL, img_version}}"></template>
</block>
<block wx:elif="{{curIntroduceIndex == 2}}">
<template is="clue" data="{{hasPhoneNumber, IMGURL, img_version, clueCurrent, clueList, clueAutoplay}}"></template>
</block>
</view>
</template>
\ No newline at end of file
.menu-list {
display: flex;
justify-content: space-evenly;
background-color: #fff;
margin-top: 16rpx;
}
.menu-item {
position: relative;
font-size: 26rpx;
color: #6E6E7A;
height: 88rpx;
line-height: 88rpx;
}
.menu-active {
color: #5850ff;
font-weight: 500;
font-size: 28rpx;
}
.menu-active-agency {
font-weight: 600;
font-size: 32rpx;
color: #2D2D33;
}
.menu-active::after {
content: '';
display: inline-block;
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 48rpx;
height: 6rpx;
background-color: #5850ff;
border-radius: 0.8rpx;
}
\ No newline at end of file
......@@ -106,44 +106,40 @@ class Router {
return pages[pages.length - size];
};
checkRouter(route, events) {
this[_query] = events || {};
const [_parent, _name, last_name] = route.split(".");
let name = route;
let [parent] = this.getPageInstance().__route__.split("/");
let query = "";
if (route.includes("?")) {
let [_name_, _query_] = route.split("?");
query = `?${_query_}`;
name = _name_;
this[_query] = events || {}
const [_parent, _name, last_name] = route.split('.')
let name = route
let [parent] = this.getPageInstance().__route__.split('/')
let query = ''
if (route.includes('?')) {
let [_name_, _query_] = route.split('?')
query = `?${_query_}`
name = _name_
}
if (_parent && _name) {
name = _name.split("?")[0];
parent = _parent;
name = _name.split('?')[0]
parent = _parent
}
/**只传页面名 默认跳转当前包下的页面,相同名称默认第一个 */
if (!_name && !last_name) {
name = _parent;
parent = parent;
}
const routerMapItem = this[_routerList].find((item) => {
if (last_name) {
return (
item.parent === parent &&
item.name === last_name &&
item.subPages === name
);
} else {
return item.parent === parent && item.name === name;
if (!_name && !last_name) name = _parent
const routerMapItem = this[_routerList].find(item => {
if (route.includes('/')) return item.url === route
else {
if (last_name) {
return item.parent === parent && item.name === last_name && item.subPages === name
} else {
return item.parent === parent && item.name === name
}
}
});
})
if (!routerMapItem) {
console.error("找不到路由");
return;
console.error('找不到路由')
return
}
return {
routerMapItem,
query,
};
query
}
}
/**跳转至H5 */
jumpH5(url) {
......
......@@ -16,25 +16,17 @@
* }
*/
import api from '../api/request'
import {trackData} from '../utils/data'
let TRACK_TIME = null,
ADDRESS_INFO = null
const track_interval_time = 60 * 1e3
let TRACK_TIME = null
class TRACK {
constructor() {
this.initPageProxy()
// this.sendTrack()
// this.getAddressInfo().then(res => ADDRESS_INFO = res)
this.appHide()
}
/**监听页面 */
pageLeaveProxy(thisPage) {
let _this = this,
onHide = thisPage.onHide,
onUnload = thisPage.onUnload,
onLoad = thisPage.onLoad,
onShow = thisPage.onShow,
onTabItemTap = thisPage.onTabItemTap
thisPage.onTabItemTap = function (options) {
onTabItemTap && onTabItemTap.apply(this, arguments),
......@@ -42,30 +34,8 @@ class TRACK {
}
thisPage.onLoad = function () {
onLoad && onLoad.apply(this, arguments)
//, _this.setTrack({
// enterTime: new Date().format('yyyy-MM-dd hh:mm:ss')
// })
, _this.setTrack()
}
thisPage.onShow = function () {
onShow && onShow.apply(this, arguments), _this.getPageInstance().page_show_time = Date.now()
}
thisPage.onHide = function () {
let {
page_show_time
} = _this.getPageInstance()
onHide && onHide.apply(this, arguments), _this.setTrack({
duration: getDuration(page_show_time)
}, 2)
}
thisPage.onUnload = function () {
let {
page_show_time
} = _this.getPageInstance()
onUnload && onUnload.apply(this, arguments), _this.setTrack({
duration: getDuration(page_show_time)
}, 2)
}
const getDuration = (page_show_time) => (Date.now() - page_show_time) / 1e3
}
/**全局注册事件 */
initPageProxy() {
......@@ -95,31 +65,12 @@ class TRACK {
})
}
/**设置埋点数据 */
setTrack(e, act_id = 1) {
// console.log('---------------- 获取小程序启动时的参数 ----------------', wx.getLaunchOptionsSync())
let userInfo = wx.$util.getUserInfo()
// wx.setStorageSync('track_last_time', now)
let data = {}
if (userInfo) {
/**用户信息 */
if (userInfo.openId) data.open_id = userInfo.openId
if (userInfo.unionId) data.union_id = userInfo.unionId
if (userInfo.phone) data.customer_phone = userInfo.phone
}
console.log('---------------- 触发了埋点 ----------------', data)
// if (!prepare_data) prepare_data = []
// prepare_data.push(JSON.stringify(data))
// wx.setStorageSync('prepare_data', prepare_data)
}
getGuestNo() {
let guest_no = wx.$storage.get('guest_no')
if (!guest_no) {
guest_no = this.setGuestNo()
wx.setStorageSync('guest_no', guest_no)
}
return guest_no
setTrack(params, act_id = 1) {
console.log('---------------- 获取小程序启动时的参数 ----------------', wx.getLaunchOptionsSync())
let userInfo = wx.$storage.get('aicard_user_info')
console.log(this.getPageTitle(), userInfo)
}
/**定时发送埋点数据 */
/**发送埋点数据 */
sendTrack(p, info) {
console.log(info)
console.log(wx.$trackData);
......@@ -131,7 +82,6 @@ class TRACK {
type: systemInfo.environment ? 2 : 1
}
let userInfo = { }
if (wx.$util.getUserInfo()) {
const {nickName, openId, phone} = wx.$util.getUserInfo() || {}
userInfo = {
......@@ -141,12 +91,6 @@ class TRACK {
phone,
}
} else {
// if (info.openId) {
// userInfo.openId = info.openId
// } else {
// // userInfo.openId = wx.$storage.get('openId')
// userInfo.openId = wx.$storage.get('aicard_info').openId
// }
userInfo.openId = info && info.openId ? info.openId : wx.$storage.get('aicard_info').openId
userInfo.unionId = info && info.unionId ? info.unionId : wx.$storage.get('aicard_info').unionId
}
......@@ -185,128 +129,6 @@ class TRACK {
if (!title) title = '广汇车生活'
return title
}
/**获取设备信息 */
getSystemInfo() {
let {
SDKVersion,
brand,
model,
system,
version
} = JSON.parse(wx.$storage.get('aicard_system_info'))
return {
SDK_version: SDKVersion,
brand,
model,
system,
version
}
}
/**获取门店信息 */
getMerchantInfo() {
let {
merchantId
} = wx.$storage.get('merchant_info')
return {
merchant_id: merchantId
}
}
/**获取用户位置信息 */
// getAddressInfo() {
// let addressInfo = wx.$storage.get('address_info')
// return new Promise((resolve) => {
// if (addressInfo && Date.now() - addressInfo.createTime < 2 * 60 * 1e3) resolve(addressInfo)
// else wx.getLocation({
// type: 'gcj02'
// }).then(({
// latitude,
// longitude
// }) => {
// if (!addressInfo) this.setTrack({}, 5)
// return
// mapApi.detailedAdrress([latitude, longitude]).then(detail => {
// let info = {
// ...detail,
// createTime: Date.now()
// }
// resolve(info)
// wx.setStorageSync('address_info', info)
// })
// })
// })
// }
/**获取游客ID */
setGuestNo(length = 30) {
let name = '',
n = [
'0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
'8',
'9',
'a',
'b',
'c',
'd',
'e',
'f',
'g',
'h',
'i',
'j',
'k',
'l',
'm',
'n',
'o',
'p',
'q',
'r',
's',
't',
'u',
'v',
'w',
'x',
'y',
'z',
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z'
]
for (let i = 0; i < Number(length); i++) {
name += n[Math.round(Math.random() * (n.length - 1))]
}
return `GH_${name}_${Date.now()}`
}
}
wx.$Track = new TRACK()
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!