|
@@ -286,18 +286,19 @@ class Order extends Core
|
|
|
$journal_id = Dever::input('journal_id', false, '> 0', '请传入正确的小刊ID');
|
|
|
|
|
|
if (strpos($code, 'M') === 0) {
|
|
|
- if (strlen($code) < 13) {
|
|
|
- $check = false;
|
|
|
- $code = str_replace('M', '', $code);
|
|
|
- } else {
|
|
|
- $check = true;
|
|
|
- $uid = substr($code, 1, 4);
|
|
|
- $code = substr($code, 5);
|
|
|
- }
|
|
|
+ $check = true;
|
|
|
+ $uid = substr($code, 1, 4);
|
|
|
+ $code = substr($code, 5);
|
|
|
|
|
|
Dever::setInput('set_product_id', $journal_id);
|
|
|
$info = Dever::db('code/info')->one($code);
|
|
|
|
|
|
+ if (!$info) {
|
|
|
+ $check = false;
|
|
|
+ $code = str_replace('M', '', $code);
|
|
|
+ $info = Dever::db('code/info')->one($code);
|
|
|
+ }
|
|
|
+
|
|
|
if ($check) {
|
|
|
$uid = Dever::uid($uid, 'decode');
|
|
|
if ($info && $info['create_uid'] != $uid) {
|