Commit be4d77b4 by 前端

fixed

1 parent 32d969da
Showing 165 changed files with 4672 additions and 24 deletions
## 正式版appid wx2c28337db96364d2
## 体验版appid wx24ebae5768e74138
## 体验版appid wxc50d04ae5aa9984a
......
import api from "~/utils/request/request";
const path = "scrm.api.stoassistant";
class ActivityApi {
// 获取活动列表数据
getActivityList(data) {
return api.post({
// method: `scrm.api.assistant.activity.page`,
method: `scrm.api.assistant.activity.staff.page`,
...data,
},
false
);
}
// 获取活动中任务内容
getActiveTaskList(data, params) {
return api.post({
method: `stoassistant.api.mission.findStaffMissionList`,
...data,
},
false,
);
}
// 获取单个任务详情内容
getActiveTaskDetail(data) {
return api.post({
method: "stoassistant.api.mission.getMissionById",
...data,
});
}
// 获取被分享者打开分享内容数据
getTaskShareDetail(data) {
return api.post({
method: "stoassistant.api.mission.getMissionByIdAndNoSession",
...data,
});
}
// 获取申请活动已开通场景
getOpenSceneList(data) {
return api.post({
method: "scrm.api.busassistant.activity.SceneOpenStatus.stoAss",
...data,
}, true);
}
// 获取申请活动可开通的产品
getNotOpenProductsList(data) {
return api.post({
method: "scrm.api.busassistant.activity.productOpenStatus.stoAss",
...data,
});
}
// 获取我的订单数据
getActivityOrderList(data) {
return api.post({
method: `${path}.user.activity.order.list`,
...data,
});
}
// 获取活动诊断待预约安装订单数据
getActivityEndInstallOrderList(data, params) {
return api.post({
method: `${path}.user.activity.to.be.installed.list`,
...data,
},
false
);
}
// 获取我的访客数据
getActivityVisitorList(data) {
return api.post({
method: `${path}.user.activity.visitor.list`,
...data,
});
}
// 救援码扫码信息分页查询
rescuePage(data) {
return api.post({
method: `entmicro.api.drac.rescue.card.scan.record.page`,
projectName: "entmicro",
...data,
});
}
// 获取当前活动的海报
getActivityPosters(data) {
return api.post({
method: `scrm.api.assistant.crowdFunding.poster`,
...data,
});
}
// 获取活动短链接
getActivityUrl(data) {
return api.post({
method: `scrm.api.assistant.activity.poster`,
...data,
});
}
// 任务分享埋点
taskShareReport(data) {
return api.post({
method: "entmicro.api.customercollect.reportCustomerList",
...data,
});
}
/** 线索埋点数据上报
* operationType 操作类型(0:分享 1:浏览 2:申请活动)
*/
reportData(data = {}, operationType = 0) {
return api.post({
method: "scrm.api.busassistant.clue.report",
...data,
operationType,
operationDate: new Date().format("yyyy-MM-dd hh:mm:ss"),
});
}
// 确认安装
comfirmInstall(data) {
return api.post({
method: `scrm.api.stoassistant.user.activity.confirm.install`,
...data,
});
}
// 获取膨胀金活动
getPengZApi(data) {
return api.post({
method: `scrm.api.assistant.bulge.staff.page`,
...data,
});
}
// 获取订阅配置
getSubscribeConfigApi(data) {
return api.post({
method: `entmicro.api.system.subscribe.findActivityIdList`,
...data
})
}
// 获取定保/救援车活动列表
getSubscribeListByIdsApi(data) {
return api.post({
method: `scrm.api.assistant.activity.bulge.staff.page.byIds`,
...data
})
}
// 查询福利官
getWelfareInfo(data) {
return api.post({
method: `entmicro.api.system.subscribe.findMerchantWelfareInfo`,
...data
})
}
// 查询订阅服务
checkSubcribe(data) {
return api.post({
method: `entmicro.api.system.subscribe.getOpenedMerchant`,
...data
})
}
// 私域客户看板
praviteBoradData(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.statics`,
...data
})
}
// 私域客户群里列表
praviteGroups(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.group`,
...data
})
}
// 私域访客列表
praviteVistitor(data) {
return api.post({
method: `scrm.api.stoassistant.wechat.cloud.welfare.customerVisit`,
...data
})
}
/**
* 活动中-订单列表-上传支付凭证
*/
uploadPaymentVoucher(data) {
return api.post({
method: 'scrm.api.stoassistant.user.activity.uploadPaymentVoucher',
...data
}, true)
}
/**
* 根据活动id查询任务详情 */
getFindMissionByActiviyId(activityId) {
const {
merchantId
} = wx.$storage.get('userInfo')
return api.post({
method: 'stoassistant.api.mission.findMissionByActiviyId',
bussinessType: 3,
merchantNo: merchantId,
activityId
})
}
/** 根据订阅类型查询膨胀金活动列表(包含当前员工统计数据*/
getActivityPageBySubscribe(data) {
return api.post({
method: `scrm.api.assistant.activity.bulge.staff.page.bySubscribe`,
...data
})
}
/**获取跟进分页列表 */
getFollowData(data) {
return api.post({
method: `stoassistant.api.follow.page`,
...data
})
}
/**完成跟进 */
finishFollow(data) {
return api.post({
method: `stoassistant.api.follow.finish`,
...data
})
}
/**创建广汇续保权益登记订单 */
sendEquity(data) {
return api.post({
method: `scrm.api.stoassistant.gh.expanded.gold.activity.order.create`,
...data
})
}
/**看产值-车损权益升级-产值总览 */
merchantsOutput(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.statistics`,
...data
})
}
/**看产值-车损权益升级-产值报表 */
merchantsOutputReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.report.forms`,
...data
})
}
/**看产值-车损权益升级-柱状图 */
merchantsHistogram(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.histogram.chart`,
...data
})
}
/**看产值-车损权益升级-趋势图 */
merchantsTrend(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.output.value.trend.chart`,
...data
})
}
/**看产值-车损权益升级-员工排行分页列表 */
merchantsStaffOutput(data) {
return api.post({
method: `scrm.api.boutiquecoupon.store.assistant.merchants.total.staff.output.value.statistics.page`,
...data
})
}
/**查询4s店商户产值总览、当日新增产值 --精品升级 */
boutiquecouponOutputValue(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.overview`,
...data
})
}
/**查询4s店商户查询员工产值排行信息--精品升级 */
boutiquecouponQueryEmployeeRankList(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryEmployeeRankList`,
...data
})
}
/**查询4s店商户查询发券量营业额统计数据--精品升级 */
boutiquecouponQueryCouponCountAndOrderMoney(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryCouponCountAndOrderMoney`,
...data
})
}
/**查询4s店商户查询营业额到店量统计数据--精品升级 */
boutiquecouponQueryOrderMoneyTotalAndToShopCount(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryOrderMoneyTotalAndToShopCount`,
...data
})
}
/**查询4s店商户日报表--精品升级 */
boutiquecouponQueryByDayReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryByDayReport`,
...data
})
}
/**查询4s店商户月报表--精品升级 */
boutiquecouponQueryByMonthReport(data) {
return api.post({
method: `scrm.api.boutiquecoupon.outputValue.queryByMonthReport`,
...data
})
}
}
export default ActivityApi;
\ No newline at end of file
import ActivityApi from './ActivityApi.js'
export default new ActivityApi()
\ No newline at end of file
import api from '~/utils/request/request'
module.exports = {
/**分页查询核销用户券 */
getBoutiquecouponList(data) {
return api.post({
method: `scrm.api.boutiquecoupon.customer.coupon.search`,
...data
})
},
/**获取商户券详情 */
getMerchantCoupon(id) {
return api.post({
method: `scrm.api.boutiquecoupon.merchantCoupon.getById`,
id
})
},
/** 获取精品礼券详情 */
getCouponDetail(id) {
return api.post({
method: 'scrm.api.boutiquecoupon.customer.coupon.detail',
id
})
},
/** 领取礼券 生成待核销码 */
getCoupon(data) {
return api.post({
method: `scrm.api.boutiquecoupon.customer.coupon.add`,
...data
})
},
/**获取园区店信息 */
getYqInfo(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.serviceMerchant.getByMerchantId',
...data
})
},
/** 精品交付单列表 */
getUserBoutiqueList(data) {
data.pageSize = 10
return api.post({
method: 'scrm.api.boutiquecoupon.goodsOrder.listMyOrder',
...data
},
true
)
},
/**扫码后根据订单号获取订单详情 */
scanGetDetailByOrderCode(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.order.detailScan',
...data
})
},
/**根据订单号获取订单详情 */
getDetailByOrderCode(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.order.detail',
...data
})
},
/**评价 */
addComment(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.orderComment.add',
...data
})
},
/**
* 门店助手精品礼券
*/
getMerchantCouponList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.merchant.coupon.list',
...data
}, true)
},
/**
* 门店助手精品礼券 核销记录
*/
getMerchantCustomerCouponList(data) {
data.pageSize = 10
return api.post({
method: 'scrm.api.boutiquecoupon.customer.coupon.search',
...data
}, true)
},
/**
* 根据门店ID获取4S店员工
*/
getMerchantEmployee(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.employee.getByMerchantId',
...data
}, true)
},
}
\ No newline at end of file
......@@ -46,5 +46,52 @@ class mineApi {
// true
)
}
// 获取服务中心下拉筛选 所有服务商数据
getServiceCenterListAPI(data) {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.listByServiceMerchantId',
...data
}
)
}
// 获取员工列表
getStaffListAPI(data) {
return api.post(
{
method: 'scrm.api.busassistant.staff.searchStaffPage',
...data
}
)
}
// 创建员工
createStaffAPI(data) {
return api.post(
{
method: 'scrm.api.busassistant.staff.createStaff',
...data
}
)
}
// 更新员工
updateStaffAPI(data) {
return api.post(
{
method: 'scrm.api.busassistant.staff.updateStaff',
...data
}
)
}
// 获取当前服务中心下的客户列表
getConnectionListByServiceAPI(data) {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.listByServiceCenterMerchantId',
...data
}
)
}
}
export default mineApi
import api from '~/utils/request/request'
// 分页查询客户管理列表
const getCustomerList = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.page',
...data
}
)
}
// 保存客户管理信息
const saveCustomer = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.save',
...data
},
true
)
}
// 修改客户管理信息
const updateCustomer = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.update',
...data
},
true
)
}
// 查询客户销售顾问列表
const getEmployeeList = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.employee.list',
...data
}
)
}
// 创建邀请销售顾问二维码
const getInviteCode = data => {
return api.post(
{
method: 'scrm.api.busassistant.merchantCustomer.inviteCode',
...data
}
)
}
export default {
getCustomerList,
saveCustomer,
updateCustomer,
getEmployeeList,
getInviteCode
}
\ No newline at end of file
import api from '~/utils/request/request'
// 查询服务中心列表-不分页
const getAllServiceList = data => {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.listByServiceMerchantId',
...data
}
)
}
// 分页查询服务中心列表
const getServiceList = data => {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.page',
...data
}
)
}
// 保存服务中心信息
const saveService = data => {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.save',
...data
},
true
)
}
// 修改服务中心信息
const updateService = data => {
return api.post(
{
method: 'scrm.api.busassistant.serviceCenter.update',
...data
},
true
)
}
// 分页查询技师列表
const getTechnicianList = data => {
return api.post(
{
method: 'scrm.api.busassistant.technicianConfig.page',
...data
}
)
}
// 新增技师信息
const addTechnician = data => {
return api.post(
{
method: 'scrm.api.busassistant.technicianConfig.add',
...data
},
true
)
}
// 修改技师信息
const updateTechnician = data => {
return api.post(
{
method: 'scrm.api.busassistant.technicianConfig.update',
...data
},
true
)
}
// 删除技师
const deleteTechnician = data => {
return api.post(
{
method: 'scrm.api.busassistant.technicianConfig.delete',
...data
},
true
)
}
export default {
getAllServiceList,
getServiceList,
saveService,
updateService,
getTechnicianList,
addTechnician,
updateTechnician,
deleteTechnician
}
\ No newline at end of file
......@@ -5,21 +5,21 @@ const CODE = {
productCode: 'PC00c3'
}
class outputApi {
/** 获取服务商(门店助手看产值)我的客户页总收益 */
/** 获取服务商(生意助手看产值)我的客户页总收益 */
getMerchantTotal(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.getMerchantTotal',
...data
})
}
/** 分页获取服务商(门店助手看产值)我的客户页数据 */
/** 分页获取服务商(生意助手看产值)我的客户页数据 */
getCustomerPageList(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.customerPageList',
...data
})
}
/** 服务商(门店助手看产值)我的客户详情数据 */
/** 服务商(生意助手看产值)我的客户详情数据 */
getCustomerDetail(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.partnermerchant.getCustomerDetail',
......@@ -37,7 +37,7 @@ class outputApi {
// true
)
}
/**获取服务商(门店助手看产值)我的门店页数据 */
/**获取服务商(生意助手看产值)我的门店页数据 */
partnerMerchantTotal(data) {
return api.post(
{
......@@ -80,9 +80,10 @@ class outputApi {
/** 查询门店权益订单数据统计-车险升级活动产值 */
getEquityRevenue(data) {
return api.post({
method: 'scrm.api.busassistant.merchant.equity.statistics',
// method: 'scrm.api.busassistant.merchant.equity.statistics',
method: 'dj.api.smartcarlife.vd.quotation.merchant.statistics',
...data
})
}, false, 'dj')
}
/** 店面汇总-下载海报 */
......@@ -115,5 +116,31 @@ class outputApi {
...data
})
}
/** 根据场景查询产品 */
findProByScene(data) {
return api.post({
method: 'scrm.api.busassistant.activity.productByscene',
...data
})
}
/** 业务经营汇总列表查询 */
getBusiStatistics(data) {
return api.post({
method: 'scrm.api.boutiquecoupon.store.assistant.merchants.total.statistics',
...data
})
}
// 我的员工
/** 服务商查询园区店员工产值统计 */
getStaffList(data) {
data.routerMethod = 'dj.api.smarcarlife.yquser.stat.byPartnerMerchant'
return api.post({
method: 'scrm.api.boutiquecoupon.rop.boutique.router.withoutLogin',
...data
})
}
}
export default outputApi
......@@ -3,8 +3,8 @@ const {
appId
} = wx.getAccountInfoSync().miniProgram
const CODE = {
platformEntrance: 'BUSINESS_ASSISTANT',
productCode: 'PC00c3'
platformEntrance: 'STORE_ASSISTANT_TOTAL',
productCode: 'PC00c5'
}
class UsersApi {
/**调用后台接口获取用户信息js_code换取sessionId */
......@@ -58,7 +58,7 @@ class UsersApi {
return api.post({
method: 'scrm.api.sso.wechat.applets.auth.phone',
...detail,
platformEntrance: 'BUSINESS_ASSISTANT' // 平台标识:门店助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT
platformEntrance: 'STORE_ASSISTANT_TOTAL' // 平台标识:生意助手-STORE_ASSISTANT_TOTAL,门店助手-STORE_ASSISTANT,门店助手-店总版-STORE_ASSISTANT_TOTAL
},
true
)
......@@ -89,7 +89,7 @@ class UsersApi {
method: 'scrm.api.sso.wechat.applets.sms.login',
...data,
source: 'MINIAPP',
platformEntrance: 'BUSINESS_ASSISTANT'
platformEntrance: 'STORE_ASSISTANT_TOTAL'
},
true
)
......@@ -165,7 +165,7 @@ class UsersApi {
return api.post({
method: 'scrm.api.sso.wechat.applets.phone.grant.analysis',
...detail,
platformEntrance: 'BUSINESS_ASSISTANT'
platformEntrance: 'STORE_ASSISTANT_TOTAL'
})
}
// 登录自动创建服务中心
......
......@@ -36,7 +36,6 @@ import './utils/share'
//监听网络状态
import './utils/network'
App({
onLaunch(options) {
/**挂载到wx对象 */
......
......@@ -13,7 +13,11 @@
"pages/measure/measure/measure",
"pages/measure/measureResult/measureResult",
"packagesList/activityDetail/activityDetail",
"packageOutput/pages/boutique/poutique"
"packageOutput/pages/boutique/poutique",
"packagesList/outDetail/index",
"packageOutput/pages/monthReport/monthReport",
"pages/tab/logout/logout",
"packageOutput/pages/crowdDetail/crowdDetail"
],
"requiredPrivateInfos": [
"getLocation"
......@@ -114,6 +118,7 @@
"nothing-tips": "/components/Nothing-tips/nothingTips",
"crowdfund-poster": "/components/CrowdfundPoster/CrowdfundPoster",
"glsx-image": "/components/image/index",
"van-datetime-picker": "@vant/weapp/datetime-picker/index",
"f2": "@antv/wx-f2",
"ff-canvas": "@antv/f2-canvas"
},
......
// components/image/index.js
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
import { IMG_URL, IMG_VERSION ,IMG_URL_STORE} from '~/utils/constantData'
Component({
externalClasses: ['custom-class', 'class'],
/**
......@@ -12,9 +12,10 @@ Component({
observer: function (url, o) {
if (url) {
let isWebp = url.includes('webp')
const isStore = url.startsWith('store-assistant')
this.setData({
isWebp,
imagePath: `${IMG_URL}${url}?v=` + IMG_VERSION()
imagePath: `${isStore?IMG_URL_STORE:IMG_URL}${url}?v=` + IMG_VERSION()
})
}
}
......
images/ok.png

905 Bytes

......@@ -10,7 +10,7 @@
{{item.merchantName}}{{item.isSuper?'(超管)':item.userType==1?'(商户号)':'(员工号)'}}
</view>
<view class="icon">
<image src="{{IMG_URL}}login/radio.png" />
<image src="../../images/ok.png" class="icon"/>
</view>
<view class='radio' />
</view>
......
......@@ -6,7 +6,7 @@
<view class="subtitle">
欢迎登录门店助手
</view>
<image webp class="img" src="{{IMG_URL_STORE}}/login/login-logo.png" />
<image webp class="img" src="{{IMG_URL_STORE}}store-assistant-assemble/login/login-logo.png" />
</view>
</block>
<block wx:else>
......
......@@ -44,7 +44,7 @@ const setLoginInfo = (userInfo, sessionId) => {
return
}
// 自动创建服务中心
initServiceCenter()
// initServiceCenter()
setUserInfo(userInfo)
setSessionId(sessionId)
loginSuccess()
......
Component({
properties: {
data: {
type: Object,
value: {},
observer(v) {
if(!v)return
let s = v.statics
if (s) {
v.numList = [
{title: '浏览量', num: s.browseCount},
{title: '访客量', num: s.fansCount},
{title: '订单量', num: s.orderCount}
]
v.sortList = [
{title: '访客率', sort: s.fansRate},
{title: '转化率', sort: s.conversionRate}
]
}
this.setData({data: v})
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/invertAnalyse/invertAnalyse.wxss */
.title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
}
.funnel-box {
padding: 40rpx 0;
position: relative;
.funnel-bg {
position: absolute;
top: 40rpx;
left: 50%;
transform: translate(-50%);
width: 458.18rpx;
height: 298rpx;
image {
width: 458.18rpx;
height: 298rpx;
}
}
.funnel-content {
display: flex;
justify-content: center;
height: 248rpx;
width: 100%;
padding-top: 40rpx;
.left,
.right {
display: flex;
}
.left {
flex: 0 0 406rpx;
flex-flow: column;
justify-content: space-around;
align-items: flex-end;
// align-items: center;
z-index: 1;
font-size: 22rpx;
color: #2D2D33;
box-sizing: border-box;
padding-right: 20rpx;
view {
display: flex;
align-items: center;
margin-right: 28rpx;
text {
font-size: 28rpx;
font-weight: bold;
margin-left: 4rpx;
}
}
}
.right {
flex: 1;
flex-flow: column;
align-items: flex-start;
margin-left: 130rpx;
color: #4466F0;
padding-top: 20rpx;
font-size: 24rpx;
position: relative;
.sort-box:last-child {
position: absolute;
left: -46rpx;
top: 50%;
}
.sort {
font-size: 40rpx;
font-weight: bold;
margin-top: 4rpx;
}
}
}
}
\ No newline at end of file
<view class="funnel-box">
<view class="funnel-bg">
<glsx-image webp src="store-assistant/activity_funnel.webp"></glsx-image>
</view>
<view class="funnel-content">
<view class="left">
<view wx:for="{{data.numList}}" wx:key="index">{{item.title}}<text>{{item.num}}</text></view>
</view>
<view class="right">
<view class="sort-box" wx:for="{{data.sortList}}" wx:key="index">
<view>{{item.title}}</view>
<view class="sort">{{item.sort}}%</view>
</view>
</view>
</view>
</view>
// packageOutput/components/staff/staff.js
Component({
/**
* 组件的属性列表
*/
properties: {
sfaffList: {
type: Object,
observer(val) {
}
}
},
/**
* 组件的初始数据
*/
data: {
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
page {
background: #f3f3f3;
font-size: 30rpx;
}
.table {
display: flex;
}
.table_left_column {
min-width: 150rpx;
height: auto;
display: flex;
flex-direction: column;
}
.left_col_item {
width: 100%;
height: 63rpx;
font-size: 20rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:nth-child(2n) {
background: #ffffff;
}
}
.table_right_scroll_box {
display: flex;
white-space: nowrap;
overflow-x: scroll;
}
.flex_direction_column_item {
min-width: 200rpx;
display: inline-block;
/* border: 1px solid #000; */
}
.item_name {
min-width: 200rpx;
height: 63rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 20rpx;
color: #1B233D;
background: #F9F9F9;
&:first-child {
font-weight: 600;
font-size: 24rpx;
color: #1B233D;
}
&:nth-child(2n) {
background: #ffffff;
}
}
\ No newline at end of file
<!--packageOutput/components/staff/staff.wxml-->
<view class='table'>
<!-- 左侧固定 -->
<view class='table_left_column'>
<view class='left_col_item'>排名</view>
<view class='left_col_item' wx:for="{{sfaffList[0].list}}" wx:for-index="index" wx:key="index">{{index+1}}</view>
</view>
<!-- 右侧表格滚动 -->
<view class="table_right_scroll_box">
<view class="flex_direction_column_item" wx:for="{{sfaffList}}" wx:for-index="index" wx:key="index">
<view class='item_name'>{{item.name}}</view>
<view wx:for="{{item.list}}" wx:for-item="litem" wx:for-index="lindex" wx:key="lindex" class='item_name item_desc'>
<block wx:if="{{litem.price !='缺货'}}">¥{{litem.price}}/斤</block>
<block wx:else>缺货</block>
</view>
</view>
</view>
</view>
import F2 from '@antv/wx-f2'
Page({
data: {
onInitChart(F2, config) {
const chart = new F2.Chart(config);
onInitChart() {
const chart = new F2.Chart({
id:'chart',
width: 400,
height: 250
});
const data = [
{ year: '1951 年', sales: 38 },
{ year: '1952 年', sales: 52 },
......@@ -31,9 +36,35 @@ Page({
}
});
chart.interval().position('year*sales');
chart.render();
return chart;
chart.render().node();
// return chart;
}
},
onLoad() {
const chart = new G2.Chart({
id: 'c1',
width: 1000,
height: 500
});
chart.source(data, {
sales: {
tickCount: 5,
},
style: {
stroke: 'linear-gradient(0deg, blue, green 40%, red)'
}
});
chart.tooltip({
showItemMarker: false,
onShow(ev) {
const { items } = ev;
items[0].name = null;
items[0].name = items[0].title;
items[0].value = '¥ ' + items[0].value;
}
});
chart.interval().position('year*sales');
chart.render();
}
});
<view class="container" style="height: 300px;">
<f2 class="f2-chart" onInit="{{onInitChart}}" />
<canvas class="f2-chart" id="c1" />
</view>
......
// packageOutput/pages/crowdDetail/crowdDetail.js
Page({
/**
* 页面的初始数据
*/
data: {
navStyle: 'background-color: rgba(0,0,0,0);',
analyseValue: {
statics: {
browseCount: 1,
}
},
outputValue: [{
label:'今日产值/元',
name: 'avgQuotationPrice',
unit:''
},{
label:'今日订单/单',
name: 'avgQuotationPrice',
unit:''
},{
label:'今日访客/个',
name: 'avgQuotationPrice',
unit:''
},{
label:'累计产值/元',
name: 'avgQuotationPrice',
unit:''
},{
label:'累计订单/单',
name: 'avgQuotationPrice',
unit:''
},{
label:'累计访客/个',
name: 'avgQuotationPrice',
unit:''
}],
sfaffList: [{
"name": "果唯伊水果",
"list": [{
"pkId": 1,
"price": "5.8",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.08",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "6.00",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "8.40",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "15",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.8",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.10",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.00",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.00",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "7.80",
"typeName": "李子"
},
{
"pkId": 11,
"price": "缺货",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.08",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "2.80",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "8.00",
"typeName": "木瓜"
},
]
},
{
"name": "恋果",
"list": [{
"pkId": 1,
"price": "5.40",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.20",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "缺货",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "9.00",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "14.00",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.50",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "1.89",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.35",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.20",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "8.60",
"typeName": "李子"
},
{
"pkId": 11,
"price": "24.60",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.56",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "3.60",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "7.20",
"typeName": "木瓜"
},
],
},
{
"name": "百果园",
"list": [{
"pkId": 1,
"price": "6.10",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "2.30",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "缺货",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "9.00",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "14.30",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.65",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.08",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.60",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "7.80",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "8.2",
"typeName": "李子"
},
{
"pkId": 11,
"price": "23.8",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "4.36",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "3.20",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "8.00",
"typeName": "木瓜"
},
]
},
{
"name": "鲜丰水果",
"list": [{
"pkId": 1,
"price": "4.80",
"typeName": "苹果"
},
{
"pkId": 2,
"price": "1.98",
"typeName": "香蕉"
},
{
"pkId": 3,
"price": "5.20",
"typeName": "橙子"
},
{
"pkId": 4,
"price": "8.25",
"typeName": "山竹"
},
{
"pkId": 5,
"price": "缺货",
"typeName": "荔枝"
},
{
"pkId": 6,
"price": "5.8",
"typeName": "芒果"
},
{
"pkId": 7,
"price": "2.28",
"typeName": "西瓜"
},
{
"pkId": 8,
"price": "6.40",
"typeName": "草莓"
},
{
"pkId": 9,
"price": "8.60",
"typeName": "水蜜桃"
},
{
"pkId": 10,
"price": "15",
"typeName": "李子"
},
{
"pkId": 11,
"price": "29.6",
"typeName": "榴莲"
},
{
"pkId": 12,
"price": "缺货",
"typeName": "蓝莓"
},
{
"pkId": 13,
"price": "4.10",
"typeName": "柚子"
},
{
"pkId": 14,
"price": "6.80",
"typeName": "木瓜"
},
]
}
]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {
"staff": "../../components/staff/staff",
"invert-analyse": "../../components/invertAnalyse/invertAnalyse"
},
"navigationStyle": "custom"
}
\ No newline at end of file
.layout {
position: relative;
.bg-box {
width: 100%;
overflow: hidden;
position: absolute;
left: 0;
z-index: -1;
.bg {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
top: 0;
left: 0;
}
}
}
.output-box {
background: #F4F8FE;
border-radius: 32rpx;
margin: 0 16rpx;
padding: 24rpx;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
}
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
}
}
}
.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;
}
.staff-input {
width: 638rpx;
height: 64rpx;
background: #ffffff7d;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
margin: 20rpx auto;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0rpx 20rpx;
box-sizing: border-box;
input {
height: 64rpx;
line-height: 64rpx;
color: #999999;
flex: 1;
}
}
}
\ No newline at end of file
<!--packageOutput/pages/crowdDetail/crowdDetail.wxml-->
<view class="container">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值详情</navigation-bar>
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" style="{{'height: calc(100% - 22rpx);'}}">
<view class="output-box">
<view class="output-title">
产值总览
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputValue}}">
<view class="output-num">444</view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="box measure-box">
<view class="box-title">转化漏斗</view>
<invert-analyse data="{{analyseValue}}"></invert-analyse>
</view>
<view class="box staff-box">
<view class="box-title">员工排行榜</view>
<view class="staff-input">
<input placeholder="输入员工名称" />
<icon class="icon-small" type="search" size="14"></icon>
</view>
<staff sfaffList="{{sfaffList}}" />
</view>
</scroll-view>
</view>
</view>
\ No newline at end of file
// packageOutput/pages/monthReport/monthReport.js
Page({
/**
* 页面的初始数据
*/
data: {
show: false,
date: '2023年4月10日',
navStyle: 'background-color: rgba(0,0,0,0);',
outputValue: [{
label:'发券量(总)/张',
name: 'avgQuotationPrice',
unit:''
},{
label:'升级订单/单',
name: 'avgQuotationPrice',
unit:''
},{
label:'营业额(总)/元',
name: 'avgQuotationPrice',
unit:''
},{
label:'客单价/元',
name: 'avgQuotationPrice',
unit:''
},{
label:'转化率',
name: 'avgQuotationPrice',
unit:''
}],
billboard: [{
sort:1,
name: 11,
value: 625000
},{
sort:2,
name: 11,
value: 625000
},{
sort:3,
name: 11,
value: 625000
}]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const {time,type} = options
this.setData({timeType:time,type})
},
onDisplay() {
this.setData({ show: true });
},
onClose() {
this.setData({ show: false });
},
formatDate(date) {
date = new Date(date);
return `${date.getFullYear()}年${date.getMonth() + 1}}月`;
},
onInput(event) {
this.setData({
currentDate: event.detail,
});
},
confirm(e) {
this.setData({ show: false });
},
onConfirm(event) {
this.setData({
show: false,
date: this.formatDate(event.detail),
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationStyle": "custom"
}
\ No newline at end of file
/* packageOutput/pages/monthReport/monthReport.wxss */
.layout {
position: relative;
.bg-box {
width: 100%;
overflow: hidden;
position: absolute;
left: 0;
z-index: -1;
.bg {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
top: 0;
left: 0;
}
}
.store-box {
margin: 32rpx;
.store-item {
display: flex;
.store-logo {
width: 32rpx;
height: 32rpx;
}
.store-content {
margin-left: 12rpx;
margin-bottom: 24rpx;
.store-name {
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
line-height: 32rpx;
}
.store-desc {
font-size: 24rpx;
color: #1b233da8;
line-height: 32rpx;
}
}
}
.date-input {
width: 686rpx;
height: 64rpx;
background: #ffffff7d;
border: 2rpx solid #EEEEEE;
border-radius: 12rpx;
display: flex;
align-items: center;
padding: 0rpx 24rpx;
box-sizing: border-box;
justify-content: space-between;
.date-value {
font-size: 24rpx;
color: #666666;
}
.date-icon {
width: 32rpx;
height: 31rpx;
}
}
}
.output-box {
background: #F4F8FE;
border-radius: 32rpx;
margin: 0 16rpx;
padding: 24rpx;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
}
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
.output-item {
text-align: center;
.output-num {
font-weight: 600;
font-size: 44rpx;
color: #1B233D;
line-height: 64rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
}
}
}
.billboard-box {
background: #F4F8FE;
border-radius: 32rpx;
margin: 16rpx;
padding: 24rpx;
.billboard-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin-bottom: 22rpx;
}
}
.billboard-border {
width: 670rpx;
height: 512rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
position: relative;
.billboard-item {
width: 209.54rpx;
height: 321.3rpx;
position: absolute;
&:first-child {
top: 97rpx;
left:207rpx;
z-index: 10;
.bill-bg {
width: 233.52rpx!important;
height: 358.06rpx!important;
}
}
&:nth-child(2) {
left: 37rpx;
top: 167rpx;
width: 233.52rpx;
height: 358.06rpx;
}
&:nth-child(3) {
z-index: 20;
top: 220rpx;
right: 37rpx;
}
.billboard-item-bar {
position: relative;
.bill-bg {
width: 209.54rpx;
height: 321.3rpx;
position: absolute;
top: 0;
left: 0;
}
.bill-num {
position: absolute;
top: -40rpx;
width: 100%;
text-align: center;
font-weight: 600;
font-size: 32rpx;
color: #FE5662;
}
.bill-name {
position: absolute;
top: 10rpx;
width: 100%;
text-align: center;
z-index: 100;
font-weight: 400;
font-size: 28rpx;
color: #1B233D;
}
}
}
}
}
.van-picker__toolbar {
display: none!important;
}
\ No newline at end of file
<!--packageOutput/pages/monthReport/monthReport.wxml-->
<view class="container">
<navigation-bar navStyle="{{navStyle}}" bindnavbarReady="navbarReady">产值{{timeType=='day'?'日':'月'}}报表</navigation-bar>
<view class="layout" id="layout" style="top:{{navHeight}}px; height: calc(100vh - 150rpx)">
<!-- 背景图 -->
<view class="bg-box" style="height:{{368 + navHeight * 2}}rpx;top:-{{navHeight}}px">
<view class="bg">
<glsx-image webp src="store-assistant/index_bg.webp"></glsx-image>
</view>
</view>
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" style="{{'height: calc(100% - 22rpx);'}}">
<view class="store-box">
<view class="store-item">
<view class="store-logo">
<glsx-image class="store-logo" webp src="store-assistant-assemble/output/store-icon.png"></glsx-image>
</view>
<view class="store-content">
<view class="store-name">嘀加奥迪4s店</view>
<view class="store-desc">欢迎查看{{timeType=='day'?'日':'月'}}报表数据</view>
</view>
</view>
<view class="date-input" bindtap="onDisplay">
<view class="date-value">{{date}}</view>
<view class="date-icon">
<glsx-image class="date-icon" webp src="store-assistant-assemble/output/date-icon.png"></glsx-image>
</view>
</view>
</view>
<view class="output-box">
<view class="output-title">
当{{timeType=='day'?'日':'月'}}产值
</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputValue}}">
<view class="output-num">444</view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="billboard-box">
<view class="billboard-title">当{{timeType=='day'?'日':'月'}}员工龙虎榜</view>
<view class="billboard-border">
<view class="billboard-item" wx:for="{{billboard}}">
<view class="billboard-item-bar">
<view class="bill-border">
<view class="bill-num" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">¥{{item.value}}</view>
<view class="bill-name" style="transform:translate({{index==1?-20:0}}rpx,0rpx)">{{item.name}}</view>
</view>
<glsx-image webp custom-class="bill-bg" src="store-assistant-assemble/output/bill_{{item.sort}}.png"></glsx-image>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<popup bind:hidePopup="confirm" bind:confirm="confirm" show="{{show}}" height="50vh">
<van-datetime-picker type="{{timeType=='day'?'date':'year-month'}}" bind:input="onInput" />
</popup>
</view>
\ No newline at end of file
import { IMG_URL } from "~/utils/constantData";
import ActivityApi from '~/api/activityApi/index'
import index_const from "~/pages/tab/storeAssistant/pages/index/index_const"
import { commentTime } from '~/utils/format'
import {imgUrlMixin} from '~/mixins/index'
Page({
/**
* 页面的初始数据
*/
data: {
list: [],
allNum: 0,
todayNum: 0,
activityTypList: index_const.data.activityTypList,
IMG_URL:IMG_URL,
isPravite:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
onRoute(options) {
if(options.isPravite)return this.getVistiors(options)
let activityId = options.id
ActivityApi.getActivityVisitorList({
activityId
}).then(res => {
res.visitorList && res.visitorList.forEach(val => {
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
if(!val.customerPhone&&val.guestId){
val.gId = (val.guestId.split('_')).pop() || ''
}
})
this.setData({
allNum: res.visitorTotal,
todayNum: res.todayTotal,
list: res.visitorList
})
})
},
toCopyName(e){
const {name} = e.currentTarget.dataset
if(name){
wx.setClipboardData({
data: name
})
}
},
// 私域待运营客户
getVistiors(options){
const userStorage = wx.$storage.get("userInfo");
let para = {
merchantId:userStorage.merchantId
}
ActivityApi.praviteVistitor(para).then(res=>{
res&&res.forEach(val=>{
val.lastVisitFormatTime = commentTime(val.lastVisitDate)
// console.log(val.lastVisitFormatTime);
// if(!val.customerPhone&&val.guestId){
// val.gId = (val.guestId.split('_')).pop() || ''
// }
})
let temp = JSON.parse(options.content)
this.setData({
isPravite:true,
list: res,
todayNum:temp[1].openNum,
allNum:temp[0].openNum,
})
})
},
// 打电话
callPhone(e) {
let { mobile } = e.currentTarget.dataset
wx.makePhoneCall({
phoneNumber: mobile.toString()
})
},
// 复制微信号
copyWechart(e) {
let { wechartno } = e.currentTarget.dataset
wx.setClipboardData({
data: wechartno.toString(),
success (res) {
wx.showToast({
title: '微信号已复制',
icon: "none"
})
}
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "我的访客"
}
\ No newline at end of file
/* packageActivity/pages/visitor/visitor.wxss */
.visitor-box{
min-height: 100vh;
background-image: linear-gradient(180deg, #F0F5FF 0%, #EDF3FF 100%);
overflow: hidden;
.img-bg{
width: 100%;
height: 400rpx;
float: left;
}
.content{
width: 100%;
float: left;
margin-top: -400rpx;
.title{
padding: 32rpx 34rpx 0 34rpx;
font-size: 36rpx;
font-weight: 600;
color: #1B233D;
display: flex;
view:last-child{
margin-left: 48rpx;
}
text{
font-size: 28rpx;
font-weight: 400;
}
}
.list-box{
margin: 32rpx 24rpx;
right: 0;
left: 0;
.list-item{
margin-bottom: 24rpx;
background-image: linear-gradient(90deg, #FCF4F0 0%, #FCFDFF 77%);
border-radius: 24rpx;
padding: 24rpx 40rpx;
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
position: relative;
.top{
display: flex;
justify-content: space-between;
align-items: center;
.top-left{
display: flex;
image{
width: 80rpx;
height: 80rpx;
margin-right: 24rpx;
border-radius: 50%;
}
.name{
font-size: 30rpx;
color: #1B233D;
display: flex;
align-items: center;
.copy{
width: 28rpx;
height: 28rpx;
margin-left: 8rpx;
}
}
.mobile{
margin-top: 10rpx;
font-size: 26rpx;
color: #7A8299;
.order-statue{
margin-left: 16rpx;
font-size: 24rpx;
color: #EB9109;
}
.green{
color: #3FCF77;
}
}
}
.top-right{
.btn_icon{
width: 56rpx;
height: 56rpx;
margin-left: 32rpx;
}
}
}
.bottom{
margin-top: 24rpx;
background: #FFFFFF;
border-radius: 8px;
padding: 24rpx 32rpx;
.activity{
font-size: 30rpx;
font-weight: 600;
line-height: 48rpx;
color: #1B233D;
text{
display: inline-block;
padding: 2rpx 16rpx;
height: 40rpx;
border-radius: 22rpx;
font-weight: 400;
font-size: 24rpx;
color: #673F00;
text-align: center;
line-height: 40rpx;
margin-left: 16rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
}
}
.footprint{
display: flex;
justify-content: space-between;
color: #7A8299;
font-size: 26rpx;
margin-top: 16rpx;
}
.pravite-text{
font-weight: 500;
font-size: 30rpx;
color: #6E6E7A;
line-height: 44rpx;
text{
margin-left: 0;
}
}
}
.status{
position: absolute;
right: 0;
top: 0;
width: 172rpx;
height: 52rpx;
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26rpx;
color: #EB9109;
}
.status-2{
color: #3FCF77;
}
}
.orderde{
background-image: linear-gradient(90deg, #F2F6FF 9%, #FCFDFF 100%);
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
}
}
.no-data{
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
margin-top: 240rpx;
.no_data_image{
width: 400rpx;
height: 400rpx;
}
.text{
margin-top: 32rpx;
font-size: 28rpx;
color: #7A8299;
}
}
}
}
<!--packageActivity/pages/visitor/visitor.wxml-->
<view class="visitor-box">
<view class="img-bg">
<glsx-image class="bg_image" webp src="store-assistant/visitor_bg.png"></glsx-image>
</view>
<view class="content">
<view class="title">
<view>总访客<text> · {{allNum}}</text></view>
<view>今日访客<text> · {{todayNum}}</text></view>
</view>
<view class="list-box">
<block wx:if="{{!isPravite}}">
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.orderStatus == 0 ? '' : 'orderde'}}">
<view class="top">
<view class="top-left">
<glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-image>
<view class="name-mobile">
<view class="name">
{{item.customerNickName || ""}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" data-name="{{item.customerNickName}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
<!-- <text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text> -->
</view>
<view class="mobile" wx:if="{{item.customerPhone}}">
{{item.customerPhone}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
<view class="mobile" wx:else>
ID:{{item.gId}}
<text class="order-statue {{item.orderStatus == 0 ? '' : 'green'}}">{{item.orderStatus == 0 ? '未下单' : '已下单'}}</text>
</view>
</view>
</view>
<view class="top-right">
<glsx-image class="btn_icon" wx:if="{{item.customerPhone}}" webp src="store-assistant/activity_order_phone_icon.png" bind:tap="callPhone" data-mobile="{{item.customerPhone}}"></glsx-image>
<glsx-image class="btn_icon" wx:if="{{item.userWechartNo}}" webp src="store-assistant/activity_order_wechart_icon.png" bind:tap="copyWechart" data-wechartno="{{item.userWechartNo}}"></glsx-image>
</view>
</view>
<view class="bottom">
<view class="activity">
{{item.activityName}}
<!-- <text>{{activityTypList[0]}}</text> -->
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}} 次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<block wx:for="{{list}}" wx:key="index">
<view class="list-item {{item.visitStatus==1?'orderde':''}}">
<view class="top">
<view class="top-left">
<glsx-image webp src="{{item.customerImageUrl ? item.customerImageUrl : 'store-assistant/default_avatar.png'}}"></glsx-image>
<view class="name-mobile">
<view style="padding-top:8rpx" class="name">
{{item.customerNickName || "未知访客"}}
<glsx-image wx:if="{{item.customerNickName&&item.customerNickName!='未知访客'}}" bind:tap="toCopyName" class="copy" src="store-assistant/copy_name.png"></glsx-image>
</view>
</view>
</view>
</view>
<view class="bottom">
<view class="activity pravite-text">
<text>活动</text>
{{item.taskName || ''}}
</view>
<view class="footprint">
<text>浏览 {{item.visitCount}}次</text>
<text>{{item.lastVisitFormatTime}} 访问过</text>
</view>
</view>
<view class="status {{item.visitStatus==1?'status-2':''}}" style="background: url({{IMG_URL}}store-assistant/{{item.visitStatus==1?'order_status_11':'order_status_1'}}.png);background-size: 100% 100%;">{{item.visitStatus==1?'已':'未'}}领取奖励</view>
</view>
</block>
</block>
</view>
<view class="no-data" wx:if="{{!list.length}}">
<glsx-image class="no_data_image" webp src="store-assistant/no_visitor_data.png"></glsx-image>
<view class="text">暂无访客</view>
</view>
</view>
</view>
import USERAPI from '~/api/usersApi/index'
import environment from '~/utils/request/environment'
import ActivityApi from '~/api/activityApi/index'
const taskLoginAndRegister = (query, callBack) => {
if (!query) return callBack && callBack()
const options = { ...query, ...query.options }
delete options.options
console.log(options);
if (options.merchantId) {
const sessionId = wx.$storage.get('sessionId')
if (!sessionId) {
let para = {
merchantId: options.merchantId,
type: 1,
pages: options.pages
}
let temp = encodeURIComponent(JSON.stringify(para))
wx.navigateTo({
url: '/packageStoreAssistant/packageAuth/pages/authentication/register/register?data=' + temp,
});
} else {
const USERINFO = wx.$storage.get('userInfo')
if (USERINFO.merchantId == options.merchantId) {
USERAPI.checkSession().then(({
code
}) => {
if (code == '0') {
callBack && callBack()
} else {
wx.$router.reLaunch('/packageStoreAssistant/packageAuth/pages/authentication/login/login', options)
}
})
} else {
let para = {
merchantId: options.merchantId,
type: 1,
pages: options.pages
}
let temp = encodeURIComponent(JSON.stringify(para))
wx.navigateTo({
url: '/packageStoreAssistant/packageAuth/pages/authentication/register/register?data=' + temp,
});
}
}
} else {
callBack && callBack()
}
}
const authAvatarAndNickName = () => {
const {
domain,
index
} = environment,
redirectUrl = `${domain}/wx-oauth`,
// redirectUrl = 'http://scrm.dev.glsx.com.cn/wx-oauth',
// 云商 wx1cf40dc91c28a7fd ,glsxtest02 wx56bed167ad463f70
appid = index == 1 || index == 2 ? 'wx1cf40dc91c28a7fd' : 'wx56bed167ad463f70',
wxUrl = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(redirectUrl)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
console.log(redirectUrl, appid)
wx.navigateTo({
url: `/pages/webView/webView?url=${encodeURIComponent(wxUrl)}`,
})
}
const handlerMiss = (data, query, callBack) => {
if (!data) return
if (!query) return
let { pageNum, orginList, serviceType, listName } = query
data.list && data.list.forEach((val, index) => {
val.tabType = serviceType
val.isCollapse = true
val.startTime = val.startTime.split(' ')[0]
val.endTime = val.endTime.split(' ')[0]
// 活动中/活动未开始默认展开第一条 数据处理
// 处理不同模块的判断条件
let condition = false
let zc = val.activityStatus != 3 && index == 0 && pageNum == 1
let zc_3 = val.activityStatus == 3 && index == 0 && pageNum == 1
let pzj = val.activityStatus != 3 && index == 0
let bussinessScene = 3
if (serviceType == 0) {
condition = zc
} else {
condition = pzj
bussinessScene = 2
}
if (condition) {
val.isloading = true
ActivityApi.getActiveTaskList({ activityId: val.id, bussinessScene }, { isShowLoading: true }).then(res => {
res.forEach(a => {
a.platformMerchantMissionResponseList &&
a.platformMerchantMissionResponseList.forEach(k => {
k.detailInfo = { activityId: val.id, imgUrlList: [] }
k.platformMerchantMissionMaterialResponseList &&
k.platformMerchantMissionMaterialResponseList.forEach(i => {
// materialType 素材类型1文案 2图片 3视频 4专属链接
if (i.materialType == 1) {
// 文案
k.detailInfo.textContent = i.materialContent
}
if (i.materialType == 2 || i.materialType == 3) {
// 图片视频
k.detailInfo.imgUrlList.push({
url: i.materialContent,
type: i.materialType == 2 ? 'image' : 'video'
})
}
if (i.materialType == 4) {
// 链接
k.detailInfo.linkUrl = val.activityUrl
}
})
})
})
val.isloading = false
val.missionList = res
val.newtaskCalenderList = calenderFilter(JSON.parse(JSON.stringify(val.missionList)) || [], 7)
let d = new Date()
let nowDate = (d.getMonth() + 1).toString().padStart(2, '0') + '月' + d.getDate().toString().padStart(2, '0') + '日'
let ind = 0
val.calenderActiveIndex = 0
val.newtaskCalenderList.forEach((v, index) => {
v.forEach(k => {
k.time = (new Date(k.activityTime).getMonth() + 1).toString().padStart(2, '0') + '月' + new Date(k.activityTime).getDate().toString().padStart(2, '0') + '日'
k.ind = ind
let completeStatusNum = 0
k.platformMerchantMissionResponseList.forEach(i => {
if (i.completeStatus == 2) completeStatusNum++
})
if (nowDate == k.time) {
val.calenderActiveIndex = index
callBack && callBack({ activeDateIndex: ind })
}
// status 1过去日期任务全部完成 2过去日期任务有未完成的 3当前日期或未来日期
if (completeStatusNum == v.length && d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 1
} else if (d.getTime() > new Date(`${k.activityTime.replace(/-/g, '/')} 23:59:59`).getTime()) {
k.status = 2
} else {
k.status = 3
}
ind++
})
})
val.isCollapse = false
let itemVal = `${listName}[${index}]`
callBack && callBack({ [itemVal]: val })
}).catch(err => {
console.log(err);
val.isloading = false
})
} else if (zc_3 && serviceType == 0) {
ActivityApi.getActivityEndInstallOrderList({ activityId: val.id }, { isShowLoading: true })
.then(res => {
val.isCollapse = false
res.orderList &&
res.orderList.forEach(it => {
it.time = it.createdDate ? new Date(it.createdDate).format('yyyy-MM-dd hh:mm') : ''
})
val.orderList = res.orderList
val.orderTotal = res.orderTotal
val.reInstallContactsName = res.reInstallContactsName
val.reInstallContactsPhone = res.reInstallContactsPhone
let itemVal = `${listName}[${index}]`
callBack && callBack({ [itemVal]: val })
})
.catch(err => {
val.isloading = false
})
}
})
const RESULT = {
[listName]: pageNum == 1 ? data.list : [...orginList, ...data.list],
activeTrigger: false,
total: data.total,
noResult: pageNum == 1 ? (data.list.length ? false : true) : false
}
callBack && callBack(RESULT)
}
const calenderFilter = (arr, length) => {
var _arr = []
while (arr.length) {
_arr.push(arr.splice(0, length))
}
return _arr
}
module.exports = {
taskLoginAndRegister,
authAvatarAndNickName,
handlerMiss
}
\ No newline at end of file
var arrInclues = function(num,arr){
var flag = false
for(var i = 0;i<arr.length;i++){
if(num==arr[i]){
flag = true
}
}
return flag
}
module.exports = {
arrInclues: arrInclues
}
\ No newline at end of file
// packageStoreAssistant/components/BoutiqueCoupon/index.js
import boutiquecouponApi from '~/api/boutiquecouponApi'
Component({
/**
* 组件的属性列表
*/
properties: {
},
lifetimes: {
ready() {
const {
boutiqueCoupon_myself_status
} = wx.$storage.get('userInfo')
this.setData({
myself: boutiqueCoupon_myself_status
})
this.refresherrefresh(false)
wx.$eventbus.on('REFRESHBOUTIQUECOUPON', () => {
this.refresherrefresh(false)
})
}
},
/**
* 组件的初始数据
*/
data: {
couponIndex: 0,
usedFlag: 'N',
useCouponList: [],
pageNum: 1,
total: 0,
totalY: 0,
totalN: 0
},
/**
* 组件的方法列表
*/
methods: {
changeMyself() {
const userInfo = wx.$storage.get('userInfo')
let {
myself
} = this.data
myself = !myself
this.setData({
myself
})
userInfo.boutiqueCoupon_myself_status = myself
wx.$storage.set('userInfo', userInfo)
let {
usedFlag
} = this.data
this.getTotal()
this.clearData(usedFlag)
},
async getMerchantCouponList() {
let couponList = []
try {
const {
merchantId
} = wx.$storage.get('userInfo'), {
code,
data,
message
} = await boutiquecouponApi.getMerchantCouponList({
merchantId
// merchantId: '44209390'
})
if (code == 0) {
console.log(data)
data.map(e => {
if (e.enabledFlag == 'Y') {
e.num = e.amount - e.getAmount
if (e.num < 0) e.num = 0
e.couponName = e.couponInfo.couponName
couponList.push(e)
}
})
this.setData({
couponList
})
} else throw message
} catch (error) {
wx.$api.showToast(error)
}
this.setData({
couponFlag: true
})
},
async getMerchantCustomerCouponList(flag) {
wx.$api.showLoading()
let {
usedFlag,
pageNum,
myself
} = this.data
try {
const {
merchantId,
uuid
} = wx.$storage.get('userInfo')
let params = {
merchantId,
// merchantId: '44209390',
pageNum,
usedFlag: flag ? flag : usedFlag
}
if (myself) params.userId = uuid
const {
code,
data,
message
} = await boutiquecouponApi.getMerchantCustomerCouponList(params)
if (code == 0) {
const {
list,
total
} = data
if (flag) {
if (flag == 'Y') this.setData({
totalY: total
})
else this.setData({
totalN: total
})
return
}
if (list.length) {
const usedBool = usedFlag === 'Y'
list.map(e => {
const time = usedBool ? e.usedTime : e.createdDate
e.time = (usedBool ? '核销' : '领券') + '时间:' + new Date(time).format('yyyy-MM-dd hh:mm')
if (!usedBool) {
if (e.customerInviteRecordDTOList?.length) {
let {
inviteStatus,
inviteDate,
} = e.customerInviteRecordDTOList.at(-1)
//inviteStatus 1待预约 2已预约 3取消预约 4已施工 5过期到店
e.appointmentTime = {
1: '待预约',
2: new Date(inviteDate).format('yyyy-MM-dd hh:mm'),
3: '取消预约',
4: '已施工',
5: '过期到店',
} [inviteStatus]
e.appointmentStatus = inviteStatus
}
}
})
this.setData({
[`useCouponList[${pageNum - 1}]`]: list
})
}
this.setData({
total
})
wx.hideLoading()
} else throw message
} catch (error) {
if (pageNum != 1) this.setData({
pageNum: pageNum - 1
})
wx.$api.showToast(String(error))
}
this.setData({
useCouponFlag: true,
refresherrefreshFlag: false
})
},
getTotal() {
this.getMerchantCustomerCouponList('N')
this.getMerchantCustomerCouponList('Y')
},
couponChange(e) {
let {
current
} = e.detail
this.setData({
couponIndex: current
})
},
jump(e) {
const {
url,
item
} = e.currentTarget.dataset, {
userType
} = wx.$storage.get('userInfo')
if (url == 'createCoupon') {
if (item.num == 0) return
if (userType != 2) {
wx.$api.showToast('请使用员工账号生成礼券')
return
}
}
wx.$router.go(`/packageStoreAssistant/packageBoutiqueCoupon/pages/${url}/${url}`, item)
},
clearData(usedFlag) {
this.setData({
usedFlag,
useCouponList: [],
pageNum: 1,
useCouponFlag: false,
nothing: false,
})
this.getMerchantCustomerCouponList()
},
changeTab(e) {
let {
type
} = e.currentTarget.dataset, {
pageNum,
usedFlag
} = this.data
const result = type ? 'Y' : 'N'
if (pageNum == 1 && usedFlag == result) return
this.clearData(result)
},
refresherrefresh(val = true) {
this.setData({
refresherrefreshFlag: val
})
let {
usedFlag
} = this.data
this.getTotal()
this.getMerchantCouponList()
this.clearData(usedFlag)
},
scrollonReachBottom() {
let {
total,
pageNum
} = this.data
if (Math.ceil(total / 10) > pageNum) {
this.setData({
pageNum: pageNum + 1
})
this.getMerchantCustomerCouponList()
} else this.setData({
nothing: true
})
}
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* packageStoreAssistant/components/BoutiqueCoupon/index.wxss */
.text-hide {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.coupon-layout {
height: calc(100% - 112rpx);
.coupon-box {
height: 342rpx;
box-sizing: border-box;
padding-top: 40rpx;
position: relative;
border-bottom: 8rpx solid #F7F8FA;
.coupon-bg {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.coupon-swiper {
height: 100%;
.coupon {
height: 204rpx;
position: absolute;
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, .24);
border-radius: 34rpx;
left: 24rpx;
width: calc(100% - 48rpx);
top: 0;
&-info {
position: absolute;
width: 100%;
height: calc(100% - 54rpx);
display: flex;
left: 0;
top: 0;
z-index: 1;
font-size: 20rpx;
color: #997256;
overflow: hidden;
}
&-type {
position: absolute;
z-index: 2;
top: 76rpx;
left: 0;
width: 176rpx;
height: 46rpx;
display: flex;
align-items: center;
justify-content: center;
transform-origin: left bottom;
transform: rotate(-45deg);
white-space: nowrap;
font-weight: 500;
font-size: 20rpx;
color: #4466F0;
// clip-path: polygon(26% 0, 74% 0, 100% 100%, 0% 100%);
}
&-bottom {
position: absolute;
width: 100%;
height: 54rpx;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: 0 50rpx;
font-size: 20rpx;
color: #999999;
left: 0;
bottom: 0;
z-index: 2;
}
&-text {
box-sizing: border-box;
padding: 20rpx 0 0 100rpx;
width: calc(100% - 206rpx);
color: #fff;
.coupon-title {
font-weight: 600;
font-size: 44rpx;
line-height: 60rpx;
}
.num {
font-size: 20rpx;
.val {
font-weight: 500;
color: #FFFB39;
margin: 0 6rpx;
}
}
}
.coupon-add {
position: relative;
font-weight: 600;
font-size: 24rpx;
color: #fff;
display: flex;
align-items: center;
width: 206rpx;
padding-right: 50rpx;
justify-content: flex-end;
&-btn {
box-sizing: border-box;
width: 120rpx;
height: 52rpx;
border: 2rpx solid #FFFFFF;
border-radius: 34rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
.coupon-add.disabled {
opacity: .5;
}
}
}
.dots {
position: absolute;
bottom: 28rpx;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
flex-wrap: wrap;
box-sizing: border-box;
padding: 0 24rpx;
.dot {
width: 12rpx;
height: 12rpx;
background: #D8D8D8;
margin: 4.5rpx;
border-radius: 100%;
flex-shrink: 0;
}
.active {
background: #4466F0;
}
}
}
.coupon-nothing {
width: 100%;
height: 100%;
display: grid;
place-items: center;
color: #000;
font-size: 28rpx;
}
.coupon-list {
background: #FFFFFF;
box-shadow: 0 0 0 0 #E9E9E9;
border-radius: 20rpx;
.tab {
height: 88rpx;
display: flex;
position: sticky;
align-items: center;
top: 0;
z-index: 2;
background: #fff;
padding: 0 20rpx;
.item {
font-size: 24rpx;
color: rgba(27, 35, 61, .9);
text-align: center;
flex-shrink: 0;
padding: 0 40rpx;
position: relative;
height: 100%;
display: flex;
align-items: center;
background: linear-gradient(to right, #708CFF, #708CFF) no-repeat;
background-size: 0;
background-position: bottom;
}
.true {
font-weight: 600;
font-size: 28rpx;
color: #1B233D;
animation: show-line .25s forwards;
}
@keyframes show-line {
0% {
background-size: 0 4rpx;
}
100% {
background-size: calc(100% - 80rpx) 4rpx;
}
}
&-btn {
display: flex;
align-items: center;
margin-left: auto;
font-size: 24rpx;
color: #1B233D;
padding-right: 8rpx;
.icon {
width: 28rpx;
height: 28rpx;
border: 2rpx solid #4466F0;
box-sizing: border-box;
margin-right: 7rpx;
border-radius: 4rpx;
}
.false {
background-color: #4466F0;
}
}
}
.list-box {
padding: 20rpx 20rpx 170rpx;
.nothing-text {
padding: 20rpx 0 !important;
}
.item {
min-height: 278rpx;
background: #FFFFFF;
box-shadow: 0 10rpx 20rpx 0 rgba(129, 146, 214, .24);
border-radius: 12rpx;
margin-bottom: 20rpx;
box-sizing: border-box;
padding: 0 40rpx 28rpx;
position: relative;
&-top {
height: 106rpx;
border-bottom: 2rpx solid #F0F1F5;
display: flex;
align-items: center;
justify-content: space-between;
&-time {
font-size: 24rpx;
color: #6E6E7A;
flex-shrink: 0;
text-align: right;
}
&-customer {
font-weight: 500;
font-size: 32rpx;
color: #1B233D;
display: grid;
grid-template-columns: 46rpx 1fr;
align-items: center;
&-icon {
width: 46rpx;
height: 46rpx;
}
&-text {
margin-left: 26rpx;
}
}
}
&-center {
box-sizing: border-box;
font-size: 24rpx;
width: calc(100% - 104rpx);
&-person {
display: grid;
grid-template-columns: 116rpx 1fr;
gap: 0 20rpx;
color: #1B233D;
align-items: center;
padding-bottom: 12rpx;
line-height: 34rpx;
&-value {
color: #6E6E7A;
}
.have {
color: #F24724;
}
.nothing {
color: #EB9109;
}
}
&-title {
font-size: 28rpx;
color: #4466F0;
font-weight: 500;
font-weight: bold;
padding: 24rpx 0;
}
}
&-coupon-icon {
position: absolute;
right: 48rpx;
bottom: 48rpx;
width: 84rpx;
height: 84rpx;
}
}
}
}
}
.nothing-text {
text-align: center;
font-size: 28rpx;
color: #333;
padding: 60rpx 0;
}
\ No newline at end of file
<scroll-view scroll-y class="coupon-layout" refresher-enabled bindrefresherrefresh="refresherrefresh" bindscrolltolower="scrollonReachBottom" refresher-triggered="{{refresherrefreshFlag}}">
<view class="coupon-box">
<block wx:if="{{couponFlag}}">
<block wx:if="{{couponList.length}}">
<swiper class="coupon-swiper" bindchange="couponChange">
<block wx:for="{{couponList}}" wx:key="index">
<swiper-item>
<view class="coupon">
<view class="coupon-info">
<view class="coupon-type">{{item.couponInfo.couponTypeName}}</view>
<view class="coupon-text">
<view class="coupon-title text-hide">{{item.couponName}}</view>
<view class="num text-hide">剩余<text class="val">{{item.num}}</text>张</view>
</view>
<view class="coupon-add {{item.num == 0 ? 'disabled':''}}" bindtap="jump" data-url="createCoupon" data-item="{{item}}">
<view class="coupon-add-btn">发放</view>
</view>
</view>
<view class="coupon-bottom">
<view class="coupon-time">
有效期:永久
</view>
</view>
<glsx-image src="store-assistant/boutiqueCoupon/coupon.png" class="coupon-bg"></glsx-image>
</view>
</swiper-item>
</block>
</swiper>
<view class="dots" wx:if="{{couponList.length > 1}}">
<block wx:for="{{couponList}}" wx:key="index">
<view class="dot {{couponIndex == index ? 'active':''}}"></view>
</block>
</view>
</block>
<block wx:else>
<view class="coupon-nothing">
暂无礼券
</view>
</block>
</block>
</view>
<view class="coupon-list">
<view class="tab">
<view class="item {{usedFlag == 'N'}}" bindtap="changeTab">
待核销({{totalN}})
</view>
<view class="item {{usedFlag == 'Y'}}" data-type bindtap="changeTab">
已核销({{totalY}})
</view>
<view class="tab-btn" bindtap="changeMyself">
<view class="icon" hidden="{{myself}}"></view>
<view class="icon {{!myself}}" hidden="{{!myself}}">
<glsx-image class="img" src="store-assistant/boutiqueCoupon/checkbox.png"></glsx-image>
</view>
仅看自己
</view>
</view>
<block wx:if="{{useCouponFlag}}">
<block wx:if="{{useCouponList.length}}">
<view class="list-box">
<block wx:for="{{useCouponList}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<block wx:for="{{i}}" wx:key="index">
<view class="item" bindtap="jump" data-url="couponDetail" data-item="{{item}}">
<view class="item-top">
<view class="item-top-customer">
<view class="item-top-customer-icon sprite-icon icon-customer-icon">
<glsx-image src="store-assistant/boutiqueCoupon/customer-icon.png"></glsx-image>
</view>
<view class="item-top-customer-text text-hide">{{item.customerName}}</view>
</view>
<view class="item-top-time">{{item.time}}</view>
</view>
<view class="item-center">
<view class="item-center-title">
{{item.couponName}}
</view>
<view class="item-center-person">
<view class="item-center-person-label">推荐人</view>
<view class="item-center-person-value text-hide">{{item.merchantName}}-{{item.employeeName}}</view>
</view>
<block wx:if="{{usedFlag == 'N'}}">
<view class="item-center-person">
<view class="item-center-person-label">预约时间</view>
<view class="item-center-person-value {{item.appointmentStatus != 1?'have':'nothing'}}">{{item.appointmentTime}}</view>
</view>
</block>
</view>
<view wx:if="{{usedFlag === 'Y'}}" class="item-coupon-icon">
<glsx-image src="{{item.upgradeFlag === 'Y'?'store-assistant/boutiqueCoupon/coupon-sucess.png':'store-assistant/boutiqueCoupon/coupon-fail.png'}}"></glsx-image>
</view>
</view>
</block>
</block>
<block wx:if="{{nothing}}">
<view class="nothing-text">到底了~</view>
</block>
</view>
</block>
<block wx:else>
<view class="nothing-text">暂无数据</view>
</block>
</block>
</view>
</scroll-view>
\ No newline at end of file
import ActivityApi from '~/api/activityApi/index'
Component({
/**
* 组件的属性列表
*/
properties: {
entranceType: {
type: Number,
observer: function (val) {
this.initLocal(val)
}
}
},
/**
* 组件的初始数据
*/
data: {
outputView: {
outputValue: [{
label: '总报价量',
name: 'totalQuotationCount',
unit: ''
}, {
label: '总成交量',
name: 'totalSuccessCount',
unit: ''
}, {
label: '总产值',
name: 'totalOutputValue',
unit: ''
}, {
label: '当月报价量',
name: 'monthQuotationCount',
unit: ''
}, {
label: '当月成交量',
name: 'monthSuccessCount',
unit: ''
}, {
label: '当月产值',
name: 'monthOutputValue',
unit: ''
}, {
label: '单价',
name: 'avgPrice',
unit: ''
}, {
label: '升级率',
name: 'conversionRate',
unit: ''
}, {
label: '平均车险报价',
name: 'avgQuotationPrice',
unit: ''
}],
boutiqueOutputValue: [{
label: '发券量(总)/张',
name: 'sendCouponCountTotal',
unit: ''
}, {
label: '升级订单/单',
name: 'upgradeCountTotal',
unit: ''
}, {
label: '营业额(总)/元',
name: 'orderMoneyTotal',
unit: ''
}, {
label: '客单价/元',
name: 'averagePrice',
unit: ''
}, {
label: '转化率',
name: 'upgradeRatio',
unit: ''
}],
todayOutiqueOutputValue: [{
label: '发券量/张',
name: 'sendCouponCountToday',
unit: ''
}, {
label: '升级订单/单',
name: 'upgradeCountToday',
unit: ''
}, {
label: '营业额(总)/元',
name: 'orderMoneyTotalToday',
unit: ''
}],
todayOutputValue: [{
label: '发券量/张',
name: 'avgQuotationPrice',
unit: ''
}, {
label: '升级订单/单',
name: 'avgQuotationPrice',
unit: ''
}, {
label: '营业额(总)/元',
name: 'avgQuotationPrice',
unit: ''
}],
},
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult: false
},
/**
* 组件的方法列表
*/
methods: {
// 初始化
initLocal(val) {
this.setData({
type: val,
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult: false
}, () => {
this.getActivityInfo()
})
},
getActivityInfo() {
this.getOutput()
this.getStaffOutput()
this.getHistogram()
this.getTrend()
},
// 看产值-产值总览
getOutput() {
const { type } = this.data
let apiName = 'boutiquecouponOutputValue'
let params = {
merchantId: 44211765
}
if ([2].includes(type)) {
apiName = 'merchantsOutput'
params = {
merchantIds: [44211765]
}
}
ActivityApi[apiName](params).then(res => {
this.setData({
outputData: res
})
})
},
/**柱状图 */
getHistogram() {
const params = {
merchantId: 44211765,
dataType: 1, //数据类型:1报价量/ 2成交量 /3产值
timePeriod: 1, //时间类型 1本周 / 2本月 /3全年
startTime: '',
endTime: ''
}
ActivityApi.merchantsHistogram(params).then(res => {
console.log(res)
})
},
/**折线图 */
getTrend() {
const params = {
merchantId: 44211765,
dataType: 1, //数据类型:1报价量/ 2成交量 /3产值
timePeriod: 1, //时间类型 1本周 / 2本月 /3全年
startTime: '',
endTime: ''
}
ActivityApi.merchantsTrend(params).then(res => {
console.log(res)
})
},
getOutputReport() {
ActivityApi.merchantsOutputReport
},
/**员工排行 */
getStaffOutput() {
const params = {
merchantIds: [44211765],
transferName: '',
orderBy: 1, //排序:1-产值,2-成交量,3-报价量,4-转化率
}
ActivityApi.merchantsStaffOutput(params).then(res => {
console.log(res)
})
},
// 下拉刷新
activityRefresh(e) {
this.getActivityInfo()
},
jumpReport(e) {
const {time} = e.target.dataset
const {entranceType} = this.data
wx.redirectTo({
url: `/packageOutput/pages/monthReport/monthReport?time=${time}&type=${entranceType}`,
})
}
},
// lifetimes: {
// attached() {
// if(this.control)return
// this.control = true
// this.initLocal(this.data.entranceType)
// }
// },
})
{
"component": true,
"usingComponents": {
"nothing-data":"../nothingData/nothingData",
"activity-ing":"../activitying/index",
"activity-end":"../activityend/index"
}
}
\ No newline at end of file
.output-box {
padding: 24rpx;
margin: 0rpx 16rpx;
border-radius: 32rpx;
.output-title {
font-weight: 600;
font-size: 32rpx;
color: #1B233D;
line-height: 48rpx;
margin: 20rpx 0rpx;
}
}
.output-value {
display: grid;
grid-template-columns: repeat(3, 33.33%);
row-gap: 24rpx;
padding: 32rpx;
background-image: linear-gradient(180deg, #FFFFFF 72%, #EBF1FF 100%);
border-radius: 16rpx;
&.today {
background-image: linear-gradient(180deg, #FFFFFF 64%, #FFF8E6 100%);
border-radius: 16rpx;
}
.output-item {
text-align: center;
.output-num {
font-size: 40rpx;
color: #1B233D;
line-height: 48rpx;
}
.output-label {
font-size: 24rpx;
color: #6E6E7A;
line-height: 36rpx;
margin-top: 12rpx;
}
}
}
.line-box {
width: 710rpx;
height: 584rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.bar-box {
width: 710rpx;
height: 516rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.staf-box {
width: 710rpx;
background: #FFFFFF;
box-shadow: 0 2rpx 20rpx 0 #b4bacc52;
border-radius: 20rpx;
margin: 24rpx auto 0rpx;
}
.table-box {
display: flex;
justify-content: center;
margin: 48rpx 0;
.btn-box {
width: 316rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
font-size: 32rpx;
border-radius: 20rpx;
background: #FFFFFF;
color: #1B233D;
border: 2rpx solid #DCDFE6;
&.month-btn {
background-image: linear-gradient(-81deg, #556AF5 0%, #7197FF 100%);
margin-left: 22rpx;
color: #FFFFFF;
}
}
}
\ No newline at end of file
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{'height: calc(100% - 22rpx);'}}">
<view class="output-box">
<view class="output-title">产值总览</view>
<view class="output-value">
<view class="output-item" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<view class="output-num">{{outputData[item.name]||0}}</view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
<view class="output-title">当日日新增</view>
<view class="output-value today">
<view class="output-item" wx:for="{{outputView[entranceType ==2 ?'todayOutputValue':'todayOutiqueOutputValue']}}">
<view class="output-num">{{outputData[item.name]|| 0}} </view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
</view>
<view class="line-box">
</view>
<view class="bar-box">
</view>
<view class="staf-box">
555
</view>
<view class="table-box">
<view class="btn-box day-btn" bindtap="jumpReport" data-time="day">查看日报表</view>
<view class="btn-box month-btn" bindtap="jumpReport" data-time="month">查看月报表</view>
</view>
</scroll-view>
\ No newline at end of file
import ActivityApi from '~/api/activityApi/index'
import {handlerMiss} from '~/packagesList/common/common'
Component({
/**
* 组件的属性列表
*/
properties: {
isHaveSubcribe:Boolean,
ids:Array,
entranceType:{
type:Number,
observer:function(val){
if(val>-1&&this.control){
this.initLocal(val)
}
}
},
fresh:{
type:Boolean,
observer: function (val) {
if(val){
this.setData({
pageNum: 1
}, () => {
this.initLocal(this.data.entranceType)
})
}
}
}
},
/**
* 组件的初始数据
*/
data: {
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult:false
},
/**
* 组件的方法列表
*/
methods: {
// 初始化
initLocal(val){
this.setData({
listData: [],
activeTrigger: false,
activePageNum: 1,
activeTotal: 0,
pageNum: 1,
total: 0,
pageSize: 10,
noResult:false
},()=>{
this.getActivity(val)
})
},
// 获取数据
getActivity(type){
let { pageSize, pageNum,listData,ids } = this.data
let paraList = [],apiName = 'getActivityList',para = {pageNum,pageSize}
if(type==1){
ids.forEach(el=>{
if((el.serviceType==1&&type==1) || (el.serviceType==2&&type==2)){
if(el.activityId){
paraList.push(el.activityId)
}
}
})
para.ids = paraList
apiName = 'getSubscribeListByIdsApi'
if(!paraList.length)return this.setData({noResult:true})
}else if([2,5,6].includes(type)){
para.subscribe = type
apiName = 'getActivityPageBySubscribe'
}
ActivityApi[apiName](para).then(res=>{
if(res&&res.list){
handlerMiss(res,{serviceType:type,pageNum,listName:'listData',orginList:listData},(result)=>{
if(result&&result.total&&type==0){
this.triggerEvent('total',{type:0,total:result.total || 0})
}
this.setData(result)
})
}
})
},
toFresh(e) {
if (e.detail) {
this.setData({
listData: e.detail
})
}
},
// 下拉刷新
activityRefresh(e) {
this.setData({
pageNum: 1
},()=>{
this.getActivity(this.data.entranceType)
// 刷新获取订阅配置
if(!this.data.isHaveSubcribe){
wx.$eventbus.emit("RESFRESH_SUBCRIBE",{type:this.data.entranceType,fresh:true})
}
})
},
// 上拉触底加载
scrollonReachBottom(e) {
let { pageNum, total, pageSize } = this.data
// 判断当前页是否是末页
if (Math.floor(total / pageSize) == pageNum - 1) return
this.setData({
pageNum: pageNum + 1
},()=>{
this.getActivity(this.data.entranceType)
})
},
// 滚动中
scrollIng(e) {},
},
lifetimes: {
attached() {
if(this.control)return
this.control = true
this.initLocal(this.data.entranceType)
}
},
})
{
"component": true,
"usingComponents": {
"nothing-data":"../nothingData/nothingData",
"activity-ing":"../activitying/index",
"activity-end":"../activityend/index"
}
}
\ No newline at end of file
.content-box{
padding: 0 22rpx 150rpx 24rpx;
}
\ No newline at end of file
<scroll-view scroll-y class="content" class="content" refresher-enabled bindrefresherrefresh="activityRefresh" bindscrolltolower="scrollonReachBottom" bindscroll="scrollIng" refresher-triggered="{{activeTrigger}}" style="{{!listData.length ? 'padding-top: 16rpx;' : ''}}{{'height: calc(100% - 112rpx);'}}">
<block wx:if="{{!noResult}}">
<view class="content-box">
<block wx:for="{{listData}}" wx:key="index">
<block wx:if="{{item.activityStatus!=3}}">
<activity-ing tabType="{{entranceType}}" bind:refreshList="toFresh" index="{{index}}" activeList="{{listData}}" item="{{item}}" activeDateIndex="{{activeDateIndex}}"></activity-ing>
</block>
<block wx:else>
<activity-end tabType="{{entranceType}}" bind:refreshList="toFresh" index="{{index}}" activeList="{{listData}}" item="{{item}}"></activity-end>
</block>
</block>
</view>
</block>
<block wx:else>
<nothing-data description="请前往嘀加企微管家后台创建"></nothing-data>
</block>
</scroll-view>
\ No newline at end of file
// pages/tab/index/components/activityCalender/activityCalender.js
import {
imgUrlMixin
} from '~/mixins/index'
import ActivityApi from '~/api/activityApi/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(newVal) {}
},
// 展开收起
isCollapse: {
type: Boolean,
value: false
},
// 默认选中日期(今天)
activeDateIndex: {
type: Number
},
tabType: Number
},
/**
* 组件的初始数据
*/
data: {
today: new Date().format('MM月dd日')
},
/**
* 组件的方法列表
*/
methods: {
// 任务时间大于7天切换
changeTaskCalender(e) {
let data = this.properties.data
if (data) data.calenderActiveIndex = e.detail.current
this.setData({
data
})
},
myevent(e) {
this.setData({
finishFlag: e.detail.flag,
finishKey: e.detail.index
})
},
finish(e) {
let {
item,
index
} = e.currentTarget.dataset
let {
finishFlag
} = this.data
// wx.$router.go('packageActivity.taskDetail', {...item})
if (finishFlag) {
return wx.showToast({
title: '正在下载中',
icon: 'none'
})
}
if (!item.platformMerchantMissionMaterialResponseList) return // 数据为空处理 未下载完
let taskDetailBox = this.selectComponent("#taskDetailBox")
taskDetailBox.finishTask(item, index)
},
// 切换日期查看任务
changeDate(e) {
let {
dateindex
} = e.currentTarget.dataset
this.setData({
activeDateIndex: dateindex
})
},
toTaskDetail(e) {
let {
missionid,
type
} = e.currentTarget.dataset
if (type == 1) return
if (type == 6) {
wx.navigateTo({
url: '/packageStoreAssistant/packageActivity/pages/myFollow/index?activityId='+this.data.data.id,
});
// wx.$router.go('/packageStoreAssistant/packageActivity/pages/myFollow/index', {
// activityId: this.data.data.id,
// })
return
}
wx.$router.go('/packageStoreAssistant/packageActivity/pages/taskDetail/taskDetail', {
missionId: missionid,
tabType: this.data.tabType
})
},
toHandler(e) {
const {
index,
item
} = e.currentTarget.dataset
console.log(item);
let isHaveLink = false
let arr = []
if (item.platformMerchantMissionMaterialResponseList) {
item.platformMerchantMissionMaterialResponseList.forEach(el => {
if (el.materialType == 4) {
isHaveLink = true
}
arr.push(el.materialType)
})
}
if (isHaveLink) {
this.finishTask(item.detailInfo)
this.jumpZC(item.detailInfo.activityId)
return
}
if (arr.indexOf(2) != -1 || arr.indexOf(3) != -1) {
let {
missionId
} = item
wx.$router.go('/packageStoreAssistant/packageActivity/pages/taskDetail/taskDetail', {
missionId,
tabType: this.data.tabType
})
return
}
this.tracker(item.detailInfo.activityId)
this.finishTask(item.detailInfo, index)
},
jumpZC(activityId) {
const userStorage = wx.$storage.get('userInfo')
let query = {
id: activityId,
exclusiveUuid: userStorage.uuid,
merchantId: userStorage.merchantId,
isExclusive: 1,
shareStaffUuid: userStorage.uuid,
form: 'task'
}
if (this.data.tabType == 0 || !this.data.tabType) {
wx.$router.go('/pages/crowdfunding/index/index', query)
} else {
query.notIntercept = true
wx.$router.go('/packageShopmall/packageExpandedGold/pages/activity/index/index', query)
}
},
finishTask(item, index) {
Promise.all([this.copyText(item)])
.then(() => {
wx.showToast({
title: index == 0 ? '文案已复制到剪切板,纯文案内容请直接通过微信发送给客户' : '文案已复制到剪切板,纯文案内容请前往朋友圈发送',
icon: 'none'
})
})
.catch(err => {
wx.showToast({
title: err,
icon: 'none'
})
})
},
copyText(item) {
return new Promise((resolve, reject) => {
let {
textContent
} = item
let copyData = ''
if (textContent) {
copyData = textContent
}
let _this = this
if (!copyData.length) {
// 复制内容为空 不做处理
return resolve()
}
wx.setClipboardData({
data: copyData,
success() {
resolve()
},
fail() {
reject('文案复制失败')
}
})
})
},
tracker(id) {
const USERINFO = wx.$storage.get('userInfo')
let data = {
action_type: 4, // 事件类型固定为4-分享
item_type: 3, // 商品类型,固定为3-众筹活动
merchant_id: USERINFO.merchantId, // 门店号
staff_uuid: USERINFO.uuid,
business_type: 1, // 业务类型,固定为1
add_way: 104, // 来源,固定为104
create_time: new Date().format('yyyy-MM-dd hh:mm:ss'), // 分享时间
item_id: id,
share_staff_type: 3
}
let jsonList = [JSON.stringify(data)]
ActivityApi.taskShareReport({
jsonList
}).then(res => {})
},
}
})
\ No newline at end of file
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityCalender/activityCalender.wxss */
.title{
padding-left: 8rpx;
font-size: 32rpx;
color: #1B233D;
font-weight: 600;
text{
font-size: 28rpx;
color: #2D2D33;
font-weight: 400;
}
}
.calender-box{
padding: 32rpx 0;
position: relative;
.swiper{
height: 112rpx;
.swiper_item{
display: flex;
.time-box{
width: 100%;
height: 100%;
flex: 1;
display: flex;
flex-flow: column;
justify-content: center;
align-items: center;
background: #F7F8FA;
border-radius: 6px;
margin: 0 4rpx;
image{
width: 48rpx;
height: 48rpx;
margin-bottom: 10rpx;
}
.task-time{
font-size: 18rpx;
color: #1B233D;
}
}
.completed{
background-image: linear-gradient(180deg, #FFD84B 28%, #FFB33E 76%);
.task-time{
color: #FFFFFF;
}
}
.active{
background-image: linear-gradient(180deg, #FFF7DB 15%, #FFF1E0 87%);
.task-time{
color: #1B233D;
}
}
}
}
.swiper-dots{
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 100%;
bottom: 24rpx;
left: 0;
.dots {
width: 16rpx;
height: 6rpx;
margin: 0 4rpx;
border-radius: 3rpx;
background: #E1E4EB;
transition: all .5s;
}
.dots.active{
width: 24rpx;
background-image: linear-gradient(-60deg, #556AF5 0%, #7197FF 100%);
}
}
}
.calender-box.p-b-54{
padding-bottom: 54rpx;
}
.task-show-box{
.item-box{
border-bottom: 1px solid #F0F1F5;
.task-item{
padding: 24rpx 0;
// padding: 24rpx 0 0 0;
display: flex;
align-items: center;
// justify-content: space-between;
margin-bottom: 7rpx;
position: relative;
.left{
display: flex;
position: relative;
image{
width: 80rpx;
height: 80rpx;
margin-right: 16rpx;
flex-shrink: 0;
}
.task-message{
display: flex;
flex-flow: column;
justify-content: space-around;
.task-title{
font-family: PingFangSC-Medium;
display: flex;
align-items: center;
flex-wrap: nowrap;
font-size: 28rpx;
font-weight: 500;
color: #1B233D;
word-break: break-all;
image{
width: 28rpx;
height: 28rpx;
margin: 0;
flex-shrink: 0;
}
.integral-num{
font-family: PingFangSC-Medium;
flex-shrink: 0;
font-size: 24rpx;
font-weight: 500;
color: #FE5662;
}
}
.task-content{
font-size: 22rpx;
word-break: break-all;
color: #9299AD;
}
}
.unstart{
position: absolute;
left: 0;
bottom: 0;
width: 80rpx;
height: 32rpx;
background: rgba(0, 0, 0, 0.5);
border-radius: 8rpx 8rpx 12rpx 12rpx;
font-weight: 400;
font-size: 20rpx;
color: #FFFFFF;
}
}
.right{
width: calc(100% - 120rpx);
.title-wrap{
display: flex;
align-items: center;
.text-title{
font-family: PingFangSC-Medium;
flex-wrap: nowrap;
font-size: 28rpx;
font-weight: 500;
color: #1B233D;
word-break: break-all;
}
.icon{
width: 28rpx;
height: 28rpx;
margin: 0;
flex-shrink: 0;
}
.integral-num{
font-family: PingFangSC-Medium;
flex-shrink: 0;
font-size: 24rpx;
font-weight: 500;
color: #FE5662;
}
}
.task-content{
font-size: 22rpx;
word-break: break-all;
color: #9299AD;
}
}
.task-btn{
margin-left: 32rpx;
display: flex;
align-items: center;
text-align: center;
.btn{
width: 84rpx;
height: 84rpx;
// line-height: 48rpx;
// display: flex;
// justify-content: center;
// align-items: center;
// width: 116rpx;
// height: 48rpx;
// background: #FEF1F4;
// border: 2rpx solid rgba(254,86,98,0.40);
// border-radius: 12rpx;
// font-size: 24rpx;
// color: #FE5662;
}
.primary{
border: none;
width: 120rpx;
height: 56rpx;
line-height: 56rpx;
background-image: linear-gradient(270deg, #FF3E7F 0%, #FE624B 100%);
border-radius: 6px;
color: #FFFFFF;
}
.grey-btn{
color: #9299AD;
border: 2rpx solid #CACDD5;
background: #F5F6F7;
}
.btn_title{
margin-top: 8rpx;
font-size: 11px;
color: #FE5662;
}
}
.right-compelete-icon{
position: absolute;
right: 40rpx;
top: 50%;
transform: translateY(-50%);
width: 84rpx;
height: 84rpx;
}
.right-arrow-icon{
position: absolute;
right: 0;
top: 50%;
transform: translate(0,-50%);
width: 24rpx;
height: 24rpx;
}
}
}
.item-box:last-child{
border: none;
margin: 0;
}
}
.task-share{
padding: 0 0 16rpx 0;
.btn{
font-weight: 400;
font-size: 24rpx;
color: #1B233D;
.icon{
width: 28rpx;
height: 28rpx;
margin-right: 8rpx;
}
}
}
.flex_cc{
display: flex;
align-items: center;
justify-content: center;
}
.flex_scb{
display: flex;
align-items: center;
justify-content: space-between;
}
.flex_sac{
display: flex;
align-items: center;
justify-content: space-around;
}
\ No newline at end of file
<!--pages/tab/index/components/activityCalender/activityCalender.wxml-->
<wxs src="../index.wxs" module="fn"></wxs>
<block wx:if="{{!isCollapse}}">
<view class="title">任务日历<text> · {{data.missionList[activeDateIndex].platformMerchantMissionResponseList.length}}</text></view>
<view wx:if="{{data.newtaskCalenderList.length}}" class="calender-box {{data.newtaskCalenderList.length > 1 ? 'p-b-54' : ''}}">
<swiper class="swiper" current="{{data.calenderActiveIndex}}" bindchange="changeTaskCalender" data-index="{{index}}">
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="val" wx:for-index="k" wx:key="k">
<swiper-item class='swiper_item'>
<block wx:for="{{val}}" wx:for-item="v" wx:for-index="j" wx:key="j">
<view class="time-box {{v.status == 1 ? 'completed' : v.status == 2 ? 'past' : ''}} {{activeDateIndex == v.ind ? 'active' : ''}}" bind:tap="changeDate" data-dateindex="{{v.ind}}">
<!-- <image webp src="{{IMGURL}}store-assistant/{{v.status == 1 ? 'task_completed.png' : v.status == 2 ? 'calender_past_integral_icon.png' : 'calender_integral_icon.png'}}"></image> -->
<glsx-image webp src="store-assistant/{{v.status == 1 ? 'task_completed.png' : v.status == 2 ? 'calender_past_integral_icon.png' : 'calender_integral_icon.png'}}"></glsx-image>
<view class="task-time">{{v.time==today?'今天':v.time}}</view>
</view>
</block>
</swiper-item>
</block>
</swiper>
<block wx:if="{{data.newtaskCalenderList.length > 1}}">
<view class="swiper-dots">
<block wx:for="{{data.newtaskCalenderList}}" wx:for-item="value" wx:for-index="inde" wx:key="inde">
<view class="dots {{data.calenderActiveIndex == inde ?'active':''}}"></view>
</block>
</view>
</block>
</view>
<view class="task-show-box">
<block wx:for="{{data.missionList[activeDateIndex].platformMerchantMissionResponseList}}" wx:for-item="val" wx:for-index="ky" wx:key="ky">
<view catch:tap="toTaskDetail" data-type="{{val.missonType}}" data-missionid="{{val.missionId}}" class="item-box">
<view class="task-item">
<view class="left">
<glsx-image webp src="store-assistant/task_icon_{{val.missonType}}.png"></glsx-image>
<block wx:if="{{fn.timeFilter(data.missionList[activeDateIndex].activityTime, 2)}}">
<view wx:if="{{val.completeStatus != 2}}" class="unstart flex_cc">未开始</view>
</block>
</view>
<view class="right">
<view class="title-wrap">
<view class="text-title">{{fn.getString(val.missionName,12)}}</view>
<!-- <view wx:else class="text-title">您有{{totalNum || 0}}名意向用户待跟进</view> -->
<block wx:if="{{val.gainScore}}">
<glsx-image class="icon" webp src="store-assistant/integral_icon.png"></glsx-image>
<view class="integral-num">+{{val.gainScore}}积分</view>
</block>
</view>
<view class="task-content">{{val.missonDesc}}</view>
</view>
<block wx:if="{{fn.timeFilter(data.missionList[activeDateIndex].activityTime, 1) || val.completeStatus == 2}}">
<glsx-image wx:if="{{val.completeStatus == 2}}" class="right-compelete-icon" src="store-assistant/complete.png"></glsx-image>
</block>
<glsx-image class="right-arrow-icon" src="store-assistant/right_arrow_grey_icon.png?v={{img_version}}" />
<!-- <view class="left">
<glsx-image webp src="store-assistant/task_icon_{{val.missonType}}.png"></glsx-image>
<view class="task-message" wx:if="{{val.missonType!=6}}">
<view class="task-title">
<view class="text">{{val.missionName}}</view>
<block wx:if="{{val.gainScore}}">
<glsx-image webp src="store-assistant/integral_icon.png"></glsx-image>
<view class="integral-num">+{{val.gainScore}}积分</view>
</block>
</view>
<view class="task-content">{{val.missonDesc}}</view>
</view>
<view class="task-message" wx:else>
<view class="task-title">
<view class="text">您有{{totalNum?totalNum:0}}名意向用户待跟进</view>
<block wx:if="{{val.gainScore}}">
<glsx-image webp src="store-assistant/integral_icon.png"></glsx-image>
<view class="integral-num">+{{val.gainScore}}积分</view>
</block>
</view>
<view class="task-content">{{val.missonDesc}}</view>
</view>
<block wx:if="{{fn.timeFilter(data.missionList[activeDateIndex].activityTime, 2)}}">
<view wx:if="{{val.completeStatus != 2}}" class="unstart flex_cc">未开始</view>
</block>
</view>
<view class="task-btn">
<block wx:if="{{fn.timeFilter(data.missionList[activeDateIndex].activityTime, 1) || val.completeStatus == 2}}">
<glsx-image wx:if="{{val.completeStatus == 2}}" class="btn" src="store-assistant/complete.png"></glsx-image>
</block>
<glsx-image style="width:24rpx;height:24rpx;margin-left: 12rpx;" src="store-assistant/right_arrow_grey_icon.png?v={{img_version}}" />
</view> -->
</view>
<!-- 分享类任务 显示物料 -->
<view wx:if="{{val.missonType!=1&&val.missonType!=6}}" class="task-share flex_sac">
<view data-index="{{0}}" data-item="{{val}}" catch:tap="toHandler" class="btn flex_cc">
<glsx-image class="icon" webp src="store-assistant/share/index_share_hy.png" />
<text>分享好友</text>
</view>
<view data-index="{{1}}" data-item="{{val}}" catch:tap="toHandler" class="btn flex_cc">
<glsx-image class="icon" webp src="store-assistant/share/index_share_pyq.png" />
<text>发朋友圈</text>
</view>
</view>
</view>
</block>
</view>
</block>
import { imgUrlMixin } from '~/mixins/index'
Component({
/**
* 组件的属性列表
*/
behaviors: [imgUrlMixin],
properties: {
data: {
type: Object,
value: {},
observer(v) {
if (v) {
// 活动概览数据处理
let s = v.statics
if (s && v.activityStatus != 3) {
v.overviewData = { // 活动中
browseData: {
all: { title: '总浏览', num: s.browseCount, sort: s.browseCountRank },
today: { title: '今日浏览', num: s.todayBrowseCount, sort: s.todayBrowseCountRank }
},
shareData: {
all: { title: '总产值', num: this.priceFormat(s.totalAmount || 0), sort: 0 },
today: { title: '今日产值', num: this.priceFormat(s.todayAmount || 0), sort: 0 }
},
visitorData: {
all: { title: '总访客', num: s.fansCount, sort: s.fansCountRank },
today: { title: '今日访客', num: s.todayFansCount, sort: s.todayFansCountRank }
},
orderData: {
all: { title: '总订单', num: s.orderCount, sort: s.orderCountRank },
today: { title: '今日订单', num: s.todayOrderCount, sort: s.todayOrderCountRank }
}
}
// if(v.tabType&&v.tabType==2){
// v.overviewData.shareData.all = { title: '门店客户群', num: s.merchantCustomGroupCount, sort: 0 }
// v.overviewData.shareData.today = { title: '个人客户群', num: s.personCustomGroupCount, sort: 0 }
// }
} else if (s) {
v.overviewData = [ // 活动诊断
{ title: '浏览', num: s.browseCount, sort: s.browseCountRank },
// {title: '产值', num: s.shareCount, sort: s.totalAmount},
{ title: '访客', num: s.fansCount, sort: s.fansCountRank },
{ title: '订单', num: s.orderCount, sort: s.orderCountRank }
]
}
this.setData({ data: v })
}
}
},
activityOverviewList: {
type: Array,
value: []
},
backStyle: {
type: Array,
value: []
},
textType: {
type: Number,
value: 0
}
},
/**
* 组件的初始数据
*/
data: {
textTypeList: ['', '当前排名:', '最终排名:']
},
/**
* 组件的方法列表
*/
methods: {
// 跳转
jump(e) {
let { index } = e.currentTarget.dataset
let itemData = this.data.data
console.log(itemData)
if (index < 2) return // 分享和浏览数据不作跳转
switch (index) {
case 2: // 访客
wx.$router.go("/packageStoreAssistant/packageActivity/pages/visitor/visitor", { ...itemData })
break
case 3: // 订单
wx.$router.go("/packageStoreAssistant/packageActivity/pages/order/order", { ...itemData })
break
}
},
// 价格格式化
priceFormat(num, point = 2) {
let numStr = num.toString().split('.')[0]
if (numStr.length < 6) { // 判断数字有多长,如果小于6,,表示10万以内的数字,让其直接显示
return numStr;
} else if (numStr.length >= 6 && numStr.length <= 8) { // 如果数字大于6位,小于8位,让其数字后面加单位万
point = 0
let decimal = numStr.substring(numStr.length - 4, numStr.length - 4 + point)
console.log(decimal);
// 由千位,百位组成的一个数字
return parseFloat(parseInt(num / 10000) + '.' + decimal) + '万'
} else if (numStr.length > 8) { // 如果数字大于8位,让其数字后面加单位亿
let decimal = numStr.substring(numStr.length - 8, numStr.length - 8 + point);
return parseFloat(parseInt(num / 100000000) + '.' + decimal) + '亿'
}
},
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityOverview/activityOverview.wxss */
.active-overview{
display: flex;
flex-wrap: wrap;
.wrapper{
flex: 1;
display: flex;
flex-direction: column;
// height: 188rpx;
border-radius: 8px;
padding: 24rpx 12rpx;
box-sizing: border-box;
min-width: calc((100% - 32rpx) / 2);
}
.overview-item-box{
width: 100%;
height: 100%;
// flex: 1;
display: flex;
// height: 188rpx;
// border-radius: 8px;
// padding: 24rpx 12rpx;
// box-sizing: border-box;
// min-width: calc((100% - 32rpx) / 2);
.all, .today{
flex: 1;
display: flex;
flex-flow: column;
align-items: center;
justify-content: space-between;
.title{
color: #6E6E7A;
font-size: 24rpx;
}
.primary-title{
color: #4466F0;
display: flex;
align-items: center;
}
.number{
color: #2D2D33;
font-size: 44rpx;
font-weight: 600;
}
.sort{
font-size: 20rpx;
color: #2D2D33;
line-height: 28rpx;
.up{
color: #EB4E4E;
}
.down{
color: #2FB87A;
}
}
}
}
.btn-box{
padding: 32rpx 60rpx 0 60rpx;
display: flex;
justify-content: space-between;
}
.checkDetail{
width: 160rpx;
height: 48rpx;
background: rgba(255,255,255,0.20);
border: 1rpx solid #4466F0;
border-radius: 36rpx;
font-weight: 400;
font-size: 24rpx;
color: #4466F0;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
margin: 0 auto;
margin-top: 24rpx;
}
.godetail{
width: 236rpx;
margin: 0;
}
.flex_sac{
display: flex;
justify-content: space-around;
}
}
\ No newline at end of file
<!-- pages/tab/index/components/activityOverview/activityOverview.wxml -->
<view>
<wxs src="../index.wxs" module="fn"></wxs>
<!-- 活动中 -->
<view wx:if="{{textType == 1}}" class="active-overview">
<block wx:for="{{activityOverviewList}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="wrapper" style="{{backStyle[ind]}}">
<view class="overview-item-box">
<view class="all">
<view class="title">{{data.overviewData[i].all.title}}</view>
<view class="number">{{data.overviewData[i].all.num || 0}}</view>
<view class="sort" wx:if="{{ind > 1}}">
<text>当前排名:</text>
{{data.overviewData[i].all.sort || '-'}}
</view>
<!-- <view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].all.sort || '-'}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{!data.overviewData[i].all.sort ? '' : (data.overviewData[i].all.sort > 0 ? 'up' : 'down')}}">{{fn.mathABS(data.overviewData[i].all.sort) || '-'}}<text wx:if="{{data.overviewData[i].all.sort}}">{{data.overviewData[i].all.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view> -->
</view>
<view class="today">
<view class="title">{{data.overviewData[i].today.title}}</view>
<view class="number">{{data.overviewData[i].today.num || 0}}</view>
<view class="sort" wx:if="{{ind > 1}}">
<text>当前排名:</text>
{{data.overviewData[i].today.sort || '-'}}
</view>
<!-- <view wx:if="{{ind != 1}}" class="sort"><text>当前排名:</text>{{data.overviewData[i].today.sort || '-'}}</view>
<view wx:else class="sort"><text>排名 </text><text class="{{!data.overviewData[i].today.sort ? '' : (data.overviewData[i].today.sort > 0 ? 'up' : 'down')}}">{{fn.mathABS(data.overviewData[i].today.sort) || '-'}}<text wx:if="{{data.overviewData[i].today.sort}}">{{data.overviewData[i].today.sort > 0 ? ' ⬆ ' : ' ⬇ '}}</text></text></view> -->
</view>
</view>
<view wx:if="{{ind > 1}}" bind:tap="jump" data-index="{{ind}}" class="checkDetail">查看详情</view>
</view>
</block>
</view>
<!-- 活动诊断 -->
<view wx:else class="active-overview">
<view class=" wrapper" style="{{backStyle[0]}}">
<view class="overview-item-box">
<view class="all" wx:for="{{data.overviewData}}" wx:for-item="val" wx:for-index="key" wx:key="key" data-index="{{key}}">
<view class="title">{{val.title}}</view>
<view class="number">{{val.num || 0}}</view>
<view class="sort">
<text>最终排名:</text>
{{val.sort || '-'}}
</view>
</view>
</view>
<view class="btn-box flex_sac">
<view bind:tap="jump" data-index="{{2}}" class="checkDetail godetail">访客详情</view>
<view bind:tap="jump" data-index="{{3}}" class="checkDetail godetail">订单详情</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
// pages/tab/index/components/activityTop/activityTop.js
import index_const from "../../index_const"
Component({
/**
* 组件的属性列表
*/
properties: {
data: {
type: Object,
value: {}
},
widthStyle: {
type: String
},
tabType:Number
},
/**
* 组件的初始数据
*/
data: {
activityTypList: index_const.data.activityTypList,
activityTypeStyle: 'margin-top: 8rpx;height: 44rpx;line-height: 44rpx;',
},
/**
* 组件的方法列表
*/
methods: {
}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* pages/tab/index/components/activityTop/activityTop.wxss */
.active-top{
display: flex;
.active-img{
flex-shrink: 0;
position: relative;
width: 160rpx;
height: 160rpx;
margin-right: 24rpx;
.thum-icon{
width: 100%;
height: 100%;
position: absolute;
border-radius: 16rpx;
overflow: hidden;
top: 0;
left: 0;
}
.active-type{
position: absolute;
top: 0;
left: 0;
width: 72rpx;
height: 40rpx;
background-image: linear-gradient(90deg, #FFF3A2 7%, #FFDA85 95%);
border-radius: 16rpx 0 24rpx 0;
color: #673F00;
font-size: 24rpx;
text-align: center;
}
}
.active-title{
flex: 1;
display: flex;
flex-flow: column;
justify-content: space-between;
padding: 8rpx 0;
.name{
// display: flex;
// align-items: center;
.name-left{
font-weight: 600;
font-size: 36rpx;
color: #1B233D;
line-height: 48rpx;
word-break: break-all;
.activity-type{
float: right;
line-height: 44rpx;
font-size: 28rpx;
font-weight: 400;
color: #FE5662;
margin-top: 4rpx;
image{
margin-top: 4rpx;
width: 32rpx;
height: 32rpx;
}
}
}
.right{
display: flex;
flex-flow: 1;
font-size: 28rpx;
align-items: center;
image{
width: 32rpx;
height: 32rpx;
}
}
}
.time{
color: #7A8299;
font-size: 28rpx;
text{
color: #1B233D;
}
}
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!