小程序开发
parent
2b3d05501f
commit
1634ab26e4
|
|
@ -119,7 +119,7 @@ class Goods extends Common
|
|||
// 秒杀
|
||||
if($result['common_app_is_limitedtimediscount'] == 1)
|
||||
{
|
||||
$ret = CallPluginsServiceMethod('limitedtimediscount', 'Service', 'GoodsDetailCountdown');
|
||||
$ret = CallPluginsServiceMethod('limitedtimediscount', 'Service', 'GoodsDetailCountdown', $goods_id);
|
||||
if($ret['code'] == 0)
|
||||
{
|
||||
$result['plugins_limitedtimediscount_data'] = $ret['data'];
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@
|
|||
* @param [string] $plugins [插件名称]
|
||||
* @param [string] $service [服务层名称]
|
||||
* @param [string] $method [方法名称]
|
||||
* @param [mixed] $params [参数]
|
||||
*/
|
||||
function CallPluginsServiceMethod($plugins, $service, $method)
|
||||
function CallPluginsServiceMethod($plugins, $service, $method, $params = null)
|
||||
{
|
||||
$plugins_class = 'app\plugins\\'.$plugins.'\service\\'.$service;
|
||||
if(class_exists($plugins_class))
|
||||
{
|
||||
return $plugins_class::$method();
|
||||
return $plugins_class::$method($params);
|
||||
}
|
||||
return DataReturn('类未定义', -1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ App({
|
|||
// 请求地址
|
||||
request_url: "{{request_url}}",
|
||||
request_url: 'http://tp5-dev.com/',
|
||||
//request_url: 'http://test.shopxo.net/',
|
||||
request_url: 'http://test.shopxo.net/',
|
||||
|
||||
// 基础信息
|
||||
application_title: "{{application_title}}",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"pages": ["pages/goods-detail/goods-detail",
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/goods-category/goods-category",
|
||||
"pages/cart/cart",
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
"pages/login/login",
|
||||
"pages/paytips/paytips",
|
||||
"pages/goods-search/goods-search",
|
||||
|
||||
"pages/goods-detail/goods-detail",
|
||||
"pages/goods-comment/goods-comment",
|
||||
"pages/goods-attribute/goods-attribute",
|
||||
"pages/buy/buy",
|
||||
|
|
|
|||
|
|
@ -196,7 +196,6 @@
|
|||
line-height: 40rpx;
|
||||
}
|
||||
.goods-base .goods-price {
|
||||
margin-top: 10rpx;
|
||||
padding-right: 100rpx;
|
||||
position: relative;
|
||||
min-height: 80rpx;
|
||||
|
|
@ -241,7 +240,6 @@
|
|||
padding: 10rpx;
|
||||
height: 56rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.limitedtimediscount .icon {
|
||||
width: 50rpx;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<view class="goods-title multi-text" style="color:{{goods.title_color}}">{{goods.title}}</view>
|
||||
|
||||
<!-- 限时秒杀 -->
|
||||
<view a:if="{{common_app_is_limitedtimediscount == 1}}">
|
||||
<view a:if="{{common_app_is_limitedtimediscount == 1 && plugins_limitedtimediscount_data != null}}">
|
||||
<import src="/pages/lib/limitedtimediscount/goods-detail.axml" />
|
||||
<template is="limitedtimediscount" data="{{plugins_limitedtimediscount_data: plugins_limitedtimediscount_data, plugins_limitedtimediscount_is_show_time: plugins_limitedtimediscount_is_show_time, plugins_limitedtimediscount_time_millisecond: plugins_limitedtimediscount_time_millisecond}}"></template>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ Page({
|
|||
},
|
||||
|
||||
onLoad(params) {
|
||||
params['goods_id']=2;
|
||||
//params['goods_id']=2;
|
||||
this.setData({params: params});
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"pages": ["pages/goods-detail/goods-detail",
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/goods-category/goods-category",
|
||||
"pages/cart/cart",
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
"pages/login/login",
|
||||
"pages/paytips/paytips",
|
||||
"pages/goods-search/goods-search",
|
||||
|
||||
"pages/goods-detail/goods-detail",
|
||||
"pages/goods-comment/goods-comment",
|
||||
"pages/goods-attribute/goods-attribute",
|
||||
"pages/buy/buy",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ Page({
|
|||
},
|
||||
|
||||
onLoad(params) {
|
||||
params['goods_id']=2;
|
||||
//params['goods_id']=2;
|
||||
this.setData({params: params});
|
||||
this.init();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<view class="goods-title multi-text" style="color:{{goods.title_color}}">{{goods.title}}</view>
|
||||
|
||||
<!-- 限时秒杀 -->
|
||||
<view wx:if="{{common_app_is_limitedtimediscount == 1}}">
|
||||
<view wx:if="{{common_app_is_limitedtimediscount == 1 && plugins_limitedtimediscount_data != null}}">
|
||||
<import src="/pages/lib/limitedtimediscount/goods-detail.wxml" />
|
||||
<template is="limitedtimediscount" data="{{plugins_limitedtimediscount_data: plugins_limitedtimediscount_data, plugins_limitedtimediscount_is_show_time: plugins_limitedtimediscount_is_show_time, plugins_limitedtimediscount_time_millisecond: plugins_limitedtimediscount_time_millisecond}}"></template>
|
||||
</view>
|
||||
|
|
|
|||
|
|
@ -194,7 +194,6 @@
|
|||
line-height: 40rpx;
|
||||
}
|
||||
.goods-base .goods-price {
|
||||
margin-top: 10rpx;
|
||||
padding-right: 100rpx;
|
||||
position: relative;
|
||||
min-height: 80rpx;
|
||||
|
|
@ -265,7 +264,6 @@
|
|||
padding: 10rpx;
|
||||
height: 56rpx;
|
||||
overflow: hidden;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.limitedtimediscount .icon {
|
||||
width: 50rpx;
|
||||
|
|
|
|||
Loading…
Reference in New Issue