Commit 26d4ee1d by zhangxw

功能开发

1 parent 781abd05
Showing 42 changed files with 1109 additions and 899 deletions
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
"pages": ["pages/loading/loading", "pages/sceneIndex/sceneIndex", "pages/wxLogin/wxLogin", "pages": ["pages/loading/loading", "pages/sceneIndex/sceneIndex", "pages/wxLogin/wxLogin",
"tabIndex/pages/index/index", "pages/accountItems/accountItems", "pages/merchantList/merchantList", "tabIndex/pages/index/index", "pages/accountItems/accountItems", "pages/merchantList/merchantList",
"pages/nothing/nothing", "pages/webView/webView", "pages/tabWorkOrder/pages/index/index", "pages/nothing/nothing", "pages/webView/webView", "pages/tabWorkOrder/pages/index/index",
"tabMine/pages/index/index", "pages/tabDateIndex/pages/tabDateIndex","pages/log/log"], "tabMine/pages/index/index", "pages/tabDateIndex/pages/tabDateIndex","pages/log/log","pages/changeScene/changeScene"],
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#fff", "navigationBarBackgroundColor": "#fff",
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
{ {
"root": "subvehicleConversion", "root": "subvehicleConversion",
"name": "subvehicleConversion", "name": "subvehicleConversion",
"pages": ["pages/TabBar/conversionPage", "pages/activityPage/activityManagement/activityManagement", "pages/activityPage/visitor/visitor", "pages/activityPage/order/order", "pages/orderPage/supplementaryOrderPay/supplementaryOrderPay", "pages/orderPage/relatedFinalPayment/relatedFinalPayment", "pages/orderPage/paySuccess/paySuccess"] "pages": ["pages/TabBar/conversionPage", "pages/activityPage/activityManagement/activityManagement", "pages/activityPage/visitor/visitor", "pages/activityPage/order/order", "pages/orderPage/supplementaryOrderList/supplementaryOrderList", "pages/orderPage/supplementaryOrderPay/supplementaryOrderPay", "pages/orderPage/relatedFinalPayment/relatedFinalPayment", "pages/orderPage/paySuccess/paySuccess"]
} }
], ],
"usingComponents": { "usingComponents": {
......
...@@ -14,10 +14,17 @@ Component({ ...@@ -14,10 +14,17 @@ Component({
if (n) { if (n) {
wx.$util.pointRecord(31) wx.$util.pointRecord(31)
let userInfo = wx.$util.getUserInfo() || {} let userInfo = wx.$util.getUserInfo() || {}
let { storeList } = this.data let { storeList, subIndex } = this.data
storeList?.map(val => { storeList?.map((val, index) => {
val.actived = false val.actived = false
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true if (userInfo?.selectedSceneType == 1) {
// 切换园区店
if (userInfo?.isSuper && index == subIndex) val.actived = true
else if (!userInfo?.isSuper && val.merchantId == userInfo?.selectedMerchantId) val.actived = true
} else {
// 切换4s店
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true
}
}) })
this.setData({ this.setData({
userInfo, userInfo,
...@@ -42,6 +49,10 @@ Component({ ...@@ -42,6 +49,10 @@ Component({
storeList: { storeList: {
type: Array, type: Array,
value: [] value: []
},
subIndex: {
type: Number,
value: 0
} }
}, },
...@@ -70,17 +81,38 @@ Component({ ...@@ -70,17 +81,38 @@ Component({
if (this.data.hasTabBar) wx.hideTabBar({animation: true}) if (this.data.hasTabBar) wx.hideTabBar({animation: true})
}, },
selectStore(e) { selectStore(e) {
let { item } = e.currentTarget.dataset const thisPage = wx.$router.getPageInstance()
let { userInfo, storeList } = this.data let { item, selectindex } = e.currentTarget.dataset
if (item?.merchantId == userInfo?.selectedMerchantId) return this.closeMenu() let { userInfo, storeList, subIndex } = this.data
storeList?.map(val => { // 精品升级场景
if (userInfo?.selectedSceneType == 1) {
// 超管切换园区店
if (userInfo?.isSuper && selectindex == subIndex) this.closeMenu()
else if (!userInfo?.isSuper && item?.merchantId == userInfo?.selectedMerchantId)return this.closeMenu()
} else { // 其它场景
if (item?.merchantId == userInfo?.selectedMerchantId) return this.closeMenu()
}
storeList?.map((val, index) => {
val.actived = false val.actived = false
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true if (userInfo?.selectedSceneType == 1) {
// 切换园区店
if (userInfo?.isSuper && selectindex == index) val.actived = true
else if (!userInfo?.isSuper && val.merchantId == userInfo?.selectedMerchantId) val.actived = true
} else {
// 切换4s店
if (val.merchantId == userInfo?.selectedMerchantId) val.actived = true
}
return val return val
}) })
this.setData({ this.setData({
storeList storeList
}) })
// 精品升级场景 超管切换
if (userInfo?.isSuper && userInfo?.selectedSceneType == 1) {
this.closeMenu()
thisPage.changePicker && thisPage.changePicker(storeList[selectindex], selectindex)
return
}
api.selectAccountLogin({ api.selectAccountLogin({
id: userInfo?.uuid, id: userInfo?.uuid,
loginStoreId: item.merchantId loginStoreId: item.merchantId
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<view class="wrapper"> <view class="wrapper">
<view class="title">4S店</view> <view class="title">4S店</view>
<scroll-view scroll-y style="height: calc(100vh - 264rpx);" enhanced="{{true}}" show-scrollbar="{{false}}"> <scroll-view scroll-y style="height: calc(100vh - 264rpx);" enhanced="{{true}}" show-scrollbar="{{false}}">
<block wx:for="{{storeList}}" wx:key="index"> <block wx:for="{{storeList}}" wx:key="index" wx:for-index="index">
<view catch:tap="selectStore" data-item="{{item}}" class="element {{item.actived ? 'active' : ''}}"> <view catch:tap="selectStore" data-item="{{item}}" data-selectindex="{{index}}" class="element {{item.actived ? 'active' : ''}}">
<view class="img"><image src="{{IMG_URL}}/4s_store_icon.png"></image></view> <view class="img"><image src="{{IMG_URL}}/4s_store_icon.png"></image></view>
<view class="gap_icon"><image src="{{IMG_URL}}/4s_store_icon_gap.png"></image></view> <view class="gap_icon"><image src="{{IMG_URL}}/4s_store_icon_gap.png"></image></view>
<view class="label">{{item.merchantName}}</view> <view class="label">{{item.merchantName}}</view>
......
...@@ -55,11 +55,11 @@ Component({ ...@@ -55,11 +55,11 @@ Component({
}, },
// 更新日志 // 更新日志
goVersionPage() { goVersionPage() {
wx.$router.go('pages.log')
}, },
// 切换场景 // 切换场景
changeScene() { changeScene() {
wx.$router.reLaunch('pages.sceneIndex') wx.$router.reLaunch('pages.changeScene')
}, },
// 切换账号 // 切换账号
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;"> <view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;">
<block wx:if="{{showActivityDetail}}"> <block wx:if="{{showActivityDetail}}">
<acitivity-detail id="acitivity-detail" activityId="{{activityId}}" activityName="{{activityName}}"></acitivity-detail> <acitivity-detail id="acitivity-detail" activityId="{{activityId}}" activityName="{{activityName}}" navBarHeight="{{navBarHeight}}"></acitivity-detail>
</block> </block>
</view> </view>
<!-- 超管isSuper/商户号类型 userType 2(员工号)账号不可操作 --> <!-- 超管isSuper/商户号类型 userType 2(员工号)账号不可操作 -->
......
...@@ -14,7 +14,8 @@ Component({ ...@@ -14,7 +14,8 @@ Component({
} }
} }
}, },
activityName: String activityName: String,
navBarHeight: Number
}, },
lifetimes: { lifetimes: {
attached() { attached() {
......
<wxs src="index.wxs" module="filter" /> <wxs src="index.wxs" module="filter" />
<glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy> <glsx-privacy appletName="生意助手员工版" bind:agreeClick="agreeClick" bind:disagreeClick="disagreeClick"></glsx-privacy>
<view class="headerBar"> <!-- <view class="headerBar">
<view class="totalCount"> <view class="totalCount">
<view class="left box"> <view class="left box">
<view class="label">今日产值</view> <view class="label">今日产值</view>
<view class="num item"> <view class="num item">
<view class="labelStr">¥</view> <view class="labelStr">¥</view>
<view class="company">{{filter.priceFilter(statisticsObj.todayOutput || 0)}}</view> <view class="company">{{filter.priceFilter(statisticsObj.todayOutput || 0)}}</view>
<!-- <view class="decimal">.{{statisticsObj.todayTurDecimal}}</view>-->
</view> </view>
<view class="count num"> <view class="count num">
今日成交量/单 今日成交量/单
...@@ -20,7 +19,6 @@ ...@@ -20,7 +19,6 @@
<view class="num item"> <view class="num item">
<view class="labelStr">¥</view> <view class="labelStr">¥</view>
<view class="company">{{filter.priceFilter(statisticsObj.output || 0)}}</view> <view class="company">{{filter.priceFilter(statisticsObj.output || 0)}}</view>
<!-- <view class="decimal">.{{statisticsObj.totalTurDecimal}}</view>-->
</view> </view>
<view class="count num"> <view class="count num">
累计订单量/单 累计订单量/单
...@@ -28,10 +26,10 @@ ...@@ -28,10 +26,10 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<!-- style="margin-top:{{navBarHeight}}px" --> <!-- style="margin-top:{{navBarHeight}}px" -->
<view class="main"> <view class="main" style="height: calc(100vh - {{navBarHeight}}px);">
<view class="to-box"> <view class="to-box">
<view class="search-box"> <view class="search-box">
<view class='select_box'> <view class='select_box'>
......
.main { .main {
margin-top: -20rpx; /* margin-top: -20rpx; */
background: #FFFFFF; background: #FFFFFF;
border-radius: 48rpx 48rpx 0 0; border-radius: 48rpx 48rpx 0 0;
overflow: hidden; overflow: hidden;
height: calc(100% - 260rpx);
} }
.to-box { .to-box {
...@@ -17,7 +16,7 @@ ...@@ -17,7 +16,7 @@
.search-box { .search-box {
width: calc(100% - 64rpx); width: calc(100% - 64rpx);
margin: 53rpx 32rpx 0; margin: 34rpx 32rpx 0;
display: flex; display: flex;
background-color: #fff; background-color: #fff;
position: sticky; position: sticky;
......
// import activityList from './constant/data' // import activityList from './constant/data'
import activityApi from '~/packageCrowdFunding/api' import activityApi from '~/packageCrowdFunding/api'
import {getStaffListByMerchant} from "~/store/index"
const app = getApp()
Component({ Component({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -56,12 +57,19 @@ Component({ ...@@ -56,12 +57,19 @@ Component({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_crowdFunding || {} storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_crowdFunding || {}
}) })
if (!noGetList) this.getActivityList(true) if (!noGetList) this.getActivityList(true)
this.getReferenceData()
}, },
onBottomRefresh() { onBottomRefresh() {
this.getActivityList() this.getActivityList()
}, },
async getReferenceData() {
let { storeInfo } = this.data
let result = await getStaffListByMerchant({merchantId: storeInfo?.merchantId})
app.globalData.staffListRange = result || []
},
getActivityList(isReset = false) { getActivityList(isReset = false) {
let { pageSize, pageNum, activityName, storeInfo, nothing, tabIndex, activityStatusList, tabList } = this.data let { pageSize, pageNum, activityName, storeInfo, nothing, tabIndex, activityStatusList, tabList } = this.data
if (nothing) { if (nothing) {
......
...@@ -69,12 +69,16 @@ Component({ ...@@ -69,12 +69,16 @@ Component({
}, { }, {
menuText: '活动管理', menuText: '活动管理',
icon: 'event_management', icon: 'event_management',
path: '' path: '',
}, { isTab: true,
menuText: '话术库', tabIndex: 1
icon: 'script _library', },
path: '' // {
}], // menuText: '话术库',
// icon: 'script _library',
// path: ''
// }
],
loginRoleLabel: { loginRoleLabel: {
1: '超管', 1: '超管',
2: '商户管理员', 2: '商户管理员',
...@@ -105,7 +109,9 @@ Component({ ...@@ -105,7 +109,9 @@ Component({
}, },
navGo(e) { navGo(e) {
console.log(e) console.log(e)
const thisPage = wx.$router.getPageInstance()
let {item} = e.currentTarget.dataset let {item} = e.currentTarget.dataset
if (item.isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: item?.tabIndex})
if (!item.path) wx.$util.showToast('模块暂未开通\r\n敬请期待') if (!item.path) wx.$util.showToast('模块暂未开通\r\n敬请期待')
}, },
} }
......
// pages/sceneIndex/sceneIndex.js
import logOutAPI from '../../tabMine/api'
import constantData from '../constant/data'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
timeState: '',
sceneList: constantData.sceneList,
isShow: false,
userBoxHeight: 0
},
// 选择场景
selectScene(e) {
let { scene, index } = e.currentTarget.dataset
let { sceneList } = this.data
wx.$router.go(constantData?.pageUrl[scene])
sceneList.map(i => (i.actived = false))
sceneList[index].actived = true
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), selectedSceneType: scene })
// console.log({ ...wx.$util.getUserInfo(), selectedSceneType: scene });
this.setData({
sceneList
})
wx.$util.pointRecord( sceneList[index].recordId)
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
let { sceneList } = this.data
let userInfo = wx.$util.getUserInfo() || {}
let openSceneArr = userInfo?.openSceneArr || []
this.setData({
timeState: wx.$util.getTimeState()
})
wx.hideHomeButton({
success: res => {}
})
// 获取开通业务场景
let arr = sceneList.filter(v => openSceneArr.includes(v.sceneType))
this.setData({
isShow: Object.keys(userInfo).length,
sceneList: arr
})
wx.$util.getViewInfo('.user-box', res => {
this.setData({
userBoxHeight: res?.height
})
},)
},
// 切换账号
changeAccount() {
wx.$router.reLaunch('pages.accountItems')
},
// 退出账号
logout() {
let _this = this
wx.showModal({
title: '温馨提示',
content: '是否退出当前账号?',
confirmColor: '#3582EE',
success(res) {
if (res.confirm) {
_this.setData({
flag: true
})
_this.showLoading()
logOutAPI.logout().then(_res_ => {
let { code, message } = _res_
if (code == 0) {
app.login(false)
} else {
_this.setData({
flag: false
})
_this.showToast(message)
}
})
}
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
let { sceneList } = this.data
let userInfo = wx.$util.getUserInfo()
let openSceneArr = userInfo?.openSceneArr || []
openSceneArr.includes(userInfo?.selectedSceneType) &&
sceneList.map(i => {
i.actived = false
if (i.sceneType == userInfo?.selectedSceneType) {
i.actived = true
}
return i
})
this.setData({ sceneList })
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {}
})
{
"navigationBarTitleText": "切换场景",
"usingComponents": {}
}
\ No newline at end of file \ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file \ No newline at end of file
<!-- pages/sceneIndex/sceneIndex.wxml -->
<view class="layout" wx:if="{{isShow}}">
<scroll-view class="scene-box" scroll-y style="height: calc(100vh - 140rpx - {{userBoxHeight}}px - {{isFullSucreen ? 34 : 0}}px - 60rpx);">
<block wx:for="{{sceneList}}" wx:key="index">
<view class="scene-item {{item.actived ? 'active' : ''}}" bindtap="selectScene" data-scene="{{item.sceneType}}" data-index="{{index}}">
<view class="left">
<image class="scene-icon" src="https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/scene_type_{{item.sceneType}}.png" />
<view class="item-text">
<view class="name">{{item.sceneName}}</view>
<view class="desc">{{item.sceneDesc}}</view>
</view>
</view>
<view class="right">
<image wx:if='{{!item.actived}}' src="/images/arrow-right.png" />
<view class="selected-class" wx:else>当前场景</view>
</view>
</view>
</block>
</scroll-view>
<!-- <view class="btn-box {{isFullSucreen?'isFullSucreen-btn':''}}">
<view class="logout text-center" bindtap="logout">退出账号</view>
</view> -->
</view>
/* pages/sceneIndex/sceneIndex.wxss */
page {
background-color: #F3F5F7;
height: 100vh;
}
.user-box {
padding: 16px;
font-size: 28rpx;
color: #333333;
}
.user-info {
display: flex;
align-items: center;
}
.user-avatar {
width: 96rpx;
height: 96rpx;
overflow: hidden;
border-radius: 100%;
margin-right: 24rpx;
}
.user-info .right{
display: flex;
flex: 1;
justify-content: space-between;
align-items: center;
}
.user-text .item {
font-size: 36rpx;
font-weight: 600;
color: #333333;
}
.user-text .merchant-name{
font-size: 26rpx;
font-weight: 400;
color: #6E6E7A;
}
.scene-box{
padding: 32rpx;
overflow: hidden;
box-sizing: border-box;
}
.scene-box .scene-item{
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
height: 192rpx;
background: #FFFFFF;
/* box-shadow: 0 48rpx 20rpx -40rpx #D8D9E6; */
border-radius: 24rpx;
padding: 32rpx;
margin: 24rpx 0;
position: relative;
}
.scene-box .scene-item:first-child{
margin-top: 0;
}
.scene-item .left{
display: flex;
}
.scene-item .left .scene-icon{
width: 128rpx;
height: 128rpx;
border-radius: 20rpx;
margin-right: 24rpx;
}
.scene-item .left .item-text{
padding: 16rpx 0;
}
.scene-item .left .item-text .name{
color: #333333;
font-size: 32rpx;
font-weight: 600;
}
.scene-item .left .item-text .desc{
color: #9B9B9E;
font-size: 24rpx;
font-weight: 400;
margin-top: 10rpx;
}
.scene-item .right image{
width: 14rpx;
height: 24rpx;
}
.scene-item .right .selected-class{
position: absolute;
top: 0rpx;
right: 0;
width: 128rpx;
height: 48rpx;
background: rgba(53, 130, 238, .1);
border-radius: 0 24rpx 0 24rpx;
color: #3582EE;
font-size: 24rpx;
font-weight: 600;
display: flex;
justify-content: center;
align-items: center;
}
.change-btn{
width: 156rpx;
height: 56rpx;
border: 2rpx solid #9B9B9E;
border-radius: 32rpx;
line-height: 56rpx;
text-align: center;
color: #6C6C70;
font-size: 26rpx;
font-weight: 400;
}
.btn-box {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
height: 140rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 20;
background-color: #fff;
font-size: 32rpx;
color: #fff;
letter-spacing: 13rpx;
}
.isFullSucreen-btn {
padding-bottom: 34px !important;
}
.logout {
width: calc(100% - 80rpx);
height: 80rpx;
line-height: 80rpx;
text-align: center;
background-color: #3582EE;
border-radius: 16rpx;
}
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
/* left: 0; /* left: 0;
bottom: 60rpx; */ bottom: 60rpx; */
font-size: 24rpx; font-size: 24rpx;
color: #858A94; color: #8F959E;
letter-spacing: 2rpx; letter-spacing: 2rpx;
/* padding-left: 28rpx; */ /* padding-left: 28rpx; */
box-sizing: border-box; box-sizing: border-box;
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
left: 0; left: 0;
bottom: 60rpx; bottom: 60rpx;
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #8F959E;
letter-spacing: 2rpx; letter-spacing: 2rpx;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
......
/* pages/log/log.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -112,6 +112,11 @@ ...@@ -112,6 +112,11 @@
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
} }
.items.active{
width: calc(100% - 8rpx);
border: 4rpx solid #347BFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
}
.items .left{ .items .left{
width: 65%; width: 65%;
display: flex; display: flex;
......
{ {
"navigationBarTitleText": "场景切换", "navigationBarTitleText": "选择场景",
"usingComponents": {} "usingComponents": {}
} }
\ No newline at end of file \ No newline at end of file
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<view class="desc">{{item.sceneDesc}}</view> <view class="desc">{{item.sceneDesc}}</view>
</view> </view>
</view> </view>
<view class="right"> <!-- <view class="right">
<image wx:if='{{!item.actived}}' src="/images/arrow-right.png" /> <image wx:if='{{!item.actived}}' src="/images/arrow-right.png" />
<view class="selected-class" wx:else>当前场景</view> <view class="selected-class" wx:else>当前场景</view>
</view> </view> -->
</view> </view>
</block> </block>
</scroll-view> </scroll-view>
......
...@@ -42,7 +42,7 @@ page { ...@@ -42,7 +42,7 @@ page {
} }
.scene-box{ .scene-box{
padding: 40rpx 32rpx; padding: 32rpx;
overflow: hidden; overflow: hidden;
box-sizing: border-box; box-sizing: border-box;
} }
...@@ -54,13 +54,18 @@ page { ...@@ -54,13 +54,18 @@ page {
box-sizing: border-box; box-sizing: border-box;
height: 192rpx; height: 192rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 48rpx 20rpx -40rpx #D8D9E6; /* box-shadow: 0 48rpx 20rpx -40rpx #D8D9E6; */
border-radius: 24rpx; border-radius: 24rpx;
padding: 32rpx; padding: 32rpx;
margin: 24rpx 0; margin: 24rpx 0;
position: relative; position: relative;
} }
.scene-box .scene-item.active{
border: 4rpx solid #347BFF;
height: 184rpx;
}
.scene-box .scene-item:first-child{ .scene-box .scene-item:first-child{
margin-top: 0; margin-top: 0;
} }
......
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
</view> </view>
<autoLogin-btn></autoLogin-btn> <autoLogin-btn></autoLogin-btn>
</block> </block>
<view class="auth_box"> <view class="auth_box {{loginType == 3 ? '' : 'lear_bottom'}}">
<!-- 协议 --> <!-- 协议 -->
<auth-setting bind:choose="authChoose" agree="{{ agree }}" /> <auth-setting bind:choose="authChoose" agree="{{ agree }}" />
<!-- 30天免登录 --> <!-- 30天免登录 -->
<auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}"></auth-noLogin> <auth-noLogin bind:choose="noLoginAgreeChoose" agree="{{ noLoginAgree }}" wx:if="{{loginType == 3}}"></auth-noLogin>
</view> </view>
</view> </view>
</view> </view>
...@@ -85,11 +85,15 @@ ...@@ -85,11 +85,15 @@
class="auth-dialog-class" class="auth-dialog-class"
width="552rpx" width="552rpx"
show-cancel-button show-cancel-button
confirmButtonText="同意" confirmButtonText="同意"
use-title-slot="{{ true }}"
confirm-button-color="#5092FF" confirm-button-color="#5092FF"
bind:confirm="agreeEvent" bind:confirm="agreeEvent"
bind:close="onClose" bind:close="onClose"
> >
<view slot="title">
<view class="title_text">隐私协议与用户协议</view>
</view>
<view class="message-box"> <view class="message-box">
<view class="message">为保障你的合法权益,请阅读并同意</view> <view class="message">为保障你的合法权益,请阅读并同意</view>
<text catchtap="jump" data-url="privacy">《隐私协议》</text> <text catchtap="jump" data-url="privacy">《隐私协议》</text>
......
...@@ -111,6 +111,13 @@ page { ...@@ -111,6 +111,13 @@ page {
color: #333333; color: #333333;
} }
.title_text{
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 36rpx;
color: #333333;
}
.message-box text { .message-box text {
color: #5092FF; color: #5092FF;
} }
...@@ -168,7 +175,7 @@ page { ...@@ -168,7 +175,7 @@ page {
} }
.login-form .code-disabled { .login-form .code-disabled {
color: #A5A5A7; color: #BEC1C7;
} }
.login-form .login_btn { .login-form .login_btn {
...@@ -199,4 +206,8 @@ page { ...@@ -199,4 +206,8 @@ page {
left: 50%; left: 50%;
bottom: 368rpx; bottom: 368rpx;
transform: translateX(-50%); transform: translateX(-50%);
}
\ No newline at end of file \ No newline at end of file
}
.auth_box.lear_bottom{
bottom: 418rpx;
}
// subvehicleConversion/components/activityList/activityList.js
import api from '../../api'
Component({
// options: {
// styleIsolation: 'apply-shared',
//
// },
/**
* 组件的属性列表
*/
properties: {
navBarHeight: Number
},
/**
* 组件的初始数据
*/
data: {
searchObj: {},
storeInfo:{},
userInfo:{},
activityName: '',
list: [],
tabIndex: 0,
nothing: false,
pageSize: 6,
pageNum: 1,
total: 0,
tabList: ['全部', '进行中', '待开始', '已结束'],
activityStatusList: [
{
confName: '全部',
confId: ''
},
{
confName: '待开始',
confId: '1'
},
{
confName: '进行中',
confId: '2'
},
{
confName: '已结束',
confId: '3'
}
],
outputData:{
},
crowdPosterItem: {}
},
lifetimes: {
attached() {
this.setData({
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {},
userInfo: wx.$util.getUserInfo() || {}
})
// const {storeInfo} =this.data
// this.getAnalysis(storeInfo.merchantId)
this.onLoad(true)
}
},
methods: {
getAnalysis(merchantId){
api.getAnalysis({merchantId}).then(res=>{
this.setData({
outputData:res.data
})
})
},
// 首次进入会触发该方法,因此不需要在attached调getList
tabClick(e) {
let {searchObj} = this.data
this.setData({
tabIndex: e?.detail,
searchObj
})
this.search()
},
onLoad(noGetList) {
this.setData({
nothing: false,
pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {}
})
if (!noGetList) this.getActivityList(true)
const {storeInfo} =this.data
this.getAnalysis(storeInfo.merchantId)
},
onBottomRefresh() {
this.getActivityList()
},
getActivityList(isReset = false) {
let {pageSize, pageNum, activityName, storeInfo, nothing, tabIndex, activityStatusList, tabList} = this.data
if (nothing) {
return
}
let params = {
pageSize,
pageNum,
activityName,
activityStatus: activityStatusList.find(item => item.confName == tabList[tabIndex])?.confId || '',
merchantId: storeInfo?.merchantId
}
api.queryTransActivityList(params).then(res => {
if (res.code == '0') {
let {list, total} = res.data
let tempList = isReset ? list : this.data.list.concat(list || [])
this.setData({
list: tempList,
pageNum: pageNum + 1,
total,
nothing: total == tempList.length,
triggered: false
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
} else {
this.setData({
list: [],
nothing: false,
total: 0
})
wx.$util.showToast(res.message || '接口异常')
}
})
},
search() {
this.setData({
pageNum: 1,
nothing: false,
total: 0
})
this.getActivityList(true)
},
handleReset() {
this.setData({
activityName: ''
})
this.search()
},
input(e) {
let {value} = e.detail
this.setData({
activityName: value
})
},
clickVisitor(e) {
const {target} = e.currentTarget.dataset
wx.$router.go('visitor', {
activityId: target.activityId
})
},
clickOrder(e) {
const {target} = e.currentTarget.dataset
wx.$router.go('order', {
activityId: target.activityId
})
},
shareActivity(e) {
const {target} = e.currentTarget.dataset
console.log(target)
const storeInfo = wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {}
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: `/packageShopmall/packageExpandedGold/pages/activity/index/index?id=${target.activityId}&userPhone=${target.serviceStaffPhone}&shareStaffName=${target.serviceStaffName}&shareStaffUuid=${target.serviceStaffUuid}&merchantId=${storeInfo.merchantId}&isExclusive=1&form=task&shareStaffType=3&notIntercept=true`,
envVersion: 'trial',
success(res) {
// 打开成功
}
})
},
async longtouch(e) {
console.log('长按海报', e)
},
async download(e) {
const {target} = e.currentTarget.dataset
const {activityId,activityName} = target
await api.queryPoster({activityId}).then(res => {
console.log(res)
if (res.code == '0') {
this.setData({
crowdPosterItem:{
activityName,
posterUrl: res.data
},
// isShowTip: false
})
}
})
},
}
})
{
"component": true,
"usingComponents": {
"crowdfund-poster":"../CrowdfundPoster/CrowdfundPoster",
"invert-analyse": "../invertAnalyse/invertAnalyse"
}
}
/* subvehicleConversion/components/activityList/activityList.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/components/activityList/activityList.wxml-->
<wxs src="index.wxs" module="filter"/>
<view class="layout" style="padding-top:{{navBarHeight}}px;position: relative;">
<block>
<view class="main">
<view class="to-box">
<view class="search-box">
<view class="search-input">
<image src="/images/search.png" class="search-icon"/>
<input type="text" placeholder="请输入活动名称" class="input" confirm-type="search"
value="{{activityName}}" placeholder-class="input-placeholder" bindinput="input"
bindconfirm="search"/>
<block wx:if="{{activityName}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset"/>
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick"/>
</view>
</view>
</block>
</view>
<block>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
class="list"
style="height:calc(100vh - {{navBarHeight}}px - 208rpx);"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}">
<block>
<view class="empty"></view>
<block wx:for="{{list}}" wx:key="index">
<view class="activity-box">
<view class="activity-name">
<view class="activity-avatar">
<image src="{{item.activityImg}}" />
</view>
<view class="activity-status">
<view class="left">
<view class="name">{{item.activityName}}</view>
<!-- <view class="status">-->
<view class="status status-red" wx:if="{{item.activityStatus == 2}}">
<image src="/subvehicleConversion/images/fire.png"></image>
进行中
</view>
<view class=" status status-gray" wx:if="{{item.activityStatus == 3}}">
<image src="/subvehicleConversion/images/hook.png"></image>
已结束
</view>
<view class=" status status-blue" wx:if="{{item.activityStatus == 1}}">
<image src="/subvehicleConversion/images/clock.png"></image>
待开始
</view>
<!-- </view>-->
<view class="time">
<view wx:if="{{item.startTime && item.endTime}}">
<text>{{item.startTime || ''}}</text>
<text> 至 </text>
<text>{{item.endTime}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="details-list">
<view class="details">
<view class="details-num">{{item.totalFansCount}}</view>
<view class="details-text">访客</view>
</view>
<view class="details">
<view class="details-num">{{item.totalOrderCount}}</view>
<view class="details-text">订单</view>
</view>
<view class="details">
<view class="details-num"><text class="small-num">¥</text>
{{filter.priceFilter(item.totalOutputValue || 0)}}
</view>
<view class="details-text">产值(总)/元</view>
</view>
</view>
<view class="activity-menu">
<view class="orderListBtn" bindtap="clickVisitor" data-target="{{item}}">我的访客</view>
<view class="orderListBtn" bindtap="clickOrder" data-target="{{item}}">我的订单</view>
<view class="orderListBtn" bindtap="shareActivity" data-target="{{item}}">分享活动</view>
<view class="orderListBtn" bindtap="download" data-target="{{item}}">分享母链</view>
</view>
</view>
</block>
</block>
<view class="box measure-box" wx:if="{{tabIndex==0}}">
<view class="box-title">转化分析</view>
<invert-analyse data="{{outputData}}"></invert-analyse>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="/subvehicleConversion/images/noData.png" />
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</block>
<!--&lt;!&ndash; bindlongtouch="longtouch"&ndash;&gt; scrollImg="{{false}}"-->
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" bindlongtouch="longtouch" />
.headerBar {
position: relative;
width: 100%;
height: 212rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/equityBg.png');
background-size: 100% 100%;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.headerBar .totalCount {
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 16rpx 32rpx 32rpx;
font-size: 24rpx;
color: #6C6C70;
}
.headerBar .totalCount .item {
/* display: flex; */
box-sizing: border-box;
position: relative;
height: 144rpx;
width: 33%;
background: #FFFFFF;
box-shadow: 0 6rpx 24rpx 0 #caccdb80;
border-radius: 16rpx;
padding: 20rpx 24rpx;
margin-right: 16rpx;
}
.totalCount .total-icon {
position: absolute;
top: 2rpx;
right: 4rpx;
width: 88rpx;
height: 88rpx;
}
.headerBar .totalCount .item:last-child {
margin: 0;
}
.headerBar .totalCount .num {
height: 64rpx;
line-height: 64rpx;
font-size: 48rpx;
color: #222222;
font-weight: 600;
margin-top: 8rpx;
}
/* .headerBar .totalCount .item {
margin: 25rpx 0 25rpx;
} */
.headerBar .totalCount .company {
font-size: 48rpx;
}
.headerBar .totalCount .line {
width: 2rpx;
height: 116rpx;
background: #ffffff59
}
.headerBar .totalCount .countNum {
font-size: 34rpx;
font-weight: 500;
margin-left: 15rpx;
}
.headerBar .totalCount .labelStr {
margin-right: 5rpx;
}
.headerBar .totalCount .right {
margin-left: 40rpx;
}
.main {
margin-top: -20rpx;
background: #FFFFFF;
border-radius: 48rpx 48rpx 0 0;
overflow: hidden;
height: calc(100% - 192rpx);
}
.to-box {
position: sticky;
left: 0;
z-index: 2;
/* box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10); */
}
.search-box {
width: 100%;
padding: 32rpx 32rpx 0;
display: flex;
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: 100%;
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;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.list{
box-sizing: border-box;
}
.empty{
width: 100%;
height: 20rpx;
background-color: transparent;
}
.activity-box {
margin: 0 20rpx 20rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 16rpx;
z-index: 100;
}
.activity-box .activity-name {
display: flex;
padding-left: 35rpx;
padding-bottom: 20rpx;
/*justify-content: space-around;*/
}
.activity-box .activity-name .activity-avatar {
width: 150rpx;
height: 150rpx;
}
.activity-box .activity-name .activity-status {
width: 70%;
display: flex;
justify-content: space-between;
padding-top: 15rpx;
margin: 0rpx 20rpx;
}
/*.activity-box .activity-name .activity-status .left{*/
/* width: calc(100% - 100rpx);*/
/*}*/
.activity-box .activity-name .activity-status .name {
font-size: 30rpx;
width: 100%;
}
.activity-box .activity-name .activity-status .time {
font-size: 20rpx;
color: #9B9B9E;
margin-top: 20rpx;
display: flex;
}
.activity-box .activity-name .activity-status .status {
margin-top: 8rpx;
font-size: 28rpx;
display: flex;
align-items: center;
/* padding-left: 60rpx; */
}
.activity-box .activity-name .activity-status image {
width: 30rpx;
height: 30rpx;
margin-right: 8rpx;
/* padding-left: 60rpx; */
}
.status-blue {
color: #3666FE;
}
.status-red {
color: #EB4E4E;
}
.status-gray {
color: #7A8299;
}
.activity-box .details-list{
background:#F2F7FE ;
border-radius: 10px;
padding: 20rpx;
margin: 15rpx;
display: flex;
justify-content: space-around;
text-align: center;
}
.activity-box .details-list .details .details-num{
font-weight: 600;
}
.activity-box .details-list .details .details-num .small-num{
font-size: 24rpx;
}
.activity-box .details-list .details .details-text{
font-size: 24rpx;
color: #5A6066;
}
.activity-box .activity-menu {
margin-top: 15rpx;
/*padding: 0 20rpx;*/
width: 100%;
display: flex;
justify-content: space-around;
}
.activity-box .activity-menu .orderListBtn {
color: #3582EE;
/*background: #3582EE;*/
width: 150rpx;
height: 46rpx;
font-size: 24rpx;
text-align: center;
line-height: 46rpx;
border:1px solid #3582EE;
border-radius: 16px;
}
.activity-box .activity-list .activity-pay {
display: flex;
align-items: center;
}
.activity-box .activity-list .activity-pay .havePaid {
display: flex;
}
.activity-box .activity-list .activity-pay .havePaid .havePaidSum {
color: #FF9D0A;
}
.activity-box .activity-list .activity-pay .unpaid {
display: flex;
margin-left: 25rpx;
}
.activity-box .activity-list .activity-pay .unpaid .unpaidNum {
color: #EB4E4E;
}
.no-data {
text-align: center;
padding-top: 128rpx;
}
.no-data-img {
width: 160rpx;
height: 160rpx;
}
.list-nothing,
.list-not {
text-align: center;
}
.box {
margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
}
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;}
...@@ -18,6 +18,11 @@ Page({ ...@@ -18,6 +18,11 @@ Page({
selectedIconPath: '/images/tab-order-active.png' selectedIconPath: '/images/tab-order-active.png'
}, },
{ {
name: '活动管理',
iconPath: '/images/tab-order.png',
selectedIconPath: '/images/tab-order-active.png'
},
{
name: '设置', name: '设置',
iconPath: '/images/tab-setting.png', iconPath: '/images/tab-setting.png',
selectedIconPath: '/images/tab-setting-active.png' selectedIconPath: '/images/tab-setting-active.png'
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"custom-tabBar": "/components/CustomTabBar/CustomTabBar", "custom-tabBar": "/components/CustomTabBar/CustomTabBar",
"side-select-popup": "/components/SideSelectPopup/SideSelectPopup", "side-select-popup": "/components/SideSelectPopup/SideSelectPopup",
"index-page": "../indexPage/index", "index-page": "../indexPage/index",
"activity-page": "../activityPage/activityManagement/activityManagement",
"order-page": "../orderPage/supplementaryOrderList/supplementaryOrderList", "order-page": "../orderPage/supplementaryOrderList/supplementaryOrderList",
"tab-mine": "/components/TabMine/TabMine" "tab-mine": "/components/TabMine/TabMine"
}, },
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
<block wx:if="{{ navBarHeight && showPage }}"> <block wx:if="{{ navBarHeight && showPage }}">
<index-page id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}"></index-page> <index-page id="page-0" class="pagedetail {{ tabIndex == 0?'':'hide' }}"></index-page>
<order-page id="page-1" class="pagedetail {{ tabIndex == 1?'':'hide' }}"></order-page> <order-page id="page-1" class="pagedetail {{ tabIndex == 1?'':'hide' }}"></order-page>
<tab-mine id="page-2" class="pagedetail {{ tabIndex == 2?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine> <activity-page id="page-2" class="pagedetail {{ tabIndex == 2?'':'hide' }}"></activity-page>
<tab-mine id="page-3" class="pagedetail {{ tabIndex == 3?'':'hide' }}" navBarHeight="{{ navBarHeight }}"></tab-mine>
</block> </block>
</view> </view>
<custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" /> <custom-tabBar list="{{ tabBarList }}" color="#6C6C70" selectedColor="#3582EE" tabIndex="{{ tabIndex }}" bindchange="changeTabBar" />
......
// subvehicleConversion/pages/activityManagement/activityManagement.js // subvehicleConversion/components/activityList/activityList.js
import { get4SStoreList } from '~/store/index' import api from '~/subvehicleConversion/api'
Page({
Component({
/** // options: {
* 页面的初始数据 // styleIsolation: 'apply-shared',
*/ //
data: { // },
showStorePicker: false, /**
userInfo: {}, * 组件的属性列表
navBarHeight: 0, */
selectObj: { properties: {
key: 'merchantId', navBarHeight: Number
label: 'merchantName',
placeholder: '门店'
}, },
defaultSelectInfo: {},
},
init(userInfo) { /**
this.setData({ userInfo }) * 组件的初始数据
// this.getStoreList() */
}, data: {
searchObj: {},
storeInfo:{},
userInfo:{},
activityName: '',
list: [],
tabIndex: 0,
nothing: false,
pageSize: 6,
pageNum: 1,
total: 0,
tabList: ['全部', '进行中', '待开始', '已结束'],
activityStatusList: [
{
confName: '全部',
confId: ''
},
{
confName: '待开始',
confId: '1'
},
{
confName: '进行中',
confId: '2'
},
{
confName: '已结束',
confId: '3'
}
],
outputData:{
},
crowdPosterItem: {}
},
navbarReady(e) { lifetimes: {
let navBarHeight = e.detail.height attached() {
this.setData({ this.setData({
navBarHeight storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {},
}) userInfo: wx.$util.getUserInfo() || {}
}, })
// const {storeInfo} =this.data
// this.getAnalysis(storeInfo.merchantId)
this.onLoad(true)
}
},
showStorePicker() { methods: {
this.setData({ getAnalysis(merchantId){
showStorePicker: true api.getAnalysis({merchantId}).then(res=>{
}) this.setData({
}, outputData:res.data
})
})
},
// 首次进入会触发该方法,因此不需要在attached调getList
tabClick(e) {
let {searchObj} = this.data
this.setData({
tabIndex: e?.detail,
searchObj
})
this.search()
},
onLoad(noGetList) {
this.setData({
nothing: false,
pageNum: 1,
storeInfo: wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {}
})
if (!noGetList) this.getActivityList(true)
const {storeInfo} =this.data
this.getAnalysis(storeInfo.merchantId)
},
onBottomRefresh() {
this.getActivityList()
},
getActivityList(isReset = false) {
let {pageSize, pageNum, activityName, storeInfo, nothing, tabIndex, activityStatusList, tabList} = this.data
if (nothing) {
return
}
let params = {
pageSize,
pageNum,
activityName,
activityStatus: activityStatusList.find(item => item.confName == tabList[tabIndex])?.confId || '',
merchantId: storeInfo?.merchantId
}
api.queryTransActivityList(params).then(res => {
if (res.code == '0') {
let {list, total} = res.data
let tempList = isReset ? list : this.data.list.concat(list || [])
this.setData({
list: tempList,
pageNum: pageNum + 1,
total,
nothing: total == tempList.length,
triggered: false
})
if (isReset) {
this.setData({
scrollTop: 0
})
}
} else {
this.setData({
list: [],
nothing: false,
total: 0
})
wx.$util.showToast(res.message || '接口异常')
}
})
},
search() {
this.setData({
pageNum: 1,
nothing: false,
total: 0
})
this.getActivityList(true)
},
handleReset() {
this.setData({
activityName: ''
})
this.search()
},
input(e) {
let {value} = e.detail
this.setData({
activityName: value
})
},
clickVisitor(e) {
const {target} = e.currentTarget.dataset
wx.$router.go('visitor', {
activityId: target.activityId
})
},
clickOrder(e) {
const {target} = e.currentTarget.dataset
wx.$router.go('order', {
activityId: target.activityId
})
},
shareActivity(e) {
const {target} = e.currentTarget.dataset
console.log(target)
const storeInfo = wx.$util.getUserInfo()?.default4SStoreInfo_newCarConversion || {}
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: `/packageShopmall/packageExpandedGold/pages/activity/index/index?id=${target.activityId}&userPhone=${target.serviceStaffPhone}&shareStaffName=${target.serviceStaffName}&shareStaffUuid=${target.serviceStaffUuid}&merchantId=${storeInfo.merchantId}&isExclusive=1&form=task&shareStaffType=3&notIntercept=true`,
envVersion: 'trial',
success(res) {
// 打开成功
}
})
},
async longtouch(e) {
console.log('长按海报', e)
},
async download(e) {
const {target} = e.currentTarget.dataset
const {activityId,activityName} = target
await api.queryPoster({activityId}).then(res => {
console.log(res)
if (res.code == '0') {
this.setData({
crowdPosterItem:{
activityName,
posterUrl: res.data
},
// isShowTip: false
})
}
})
},
getStoreList(e) {
// 获取园区店下的4s店数据 超管拉全部数据
let { userInfo } = this.data
let params = {
merchantId: userInfo?.isSuper ? '' : userInfo?.merchantId,
scene: 3,
merchantName: e?.detail.value,
staffUUID: userInfo?.isSuper ? '' : userInfo?.uuid
} }
this.setData({
defaultSelectInfo: userInfo?.default4SStoreInfo_newCarConversion
})
get4SStoreList(params)
.then(result => {
userInfo = wx.$util.getUserInfo()
let selectStroeIndex =
result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_newCarConversion?.merchantId
}) > -1
? result?.findIndex(v => {
return v.merchantId == userInfo?.default4SStoreInfo_newCarConversion?.merchantId
})
: 0
this.setData({
storeListRange: result,
userInfo,
selectStroeIndex,
showPage: true
})
})
.catch(err => {})
},
changePicker(e) {
let { storeListRange, selectStroeIndex } = this.data
let value = (e.detail ?? '') === '' ? selectStroeIndex : e.detail
let default4SStoreInfo_newCarConversion = storeListRange[value]
wx.$util.setUserInfo({ ...wx.$util.getUserInfo(), default4SStoreInfo_newCarConversion })
this.setData({
userInfo: { ...wx.$util.getUserInfo(), ...default4SStoreInfo_newCarConversion },
showStorePicker: false,
defaultSelectInfo: default4SStoreInfo_newCarConversion
})
// 获取门店下活动列表
this.selectComponent(`#activityList-list`)?.onLoad && this.selectComponent(`#activityList-list`).onLoad()
},
back() {
wx.$router.back()
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
}) })
{ {
"component": true,
"usingComponents": { "usingComponents": {
"activity-list": "/subvehicleConversion/components/activityList/activityList" "crowdfund-poster":"/subvehicleConversion/components/CrowdfundPoster/CrowdfundPoster",
}, "invert-analyse": "/subvehicleConversion/components/invertAnalyse/invertAnalyse"
"navigationStyle": "custom" }
} }
/* subvehicleConversion/pages/activityManagement/activityManagement.wxss */
\ No newline at end of file \ No newline at end of file
<!--subvehicleConversion/pages/activityManagement/activityManagement.wxml--> <!--subvehicleConversion/components/activityList/activityList.wxml-->
<navigation-bar class="navigation-header" bindnavbarReady="navbarReady" showBack="{{true}}" bindback="back"> <wxs src="index.wxs" module="filter"/>
<view class="navigation-title"> <view class="layout" style="position: relative;">
<view class="navigation-title-text text-hide">{{userInfo && userInfo.default4SStoreInfo_newCarConversion && userInfo.default4SStoreInfo_newCarConversion.merchantName}}</view> <block>
</view> <view class="main">
</navigation-bar> <view class="to-box">
<view class="search-box">
<block wx:if="{{navBarHeight}}"> <view class="search-input">
<activity-list id="activityList-list" navBarHeight="{{navBarHeight}}"></activity-list> <image src="/images/search.png" class="search-icon"/>
<input type="text" placeholder="请输入活动名称" class="input" confirm-type="search"
value="{{activityName}}" placeholder-class="input-placeholder" bindinput="input"
bindconfirm="search"/>
<block wx:if="{{activityName}}">
<image src="/images/clear.png" class="search-clear" bindtap="handleReset"/>
</block>
</view>
</view>
<tab-bar tabList="{{tabList}}" bindclick="tabClick"/>
</view>
</view>
</block>
</view>
<block>
<scroll-view
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
bindrefresherrefresh="search"
bindscrolltolower="onBottomRefresh"
class="list"
style="height:calc(100% - 208rpx);"
refresher-threshold="104"
refresher-triggered="{{triggered}}">
<block wx:if="{{list.length > 0}}">
<block>
<view class="empty"></view>
<block wx:for="{{list}}" wx:key="index">
<view class="activity-box">
<view class="activity-name">
<view class="activity-avatar">
<image src="{{item.activityImg}}" />
</view>
<view class="activity-status">
<view class="left">
<view class="name">{{item.activityName}}</view>
<!-- <view class="status">-->
<view class="status status-red" wx:if="{{item.activityStatus == 2}}">
<image src="/subvehicleConversion/images/fire.png"></image>
进行中
</view>
<view class=" status status-gray" wx:if="{{item.activityStatus == 3}}">
<image src="/subvehicleConversion/images/hook.png"></image>
已结束
</view>
<view class=" status status-blue" wx:if="{{item.activityStatus == 1}}">
<image src="/subvehicleConversion/images/clock.png"></image>
待开始
</view>
<!-- </view>-->
<view class="time">
<view wx:if="{{item.startTime && item.endTime}}">
<text>{{item.startTime || ''}}</text>
<text> 至 </text>
<text>{{item.endTime}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="details-list">
<view class="details">
<view class="details-num">{{item.totalFansCount}}</view>
<view class="details-text">访客</view>
</view>
<view class="details">
<view class="details-num">{{item.totalOrderCount}}</view>
<view class="details-text">订单</view>
</view>
<view class="details">
<view class="details-num"><text class="small-num">¥</text>
{{filter.priceFilter(item.totalOutputValue || 0)}}
</view>
<view class="details-text">产值(总)/元</view>
</view>
</view>
<view class="activity-menu">
<view class="orderListBtn" bindtap="clickVisitor" data-target="{{item}}">我的访客</view>
<view class="orderListBtn" bindtap="clickOrder" data-target="{{item}}">我的订单</view>
<view class="orderListBtn" bindtap="shareActivity" data-target="{{item}}">分享活动</view>
<view class="orderListBtn" bindtap="download" data-target="{{item}}">分享母链</view>
</view>
</view>
</block>
</block>
<view class="box measure-box" wx:if="{{tabIndex==0}}">
<view class="box-title">转化分析</view>
<invert-analyse data="{{outputData}}"></invert-analyse>
</view>
<block wx:if="{{nothing}}">
<view class="list-nothing">到底了~</view>
</block>
</block>
<view class="no-data" wx:else>
<image class="no-data-img" src="/subvehicleConversion/images/noData.png" />
<view class="list-not">暂无数据</view>
</view>
</scroll-view>
</block> </block>
<!--&lt;!&ndash; bindlongtouch="longtouch"&ndash;&gt; scrollImg="{{false}}"-->
<crowdfund-poster item="{{crowdPosterItem}}" id="crowdPoster" bindlongtouch="longtouch" />
.navigation-header .navigation-bar { .headerBar {
position: relative;
width: 100%;
height: 212rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/equity/equityBg.png');
background-size: 100% 100%;
}
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.headerBar .totalCount {
box-sizing: border-box;
width: 100%;
display: flex;
align-items: center;
box-sizing: border-box;
padding: 16rpx 32rpx 32rpx;
font-size: 24rpx;
color: #6C6C70;
}
.headerBar .totalCount .item {
/* display: flex; */
box-sizing: border-box;
position: relative;
height: 144rpx;
width: 33%;
background: #FFFFFF;
box-shadow: 0 6rpx 24rpx 0 #caccdb80;
border-radius: 16rpx;
padding: 20rpx 24rpx;
margin-right: 16rpx;
}
.totalCount .total-icon {
position: absolute;
top: 2rpx;
right: 4rpx;
width: 88rpx;
height: 88rpx;
}
.headerBar .totalCount .item:last-child {
margin: 0;
}
.headerBar .totalCount .num {
height: 64rpx;
line-height: 64rpx;
font-size: 48rpx;
color: #222222;
font-weight: 600;
margin-top: 8rpx;
}
/* .headerBar .totalCount .item {
margin: 25rpx 0 25rpx;
} */
.headerBar .totalCount .company {
font-size: 48rpx;
}
.headerBar .totalCount .line {
width: 2rpx;
height: 116rpx;
background: #ffffff59
}
.headerBar .totalCount .countNum {
font-size: 34rpx;
font-weight: 500;
margin-left: 15rpx;
}
.headerBar .totalCount .labelStr {
margin-right: 5rpx;
}
.headerBar .totalCount .right {
margin-left: 40rpx;
}
.main {
margin-top: -20rpx;
background: #FFFFFF;
border-radius: 48rpx 48rpx 0 0;
overflow: hidden;
height: calc(100% - 192rpx);
}
.to-box {
position: sticky;
left: 0;
z-index: 2;
/* box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10); */
}
.search-box {
width: 100%;
padding: 32rpx 32rpx 0;
display: flex;
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: 100%;
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;
}
.search-box .search .text-center {
font-size: 24rpx;
/* background-color: #f7f7f7; */
border-radius: 12rpx;
width: 100%;
height: 50rpx;
color: #888;
}
.search-box .search .text-center .search-filter {
margin-left: 6rpx;
width: 24rpx;
height: 24rpx;
}
.list{
box-sizing: border-box;
}
.empty{
width: 100%;
height: 20rpx;
background-color: transparent; background-color: transparent;
box-shadow: none;
} }
.hide { .activity-box {
display: none; margin: 0 20rpx 20rpx;
padding-top: 20rpx;
padding-bottom: 20rpx;
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.10);
border-radius: 16rpx;
z-index: 100;
}
.activity-box .activity-name {
display: flex;
padding-left: 35rpx;
padding-bottom: 20rpx;
/*justify-content: space-around;*/
}
.activity-box .activity-name .activity-avatar {
width: 150rpx;
height: 150rpx;
}
.activity-box .activity-name .activity-status {
width: 70%;
display: flex;
justify-content: space-between;
padding-top: 15rpx;
margin: 0rpx 20rpx;
}
/*.activity-box .activity-name .activity-status .left{*/
/* width: calc(100% - 100rpx);*/
/*}*/
.activity-box .activity-name .activity-status .name {
font-size: 30rpx;
width: 100%;
}
.activity-box .activity-name .activity-status .time {
font-size: 20rpx;
color: #9B9B9E;
margin-top: 20rpx;
display: flex;
}
.activity-box .activity-name .activity-status .status {
margin-top: 8rpx;
font-size: 28rpx;
display: flex;
align-items: center;
/* padding-left: 60rpx; */
}
.activity-box .activity-name .activity-status image {
width: 30rpx;
height: 30rpx;
margin-right: 8rpx;
/* padding-left: 60rpx; */
}
.status-blue {
color: #3666FE;
}
.status-red {
color: #EB4E4E;
} }
.show { .status-gray {
display: block; color: #7A8299;
} }
.navigation-title { .activity-box .details-list{
background:#F2F7FE ;
border-radius: 10px;
padding: 20rpx;
margin: 15rpx;
display: flex;
justify-content: space-around;
text-align: center;
}
.activity-box .details-list .details .details-num{
font-weight: 600;
}
.activity-box .details-list .details .details-num .small-num{
font-size: 24rpx;
}
.activity-box .details-list .details .details-text{
font-size: 24rpx;
color: #5A6066;
}
.activity-box .activity-menu {
margin-top: 15rpx;
/*padding: 0 20rpx;*/
width: 100%;
display: flex;
justify-content: space-around;
}
.activity-box .activity-menu .orderListBtn {
color: #3582EE;
/*background: #3582EE;*/
width: 150rpx;
height: 46rpx;
font-size: 24rpx;
text-align: center;
line-height: 46rpx;
border:1px solid #3582EE;
border-radius: 16px;
}
.activity-box .activity-list .activity-pay {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center;
} }
.navigation-title-text { .activity-box .activity-list .activity-pay .havePaid {
display: flex;
}
.activity-box .activity-list .activity-pay .havePaid .havePaidSum {
color: #FF9D0A;
}
.activity-box .activity-list .activity-pay .unpaid {
display: flex;
margin-left: 25rpx;
}
.activity-box .activity-list .activity-pay .unpaid .unpaidNum {
color: #EB4E4E;
}
.no-data {
text-align: center; text-align: center;
max-width: calc(100% - 24rpx); padding-top: 128rpx;
}
.no-data-img {
width: 160rpx;
height: 160rpx;
} }
.navigation-title .arrow { .list-nothing,
flex-shrink: 0; .list-not {
width: 32rpx; text-align: center;
height: 32rpx;
margin-left: 4rpx;
transform: rotate(180deg);
transition: all 0.5s;
} }
.navigation-title .move { .box {
transform: rotate(270deg); margin: 20rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
padding: 32rpx 40rpx;
} }
.box-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
display: flex;
justify-content: space-between;}
...@@ -24,9 +24,9 @@ Component({ ...@@ -24,9 +24,9 @@ Component({
{title: '调查问卷', icon: 'questionnaire', isOpen: false}, {title: '调查问卷', icon: 'questionnaire', isOpen: false},
{title: '营销素材', icon: 'marketing_materials', isOpen: false}, {title: '营销素材', icon: 'marketing_materials', isOpen: false},
{title: '业务申请', icon: 'business_application', isOpen: false}, {title: '业务申请', icon: 'business_application', isOpen: false},
{title: '活动管理', icon: 'event_management', isOpen: true,path:'activityManagement'}, {title: '活动管理', icon: 'event_management', isOpen: true,path:'activityManagement', isTab: true, tabIndex: 2},
{title: '话术库', icon: 'script _library', isOpen: false}, // {title: '话术库', icon: 'script _library', isOpen: false},
// {title: '订单补录', imgName: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList'} {title: '订单补录', icon: 'supplementary_order', isOpen: true, path: 'supplementaryOrderList', isTab: true, tabIndex: 1}
], ],
staticDataList: [{ staticDataList: [{
label: '今日营业额', label: '今日营业额',
...@@ -54,7 +54,8 @@ Component({ ...@@ -54,7 +54,8 @@ Component({
methods: { methods: {
clickTap(e) { clickTap(e) {
const {item} = e.currentTarget.dataset const {item} = e.currentTarget.dataset
const {isOpen,path} = item const thisPage = wx.$router.getPageInstance()
const {isOpen,path, isTab, tabIndex} = item
if (!isOpen) { if (!isOpen) {
wx.showToast({ wx.showToast({
// image:'../../images/funel.png', // image:'../../images/funel.png',
...@@ -64,6 +65,7 @@ Component({ ...@@ -64,6 +65,7 @@ Component({
}) })
return return
} }
if (isTab) return thisPage.changeTabBar && thisPage.changeTabBar({detail: tabIndex})
wx.$router.go(path) wx.$router.go(path)
}, },
onLoad() { onLoad() {
......
...@@ -128,6 +128,7 @@ Page({ ...@@ -128,6 +128,7 @@ Page({
moveArrow: !this.data.moveArrow moveArrow: !this.data.moveArrow
}) })
}, },
// 获取4s店数据
get4SStoreList() { get4SStoreList() {
let userInfo = wx.$util.getUserInfo() let userInfo = wx.$util.getUserInfo()
let params = { let params = {
...@@ -140,6 +141,7 @@ Page({ ...@@ -140,6 +141,7 @@ Page({
}) })
}) })
}, },
// 超管获取园区店数据
getStoreList(e) { getStoreList(e) {
let { value } = e.detail let { value } = e.detail
getYQInfo(this.data.userInfo) getYQInfo(this.data.userInfo)
...@@ -154,14 +156,15 @@ Page({ ...@@ -154,14 +156,15 @@ Page({
}) })
.catch(err => {}) .catch(err => {})
}, },
changePicker(e) { changePicker(e, value) {
let { value } = e.detail console.log(e)
let { merchantId } = this.data.merchantRange[value] let { merchantId } = e
// 修改对应下标显示 // 修改对应下标显示
app.globalData.yqdInfo.subIndex = value app.globalData.yqdInfo.subIndex = value
let obj = {} let obj = {}
if (merchantId) obj.merchantId = merchantId if (merchantId) obj.merchantId = merchantId
wx.$util.showLoading('加载中...') wx.$util.showLoading('加载中...')
console.log(obj, '-------')
api.swtichSubLoginInfo(obj).then(res => { api.swtichSubLoginInfo(obj).then(res => {
console.log(res) console.log(res)
let { code, data, message } = res let { code, data, message } = res
...@@ -178,6 +181,7 @@ Page({ ...@@ -178,6 +181,7 @@ Page({
}, },
navTabPage (e){ navTabPage (e){
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
console.log(item)
if ('activeIndex' in item) { if ('activeIndex' in item) {
wx.$refresh = true wx.$refresh = true
item.url && wx.$router.go(item.url,{activeIndex:item.activeIndex}) item.url && wx.$router.go(item.url,{activeIndex:item.activeIndex})
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
<wxs src="../index.wxs" module="filter" /> <wxs src="../index.wxs" module="filter" />
<navigation-bar <navigation-bar
bindnavbarReady="navbarReady" bindnavbarReady="navbarReady"
showMenu="{{ userInfo.isSuper ? false : true }}" showMenu="{{ true }}"
bindback="back" bindback="back"
bindshowMenuPopup="showMenuPopup" bindshowMenuPopup="showMenuPopup"
navStyle="{{ navStyle }}" navStyle="{{ navStyle }}"
> >
<view class="navigation-title" bindtap="showStorePicker"> <view class="navigation-title">
<view class="navigation-title-text text-hide">{{userInfo.isSuper ? merchantRange[subIndex].merchantName : userInfo.selectedMerchantName}}</view> <view class="navigation-title-text text-hide">{{userInfo.isSuper ? merchantRange[subIndex].merchantName : userInfo.selectedMerchantName}}</view>
<view class="arrow" wx:if="{{ userInfo.isSuper }}"> <!-- <view class="arrow" wx:if="{{ userInfo.isSuper }}">
<image src="/images/arrow-bottom.png" /> <image src="/images/arrow-bottom.png" />
</view> </view> -->
</view> </view>
</navigation-bar> </navigation-bar>
<view <view
...@@ -324,11 +324,11 @@ ...@@ -324,11 +324,11 @@
wx:if="{{ showOrderpop }}" wx:if="{{ showOrderpop }}"
flag="{{ showOrderpop }}" flag="{{ showOrderpop }}"
/> />
<side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{storeRange}}" hasTabBar="true" /> <side-select-popup show="{{ shopSideSelectPopup }}" storeList="{{ userInfo.isSuper ? merchantRange : storeRange}}" subIndex="{{subIndex}}" hasTabBar="true" />
<store-picker <!-- <store-picker
subIndex="{{ subIndex }}" subIndex="{{ subIndex }}"
pickList="{{ merchantRange }}" pickList="{{ merchantRange }}"
show="{{ showPicker }}" show="{{ showPicker }}"
bindsearch="getStoreList" bindsearch="getStoreList"
bindconfirm="changePicker" bindconfirm="changePicker"
/>
\ No newline at end of file \ No newline at end of file
/> -->
\ No newline at end of file \ No newline at end of file
...@@ -263,7 +263,7 @@ Page({ ...@@ -263,7 +263,7 @@ Page({
}, },
// 切换场景 // 切换场景
changeScene() { changeScene() {
wx.$router.reLaunch('pages.sceneIndex') wx.$router.reLaunch('pages.changeScene')
}, },
// 切换账号 // 切换账号
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!