Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
lumastoreapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xieyishang
lumastoreapp
Commits
cfd4a4c9
Commit
cfd4a4c9
authored
May 16, 2020
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sss~
parent
ddfbb107
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
17 deletions
+60
-17
pages/CardSend/CardSend.vue
pages/CardSend/CardSend.vue
+51
-15
utils/api/coupon.js
utils/api/coupon.js
+7
-0
utils/debug.js
utils/debug.js
+2
-2
No files found.
pages/CardSend/CardSend.vue
View file @
cfd4a4c9
...
...
@@ -124,8 +124,9 @@
</view>
<view
class=
"submitbtns"
v-show=
"!parameter.id"
:class=
"
{active:istruesub}" @tap="coupons" >确定发放
</view>
<view
class=
"submitbtns"
v-show=
"parameter.id"
:class=
"
{active:istruesub}" @tap="coupons" >编辑提交
</view>
<view
class=
"submitbtns flexc"
v-show=
"!parameter.id"
:class=
"
{active:istruesub}" @tap="coupons" >确定发放
</view>
<view
class=
"submitbtns flexc"
v-show=
"parameter.id"
:class=
"
{active:istruesub}" @tap="coupons" >编辑提交
</view>
<view
class=
"submitbtns flexc"
v-show=
"parameter.id"
:class=
"
{active:istruesub}" @tap="colesedit" >取消编辑
</view>
</view>
...
...
@@ -171,7 +172,7 @@
</view>
<
!--
<empty
v-if=
"cardlist.length==0"
></empty>
--
>
<
empty
v-if=
"cardlist.length==0"
></empty
>
</view>
...
...
@@ -216,14 +217,17 @@
<w-picker
mode=
"range"
startYear=
"2019"
endYear=
"202
9
"
endYear=
"202
5
"
:defaultVal=
"defaultVal"
:current=
"
fals
e"
:current=
"
tru
e"
@
confirm=
"onConfirm"
:selectList=
"[]"
themeColor=
"#ff6900"
ref=
"picker"
></w-picker>
</view>
...
...
@@ -232,13 +236,13 @@
<
script
>
import
uniPopup
from
'
@/components/uni-popup/uni-popup.vue
'
import
wPicker
from
"
@/components/w-picker/w-picker.vue
"
;
//时间弹窗
import
{
couponList
,
closedCoupons
,
couponGoods
,
addEditCoupons
}
from
"
@/utils/api/coupon.js
"
//
import empty from "@/components/empty/empty.vue"
import
{
couponList
,
closedCoupons
,
couponGoods
,
addEditCoupons
,
couponsDetails
}
from
"
@/utils/api/coupon.js
"
import
empty
from
"
@/components/empty/empty.vue
"
export
default
{
components
:{
uniPopup
,
wPicker
,
//
empty,
empty
,
},
data
()
{
return
{
...
...
@@ -307,6 +311,30 @@
},
methods
:{
//取消编辑
colesedit
(){
this
.
parameter
=
{
at_least
:
""
,
//满多少可以用
count
:
""
,
//发放数量
coupon_name
:
""
,
//优惠券名称
end_time
:
""
,
//结束时间
start_time
:
""
,
//开始时间
give_type
:
"
1
"
,
//发放范围 1本地 2本地区 3全网
goods_id
:
[],
//可用商品 "1810", "5905", "5910"
max_fetch
:
""
,
//每人最大可以使用
money
:
""
,
//金额
range_type
:
"
1
"
,
//参与的商品 1全部 0部分
//id:"", //优惠劵id 编辑必传
action
:
"
add
"
,
//编辑必传 方式(添加add,修改edit)
}
let
list
=
this
.
shoplist
list
.
map
((
item
,
index
)
=>
{
item
.
checked
=
false
;
return
item
;
})
this
.
shoplist
=
list
;
},
//接口start
//获取商城商品
...
...
@@ -318,6 +346,7 @@
let
list
=
res
.
data
;
list
.
map
((
item
,
index
)
=>
{
item
.
product_id
=
item
.
product_id
.
toString
();
item
.
checked
=
false
;
return
item
;
})
this
.
shoplist
=
list
;
...
...
@@ -384,7 +413,9 @@
},
//优惠券详情 编辑使用
async
detailsFun
(
item
){
//let res = await details(item.id);
let
res
=
await
couponsDetails
({
id
:
item
.
id
});
if
(
item
){
//this.shoplist = res.data.coupons_goods;
...
...
@@ -403,14 +434,19 @@
id
:
item
.
id
,
action
:
"
edit
"
,
}
let
iddata
=
[];
//
let iddata = [];
this
.
shoplist
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
checked
){
iddata
.
push
(
item
.
product_id
);
this
.
shoplist
=
this
.
shoplist
.
map
((
item
,
index
)
=>
{
//参与的商品默认选中的
console
.
info
(
res
.
data
.
goods_ids
.
indexOf
(
item
.
product_id
),
"
1242
"
);
if
(
res
.
data
.
goods_ids
.
indexOf
(
Number
(
item
.
product_id
))
!=-
1
){
item
.
checked
=
true
;
}
else
{
item
.
checked
=
false
;
}
return
item
})
parameter
.
goods_id
=
iddata
;
parameter
.
goods_id
=
res
.
data
.
goods_ids
;
this
.
parameter
=
parameter
;
...
...
utils/api/coupon.js
View file @
cfd4a4c9
...
...
@@ -34,3 +34,10 @@ export function addEditCoupons(data)
{
return
request
.
post
(
"
Coupon/addEditCoupons
"
,
data
,{
noAuth
:
true
});
}
//修改的时候 获取优惠券详情
export
function
couponsDetails
(
data
)
{
return
request
.
post
(
"
Coupon/couponsDetails
"
,
data
,{
noAuth
:
true
});
}
utils/debug.js
View file @
cfd4a4c9
...
...
@@ -2,8 +2,8 @@
//环境变量 这个是 鹿马商家助手的 商家助手的~~~~
module
.
exports
=
{
//是否为开发调试环境 true为本地环境 false 为正式环境
isdebug
:
true
,
//测试
//
isdebug:false,//正式
//
isdebug:true,//测试
isdebug
:
false
,
//正式
xqdebug
:
false
,
//正式权限
// xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment