!5 v2.5.2bug 修复

Merge pull request !5 from 聆听/develop
This commit is contained in:
聆听 2018-11-10 12:04:34 +08:00
commit cfb9c638f3
22 changed files with 203 additions and 66 deletions

File diff suppressed because one or more lines are too long

View File

@ -146,7 +146,7 @@ class StoreProduct extends AuthController
Form::input('keyword','产品关键字')->placeholder('多个用英文状态下的逗号隔开'),
Form::input('unit_name','产品单位','件'),
Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')))->icon('image')->width('100%')->height('550px'),
Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image','big'=>1)))->maxLength(5)->icon('images')->width('100%')->height('550px')->spin(0),
Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image')))->maxLength(5)->icon('images')->width('100%')->height('550px')->spin(0),
Form::number('price','产品售价')->min(0)->col(8),
Form::number('ot_price','产品市场价')->min(0)->col(8),
Form::number('give_integral','赠送积分')->min(0)->precision(0)->col(8),
@ -279,7 +279,7 @@ class StoreProduct extends AuthController
Form::input('keyword','产品关键字',$product->getData('keyword'))->placeholder('多个用英文状态下的逗号隔开'),
Form::input('unit_name','产品单位',$product->getData('unit_name')),
Form::frameImageOne('image','产品主图片(305*305px)',Url::build('admin/widget.images/index',array('fodder'=>'image')),$product->getData('image'))->icon('image')->width('100%')->height('550px'),
Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image')),json_decode($product->getData('slider_image'),1))->maxLength(5)->icon('images'),
Form::frameImages('slider_image','产品轮播图(640*640px)',Url::build('admin/widget.images/index',array('fodder'=>'slider_image')),json_decode($product->getData('slider_image'),1))->maxLength(5)->icon('images')->width('100%')->height('550px'),
Form::number('price','产品售价',$product->getData('price'))->min(0)->precision(2)->col(8),
Form::number('ot_price','产品市场价',$product->getData('ot_price'))->min(0)->col(8),
Form::number('give_integral','赠送积分',$product->getData('give_integral'))->min(0)->precision(0)->col(8),

View File

@ -1,7 +1,6 @@
<?php
namespace app\admin\controller\widget;
use function Sodium\add;
use think\Request;
use think\Url;
use app\admin\model\system\SystemAttachment as SystemAttachmentModel;
@ -20,22 +19,15 @@ use service\FormBuilder as Form;
*/
class Images extends AuthController
{
const dir = [
0=>['tid'=>0,'name'=>'编辑器','path'=>'editor']
,1=>['tid'=>1,'name'=>'产品图片','path'=>'store/product']
,2=>['tid'=>2,'name'=>'拼团图片','path'=>'store/combination']
,3=>['tid'=>3,'name'=>'砍价图片','path'=>'store/bargain']
,4=>['tid'=>4,'name'=>'秒杀图片','path'=>'store/seckill']
,5=>['tid'=>5,'name'=>'文章图片','path'=>'wechat/image']
,6=>['tid'=>6,'name'=>'组合数据图','path'=>'common']
];
/**
* 附件列表
* @return \think\response\Json
*/
public function index()
{
$pid = input('pid')!=''?input('pid'):0;
$pid = input('pid') != NULL ?input('pid'):session('pid');
if($pid != NULL)session('pid',$pid);
if(!empty(session('pid')))$pid = session('pid');
$this->assign('pid',$pid);
//分类标题
$typearray = Category::getAll();
@ -46,17 +38,21 @@ class Images extends AuthController
return $this->fetch('widget/images');
}
/**
* 编辑器上传图片
* 图片管理上传图片
* @return \think\response\Json
*/
public function upload()
{
$pid = input('pid')!=''?input('pid'):0;
$pid = input('pid')!= NULL ?input('pid'):session('pid');
$res = Upload::image('file',$pid.'/'.date('Ymd'));
$res = Upload::image('file','attach'.DS.date('Y').DS.date('m').DS.date('d'));
$thumbPath = Upload::thumb($res->dir);
//产品图片上传记录
$fileInfo = $res->fileInfo->getinfo();
//入口是public需要替换图片路径
if(strpos(PUBILC_PATH,'public') == false){
$res->dir = str_replace('public/','',$res->dir);
}
SystemAttachmentModel::attachmentAdd($res->fileInfo->getSaveName(),$fileInfo['size'],$fileInfo['type'],$res->dir,$thumbPath,$pid);
$info = array(
// "originalName" => $fileInfo['name'],
@ -92,19 +88,13 @@ class Images extends AuthController
public function deleteimganddata($att_id){
$attinfo = SystemAttachmentModel::get($att_id)->toArray();
if($attinfo){
if(strpos($attinfo['att_dir'],'public') !== false){
@unlink(ROOT_PATH.ltrim($attinfo['att_dir'],'/'));
@unlink(ROOT_PATH.ltrim($attinfo['satt_dir'],'/'));
}else{
@unlink(ROOT_PATH.ltrim('public'.$attinfo['att_dir'],'/'));
@unlink(ROOT_PATH.ltrim('public'.$attinfo['satt_dir'],'/'));
}
@unlink(ROOT_PATH.ltrim($attinfo['att_dir'],'.'));
@unlink(ROOT_PATH.ltrim($attinfo['satt_dir'],'.'));
SystemAttachmentModel::where(['att_id'=>$att_id])->delete();
}
}
/**
* 移动图片分类
* 移动图片分类显示
*/
public function moveimg($imgaes){
@ -123,7 +113,7 @@ class Images extends AuthController
return $this->fetch('public/form-builder');
}
/**移动图片
/**移动图片分类操作
* @param Request $request
* @param $id
*/

View File

@ -38,7 +38,7 @@ class SystemAttachment extends ModelBasic
$model = new self;
$where['pid'] = $id;
$model->where($where)->order('att_id desc');
return $model->page($model,$where,'',30);
return $model->page($model,$where,'',24);
}
/**
* 获取单条信息

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -71,7 +71,7 @@
<div class="layui-btn-container">
{switch name='type'}
{case value="1"}
<button class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:760,w:900})">添加产品</button>
<button class="layui-btn layui-btn-sm" onclick="$eb.createModalFrame(this.innerText,'{:Url('create')}',{h:760,w:1100})">添加产品</button>
{/case}
{case value="2"}
<button class="layui-btn layui-btn-sm" data-type="show">批量上架</button>
@ -110,7 +110,7 @@
<button type="button" class="layui-btn layui-btn-xs btn-success" onclick="$eb.createModalFrame('{{d.store_name}}-属性','{:Url('attr')}?id={{d.id}}',{h:700,w:800})">
属性
</button>
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('{{d.store_name}}-编辑','{:Url('edit')}?id={{d.id}}')">
<button type="button" class="layui-btn layui-btn-xs layui-btn-normal" onclick="$eb.createModalFrame('{{d.store_name}}-编辑','{:Url('edit')}?id={{d.id}}',{h:760,w:1100})">
编辑
</button>
<button type="button" class="layui-btn layui-btn-xs" onclick="dropdown(this)">操作 <span class="caret"></span></button>

View File

@ -24,17 +24,17 @@
border-radius: 1px;
background: #e5e5e5;
}
.main .left .nav{margin:0;}
.main .left .nav li{padding: 4px;}
.main .left .nav{margin:0;padding-bottom: 100px;}
.main .left .nav li{padding: 4px;height: 22px;}
.main .left .nav li.active{background-color: #293846;border-left: 2px solid #19AA8D;}
.main .left .nav li.active a{color: #a7b1c2;}
.main .left .nav li.child{padding: 2px;padding-left: 7px;}
.main .right{width: calc(100% - 117px);float: right;}
.main .right .right-top{position: fixed;background-color: #fff; z-index: 1000;width: 100%;padding: 7px 10px 0;height: 38px;border-bottom: 1px solid #e5e5e5;border-top: 1px solid #e5e5e5;}
.main .right .imagesbox{position: fixed;top:58px;min-height: 200px;height: calc(100% - 88px);;overflow-y: auto;}
.main .right .imagesbox .image-item{position: relative;display: inline-block; width: 15%; border: 1px solid #e5e5e5; cursor: default; margin: 10px 0 0 1%;padding: 0.5%;}
.main .right .imagesbox .image-item img{width: 100%;}
.main .right .imagesbox .on{background:#f8ac59;}
.main .right .imagesbox .image-item{position: relative;display: inline-block; width: 112px;height: 112px; border: 1px solid #ECECEC;background-color: #F7F6F6; cursor: default; margin: 10px 0 0 10px;padding: 5px;}
.main .right .imagesbox .image-item img{width: 112px;height: 112px;}
.main .right .imagesbox .on{border: 3px dashed #0092DC;padding: 3px;}
.main .right .foot-tool{position: fixed;bottom: 0px;width: calc(100% - 117px);background-color:#fff;height: 30px;padding: 7px 10px 0;border-top: 1px solid #e5e5e5;}
.main .right .foot-tool .page{padding: 0px 10px;float: right;}
.main .right .foot-tool .page ul{width: 100%}
@ -62,7 +62,9 @@
<li ><a href="{:Url('index',array('pid'=>$vo.id,'fodder'=>$Request.param.fodder,'big'=>$Request.param.big))}">{$vo.name}</a></li>
{/if}
{volist name="$vo.child" id="voo" key="kk"}
<li class="child {if condition="$voo.id eq $pid"} active{/if}"><a href="{:Url('index',array('pid'=>$voo.id,'fodder'=>$Request.param.fodder,'big'=>$Request.param.big))}">-{$voo.name}</a></li>
<li class="child {if condition="$voo.id eq $pid"} active{/if}">
<a href="{:Url('index',array('pid'=>$voo.id,'fodder'=>$Request.param.fodder,'big'=>$Request.param.big))}">{if condition="$kk eq count($vo.child)"}{else/}{/if}{$voo.name}</a>
</li>
{/volist}
{/volist}
</ul>

View File

@ -24,7 +24,7 @@ function sensitive_words_filter($str)
$words = file($file);
foreach($words as $word)
{
$word = str_replace(array("\r\n","\r","\n"," "), '', $word);
$word = str_replace(array("\r\n","\r","\n","/","<",">","="," "), '', $word);
if (!$word) continue;
$ret = preg_match("/$word/", $str, $match);

View File

@ -69,7 +69,7 @@ function createPoster($product = array()){
'text'=>substr(iconv_substr($product['store_name'],0,mb_strlen($product['store_name']),'utf-8'),0,24).'...',
'left'=>50,
'top'=>500,
'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf', //字体文件
'fontPath'=>ROOT_PATH.'public/static/font/simsunb.ttf', //字体文件
'fontSize'=>16, //字号
'fontColor'=>'40,40,40', //字体颜色
'angle'=>0,
@ -78,7 +78,7 @@ function createPoster($product = array()){
'text'=>'¥'.$product['price'],
'left'=>50,
'top'=>580,
'fontPath'=>ROOT_PATH.'public/uploads/poster/simsunb.ttf', //字体文件
'fontPath'=>ROOT_PATH.'public/static/font/simsunb.ttf', //字体文件
'fontSize'=>16, //字号
'fontColor'=>'40,40,40', //字体颜色
'angle'=>0,
@ -108,7 +108,7 @@ function createPoster($product = array()){
'opacity'=>100,
),
),
'background'=>ROOT_PATH.'public/uploads/poster/background.jpg' //背景图
'background'=>ROOT_PATH.UPLOAD_PATH.'/poster/background.jpg' //背景图
);
$imageDefault = array(
'left'=>0,

View File

@ -77,8 +77,9 @@ class AuthApi extends AuthController{
* 获取退款理由
*/
public function get_refund_reason(){
$reason = SystemConfig::getValue('refund_reason')?:[];//退款理由
$reason = explode('=',$reason);
$reason = SystemConfig::getValue('stor_reason')?:[];//退款理由
$reason = str_replace("\r\n","\n",$reason);//防止不兼容
$reason = explode("\n",$reason);
return JsonService::successful($reason);
}
@ -861,6 +862,7 @@ class AuthApi extends AuthController{
}
}
/**
* 申请退款
* @param string $uni
@ -1430,19 +1432,18 @@ class AuthApi extends AuthController{
public function get_code(){
header('content-type:image/jpg');
if(!$this->userInfo['uid']) return JsonService::fail('授权失败,请重新授权');
$path = 'public/uploads/routine/'.$this->userInfo['uid'].'.jpg';
$path = makePathToUrl('routine/code');
if($path == '')
return JsonService::fail('生成上传目录失败,请检查权限!');
$picname = $path.DS.$this->userInfo['uid'].'.jpg';
$domain = SystemConfigService::get('site_url').'/';
$domainTop = substr($domain,0,5);
if($domainTop != 'https') $domain = 'https:'.substr($domain,5,strlen($domain));
if(file_exists($path)) return JsonService::successful($domain.$path);
if(file_exists($picname)) return JsonService::successful($domain.$picname);
else{
if(!file_exists('public/uploads/routine')){
$dir = iconv("UTF-8", "GBK", "public/uploads/routine");
mkdir ($dir,0775,true);
}
file_put_contents($path,RoutineCode::getCode($this->userInfo['uid']));
file_put_contents($picname,RoutineCode::getCode($this->userInfo['uid']));
}
return JsonService::successful($domain.$path);
return JsonService::successful($domain.$picname);
}
/**
@ -1952,11 +1953,12 @@ class AuthApi extends AuthController{
if(!$id) return JsonService::fail('参数错误');
$productInfo = StoreProduct::getValidProduct($id,'store_name,id,price,image,code_path');
if(empty($productInfo)) return JsonService::fail('参数错误');
if($productInfo['code_path'] == '') {
$codePath = 'public/uploads/codepath/product/'.$productInfo['id'].'.jpg';
if(strlen($productInfo['code_path'])< 10) {
$path = 'public'.DS.'uploads'.DS.'codepath'.DS.'product';
$codePath = $path.DS.$productInfo['id'].'.jpg';
if(!file_exists($codePath)){
$dir = iconv("UTF-8", "GBK", "public/uploads/codepath/product");
mkdir($dir,0775,true);
if(!is_dir($path))
mkdir($path,0777,true);
file_put_contents($codePath,RoutineCode::getPages('pages/product-con/index?id='.$productInfo['id']));
}
$res = StoreProduct::edit(['code_path'=>$codePath],$id);
@ -1965,6 +1967,25 @@ class AuthApi extends AuthController{
}
$posterPath = createPoster($productInfo);
return JsonService::successful($posterPath);
// if(!$id) return JsonService::fail('参数错误');
// $productInfo = StoreProduct::getValidProduct($id,'store_name,id,price,image,code_path');
// if(empty($productInfo)) return JsonService::fail('参数错误');
// if($productInfo['code_path'] == '') {
// $path = 'public'.DS.'uploads'.DS.'codepath'.DS.'product';
// $codePath = $path.DS.$productInfo['id'].'.jpg';
// if(!file_exists($codePath)){
// //$dir = iconv("UTF-8", "GBK", "public".DS."uploads".DS."codepath".DS."product");
// if(!is_dir($path))
// mkdir($path,0777,true);
// file_put_contents($codePath,RoutineCode::getPages('pages/product-con/index?id='.$productInfo['id']));
// }
// $res = StoreProduct::edit(['code_path'=>$codePath],$id);
// if($res) $productInfo['code_path'] = $codePath;
// else return JsonService::fail('没有查看权限');
// }
// $posterPath = createPoster($productInfo);
// return JsonService::successful($posterPath);
}

View File

@ -4,6 +4,7 @@ use behavior\wechat\PaymentBehavior;
use service\HookService;
use service\RoutineNotify;
/**
* 小程序支付回调
* Class Routine

View File

@ -1,2 +1,2 @@
version=v2.5.9
version=v2.5.2
version_code=129

View File

@ -15,6 +15,7 @@
<div class="page-index" id="app-index">
<section ref="bsDom">
<div>
<!--<div class="search-wrapper">
<form method="post" @submit.prevent="goSearch">
<div class="search-box flex"><input type="text" v-model="keyword" placeholder="商品搜索: 请输入商品关键词"> <a

View File

@ -113,6 +113,11 @@ class PaymentBehavior
WechatService::payOrderRefund($orderNo,$opt);
}
/**
* 小程序支付订单退款
* @param $orderNo
* @param array $opt
*/
public static function routinePayOrderRefund($orderNo, array $opt)
{
$refundDesc = isset($opt['desc']) ? $opt['desc'] : '';

View File

@ -22,6 +22,7 @@ class RoutineRefund
* @param string $refundDesc 退款原因
* @return string
*/
public static function doRefund($totalFee, $refundFee, $refundNo, $wxOrderNo='',$orderNo='',$refundDesc = '')
{
$config = array(
@ -94,11 +95,11 @@ class RoutineRefund
//默认格式为PEM可以注释
curl_setopt($ch,CURLOPT_SSLCERTTYPE,'PEM');
// curl_setopt($ch,CURLOPT_SSLCERT,getcwd().'/cert/apiclient_cert.pem');
curl_setopt($ch,CURLOPT_SSLCERT,realpath('.'.self::options()['pay_routine_client_cert'][0]));
curl_setopt($ch,CURLOPT_SSLCERT,realpath('.'.self::options()['pay_routine_client_cert']));
//默认格式为PEM可以注释
curl_setopt($ch,CURLOPT_SSLKEYTYPE,'PEM');
// curl_setopt($ch,CURLOPT_SSLKEY,getcwd().'/cert/apiclient_key.pem');
curl_setopt($ch,CURLOPT_SSLKEY,realpath('.'.self::options()['pay_routine_client_key'][0]));
curl_setopt($ch,CURLOPT_SSLKEY,realpath('.'.self::options()['pay_routine_client_key']));
//第二种方式,两个文件合成一个.pem文件
// curl_setopt($ch,CURLOPT_SSLCERT,getcwd().'/all.pem');
$data = curl_exec($ch);

View File

@ -2,6 +2,7 @@
namespace service;
use think\Url;
/**
* 小程序支付
* Created by PhpStorm.

Binary file not shown.

View File

@ -40,8 +40,8 @@ layui.use(['layer','upload'], function() {
var images = Array.from(self.document.getElementsByTagName('img'));
images.forEach(function (image) {
if(Array.from(image.parentNode.classList).indexOf('on') !== -1 && value.indexOf(image.src) == -1){
// list.push(image.src);
list.push(image.getAttribute("src"));
list.push(image.src);
// list.push(image.getAttribute("src"));
}
});
parent.$f.changeField(parentinputname,list);
@ -51,8 +51,8 @@ layui.use(['layer','upload'], function() {
var images = Array.from(self.document.getElementsByTagName('img'));
images.forEach(function (image) {
if(Array.from(image.parentNode.classList).indexOf('on') !== -1 ){
// parent.changeIMG(parentinputname,image.src);
parent.changeIMG(parentinputname,image.getAttribute("src"));
parent.changeIMG(parentinputname,image.src);
// parent.changeIMG(parentinputname,image.getAttribute("src"));
}
});
var index = parent.layer.getFrameIndex(window.name);

113
update.sql Normal file
View File

@ -0,0 +1,113 @@
-- 表注释
alter table eb_store_coupon_issue comment '优惠券前台领取表';
alter table eb_store_coupon_issue_user comment '优惠券前台用户领取记录表';
alter table eb_store_pink comment '拼团表';
alter table eb_user_notice_see comment '用户通知发送记录表';
alter table eb_user_extract comment '用户提现表';
alter table eb_user_group comment '用户分组表';
alter table eb_user_recharge comment '用户充值表';
alter table eb_user_notice comment '用户通知表';
alter table eb_store_visit comment '产品浏览分析表';
-- --产品浏览分析表表 字段
alter table eb_store_visit modify column product_id int(11) comment '产品ID';
alter table eb_store_visit modify column cate_id int(11) comment '产品分类ID';
alter table eb_store_visit modify column type char(50) comment '产品类型';
alter table eb_store_visit modify column uid int(11) comment '用户ID';
alter table eb_store_visit modify column count int(11) comment '访问次数';
alter table eb_store_visit modify column content varchar(255) comment '备注描述';
alter table eb_store_visit modify column add_time int(11) comment '添加时间';
--
-- 字段注释
-- 缓存表 字段
-- alter table eb_cache modify column key varchar(32) comment '缓存key唯一值';
alter table eb_cache modify column result text comment '缓存数据';
alter table eb_cache modify column add_time int(10) comment '缓存时间';
-- --优惠券前台领取表 字段
alter table eb_store_coupon_issue modify column cid int(10) comment '优惠券ID';
alter table eb_store_coupon_issue modify column start_time int(10) comment '优惠券领取开启时间';
alter table eb_store_coupon_issue modify column end_time int(10) comment '优惠券领取结束时间';
alter table eb_store_coupon_issue modify column total_count int(10) comment '优惠券领取数量';
alter table eb_store_coupon_issue modify column remain_count int(10) comment '优惠券剩余领取数量';
alter table eb_store_coupon_issue modify column add_time int(10) comment '优惠券添加时间';
-- 优惠券前台用户领取记录表 字段
alter table eb_store_coupon_issue_user modify column uid int(10) comment '领取优惠券用户ID';
alter table eb_store_coupon_issue_user modify column issue_coupon_id int(10) comment '优惠券前台领取ID';
alter table eb_store_coupon_issue_user modify column add_time int(10) comment '领取时间';
-- --用户分组表 字段
alter table eb_user_group modify column group_name varchar(64) comment '用户分组名称';
-- --用户充值表 字段
alter table eb_user_recharge modify column uid int(10) comment '充值用户UID';
alter table eb_user_recharge modify column order_id varchar(32) comment '订单号';
alter table eb_user_recharge modify column price decimal(8,2) comment '充值金额';
alter table eb_user_recharge modify column recharge_type varchar(32) comment '充值类型';
alter table eb_user_recharge modify column paid tinyint(1) comment '是否充值';
alter table eb_user_recharge modify column pay_time int(10) comment '充值支付时间';
alter table eb_user_recharge modify column add_time int(12) comment '充值时间';
-- --添加配置类型
ALTER TABLE `eb_system_config_tab` ADD `type` INT(2) NULL DEFAULT '0' COMMENT '配置类型' AFTER `icon`;
-- --添加小程序openid
ALTER TABLE `eb_wechat_user` ADD `routine_openid` varchar(32) NULL DEFAULT '' COMMENT '小程序唯一身份ID' AFTER `openid`;
-- --添加微信openid 允许为空
ALTER TABLE `eb_wechat_user` CHANGE `openid` `openid` VARCHAR(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '用户的标识,对当前公众号唯一';
-- --添加附件记录表 允许为空
DROP TABLE IF EXISTS `eb_system_attachment`;
CREATE TABLE `eb_system_attachment` (
`att_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL COMMENT '附件名称',
`att_dir` varchar(200) NOT NULL COMMENT '附件路径',
`satt_dir` varchar(200) NOT NULL COMMENT '附件压缩路径',
`att_size` char(30) NOT NULL COMMENT '附件大小',
`att_type` char(30) NOT NULL COMMENT '附件类型',
`pid` int(10) NOT NULL COMMENT '分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图',
`time` int(11) NOT NULL COMMENT '上传时间',
PRIMARY KEY (`att_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='附件管理表';
SET FOREIGN_KEY_CHECKS = 1;
-- --修改文章表名称
ALTER TABLE eb_wechat_news RENAME TO eb_article
-- --修改文章内容表名称
ALTER TABLE eb_wechat_news_content RENAME TO eb_article_content
-- 文章表 添加 is_hot字段和is_banner字段
alter table eb_article modify column is_hot tinyint(1) comment '是否热门(小程序)';
alter table eb_article modify column is_banner tinyint(1) comment '是否轮播图(小程序)';
-- 砍价产品表 添加 is_hot字段和is_banner字段
alter table eb_store_bargain modify column look int(11) comment '砍价产品浏览量';
alter table eb_store_bargain modify column share int(11) comment '砍价成品分享次数';
-- --添加小程序模板消息表 允许为空
DROP TABLE IF EXISTS `eb_routine_template`;
CREATE TABLE `eb_routine_template` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tempkey` char(50) NOT NULL COMMENT '模板编号',
`name` char(100) NOT NULL COMMENT '模板名',
`content` varchar(1000) NOT NULL COMMENT '回复内容',
`tempid` char(100) NOT NULL COMMENT '模板ID',
`add_time` varchar(15) NOT NULL COMMENT '添加时间',
`status` tinyint(4) NOT NULL COMMENT '模板状态',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='小程序模板消息表';
SET FOREIGN_KEY_CHECKS = 1;
-- --修改优惠劵领取为负数,还可以领
ALTER TABLE `eb_store_coupon_issue` ADD `is_permanent` TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否无限张数' AFTER `remain_count`;
-- 订单表 添加 is_channel字段
alter table eb_store_order modify column is_channel tinyint(1) comment '支付渠道(0微信公众号1微信小程序)';
-- 客服通知
ALTER TABLE `eb_store_service` ADD `notify` INT(2) NULL DEFAULT '0' COMMENT '订单通知1开启0关闭' AFTER `status`;
--v2.5.2
alter table eb_store_product modify column code_path varchar(64) comment '产品二维码地址(用户小程序海报)';
--v2.5.2 eb_system_group表
UPDATE eb_system_group SET fields='[{"name":"\u5206\u7c7b\u540d\u79f0","title":"name","type":"input","param":""},{"name":"\u5206\u7c7b\u56fe\u6807","title":"pic","type":"upload","param":""},{"name":"\u8df3\u8f6c\u8def\u5f84","title":"url","type":"select","param":"\/pages\/index\/index=\u5546\u57ce\u9996\u9875\n\/pages\/spread\/spread=\u4e2a\u4eba\u63a8\u5e7f\n\/pages\/coupon\/coupon=\u4f18\u60e0\u5238\n\/pages\/user\/user=\u4e2a\u4eba\u4e2d\u5fc3\n\/pages\/miao-list\/miao-list=\u79d2\u6740\u5217\u8868\n\/pages\/pink-list\/index=\u62fc\u56e2\u5217\u8868\u9875\n\/pages\/cut-list\/cut-list=\u780d\u4ef7\u5217\u8868\n\/pages\/productSort\/productSort=\u5206\u7c7b\u9875\u9762\n\/pages\/address\/address=\u5730\u5740\u5217\u8868\n\/pages\/cash\/cash=\u63d0\u73b0\u9875\u9762\n\/pages\/extension\/extension=\u63a8\u5e7f\u7edf\u8ba1\n\/pages\/main\/main=\u8d26\u6237\u91d1\u989d\n\/pages\/collect\/collect=\u6211\u7684\u6536\u85cf\n\/pages\/promotion-card\/promotion-card=\u63a8\u5e7f\u4e8c\u7ef4\u7801\u9875\u9762\n\/pages\/buycar\/buycar=\u8d2d\u7269\u8f66\u9875\u9762\n\/pages\/news-list\/news-list=\u6d88\u606f\u5217\u8868\u9875\n\/pages\/orders-list\/orders-list=\u8ba2\u5355\u5217\u8868\u9875\u9762\n\/pages\/new-list\/new-list=\u6587\u7ae0\u5217\u8868\u9875"},{"name":"\u5e95\u90e8\u83dc\u5355","title":"show","type":"radio","param":"\u662f=\u662f\n\u5426=\u5426"}]' where id = 47;
--v2.5.2 --
TRUNCATE table eb_store_pink

View File

@ -158,7 +158,7 @@ Page({
hiddendown: true
})
}
var SoerErId = 0;
var SoerErId = 0;
if ($taber >= 0) {
for (var indexSoerEr in that.data.sorter){
if (that.data.sorter[indexSoerEr].id == $taber){
@ -167,6 +167,7 @@ Page({
})
SoerErId = that.data.sorter[indexSoerEr].id;
}
//console.log(that.data.sorter[indexSoerEr].id);
}
}else that.setData({total: '全部'})
that.setData({sid: SoerErId})
@ -191,6 +192,7 @@ Page({
}
}
that.setData({ hiddendown: true })
that.setData({ sid: 0 })
that.getProductList();
},
getCartCount: function () {
@ -235,7 +237,7 @@ Page({
var n=t+1;
if (n%2>0) priceOrder ='asc';
else priceOrder='desc';
var sid = that.data.sid;
var sid = that.data.sid;
that.setData({ price: priceOrder, t: n, })
that.getProductList();
},