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
42143be7
Commit
42143be7
authored
Jan 06, 2021
by
home
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zxf
parent
97936343
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
14 deletions
+33
-14
manifest.json
manifest.json
+2
-2
pages/addEditEleProduct/addEditEleProduct.vue
pages/addEditEleProduct/addEditEleProduct.vue
+21
-9
pages/index/index.vue
pages/index/index.vue
+8
-1
utils/debug.js
utils/debug.js
+2
-2
No files found.
manifest.json
View file @
42143be7
...
...
@@ -3,8 +3,8 @@
//
"appid"
:
"__UNI__FC9419E"
,
"appid"
:
"__UNI__1EA80F1"
,
//这个是
web
的
"description"
:
"商家"
,
"versionName"
:
"1.10
3
"
,
"versionCode"
:
110
3
,
"versionName"
:
"1.10
6
"
,
"versionCode"
:
110
6
,
"transformPx"
:
false
,
"compatible"
:
{
"ignoreVersion"
:
true
,
//
true
表示忽略版本检查提示框,HBuilderX
1.9
.
0
及以上版本支持
...
...
pages/addEditEleProduct/addEditEleProduct.vue
View file @
42143be7
...
...
@@ -563,7 +563,7 @@
console
.
log
(
that
.
ordinary
.
length
,
'
左边
'
)
if
(
that
.
ordinary
.
length
!=
0
){
that
.
linkage_id
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_id
that
.
product_id
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_id
//
that.product_id = that.ordinary[e.detail.value[1]].product_id
that
.
classValue
=
that
.
ordinary
[
e
.
detail
.
value
[
1
]].
product_name
}
else
{
AZ
uni
.
showToast
({
...
...
@@ -576,7 +576,7 @@
console
.
log
(
that
.
weigh
.
length
,
'
右边
'
)
if
(
that
.
weigh
.
length
!=
0
){
that
.
linkage_id
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_id
that
.
product_id
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_id
//
that.product_id = that.weigh[e.detail.value[1]].product_id
that
.
classValue
=
that
.
weigh
[
e
.
detail
.
value
[
1
]].
product_name
}
else
{
uni
.
showToast
({
...
...
@@ -586,7 +586,7 @@
return
false
;
}
}
that
.
eleProductInfofun
();
that
.
eleProductInfofun
(
that
.
linkage_id
);
this
.
is_datashow
=
false
;
console
.
log
(
this
.
is_datashow
)
...
...
@@ -654,7 +654,13 @@
this
.
form
.
cost_price
=
res
.
data
.
cost_price
//进货价钱
this
.
form
.
code
=
res
.
data
.
code
//条形编码
this
.
form
.
commission
=
res
.
data
.
commission
//返佣比例
this
.
form
.
commodity_data
=
typeof
(
res
.
data
.
commodity_data
)
==
'
string
'
?
JSON
.
parse
(
res
.
data
.
commodity_data
):
res
.
data
.
commodity_data
//原始商品名
if
(
res
.
data
.
commodity_data
==
""
){
this
.
form
.
commodity_data
=
res
.
data
.
commodity_data
}
else
{
this
.
form
.
commodity_data
=
typeof
(
res
.
data
.
commodity_data
)
==
'
string
'
?
JSON
.
parse
(
res
.
data
.
commodity_data
):
res
.
data
.
commodity_data
//原始商品名
}
this
.
form
.
product_id
=
res
.
data
.
product_id
//修改的时候的产品id
this
.
form
.
product_name
=
res
.
data
.
product_name
//产品名称
this
.
form
.
desc
=
res
.
data
.
desc
//产品描述
...
...
@@ -778,10 +784,10 @@
},
//修改的时候赋初始值
async
eleProductInfofun
(){
async
eleProductInfofun
(
product_id
){
let
that
=
this
;
let
res
=
await
eleProductInfo
({
product_id
:
this
.
product_id
,
product_id
:
product_id
,
});
if
(
res
.
code
==
0
){
this
.
form
.
cate_id
=
res
.
data
.
cate_id
;
//分类id
...
...
@@ -919,6 +925,9 @@
// return false;
// }
console
.
log
(
this
.
form
.
product_id
)
console
.
log
(
this
.
product_id
)
let
can
=
{
action
:
this
.
product_id
==
''
?
'
add
'
:
'
edit
'
,
linkage_id
:
this
.
linkage_id
,
...
...
@@ -946,10 +955,13 @@
limit_num
:
this
.
form
.
limit_num
,
//秒杀限购数量
detail_photos
:
this
.
detail_photos
,
//详情图
video_photos
:
this
.
video_photos
,
//轮播图
cate_id
:
this
.
form
.
cate_id
,
cate_id
:
this
.
form
.
cate_id
,
};
if
(
can
.
action
==
'
edit
'
){
can
.
product_id
=
this
.
product_id
}
if
(
this
.
c_pics
.
length
>
0
){
can
.
photo
=
this
.
c_pics
[
0
].
data
;
//图片
}
...
...
@@ -1015,7 +1027,7 @@
this
.
chindformList
=
res
.
data
;
if
(
this
.
product_id
!=
undefined
&&
this
.
product_id
!=
""
){
this
.
eleProductInfofun
();
this
.
eleProductInfofun
(
this
.
product_id
);
}
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
...
...
pages/index/index.vue
View file @
42143be7
...
...
@@ -471,7 +471,7 @@
return
;
}
else
{
uni
.
request
({
url
:
'
https://www.mxnzp.com/api/barcode/goods/details
'
,
//仅为示例,并非真实接口地址。
data
:
{
...
...
@@ -482,6 +482,7 @@
},
method
:
'
GET
'
,
success
:
(
results
)
=>
{
console
.
log
(
results
)
if
(
results
.
data
.
code
==
0
)
{
console
.
log
(
results
);
results
.
isScanCode
=
false
;
...
...
@@ -495,6 +496,12 @@
uni
.
navigateTo
({
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
})
}
else
{
results
.
isScanCode
=
false
;
results
.
code
=
res
.
result
;
uni
.
navigateTo
({
url
:
'
/pages/addEditEleProduct/addEditEleProduct?results=
'
+
JSON
.
stringify
(
results
)
})
}
},
fail
:
(
results
)
=>
{
...
...
utils/debug.js
View file @
42143be7
...
...
@@ -5,8 +5,8 @@ module.exports = {
//
isdebug:false,//正式
isdebug
:
true
,
//测试
isdebug
:
false
,
//正式
//
isdebug:true,//测试
// xqdebug:false,//正式权限
...
...
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