Commit 85e33d6d by 张立顺

Merge branch 'SAAS+V5.3.0-1117' of 192.168.3.233:saas_plus/sales-assistant into SAAS+V5.3.0-1117

2 parents a4a5cb29 4ad2b554
......@@ -92,13 +92,11 @@
],
"preloadRule": {},
"usingComponents": {
"tab": "/components/Tab/Tab",
"tab-bar": "/components/TabBar/TabBar",
"navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup",
"nothing-tips": "/components/Nothing-tips/nothingTips",
"glsx-image": "/components/image/index",
"no-product": "/components/NoProduct/index",
"glsx-privacy": "glsx-applet-component/GlsxPrivacy/index",
"van-popup": "@vant/weapp/popup/index"
},
......
// components/NoProduct/index.js
Component({
/**
* 组件的属性列表
*/
properties: {
},
/**
* 组件的初始数据
*/
data: {
IMG_URL: 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/',
img_version: 'v1.0.0'
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* components/NoProduct/index.wxss */
.no-product {
height: 100vh;
font-weight: 500;
font-size: 48rpx;
color: #2D2D33;
text-align: center;
margin-top: 340rpx;
&-img {
width: 434rpx;
height: 276rpx;
margin-bottom: 50rpx;
}
}
\ No newline at end of file
<!--components/NoProduct/index.wxml-->
<view class="no-product">
<image class="no-product-img" src="{{IMG_URL}}index/productImgs/no-product.png?v={{img_version}}" />
<view>产品已下架</view>
</view>
// components/Service/Service.js
import { IMG_URL } from '~/utils/constantData'
// const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/'
Component({
/**
* 组件的属性列表
*/
properties: {
isFixed: {
type: Boolean,
value: true
}
},
/**
* 组件的初始数据
*/
data: {
IMG_URL,
isShow: false
},
/**
* 组件的方法列表
*/
methods: {
handleShow() {
this.setData({
isShow: !this.data.isShow
})
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* components/Service/Service.wxss */
.service {
position: fixed;
right: 0rpx;
top: 73%;
z-index: 120;
}
.icon {
width: 64px;
height: 64px;
}
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100vw;
height: 100vh;
z-index: 998;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.bg {
position: absolute;
width: 100%;
height: 100%;
z-index: -1;
background: rgba(0, 0, 0, .8);
}
.poster {
width: 750rpx !important;
height: 720rpx !important;
border-radius: 0;
}
.close {
margin-top: 60rpx;
width: 64rpx;
height: 64rpx;
}
}
\ No newline at end of file
<!--components/Service/Service.wxml-->
<div class="{{isFixed ? 'service' : '' }}">
<image src="{{IMG_URL}}index/service.png" class="icon" bindtap="handleShow"></image>
<view wx:if="{{isShow}}" class="layout">
<view class="bg" bindtap="handleShow" />
<image class="poster" src="{{IMG_URL}}index/service-detail.png" show-menu-by-longpress="{{true}}"></image>
<image src="{{IMG_URL}}index/close.png" class="close" bindtap="handleShow"></image>
</view>
</div>
\ No newline at end of file
// components/Tab/Tab.js
// behaviors: [LocationBehavior],
import { imgUrlMixin } from '~/mixins/index'
Component({
behaviors: [imgUrlMixin],
options: {
addGlobalClass: true
},
/**
* 组件的属性列表
*/
properties: {
outClassName:String,
tab: Array,
openScroll: Boolean,
tabHeight: {
type: Boolean,
value: false
},
productHeight: {
type: Boolean,
value: false
},
index: {
type: Number,
observer: function (n) {
this.setData({
count: n,
to: `to-${n}`
})
}
},
itemWidth: String,
align: {
type: String,
value: ''
},
// 是否有红点
unreadClueCount: {
type: Number,
value: 0
},
},
/**
* 组件的初始数据
*/
data: {
count: 0,
to: ''
},
// lifetimes:{
// attached: function() {
// console.log('unreadClueCount',this.data.unreadClueCount)
// }
// },
/**
* 组件的方法列表
*/
methods: {
click(e) {
let { count } = e.currentTarget.dataset
this.setData({
count,
to: `to-${count}`,
unreadClueCount:0
})
this.triggerEvent('click', count)
}
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
<wxs src="./Tab.wxs" module="filterUtils" />
<block wx:if="{{openScroll}}">
<scroll-view class="tab-box {{align}} {{outClassName}}" style="{{productHeight ? 'height: 72rpx;' : ''}}" scroll-x enable-flex scroll-with-animation scroll-into-view="{{to}}" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" bindtap="click" data-count="{{index}}" id="to-{{index}}">
<view class="text" style="{{productHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<!-- <view class="text" style="width:{{38 * item.length + 20}}rpx;">{{item}}</view> -->
<view class="line" style="{{productHeight ? 'height: 4rpx;' : ''}}" />
</view>
</block>
</scroll-view>
</block>
<block wx:else>
<view class="tab-box flex" style="{{tabHeight ? 'height: 60rpx;' : ''}}">
<block wx:for="{{tab}}" wx:key="index">
<view class="tab {{index==count?'active':''}}" style="width:{{itemWidth}}; {{index == 0 ? 'margin-left: 32rpx;' : ''}}" bindtap="click" data-count="{{index}}">
<view class="text text-center" style="{{tabHeight ? 'height: 60rpx;' : ''}}">{{item}}</view>
<view class="line" style="{{tabHeight ? 'margin-top: 6rpx;' : ''}}" />
<!-- -->
<!-- <view wx:if="{{filterUtils.hasRedpoint(unreadClueCount)}}" class="redpoint" /> -->
</view>
</block>
</view>
</block>
\ No newline at end of file
var hasRedpoint = function (unreadClueCount) {
// console.log('unreadClueCount: ', unreadClueCount);
if(unreadClueCount>0){
return true
}else{
return false;
}
};
module.exports = {
hasRedpoint: hasRedpoint,
};
/* components/Tab/Tab.wxss */
.tab-box {
display: flex;
/* display: grid; */
width: 100%;
height: 92rpx;
box-sizing: border-box;
}
.tab-box.left {
padding-left: 32rpx;
}
.left .tab {
padding-right: 40rpx;
}
/* .flex .tab {
flex: 1;
} */
.tab {
position: relative;
flex-shrink: 0;
}
.tab .text {
height: 84rpx;
display: flex;
align-items: center;
box-sizing: border-box;
color: #A9A9A9;
justify-content: center;
font-size: 28rpx;
}
.left .text {
justify-content: flex-start;
}
.flex .tab .text {
padding: 0;
}
.tab + .tab{
margin-left: 20rpx;
}
.tab.active .text {
/* font-weight: 500; */
font-weight: 600;
font-size: 38rpx;
transition: all .25s;
color: #2C2C2C;
font-family: PingFangSC-S0pxibold;
}
.tab .line {
width: 48rpx;
height: var(--borderRadius);
background: var(--btnColor);
border-radius: 2rpx;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
}
.tab.active .line {
transform: scale(1);
}
.tab-box::-webkit-scrollbar {
display: none;
width: 0;
height: 0;
color: transparent;
}
.active .redpoint {
display: none;
}
.redpoint {
position: absolute;
top: 10px;
right: 5px;
/* top: 8px;
right: 10px; */
width: 10px;
height: 10px;
background: #EB4E4E;
border-radius: 50%;
}
/* 外部出进来的自定义样式 */
.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;
}
\ No newline at end of file
......@@ -162,7 +162,6 @@ Component({
console.log(headerConfig, 'headerConfig')
if (headerConfig.key == 'merchantName') {
let { item } = e.currentTarget.dataset
item.currentTab = 2
wx.navigateTo({
url: `/packageCustomer/pages/merchantDetail/merchantDetail?query=${encodeURIComponent(
JSON.stringify(item)
......
......@@ -78,13 +78,13 @@ Page({
navigationBarHeight: 0,
scrollTop: 0,
setScrollTop: 0,
track_event_code: 'customer_view_page',
track_event_code: 'sales_customer_view_page',
personParams: {} // 总监通过销售人员进入参数
},
// 总监有查看某个员工的潜客数据,手动触发时,将员工过滤条件清除
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'customer_page', {}, '')
wx.$track.setTrackData(0, 'sales_customer_page', {}, '')
// 重新加载数据
this.setData({
myTabIdx: 0,
......
import { getUserInfo } from '~/utils/cache/userInfo'
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({
// behaviors: [kfMixin],
behaviors: [reportPageTrackMixin],
/**
* 页面的初始数据
*/
data: {
navStyle: 'background-color: rgba(0,0,0,0);'
navStyle: 'background-color: rgba(0,0,0,0);',
track_event_code: 'sales_index_view_page'
},
// navbar高度设置
// navbarReady(e) {
......@@ -14,6 +17,10 @@ Page({
// headerHeight: height / 2 + statusBarHeight
// })
// },
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'sales_index_page', {}, '')
},
navbarReady(e) {
let navBarHeight = e.detail.height
this.setData({
......@@ -25,7 +32,7 @@ Page({
*/
onLoad: function (options) {
const userInfo = getUserInfo()
wx.$track.setTrackData(0, 'sales_index_page', {}, '')
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this.setData({
userInfo,
......@@ -43,16 +50,22 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow: async function () {},
onShow: async function () {
this.onPageShow()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {},
onHide: function () {
this.onPageHide()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {},
onUnload: function () {
this.onPageHide()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
......
// pages/tab/tool/tool.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
Page({
behaviors: [reportPageTrackMixin],
/**
* 页面的初始数据
*/
data: {
toolsList: [{ name: '销售日报', url: '/pages/tool/qrcode/qrcode' }]
toolsList: [{ name: '销售日报', url: '/pages/tool/qrcode/qrcode' }],
track_event_code: 'sales_tool_view_page'
},
toSalesDailyReport() {
let { loginRole } = wx.$storage.get('userInfo')
......@@ -18,6 +21,10 @@ Page({
}[loginRole]
wx.$router.go(path)
},
onTabItemTap(e) {
// 点击埋点
wx.$track.setTrackData(0, 'sales_tool_page', {}, '')
},
/**
* 生命周期函数--监听页面加载
*/
......@@ -31,17 +38,23 @@ Page({
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
onShow() {
this.onPageShow()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
onHide() {
this.onPageHide()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
onUnload() {
this.onPageHide()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!