Commit b879b51f by 前端

Merge branch 'v3.0' into 'zhangxw_dev_3.0'

V3.0

See merge request !24
2 parents 0e07ceaa 48693f38
{ {
"pages": [ "pages": [
"pages/authentication/loading/loading",
"pages/tab/index/index", "pages/tab/index/index",
"pages/tab/discovery/discovery", "pages/tab/discovery/discovery",
"pages/tab/mine/mine", "pages/tab/mine/mine",
......
...@@ -101,6 +101,16 @@ ...@@ -101,6 +101,16 @@
align-items: center; align-items: center;
} }
.store-btn-disabled{
background-image:none;
background: #CCCED1 !important;
color: #fff !important;
}
.store-btn-disabled::after{
border: none;
}
.flex_cc { .flex_cc {
display: flex; display: flex;
align-items: center; align-items: center;
......
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}"> <scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="tab-box {{align}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" > <view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}" >
<view class="text" >{{item}}</view> <view class="text" >{{item}}</view>
......
...@@ -8,12 +8,16 @@ page { ...@@ -8,12 +8,16 @@ page {
.pos_wrap { .pos_wrap {
position: absolute; position: absolute;
left: 24rpx;
top: 336rpx; top: 336rpx;
// left: 50%;
// transform: translateX(-50%);
width: 100%;
padding: 0 24rpx;
box-sizing: border-box;
} }
.wrapper { .wrapper {
width: calc(100% - 48rpx); width:100%;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 12rpx 24rpx 0 rgba(106, 126, 204, 0.12); box-shadow: 0 12rpx 24rpx 0 rgba(106, 126, 204, 0.12);
border-radius: 24rpx; border-radius: 24rpx;
......
<view class="container"> <view class="container">
<image mode="widthFix" class="topBg" src="{{IMGURL + 'apply_activity_bg_' + currentIndex + '.png'}}" /> <image mode="widthFix" style="height: 480rpx;" src="{{IMGURL + 'apply_activity_bg_' + currentIndex + '.png'}}" />
<view class="pos_wrap"> <view class="pos_wrap">
<view class="wrapper"> <view class="wrapper">
<view class="title"> <view class="title">
......
<!--pages/authentication/customerService/customerService.wxml--> <!--pages/authentication/customerService/customerService.wxml-->
<view class="container"> <view class="container">
<view class="service-wrap"> <view class="service-wrap">
<image class="qrcode" src="{{IMGURL}}register.png"></image> <image class="qrcode" src="{{IMGURL}}service.png"></image>
<view class="tip">扫码添加客服企微</view> <view class="tip">扫码添加客服企微</view>
<view class="hotline"> <view class="hotline">
<view class="title">客服热线</view> <view class="title">客服热线</view>
<view> <view>
<text class="phone">400 xxx xxxx</text> <text class="phone">189 0245 4229</text>
<image></image> <image></image>
</view> </view>
</view> </view>
......
...@@ -50,13 +50,15 @@ const loginSuccess = () => { ...@@ -50,13 +50,15 @@ const loginSuccess = () => {
targetPath targetPath
} }
} = wx.$router.getPageInstance() } = wx.$router.getPageInstance()
console.log(targetPath)
if (targetPath) { if (targetPath) {
const { const {
url, url,
obj obj
} = setRouteData(targetPath) } = setRouteData(targetPath)
wx.$router.reLaunch(url, obj) wx.$router.reLaunch(url, obj)
} else wx.$router.go('pages.index') } else wx.$router.go('/pages/tab/index/index')
} }
module.exports = { module.exports = {
......
import {
setRouteData,
setLoginInfo,
loginModal
} from '../lib/index'
import {
getSessionId,
} from '~/utils/cache/storageApi'
import USERAPI from '~/api/usersApi/index'
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.init()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
init() {
const sessionId = getSessionId(),
{
url,
targetPath = url ? decodeURIComponent(url) : ''
} = this.options
wx.nextTick(() => {
let path = '/pages/tab/index/index',
obj = {}
if (targetPath) obj.targetPath = targetPath
console.log(obj,'objobj')
if (sessionId) {
USERAPI.checkSession().then(({
code
}) => {
if (code == '0') {
if (targetPath) {
path = setRouteData(targetPath).url
obj = setRouteData(targetPath).obj
}
console.log(path,'pathpath')
wx.$router.reLaunch(path, obj)
}
else wx.$router.reLaunch('/pages/authentication/login/login', obj)
})
}
else wx.$router.reLaunch('/pages/authentication/login/login', obj)
})
},
autoLogin(obj) {
const autoLoginObject = wx.$storage.get('auto_login_object')
if (autoLoginObject) {
const {
failureTime,
userName,
password
} = autoLoginObject
if (Date.now() < failureTime) {
USERAPI.accountLogin({
userName,
password
}).then(async ({
data,
code,
message
}) => {
if (code == '0') {
setLoginInfo(data, data.sessionId)
} else {
try {
const reload = await loginModal({
message: message || '登录失败请重试',
cancelText: '返回'
})
if (reload) this.onShow()
} catch (error) {
wx.$router.reLaunch('login.index', obj)
}
}
})
} else wx.$router.reLaunch('login.index', obj)
} else wx.$router.reLaunch('login.index', obj)
}
})
\ No newline at end of file \ No newline at end of file
{ {
"component": true, "usingComponents": {},
"usingComponents": {} "navigationStyle": "custom"
} }
\ No newline at end of file \ No newline at end of file
.layout {
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
background-color: #fff;
.loading {
height: 48rpx;
view {
width: 16rpx;
height: 100%;
display: inline-block;
background-color: #0052d9;
animation: stretchdelay 1.2s infinite ease-in-out;
margin: 0 4rpx;
&:nth-child(2) {
animation-delay: -1.1s;
}
&:nth-child(3) {
animation-delay: -1s;
}
&:nth-child(4) {
animation-delay: -.9s;
}
}
}
}
@keyframes stretchdelay {
0%,
100%,
40% {
transform: scaley(.33);
}
20% {
transform: scaley(1);
}
}
\ No newline at end of file \ No newline at end of file
<view class="layout">
<image webp src="https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/login/index-loading.webp" mode="widthFix" ></image>
<!-- <view class="loading">
<block wx:for="{{4}}" wx:key="index">
<view></view>
</block>
</view> -->
</view>
\ No newline at end of file \ No newline at end of file
...@@ -20,7 +20,8 @@ Page({ ...@@ -20,7 +20,8 @@ Page({
code:'' code:''
}, },
authorized: false, authorized: false,
phoneReady: false phoneReady: false,
disabled: true
}, },
navbarReady(e) { navbarReady(e) {
let { let {
...@@ -49,9 +50,6 @@ Page({ ...@@ -49,9 +50,6 @@ Page({
message message
} = await USERAPI.wxCodeLogin() } = await USERAPI.wxCodeLogin()
if (code == '0') { if (code == '0') {
this.setData({
disabled: false
})
this.loginToken = data this.loginToken = data
} else this.reLogin(message) } else this.reLogin(message)
wx.hideLoading() wx.hideLoading()
...@@ -133,6 +131,7 @@ Page({ ...@@ -133,6 +131,7 @@ Page({
}) { }) {
/**多个账号 */ /**多个账号 */
console.log(loginUserInfoList,'loginUserInfoList') console.log(loginUserInfoList,'loginUserInfoList')
if (loginUserInfoList.length > 1) wx.$router.go('/pages/authentication/accountItems/accountItems', { if (loginUserInfoList.length > 1) wx.$router.go('/pages/authentication/accountItems/accountItems', {
sessionId, sessionId,
...this.options ...this.options
...@@ -153,15 +152,16 @@ Page({ ...@@ -153,15 +152,16 @@ Page({
const {value} = e.detail const {value} = e.detail
const {name} = e.target.dataset const {name} = e.target.dataset
console.log(e,this.data.formData,'88') console.log(e,this.data.formData,'88')
this.setData({ this.setData({
[`formData.${name}`] : value [`formData.${name}`] : value
}) })
if(this.validate.methods.tel(this.data.formData.phone)){ this.checkInfo()
this.setData({ },
phoneReady: true checkInfo(){
}) this.setData({
} phoneReady: this.validate.methods.tel(this.data.formData.phone),
disabled: !this.validate.methods.tel(this.data.formData.phone) || this.data.formData?.code?.length !=4
})
}, },
/**获取验证码 */ /**获取验证码 */
getSmsCode() { getSmsCode() {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
bindinput="input" value="{{formData.code}}" data-name="code"/> bindinput="input" value="{{formData.code}}" data-name="code"/>
<button disabled="{{!phoneReady}}" class="code-btn" bindtap="getSmsCode">{{count? count + 's':'获取验证码'}}</button> <button disabled="{{!phoneReady}}" class="code-btn" bindtap="getSmsCode">{{count? count + 's':'获取验证码'}}</button>
</view> </view>
<view class="login-btn wx-btn" bindtap="handleLogin">登录</view> <button class="login-btn wx-btn {{disabled ? 'store-btn-disabled':''}}" bindtap="handleLogin">登录</button>
<view class="other">或 <text bindtap="switchLoginMethod" data-type="0">微信登录</text></view> <view class="other">或 <text bindtap="switchLoginMethod" data-type="0">微信登录</text></view>
</view> </view>
</block> </block>
......
...@@ -7,7 +7,13 @@ Page({ ...@@ -7,7 +7,13 @@ Page({
*/ */
data: { data: {
navStyle, navStyle,
headerHeight:0 headerHeight:0,
linkParams : {
staffName: 'zqqq',
merchantId: '44211227',
merchantFileRequest : { fileName: "bsg", fileUrl: 'https://img1.baidu.com/it/u=1755961019,1690032781&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1665766800&t=0b9617eab6fe013e35dc2e491e2e2100' },
type: 0
}
}, },
navbarReady(e) { navbarReady(e) {
let { let {
...@@ -64,18 +70,25 @@ Page({ ...@@ -64,18 +70,25 @@ Page({
errId errId
}) => { }) => {
if (code == '0'){ if (code == '0'){
this.checkLoginUserInfo(data) wx.$router.go('/pages/authentication/registerSuccess/registerSuccess',{type:0})
}else{ }else if(errId=='30990103'){
if(errId=='30990103'){ let params = {...this.data.linkParams}
let params = { if(this.data.linkParams.type==1){
staffName: 'zqqq',
merchantId: '44211227',
merchantFileRequest : { fileName: "bsg", fileUrl: 'https://img1.baidu.com/it/u=1755961019,1690032781&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1665766800&t=0b9617eab6fe013e35dc2e491e2e2100' }
}
wx.$router.go('/pages/authentication/registerInfo/registerInfo',params) wx.$router.go('/pages/authentication/registerInfo/registerInfo',params)
}else{ }else{
wx.$api.showToast(message || '系统异常') let {merchantFileRequest,merchantId} = this.data.linkParams
let regParmas = {
merchantId,
loginToken:this.loginToken,
encryptedData:detail.encryptedData,
iv:detail.iv,
merchantFileRequest: JSON.stringify(merchantFileRequest),
staffName: merchantFileRequest.fileName
}
this.register(regParmas)
} }
}else{
wx.$api.showToast(message || '系统异常')
} }
}).catch(({ }).catch(({
errMsg errMsg
...@@ -83,20 +96,13 @@ Page({ ...@@ -83,20 +96,13 @@ Page({
wx.$api.showToast(message || '系统异常') wx.$api.showToast(message || '系统异常')
}) })
}, },
checkLoginUserInfo({ register(params){
loginUserInfoList, USERAPI.register(params).then((res) => {
sessionId if (res.code == '0'){
}) { wx.$router.go('/pages/authentication/registerSuccess/registerSuccess',{type:1})
/**多个账号 */ }else{
console.log(loginUserInfoList,'loginUserInfoList') wx.$api.showToast(message || '系统异常')
if (loginUserInfoList.length > 1) wx.$router.go('/pages/authentication/accountItems/accountItems', { }
sessionId,
...this.options
})
/**只有一个账号 */
else selectAccountLogin({
id: loginUserInfoList[0].uuid,
sessionId
}) })
}, },
/** /**
......
...@@ -22,7 +22,8 @@ Page({ ...@@ -22,7 +22,8 @@ Page({
id: 4, id: 4,
name: '续保部', name: '续保部',
}], }],
showModal: false showModal: false,
disabled: true
}, },
onRoute(options){ onRoute(options){
...@@ -47,9 +48,6 @@ Page({ ...@@ -47,9 +48,6 @@ Page({
message message
} = await USERAPI.wxCodeLogin() } = await USERAPI.wxCodeLogin()
if (code == '0') { if (code == '0') {
this.setData({
disabled: false
})
this.loginToken = data this.loginToken = data
} else this.reLogin(message) } else this.reLogin(message)
wx.hideLoading() wx.hideLoading()
...@@ -88,8 +86,14 @@ Page({ ...@@ -88,8 +86,14 @@ Page({
this.setData({ this.setData({
department: value department: value
}) })
this.checkInfo()
this.onClose() this.onClose()
}, },
checkInfo(){
this.setData({
disabled: !this.data.department.id || !this.data.staffName
})
},
handleRegister({detail}){ handleRegister({detail}){
console.log(detail,'detaildetaildetail') console.log(detail,'detaildetaildetail')
const { merchantId, merchantFileRequest } = this.data.dataFromOptions const { merchantId, merchantFileRequest } = this.data.dataFromOptions
...@@ -100,12 +104,14 @@ Page({ ...@@ -100,12 +104,14 @@ Page({
iv:detail.iv, iv:detail.iv,
department: this.data.department.id, department: this.data.department.id,
merchantFileRequest: JSON.stringify(merchantFileRequest), merchantFileRequest: JSON.stringify(merchantFileRequest),
staffName: this.data.staffName staffName: this.data.staffName,
weChatNickName: merchantFileRequest.fileName,
weChatAvatarUrl: merchantFileRequest.fileUrl
} }
console.log(params,'ddd') console.log(params,'ddd')
USERAPI.register(params).then((res) => { USERAPI.register(params).then((res) => {
if (res.code == '0'){ if (res.code == '0'){
wx.$router.go('/pages/authentication/registerSuccess/registerSuccess',{type:0}) wx.$router.go('/pages/authentication/registerSuccess/registerSuccess',{type:1})
}else{ }else{
wx.$api.showToast(message || '系统异常') wx.$api.showToast(message || '系统异常')
} }
...@@ -117,6 +123,7 @@ Page({ ...@@ -117,6 +123,7 @@ Page({
this.setData({ this.setData({
staffName: value staffName: value
}) })
this.checkInfo()
}, },
/** /**
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="info"> <view class="info">
<view class="info-item"> <view class="info-item">
<text>姓名</text> <text>姓名</text>
<input type="text" placeholder-class="placeholder" placeholder="请输入您的姓名" bindinput="inputStaffNamme" value="{{staffName}}"/> <input type="text" placeholder-class="placeholder" maxlength="50" placeholder="请输入您的姓名" bindinput="inputStaffNamme" value="{{staffName}}"/>
</view> </view>
<view class="info-item" bindtap="selectDepartment"> <view class="info-item" bindtap="selectDepartment">
<text class="label">部门</text> <text class="label">部门</text>
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
</view> </view>
</view> </view>
<view class="register"> <view class="register">
<button class="btn" open-type="getPhoneNumber" bindgetphonenumber="handleRegister">立即注册</button> <button class="btn {{disabled ? 'store-btn-disabled':''}}" disabled="{{disabled}}" open-type="getPhoneNumber" bindgetphonenumber="handleRegister">立即注册</button>
</view> </view>
</view> </view>
<van-popup show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 50%" > <van-popup show="{{ showModal }}" custom-class="popclass" position="bottom" custom-style="height: 50%" >
......
...@@ -9,6 +9,9 @@ Page({ ...@@ -9,6 +9,9 @@ Page({
interval:null interval:null
}, },
onRoute(options){ onRoute(options){
this.setData({
type:options.type
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
......
// pages/tab/discovery/components/headerNav/headerNav.js
const navStyle = "background-color: transparent;";
import {imgUrlMixin} from '~/mixins/index'
Component({
behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {
btnHeight: Number
},
/**
* 组件的初始数据
*/
data: {
navStyle,
// IMG_URL,
sceneList:['scene_talk.png','scene_delivery.png','scene_within_12mth.png','scene_more_12mth.png'],
},
navbarReady(e) {
let {
height
} = e.detail;
console.log(height,'heightheightheight')
this.setData({
btnHeight: `${height + 128}px`,
});
},
/**
* 组件的方法列表
*/
methods: {
}
})
/* pages/tab/discovery/components/headerNav/headerNav.wxss */
.header{
position: relative;
width: 100%;
margin-bottom: 80rpx;
box-shadow: 0 16rpx 16rpx 0 rgba(230, 236, 245, 0.6);
}
.scene-wrap{
position: absolute;
bottom: 0;
transform: translateY(75rpx);
white-space: nowrap;
}
.scene-item{
width: 672rpx;
height: 180rpx;
}
\ No newline at end of file \ No newline at end of file
<!--pages/tab/discovery/components/headerNav/headerNav.wxml-->
<view style="height: {{btnHeight}}" class="header">
<image style="width: 100%;height: 100%" src="{{IMGURL}}discovery_center_bg.png"></image>
<scroll-view class="scene-wrap" scroll-x="{{true}}">
<block wx:for="{{sceneList}}" wx:key="index">
<image class="scene-item" src="{{IMGURL}}{{item}}"></image>
</block>
</scroll-view>
</view>
// pages/tab/discovery/components/product/product.js // pages/tab/discovery/components/product/product.js
import {imgUrlMixin} from '~/mixins/index' import {imgUrlMixin} from '~/mixins/index'
const videoBaseUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
Component({ Component({
behaviors: [imgUrlMixin], behaviors: [imgUrlMixin],
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
headerHeight: Number headerHeight: Number,
senceData:Object,
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
sceneList:['scene_talk.png','scene_delivery.png','scene_within_12mth.png','scene_more_12mth.png'], videoBaseUrl,
navList:['360全景导航','AR实景导航','座椅通风','氛围灯','数字化美容'], // senceData:['scene_talk.png','scene_delivery.png','scene_within_12mth.png','scene_more_12mth.png'],
activeNavIdx: 0, navList:['数字无忧权益卡'],
tab:['适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程','适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程'], activeNavIdx: 0, //特色产品
tab:['适用场景','营销链路','项目亮点','转化漏斗','合作流程','合作案例'],
heightArr:[], heightArr:[],
curTabIdx:0, curTabIdx:0, //适用产品
intoViewId: 'to-0' intoViewId: 'to-0',
actNum: 0, //场景
}, },
lifetimes:{ lifetimes:{
ready: function (){ ready: function (){
console.log(11111)
this.getImgHeight() this.getImgHeight()
}, },
}, },
...@@ -32,6 +35,43 @@ Component({ ...@@ -32,6 +35,43 @@ Component({
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
changeSwiper(e){
console.log(e)
let actNum = e.detail.current
let navList = []
let tab = ['适用场景','营销链路','项目亮点','转化漏斗','合作流程']
switch (actNum) {
case 0:
navList = ["数字无忧权益卡"];
tab.push("合作案例");
break;
case 1:
navList = ["汽车太阳膜"];
tab.push("合作案例");
break;
case 2:
navList = ["漆面保护膜", "改色膜"];
break;
case 3:
navList = [
"数字化美容",
"座椅通风",
"AR导航",
"氛围灯",
"360全景导航",
];
tab.push("合作案例");
break;
}
this.setData({
navList,
actNum,
intoViewId: `to-0`,
activeNavIdx: 0,
tab
})
this.getImgHeight();
},
changeTab(e){ changeTab(e){
let idx = e.detail let idx = e.detail
this.setData({ this.setData({
...@@ -39,7 +79,6 @@ Component({ ...@@ -39,7 +79,6 @@ Component({
}) })
}, },
changeNav(event){ changeNav(event){
console.log(event,event.target.dataset.index,111)
this.setData({ this.setData({
activeNavIdx: event.target.dataset.index activeNavIdx: event.target.dataset.index
}) })
...@@ -64,22 +103,22 @@ Component({ ...@@ -64,22 +103,22 @@ Component({
console.log( this.data.heightArr) console.log( this.data.heightArr)
}).exec() }).exec()
}, },
// 显示测算弹窗 getImgHeight() {
showCalculate() { let query = wx.createSelectorQuery().in(this);
this.setData({ let heightArr = [];
visible: !this.data.visible, let s = 0;
isReset: false query
}); .selectAll(".img-item")
}, .boundingClientRect((react) => {
clickDialog(e) { react.forEach((item) => {
console.log(e.changedTouches[0].clientY); s += item.height;
if (e.changedTouches[0].clientY < 352) { heightArr.push(s);
this.setData({ });
visible: false, this.data.heightArr = heightArr;
isReset: false, // console.log(heightArr[heightArr.length-1])
formData: this.data.lastFormData this.data.allHeight = heightArr[heightArr.length - 1];
}); })
} .exec();
}, }
} }
}) })
.scene-wrap{ .scene-wrap {
white-space: nowrap; white-space: nowrap;
height: 180rpx; height: 180rpx;
margin-bottom: 16rpx; margin-bottom: 16rpx;
.scene-img{
.scene-img {
width: 100%; width: 100%;
} }
} }
// 特色产品 // 特色产品
.prod-wrap .big-title{ .prod-wrap .big-title {
margin-left: 40rpx; margin-left: 40rpx;
font-family: PingFangSC-S0pxibold; font-family: PingFangSC-S0pxibold;
font-weight: 600; font-weight: 600;
...@@ -15,14 +17,16 @@ ...@@ -15,14 +17,16 @@
color: #1B233D; color: #1B233D;
line-height: 56rpx; line-height: 56rpx;
} }
.prod-wrap .nav-wrap{
.prod-wrap .nav-wrap {
white-space: nowrap; white-space: nowrap;
box-sizing: border-box; box-sizing: border-box;
margin-top: 24rpx; margin-top: 24rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
padding: 0 20rpx; padding: 0 20rpx;
} }
.prod-wrap .nav-wrap .nav{
.prod-wrap .nav-wrap .nav {
display: inline-block; display: inline-block;
width: 188rpx; width: 188rpx;
height: 64rpx; height: 64rpx;
...@@ -37,41 +41,44 @@ ...@@ -37,41 +41,44 @@
background: #FFFFFF; background: #FFFFFF;
border: 2rpx solid #DDE3F0; border: 2rpx solid #DDE3F0;
} }
.prod-wrap .nav-wrap .active-nav{
.prod-wrap .nav-wrap .active-nav {
background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%); background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%);
border: 2rpx solid rgba(68,97,240,0.50); border: 2rpx solid rgba(68, 97, 240, 0.50);
box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35); box-shadow: 0 8rpx 16rpx 0 rgba(175, 187, 219, 0.35);
color: #4466F0; color: #4466F0;
} }
.prod-wrap .nav-wrap .nav:last-child{
.prod-wrap .nav-wrap .nav:last-child {
margin-right: 0; margin-right: 0;
} }
.prod-item{ .prod-item {
background-color: #F5F7FB; background-color: #F5F7FB;
border-radius: 48rpx 48rpx 0 0; border-radius: 48rpx 48rpx 0 0;
padding: 40rpx 24rpx 32rpx; padding: 40rpx 24rpx 32rpx;
} }
.prod-card{ .prod-card {
display: flex; display: flex;
height: 208rpx; height: 208rpx;
background-image: linear-gradient(1deg, #FFFFFF 10%, #FDFCFF 100%); background-image: linear-gradient(1deg, #FFFFFF 10%, #FDFCFF 100%);
border: 2rpx solid #FFFFFF; border: 2rpx solid #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(197,205,235,0.35); box-shadow: 0 8rpx 20rpx 0 rgba(197, 205, 235, 0.35);
border-radius: 20rpx; border-radius: 20rpx;
padding: 20rpx 24rpx; padding: 20rpx 24rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
} }
.prod-card .card-img{ .prod-card .card-img {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 164rpx;
flex-shrink: 0; flex-shrink: 0;
border-radius: 4rpx; border-radius: 4rpx;
} }
.img-desc{
.img-desc {
position: absolute; position: absolute;
width: 104rpx; width: 104rpx;
height: 40rpx; height: 40rpx;
...@@ -85,40 +92,48 @@ ...@@ -85,40 +92,48 @@
letter-spacing: 0; letter-spacing: 0;
text-align: center; text-align: center;
} }
.prod-info{
.prod-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
padding: 12rpx 0; padding: 12rpx 0;
margin-left: 24rpx; margin-left: 24rpx;
} }
.prod-info>text{
.prod-info>text {
display: block; display: block;
white-space: nowrap; white-space: nowrap;
height: 40rpx; height: 40rpx;
line-height: 40rpx; line-height: 40rpx;
} }
.prod-info .title{
.prod-info .title {
font-family: PingFangSC-Medium; font-family: PingFangSC-Medium;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #323436; color: #323436;
} }
.prod-info .sale,.prod-info .earnings{
.prod-info .sale,
.prod-info .earnings {
font-size: 26rpx; font-size: 26rpx;
color: #7A8299; color: #7A8299;
} }
.prod-info .sale-num{
.prod-info .sale-num {
font-size: 26rpx; font-size: 26rpx;
color: #323436; color: #323436;
} }
.prod-info .earnings-num{
.prod-info .earnings-num {
font-size: 28rpx; font-size: 28rpx;
font-family: DINAlternate-Bold; font-family: DINAlternate-Bold;
font-weight: Bold; font-weight: Bold;
color: #F35251; color: #F35251;
} }
.share-btn{
.share-btn {
height: 56rpx; height: 56rpx;
line-height: 56rpx; line-height: 56rpx;
font-family: PingFangSC-Regular; font-family: PingFangSC-Regular;
...@@ -135,146 +150,187 @@ ...@@ -135,146 +150,187 @@
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} }
.share-btn .icon{
.share-btn .icon {
width: 24rpx; width: 24rpx;
height: 24rpx; height: 24rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.project-wrap{ .project-wrap {
background-color: #F5F7FB; background-color: #F5F7FB;
} }
.project-img{ .project-img {
height: 1200rpx;
white-space: nowrap; white-space: nowrap;
.img-item{
height: 300rpx; .img-item {
position: relative;
width: 100%;
}
// 流程图一
.img-item11 {
height: 1110rpx;
}
.img-item12 {
height: 1290rpx;
}
.img-item13 {
height: 596rpx;
}
.img-item14 {
height: 744rpx;
}
.img-item15 {
height: 490rpx;
}
.img-item16 {
height: 1532rpx;
}
// 流程图二
.img-item21 {
height: 2168rpx;
}
.img-item22 {
height: 1290rpx;
}
.img-item23 {
height: 596rpx;
}
.img-item24 {
height: 830rpx;
}
.img-item25 {
height: 490rpx;
}
.img-item26 {
height: 752rpx;
.video-item{
width: 100%;
video{
border-radius: 16rpx;
height: 348rpx;
}
}
}
// 流程图三
.img-item31 {
height: 1110rpx;
}
.img-item32 {
height: 1290rpx;
}
.img-item33 {
height: 596rpx;
}
.img-item34 {
height: 984rpx;
}
.img-item35 {
height: 490rpx;
}
// 流程图四
.img-item41 {
height: 678rpx;
}
.img-item42 {
height: 1266rpx;
}
.img-item43 {
height: 1398rpx;
}
.img-item44 {
height: 830rpx;
}
.img-item45 {
height: 490rpx;
}
.img-item46 {
height: 1666rpx;
} }
}
/* 测算 */
.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; .video-bg {
width: 100%; width: 100%;
height: 744rpx; position: absolute;
background-color: #fff; top: 280rpx;
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 { .video-title {
font-weight: 600; position: relative;
font-size: 36rpx; padding: 96rpx 0 24rpx;
color: #333333;
letter-spacing: 0;
text-align: center; text-align: center;
line-height: 56rpx; font-size: 48rpx;
margin-bottom: 24rpx; font-weight: 900;
color: #FFFFFF;
letter-spacing: 0;
line-height: 64rpx;
} }
.dialog-form { .video-title::after {
width: 100%; content: '';
height: 384rpx; display: block;
background-image: linear-gradient(179deg, rgba(123,112,255,0.02) 15%, rgba(99,92,255,0.10) 100%); width: 48rpx;
border-radius: 8rpx; height: 4rpx;
padding: 32rpx; position: absolute;
box-sizing: border-box; bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: #ffffff;
} }
.form-item { .video-list {
display: flex; display: flex;
align-items: center; flex-wrap: wrap;
height: 80rpx; padding: 0 32rpx;
margin-bottom: 24rpx; font-size: 0;
justify-content: space-between;
} }
.form-label { .video-item {
width: 256rpx; width: calc(50% - 12rpx);
font-size: 28rpx; margin-bottom: 32rpx;
color: #2D2D33;
} }
.form-input { .video-item video {
width: 216rpx; width: 100%;
padding: 16rpx 20rpx; height: 588rpx;
border: 2rpx solid #E6E6E6; border: 1rpx dashed #AFB0B2;
border-radius: 4rpx;
margin-left: 64rpx;
margin-right: 16rpx;
} }
.form-unit { .video-item:nth-child(even) {
font-size: 28rpx; margin-left: 22rpx;
color: #6E6E7A;
} }
.dialog-btn { .video-text {
width: 100%; margin-top: 16rpx;
padding: 24rpx 0; font-size: 24rpx;
box-sizing: border-box;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500; font-weight: 500;
font-size: 32rpx; font-size: 24rpx;
color: #FFFFFF; color: #343456;
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 { .video-tips {
width: 100%; width: 100%;
position: absolute; text-align: center;
bottom: 104rpx; font-size: 28rpx;
color: rgba(255,255,255,.6);
padding: 16rpx 0 92rpx;
} }
\ No newline at end of file \ No newline at end of file
<view class="header"> <view class="header">
<swiper class="scene-wrap" circular="{{true}}" previousMargin="40rpx" nextMargin="40rpx"> <swiper bindchange="changeSwiper" class="scene-wrap" circular="{{true}}" previousMargin="40rpx" nextMargin="40rpx">
<block wx:for="{{sceneList}}" wx:key="index"> <block wx:for="{{senceData}}" wx:key="index">
<swiper-item> <swiper-item>
<image class="scene-img" src="{{IMGURL}}{{item}}"></image> <image class="scene-img" src="{{IMGURL}}{{item.img}}"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
</view> </view>
<view class="prod-wrap"> <view class="prod-wrap">
<text class="big-title">特色产品</text> <text class="big-title">特色产品</text>
<scroll-view class="nav-wrap" scroll-x="{{true}}"> <scroll-view enhanced="{{true}}" show-scrollbar="{{false}}" class="nav-wrap" scroll-x="{{true}}">
<block wx:for="{{navList}}" wx:key="index"> <block wx:for="{{senceData[actNum].productList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text> <text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item.proName}}</text>
</block> </block>
</scroll-view> </scroll-view>
<view class="prod-item"> <view class="prod-item">
<view class="prod-card"> <view class="prod-card">
<view class="card-img"> <view class="card-img">
<text class="img-desc">轻改类</text> <!-- <text class="img-desc">轻改类</text> -->
<image src="{{IMGURL}}discovery_prod1.png"></image> <image src="{{IMGURL}}prod/{{senceData[actNum].productList[activeNavIdx].img}}.png"></image>
</view> </view>
<view class="prod-info"> <view class="prod-info">
<text class="title">360全景导航</text> <text class="title">{{senceData[actNum].productList[activeNavIdx].proName}}</text>
<text class="sale">新车销量 <text class="sale-num">100</text></text> <text class="sale" decode="{{true}}">{{senceData[actNum]['productList'][activeNavIdx].varType == 1 ? '三年售后存量数':'新车销量'}}&nbsp;<text class="sale-num">{{senceData[actNum]['productList'][activeNavIdx].changeSale || senceData[actNum]['productList'][activeNavIdx].sale}}</text>
<text class="earnings">预估收益 <text class="earnings-num">92.4 万</text></text> </text>
<text class="earnings" decode="{{true}}">预估收益&nbsp;<text class="earnings-num">{{senceData[actNum]['productList'][activeNavIdx].profit}}</text>
</text>
</view> </view>
<view class="share-btn"> <view class="share-btn">
...@@ -40,41 +42,20 @@ ...@@ -40,41 +42,20 @@
</view> </view>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}"> <scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item"> <view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}">
{{item}} <image class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}/scene/scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{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}}"></video>
<view class="video-text">{{item.name}}</view>
</view>
</block>
<!-- <view class="video-tips">- 如需开通请咨询客服 -</view> -->
</view>
</view>
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
</view>
<!-- 测算按钮 -->
<view class="calculate" bindtap="showCalculate">
<image class="icon-calculate" webp src="{{IMGURL}}customer_service.png"></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 \ No newline at end of file
</view>
\ No newline at end of file \ No newline at end of file
var senceData = [
{
name: '新车洽谈场景',
img: 'scene_talk.png',
active: 'icon-car11',
playImg: 'img1',
productList: [
{
img: 'product-img1',
proName: '数字无忧权益卡',
price: '1500',
// profit: '92.4万',
profit: '120万',
type: 'service',
productType: 'benefitCard',
path: 'equity',
sale:100 ,//销量
varType: 0
}
],
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',
productList: [
{
img: 'product-img2',
proName: '汽车太阳膜',
price: '1500',
profit: '1008万',
type: 'membrane',
productType: 'sunMembrane',
path: 'solarFilm',
sale:100, //销量
varType: 0
}
],
videoList:[
{
videoUrl: 'solar',
posterUrl: 'solar_bitmap',
name: '太阳膜转化售中案例-门店新增产值12w每月'
}
]
},
{
name: '0-12个月',
img: 'scene_within_12mth.png',
active: 'icon-car21',
playImg: 'img2',
productList: [
{
img: 'product-img3',
proName: '漆面保护膜',
price: '12000',
profit: '216万',
type: 'membrane',
productType: 'protectMembrane',
path: 'paintProtect',
sale:100, //销量
varType: 1
},
{
img: 'product-img4',
proName: '改色膜',
price: '5000',
profit: '30万',
type: 'membrane',
productType: 'colorMembrane',
path: 'changingFilm',
sale:100, //销量
varType: 1
}
]
},
{
name: '12个月以上',
img: 'scene_more_12mth.png',
active: 'icon-car31',
playImg: 'img3',
productList: [
{
img: 'product-img5',
proName: '数字化美容',
price: '300',
profit: '36万',
type: 'beauty',
productType: 'digitBeauty',
path: 'carBeauty',
sale:100, //销量
varType: 0
},
{
img: 'product-img6',
proName: '座椅通风',
price: '1500',
profit: '1008万',
type: 'light',
productType: 'chair',
path: 'seatVentilate',
sale:10000, //销量
varType: 1
},
{
img: 'product-img7',
proName: 'AR导航',
price: '1680',
profit: '22.68万',
type: 'light',
productType: 'ar',
path: 'arNavigation',
sale:10000, //销量
varType: 1
},
{
img: 'product-img8',
proName: '氛围灯',
price: '2680',
profit: '36.18万',
type: 'light',
productType: 'lamp',
path: 'ambientLighting',
sale:10000, //销量
varType: 1
},
{
img: 'product-img9',
proName: '360全景导航',
price: '2880',
profit: '38.88万',
type: 'service',
productType: 'navigation',
path: 'navigationArround',
sale:10000, //销量
varType: 1
}
],
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+'
}
]
},
]
module.exports = {
senceData
}
\ No newline at end of file \ No newline at end of file
// pages/tab/output/output.js // pages/tab/output/output.js
const navStyle = "background-color: transparent;"; const navStyle = "background-color: transparent;";
import {senceData} from "./constant/data";
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
senceData,
headerHeight: 0, headerHeight: 0,
navStyle, navStyle,
// 预估弹框
visible: false,
isReset: false,
formData: {
sales: 100,
flow: 10000,
},
lastFormData: {
sales: 100,
flow: 10000,
},
isFirst: true,
// tabList: pageData.tabList,
changeSale: 0, //每次改变的销量
}, },
navbarReady(e) { navbarReady(e) {
let { let {
...@@ -17,6 +33,222 @@ Page({ ...@@ -17,6 +33,222 @@ Page({
headerHeight: height, headerHeight: height,
}); });
}, },
onPageScroll({
scrollTop
}) {
let opacity = scrollTop / 100
let color = `rgba(255,255,255${opacity > 1 ? 1 : opacity})`
this.setData({
navStyle: scrollTop == 0 ? navStyle : `background-color:${color};`
})
},
// 跳转咨询页面
goConsult() {
wx.pro.openCustomerServiceChat({
extInfo: { url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" },
corpId: "ww047bdc0f1e76cc13",
complete: (r) => {
console.log(r);
},
});
},
applyActivity(){
wx.$router.go('/packageActivity/pages/applyActivity/applyActivity')
},
// 显示测算弹窗
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
});
}
},
// 预估弹框
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,
});
}
},
// 提交测算
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.data.senceData.forEach((item, index) => {
item.productList.forEach((i, lastIndex) => {
if (i.profit) {
// let name = `senceData[${index}].productList[${lastIndex}].profit`;
let sale = `senceData[${index}].productList[${lastIndex}].sale`;
let name = `senceData[${index}].productList[${lastIndex}].profit`;
// let changeSale = `senceData[${index}].productList[${lastIndex}].changeSale`;
let profit = _this.formula(i.productType, sales, flow);
console.log(name, profit);
this.setData({
[name]: profit,
[sale]:sales
// [changeSale]: sales,
});
}
});
});
// 触发自定义事件 利润 数量
// 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 = (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 > 6) {
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;
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
{ {
"usingComponents": { "usingComponents": {
"headerNav": "./components/headerNav/headerNav",
"product": "./components/product/product" "product": "./components/product/product"
}, },
"navigationStyle": "custom" "navigationStyle": "custom"
......
...@@ -12,3 +12,135 @@ ...@@ -12,3 +12,135 @@
} }
} }
.chat,.applyAct {
position: fixed;
right: 0;
top: 900rpx;
width: 80px;
height: 80px;
border-radius: 50%;
z-index: 1;
}
.applyAct{
top: 750rpx;
width: 64px;
height: 64px;
right: 15rpx;
}
/* 测算 */
.calculate {
position: fixed;
right: 0;
top: 1100rpx;
}
.icon-calculate {
width: 150rpx;
height: 150rpx;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45,45,51,0.50);
z-index: 1;
.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;
}
}
...@@ -5,6 +5,45 @@ ...@@ -5,6 +5,45 @@
</navigation-bar> </navigation-bar>
<view style="padding-top: {{headerHeight}}px;"> <view style="padding-top: {{headerHeight}}px;">
<product headerHeight="{{headerHeight}}"></product> <product senceData="{{senceData}}" headerHeight="{{headerHeight}}"></product>
</view>
</view>
<!-- 在线客服 -->
<image class="chat" src="{{IMGURL}}customer_service.png" bindtap="goConsult" />
<!-- 在线客服 -->
<image class="applyAct" src="{{IMGURL}}application_activity.png" bindtap="applyActivity" />
<!-- 测算按钮 -->
<view class="calculate" bindtap="showCalculate">
<image class="icon-calculate" webp src="{{IMGURL}}calc.png"></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>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -61,5 +61,5 @@ ...@@ -61,5 +61,5 @@
], ],
"include": [] "include": []
}, },
"appid": "wxe10067a63c1856ac" "appid": "wxc50d04ae5aa9984a"
} }
\ No newline at end of file \ No newline at end of file
...@@ -132,6 +132,27 @@ ...@@ -132,6 +132,27 @@
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
},
{
"name": "发现页",
"pathName": "pages/tab/discovery/discovery",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "模拟分享",
"pathName": "pages/authentication/loading/loading",
"query": "url=%2Fpages%2Ftab%2Fdiscovery%2Fdiscovery",
"launchMode": "default",
"scene": null
},
{
"name": "申请活动",
"pathName": "packageActivity/pages/applyActivity/applyActivity",
"query": "",
"launchMode": "default",
"scene": null
} }
] ]
} }
......
...@@ -47,10 +47,10 @@ class Request { ...@@ -47,10 +47,10 @@ class Request {
} = response } = response
if (code == 20 || code == 21) { if (code == 20 || code == 21) {
const thisPage = wx.$router.getPageInstance() const thisPage = wx.$router.getPageInstance()
if(thisPage.route == 'login/loading/loading') { if(thisPage.route == 'pages/authentication/loading/loading') {
resolve(data) resolve(data)
return return
} else wx.$router.reLaunch('login.index') } else wx.$router.reLaunch('/pages/authentication/login/login')
} else { } else {
if (returnAll) { if (returnAll) {
resolve(data) resolve(data)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!