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
dd9bd9d8
Commit
dd9bd9d8
authored
Oct 15, 2020
by
home
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into zxh
parents
98f9177d
e252e079
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
144 deletions
+99
-144
components/plan-image-upload/up_img.vue
components/plan-image-upload/up_img.vue
+6
-12
manifest.json
manifest.json
+30
-29
pages.json
pages.json
+1
-1
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+61
-102
utils/debug.js
utils/debug.js
+1
-0
No files found.
components/plan-image-upload/up_img.vue
View file @
dd9bd9d8
...
...
@@ -84,12 +84,11 @@
if
(
!
_self
.
value
){
_self
.
value
=
[]
}
uni
.
chooseImage
({
count
:
_self
.
limit
?
(
_self
.
limit
-
_self
.
value
.
length
)
:
999
,
success
:
function
(
e
){
var
imagePathArr
=
e
.
tempFilePaths
var
imagePathArr
=
e
.
tempFilePaths
//如果设置了limit限制,在web上count参数无效,这里做判断控制选择的数量是否合要求
//在非微信小程序里,虽然可以选多张,但选择的结果会被截掉
//在app里,会自动做选择数量的限制
...
...
@@ -106,12 +105,8 @@
}
}
console
.
log
(
'
s1:
'
,
imagePathArr
)
let
arrs
=
[]
for
(
let
i
=
0
;
i
<
imagePathArr
.
length
;
i
++
){
arrs
.
push
(
imagePathArr
[
i
])
}
//检查服务器地址是否设置,设置即表示图片要上传到服务器
if
(
_self
.
serverUrl
){
...
...
@@ -134,12 +129,12 @@
},
name
:
keyname
,
success
:
function
(
res
){
console
.
log
(
JSON
.
parse
(
res
.
data
),
'
成功了啊啊
'
)
if
(
res
.
statusCode
===
200
){
//_self.value[remoteUrlIndex] = JSON.parse(res.data)
_self
.
value
.
push
(
JSON
.
parse
(
res
.
data
))
console
.
log
(
'
s3:
'
,
_self
.
value
)
completeImages
++
if
(
_self
.
showUploadProgress
){
...
...
@@ -165,7 +160,6 @@
}))
}
Promise
.
all
(
promiseWorkList
).
then
((
result
)
=>
{
console
.
log
(
'
s4:
'
,
_self
.
value
)
_self
.
$emit
(
'
add
'
,
{
currentImages
:
imagePathArr
,
allImages
:
_self
.
value
//id+url
...
...
manifest.json
View file @
dd9bd9d8
...
...
@@ -114,40 +114,41 @@
},
"splashscreen"
:
{
"android"
:
{
"hdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
"hdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"xhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"xxhdpi"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
},
"ios"
:
{
"iphone"
:
{
"portrait-896h@3x"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"landscape-896h@3x"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"portrait-896h@2x"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"landscape-896h@2x"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"iphonex"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"iphonexl"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina55"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina55l"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina47"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina47l"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina40"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina40l"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
,
"retina35"
:
"C:/Users/Administrator/Desktop/
da/6b51802bba0a32ac69392831b1fc324
.png"
"portrait-896h@3x"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"landscape-896h@3x"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"portrait-896h@2x"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"landscape-896h@2x"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"iphonex"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"iphonexl"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina55"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina55l"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina47"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina47l"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina40"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina40l"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
,
"retina35"
:
"C:/Users/Administrator/Desktop/
证书/d0abce82961b508e6a0b9924d15fe86
.png"
},
"ipad"
:
{
"portrait-1366h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"landscape-1366h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"portrait-1194h@2"
:
"F:/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape-1194h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"portrait-1112h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"landscape-1112h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"portrait-retina7"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"landscape-retina7"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"portrait7"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"landscape7"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
,
"portrait-1194h@2x"
:
"C:/Users/Administrator/Desktop/da/6b51802bba0a32ac69392831b1fc324.png"
}
}
"portrait-1366h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape-1366h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"portrait-1194h@2"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape-1194h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"portrait-1112h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape-1112h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"portrait-retina7"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape-retina7"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"portrait7"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"landscape7"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
,
"portrait-1194h@2x"
:
"C:/Users/Administrator/Desktop/证书/d0abce82961b508e6a0b9924d15fe86.png"
}
}
}
},
"compilerVersion"
:
2
...
...
pages.json
View file @
dd9bd9d8
...
...
@@ -392,7 +392,7 @@
"backgroundColor"
:
"#F8F8F8"
},
"tabBar"
:
{
"color"
:
"#
C0C4CC
"
,
"color"
:
"#
808080
"
,
"selectedColor"
:
"#FF6900"
,
"borderStyle"
:
"black"
,
"backgroundColor"
:
"#ffffff"
,
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
dd9bd9d8
...
...
@@ -106,17 +106,20 @@
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
缩略图
</view>
<view
class=
""
v-if=
"c_pics.length==0"
>
<view
class=
""
v-if=
"isScanCode"
>
<robby-image-upload
fileKeyName=
"img"
:value=
"c_pics"
:server-url=
"uploadurl1+'/merchant.php/FileUpload/uploadify'"
:form-data=
"c_formData"
:server-url-delete-image=
"uploadurl1"
@
delete=
"c_delImage"
@
add=
"c_onImg1"
@
move=
"onMove_c"
:limit=
"1"
></robby-image-upload>
</view>
<view
class=
""
v-if=
"c_pics.length!=0"
>
<image
:src=
"c_pics[0].data"
mode=
""
></image>
</view>
<view
class=
""
v-else
>
<image
:src=
"c_pics[0].data"
mode=
""
></image>
<view>
{{
c_pics
[
0
].
data
}}
</view>
</view>
</view>
<!-- 多选列表 勾选的位置 -->
<view
class=
"checkboxs"
>
...
...
@@ -201,7 +204,7 @@
result
:[],
form
:
{
//cost_price 成本价 stock 商品库存purchase 进货价钱code 条形编码commission 返佣比例original_name 原始商品名
stock
:
0
,
//商品库存
stock
:
''
,
//商品库存
cost_price
:
''
,
//进货价钱
code
:
''
,
//条形编码
commission
:
''
,
//返佣比例
...
...
@@ -214,7 +217,7 @@
desc
:
""
,
//产品描述
cate_id
:
""
,
//产品分类id
photo
:
""
,
//产品图片
lunch_box_fee
:
""
,
//餐盒费
lunch_box_fee
:
''
,
//餐盒费
is_new
:
""
,
//是否新产品
is_hot
:
""
,
//是否热卖产品
action
:
"
add
"
,
// 方式(添加:add,修改:edit)
...
...
@@ -251,7 +254,8 @@
selchildList
:[],
cate_name
:
""
,
index
:
0
,
isScanCode
:
true
,
//是不是点击了扫码
}
},
computed
:
{
...
...
@@ -279,53 +283,45 @@
})
}
this
.
typeManagerfun
();
this
.
getActivityListfun
();
//获取数据列表
this
.
getActivityListfun
();
//获取数据列表
},
methods
:
{
// https://www.mxnzp.com/api/barcode/goods/details?
//barcode=6938902618112
//&needImg=true
//&app_id=ct8txopjpneaiiev
//&app_secret=cUhnQ3AwM2Z3WjY4ZElOdVJkU3JEUT09
saoma
(
e
){
console
.
log
(
this
.
$data
.
form
.
code
)
uni
.
scanCode
({
success
:
res
=>
{
console
.
log
(
this
.
form
);
console
.
log
(
'
条码类型:
'
+
res
.
scanType
);
console
.
log
(
'
条码内容:
'
+
res
.
result
);
this
.
$data
.
form
.
code
=
res
.
result
success
:(
res
)
=>
{
var
code
=
res
.
result
;
uni
.
request
({
//app_id:qkkbptetyohxoiod app_secret:Wkp2a3NiNjAzTFJLRmwrZXN3QW1jZz09
url
:
'
https://www.mxnzp.com/api/barcode/goods/details
'
,
//仅为示例,并非真实接口地址。
data
:
{
barcode
:
this
.
$data
.
form
.
code
,
needImg
:
true
,
app_id
:
'
qkkbptetyohxoiod
'
,
app_secret
:
'
Wkp2a3NiNjAzTFJLRmwrZXN3QW1jZz09
'
url
:
'
https://www.mxnzp.com/api/barcode/goods/details
'
,
//仅为示例,并非真实接口地址。
data
:
{
barcode
:
code
,
needImg
:
true
,
app_id
:
'
qkkbptetyohxoiod
'
,
app_secret
:
'
Wkp2a3NiNjAzTFJLRmwrZXN3QW1jZz09
'
},
method
:
'
GET
'
,
success
:
(
results
)
=>
{
console
.
log
(
results
.
data
);
this
.
$data
.
form
.
original_name
=
results
.
data
.
data
.
goodsName
this
.
$data
.
form
.
product_name
=
results
.
data
.
data
.
goodsName
this
.
$data
.
c_pics
=
[{
code
:
0
,
data
:
results
.
data
.
data
.
img
,
msg
:
"
success
"
,
time
:
"
1587101904
"
}]
this
.
$data
.
form
.
commodity_data
[
0
]
=
results
.
data
.
data
console
.
log
(
this
.
$data
.
form
.
commodity_data
)
console
.
log
(
this
.
$data
.
form
.
original_name
)
console
.
log
(
results
.
data
.
data
.
goodsName
)
console
.
log
(
this
.
$data
.
form
.
product_name
)
console
.
log
(
results
.
data
.
data
.
img
)
console
.
log
(
this
.
$data
.
c_pics
[
0
])
console
.
log
(
results
);
if
(
results
.
data
.
code
==
0
){
this
.
$api
.
msg
(
results
.
data
.
msg
);
}
else
if
(
results
.
data
.
code
==
1
){
this
.
form
.
code
=
code
;
//条形码
this
.
form
.
original_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
[
0
]
=
results
.
data
.
data
;
this
.
isScanCode
=
false
;
}
}
})
}
},
fail
:(
err
)
=>
{
console
.
log
(
err
)
}
});
},
confirm
(
e
){
console
.
log
(
e
)
// this.parent_name=e.item.value;
...
...
@@ -373,10 +369,6 @@
console
.
log
(
this
.
form
.
activity_list
);
// if(e.detail.value.indexOf('is_seckill')!=-1){
// // this.getActivityListfun();
// // this.isshowsetkilltime==true
// }
this
.
selchildList
=
e
.
detail
.
value
;
...
...
@@ -385,10 +377,10 @@
async
eleProductInfofun
(){
let
res
=
await
eleProductInfo
({
product_id
:
this
.
product_id
,
});
});
console
.
log
(
res
,
'
法大师傅大师傅大师傅士大夫大师傅
'
);
if
(
res
.
code
==
0
){
console
.
log
(
res
);
this
.
defaultinfo
=
res
.
data
;
this
.
form
.
product_name
=
res
.
data
.
product_name
;
//名称
this
.
form
.
desc
=
res
.
data
.
desc
;
//描述
...
...
@@ -440,8 +432,11 @@
//处理上传的图片默认值
// res.data.photo
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
.
c_photos
=
[
"
res.data.photo
"
]
...
...
@@ -450,25 +445,11 @@
}
},
getForm
()
{
if
(
this
.
c_pics
.
length
==
0
){
this
.
$api
.
msg
(
"
请上传产品图片
"
);
return
false
;
}
if
(
this
.
isshowsetkilltime
&&
(
this
.
form
.
activity_price
==
""
||
this
.
form
.
store_count
==
""
||
this
.
form
.
limit_num
==
""
)
){
this
.
$api
.
msg
(
"
请填写完整秒杀数据
"
);
return
false
;
}
// if(String(this.form.store_count).indexOf('.')!=-1 || String(this.form.limit_num).indexOf('.')!=-1){
// this.$api.msg("秒杀库存或限购数量不能为小数");
// return false;
// }
if
(
!
this
.
isInteger
(
this
.
form
.
limit_num
)
||
!
this
.
isInteger
(
this
.
form
.
store_count
)){
this
.
$api
.
msg
(
"
秒杀库存或限购数量不能为小数
"
);
return
false
;
...
...
@@ -487,8 +468,7 @@
action
:
this
.
form
.
action
,
//方式(添加:add,修改:edit)
price
:
this
.
form
.
price
,
//价格
cate_id
:
this
.
form
.
cate_id
,
// photo:this.form.c_pics[0].data,
//product_id
photo
:
this
.
c_pics
[
0
].
data
,
//图片
activity_price
:
this
.
form
.
activity_price
,
//秒杀价
store_count
:
this
.
form
.
store_count
,
//秒杀库存
activity_id
:
this
.
form
.
activity_id
,
//秒杀时间id
...
...
@@ -509,43 +489,19 @@
can
.
is_hot
=
0
;
}
console
.
log
()
// if(this.selchildList.includes("is_")){
// can.is_hot = 1;
// }else{
// can.is_hot = 0;
// }
if
(
this
.
c_pics
.
length
!=
0
){
can
.
photo
=
this
.
c_pics
[
0
].
data
;
//上传的图片
}
console
.
log
(
this
.
$data
.
c_pics
[
0
].
data
)
if
(
this
.
product_id
!=
""
){
can
.
action
=
"
edit
"
;
can
.
product_id
=
this
.
product_id
;
}
console
.
info
(
can
,
"
can
"
);
//return false;
//添加修改外卖产品
addEditEleProduct
(
can
).
then
((
res1
)
=>
{
console
.
log
(
res1
)
if
(
res1
.
code
==
0
){
this
.
$api
.
msg
(
res1
.
msg
);
setTimeout
(()
=>
{
uni
.
navigateBack
({
})
uni
.
navigateBack
({});
},
1000
)
}
else
{
this
.
$api
.
msg
(
res1
.
msg
);
...
...
@@ -567,21 +523,21 @@
})
if
(
res
.
code
==
0
){
this
.
seckilltimelist
=
res
.
data
.
head
console
.
info
(
this
.
seckilltimelist
)
}
},
//获取外卖分类列表 用于下拉选择
async
typeManagerfun
(){
let
res
=
await
typeManager
({
});
let
res
=
await
typeManager
({});
if
(
res
.
code
==
0
){
this
.
chindformList
=
res
.
data
;
if
(
this
.
product_id
!=
undefined
&&
this
.
product_id
!=
""
){
//这里调用
this
.
eleProductInfofun
();
}
}
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
...
...
@@ -593,15 +549,17 @@
},
//图片上传
c_delImage
(
e
)
{
c_delImage
(
e
)
{
console
.
log
(
e
,
'
反对发射点
'
)
let
arr
=
[]
for
(
let
k
in
e
.
allImages
)
{
arr
[
k
]
=
e
.
allImages
[
k
].
id
}
this
.
c_photos
=
arr
},
c_onImg1
(
e
)
{
this
.
c_pics
=
e
.
allImages
c_onImg1
(
e
)
{
this
.
isScanCode
=
true
;
this
.
c_pics
=
e
.
allImages
const
obj
=
e
.
allImages
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
...
...
@@ -609,7 +567,8 @@
}
},
onMove_c
(
e
)
{
this
.
c_pics
=
e
this
.
c_pics
=
e
;
console
.
log
(
e
,
'
反对法地方
'
)
const
obj
=
e
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
...
...
utils/debug.js
View file @
dd9bd9d8
...
...
@@ -2,6 +2,7 @@
//环境变量 这个是 鹿马商家助手的 商家助手的~~~~
module
.
exports
=
{
//是否为开发调试环境 true为本地环境 false 为正式环境
// isdebug:false,//正式
isdebug
:
true
,
//测试
...
...
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