Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
dc5ca2bd
ShopXO
项目概览
jcy2004x
/
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,发现更多精彩内容 >>
提交
dc5ca2bd
编写于
10月 12, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
小程序优惠劵
上级
f04cddcb
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
31 addition
and
20 deletion
+31
-20
application/api/controller/Coupon.php
application/api/controller/Coupon.php
+0
-1
public/appmini/old/weixin/pages/user-coupon/user-coupon.js
public/appmini/old/weixin/pages/user-coupon/user-coupon.js
+22
-9
public/appmini/old/weixin/pages/user-coupon/user-coupon.json
public/appmini/old/weixin/pages/user-coupon/user-coupon.json
+1
-1
public/appmini/old/weixin/pages/user-coupon/user-coupon.wxml
public/appmini/old/weixin/pages/user-coupon/user-coupon.wxml
+8
-9
未找到文件。
application/api/controller/Coupon.php
浏览文件 @
dc5ca2bd
...
...
@@ -45,7 +45,6 @@ class Coupon extends Common
*/
public
function
User
()
{
//sleep(5);
$coupon_params
=
[
'user'
=>
$this
->
user
,
'where'
=>
[
...
...
public/appmini/old/weixin/pages/user-coupon/user-coupon.js
浏览文件 @
dc5ca2bd
...
...
@@ -39,9 +39,11 @@ Page({
get_data_list
()
{
var
self
=
this
;
wx
.
showLoading
({
title
:
"
加载中...
"
});
if
(
this
.
data
.
data_list
==
null
||
(
this
.
data
.
data_list
[
this
.
data
.
nav_tabs_value
]
||
null
)
==
null
||
this
.
data
.
data_list
[
this
.
data
.
nav_tabs_value
].
length
<=
0
)
{
this
.
setData
({
data_list_loding_status
:
1
});
}
wx
.
request
({
url
:
app
.
get_request_url
(
"
user
"
,
"
coupon
"
),
...
...
@@ -54,13 +56,12 @@ Page({
if
(
res
.
data
.
code
==
0
)
{
self
.
setData
({
data_list
:
res
.
data
.
data
||
null
,
data_bottom_line_status
:
true
,
data_list_loding_status
:
3
,
data_list_loding_msg
:
''
,
});
self
.
data_view_handle
();
}
else
{
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
res
.
data
.
msg
,
});
...
...
@@ -71,6 +72,7 @@ Page({
wx
.
hideLoading
();
wx
.
stopPullDownRefresh
();
self
.
setData
({
data_bottom_line_status
:
false
,
data_list_loding_status
:
2
,
data_list_loding_msg
:
'
服务器请求出错
'
,
});
...
...
@@ -79,11 +81,22 @@ Page({
});
},
// 数据处理
data_view_handle
()
{
var
status
=
0
;
if
(
this
.
data
.
data_list
!=
null
&&
(
this
.
data
.
data_list
[
this
.
data
.
nav_tabs_value
]
||
null
)
!=
null
&&
this
.
data
.
data_list
[
this
.
data
.
nav_tabs_value
].
length
>
0
)
{
status
=
3
;
}
this
.
setData
({
data_list_loding_status
:
status
,
data_bottom_line_status
:
(
status
==
3
),
});
},
// 导航事件
nav_tabs_event
(
e
)
{
var
index
=
e
.
currentTarget
.
dataset
.
index
;
var
value
=
e
.
currentTarget
.
dataset
.
value
;
this
.
setData
({
nav_tabs_value
:
value
});
this
.
setData
({
nav_tabs_value
:
e
.
currentTarget
.
dataset
.
value
});
this
.
data_view_handle
();
},
// 下拉刷新
...
...
public/appmini/old/weixin/pages/user-coupon/user-coupon.json
浏览文件 @
dc5ca2bd
{
"
usingComponents"
:
{}
"
enablePullDownRefresh"
:
true
}
\ No newline at end of file
public/appmini/old/weixin/pages/user-coupon/user-coupon.wxml
浏览文件 @
dc5ca2bd
...
...
@@ -19,8 +19,8 @@
<text class="unit">{{item.coupon.type == 0 ? '元' : '折'}}</text>
<text wx:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666
single-text
">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888
single-text
">{{item.time_start_text}} 至 {{item.time_end_text}}</view>
</view>
<navigator url="/pages/index/index" open-type="switchTab" hover-class="none">
<view class="v-right fr" style="background:{{item.coupon.bg_color_value}};">
...
...
@@ -43,8 +43,8 @@
<text class="unit">{{item.coupon.type == 0 ? '元' : '折'}}</text>
<text wx:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888
">{{item.time_start_text}} 至 {{item.time_end
_text}}</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666
single-text
">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888
single-text">使用 {{item.use_time
_text}}</view>
</view>
<view class="v-right fr">
<text class="circle"></text>
...
...
@@ -65,8 +65,8 @@
<text class="unit">{{item.coupon.type == 0 ? '元' : '折'}}</text>
<text wx:if="{{(item.coupon.desc || null) != null}}" class="desc cr-888">{{item.coupon.desc}}</text>
</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888
">{{item.time_start_text}} 至
{{item.time_end_text}}</view>
<view wx:if="{{(item.coupon.use_limit_type_name || null) != null}}" class="base-tips cr-666
single-text
">{{item.coupon.use_limit_type_name}}</view>
<view class="base-time cr-888
single-text">过期
{{item.time_end_text}}</view>
</view>
<view class="v-right fr">
<text class="circle"></text>
...
...
@@ -78,10 +78,9 @@
</view>
</view>
<view wx:if="{{data_list
== null
}}">
<view wx:if="{{data_list
_loding_status != 3
}}">
<import src="/pages/common/nodata.wxml" />
<template is="nodata" data="{{status: data_list_loding_status}}">
</template>
<template is="nodata" data="{{status: data_list_loding_status, msg: data_list_loding_msg}}"></template>
</view>
<import src="/pages/common/bottom_line.wxml" />
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录