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
f9a65ee2
Commit
f9a65ee2
authored
Apr 22, 2020
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssss
parent
ad6202fd
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
789 additions
and
117 deletions
+789
-117
components/plan-image-upload/up_img.vue
components/plan-image-upload/up_img.vue
+17
-4
components/yiCheckbox/yiCheckbox.vue
components/yiCheckbox/yiCheckbox.vue
+88
-0
manifest.json
manifest.json
+2
-2
pages.json
pages.json
+7
-0
pages/edit/Qualifications/Qualifications.vue
pages/edit/Qualifications/Qualifications.vue
+1
-1
pages/edit/pro_manage/pro_manage.vue
pages/edit/pro_manage/pro_manage.vue
+1
-1
pages/feedback/feedback.vue
pages/feedback/feedback.vue
+322
-0
pages/setup/setup.vue
pages/setup/setup.vue
+58
-4
pages/specsShop/specsShop.scss
pages/specsShop/specsShop.scss
+47
-0
pages/specsShop/specsShop.vue
pages/specsShop/specsShop.vue
+213
-102
utils/api/api.js
utils/api/api.js
+31
-1
utils/debug.js
utils/debug.js
+2
-2
No files found.
components/plan-image-upload/up_img.vue
View file @
f9a65ee2
...
...
@@ -2,7 +2,8 @@
<view
class=
"imageUploadContainer"
>
<view
class=
"imageUploadList"
>
<view
class=
"imageItem"
v-bind:key=
"index"
v-for=
"(path,index) in value"
>
<image
:src=
"staticUrl1+path.data"
:class=
"
{'dragging':isDragging(index)}" draggable="true" @tap="previewImage" :data-index="index" @touchstart="start" @touchmove="move" @touchend="stop">
</image>
<image
:src=
"staticUrl1+path.data"
:class=
"
{'dragging':isDragging(index)}" draggable="true" @tap="previewImage" :data-index="index" >
</image>
<!-- @touchstart="start" @touchmove="move" @touchend="stop" -->
<view
v-if=
"isShowDel"
class=
"imageDel"
@
tap=
"deleteImage"
:data-index=
"index"
>
x
</view>
</view>
<view
v-if=
"isShowAdd"
class=
"imageUpload"
@
tap=
"selectImage"
>
+
</view>
...
...
@@ -220,12 +221,20 @@
this
.
$emit
(
'
input
'
,
this
.
value
)
},
previewImage
:
function
(
e
){
var
imageIndex
=
e
.
currentTarget
.
dataset
.
index
console
.
info
(
"
查看图片
"
);
var
imageIndex
=
e
.
currentTarget
.
dataset
.
index
;
console
.
info
(
this
.
value
,
imageIndex
);
let
arr
=
this
.
value
.
map
((
item
,
index
)
=>
{
return
this
.
staticUrl1
+
item
.
data
;
})
uni
.
previewImage
({
current
:
this
.
value
[
imageIndex
],
current
:
imageIndex
,
//
this.value[imageIndex],
indicator
:
"
number
"
,
loop
:
"
true
"
,
urls
:
this
.
value
urls
:
arr
,
//
this.value
})
},
initImageBasePos
:
function
(){
...
...
@@ -253,6 +262,8 @@
isDragging
:
function
(
indx
){
return
this
.
dragIndex
===
indx
},
//拖动?
start
:
function
(
e
){
if
(
!
this
.
isDragable
){
return
...
...
@@ -274,6 +285,7 @@
this
.
moveLeft
=
e
.
target
.
offsetLeft
this
.
moveTop
=
e
.
target
.
offsetTop
},
//移动图片
move
:
function
(
e
){
if
(
!
this
.
isDragable
){
return
...
...
@@ -291,6 +303,7 @@
this
.
moveLeft
=
touch
.
clientX
-
this
.
deltaLeft
this
.
moveTop
=
touch
.
clientY
-
this
.
deltaTop
},
//移动
stop
:
function
(
e
){
if
(
!
this
.
isDragable
){
return
...
...
components/yiCheckbox/yiCheckbox.vue
0 → 100644
View file @
f9a65ee2
<
template
>
<view
class=
"yiCheckbox"
>
<view
class=
"typesname"
>
{{
chinddata
.
name
}}
:
</view>
<view
class=
"yiCheckbox_body flex flex-wrap"
>
<!-- v-for="(value,index) in chinddata.spec_item" -->
<view
class=
"chindboxitem"
:class=
"
{'cur': rSelect.indexOf(index)!=-1}" v-for="(value, key, index) in chinddata.spec_item" :key="index" @tap="tapInfo(index,key, index)">
<!--
{{
value
.
name
}}
-->
{{
value
}}
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
props
:{
//数据
chinddata
:{
type
:
Object
,
default
:()
=>
{
return
{};
}
},
isindex
:{
type
:
Number
,
default
:
0
,
}
},
data
(){
return
{
rSelect
:[],
//选中的列表
isdataarr
:[],
//选中的数据
infoArr
:[
{
name
:
"
石霸天
"
},
{
name
:
"
石1天
"
}
],
}
},
methods
:{
tapInfo
(
e
,
key
,
index
)
{
//console.info(e,key, index);
if
(
this
.
rSelect
.
indexOf
(
e
)
==
-
1
)
{
//console.log(e)//打印下标
this
.
rSelect
.
push
(
e
);
//选中添加到数组里
this
.
isdataarr
.
push
({
name
:
this
.
chinddata
.
spec_item
[
key
],
id
:
key
});
//选中的数据 真实的
}
else
{
this
.
rSelect
.
splice
(
this
.
rSelect
.
indexOf
(
e
),
1
);
//取消
this
.
isdataarr
.
splice
(
this
.
rSelect
.
indexOf
(
e
),
1
);
}
//把选中的值传回去
this
.
$emit
(
"
changecheckbox
"
,{
index
:
this
.
isindex
,
child
:
this
.
isdataarr
,
specList_item_id
:
this
.
chinddata
.
id
});
}
},
onLoad
()
{
},
}
</
script
>
<
style
lang=
"scss"
>
.yiCheckbox
{
margin-top
:
20upx
;
}
.typesname
{
color
:
#000000
;
font-weight
:
bold
;
margin-bottom
:
10upx
;
}
.chindboxitem
{
padding
:
8upx
20upx
;
margin-right
:
15upx
;
border-radius
:
10upx
;
color
:
#FFFFFF
;
background-color
:
#c8c7cc
;
margin-bottom
:
10upx
;
}
.cur
{
color
:
white
;
border
:
1px
solid
#e5e5e5
;
background-color
:
#ff5d00
;
}
</
style
>
manifest.json
View file @
f9a65ee2
...
...
@@ -2,8 +2,8 @@
"name"
:
"鹿马商家助手"
,
"appid"
:
"__UNI__1EA80F1"
,
"description"
:
""
,
"versionName"
:
"1.0.1
2
"
,
"versionCode"
:
11
2
,
"versionName"
:
"1.0.1
3
"
,
"versionCode"
:
11
3
,
"transformPx"
:
false
,
/*
5
+App特有相关
*/
"app-plus"
:
{
...
...
pages.json
View file @
f9a65ee2
...
...
@@ -251,7 +251,14 @@
"style"
:
{
"navigationBarTitleText"
:
"隐私政策"
}
},
{
"path"
:
"pages/feedback/feedback"
,
"style"
:
{
"navigationBarTitleText"
:
"意见反馈"
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/edit/Qualifications/Qualifications.vue
View file @
f9a65ee2
...
...
@@ -9,7 +9,7 @@
<view
class=
"biao_05"
>
请上传相关资质图片:
</view>
<robby-image-upload
fileKeyName=
"img"
:value=
"c_pics"
:server-url=
"uploadurl1"
:form-data=
"c_formData"
:server-url-delete-image=
"uploadurl1"
<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_onImg"
@
move=
"onMove_c"
:limit=
"3"
></robby-image-upload>
</view>
...
...
pages/edit/pro_manage/pro_manage.vue
View file @
f9a65ee2
...
...
@@ -25,7 +25,7 @@
<view
class=
"btn_01"
@
tap=
"pullfun(item,index)"
v-if=
"current==0"
>
下架
</view>
<view
class=
"btn_01"
@
tap=
"pushfun(item,index)"
v-if=
"current==1"
>
上架
</view>
<view
class=
"btn_01"
@
tap=
"delfun(item,index)"
>
删除
</view>
<
!--
<view
class=
"btn_01"
@
click=
"setSpecs(item.id)"
v-if=
"item.state==1"
>
规格
</view>
--
>
<
view
class=
"btn_01"
@
click=
"setSpecs(item.goods_id)"
>
规格
</view
>
</view>
</view>
</view>
...
...
pages/feedback/feedback.vue
0 → 100644
View file @
f9a65ee2
<
template
>
<view
class=
"page"
>
<view
class=
'feedback-title'
>
<text>
问题和意见
</text>
<text
class=
"feedback-quick"
@
tap=
"chooseMsg"
>
快速键入
</text>
</view>
<view
class=
"feedback-body"
>
<textarea
placeholder=
"请详细描述你的问题和意见..."
v-model=
"sendDate.content"
class=
"feedback-textare"
/>
</view>
<view
class=
'feedback-title'
>
<text>
图片(选填,提供问题截图,总大小10M以下)
</text>
</view>
<view
class=
"feedback-body feedback-uploader"
>
<view
class=
"uni-uploader"
>
<view
class=
"uni-uploader-head"
>
<view
class=
"uni-uploader-title"
>
点击预览图片
</view>
<view
class=
"uni-uploader-info"
>
{{
imageList
.
length
}}
/8
</view>
</view>
<view
class=
"uni-uploader-body"
>
<view
class=
"uni-uploader__files"
>
<block
v-for=
"(image,index) in imageList"
:key=
"index"
>
<view
class=
"uni-uploader__file"
style=
"position: relative;"
>
<image
class=
"uni-uploader__img"
:src=
"image"
@
tap=
"previewImage"
></image>
<view
class=
"close-view"
@
click=
"close(index)"
>
x
</view>
</view>
</block>
<view
class=
"uni-uploader__input-box"
v-show=
"imageList.length
<
8
"
>
<view
class=
"uni-uploader__input"
@
tap=
"chooseImg"
></view>
</view>
</view>
</view>
</view>
</view>
<view
class=
'feedback-title'
>
<text>
QQ/邮箱
</text>
</view>
<view
class=
"feedback-body inputsboxss ali-c"
>
<input
class=
"feedback-input"
v-model=
"sendDate.contact"
placeholder=
"(选填,方便我们联系你 )"
/>
</view>
<view
class=
'feedback-title feedback-star-view'
>
<text>
应用评分
</text>
<view
class=
"feedback-star-view"
>
<text
class=
"feedback-star"
v-for=
"(value,key) in stars"
:key=
"key"
:class=
"key
<
sendDate
.
score
?
'
active
'
:
''"
@
tap=
"chooseStar(value)"
></text>
</view>
</view>
<button
type=
"primary"
class=
"feedback-submit"
@
tap=
"send"
>
提交
</button>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
msgContents
:
[
"
登录不上去
"
,
"
订单问题
"
,
"
资金问题
"
,
"
偶发性崩溃
"
],
stars
:
[
1
,
2
,
3
,
4
,
5
],
imageList
:
[],
sendDate
:
{
score
:
0
,
content
:
""
,
contact
:
""
}
}
},
onLoad
()
{
let
deviceInfo
=
{
appid
:
plus
.
runtime
.
appid
,
imei
:
plus
.
device
.
imei
,
//设备标识
p
:
plus
.
os
.
name
===
"
Android
"
?
"
a
"
:
"
i
"
,
//平台类型,i表示iOS平台,a表示Android平台。
md
:
plus
.
device
.
model
,
//设备型号
app_version
:
plus
.
runtime
.
version
,
plus_version
:
plus
.
runtime
.
innerVersion
,
//基座版本号
os
:
plus
.
os
.
version
,
net
:
""
+
plus
.
networkinfo
.
getCurrentType
()
}
this
.
sendDate
=
Object
.
assign
(
deviceInfo
,
this
.
sendDate
);
},
methods
:
{
close
(
e
){
this
.
imageList
.
splice
(
e
,
1
);
},
chooseMsg
()
{
//快速输入
uni
.
showActionSheet
({
itemList
:
this
.
msgContents
,
success
:
(
res
)
=>
{
this
.
sendDate
.
content
=
this
.
msgContents
[
res
.
tapIndex
];
}
})
},
chooseImg
()
{
//选择图片
uni
.
chooseImage
({
sourceType
:
[
"
camera
"
,
"
album
"
],
sizeType
:
"
compressed
"
,
count
:
8
-
this
.
imageList
.
length
,
success
:
(
res
)
=>
{
this
.
imageList
=
this
.
imageList
.
concat
(
res
.
tempFilePaths
);
}
})
},
chooseStar
(
e
)
{
//点击评星
this
.
sendDate
.
score
=
e
;
},
previewImage
()
{
//预览图片
uni
.
previewImage
({
urls
:
this
.
imageList
});
},
send
()
{
//发送反馈
console
.
log
(
JSON
.
stringify
(
this
.
sendDate
));
let
imgs
=
this
.
imageList
.
map
((
value
,
index
)
=>
{
return
{
name
:
"
image
"
+
index
,
uri
:
value
}
})
if
(
this
.
sendDate
.
content
==
""
){
this
.
$api
.
msg
(
"
反馈的内容不能为空
"
);
return
false
;
}
this
.
$api
.
msg
(
"
反馈成功~
"
);
//先做一个jia的 过shenhe
// uni.uploadFile({
// url: "https://service.dcloud.net.cn/feedback",
// files: imgs,
// formData: this.sendDate,
// success: (res) => {
// if (res.statusCode === 200) {
// uni.showToast({
// title: "反馈成功!"
// });
// this.imageList = [];
// this.sendDate = {
// score: 0,
// content: "",
// contact: ""
// }
// }
// },
// fail: (res) => {
// uni.showToast({
// title: "失败",
// icon:"none"
// });
// console.log(res)
// }
// });
}
}
}
</
script
>
<
style
>
@font-face
{
font-family
:
uniicons
;
font-weight
:
normal
;
font-style
:
normal
;
src
:
url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf')
format
(
'truetype'
);
}
page
{
background-color
:
#EFEFF4
;
}
view
{
font-size
:
28
upx
;
}
.input-view
{
font-size
:
28
upx
;
}
.close-view
{
text-align
:
center
;
line-height
:
14px
;
height
:
16px
;
width
:
16px
;
border-radius
:
50%
;
background
:
#FF5053
;
color
:
#FFFFFF
;
position
:
absolute
;
top
:
-6px
;
right
:
-4px
;
font-size
:
12px
;
}
/* 上传 */
.uni-uploader
{
flex
:
1
;
flex-direction
:
column
;
}
.uni-uploader-head
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
}
.uni-uploader-info
{
color
:
#B2B2B2
;
}
.uni-uploader-body
{
margin-top
:
16
upx
;
}
.uni-uploader__files
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
}
.uni-uploader__file
{
margin
:
10
upx
;
width
:
210
upx
;
height
:
210
upx
;
}
.uni-uploader__img
{
display
:
block
;
width
:
210
upx
;
height
:
210
upx
;
}
.uni-uploader__input-box
{
position
:
relative
;
margin
:
10
upx
;
width
:
208
upx
;
height
:
208
upx
;
border
:
2
upx
solid
#D9D9D9
;
}
.uni-uploader__input-box
:before
,
.uni-uploader__input-box
:after
{
content
:
" "
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
-webkit-transform
:
translate
(
-50%
,
-50%
);
transform
:
translate
(
-50%
,
-50%
);
background-color
:
#D9D9D9
;
}
.uni-uploader__input-box
:before
{
width
:
4
upx
;
height
:
79
upx
;
}
.uni-uploader__input-box
:after
{
width
:
79
upx
;
height
:
4
upx
;
}
.uni-uploader__input-box
:active
{
border-color
:
#999999
;
}
.uni-uploader__input-box
:active:before
,
.uni-uploader__input-box
:active:after
{
background-color
:
#999999
;
}
.uni-uploader__input
{
position
:
absolute
;
z-index
:
1
;
top
:
0
;
left
:
0
;
width
:
100%
;
height
:
100%
;
opacity
:
0
;
}
/*问题反馈*/
.feedback-title
{
display
:
flex
;
flex-direction
:
row
;
justify-content
:
space-between
;
align-items
:
center
;
padding
:
20
upx
;
color
:
#8f8f94
;
font-size
:
28
upx
;
}
.feedback-star-view.feedback-title
{
justify-content
:
flex-start
;
margin
:
0
;
}
.feedback-quick
{
position
:
relative
;
padding-right
:
40
upx
;
}
.feedback-quick
:after
{
font-family
:
uniicons
;
font-size
:
40
upx
;
content
:
'\e581'
;
position
:
absolute
;
right
:
0
;
top
:
50%
;
color
:
#bbb
;
-webkit-transform
:
translateY
(
-50%
);
transform
:
translateY
(
-50%
);
}
.inputsboxss
{
height
:
100
upx
;
}
.feedback-body
{
background
:
#fff
;
}
.feedback-textare
{
height
:
200
upx
;
font-size
:
34
upx
;
line-height
:
50
upx
;
width
:
100%
;
box-sizing
:
border-box
;
padding
:
20
upx
30
upx
0
;
}
.feedback-input
{
font-size
:
34
upx
;
height
:
50
upx
;
min-height
:
50
upx
;
padding
:
15
upx
20
upx
;
line-height
:
50
upx
;
}
.feedback-uploader
{
padding
:
22
upx
20
upx
;
}
.feedback-star
{
font-family
:
uniicons
;
font-size
:
40
upx
;
margin-left
:
6
upx
;
}
.feedback-star-view
{
margin-left
:
20
upx
;
}
.feedback-star
:after
{
content
:
'\e408'
;
}
.feedback-star.active
{
color
:
#FFB400
;
}
.feedback-star.active
:after
{
content
:
'\e438'
;
}
.feedback-submit
{
background
:
#ff6900
;
color
:
#FFFFFF
;
margin
:
20
upx
;
}
</
style
>
pages/setup/setup.vue
View file @
f9a65ee2
...
...
@@ -18,11 +18,11 @@
<switch
:checked=
"ischecked"
color=
"#fa436a"
@
change=
"switchChange"
/>
</view>
<
!--
<view
class=
"list-cell m-t
"
>
<
view
class=
"list-cell m-t"
v-if=
"isshowdy
"
>
<text
class=
"cell-tit"
>
店铺打烊
</text>
<switch
:checked=
"ischeckedtwo"
color=
"#fa436a"
@
change=
"switchChangetwo"
/>
</view>
-->
<view
class=
"list-cell m-t b-b"
@
tap=
"cleanstore"
hover-class=
"cell-hover"
:hover-stay-time=
"50"
>
<text
class=
"cell-tit"
>
清除缓存
</text>
...
...
@@ -44,6 +44,19 @@
<text
class=
"cell-tit"
>
关于我们
</text>
<image
class=
"jiantousi"
src=
"/static/news/jiantousi.png"
mode=
""
></image>
</navigator>
<navigator
url=
"/pages/Agreement/Agreementuser"
class=
"list-cell b-b"
hover-class=
"cell-hover"
:hover-stay-time=
"50"
>
<text
class=
"cell-tit"
>
用户协议
</text>
<image
class=
"jiantousi"
src=
"/static/news/jiantousi.png"
mode=
""
></image>
</navigator>
<navigator
url=
"/pages/Agreement/Agreement"
class=
"list-cell b-b"
hover-class=
"cell-hover"
:hover-stay-time=
"50"
>
<text
class=
"cell-tit"
>
隐私策略
</text>
<image
class=
"jiantousi"
src=
"/static/news/jiantousi.png"
mode=
""
></image>
</navigator>
<navigator
url=
"/pages/feedback/feedback"
class=
"list-cell b-b"
hover-class=
"cell-hover"
:hover-stay-time=
"50"
>
<text
class=
"cell-tit"
>
意见反馈
</text>
<image
class=
"jiantousi"
src=
"/static/news/jiantousi.png"
mode=
""
></image>
</navigator>
<view
class=
"list-cell ali-c"
@
tap=
"ToUpdate"
>
<text
class=
"cell-tit"
>
检查更新
</text>
<text
class=
"cell-tip"
>
当前版本
{{
version
}}
</text>
...
...
@@ -64,7 +77,7 @@
</
template
>
<
script
>
import
{
userLogout
,
deleteStore
}
from
"
@/utils/api/api.js
"
;
import
{
userLogout
,
deleteStore
,
storeOpenEle
,
storeEleInfo
}
from
"
@/utils/api/api.js
"
;
import
yomolUpgrade
from
'
@/components/yomol-upgrade/yomol-upgrade.vue
'
;
//升级组件
export
default
{
components
:{
...
...
@@ -75,11 +88,14 @@
//ischecked:false,//声音提醒开关
version
:
"
1.00
"
,
ischeckedtwo
:
false
,
//店铺打烊情况
isshowdy
:
false
,
//是否显示打烊按钮
};
},
onLoad
()
{
this
.
getv
();
console
.
info
(
this
.
version
);
this
.
storeEleInfofun
();
//查询外卖店铺详情信息
},
computed
:{
//选中状态
...
...
@@ -88,6 +104,30 @@
}
},
methods
:{
//查询外卖店铺详情信息
async
storeEleInfofun
(){
let
res
=
await
storeEleInfo
({
});
if
(
res
.
data
==
null
){
this
.
isshowdy
=
false
;
return
false
;
}
else
{
this
.
isshowdy
=
true
;
}
if
(
res
.
code
==
0
){
let
is_open
=
res
.
data
.
is_open
;
//1营业,0打烊
if
(
is_open
==
1
){
//营业
this
.
ischeckedtwo
=
false
;
}
else
{
//false 打烊中
this
.
ischeckedtwo
=
true
;
}
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
//关闭店铺
todeleteStore
(){
console
.
info
(
"
关闭店铺
"
);
...
...
@@ -192,7 +232,21 @@
},
//店铺打烊
switchChangetwo
(
e
){
console
.
info
(
e
,
"
打烊修改
"
);
console
.
info
(
e
.
detail
.
value
,
"
打烊修改
"
);
//is_open 是否打烊(0默认打烊,1营业)
let
is_open
=
e
.
detail
.
value
?
0
:
1
;
storeOpenEle
({
is_open
:
is_open
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
this
.
$api
.
msg
(
res
.
msg
);
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
})
},
cleanstore
(){
//清除缓存
...
...
pages/specsShop/specsShop.scss
View file @
f9a65ee2
...
...
@@ -27,3 +27,50 @@ page{
.submitbtn.active
{
background
:
#FF6900
;
}
.specsmodel
{
padding
:
0
24upx
;
height
:
88upx
;
line-height
:
88upx
;
color
:
#000000
;
font-size
:
30upx
;
.title
{
margin-right
:
20upx
;
}
.modlename
{
}
.dopicon
{
width
:
40upx
;
height
:
40upx
;
margin-left
:
20upx
;
}
}
.Checkboxboxmain
{
padding
:
0
24upx
;
}
.cleelable
{
padding
:
10px
15px
;
height
:
88upx
;
line-height
:
88upx
;
box-sizing
:
border-box
;
.names
{
height
:
88upx
;
line-height
:
88upx
;
margin-right
:
15upx
;
.bitian
{
color
:
#ff0000
;
}
}
.inputbox
{
border-bottom
:
1px
solid
rgb
(
242
,
242
,
242
);
height
:
88upx
;
line-height
:
88upx
;
}
.input
{
height
:
88upx
;
line-height
:
88upx
;
}
}
\ No newline at end of file
pages/specsShop/specsShop.vue
View file @
f9a65ee2
...
...
@@ -2,33 +2,57 @@
<!-- 规格商品 -->
<view
class=
"specsShop"
>
<view>
此处应有下拉切换 略
</view>
<view>
这个页面还没弄完
</view>
<!--
<view>
此处应有下拉切换 略
</view>
<view>
这个页面还没弄完
</view>
-->
<!--
<picker
:range=
"goodsSpec_goodsType"
range-key=
"name"
>
<!-- 属性 -->
<QSCheckbox
@
changeupdata=
"changeupdata"
:name=
"name"
variableName=
"checkbox"
layout=
"column"
title=
"尺码"
v-model=
"form.checkbox"
:itemArray=
"checkboxlist[0]"
></QSCheckbox>
<!-- 属性end -->
</picker>
-->
<!-- 属性 -->
<QSCheckbox
@
changeupdata=
"changeupdata"
:name=
"name"
variableName=
"checkbox"
layout=
"column"
title=
"颜色"
v-model=
"form.checkbox1"
:itemArray=
"checkboxlist[1]"
></QSCheckbox>
<!-- 属性end -->
<!-- 属性 -->
<QSCheckbox
@
changeupdata=
"changeupdata"
:name=
"name"
variableName=
"checkbox"
layout=
"column"
title=
"身高"
v-model=
"form.checkbox2"
:itemArray=
"checkboxlist[2]"
></QSCheckbox>
<!-- 属性end -->
<picker
@
change=
"bindPickerChange"
:value=
"Typeindex"
:range=
"goodsSpec_goodsType"
range-key=
"name"
>
<!--
<view
class=
"uni-input"
>
{{
array
[
index
]
}}
</view>
-->
<view
class=
"specsmodel flex ali-c"
>
<text
class=
"title"
>
规格模型:
</text>
<view
class=
"modlename"
>
{{
goodsSpec_goodsType
[
Typeindex
].
name
?
goodsSpec_goodsType
[
Typeindex
].
name
:
""
}}
</view>
<image
class=
"dopicon"
src=
"/static/news/dopicon.png"
mode=
""
></image>
</view>
</picker>
<!-- 多选框列表 -->
<view
class=
"Checkboxboxmain"
>
<yiCheckbox
v-for=
"(item,index) in specList"
:key=
"index"
:chinddata=
"item"
:isindex=
"index"
@
changecheckbox=
"changecheckbox"
></yiCheckbox>
</view>
<!-- 多选框列表end -->
<!-- specList -->
<view
class=
"specsShop_list"
>
<view
class=
"specsShop_list_item"
v-for=
"(item,index) in 5"
:key=
"index"
>
<view
class=
"itemnames"
>
商品名称哦~
</view>
<QSInput
:name=
"name"
titleColor=
"#000000"
variableName=
"shoptitle"
required
layout=
"row"
title=
"库存"
v-model=
"form.shoptitle"
></QSInput>
<QSInput
:name=
"name"
titleColor=
"#000000"
variableName=
"shoptitle"
required
layout=
"row"
title=
"sku"
v-model=
"form.shoptitle"
></QSInput>
<view
class=
"specsShop_list_item"
v-for=
"(item,index) in endobjdata"
:key=
"index"
>
<view
class=
"itemnames"
>
{{
item
.
key_name
}}
</view>
<view
class=
"cleelable flex ali-c"
>
<view
class=
"names"
><text
class=
"bitian"
>
*
</text>
售价
</view>
<view
class=
"inputbox flex1"
>
<input
class=
"input"
type=
"text"
value=
""
v-model=
"item.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=
"text"
v-model=
"item.store_count"
value=
""
placeholder=
"请输入库存"
></input>
</view>
</view>
<!--
<QSInput
:name=
"name"
titleColor=
"#000000"
variableName=
"shoptitle"
required
layout=
"row"
title=
"库存"
v-model=
"form.shoptitle"
></QSInput>
-->
<!--
<QSInput
:name=
"name"
titleColor=
"#000000"
variableName=
"shoptitle"
required
layout=
"row"
title=
"售价"
v-model=
"form.shoptitle"
></QSInput>
-->
<QSPics
:name=
"name"
variableName=
"pics"
title=
"商品图片"
v-model=
"form.pics"
></QSPics>
</view>
</view>
<view
class=
"submitbtn active"
>
<view
class=
"submitbtn active"
@
tap=
"addEditProductSpecfun"
>
提交
</view>
...
...
@@ -37,8 +61,17 @@
</
template
>
<
script
>
import
{
goodsSpec
,
ajaxGetSpecSelect
,
addEditProductSpec
}
from
"
@/utils/api/api.js
"
;
import
yiCheckbox
from
"
@/components/yiCheckbox/yiCheckbox.vue
"
;
/**
* 查询商品的规格 商品规格详情 goodsSpec
*
*
* */
export
default
{
components
:{
yiCheckbox
,
//多选的插件
},
data
()
{
return
{
name
:
"
shops
"
,
...
...
@@ -55,94 +88,172 @@
}
},
checkboxlist
:[
[
{
name
:
'
28
'
,
value
:
'
28
'
,
color
:
'
#f5105c
'
},
{
name
:
'
29
'
,
value
:
'
29
'
,
color
:
'
#f5105c
'
},
{
name
:
'
30
'
,
value
:
'
30
'
,
color
:
'
#f5105c
'
},
{
name
:
'
31
'
,
value
:
'
31
'
,
color
:
'
#f5105c
'
},
{
name
:
'
32
'
,
value
:
'
32
'
,
color
:
'
#f5105c
'
}
],
[
{
name
:
'
红色
'
,
value
:
'
reg
'
,
color
:
'
#f5105c
'
},
{
name
:
'
蓝色
'
,
value
:
'
green
'
,
color
:
'
#f5105c
'
},
{
name
:
'
黄色
'
,
value
:
'
yellow
'
,
color
:
'
#f5105c
'
goods_id
:
0
,
goodsSpec_goodsType
:[{
name
:
""
}],
//可选值列表
goodsSpec_info
:[],
type_id
:
""
,
//二级分类id
Typeindex
:
0
,
//二级分类选中索引
//类型规格详情的数据
items_ids
:[],
specList
:[],
goxuanlist
:[
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
// {name:"名称",child:[{name:"选中的名称",id:0}]},//第一个里面的选中的
],
//勾选的数据
endobjdata
:[],
//最后的end 是组装出来的数据
};
},
{
name
:
'
黑色
'
,
value
:
'
heise
'
,
color
:
'
#f5105c
'
onLoad
(
opdata
)
{
this
.
goods_id
=
opdata
.
id
;
this
.
goodsSpecfun
();
//商品规格详情
},
{
name
:
'
白色
'
,
value
:
'
baise
'
,
color
:
'
#f5105c
'
}
],
[
{
name
:
'
150
'
,
value
:
'
150
'
,
color
:
'
#f5105c
'
methods
:{
// 库存,图片,售价 添加规定的方法 最终提交的方法
addEditProductSpecfun
(){
// addEditProductSpec
console
.
info
(
"
endobjdata
"
,
this
.
endobjdata
);
// return false;
addEditProductSpec
({
goods_id
:
this
.
goods_id
,
//商品id
type_id
:
this
.
type_id
,
//模型id
item
:
this
.
endobjdata
,
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
}
else
{
this
.
$api
.
msg
(
res
.
data
);
}
})
},
{
name
:
'
155
'
,
value
:
'
155
'
,
color
:
'
#f5105c
'
//商品规格详情 第一步 获取 一级
async
goodsSpecfun
(){
let
res
=
await
goodsSpec
({
goods_id
:
this
.
goods_id
});
if
(
res
.
code
==
0
){
this
.
goodsSpec_goodsType
=
res
.
data
.
goodsType
;
this
.
goodsSpec_info
=
res
.
data
.
info
;
this
.
endobjdata
=
res
.
data
.
info
;
//之前的数据 默认值
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
{
name
:
'
160
'
,
value
:
'
160
'
,
color
:
'
#f5105c
'
//分类选择触发后
bindPickerChange
(
e
){
//console.info(e.detail.value);
this
.
Typeindex
=
e
.
detail
.
value
;
this
.
type_id
=
this
.
goodsSpec_goodsType
[
e
.
detail
.
value
].
id
;
//分类id
this
.
ajaxGetSpecSelectfun
();
//获取选中的分类下面的规格
},
{
name
:
'
170
'
,
value
:
'
170
'
,
color
:
'
#f5105c
'
//获取类型规格详情 通过上面的那个接口 里面的 goodsSpec_goodsType里面的id去获取
async
ajaxGetSpecSelectfun
(){
let
res
=
await
ajaxGetSpecSelect
({
goods_id
:
this
.
goods_id
,
//商品id
type_id
:
this
.
type_id
,
});
if
(
res
.
code
==
0
){
//items_ids 商品规格key,将规格id遍历
// specList 规格详情列表
this
.
items_ids
=
res
.
data
.
items_ids
;
this
.
specList
=
res
.
data
.
specList
;
let
goxuanlist
=
[];
for
(
var
i
=
0
;
i
<
this
.
specList
.
length
;
i
++
){
goxuanlist
.
push
({
name
:
this
.
specList
[
i
].
name
,
child
:[],
specList_item_id
:
0
,});
// child {name:"选中的名称",id:0}
}
this
.
goxuanlist
=
goxuanlist
;
//初始化勾选的数据
}
else
{
}
},
{
name
:
'
180
'
,
value
:
'
180
'
,
color
:
'
#f5105c
'
//封装的规格对选器选中 或者取消改变后的回调方法
changecheckbox
(
data
){
//console.info(data,"data");
let
goxuanlist
=
this
.
goxuanlist
;
goxuanlist
[
data
.
index
].
child
=
data
.
child
;
goxuanlist
[
data
.
index
].
specList_item_id
=
data
.
specList_item_id
;
//id
this
.
goxuanlist
=
goxuanlist
;
//重新替换勾选后的数据集合
/*let arr = [
{"name":"网络","child":[{"name":"3G","id":"12"},{"name":"4G","id":"11"}]},
{"name":"内存","child":[{"name":"128G","id":"102"},{"name":"32G","id":"28"},{"name":"8G","id":"14"},{"name":"16G","id":"13"}]},
{"name":"屏幕","child":[{"name":"文字屏","id":"23"},{"name":"触屏","id":"21"}]},
{"name":"颜色","child":[{"name":"白色","id":"56"},{"name":"银色","id":"99"},{"name":"玫瑰金","id":"100"}]}];*/
// let arr = this.goxuanlist.map((item,index)=>{
// if(item.){
// }
// });
let
arr
=
[];
this
.
goxuanlist
.
forEach
((
item
,
index
)
=>
{
if
(
item
.
child
.
length
!=
0
){
//处理选中的才 加入预组装
arr
.
push
(
item
);
}
]
]
};
});
// let arr = this.goxuanlist;
var
sarr
=
[[]];
var
sarrobj
=
[[]];
var
sarrobjtwo
=
[[]];
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
var
tarr
=
[];
var
tarrobj
=
[];
//4g 的id
var
tarrobjtwo
=
[];
//网络的id
for
(
var
j
=
0
;
j
<
sarr
.
length
;
j
++
){
for
(
var
k
=
0
;
k
<
arr
[
i
][
"
child
"
].
length
;
k
++
){
tarr
.
push
(
sarr
[
j
].
concat
(
arr
[
i
].
name
+
"
:
"
+
arr
[
i
][
"
child
"
][
k
].
name
));
//spec_id
//arr[i]["child"][k].name
tarrobj
.
push
(
sarrobj
[
j
].
concat
(
arr
[
i
][
"
child
"
][
k
].
id
));
tarrobjtwo
.
push
(
sarrobjtwo
[
j
].
concat
(
arr
[
i
].
specList_item_id
))
}
}
sarr
=
tarr
;
sarrobj
=
tarrobj
;
sarrobjtwo
=
tarrobjtwo
;
}
// console.info(sarr.join("\n"),"选中的名字组合");//名字列表
// console.info(sarrobj.join("\n"),"key");//4G 的id 3G的id
// console.info(sarrobjtwo.join("\n"),"keytwo");//网络的id
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
:
""
};
return
objsdata
;
})
// console.info(endobjdata,"endobjdata");
this
.
endobjdata
=
endobjdata
;
},
methods
:{
changeupdata
(
e
){
console
.
info
(
"
数据改变后
"
,
e
);
//
console.info("数据改变后",e);
},
//初始化数据呀
initdatalist
(){
...
...
@@ -153,7 +264,7 @@
for
(
let
i1
=
0
;
i1
<
arr1
.
length
;
i1
++
){
for
(
let
i2
=
0
;
i2
<
arr1
.
length
;
i2
++
){
for
(
let
i3
=
0
;
i3
<
arr1
.
length
;
i3
++
){
console
.
info
(
arr1
[
i1
],
arr1
[
i2
],
arr1
[
i3
]);
//
console.info(arr1[i1],arr1[i2],arr1[i3]);
}
}
}
...
...
utils/api/api.js
View file @
f9a65ee2
...
...
@@ -186,13 +186,32 @@ export function storeMoney(data)
}
//获取模型分类 关联规格的
//获取模型分类 关联规格的
选择分类
export
function
specTypeList
(
data
)
{
return
request
.
post
(
"
Spec/specTypeList
"
,
data
,{
noAuth
:
true
});
}
//查询商品的规格 商品规格详情 没对
export
function
goodsSpec
(
data
)
{
return
request
.
post
(
"
spec/goodsSpec
"
,
data
,{
noAuth
:
true
});
}
//spec/ajaxGetSpecSelect
//获取商品详情的规格 查询规格项 获取类型规格详情 没对
export
function
ajaxGetSpecSelect
(
data
)
{
return
request
.
post
(
"
spec/ajaxGetSpecSelect
"
,
data
,{
noAuth
:
true
});
}
//商品添加规格 商品关联规格
export
function
addEditProductSpec
(
data
)
{
return
request
.
post
(
"
spec/addEditProductSpec
"
,
data
,{
noAuth
:
true
});
}
//获取规格列表 规格列表
export
function
specitemList
(
data
)
{
...
...
@@ -385,6 +404,17 @@ export function deleteStore(data)
}
//获取外卖店铺详情 查询店铺打烊情况
export
function
storeEleInfo
(
data
)
{
return
request
.
post
(
"
store/eleInfo
"
,
data
,{
noAuth
:
true
});
}
//店铺打烊 开关
export
function
storeOpenEle
(
data
)
{
return
request
.
post
(
"
store/openEle
"
,
data
,{
noAuth
:
true
});
}
utils/debug.js
View file @
f9a65ee2
...
...
@@ -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