门店端优化
This commit is contained in:
@@ -27,24 +27,33 @@ class CustomerController extends Api
|
|||||||
$pageSize = isset($params['pageSize']) ? intval($params['pageSize']) : 10;
|
$pageSize = isset($params['pageSize']) ? intval($params['pageSize']) : 10;
|
||||||
$userInfo = request()->userInfo;
|
$userInfo = request()->userInfo;
|
||||||
|
|
||||||
|
$where = [];
|
||||||
// 必要的查询条件
|
// 必要的查询条件
|
||||||
$userId = $userInfo['id'];
|
$userId = $userInfo['id'];
|
||||||
$companyId = $userInfo['companyId'];
|
$companyId = $userInfo['companyId'];
|
||||||
|
|
||||||
if (empty($userId) || empty($companyId)) {
|
if (empty($userId) || empty($companyId)) {
|
||||||
return errorJson('缺少必要参数');
|
return errorJson('缺少必要参数');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 构建查询条件
|
// 构建查询条件
|
||||||
$where = [
|
$deviceIds = Db::name('device_user')->where(['userId' => $userId, 'companyId' => $companyId])->order('id DESC')->column('deviceId');
|
||||||
'du.userId' => $userId,
|
if (empty($deviceIds)) {
|
||||||
'du.companyId' => $companyId
|
return errorJson('设备不存在');
|
||||||
];
|
}
|
||||||
|
$wechatIds = [];
|
||||||
|
foreach ($deviceIds as $deviceId) {
|
||||||
|
$wechatIds[] = Db::name('device_wechat_login')
|
||||||
|
->where(['deviceId' => $deviceId])
|
||||||
|
->order('id DESC')
|
||||||
|
->value('wechatId');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 搜索条件
|
// 搜索条件
|
||||||
if (!empty($params['keyword'])) {
|
if (!empty($params['keyword'])) {
|
||||||
$where['wf.alias|wf.nickname|wf.wechatId'] = ['like', '%' . $params['keyword'] . '%'];
|
$where['alias|nickname|wechatId'] = ['like', '%' . $params['keyword'] . '%'];
|
||||||
}
|
}
|
||||||
// if (!empty($params['email'])) {
|
// if (!empty($params['email'])) {
|
||||||
// $where['wa.bindEmail'] = ['like', '%' . $params['email'] . '%'];
|
// $where['wa.bindEmail'] = ['like', '%' . $params['email'] . '%'];
|
||||||
@@ -54,14 +63,10 @@ class CustomerController extends Api
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
// 构建查询
|
// 构建查询
|
||||||
$query = Db::name('device_user')
|
$query = Db::table('s2_wechat_friend')
|
||||||
->alias('du')
|
|
||||||
->join(['s2_device' => 'd'], 'd.id = du.deviceId','left')
|
|
||||||
->join(['s2_wechat_account' => 'wa'], 'wa.imei = d.imei','left')
|
|
||||||
->join(['s2_wechat_friend' => 'wf'], 'wf.ownerWechatId = wa.wechatId','left')
|
|
||||||
->where($where)
|
->where($where)
|
||||||
->field('d.id as deviceId,d.imei,wf.*')
|
->whereIn('ownerWechatId',$wechatIds)
|
||||||
->group('wf.wechatId'); // 防止重复数据
|
->group('wechatId'); // 防止重复数据
|
||||||
|
|
||||||
// 克隆查询对象,用于计算总数
|
// 克隆查询对象,用于计算总数
|
||||||
$countQuery = clone $query;
|
$countQuery = clone $query;
|
||||||
@@ -69,10 +74,9 @@ class CustomerController extends Api
|
|||||||
|
|
||||||
// 获取分页数据
|
// 获取分页数据
|
||||||
$list = $query->page($page, $pageSize)
|
$list = $query->page($page, $pageSize)
|
||||||
->order('wa.id DESC')
|
->order('id DESC')
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 格式化数据
|
// 格式化数据
|
||||||
foreach ($list as &$item) {
|
foreach ($list as &$item) {
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ namespace app\store\controller;
|
|||||||
|
|
||||||
use app\store\model\WechatFriendModel;
|
use app\store\model\WechatFriendModel;
|
||||||
use app\store\model\WechatMessageModel;
|
use app\store\model\WechatMessageModel;
|
||||||
use think\facade\Db;
|
use think\Db;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 数据统计控制器
|
* 数据统计控制器
|
||||||
@@ -18,8 +19,23 @@ class StatisticsController extends BaseController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$companyId = $this->userInfo['companyId'];
|
$companyId = $this->userInfo['companyId'];
|
||||||
$wechatAccountId = $this->device['wechatAccountId'];
|
$userId = $this->userInfo['id'];
|
||||||
$ownerWechatId = $this->device['wechatId'];
|
|
||||||
|
// 构建查询条件
|
||||||
|
$deviceIds = Db::name('device_user')->where(['userId' => $userId, 'companyId' => $companyId])->order('id DESC')->column('deviceId');
|
||||||
|
if (empty($deviceIds)) {
|
||||||
|
return errorJson('设备不存在');
|
||||||
|
}
|
||||||
|
$ownerWechatIds = [];
|
||||||
|
foreach ($deviceIds as $deviceId) {
|
||||||
|
$ownerWechatIds[] = Db::name('device_wechat_login')
|
||||||
|
->where(['deviceId' => $deviceId])
|
||||||
|
->order('id DESC')
|
||||||
|
->value('wechatId');
|
||||||
|
}
|
||||||
|
|
||||||
|
$wechatAccountIds = Db::table('s2_wechat_account')->whereIn('wechatId',$ownerWechatIds)->column('id');
|
||||||
|
|
||||||
|
|
||||||
// 获取时间范围
|
// 获取时间范围
|
||||||
$timeRange = $this->getTimeRange();
|
$timeRange = $this->getTimeRange();
|
||||||
@@ -33,37 +49,37 @@ class StatisticsController extends BaseController
|
|||||||
|
|
||||||
|
|
||||||
// 1. 总客户数
|
// 1. 总客户数
|
||||||
$totalCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$totalCustomers = WechatFriendModel::whereIn('ownerWechatId',$ownerWechatIds)
|
||||||
->whereTime('createTime', '>=', $startTime)
|
->whereTime('createTime', '>=', $startTime)
|
||||||
->whereTime('createTime', '<', $endTime)
|
->whereTime('createTime', '<', $endTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 上期总客户数
|
// 上期总客户数
|
||||||
$lastTotalCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$lastTotalCustomers = WechatFriendModel::whereIn('ownerWechatId',$ownerWechatIds)
|
||||||
->whereTime('createTime', '>=', $lastStartTime)
|
->whereTime('createTime', '>=', $lastStartTime)
|
||||||
->whereTime('createTime', '<', $lastEndTime)
|
->whereTime('createTime', '<', $lastEndTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 2. 新增客户数
|
// 2. 新增客户数
|
||||||
$newCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$newCustomers = WechatFriendModel::whereIn('ownerWechatId',$ownerWechatIds)
|
||||||
->whereTime('createTime', '>=', $startTime)
|
->whereTime('createTime', '>=', $startTime)
|
||||||
->whereTime('createTime', '<', $endTime)
|
->whereTime('createTime', '<', $endTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 上期新增客户数
|
// 上期新增客户数
|
||||||
$lastNewCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$lastNewCustomers = WechatFriendModel::whereIn('ownerWechatId',$ownerWechatIds)
|
||||||
->whereTime('createTime', '>=', $lastStartTime)
|
->whereTime('createTime', '>=', $lastStartTime)
|
||||||
->whereTime('createTime', '<', $lastEndTime)
|
->whereTime('createTime', '<', $lastEndTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
//3. 互动次数
|
//3. 互动次数
|
||||||
$interactionCount = WechatMessageModel::where(['wechatAccountId'=> $wechatAccountId])
|
$interactionCount = WechatMessageModel::whereIn('wechatAccountId', $wechatAccountIds)
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 上期互动次数
|
// 上期互动次数
|
||||||
$lastInteractionCount = WechatMessageModel::where(['wechatAccountId'=> $wechatAccountId])
|
$lastInteractionCount = WechatMessageModel::whereIn('wechatAccountId', $wechatAccountIds)
|
||||||
->where('createTime', '>=', $lastStartTime)
|
->where('createTime', '>=', $lastStartTime)
|
||||||
->where('createTime', '<', $lastEndTime)
|
->where('createTime', '<', $lastEndTime)
|
||||||
->count();
|
->count();
|
||||||
@@ -103,10 +119,20 @@ class StatisticsController extends BaseController
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$companyId = $this->userInfo['companyId'];
|
$companyId = $this->userInfo['companyId'];
|
||||||
$wechatAccountId = $this->device['wechatAccountId'];
|
$userId = $this->userInfo['id'];
|
||||||
$ownerWechatId = $this->device['wechatId'];
|
|
||||||
|
|
||||||
|
|
||||||
|
// 构建查询条件
|
||||||
|
$deviceIds = Db::name('device_user')->where(['userId' => $userId, 'companyId' => $companyId])->order('id DESC')->column('deviceId');
|
||||||
|
if (empty($deviceIds)) {
|
||||||
|
return errorJson('设备不存在');
|
||||||
|
}
|
||||||
|
$ownerWechatIds = [];
|
||||||
|
foreach ($deviceIds as $deviceId) {
|
||||||
|
$ownerWechatIds[] = Db::name('device_wechat_login')
|
||||||
|
->where(['deviceId' => $deviceId])
|
||||||
|
->order('id DESC')
|
||||||
|
->value('wechatId');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -116,35 +142,35 @@ class StatisticsController extends BaseController
|
|||||||
$endTime = $timeRange['end_time'];
|
$endTime = $timeRange['end_time'];
|
||||||
|
|
||||||
// 1. 客户增长趋势数据
|
// 1. 客户增长趋势数据
|
||||||
$totalCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$totalCustomers = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
->whereTime('createTime', '<', $endTime)
|
->whereTime('createTime', '<', $endTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
$newCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$newCustomers = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
->whereTime('createTime', '>=', $startTime)
|
->whereTime('createTime', '>=', $startTime)
|
||||||
->whereTime('createTime', '<', $endTime)
|
->whereTime('createTime', '<', $endTime)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 计算流失客户数(假设超过30天未互动的客户为流失客户)
|
// 计算流失客户数(假设超过30天未互动的客户为流失客户)
|
||||||
$thirtyDaysAgo = strtotime('-30 days');
|
$thirtyDaysAgo = strtotime('-30 days');
|
||||||
$lostCustomers = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$lostCustomers = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
->where('createTime', '>', 0)
|
->where('createTime', '>', 0)
|
||||||
->where('deleteTime', '<', $thirtyDaysAgo)
|
->where('deleteTime', '<', $thirtyDaysAgo)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 2. 客户来源分布数据
|
// 2. 客户来源分布数据
|
||||||
// 朋友推荐
|
// 朋友推荐
|
||||||
$friendRecommend = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$friendRecommend = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
// ->whereIn('addFrom', [17, 1000017])
|
// ->whereIn('addFrom', [17, 1000017])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 微信搜索
|
// 微信搜索
|
||||||
$wechatSearch = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$wechatSearch = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
// ->whereIn('addFrom', [3, 15, 1000003, 1000015])
|
// ->whereIn('addFrom', [3, 15, 1000003, 1000015])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 微信群
|
// 微信群
|
||||||
$wechatGroup = WechatFriendModel::where(['ownerWechatId'=> $ownerWechatId])
|
$wechatGroup = WechatFriendModel::whereIn('ownerWechatId', $ownerWechatIds)
|
||||||
// ->whereIn('addFrom', [14, 1000014])
|
// ->whereIn('addFrom', [14, 1000014])
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
@@ -202,9 +228,23 @@ class StatisticsController extends BaseController
|
|||||||
public function getInteractionAnalysis()
|
public function getInteractionAnalysis()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$companyId = $this->userInfo['companyId'];
|
$companyId = $this->userInfo['companyId'];
|
||||||
$wechatAccountId = $this->device['wechatAccountId'];
|
$userId = $this->userInfo['id'];
|
||||||
|
|
||||||
|
// 构建查询条件
|
||||||
|
$deviceIds = Db::name('device_user')->where(['userId' => $userId, 'companyId' => $companyId])->order('id DESC')->column('deviceId');
|
||||||
|
if (empty($deviceIds)) {
|
||||||
|
return errorJson('设备不存在');
|
||||||
|
}
|
||||||
|
$ownerWechatIds = [];
|
||||||
|
foreach ($deviceIds as $deviceId) {
|
||||||
|
$ownerWechatIds[] = Db::name('device_wechat_login')
|
||||||
|
->where(['deviceId' => $deviceId])
|
||||||
|
->order('id DESC')
|
||||||
|
->value('wechatId');
|
||||||
|
}
|
||||||
|
$wechatAccountIds = Db::table('s2_wechat_account')->whereIn('wechatId',$ownerWechatIds)->column('id');
|
||||||
|
|
||||||
// 获取时间范围
|
// 获取时间范围
|
||||||
$timeRange = $this->getTimeRange();
|
$timeRange = $this->getTimeRange();
|
||||||
$startTime = $timeRange['start_time'];
|
$startTime = $timeRange['start_time'];
|
||||||
@@ -216,7 +256,7 @@ class StatisticsController extends BaseController
|
|||||||
|
|
||||||
// 1. 互动频率分析
|
// 1. 互动频率分析
|
||||||
// 高频互动用户数(每天3次以上)
|
// 高频互动用户数(每天3次以上)
|
||||||
$highFrequencyUsers = WechatMessageModel::where(['wechatAccountId' => $wechatAccountId])
|
$highFrequencyUsers = WechatMessageModel::whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
->field('wechatFriendId, COUNT(*) as count')
|
->field('wechatFriendId, COUNT(*) as count')
|
||||||
@@ -225,7 +265,7 @@ class StatisticsController extends BaseController
|
|||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 中频互动用户数(每天1-3次)
|
// 中频互动用户数(每天1-3次)
|
||||||
$midFrequencyUsers = WechatMessageModel::where(['wechatAccountId' => $wechatAccountId])
|
$midFrequencyUsers = WechatMessageModel::whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
->field('wechatFriendId, COUNT(*) as count')
|
->field('wechatFriendId, COUNT(*) as count')
|
||||||
@@ -234,7 +274,7 @@ class StatisticsController extends BaseController
|
|||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 低频互动用户数(仅有1次)
|
// 低频互动用户数(仅有1次)
|
||||||
$lowFrequencyUsers = WechatMessageModel::where(['wechatAccountId' => $wechatAccountId])
|
$lowFrequencyUsers = WechatMessageModel::whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
->field('wechatFriendId, COUNT(*) as count')
|
->field('wechatFriendId, COUNT(*) as count')
|
||||||
@@ -245,41 +285,39 @@ class StatisticsController extends BaseController
|
|||||||
// 2. 互动内容分析
|
// 2. 互动内容分析
|
||||||
// 文字消息数量
|
// 文字消息数量
|
||||||
$textMessages = WechatMessageModel::where([
|
$textMessages = WechatMessageModel::where([
|
||||||
'wechatAccountId' => $wechatAccountId,
|
|
||||||
'msgType' => 1
|
'msgType' => 1
|
||||||
])
|
])
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
|
->whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 图片互动数量
|
// 图片互动数量
|
||||||
$imgInteractions = WechatMessageModel::where([
|
$imgInteractions = WechatMessageModel::where([
|
||||||
'wechatAccountId' => $wechatAccountId,
|
|
||||||
'msgType' => 3
|
'msgType' => 3
|
||||||
])
|
])
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
|
->whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 群聊互动数量
|
// 群聊互动数量
|
||||||
$groupInteractions = WechatMessageModel::where([
|
$groupInteractions = WechatMessageModel::where([
|
||||||
'wechatAccountId' => $wechatAccountId,
|
|
||||||
'type' => 2
|
'type' => 2
|
||||||
])
|
])
|
||||||
->where('createTime', '>=', $startTime)
|
->where('createTime', '>=', $startTime)
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
|
->whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 产品咨询数量 (通过消息内容模糊查询)
|
// 产品咨询数量 (通过消息内容模糊查询)
|
||||||
$productInquiries = WechatMessageModel::where([
|
$productInquiries = WechatMessageModel::where('createTime', '>=', $startTime)
|
||||||
'wechatAccountId' => $wechatAccountId
|
|
||||||
])
|
|
||||||
->where('createTime', '>=', $startTime)
|
|
||||||
->where('createTime', '<', $endTime)
|
->where('createTime', '<', $endTime)
|
||||||
->where('content', 'like', '%产品%')
|
->where('content', 'like', '%产品%')
|
||||||
->whereOr('content', 'like', '%价格%')
|
->whereOr('content', 'like', '%价格%')
|
||||||
->whereOr('content', 'like', '%购买%')
|
->whereOr('content', 'like', '%购买%')
|
||||||
->whereOr('content', 'like', '%优惠%')
|
->whereOr('content', 'like', '%优惠%')
|
||||||
|
->whereIn('wechatAccountId' , $wechatAccountIds)
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
// 构建返回数据
|
// 构建返回数据
|
||||||
|
|||||||
@@ -29,6 +29,34 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getSafeAreaHeight() {
|
||||||
|
// 1. 优先使用 CSS 环境变量
|
||||||
|
if (CSS.supports("padding-top", "env(safe-area-inset-top)")) {
|
||||||
|
const safeAreaTop = getComputedStyle(
|
||||||
|
document.documentElement,
|
||||||
|
).getPropertyValue("env(safe-area-inset-top)");
|
||||||
|
const height = parseInt(safeAreaTop) || 0;
|
||||||
|
if (height > 0) return height;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 设备检测
|
||||||
|
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||||
|
const isAndroid = /Android/.test(navigator.userAgent);
|
||||||
|
const isAppMode = getSetting("isAppMode");
|
||||||
|
if (isIOS && isAppMode) {
|
||||||
|
// iOS 设备
|
||||||
|
const isIPhoneX = window.screen.height >= 812;
|
||||||
|
return isIPhoneX ? 44 : 20;
|
||||||
|
} else if (isAndroid) {
|
||||||
|
// Android 设备
|
||||||
|
return 24;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 默认值
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -45,10 +73,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* 安全区适配 */
|
/* 安全区适配 */
|
||||||
.safe-area-inset-bottom {
|
// .safe-area-inset-bottom {
|
||||||
padding-bottom: constant(safe-area-inset-bottom);
|
// padding-bottom: constant(safe-area-inset-bottom);
|
||||||
padding-bottom: env(safe-area-inset-bottom);
|
// padding-bottom: env(safe-area-inset-bottom);
|
||||||
}
|
// }
|
||||||
|
|
||||||
/* 字体图标支持 */
|
/* 字体图标支持 */
|
||||||
@font-face {
|
@font-face {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
// API配置文件
|
// API配置文件
|
||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
//export const BASE_URL = 'http://yishi.com'
|
export const BASE_URL = 'http://yishi.com'
|
||||||
export const BASE_URL = 'https://ckbapi.quwanzhi.com'
|
//export const BASE_URL = 'https://ckbapi.quwanzhi.com'
|
||||||
|
|
||||||
// 获取请求头
|
// 获取请求头
|
||||||
const getHeaders = (options = {}) => {
|
const getHeaders = (options = {}) => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="customer-management-wrapper" >
|
<view class="customer-management-wrapper" >
|
||||||
<view v-if="show" class="customer-management-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="customer-management-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="data-statistics-wrapper" >
|
<view class="data-statistics-wrapper" >
|
||||||
<view v-if="show" class="data-statistics-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="data-statistics-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="login-container" v-if="show" style="margin-top: var(--status-bar-height);">
|
<view class="login-container" v-if="show">
|
||||||
<view class="login-wrapper">
|
<view class="login-wrapper">
|
||||||
<!-- 标签切换 -->
|
<!-- 标签切换 -->
|
||||||
<u-tabs
|
<u-tabs
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="show" class="package-detail-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="package-detail-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view v-if="show" class="side-menu-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="side-menu-container">
|
||||||
<view class="side-menu-mask" @tap="closeSideMenu"></view>
|
<view class="side-menu-mask" @tap="closeSideMenu"></view>
|
||||||
<view class="side-menu">
|
<view class="side-menu">
|
||||||
<view class="side-menu-header">
|
<view class="side-menu-header">
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 采购中心 -->
|
<!-- 采购中心 -->
|
||||||
<view class="module-section">
|
<view class="module-section" v-if='hide'>
|
||||||
<view class="module-title">采购中心</view>
|
<view class="module-title">采购中心</view>
|
||||||
<view class="module-list">
|
<view class="module-list">
|
||||||
<view class="module-item" @tap="showTrafficPurchase">
|
<view class="module-item" @tap="showTrafficPurchase">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="module-item" @tap="showSettings">
|
<view class="module-item" @tap="showSettings" v-if='hide'>
|
||||||
<view class="module-left">
|
<view class="module-left">
|
||||||
<view class="module-icon gray">
|
<view class="module-icon gray">
|
||||||
<text class="iconfont icon-shezhi" style="color: #888; font-size: 24px;"></text>
|
<text class="iconfont icon-shezhi" style="color: #888; font-size: 24px;"></text>
|
||||||
@@ -189,6 +189,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
hide : false,
|
||||||
functionStatus: {
|
functionStatus: {
|
||||||
'autoLike': false,
|
'autoLike': false,
|
||||||
'momentsSync': false,
|
'momentsSync': false,
|
||||||
@@ -267,7 +268,7 @@
|
|||||||
this.isLoggedIn = false;
|
this.isLoggedIn = false;
|
||||||
|
|
||||||
// 关闭侧边栏
|
// 关闭侧边栏
|
||||||
this.closeSideMenu();
|
//this.closeSideMenu();
|
||||||
|
|
||||||
// 提示退出成功
|
// 提示退出成功
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="supply-chain-wrapper">
|
<view class="supply-chain-wrapper">
|
||||||
<view v-if="show" class="supply-chain-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="supply-chain-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="supply-detail-wrapper">
|
<view class="supply-detail-wrapper">
|
||||||
<view v-if="show" class="supply-detail-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="supply-detail-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="system-settings-wrapper">
|
<view class="system-settings-wrapper">
|
||||||
<view v-if="show" class="system-settings-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="system-settings-container">
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="traffic-purchase-wrapper">
|
<view class="traffic-purchase-wrapper">
|
||||||
<view v-if="show" class="traffic-purchase-container" style="margin-top: var(--status-bar-height);">
|
<view v-if="show" class="traffic-purchase-container" >
|
||||||
<!-- 头部 -->
|
<!-- 头部 -->
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="back-icon" @tap="closePage">
|
<view class="back-icon" @tap="closePage">
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 引入侧边菜单组件 -->
|
<!-- 引入侧边菜单组件 -->
|
||||||
<side-menu :show="menuVisible" @close="closeMenu"></side-menu>
|
<side-menu :show="menuVisible" @close="closeMenu" class="assistant111111"></side-menu>
|
||||||
|
|
||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<view class="search-container" v-if="false">
|
<view class="search-container" v-if="false">
|
||||||
|
|||||||
@@ -339,24 +339,24 @@
|
|||||||
|
|
||||||
// 第三方登录
|
// 第三方登录
|
||||||
handleThirdLogin(platform) {
|
handleThirdLogin(platform) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: `${platform === 'wechat' ? '微信' : 'Apple'}登录功能暂未实现`,
|
// title: `${platform === 'wechat' ? '微信' : 'Apple'}登录功能暂未实现`,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
// 打开协议
|
// 打开协议
|
||||||
openAgreement(type) {
|
openAgreement(type) {
|
||||||
uni.showToast({
|
// uni.showToast({
|
||||||
title: `打开${type === 'user' ? '用户协议' : '隐私政策'}`,
|
// title: `打开${type === 'user' ? '用户协议' : '隐私政策'}`,
|
||||||
icon: 'none'
|
// icon: 'none'
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
// 联系我们
|
// 联系我们
|
||||||
contactUs() {
|
contactUs() {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '联系方式: support@example.com',
|
title: '联系方式: zhiqun@qq.com',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 3000
|
duration: 3000
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user