Commit bdc33e69 by 前端

申请活动

1 parent c314a6d9
// components/CooperationApply/CooperationApply.js
import WxValidate from "../../utils/WxValidate"
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
tabData: [{
name: '门店合作申请',
value: 0
},
{
name: '代理商合作申请',
value: 1
}
],
tabIndex: 0,
applyForm: {
merchantName: '',
carModel: '',
contactName: '',
contactPhone: ''
},
},
/**
* 组件的方法列表
*/
methods: {
selectTab(e) {
console.log(e.currentTarget.dataset.index);
this.setData({
tabIndex: e.currentTarget.dataset.index
})
},
// 表单验证规则
initValidate() {
console.log(123123);
const rules = {
merchantName: {
required: true
},
contactName: {
required: true
},
contactPhone: {
required: true,
tel: true
}
}
const messages = {
merchantName: {
required: '请填写门店名称',
},
contactName: {
required: '请填写联系人'
},
contactPhone: {
required: '请填写手机号'
}
}
this.WxValidate = new WxValidate(rules, messages)
},
//报错
showModal(error) {
wx.showModal({
content: error.msg,
showCancel: false,
})
},
// 表单输入
handleInput(e) {
let name = e.currentTarget.dataset.name
let val = e.detail.value
const form = `applyForm.${name}`
this.setData({
[form]: val
})
},
// 校验表单
validateForm() {
let params = this.data.applyForm
// 校验表单
if (!this.WxValidate.checkForm(params)) {
const error = this.WxValidate.errorList[0]
this.showModal(error)
wx.hideLoading()
return false
} else {
return [params, this.data.tabIndex]
}
}
},
// 组件页面生周期
lifetimes: {
created: function () {
// 在组件实例刚刚被创建时执行
// 初始化验证规则函数
console.log('created');
this.initValidate()
},
}
})
\ No newline at end of file \ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
<!--components/CooperationApply/CooperationApply.wxml-->
<view>
<view class="tab-top">
<view wx:for="{{tabData}}" class="tab-title {{item.value == tabIndex ? 'tab-title-active' : ''}}" bindtap="selectTab" data-index="{{item.value}}">{{item.name}}</view>
</view>
<form>
<view class="apply-info">
<view class='info-list'>
<text class="info-lable">门店名称<text class="require"> *</text></text>
<input name="applyName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入门店名称' value="{{applyForm.merchantName}}" bindinput="handleInput" data-name="merchantName" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">{{tabIndex == 0 ? '主营品牌' : '合作品牌'}}</text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入主营车型' value="{{applyForm.carModel}}" bindinput="handleInput" data-name="carModel" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">联系人<text class="require"> *</text></text>
<input name="bussinessName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入姓名' value="{{applyForm.contactName}}" bindinput="handleInput" data-name="contactName" maxlength="30"></input>
</view>
<view class='info-list'>
<text class="info-lable">手机号<text class="require"> *</text></text>
<input name="bussinessName" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入手机号' value="{{applyForm.contactPhone}}" bindinput="handleInput" data-name="contactPhone"></input>
</view>
</view>
</form>
</view>
/* components/CooperationApply/CooperationApply.wxss */
.tab-top {
display: flex;
justify-content: space-around;
height: 110rpx;
}
.tab-title {
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 32rpx;
color: #323436;
text-align: center;
line-height: 110rpx;
}
.tab-title-active {
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 32rpx;
color: #323436;
line-height: 110rpx;
position: relative;
}
.tab-title-active::after {
content: '';
width: 80rpx;
height: 6rpx;
position: absolute;
bottom: 5rpx;
left: 50%;
transform: translateX(-50%);
background: #5850FF;
border-radius: 8rpx 8rpx 0 0;
}
.apply-info {
padding: 0 32rpx;
}
.info-list {
/* background: #fff; */
display: flex;
align-content: center;
padding: 36rpx 0;
border-bottom: 1rpx solid #eee;
}
.info-lable {
width: 176rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #2D2D33;
}
.require {
color: #EB4E4E;
}
\ No newline at end of file \ No newline at end of file
import util from '../utils/util'
module.exports = Behavior({ module.exports = Behavior({
methods:{ methods: {
shareTrack() { shareTrack(name, type) {
console.log(77777); let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
} let pathName = `pages/productDetail/${type}/${type}?cardId=`+util.getStorageSync('scene').cardId + "&merchant=" + merchant + '&detailShare=' + `trackData.${name}.pageName`
return {
title: trackData[name].pageName,
path: pathName
}
}
} }
}) })
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": {}, "usingComponents": {
"apply-content": "../../components/CooperationApply/CooperationApply"
},
"navigationBarTitleText": "活动申请" "navigationBarTitleText": "活动申请"
}
\ No newline at end of file \ No newline at end of file
}
<!--pages/activityApplication/activityApplication.wxml--> <!-- pages/activityApplication/activityApplication.wxml -->
<view class="apply-content"> <view class="apply-content">
<image class="apply-background" mode="widthFix" webp src="{{IMGURL}}application/application_top.png?v={{img_version}}"></image> <image class="apply-background" mode="widthFix" webp src="{{IMGURL}}application/application_top.png?v={{img_version}}"></image>
<view class="box-background"> <view class="box-background">
...@@ -7,50 +7,34 @@ ...@@ -7,50 +7,34 @@
<!-- tab栏 --> <!-- tab栏 -->
<block wx:for="{{productTabList}}"> <block wx:for="{{productTabList}}">
<view class="product-item {{item.id == selectItemIndex ? 'product-item-active' : ''}}" bindtap="selectProduct" data-item="{{item}}"> <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-title {{item.id == selectItemIndex ? 'product-item-title-active' : ''}}">
<view class="product-item-type {{item.id == selectItemIndex ? 'product-item-type-active' : ''}}">{{item.type}}</view> {{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 wx:if="{{item.id == selectItemIndex}}" class="selected-item">
<view class="selected-item-top"></view> <view class="selected-item-top"></view>
<view class="selected-item-bottom"></view> <view class="selected-item-bottom"></view>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
<!-- 产品展示 --> <!-- 产品展示 -->
<view class="product-box"> <view class="product-box">
<view class="product-tip">
<image class="tip-icon" mode="widthFix" webp src="{{IMGURL}}application/tip_icon.png?v={{img_version}}"></image>
<text class="tip-text">{{sceneTip[selectItemName]}}</text>
</view>
<block wx:for="{{productList[selectItemName]}}"> <block wx:for="{{productList[selectItemName]}}">
<image class="product-img" mode="widthFix" webp src="{{IMGURL}}application/{{item.url}}.png?v={{img_version}}" bindtap="goPage" data-item="{{item.name}}"></image> <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.name}}"></image>
</block> </block>
</view> </view>
</view> </view>
<!-- 申请表单 --> <!-- 申请表单 -->
<view class="apply-box"> <view class="apply-box">
<view class="apply-top"> <!-- 表单 -->
<view class="apply-top-icon"></view> <apply-content id="applyForm"></apply-content>
<view class="apply-top-title">申请信息</view>
</view>
<form>
<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="{{applyForm.merchantName}}" bindinput="handleInput" data-name="merchantName"></input>
</view>
<view class='info-list'>
<text class="info-lable">主营车型</text>
<input name="telphone" type='text' placeholder-style='font-size:28rpx;color: #9E9EA8;' placeholder='请输入主营车型' value="{{applyForm.carModel}}" bindinput="handleInput" data-name="carModel"></input>
</view>
<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="{{applyForm.contactName}}" bindinput="handleInput" data-name="contactName"></input>
</view>
<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="{{applyForm.contactPhone}}" bindinput="handleInput" data-name="contactPhone"></input>
</view>
</view>
</form>
<!-- 展开收起 --> <!-- 展开收起 -->
<view class="apply-fold" bindtap="handleFold"> <view class="apply-fold" bindtap="handleFold">
<text wx:if="{{!foldFlag}}">选择业务场景</text> <text wx:if="{{!foldFlag}}">选择业务场景</text>
...@@ -65,14 +49,21 @@ ...@@ -65,14 +49,21 @@
<view wx:for="{{productTabList}}" class="item-wrap {{item.id == sceneNum ? 'act':''}}" bindtap="selectScene" data-item="{{item}}"> <view wx:for="{{productTabList}}" class="item-wrap {{item.id == sceneNum ? 'act':''}}" bindtap="selectScene" data-item="{{item}}">
<view class="fold-scene-item {{item.id == sceneNum ? 'fold-scene-item-active':''}}"> <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> <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-title {{item.id == sceneNum ? 'product-item-title-active':''}}">
<view class="product-item-type {{item.id == sceneNum ? 'product-item-type-active':''}}">{{item.type}}</view> {{item.title}}
</view>
<view class="product-item-type {{item.id == sceneNum ? 'product-item-type-active':''}}">
{{item.type}}
</view>
</view> </view>
</view> </view>
</view> </view>
<!-- 选择产品 --> <!-- 选择产品 -->
<block wx:if="{{sceneNum}}"> <block wx:if="{{sceneNum}}">
<view><text class="fold-title">选择产品</text><text class="fold-tip">(可多选)</text></view> <view>
<text class="fold-title">选择产品</text>
<text class="fold-tip">(可多选)</text>
</view>
<view class="fold-product"> <view class="fold-product">
<block wx:for="{{productList[sceneName]}}"> <block wx:for="{{productList[sceneName]}}">
<view class="item {{item.isSelect ? 'item-selected': ''}}" bindtap="selectScenePro" data-index="{{index}}"> <view class="item {{item.isSelect ? 'item-selected': ''}}" bindtap="selectScenePro" data-index="{{index}}">
...@@ -85,7 +76,6 @@ ...@@ -85,7 +76,6 @@
</block> </block>
</view> </view>
<view class="btn-box"> <view class="btn-box">
<button class="submit-btn" bindtap="submitApply"> <button class="submit-btn" bindtap="submitApply">提交申请</button>
提交申请 </view>
</button></view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -96,7 +96,7 @@ ...@@ -96,7 +96,7 @@
height: 216rpx; height: 216rpx;
margin-right: 16rpx; margin-right: 16rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
box-shadow: 0 6rpx 24rpx 0 rgba(175,181,219,0.40); box-shadow: 0 6rpx 24rpx 0 rgba(175, 181, 219, 0.40);
} }
.product-img:nth-child(3n) { .product-img:nth-child(3n) {
...@@ -104,10 +104,32 @@ ...@@ -104,10 +104,32 @@
} }
.product-box { .product-box {
margin: 36rpx 0 63rpx 0; margin: 36rpx 0 56rpx 0;
padding: 0 26rpx; padding: 0 26rpx;
} }
.product-tip {
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 { .apply-box {
width: 702rpx; width: 702rpx;
/* height: 680rpx; */ /* height: 680rpx; */
...@@ -121,51 +143,6 @@ ...@@ -121,51 +143,6 @@
left: 24rpx; */ left: 24rpx; */
} }
.apply-top {
display: flex;
padding: 32rpx;
}
.apply-top-icon {
width: 10rpx;
height: 38rpx;
background: #5850FF;
border-radius: 0 8rpx 8rpx 0;
margin-right: 18rpx;
margin-top: 2rpx;
}
.apply-top-title {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #323436;
}
.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;
}
.submit-btn { .submit-btn {
width: 622rpx; width: 622rpx;
height: 80rpx; height: 80rpx;
......
// pages/newEnergy/newEnergy.js // pages/newEnergy/newEnergy.js
import { trackData } from "../../utils/data"; // import {
import util from "../../utils/util"; // trackData
// } from "../../utils/data";
import {
entmicroApi
} from "../../api/api"
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
applyShow: false
}, },
toSuccess() { toSuccess() {
wx.$router.go("applySuccess"); wx.$router.go("applySuccess");
}, },
// 展开申请
toApply() {
this.setData({
applyShow: !this.data.applyShow
})
},
// 提交申请
submitApply() {
wx.$util.showLoading('提交中...')
let validFlag = this.selectComponent('#applyForm').validateForm()
if (!validFlag[0]) return
let params = JSON.parse(JSON.stringify(validFlag[0]))
let applyType = validFlag[1]
// 区分代理商和门店
params.merchantName = applyType == 0 ? params.merchantName + '(新能源-门店)' : params.merchantName + '(新能源-代理商)'
params.cardId = wx.$util.getStorageSync("scene").cardId
params.merchant = wx.$util.getStorageSync("scene").merchant
params.openId = wx.$util.getStorageSync('aicard_info').openId
params.unionId = wx.$util.getStorageSync('aicard_info').unionId
console.log(params);
entmicroApi.activityApply(params).then(({
data,
code,
message
}) => {
if (code == 0) {
wx.hideLoading()
wx.showToast({
msg: '提交成功'
})
wx.$router.go("applySuccess");
} else {
wx.hideLoading()
wx.showModal({
content: message,
showCancel: false,
})
}
})
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
...@@ -34,17 +78,19 @@ Page({ ...@@ -34,17 +78,19 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
const options = wx.getEnterOptionsSync() // const options = wx.getEnterOptionsSync()
if (options.query.cardId) { // if (options.query.cardId) {
wx.$trackData = options.query // wx.$trackData = options.query
} // }
getApp() // getApp()
.login() // .login()
.then(({ data }) => { // .then(({
if (!wx.$trackData.detailShare) { // data
wx.$Track.sendTrack(trackData.NEWENERGY); // }) => {
} // if (!wx.$trackData.detailShare) {
}); // wx.$Track.sendTrack(trackData.NEWENERGY);
// }
// });
}, },
/** /**
...@@ -78,6 +124,5 @@ Page({ ...@@ -78,6 +124,5 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {}
}
}) })
\ No newline at end of file \ No newline at end of file
{ {
"usingComponents": {}, "usingComponents": {
"apply-content": "../../components/CooperationApply/CooperationApply"
},
"navigationBarTitleText": "数字化+新能源汽车" "navigationBarTitleText": "数字化+新能源汽车"
} }
\ No newline at end of file \ No newline at end of file
...@@ -3,5 +3,14 @@ ...@@ -3,5 +3,14 @@
<image class="newenergy-img newenergy-img1" mode="widthFix" webp src="{{IMGURL}}home/newenergy1.png?v={{img_version}}"></image> <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-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> <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>
<!-- <button bindtap="toSuccess">提交</button> -->
\ No newline at end of file \ No newline at end of file
<view class="btn-box" wx:if="{{!applyShow}}">
<button class="btn-apply" bindtap="toApply">合作申请</button></view>
\ No newline at end of file \ No newline at end of file
/* pages/newEnergy/newEnergy.wxss */ /* pages/newEnergy/newEnergy.wxss */
.wrapper-bg { .wrapper-bg {
background-color: #505CFF; background-color: #505CFF;
padding-bottom: 74rpx; padding-bottom: 110rpx;
} }
.newenergy-img { .newenergy-img {
width: 100%; width: 100%;
...@@ -15,4 +15,45 @@ ...@@ -15,4 +15,45 @@
} }
.newenergy-img3 { .newenergy-img3 {
height: 1092rpx; height: 1092rpx;
}
.btn-box {
position: fixed;
bottom: 0;
width: 100%;
height: 112rpx;
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: 24rpx 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 \ No newline at end of file
// pages/productDetail/ambientLighting/ambientLighting.js // pages/productDetail/ambientLighting/ambientLighting.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
import shareTrackMixin from "../../../mixins/index";
Page({ Page({
behavior: [shareTrackMixin], behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -29,8 +28,6 @@ Page({ ...@@ -29,8 +28,6 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() { onShow() {
console.log(333);
this.shareTrack()
const options = wx.getEnterOptionsSync() const options = wx.getEnterOptionsSync()
if (options.query.cardId) { if (options.query.cardId) {
wx.$trackData = options.query wx.$trackData = options.query
...@@ -76,10 +73,11 @@ console.log(333); ...@@ -76,10 +73,11 @@ console.log(333);
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('LIGHT', 'ambientLighting')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.LIGHT.pageName, // return {
path: 'pages/productDetail/ambientLighting/ambientLighting?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.LIGHT.pageName // 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 \ No newline at end of file
// pages/productDetail/arNavigation/arNavigation.js // pages/productDetail/arNavigation/arNavigation.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('ARNAVIGATION', 'arNavigation')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.ARNAVIGATION.pageName, // return {
path: 'pages/productDetail/arNavigation/arNavigation?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.ARNAVIGATION.pageName // 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 \ No newline at end of file
// pages/productDetail/carBeauty/carBeauty.js // pages/productDetail/carBeauty/carBeauty.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from "../../../utils/util"; import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -58,12 +59,13 @@ Page({ ...@@ -58,12 +59,13 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('CARBEAUTY', 'carBeauty')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.CARBEAUTY.pageName, // return {
path: // title: trackData.CARBEAUTY.pageName,
"pages/productDetail/carBeauty/carBeauty?cardId=" + // path:
util.getStorageSync("scene").cardId+"&merchant="+merchant+'&detailShare=' +trackData.CARBEAUTY.pageName // "pages/productDetail/carBeauty/carBeauty?cardId=" +
}; // util.getStorageSync("scene").cardId+"&merchant="+merchant+'&detailShare=' +trackData.CARBEAUTY.pageName
// };
}, },
}); });
// pages/productDetail/changingFilm/changingFilm.js // pages/productDetail/changingFilm/changingFilm.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('CHANGEFILM', 'changingFilm')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.CHANGEFILM.pageName, // return {
path: 'pages/productDetail/changingFilm/changingFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.CHANGEFILM.pageName // 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 \ No newline at end of file
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
import { import {
trackData trackData
} from "../../../utils/data"; } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -76,10 +76,11 @@ Page({ ...@@ -76,10 +76,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('EQUITYCARD', 'equity')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.EQUITYCARD.pageName, // return {
path: 'pages/productDetail/equity/equity?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.EQUITYCARD.pageName // 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 \ No newline at end of file
// pages/productDetail/lossPhase/lossPhase.js // pages/productDetail/lossPhase/lossPhase.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('LOSSPGASE', 'lossPhase')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.LOSSPGASE.pageName, // return {
path: 'pages/productDetail/lossPhase/lossPhase?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.LOSSPGASE.pageName // 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 \ No newline at end of file
// pages/productDetail/navigationArround/navigationArround.js // pages/productDetail/navigationArround/navigationArround.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('NAVIGATIONARROUND', 'navigationArround')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.NAVIGATIONARROUND.pageName, // return {
path: 'pages/productDetail/navigationArround/navigationArround?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.NAVIGATIONARROUND.pageName // 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 \ No newline at end of file
// pages/productDetail/paintProtect/paintProtect.js // pages/productDetail/paintProtect/paintProtect.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('PAINTPROTECT', 'paintProtect')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.PAINTPROTECT.pageName, // return {
path: 'pages/productDetail/paintProtect/paintProtect?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.PAINTPROTECT.pageName // 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 \ No newline at end of file
// pages/productDetail/seatVentilate/seatVentilate.js // pages/productDetail/seatVentilate/seatVentilate.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -73,10 +73,11 @@ Page({ ...@@ -73,10 +73,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('SEATVENTILATE', 'seatVentilate')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.SEATVENTILATE.pageName, // return {
path: 'pages/productDetail/seatVentilate/seatVentilate?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.SEATVENTILATE.pageName // 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 \ No newline at end of file
// pages/productDetail/solarFilm/solarFilm.js // pages/productDetail/solarFilm/solarFilm.js
import { trackData } from "../../../utils/data"; import { trackData } from "../../../utils/data";
import util from '../../../utils/util' import {shareTrackMixin} from "../../../mixins/index";
Page({ Page({
behaviors: [shareTrackMixin],
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
...@@ -75,10 +75,11 @@ Page({ ...@@ -75,10 +75,11 @@ Page({
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() { onShareAppMessage() {
let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId this.shareTrack('SOLARFILM', 'solarFilm')
return { // let merchant = util.getStorageSync("scene").merchant || util.getStorageSync("scene").merchantId
title: trackData.SOLARFILM.pageName, // return {
path: 'pages/productDetail/solarFilm/solarFilm?cardId=' + util.getStorageSync('scene').cardId+"&merchant="+merchant+'&detailShare=' +trackData.SOLARFILM.pageName // 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 \ 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!