diff --git a/crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php b/crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php
index e51d4da3c..513813c0d 100644
--- a/crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php
+++ b/crmeb/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php
@@ -11,7 +11,7 @@ abstract class AbstractDecoder
/**
* Initiates new image from path in filesystem
*
- * @param string $path
+ * @param string $path
* @return \Intervention\Image\Image
*/
abstract public function initFromPath($path);
@@ -19,7 +19,7 @@ abstract class AbstractDecoder
/**
* Initiates new image from binary data
*
- * @param string $data
+ * @param string $data
* @return \Intervention\Image\Image
*/
abstract public function initFromBinary($data);
@@ -27,7 +27,7 @@ abstract class AbstractDecoder
/**
* Initiates new image from GD resource
*
- * @param Resource $resource
+ * @param Resource $resource
* @return \Intervention\Image\Image
*/
abstract public function initFromGdResource($resource);
@@ -60,30 +60,30 @@ abstract class AbstractDecoder
/**
* Init from given URL
*
- * @param string $url
+ * @param string $url
* @return \Intervention\Image\Image
*/
public function initFromUrl($url)
{
-
+
$options = [
'http' => [
- 'method'=>"GET",
- 'protocol_version'=>1.1, // force use HTTP 1.1 for service mesh environment with envoy
- 'header'=>"Accept-language: en\r\n".
- "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\r\n"
- ]
+ 'method' => "GET",
+ 'protocol_version' => 1.1, // force use HTTP 1.1 for service mesh environment with envoy
+ 'header' => "Accept-language: en\r\n" .
+ "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36\r\n"
+ ]
];
-
- $context = stream_context_create($options);
-
+
+ $context = stream_context_create($options);
+
if ($data = @file_get_contents($url, false, $context)) {
return $this->initFromBinary($data);
}
throw new NotReadableException(
- "Unable to init from given url (".$url.")."
+ "Unable to init from given url (" . $url . ")."
);
}
@@ -213,7 +213,7 @@ abstract class AbstractDecoder
*/
public function isUrl()
{
- return (bool) filter_var($this->data, FILTER_VALIDATE_URL);
+ return (bool)filter_var($this->data, FILTER_VALIDATE_URL);
}
/**
@@ -238,8 +238,8 @@ abstract class AbstractDecoder
public function isBinary()
{
if (is_string($this->data)) {
- $mime = finfo_buffer(finfo_open(FILEINFO_MIME_TYPE), $this->data);
- return (substr($mime, 0, 4) != 'text' && $mime != 'application/x-empty');
+ $mime = getimagesize($this->data)['mime'] ?? '';
+ return !in_array($mime, ['image/jpeg', 'image/png', 'image/gif']);
}
return false;
@@ -274,7 +274,7 @@ abstract class AbstractDecoder
/**
* Initiates new Image from Intervention\Image\Image
*
- * @param Image $object
+ * @param Image $object
* @return \Intervention\Image\Image
*/
public function initFromInterventionImage($object)
@@ -285,7 +285,7 @@ abstract class AbstractDecoder
/**
* Parses and decodes binary image data from data-url
*
- * @param string $data_url
+ * @param string $data_url
* @return string
*/
private function decodeDataUrl($data_url)
@@ -307,7 +307,7 @@ abstract class AbstractDecoder
/**
* Initiates new image from mixed data
*
- * @param mixed $data
+ * @param mixed $data
* @return \Intervention\Image\Image
*/
public function init($data)
@@ -359,6 +359,6 @@ abstract class AbstractDecoder
*/
public function __toString()
{
- return (string) $this->data;
+ return (string)$this->data;
}
}
diff --git a/crmeb/vendor/intervention/image/src/Intervention/Image/File.php b/crmeb/vendor/intervention/image/src/Intervention/Image/File.php
index cf15da0bf..1036dbae9 100644
--- a/crmeb/vendor/intervention/image/src/Intervention/Image/File.php
+++ b/crmeb/vendor/intervention/image/src/Intervention/Image/File.php
@@ -53,7 +53,7 @@ class File
$this->filename = array_key_exists('filename', $info) ? $info['filename'] : null;
if (file_exists($path) && is_file($path)) {
- $this->mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
+ $this->mime = getimagesize($path)['mime'] ?? '';
}
return $this;
@@ -61,7 +61,7 @@ class File
/**
* Get file size
- *
+ *
* @return mixed
*/
public function filesize()
@@ -71,7 +71,7 @@ class File
if (file_exists($path) && is_file($path)) {
return filesize($path);
}
-
+
return false;
}
diff --git a/crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php b/crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
index f5c34aa50..c0cb7dac1 100644
--- a/crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
+++ b/crmeb/vendor/intervention/image/src/Intervention/Image/Gd/Decoder.php
@@ -23,7 +23,7 @@ class Decoder extends \Intervention\Image\AbstractDecoder
}
// get mime type of file
- $mime = finfo_file(finfo_open(FILEINFO_MIME_TYPE), $path);
+ $mime = getimagesize($path)['mime'] ?? '';
// define core
switch (strtolower($mime)) {
diff --git a/crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php b/crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php
index 324fe7fa3..794c23ead 100644
--- a/crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php
+++ b/crmeb/vendor/intervention/image/src/Intervention/Image/ImageManager.php
@@ -133,10 +133,10 @@ class ImageManager
*/
private function checkRequirements()
{
- if ( ! function_exists('finfo_buffer')) {
- throw new MissingDependencyException(
- "PHP Fileinfo extension must be installed/enabled to use Intervention Image."
- );
- }
+// if ( ! function_exists('finfo_buffer')) {
+// throw new MissingDependencyException(
+// "PHP Fileinfo extension must be installed/enabled to use Intervention Image."
+// );
+// }
}
}
diff --git a/template/admin/src/components/main/components/header-notice/index.vue b/template/admin/src/components/main/components/header-notice/index.vue
index 747c9f8c4..c49b7f56f 100644
--- a/template/admin/src/components/main/components/header-notice/index.vue
+++ b/template/admin/src/components/main/components/header-notice/index.vue
@@ -6,7 +6,7 @@
-
+
{{
item.title
diff --git a/template/admin/src/components/main/components/header-search/index.vue b/template/admin/src/components/main/components/header-search/index.vue
index 447e108bc..9d8e481d9 100644
--- a/template/admin/src/components/main/components/header-search/index.vue
+++ b/template/admin/src/components/main/components/header-search/index.vue
@@ -6,6 +6,7 @@
placeholder="菜单搜索"
filterable
remote
+ clearable
:remote-method="remoteMethod"
:loading="loading"
>
diff --git a/template/admin/src/components/main/components/side-menu/side-menu.vue b/template/admin/src/components/main/components/side-menu/side-menu.vue
index 4d35f4b18..433efd377 100644
--- a/template/admin/src/components/main/components/side-menu/side-menu.vue
+++ b/template/admin/src/components/main/components/side-menu/side-menu.vue
@@ -153,12 +153,12 @@ export default {
},
},
watch: {
- openedNames() {
- this.$nextTick(() => {
- this.$refs.menu.updateOpened();
- this.$refs.childMenu.updateActiveName();
- });
- },
+ // openedNames() {
+ // this.$nextTick(() => {
+ // this.$refs.menu.updateOpened();
+ // this.$refs.childMenu.updateActiveName();
+ // });
+ // },
activePath() {
this.$nextTick(() => {
this.$refs.childMenu.updateOpened();
diff --git a/template/admin/src/main.js b/template/admin/src/main.js
index 02addce92..bd75649a7 100644
--- a/template/admin/src/main.js
+++ b/template/admin/src/main.js
@@ -198,20 +198,29 @@ new Vue({
const path = to.path;
let menus = this.$store.state.menus.menusName;
const menuSider = menus;
- this.$store.commit('menu/setActivePath', path);
- const openNames = getSiderSubmenu(to, menuSider);
- this.$store.commit('menu/setOpenNames', openNames);
- // 设置顶栏菜单 后台添加一个接口,设置顶部菜单
- const headerSider = getHeaderSider(menuSider);
- this.$store.commit('menu/setHeader', headerSider);
- // 指定当前侧边栏隶属顶部菜单名称。如果你没有使用顶部菜单,则设置为默认的(一般为 home)名称即可
const headerName = getHeaderName(to, menuSider);
- this.$store.commit('menu/setHeaderName', headerName);
- // 获取侧边栏菜单
- const filterMenuSider = getMenuSider(menuSider, headerName);
- // 指定当前显示的侧边菜单
- this.$store.commit('menu/setOpenMenuName', filterMenuSider[0].title);
- this.$store.commit('menu/setSider', filterMenuSider[0]?.children || []);
+
+ if (headerName !== null) {
+ this.$store.commit('menu/setActivePath', path);
+ const openNames = getSiderSubmenu(to, menuSider);
+ this.$store.commit('menu/setOpenNames', openNames);
+ // 设置顶栏菜单 后台添加一个接口,设置顶部菜单
+ const headerSider = getHeaderSider(menuSider);
+ this.$store.commit('menu/setHeader', headerSider);
+ // 指定当前侧边栏隶属顶部菜单名称。如果你没有使用顶部菜单,则设置为默认的(一般为 home)名称即可
+ this.$store.commit('menu/setHeaderName', headerName);
+ // 获取侧边栏菜单
+ const filterMenuSider = getMenuSider(menuSider, headerName);
+ // 指定当前显示的侧边菜单
+ this.$store.commit('menu/setOpenMenuName', filterMenuSider[0].title);
+ this.$store.commit('menu/setSider', filterMenuSider[0]?.children || []);
+ } else {
+ //子路由给默认 如果你没有使用顶部菜单,则设置为默认的(一般为 home)名称即可
+ // this.$store.commit('menu/setHeaderName', 'home');
+ // 指定当前显示的侧边菜单
+ // this.$store.commit('menu/setSider', menuSider);
+ }
+
if (to.meta.kefu) {
document.getElementsByTagName('body')[0].className = 'kf_mobile';
} else {
@@ -228,7 +237,7 @@ new Vue({
return;
}
// 在 404 时,是没有 headerName 的
-
+
// });
},
},
diff --git a/template/admin/src/pages/marketing/storeBargain/statistics.vue b/template/admin/src/pages/marketing/storeBargain/statistics.vue
index 2a3aa14ec..36dd4e6d9 100644
--- a/template/admin/src/pages/marketing/storeBargain/statistics.vue
+++ b/template/admin/src/pages/marketing/storeBargain/statistics.vue
@@ -228,37 +228,37 @@ export default {
],
cardLists: [
{
- col: 6,
+ col: 8,
count: 0,
name: '活动参与人数(人)',
className: 'ios-speedometer-outline',
},
{
- col: 6,
+ col: 8,
count: 0,
name: '推广人数(人)',
className: 'ios-speedometer-outline',
},
{
- col: 6,
+ col: 8,
count: 0,
name: '发起砍价数',
className: 'ios-speedometer-outline',
},
{
- col: 6,
+ col: 8,
count: 0,
name: '砍价成功数',
className: 'ios-speedometer-outline',
},
{
- col: 6,
+ col: 8,
count: 0,
name: '支付订单额(元)',
className: 'ios-speedometer-outline',
},
{
- col: 6,
+ col: 8,
count: 0,
name: '支付人数(人)',
className: 'ios-speedometer-outline',
diff --git a/template/admin/src/pages/setting/user/index.vue b/template/admin/src/pages/setting/user/index.vue
index 3ec28a567..73a3ada2b 100644
--- a/template/admin/src/pages/setting/user/index.vue
+++ b/template/admin/src/pages/setting/user/index.vue
@@ -59,6 +59,7 @@ export default {
},
mounted() {
this.account = this.$store.state.userInfo.userInfo.account;
+ this.formValidate.real_name = this.$store.state.userInfo.userInfo.real_name;
},
methods: {
handleSubmit(name) {
@@ -66,6 +67,7 @@ export default {
if (valid) {
updtaeAdmin(this.formValidate)
.then((res) => {
+ this.$store.commit('userInfo/userRealName', this.formValidate.real_name);
this.$Message.success(res.msg);
})
.catch((res) => {
diff --git a/template/admin/src/store/module/userInfo.js b/template/admin/src/store/module/userInfo.js
index d2144d7b2..577687e51 100644
--- a/template/admin/src/store/module/userInfo.js
+++ b/template/admin/src/store/module/userInfo.js
@@ -56,6 +56,9 @@ export default {
userInfo(state, userInfo) {
state.userInfo = userInfo;
},
+ userRealName(state, realName) {
+ state.userInfo.real_name = realName;
+ },
uniqueAuth(state, uniqueAuth) {
state.uniqueAuth = uniqueAuth;
},
diff --git a/template/uni-app/pages/order_addcart/order_addcart.vue b/template/uni-app/pages/order_addcart/order_addcart.vue
index bcbd84a81..2ac829e13 100644
--- a/template/uni-app/pages/order_addcart/order_addcart.vue
+++ b/template/uni-app/pages/order_addcart/order_addcart.vue
@@ -241,7 +241,8 @@
sysHeight: sysHeight,
newData: {},
activeRouter: '',
- is_diy_set: false
+ is_diy_set: false,
+ adding: false
};
},
computed: mapGetters(['isLogin']),
@@ -700,28 +701,32 @@
that.cartList.valid[index] = item;
that.getCartNum();
that.switchSelect();
- });
+ }).catch(err => {
+ item.cart_num = Number(item.cart_num) + 1
+ })
}
},
addCart: function(index) {
let that = this;
+ if (this.adding) return
let item = that.cartList.valid[index];
- let lastnum = Number(item.cart_num) + 1
+ item.cart_num = Number(item.cart_num) + 1
let productInfo = item.productInfo;
- if (productInfo.hasOwnProperty('attrInfo') && lastnum >= item.productInfo.attrInfo.stock) {
- lastnum = item.productInfo.attrInfo.stock;
+ if (productInfo.hasOwnProperty('attrInfo') && item.cart_num >= item.productInfo.attrInfo.stock) {
+ item.cart_num = item.productInfo.attrInfo.stock;
item.numAdd = true;
item.numSub = false;
} else {
item.numAdd = false;
item.numSub = false;
}
- that.setCartNum(item.id, lastnum, (data) => {
+ that.setCartNum(item.id, item.cart_num, (data) => {
that.cartList.valid[index] = item;
- item.cart_num = Number(item.cart_num) + 1;
that.getCartNum();
that.switchSelect();
- });
+ }).catch(err => {
+ item.cart_num = Number(item.cart_num) - 1
+ })
},
setCartNum(cartId, cartNum, successCallback) {
let that = this;
@@ -737,6 +742,7 @@
let that = this;
getCartCounts().then(res => {
that.cartCount = res.data.count;
+ this.adding = false
this.$store.commit('indexData/setCartNum', res.data.count > 99 ? '..' : res.data.count)
if (res.data.count > 0) {
wx.setTabBarBadge({