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
c8f6faad
Commit
c8f6faad
authored
Aug 27, 2021
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addxx
parent
d80bb73d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
19 deletions
+45
-19
pages/specsShop/specsShop.vue
pages/specsShop/specsShop.vue
+43
-17
utils/debug.js
utils/debug.js
+2
-2
No files found.
pages/specsShop/specsShop.vue
View file @
c8f6faad
...
...
@@ -51,23 +51,28 @@
</view>
</view>
<view
class=
"cleelable flex ali-c"
>
<view
v-show=
"seckill_close==1"
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
秒杀价
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"
number
"
value=
""
v-model=
"item.seckill_price"
placeholder=
"请输入秒杀价"
></input>
<input
class=
"input"
type=
"
digit
"
value=
""
v-model=
"item.seckill_price"
placeholder=
"请输入秒杀价"
></input>
</view>
</view>
<view
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
拼团价
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"
number
"
value=
""
v-model=
"item.pt_price"
placeholder=
"请输入秒杀价"
></input>
<input
class=
"input"
type=
"
digit
"
value=
""
v-model=
"item.pt_price"
placeholder=
"请输入秒杀价"
></input>
</view>
</view>
<view
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
会员价
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"digit"
value=
""
v-model=
"item.min_price"
placeholder=
"请输入会员价"
></input>
</view>
</view>
<view
v-show=
"seckill_close==1"
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
限购数量
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"number"
value=
""
v-model=
"item.limit_num"
placeholder=
"请输入限购数量"
@
input=
"isInt"
></input>
...
...
@@ -76,7 +81,7 @@
</view>
<view
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
秒杀
库存
</view>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
库存
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"number"
v-model=
"item.store_count"
value=
""
placeholder=
"请输入库存"
@
input=
"isInt"
></input>
</view>
...
...
@@ -165,7 +170,10 @@
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
],
//勾选的数据
endobjdata
:[],
//最后的end 是组装出来的数据
endobjdata
:[],
//最后的end 是组装出来的数据
//秒杀相关的开关
seckill_close
:
0
,
//0关闭 1打开
};
},
computed
:{
...
...
@@ -191,7 +199,7 @@
isInt
(
e
){
console
.
log
(
e
)
if
(
!
this
.
isInteger
(
e
.
detail
.
value
)){
this
.
$api
.
msg
(
"
秒杀
库存或限购数量不能为小数!!
"
);
this
.
$api
.
msg
(
"
库存或限购数量不能为小数!!
"
);
}
},
...
...
@@ -262,7 +270,7 @@
// store_count:'',
console
.
log
(
this
.
endobjdata
)
isbool
=
this
.
endobjdata
.
every
((
item
,
index
)
=>
{
return
item
.
price
!=
""
&&
item
.
store_count
!=
""
&&
item
.
limit_num
!=
""
&&
item
.
seckill_price
!=
""
&&
item
.
pt_price
!=
""
;
return
item
.
price
!=
""
&&
item
.
store_count
!=
""
&&
item
.
limit_num
!=
""
&&
item
.
seckill_price
!=
""
&&
item
.
pt_price
!=
""
&&
item
.
min_price
!=
""
;
})
if
(
!
isbool
){
...
...
@@ -275,17 +283,34 @@
return
false
;
}
if
(
this
.
endobjdata
[
0
].
activity_price
==
""
||
this
.
endobjdata
[
0
].
store_count
==
""
||
this
.
endobjdata
[
0
].
limit_num
==
""
){
this
.
$api
.
msg
(
"
请填写完整秒杀数据
"
);
return
false
;
if
(
this
.
seckill_close
==
1
){
if
(
this
.
endobjdata
[
0
].
activity_price
==
""
||
this
.
endobjdata
[
0
].
store_count
==
""
||
this
.
endobjdata
[
0
].
limit_num
==
""
){
this
.
$api
.
msg
(
"
请填写完整秒杀数据
"
);
return
false
;
}
}
if
(
!
this
.
isInteger
(
this
.
endobjdata
[
0
].
limit_num
)
||
!
this
.
isInteger
(
this
.
endobjdata
[
0
].
store_count
)){
this
.
$api
.
msg
(
"
秒杀库存或限购数量不能为小数!
"
);
//限购数量
if
(
!
this
.
endobjdata
[
0
].
limit_num
&&
this
.
seckill_close
==
1
){
this
.
$api
.
msg
(
"
限购数量不能为小数!
"
);
return
false
;
}
//库存
if
(
!
this
.
endobjdata
[
0
].
store_count
){
this
.
$api
.
msg
(
"
库存不能为小数!
"
);
return
false
;
}
//关闭秒杀的时候 秒杀价就是售价
if
(
this
.
seckill_close
==
0
){
this
.
endobjdata
=
this
.
endobjdata
.
map
((
item
,
index
)
=>
{
item
.
seckill_price
=
item
.
price
;
item
.
limit_num
=
1
;
return
item
;
})
}
addEditProductSpec
({
...
...
@@ -319,7 +344,8 @@
console
.
log
(
res
,
"
goodsSpec
"
)
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
seckill_close
=
res
.
data
.
seckill_close
;
//秒杀的填写项的开关
this
.
goodsSpec_goodsType
=
res
.
data
.
goodsType
;
this
.
goodsSpec_info
=
res
.
data
.
info
;
if
(
res
.
data
.
info
!=
null
){
...
...
@@ -469,7 +495,7 @@
if
(
sarrobj
[
0
].
length
!=
0
){
let
endobjdata
=
sarrobj
.
map
((
item
,
index
)
=>
{
// sarr[index].replace(/,/g,'_')
let
objsdata
=
{
key_name
:
sarr
[
index
].
join
(
"
"
),
spec_id
:
sarrobjtwo
[
index
].
join
(
"
_
"
),
key
:
sarrobj
[
index
].
join
(
"
_
"
),
price
:
""
,
store_count
:
""
,
sku
:
""
,
spec_img
:
""
,
cost_price
:
""
,
pt_price
:
""
};
let
objsdata
=
{
key_name
:
sarr
[
index
].
join
(
"
"
),
spec_id
:
sarrobjtwo
[
index
].
join
(
"
_
"
),
key
:
sarrobj
[
index
].
join
(
"
_
"
),
price
:
""
,
store_count
:
""
,
sku
:
""
,
spec_img
:
""
,
cost_price
:
""
,
pt_price
:
""
,
min_price
:
""
};
return
objsdata
;
})
...
...
utils/debug.js
View file @
c8f6faad
...
...
@@ -5,8 +5,8 @@ module.exports = {
isdebug
:
false
,
//正式
//
isdebug:true,//测试
//
isdebug:false,//正式
isdebug
:
true
,
//测试
// 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