Commit e3f24408 by 张立顺

合并代码

1 parent 4871f402
...@@ -15,5 +15,26 @@ class mineApi { ...@@ -15,5 +15,26 @@ class mineApi {
// true // true
) )
} }
/** 保存客户信息 */
saveMerchantCustomInfo(data) {
return api.post(
{
method: 'scrm.api.boutiquecoupon.merchantCustomInfo.save',
...data
}
// true
)
}
/** 消息盒子列表 */
messageBoxPage(data) {
return api.post(
{
method: 'scrm.api.busassistant.messageBox.page',
...data
}
// true
)
}
} }
export default mineApi export default mineApi
...@@ -140,5 +140,13 @@ class UsersApi { ...@@ -140,5 +140,13 @@ class UsersApi {
...data ...data
}) })
} }
/** 退出登录 */
logout(data) {
return api.post({
method: 'scrm.api.sso.wechat.applets.logout',
...CODE,
...data
})
}
} }
export default UsersApi export default UsersApi
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
width: 25%; width: 25%;
/* flex: 1; */
background: #F7F8FC; background: #F7F8FC;
margin-right: 4rpx; margin-right: 4rpx;
font-size: 18rpx; font-size: 18rpx;
......
import WxValidate from '../../utils/WxValidate' import WxValidate from '~/utils/wxValidate'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -75,17 +75,14 @@ Page({ ...@@ -75,17 +75,14 @@ Page({
}) })
}, },
checkLoginBtn(disabled = false) { checkLoginBtn(disabled = false) {
const { const { loginType } = this.data,
loginType {
} = this.data, { data: { formData },
data: {
formData
},
loginToken loginToken
} = this.selectComponent('#box') } = this.selectComponent('#box')
if (loginType == 0) { if (loginType == 0) {
disabled = loginToken disabled = loginToken
} else disabled = loginType == 1 ? formData.phone && this.validate.methods.tel(formData.phone) && (formData.code && formData.code.length == 4) : formData.account && formData.password } else disabled = loginType == 1 ? formData.phone && this.validate.methods.tel(formData.phone) && formData.code && formData.code.length == 4 : formData.account && formData.password
this.setData({ this.setData({
disabled: !disabled disabled: !disabled
}) })
......
...@@ -127,7 +127,10 @@ Component({ ...@@ -127,7 +127,10 @@ Component({
], ],
listObj listObj
}, },
attached() {
// this.initTime()
this.getMerchantCustomInfoList()
},
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
...@@ -162,18 +165,42 @@ Component({ ...@@ -162,18 +165,42 @@ Component({
.merchantCustomInfo(params) .merchantCustomInfo(params)
.then(result => { .then(result => {
console.log(result) console.log(result)
let { pages, list, total } = result
this.setData({
customerList: pageNum == 1 ? list : [...customerList, ...list],
triggered: false,
pages
})
})
.catch(err => {})
.finally(() => {
wx.$api.hideLoading()
})
},
submit(data) {
mineApi
.saveMerchantCustomInfo(data)
.then(result => {
console.log(result)
this.setData({
pageNum: 1
})
this.getMerchantCustomInfoList()
}) })
.catch(err => {}) .catch(err => {})
}, },
changeStatus(e) { changeStatus(e) {
// console.log(e) console.log(e)
let { customerList } = this.data let { customerList } = this.data
let { index, isEdit } = e.currentTarget.dataset let { index, item } = e.currentTarget.dataset
// let // let
let status = customerList[index].isEdit let status = customerList[index].isEdit
if (isEdit) { // console.log(isEdit)
if (item.isEdit) {
// 提交客户信息更新 // 提交客户信息更新
this.checkout(customerList[index]) // this.checkout(customerList[index])
// console.log('customerList[index]', customerList[index])
this.submit(customerList[index])
} else { } else {
customerList[index]['isEdit'] = true customerList[index]['isEdit'] = true
this.setData({ this.setData({
......
...@@ -14,9 +14,7 @@ page { ...@@ -14,9 +14,7 @@ page {
} }
.placeholder-class {
color: #C3C3C3;
}
.customerBox { .customerBox {
box-sizing: border-box; box-sizing: border-box;
...@@ -55,6 +53,6 @@ page { ...@@ -55,6 +53,6 @@ page {
} }
.placeholder-class { .placeholder-class {
color: #666; color: #C3C3C3;
font-size: 20rpx; // font-size: 20rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
refresher-triggered="{{triggered}}"> refresher-triggered="{{triggered}}">
<view class="customerBox" wx:for="{{customerList}}" wx:key="index"> <view class="customerBox" wx:for="{{customerList}}" wx:key="index">
<view class="titleCon"> <view class="titleCon">
<view class="name">嘀加鹏辉奥迪4S店</view> <view class="name">{{item.actualMerchantName}}</view>
<view <view
class="statusBtn" class="statusBtn"
data-index="{{index}}" data-index="{{index}}"
data-isEdit="{{item.isEdit}}" data-item="{{item}}"
bind:tap="changeStatus"> bind:tap="changeStatus">
{{item.isEdit?'完成':'编辑'}} {{item.isEdit?'完成':'编辑'}}
</view> </view>
......
// pages/mineDetail/messageBox/messageBox.js // pages/mineDetail/messageBox/messageBox.js
import mineApi from '~/api/mineApi/index'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -13,9 +14,29 @@ Component({ ...@@ -13,9 +14,29 @@ Component({
loginType: 0, loginType: 0,
agree: true, agree: true,
tabIndx: 0, tabIndx: 0,
tabList: ['战报', '通知'] tabList: ['战报', '通知'],
type: {
warReport: {
pageNum: 1,
pageSize: 10,
type: 0
},
message: {
pageNum: 1,
pageSize: 10,
type: 1
}
},
serviceMerchantId: ''
},
attached() {
// this.initTime()
let { userInfo } = wx.$storage.get()
this.setData({
serviceMerchantId: userInfo.subLoginUser.merchantId
})
this.getMessageList('warReport')
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
...@@ -27,6 +48,12 @@ Component({ ...@@ -27,6 +48,12 @@ Component({
tabBarStyle: height / 2 + statusBarHeight tabBarStyle: height / 2 + statusBarHeight
}) })
}, },
refreshList(e) {
console.log(e)
},
scrollonReachBottom(e) {
console.log(e)
},
changeTabIndx(e) { changeTabIndx(e) {
// console.log(e) // console.log(e)
// let { tabIndx } = this.data // let { tabIndx } = this.data
...@@ -35,6 +62,23 @@ Component({ ...@@ -35,6 +62,23 @@ Component({
this.setData({ this.setData({
tabIndx: detail tabIndx: detail
}) })
},
getMessageList(typeName) {
let { serviceMerchantId, type } = this.data
let params = {
serviceMerchantId,
...type[typeName]
}
wx.$api.showLoading('加载中...')
mineApi
.messageBoxPage(params)
.then(result => {
console.log(result)
})
.catch(err => {})
.finally(() => {
wx.$api.hideLoading()
})
} }
} }
}) })
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList" bindrefresherrefresh="refreshList"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
scroll-top="{{scrollTop}}" scroll-top="{{scrollTop}}"
...@@ -50,13 +51,14 @@ ...@@ -50,13 +51,14 @@
enable-back-to-top enable-back-to-top
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
bindrefresherrefresh="refreshList" bindrefresherrefresh="refreshList"
bindscrolltolower="scrollonReachBottom"
refresher-threshold="104" refresher-threshold="104"
style="height:100%;" style="height:100%;"
scroll-top="{{scrollTop}}" scroll-top="{{scrollTop}}"
class=" list" class=" list"
data-type="message" data-type="message"
refresher-triggered="{{triggered}}"> refresher-triggered="{{triggered}}">
<msg-box wx:for="messageList"> <msg-box wx:for="messageList" wx:key='index'>
<view class="cell"> <view class="cell">
<view class="label">活动名称:</view> <view class="label">活动名称:</view>
<view class="">xxxx</view> <view class="">xxxx</view>
......
// pages/tab/output/components/merchant/mrechant.js // pages/tab/output/components/merchant/mrechant.js
import outPut from '~/api/outPut/index' import outPut from '~/api/outPut/index'
import { IMG_URL } from '~/utils/constantData'
import { getNowMonth } from '~/utils/format'
const IMAGES = {
arrow: `${IMG_URL}/output/arrow.png`,
funnel: `${IMG_URL}/output/funnel.png`,
money: `${IMG_URL}/output/money.png`,
paper: `${IMG_URL}/output/paper.png`
}
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -10,26 +18,182 @@ Component({ ...@@ -10,26 +18,182 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
tabIndx: 4, noProduct: false,
noProduct: false IMAGES,
sceneIndx: 3,
isAct: false,
indicatorDots: true,
vertical: false,
autoplay: false,
interval: 2000,
duration: 500,
// tabIndx: 4,
list: [],
nowList: [],
todayList: [],
monthList: [],
dataObj: {
todayTime: '',
monthTime: ''
},
list: [
{
id: 1,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
},
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}
]
},
{
id: 2,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
},
{
id: 3,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
},
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}
]
},
{
id: 4,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}
],
funnelList: {
start: [
{ label: '到店量', key: 'toShopCount' },
{ label: '核销数', key: 'couponUsedCount' },
{ label: '体验数', key: 'experienceCount' },
{ label: '订单成交', key: 'upgradeCount' }
],
end: [
{ label: '转发量', key: 'shareCount' },
{ label: '访客数', key: 'visitCount' },
{ label: '成交数', key: 'dealCount' },
{ label: '产值', key: 'totalMoney' }
]
}
// showNothingSceneCon: false
}, },
attached() { attached() {
this.initTime()
this.getTotalMerchantCount() this.getTotalMerchantCount()
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
initTime() {
let date = new Date()
let today = date.getDate()
let month = getNowMonth()
const todayTime = {
startTime: `${month}-${today}`,
endTime: `${month}-${today}`
}
const monthTime = {
startTime: `${month}-01`,
endTime: `${month}-${today}`
}
this.setData({
dataObj: {
todayTime,
monthTime
}
})
},
swiperChange(e) {
console.log(e)
},
getTotalMerchantCount() { getTotalMerchantCount() {
let { userInfo } = wx.$storage.get() let { userInfo } = wx.$storage.get()
let { merchantId } = userInfo.subLoginUser let { merchantId } = userInfo.subLoginUser
console.log('merchantId', merchantId) console.log('merchantId', merchantId)
// 默认返回2前两条的具体数据 剩下需要自己手动查询
outPut outPut
.partnerMerchantTotal(merchantId) .partnerMerchantTotal({ merchantId })
.then(result => { .then(result => {
console.log(result) console.log(result)
let { dataList, yqMerchantIds } = result
const list = yqMerchantIds.reduce((list, item, index) => {
let obj = {}
obj.totalMoney = dataList[index]?.totalMoney || 0
obj.totalOrder = dataList[index]?.totalOrder || 0
obj.merchantId = item
obj.startInd = 1
// dataList[index]?.sceneList.findIndex(item => {
// return item != null
// }) || 1
obj.showNothingSceneCon = item.startInd == -1
obj.showList = dataList[index]?.sceneList || []
list.push(obj)
return list
}, [])
console.log('list', list)
this.setData({
list,
yqMerchantIds
})
}) })
.catch(err => {}) .catch(err => {})
},
handleSceneChange(e) {
console.log(e)
let { list } = this.data
let { index } = e.currentTarget.dataset
let { sceneIdx } = e.detail
list[index].startInd = sceneIdx - 1
this.setData({
list
})
},
swiperChange(e) {
console.log(e)
let { yqMerchantIds } = this.data
let { current } = e.detail
if (condition) {
}
this.triggerEvent('swiperChange', current)
} }
} }
}) })
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {
"merchantDataStatistics": "../merchantDataStatistics/merchantDataStatistics" "scene-box": "../../../../../components/SceneBox/SceneBox",
"nothingTipsCon": "../nothingTipsCon/nothingTipsCon"
} }
} }
...@@ -37,3 +37,191 @@ ...@@ -37,3 +37,191 @@
} }
} }
} }
/* 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%;
height: 100%;
position: absolute;
// width: 670rpx;
// height: 550rpx;
// z-index: -0;
// object-fit: cover;
}
.funneItem {
display: flex;
align-items: center;
z-index: 999;
width: 100%;
height: 400rpx;
}
.diagnosisCon {
box-sizing: border-box;
width: 100%;
padding: 20rpx;
border: 2rpx dashed #CCCED1;
display: flex;
.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 {
width: 560rpx;
margin-left: 16rpx;
font-size: 20rpx;
color: #5A6066;
line-height: 32rpx;
}
}
}
.swiper-item {
padding: 32rpx 20rpx 24rpx;
display: flex;
flex-direction: column;
align-items: center;
.merchantCount {
box-sizing: border-box;
display: flex;
margin: 32rpx 0;
.turnover,
.customerUnitPrice {
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
align-items: start;
justify-content: center;
width: 328rpx;
height: 128rpx;
padding-left: 110rpx;
background-image: linear-gradient(90deg, #FFFFFF 3%, #F7F8FC 100%);
text-align-last: left;
.img {
position: absolute;
top: 24rpx;
left: 36rpx;
width: 60rpx;
height: 60rpx;
}
.num {
font-family: MiSans-S0rpxibold;
font-weight: 600;
font-size: 32rpx;
color: #323436;
margin-bottom: 14rpx;
}
.label {
font-weight: 400;
font-size: 24rpx;
color: #323436;
}
}
.customerUnitPrice {
margin-left: 6rpx;
}
}
}
.full {
height: 1350rpx !important;
}
.short {
height: 1050rpx !important;
}
.funneItem:nth-of-type(1) {
margin-top: 25rpx;
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/components/merchant/mrechant.wxml --> <!-- pages/tab/output/components/merchant/mrechant.wxml -->
<!-- <text>pages/tab/output/components/merchant/mrechant.wxml</text> --> <!-- <text>pages/tab/output/components/merchant/mrechant.wxml</text> -->
<!-- hidden="{{true}}" -->
<view class="con"> <view class="con">
<view class="statistics"> <view class="statistics">
<view class="totalOutputValue box"> <view class="totalOutputValue box">
...@@ -13,15 +14,86 @@ ...@@ -13,15 +14,86 @@
</view> </view>
<!-- --> <!-- -->
<!-- 无门店 --> <!-- 无门店 -->
<merchantDataStatistics/> <!-- <merchantDataStatistics bind:swiperChange="swiperChange" /> -->
</view> <!-- sceneIndx==3? 'short': -->
<view wx:if="{{noProduct}}"> <swiper
<!-- <img src="" alt=""> --> indicator-dots="{{indicatorDots}}"
<view> class="full"
暂未开通,去 autoplay="{{autoplay}}"
<text>了解产品</text> bindchange="swiperChange"
开通门店 interval="{{interval}}"
</view> duration="{{duration}}">
<!-- <view >查看订单明细</view> --> <block wx:for="{{list}}" wx:key="*this">
<swiper-item>
<view class="merchantDataStatistics-con">
<view class="contitle">
<view class="name">广西宏泽汽车有限公司</view>
<view class="select">
<view>全部</view>
<image
class="arrow {{isAct?'isAct':''}}"
webp
src="{{IMAGES.arrow}}"
alt="" />
</view>
</view>
<!-- <scene-select/> -->
<view class="scene-box">
<!-- {{item.startInd + 1}} -->
<scene-box
formData="{{item}}"
data-index="{{index}}"
bind:handleSceneChange="handleSceneChange"
sceneActive="{{(item.startInd + 1)}}" />
</view>
<view class="outputValueCon" wx:if="{{!showNothingSceneCon}}">
<view class="title">产值图</view>
<view class="swiperCon">
<view class="swiper-item ">
<view class="fluuelCon">
<image class="bg-image" src="{{IMAGES.funnel}}" />
<block
wx:for="{{item.startInd!=3? funnelList['start']: funnelList['end']}}"
wx:key="*this"
wx:for-index="ind"
wx:for-item="funneItem">
<view class="funneItem">
<view class="label">{{funneItem['label']}}</view>
<view class="num">{{item['showList' ][funneItem['key']] }}</view>
</view>
</block>
</view>
<!-- <block wx:for="{{items}}"></block> hidden="{{item.startInd ==3}}" -->
<view hidden="{{item.startInd ==3}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">200</view>
<view class="label">营业额/¥</view>
</view>
<view class="customerUnitPrice">
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">2000</view>
<view class="label">客单价/¥</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="tipsIcon">指标诊断</view>
<view class="tips">
日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。
</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{showNothingSceneCon}}" />
</view>
</swiper-item>
</block>
</swiper>
</view> </view>
<nothingTipsCon wx:if="{{noProduct}}" />
// pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
import { IMG_URL } from '~/utils/constantData'
// import { } from "module";
// ;('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/')
const IMAGES = {
arrow: `${IMG_URL}/output/arrow.png`,
funnel: `${IMG_URL}/output/funnel.png`,
money: `${IMG_URL}/output/money.png`,
paper: `${IMG_URL}/output/paper.png`
}
Component({
// behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
IMAGES,
sceneIndx: 3,
isAct: true,
indicatorDots: true,
vertical: false,
autoplay: false,
interval: 2000,
duration: 500,
list: [
{
id: 1,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
},
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}
]
},
{
id: 2,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
},
{
id: 3,
merchantName: '广西弘泽汽车销售服务有限公司',
totalMoney: '14580.00',
sence1: false,
sence2: true,
sence3: false,
sence4: true,
newList: [
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
},
{
time: '09-28 11:19',
content: '今日升级2单,产值¥4480'
}
]
},
{
id: 4,
merchantName: '广西弘泽汽车销售服务有限公司7483493849389348938',
totalMoney: '14580.00',
sence1: false,
sence2: false,
sence3: false,
sence4: false,
newList: []
}
],
funnelList: {
3: [
{ label: '到店量', key: 'toShopCount' },
{ label: '核销数', key: 'couponUsedCount' },
{ label: '体验数', key: 'experienceCount' },
{ label: '订单成交', key: 'upgradeCount' }
],
other: [
{ label: '转发量', key: 'shareCount' },
{ label: '访客数', key: 'visitCount' },
{ label: '成交数', key: 'dealCount' },
{ label: '产值', key: 'totalMoney' }
]
}
},
/**
* 组件的方法列表
*/
methods: {
handleSenceChange(e) {
console.log(e)
}
}
})
/* 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);
}
}
}
}
.outputValueCon {
.title {
box-sizing: border-box;
font-weight: 600;
font-size: 32rpx;
color: #323436;
border-bottom: 2rpx dashed #CCCED1;
padding: 12rpx;
}
.fluuelCon {
width: 670rpx;
height: 550rpx;
position: relative;
}
.bg-image {
width: 100%;
height: 100%;
position: absolute;
// width: 670rpx;
// height: 550rpx;
// z-index: -1;
// object-fit: cover;
}
.diagnosisCon {
box-sizing: border-box;
width: 100%;
padding: 20rpx;
border: 2rpx dashed #CCCED1;
display: flex;
.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 {
width: 560rpx;
margin-left: 16rpx;
font-size: 20rpx;
color: #5A6066;
line-height: 32rpx;
}
}
}
.swiper-item {
padding: 32rpx 20rpx 24rpx;
display: flex;
flex-direction: column;
align-items: center;
.merchantCount {
box-sizing: border-box;
display: flex;
margin: 32rpx 0;
.turnover,
.customerUnitPrice {
box-sizing: border-box;
position: relative;
display: flex;
flex-direction: column;
align-items: start;
justify-content: center;
width: 328rpx;
height: 128rpx;
padding-left: 110rpx;
background-image: linear-gradient(90deg, #FFFFFF 3%, #F7F8FC 100%);
text-align-last: left;
.img {
position: absolute;
top: 24rpx;
left: 36rpx;
width: 60rpx;
height: 60rpx;
}
.num {
font-family: MiSans-S0rpxibold;
font-weight: 600;
font-size: 32rpx;
color: #323436;
margin-bottom: 14rpx;
}
.label {
font-weight: 400;
font-size: 24rpx;
color: #323436;
}
}
.customerUnitPrice {
margin-left: 6rpx;
}
}
}
.full {
height: 1350rpx !important;
}
.short {
height: 1050rpx !important;
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml -->
<swiper
indicator-dots="{{indicatorDots}}"
class="{{sceneIndx==3? 'short':'full'}}"
autoplay="{{autoplay}}"
interval="{{interval}}"
duration="{{duration}}">
<block wx:for="{{list}}" wx:key="*this">
<swiper-item>
<view class="merchantDataStatistics-con">
<view class="contitle">
<view class="name">广西宏泽汽车有限公司</view>
<view class="select">
<view>全部</view>
<image
class="arrow {{isAct?'isAct':''}}"
webp
src="{{IMAGES.arrow}}"
alt="" />
</view>
</view>
<!-- <scene-select/> -->
<scene-box formData="{{item}}" bind:handleSenceChange="handleSenceChange" senceActive="{{(sceneIndx+1)}}" />
<view class="outputValueCon">
<view class="title">产值图</view>
<view class="swiperCon">
<view class="swiper-item ">
<view class="fluuelCon">
<image class="bg-image" src="{{IMAGES.funnel}}" />
</view>
<!-- <block wx:for="{{items}}"></block> -->
<view hidden="{{sceneIndx==3}}">
<!-- 统计 -->
<view class="merchantCount">
<view class="turnover">
<image class="img " webp src="{{IMAGES.money}}" />
<view class="num">200</view>
<view class="label">营业额/¥</view>
</view>
<view class="customerUnitPrice">
<image class="img " webp src="{{IMAGES.paper}}" />
<view class="num">2000</view>
<view class="label">客单价/¥</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="tipsIcon">指标诊断</view>
<view class="tips">
日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
// pages/tab/output/components/nothingTipsCon/nothingTipsCon.js
import { IMG_URL } from '~/utils/constantData'
Component({
/**
* 组件的属性列表
*/
properties: {},
/**
* 组件的初始数据
*/
data: {
nothingBg: `${IMG_URL}/output/empty.png`
},
/**
* 组件的方法列表
*/
methods: {}
})
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {}
"scene-box": "../../../../../components/SceneBox/SceneBox"
}
} }
\ No newline at end of file \ No newline at end of file
/* pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxss */
.nothingCon {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
background-color: #fff;
}
.img {
width: 512rpx;
height: 512rpx;
object-fit: cover;
}
\ No newline at end of file \ No newline at end of file
<!-- pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml -->
<!-- <text>pages/tab/output/components/nothingTipsCon/nothingTipsCon.wxml</text> -->
<view class="nothingCon">
<image
class="img"
webp
src="{{nothingBg}}"
alt="" />
暂未开通,去
<text>了解产品</text>
开通门店
</view>
...@@ -28,6 +28,8 @@ Page({ ...@@ -28,6 +28,8 @@ Page({
}, },
// 切换园区 // 切换园区
tapPicker() { tapPicker() {
let { isSuper } = this.data
isSuper &&
this.setData({ this.setData({
moveArrow: !this.data.moveArrow, moveArrow: !this.data.moveArrow,
popupShow: !this.data.popupShow popupShow: !this.data.popupShow
...@@ -45,20 +47,21 @@ Page({ ...@@ -45,20 +47,21 @@ Page({
tabIndx: e.detail tabIndx: e.detail
}) })
}, },
init() {
let { userInfo } = wx.$storage.get()
this.setData({
userInfo,
isSuper: userInfo.subLoginUser.isSuper
})
this.getMerchantRange()
},
getMerchantRange(e) { getMerchantRange(e) {
// 重新刷新 // 重新刷新
// let { detail } = e // let { detail } = e
let { userInfo } = wx.$storage.get() let { isSuper, userInfo } = this.data
// 有问题 先取反调试
// userInfo = userInfo.isSuper ? userInfo : userInfo.loginUserInfoList[0]
// console.log(userInfo.subLoginUser.merchantId)
console.log(userInfo)
// userInfo.isSuper &&
// 判断是超管才需要切换账号 // 判断是超管才需要切换账号
if (userInfo.isSuper) { if (isSuper) {
USERAPI.adminSelectLogin() USERAPI.adminSelectLogin()
.then(result => { .then(result => {
console.log(result) console.log(result)
...@@ -81,6 +84,7 @@ Page({ ...@@ -81,6 +84,7 @@ Page({
.catch(err => {}) .catch(err => {})
} else { } else {
let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }] let merchantRange = [{ merchantId: userInfo.subLoginUser.merchantId, merchantName: userInfo.subLoginUser.merchantName }]
console.log('merchantRange', merchantRange)
this.setData({ this.setData({
merchantRange, merchantRange,
subIndex: 0 subIndex: 0
...@@ -91,15 +95,7 @@ Page({ ...@@ -91,15 +95,7 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
// setSessionId('xxx') this.init()
// console.log(getSessionId())
// 判断是不是管理员
// subLoginUser
// if (userInfo.duty == '管理员') {
this.getMerchantRange()
// }
// console.log(userInfo)
}, },
/** /**
......
...@@ -10,11 +10,15 @@ ...@@ -10,11 +10,15 @@
} }
.layout { .layout {
box-sizing: border-box;
position: relative; position: relative;
// padding: 400rpx 16rpx 0; // padding: 400rpx 16rpx 0;
padding-top: 400rpx; padding-top: 400rpx;
font-size: 24rpx; font-size: 24rpx;
color: #8A8C90; color: #8A8C90;
display: flex;
flex-direction: column;
height: 100vh;
&::after { &::after {
content: ''; content: '';
...@@ -33,6 +37,11 @@ ...@@ -33,6 +37,11 @@
} }
.comCom {
flex: 1;
// background-color: #fff;
}
} }
.navigation-title { .navigation-title {
......
...@@ -29,11 +29,11 @@ ...@@ -29,11 +29,11 @@
<client id="client" /> <client id="client" />
</view> </view>
<!-- 我的门店 --> <!-- 我的门店 -->
<view hidden="{{tabIndx != 1}}"> <view class="comCom" hidden="{{tabIndx != 1}}">
<merchant id="merchant" /> <merchant id="merchant" />
</view> </view>
<!-- 我的员工 --> <!-- 我的员工 -->
<view hidden="{{tabIndx != 2}}"> <view class="comCom" hidden="{{tabIndx != 2}}">
<staff id="staff" /> <staff id="staff" />
</view> </view>
</view> </view>
......
...@@ -124,6 +124,15 @@ export function getScopeTime(inputTime, curTime) { ...@@ -124,6 +124,15 @@ export function getScopeTime(inputTime, curTime) {
return obj.text return obj.text
} }
export function getNowMonth() {
var date = new Date()
var year = date.getFullYear()
var month = date.getMonth() + 1
month = month > 9 ? month : '0' + month
var nowMonth = year + '-' + month
return nowMonth
}
/**num:要转换的数值,fixed:精确几位小数 */ /**num:要转换的数值,fixed:精确几位小数 */
export function decimal(num, fixed = 2) { export function decimal(num, fixed = 2) {
const pow = Math.pow(10, fixed) const pow = Math.pow(10, fixed)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!