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
282c77f4
Commit
282c77f4
authored
Dec 12, 2020
by
home
Browse files
Options
Browse Files
Download
Plain Diff
zxf
parents
f1fa365d
77ea1ba6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
190 deletions
+159
-190
App.vue
App.vue
+1
-2
components/plan-image-upload/up_img.vue
components/plan-image-upload/up_img.vue
+4
-10
manifest.json
manifest.json
+4
-19
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+149
-159
utils/debug.js
utils/debug.js
+1
-0
No files found.
App.vue
View file @
282c77f4
...
@@ -4,7 +4,6 @@
...
@@ -4,7 +4,6 @@
const
time
=
''
;
const
time
=
''
;
import
{
newsRemind
}
from
"
@/utils/api/api.js
"
;
//获取商家消息
import
{
newsRemind
}
from
"
@/utils/api/api.js
"
;
//获取商家消息
export
default
{
export
default
{
onLaunch
:
function
()
{
onLaunch
:
function
()
{
if
(
platform
==
'
ios
'
){
if
(
platform
==
'
ios
'
){
...
@@ -22,8 +21,8 @@
...
@@ -22,8 +21,8 @@
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
//app关闭默认的启动 方法关闭启动图。但是这个时间不能太晚,6s 超时后依旧会主动关闭。
setTimeout
(()
=>
{
setTimeout
(()
=>
{
plus
.
navigator
.
closeSplashscreen
();
plus
.
navigator
.
closeSplashscreen
();
},
100
);
},
100
);
uni
.
getNetworkType
({
//查看是否有网络
uni
.
getNetworkType
({
//查看是否有网络
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
networkType
==
'
none
'
){
if
(
res
.
networkType
==
'
none
'
){
...
...
components/plan-image-upload/up_img.vue
View file @
282c77f4
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<view
v-if=
"isShowAdd"
class=
"imageUpload"
@
tap=
"selectImage"
>
+
</view>
<view
v-if=
"isShowAdd"
class=
"imageUpload"
@
tap=
"selectImage"
>
+
</view>
</view>
</view>
<image
v-if=
"showMoveImage"
class=
"moveImage"
:style=
"
{left:posMoveImageLeft, top:posMoveImageTop}" :src="moveImagePath">
</image>
<image
v-if=
"showMoveImage"
class=
"moveImage"
:style=
"
{left:posMoveImageLeft, top:posMoveImageTop}" :src="moveImagePath">
</image>
<view
class=
"showname"
>
请添加奖品
图片
</view>
<view
class=
"showname"
style=
"margin-left: 20upx;"
>
请添加
图片
</view>
</view>
</view>
</
template
>
</
template
>
...
@@ -41,7 +41,6 @@
...
@@ -41,7 +41,6 @@
},
},
watch
:{
watch
:{
value
(){
value
(){
console
.
log
(
this
.
value
,
'
帆帆帆帆
'
)
}
}
},
},
computed
:{
computed
:{
...
@@ -135,14 +134,9 @@
...
@@ -135,14 +134,9 @@
},
},
name
:
keyname
,
name
:
keyname
,
success
:
function
(
res
){
success
:
function
(
res
){
console
.
log
(
JSON
.
parse
(
res
.
data
),
'
成功了啊啊
'
)
if
(
res
.
statusCode
===
200
){
if
(
res
.
statusCode
===
200
){
_self
.
value
.
push
(
JSON
.
parse
(
res
.
data
))
_self
.
value
.
push
(
JSON
.
parse
(
res
.
data
))
completeImages
++
completeImages
++
if
(
_self
.
showUploadProgress
){
if
(
_self
.
showUploadProgress
){
uni
.
showToast
({
uni
.
showToast
({
title
:
'
上传进度:
'
+
completeImages
+
'
/
'
+
imagePathArr
.
length
,
title
:
'
上传进度:
'
+
completeImages
+
'
/
'
+
imagePathArr
.
length
,
...
@@ -151,7 +145,7 @@
...
@@ -151,7 +145,7 @@
duration
:
1000
duration
:
1000
});
});
}
}
console
.
log
(
'
success to upload image:
'
+
res
.
data
)
//
console.log('success to upload image: ' + res.data)
resolve
(
'
success to upload image:
'
+
remoteUrlIndex
)
resolve
(
'
success to upload image:
'
+
remoteUrlIndex
)
}
else
{
}
else
{
console
.
log
(
'
fail to upload image:
'
+
res
.
data
)
console
.
log
(
'
fail to upload image:
'
+
res
.
data
)
...
@@ -365,8 +359,8 @@
...
@@ -365,8 +359,8 @@
}
}
.imageItem
,
.imageUpload
{
.imageItem
,
.imageUpload
{
width
:
20
0
upx
;
width
:
19
0
upx
;
height
:
20
0
upx
;
height
:
19
0
upx
;
margin
:
0
20
upx
30
upx
0
;
margin
:
0
20
upx
30
upx
0
;
}
}
.imageItem
:nth-child
(
3n
)
{
.imageItem
:nth-child
(
3n
)
{
...
...
manifest.json
View file @
282c77f4
...
@@ -126,9 +126,9 @@
...
@@ -126,9 +126,9 @@
},
},
"splashscreen"
:
{
"splashscreen"
:
{
"android"
:
{
"android"
:
{
"hdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"hdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
},
},
"ios"
:
{
"ios"
:
{
"iphone"
:
{
"iphone"
:
{
...
@@ -164,22 +164,7 @@
...
@@ -164,22 +164,7 @@
}
}
},
},
"compilerVersion"
:
2
,
"compilerVersion"
:
2
,
"nativePlugins"
:
{
"nativePlugins"
:
{}
"HG-Background"
:
{
"__plugin_info__"
:
{
"name"
:
"保活 前台运行"
,
"description"
:
"用于提高app存活概率或添加前台显示 q群:219508489"
,
"platforms"
:
"Android"
,
"url"
:
"https://ext.dcloud.net.cn/plugin?id=2203"
,
"android_package_name"
:
"com.app.lumastore"
,
"ios_bundle_id"
:
""
,
"isCloud"
:
true
,
"bought"
:
1
,
"pid"
:
"2203"
,
"parameters"
:
{}
}
}
}
},
},
/*
快应用特有相关
*/
/*
快应用特有相关
*/
"quickapp"
:
{},
"quickapp"
:
{},
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
282c77f4
...
@@ -226,20 +226,46 @@
...
@@ -226,20 +226,46 @@
</view>
</view>
<view
class=
"addmigs"
>
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
缩略图
<text
style=
"color: red;"
>
(必传)
</text></view>
<view
class=
"titlehe"
>
产品
缩略图
<text
style=
"color: red;"
>
(必传)
</text></view>
<robby-image-upload
<robby-image-upload
fileKeyName=
"img"
fileKeyName=
"img"
:value=
"c_pics"
:value=
"c_pics"
:server-url=
"uploadurl1+'/merchant.php/FileUpload/uploadify'"
:server-url=
"uploadurl1+'/merchant.php/FileUpload/uploadify'"
:form-data=
"c_formData"
:form-data=
"c_formData"
:server-url-delete-image=
"uploadurl1"
@
add=
"c_onImg"
@
delete=
"c_delImage"
@
delete=
"c_delImage"
@
add=
"c_onImg1"
@
move=
"onMove_c"
:limit=
"1"
:limit=
"1"
>
>
</robby-image-upload>
</robby-image-upload>
</view>
</view>
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
产品轮播图
<text
style=
"color: red;"
>
(必传)
</text></view>
<robby-image-upload
fileKeyName=
"img"
:value=
"c_pics1"
:server-url=
"uploadurl1+'/merchant.php/FileUpload/uploadify'"
:form-data=
"c_formData"
@
add=
"c_onImg1"
@
delete=
"c_delImage1"
:limit=
"4"
>
</robby-image-upload>
</view>
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
产品详情图
</view>
<robby-image-upload
fileKeyName=
"img"
:value=
"c_pics2"
:server-url=
"uploadurl1+'/merchant.php/FileUpload/uploadify'"
:form-data=
"c_formData"
@
add=
"c_onImg2"
@
delete=
"c_delImage2"
:limit=
"9"
>
</robby-image-upload>
</view>
<!-- 多选列表 勾选的位置 -->
<!-- 多选列表 勾选的位置 -->
<view
class=
"checkboxs"
>
<view
class=
"checkboxs"
>
<view
class=
"title"
>
属性:
</view>
<view
class=
"title"
>
属性:
</view>
...
@@ -363,7 +389,6 @@
...
@@ -363,7 +389,6 @@
name
:
'
减少库存
'
,
name
:
'
减少库存
'
,
checked
:
'
2
'
checked
:
'
2
'
}],
}],
// issancodeType:1,
ischeckedtime
:[
0
],
//默认选中,
ischeckedtime
:[
0
],
//默认选中,
myProps
:
{
myProps
:
{
label
:
'
cate_name
'
,
label
:
'
cate_name
'
,
...
@@ -372,37 +397,37 @@
...
@@ -372,37 +397,37 @@
name
:
'
product
'
,
name
:
'
product
'
,
result
:[],
result
:[],
form
:
{
form
:
{
mandatory
:
'
2
'
,
//
mandatory:'2',
linkage_id
:
''
,
//
linkage_id:'',
//cost_price 成本价 stock 商品库存purchase 进货价钱code 条形编码commission 返佣比例original_name 原始商品名
//
//
cost_price 成本价 stock 商品库存purchase 进货价钱code 条形编码commission 返佣比例original_name 原始商品名
specifications
:
''
,
//商品规格
//
specifications:'',//商品规格
stock
:
''
,
//商品库存
//
stock:'', //商品库存
cost_price
:
''
,
//进货价钱
//
cost_price:'', //进货价钱
code
:
''
,
//条形编码
//
code:'' ,//条形编码
commission
:
''
,
//返佣比例
//
commission:'', //返佣比例
sell_type
:
0
,
// 售卖类型
//
sell_type:0,// 售卖类型
commodity_data
:{},
//原始商品名
//
commodity_data:{}, //原始商品名
quality_guarantee_period
:
0
,
//保质期(月)
//
quality_guarantee_period:0, //保质期(月)
manufacture_date
:
''
,
//生产日期
//
manufacture_date:'' , //生产日期
manufacturer
:
''
,
///生产厂商
//
manufacturer :'', ///生产厂商
brand
:
''
,
// 品牌
//
brand :'', // 品牌
checkbox
:
[],
//断选
//
checkbox: [],//断选
product_id
:
""
,
//修改的时候的产品id
//
product_id:"",//修改的时候的产品id
product_name
:
""
,
//产品名称
//
product_name:"",//产品名称
desc
:
""
,
//产品描述
//
desc:"",//产品描述
cate_id
:
""
,
//产品分类id
//
cate_id:"",//产品分类id
photo
:
""
,
//产品图片
//
photo:"",//产品图片
lunch_box_fee
:
''
,
//餐盒费
//
lunch_box_fee:'',//餐盒费
is_new
:
""
,
//是否新产品
//
is_new:"",//是否新产品
is_hot
:
""
,
//是否热卖产品
//
is_hot:"",//是否热卖产品
action
:
"
add
"
,
// 方式(添加:add,修改:edit)
//
action:"add",// 方式(添加:add,修改:edit)
price
:
""
,
//价格
//
price:"",//价格
activity_price
:
""
,
//秒杀价
//
activity_price:"",//秒杀价
store_count
:
""
,
// 秒杀库存
//
store_count:"" ,// 秒杀库存
is_seckill
:
"
0
"
,
//0 1 是否秒杀产品
//
is_seckill:"0",//0 1 是否秒杀产品
activity_id
:
'
0
'
,
//秒杀activity_id
//
activity_id:'0',//秒杀activity_id
activity_list
:
''
,
//秒杀列表
//
activity_list:'',//秒杀列表
limit_num
:
"
0
"
//秒杀限购数量 0 不限制
//
limit_num:"0" //秒杀限购数量 0 不限制
},
},
timeList
:[
timeList
:[
{}
{}
...
@@ -411,8 +436,9 @@
...
@@ -411,8 +436,9 @@
chindformList
:[],
chindformList
:[],
//上传图片相关的
//上传图片相关的
c_pics
:
[],
c_pics
:
[],
c_photos
:
[],
c_pics1
:[],
c_formData
:
{
c_pics2
:[],
c_formData
:
{
//请求接口得参数
model
:
"
shopphoto
"
,
model
:
"
shopphoto
"
,
},
},
product_id
:
""
,
//修改产品时候用的修改id
product_id
:
""
,
//修改产品时候用的修改id
...
@@ -430,7 +456,9 @@
...
@@ -430,7 +456,9 @@
index
:
0
,
index
:
0
,
isScanCode
:
true
,
//是不是点击了扫码
isScanCode
:
true
,
//是不是点击了扫码
codeDisabled
:
false
,
//条形码是否能输入
codeDisabled
:
false
,
//条形码是否能输入
update
:
true
update
:
true
,
detail_photos
:[],
//详情图片
video_photos
:[],
//轮播图片
}
}
},
},
computed
:
{
computed
:
{
...
@@ -440,12 +468,6 @@
...
@@ -440,12 +468,6 @@
staticUrl
(){
staticUrl
(){
return
this
.
$store
.
state
.
staticUrl
;
return
this
.
$store
.
state
.
staticUrl
;
},
},
// startDate() {
// return '2020-11-20';
// },
// endDate() {
// return this.getDate('');
// }
},
},
onLoad
(
opdata
)
{
onLoad
(
opdata
)
{
getskipShop
({
getskipShop
({
...
@@ -453,12 +475,9 @@
...
@@ -453,12 +475,9 @@
}).
then
(
res
=>
{
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
is_bld
=
res
.
data
.
is_bld
this
.
is_bld
=
res
.
data
.
is_bld
// this.is_bld=1
}
}
})
})
getshopclass
({}).
then
(
res
=>
{
getshopclass
({}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
)
this
.
ordinary
=
res
.
data
.
ordinary
this
.
ordinary
=
res
.
data
.
ordinary
...
@@ -467,15 +486,12 @@
...
@@ -467,15 +486,12 @@
if
(
this
.
ordinary
.
length
!=
[]){
if
(
this
.
ordinary
.
length
!=
[]){
for
(
let
i
=
0
;
i
<
res
.
data
.
ordinary
.
length
;
i
++
){
for
(
let
i
=
0
;
i
<
res
.
data
.
ordinary
.
length
;
i
++
){
this
.
classData
[
1
][
i
]
=
res
.
data
.
ordinary
[
i
].
product_name
this
.
classData
[
1
][
i
]
=
res
.
data
.
ordinary
[
i
].
product_name
}
}
}
}
// console.log(this.classData[1])
}
}
})
})
this
.
isadd
=
opdata
.
isadd
this
.
isadd
=
opdata
.
isadd
// console.log(this.isadd,'aaa')
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
this
.
activity_type
=
opdata
.
activity_type
,
this
.
activity_type
=
opdata
.
activity_type
,
this
.
isShow
=
this
.
activity_type
==
1
?
true
:
false
this
.
isShow
=
this
.
activity_type
==
1
?
true
:
false
...
@@ -492,32 +508,19 @@
...
@@ -492,32 +508,19 @@
this
.
typeManagerfun
();
this
.
typeManagerfun
();
this
.
getActivityListfun
();
//获取数据列表
this
.
getActivityListfun
();
//获取数据列表
// console.log(JSON.parse(opdata.results).data.code,111111111111111111111111111111111)
// let results=JSON.parse(opdata.results);
if
(
opdata
.
results
){
if
(
opdata
.
results
){
if
(
JSON
.
parse
(
opdata
.
results
).
data
.
code
==
1
){
if
(
JSON
.
parse
(
opdata
.
results
).
data
.
code
==
1
){
let
results
=
JSON
.
parse
(
opdata
.
results
);
//扫描得到得商品信息
let
results
=
JSON
.
parse
(
opdata
.
results
);
//扫描得到得商品信息
this
.
findEleProduct
(
results
);
this
.
findEleProduct
(
results
);
// this.findEleProduct(opdata.results);
}
else
{
}
else
{
let
results
=
JSON
.
parse
(
opdata
.
results
);
let
results
=
JSON
.
parse
(
opdata
.
results
);
this
.
form
.
code
=
results
.
code
this
.
form
.
code
=
results
.
code
this
.
findEleProduct
(
results
)
this
.
findEleProduct
(
results
)
}
}
}
}
// this.issancodeType = opdata.results.issancodeType
// this.isType = opdata.results.isType
// console.log(this.isType)
},
},
methods
:
{
methods
:
{
columnbindData
(
e
){
columnbindData
(
e
){
// console.log(e,'啊啊啊啊啊')
this
.
classDataValue
[
e
.
detail
.
column
]
=
e
.
detail
.
value
;
this
.
classDataValue
[
e
.
detail
.
column
]
=
e
.
detail
.
value
;
if
(
e
.
detail
.
column
==
0
){
if
(
e
.
detail
.
column
==
0
){
...
@@ -613,8 +616,6 @@
...
@@ -613,8 +616,6 @@
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
let
res
=
await
findEleProduct
({
code
:
results
.
code
});
console
.
log
(
res
,
11111111111111111111111
)
uni
.
hideLoading
();
uni
.
hideLoading
();
if
(
res
.
code
==-
1
){
//没有就录入
if
(
res
.
code
==-
1
){
//没有就录入
this
.
isadd
=
0
;
this
.
isadd
=
0
;
...
@@ -623,7 +624,6 @@
...
@@ -623,7 +624,6 @@
this
.
form
.
code
=
results
.
code
;
//条形码
this
.
form
.
code
=
results
.
code
;
//条形码
this
.
form
.
original_name
=
results
.
data
.
data
.
goodsName
;
this
.
form
.
original_name
=
results
.
data
.
data
.
goodsName
;
this
.
form
.
product_name
=
results
.
data
.
data
.
goodsName
;
this
.
form
.
product_name
=
results
.
data
.
data
.
goodsName
;
// this.c_pics = [{code:0,data:results.data.data.img,msg:"success",time:"1587101904"}];
this
.
form
.
commodity_data
=
results
.
data
.
data
;
this
.
form
.
commodity_data
=
results
.
data
.
data
;
this
.
form
.
price
=
results
.
data
.
data
.
price
;
this
.
form
.
price
=
results
.
data
.
data
.
price
;
this
.
isScanCode
=
results
.
isScanCode
;
this
.
isScanCode
=
results
.
isScanCode
;
...
@@ -662,6 +662,7 @@
...
@@ -662,6 +662,7 @@
this
.
isScanCode
=
false
;
this
.
isScanCode
=
false
;
this
.
codeDisabled
=
true
;
//条形码输入框是否禁止输入
this
.
codeDisabled
=
true
;
//条形码输入框是否禁止输入
this
.
c_pics
=
[{
code
:
0
,
data
:
res
.
data
.
photo
,
msg
:
"
success
"
,
time
:
"
1587101904
"
}];
this
.
c_pics
=
[{
code
:
0
,
data
:
res
.
data
.
photo
,
msg
:
"
success
"
,
time
:
"
1587101904
"
}];
for
(
var
i
=
0
;
i
<
this
.
chindformList
.
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
this
.
chindformList
.
length
;
i
++
)
{
if
(
this
.
chindformList
[
i
].
cate_id
==
res
.
data
.
cate_id
){
if
(
this
.
chindformList
[
i
].
cate_id
==
res
.
data
.
cate_id
){
this
.
cate_name
=
this
.
chindformList
[
i
].
cate_name
;
this
.
cate_name
=
this
.
chindformList
[
i
].
cate_name
;
...
@@ -764,7 +765,7 @@
...
@@ -764,7 +765,7 @@
let
res
=
await
eleProductInfo
({
let
res
=
await
eleProductInfo
({
product_id
:
this
.
product_id
,
product_id
:
this
.
product_id
,
});
});
//
console.log(res,'法大师傅大师傅大师傅士大夫大师傅');
console
.
log
(
res
,
'
法大师傅大师傅大师傅士大夫大师傅
'
);
if
(
res
.
code
==
0
){
if
(
res
.
code
==
0
){
this
.
linkage_product_id
=
res
.
data
.
linkage_product_id
this
.
linkage_product_id
=
res
.
data
.
linkage_product_id
this
.
bools
=
res
.
data
.
product_name
;
this
.
bools
=
res
.
data
.
product_name
;
...
@@ -779,12 +780,7 @@
...
@@ -779,12 +780,7 @@
this
.
form
.
cate_id
=
res
.
data
.
cate_id
;
//分类id
this
.
form
.
cate_id
=
res
.
data
.
cate_id
;
//分类id
this
.
form
.
activity_id
=
res
.
data
.
activity_id
//秒杀时段id
this
.
form
.
activity_id
=
res
.
data
.
activity_id
//秒杀时段id
this
.
form
.
limit_num
=
res
.
data
.
limit_num
this
.
form
.
limit_num
=
res
.
data
.
limit_num
// this.classValue = res.data.product_name
this
.
form
.
specifications
=
res
.
data
.
gram
this
.
form
.
specifications
=
res
.
data
.
gram
// quality_guarantee_period:this.qualitYears*365+this.qualityMonths*30+this.qualityDays, //保质期(月)
// manufacture_date:'' , //生产日期
// manufacturer :'', ///生产厂商
// brand :'', // 品牌
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
this
.
form
.
quality_guarantee_period
=
res
.
data
.
quality_guarantee_period
this
.
qualitYears
=
parseInt
(
res
.
data
.
quality_guarantee_period
/
365
)
this
.
qualitYears
=
parseInt
(
res
.
data
.
quality_guarantee_period
/
365
)
this
.
qualityMonths
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
/
30
)
this
.
qualityMonths
=
parseInt
((
res
.
data
.
quality_guarantee_period
%
365
)
/
30
)
...
@@ -792,20 +788,30 @@
...
@@ -792,20 +788,30 @@
this
.
form
.
manufacture_date
=
res
.
data
.
manufacture_date
this
.
form
.
manufacture_date
=
res
.
data
.
manufacture_date
this
.
form
.
manufacturer
=
res
.
data
.
manufacturer
this
.
form
.
manufacturer
=
res
.
data
.
manufacturer
this
.
form
.
brand
=
res
.
data
.
brand
this
.
form
.
brand
=
res
.
data
.
brand
// 2020-10-22 添加字段
this
.
form
.
stock
=
res
.
data
.
stock
,
//商品库存
this
.
form
.
stock
=
res
.
data
.
stock
,
//商品库存
this
.
form
.
cost_price
=
res
.
data
.
cost_price
/
100
,
//进货价钱
this
.
form
.
cost_price
=
res
.
data
.
cost_price
/
100
,
//进货价钱
this
.
form
.
code
=
res
.
data
.
code
,
//条形编码
this
.
form
.
code
=
res
.
data
.
code
,
//条形编码
this
.
form
.
commission
=
res
.
data
.
commission
,
//返佣比例
this
.
form
.
commission
=
res
.
data
.
commission
,
//返佣比例
this
.
form
.
sell_type
=
res
.
data
.
sell_type
,
// 售卖类型
this
.
form
.
sell_type
=
res
.
data
.
sell_type
,
// 售卖类型
// this.form.commodity_data:{}, //原始商品名
// 2020-10-22 添加字段
this
.
form
.
mandatory
=
res
.
data
.
mandatory
this
.
form
.
mandatory
=
res
.
data
.
mandatory
this
.
video_photos
=
res
.
data
.
video_photos
;
//轮播
this
.
detail_photos
=
res
.
data
.
detail_photos
;
//详情
res
.
data
.
video_photos
.
map
(
item
=>
{
//轮播
// this.commodity_type = ordinary
this
.
c_pics1
.
push
({
code
:
0
,
data
:
item
,
msg
:
"
success
"
,
time
:
"
1587101904
"
})
})
res
.
data
.
detail_photos
.
map
(
item
=>
{
//详情
this
.
c_pics2
.
push
({
code
:
0
,
data
:
item
,
msg
:
"
success
"
,
time
:
"
1587101904
"
})
})
//下拉分类 初始值
//下拉分类 初始值
this
.
chindformList
.
forEach
((
item
,
index
)
=>
{
this
.
chindformList
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
cate_id
==
res
.
data
.
cate_id
){
if
(
item
.
cate_id
==
res
.
data
.
cate_id
){
...
@@ -814,8 +820,6 @@
...
@@ -814,8 +820,6 @@
}
}
});
});
// this.classValue = res.data.product_name
if
(
res
.
data
.
commodity_type
==
'
ordinary
'
)
{
if
(
res
.
data
.
commodity_type
==
'
ordinary
'
)
{
this
.
ordinary
.
map
(
item
=>
{
this
.
ordinary
.
map
(
item
=>
{
if
(
this
.
linkage_product_id
==
item
.
product_id
){
if
(
this
.
linkage_product_id
==
item
.
product_id
){
...
@@ -823,21 +827,16 @@
...
@@ -823,21 +827,16 @@
}
}
})
})
}
else
if
(
res
.
data
.
commodity_type
==
'
weigh
'
){
}
else
if
(
res
.
data
.
commodity_type
==
'
weigh
'
){
// console.log(res.data.commodity_type,585555555555555555555555)
this
.
weigh
.
map
(
item
=>
{
this
.
weigh
.
map
(
item
=>
{
if
(
this
.
linkage_product_id
==
item
.
product_id
){
if
(
this
.
linkage_product_id
==
item
.
product_id
){
this
.
classValue
=
item
.
product_name
this
.
classValue
=
item
.
product_name
console
.
log
(
this
.
classValue
,
item
.
product_name
)
}
}
console
.
log
(
this
.
classValue
)
})
})
}
else
{
}
else
{
this
.
classValue
=
''
;
this
.
classValue
=
''
;
}
}
console
.
log
(
this
.
classValue
)
//属性选默认值
//属性选默认值
if
(
res
.
data
.
is_new
==
1
){
if
(
res
.
data
.
is_new
==
1
){
...
@@ -870,7 +869,6 @@
...
@@ -870,7 +869,6 @@
//处理上传的图片默认值
//处理上传的图片默认值
this
.
c_pics
=
[{
code
:
0
,
data
:
res
.
data
.
photo
,
msg
:
"
success
"
,
time
:
"
1587101904
"
}];
this
.
c_pics
=
[{
code
:
0
,
data
:
res
.
data
.
photo
,
msg
:
"
success
"
,
time
:
"
1587101904
"
}];
this
.
form
.
photo
=
res
.
data
.
photo
;
this
.
form
.
photo
=
res
.
data
.
photo
;
this
.
c_photos
=
[
"
res.data.photo
"
]
}
else
{
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
this
.
$api
.
msg
(
res
.
msg
);
...
@@ -886,13 +884,6 @@
...
@@ -886,13 +884,6 @@
return
false
;
return
false
;
}
}
// quality_guarantee_period = this.qualitYears*365 + this.qualityMonths*30 + this.qualityDays
// console.log(this.qualitYears*365+this.qualityMonths*30+this.qualityDays*1)
// if(this.c_pics.length == 0){
// this.$api.msg('产品图片未上传');
//
let
can
=
{
let
can
=
{
linkage_id
:
this
.
linkage_id
,
linkage_id
:
this
.
linkage_id
,
mandatory
:
this
.
form
.
mandatory
,
mandatory
:
this
.
form
.
mandatory
,
...
@@ -918,6 +909,9 @@
...
@@ -918,6 +909,9 @@
activity_id
:
this
.
form
.
activity_id
,
//秒杀时间id
activity_id
:
this
.
form
.
activity_id
,
//秒杀时间id
activity_list
:
this
.
form
.
activity_list
,
activity_list
:
this
.
form
.
activity_list
,
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
detail_photos
:
this
.
detail_photos
,
//详情图
video_photos
:
this
.
video_photos
,
//轮播图
};
};
if
(
this
.
c_pics
.
length
>
0
){
if
(
this
.
c_pics
.
length
>
0
){
...
@@ -935,15 +929,6 @@
...
@@ -935,15 +929,6 @@
}
}
})
})
// if(this.stockType==1){
// console.log(this.stockType,1111111111)
// can.stock = this.stock_number
// }else{
// can.stock = '-'+this.stock_number
// console.log(this.stockType,1111111111)
// }
if
(
this
.
selchildList
.
includes
(
"
is_new
"
)){
if
(
this
.
selchildList
.
includes
(
"
is_new
"
)){
can
.
is_new
=
1
;
can
.
is_new
=
1
;
}
else
{
}
else
{
...
@@ -959,11 +944,7 @@
...
@@ -959,11 +944,7 @@
can
.
product_id
=
this
.
product_id
;
can
.
product_id
=
this
.
product_id
;
}
}
//添加修改外卖产品
//添加修改外卖产品
console
.
log
(
'
这里了9999999999999999999
'
)
console
.
log
(
can
)
addEditEleProduct
(
can
).
then
((
res1
)
=>
{
addEditEleProduct
(
can
).
then
((
res1
)
=>
{
console
.
log
(
res1
)
if
(
res1
.
code
==
0
){
if
(
res1
.
code
==
0
){
this
.
$api
.
msg
(
res1
.
msg
);
this
.
$api
.
msg
(
res1
.
msg
);
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -1004,33 +985,42 @@
...
@@ -1004,33 +985,42 @@
isInteger
(
obj
){
isInteger
(
obj
){
return
obj
%
1
===
0
;
return
obj
%
1
===
0
;
},
},
//图片上传
c_onImg
(
e
)
{
//上传缩略图
c_delImage
(
e
)
{
this
.
isScanCode
=
true
;
// console.log(e,'反对发射点')
this
.
c_pics
=
e
.
allImages
let
arr
=
[]
for
(
let
k
in
e
.
allImages
)
{
arr
[
k
]
=
e
.
allImages
[
k
].
id
}
this
.
c_photos
=
arr
},
},
c_onImg1
(
e
)
{
c_onImg1
(
e
)
{
//上传轮播图
this
.
isScanCode
=
true
;
this
.
isScanCode
=
true
;
this
.
c_pics
=
e
.
allImages
this
.
c_pics1
=
e
.
allImages
;
const
obj
=
e
.
allImages
e
.
allImages
.
map
((
item
,
index
)
=>
{
for
(
let
index
in
obj
)
{
this
.
video_photos
[
index
]
=
item
.
data
let
id
=
obj
[
index
].
data
})
this
.
c_photos
[
index
]
=
id
},
}
c_onImg2
(
e
)
{
//上传详情图
this
.
isScanCode
=
true
;
this
.
c_pics2
=
e
.
allImages
;
e
.
allImages
.
map
((
item
,
index
)
=>
{
this
.
detail_photos
[
index
]
=
item
.
data
})
},
c_delImage
(
e
)
{
//删除产品缩略图图片
this
.
c_pics
=
[];
},
c_delImage1
(
e
)
{
//删除轮播某个图片
let
arr
=
[];
e
.
allImages
.
map
(
item
=>
{
arr
.
push
(
item
.
data
);
});
this
.
video_photos
=
arr
;
},
c_delImage2
(
e
)
{
//删除产品详情某个图片
let
arr
=
[];
e
.
allImages
.
map
(
item
=>
{
arr
.
push
(
item
.
data
);
})
this
.
detail_photos
=
arr
;
},
},
onMove_c
(
e
)
{
this
.
c_pics
=
e
;
// console.log(e,'反对法地方')
const
obj
=
e
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
this
.
c_photos
[
index
]
=
id
}
}
},
},
}
}
</
script
>
</
script
>
...
...
utils/debug.js
View file @
282c77f4
...
@@ -10,6 +10,7 @@ module.exports = {
...
@@ -10,6 +10,7 @@ module.exports = {
isdebug
:
true
,
//测试
isdebug
:
true
,
//测试
xqdebug
:
false
,
//正式权限
xqdebug
:
false
,
//正式权限
// xqdebug:true,//发布审核权限 也是测试环境的 主要用于ios
// 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