mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 15:00:52 +00:00
Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev
This commit is contained in:
commit
8d11815595
@ -40,13 +40,14 @@ class CategoryController
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @author 等风来
|
||||
* @email 136327134@qq.com
|
||||
* @date 2022/11/11
|
||||
* @return mixed
|
||||
*/
|
||||
public function getCategoryVersion()
|
||||
{
|
||||
return app('json')->success(['version' => $this->services->getCategoryVersion()]);
|
||||
$data = $this->services->getCategoryVersion();
|
||||
return app('json')->success(['version' => $data['version'], 'is_diy' => $data['is_diy']]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,8 +85,8 @@ class PublicController
|
||||
{
|
||||
/** @var DiyServices $diyService */
|
||||
$diyService = app()->make(DiyServices::class);
|
||||
$version = $diyService->getDiyVersion((int)$id);
|
||||
return app('json')->success(['version' => $version ?: '']);
|
||||
$data = $diyService->getDiyVersion((int)$id);
|
||||
return app('json')->success(['version' => $data['version'] ?: '', 'is_diy' => $data['is_diy']]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -147,11 +147,11 @@ class DiyServices extends BaseServices
|
||||
{
|
||||
if ($id) {
|
||||
return $this->cacheDriver()->remember('index_diy_' . $id, function () use ($id) {
|
||||
return $this->dao->value(['id' => $id], 'version');
|
||||
return $this->dao->getOne(['id' => $id], 'version,is_diy');
|
||||
});
|
||||
} else {
|
||||
return $this->cacheDriver()->remember('index_diy_default', function () {
|
||||
return $this->dao->value(['status' => 1, 'is_del' => 0], 'version');
|
||||
return $this->dao->getOne(['status' => 1, 'is_del' => 0], 'version,is_diy');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ class OrderPayServices
|
||||
break;
|
||||
case PayServices::ALLIN_PAY:
|
||||
if (request()->isWechat()) {
|
||||
$jsConfig['pay_url'] = AllinPay::UNITODER_H5UNIONPAY;
|
||||
$payUrl = AllinPay::UNITODER_H5UNIONPAY;
|
||||
}
|
||||
break;
|
||||
case PayServices::WEIXIN_PAY:
|
||||
@ -207,6 +207,6 @@ class OrderPayServices
|
||||
}
|
||||
}
|
||||
|
||||
return ['jsConfig' => $jsConfig, 'order_id' => $order['order_id'], 'pay_key' => $payKey];
|
||||
return ['jsConfig' => $jsConfig, 'order_id' => $order['order_id'], 'pay_key' => $payKey, 'pay_url' => $payUrl ?? ''];
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@ namespace app\services\product\product;
|
||||
|
||||
use app\dao\product\product\StoreCategoryDao;
|
||||
use app\services\BaseServices;
|
||||
use app\services\diy\DiyServices;
|
||||
use crmeb\exceptions\AdminException;
|
||||
use crmeb\services\CacheService;
|
||||
use crmeb\services\FormBuilder as Form;
|
||||
@ -214,6 +215,12 @@ class StoreCategoryServices extends BaseServices
|
||||
* 保存修改数据
|
||||
* @param $id
|
||||
* @param $data
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/02/23
|
||||
*/
|
||||
public function editData($id, $data)
|
||||
{
|
||||
@ -267,7 +274,10 @@ class StoreCategoryServices extends BaseServices
|
||||
public function getCategoryVersion()
|
||||
{
|
||||
return $this->cacheDriver()->remember('category_version', function () {
|
||||
return uniqid();
|
||||
return [
|
||||
'is_diy' => app()->make(DiyServices::class)->value(['status' => 1], 'is_diy'),
|
||||
'version' => uniqid()
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
@ -275,6 +285,12 @@ class StoreCategoryServices extends BaseServices
|
||||
* 获取指定id下的分类,一=以数组形式返回
|
||||
* @param string $cateIds
|
||||
* @return array
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/02/23
|
||||
*/
|
||||
public function getCateArray(string $cateIds)
|
||||
{
|
||||
@ -283,7 +299,14 @@ class StoreCategoryServices extends BaseServices
|
||||
|
||||
/**
|
||||
* 前台分类列表
|
||||
* @return bool|mixed|null
|
||||
* @param array $where
|
||||
* @return array|mixed
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 吴汐
|
||||
* @email 442384644@qq.com
|
||||
* @date 2023/02/23
|
||||
*/
|
||||
public function getCategory(array $where)
|
||||
{
|
||||
|
||||
@ -66,6 +66,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleClick(name) {
|
||||
console.log(name)
|
||||
this.$emit('on-click', name);
|
||||
},
|
||||
handleMousemove(event, children) {
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
<template v-for="item in menuList">
|
||||
<collapsed-menu
|
||||
v-if="item.children && item.children.length > 0"
|
||||
@on-click="handleSelect"
|
||||
@on-click="collHandleSelect"
|
||||
:hide-title="true"
|
||||
:activeMenuPath="activeMenuPath"
|
||||
:root-icon-size="rootIconSize"
|
||||
@ -80,7 +80,7 @@
|
||||
></collapsed-menu>
|
||||
<Tooltip transfer v-else :content="item.title" placement="right" :key="`drop-menu-${item.path}`">
|
||||
<a
|
||||
@click="handleSelect(item)"
|
||||
@click="collHandleSelect(item)"
|
||||
class="drop-menu-a"
|
||||
:class="{ on: item.path == activeMenuPath }"
|
||||
:style="{ textAlign: 'center' }"
|
||||
@ -196,6 +196,7 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
handleSelect(name, type) {
|
||||
this.childOptions = [];
|
||||
this.menuList.map((e) => {
|
||||
@ -241,6 +242,9 @@ export default {
|
||||
handleChildSelect(name) {
|
||||
this.turnToPage(name);
|
||||
},
|
||||
collHandleSelect(name) {
|
||||
this.turnToPage(name);
|
||||
},
|
||||
turnToPage(route, all) {
|
||||
let { path, name, params, query } = {};
|
||||
if (typeof route === 'string' && !all) path = route;
|
||||
|
||||
@ -18,11 +18,11 @@
|
||||
line-height: 50px;
|
||||
}
|
||||
.main-layout-con {
|
||||
height: 100%;
|
||||
height: calc(~"100vh - 60px");
|
||||
overflow: hidden;
|
||||
}
|
||||
.main-content-con {
|
||||
height: ~'calc(100% - 70px)';
|
||||
height: ~'calc(100vh - 60px)';
|
||||
overflow: hidden;
|
||||
}
|
||||
.tag-nav-wrapper {
|
||||
|
||||
@ -64,9 +64,10 @@
|
||||
colorChange('category').then(res => {
|
||||
let status = res.data.status;
|
||||
this.category = status
|
||||
uni.setStorageSync('is_diy', res.data.is_diy)
|
||||
this.status = res.data.status
|
||||
this.$refs.classOne.is_diy = res.data.is_diy
|
||||
this.$nextTick(e => {
|
||||
this.$refs.classOne.is_diy = this.is_diy
|
||||
if (this.status == 2 || this.status == 3) {
|
||||
uni.hideTabBar();
|
||||
} else if (this.status == 1) {
|
||||
|
||||
@ -41,7 +41,9 @@
|
||||
getVersion(name) {
|
||||
getVersion(name).then(res => {
|
||||
this.version = res.data.version
|
||||
this.isDiy = res.data.is_diy
|
||||
this.loading = true
|
||||
uni.setStorageSync('is_diy', res.data.is_diy)
|
||||
if (!uni.getStorageSync('DIY_VERSION') || res.data.version != uni.getStorageSync(
|
||||
'DIY_VERSION')) {
|
||||
if (uni.getStorageSync('DIY_VERSION')) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user