Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

This commit is contained in:
吴昊天 2023-02-18 14:12:14 +08:00
commit b1c869cf4b
19 changed files with 72 additions and 99 deletions

View File

@ -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;

View File

@ -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')) {
/**

View File

@ -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,

View File

@ -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;

View File

@ -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']]

View File

@ -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);
-- --------------------------------------------------------

View File

@ -36,7 +36,7 @@
<a @click="delivery(row)" v-if="row.status === 2">配送信息</a>
<Divider type="vertical" v-if="row.status === 1 || row.status === 2" />
<template>
<Dropdown @on-click="changeMenu(row, $event)">
<Dropdown @on-click="changeMenu(row, $event)" :transfer="true">
<a href="javascript:void(0)">
更多
<Icon type="ios-arrow-down"></Icon>

View File

@ -55,6 +55,7 @@
<Button
v-auth="['product-product-product_show']"
class="bnt mr15"
type="info"
@click="onDismount"
v-show="artFrom.type === '1'"
>批量下架</Button
@ -485,7 +486,7 @@ export default {
batchSelect(type) {
console.log(type);
if (!this.ids.length) {
this.$Message.warning('请选择要设置的商品');
this.$Message.warning('请选择要修改的商品');
} else {
this.batchType = type;
this.batchModal = true;

View File

@ -129,8 +129,8 @@
margin-bottom: 8rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
justify-content: space-between;
/deep/image,
/deep/.easy-loadimage,
/deep/uni-image {
@ -149,6 +149,7 @@
.title {
font-size: 28rpx;
height: 76rpx;
line-height: 38rpx;
}
.tag {

View File

@ -364,7 +364,7 @@
{
"path": "user_cancellation/index",
"style": {
"navigationBarTitleText": "注销说明",
"navigationBarTitleText": "注销协议",
"app-plus": {
// #ifdef APP-PLUS
"titleNView": {

View File

@ -53,7 +53,8 @@
<view class="money">
<view class="x-money">{{$t(`¥`)}}{{ item.productInfo.price }}</view>
<view class="num">x{{ item.cart_num }}</view>
<view class="y-money">{{$t(`¥`)}}{{ item.productInfo.ot_price }}</view>
<view class="y-money" v-if='item.productInfo.attrInfo'>{{$t(`¥`)}}{{ item.productInfo.attrInfo.ot_price }}</view>
<view class="y-money" v-else>{{$t(`¥`)}}{{ item.productInfo.ot_price }}</view>
</view>
</navigator>
</view>

View File

@ -55,7 +55,7 @@
<view class='item acea-row row-between upload'>
<view class='title acea-row row-between-wrapper'>
<view>{{$t(`上传图片`)}}</view>
<view class='tip'>{{$t(`上传图片`)}}</view>
<view class='tip'></view>
</view>
<view class='upload acea-row row-middle'>
<view class='pictrue' v-for="(item,index) in refund_reason_wap_img" :key="index">

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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)

File diff suppressed because one or more lines are too long

View File

@ -659,7 +659,8 @@
},
diyData() {
let that = this;
getDiy(0).then(res => {
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)

View File

@ -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) => {