Commit 089669a9 by 前端

fixed

1 parent 86582797
Showing 92 changed files with 879 additions and 3833 deletions
......@@ -6,8 +6,6 @@
"pages/tab/mine/mine",
"pages/webView/webView",
"login/index/index",
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"login/accountItems/accountItems",
"packagesList/activityDetail/activityDetail",
"pages/tab/logout/logout"
......
var measureList = Object.freeze([
{
// name: '新车交付场景',
name: '精品升级',
// tips: '精品升级',
iconName: 'icon2',
product: [
{
name: '太阳膜升级',
parentName: '精品升级',
// tips: '精品升级',
// value: '1-0',
typeIndex: '1.1',
isCheck: false,
rate: '0.55',
averagePrice: 1400,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.65'
}
]
},
{
name: '次新车转化',
iconName: 'icon3',
// tips: '膨胀金活动',
product: [
{
name: '膨胀金活动-车衣',
parentName: '次新车转化',
// tips: '膨胀金活动',
// value: '2-0',
typeIndex: '1.2',
isCheck: false,
rate: '0.09',
averagePrice: 5000,
flowCost: '0.1',
flowCostText: '10%',
serviceDividendRatio: '0.85'
},
{
name: '膨胀金活动-改色膜',
parentName: '次新车转化',
// tips: '膨胀金活动',
// value: '2-1',
typeIndex: '1.2',
isCheck: false,
rate: '0.06',
averagePrice: 2999,
flowCost: '0.1',
flowCostText: '10%',
serviceDividendRatio: '0.74'
}
]
},
{
name: '售后众筹',
iconName: 'icon4',
// tips: '众筹活动',
product: [
{
name: '360全景导航',
parentName: '售后众筹',
// tips: '众筹活动',
typeIndex: '1.3',
// value: '3-0',
isCheck: false,
rate: '0.015',
averagePrice: 2680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.16'
},
{
name: 'AR导航',
parentName: '售后众筹',
// tips: '众筹活动',
// value: '3-1',
typeIndex: '1.3',
isCheck: false,
rate: '0.015',
averagePrice: 1680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.24'
},
{
name: '氛围灯',
parentName: '售后众筹',
// tips: '众筹活动',
// value: '3-2',
typeIndex: '1.3',
isCheck: false,
rate: '0.015',
averagePrice: 2680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.22'
},
{
name: '座椅通风',
parentName: '售后众筹',
// tips: '众筹活动',
// value: '3-3',
typeIndex: '1.3',
isCheck: false,
rate: '0.01',
averagePrice: 2580,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.21'
},
{
name: '智能香薰',
parentName: '售后众筹',
// tips: '众筹活动',
// value: '3-4',
typeIndex: '1.3',
isCheck: false,
rate: '0.015',
averagePrice: 1680,
flowCost: '0.25',
flowCostText: '25%',
serviceDividendRatio: '0.24'
}
]
},
{
name: '会员权益/升级',
// tips: '车损升级',
iconName: 'icon1',
product: [
{
name: '车损升级',
parentName: '会员权益/升级',
// tips: '车损升级',
// value: '0-0',
typeIndex: '1.0',
isCheck: false,
rate: '0.5',
averagePrice: 1200,
flowCost: '0.4',
flowCostText: '40%',
serviceDividendRatio: '0.23'
}
]
},
])
export default {
measureList
}
\ No newline at end of file
// pages/measure/measure.js
import Util from '~/utils/util'
import measureData from '../constant/data'
const checkMap = new Map()
let imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL:imgUrl,
measureList: measureData.measureList,
isDisabled: true,
checkArray: [],
formData: {
storeNumber: '',
carNumber: '',
customNumber: ''
}
},
// 提交
submit() {
const reg = /^[1-9]\d*$/
// for(let i in this.data.formData) {
// if (!reg.test(this.data.formData[i])) {
// wx.showToast({
// title: '请输入正整数',
// icon: 'none',
// duration: 1000
// })
// this.setData({
// isDisabled: true
// })
// return
// }
// }
if (!this.data.isDisabled) {
// console.log(this.data.checkArray)
let checkArray = []
this.data.measureList.forEach(item => {
item.product.forEach(i => {
if (i.isCheck) {
checkArray.push(i)
}
})
})
// console.log(checkArray)
const params = Object.assign({checkArray}, this.data.formData)
// console.log(params)
wx.$router.go("measureResult", params);
}
},
// 选择产品
checkProduct(e) {
const { pidx, idx } = e.currentTarget.dataset
const value = pidx + '-' + idx
const name = `measureList[${pidx}].product[${idx}].isCheck`
const val = this.data.measureList[pidx].product[idx].isCheck
!val ? checkMap.set(value, !val) : checkMap.delete(value)
// console.log(checkMap)
this.setData({
[name]: !val,
checkArray: [...checkMap.keys()]
})
this.validForm()
// console.log(this.data.checkArray)
},
// 必填校验
validForm() {
const flag = this.data.formData.storeNumber && this.data.formData.carNumber && this.data.formData.customNumber && this.data.checkArray.length
this.setData({
isDisabled: !flag
})
return flag
},
// 表单输入
handleInput(e) {
let name = e.currentTarget.dataset.name
let val = this.validateNumber(e.detail.value)
// console.log(val)
const form = `formData.${name}`
this.setData({
[form]: val
})
this.validForm()
},
// 输入正整数校验
validateNumber(val) {
// console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "展业测算"
}
\ No newline at end of file
/* pages/measure/measure/measure.wxss */
.wrapper-measure {
position: relative;
padding: 0 24rpx 90rpx;
}
.wrapper-measure .header-bg {
position: absolute;
top: -224rpx;
left: 0;
width: 100%;
z-index: -1;
height: 480rpx;
}
.form {
width: 100%;
box-sizing: border-box;
background: #fff;
box-shadow: 0 4rpx 32rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
padding: 32rpx 40rpx;
}
.form-title {
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
}
.first-form {
margin-top: 224rpx;
}
.second-form {
margin-top: 48rpx;
}
.form-label {
font-size: 28rpx;
margin-top: 32rpx;
}
.form-value {
margin-top: 16rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
padding: 0 20rpx;
box-sizing: border-box;
font-size: 28rpx;
font-size: 28rpx;
line-height: 48rpx;
}
.scenario {
display: flex;
align-items: center;
width: 100%;
padding: 10rpx 24rpx;
background: #F5F5FA;
border-radius: 8rpx;
margin-top: 48rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
line-height: 44rpx;
box-sizing: border-box;
}
.scenario .icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.title-tip {
font-weight: 400;
font-size: 24rpx;
color: #6E6E7A;
letter-spacing: 0;
line-height: 44rpx;
margin-left: 8rpx;
}
.product-list {
/* display: flex; */
width: 100%;
}
.product-item {
position: relative;
display: inline-block;
width: calc(50% - 42rpx);
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 8rpx;
text-align: center;
padding: 14rpx;
margin-top: 18rpx;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
text-align: center;
line-height: 44rpx;
}
.product-item.active {
background-image: linear-gradient(0deg, #E8E8FF 14%, #FAFAFF 89%);
border: 2rpx solid #9994FF;
}
.product-item:nth-child(even) {
margin-left: 18rpx;
}
.iconCheck {
position: absolute;
width: 30rpx;
height: 22rpx;
top: -2rpx;
right: -2rpx;
}
.submit {
margin: 48rpx 32rpx;
padding: 24rpx 245rpx;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
}
.submit.disabled {
background: #D3D3DB;
}
\ No newline at end of file
<!--pages/measure/measure.wxml-->
<view class="wrapper-measure">
<image class="header-bg" webp src="{{IMGURL}}measure/header-bg.png?v={{img_version}}"></image>
<view class="form first-form">
<view class="form-title">请输入4S店基本信息</view>
<view class="form-label">您合作的4S门店数量</view>
<input class="form-value" value="{{formData.storeNumber}}" bindinput="handleInput" data-name="storeNumber" maxlength="4" type="number" placeholder="请输入"/>
<view class="form-label">4S店单店月均新车销量</view>
<input class="form-value" value="{{formData.carNumber}}" bindinput="handleInput" data-name="carNumber" maxlength="4" type="number" placeholder="请输入"/>
<view class="form-label">4S店单店3年以上存量车主</view>
<input class="form-value" value="{{formData.customNumber}}" bindinput="handleInput" data-name="customNumber" maxlength="6" type="number" placeholder="请输入"/>
</view>
<view class="form second-form">
<view class="form-title">请选择场景/产品</view>
<block wx:for="{{measureList}}" wx:for-item="i" wx:key="index">
<view class="scenario">
<image class="icon" webp src="{{IMGURL}}measure/{{i.iconName}}.png?v={{img_version}}"></image>
{{i.name}}
<!-- <view wx:if="{{i.tips}}" class="title-tip">{{i.tips}}</view> -->
</view>
<view class="product-list">
<view class="product-item {{j.isCheck ? 'active':''}}" wx:for="{{i.product}}" wx:for-item="j" wx:for-index="jIdx" wx:key="index" data-pidx="{{index}}" data-idx="{{jIdx}}" data-value="{{j.value}}" bindtap="checkProduct">
<image hidden="{{!j.isCheck}}" class="iconCheck" webp src="{{IMGURL}}measure/icon-check.png?v={{img_version}}"></image>
{{j.name}}</view>
</view>
</block>
</view>
<view class="submit {{isDisabled ? 'disabled' : ''}}" bindtap="submit">开始测算</view>
</view>
/* pages/measure/measure.wxss */
.wrapper-measure {
position: relative;
padding: 0 24rpx 90rpx;
}
.wrapper-measure .header-bg {
position: absolute;
top: -224rpx;
left: 0;
width: 100%;
z-index: -1;
height: 480rpx;
}
.form {
width: 100%;
box-sizing: border-box;
background: #fff;
box-shadow: 0 4rpx 32rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
padding: 32rpx 40rpx;
}
.form-title {
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
}
.first-form {
margin-top: 224rpx;
}
.second-form {
margin-top: 48rpx;
}
.form-label {
font-size: 28rpx;
margin-top: 32rpx;
}
.form-value {
margin-top: 16rpx;
height: 80rpx;
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
padding: 0 20rpx;
box-sizing: border-box;
font-size: 28rpx;
font-size: 28rpx;
line-height: 48rpx;
}
.scenario {
display: flex;
align-items: center;
width: 100%;
padding: 10rpx 24rpx;
background: #F5F5FA;
border-radius: 8rpx;
margin-top: 48rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
line-height: 44rpx;
box-sizing: border-box;
}
.scenario .icon {
width: 40rpx;
height: 40rpx;
margin-right: 16rpx;
}
.title-tip {
font-weight: 400;
font-size: 24rpx;
color: #6E6E7A;
letter-spacing: 0;
line-height: 44rpx;
margin-left: 8rpx;
}
.product-list {
/* display: flex; */
width: 100%;
}
.product-item {
position: relative;
display: inline-block;
width: calc(50% - 42rpx);
background: #FFFFFF;
border: 2rpx solid #E6E6E6;
border-radius: 8rpx;
text-align: center;
padding: 14rpx;
margin-top: 18rpx;
font-size: 28rpx;
color: #323436;
letter-spacing: 0;
text-align: center;
line-height: 44rpx;
}
.product-item.active {
background-image: linear-gradient(0deg, #E8E8FF 14%, #FAFAFF 89%);
border: 2rpx solid #9994FF;
}
.product-item:nth-child(even) {
margin-left: 18rpx;
}
.iconCheck {
position: absolute;
width: 30rpx;
height: 22rpx;
top: -2rpx;
right: -2rpx;
}
.submit {
margin: 48rpx 32rpx;
padding: 24rpx 245rpx;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
}
.submit.disabled {
background: #D3D3DB;
}
\ No newline at end of file
// pages/measureResult/measureResult.js
import Util from '~/utils/util'
import measureData from '../constant/data'
let imgUrl = 'https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/'
Page({
/**
* 页面的初始数据
*/
data: {
IMGURL:imgUrl,
visible: false,
measureList: null,
formData: {
storeNumber: 1,
carNumber: 1,
customNumber: 1,
checkArray: []
},
checkList: [],
singleList: ['baseCustomersNumber', 'valueAddNumber', 'storeIncomeNumber', 'serviceIncomeNumber', 'singleValueAddNumber', 'singleStoreIncomeNumber', 'singleServiceIncomeNumber'],
countList: ['valueAddCount', 'storeIncomeCount', 'serviceIncomeCount', 'singleValueAddCount', 'singleStoreIncomeCount', 'singleServiceIncomeCount'],
countData: {},
dialogData: {
rate: '',
averagePrice: ''
}
},
// 计算公式
formula(name, item, list) {
console.log(name, item)
const {storeNumber, carNumber, customNumber} = this.data.formData
const {rate, averagePrice, flowCost, serviceDividendRatio, typeIndex} = item
console.log(storeNumber, carNumber, customNumber)
let value = 0
switch(name) {
// 增值产量(总)
case 'valueAddCount':
list.forEach(i => {
value = value + (+i.valueAddNumber)
})
break
// 4s店收入/年
case 'storeIncomeCount':
list.forEach(i => {
value = value + (+i.storeIncomeNumber)
})
break
// 服务商收入/年
case 'serviceIncomeCount':
list.forEach(i => {
value = value + (+i.serviceIncomeNumber)
})
break
// 单店均值
case 'singleValueAddCount':
let val = 0
list.forEach(i => {
val = val + (+i.valueAddNumber)
})
value = (val / storeNumber).toFixed(0)
break
// 单店均值
case 'singleStoreIncomeCount':
let val1 = 0
list.forEach(i => {
val1 = val1 + (+i.storeIncomeNumber)
})
value = (val1 / storeNumber).toFixed(0)
break
// 单店均值
case 'singleServiceIncomeCount':
let val2 = 0
list.forEach(i => {
val2 = val2 + (+i.serviceIncomeNumber)
})
value = (val2 / storeNumber).toFixed(0)
break
// 基盘客户数
case 'baseCustomersNumber':
if (typeIndex == '1.3') {
value = customNumber * storeNumber
} else {
value = carNumber * 12 * storeNumber
}
break
// 增量产值/年(单个产品)总
case 'valueAddNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice).toFixed(0)
}
break
// 单店产值
case 'singleValueAddNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice / storeNumber).toFixed(0)
}
break
// 4s店收入/年
case 'storeIncomeNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice * flowCost).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * flowCost).toFixed(0)
}
break
// 服务商收入/年
case 'serviceIncomeNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice * serviceDividendRatio).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * serviceDividendRatio).toFixed(0)
}
break
// 4s店收入/年,单店
case 'singleStoreIncomeNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice * flowCost / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * flowCost / storeNumber).toFixed(0)
}
break
// 服务商收入/年,单店
case 'singleServiceIncomeNumber':
if (typeIndex == '1.3') {
value = (customNumber * storeNumber* rate * averagePrice * serviceDividendRatio / storeNumber).toFixed(0)
} else {
value = (carNumber * 12 * storeNumber * rate * averagePrice * serviceDividendRatio / storeNumber).toFixed(0)
}
break
}
return value;
},
// 开始计算
getCalculate(checkArray, isCount = false) {
const checkList = checkArray
if (!isCount) {
const singleList = this.data.singleList
checkList.forEach(item => {
singleList.forEach(i => {
const value = this.formula(i, item)
item[i] = value
})
})
return checkList
} else {
const {countList} = this.data
const countData = {}
console.log(checkList)
checkList.forEach(i => {
countList.forEach(j => {
const value = this.formula(j, i, checkList)
countData[j] = value
})
})
return countData
}
},
// 编辑
toEdit(e) {
console.log(e)
const {item, index} = e.currentTarget.dataset
console.log(item)
this.setData({
visible: true,
'dialogData.rate': (item.rate * 10000 / 100).toFixed(2),
'dialogData.averagePrice': item.averagePrice,
'dialogData.index': index
});
},
showCalculate() {
this.setData({
visible: false
})
},
clickDialog(e) {
// console.log(e.changedTouches[0].clientY);
// if (e.changedTouches[0].clientY < 451) {
// this.setData({
// visible: false
// });
// }
},
submit(e) {
console.log(e, this.data.dialogData)
const {rate, averagePrice, index} = this.data.dialogData
console.log(index)
// const reg = /^[1-9]\d*$/
// const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
if (!rate) {
wx.showToast({
title: '请输入转化率',
icon: 'none',
duration: 2000
})
return
}
if (!averagePrice) {
wx.showToast({
title: '请输入客均单价',
icon: 'none',
duration: 2000
})
return
}
this.setData({
[`checkList[${index}].rate`]: rate / 100,
[`checkList[${index}].averagePrice`]: averagePrice,
visible: false
})
console.log(this.data)
const checkList = this.getCalculate(this.data.checkList)
const countData = this.getCalculate(this.data.checkList, true)
console.log(checkList, countData)
this.setData({
checkList,
countData
})
},
// 输入框输入
handleInput(e) {
console.log(e)
let value = e.detail.value
const name = e.target.dataset.name
const reg = /^[1-9]\d*$/
const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
console.log(value <100 && value > 0, (reg.test(value) || reg1.test(value)))
if (name == 'rate') {
if (value <= 0) {
value = null
} else if (value > 100) {
value = value.slice(0,2)
} else if (value > 0 && value < 100) {
const valueArr = value.split('.')
if (valueArr.length == 2) {
const decimal = value.split('.')[1].slice(0,2)
const integer = value.split('.')[0]
value = integer + '.' + decimal
}
} else {
console.log(value)
value = value.slice(0, value.length - 1)
}
} else {
value = this.validateNumber(value)
}
console.log(value)
const form = `dialogData.${name}`
this.setData({
[form]: value
})
// this.setData({
// 'dialogData.rate': value
// })
},
// 输入正整数校验
validateNumber(val) {
console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.$router.getData(res => {
console.log(res)
const list = Util.deepClone(res)
this.setData({
formData: list
})
const checkList = this.getCalculate(list.checkArray)
const countData = this.getCalculate(list.checkArray, true)
console.log(checkList)
this.setData({
checkList,
countData,
})
console.log(countData)
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
this.setData({
measureList: measureData.measureList
})
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "测算结果"
}
\ No newline at end of file
/* pages/measure/measureResult/measureResult.wxss */
.wrapper {
padding-bottom: 90rpx;
}
.header-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
.banner1 {
height: 400rpx;
}
.wrapper-header {
padding: 48rpx 32rpx;
}
.store-number {
position: relative;
font-weight: 600;
font-size: 34rpx;
color: #2D2D2E;
}
.store-number::after {
content: '';
display: inline-block;
position: absolute;
left: 0;
bottom: -24rpx;
width: 48rpx;
height: 6rpx;
background-color: #F5A623;
}
.header-box {
margin-top: 62rpx;
}
.card-item {
display: inline-block;
width: calc(100%/3);
}
.card-label {
font-weight: 400;
font-size: 24rpx;
color: #2D2D33;
line-height: 36rpx;
}
.card-value {
display: flex;
align-items: baseline;
font-weight: 700;
font-size: 40rpx;
color: #FFA034;
line-height: 48rpx;
}
.card-single-unit {
display: inline-block;
font-size: 24rpx;
color: #1B233D;
}
.m-b-8 {
margin-bottom: 8rpx;
}
.m-b-4 {
margin-bottom: 4rpx;
}
.m-b-24 {
margin-top: 24rpx;
}
.card-box {
background: #FFFFFF;
box-shadow: 0 4rpx 24rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
margin: 0 24rpx 20rpx;
}
.card-title {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
line-height: 48rpx;
padding: 24rpx 32rpx;
border-bottom: 1rpx solid #F0F1F5;
}
.card-product {
display: inline-block;
font-weight: 400;
font-size: 28rpx;
color: #333333;
/* margin-left: 15rpx; */
}
.card-edit {
display: flex;
width: 100rpx;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #5850FF;
}
.icon-edit {
margin-right: 8rpx;
width: 28rpx;
height: 28rpx;
}
.card-content {
padding: 23rpx 32rpx 32rpx;
}
.value-number {
margin-bottom: 32rpx;
}
.card-number {
display: inline-block;
}
.card-unit {
display: inline-block;
font-weight: 400;
font-size: 28rpx;
color: #FFA034;
}
.card-label.gray {
color: #6E6E7A;
font-weight: 400;
}
.card-value.gray {
font-size: 32rpx;
color: #6E6E7A;
font-weight: 400;
}
.card-value.card-single-value {
font-size: 32rpx;
color: #1B233D;
font-weight: 400;
}
.card-value.color {
color: #5850FF;
font-weight: 400;
font-size: 32rpx;
}
.card-value.normal {
color: #2D2D33;
font-weight: 400;
font-size: 32rpx;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45,45,51,0.50);
}
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
height: 540rpx;
background-color: #fff;
box-shadow: 0 -8rpx 20rpx 0 rgba(180,186,204,0.32);
border-radius: 32rpx 32rpx 0 0;
}
.dialog-header {
display: flex;
justify-content: space-between;
padding: 32rpx 48rpx;
border-bottom: 1rpx solid #eee;
}
.header-btn {
display: inline-block;
font-size: 32rpx;
line-height: 48rpx;
}
.btn-gray {
color: #6C737A;
}
.btn-primary {
background-color: #fff;
border: none;
margin: 0;
padding: 0;
font-weight: 500;
color: #5850FF;
}
.btn-primary::after {
border: none;
}
.dialog-content {
padding: 40rpx 24rpx 60rpx;
}
.dialog-title {
font-weight: 600;
font-size: 36rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
margin-bottom: 24rpx;
}
.dialog-form {
width: 100%;
/* height: 384rpx; */
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 100%;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
}
.input-box {
position: relative;
/* margin-left: 64rpx; */
margin-right: 16rpx;
width: 446rpx;
}
.form-unit {
position: absolute;
right: -10rpx;
top: 50%;
transform: translateY(-50%);
font-size: 28rpx;
color: #9E9EA8;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
line-height: 48rpx;
margin-top: 40rpx;
}
\ No newline at end of file
/* pages/measureResult/measureResult.wxss */
.wrapper {
padding-bottom: 90rpx;
}
.header-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: -1;
}
.banner1 {
height: 400rpx;
}
.wrapper-header {
padding: 48rpx 32rpx;
}
.store-number {
position: relative;
font-weight: 600;
font-size: 34rpx;
color: #2D2D2E;
}
.store-number::after {
content: '';
display: inline-block;
position: absolute;
left: 0;
bottom: -24rpx;
width: 48rpx;
height: 6rpx;
background-color: #F5A623;
}
.header-box {
margin-top: 62rpx;
}
.card-item {
display: inline-block;
width: calc(100%/3);
}
.card-label {
font-weight: 400;
font-size: 24rpx;
color: #2D2D33;
line-height: 36rpx;
}
.card-value {
display: flex;
align-items: baseline;
font-weight: 700;
font-size: 40rpx;
color: #FFA034;
line-height: 48rpx;
}
.card-single-unit {
display: inline-block;
font-size: 24rpx;
color: #1B233D;
}
.m-b-8 {
margin-bottom: 8rpx;
}
.m-b-4 {
margin-bottom: 4rpx;
}
.m-b-24 {
margin-top: 24rpx;
}
.card-box {
background: #FFFFFF;
box-shadow: 0 4rpx 24rpx 0 rgba(175,181,219,0.40);
border-radius: 16rpx;
margin: 0 24rpx 20rpx;
}
.card-title {
display: flex;
align-items: center;
justify-content: space-between;
font-weight: 500;
font-size: 32rpx;
color: #333333;
letter-spacing: 0;
line-height: 48rpx;
padding: 24rpx 32rpx;
border-bottom: 1rpx solid #F0F1F5;
}
.card-product {
display: inline-block;
font-weight: 400;
font-size: 28rpx;
color: #333333;
/* margin-left: 15rpx; */
}
.card-edit {
display: flex;
width: 100rpx;
align-items: center;
font-weight: 400;
font-size: 24rpx;
color: #5850FF;
}
.icon-edit {
margin-right: 8rpx;
width: 28rpx;
height: 28rpx;
}
.card-content {
padding: 23rpx 32rpx 32rpx;
}
.value-number {
margin-bottom: 32rpx;
}
.card-number {
display: inline-block;
}
.card-unit {
display: inline-block;
font-weight: 400;
font-size: 28rpx;
color: #FFA034;
}
.card-label.gray {
color: #6E6E7A;
font-weight: 400;
}
.card-value.gray {
font-size: 32rpx;
color: #6E6E7A;
font-weight: 400;
}
.card-value.card-single-value {
font-size: 32rpx;
color: #1B233D;
font-weight: 400;
}
.card-value.color {
color: #5850FF;
font-weight: 400;
font-size: 32rpx;
}
.card-value.normal {
color: #2D2D33;
font-weight: 400;
font-size: 32rpx;
}
/* 测算弹窗 */
.dialog-wrapper {
position: fixed;
height: 100vh;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(45,45,51,0.50);
}
.dialog-box {
position: fixed;
bottom: 0;
width: 100%;
height: 540rpx;
background-color: #fff;
box-shadow: 0 -8rpx 20rpx 0 rgba(180,186,204,0.32);
border-radius: 32rpx 32rpx 0 0;
}
.dialog-header {
display: flex;
justify-content: space-between;
padding: 32rpx 48rpx;
border-bottom: 1rpx solid #eee;
}
.header-btn {
display: inline-block;
font-size: 32rpx;
line-height: 48rpx;
}
.btn-gray {
color: #6C737A;
}
.btn-primary {
background-color: #fff;
border: none;
margin: 0;
padding: 0;
font-weight: 500;
color: #5850FF;
}
.btn-primary::after {
border: none;
}
.dialog-content {
padding: 40rpx 24rpx 60rpx;
}
.dialog-title {
font-weight: 600;
font-size: 36rpx;
color: #333333;
letter-spacing: 0;
text-align: center;
line-height: 56rpx;
margin-bottom: 24rpx;
}
.dialog-form {
width: 100%;
/* height: 384rpx; */
border-radius: 8rpx;
padding: 32rpx;
box-sizing: border-box;
}
.form-item {
display: flex;
align-items: center;
height: 80rpx;
margin-bottom: 24rpx;
justify-content: space-between;
}
.form-label {
width: 256rpx;
font-size: 28rpx;
color: #2D2D33;
}
.form-input {
width: 100%;
padding: 16rpx 20rpx;
border: 2rpx solid #E6E6E6;
border-radius: 4rpx;
}
.input-box {
position: relative;
/* margin-left: 64rpx; */
margin-right: 16rpx;
width: 446rpx;
}
.form-unit {
position: absolute;
right: -10rpx;
top: 50%;
transform: translateY(-50%);
font-size: 28rpx;
color: #9E9EA8;
}
.dialog-btn {
width: 100%;
padding: 24rpx 0;
box-sizing: border-box;
background: #5850FF;
border-radius: 8rpx;
font-weight: 500;
font-size: 32rpx;
color: #FFFFFF;
letter-spacing: 0.8rpx;
text-align: center;
line-height: 48rpx;
margin-top: 40rpx;
}
\ No newline at end of file
<!--pages/tab/index/components/indexClue/indexClue.wxml-->
<!-- style="height: calc(100vh - {{headerHeight/2}}px)" -->
<view
class="clue-wrap"
style="height: calc(100vh - {{headerHeight/2}}px)"
style="height: calc(100vh - {{headerHeight}}px)"
hover-class="none"
hover-stop-propagation="false">
<view class="types">
......
// pages/tab/index/components/indexProduct/indexProduct.js
import { IMG_URL } from "~/utils/constantData.js";
// 导入方法
import { behavior as computedBehavior } from "~/utils/lib/miniprogram-computed";
import { getActivityRecordApi } from '~/api/index.js'
const videoBaseUrl =
"https://img02.glsx.com.cn/weapp/resource/miniprogram/ai-card/";
Component({
// 混入
behaviors: [computedBehavior],
/**
* 组件的属性列表
*/
properties: {
actNum: Number,
img_version: null,
senceData: Array,
headerHeight: Number,
},
computed: {
// 特色产品
prodList(data) {
if (data.mainActiveIndex == 0) {
return data.senceData[data.tabActive].productList;
} else {
let type = data.items[data.mainActiveIndex].type;
return data.senceData[data.tabActive].productList.filter(
(item) => item.type == type
);
}
},
// 视频
prodVideoList(data) {
return data.senceData[data.tabActive].videoList;
},
// 海报
prodPosterList(data) {
return data.senceData[data.tabActive].posterList;
},
// 通知文字
scrollText(data) {
let { tabActive, senceData } = data;
return senceData[tabActive].scrollText;
},
},
// 默认已深度监听
watch: {
tabActive: function (a, b) {
// console.log('变化',a)
this.setData({
mainActiveIndex: 0,
});
this.setProType();
},
},
/**
* 组件的初始数据
*/
data: {
refresherFlag: true,
IMG_URL,
// 头部tab
tabActive: 3,
tabHeaderShow: false,
items: [
{
text: "全部",
type: "all",
},
],
mainActiveIndex: 0,
contentHeight: 0,
// 滚动条
activityList: [],
// 视频海报
videoActive: 0,
overlayShow: false,
checkPosterItem: {
src: `${IMG_URL}index/poster/poster3-0.png`,
},
// checkVideoItem:{}
},
lifetimes: {
attached() {
this.setProType();
this.getActivityRecord()
},
ready() {
// console.log('lifetimes',this)
let contentTop;
let that = this;
const query = this.createSelectorQuery();
query.select("#pro-cont").boundingClientRect(function (res) {
// console.log('top',res.top)
contentTop = res.top;
//屏幕
const windowHeight = wx.getSystemInfoSync().windowHeight;
// console.log('windowHeight: ', windowHeight, contentTop);
const contentHeight = windowHeight - contentTop;
// console.log('contentHeight: ', contentHeight);
that.setData({
contentHeight,
});
});
query.exec();
//头部tab显示
setTimeout(() => {
this.setData({
tabHeaderShow: true,
});
}, 200);
},
},
/**
* 组件的方法列表
*/
methods: {
setProType() {
let { tabActive } = this.data;
let typeItems = this.getAllTypePro(tabActive, "productList");
typeItems.unshift({
text: "全部",
type: "all",
});
this.setData({
items: typeItems,
});
},
//获取当前场景下的全部 产品分类
// getAllTypePro(3,'productList')
getAllTypePro(index, type) {
// console.log('senceData[index]',senceData[index])
let { senceData } = this.data;
//获取所有分类
let res = []; //[ { text: '美容类',type:xxx }, { text: '轻改类',type:xxx } ]
let list = senceData[index][type];
function someFn(element) {
return element.text == this.category;
}
if (list) {
list.forEach((item) => {
if (!res.some(someFn, item)) {
res.push({
text: item.category,
type: item.type,
});
}
});
}
// console.log('res',res)
return res;
},
// 获取全部活动列表
getActivityRecord() {
getActivityRecordApi({}).then(({data, code, message}) => {
if (code == -1) {
wx.showToast({
title: message,
icon: "none",
duration: 2000,
});
}
this.setData({
activityList: data
})
})
},
// 跳转活动页
activityClick(e) {
// const {hasPhoneNumber} = this.data
const id = e.detail
console.log(e)
wx.$router.go('/packagesList/activityDetail/activityDetail', {id})
},
// 开通
openPro() {
let obj = {
scene:3
}
wx.$router.go("/packagesList/applyProd/pages/apply",obj);
},
onClickHide(e) {
let {type} = e.target.dataset
if(type == 'close'){
this.setData({ overlayShow: false });
}
},
//视频 海报切换
onclickVideoTab(event) {
// console.log('event: ', event);
let videoActive = +event.currentTarget.dataset.num;
// console.log("videoActive: ", videoActive);
this.setData({
videoActive,
});
},
onClickNav({ detail = {} }) {
this.setData({
mainActiveIndex: detail.index || 0,
});
},
// 头部tab回调
onTabChange(event) {
// console.log("event: ", event);
let index = event.detail.index;
this.setData({
tabActive: index,
});
},
checkImgProd() {
let { tabActive } = this.data;
let userInfo = wx.$storage.get("userInfo");
let obj = {
actNum: tabActive, //选中的场景
activeNavIdx: 0, //选中的产品
phone: userInfo.phone,
};
wx.$router.go("/pages/viewProdBanner/index", obj);
},
checkProd(e) {
let { tabActive } = this.data;
//登录的用户手机号
let userInfo = wx.$storage.get("userInfo");
// let item = e.currentTarget.dataset.item
let index = e.currentTarget.dataset.index;
let obj = {
actNum: tabActive, //选中的场景
activeNavIdx: index, //选中的产品
phone: userInfo.phone,
};
wx.$router.go("/pages/viewProd/index", obj);
},
// 查看海报 视频
checkVideo(e) {
// console.log('e: ', e);
let { tabActive } = this.data;
// let item = e.currentTarget.dataset.item
let index = e.currentTarget.dataset.index;
// this.setData({
// checkVideoItem:item
// })
let obj = {
tabActive,
videoIndex: index,
};
wx.$router.go("/pages/viewVideo/index", obj);
},
checkPoster(e) {
// console.log('e: ', e);
let item = e.currentTarget.dataset.item;
this.setData({
checkPosterItem: item,
overlayShow: true,
});
},
// 选车场景切换
selectCar(e) {
// console.log('e: ', e)
let { num } = e.currentTarget.dataset;
this.triggerEvent("selectCar", num);
},
refresherrefreshFn() {
this.triggerEvent("refresherrefresh");
setTimeout(() => {
this.setData({
refresherFlag: false,
});
}, 1000);
},
},
});
{
"component": true,
"usingComponents": {
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"van-notice-bar": "@vant/weapp/notice-bar/index",
"van-tree-select": "@vant/weapp/tree-select/index",
"video-item":"../video-item/index",
"poster-item":"../poster-item/index",
"van-overlay": "@vant/weapp/overlay/index",
"activity-swiper": "glsx-applet-component/activity-swiper/index"
},
"styleIsolation": "shared"
}
\ No newline at end of file
// /* pages/tab/index/components/indexProduct/indexProduct.wxss */
// .content-scroll{
// height: 100vh;
// // height: calc(100% - 80rpx);
// }
// .content-product {
// .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 {
// position: relative;
// // padding-top: 10px;
// width: 172rpx;
// height: 180rpx;
// background: #f7f8fc;
// border-radius: 8rpx;
// box-sizing: border-box;
// // border: 1px solid #f7f8fc;
// }
// .open-img {
// position: absolute;
// top: 0;
// right: 0;
// width: 78rpx;
// height: 78rpx;
// box-sizing: border-box;
// }
// .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.4);
// &::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;
// }
// // .open-img{
// // display: none;
// // }
// .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;
// }
// }
// }
.page-pro {
.pro-head {
.pro-head-hidden{
visibility: hidden;
}
.van-tabs__line {
width: 40rpx !important;
height: 8rpx;
background: #3666fe;
border-radius: 4rpx;
}
.van-ellipsis {
flex-basis: auto !important;
overflow: visible;
text-overflow: auto;
}
.van-tab--active {
.van-ellipsis {
font-weight: 600;
font-size: 36rpx;
color: #323436;
overflow: visible;
text-overflow: auto;
}
}
.pro-banner {
display: block;
margin: 8rpx auto 20rpx;
width: 710rpx;
height: 254rpx;
border-radius: 20rpx;
}
}
.dy-notice {
margin-left: 20rpx;
margin-right: 20rpx;
margin-bottom: 40rpx;
padding: 0;
color: #8a8c90;
font-size: 24rpx;
background: #f2f3f7;
border-radius: 22rpx;
height: 44rpx;
}
.pro-cont {
position: relative;
.van-tree-select__nav {
width: 116rpx;
flex: 0;
}
.van-sidebar-item {
position: relative;
padding: 0;
width: 116rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
border-left: 0;
}
.van-sidebar-item__text{
font-size: 22rpx;
color: #5A6066;
}
.van-sidebar-item--selected::before {
position: absolute;
top: 50%;
left: 0;
width: 6rpx;
height: 40rpx;
border-radius: 0 4rpx 4rpx 0;
background-color: #3666fe;
-webkit-transform: translateY(-50%);
transform: translateY(-50%);
content: "";
}
.van-sidebar-item--selected {
.van-sidebar-item__text{
font-weight: 500;
color: #2D2D33;
}
}
.tab-cont {
padding-left: 32rpx;
padding-right: 32rpx;
box-sizing: border-box;
}
.tab-pro {
.title {
margin-bottom: 16rpx;
font-weight: 500;
font-size: 28rpx;
color: #323436;
}
.list {
}
.pro {
margin-right: 14rpx;
margin-bottom: 20rpx;
display: inline-block;
width: 176rpx;
height: 172rpx;
background: #ffffff;
border: 2rpx solid #ffffff;
box-shadow: 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.32);
border-radius: 8rpx;
&:nth-child(3n+3){
margin-right: 0;
}
.pro-img {
margin: 0 auto;
width: 176rpx;
height: 120rpx;
}
.pro-name {
// text-align: center;
text-indent: 6rpx;
height: 52rpx;
line-height: 52rpx;
font-size: 24rpx;
color: #323436;
overflow: hidden;//溢出隐藏
white-space: nowrap;//禁止换行
text-overflow: ellipsis;//...
}
}
}
.tab-video {
.tab-video-wrap {
display: flex;
margin-bottom: 16rpx;
margin-top: 12rpx;
.video {
margin-right: 40rpx;
font-size: 28rpx;
color: #8a8c90;
}
.act {
font-weight: 500;
color: #323436;
}
}
.video-cont {
// display:flex;
// flex-wrap: wrap;
// .video-item{
// &:nth-child(even){
// margin-right:0;
// }
// }
.even-class{
margin-right:0;
}
.empty {
width: 512rpx;
height: 512rpx;
}
}
.poster-cont {
// display:flex;
// flex-wrap: wrap;
.even-class{
margin-right:0;
}
.empty {
width: 512rpx;
height: 512rpx;
}
}
}
.expand-business{
position: absolute;
// top: calc(88rpx * 2);
left: 0;
.prod{
width: 116rpx;
height: 88rpx;
line-height: 88rpx;
font-size: 22rpx;
color: #8A8C90;
text-align: center;
}
}
}
}
//图片预览
.overlay-wrap{
position: absolute;
top: 52%;
left: 50%;
transform: translate(-50%, -50%);
width: 558rpx;
height: 944rpx;
background: #FFFFFF;
border-radius: 16rpx 16rpx 0 0;
.overlay-img{
display: block;
margin: 32rpx;
width: 494rpx;
height: 880rpx;
}
.overlay-msg{
display:flex;
justify-content:center;
align-items: center;
height: 90rpx;
background: #F7F8FA;
border-radius: 0 0 12rpx 12rpx;
.hand{
margin-right: 12rpx;
width: 40rpx;
height: 40rpx;
}
.forward{
font-weight: 500;
font-size: 32rpx;
color: #3666FE;
}
}
.img-close{
position: absolute;
top: -92rpx;
right: 0;
width: 56rpx;
height: 56rpx;
}
}
<view class="page-wrapper page-pro">
<view class="pro-head">
<van-tabs active="{{ tabActive }}" class="{{tabHeaderShow?'':'pro-head-hidden'}}" bind:change="onTabChange">
<van-tab wx:for="{{senceData}}" wx:key="index" title="{{item.tabname}}">
<image class="pro-banner" src="{{item.banner}}?v={{img_version}}" bindtap="checkImgProd" />
</van-tab>
</van-tabs>
</view>
<view>
<!-- <van-notice-bar custom-class="dy-notice" left-icon="{{IMG_URL}}index/ad.png" speed="{{20}}" text="{{scrollText}}" /> -->
<!-- 滚动条 -->
<activity-swiper activityList="{{activityList}}" bindactivityClick="activityClick"></activity-swiper>
</view>
<view class="pro-cont" id="pro-cont">
<van-tree-select items="{{ items }}" height="{{contentHeight}}" main-active-index="{{ mainActiveIndex }}" bind:click-nav="onClickNav">
<view class="tab-cont" slot="content">
<!-- 产品 -->
<view class="tab-pro">
<view class="title">特色产品</view>
<view class="list">
<view class="pro" wx:for="{{prodList}}" wx:key="index" data-item="{{item}}" data-index="{{index}}" bindtap="checkProd">
<image class="pro-img" src="{{item.prodImg}}?v={{img_version}}" />
<view class="pro-name">{{item.productName}}</view>
</view>
</view>
</view>
<!-- 视频 海报 -->
<view class="tab-video">
<view class="tab-video-wrap">
<view class="video {{videoActive == 0?'act':''}}" data-num="0" bindtap="onclickVideoTab">
案例视频
</view>
<view class="video {{videoActive == 1?'act':''}}" data-num="1" bindtap="onclickVideoTab">
营销海报
</view>
</view>
<view class="video-cont" wx:if="{{videoActive == 0}}">
<video-item wx:for="{{prodVideoList}}" wx:key="index" even-class="{{index%2?'even-class':''}}" item="{{item}}" data-item="{{item}}" data-index="{{index}}" bindtap="checkVideo"></video-item>
<!-- 无 -->
<image wx:if="{{prodVideoList.length == 0}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
</view>
<view class="poster-cont" wx:else>
<poster-item wx:for="{{prodPosterList}}" wx:key="index" even-class="{{index%2?'even-class':''}}" item="{{item}}" data-item="{{item}}" bindtap="checkPoster"></poster-item>
<!-- <poster-item even-class="even-class"></poster-item>
<poster-item></poster-item> -->
<!-- 无 -->
<image wx:if="{{prodPosterList.length == 0}}" class="empty" src="{{IMG_URL}}index/no-video.png?v={{img_version}}" />
</view>
</view>
</view>
</van-tree-select>
<!-- +产品 +业务 -->
<view class="expand-business" style="top:{{88 * items.length}}rpx" >
<!-- <view class="bus-pro" bindtap="openBus">
+业务
</view> -->
<view class="prod" bindtap="openPro" wx:if="{{tabActive == 3}}">
+产品
</view>
</view>
</view>
</view>
<!-- 图片预览弹窗 -->
<van-overlay show="{{ overlayShow }}" z-index="100" data-type="close" bindtap="onClickHide">
<view class="overlay-wrap">
<image class="overlay-img" webp show-menu-by-longpress src="{{checkPosterItem.src}}?v={{img_version}}" />
<view class="overlay-msg">
<image class="hand" src="{{IMG_URL}}index/hand.png?v={{img_version}}"/>
<view class="forward">长按图片转发</view>
</view>
<image class="img-close" data-type="close" bindtap="onClickHide" src="{{IMG_URL}}index/img-close.png?v={{img_version}}"/>
</view>
</van-overlay>
// pages/tab/output/components/nothingTipsCon/nothingTipsCon.js
import { IMG_URL } from '~/utils/constantData'
import { IMG_URL } from '~/utils/constantData.js'
Component({
externalClasses: ['even-class'],
/**
* 组件的属性列表
*/
properties: {},
properties: {
item:Object
},
/**
* 组件的初始数据
*/
data: {
nothingBg: `${IMG_URL}/output/empty.png`
IMG_URL
},
/**
* 组件的方法列表
*/
methods: {
nav() {
// debugger
wx.$router.go('pages.index')
}
}
})
})
\ No newline at end of file
/* pages/tab/index/components/poster-item/index.wxss */
.poster-item {
display: inline-block;
margin-right: 18rpx;
margin-bottom: 20rpx;
&:nth-child(even) {
margin-right: 0;
}
.img {
width: 276rpx;
height: 492rpx;
border-radius: 12rpx 12rpx 0 0;
}
.msg {
width: 276rpx;
height: 60rpx;
line-height: 60rpx;
background: #ebf0fe;
border-radius: 0 0 12rpx 12rpx;
font-size: 24rpx;
color: #3666fe;
text-align: center;
}
}
<!-- pages/tab/index/components/poster-item/index.wxml -->
<view class="poster-item even-class">
<image webp class="img" src="{{item.src}}?v={{img_version}}" />
<view class="msg">生成专属海报</view>
</view>
<!-- <view class="poster-item">
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" />
<view class="msg">生成专属海报</view>
</view>
<view class="poster-item">
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" />
<view class="msg">生成专属海报</view>
</view> -->
// pages/tab/index/components/indexProduct/indexProduct.js
// pages/tab/index/components/video-item/index.js
import { IMG_URL } from '~/utils/constantData.js'
Component({
externalClasses: ['even-class'],
/**
* 组件的属性列表
*/
properties: {
actNum:Number,
img_version:null,
senceData:Array,
headerHeight:Number
item:Object
},
/**
* 组件的初始数据
*/
data: {
refresherFlag:true,
IMG_URL
},
/**
* 组件的方法列表
*/
methods: {
// 选车场景切换
selectCar(e) {
// console.log('e: ', e)
let { num } = e.currentTarget.dataset
this.triggerEvent('selectCar',num)
},
refresherrefreshFn(){
this.triggerEvent('refresherrefresh')
setTimeout(()=>{
this.setData({
refresherFlag:false
})
},1000)
}
}
})
/* pages/tab/index/components/video-item/index.wxss */
.video-item{
position: relative;
display: inline-block;
margin-right: 18rpx;
margin-bottom: 20rpx;
padding-bottom: 16rpx;
width: 276rpx;
// height: 316rpx;
background: #FFFFFF;
// border: 2rpx solid #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(180,186,204,0.32);
border-radius: 12rpx;
overflow: hidden;
&:nth-child(even){
margin-right:0;
}
.play{
position: absolute;
top: 107rpx;
left: 19rpx;
width: 42rpx;
height: 42rpx;
}
.img{
width: 276rpx;
height: 168rpx;
}
.name{
margin-top: 12rpx;
margin-bottom: 12rpx;
margin-left:16rpx;
margin-right: 16rpx;
// height: 80rpx;
font-weight: 500;
font-size: 26rpx;
color: #323436;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
word-wrap: break-word;
white-space: normal !important;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.detail{
display: flex;
margin-left:16rpx;
margin-right: 16rpx;
}
.avtor{
width: 32rpx;
height: 32rpx;
border-radius: 50%;
}
.location{
margin-left: 8rpx;
margin-right: 8rpx;
width: 132rpx;
overflow:hidden;
text-overflow: ellipsis;
font-size: 22rpx;
color: #5A6066;
}
.check{
width: 28rpx;
height: 28rpx;
}
.num{
font-size: 20rpx;
color: #5A6066;
}
}
<!-- pages/tab/index/components/video-item/index.wxml -->
<view class="video-item even-class">
<image class="play" src="{{IMG_URL}}index/poster/play.png?v={{img_version}}" />
<image class="img" src="{{item.posterUrl}}?v={{img_version}}" alt="" />
<!-- <image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" alt="" /> -->
<view class="name">{{item.name}}</view>
<view class="detail">
<image class="avtor" src="{{IMG_URL}}index/poster/avtor.png?v={{img_version}}" />
<view class="location">{{item.manufacturer}}</view>
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num">{{item.view}}</view>
</view>
</view>
<!-- <view class="video-item">
<image class="play" src="{{IMG_URL}}index/poster/play.png?v={{img_version}}" />
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" alt="" />
<view class="name">30秒告诉你数字无忧卡是什么</view>
<view class="detail">
<image class="avtor" src="{{IMG_URL}}index/poster/avtor.png?v={{img_version}}" />
<view class="location">嘀加智慧</view>
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num">12345</view>
</view>
</view>
<view class="video-item">
<image class="play" src="{{IMG_URL}}index/poster/play.png?v={{img_version}}" />
<image class="img" src="{{IMG_URL}}index/poster/poster0-0.png?v={{img_version}}" alt="" />
<view class="name">30秒告诉你数字无忧卡是什么</view>
<view class="detail">
<image class="avtor" src="{{IMG_URL}}index/poster/avtor.png?v={{img_version}}" />
<view class="location">嘀加智慧</view>
<image class="check" src="{{IMG_URL}}index/poster/check.png?v={{img_version}}" />
<view class="num">12345</view>
</view>
</view> -->
\ No newline at end of file
{
"component": true,
"usingComponents": {
"product": "../product/product"
}
}
\ No newline at end of file
/* pages/tab/index/components/indexProduct/indexProduct.wxss */
.content-scroll{
height: 100vh;
// height: calc(100% - 80rpx);
}
.content-product {
.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 {
position: relative;
// padding-top: 10px;
width: 172rpx;
height: 180rpx;
background: #f7f8fc;
border-radius: 8rpx;
box-sizing: border-box;
// border: 1px solid #f7f8fc;
}
.open-img {
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
box-sizing: border-box;
}
.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.4);
&::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;
}
// .open-img{
// display: none;
// }
.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;
}
}
}
<!--pages/tab/index/components/indexProduct/indexProduct.wxml-->
<!-- class="content-scroll" -->
<!-- style="height: calc(100vh - {{headerHeight/2}}px)" -->
<!-- <scroll-view
scroll-y="true"
refresher-enabled="{{true}}"
refresher-triggered="{{refresherFlag}}"
bindrefresherrefresh="refresherrefreshFn"> -->
<view
class="content-product"
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="open-img" wx:if="{{item.sceneStatus == 1}}" src="{{IMG_URL}}/output/openedIcon.png" /> -->
<image webp class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
<view class="msg">{{item.msg}}</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!-- stickyTop="{{headerHeight}}" -->
<product
img_version="{{img_version}}"
isShow="{{false}}"
stickyTop="{{headerHeight}}"
actNum="{{actNum}}"
senceData="{{senceData}}"
origin="home"
bindsharehandle="sharehandle" />
</view>
<!-- </scroll-view> -->
\ No newline at end of file
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
{
"usingComponents": {
"vas-toast": "./components/likeToast/likeToast",
"indexProduct": "./components/indexProduct/indexProduct",
"indexClue": "./components/indexClue/indexClue",
"FullscreenVideo": "../../../components/FullscreenVideo/FullscreenVideo"
},
"navigationStyle": "custom",
"onReachBottomDistance": 50
}
page {
height: 100vh;
width: 100vw;
background-color: #F2F3F7 !important;
}
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
}
.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;
// }
}
.guide {
width: 100%;
height: 100%;
.guide-img {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999;
}
}
.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;
}
}
\ No newline at end of file
<wxs src="./index.wxs" module="filterUtils" />
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">拓客户</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 webp class="img" src="{{IMG_URL}}index/apply.png" />
<view class="apply">申请业务</view>
</view>
</view>
</view>
<!-- 托客户内容 -->
<indexProduct
wx:if="{{tabIndx == 1 }}"
bindselectCar="selectCar"
senceData="{{senceData}}"
actNum="{{actNum}}"
img_version="{{img_version}}"
headerHeight="{{headerHeight}}"
bindrefresherrefresh="refresherrefresh" />
<!-- 看线索内容 -->
<indexClue
id="indexclue"
wx:if="{{tabIndx == 0 }}"
headerHeight="{{headerHeight}}"
disLikeRecordFlag="{{disLikeRecordFlag}}"
bindshowToggleToast="showToggleToast" />
</view>
<!-- 收藏、取消提示框 -->
<vas-toast 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?v={{img_version}}" />
</view>
<!-- 在线客服 -->
<image
webp
class="chat"
src="{{IMG_URL}}index/contact.png"
bindtap="goConsult" />
<!-- 预估产值 -->
<image
webp
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"
cursor-spacing="10"
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"
cursor-spacing="10"
value="{{formData.flow}}" />
<!-- <view class="form-unit">人</view> -->
</view>
<button class="dialog-btn" form-type="submit">提交测算</button>
</view>
</view>
</form>
</view>
</view>
<!-- -->
<crowdfund-poster wx:show="{{!guideShow}}" item="{{posterItem}}" />
<!-- 全屏视频组件 -->
<FullscreenVideo id="videocomp" src="{{videoSrc}}" title="{{videoTitle}}" />
/**
*
* @param type 线索类型
* @returns
*/
var filterType = function(type){
var res;
type = +type;
switch (type) {
case 0:
res = '访问页面1'
break;
case 1:
res = '访问页面2'
break;
case 2:
res = '访问页面3'
break;
}
return res;
};
module.exports = {
filterType:filterType
}
// pages/tab/output/components/sceneBox/sceneBox.js
import { IMG_URL } from '~/utils/constantData'
Component({
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
sceneActive: {
type: Number,
value: -1
},
hasOpenIcon: {
type: Boolean,
value: true
},
formData: {
type: Object,
value: () => {}
},
scenePriceList: {
type: Array,
value: () => []
}
},
/**
* 组件的初始数据
*/
data: {
IMGURL: IMG_URL,
openedIcon: `${IMG_URL}/output/openedIcon.png`,
custSceneList: [
{
title: '精品升级',
// subTitle: '1.0新车权益升级'
},
{
title: '次新车转化',
// subTitle: '1.1新车精品升级'
},
{
title: '售后众筹',
// subTitle: '1.2次新车膨胀金活动'
},
{
title: '会员权益/升级',
// subTitle: '1.3售后直播众筹活动'
}
]
},
/**
* 组件的方法列表
*/
methods: {
handleClick(e) {
let { idx } = e.currentTarget.dataset
this.triggerEvent('handleSceneChange', { sceneIdx: idx })
}
}
})
<!-- pages/tab/output/components/sceneBox/sceneBox.wxml -->
<wxs src="../../index.wxs" module="filter" />
<view class="flex scene">
<view class="scene-item {{ formData['scene' + (index + 1)] ? 'open' : ''}} {{ (sceneActive != -1 && sceneActive == index + 1) ? 'active' : ''}}" wx:for="{{custSceneList}}" wx:key="index" bindtap="handleClick" data-idx="{{index + 1}}">
<view wx:if="{{formData['showList'][index]}}" class="open-icon">
<image src="{{openedIcon}}" webp></image>
</view>
<image wx:if="{{formData['showList'][index]}}" class="scene-img" src="{{IMGURL}}output/caracticon0{{index + 1}}.png?v={{img_version}}" />
<image wx:else class="lock-img " src="{{IMGURL}}output/carlock0{{index + 1}}.png?v={{img_version}}" />
<view class="title-box">
<view class="scene-title {{formData['showList'][index]?'':'notOpened'}}">{{item.title}}</view>
</view>
<view class="scene-label">{{item.subTitle}}</view>
<!-- wx:if="{{scenePriceList.length}}" -->
<view class="total-price">¥ {{filter.money_three_for_two_thousands(formData['showList'][index].totalMoney||0)}}</view>
</view>
</view>
\ No newline at end of file
/* pages/tab/output/components/sceneBox/sceneBox.wxss */
.flex {
display: flex;
}
.scene {
text-align: center;
width: 100%;
}
.scene-item {
box-sizing: border-box;
height: 248rpx;
position: relative;
width: 25%;
/* flex: 1; */
background: #F7F8FC;
margin-right: 4rpx;
font-size: 18rpx;
/* color: #8A8C90; */
color: #323436;
padding: 24rpx 0 18rpx;
border-radius: 12rpx;
margin-bottom: 20rpx;
font-weight: 500;
border: 2rpx solid transparent;
}
.scene-item:last-child {
margin-right: 0;
}
.title-box {
height: 68rpx;
display: flex;
justify-content: center;
align-items: center;
margin: 10rpx 0 4rpx;
}
.scene-title {
width: 100rpx;
font-weight: 600;
font-size: 24rpx;
text-align: center;
color: #323436;
}
.scene-item:nth-child(2) .scene-title {
width: 120rpx;
}
/* 已开通 - start */
.open.scene-item {
background: #F0F7FF;
}
.open-icon {
box-sizing: border-box;
position: absolute;
position: absolute;
top: 0;
right: 0;
width: 78rpx;
height: 78rpx;
}
.open-icon image {
height: 100%;
}
/* 已开通 - end */
/* 选中 - start */
.active.scene-item {
background-image: linear-gradient(145deg, #F0F7FF 0%, #FFFFFF 73%);
border: 2rpx solid #3666FE;
/* box-shadow: 0 4rpx 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 20rpx 0 rgba(180, 186, 204, 0.40); */
filter: drop-shadow(0 12rpx 12rpx rgba(180, 186, 204, 0.40));
/* background: url('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/output/carselect.png') no-repeat;
background-size: 100% 100%; */
}
.active::after {
position: absolute;
left: 50%;
bottom: -12px;
display: block;
content: "";
width: 12px;
height: 12px;
border-bottom: 1px solid var(--btnColor);
border-right: 1px solid var(--btnColor);
transform: rotate(45deg) translateX(-50%);
background-color: #fff;
}
/* 选中 - end */
.scene-img {
width: 92rpx;
height: 64rpx;
}
/* .notOpened {
color: #8A8C90;
} */
.scene-label {
font-size: 16rpx;
}
.total-price {
height: 40rpx;
line-height: 40rpx;
margin-top: 36rpx;
font-size: 22rpx;
color: #3666FE;
/* font-weight: 600; */
font-family: "number";
}
.lock-img {
width: 92rpx;
height: 64rpx;
}
\ No newline at end of file
// pages/tab/output/components/StaffSort/StaffSort.js
import { scenceList } from '~/pages/tab/index/constant/data'
const busiOptSceneCode = ['-1', 'SC001', 'SC002']
import mineApi from '~/api/mineApi/index'
import { getNowMonth } from '~/utils/format'
import { IMG_URL } from '~/utils/constantData'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
busiOptSceneCode,
formData: {
// 0:全部-1;2:精品升级SC002;1:会员权益/升级SC001
busiIdx: 0,
sceneCode: '-1',
yqMerchantName: '服务中心',
timeIdx: 0
},
// 服务中心
popupShow: false,
serviceList: [],
// 筛选项折叠
isFold: false,
isInputClear: false,
baseData: {
busiList: [],
timeList: [{
label: '今日指标',
name: 'todayTime'
}, {
label: '本月指标',
name: 'monthTime'
}, {
label: '累计指标',
name: 'defaultTime'
}]
}
},
lifetimes: {
created() {
this.initTime()
},
attached() {
this.dealBusiList()
this.getSeviceCenter()
}
},
/**
* 组件的方法列表
*/
methods: {
dealSearchTime() {
let { dataObj, formData, baseData: { timeList } } = this.data
var params = dataObj[timeList[formData.timeIdx || 0]?.name || 'todayTime']
return params
},
dealParams() {
let { formData } = this.data
let params = {
sceneType: formData.busiIdx || '',
yqMerchantIds: formData.yqMerchantId || '',
userName: formData.userName || '',
...this.dealSearchTime()
}
return params
},
// handleInputeClear(e) {
// this.setData({
// isInputClear: true,
// ['formData.userName']: ''
// })
// console.log(this.data.isInputClear, 'isInputClear---')
// },
handleInput(e) {
let { attr } = e.currentTarget.dataset
let { value } = e.detail
this.setData({
['formData.' + attr]: value
})
},
changeFold() {
// let { isInputClear } = this.data
// if (isInputClear) {
// this.setData({
// isInputClear: false
// })
// return true
// }
this.setData({
isFold: !this.data.isFold
})
},
handleInputFocus() {
this.changeFold()
},
handleInputBlur() {
this.changeFold()
this.triggerEvent('staffSearch')
},
// 获取服务中心数据
getSeviceCenter() {
mineApi.getServiceCenterListAPI({}).then(res => {
let data = res || []
let serviceIds = data.map(val => { return val.yqMerchantId })
this.setData({
serviceList: res || [],
allServiceIds: serviceIds
})
})
},
// 筛选服务中心
filterTypeFn() {
this.setData({
popupShow: !this.data.popupShow
})
},
// 获取员工列表
handleServiceChange(e) {
wx.$api.hideLoading()
let { formData } = this.data
this.setData({
formData: {
...formData,
yqMerchantId: e.detail.yqMerchantId,
yqMerchantName: e.detail.yqMerchantName
}
})
this.triggerEvent('staffSearch')
},
// 格式化时间
initTime() {
let date = new Date()
let today = date.getDate()
let month = getNowMonth()
const todayTime = {
dataBeginDate: `${month}-${today} 00:00:00`,
dataEndDate: `${month}-${today} 23:59:59`
}
const monthTime = {
dataBeginDate: `${month}-01 00:00:00`,
dataEndDate: `${month}-${today} 23:59:59`
}
const defaultTime = {
dataBeginDate: '',
dataEndDate: `${month}-${today} 23:59:59`
}
this.setData({
dataObj: {
todayTime,
monthTime,
defaultTime
}
})
},
handleTimeChange() {
let { baseData: { timeList } } = this.data
wx.showActionSheet({
itemList: timeList.map(item => item.label),
success: res => {
this.setData({
['formData.timeIdx']: res.tapIndex
})
this.triggerEvent('staffSearch')
}
})
},
dealBusiList() {
let list = [{
name: '全部业务',
sceneCode: '-1'
}]
busiOptSceneCode.forEach(item => {
let _target = scenceList.find(k => k.sceneCode == item)
if (_target) {
list.push({
name: _target.name,
sceneCode: _target.sceneCode
})
}
})
this.setData({
['baseData.busiList']: list
})
},
handleClickTab(e) {
let { baseData: { busiList } } = this.data
// 筛选
wx.showActionSheet({
itemList: busiList.map(item => item.name),
success: res => {
this.setData({
['formData.busiIdx']: res.tapIndex,
['formData.sceneCode']: busiOptSceneCode[res.tapIndex]
})
this.triggerEvent('staffSearch')
}
})
},
}
})
{
"component": true,
"usingComponents": {
"select-service-popup": "../selectServicePopup/selectServicePopup"
}
}
\ No newline at end of file
/* pages/tab/output/components/StaffSort/StaffSort.wxss */
.total-tab {
box-sizing: border-box;
background: #FFFFFF;
display: flex;
justify-content: space-between;
height: 92rpx;
padding: 16rpx;
.tabs-box {
display: flex;
width: calc(100% - 138rpx);
}
.tab {
box-sizing: border-box;
display: inline-block;
width: auto;
height: 60rpx;
background: #F2F3F7;
border-radius: 32rpx;
padding: 13rpx 18rpx;
font-size: 24rpx;
color: #8A8C90;
margin-right: 16rpx;
flex-shrink: 0;
}
.tab.active {
background: #3666fe1a;
color: #3666FE;
}
.tab:last-child {
margin-right: 0;
}
.icon {
width: 32rpx;
height: 32rpx;
}
.right-box {
display: flex;
box-sizing: border-box;
height: 60rpx;
color: #8A8C90;
}
.input {
position: relative;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
width: 136rpx;
height: 60rpx;
background: #F8F9FC;
border-radius: 38rpx;
padding: 0 20rpx;
margin-left: 10rpx;
transition: width 0.2s ease-out;
}
.input-flex {
display: flex;
align-items: center;
}
.icon-delete {
box-sizing: border-box;
width: 50rpx;
height: 60rpx;
text-align: center;
flex-shrink: 0;
.icon {
margin-top: 16rpx;
}
}
.long-input {
width: calc(100vw - 180rpx);
}
.input-placeholder {
font-size: 24rpx;
color: #858A94;
}
}
\ No newline at end of file
<!--pages/tab/output/components/StaffSort/StaffSort.wxml-->
<view class="total-tab">
<view wx:if="{{isFold}}" class="tab {{(formData.busiIdx != '0' || formData.yqMerchantId || formData.timeIdx != '0') ? 'active' : ''}}">
{{(formData.busiIdx != '0' || formData.yqMerchantId || formData.timeIdx != '0') ? '已选' : '筛选'}}
<glsx-image src="{{(formData.busiIdx != '0' || formData.yqMerchantId || formData.timeIdx != '0') ? 'output/sort.png' : 'output/sort-default.png'}}" class="icon" />
</view>
<scroll-view wx:else scroll-x="{{true}}">
<view class="tabs-box">
<view class="tab {{formData.busiIdx != '0' ? 'active' : ''}}" bindtap="handleClickTab">
{{baseData.busiList[formData.busiIdx || 0].name}}
<glsx-image src="{{formData.busiIdx != '0' ? 'output/icon-arrow-act.png' : 'output/icon-arrow.png'}}" class="icon" />
</view>
<view class="tab {{formData.yqMerchantId ? 'active' : ''}}" data-attr="tabActive" data-val="store" bindtap="filterTypeFn">
{{ formData.yqMerchantName }}
<glsx-image src="{{formData.yqMerchantId ? 'output/icon-arrow-act.png' : 'output/icon-arrow.png'}}" class="icon" />
</view>
<view class="tab {{formData.timeIdx != '0' ? 'active' : ''}}" bindtap="handleTimeChange">
{{baseData.timeList[formData.timeIdx || 0].label}}
<glsx-image src="{{formData.timeIdx != '0' ? 'output/icon-arrow-act.png' : 'output/icon-arrow.png'}}" class="icon" />
</view>
</view>
</scroll-view>
<view class="right-box input {{ isFold ? 'long-input' : '' }}">
<!-- <view class="right-box input long-input"> -->
<view class="input-flex">
<glsx-image src="output/searchIcon.png" class="icon" />
<input type="text" placeholder="{{isFold ? '请输入员工姓名搜索' : '搜索'}}" maxlength="30" value="{{formData.userName}}" placeholder-class="input-placeholder" data-attr="userName" confirm-type="search" bindinput="handleInput" bindfocus="handleInputFocus" bindblur="handleInputBlur" />
</view>
<!-- <view wx:if="{{isFold}}" class="icon-delete" bindtap="handleInputeClear" data-attr="userName">
<glsx-image src="output/icon-delete.png" class="icon" />
</view> -->
</view>
</view>
<select-service-popup wx:if="{{popupShow}}" bind:hidePopup="filterTypeFn" bind:getStaffList="handleServiceChange" selectInfo="{{formData}}" popShow="{{popupShow}}" serviceRange="{{serviceList}}" />
\ No newline at end of file
// pages/tab/output/components/TotalTab/TotalTab.js
import { scenceList } from '~/pages/tab/index/constant/data'
const busiOptSceneCode = ['-1', 'SC002', 'SC004', 'SC001']
import outputApi from '~/api/outputApi/index'
import { getNowMonth } from '~/utils/format'
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
busiOptSceneCode,
tabActive: 'store',
// tabActive: 'business',
formData: {
// 0:全部-1;1:精品升级SC002;2:售后众筹SC004;3:会员权益/升级SC001
busiIdx: 0,
sceneCode: '-1',
// 时间筛选Idx(全部,精品升级,会员权益)
timeIdx: 0,
// 产品/状态筛选Idx(售后众筹)
proIdx: 0,
statusIdx: 0
},
// 众筹-筛选
isCrowdPopupShow: false,
crowdFormData: {
proIdx: 0,
statusIdx: 0
},
baseData: {
busiList: [],
proList: [],
timeList: ['全部', '本月', '本日'],
actStatusList: ['全部', '申请中', '活动中', '已结束']
}
},
lifetimes: {
attached() {
this.initTime()
this.dealBusiList()
this.getProList('SC004')
}
},
/**
* 组件的方法列表
*/
methods: {
resetBusiSearch() {
this.setData({
['formData.timeIdx']: 0,
['formData.proIdx']: 0,
['formData.statusIdx']: 0
})
},
getProList(sceneCode) {
var params = {
sceneCode: sceneCode
}
outputApi.findProByScene(params).then(res => {
let list = res[0]?.productList || []
list.unshift({
productCode: '',
productName: '全部'
})
this.setData({
['baseData.proList']: list
})
})
},
dealBusiList() {
let list = [{
name: '全部',
sceneCode: '-1'
}]
busiOptSceneCode.forEach(item => {
let _target = scenceList.find(k => k.sceneCode == item)
if (_target) {
list.push({
name: _target.name,
sceneCode: _target.sceneCode
})
}
})
this.setData({
['baseData.busiList']: list
})
},
handleSet(e) {
let { attr, val } = e.currentTarget.dataset
this.setData({
[attr]: val
})
this.triggerEvent('tabChange', { tabActive: val })
},
handleClickTab(e) {
let { tabActive, baseData: { busiList } } = this.data
// 切换tab
if (tabActive != 'business') {
this.handleSet(e)
// this.handleSearch()
return true
}
// 筛选
wx.showActionSheet({
itemList: busiList.map(item => item.name),
success: res => {
this.resetBusiSearch()
this.setData({
['formData.busiIdx']: res.tapIndex,
['formData.sceneCode']: busiOptSceneCode[res.tapIndex]
})
this.handleBusiSearch()
}
})
},
handleTimeChange() {
let { baseData: { timeList } } = this.data
wx.showActionSheet({
itemList: timeList,
success: res => {
this.setData({
['formData.timeIdx']: res.tapIndex
})
this.handleBusiSearch()
}
})
},
// 众筹-筛选
handlePopupConChange(e) {
let { idx, attr } = e.currentTarget.dataset
this.setData({
[`crowdFormData.${attr}`]: idx
})
},
handleCrowdPopup() {
let { formData: { proIdx, statusIdx } } = this.data
this.setData({
['crowdFormData.proIdx']: proIdx,
['crowdFormData.statusIdx']: statusIdx,
isCrowdPopupShow: !this.data.isCrowdPopupShow
})
},
handleCrowdConfirm() {
let { crowdFormData: { proIdx, statusIdx } } = this.data
this.setData({
['formData.proIdx']: proIdx,
['formData.statusIdx']: statusIdx,
isCrowdPopupShow: !this.data.isCrowdPopupShow
})
this.handleBusiSearch()
},
// 格式化时间
initTime() {
let date = new Date()
let today = date.getDate()
let month = getNowMonth()
const todayTime = {
startTime: `${month}-${today} 00:00:00`,
endTime: `${month}-${today} 23:59:59`
}
const monthTime = {
startTime: `${month}-01 00:00:00`,
endTime: `${month}-${today} 23:59:59`
}
const defaultTime = {
startTime: '',
endTime: `${month}-${today} 23:59:59`
}
this.setData({
dataObj: {
todayTime,
monthTime,
defaultTime
}
})
},
dealSearchTime() {
let { dataObj, formData } = this.data
var params = {}
switch (formData.timeIdx) {
// 本月
case 1:
params = dataObj.monthTime
break
// 本日
case 2:
params = dataObj.todayTime
break
}
return params
},
dealSearchStatus() {
let { formData } = this.data
var activityStatuList = []
switch (formData.statusIdx) {
case 0:
activityStatuList = [1, 2, 3]
break
// 申请中
case 1:
activityStatuList = [1]
break
// 活动中
case 2:
activityStatuList = [2]
break
// 已结束
case 3:
activityStatuList = [3]
break
}
return activityStatuList
},
dealSearchCrowd() {
let params = []
let { formData, baseData: { proList } } = this.data
let attrToNum = {
'PC005': 1,
'PC006': 2,
'PC007': 3,
'PC008': 4,
'PC009': 5
}
if (formData.busiIdx == 2 && formData?.proIdx) {
params.categoryList = [attrToNum[proList[formData?.proIdx].productCode] || '-1']
params.activityStatusList = this.dealSearchStatus()
}
return params
},
dealParams() {
let { formData } = this.data
let params = {
type: formData.busiIdx || '',
...this.dealSearchTime(),
...this.dealSearchCrowd()
}
return params
},
handleBusiSearch() {
this.triggerEvent('busiSearch')
}
}
})
/* pages/tab/output/components/TotalTab/TotalTab.wxss */
.total-tab {
box-sizing: border-box;
background: #FFFFFF;
display: flex;
justify-content: space-between;
height: 92rpx;
padding: 16rpx;
.flex {
display: flex;
flex-shrink: 0;
}
.tab {
box-sizing: border-box;
height: 60rpx;
background: #F2F3F7;
border-radius: 32rpx;
padding: 13rpx 18rpx;
font-size: 24rpx;
color: #8A8C90;
}
.tab.active {
background: #3666fe1a;
color: #3666FE;
}
.tab:first-child {
margin-right: 16rpx;
}
.icon {
width: 32rpx;
height: 32rpx;
}
.right-box {
display: flex;
box-sizing: border-box;
height: 60rpx;
color: #8A8C90;
padding: 13rpx 0;
}
}
.popup-fix {
bottom: 110rpx !important;
}
.popup {
padding: 32rpx;
.title {
font-weight: 600;
font-size: 28rpx;
color: #000000;
margin-bottom: 16rpx;
}
.content {
display: flex;
flex-wrap: wrap;
}
.popup-tab {
box-sizing: border-box;
height: 60rpx;
background: #F5F3F3;
color: #8A8C90;
border-radius: 32rpx;
padding: 12rpx 20rpx;
margin: 0 16rpx 16rpx 0;
}
.popup-tab.active {
background: #3666fe1a;
color: #3666FE;
}
}
\ No newline at end of file
<!--pages/tab/output/components/TotalTab/TotalTab.wxml-->
<view class="total-tab">
<view class="flex">
<view class="tab {{tabActive =='store' ? 'active' : ''}}" data-attr="tabActive" data-val="store" bindtap="handleSet">门店经营汇总</view>
<view class="tab {{tabActive =='business' ? 'active' : ''}}" data-attr="tabActive" data-val="business" bindtap="handleClickTab">
业务经营汇总 | {{baseData.busiList[formData.busiIdx || 0].name}}
<glsx-image src="{{tabActive =='business' ? 'output/icon-arrow-act.png' : 'output/icon-arrow.png'}}" class="icon" />
</view>
</view>
<view class="right-box" wx:if="{{tabActive =='business'}}">
<view wx:if="{{busiOptSceneCode[formData.busiIdx] == 'SC004'}}" bindtap="handleCrowdPopup">{{baseData.proList[formData.proIdx].productName}}</view>
<view wx:else bindtap="handleTimeChange">{{baseData.timeList[formData.timeIdx]}}</view>
<glsx-image src="output/icon-arrow.png" class="icon" bindtap="{{busiOptSceneCode[formData.busiIdx] == 'SC004' ? 'handleCrowdPopup' : 'handleTimeChange'}}"/>
</view>
</view>
<!-- 众筹-筛选 -->
<popup show="{{isCrowdPopupShow}}" title="筛选" height="784rpx" bindconfirm="handleCrowdConfirm" bindhidePopup="handleCrowdPopup" custom-class="popup-fix">
<view class="popup">
<view class="title">产品筛选</view>
<view class="content">
<view class="popup-tab {{crowdFormData.proIdx == index ? 'active' : ''}}" wx:for="{{baseData.proList}}" wx:key="index" bindtap="handlePopupConChange" data-attr="proIdx" data-idx="{{index}}">{{item.productName}}</view>
</view>
<view class="title">活动状态</view>
<view class="content">
<view class="popup-tab {{crowdFormData.statusIdx == index ? 'active' : ''}}" wx:for="{{baseData.actStatusList}}" wx:key="index" bindtap="handlePopupConChange" data-attr="statusIdx" data-idx="{{index}}">{{item}}</view>
</view>
</view>
</popup>
\ No newline at end of file
// pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.js
import { IMG_URL } from '~/utils/constantData.js'
import USERAPI from '~/api/usersApi/index'
import { setUserInfo } from '~/utils/cache/storageApi'
Component({
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
popShow: {
type: Boolean,
value: false
},
merchantRange: Object
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
merchantList: []
},
observers: {
merchantRange: function (e) {
// console.log(e)
this.setData({
merchantList: e
})
}
},
/**
* 组件的方法列表
*/
methods: {
hidePopup() {
console.log(222)
this.triggerEvent('hidePopup')
},
confirm() {
console.log(111)
let { merchantRange, subIndex } = this.data
let actObj = merchantRange.find((item, index) => {
if (item.act) {
subIndex = index
}
return item.act
})
// console.log(actObj)
// this.setData({
// subIndex
// })
if (!actObj) {
return wx.$api.showToast({
title: '请选择服务商',
icon: 'error'
})
} else {
this.changePicker(actObj)
}
},
changePicker(actObj) {
// 修改对应下标显示
console.log('changePicker')
// let { value } = e.detail
// app.globalData.yqdInfo.subIndex = value
// let { merchantId } = this.data.merchantRange[value]
// let obj = {}
// if (merchantId) obj.merchantId = actObj
let { merchantId } = actObj
wx.$api.showLoading('加载中...')
USERAPI.switchSubLoginInfo({ merchantId }).then(res => {
console.log(res)
setUserInfo(res)
this.hidePopup()
this.triggerEvent('changeAccount', 'refresh')
// }
wx.$api.hideLoading()
})
// this.tapPicker()
},
select(e) {
// console.log(e)
let { index } = e.currentTarget.dataset
console.log(index)
let { merchantRange } = this.data
merchantRange.forEach((item, ind) => {
if (index == ind) {
item.act = true
} else {
item.act = false
}
this.setData({
merchantRange
})
})
},
input(e) {
console.log(e)
let { merchantRange } = this.data
let { value } = e.detail
merchantRange.forEach(item => {
item.act = false
item.show = item.merchantName.includes(value)
// = show
})
this.setData({
merchantRange
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.wxss */
.search-box {
width: 100%;
height: 104rpx;
padding-left: 32rpx;
// margin-top: 20rpx;
display: flex;
align-items: center;
background-color: #fff;
position: sticky;
top: 0;
left: 0;
z-index: 9;
box-sizing: border-box;
}
.search-box .search-input {
background: #F7F8FA;
border-radius: 38rpx;
width: 606rpx;
height: 72rpx;
display: flex;
align-items: center;
}
.search-box .search-input .search-icon {
width: 28rpx;
height: 28rpx;
margin: 0 10rpx 0 26rpx;
}
.search-box .search-input .search-clear {
width: 36rpx;
height: 36rpx;
margin: 0 26rpx 0 10rpx;
}
.search-box .search-input .input {
font-size: 28rpx;
width: calc(100% - 136rpx);
}
.input-placeholder {
color: rgba(200, 201, 204, .89);
}
.search-box .search {
width: 144rpx;
height: 100%;
color: #666;
box-sizing: border-box;
padding: 0 24rpx;
}
.list {
height: calc(100% - 100rpx) !important;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
font-size: 32rpx;
color: #858A94;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.itemCon {
box-sizing: border-box;
width: 100%;
// background-color: #fff;
height: 80rpx;
color: #323436;
line-height: 80rpx;
padding: 0 32rpx;
}
.active {
// color: aqua;
background: #F0F7FF;
font-size: 28rpx;
color: #3666FE;
}
\ No newline at end of file
<!-- pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.wxml -->
<popup
show="{{popShow}}"
bind:hidePopup="hidePopup"
bindconfirm="confirm"
height="60%">
<!-- <search-input placeholder="请搜索服务商账号名" ></search-input> -->
<view class="search-box">
<view class="search-input">
<image src="{{IMG_URL}}/output/searchIcon.png" class="search-icon" />
<input
type="text"
placeholder="请搜索服务商账号名"
class="input"
value="{{keyword}}"
placeholder-class="input-placeholder"
bindinput="input"
bindconfirm="search" />
<block wx:if="{{keyword}}">
<image src="/images/clear.png" class="search-clear" bindtap="clear" />
</block>
</view>
<view class="search text-center" bindtap="showConfirm">
<view class="text-center">搜索</view>
</view>
</view>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList"
refresher-threshold="104"
scroll-top="{{scrollTop}}"
class="list"
style="height:100%;"
data-type="message"
refresher-triggered="{{triggered}}">
<block wx:for="{{merchantList}}" wx:key="index">
<view
class="itemCon text-hide {{item.act?'active':''}}"
hidden="{{!item.show}}"
data-index="{{index}}"
bindtap="select">
{{item.merchantName}}
</view>
</block>
</scroll-view>
</popup>
{
"component": true,
"usingComponents": {
"scene-box": "../../../../../components/SceneBox/SceneBox",
"total-tab": "../TotalTab/TotalTab",
"busi-card": "../BusiCard/BusiCard",
"output-crowdfund": "../outputCrowdfund/outputCrowdfund",
"sort-tab": "../sortTab/sortTab"
}
}
\ No newline at end of file
......@@ -6,6 +6,8 @@
}
.client-box {
height: 100%;
.input-box {
width: 686rpx;
height: 64rpx;
......@@ -25,10 +27,12 @@
line-height: 64rpx;
}
}
.store-box {
height: 100%;
background: #ffffff;
border-top-left-radius: 32rpx;
border-top-right-radius: 32rpx;
border-top-right-radius: 32rpx;
}
}
......@@ -63,6 +67,7 @@
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
.price-txt {
// font-family: 'test';
font-size: 40rpx;
......
......@@ -28,5 +28,4 @@
</view>
</scroll-view>
</view>
</view>
<crowdfund-poster item="{{posterItem}}" id="poster" scrollImg="{{false}}" bindlongtouch="longtouch" />
\ No newline at end of file
</view>
\ No newline at end of file
{
"component": true,
"usingComponents": {
"scene-box": "../SceneBox/SceneBox",
"nothingTipsCon": "../nothingTipsCon/nothingTipsCon"
}
}
/* pages/tab/output/components/merchant/mrechant.wxss */
.con {
box-sizing: border-box;
padding: 16rpx 16rpx 0;
background-color: #F2F3F7;
.statistics {
box-sizing: border-box;
display: flex;
// width: 360rpx;
width: 100%;
height: 140rpx;
padding: 32rpx;
background-color: #fff;
border-radius: 8rpx;
.statisticsbox {
flex: 1;
.num {
color: #323436;
// font-family: MiSans-S0rpxibold;
// font-weight: 600;
// font-weight: bold;
font-size: 30rpx;
margin-bottom: 10rpx;
font-family: "number";
}
.label {
font-size: 24rpx;
color: #8A8C90;
}
}
}
}
/* pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxss */
.merchantDataStatistics-con {
margin-top: 16rpx;
border-radius: 8rpx;
background: #FFFFFF;
.contitle {
box-sizing: border-box;
height: 75rpx;
// border-bottom: 1;
padding: 16rpx 24rpx;
border-bottom: 2rpx dashed #CCCED1;
display: flex;
justify-content: space-between;
.name {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 32rpx;
color: #323436;
}
.select {
display: flex;
align-items: center;
font-family: PingFangSC-Regular;
font-size: 24rpx;
color: #323436;
.arrow {
width: 24rpx;
height: 24rpx;
margin-left: 10rpx;
transition: all .3 ease;
}
.isAct {
transform: rotate(180deg);
}
}
}
.scene-box {
box-sizing: border-box;
// padding: 20rpx 10rpx;
margin: 20rpx 10rpx 0;
}
}
.outputValueCon {
.title {
box-sizing: border-box;
font-weight: 600;
font-size: 32rpx;
color: #323436;
border-bottom: 2rpx dashed #CCCED1;
padding: 24rpx;
}
.fluuelCon {
box-sizing: border-box;
// padding-top: 50rpx;
width: 670rpx;
height: 550rpx;
position: relative;
display: flex;
flex-direction: column;
}
.bg-image {
// width: 100%;
width: 440rpx;
height: 100%;
position: absolute;
left: 50%;
transform: translateX(-50%);
// width: 670rpx;
// height: 550rpx;
// z-index: -0;
// object-fit: cover;
}
.longHeight {
height: 284rpx;
}
.shortHeight {
height: 200rpx;
}
.funneItem {
box-sizing: border-box;
position: relative;
display: flex;
align-items: center;
margin-top: 36rpx;
z-index: 999;
width: 100%;
height: 40rpx;
font-size: 24rpx;
color: #323436;
padding-left: 20rpx;
.label {
background: #F0F7FF;
border-radius: 4rpx;
width: 112rpx;
height: 40rpx;
text-align: center;
line-height: 40rpx;
}
.num {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
// font-family: Helvetica-Bold;
// font-weight: Bold;
font-size: 28rpx;
color: #3666FE;
// width: 100%;
// margin: 0 auto;
}
}
.diagnosisCon {
box-sizing: border-box;
width: 100%;
padding: 20rpx;
// border: 2rpx dashed #CCCED1;
border-radius: 8rpx;
display: flex;
// width: 670rpx;
// height: 104rpx;
background: #F7F8FC;
border-radius: 8rpx;
.tipsIcon {
box-sizing: border-box;
width: 56rpx;
// height: 64rpx;
padding: 8rpx;
background: rgba(62, 113, 254, 0.12);
border-radius: 4rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 20rpx;
color: #3E71FE;
}
.tips {
height: 60rpx !important;
width: 560rpx;
margin-left: 16rpx;
font-size: 20rpx;
color: #5A6066;
line-height: 32rpx;
}
}
}
.statisticsCon {
width: 100%;
}
.swiper-item {
padding: 32rpx 20rpx 24rpx;
display: flex;
flex-direction: column;
align-items: center;
.merchantCount {
position: relative;
box-sizing: border-box;
display: flex;
margin-top: 32rpx;
// width: 670rpx;
width: 100%;
height: 126rpx;
padding: 22rpx;
background: #FFFFFF;
box-shadow: 0 0 8rpx 0 rgba(180, 186, 204, 0.32), 0 8rpx 32rpx 0 rgba(180, 186, 204, 0.40);
border-radius: 8rpx;
z-index: 2;
.turnover,
.customerUnitPrice {
box-sizing: border-box;
position: relative;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
align-content: space-between;
width: 50%;
height: 100%;
text-align-last: left;
.img {
width: 32rpx;
height: 32rpx;
margin-right: 5rpx;
}
.num {
// font-family: MiSans-S0rpxibold;
// font-weight: 600;
font-family: 'number';
font-size: 32rpx;
color: #323436;
// margin-bottom: 14rpx;
// text-align: right;
// text-align: center;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
}
.label {
font-weight: 400;
font-size: 24rpx;
color: #323436;
height: 34rpx;
}
}
.customerUnitPrice {
// margin-left: 6rpx;
border-left: 1rpx solid #D8D8D8;
}
}
.crowdFundingTotal {
width: 50%;
margin: 32rpx auto 0;
.turnover {
width: 100%;
}
}
}
.full {
height: 1450rpx !important;
}
.short {
height: 1150rpx !important;
}
.funneItem:nth-of-type(1) {
box-sizing: border-box;
// padding-top: 30rpx;
margin-top: 64rpx;
}
.navOhterApp {
display: flex;
align-items: center;
justify-content: flex-end;
box-sizing: border-box;
font-size: 24rpx;
color: #5C7097;
margin-top: 28rpx;
width: 100%;
// margin-left: auto;
// text-align: right;
// margin: 50rpx 20rpx 0;
// margin-bottom: 100rpx;
.linkImg {
width: 20rpx;
height: 20rpx;
margin-left: 20rpx;
margin-right: 10rpx;
}
}
.list-wrap {
// padding-top: 170rpx;
padding-top: 0;
}
.emptyCon {
width: 100%;
height: 500rpx;
display: flex;
align-items: center;
justify-content: center;
.img {
width: 500rpx;
height: 500rpx;
}
}
\ 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!