Commit 92a02e1a by 李伟康

Merge branch 'develop' of http://192.168.3.233:8090/saas_plus/business-assistant into develop

2 parents 290d5b90 3ee78bd8
...@@ -29,6 +29,7 @@ import './utils/share' ...@@ -29,6 +29,7 @@ import './utils/share'
App({ App({
onLaunch(options) { onLaunch(options) {
/**挂载到wx对象 */ /**挂载到wx对象 */
/**挂载到wx对象 */
wx.$authStatus = false wx.$authStatus = false
wx.$util = util wx.$util = util
wx.$api = wxApi wx.$api = wxApi
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
}, },
"subpackages": [], "subpackages": [],
"usingComponents": { "usingComponents": {
"tab": "/components/Tab/Tab" "tab": "/components/Tab/Tab",
"navigation-bar":"/components/NavigationBar/NavigationBar"
}, },
"style": "v2", "style": "v2",
"resolveAlias": { "resolveAlias": {
......
...@@ -7,6 +7,7 @@ Component({ ...@@ -7,6 +7,7 @@ Component({
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
outClassName:String,
tab: Array, tab: Array,
openScroll: Boolean, openScroll: Boolean,
index: { index: {
......
<block wx:if="{{openScroll}}"> <block wx:if="{{openScroll}}">
<scroll-view <scroll-view
class="tab-box {{align}}" class="tab-box {{align}} {{outClassName}}"
scroll-x scroll-x
enable-flex enable-flex
scroll-with-animation scroll-with-animation
......
...@@ -71,3 +71,18 @@ ...@@ -71,3 +71,18 @@
height: 0; height: 0;
color: transparent; color: transparent;
} }
/* 外部出进来的自定义样式 */
.project-tab{
padding-left: 20px;
padding-right: 20px;
}
.project-tab .tab {
margin-right: 28px;
}
.project-tab .tab.active .text {
font-size: 28rpx;
color: var(--btnColor);
}
.project-tab .tab .line{
width:auto;
}
// pages/tab/discovery/components/product/product.js
// import {imgUrlMixin} from '~/mixins/index'
Component({
// behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
navList:['360全景导航','AR实景导航','座椅通风','氛围灯','数字化美容'],
activeNavIdx: 0,
tab:['适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程','适用场景','营销链路','项目亮点','适用场景','转化漏斗','合作流程'],
heightArr:[],
curTabIdx:0,
intoViewId: 'to-0',
IMGURL:'../../../../../images/index/'
},
lifetimes:{
ready: function (){
// console.log(11111)
this.getImgHeight()
},
},
/**
* 组件的方法列表
*/
methods: {
changeTab(e){
let idx = e.detail
this.setData({
intoViewId: `to-${idx}`
})
},
changeNav(event){
console.log(event,event.target.dataset.index,111)
this.setData({
activeNavIdx: event.target.dataset.index
})
},
scrolltoupper(event){
const idx = this.data.heightArr.findIndex(item => item>event.detail.scrollTop)
this.setData({
curTabIdx: idx
})
// console.log(this.data.curTabIdx1)
},
getImgHeight(){
let query = wx.createSelectorQuery().in(this)
let heightArr = []
let s = 0
query.selectAll('.img-item').boundingClientRect((react) => {
react.forEach(item => {
s += item.height
heightArr.push(s)
})
this.data.heightArr = heightArr
// console.log( this.data.heightArr)
}).exec()
}
}
})
{
"component": true,
"usingComponents": {
"tab": "../../../../../components/Tab/Tab"
}
}
\ No newline at end of file \ No newline at end of file
// 特色产品
.prod-wrap .big-title{
margin-left: 40rpx;
font-family: PingFangSC-S0pxibold;
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
line-height: 56rpx;
}
.prod-wrap .nav-wrap{
white-space: nowrap;
box-sizing: border-box;
margin-top: 24rpx;
margin-bottom: 32rpx;
padding: 0 20rpx;
}
.prod-wrap .nav-wrap .nav{
display: inline-block;
width: 188rpx;
height: 64rpx;
border-radius: 12rpx;
font-weight: 600;
font-size: 24rpx;
letter-spacing: 0;
text-align: center;
font-family: PingFangSC-Regular;
line-height: 64rpx;
margin-right: 12rpx;
background: #FFFFFF;
border: 2rpx solid #DDE3F0;
}
.prod-wrap .nav-wrap .active-nav{
background-image: linear-gradient(0deg, #EBEFFF 8%, #FCFDFF 85%);
border: 2rpx solid rgba(68,97,240,0.50);
box-shadow: 0 8rpx 16rpx 0 rgba(175,187,219,0.35);
}
.prod-wrap .nav-wrap .nav:last-child{
margin-right: 0;
}
.prod-item{
background-color: #F5F7FB;
border-radius: 48rpx 48rpx 0 0;
padding: 40rpx 24rpx 32rpx;
}
.prod-card{
display: flex;
height: 208rpx;
background-image: linear-gradient(1deg, #FFFFFF 10%, #FDFCFF 100%);
border: 2rpx solid #FFFFFF;
box-shadow: 0 8rpx 20rpx 0 rgba(197,205,235,0.35);
border-radius: 20rpx;
padding: 20rpx 24rpx;
box-sizing: border-box;
position: relative;
}
.prod-card .card-img{
width: 160rpx;
height: 160rpx;
flex-shrink: 0;
border-radius: 4rpx;
}
.img-desc{
position: absolute;
width: 104rpx;
height: 40rpx;
line-height: 40rpx;
background: #D7F5EB;
border-radius: 4rpx;
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 24rpx;
color: #24B38C;
letter-spacing: 0;
text-align: center;
}
.prod-info{
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 12rpx 0;
margin-left: 24rpx;
}
.prod-info>text{
display: block;
white-space: nowrap;
height: 40rpx;
line-height: 40rpx;
}
.prod-info .title{
font-family: PingFangSC-Medium;
font-weight: 600;
font-size: 28rpx;
color: #323436;
}
.prod-info .sale,.prod-info .earnings{
font-size: 26rpx;
color: #7A8299;
}
.prod-info .sale-num{
font-size: 26rpx;
color: #323436;
}
.prod-info .earnings-num{
font-size: 28rpx;
font-family: DINAlternate-Bold;
font-weight: Bold;
color: #F35251;
}
.share-btn{
height: 56rpx;
line-height: 56rpx;
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 24rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
border-radius: 12rpx;
color: #fff;
padding: 0 20rpx;
display: flex;
align-items: center;
position: absolute;
right: 24rpx;
top: 50%;
transform: translateY(-50%);
}
.share-btn .icon{
width: 24rpx;
height: 24rpx;
margin-right: 8rpx;
}
.project-wrap{
background-color: #F5F7FB;
}
.project-img{
height: 500rpx;
white-space: nowrap;
.img-item{
height: 300rpx;
}
}
// .out-tab{
// .out-text {
// // color: red !important;
// }
// .out-text{
// color:red;
// }
// .out-line{
// }
// }
<!--pages/tab/discovery/components/product/product.wxml-->
<view class="prod-wrap">
<text class="big-title">特色产品</text>
<scroll-view class="nav-wrap" scroll-x="{{true}}">
<block wx:for="{{navList}}" wx:key="index">
<text class='nav {{activeNavIdx==index ? "active-nav": ""}}' bindtap="changeNav" data-index="{{index}}">{{item}}</text>
</block>
</scroll-view>
<view class="prod-item">
<view class="prod-card">
<view class="card-img">
<text class="img-desc">轻改类</text>
<image src="{{IMGURL}}discovery_prod1.png"></image>
</view>
<view class="prod-info">
<text class="title">360全景导航</text>
<text class="sale">新车销量 <text class="sale-num">100</text></text>
<text class="earnings">预估收益 <text class="earnings-num">92.4 万</text></text>
</view>
<view class="share-btn">
<image class="icon" src="{{IMGURL}}share.png"></image>
<text>分享</text>
</view>
</view>
</view>
</view>
<view class="project-wrap">
<tab outClassName="project-tab" openScroll="{{true}}" tab="{{tab}}" index="{{curTabIdx}}" bindclick="changeTab"></tab>
<scroll-view class="project-img" scroll-into-view="{{intoViewId}}" bindscroll="scrolltoupper" scroll-y="{{true}}">
<block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item">
{{item}}
</view>
</block>
</scroll-view>
</view>
...@@ -7,9 +7,45 @@ Page({ ...@@ -7,9 +7,45 @@ Page({
*/ */
data: { data: {
navStyle, navStyle,
actClass:'right',
// IMG_URL // IMG_URL
dataArr:[
{
src:'../../../images/index/car1.png',
name:'新车洽谈场景',
msg:'1.0 新车权益销售'
},
{
src:'../../../images/index/car2.png',
name:'新车交付场景',
msg:'1.1 新车精品升级'
},
{
src:'../../../images/index/car3.png',
name:'0-12个月',
msg:'1.2 新车线上转化'
},
{
src:'../../../images/index/car4.png',
name:'12个月以上',
msg:'1.3 存量用户众筹'
},
]
},
navbarReady(e) {
let { height, statusBarHeight } = e.detail
this.setData({
tabBarStyle: height / 2 + statusBarHeight
})
console.log(e)
},
headTabFn(e){
// console.log("name",e.currentTarget.dataset.name)
let name = e.currentTarget.dataset.name
this.setData({
actClass:name
})
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
......
{ {
"usingComponents": { "usingComponents": {
"product": "./components/product/product"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 10, "onReachBottomDistance": 10,
......
page {
height: 100vh;
width: 100vw;
background-color: #fff;
}
.reclaim{
.header-wrap{
position: relative;
width: 100%;
background-size: 100% 100%;
margin-bottom: 16px;
.header{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 88rpx;
display: flex;
justify-content:space-between;
align-items:center;
.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:20px;
height:20px;
}
.apply{
margin-left: 4px;
margin-right: 16px;
font-weight: 400;
font-size: 14px;
color: var(--btnColor);
}
}
}
}
.scene{
margin: 0 10px 16px;
display: flex;
justify-content:space-between;
.item{
position: relative;
width: 86px;
height: 90px;
background: #F7F8FC;
border-radius: 6px;
}
.act{
position: absolute;
top: 0;
left: 0;
}
.img{
display:block;
margin: 10px auto 2px;
width: 28px;
height: 28px;
}
.name{
margin-bottom: 2px;
font-weight: 500;
font-size: 12px;
color: #323436;
text-align: center;
}
.msg{
font-weight: 400;
font-size: 9px;
color: #8A8C90;
text-align: center;
}
}
}
.guide{
width: 100%;
height: 100%;
.guide-img{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
}
\ No newline at end of file \ No newline at end of file
<navigation-bar navStyle="{{navStyle}}" page-title="首页"> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}">
<block wx:if="{{IMGURL}}"> 拓客户
<view class="logo y-center" data-skeleton-hide="{{skeletonData.logo}}">
<image
webp
src="{{IMGURL}}index/gh-logo.png?v={{img_version}}"
bindload="imgSuccess"
data-name="logo" />
</view>
<view class="merchant-switch y-center flex" bindtap="marchantSwitch">
切换门店
<view class="icon">
<image webp src="{{IMGURL}}index/merchant-switch.png?v={{img_version}}" />
</view>
</view>
</block>
</navigation-bar> </navigation-bar>
<block wx:if="{{navHeight}}"> <view class="reclaim">
<view class="layout" style="top:{{navHeight}}px"> <view class="header-wrap" style="height:{{tabBarStyle*2 + 88}}rpx; background-image: url('../../../images/index/head.png')">
<view class="bg-box" style="height:{{270 + navHeight * 2}}rpx;top:-{{navHeight}}px"> <view class="header">
<block wx:if="{{userInfo && userInfo.group == false && merchantName}}"> <view class="left">
<view class="merchant-name" style="top:{{navHeight}}px">{{merchantName}}</view> <view class="clue {{actClass == 'left'?'act':''}}" bindtap="headTabFn" data-name="left">
</block> 看线索
<view class="bg">
<image
webp
src="{{IMGURL}}index/bg.png?v={{img_version}}"
data-skeleton-hide="{{skeletonData.bg}}"
bindload="imgSuccess"
data-name="bg" />
</view>
</view> </view>
<!-- <search-box bindsearch="search"></search-box> --> <view class="product {{actClass == 'right'?'act':''}}" bindtap="headTabFn" data-name="right">
<view class="banner" data-skeleton-hide="{{skeletonData.homeConfig}}"> 看产品
<block wx:if="{{bannerList}}">
<swiper
class="swiper"
bindchange="changePage"
interval="5000"
circular
autoplay>
<block wx:for="{{bannerList}}" wx:key="index">
<swiper-item class="swiper-item">
<image
webp
src="{{item.bannerImg}}"
class="banner-img"
bindtap="jumpGoods"
data-url="{{item.url}}"
data-id="{{item.goods.id}}"
data-link="{{item.linkUrl}}"
data></image>
</swiper-item>
</block>
</swiper>
</block>
<block wx:else>
<view class="swiper border">
<view class="logo box-center">
<image webp src="{{IMGURL}}index/gh-logo.png?v={{img_version}}" />
</view> </view>
</view> </view>
</block> <view class="right">
<block wx:if="{{bannerList.length > 1}}"> <image class="img" src="../../../images/index/apply.png"></image>
<view class="banner-dots"> <view class="apply">
<block wx:for="{{bannerList}}" wx:key="index"> 申请业务
<view class="dots {{bannerIndex == index?'active':''}}" />
</block>
</view> </view>
</block>
</view> </view>
<view class="tips-box flex" data-skeleton-hide="{{skeletonData.homeConfig}}">
<block wx:for="{{tipsList}}" wx:key="index">
<view class="item flex">
<view class="sprite-icon icon-home-tips-{{index}}" />
{{item}}
</view> </view>
</block>
</view> </view>
<block wx:if="{{noticeContent}}"> <view class="scene">
<view class="marquee" data-skeleton-hide="{{skeletonData.homeConfig}}"> <view class="item item{{index}}" wx:for="{{dataArr}}" wx:key="name">
<marquee data="{{noticeContent}}" speed="7500" /> <image class="img" src="{{item.src}}"></image>
</view> <view class="name">
</block>
<view class="util-box" data-skeleton-hide="{{skeletonData.utilList}}">
<block wx:for="{{utilList}}" wx:key="index">
<view class="item" bindtap="jump" data-item="{{item}}">
<view class="sprite-icon icon-home-{{item.icon}}" />
{{item.name}} {{item.name}}
</view> </view>
</block> <view class="msg">
</view> {{item.msg}}
<view class="equity-banner" bindtap="jumpEquity" data-skeleton-hide="{{skeletonData.equity}}">
<image
webp
src="{{IMGURL}}index/equity-banner.png?v={{img_version}}"
bindload="imgSuccess"
data-name="equity" />
</view>
<block wx:if="{{goodsFlag}}">
<view wx:if="{{classifyList.length}}">
<view class="goods-box" data-skeleton-hide="{{skeletonData.goods}}">
<view class="sticky" style="top:{{navHeight}}px;">
<tab
tab="{{tab}}"
align="left"
openScroll
bindclick="changeTab"
index="{{goodsIndex}}" />
</view>
<view class="goods-content {{classifyList[goodsIndex].classifyName == '秒杀'?'activity-box':''}}">
<block wx:if="{{classifyList.length}}">
<block wx:for="{{classifyList}}" wx:key="index">
<block
wx:for="{{item.goodsList}}"
wx:for-item="i"
wx:for-index="ind"
wx:key="ind">
<block wx:if="{{index == goodsIndex}}">
<block wx:if="{{item.classifyName == '秒杀'}}">
<block wx:if="{{ind < 6}}">
<activity item="{{i}}" />
</block>
</block>
<block wx:else>
<view class="goods-item">
<block
wx:for="{{i}}"
wx:key="cind"
wx:for-item="c"
wx:for-index="cind">
<view class="goods">
<goods item="{{c.goods}}" indexStyle></goods>
</view>
</block>
</view>
</block>
</block>
</block>
</block>
</block>
</view>
<block wx:if="{{classifyList[goodsIndex].classifyName == '秒杀'}}">
<view class="btn text-center" bindtap="jump" data-url="activity.index">
查看更多
<view class="sprite-icon icon-mine-arrow" />
</view>
</block>
</view>
</view> </view>
<block wx:else>
<view class="nothing flex">
<view class="icon">
<image webp src="{{IMGURL}}index/index-nothing.png?v={{img_version}}" />
</view> </view>
当前门店暂无优惠活动
</view>
</block>
</block>
</view>
</block>
<view class="widget-box" wx:if="{{showKF}}">
<view class="widget {{widgetStatus?'open':''}}" bindtap="openKF">
<image webp src="{{IMGURL}}index/kf.png?v={{img_version}}" />
<view class="online-text">在线客服</view>
</view> </view>
<product></product>
</view> </view>
<!-- <view class="widget-box" wx:if="{{!widgetStatus&&customerlist.length>0}}">
<view class="widget {{widgetStatus?'open':''}}" bindtap="showFlex"> <view class="guide" wx:if="{{guideShow}}">
<image webp src="{{IMGURL}}index/kf.png?v={{img_version}}"></image> <image bindtap="guideFn" class="guide-img" src="../../../images/entrustCustomers/guide{{guideSrcIndex}}.png"></image>
<view class="online-text">在线客服</view>
</view>
</view> -->
<view class="model" catchtouchmove="noScroll" wx:if="{{widgetStatus}}">
<view class="close-icon" bindtap="showFlex">
<image webp src="{{IMGURL}}index/kf-close.png?v={{img_version}}" />
</view>
<view class="bgkf">
<image webp src="{{IMGURL}}index/kfbg.png?v={{img_version}}" />
<view class="qr-box">
<view class="qr-icon">
<image webp src="{{IMGURL}}index/qr-bg.png?v={{img_version}}" />
</view>
<view class="userinfo-wrap">
<view class="icon">
<image webp src="{{customerlist[0].thumbAvatar|| 'https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/user.png'}}" />
</view>
<view class="name">{{customerlist[0].staffName}}</view>
<view class="qr-code">
<image webp src="{{customerlist[0].qrCode || 'https://img02.glsx.com.cn/weapp/resource/miniprogram/cgacar/index/qr.png'}}" show-menu-by-longpress="{{customerlist[0].qrCode}}" />
</view>
</view>
<view class="kf-text">
<image webp src="{{IMGURL}}index/kf-text.png?v={{img_version}}" />
</view>
</view>
</view>
</view> </view>
<!-- <coupons-dialog requestFlag="{{isLogin}}"></coupons-dialog> -->
<login show="{{showLogin}}" bindloginInfo="LOGIN" />
<!-- 选择门店 -->
<index-merchant merchantSwitch="{{showMerchant}}" init="{{isLogin}}" storeCode="{{userInfo.sapCode}}" />
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!