作者 jingchen
1 个管道 的构建 通过 耗费 9 秒

更新声音提示

正在显示 100 个修改的文件 包含 88 行增加119 行删除

要显示太多修改。

为保证性能只显示 100 of 100+ 个文件。

... ... @@ -5,6 +5,7 @@ return [
'Color' => '样式颜色',
'Title' => '样式名称',
'Image' => '展示图片',
'Poster' => '分享海报',
'Create_time' => '创建时间',
'Update_time' => '更新时间'
];
... ...
... ... @@ -2,7 +2,6 @@
<section class="sidebar">
<!--订单提醒信息-->
<div class="l_kf" style="padding:10px;">
<<<<<<< HEAD
<div>
<a id='service_msg' href="#" target="_blank"> 需处理的服务订单:
<span class="badge" id="service_num" style="background-color: red;">0</span>
... ... @@ -14,25 +13,17 @@
</a>
</div>
<audio id="timi_audio">
<source src="http://soospa.jcyang.cn/assets/tixing.mp3" type="audio/mpeg">
=======
<a id='timimsg' href="#" target="_blank"> 需处理的待服务订单:
<span class="badge" id="timimsg_num" style="background-color: red;">0</span>
</a>
<audio id="timi_audio">
<source src="https://soospa.cn/assets/tixing.mp3" type="audio/mpeg">
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
<!-- Your browser does not support the audio element.-->
</audio>
<!-- <a id='timimsg' href="#" target="_blank"> 需处理的待服务订单:-->
<!-- <span class="badge" id="timimsg_num" style="background-color: red;">0</span>-->
<!-- </a>-->
</div>
<!-- 管理员信息 -->
<div class="user-panel hidden-xs">
<div class="pull-left image">
<<<<<<< HEAD
<a href="general/profile" class="addtabsit"><img src="{$admin.avatar|cdnurl|htmlentities}"
class="img-circle"/></a>
=======
<a href="general/profile" class="addtabsit"><img src="{$admin.avatar|cdnurl|htmlentities}" class="img-circle" /></a>
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
</div>
<div class="pull-left info">
<p>{$admin.nickname|htmlentities}</p>
... ...
... ... @@ -23,9 +23,25 @@
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<span style="color: orange">推荐尺寸:305*158px</span>
<ul class="row list-inline faupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Poster')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-poster" class="form-control" size="50" name="row[poster]" type="text">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-poster" class="btn btn-danger faupload" data-input-id="c-poster" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-poster"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-poster" class="btn btn-primary fachoose" data-input-id="c-poster" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-poster"></span>
</div>
<span style="color: orange">推荐尺寸:330*430px</span>
<ul class="row list-inline faupload-preview" id="p-poster"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -23,9 +23,25 @@
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
<span style="color: orange">推荐尺寸:305*158px</span>
<ul class="row list-inline faupload-preview" id="p-image"></ul>
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Poster')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-poster" class="form-control" size="50" name="row[poster]" type="text" value="{$row.poster|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-poster" class="btn btn-danger faupload" data-input-id="c-poster" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-poster"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-poster" class="btn btn-primary fachoose" data-input-id="c-poster" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-poster"></span>
</div>
<span style="color: orange">推荐尺寸:330*430px</span>
<ul class="row list-inline faupload-preview" id="p-poster"></ul>
</div>
</div>
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -10,7 +10,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-discount" class="form-control" step="0.01" name="row[discount]" type="number">
<input id="c-discount" class="form-control" step="0.1" min="0.1" max="1" name="row[discount]" type="text">
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -10,7 +10,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Discount')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-discount" class="form-control" step="0.1" min="0.1" max="1" name="row[discount]" type="number" value="{$row.discount|htmlentities}">
<input id="c-discount" class="form-control" step="0.1" min="0.1" max="1" name="row[discount]" type="text" value="{$row.discount|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -94,10 +94,11 @@ class Gift extends Api
{
$orderId = $this->request->post('order_id');
$userGift = UserGift::where(['order_id' => $orderId])->find();
$poster = Cover::where('id', $userGift['card_id'])->value('poster');
$nickname = UserModel::where('id', $userGift['user_id'])->value('nickname');
$card_name = Cover::where('id',$userGift['card_id'])->value('title');
$this->success('获取成功', [
'poster' => cdnurl(Config::where('id', 27)->value('value'), true),
'poster' => cdnurl($poster, true),
'code' => cdnurl($userGift->code, true),
'card_id' => $userGift['id'],
'user_id' => $userGift['user_id'],
... ...
... ... @@ -9,7 +9,6 @@ use app\common\model\GoodsEvaluate;
use app\common\model\Order;
use app\common\model\OrderGoods;
use app\common\model\User;
use EasyWeChat\Factory;
use think\Config;
use think\Db;
use think\Exception;
... ... @@ -153,11 +152,7 @@ class Goods extends Api
'total_price'=>$pay_price,
'pay_price'=>$pay_price,
'type'=>2,
<<<<<<< HEAD
'tx_status'=>0,
=======
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
'createtime'=>time()
];
$order->save($orderdata);
$id = $order->id;
... ... @@ -233,11 +228,7 @@ class Goods extends Api
'shphone'=>$address['tel'],
'shaddress'=>$address['city'].$address['address'],
'remark'=>$param['remark'] ? $param['remark'] : null,
<<<<<<< HEAD
'updatetime'=>time(),
=======
'updatetime'=>time()
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
];
$order->save($orderdata,['id'=>$param['order_id']]);
$id = $param['order_id'];
... ...
... ... @@ -18,9 +18,9 @@ return [
// 应用命名空间
'app_namespace' => 'app',
// 应用调试模式
'app_debug' => Env::get('app.debug', false),
'app_debug' => Env::get('app.debug', true),
// 应用Trace
'app_trace' => Env::get('app.trace', false),
'app_trace' => Env::get('app.trace', true),
// 应用模式状态
'app_status' => '',
// 是否支持多模块
... ... @@ -267,11 +267,7 @@ return [
//会员注册验证码类型email/mobile/wechat/text/false
'user_register_captcha' => 'text',
//登录验证码
<<<<<<< HEAD
'login_captcha' => false,
=======
'login_captcha' => true,
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
//登录失败超过10次则1天后重试
'login_failure_retry' => true,
//是否同一账号同一时间只能在一个地方登录
... ...
... ... @@ -13,7 +13,6 @@
use think\Env;
return [
<<<<<<< HEAD
// 服务器地址
'hostname' => Env::get('database.hostname', ''),
// 数据库名
... ... @@ -22,27 +21,6 @@ return [
'username' => Env::get('database.username', ''),
// 密码
'password' => Env::get('database.password', ''),
=======
//测试服务器
// //数据库类型
// 'type' => Env::get('database.type', 'mysql'),
// 服务器地址
// 'hostname' => Env::get('database.hostname', '127.0.0.1'),
// // 数据库名
// 'database' => Env::get('database.database', 'soospa'),
// // 用户名
// 'username' => Env::get('database.username', 'root'),
// // 密码
// 'password' => Env::get('database.password', ''),
// 服务器地址
'hostname' => Env::get('database.hostname', '119.3.83.59'),
// 数据库名
'database' => Env::get('database.database', 'soospa'),
// 用户名
'username' => Env::get('database.username', 'shs_zhangyang'),
// 密码
'password' => Env::get('database.password', 'bronet888!'),
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
// 端口
'hostport' => Env::get('database.hostport', ''),
// // 连接dsn
... ...
... ... @@ -31,12 +31,8 @@
"ext-pdo": "*",
"ext-bcmath": "*",
"txthinking/mailer": "^2.0",
<<<<<<< HEAD
"tinymeng/code": "^2.0",
"topthink/think-worker": "^1.0"
=======
"tinymeng/code": "^2.0"
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
},
"config": {
"preferred-install": "dist",
... ...
... ... @@ -29,6 +29,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
{field: 'color', title: __('Color'), operate: 'LIKE'},
{field: 'title', title: __('Title'), operate: 'LIKE'},
{field: 'image', title: __('Image'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'poster', title: __('Poster'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.image},
{field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime},
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
... ...
... ... @@ -17,7 +17,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
}
});
<<<<<<< HEAD
// 订单提醒
var orderNotificationAudio = document.getElementById('timi_audio');
... ... @@ -51,51 +50,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
return false;
});
}, 10 * 1000); // 每10秒请求一次
=======
// 订单提醒
var timi_audio = document.getElementById('timi_audio');
// setInterval(function () {
// $.ajax({
// url: "index/timi_msg",
// success:function (data) {
// $("#timimsg_num").html(data['num']);
// $("#timimsg").attr("href",data['url']);
// // remind = data;
// // sessionStorage.num = data;
// if(parseInt(data['nums'])>0){
// timi_audio.play();//播放提醒声音
// //clearInterval(timer)
// }else{
// timi_audio.pause(); //暂停
// }
// }
// });
// // });
// },10000);
var timer = setInterval(function (){
Fast.api.ajax({
url: "index/timi_msg",
data: {},
},function(data, ret){
//location.reload()
$("#timimsg_num").html(data['num']);
$("#timimsg").attr("href",data['url']);
if(parseInt(data['nums'])>0){
timi_audio.play();//播放提醒声音
//clearInterval(timer)
}else{
timi_audio.pause(); //暂停
//location.reload();
return false;
}
},function(data, ret){
// location.reload()
return false;
});
}, 10*1000);//10分钟请求1次
>>>>>>> a581f565d7001443e0e948aa4657b9a91c3e12fb
//快捷搜索
$(".menuresult").width($("form.sidebar-form > .input-group").width());
... ...
... ... @@ -2,3 +2,4 @@
/vendor
.idea
.DS_Store
/.vscode
... ...
... ... @@ -10,7 +10,7 @@ Apache Licence是著名的非盈利开源组织Apache采用的协议。
的条件:
1. 需要给代码的用户一份Apache Licence ;
2. 如果你修改了代码,需要在被修改的文件中说明;
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要1111
3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
带有原来代码中的协议,商标,专利声明和其他原来作者规
定需要包含的说明;
4. 如果再发布的产品中包含一个Notice文件,则在Notice文
... ...
... ... @@ -60,7 +60,7 @@ ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
本项目包含的第三方源码和二进制文件之版权信息另行标注。
版权所有Copyright © 2006-2022 by ThinkPHP (http://thinkphp.cn)
版权所有Copyright © 2006-2024 by ThinkPHP (http://thinkphp.cn)
All rights reserved。
... ...
... ... @@ -9,7 +9,7 @@
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
define('THINK_VERSION', '5.0.25');
define('THINK_VERSION', '5.0.27');
define('THINK_START_TIME', microtime(true));
define('THINK_START_MEM', memory_get_usage());
define('EXT', '.php');
... ...
... ... @@ -360,6 +360,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param mixed $offset 键名
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return array_key_exists($offset, $this->items);
... ... @@ -371,6 +372,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param mixed $offset 键名
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->items[$offset];
... ... @@ -383,6 +385,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param mixed $value 值
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (is_null($offset)) {
... ... @@ -398,6 +401,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param mixed $offset 键名
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->items[$offset]);
... ... @@ -408,6 +412,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @access public
* @return int
*/
#[\ReturnTypeWillChange]
public function count()
{
return count($this->items);
... ... @@ -418,6 +423,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @access public
* @return ArrayIterator
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new ArrayIterator($this->items);
... ... @@ -428,6 +434,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @access public
* @return array
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
... ...
... ... @@ -201,7 +201,7 @@ class Lang
} elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
// 自动侦测浏览器语言
preg_match('/^([a-z\d\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches);
$langSet = strtolower($matches[1]);
$langSet = strtolower($matches[1] ?? '');
$acceptLangs = Config::get('header_accept_lang');
if (isset($acceptLangs[$langSet])) {
... ...
... ... @@ -613,7 +613,7 @@ class Loader
if ($type) {
$name = preg_replace_callback('/_([a-zA-Z])/', function ($match) {
return strtoupper($match[1]);
}, $name);
}, $name ?? '');
return $ucfirst ? ucfirst($name) : lcfirst($name);
}
... ...
... ... @@ -1267,10 +1267,18 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$data = $this->data;
} else {
$data = array_udiff_assoc($this->data, $this->origin, function ($a, $b) {
if (is_numeric($a) && is_numeric($b)) {
if (strcmp($a, $b) !== 0) {
return 1;
}
if ($a == $b) {
return 0;
}
}
if ((empty($a) || empty($b)) && $a !== $b) {
return 1;
}
return is_object($a) || $a != $b ? 1 : 0;
return is_object($a) || $a !== $b ? 1 : 0;
});
}
... ... @@ -1309,10 +1317,10 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
}
/**
* 字段值(延迟)增长
* 字段值(延迟)减少
* @access public
* @param string $field 字段名
* @param integer $step 增长
* @param integer $step 减少
* @param integer $lazyTime 延时时间(s)
* @return integer|true
* @throws Exception
... ... @@ -2268,27 +2276,32 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
}
// JsonSerializable
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
}
// ArrayAccess
#[\ReturnTypeWillChange]
public function offsetSet($name, $value)
{
$this->setAttr($name, $value);
}
#[\ReturnTypeWillChange]
public function offsetExists($name)
{
return $this->__isset($name);
}
#[\ReturnTypeWillChange]
public function offsetUnset($name)
{
$this->__unset($name);
}
#[\ReturnTypeWillChange]
public function offsetGet($name)
{
return $this->getAttr($name);
... ...
... ... @@ -128,7 +128,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
}
$url = $path;
if (!empty($parameters)) {
$url .= '?' . http_build_query($parameters, null, '&');
$url .= '?' . http_build_query($parameters, '', '&');
}
return $url . $this->buildFragment();
}
... ... @@ -304,6 +304,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
* @return Traversable An instance of an object implementing <b>Iterator</b> or
* <b>Traversable</b>
*/
#[\ReturnTypeWillChange]
public function getIterator()
{
return new ArrayIterator($this->items->all());
... ... @@ -314,6 +315,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
* @param mixed $offset
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->items->offsetExists($offset);
... ... @@ -324,6 +326,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
* @param mixed $offset
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->items->offsetGet($offset);
... ... @@ -334,6 +337,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
* @param mixed $offset
* @param mixed $value
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
$this->items->offsetSet($offset, $value);
... ... @@ -345,6 +349,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
* @return void
* @since 5.0.0
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->items->offsetUnset($offset);
... ... @@ -353,6 +358,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
/**
* Count elements of an object
*/
#[\ReturnTypeWillChange]
public function count()
{
return $this->items->count();
... ... @@ -388,6 +394,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
/**
* Specify data which should be serialized to JSON
*/
#[\ReturnTypeWillChange]
public function jsonSerialize()
{
return $this->toArray();
... ...
... ... @@ -1091,7 +1091,7 @@ class Request
foreach ($filters as $filter) {
if (is_callable($filter)) {
// 调用函数或者方法过滤
$value = call_user_func($filter, $value);
$value = call_user_func($filter, $value ?? '');
} elseif (is_scalar($value)) {
if (false !== strpos($filter, '/')) {
// 正则过滤
... ...
... ... @@ -925,11 +925,11 @@ class Template
$args[1] = str_replace('###', $name, $args[1]);
$name = "$fun($args[1])";
} else {
$name = "$fun($name,$args[1])";
$name = "$fun($name ?? '',$args[1])";
}
} else {
if (!empty($args[0])) {
$name = "$fun($name)";
$name = "$fun($name ?? '')";
}
}
}
... ...
... ... @@ -931,10 +931,10 @@ class Validate
if (is_string($rule) && strpos($rule, ',')) {
list($rule, $param) = explode(',', $rule);
} elseif (is_array($rule)) {
$param = isset($rule[1]) ? $rule[1] : null;
$param = $rule[1] ?? 0;
$rule = $rule[0];
} else {
$param = null;
$param = 0;
}
return false !== filter_var($value, is_int($rule) ? $rule : filter_id($rule), $param);
}
... ...
... ... @@ -299,7 +299,7 @@ class Ask
$width = max(array_map('strlen', array_keys($this->question->getChoices())));
foreach ($this->question->getChoices() as $key => $value) {
$this->output->writeln(sprintf(" [<comment>%-${width}s</comment>] %s", $key, $value));
$this->output->writeln(sprintf(" [<comment>%-{$width}s</comment>] %s", $key, $value));
}
}
... ...
... ... @@ -219,7 +219,7 @@ class Descriptor
$width = $this->getColumnWidth($description->getCommands());
foreach ($description->getCommands() as $command) {
$this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options);
$this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options);
$this->writeText("\n");
}
} else {
... ...