修改公众号引用类

This commit is contained in:
liaofei 2019-05-16 14:29:15 +08:00
parent 28fb7d2018
commit 137962ccf2
23 changed files with 208 additions and 79 deletions

View File

@ -4,7 +4,6 @@ namespace app\wap\controller;
use app\admin\model\article\Article as ArticleModel;
use app\wap\model\wap\ArticleCategory;
use basic\WapBasic;
use think\Db;
/**
@ -37,8 +36,7 @@ class Article extends WapBasic {
public function visit($id = '')
{
$content = ArticleModel::where('status',1)->where('hide',0)->where('id',$id)->order('id desc')->find();
$content = ArticleModel::where('status',1)->where('hide',0)->where('id',$id)->find();
if(!$content || !$content["status"]) return $this->failed('此文章已经不存在!');
$content["content"] = Db::name('articleContent')->where('nid',$content["id"])->value('content');
//增加浏览次数

View File

@ -35,13 +35,12 @@ use app\wap\model\user\UserNotice;
use app\wap\model\user\UserSign;
use app\wap\model\user\WechatUser;
use behavior\wap\StoreProductBehavior;
use service\WechatTemplateService;
use app\core\util\WechatTemplateService;
use service\CacheService;
use service\HookService;
use service\JsonService;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use service\UtilService;
use service\WechatService;
use think\Cache;
use think\Request;
use think\Url;
@ -312,7 +311,7 @@ class AuthApi extends AuthController
$order = StoreOrder::searchUserOrder($this->userInfo['uid'],$search)?:[];
$list = $order == false ? [] : [$order];
}else{
if($type == 'first') $type = '';
if(!is_numeric($type)) $type = '';
$list = StoreOrder::getUserOrderList($this->userInfo['uid'],$type,$first,$limit);
}
foreach ($list as $k=>$order){
@ -484,10 +483,17 @@ class AuthApi extends AuthController
public function get_product_list($keyword = '', $cId = 0,$sId = 0,$priceOrder = '', $salesOrder = '', $news = 0, $first = 0, $limit = 8)
{
if(!empty($keyword)) $keyword = base64_decode(htmlspecialchars($keyword));
if(!empty($keyword)){
$encodedData = str_replace(' ','+',$keyword);
$keyword = base64_decode(htmlspecialchars($encodedData));
}
$model = StoreProduct::validWhere();
if($cId && $sId){
$model->where('cate_id',$sId);
$product_ids=\think\Db::name('store_product_cate')->where('cate_id',$sId)->column('product_id');
if(count($product_ids))
$model=$model->where('id',"in",$product_ids);
else
$model=$model->where('cate_id',-1);
}elseif($cId){
$sids = StoreCategory::pidBySidList($cId)?:[];
$sids[] = $cId;

View File

@ -11,7 +11,6 @@ namespace app\wap\controller;
use app\wap\model\store\StoreOrder;
use app\wap\model\user\User;
use app\wap\model\user\WechatUser;
use basic\WapBasic;
use service\UtilService;
use think\Cookie;
use think\Session;

View File

@ -17,10 +17,9 @@ use app\wap\model\user\User;
use app\wap\model\user\UserNotice;
use app\wap\model\user\WechatUser;
use basic\WapBasic;
use service\GroupDataService;
use service\QrcodeService;
use service\SystemConfigService;
use service\WechatService;
use app\core\util\GroupDataService;
use app\core\util\QrcodeService;
use app\core\util\SystemConfigService;
use think\Db;
use think\Url;

View File

@ -10,9 +10,7 @@ namespace app\wap\controller;
use app\wap\model\user\User;
use app\wap\model\user\WechatUser;
use basic\WapBasic;
use service\UtilService;
use service\WechatService;
use think\Cookie;
use think\Request;
use think\Session;
@ -23,7 +21,7 @@ class Login extends WapBasic
public function index($ref = '')
{
Cookie::set('is_bg',1);
$ref && $ref=htmlspecialchars(base64_decode($ref));
$ref && $ref=htmlspecialchars_decode(base64_decode($ref));
if(UtilService::isWechatBrowser()){
$this->_logout();
$openid = $this->oauth();

View File

@ -24,11 +24,11 @@ use app\wap\model\user\User;
use app\wap\model\user\UserBill;
use app\wap\model\user\UserExtract;
use app\wap\model\user\UserNotice;
use service\GroupDataService;
use app\core\util\GroupDataService;
use app\wap\model\user\UserAddress;
use app\wap\model\user\UserSign;
use service\CacheService;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use think\Request;
use think\Url;

View File

@ -15,6 +15,7 @@ use app\wap\model\store\StoreCategory;
use app\wap\model\store\StoreCouponIssue;
use app\wap\model\store\StoreProduct;
use app\wap\model\wap\ArticleCategory;
use service\FileService;
use service\JsonService;
use service\UtilService;
use think\Cache;
@ -68,6 +69,30 @@ class PublicApi
return JsonService::successful($result);
}
/** 首页获取推荐产品
* @param int $first
* @param int $limit
*/
public function get_product_list($first = 0,$limit = 8)
{
$StoreProductmodel = StoreProduct::validWhere();
if(input('type')=='is_best')
$StoreProductmodel = $StoreProductmodel->where('is_best',1);
if(input('type')=='is_hot')
$StoreProductmodel = $StoreProductmodel->where('is_hot',1);
if(input('type')=='is_benefit')
$StoreProductmodel = $StoreProductmodel->where('is_benefit',1);
if(input('type')=='is_new')
$StoreProductmodel = $StoreProductmodel->where('is_new',1);
if(input('type')=='is_postage')
$StoreProductmodel = $StoreProductmodel->where('is_postage',1);
$list = $StoreProductmodel->where('mer_id',0)->order('is_best DESC,sort DESC,add_time DESC')
->limit($first,$limit)->field('id,image,store_name,sales,price,unit_name')->select()->toArray();
return JsonService::successful($list);
}
public function get_best_product_list($first = 0,$limit = 8)
{
$list = StoreProduct::validWhere()->where('mer_id',0)->order('is_best DESC,sort DESC,add_time DESC')
@ -79,8 +104,9 @@ class PublicApi
{
if(!$mediaIds) return JsonService::fail('参数错误');
$mediaIds = explode(',',$mediaIds);
$temporary = \service\WechatService::materialTemporaryService();
$temporary = \app\core\util\WechatService::materialTemporaryService();
$pathList = [];
$dir='public'.DS.'uploads'.DS.'wechat'.DS.'media';
foreach ($mediaIds as $mediaId){
if(!$mediaId) continue;
try{
@ -89,7 +115,10 @@ class PublicApi
continue;
}
$name = substr(md5($mediaId),12,20).'.jpg';
$path = '.'.DS.'public'.DS.'uploads'.DS.'wechat'.DS.'media'.DS.$name;
$path = '.'.DS.$dir.DS.$name;
$file=new FileService();
$res=$file->create_dir($dir);
if(!$res) return JsonService::fail('生成文件保存目录失败!请检查权限!');
$res = file_put_contents($path,$content);
if($res) $pathList[] = UtilService::pathToUrl($path);
}

View File

@ -8,7 +8,6 @@
namespace app\wap\controller;
use app\wap\model\store\StoreService;
use service\SystemConfigService;
use app\wap\model\user\User;
use app\admin\model\system\Merchant;
use think\Request;

View File

@ -28,8 +28,8 @@ use app\wap\model\store\StoreProductRelation;
use app\wap\model\user\User;
use app\wap\model\user\WechatUser;
use app\wap\model\store\StoreCombination;
use service\GroupDataService;
use service\SystemConfigService;
use app\core\util\GroupDataService;
use app\core\util\SystemConfigService;
use service\UtilService;
use think\Cache;
use think\Request;
@ -311,6 +311,7 @@ class Store extends AuthController
'site'=>SystemConfigService::more(['wechat_qrcode','wechat_name','wechat_avatar']),
'isFollow'=>$isFollow
]);
// var_dump(SystemConfigService::more(['wechat_qrcode','wechat_name','wechat_avatar']));die;
return $this->fetch();
}
@ -329,7 +330,7 @@ class Store extends AuthController
//砍价产品
$bargain = StoreBargain::getBargainTerm($id);
$bargain['time'] = time();
$description = htmlspecialchars_decode($bargain['description']);
$description = isset($bargain['description'])?htmlspecialchars_decode($bargain['description']):'';
$rule = isset($bargain['rule']) ? htmlspecialchars_decode($bargain['rule']) : '';
if(!$bargainUid)
//判断当前登录人是不是砍价

View File

@ -2,7 +2,7 @@
namespace app\wap\controller;
use app\admin\model\wechat\WechatReply;
use service\WechatService;
use app\core\util\WechatService;
/**
@ -32,7 +32,7 @@ class Wechat
public function text()
{
dump(WechatService::userGroupService());
//dump(WechatService::userGroupService());
}

View File

@ -21,10 +21,10 @@ use behavior\wap\StoreProductBehavior;
use behavior\wechat\PaymentBehavior;
use service\HookService;
use service\JsonService;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use service\UtilService;
use service\WechatService;
use service\WechatTemplateService;
use app\core\util\WechatService;
use app\core\util\WechatTemplateService;
use think\Cache;
use think\Db;
use think\Request;
@ -58,8 +58,8 @@ class StoreOrder extends ModelBasic
public static function getOrderPriceGroup($cartInfo)
{
$storePostage = floatval(SystemConfigService::get('store_postage'))?:0;//基础邮费
$storeFreePostage = floatval(SystemConfigService::get('store_free_postage'))?:0;//满*包邮
$storePostage = floatval(SystemConfigService::get('store_postage'))?:0;
$storeFreePostage = floatval(SystemConfigService::get('store_free_postage'))?:0;
$totalPrice = self::getOrderTotalPrice($cartInfo);
$costPrice = self::getOrderCostPrice($cartInfo);
if(!$storeFreePostage) {
@ -213,7 +213,7 @@ class StoreOrder extends ModelBasic
$res2 = false !== User::bcDec($userInfo['uid'],'integral',$usedIntegral,'uid');
$payPrice = 0;
}
$res2 = $res2 && false != UserBill::expend('积分抵扣',$uid,'integral','deduction',$usedIntegral,$key,$userInfo['integral'],'购买商品使用'.floatval($usedIntegral).'积分抵扣'.floatval($deductionPrice).'元');
$res2 = $res2 && false != UserBill::expend('积分抵扣',$uid,'integral','deduction',$usedIntegral,$key,bcsub($userInfo['integral'],$usedIntegral,2),'购买商品使用'.floatval($usedIntegral).'积分抵扣'.floatval($deductionPrice).'元');
}else{
$deductionPrice = 0;
$usedIntegral = 0;
@ -319,7 +319,7 @@ class StoreOrder extends ModelBasic
return self::setErrorInfo('余额不足'.floatval($orderInfo['pay_price']));
self::beginTrans();
$res1 = false !== User::bcDec($uid,'now_money',$orderInfo['pay_price'],'uid');
$res2 = UserBill::expend('购买商品',$uid,'now_money','pay_product',$orderInfo['pay_price'],$orderInfo['id'],$userInfo['now_money'],'余额支付'.floatval($orderInfo['pay_price']).'元购买商品');
$res2 = UserBill::expend('购买商品',$uid,'now_money','pay_product',$orderInfo['pay_price'],$orderInfo['id'],bcsub($userInfo['now_money'],$orderInfo['pay_price'],2),'余额支付'.floatval($orderInfo['pay_price']).'元购买商品');
$res3 = self::paySuccess($order_id);
try{
HookService::listen('yue_pay_product',$userInfo,$orderInfo,false,PaymentBehavior::class);
@ -481,7 +481,7 @@ class StoreOrder extends ModelBasic
{
$openid = WechatUser::uidToOpenid($order['uid']);
WechatTemplateService::sendTemplate($openid,WechatTemplateService::ORDER_TAKE_SUCCESS,[
'first'=>'亲,您的订单成功签收,快去评价一下吧',
'first'=>'亲,您的订单成功签收,快去评价一下吧',
'keyword1'=>$order['order_id'],
'keyword2'=>'已收货',
'keyword3'=>date('Y/m/d H:i',time()),
@ -684,7 +684,7 @@ class StoreOrder extends ModelBasic
$noBuy = self::where('uid',$uid)->where('paid',0)->where('is_del',0)->where('pay_type','<>','offline')->where('refund_status',0)->count();
$noPostageNoPink = self::where('o.uid',$uid)->alias('o')->where('o.paid',1)->where('o.pink_id',0)->where('o.is_del',0)->where('o.status',0)->where('o.pay_type','<>','offline')->where('o.refund_status',0)->count();
$noPostageYesPink = self::where('o.uid',$uid)->alias('o')->join('StorePink p','o.pink_id = p.id')->where('p.status',2)->where('o.paid',1)->where('o.is_del',0)->where('o.status',0)->where('o.refund_status',0)->where('o.pay_type','<>','offline')->count();
$noPostage = bcadd($noPostageNoPink,$noPostageYesPink);
$noPostage = bcadd($noPostageNoPink,$noPostageYesPink,0);
$noTake = self::where('uid',$uid)->where('paid',1)->where('is_del',0)->where('status',1)->where('pay_type','<>','offline')->where('refund_status',0)->count();
$noReply = self::where('uid',$uid)->where('paid',1)->where('is_del',0)->where('status',2)->where('refund_status',0)->count();
$noPink = self::where('o.uid',$uid)->alias('o')->join('StorePink p','o.pink_id = p.id')->where('p.status',1)->where('o.paid',1)->where('o.is_del',0)->where('o.status',0)->where('o.pay_type','<>','offline')->where('o.refund_status',0)->count();
@ -697,7 +697,7 @@ class StoreOrder extends ModelBasic
$userInfo = User::getUserInfo($order['uid']);
ModelBasic::beginTrans();
$res1 = false != User::where('uid',$userInfo['uid'])->update(['integral'=>bcadd($userInfo['integral'],$order['gain_integral'],2)]);
$res2 = false != UserBill::income('购买商品赠送积分',$order['uid'],'integral','gain',$order['gain_integral'],$order['id'],$userInfo['integral'],'购买商品赠送'.floatval($order['gain_integral']).'积分');
$res2 = false != UserBill::income('购买商品赠送积分',$order['uid'],'integral','gain',$order['gain_integral'],$order['id'],bcadd($userInfo['integral'],$order['gain_integral'],2),'购买商品赠送'.floatval($order['gain_integral']).'积分');
$res = $res1 && $res2;
ModelBasic::checkTrans($res);
return $res;

View File

@ -9,7 +9,7 @@ namespace app\wap\model\user;
use basic\ModelBasic;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use think\Request;
use think\response\Redirect;
use think\Session;
@ -108,10 +108,13 @@ class User extends ModelBasic
$cost = isset($orderInfo['cost']) ? $orderInfo['cost'] : 0;//成本价
if($cost > $orderInfo['pay_price']) return true;//成本价大于支付价格时直接返回
$brokeragePrice = bcmul(bcsub($orderInfo['pay_price'],$cost,2),$brokerageRatio,2);
//返佣之后余额
$orderInfo['pay_price'] = bcsub($orderInfo['pay_price'],$orderInfo['pay_postage'],2);
$balance = bcsub($userInfo['now_money'],$brokeragePrice,2);
if($brokeragePrice <= 0) return true;
$mark = $userInfo['nickname'].'成功消费'.floatval($orderInfo['pay_price']).'元,奖励推广佣金'.floatval($brokeragePrice);
self::beginTrans();
$res1 = UserBill::income('获得推广佣金',$userInfo['spread_uid'],'now_money','brokerage',$brokeragePrice,$orderInfo['id'],0,$mark);
$res1 = UserBill::income('获得推广佣金',$userInfo['spread_uid'],'now_money','brokerage',$brokeragePrice,$orderInfo['id'],$balance,$mark);
$res2 = self::bcInc($userInfo['spread_uid'],'now_money',$brokeragePrice,'uid');
$res = $res1 && $res2;
self::checkTrans($res);
@ -137,10 +140,12 @@ class User extends ModelBasic
$cost = isset($orderInfo['cost']) ? $orderInfo['cost'] : 0;//成本价
if($cost > $orderInfo['pay_price']) return true;//成本价大于支付价格时直接返回
$brokeragePrice = bcmul(bcsub($orderInfo['pay_price'],$cost,2),$brokerageRatio,2);
//返佣之后余额
$balance = bcsub($userInfo['now_money'],$brokeragePrice,2);
if($brokeragePrice <= 0) return true;
$mark = '二级推广人'.$userInfo['nickname'].'成功消费'.floatval($orderInfo['pay_price']).'元,奖励推广佣金'.floatval($brokeragePrice);
self::beginTrans();
$res1 = UserBill::income('获得推广佣金',$userInfoTwo['spread_uid'],'now_money','brokerage',$brokeragePrice,$orderInfo['id'],0,$mark);
$res1 = UserBill::income('获得推广佣金',$userInfoTwo['spread_uid'],'now_money','brokerage',$brokeragePrice,$orderInfo['id'],$balance,$mark);
$res2 = self::bcInc($userInfoTwo['spread_uid'],'now_money',$brokeragePrice,'uid');
$res = $res1 && $res2;
self::checkTrans($res);

View File

@ -9,8 +9,8 @@ namespace app\wap\model\user;
use basic\ModelBasic;
use service\SystemConfigService;
use service\WechatTemplateService;
use app\core\util\SystemConfigService;
use app\core\util\WechatTemplateService;
use think\Url;
use traits\ModelTrait;

View File

@ -9,7 +9,7 @@ namespace app\wap\model\user;
use app\wap\model\user\WechatUser;
use basic\ModelBasic;
use service\WechatService;
use app\core\util\WechatService;
use traits\ModelTrait;
class UserRecharge extends ModelBasic
@ -51,7 +51,7 @@ class UserRecharge extends ModelBasic
$user = User::getUserInfo($order['uid']);
self::beginTrans();
$res1 = self::where('order_id',$order['order_id'])->update(['paid'=>1,'pay_time'=>time()]);
$res2 = UserBill::income('用户余额充值',$order['uid'],'now_money','recharge',$order['price'],$order['id'],$user['now_money'],'成功充值余额'.floatval($order['price']).'元');
$res2 = UserBill::income('用户余额充值',$order['uid'],'now_money','recharge',$order['price'],$order['id'],bcadd($user['now_money'],$order['price'],2),'成功充值余额'.floatval($order['price']).'元');
$res3 = User::edit(['now_money'=>bcadd($user['now_money'],$order['price'],2)],$order['uid'],'uid');
$res = $res1 && $res2 && $res3;
self::checkTrans($res);

View File

@ -9,7 +9,7 @@ namespace app\wap\model\user;
use basic\ModelBasic;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use think\Model;
class UserSign
@ -40,7 +40,7 @@ class UserSign
$max = SystemConfigService::get('sx_sign_max_int')?:5;
$integral = rand($min,$max);
ModelBasic::beginTrans();
$res1 = UserBill::income('用户签到',$uid,'integral','sign',$integral,0,$userInfo['integral'],'签到获得'.floatval($integral).'积分');
$res1 = UserBill::income('用户签到',$uid,'integral','sign',$integral,0,bcadd($userInfo['integral'],$integral,2),'签到获得'.floatval($integral).'积分');
$res2 = User::bcInc($uid,'integral',$integral,'uid');
$res = $res1 && $res2;
ModelBasic::checkTrans($res);

View File

@ -10,9 +10,9 @@ namespace app\wap\model\user;
use app\wap\model\store\StoreCoupon;
use app\wap\model\store\StoreCouponUser;
use basic\ModelBasic;
use service\SystemConfigService;
use app\core\util\SystemConfigService;
use service\UtilService;
use service\WechatService;
use app\core\util\WechatService;
use service\CacheService as Cache;
use think\Session;
use traits\ModelTrait;
@ -39,6 +39,13 @@ class WechatUser extends ModelBasic
if(!isset($userInfo['subscribe']) || !$userInfo['subscribe'] || !isset($userInfo['openid']))
exception('请关注公众号!');
$userInfo['tagid_list'] = implode(',',$userInfo['tagid_list']);
//判断 unionid 是否存在
if(isset($userInfo['unionid'])){
$wechatInfo = self::where('unionid',$userInfo['unionid'])->find();
if($wechatInfo){
return self::edit($userInfo,$userInfo['unionid'],'unionid');
}
}
self::beginTrans();
$wechatUser = self::set($userInfo);
if(!$wechatUser){
@ -54,6 +61,9 @@ class WechatUser extends ModelBasic
return $wechatUser;
}
/**关注送优惠券
* @param $openid
*/
public static function userFirstSubGiveCoupon($openid)
{
$couponId = SystemConfigService::get('wechat_first_sub_give_coupon');

View File

@ -3,8 +3,8 @@
{block name="content"}
<div class="about-us">
<section>
<div class="ewm"><img src="<?= \service\SystemConfigService::get('about_us') ?>" alt=""></div>
<p class="name"><?= \service\SystemConfigService::get('site_name') ?></p>
<div class="ewm"><img src="<?= \app\core\util\SystemConfigService::get('about_us') ?>" alt=""></div>
<p class="name"><?= \app\core\util\SystemConfigService::get('site_name') ?></p>
</section>
<div class="copy-right">
<p>众邦科技提供技术支持</p>

View File

@ -9,7 +9,7 @@
<script type="text/javascript" src="{__WAP_PATH}crmeb/js/lottie.min.js"></script>
{/block}
{block name="title"}
<?= \service\SystemConfigService::get('site_name') ?>
<?= \app\core\util\SystemConfigService::get('site_name') ?>
{/block}
{block name="content"}
<div class="page-index" id="app-index">
@ -84,6 +84,58 @@
<!--</div>-->
<a class="more-wrapper" href="{:Url('store/issue_coupon')}" v-show="couponList.length >= 2">查看更多 ></a>
</div>
<!-- 商品精品推荐模板 -->
<div class="template-prolist" v-show="is_bestList.length > 0" >
<div class="title-like flex" v-cloak=""><span class="title-line left"></span> <span class="icon"></span>
<span>精品推荐</span> <span class="title-line right"></span></div>
<ul class="flex">
<li v-for="item in is_bestList" v-cloak=""><a :href="'/wap/store/detail/id/'+item.id">
<div class="picture"><img :src="item.image"></div>
<div class="product-info"><p class="title" v-text="item.store_name"></p>
<p class="count-wrapper flex"><span class="price" v-html="getPriceStr(item.price)"></span> <span
class="count">已售{{item.sales}}{{item.unit_name || '件'}}</span></p></div>
</a></li>
</ul>
</div>
<!-- 商品新品推荐模板 -->
<div class="template-prolist" v-show="is_newList.length > 0">
<div class="title-like flex" v-cloak=""><span class="title-line left"></span> <span class="icon"></span>
<span>首发新品</span> <span class="title-line right"></span></div>
<ul class="flex">
<li v-for="item in is_newList" v-cloak=""><a :href="'/wap/store/detail/id/'+item.id">
<div class="picture"><img :src="item.image"></div>
<div class="product-info"><p class="title" v-text="item.store_name"></p>
<p class="count-wrapper flex"><span class="price" v-html="getPriceStr(item.price)"></span> <span
class="count">已售{{item.sales}}{{item.unit_name || '件'}}</span></p></div>
</a></li>
</ul>
</div>
<!-- 商品热卖推荐模板 -->
<div class="template-prolist" v-show="is_hotList.length > 0">
<div class="title-like flex" v-cloak=""><span class="title-line left"></span> <span class="icon"></span>
<span>热卖单品</span> <span class="title-line right"></span></div>
<ul class="flex">
<li v-for="item in is_hotList" v-cloak=""><a :href="'/wap/store/detail/id/'+item.id">
<div class="picture"><img :src="item.image"></div>
<div class="product-info"><p class="title" v-text="item.store_name"></p>
<p class="count-wrapper flex"><span class="price" v-html="getPriceStr(item.price)"></span> <span
class="count">已售{{item.sales}}{{item.unit_name || '件'}}</span></p></div>
</a></li>
</ul>
</div>
<!-- 商品促销推荐模板 -->
<div class="template-prolist" v-show="is_benefitList.length > 0">
<div class="title-like flex" v-cloak=""><span class="title-line left"></span> <span class="icon"></span>
<span>特价专区</span> <span class="title-line right"></span></div>
<ul class="flex">
<li v-for="item in is_benefitList" v-cloak=""><a :href="'/wap/store/detail/id/'+item.id">
<div class="picture"><img :src="item.image"></div>
<div class="product-info"><p class="title" v-text="item.store_name"></p>
<p class="count-wrapper flex"><span class="price" v-html="getPriceStr(item.price)"></span> <span
class="count">已售{{item.sales}}{{item.unit_name || '件'}}</span></p></div>
</a></li>
</ul>
</div>
<!-- 秒杀列表 -->
{notempty name="storeSeckill"}
<div class="hotspike-list">
@ -157,7 +209,8 @@
class="count">已售{{pro.sales}}{{pro.unit_name || '件'}}</span></p></div>
</a></li>
</ul>
</div> <!-- 商品分类模板 -->
</div>
<!-- 商品分类模板 -->
<div class="template-prolist">
<div class="title-like flex" v-show="page.list.length > 0" v-cloak=""><span class="title-line left"></span> <span class="icon"></span>
<span>新品推荐</span> <span class="title-line right"></span></div>
@ -247,6 +300,10 @@
data: {
couponList: [],
cateGroupList: [],
is_bestList: [],//精品推荐
is_newList:[],//首发新品
is_hotList: [],//热卖单品
is_benefitList:[],//促销
page: {first: 0, limit: 20, list: [], loaded: false},
loading: false,
scroll: null,
@ -377,13 +434,33 @@
that.loading = false
});
},
getproductList: function (type) {
var that = this;
storeApi.getPublicProductList({first:0, limit: 4,type:type}, function (res) {
if(type=='is_best')
that.is_bestList = res.data.data;
if(type=='is_hot')
that.is_hotList = res.data.data;
if(type=='is_new')
that.is_newList = res.data.data;
if(type=='is_benefit')
that.is_benefitList = res.data.data;
}, function () {
});
},
},
mounted: function () {
var that = this;
this.elInit();
this.getIssueCouponList();
// this.getproductList('is_best');//精品
// this.getproductList('is_hot');//热卖
// this.getproductList('is_benefit');//促销
// this.getproductList('is_new');//首发新品
this.getIssueCouponList();
this.getCateData();
this.getCombinationList();
this.getCombinationList();//猜猜喜欢
setTimeout(function() {
that.getList();
},0);

View File

@ -11,7 +11,7 @@
<img src="{$wechatUser.headimgurl}" style="width: 1rem;height: 1rem;position: absolute;left: 50%;top: 50%;margin-left: -.5rem;margin-top: -.5rem;" />
</div>
<div class="text-content">
搜索微信公众号 <span><?=\service\SystemConfigService::get('site_name')?></span><br />
搜索微信公众号 <span><?=\app\core\util\SystemConfigService::get('site_name')?></span><br />
或长按上方二维码立即关注
</div>
<div class="link"><a href="{:Url('Index/index')}">进入商城</a></div>
@ -22,9 +22,9 @@
<script>
mapleWx($jssdk(),function(){
this.onMenuShareAll({
title:'<?=\service\SystemConfigService::get('wechat_share_title')?>',
imgUrl:location.origin+'<?=\service\SystemConfigService::get('wechat_share_img')?>',
desc:'<?=\service\SystemConfigService::get('wechat_share_synopsis')?>',
title:'<?=\app\core\util\SystemConfigService::get('wechat_share_title')?>',
imgUrl:location.origin+'<?=\app\core\util\SystemConfigService::get('wechat_share_img')?>',
desc:'<?=\app\core\util\SystemConfigService::get('wechat_share_synopsis')?>',
link:"{:Url('Index/index',['spuid'=>$wechatUser['uid']],true,true)}"
});
});

View File

@ -46,6 +46,13 @@
<img src="{__WAP_PATH}crmeb/images/user-orders-list001.png" />
<p>待付款</p>
</a>
<a href="{$orderListUrl}#11">
{gt name="orderStatusNum.noPink" value="0"}
<i class="mark_num">{$orderStatusNum.noPink > 99 ? 99 : $orderStatusNum.noPink}</i>
{/gt}
<img src="{__WAP_PATH}crmeb/images/user-orders-list005.png" />
<p>团购中</p>
</a>
<a href="{$orderListUrl}#1">
{gt name="orderStatusNum.noPostage" value="0"}
<i class="mark_num">{$orderStatusNum.noPostage > 99 ? 99 : $orderStatusNum.noPostage}</i>
@ -79,18 +86,18 @@
</div>
{/volist}
{if condition="$statu == 2 || $userInfo['is_promoter'] == 1"}
<div class="item">
<a class="con-cell" href="/wap/my/spread_list.html">
<img src="/public/uploads/common/5abc5804670d2.png" alt="">
<p>我的推广人</p>
</a>
</div>
<div class="item">
<a class="con-cell" href="/wap/index/spread.html">
<img src="/public/uploads/common/5abc5816d752b.png" alt="">
<p>推广二维码</p>
</a>
</div>
<div class="item">
<a class="con-cell" href="/wap/my/spread_list.html">
<img src="/public/uploads/common/5abc5804670d2.png" alt="">
<p>我的推广人</p>
</a>
</div>
<div class="item">
<a class="con-cell" href="/wap/index/spread.html">
<img src="/public/uploads/common/5abc5816d752b.png" alt="">
<p>推广二维码</p>
</a>
</div>
{/if}
</div>
</section>

View File

@ -12,8 +12,9 @@
<button type="button" @click="searchOrder"><i class="iconfont icon-icon"></i></button>
</div>
<div class="menu flex" ref="nav">
<div class="item" :class="{on:type === ''}" @click="changeType('')"><span>全部</span></div>
<div class="item" :class="{on:type === 'all'}" @click="changeType('all')"><span>全部</span></div>
<div class="item" :class="{on:type === 0}" @click="changeType(0)"><span>待付款</span></div>
<div class="item" :class="{on:type == 11}" @click="changeType(11)"><span>拼团中</span></div>
<div class="item" :class="{on:type == 1}" @click="changeType(1)"><span>待发货</span></div>
<div class="item" :class="{on:type == 2}" @click="changeType(2)"><span>待收货</span></div>
<div class="item" :class="{on:type == 3}" @click="changeType(3)"><span>待评价</span></div>
@ -205,7 +206,7 @@
if(group.loaded) return ;
this.loading = true;
storeApi.getUserOrderList({
type:this.type,
type:this.type=='all' ?'null':this.type,
first:group.first,
limit:group.limit,
search:this.search

View File

@ -7,10 +7,10 @@
{block name="head_top"}{/block}
<script type="text/javascript" src="{__PLUG_PATH}wxApi.js"></script>
<script>
$jssdk = function(){return <?=\service\WechatService::jsSdk()?>;}
window.wechat_share_title="<?=\service\SystemConfigService::get('wechat_share_title')?>";
window.wechat_share_synopsis="<?=\service\SystemConfigService::get('wechat_share_synopsis')?>";
window.wechat_share_img="<?=\service\SystemConfigService::get('wechat_share_img')?>";
$jssdk = function(){return <?=\app\core\util\WechatService::jsSdk()?>;}
window.wechat_share_title="<?=\app\core\util\SystemConfigService::get('wechat_share_title')?>";
window.wechat_share_synopsis="<?=\app\core\util\SystemConfigService::get('wechat_share_synopsis')?>";
window.wechat_share_img="<?=\app\core\util\SystemConfigService::get('wechat_share_img')?>";
mapleWx($jssdk(), function () {
this.onMenuShareAll({
title: wechat_share_title || $('title').text(),

View File

@ -1,10 +1,10 @@
<script type="text/javascript" src="{__PLUG_PATH}requirejs/require.js"></script>
<script>
requirejs.config({
urlArgs: "v=201712230955",
urlArgs: "v=15615616515616556",
map: {
'*': {
'css': "{__PLUG_PATH}requirejs/require-css.js"
'css': '{__PUBLIC_PATH}static/plug/requirejs/require-css.js'
}
},
shim: {
@ -24,7 +24,7 @@
deps: ['css!yduicss']
}
},
baseUrl: '//' + location.hostname + "{__PUBLIC_PATH}",
baseUrl: '//' + location.hostname + '{__PUBLIC_PATH}',
paths: {
'static': 'static',
'vue': 'static/plug/vue/dist/vue.min',
@ -38,7 +38,7 @@
'moment': 'static/plug/moment',
'sweetalert': 'static/plug/sweetalert2/sweetalert2.all.min',
'helper':'static/plug/helper',
'store':'wap/first/crmeb/module/store',
'store':'{__WAP_PATH}crmeb/module/store',
'better-scroll':"static/plug/better-scroll",
'ydui':"static/plug/ydui/ydui",
'yduicss':"static/plug/ydui/ydui-px",