ECshop鸿宇小京东 - 修复手机端店铺街无法向下滑动问题
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 1144 次浏览 • 2020-08-08 16:52
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术QQ号:1527200768
解决方案:下载附件,直接覆盖
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术QQ号:1527200768
解决方案:下载附件,直接覆盖
ECshop鸿宇小京东 - 修复电脑端首页搜索框下方关键词文字样式显示不全问题
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 1240 次浏览 • 2020-08-07 17:54
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术客服QQ号:1527200768
解决方案:下载附件,直接覆盖
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术客服QQ号:1527200768
解决方案:下载附件,直接覆盖
ECshop鸿宇小京东 - 修复阿里云提示发现后门(Webshell)文件app/custom.php问题
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 1633 次浏览 • 2020-08-07 17:52
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术客服QQ号:1527200768
解决方案:下载附件,直接覆盖
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
技术客服QQ号:1527200768
解决方案:下载附件,直接覆盖
ECshop鸿宇小京东 - 订单导出乱码问题解决方案
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 1408 次浏览 • 2020-07-17 11:50
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
1、先用notepad++软件打开导出的订单文件(orderexcel)
2、然后依次选择:编码->使用UTF-8编码->保存文件。
3、再用表格软件打开文件,乱码问题解决,显示正常。
查看全部
鸿宇论坛:bbs.hongyuvip.com
鸿宇QQ群:90664526
1、先用notepad++软件打开导出的订单文件(orderexcel)
2、然后依次选择:编码->使用UTF-8编码->保存文件。
3、再用表格软件打开文件,乱码问题解决,显示正常。
Java Maven 源改为国内阿里云镜像
Java • 鸿宇 发表了文章 • 0 个评论 • 1583 次浏览 • 2020-06-25 16:31
<mirror>
<id>aliyunmaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>其实这样设置,我发现其实镜像并没有改变,还是maven的中央库。在maven 库的官网上http://maven.apache.org/settings.html,是建议我们这样设置的(文章底部提供settings.xml文件下载压缩包)<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云谷歌仓库</name>
<url>https://maven.aliyun.com/repository/google</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云阿帕奇仓库</name>
<url>https://maven.aliyun.com/repository/apache-snapshots</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云spring仓库</name>
<url>https://maven.aliyun.com/repository/spring</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云spring插件仓库</name>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
</mirror>
</mirrors>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>这样设置之后,我发现maven库确实改成了阿里云库。
转载出处: https://zhuanlan.zhihu.com/p/71998219
查看全部
<mirrors>其实这样设置,我发现其实镜像并没有改变,还是maven的中央库。在maven 库的官网上http://maven.apache.org/settings.html,是建议我们这样设置的(文章底部提供settings.xml文件下载压缩包)
<mirror>
<id>aliyunmaven</id>
<mirrorOf>central</mirrorOf>
<name>aliyun maven</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"这样设置之后,我发现maven库确实改成了阿里云库。
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository/>
<interactiveMode/>
<usePluginRegistry/>
<offline/>
<pluginGroups/>
<servers/>
<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云谷歌仓库</name>
<url>https://maven.aliyun.com/repository/google</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云阿帕奇仓库</name>
<url>https://maven.aliyun.com/repository/apache-snapshots</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云spring仓库</name>
<url>https://maven.aliyun.com/repository/spring</url>
</mirror>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云spring插件仓库</name>
<url>https://maven.aliyun.com/repository/spring-plugin</url>
</mirror>
</mirrors>
<proxies/>
<profiles/>
<activeProfiles/>
</settings>
转载出处: https://zhuanlan.zhihu.com/p/71998219
ECshop鸿宇小京东 - 二级域名切换跳转时session不同步,解决session无法共享同步导致无法登陆的问题
小京东 • 鸿宇 发表了文章 • 0 个评论 • 1393 次浏览 • 2020-06-19 23:45
ecshop 二级域名切换时,比如你的域名是www.example.com ,跳转到abc.example.com,那么会导致session无法获取到而无法登陆的问题。
解决方法,找到includes/init.php
1、在
@ini_set('session.cache_expire', 180);
前,添加如下代码,将.example.com换成你的域名,注意有一个“.”符号 ecshop模板
@ini_set("session.cookie_domain",'.example.com');
2、找到你data/config.php
将如下代码
$cookie_domain = "";
替换为:
$cookie_domain = ".example.com";
3、此时其实已经生效,但你的本地会有缓存,无法看到效果,清除一下浏览器缓存。此时问题已经解决! 查看全部
ecshop 二级域名切换时,比如你的域名是www.example.com ,跳转到abc.example.com,那么会导致session无法获取到而无法登陆的问题。
解决方法,找到includes/init.php
1、在
@ini_set('session.cache_expire', 180);
前,添加如下代码,将.example.com换成你的域名,注意有一个“.”符号 ecshop模板
@ini_set("session.cookie_domain",'.example.com');
2、找到你data/config.php
将如下代码
$cookie_domain = "";
替换为:
$cookie_domain = ".example.com";
3、此时其实已经生效,但你的本地会有缓存,无法看到效果,清除一下浏览器缓存。此时问题已经解决!
大商创 - 微信支付在微信App内不显示按钮问题解决方案
大商创 • 鸿宇 发表了文章 • 0 个评论 • 2218 次浏览 • 2020-06-17 18:13
一、问题原因:
1. 无法获取微信openid:文件 mobile/app/Plugins/payment/wxpay.php 中 get_code() 函数无法正确获取 openid 造成按钮不显示问题。
2.生成订单号逻辑错误, 会造成微信接口返回订单号重复错误。
二、解决方案:
1. 打开文件 mobile/app/Plugins/payment/wxpay.php 约 55 行,修改get_code()函数代码:public function get_code($order, $payment)
{
include_once BASE_PATH . 'Helpers/payment_helper.php';
$this->payment = $payment;
$options = array('appid' => $this->payment['wxpay_appid'], 'mch_id' => $this->payment['wxpay_mchid'], 'key' => $this->payment['wxpay_key']);
if (isset($this->payment['wxpay_sub_mch_id']) && !empty($this->payment['wxpay_sub_mch_id'])) {
$options['sub_mch_id'] = $this->payment['wxpay_sub_mch_id'];
}
$weObj = new \App\Extensions\Wechat($options);
$order_amount = $order['order_amount'] * 100;
if (!is_wechat_browser()) {
$scene_info = json_encode(array(
'h5_info' => array('type' => 'Wap', 'wap_url' => __URL__, 'wap_name' => C('shop.shop_name'))
));
$this->setParameter('body', $order['order_sn']);
$this->setParameter('out_trade_no', $order['order_sn'] . time() . 'A' . $order['log_id']);
$this->setParameter('total_fee', $order_amount);
$this->setParameter('spbill_create_ip', $this->get_client_ip());
$this->setParameter('notify_url', notify_url(basename(__FILE__, '.php')));
$this->setParameter('trade_type', 'MWEB');
$this->setParameter('scene_info', $scene_info);
$respond = $weObj->PayUnifiedOrder($this->parameters);
if (isset($respond['mweb_url'])) {
if ($respond['result_code'] == 'SUCCESS') {
$redirect_url = __URL__ . '/respond.php?code=wxpay&type=wxh5&log_id=' . $order['log_id'];
}
$button = '<a class="box-flex btn-submit" type="button" onclick="window.open(\'' . $respond['mweb_url'] . '&redirect_url=' . urlencode($redirect_url) . '\')">微信支付</a>';
} else {
$button = '';
return false;
}
} else {
$openid = '';
if (isset($_SESSION['openid']) && !empty($_SESSION['openid'])) {
$openid = $_SESSION['openid'];
} else {
if (isset($_SESSION['openid_base']) && !empty($_SESSION['openid_base'])) {
$openid = $_SESSION['openid_base'];
} else {
//return false;
$openid = $this->getOpenid();
}
}
$this->setParameter('openid', $openid);
$this->setParameter('body', $order['order_sn']);
$this->setParameter('out_trade_no', $order['order_sn'] . time() . 'A' . $order['log_id']);
$this->setParameter('total_fee', $order_amount);
$this->setParameter('spbill_create_ip', $this->get_client_ip());
$this->setParameter('notify_url', notify_url(basename(__FILE__, '.php')));
$this->setParameter('trade_type', 'JSAPI');
$respond = $weObj->PayUnifiedOrder($this->parameters, true);
$jsApiParameters = json_encode($respond);
$js = "<script language=\"javascript\">\r\n function jsApiCall(){WeixinJSBridge.invoke(\"getBrandWCPayRequest\"," . $jsApiParameters . ',function(res){if(res.err_msg == "get_brand_wcpay_request:ok"){location.href="' . return_url(basename(__FILE__, '.php')) . '&status=1&log_id=' . $order['log_id'] . '"}else{location.href="' . return_url(basename(__FILE__, '.php')) . '&status=0&log_id=' . $order['log_id'] . "\"}})};function callpay(){if (typeof WeixinJSBridge == \"undefined\"){if( document.addEventListener ){document.addEventListener(\"WeixinJSBridgeReady\", jsApiCall, false);}else if (document.attachEvent){document.attachEvent(\"WeixinJSBridgeReady\", jsApiCall);document.attachEvent(\"onWeixinJSBridgeReady\", jsApiCall);}}else{jsApiCall();}}\r\n </script>";
$button = '<a class="box-flex btn-submit" type="button" onclick="callpay();">微信支付</a>' . $js;
}
return $button;
}2. 打开文件 mobile/app/Plugins/payment/wxpay.php 约 365 行,修改getOpenid()函数代码:private function getOpenid()
{
if (!isset($_GET['code'])) {
$redirectUrl = urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . (!empty($_SERVER['QUERY_STRING']) ? '?' : '') . $_SERVER['QUERY_STRING']);
$url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $this->payment['wxpay_appid'] . '&redirect_uri=' . $redirectUrl . '&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect';
header('Location: ' . $url);
exit();
} else {
$code = $_GET['code'];
$url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' . $this->payment['wxpay_appid'] . '&secret=' . $this->payment['wxpay_appsecret'] . '&code=' . $code . '&grant_type=authorization_code';
/*
$result = \App\Extensions\Http::doGet($url);
if ($result) {
$json = json_decode($result);
if (isset($json['errCode']) && $json['errCode']) {
return false;
}
$_SESSION['openid_base'] = $json['openid'];
return $json['openid'];
}
return false;
*/
$get_token_url = $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $get_token_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
$res = curl_exec($ch);
curl_close($ch);
$json_obj = json_decode($res, true);
$openid = $json_obj['openid'];
$_SESSION['openid'] = $openid;
return $openid;
}
}
3. 代码修改重点
查看全部
一、问题原因:
1. 无法获取微信openid:文件 mobile/app/Plugins/payment/wxpay.php 中 get_code() 函数无法正确获取 openid 造成按钮不显示问题。
2.生成订单号逻辑错误, 会造成微信接口返回订单号重复错误。
二、解决方案:
1. 打开文件 mobile/app/Plugins/payment/wxpay.php 约 55 行,修改get_code()函数代码:
public function get_code($order, $payment)2. 打开文件 mobile/app/Plugins/payment/wxpay.php 约 365 行,修改getOpenid()函数代码:
{
include_once BASE_PATH . 'Helpers/payment_helper.php';
$this->payment = $payment;
$options = array('appid' => $this->payment['wxpay_appid'], 'mch_id' => $this->payment['wxpay_mchid'], 'key' => $this->payment['wxpay_key']);
if (isset($this->payment['wxpay_sub_mch_id']) && !empty($this->payment['wxpay_sub_mch_id'])) {
$options['sub_mch_id'] = $this->payment['wxpay_sub_mch_id'];
}
$weObj = new \App\Extensions\Wechat($options);
$order_amount = $order['order_amount'] * 100;
if (!is_wechat_browser()) {
$scene_info = json_encode(array(
'h5_info' => array('type' => 'Wap', 'wap_url' => __URL__, 'wap_name' => C('shop.shop_name'))
));
$this->setParameter('body', $order['order_sn']);
$this->setParameter('out_trade_no', $order['order_sn'] . time() . 'A' . $order['log_id']);
$this->setParameter('total_fee', $order_amount);
$this->setParameter('spbill_create_ip', $this->get_client_ip());
$this->setParameter('notify_url', notify_url(basename(__FILE__, '.php')));
$this->setParameter('trade_type', 'MWEB');
$this->setParameter('scene_info', $scene_info);
$respond = $weObj->PayUnifiedOrder($this->parameters);
if (isset($respond['mweb_url'])) {
if ($respond['result_code'] == 'SUCCESS') {
$redirect_url = __URL__ . '/respond.php?code=wxpay&type=wxh5&log_id=' . $order['log_id'];
}
$button = '<a class="box-flex btn-submit" type="button" onclick="window.open(\'' . $respond['mweb_url'] . '&redirect_url=' . urlencode($redirect_url) . '\')">微信支付</a>';
} else {
$button = '';
return false;
}
} else {
$openid = '';
if (isset($_SESSION['openid']) && !empty($_SESSION['openid'])) {
$openid = $_SESSION['openid'];
} else {
if (isset($_SESSION['openid_base']) && !empty($_SESSION['openid_base'])) {
$openid = $_SESSION['openid_base'];
} else {
//return false;
$openid = $this->getOpenid();
}
}
$this->setParameter('openid', $openid);
$this->setParameter('body', $order['order_sn']);
$this->setParameter('out_trade_no', $order['order_sn'] . time() . 'A' . $order['log_id']);
$this->setParameter('total_fee', $order_amount);
$this->setParameter('spbill_create_ip', $this->get_client_ip());
$this->setParameter('notify_url', notify_url(basename(__FILE__, '.php')));
$this->setParameter('trade_type', 'JSAPI');
$respond = $weObj->PayUnifiedOrder($this->parameters, true);
$jsApiParameters = json_encode($respond);
$js = "<script language=\"javascript\">\r\n function jsApiCall(){WeixinJSBridge.invoke(\"getBrandWCPayRequest\"," . $jsApiParameters . ',function(res){if(res.err_msg == "get_brand_wcpay_request:ok"){location.href="' . return_url(basename(__FILE__, '.php')) . '&status=1&log_id=' . $order['log_id'] . '"}else{location.href="' . return_url(basename(__FILE__, '.php')) . '&status=0&log_id=' . $order['log_id'] . "\"}})};function callpay(){if (typeof WeixinJSBridge == \"undefined\"){if( document.addEventListener ){document.addEventListener(\"WeixinJSBridgeReady\", jsApiCall, false);}else if (document.attachEvent){document.attachEvent(\"WeixinJSBridgeReady\", jsApiCall);document.attachEvent(\"onWeixinJSBridgeReady\", jsApiCall);}}else{jsApiCall();}}\r\n </script>";
$button = '<a class="box-flex btn-submit" type="button" onclick="callpay();">微信支付</a>' . $js;
}
return $button;
}
private function getOpenid()
{
if (!isset($_GET['code'])) {
$redirectUrl = urlencode('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . (!empty($_SERVER['QUERY_STRING']) ? '?' : '') . $_SERVER['QUERY_STRING']);
$url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' . $this->payment['wxpay_appid'] . '&redirect_uri=' . $redirectUrl . '&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect';
header('Location: ' . $url);
exit();
} else {
$code = $_GET['code'];
$url = 'https://api.weixin.qq.com/sns/oauth2/access_token?appid=' . $this->payment['wxpay_appid'] . '&secret=' . $this->payment['wxpay_appsecret'] . '&code=' . $code . '&grant_type=authorization_code';
/*
$result = \App\Extensions\Http::doGet($url);
if ($result) {
$json = json_decode($result);
if (isset($json['errCode']) && $json['errCode']) {
return false;
}
$_SESSION['openid_base'] = $json['openid'];
return $json['openid'];
}
return false;
*/
$get_token_url = $url;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $get_token_url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
$res = curl_exec($ch);
curl_close($ch);
$json_obj = json_decode($res, true);
$openid = $json_obj['openid'];
$_SESSION['openid'] = $openid;
return $openid;
}
}
3. 代码修改重点
App封装(手机端封装App)教程 - 鸿宇科技
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 2676 次浏览 • 2020-05-30 10:01
官方网址:hongyuvip.com
鸿宇论坛:bbs.hongyuvip.com
ebestmall会员QQ群:87516690
鸿宇普通QQ群:90664526
******************** 封装步骤 ********************
一、主要步骤:
1、首先打开网站 www.appcan.cn 注册一个会员并登陆
2、打开http://dashboard.appcan.cn/app/manage
3、点击创建应用 => 填写您app的名称跟描述 => 点击确认 => 详细步骤(参考二、详细步骤) => 然后点击应用打包
二、详细步骤:
1、第一步需要制作一张180*180的app按钮图片上传 点击保存(就是你APP软件的按钮了)
2、然后点击启动页设置,这里按照尺寸上传你APP的启动图片 点击保存
3、下面点击云端打包 ,勾选 web app模式 在网站地址中填上你 的手机版域名http://域名/mobile 然后在选择平台,安卓跟ios打钩,在下面的版本号随便写个数字点击生成安装包OK ,app就制作好了。
三、友情提醒
1、服务器存储地址 => (取消勾选)蓝汛服务器,即可免费封装。
2、该网站可以适用于各种wap网站的在线封装,还是不错的!想要那种带有独立功能的需要自己找个技术员做原生态开发啦!! 查看全部
官方网址:hongyuvip.com
鸿宇论坛:bbs.hongyuvip.com
ebestmall会员QQ群:87516690
鸿宇普通QQ群:90664526
******************** 封装步骤 ********************
一、主要步骤:
1、首先打开网站 www.appcan.cn 注册一个会员并登陆
2、打开http://dashboard.appcan.cn/app/manage
3、点击创建应用 => 填写您app的名称跟描述 => 点击确认 => 详细步骤(参考二、详细步骤) => 然后点击应用打包
二、详细步骤:
1、第一步需要制作一张180*180的app按钮图片上传 点击保存(就是你APP软件的按钮了)
2、然后点击启动页设置,这里按照尺寸上传你APP的启动图片 点击保存
3、下面点击云端打包 ,勾选 web app模式 在网站地址中填上你 的手机版域名http://域名/mobile 然后在选择平台,安卓跟ios打钩,在下面的版本号随便写个数字点击生成安装包OK ,app就制作好了。
三、友情提醒
1、服务器存储地址 => (取消勾选)蓝汛服务器,即可免费封装。
2、该网站可以适用于各种wap网站的在线封装,还是不错的!想要那种带有独立功能的需要自己找个技术员做原生态开发啦!!
ECshop鸿宇小京东 - 商品批量设置:新品、热销、精选、并且首页显示商品
鸿宇教程库 • 鸿宇 发表了文章 • 0 个评论 • 1577 次浏览 • 2020-05-22 14:37
UPDATE ecs_goods SET is_best=1,is_new=1,is_hot=1;
执行完成后,请点击依次网站右上角:更新首页静态、更新全部静态、清除缓存、手机缓存,网站才会显示修改后的数据! 查看全部
UPDATE ecs_goods SET is_best=1,is_new=1,is_hot=1;
执行完成后,请点击依次网站右上角:更新首页静态、更新全部静态、清除缓存、手机缓存,网站才会显示修改后的数据!
MySQL5.7 执行sql语句报错 [Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause 解决方案
MySQL • 鸿宇 发表了文章 • 0 个评论 • 1712 次浏览 • 2020-05-22 14:36
@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));二、重启MySQL服务
select version(),二、重启MySQL服务
@@sql_mode;SET sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));