Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
飞鱼0526
ShopXO
提交
af338feb
ShopXO
项目概览
飞鱼0526
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
af338feb
编写于
6月 03, 2021
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序支持销售记录提示
上级
da2be3d0
变更
35
隐藏空白更改
内联
并排
Showing
35 changed file
with
1018 addition
and
6 deletion
+1018
-6
sourcecode/alipay/default/app.acss
sourcecode/alipay/default/app.acss
+40
-0
sourcecode/alipay/default/pages/goods-detail/goods-detail.acss
...ecode/alipay/default/pages/goods-detail/goods-detail.acss
+61
-0
sourcecode/alipay/default/pages/goods-detail/goods-detail.axml
...ecode/alipay/default/pages/goods-detail/goods-detail.axml
+7
-1
sourcecode/alipay/default/pages/goods-detail/goods-detail.js
sourcecode/alipay/default/pages/goods-detail/goods-detail.js
+51
-0
sourcecode/alipay/default/pages/index/index.acss
sourcecode/alipay/default/pages/index/index.acss
+19
-1
sourcecode/alipay/default/pages/index/index.axml
sourcecode/alipay/default/pages/index/index.axml
+23
-0
sourcecode/alipay/default/pages/index/index.js
sourcecode/alipay/default/pages/index/index.js
+4
-0
sourcecode/baidu/default/app.css
sourcecode/baidu/default/app.css
+39
-0
sourcecode/baidu/default/pages/goods-detail/goods-detail.css
sourcecode/baidu/default/pages/goods-detail/goods-detail.css
+61
-0
sourcecode/baidu/default/pages/goods-detail/goods-detail.js
sourcecode/baidu/default/pages/goods-detail/goods-detail.js
+51
-0
sourcecode/baidu/default/pages/goods-detail/goods-detail.swan
...cecode/baidu/default/pages/goods-detail/goods-detail.swan
+6
-0
sourcecode/baidu/default/pages/index/index.css
sourcecode/baidu/default/pages/index/index.css
+19
-1
sourcecode/baidu/default/pages/index/index.js
sourcecode/baidu/default/pages/index/index.js
+4
-0
sourcecode/baidu/default/pages/index/index.swan
sourcecode/baidu/default/pages/index/index.swan
+23
-0
sourcecode/qq/default/app.qss
sourcecode/qq/default/app.qss
+39
-0
sourcecode/qq/default/pages/goods-detail/goods-detail.js
sourcecode/qq/default/pages/goods-detail/goods-detail.js
+51
-0
sourcecode/qq/default/pages/goods-detail/goods-detail.qml
sourcecode/qq/default/pages/goods-detail/goods-detail.qml
+6
-0
sourcecode/qq/default/pages/goods-detail/goods-detail.qss
sourcecode/qq/default/pages/goods-detail/goods-detail.qss
+61
-0
sourcecode/qq/default/pages/index/index.js
sourcecode/qq/default/pages/index/index.js
+4
-0
sourcecode/qq/default/pages/index/index.qml
sourcecode/qq/default/pages/index/index.qml
+23
-0
sourcecode/qq/default/pages/index/index.qss
sourcecode/qq/default/pages/index/index.qss
+19
-1
sourcecode/toutiao/default/app.ttss
sourcecode/toutiao/default/app.ttss
+39
-0
sourcecode/toutiao/default/pages/goods-detail/goods-detail.js
...cecode/toutiao/default/pages/goods-detail/goods-detail.js
+51
-0
sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml
...code/toutiao/default/pages/goods-detail/goods-detail.ttml
+6
-0
sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss
...code/toutiao/default/pages/goods-detail/goods-detail.ttss
+61
-0
sourcecode/toutiao/default/pages/index/index.js
sourcecode/toutiao/default/pages/index/index.js
+4
-0
sourcecode/toutiao/default/pages/index/index.ttml
sourcecode/toutiao/default/pages/index/index.ttml
+23
-0
sourcecode/toutiao/default/pages/index/index.ttss
sourcecode/toutiao/default/pages/index/index.ttss
+19
-1
sourcecode/weixin/default/app.wxss
sourcecode/weixin/default/app.wxss
+40
-0
sourcecode/weixin/default/pages/goods-detail/goods-detail.js
sourcecode/weixin/default/pages/goods-detail/goods-detail.js
+51
-0
sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml
...ecode/weixin/default/pages/goods-detail/goods-detail.wxml
+6
-0
sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss
...ecode/weixin/default/pages/goods-detail/goods-detail.wxss
+61
-0
sourcecode/weixin/default/pages/index/index.js
sourcecode/weixin/default/pages/index/index.js
+4
-0
sourcecode/weixin/default/pages/index/index.wxml
sourcecode/weixin/default/pages/index/index.wxml
+23
-0
sourcecode/weixin/default/pages/index/index.wxss
sourcecode/weixin/default/pages/index/index.wxss
+19
-1
未找到文件。
sourcecode/alipay/default/app.acss
浏览文件 @
af338feb
...
...
@@ -92,6 +92,7 @@ textarea {
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.va-m { vertical-align: middle; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
...
...
@@ -435,6 +436,25 @@ textarea {
/**
* 公共样式
*/
.margin-xs {
margin: 5rpx;
}
.margin-sm {
margin: 10rpx;
}
.margin, .margin-default {
margin: 15rpx;
}
.margin-lg {
margin: 20rpx;
}
.margin-xl {
margin: 25rpx;
}
.margin-xxl {
margin: 30rpx;
}
.margin-top-xs {
margin-top: 5rpx;
}
...
...
@@ -511,6 +531,26 @@ textarea {
margin-bottom: 30rpx;
}
.padding-xs {
padding: 5rpx;
}
.padding-sm {
padding: 10rpx;
}
.padding, .padding-default {
padding: 15rpx;
}
.padding-lg {
padding: 20rpx;
}
.padding-xl {
padding: 25rpx;
}
.padding-xxl {
padding: 30rpx;
}
.padding-top-xs {
padding-top: 5rpx;
}
...
...
sourcecode/alipay/default/pages/goods-detail/goods-detail.acss
浏览文件 @
af338feb
...
...
@@ -443,4 +443,65 @@
}
.goods-panel-container view:not(:first-child) {
border-top: 1px dashed #fff1f2;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords-tips,
.plugins-salerecords-tips-top-left,
.plugins-salerecords-tips-top-right,
.plugins-salerecords-tips-bottom-left,
.plugins-salerecords-tips-bottom-right,
.plugins-salerecords-tips-top-center,
.plugins-salerecords-tips-bottom-center {
position: fixed;
left: calc(50% - 170rpx);
top: 50%;
background: rgb(0 0 0 / 60%);
border-radius: 60rpx;
padding: 8rpx 20rpx;
color: #fff;
z-index: 110;
-webkit-box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
-moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
}
.plugins-salerecords-tips image ,
.plugins-salerecords-tips-top-left image ,
.plugins-salerecords-tips-top-right image ,
.plugins-salerecords-tips-bottom-left image ,
.plugins-salerecords-tips-bottom-right image,
.plugins-salerecords-tips-top-center image,
.plugins-salerecords-tips-bottom-center image {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.plugins-salerecords-tips-top-left {
left: 5%;
top: 5%;
}
.plugins-salerecords-tips-top-right {
right: 5%;
top: 5%;
left: auto;
}
.plugins-salerecords-tips-bottom-left {
left: 5%;
bottom: 10%;
top: auto;
}
.plugins-salerecords-tips-bottom-right {
right: 5%;
bottom: 10%;
left: auto;
top: auto;
}
.plugins-salerecords-tips-top-center {
top: 5%;
}
.plugins-salerecords-tips-bottom-center {
bottom: 10%;
top: auto;
}
\ No newline at end of file
sourcecode/alipay/default/pages/goods-detail/goods-detail.axml
浏览文件 @
af338feb
...
...
@@ -200,7 +200,7 @@
</view>
</view>
<!-- 弹层 -->
<!--
购买
弹层 -->
<component-popup prop-show="{{popup_status}}" prop-position="bottom" onClose="popup_close_event">
<view class="goods-popup bg-white">
<view class="close fr oh">
...
...
@@ -253,6 +253,12 @@
<button class="goods-popup-submit bg-main" type="default" catchTap="goods_buy_confirm_event" hover-class="none">确定</button>
</view>
</component-popup>
<!-- 购买记录 -->
<view a:if="{{(plugins_salerecords_tips_content || null) != null}}" class="plugins-salerecords-tips{{plugins_salerecords_tips_ent}}">
<image mode="widthFix" src="{{plugins_salerecords_tips_content.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{plugins_salerecords_tips_content.tips}}</text>
</view>
</view>
<view a:if="{{goods == null}}">
...
...
sourcecode/alipay/default/pages/goods-detail/goods-detail.js
浏览文件 @
af338feb
...
...
@@ -59,6 +59,12 @@ Page({
plugins_coupon_data
:
null
,
temp_coupon_receive_index
:
null
,
temp_coupon_receive_value
:
null
,
// 购买记录
plugins_salerecords_data
:
null
,
plugins_salerecords_timer
:
null
,
plugins_salerecords_tips_content
:
null
,
plugins_salerecords_tips_ent
:
''
,
},
onLoad
(
params
)
{
...
...
@@ -160,6 +166,8 @@ Page({
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
quick_nav_cart_count
:
data
.
common_cart_total
||
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 限时秒杀倒计时
...
...
@@ -184,6 +192,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 购买记录提示
this
.
plugins_salerecords_tips_handle
();
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
...
...
@@ -760,10 +771,50 @@ Page({
}
},
// 购买记录提示处理
plugins_salerecords_tips_handle
()
{
// 销毁之前的任务
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
// 是否存在数据
var
data
=
this
.
data
.
plugins_salerecords_data
||
null
;
if
(
data
!=
null
&&
(
data
.
data
||
null
)
!=
null
&&
data
.
data
.
length
>
0
)
{
var
self
=
this
;
var
base
=
data
.
base
||
null
;
var
location
=
(
base
==
null
||
(
base
.
goods_detail_tips_location
||
null
)
==
null
)
?
''
:
'
-
'
+
base
.
goods_detail_tips_location
;
var
pause
=
(
base
==
null
?
5
:
(
base
.
goods_detail_time_pause
||
5
))
*
1000
;
var
interval
=
(
base
==
null
?
10
:
(
base
.
goods_detail_time_interval
||
10
))
*
1000
;
var
index
=
0
;
var
list
=
data
.
data
;
var
count
=
list
.
length
;
var
timer
=
setInterval
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
list
[
index
]});
setTimeout
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
null
});
},
pause
);
// 索引处理
index
++
;
if
(
index
>=
count
)
{
index
=
0
;
}
},
interval
);
self
.
setData
({
plugins_salerecords_timer
:
timer
,
plugins_salerecords_tips_ent
:
location
});
}
},
// 页面销毁时执行
onUnload
:
function
()
{
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timer
);
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timers
);
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
},
// 优惠劵领取事件
...
...
sourcecode/alipay/default/pages/index/index.acss
浏览文件 @
af338feb
...
...
@@ -102,7 +102,7 @@
/*
* 限时秒杀 - 插件
*/
.limitedtimediscount {
.limitedtimediscount {
background: #fff;
padding: 5rpx 10rpx 20rpx 10rpx;
margin-bottom: 20rpx;
...
...
@@ -200,4 +200,22 @@
position: absolute;
right: 15rpx;
bottom: 15rpx;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords image {
width: 50rpx !important;
height: 50rpx !important;
border-radius: 50%;
}
.plugins-salerecords .item-content {
width: 24%;
}
.plugins-salerecords .item-content:nth-child(1) {
width: 36%;
}
.plugins-salerecords .item-content:nth-child(2) {
width: 40%;
}
\ No newline at end of file
sourcecode/alipay/default/pages/index/index.axml
浏览文件 @
af338feb
...
...
@@ -59,6 +59,29 @@
</view>
</view>
</block>
<!-- 底部购买记录 -->
<view a:if="{{(plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0}}" class="spacing-mb plugins-salerecords bg-white">
<view class="spacing-nav-title br-b">
<text class="line"></text>
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
</view>
<view a:for="{{plugins_salerecords_data.data}}" class="item oh br-b padding-sm">
<view class="item-content single-text fl">
<image mode="widthFix" src="{{item.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{item.user.user_name_view}}</text>
<text a:if="{{(item.user.province || null) != null}}"> - {{item.user.province}}</text>
</view>
<view class="item-content fl">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
<text class="margin-left-sm">{{item.title}}</text>
</navigator>
</view>
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
</view>
</view>
<view a:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.axml" />
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
...
...
sourcecode/alipay/default/pages/index/index.js
浏览文件 @
af338feb
...
...
@@ -25,6 +25,9 @@ Page({
plugins_limitedtimediscount_timer_title
:
'
距离结束
'
,
plugins_limitedtimediscount_is_show_time
:
true
,
plugins_limitedtimediscount_timer
:
null
,
// 购买记录插件
plugins_salerecords_data
:
null
,
},
onShow
()
{
...
...
@@ -89,6 +92,7 @@ Page({
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
,
plugins_limitedtimediscount_is_valid
:
((
data
.
plugins_limitedtimediscount_data
||
null
)
!=
null
&&
(
data
.
plugins_limitedtimediscount_data
.
is_valid
||
0
)
==
1
)
?
1
:
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 导航购物车处理
...
...
sourcecode/baidu/default/app.css
浏览文件 @
af338feb
...
...
@@ -102,6 +102,7 @@ textarea {
.dis-none
{
display
:
none
;
}
.dis-block
{
display
:
block
;
}
.dis-inline
{
display
:
inline
;
}
.va-m
{
vertical-align
:
middle
;
}
.cr-main
{
color
:
#d2364c
;
}
.cr-666
{
color
:
#666
;
}
...
...
@@ -499,6 +500,25 @@ button[disabled].bg-primary {
/**
* 公共样式
*/
.margin-xs
{
margin
:
5
rpx
;
}
.margin-sm
{
margin
:
10
rpx
;
}
.margin
,
.margin-default
{
margin
:
15
rpx
;
}
.margin-lg
{
margin
:
20
rpx
;
}
.margin-xl
{
margin
:
25
rpx
;
}
.margin-xxl
{
margin
:
30
rpx
;
}
.margin-top-xs
{
margin-top
:
5
rpx
;
}
...
...
@@ -576,6 +596,25 @@ button[disabled].bg-primary {
}
.padding-xs
{
padding
:
5
rpx
;
}
.padding-sm
{
padding
:
10
rpx
;
}
.padding
,
.padding-default
{
padding
:
15
rpx
;
}
.padding-lg
{
padding
:
20
rpx
;
}
.padding-xl
{
padding
:
25
rpx
;
}
.padding-xxl
{
padding
:
30
rpx
;
}
.padding-top-xs
{
padding-top
:
5
rpx
;
}
...
...
sourcecode/baidu/default/pages/goods-detail/goods-detail.css
浏览文件 @
af338feb
...
...
@@ -442,4 +442,65 @@
}
.goods-panel-container
view
:not
(
:first-child
)
{
border-top
:
1px
dashed
#fff1f2
;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords-tips
,
.plugins-salerecords-tips-top-left
,
.plugins-salerecords-tips-top-right
,
.plugins-salerecords-tips-bottom-left
,
.plugins-salerecords-tips-bottom-right
,
.plugins-salerecords-tips-top-center
,
.plugins-salerecords-tips-bottom-center
{
position
:
fixed
;
left
:
calc
(
50%
-
170
rpx
);
top
:
50%
;
background
:
rgb
(
0
0
0
/
60%
);
border-radius
:
60
rpx
;
padding
:
8
rpx
20
rpx
;
color
:
#fff
;
z-index
:
110
;
-webkit-box-shadow
:
0
8px
10px
rgb
(
0
0
0
/
20%
);
-moz-box-shadow
:
0
8px
10px
rgba
(
0
,
0
,
0
,
0.2
);
box-shadow
:
0
8px
10px
rgb
(
0
0
0
/
20%
);
}
.plugins-salerecords-tips
image
,
.plugins-salerecords-tips-top-left
image
,
.plugins-salerecords-tips-top-right
image
,
.plugins-salerecords-tips-bottom-left
image
,
.plugins-salerecords-tips-bottom-right
image
,
.plugins-salerecords-tips-top-center
image
,
.plugins-salerecords-tips-bottom-center
image
{
width
:
50
rpx
;
height
:
50
rpx
;
border-radius
:
50%
;
}
.plugins-salerecords-tips-top-left
{
left
:
5%
;
top
:
5%
;
}
.plugins-salerecords-tips-top-right
{
right
:
5%
;
top
:
5%
;
left
:
auto
;
}
.plugins-salerecords-tips-bottom-left
{
left
:
5%
;
bottom
:
10%
;
top
:
auto
;
}
.plugins-salerecords-tips-bottom-right
{
right
:
5%
;
bottom
:
10%
;
left
:
auto
;
top
:
auto
;
}
.plugins-salerecords-tips-top-center
{
top
:
5%
;
}
.plugins-salerecords-tips-bottom-center
{
bottom
:
10%
;
top
:
auto
;
}
\ No newline at end of file
sourcecode/baidu/default/pages/goods-detail/goods-detail.js
浏览文件 @
af338feb
...
...
@@ -53,6 +53,12 @@ Page({
plugins_coupon_data
:
null
,
temp_coupon_receive_index
:
null
,
temp_coupon_receive_value
:
null
,
// 购买记录
plugins_salerecords_data
:
null
,
plugins_salerecords_timer
:
null
,
plugins_salerecords_tips_content
:
null
,
plugins_salerecords_tips_ent
:
''
,
},
onLoad
(
params
)
{
...
...
@@ -144,6 +150,8 @@ Page({
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
quick_nav_cart_count
:
data
.
common_cart_total
||
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 限时秒杀倒计时
...
...
@@ -158,6 +166,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 购买记录提示
this
.
plugins_salerecords_tips_handle
();
// 页面信息设置
this
.
set_page_info
();
}
else
{
...
...
@@ -690,10 +701,50 @@ Page({
}
},
// 购买记录提示处理
plugins_salerecords_tips_handle
()
{
// 销毁之前的任务
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
// 是否存在数据
var
data
=
this
.
data
.
plugins_salerecords_data
||
null
;
if
(
data
!=
null
&&
(
data
.
data
||
null
)
!=
null
&&
data
.
data
.
length
>
0
)
{
var
self
=
this
;
var
base
=
data
.
base
||
null
;
var
location
=
(
base
==
null
||
(
base
.
goods_detail_tips_location
||
null
)
==
null
)
?
''
:
'
-
'
+
base
.
goods_detail_tips_location
;
var
pause
=
(
base
==
null
?
5
:
(
base
.
goods_detail_time_pause
||
5
))
*
1000
;
var
interval
=
(
base
==
null
?
10
:
(
base
.
goods_detail_time_interval
||
10
))
*
1000
;
var
index
=
0
;
var
list
=
data
.
data
;
var
count
=
list
.
length
;
var
timer
=
setInterval
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
list
[
index
]});
setTimeout
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
null
});
},
pause
);
// 索引处理
index
++
;
if
(
index
>=
count
)
{
index
=
0
;
}
},
interval
);
self
.
setData
({
plugins_salerecords_timer
:
timer
,
plugins_salerecords_tips_ent
:
location
});
}
},
// 页面销毁时执行
onUnload
:
function
()
{
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timer
);
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timers
);
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
},
// 优惠劵领取事件
...
...
sourcecode/baidu/default/pages/goods-detail/goods-detail.swan
浏览文件 @
af338feb
...
...
@@ -238,6 +238,12 @@
<button class="goods-popup-submit bg-main" type="default" catchtap="goods_buy_confirm_event" hover-class="none">确定</button>
</view>
</component-popup>
<!-- 购买记录 -->
<view s-if="(plugins_salerecords_tips_content || null) != null" class="plugins-salerecords-tips{{plugins_salerecords_tips_ent}}">
<image mode="widthFix" src="{{plugins_salerecords_tips_content.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{plugins_salerecords_tips_content.tips}}</text>
</view>
</view>
<view s-if="goods == null">
...
...
sourcecode/baidu/default/pages/index/index.css
浏览文件 @
af338feb
...
...
@@ -102,7 +102,7 @@
/*
* 限时秒杀 - 插件
*/
.limitedtimediscount
{
.limitedtimediscount
{
background
:
#fff
;
padding
:
5
rpx
10
rpx
20
rpx
10
rpx
;
margin-bottom
:
20
rpx
;
...
...
@@ -200,4 +200,22 @@
position
:
absolute
;
right
:
15
rpx
;
bottom
:
15
rpx
;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords
image
{
width
:
50
rpx
!important
;
height
:
50
rpx
!important
;
border-radius
:
50%
;
}
.plugins-salerecords
.item-content
{
width
:
24%
;
}
.plugins-salerecords
.item-content
:nth-child
(
1
)
{
width
:
36%
;
}
.plugins-salerecords
.item-content
:nth-child
(
2
)
{
width
:
40%
;
}
\ No newline at end of file
sourcecode/baidu/default/pages/index/index.js
浏览文件 @
af338feb
...
...
@@ -22,6 +22,9 @@ Page({
plugins_limitedtimediscount_timer_title
:
'
距离结束
'
,
plugins_limitedtimediscount_is_show_time
:
true
,
plugins_limitedtimediscount_timer
:
null
,
// 购买记录插件
plugins_salerecords_data
:
null
,
},
onShow
()
{
...
...
@@ -77,6 +80,7 @@ Page({
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
,
plugins_limitedtimediscount_is_valid
:
((
data
.
plugins_limitedtimediscount_data
||
null
)
!=
null
&&
(
data
.
plugins_limitedtimediscount_data
.
is_valid
||
0
)
==
1
)
?
1
:
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 导航购物车处理
...
...
sourcecode/baidu/default/pages/index/index.swan
浏览文件 @
af338feb
...
...
@@ -59,6 +59,29 @@
</view>
</view>
</block>
<!-- 底部购买记录 -->
<view s-if="(plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0" class="spacing-mb plugins-salerecords bg-white">
<view class="spacing-nav-title br-b">
<text class="line"></text>
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
</view>
<view s-for="item, index in plugins_salerecords_data.data" s-key="key" class="item oh br-b padding-sm">
<view class="item-content single-text fl">
<image mode="widthFix" src="{{item.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{item.user.user_name_view}}</text>
<text s-if="(item.user.province || null) != null"> - {{item.user.province}}</text>
</view>
<view class="item-content fl">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
<text class="margin-left-sm">{{item.title}}</text>
</navigator>
</view>
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
</view>
</view>
<view s-if="data_list.length == 0">
<import src="/pages/common/nodata.swan" />
<template is="nodata" data="{{{status: data_list_loding_status}}}"></template>
...
...
sourcecode/qq/default/app.qss
浏览文件 @
af338feb
...
...
@@ -102,6 +102,7 @@ textarea {
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.va-m { vertical-align: middle; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
...
...
@@ -489,6 +490,25 @@ button[disabled].bg-primary {
/**
* 公共样式
*/
.margin-xs {
margin: 5rpx;
}
.margin-sm {
margin: 10rpx;
}
.margin, .margin-default {
margin: 15rpx;
}
.margin-lg {
margin: 20rpx;
}
.margin-xl {
margin: 25rpx;
}
.margin-xxl {
margin: 30rpx;
}
.margin-top-xs {
margin-top: 5rpx;
}
...
...
@@ -566,6 +586,25 @@ button[disabled].bg-primary {
}
.padding-xs {
padding: 5rpx;
}
.padding-sm {
padding: 10rpx;
}
.padding, .padding-default {
padding: 15rpx;
}
.padding-lg {
padding: 20rpx;
}
.padding-xl {
padding: 25rpx;
}
.padding-xxl {
padding: 30rpx;
}
.padding-top-xs {
padding-top: 5rpx;
}
...
...
sourcecode/qq/default/pages/goods-detail/goods-detail.js
浏览文件 @
af338feb
...
...
@@ -53,6 +53,12 @@ Page({
plugins_coupon_data
:
null
,
temp_coupon_receive_index
:
null
,
temp_coupon_receive_value
:
null
,
// 购买记录
plugins_salerecords_data
:
null
,
plugins_salerecords_timer
:
null
,
plugins_salerecords_tips_content
:
null
,
plugins_salerecords_tips_ent
:
''
,
},
onLoad
(
params
)
{
...
...
@@ -153,6 +159,8 @@ Page({
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
quick_nav_cart_count
:
data
.
common_cart_total
||
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 限时秒杀倒计时
...
...
@@ -165,6 +173,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 购买记录提示
this
.
plugins_salerecords_tips_handle
();
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
...
...
@@ -739,10 +750,50 @@ Page({
}
},
// 购买记录提示处理
plugins_salerecords_tips_handle
()
{
// 销毁之前的任务
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
// 是否存在数据
var
data
=
this
.
data
.
plugins_salerecords_data
||
null
;
if
(
data
!=
null
&&
(
data
.
data
||
null
)
!=
null
&&
data
.
data
.
length
>
0
)
{
var
self
=
this
;
var
base
=
data
.
base
||
null
;
var
location
=
(
base
==
null
||
(
base
.
goods_detail_tips_location
||
null
)
==
null
)
?
''
:
'
-
'
+
base
.
goods_detail_tips_location
;
var
pause
=
(
base
==
null
?
5
:
(
base
.
goods_detail_time_pause
||
5
))
*
1000
;
var
interval
=
(
base
==
null
?
10
:
(
base
.
goods_detail_time_interval
||
10
))
*
1000
;
var
index
=
0
;
var
list
=
data
.
data
;
var
count
=
list
.
length
;
var
timer
=
setInterval
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
list
[
index
]});
setTimeout
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
null
});
},
pause
);
// 索引处理
index
++
;
if
(
index
>=
count
)
{
index
=
0
;
}
},
interval
);
self
.
setData
({
plugins_salerecords_timer
:
timer
,
plugins_salerecords_tips_ent
:
location
});
}
},
// 页面销毁时执行
onUnload
:
function
()
{
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timer
);
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timers
);
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
},
// 商品海报分享
...
...
sourcecode/qq/default/pages/goods-detail/goods-detail.qml
浏览文件 @
af338feb
...
...
@@ -244,6 +244,12 @@
<
button
class
=
"
goods-popup-submit bg-main
"
type
=
"
default
"
catchtap
=
"
goods_buy_confirm_event
"
hover
-
class
=
"
none
"
>
确定
<
/button
>
<
/view
>
<
/component-popup
>
<!--
购买记录
-->
<
view
qq
:
if
=
"
{{(plugins_salerecords_tips_content || null) != null}}
"
class
=
"
plugins-salerecords-tips{{plugins_salerecords_tips_ent}}
"
>
<
image
mode
=
"
widthFix
"
src
=
"
{{plugins_salerecords_tips_content.user.avatar}}
"
class
=
"
va-m br
"
/>
<
text
class
=
"
margin-left-sm
"
>
{{
plugins_salerecords_tips_content
.
tips
}}
<
/text
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{goods == null}}
"
>
...
...
sourcecode/qq/default/pages/goods-detail/goods-detail.qss
浏览文件 @
af338feb
...
...
@@ -438,4 +438,65 @@
}
.goods-panel-container view:not(:first-child) {
border-top: 1px dashed #fff1f2;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords-tips,
.plugins-salerecords-tips-top-left,
.plugins-salerecords-tips-top-right,
.plugins-salerecords-tips-bottom-left,
.plugins-salerecords-tips-bottom-right,
.plugins-salerecords-tips-top-center,
.plugins-salerecords-tips-bottom-center {
position: fixed;
left: calc(50% - 170rpx);
top: 50%;
background: rgb(0 0 0 / 60%);
border-radius: 60rpx;
padding: 8rpx 20rpx;
color: #fff;
z-index: 110;
-webkit-box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
-moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
}
.plugins-salerecords-tips image ,
.plugins-salerecords-tips-top-left image ,
.plugins-salerecords-tips-top-right image ,
.plugins-salerecords-tips-bottom-left image ,
.plugins-salerecords-tips-bottom-right image,
.plugins-salerecords-tips-top-center image,
.plugins-salerecords-tips-bottom-center image {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.plugins-salerecords-tips-top-left {
left: 5%;
top: 5%;
}
.plugins-salerecords-tips-top-right {
right: 5%;
top: 5%;
left: auto;
}
.plugins-salerecords-tips-bottom-left {
left: 5%;
bottom: 10%;
top: auto;
}
.plugins-salerecords-tips-bottom-right {
right: 5%;
bottom: 10%;
left: auto;
top: auto;
}
.plugins-salerecords-tips-top-center {
top: 5%;
}
.plugins-salerecords-tips-bottom-center {
bottom: 10%;
top: auto;
}
\ No newline at end of file
sourcecode/qq/default/pages/index/index.js
浏览文件 @
af338feb
...
...
@@ -22,6 +22,9 @@ Page({
plugins_limitedtimediscount_timer_title
:
'
距离结束
'
,
plugins_limitedtimediscount_is_show_time
:
true
,
plugins_limitedtimediscount_timer
:
null
,
// 购买记录插件
plugins_salerecords_data
:
null
,
},
onShow
()
{
...
...
@@ -77,6 +80,7 @@ Page({
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
,
plugins_limitedtimediscount_is_valid
:
((
data
.
plugins_limitedtimediscount_data
||
null
)
!=
null
&&
(
data
.
plugins_limitedtimediscount_data
.
is_valid
||
0
)
==
1
)
?
1
:
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 导航购物车处理
...
...
sourcecode/qq/default/pages/index/index.qml
浏览文件 @
af338feb
...
...
@@ -59,6 +59,29 @@
<
/view
>
<
/view
>
<
/block
>
<!--
底部购买记录
-->
<
view
qq
:
if
=
"
{{(plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0}}
"
class
=
"
spacing-mb plugins-salerecords bg-white
"
>
<
view
class
=
"
spacing-nav-title br-b
"
>
<
text
class
=
"
line
"
><
/text
>
<
text
class
=
"
text-wrapper
"
>
{{
plugins_salerecords_data
.
base
.
home_bottom_title
||
'
最新购买
'
}}
<
/text
>
<
/view
>
<
view
qq
:
for
=
"
{{plugins_salerecords_data.data}}
"
qq
:
key
=
"
key
"
class
=
"
item oh br-b padding-sm
"
>
<
view
class
=
"
item-content single-text fl
"
>
<
image
mode
=
"
widthFix
"
src
=
"
{{item.user.avatar}}
"
class
=
"
va-m br
"
/>
<
text
class
=
"
margin-left-sm
"
>
{{
item
.
user
.
user_name_view
}}
<
/text
>
<
text
qq
:
if
=
"
{{(item.user.province || null) != null}}
"
>
-
{{
item
.
user
.
province
}}
<
/text
>
<
/view
>
<
view
class
=
"
item-content fl
"
>
<
navigator
url
=
"
/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}
"
hover
-
class
=
"
none
"
class
=
"
single-text
"
>
<
image
mode
=
"
widthFix
"
src
=
"
{{item.images}}
"
class
=
"
va-m br
"
/>
<
text
class
=
"
margin-left-sm
"
>
{{
item
.
title
}}
<
/text
>
<
/navigator
>
<
/view
>
<
view
class
=
"
item-content single-text fr tr padding-top-xs
"
>
{{
item
.
add_time
}}
<
/view
>
<
/view
>
<
/view
>
<
view
qq
:
if
=
"
{{data_list.length == 0}}
"
>
<
import
src
=
"
/pages/common/nodata.qml
"
/>
<
template
is
=
"
nodata
"
data
=
"
{{status: data_list_loding_status}}
"
><
/template
>
...
...
sourcecode/qq/default/pages/index/index.qss
浏览文件 @
af338feb
...
...
@@ -102,7 +102,7 @@
/*
* 限时秒杀 - 插件
*/
.limitedtimediscount {
.limitedtimediscount {
background: #fff;
padding: 5rpx 10rpx 20rpx 10rpx;
margin-bottom: 20rpx;
...
...
@@ -200,4 +200,22 @@
position: absolute;
right: 15rpx;
bottom: 15rpx;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords image {
width: 50rpx !important;
height: 50rpx !important;
border-radius: 50%;
}
.plugins-salerecords .item-content {
width: 24%;
}
.plugins-salerecords .item-content:nth-child(1) {
width: 36%;
}
.plugins-salerecords .item-content:nth-child(2) {
width: 40%;
}
\ No newline at end of file
sourcecode/toutiao/default/app.ttss
浏览文件 @
af338feb
...
...
@@ -103,6 +103,7 @@ textarea {
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.va-m { vertical-align: middle; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
...
...
@@ -490,6 +491,25 @@ button[disabled].bg-primary {
/**
* 公共样式
*/
.margin-xs {
margin: 5rpx;
}
.margin-sm {
margin: 10rpx;
}
.margin, .margin-default {
margin: 15rpx;
}
.margin-lg {
margin: 20rpx;
}
.margin-xl {
margin: 25rpx;
}
.margin-xxl {
margin: 30rpx;
}
.margin-top-xs {
margin-top: 5rpx;
}
...
...
@@ -567,6 +587,25 @@ button[disabled].bg-primary {
}
.padding-xs {
padding: 5rpx;
}
.padding-sm {
padding: 10rpx;
}
.padding, .padding-default {
padding: 15rpx;
}
.padding-lg {
padding: 20rpx;
}
.padding-xl {
padding: 25rpx;
}
.padding-xxl {
padding: 30rpx;
}
.padding-top-xs {
padding-top: 5rpx;
}
...
...
sourcecode/toutiao/default/pages/goods-detail/goods-detail.js
浏览文件 @
af338feb
...
...
@@ -53,6 +53,12 @@ Page({
plugins_coupon_data
:
null
,
temp_coupon_receive_index
:
null
,
temp_coupon_receive_value
:
null
,
// 购买记录
plugins_salerecords_data
:
null
,
plugins_salerecords_timer
:
null
,
plugins_salerecords_tips_content
:
null
,
plugins_salerecords_tips_ent
:
''
,
},
onLoad
(
params
)
{
...
...
@@ -153,6 +159,8 @@ Page({
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
quick_nav_cart_count
:
data
.
common_cart_total
||
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 限时秒杀倒计时
...
...
@@ -165,6 +173,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 购买记录提示
this
.
plugins_salerecords_tips_handle
();
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
...
...
@@ -739,10 +750,50 @@ Page({
}
},
// 购买记录提示处理
plugins_salerecords_tips_handle
()
{
// 销毁之前的任务
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
// 是否存在数据
var
data
=
this
.
data
.
plugins_salerecords_data
||
null
;
if
(
data
!=
null
&&
(
data
.
data
||
null
)
!=
null
&&
data
.
data
.
length
>
0
)
{
var
self
=
this
;
var
base
=
data
.
base
||
null
;
var
location
=
(
base
==
null
||
(
base
.
goods_detail_tips_location
||
null
)
==
null
)
?
''
:
'
-
'
+
base
.
goods_detail_tips_location
;
var
pause
=
(
base
==
null
?
5
:
(
base
.
goods_detail_time_pause
||
5
))
*
1000
;
var
interval
=
(
base
==
null
?
10
:
(
base
.
goods_detail_time_interval
||
10
))
*
1000
;
var
index
=
0
;
var
list
=
data
.
data
;
var
count
=
list
.
length
;
var
timer
=
setInterval
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
list
[
index
]});
setTimeout
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
null
});
},
pause
);
// 索引处理
index
++
;
if
(
index
>=
count
)
{
index
=
0
;
}
},
interval
);
self
.
setData
({
plugins_salerecords_timer
:
timer
,
plugins_salerecords_tips_ent
:
location
});
}
},
// 页面销毁时执行
onUnload
:
function
()
{
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timer
);
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timers
);
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
},
// 商品海报分享
...
...
sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttml
浏览文件 @
af338feb
...
...
@@ -244,6 +244,12 @@
<button class="goods-popup-submit bg-main" type="default" catchtap="goods_buy_confirm_event" hover-class="none">确定</button>
</view>
</component-popup>
<!-- 购买记录 -->
<view tt:if="{{(plugins_salerecords_tips_content || null) != null}}" class="plugins-salerecords-tips{{plugins_salerecords_tips_ent}}">
<image mode="widthFix" src="{{plugins_salerecords_tips_content.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{plugins_salerecords_tips_content.tips}}</text>
</view>
</view>
<view tt:if="{{goods == null}}">
...
...
sourcecode/toutiao/default/pages/goods-detail/goods-detail.ttss
浏览文件 @
af338feb
...
...
@@ -438,4 +438,65 @@
}
.goods-panel-container view:not(:first-child) {
border-top: 1px dashed #fff1f2;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords-tips,
.plugins-salerecords-tips-top-left,
.plugins-salerecords-tips-top-right,
.plugins-salerecords-tips-bottom-left,
.plugins-salerecords-tips-bottom-right,
.plugins-salerecords-tips-top-center,
.plugins-salerecords-tips-bottom-center {
position: fixed;
left: calc(50% - 170rpx);
top: 50%;
background: rgb(0 0 0 / 60%);
border-radius: 60rpx;
padding: 8rpx 20rpx;
color: #fff;
z-index: 110;
-webkit-box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
-moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
}
.plugins-salerecords-tips image ,
.plugins-salerecords-tips-top-left image ,
.plugins-salerecords-tips-top-right image ,
.plugins-salerecords-tips-bottom-left image ,
.plugins-salerecords-tips-bottom-right image,
.plugins-salerecords-tips-top-center image,
.plugins-salerecords-tips-bottom-center image {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.plugins-salerecords-tips-top-left {
left: 5%;
top: 5%;
}
.plugins-salerecords-tips-top-right {
right: 5%;
top: 5%;
left: auto;
}
.plugins-salerecords-tips-bottom-left {
left: 5%;
bottom: 10%;
top: auto;
}
.plugins-salerecords-tips-bottom-right {
right: 5%;
bottom: 10%;
left: auto;
top: auto;
}
.plugins-salerecords-tips-top-center {
top: 5%;
}
.plugins-salerecords-tips-bottom-center {
bottom: 10%;
top: auto;
}
\ No newline at end of file
sourcecode/toutiao/default/pages/index/index.js
浏览文件 @
af338feb
...
...
@@ -22,6 +22,9 @@ Page({
plugins_limitedtimediscount_timer_title
:
'
距离结束
'
,
plugins_limitedtimediscount_is_show_time
:
true
,
plugins_limitedtimediscount_timer
:
null
,
// 购买记录插件
plugins_salerecords_data
:
null
,
},
onShow
()
{
...
...
@@ -77,6 +80,7 @@ Page({
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
,
plugins_limitedtimediscount_is_valid
:
((
data
.
plugins_limitedtimediscount_data
||
null
)
!=
null
&&
(
data
.
plugins_limitedtimediscount_data
.
is_valid
||
0
)
==
1
)
?
1
:
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 导航购物车处理
...
...
sourcecode/toutiao/default/pages/index/index.ttml
浏览文件 @
af338feb
...
...
@@ -62,6 +62,29 @@
</view>
</view>
</block>
<!-- 底部购买记录 -->
<view tt:if="{{(plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0}}" class="spacing-mb plugins-salerecords bg-white">
<view class="spacing-nav-title br-b">
<text class="line"></text>
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
</view>
<view tt:for="{{plugins_salerecords_data.data}}" tt:key="key" class="item oh br-b padding-sm">
<view class="item-content single-text fl">
<image mode="widthFix" src="{{item.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{item.user.user_name_view}}</text>
<text tt:if="{{(item.user.province || null) != null}}"> - {{item.user.province}}</text>
</view>
<view class="item-content fl">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
<text class="margin-left-sm">{{item.title}}</text>
</navigator>
</view>
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
</view>
</view>
<view tt:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.ttml" />
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
...
...
sourcecode/toutiao/default/pages/index/index.ttss
浏览文件 @
af338feb
...
...
@@ -102,7 +102,7 @@
/*
* 限时秒杀 - 插件
*/
.limitedtimediscount {
.limitedtimediscount {
background: #fff;
padding: 5rpx 10rpx 20rpx 10rpx;
margin-bottom: 20rpx;
...
...
@@ -200,4 +200,22 @@
position: absolute;
right: 15rpx;
bottom: 15rpx;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords image {
width: 50rpx !important;
height: 50rpx !important;
border-radius: 50%;
}
.plugins-salerecords .item-content {
width: 24%;
}
.plugins-salerecords .item-content:nth-child(1) {
width: 36%;
}
.plugins-salerecords .item-content:nth-child(2) {
width: 40%;
}
\ No newline at end of file
sourcecode/weixin/default/app.wxss
浏览文件 @
af338feb
...
...
@@ -102,6 +102,7 @@ textarea {
.dis-none { display: none; }
.dis-block { display: block; }
.dis-inline { display: inline; }
.va-m { vertical-align: middle; }
.cr-main { color: #d2364c; }
.cr-666 { color: #666; }
...
...
@@ -489,6 +490,25 @@ button[disabled].bg-primary {
/**
* 公共样式
*/
.margin-xs {
margin: 5rpx;
}
.margin-sm {
margin: 10rpx;
}
.margin, .margin-default {
margin: 15rpx;
}
.margin-lg {
margin: 20rpx;
}
.margin-xl {
margin: 25rpx;
}
.margin-xxl {
margin: 30rpx;
}
.margin-top-xs {
margin-top: 5rpx;
}
...
...
@@ -565,6 +585,26 @@ button[disabled].bg-primary {
margin-bottom: 30rpx;
}
.padding-xs {
padding: 5rpx;
}
.padding-sm {
padding: 10rpx;
}
.padding, .padding-default {
padding: 15rpx;
}
.padding-lg {
padding: 20rpx;
}
.padding-xl {
padding: 25rpx;
}
.padding-xxl {
padding: 30rpx;
}
.padding-top-xs {
padding-top: 5rpx;
}
...
...
sourcecode/weixin/default/pages/goods-detail/goods-detail.js
浏览文件 @
af338feb
...
...
@@ -66,6 +66,12 @@ Page({
plugins_coupon_data
:
null
,
temp_coupon_receive_index
:
null
,
temp_coupon_receive_value
:
null
,
// 购买记录
plugins_salerecords_data
:
null
,
plugins_salerecords_timer
:
null
,
plugins_salerecords_tips_content
:
null
,
plugins_salerecords_tips_ent
:
''
,
},
onLoad
(
params
)
{
...
...
@@ -171,6 +177,8 @@ Page({
plugins_coupon_data
:
data
.
plugins_coupon_data
||
null
,
quick_nav_cart_count
:
data
.
common_cart_total
||
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 限时秒杀倒计时
...
...
@@ -184,6 +192,9 @@ Page({
// 不能选择规格处理
this
.
goods_specifications_choose_handle_dont
(
0
);
// 购买记录提示
this
.
plugins_salerecords_tips_handle
();
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
...
...
@@ -768,10 +779,50 @@ Page({
}
},
// 购买记录提示处理
plugins_salerecords_tips_handle
()
{
// 销毁之前的任务
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
// 是否存在数据
var
data
=
this
.
data
.
plugins_salerecords_data
||
null
;
if
(
data
!=
null
&&
(
data
.
data
||
null
)
!=
null
&&
data
.
data
.
length
>
0
)
{
var
self
=
this
;
var
base
=
data
.
base
||
null
;
var
location
=
(
base
==
null
||
(
base
.
goods_detail_tips_location
||
null
)
==
null
)
?
''
:
'
-
'
+
base
.
goods_detail_tips_location
;
var
pause
=
(
base
==
null
?
5
:
(
base
.
goods_detail_time_pause
||
5
))
*
1000
;
var
interval
=
(
base
==
null
?
10
:
(
base
.
goods_detail_time_interval
||
10
))
*
1000
;
var
index
=
0
;
var
list
=
data
.
data
;
var
count
=
list
.
length
;
var
timer
=
setInterval
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
list
[
index
]});
setTimeout
(
function
()
{
self
.
setData
({
plugins_salerecords_tips_content
:
null
});
},
pause
);
// 索引处理
index
++
;
if
(
index
>=
count
)
{
index
=
0
;
}
},
interval
);
self
.
setData
({
plugins_salerecords_timer
:
timer
,
plugins_salerecords_tips_ent
:
location
});
}
},
// 页面销毁时执行
onUnload
:
function
()
{
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timer
);
clearInterval
(
this
.
data
.
plugins_limitedtimediscount_timers
);
clearInterval
(
this
.
data
.
plugins_salerecords_timer
);
},
// 商品海报分享
...
...
sourcecode/weixin/default/pages/goods-detail/goods-detail.wxml
浏览文件 @
af338feb
...
...
@@ -271,6 +271,12 @@
</view>
</view>
</component-popup>
<!-- 购买记录 -->
<view wx:if="{{(plugins_salerecords_tips_content || null) != null}}" class="plugins-salerecords-tips{{plugins_salerecords_tips_ent}}">
<image mode="widthFix" src="{{plugins_salerecords_tips_content.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{plugins_salerecords_tips_content.tips}}</text>
</view>
</view>
<view wx:if="{{goods == null}}">
...
...
sourcecode/weixin/default/pages/goods-detail/goods-detail.wxss
浏览文件 @
af338feb
...
...
@@ -437,4 +437,65 @@
}
.goods-panel-container view:not(:first-child) {
border-top: 1px dashed #fff1f2;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords-tips,
.plugins-salerecords-tips-top-left,
.plugins-salerecords-tips-top-right,
.plugins-salerecords-tips-bottom-left,
.plugins-salerecords-tips-bottom-right,
.plugins-salerecords-tips-top-center,
.plugins-salerecords-tips-bottom-center {
position: fixed;
left: calc(50% - 170rpx);
top: 50%;
background: rgb(0 0 0 / 60%);
border-radius: 60rpx;
padding: 8rpx 20rpx;
color: #fff;
z-index: 110;
-webkit-box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
-moz-box-shadow: 0 8px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 8px 10px rgb(0 0 0 / 20%);
}
.plugins-salerecords-tips image ,
.plugins-salerecords-tips-top-left image ,
.plugins-salerecords-tips-top-right image ,
.plugins-salerecords-tips-bottom-left image ,
.plugins-salerecords-tips-bottom-right image,
.plugins-salerecords-tips-top-center image,
.plugins-salerecords-tips-bottom-center image {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.plugins-salerecords-tips-top-left {
left: 5%;
top: 5%;
}
.plugins-salerecords-tips-top-right {
right: 5%;
top: 5%;
left: auto;
}
.plugins-salerecords-tips-bottom-left {
left: 5%;
bottom: 10%;
top: auto;
}
.plugins-salerecords-tips-bottom-right {
right: 5%;
bottom: 10%;
left: auto;
top: auto;
}
.plugins-salerecords-tips-top-center {
top: 5%;
}
.plugins-salerecords-tips-bottom-center {
bottom: 10%;
top: auto;
}
\ No newline at end of file
sourcecode/weixin/default/pages/index/index.js
浏览文件 @
af338feb
...
...
@@ -22,6 +22,9 @@ Page({
plugins_limitedtimediscount_timer_title
:
'
距离结束
'
,
plugins_limitedtimediscount_is_show_time
:
true
,
plugins_limitedtimediscount_timer
:
null
,
// 购买记录插件
plugins_salerecords_data
:
null
,
},
onShow
()
{
...
...
@@ -80,6 +83,7 @@ Page({
data_list_loding_status
:
data
.
data_list
.
length
==
0
?
0
:
3
,
plugins_limitedtimediscount_data
:
data
.
plugins_limitedtimediscount_data
||
null
,
plugins_limitedtimediscount_is_valid
:
((
data
.
plugins_limitedtimediscount_data
||
null
)
!=
null
&&
(
data
.
plugins_limitedtimediscount_data
.
is_valid
||
0
)
==
1
)
?
1
:
0
,
plugins_salerecords_data
:
((
data
.
plugins_salerecords_data
||
null
)
==
null
||
data
.
plugins_salerecords_data
.
length
<=
0
)
?
null
:
data
.
plugins_salerecords_data
,
});
// 导航购物车处理
...
...
sourcecode/weixin/default/pages/index/index.wxml
浏览文件 @
af338feb
...
...
@@ -59,6 +59,29 @@
</view>
</view>
</block>
<!-- 底部购买记录 -->
<view wx:if="{{(plugins_salerecords_data || null) != null && (plugins_salerecords_data.data || null) != null && plugins_salerecords_data.data.length > 0}}" class="spacing-mb plugins-salerecords bg-white">
<view class="spacing-nav-title br-b">
<text class="line"></text>
<text class="text-wrapper">{{plugins_salerecords_data.base.home_bottom_title || '最新购买'}}</text>
</view>
<view wx:for="{{plugins_salerecords_data.data}}" wx:key="key" class="item oh br-b padding-sm">
<view class="item-content single-text fl">
<image mode="widthFix" src="{{item.user.avatar}}" class="va-m br" />
<text class="margin-left-sm">{{item.user.user_name_view}}</text>
<text wx:if="{{(item.user.province || null) != null}}"> - {{item.user.province}}</text>
</view>
<view class="item-content fl">
<navigator url="/pages/goods-detail/goods-detail?goods_id={{item.goods_id}}" hover-class="none" class="single-text">
<image mode="widthFix" src="{{item.images}}" class="va-m br" />
<text class="margin-left-sm">{{item.title}}</text>
</navigator>
</view>
<view class="item-content single-text fr tr padding-top-xs">{{item.add_time}}</view>
</view>
</view>
<view wx:if="{{data_list.length == 0}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status}}"></template>
...
...
sourcecode/weixin/default/pages/index/index.wxss
浏览文件 @
af338feb
...
...
@@ -102,7 +102,7 @@
/*
* 限时秒杀 - 插件
*/
.limitedtimediscount {
.limitedtimediscount {
background: #fff;
padding: 5rpx 10rpx 20rpx 10rpx;
margin-bottom: 20rpx;
...
...
@@ -200,4 +200,22 @@
position: absolute;
right: 15rpx;
bottom: 15rpx;
}
/**
* 购买记录 - 插件
*/
.plugins-salerecords image {
width: 50rpx !important;
height: 50rpx !important;
border-radius: 50%;
}
.plugins-salerecords .item-content {
width: 24%;
}
.plugins-salerecords .item-content:nth-child(1) {
width: 36%;
}
.plugins-salerecords .item-content:nth-child(2) {
width: 40%;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录