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
42f49cef
Commit
42f49cef
authored
Apr 25, 2020
by
xieyishang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商家助手APP酒店产品管理
parent
b927a056
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
870 additions
and
63 deletions
+870
-63
components/yomol-upgrade/yomol-upgrade.vue
components/yomol-upgrade/yomol-upgrade.vue
+6
-0
pages.json
pages.json
+8
-1
pages/HotelManage/HotelManage.scss
pages/HotelManage/HotelManage.scss
+10
-0
pages/HotelManage/HotelManage.vue
pages/HotelManage/HotelManage.vue
+86
-36
pages/LuckDraw/LuckList/LuckList.vue
pages/LuckDraw/LuckList/LuckList.vue
+4
-1
pages/LuckDraw/LuckyDetails/LuckyDetails.vue
pages/LuckDraw/LuckyDetails/LuckyDetails.vue
+10
-5
pages/LuckDraw/homenav/homenav.vue
pages/LuckDraw/homenav/homenav.vue
+9
-7
pages/LuckDraw/preview/preview.vue
pages/LuckDraw/preview/preview.vue
+1
-1
pages/LuckDraw/send/send.vue
pages/LuckDraw/send/send.vue
+3
-3
pages/addhotel/addProjuct.scss
pages/addhotel/addProjuct.scss
+317
-0
pages/addhotel/addhotel.vue
pages/addhotel/addhotel.vue
+344
-0
pages/edit/pro_manage/pro_manage.vue
pages/edit/pro_manage/pro_manage.vue
+22
-2
pages/index/index.vue
pages/index/index.vue
+15
-2
utils/api/LuckDraw.js
utils/api/LuckDraw.js
+2
-2
utils/api/hotel.js
utils/api/hotel.js
+28
-1
utils/request.js
utils/request.js
+5
-2
No files found.
components/yomol-upgrade/yomol-upgrade.vue
View file @
42f49cef
...
...
@@ -164,6 +164,12 @@
checkVersionClick
()
{
console
.
info
(
"
更新检测
"
);
//直接不直接 苹果不做更新
if
(
uni
.
getSystemInfoSync
().
platform
==
'
ios
'
){
console
.
info
(
"
ios更新检测,不进入~
"
);
return
false
;
}
// uni.showToast({
// title:"更新检测~",
// icon:"none"
...
...
pages.json
View file @
42f49cef
...
...
@@ -302,12 +302,19 @@
//酒店管理的
{
"path"
:
"pages/
roomList/roomList
"
,
"path"
:
"pages/
HotelManage/HotelManage
"
,
"style"
:
{
"navigationBarTitleText"
:
"酒店管理"
}
},
{
"path"
:
"pages/addhotel/addhotel"
,
"style"
:
{
"navigationBarTitleText"
:
"添加酒店"
}
}
],
"globalStyle"
:
{
"navigationBarTextStyle"
:
"black"
,
...
...
pages/HotelManage/HotelManage.scss
View file @
42f49cef
...
...
@@ -124,4 +124,14 @@
border
:
0
;
}
}
.addshopbtn
{
height
:
88upx
;
line-height
:
88upx
;
text-align
:
center
;
color
:
#FFFFFF
;
background-color
:
#ff6900
;
width
:
100%
;
border-radius
:
14upx
;
}
}
\ No newline at end of file
pages/HotelManage/HotelManage.vue
View file @
42f49cef
...
...
@@ -6,10 +6,12 @@
<!-- tab切换 -->
<view
class=
"projuctTab flex"
>
<view
class=
"tabitems flex1"
:class=
"
{active:tabactive==1}" @tap="taggletab(1)">
<view
class=
"tabtitle"
>
出售中(
{{
count
[
0
]
}}
)
</view>
<view
class=
"tabtitle"
>
出售中
</view>
<!-- (
{{
count
[
0
]
}}
) -->
</view>
<view
class=
"tabitems flex1"
:class=
"
{active:tabactive==2}" @tap="taggletab(2)">
<view
class=
"tabtitle"
>
已下架(
{{
count
[
1
]
}}
)
</view>
<view
class=
"tabtitle"
>
已下架
</view>
<!-- (
{{
count
[
1
]
}}
) -->
</view>
</view>
...
...
@@ -19,21 +21,23 @@
<!-- 单个商品 -->
<view
class=
"itempro flex "
v-for=
"(item,index) in goods_list"
:key=
"index"
>
<label
class=
"ali-c"
>
<
!--
<
label
class=
"ali-c"
>
<checkbox
:value=
"item.id.toString()"
:checked=
"item.checked==true"
/>
</label>
</label>
-->
<image
class=
"thumbnail"
:src=
"staticUrl + item.photo"
mode=
""
></image>
<view
class=
"infobox"
>
<view
class=
"ti
tle oneline"
>
{{
item
.
product_nam
e
}}
</view>
<view
class=
"ti
mes"
>
{{
item
.
titl
e
}}
</view>
<view
class=
"time"
>
上架时间:
{{
item
.
create_time
}}
</view>
<view
class=
"price"
>
¥
{{
item
.
price
}}
元
</view>
</view>
<view
class=
"btnbox flex"
>
<!--
<view
class=
"btns btnboxdel"
>
删 除
</view>
-->
<view
class=
"btns btnboxxj"
@
tap=
"Selectiondata(item)"
v-if=
"tabactive==1 && isselect==1"
>
加入活动
</view>
<view
class=
"btns btnboxxj"
@
tap=
"sold_outfun(item.id,1)"
v-else-if=
"tabactive==1"
>
下 架
</view>
<view
class=
"btns btnboxxj"
@
tap=
"sold_outfun(item.id,0)"
v-show=
"tabactive==2"
>
上 架
</view>
<!--
<view
class=
"btns btnboxxj"
@
tap=
"Selectiondata(item)"
v-if=
"tabactive==1 && isselect==1"
>
加入活动
</view>
-->
<view
class=
"btns btnboxxj"
@
tap=
"sold_outfun(item.room_id,1,index)"
v-if=
"tabactive==1"
>
下 架
</view>
<view
class=
"btns btnboxxj"
@
tap=
"sold_outfun(item.room_id,0,index)"
v-if=
"tabactive==2"
>
上 架
</view>
<view
class=
"btns btnboxxj"
@
tap=
"edithotel(item)"
>
编 辑
</view>
</view>
</view>
...
...
@@ -48,21 +52,26 @@
<!-- footchindbox 底部栏 -->
<view
class=
"footchindbox flex ali-c jus-b"
>
<checkbox-group
@
change=
"radioChange"
v-model=
"datas"
>
<
!--
<
checkbox-group
@
change=
"radioChange"
v-model=
"datas"
>
<label
class=
"uni-list-cell uni-list-cell-pd flex"
>
<view>
<!-- :checked="isallchind==1" -->
<!--
<radio
color=
"#FF6600"
value=
"1"
/>
-->
<checkbox
value=
"a"
:checked=
"isallchind"
/>
</view>
<view>
全选
</view>
</label>
</checkbox-group>
<view
class=
"rightbtn flex"
>
<
!--
<view
class=
"btns btns1"
>
删除
</view>
--
>
<
view
class=
"btns btns1"
>
删除
</view
>
<view
class=
"btns btns2"
v-show=
"tabactive==1"
@
tap=
"sold_outfun('all',1)"
>
下架
</view>
<view
class=
"btns btns2"
v-show=
"tabactive==2"
@
tap=
"sold_outfun('all',0)"
>
上架
</view>
</view>
</view>
-->
<navigator
url=
"/pages/addhotel/addhotel"
class=
"addshopbtn"
>
添加房间
</navigator>
<!-- 添加房间 -->
</view>
<pageScrollTo
v-if=
"isshowtop"
></pageScrollTo>
...
...
@@ -71,7 +80,9 @@
</
template
>
<
script
>
import
{
goods_product_list
,
sold_out
,
sold_outAll
}
from
"
@/utils/api/store.js
"
;
// import { goods_product_list, sold_out,sold_outAll} from "@/utils/api/store.js";
import
{
roomList
,
autoManageRoom
}
from
"
@/utils/api/hotel.js
"
;
import
pageScrollTo
from
"
@/components/pageScrollTo/pageScrollTo.vue
"
import
empty
from
"
@/components/empty/empty.vue
"
export
default
{
...
...
@@ -84,7 +95,7 @@
tabactive
:
1
,
isallchind
:
false
,
//是否全选 批量操作
datas
:
""
,
page
:
-
1
,
page
:
0
,
isallshow
:
false
,
goods_list
:[],
count
:[
0
,
0
],
...
...
@@ -104,6 +115,17 @@
}
else
{
this
.
isselect
=
2
;
}
},
onShow
()
{
//this.goods_product_list();
//this.tabactive = inde;
this
.
isallshow
=
false
;
this
.
goods_list
=
[];
this
.
isallchind
=
false
;
this
.
page
=
0
;
this
.
goods_product_list
();
},
computed
:
{
...
...
@@ -128,22 +150,33 @@
},
methods
:{
//修改酒店处理
edithotel
(
data
){
uni
.
navigateTo
({
url
:
"
/pages/addhotel/addhotel?id=
"
+
data
.
room_id
,
})
},
//交互
//获取产品列表
//获取产品列表
酒店的产品
async
goods_product_list
(){
uni
.
showLoading
({
title
:
'
加载中...
'
});
this
.
page
++
;
let
res
=
await
goods_product_list
(
this
.
tabactive
-
1
,
this
.
page
);
let
res
=
await
roomList
({
closed
:
this
.
tabactive
-
1
,
page
:
this
.
page
});
uni
.
hideLoading
();
//结束加载
if
(
res
.
code
==
0
){
if
(
this
.
page
==
0
){
this
.
count
=
res
.
data
.
count
;
}
if
(
res
.
data
.
goods_list
!=
null
&&
res
.
data
.
goods_list
.
length
!=
0
){
let
data
=
res
.
data
.
goods_list
;
// if(this.page==0){
// this.count = res.data.count;
// }
if
(
res
.
data
!=
null
&&
res
.
data
.
length
!=
0
){
let
data
=
res
.
data
;
data
=
data
.
map
((
item
,
index
)
=>
{
item
.
checked
=
false
;
return
item
;
...
...
@@ -158,26 +191,43 @@
}
},
//下架
async
sold_outfun
(
id
,
closed
){
async
sold_outfun
(
id
,
closed
,
index
=
0
){
let
res
=
{};
if
(
id
==
"
all
"
){
//全选的方法
res
=
await
sold_outAll
(
this
.
idArr
,
closed
);
// if(id=="all"){
// //全选的方法
// res = await autoManageRoom({
// room_id:id,//this.idArr,
// closed:closed,
// });
}
else
{
//单选的方法
res
=
await
sold_out
(
id
,
closed
);
}
// }else{
// //单选的方法
// res = await autoManageRoom({
// room_id:id,//this.idArr,
// closed:closed,
// });
// }
console
.
info
(
id
,
"
id
"
);
res
=
await
autoManageRoom
({
room_id
:
id
,
//this.idArr,
closed
:
closed
,
});
if
(
res
.
code
==
0
){
this
.
$api
.
msg
(
res
.
msg
);
if
(
this
.
tabactive
==
1
){
this
.
taggletab
(
2
);
}
else
if
(
this
.
tabactive
==
2
){
this
.
taggletab
(
1
);
}
this
.
goods_list
.
splice
(
index
,
1
);
//本地删除
// if(this.tabactive == 1){
// this.taggletab(2);
// }else if(this.tabactive==2){
// this.taggletab(1);
// }
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
...
...
@@ -191,7 +241,7 @@
this
.
isallshow
=
false
;
this
.
goods_list
=
[];
this
.
isallchind
=
false
;
this
.
page
=
-
1
;
this
.
page
=
0
;
this
.
goods_product_list
();
},
checkboxChange
(
e
){
//单选事件 列表
...
...
pages/LuckDraw/LuckList/LuckList.vue
View file @
42f49cef
...
...
@@ -44,7 +44,7 @@
<view
class=
"times oneline"
v-if=
"item.type == 0"
>
中奖时间:
{{
item
.
start_time
}}
</view>
<view
class=
"times oneline"
v-if=
"item.type == 1"
>
领奖时间:
{{
item
.
end_time
}}
</view>
<view
class=
"btns flex"
>
<view
class=
"sysbtns"
v-if=
"item.type == 0"
:data-goods_id=
"item.goods_id"
:data-win_id=
"item.win_id"
catchta
p=
"goShopping"
>
点击领取
</view>
<view
class=
"sysbtns"
v-if=
"item.type == 0"
:data-goods_id=
"item.goods_id"
:data-win_id=
"item.win_id"
@
tap.sto
p=
"goShopping"
>
点击领取
</view>
<view
class=
"sysbtns"
v-if=
"item.type == 1"
>
已领奖
</view>
</view>
</view>
...
...
@@ -174,6 +174,9 @@
},
//领取奖品
goShopping
(
e
){
this
.
$api
.
msg
(
"
请到APP或小程序中领取领取
"
);
return
false
;
let
goods_id
=
e
.
currentTarget
.
dataset
.
goods_id
;
let
win_id
=
e
.
currentTarget
.
dataset
.
win_id
;
uni
.
navigateTo
({
...
...
pages/LuckDraw/LuckyDetails/LuckyDetails.vue
View file @
42f49cef
...
...
@@ -122,7 +122,7 @@
<!-- 抽奖按钮end -->
<view
class=
"partaketext jus-c"
>
<view
class=
"partaketext jus-c
ali-c
"
>
已有
<text
class=
"text"
>
{{
LotteryInfos
.
inHum
}}
</text>
人参与,
<text
class=
"text"
@
tap=
"chakancy"
>
查看全部>
</text>
</view>
<view
class=
"partakeuserlist flex jus-c"
>
...
...
@@ -230,16 +230,21 @@
//参与抽奖方法
topartake
(){
//this.$api.msg("");
let
that
=
this
;
joinLottery
({
lottery_id
:
that
.
lottery_id
,
shop_id
:
that
.
LotteryInfos
.
shop_id
//shop_id:that.LotteryInfos.shop_id
user_id
:
that
.
LotteryInfos
.
shop_id
,
}).
then
(
res
=>
{
if
(
res
.
code
==
0
){
if
(
that
.
LotteryInfos
.
inHum
+
1
==
that
.
LotteryInfos
.
pepole_num
){
OpenLottery
({
lottery_id
:
that
.
lottery_id
,
shop_id
:
that
.
LotteryInfos
.
shop_id
//shop_id:that.LotteryInfos.shop_id
user_id
:
that
.
LotteryInfos
.
shop_id
}).
then
(
res1
=>
{
if
(
res1
.
code
==
0
){
console
.
log
(
"
开奖成功
"
);
...
...
@@ -285,13 +290,13 @@
//查看全部的中奖名单 2
chakan
(
jpname
){
uni
.
navigateTo
({
url
:
`
..
/PartakeUser/PartakeUser?type=2&grade=
${
this
.
LotteryInfos
.
grade
}
&lottery_id=
${
this
.
lottery_id
}
&jpname=
${
jpname
}
`
,
url
:
`
/pages/LuckDraw
/PartakeUser/PartakeUser?type=2&grade=
${
this
.
LotteryInfos
.
grade
}
&lottery_id=
${
this
.
lottery_id
}
&jpname=
${
jpname
}
`
,
})
},
//查看全部的参与名单 1
chakancy
(){
uni
.
navigateTo
({
url
:
`
..
/PartakeUser/PartakeUser?type=1&grade=
${
this
.
LotteryInfos
.
grade
}
&lottery_id=
${
this
.
lottery_id
}
`
,
url
:
`
/pages/LuckDraw
/PartakeUser/PartakeUser?type=1&grade=
${
this
.
LotteryInfos
.
grade
}
&lottery_id=
${
this
.
lottery_id
}
`
,
})
},
showshare
(){
...
...
pages/LuckDraw/homenav/homenav.vue
View file @
42f49cef
...
...
@@ -6,14 +6,14 @@
<view
class=
"honenavlist"
>
<view
v-if=
"isshowall==2"
>
<navigator
url=
"
..
/send/send"
class=
"send_cell flex ali-c"
>
<navigator
url=
"
/pages/LuckDraw
/send/send"
class=
"send_cell flex ali-c"
>
<view
class=
"inputname"
>
实物抽奖
</view>
<view
class=
"input_box flex1 jus-e"
>
<image
class=
"jiantou_icon"
src=
"/static/LuckDraw/jiantou_icon.png"
mode=
""
></image>
</view>
</navigator>
<navigator
url=
"
..
/LuckList/LuckList?type=0"
class=
"send_cell flex ali-c linetowpad"
>
<navigator
url=
"
/pages/LuckDraw
/LuckList/LuckList?type=0"
class=
"send_cell flex ali-c linetowpad"
>
<view
class=
"inputname"
>
关闭抽奖
</view>
<view
class=
"input_box flex1 jus-e ali-c"
>
<text
class=
"textssum"
>
{{
conutdata
.
closeLottery
}}
</text>
...
...
@@ -21,7 +21,7 @@
</view>
</navigator>
<navigator
url=
"
..
/LuckList/LuckList?type=1"
class=
"send_cell flex ali-c "
>
<navigator
url=
"
/pages/LuckDraw
/LuckList/LuckList?type=1"
class=
"send_cell flex ali-c "
>
<view
class=
"inputname"
>
发起抽奖
</view>
<view
class=
"input_box flex1 jus-e ali-c"
>
<text
class=
"textssum"
>
{{
conutdata
.
inLottery
}}
</text>
...
...
@@ -29,7 +29,7 @@
</view>
</navigator>
<navigator
url=
"
..
/LuckList/LuckList?type=2"
class=
"send_cell flex ali-c"
>
<navigator
url=
"
/pages/LuckDraw
/LuckList/LuckList?type=2"
class=
"send_cell flex ali-c"
>
<view
class=
"inputname"
>
开奖记录
</view>
<view
class=
"input_box flex1 jus-e ali-c"
>
<text
class=
"textssum"
>
{{
conutdata
.
openLottery
}}
</text>
...
...
@@ -38,7 +38,7 @@
</navigator>
</view>
<navigator
url=
"
..
/LuckList/LuckList?type=3"
class=
"send_cell flex ali-c "
>
<navigator
url=
"
/pages/LuckDraw
/LuckList/LuckList?type=3"
class=
"send_cell flex ali-c "
>
<view
class=
"inputname"
>
参与抽奖
</view>
<view
class=
"input_box flex1 jus-e ali-c"
>
<text
class=
"textssum"
>
{{
conutdata
.
inCount
}}
</text>
...
...
@@ -46,7 +46,7 @@
</view>
</navigator>
<navigator
url=
"
..
/LuckList/LuckList?type=4"
class=
"send_cell flex ali-c send_cell_boder"
>
<navigator
url=
"
/pages/LuckDraw
/LuckList/LuckList?type=4"
class=
"send_cell flex ali-c send_cell_boder"
>
<view
class=
"inputname"
>
中奖记录
</view>
<view
class=
"input_box flex1 jus-e ali-c"
>
<text
class=
"textssum"
>
{{
conutdata
.
inPrize
}}
</text>
...
...
@@ -85,7 +85,9 @@
// }
//this.isshowall = opdata.isshowall;
},
onShow
()
{
this
.
getslotCountLottery
();
},
methods
:{
...
...
pages/LuckDraw/preview/preview.vue
View file @
42f49cef
...
...
@@ -155,7 +155,7 @@
//进入活动详情
uni
.
navigateTo
({
url
:
`
..
/LuckyDetails/LuckyDetails?id=
${
res
.
data
}
`
url
:
`
/pages/LuckDraw
/LuckyDetails/LuckyDetails?id=
${
res
.
data
}
`
});
},
1000
)
}
else
{
...
...
pages/LuckDraw/send/send.vue
View file @
42f49cef
...
...
@@ -207,7 +207,7 @@
});
uni
.
navigateTo
({
url
:
"
..
/preview/preview
"
,
url
:
"
/pages/LuckDraw
/preview/preview
"
,
})
},
//提交发布的是
...
...
@@ -247,7 +247,7 @@
//进入活动详情
uni
.
navigateTo
({
url
:
`
..
/LuckyDetails/LuckyDetails?id=
${
res
.
data
}
`
url
:
`
/pages/LuckDraw
/LuckyDetails/LuckyDetails?id=
${
res
.
data
}
`
});
},
1000
)
}
else
{
...
...
@@ -258,7 +258,7 @@
toselectshp
(
index
){
//传的是数组插入索引
uni
.
navigateTo
({
url
:
`/pages/
ProductManage/ProductM
anage?isselect=1&sendindex=
${
index
}
`
,
url
:
`/pages/
edit/pro_manage/pro_m
anage?isselect=1&sendindex=
${
index
}
`
,
})
}
}
...
...
pages/addhotel/addProjuct.scss
0 → 100644
View file @
42f49cef
//上传产品
.addProjuct
{
min-height
:
100vh
;
background
:
#F5F2F2
;
padding
:
20upx
0
;
width
:
100%
;
overflow
:
hidden
;
}
.noecellbox
{
margin
:
20upx
24upx
;
//padding-bottom: 45upx;
padding-top
:
25upx
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
border-radius
:
14upx
14upx
0px
0px
;
.title
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
margin-left
:
20upx
;
}
.inputbox
{
padding
:
0
20upx
;
height
:
97upx
;
line-height
:
97upx
;
border-bottom
:
1px
solid
#F5F2F2
;
.input
{
height
:
97upx
;
line-height
:
97upx
;
font-size
:
30upx
;
}
.text
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
204
,
204
,
204
,
1
)
;
}
}
.plclass
{
color
:
#B6B6B6
;
}
.projucttype
{
padding
:
0
20upx
;
height
:
122upx
;
.celltitle
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
.icons1
{
width
:
16upx
;
height
:
29upx
;
opacity
:
0
.18
;
}
}
}
//添加图片
.addmigs
{
background
:rgba
(
255
,
255
,
255
,
1
)
;
margin
:
20upx
24upx
;
padding
:
25upx
21upx
;
.titlehe
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
}
//添加图片end
//添加规格
.specsbox
{
margin
:
20upx
24upx
;
padding
:
20upx
;
background
:
#fff
;
.pricebox
{
height
:
121upx
;
border-bottom
:
1px
solid
#E6E6E6
;
.inoutbox
{
height
:
78upx
;
border
:
1px
solid
rgba
(
220
,
220
,
220
,
1
);
padding-right
:
20upx
;
}
.inputs
{
padding
:
10upx
;
height
:
78upx
;
line-height
:
78upx
;
}
}
.name
{
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
margin-right
:
20upx
;
}
.specsboxmain
{
height
:
110upx
;
.imgs
{
width
:
24upx
;
height
:
14upx
;
}
}
//减去图标
.jianshao
{
margin-left
:
67upx
;
margin-right
:
37upx
;
}
.jianshao
.imgs
{
width
:
44upx
;
height
:
44upx
;
}
}
//添加规格
.addspecs
{
margin-top
:
37upx
;
.imgs1
{
width
:
44upx
;
height
:
44upx
;
}
.title
{
margin-left
:
20upx
;
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
}
//添加规格end
.checkboxs
{
margin
:
50upx
24upx
;
padding
:
20upx
;
background
:
#fff
;
border-radius
:
0px
0px
14upx
14upx
;
.title
{
font-size
:
30upx
;
color
:rgba
(
51
,
51
,
51
,
1
)
;
margin-bottom
:
46upx
;
}
.chindlost
{
.titles
{
font-size
:
28upx
;
color
:rgba
(
103
,
103
,
103
,
1
)
;
}
.lableitem
{
margin-right
:
24upx
;
margin-bottom
:
21upx
;
}
}
}
//发布按钮
.submits
{
margin
:
59upx
24upx
;
height
:
88upx
;
line-height
:
88upx
;
text-align
:
center
;
background
:rgba
(
254
,
197
,
156
,
1
)
;
color
:
#FFFFFF
;
border-radius
:
6upx
;
font-size
:
32upx
;
}
.submits.active
{
background
:
#FF6900
;
}
//下面的代码是 添加商品的
//简介
.briefIntroduction
{
margin
:
20upx
24upx
;
padding
:
22upx
;
background
:
#FFFFFF
;
.title
{
font-size
:
30upx
;
font-family
:
PingFang
SC
;
font-weight
:
500
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
.inputs
{
margin-top
:
25upx
;
font-size
:
30upx
;
color
:
#000000
;
}
.textarea
{
margin-top
:
25upx
;
font-size
:
30upx
;
color
:
#000000
;
// width: 100vh;
height
:
200upx
;
}
}
//规格 库存 分类
.Specificationsbox
{
margin
:
20upx
24upx
;
background
:rgba
(
255
,
255
,
255
,
1
)
;
//规格
.splcsinfo
{
padding
:
0
20upx
;
height
:
88upx
;
//line-height: 88upx;
.name
{
font-size
:
30upx
;
color
:rgba
(
1
,
1
,
1
,
1
)
;
}
.imgs
{
width
:
24upx
;
height
:
14upx
;
}
}
.Stock
{
padding
:
0
20upx
;
height
:
99upx
;
border-top
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
border-bottom
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
.name
{
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
.inputs
{
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
margin-left
:
20upx
;
width
:
296upx
;
height
:
60upx
;
.inpus
{
width
:
296upx
;
height
:
60upx
;
padding
:
10upx
;
}
}
}
.sort
{
padding
:
0
20upx
;
height
:
104upx
;
line-height
:
104upx
;
.name
{
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
}
.inputs
{
position
:
relative
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
margin-left
:
20upx
;
width
:
296upx
;
height
:
60upx
;
.inpus
{
width
:
296upx
;
height
:
60upx
;
padding
:
10upx
;
}
.imgs
{
width
:
24upx
;
height
:
14upx
;
position
:
absolute
;
right
:
17upx
;
top
:
23upx
;
}
}
.inputs1
{
width
:
266upx
;
.inpus
{
width
:
266upx
;
height
:
60upx
;
padding
:
10upx
;
}
}
}
}
//价格
.pricebox
{
margin
:
20upx
24upx
;
background
:
#FFFFFF
;
.boxitem
{
height
:
104upx
;
padding
:
0
22upx
;
.inputleft
,
.inputright
{
width
:
50%
;
.title
{
font-size
:
30upx
;
color
:rgba
(
0
,
0
,
0
,
1
)
;
margin-right
:
20upx
;
width
:
100upx
;
}
.inputs
{
width
:
196upx
;
height
:
59upx
;
border
:
1px
solid
rgba
(
229
,
229
,
229
,
1
);
padding
:
10upx
;
}
}
}
}
\ No newline at end of file
pages/addhotel/addhotel.vue
0 → 100644
View file @
42f49cef
<
template
>
<!-- 上传产品 酒店的!!! !! 添加和修改 同一个方法 -->
<!-- addpr 嘿嘿 -->
<view
class=
"addProjuct yicode"
>
<!-- 表特和类目 -->
<view
class=
"noecellbox"
>
<view
class=
"title"
>
房间标题
</view>
<view
class=
"inputbox flex"
>
<input
class=
"input flex1"
maxlength=
"15"
type=
"text"
v-model=
"parameter.title"
value=
""
placeholder-class=
"plclass"
placeholder=
"请填写产品标题"
/>
<text
class=
"text"
>
{{
parameter
.
title
.
length
}}
/15
</text>
</view>
</view>
<!-- 添加产品图 -->
<view
class=
"addmigs"
>
<view
class=
"titlehe"
>
添加房间主图
</view>
<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>
<!-- 添加图片end -->
<!-- 选择价格和规格 -->
<view
class=
"Specificationsbox"
>
<!-- 多选列表 -->
<view
class=
"checkboxs"
style=
"margin-top: 0;margin-bottom: 0;"
>
<view
class=
"title"
>
配套设施:
</view>
<checkbox-group
@
change=
"checkboxChange"
>
<view
class=
"chindlost ali-c flex flex-wrap"
>
<label
class=
"lableitem flex ali-c"
v-for=
"(item,index) in listchind"
:key=
"index"
>
<view>
<checkbox
color=
"#FF6900"
:value=
"item.value"
:checked=
"item.checked"
/>
</view>
<view
class=
"titles"
>
{{
item
.
name
}}
</view>
</label>
</view>
</checkbox-group>
</view>
<!-- 多选end -->
<view
class=
"sort flex ali-c "
>
<view
class=
"name"
>
房间价格
</view>
<view
class=
"inputs"
>
<input
type=
"number"
value=
""
v-model=
"parameter.price"
placeholder=
"请输入数字"
class=
"inpus"
/>
<!--
<image
class=
"imgs"
src=
"/static/news/xiamassfd.png"
mode=
""
></image>
-->
</view>
</view>
<view
class=
"sort flex ali-c "
>
<view
class=
"name"
>
剩余房间
</view>
<view
class=
"inputs "
>
<input
type=
"number"
value=
""
v-model=
"parameter.sku"
placeholder=
"请输入数字"
class=
"inpus"
/>
<!--
<image
class=
"imgs"
src=
"/static/news/xiamassfd.png"
mode=
""
></image>
-->
</view>
</view>
<view
class=
"sort flex ali-c "
>
<view
class=
"name"
>
房间类型
</view>
<picker
@
change=
"bindPickerChange1"
name=
"type"
:value=
"isclassval"
:range=
"typeList"
range-key=
"name"
>
<view
class=
"inputs"
>
<input
type=
"text"
disabled=
"disabled"
value=
""
v-model=
"cate_name"
class=
"inpus"
/>
<image
class=
"imgs"
src=
"/static/news/xiamassfd.png"
mode=
""
></image>
</view>
</picker>
</view>
</view>
<!-- end -->
<view
v-show=
"room_id==''"
class=
"submits active"
@
tap=
"create_productFun"
>
发布产品
</view>
<view
v-show=
"room_id!=''"
class=
"submits active"
@
tap=
"create_productFun"
>
提交修改
</view>
</view>
</
template
>
<
script
>
import
{
hotelroomType
,
addEditRoom
,
roomInfo
}
from
"
@/utils/api/hotel.js
"
;
import
robbyImageUpload
from
'
@/components/plan-image-upload/up_img
'
;
//上传资质图片组件
export
default
{
components
:{
robbyImageUpload
,
},
data
()
{
return
{
isclassval
:
0
,
//分类的vlaue
title
:
""
,
//产品标题
index
:
0
,
imageData
:
[],
is_data
:[],
//三个多选的值
specslist
:[
1
],
listchind
:[
{
name
:
"
是否有早餐
"
,
value
:
"
1
"
,
checked
:
false
},
{
name
:
"
是否有宽带
"
,
value
:
"
2
"
,
checked
:
false
},
{
name
:
"
是否可取消
"
,
value
:
"
3
"
,
checked
:
false
},
// {name:"是否推荐",value:"4"},
],
ggss
:
[
'
件
'
,
'
盒
'
,
'
份
'
,
'
张
'
,
'
公斤
'
,
'
千克
'
],
typeList
:[],
//分类列表
//上传的参数
parameter
:{
action
:
"
add
"
,
// add添加,edit修改
//酒店的信息
title
:
""
,
//标题
photo
:
[],
//图片 就只有 注意格式
price
:
""
,
//价格
type
:
0
,
//选中 的id typelist 里面的id
sku
:
""
,
//剩余数
is_zc
:
0
,
//早餐
is_kd
:
0
,
//宽带
is_cancel
:
0
,
//是否可以取消
// room_id 修改的时候传
},
cate_name
:
""
,
is_submits
:
true
,
//防止重复点击
//上传图片相关的
c_pics
:
[],
c_photos
:
[],
c_formData
:
{
model
:
"
hotel
"
,
//"hotel",
// shopphoto
},
room_id
:
""
,
//修改的id 房间id 产品id
};
},
computed
:
{
staticUrl
()
{
//静态资源地址
return
this
.
$store
.
state
.
staticUrl
;
},
uploadurl
(){
return
this
.
$store
.
state
.
uploadurl
;
},
uploadurl1
(){
return
this
.
$store
.
state
.
uploadurl1
;
},
},
onLoad
(
opendata
)
{
this
.
c_formData
.
user_token
=
this
.
$store
.
state
.
token
;
if
(
opendata
.
id
!=
""
&&
opendata
.
id
!=
undefined
&&
opendata
.
id
!=
"
undefined
"
){
this
.
room_id
=
opendata
.
id
;
//修改id 需要修改的酒店id
this
.
getroomInfo
();
}
this
.
roomType
();
},
methods
:{
//查询修改的信息原有的信息
async
getroomInfo
(){
let
res
=
await
roomInfo
({
room_id
:
this
.
room_id
,
});
if
(
res
.
code
==
0
){
this
.
parameter
=
{
action
:
"
edit
"
,
// add添加,edit修改
//酒店的信息
title
:
res
.
data
.
title
,
//标题
photo
:
res
.
data
.
photo
,
//图片 就只有 注意格式
price
:
res
.
data
.
price
,
//价格
type
:
res
.
data
.
type
,
//选中 的id typelist 里面的id
sku
:
res
.
data
.
sku
,
//剩余数
is_zc
:
res
.
data
.
is_zc
,
//早餐
is_kd
:
res
.
data
.
is_kd
,
//宽带
is_cancel
:
res
.
data
.
is_cancel
,
//是否可以取消
room_id
:
this
.
room_id
,
};
this
.
c_pics
=
[{
code
:
0
,
data
:
res
.
data
.
photo
,
msg
:
"
success
"
,
time
:
"
1587802940
"
,}];
//模拟上传图片的数据
this
.
c_photos
=
[
res
.
data
.
photo
];
// listchind:[
// {name:"是否有早餐",value:"1"},
// {name:"是否有款第",value:"2"},
// {name:"是否可取消",value:"3"},
// // {name:"是否推荐",value:"4"},
// ],
let
isarr
=
[];
//早餐
if
(
res
.
data
.
is_zc
==
1
){
this
.
listchind
[
0
].
checked
=
true
;
isarr
.
push
(
1
);
}
else
{
this
.
listchind
[
0
].
checked
=
false
;
}
//宽度
if
(
res
.
data
.
is_zc
==
1
){
this
.
listchind
[
1
].
checked
=
true
;
isarr
.
push
(
2
);
}
else
{
this
.
listchind
[
1
].
checked
=
false
;
}
//是否可取消
if
(
res
.
data
.
is_cancel
==
1
){
this
.
listchind
[
2
].
checked
=
true
;
isarr
.
push
(
3
);
}
else
{
this
.
listchind
[
2
].
checked
=
false
;
}
this
.
is_data
=
isarr
;
//赋值选中的列表
}
else
{
this
.
$api
.
msg
(
res
.
msg
);
}
},
// 获取商城商品分类
async
roomType
(){
let
res
=
await
hotelroomType
({
})
let
arr
=
[];
for
(
let
i
in
res
.
data
){
arr
.
push
({
name
:
res
.
data
[
i
],
id
:
i
});
}
this
.
typeList
=
arr
;
//分类列表
this
.
cate_name
=
this
.
typeList
[
0
].
name
;
this
.
parameter
.
type
=
this
.
typeList
[
0
].
id
;
},
initdata
(){
this
.
parameter
=
{
is_cancel
:
0
,
//是否可以取消
is_kd
:
0
,
//宽带
is_zc
:
0
,
//早餐
photo
:
[],
//图片 就只有
price
:
""
,
//价格
sku
:
""
,
//剩余数
title
:
""
,
//标题
type
:
0
,
//选中 的id typelist 里面的id
};
this
.
imageData
=
[];
},
//添加酒店产品方法
async
create_productFun
(){
if
(
this
.
is_submits
==
true
){
this
.
is_submits
=
false
;
this
.
parameter
.
photo
=
this
.
c_photos
[
0
];
//赋值 图片
this
.
is_data
.
forEach
((
item
,
index
)
=>
{
if
(
item
==
1
){
this
.
parameter
.
is_zc
=
1
;
}
else
if
(
item
==
2
){
this
.
parameter
.
is_kd
=
1
;
}
else
if
(
item
==
3
)
{
this
.
parameter
.
is_cancel
=
1
;
}
});
// return false;
let
res
=
await
addEditRoom
(
this
.
parameter
)
if
(
res
.
code
==
0
){
this
.
is_submits
=
true
;
// this.initdata();//初始化数据
this
.
$api
.
msg
(
res
.
msg
);
//返回
setTimeout
(()
=>
{
uni
.
navigateBack
({
})
},
1000
)
}
else
{
this
.
is_submits
=
true
;
this
.
$api
.
msg
(
res
.
msg
);
}
}
},
//多选列表
checkboxChange
(
e
){
// this.parameter.is_data = e.detail.value;
this
.
is_data
=
e
.
detail
.
value
;
},
//分类监听
bindPickerChange1
(
e
){
this
.
parameter
.
type
=
this
.
typeList
[
e
.
detail
.
value
].
id
;
this
.
isclassval
=
e
.
detail
.
value
;
this
.
cate_name
=
this
.
typeList
[
e
.
detail
.
value
].
name
;
},
//图片上传
c_delImage
(
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
const
obj
=
e
.
allImages
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
this
.
c_photos
[
index
]
=
id
}
},
onMove_c
(
e
)
{
this
.
c_pics
=
e
const
obj
=
e
for
(
let
index
in
obj
)
{
let
id
=
obj
[
index
].
data
this
.
c_photos
[
index
]
=
id
}
}
}
}
</
script
>
<
style
lang=
"scss"
>
@import
"./addProjuct.scss"
</
style
>
pages/edit/pro_manage/pro_manage.vue
View file @
42f49cef
...
...
@@ -26,6 +26,7 @@
<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.goods_id)"
>
规格
</view>
<view
class=
"btn_01 "
@
tap=
"Selectiondata(item)"
v-if=
"current==0 && isselect==1"
>
加入活动
</view>
</view>
</view>
</view>
...
...
@@ -67,10 +68,17 @@
goodsListdata
:[],
//商品列表
isshowtop
:
false
,
isshowall
:
true
,
isselect
:
"
2
"
,
sendindex
:
""
,
}
},
onLoad
()
{
onLoad
(
opdata
)
{
if
(
opdata
.
isselect
==
1
){
this
.
isselect
=
1
;
this
.
sendindex
=
opdata
.
sendindex
;
//插入索引
}
else
{
this
.
isselect
=
2
;
}
},
onPageScroll
(
e
){
//处理返回顶部
...
...
@@ -277,6 +285,18 @@
//处理 分享
share
(
id
){
},
//活动抽奖选择商品
Selectiondata
(
data
){
console
.
info
(
data
);
//选择商品卡回调
if
(
this
.
isselect
==
1
){
uni
.
setStorageSync
(
'
selectaddres
'
,
{
data
,
sendindex
:
this
.
sendindex
});
//存
uni
.
navigateBack
({
//返回上一页
delta
:
1
});
}
}
}
}
...
...
pages/index/index.vue
View file @
42f49cef
...
...
@@ -85,6 +85,19 @@
</navigator>
</view>
<!-- 酒店管理 -->
<view
class=
"jiu_01 "
v-if=
"shop_type=='hotel'"
>
<navigator
url=
"/pages/HotelManage/HotelManage"
>
<view>
<image
class=
"img"
src=
"/static/icon/20.png"
mode=
""
></image>
</view>
<view>
酒店管理
</view>
</navigator>
</view>
<!-- 商城不要分类 这个是外卖的-->
<view
class=
"jiu_01"
v-if=
"shop_type=='ele'"
>
<navigator
url=
"/pages/shopCategory/shopCategory?type=1"
>
...
...
@@ -160,8 +173,8 @@
</navigator>
</view>
<!-- 活动管理 -->
<view
class=
"jiu_01 "
>
<!-- 活动管理
只有商城才有抽奖活动
-->
<view
class=
"jiu_01 "
v-if=
"shop_type=='goods'"
>
<navigator
url=
"/pages/LuckDraw/homenav/homenav"
>
<view>
<image
class=
"img"
src=
"/static/news/activity.png"
mode=
""
></image>
...
...
utils/api/LuckDraw.js
View file @
42f49cef
...
...
@@ -19,14 +19,14 @@ import request from "./../request.js";//这里用的是two
}
//抽奖详情接口 活动页面
//抽奖详情接口 活动页面
LotteryUserInfo
export
function
slotLotteryInfo
(
data
)
{
return
request
.
post
(
"
LotteryActive/LotteryInfo
"
,
data
,
{
noAuth
:
false
,
isurltwo
:
true
});
}
//参与抽奖的方法
export
function
joinLottery
(
data
)
{
return
request
.
post
(
"
user
/joinLottery
"
,
data
,
{
noAuth
:
false
,
isurltwo
:
true
});
return
request
.
post
(
"
lotteryActive
/joinLottery
"
,
data
,
{
noAuth
:
false
,
isurltwo
:
true
});
}
//开奖请求接口
...
...
utils/api/hotel.js
View file @
42f49cef
...
...
@@ -13,4 +13,31 @@ import request from "./../request.js";
export
function
roomList
(
data
)
{
return
request
.
post
(
"
hotel/roomList
"
,
data
,{
noAuth
:
false
});
}
\ No newline at end of file
}
//酒店房间 上下架
export
function
autoManageRoom
(
data
)
{
return
request
.
post
(
"
hotel/autoManageRoom
"
,
data
,{
noAuth
:
false
});
}
//酒店房间类型 添加酒店的时候使用
export
function
hotelroomType
(
data
)
{
return
request
.
post
(
"
hotel/roomType
"
,
data
,{
noAuth
:
false
});
}
//添加修改酒店房间
export
function
addEditRoom
(
data
)
{
return
request
.
post
(
"
hotel/addEditRoom
"
,
data
,{
noAuth
:
false
});
}
//房间详情 用于修改的时候 查询详情信息 赋默认值
export
function
roomInfo
(
data
)
{
return
request
.
post
(
"
hotel/roomInfo
"
,
data
,{
noAuth
:
false
});
}
utils/request.js
View file @
42f49cef
...
...
@@ -86,8 +86,11 @@ export default function request(api, method, data, {noAuth = false, noVerify = f
//全局传参
data
.
user_token
=
store
.
state
.
token
;
data
.
token
=
store
.
state
.
token
;
data
.
shop_id
=
store
.
state
.
userInfo
.
shop_id
;
// data.token = store.state.token;
data
.
shop_id
=
store
.
state
.
userInfo
.
shop_id
;
//然后shop_id是店铺id
// data.uid = store.state.userInfo.uid;//uid是登陆用户id
// data.user_id = store.state.userInfo.user_id;//user_id是管理店铺用户id
}
//data.is_app = 1 ;
...
...
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