diff --git a/crmeb/app/api/controller/v1/order/OtherOrderController.php b/crmeb/app/api/controller/v1/order/OtherOrderController.php
index 6be74663f..92b65bc94 100644
--- a/crmeb/app/api/controller/v1/order/OtherOrderController.php
+++ b/crmeb/app/api/controller/v1/order/OtherOrderController.php
@@ -157,8 +157,8 @@ class OtherOrderController
*/
public function pay_type(Request $request)
{
- $payType['ali_pay_status'] = is_ali_pay();
- $payType['pay_weixin_open'] = is_wecaht_pay();
+ $payType['ali_pay_status'] = sys_config('ali_pay_status', 0) != 0;
+ $payType['pay_weixin_open'] = sys_config('pay_weixin_open', 0) != 0;
$payType['site_name'] = sys_config('site_name');
$payType['now_money'] = $request->user('now_money');
$payType['offline_pay_status'] = true;
diff --git a/crmeb/app/common.php b/crmeb/app/common.php
index 07ace6046..72c84a734 100644
--- a/crmeb/app/common.php
+++ b/crmeb/app/common.php
@@ -23,55 +23,6 @@ use app\services\system\lang\LangCodeServices;
use app\services\system\lang\LangCountryServices;
use think\facade\Config;
-
-if (!function_exists('is_wechat_pay')) {
- /**
- * @return bool
- * @author 等风来
- * @email 136327134@qq.com
- * @date 2023/2/8
- */
- function is_wecaht_pay()
- {
- $wechat_pay_type = (int)sys_config('wechat_pay_type', 0);
- $wechatPay = (int)sys_config('pay_weixin_open') == 1;
- $allinPay = (int)sys_config('allin_pay_status') == 1;
-
- if ($wechat_pay_type == 0 && $wechatPay) {
- return true;
- } elseif ($wechat_pay_type == 1 && $allinPay) {
- if ((request()->isRoutine() || request()->isWechat())) {
- return true;
- }
- }
- return false;
- }
-}
-
-if (!function_exists('is_ali_pay')) {
- /**
- * @return bool
- * @author 等风来
- * @email 136327134@qq.com
- * @date 2023/2/8
- */
- function is_ali_pay()
- {
- $alipay_pay_type = (int)sys_config('alipay_pay_type', 0);
- $aliPay = (int)sys_config('ali_pay_status') == 1;
- $allinPay = (int)sys_config('allin_pay_status') == 1;
-
- if ($alipay_pay_type == 0 && $aliPay) {
- return true;
- } elseif ($alipay_pay_type == 1 && $allinPay) {
- if (request()->isApp()) {
- return true;
- }
- }
- return false;
- }
-}
-
if (!function_exists('getWorkerManUrl')) {
/**
diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php
index 3ebf5198b..5d861817a 100644
--- a/crmeb/app/services/order/StoreOrderServices.php
+++ b/crmeb/app/services/order/StoreOrderServices.php
@@ -172,8 +172,8 @@ class StoreOrderServices extends BaseServices
$data['refund_count'] = bcadd(bcadd($data['refunding_count'], $data['refunded_count'], 0), $data['no_refund_count'], 0);
$data['yue_pay_status'] = (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1 ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
$data['pc_order_count'] = $data['order_count'] + $data['refunding_count'] + $data['refunded_count'];
- $data['pay_weixin_open'] = is_wecaht_pay();//微信支付 1 开启 0 关闭
- $data['ali_pay_status'] = is_ali_pay();//支付包支付 1 开启 0 关闭
+ $data['pay_weixin_open'] = sys_config('pay_weixin_open', '0') != '0';//微信支付 1 开启 0 关闭
+ $data['ali_pay_status'] = sys_config('ali_pay_status', '0') != '0';//支付包支付 1 开启 0 关闭
$data['friend_pay_status'] = (int)sys_config('friend_pay_status') ?? 0;//好友代付 1 开启 0 关闭
return $data;
}
@@ -1584,7 +1584,7 @@ HTML;
$data['integralRatio'] = $other['integralRatio'];
$data['offline_pay_status'] = (int)sys_config('offline_pay_status') ?? (int)2;
$data['yue_pay_status'] = (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1 ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
- $data['pay_weixin_open'] = is_wecaht_pay();//微信支付 1 开启 0 关闭
+ $data['pay_weixin_open'] = sys_config('pay_weixin_open', '0') != '0';//微信支付 1 开启 0 关闭
$data['friend_pay_status'] = (int)sys_config('friend_pay_status') ?? 0;//好友代付 1 开启 0 关闭
$data['store_self_mention'] = (int)sys_config('store_self_mention') ?? 0;//门店自提是否开启
/** @var SystemStoreServices $systemStoreServices */
@@ -1592,7 +1592,7 @@ HTML;
$store_count = $systemStoreServices->count(['type' => 0]);
$data['store_self_mention'] = $data['store_self_mention'] && $store_count;
- $data['ali_pay_status'] = is_ali_pay();//支付包支付 1 开启 0 关闭
+ $data['ali_pay_status'] = sys_config('ali_pay_status', '0') != '0';//支付包支付 1 开启 0 关闭
$data['system_store'] = [];//门店信息
/** @var UserInvoiceServices $userInvoice */
$userInvoice = app()->make(UserInvoiceServices::class);
@@ -1696,7 +1696,7 @@ HTML;
$res = false;
switch ($payType) {
case PayServices::WEIXIN_PAY:
- $res = (bool)sys_config('pay_weixin_open');
+ $res = sys_config('pay_weixin_open', '0') != '0';
break;
case PayServices::YUE_PAY:
$res = sys_config('balance_func_status') && sys_config('yue_pay_status') == 1;
@@ -1705,7 +1705,7 @@ HTML;
$res = sys_config('offline_pay_status') == 1;
break;
case PayServices::ALIAPY_PAY:
- $res = sys_config('ali_pay_status') == 1;
+ $res = sys_config('ali_pay_status', '0') != '0';
break;
case PayServices::FRIEND:
$res = sys_config('friend_pay_status', 1) == 1;
@@ -2354,8 +2354,8 @@ HTML;
}
$order['mapKey'] = sys_config('tengxun_map_key');
$order['yue_pay_status'] = (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1 ? (int)1 : (int)2;//余额支付 1 开启 2 关闭
- $order['pay_weixin_open'] = (int)sys_config('pay_weixin_open') ?? 0;//微信支付 1 开启 0 关闭
- $order['ali_pay_status'] = (bool)sys_config('ali_pay_status');//支付包支付 1 开启 0 关闭
+ $order['pay_weixin_open'] = sys_config('pay_weixin_open') != '0';//微信支付 1 开启 0 关闭
+ $order['ali_pay_status'] = sys_config('ali_pay_status', '0') != '0';//支付包支付 1 开启 0 关闭
$order['friend_pay_status'] = (int)sys_config('friend_pay_status') ?? 0;//好友代付 1 开启 0 关闭
$orderData = $this->tidyOrder($order, true, true);
$vipTruePrice = $memberPrice = $levelPrice = 0;
@@ -2495,8 +2495,8 @@ HTML;
{
//支付类型开关
$data = [
- 'ali_pay_status' => is_ali_pay(),
- 'wechat_pay_status' => is_wecaht_pay(),
+ 'ali_pay_status' => sys_config('ali_pay_status', '0') != '0',
+ 'wechat_pay_status' => sys_config('pay_weixin_open', '0') != '0',
'offline_pay_status' => (int)sys_config('offline_pay_status') == 1,
'friend_pay_status' => (int)sys_config('friend_pay_status') == 1,
'yue_pay_status' => (int)sys_config('balance_func_status') && (int)sys_config('yue_pay_status') == 1,
diff --git a/crmeb/app/services/pay/OrderPayServices.php b/crmeb/app/services/pay/OrderPayServices.php
index 86683cba4..458ee43de 100644
--- a/crmeb/app/services/pay/OrderPayServices.php
+++ b/crmeb/app/services/pay/OrderPayServices.php
@@ -50,22 +50,14 @@ class OrderPayServices
*/
public function getPayType(string $payType)
{
- $allinPay = (int)sys_config('allin_pay_status') == 1;
-
//微信支付没有开启,通联支付开启,用户访问端在小程序或者公众号的时候,使用通联微信H5支付
if ($payType == PayServices::WEIXIN_PAY) {
- $wechat_pay_type = (int)sys_config('wechat_pay_type', 0);
- if ($wechat_pay_type == 1 && $allinPay && (request()->isRoutine() || request()->isWechat())) {
- $payType = PayServices::ALLIN_PAY;
- }
+ $payType = sys_config('pay_weixin_open', 0);
}
//支付宝没有开启,通联支付开了,用户使用支付宝支付,并且在app端访问的时候,使用通联app支付宝支付
if ($payType == PayServices::ALIAPY_PAY) {
- $alipay_pay_type = (int)sys_config('alipay_pay_type', 0);
- if ($alipay_pay_type == 1 && $allinPay && request()->isApp()) {
- $payType = PayServices::ALLIN_PAY;
- }
+ $payType = sys_config('ali_pay_status', 0);
}
return $payType;
diff --git a/crmeb/app/services/system/config/SystemConfigServices.php b/crmeb/app/services/system/config/SystemConfigServices.php
index 2ec3d78fc..dc0802b4d 100644
--- a/crmeb/app/services/system/config/SystemConfigServices.php
+++ b/crmeb/app/services/system/config/SystemConfigServices.php
@@ -402,10 +402,12 @@ class SystemConfigServices extends BaseServices
foreach ($parameter as $v) {
if (strstr($v, $this->cuttingStr) !== false) {
$pdata = explode($this->cuttingStr, $v);
- $options[] = ['label' => $pdata[1], 'value' => $pdata[0]];
+ $res = preg_match('/^[0-9]$/', $pdata[0]);
+ $options[] = ['label' => $pdata[1], 'value' => $res ? (int)$pdata[0] : $pdata[0]];
}
}
- $formbuider[] = $radio = $this->builder->radio($data['menu_name'], $data['info'], (int)$data['value'])->options($options)->appendRule('suffix', [
+ $res = preg_match('/^[0-9]$/', $data['value']);
+ $formbuider[] = $radio = $this->builder->radio($data['menu_name'], $data['info'], $res ? (int)$data['value'] : $data['value'])->options($options)->appendRule('suffix', [
'type' => 'div',
'class' => 'tips-info',
'domProps' => ['innerHTML' => $data['desc']]
diff --git a/crmeb/public/install/crmeb.sql b/crmeb/public/install/crmeb.sql
index b66398b14..b18695644 100755
--- a/crmeb/public/install/crmeb.sql
+++ b/crmeb/public/install/crmeb.sql
@@ -33321,7 +33321,7 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(26, 'pay_weixin_client_cert', 'upload', 'input', 4, '', 3, '', 0, 0, '\"\"', '微信支付证书', '微信支付证书,在微信商家平台中可以下载!文件名一般为apiclient_cert.pem', 0, 1),
(27, 'pay_weixin_client_key', 'upload', 'input', 4, '', 3, '', 0, 0, '\"\"', '微信支付证书密钥', '微信支付证书密钥,在微信商家平台中可以下载!文件名一般为apiclient_key.pem', 0, 1),
(28, 'pay_weixin_key', 'text', 'input', 4, '', 0, '', 100, 0, '\"\"', 'Key', '商户支付密钥Key。审核通过后,在微信发送的邮件中查看。', 0, 1),
-(29, 'pay_weixin_open', 'radio', 'input', 109, '1=>开启\n0=>关闭', 1, '', 0, 0, '\"1\"', '微信支付', '是否启用微信支付', 100, 1),
+(29, 'pay_weixin_open', 'radio', 'input', 109, '0=>关闭\nweixin=>微信\nallinpay=>通联', 1, '', 0, 0, '\"0\"', '微信支付', '请选择微信支付通道,关闭用户端不展示', 100, 1),
(32, 'store_free_postage', 'text', 'number', 27, '', 0, 'number:true,min:-1', 100, 0, '1000000', '满额包邮', '商城商品满多少金额即可包邮,此项优先于其他的运费设置', 100, 1),
(33, 'offline_postage', 'radio', 'input', 27, '1=>包邮\n0=>不包邮', 1, '', 0, 0, '0', '线下支付是否包邮', '用户选择线下支付时是否包邮', 97, 1),
(34, 'integral_ratio', 'text', 'input', 11, '', 0, 'number:true', 100, 0, '\"0.1\"', '积分抵用', '积分抵用比例(1积分抵多少金额)单位:元', 10, 1),
@@ -33393,7 +33393,7 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(236, 'verify_expire_time', 'text', 'input', 20, '', 0, '', 100, 0, '\"5\"', '短信验证码过期时间(分钟)', '短信验证码过期时间(分钟)', 0, 1),
(246, 'invoice_func_status', 'radio', '', 50, '1=>开启\n0=>关闭', 0, '', 0, 0, '1', '发票功能启用', '发票功能开启|关闭', 0, 1),
(247, 'special_invoice_status', 'radio', '', 50, '1=>开启\n0=>关闭', 0, '', 0, 0, '1', '专用发票启用', '专用发票功能开启|关闭', 0, 1),
-(287, 'ali_pay_status', 'radio', 'input', 109, '1=>开启\n0=>关闭', 1, '', 0, 0, '\"1\"', '支付宝支付', '支付宝支付请选择开启(启用)或关闭(不启用)', 98, 1),
+(287, 'ali_pay_status', 'radio', 'input', 109, '0=>关闭\nalipay=>支付宝\nallinpay=>通联', 1, '', 0, 0, '\"0\"', '支付宝支付', '请选择支付宝通道,关闭用户端不显示', 98, 1),
(288, 'alipay_public_key', 'textarea', '', 63, '', 1, '', 100, 5, '\"\"', '支付应用公钥', '支付宝加签完成后申城的支付宝公钥', 0, 1),
(289, 'alipay_merchant_private_key', 'textarea', '', 63, '', 0, '', 100, 5, '\"\"', '支付应用私钥', '支付应用私钥', 0, 1),
(290, 'ali_pay_appid', 'text', 'input', 63, '', 0, '', 100, 0, '\"\"', '支付应用Appid', '支付应用Appid', 91, 1),
@@ -33494,6 +33494,9 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
(420, 'fey_user', 'text', 'input', 107, '', 1, '', 0, 0, '\"\"', '飞鹅云USER', '飞鹅云后台注册账号', 10, 1),
(421, 'fey_ukey', 'text', 'input', 107, '', 1, '', 0, 0, '\"\"', '飞鹅云UYEK', '飞鹅云后台注册账号后生成的UKEY 【备注:这不是填打印机的KEY】', 7, 1),
(422, 'fey_sn', 'text', 'input', 107, '', 1, '', 100, 0, '\"\"', '飞鹅云SN', '打印机标签上的编号,必须要在管理后台里添加打印机或调用API接口添加之后,才能调用API', 0, 1),
+(423, 'allin_private_key', 'text', 'input', 108, '', 1, '', 100, 5, '\"56585c3f475ecaf0fb4993a8500ee392\"', '通联MD5私钥', '通联支付的MD5私钥,可以在商户后台设置中进行配置', 96, 1),
+(425, 'allin_cusid', 'text', '', 108, '', 1, '', 0, 0, '\"660791057340QWW\"', '通联商户号', '通联支付商户号,由贵公司申请获得', 99, 1),
+(426, 'allin_appid', 'text', '', 108, '', 1, '', 100, 0, '\"00259494\"', '通联支付Appid', '通联商户后台的设置-》对接设置中查看', 98, 1),
(428, 'queue_open', 'radio', 'input', 26, '0=>关闭\n1=>开启', 1, '', 0, 0, '\"0\"', '消息队列', '是否启用消息队列,启用后提升程序运行速度,启用前必须配置Redis缓存', 0, 1),
(429, 'get_avatar', 'radio', 'input', 7, '0=>关闭\n1=>开启', 1, '', 0, 0, '\"0\"', '强制获取昵称头像', '是否在小程序用户授权之后,弹窗获取用户的昵称和头像', 0, 1);
@@ -33576,6 +33579,7 @@ INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`,
(105, 100, '新用户设置', 'new_user_setting', 1, 0, '', 0, 0),
(106, 5, '机器翻译配置', 'online_translation', 1, 0, '', 0, 0),
(107, 21, '飞鹅云配置', 'fey_config', 1, 0, '', 3, 0),
+(108, 23, '通联支付', 'allinpay', 1, 0, '', 3, 0),
(109, 23, '基础配置', 'pay_basic', 1, 0, '', 3, 100);
-- --------------------------------------------------------
diff --git a/template/admin/src/pages/marketing/storeIntegralOrder/components/tableList.vue b/template/admin/src/pages/marketing/storeIntegralOrder/components/tableList.vue
index 2c20c35eb..5a99a1315 100644
--- a/template/admin/src/pages/marketing/storeIntegralOrder/components/tableList.vue
+++ b/template/admin/src/pages/marketing/storeIntegralOrder/components/tableList.vue
@@ -36,7 +36,7 @@
配送信息
-
+
更多
diff --git a/template/admin/src/pages/product/productList/index.vue b/template/admin/src/pages/product/productList/index.vue
index f900b14af..54234602e 100644
--- a/template/admin/src/pages/product/productList/index.vue
+++ b/template/admin/src/pages/product/productList/index.vue
@@ -55,6 +55,7 @@
{{$t(`¥`)}}{{ item.productInfo.price }}
x{{ item.cart_num }}
- {{$t(`¥`)}}{{ item.productInfo.ot_price }}
+ {{$t(`¥`)}}{{ item.productInfo.attrInfo.ot_price }}
+ {{$t(`¥`)}}{{ item.productInfo.ot_price }}
diff --git a/template/uni-app/pages/goods/goods_return/index.vue b/template/uni-app/pages/goods/goods_return/index.vue
index dfbadfc48..a18ceaad1 100644
--- a/template/uni-app/pages/goods/goods_return/index.vue
+++ b/template/uni-app/pages/goods/goods_return/index.vue
@@ -55,7 +55,7 @@
{{$t(`上传图片`)}}
- {{$t(`上传图片`)}}
+
diff --git a/template/uni-app/pages/goods_cate/goods_cate.vue b/template/uni-app/pages/goods_cate/goods_cate.vue
index 56a5d8957..57a008a49 100644
--- a/template/uni-app/pages/goods_cate/goods_cate.vue
+++ b/template/uni-app/pages/goods_cate/goods_cate.vue
@@ -40,11 +40,9 @@
}
},
onLoad() {},
- onReady() {
- this.getCategoryVersion()
- },
+ onReady() {},
onShow() {
-
+ this.getCategoryVersion()
},
methods: {
getCategoryVersion() {
@@ -58,7 +56,6 @@
}
this.classStyle();
})
-
},
jumpIndex() {
if (this.is_diy) {}
@@ -69,6 +66,7 @@
this.category = status
this.status = res.data.status
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) {
diff --git a/template/uni-app/pages/goods_cate/goods_cate1.vue b/template/uni-app/pages/goods_cate/goods_cate1.vue
index 0ab4ee40b..704773ee3 100644
--- a/template/uni-app/pages/goods_cate/goods_cate1.vue
+++ b/template/uni-app/pages/goods_cate/goods_cate1.vue
@@ -112,7 +112,7 @@
cartNum: state => state.indexData.cartNum
})
},
- mounted() {
+ mounted() {
console.log(this.version)
let that = this
// #ifdef H5
@@ -127,6 +127,13 @@
this.activeRouter = '/' + curRoute
this.getAllCategory();
},
+ watch: {
+ isNew(newVal) {
+ if (newVal) {
+ this.getAllCategory();
+ }
+ }
+ },
methods: {
getNav() {
getNavigation().then(res => {
@@ -179,9 +186,9 @@
this.$set(this, 'lock', true);
},
getAllCategory: function() {
- let that = this;
- console.log(this.version,'1',uni.getStorageSync('CAT_VERSION'))
- if (this.version !== uni.getStorageSync('CAT_VERSION')) {
+ let that = this;
+ console.log(this.version, '1', uni.getStorageSync('CAT_VERSION'))
+ if (this.isNew || !uni.getStorageSync('CAT1_DATA')) {
getCategoryList().then(res => {
uni.setStorageSync('CAT1_DATA', res.data)
that.productList = res.data;
diff --git a/template/uni-app/pages/goods_cate/goods_cate2.vue b/template/uni-app/pages/goods_cate/goods_cate2.vue
index 539136e78..68f69c87c 100644
--- a/template/uni-app/pages/goods_cate/goods_cate2.vue
+++ b/template/uni-app/pages/goods_cate/goods_cate2.vue
@@ -115,6 +115,13 @@
default: false
}
},
+ watch: {
+ isNew(newVal) {
+ if (newVal) {
+ this.getAllCategory();
+ }
+ }
+ },
computed: mapGetters(['isLogin', 'uid']),
components: {
productWindow,
@@ -631,7 +638,7 @@
},
getAllCategory: function() {
let that = this;
- if (this.isNew) {
+ if (this.isNew || !uni.getStorageSync('CAT2_DATA')) {
getCategoryList().then(res => {
uni.setStorageSync('CAT2_DATA', res.data)
let data = res.data;
diff --git a/template/uni-app/pages/goods_cate/goods_cate3.vue b/template/uni-app/pages/goods_cate/goods_cate3.vue
index 1eb2ef40e..2e6ae5b38 100644
--- a/template/uni-app/pages/goods_cate/goods_cate3.vue
+++ b/template/uni-app/pages/goods_cate/goods_cate3.vue
@@ -119,6 +119,13 @@
default: false
}
},
+ watch: {
+ isNew(newVal) {
+ if (newVal) {
+ this.getAllCategory();
+ }
+ }
+ },
data() {
return {
categoryList: [],
@@ -667,7 +674,7 @@
},
getAllCategory: function() {
let that = this;
- if (this.isNew) {
+ if (this.isNew || !uni.getStorageSync('CAT3_DATA')) {
getCategoryList().then(res => {
let data = res.data;
uni.setStorageSync('CAT3_DATA', data)
diff --git a/template/uni-app/pages/goods_details/index.vue b/template/uni-app/pages/goods_details/index.vue
index 1ca72ba48..59d517abf 100644
--- a/template/uni-app/pages/goods_details/index.vue
+++ b/template/uni-app/pages/goods_details/index.vue
@@ -123,7 +123,7 @@
- {{$t(`活动`)}}:
+ {{$t(`活动`)}}:
{
+ getDiy(0).then(res => {
+ uni.hideLoading()
uni.setStorageSync('DIY_DATA', res.data)
setTimeout(() => {
this.isNodes++;
@@ -696,7 +697,6 @@
}
temp.sort(sortNumber)
that.styleConfig = temp;
- uni.hideLoading()
setTimeout(() => {
this.showSkeleton = false
}, 300)
diff --git a/template/uni-app/pages/users/user_spread_code/index.vue b/template/uni-app/pages/users/user_spread_code/index.vue
index a26631855..b7011e3b8 100644
--- a/template/uni-app/pages/users/user_spread_code/index.vue
+++ b/template/uni-app/pages/users/user_spread_code/index.vue
@@ -219,8 +219,8 @@
arr2 = [img.code || this.codeSrc, img.image]
// #endif
// #ifdef APP-PLUS
- img = await this.downloadFilestoreImage(res.data.spread[i].pic)
- arr2 = [this.codeSrc, img]
+ img = await this.imgToBase(res.data.spread[i].pic, res.data.qrcode)
+ arr2 = [img.code || this.codeSrc, img.image]
// #endif
that.$util.userPosterCanvas(arr2, res.data.nickname, res.data.site_name, i, this.wd, this.hg, (
tempFilePath) => {