v1.1.42
This commit is contained in:
parent
6ec2a91921
commit
88b78878f8
7
doc/database/upgrade/v1.1.42.sql
Normal file
7
doc/database/upgrade/v1.1.42.sql
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
UPDATE `yoshop_store_access` SET `sort`='105' WHERE (`access_id`='10061');
|
||||
UPDATE `yoshop_store_access` SET `sort`='110' WHERE (`access_id`='10069');
|
||||
|
||||
INSERT INTO `yoshop_store_access` VALUES ('11004', '订阅消息', 'wxapp.submsg/index', '10059', '105', '1589158947', '1589158947');
|
||||
|
15
doc/更新日志.txt
15
doc/更新日志.txt
@ -1,4 +1,19 @@
|
||||
|
||||
### v1.1.42 更新日志 ###
|
||||
|
||||
新增:分享小程序直播间绑定分销关系
|
||||
修复:小程序端ID selectors报错问题
|
||||
修复:后台直播间管理置顶报错
|
||||
修复:取消确认弹框后未关闭loading
|
||||
修复:直播间列表为空时同步失败
|
||||
修复:收货地址过长发送订阅消息失败
|
||||
修复:后台审核拼团订单退货报错
|
||||
修复:小程序端未配置订阅消息提交表单
|
||||
修复:小程序端秒杀商品分享时无标题
|
||||
--------------------------------
|
||||
注:本次更新须重新发布小程序
|
||||
|
||||
|
||||
### v1.1.41 更新日志 ###
|
||||
|
||||
新增:微信小程序订阅消息
|
||||
|
@ -130,13 +130,4 @@ class Access extends AccessModel
|
||||
return $prefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增默认权限
|
||||
*/
|
||||
public function insertDefault()
|
||||
{
|
||||
$defaultData = $this->defaultData();
|
||||
$this->buildData($defaultData);
|
||||
}
|
||||
|
||||
}
|
@ -221,7 +221,7 @@ function export_excel($fileName, $tileArray = [], $dataArray = [])
|
||||
{
|
||||
ini_set('memory_limit', '512M');
|
||||
ini_set('max_execution_time', 0);
|
||||
ob_end_clean();
|
||||
// ob_end_clean();
|
||||
ob_start();
|
||||
header("Content-Type: text/csv");
|
||||
header("Content-Disposition:filename=" . $fileName);
|
||||
@ -356,7 +356,7 @@ function filter_emoji($text)
|
||||
function str_substr($str, $length = 30)
|
||||
{
|
||||
if (strlen($str) > $length) {
|
||||
$str = mb_substr($str, 0, $length);
|
||||
$str = mb_substr($str, 0, $length, 'utf-8');
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
@ -37,13 +37,31 @@ class ExceptionHandler extends Handle
|
||||
return json(['msg' => $this->message, 'code' => $this->code]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Report or log an exception.
|
||||
*
|
||||
* @param \Exception $exception
|
||||
* @return void
|
||||
*/
|
||||
public function report(Exception $exception)
|
||||
{
|
||||
// 不使用内置的方式记录异常日志
|
||||
}
|
||||
|
||||
/**
|
||||
* 将异常写入日志
|
||||
* @param Exception $e
|
||||
*/
|
||||
private function recordErrorLog(Exception $e)
|
||||
{
|
||||
Log::record($e->getMessage(), 'error');
|
||||
Log::record($e->getTraceAsString(), 'error');
|
||||
$data = [
|
||||
'file' => $e->getFile(),
|
||||
'line' => $e->getLine(),
|
||||
'message' => $this->getMessage($e),
|
||||
'code' => $this->getCode($e),
|
||||
];
|
||||
$log = "[{$data['code']}]{$data['message']} [{$data['file']}:{$data['line']}]";
|
||||
$log .= "\r\n" . $e->getTraceAsString();
|
||||
Log::record($log, 'error');
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace app\common\library\wechat;
|
||||
|
||||
use think\Cache;
|
||||
use app\common\library\helper;
|
||||
use app\common\exception\BaseException;
|
||||
|
||||
/**
|
||||
@ -153,7 +154,7 @@ class WxBase
|
||||
*/
|
||||
protected function jsonEncode($data)
|
||||
{
|
||||
return json_encode($data, JSON_UNESCAPED_UNICODE);
|
||||
return helper::jsonEncode($data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -163,7 +164,7 @@ class WxBase
|
||||
*/
|
||||
protected function jsonDecode($json)
|
||||
{
|
||||
return json_decode($json, true);
|
||||
return helper::jsonDecode($json);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,7 @@ class Room extends WxBase
|
||||
$this->error = 'not found errcode';
|
||||
return false;
|
||||
}
|
||||
if ($response['errcode'] != 0) {
|
||||
if ((int)$response['errcode'] > 1) {
|
||||
$this->error = $response['errmsg'];
|
||||
return false;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ class BaseModel extends Model
|
||||
protected static function setStoreWxappId()
|
||||
{
|
||||
$session = Session::get('yoshop_store');
|
||||
self::$wxapp_id = $session['wxapp']['wxapp_id'];
|
||||
!empty($session) && self::$wxapp_id = $session['wxapp']['wxapp_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use app\common\library\helper;
|
||||
use think\Cache;
|
||||
|
||||
/**
|
||||
@ -80,7 +81,7 @@ class Category extends BaseModel
|
||||
*/
|
||||
public static function getCacheTreeJson()
|
||||
{
|
||||
return json_encode(static::getCacheTree());
|
||||
return helper::jsonEncode(static::getCacheTree());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -140,7 +140,7 @@ class Goods extends BaseModel
|
||||
} elseif ($params['sortType'] === 'sales') {
|
||||
$sort = ['goods_sales' => 'desc'];
|
||||
} elseif ($params['sortType'] === 'price') {
|
||||
$sort = $params['sortPrice'] ? ['goods_max_price' => 'desc'] : ['goods_min_price'];
|
||||
$sort = $params['sortPrice'] ? ['goods_max_price' => 'desc'] : ['goods_min_price' => 'asc'];
|
||||
}
|
||||
// 商品表名称
|
||||
$tableName = $this->getTable();
|
||||
|
@ -35,13 +35,13 @@ class LiveRoom extends BaseModel
|
||||
|
||||
/**
|
||||
* 获取直播间详情
|
||||
* @param $roomId
|
||||
* @param int $id
|
||||
* @return static|null
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public static function detail($roomId)
|
||||
public static function detail($id)
|
||||
{
|
||||
return static::get($roomId);
|
||||
return static::get($id);
|
||||
}
|
||||
|
||||
}
|
@ -101,7 +101,8 @@ class Delivery extends Basics
|
||||
*/
|
||||
private function getFormatAddress($orderInfo)
|
||||
{
|
||||
return implode('', $orderInfo['address']['region']) . $orderInfo['address']['detail'];
|
||||
$address = implode('', $orderInfo['address']['region']) . $orderInfo['address']['detail'];
|
||||
return $this->getSubstr($address);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,15 +42,15 @@ class Room extends Controller
|
||||
|
||||
/**
|
||||
* 修改直播间置顶状态
|
||||
* @param $room_id
|
||||
* @param $is_top
|
||||
* @param int $id
|
||||
* @param int $is_top
|
||||
* @return array|bool
|
||||
* @throws \think\exception\DbException
|
||||
*/
|
||||
public function settop($room_id, $is_top)
|
||||
public function settop($id, $is_top)
|
||||
{
|
||||
// 直播间详情
|
||||
$model = LiveRoomModel::detail($room_id);
|
||||
$model = LiveRoomModel::detail($id);
|
||||
if (!$model->setIsTop($is_top)) {
|
||||
return $this->renderError('操作失败');
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class OrderRefund extends OrderRefundModel
|
||||
$this->error = '请选择退货地址';
|
||||
return false;
|
||||
}
|
||||
$this->transaction(function ($data) {
|
||||
$this->transaction(function () use ($data) {
|
||||
// 拒绝申请, 标记售后单状态为已拒绝
|
||||
$data['is_agree'] == 20 && $data['status'] = 10;
|
||||
// 同意换货申请, 标记售后单状态为已完成
|
||||
|
@ -89,7 +89,7 @@ use app\common\enum\live\LiveStatus as LiveStatusEnum;
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
<span class="j-setTop x-cur-p am-badge am-badge-<?= $item['is_top'] ? 'success' : 'warning' ?>"
|
||||
data-id="<?= $item['room_id'] ?>" data-istop="<?= $item['is_top'] ?>">
|
||||
data-id="<?= $item['id'] ?>" data-istop="<?= $item['is_top'] ?>">
|
||||
<?= $item['is_top'] ? '是' : '否' ?></span>
|
||||
</td>
|
||||
<td class="am-text-middle"><?= $item['update_time'] ?></td>
|
||||
@ -137,7 +137,7 @@ use app\common\enum\live\LiveStatus as LiveStatusEnum;
|
||||
, function (index) {
|
||||
var url = "<?= url('apps.live.room/settop') ?>";
|
||||
$.post(url
|
||||
, {room_id: data['id'], is_top: Number(!(parseInt(data['istop']) === 1))}
|
||||
, {id: data['id'], is_top: Number(!(parseInt(data['istop']) === 1))}
|
||||
, function (result) {
|
||||
result['code'] === 1 ? $.show_success(result['msg'], result['url'])
|
||||
: $.show_error(result['msg']);
|
||||
|
@ -686,6 +686,7 @@ $detail = isset($detail) ? $detail : null;
|
||||
: $.show_error(result.msg);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -598,6 +598,7 @@ $detail = isset($detail) ? $detail : null;
|
||||
: $.show_error(result.msg);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -110,8 +110,12 @@
|
||||
<p>¥<?= $item['order_goods']['total_pay_price'] ?></p>
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
<p><?= $item['user']['nickName'] ?></p>
|
||||
<p class="am-link-muted">(用户id:<?= $item['user']['user_id'] ?>)</p>
|
||||
<?php if (!empty($item['user'])): ?>
|
||||
<p><?= $item['user']['nickName'] ?></p>
|
||||
<p class="am-link-muted">(用户id:<?= $item['user']['user_id'] ?>)</p>
|
||||
<?php else: ?>
|
||||
<p>--</p>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="am-text-middle">
|
||||
<span class="am-badge am-badge-secondary"> <?= $item['type']['text'] ?> </span>
|
||||
|
@ -161,7 +161,7 @@
|
||||
</tr>
|
||||
<?php endforeach; else: ?>
|
||||
<tr>
|
||||
<td colspan="12" class="am-text-center">暂无记录</td>
|
||||
<td colspan="13" class="am-text-center">暂无记录</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
|
@ -104,7 +104,7 @@
|
||||
<?= $item['recharge_type']['value'] == 10 ? 'am-badge-secondary' : 'am-badge-success' ?>">
|
||||
<?= $item['recharge_type']['text'] ?></span>
|
||||
</td>
|
||||
<td class="am-text-middle"><?= $item['order_plan']['plan_name'] ?: '--' ?></td>
|
||||
<td class="am-text-middle"><?= !empty($item['order_plan']) ? $item['order_plan']['plan_name'] : '--' ?></td>
|
||||
<td class="am-text-middle"><?= $item['pay_price'] ?></td>
|
||||
<td class="am-text-middle"><?= $item['gift_money'] ?></td>
|
||||
<td class="am-text-middle">
|
||||
|
@ -123,10 +123,10 @@
|
||||
// 一键配置
|
||||
$('.j-shuttle').on('click', function () {
|
||||
var url = "<?= url('wxapp.submsg/shuttle') ?>";
|
||||
var load = layer.load();
|
||||
layer.confirm('该操作将自动为您的小程序添加订阅消息<br>请先确保 "订阅消息" - "我的模板" 中没有记录<br>确定添加吗?', {
|
||||
title: '友情提示'
|
||||
}, function (index) {
|
||||
var load = layer.load();
|
||||
$.post(url, {}, function (result) {
|
||||
result.code === 1 ? $.show_success(result.msg, result.url)
|
||||
: $.show_error(result.msg);
|
||||
|
@ -397,7 +397,7 @@ class Query
|
||||
$seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1;
|
||||
} else {
|
||||
// 按照字段的首字母的值分表
|
||||
$seq = (ord($value{0}) % $rule['num']) + 1;
|
||||
$seq = (ord($value[0]) % $rule['num']) + 1;
|
||||
}
|
||||
}
|
||||
return $this->getTable() . '_' . $seq;
|
||||
|
@ -1,3 +1,3 @@
|
||||
{
|
||||
"version": "1.1.41"
|
||||
"version": "1.1.42"
|
||||
}
|
||||
|
Reference in New Issue
Block a user