|
|
@@ -20,7 +20,7 @@ export function getTableData(forData) {
|
|
|
}
|
|
|
|
|
|
return request({
|
|
|
- url: '/api/mhotel/applistAround.action',
|
|
|
+ url: '/mhotel/applistAround.action',
|
|
|
method: 'post',
|
|
|
data
|
|
|
})
|
|
|
@@ -31,47 +31,52 @@ export function getTowns() {
|
|
|
let query = '?code=10'
|
|
|
|
|
|
return request({
|
|
|
- url: '/api/mhotel/hotelqueryList.action' + query,
|
|
|
+ url: '/mhotel/hotelqueryList.action' + query,
|
|
|
method: 'get'
|
|
|
});
|
|
|
};
|
|
|
|
|
|
+// 修改周边
|
|
|
// 添加周边
|
|
|
export function appinsertArounds(forData) {
|
|
|
- let data = new FormData()
|
|
|
+ let data = {}
|
|
|
if (typeof forData.rtype !== 'undefined' && forData.rtype !== '') {
|
|
|
- data.append('rtype', forData.rtype)
|
|
|
+ data.rtype = forData.rtype
|
|
|
}
|
|
|
if (typeof forData.rtown !== 'undefined' && forData.rtown !== '') {
|
|
|
- data.append('rtown', forData.rtown)
|
|
|
+ data.rtown = forData.rtown
|
|
|
}
|
|
|
if (typeof forData.rname !== 'undefined' && forData.rname !== '') {
|
|
|
- data.append('rname', forData.rname)
|
|
|
+ data.rname = forData.rname
|
|
|
}
|
|
|
if (typeof forData.rphone !== 'undefined' && forData.rphone !== '') {
|
|
|
- data.append('rphone', forData.rphone)
|
|
|
+ data.rphone = forData.rphone
|
|
|
}
|
|
|
if (typeof forData.radress !== 'undefined' && forData.radress !== '') {
|
|
|
- data.append('radress', forData.radress)
|
|
|
+ data.radress = forData.radress
|
|
|
}
|
|
|
if (typeof forData.detail !== 'undefined' && forData.detail !== '') {
|
|
|
- data.append('detail', forData.detail)
|
|
|
+ data.detail = forData.detail
|
|
|
}
|
|
|
if (typeof forData.first_img !== 'undefined' && forData.first_img !== '') {
|
|
|
- data.append('first_img', forData.first_img)
|
|
|
+ data.first_img = forData.first_img
|
|
|
}
|
|
|
- if (typeof forData.show_video !== 'undefined' && forData.show_video !== '') {
|
|
|
- data.append('show_video', forData.show_video)
|
|
|
+ if (typeof forData.post_video !== 'undefined' && forData.post_video !== '') {
|
|
|
+ data.show_video = forData.post_video
|
|
|
}
|
|
|
- if (typeof forData.detail_img !== 'undefined' && forData.detail_img !== '') {
|
|
|
- data.append('detail_img', forData.detail_img)
|
|
|
+ if (typeof forData.detail_img !== 'undefined' && forData.detail_img !== '' && forData.detail_img.length > 0) {
|
|
|
+ var tmpStr = ''
|
|
|
+ for (var i = 0; i < forData.detail_img.length; i++) {
|
|
|
+ tmpStr += forData.detail_img[i] + ','
|
|
|
+ }
|
|
|
+ data.detail_img = tmpStr.substring(0, tmpStr.length - 1)
|
|
|
}
|
|
|
if (typeof forData.jingwei !== 'undefined' && forData.jingwei !== '') {
|
|
|
- data.append('jingwei', forData.jingwei)
|
|
|
+ data.jingwei = forData.jingwei
|
|
|
}
|
|
|
|
|
|
return request({
|
|
|
- url: '/api/mhotel/appinsertArounds.action',
|
|
|
+ url: '/mhotel/appinsertArounds.action',
|
|
|
method: 'post',
|
|
|
data
|
|
|
})
|
|
|
@@ -85,7 +90,149 @@ export function uploadFiles(file) {
|
|
|
}
|
|
|
|
|
|
return request({
|
|
|
- url: '/api/file/cos/upload',
|
|
|
+ url: '/file/cos/upload',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 修改周边
|
|
|
+export function appupdateArounds(forData) {
|
|
|
+ let data = {}
|
|
|
+ if (typeof forData.id !== 'undefined' && forData.id !== '') {
|
|
|
+ data.id = forData.id
|
|
|
+ }
|
|
|
+ if (typeof forData.rtype !== 'undefined' && forData.rtype !== '') {
|
|
|
+ data.rtype = forData.rtype
|
|
|
+ }
|
|
|
+ if (typeof forData.rtown !== 'undefined' && forData.rtown !== '') {
|
|
|
+ data.rtown = forData.rtown
|
|
|
+ }
|
|
|
+ if (typeof forData.rname !== 'undefined' && forData.rname !== '') {
|
|
|
+ data.rname = forData.rname
|
|
|
+ }
|
|
|
+ if (typeof forData.rphone !== 'undefined' && forData.rphone !== '') {
|
|
|
+ data.rphone = forData.rphone
|
|
|
+ }
|
|
|
+ if (typeof forData.radress !== 'undefined' && forData.radress !== '') {
|
|
|
+ data.radress = forData.radress
|
|
|
+ }
|
|
|
+ if (typeof forData.detail !== 'undefined' && forData.detail !== '') {
|
|
|
+ data.detail = forData.detail
|
|
|
+ }
|
|
|
+ if (typeof forData.first_img !== 'undefined' && forData.first_img !== '') {
|
|
|
+ data.first_img = forData.first_img
|
|
|
+ }
|
|
|
+ if (typeof forData.post_video !== 'undefined' && forData.post_video !== '') {
|
|
|
+ data.show_video = forData.post_video
|
|
|
+ }
|
|
|
+ if (typeof forData.detail_img !== 'undefined' && forData.detail_img !== '' && forData.detail_img.length > 0) {
|
|
|
+ var tmpStr = ''
|
|
|
+ for (var i = 0; i < forData.detail_img.length; i++) {
|
|
|
+ tmpStr += forData.detail_img[i] + ','
|
|
|
+ }
|
|
|
+ data.detail_img = tmpStr.substring(0, tmpStr.length - 1)
|
|
|
+ }
|
|
|
+ if (typeof forData.jingwei !== 'undefined' && forData.jingwei !== '') {
|
|
|
+ data.jingwei = forData.jingwei
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/appupdateArounds.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 获取周边对应的产品
|
|
|
+export function getProductTableData(forData) {
|
|
|
+ let data = new FormData()
|
|
|
+ if (typeof forData.page !== 'undefined') {
|
|
|
+ data.append('page', forData.page)
|
|
|
+ }
|
|
|
+ if (typeof forData.rows !== 'undefined') {
|
|
|
+ data.append('rows', forData.rows)
|
|
|
+ }
|
|
|
+ if (typeof forData.aid !== 'undefined') {
|
|
|
+ data.append('aid', forData.aid)
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/applistAround_pd.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 删除周边
|
|
|
+export function appdelAround(forData) {
|
|
|
+ let data = new FormData()
|
|
|
+ if (typeof forData !== 'undefined' && forData != '') {
|
|
|
+ data.append('id', forData)
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/appdelAround.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 添加产品
|
|
|
+export function appinsertAroundPd(forData) {
|
|
|
+ let data = {}
|
|
|
+ if (typeof forData.aid !== 'undefined' && forData.aid !== '') {
|
|
|
+ data.aid = forData.aid
|
|
|
+ }
|
|
|
+ if (typeof forData.product_name !== 'undefined' && forData.product_name !== '') {
|
|
|
+ data.product_name = forData.product_name
|
|
|
+ }
|
|
|
+ if (typeof forData.product_desc !== 'undefined' && forData.product_desc !== '') {
|
|
|
+ data.product_desc = forData.product_desc
|
|
|
+ }
|
|
|
+ if (typeof forData.price !== 'undefined' && forData.price !== '') {
|
|
|
+ data.price = forData.price
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/appinsertAroundPd.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 编辑产品
|
|
|
+export function appupdateAround_pd(forData) {
|
|
|
+ let data = {}
|
|
|
+ if (typeof forData.id !== 'undefined' && forData.id !== '') {
|
|
|
+ data.id = forData.id
|
|
|
+ }
|
|
|
+ if (typeof forData.product_name !== 'undefined' && forData.product_name !== '') {
|
|
|
+ data.product_name = forData.product_name
|
|
|
+ }
|
|
|
+ if (typeof forData.product_desc !== 'undefined' && forData.product_desc !== '') {
|
|
|
+ data.product_desc = forData.product_desc
|
|
|
+ }
|
|
|
+ if (typeof forData.price !== 'undefined' && forData.price !== '') {
|
|
|
+ data.price = forData.price
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/appupdateAround_pd.action',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+// 删除产品
|
|
|
+export function appdelAround_pd(forData) {
|
|
|
+ let data = new FormData()
|
|
|
+ if (typeof forData !== 'undefined' && forData != '') {
|
|
|
+ data.append('id', forData)
|
|
|
+ }
|
|
|
+
|
|
|
+ return request({
|
|
|
+ url: '/mhotel/appdelAround_pd.action',
|
|
|
method: 'post',
|
|
|
data
|
|
|
})
|