配置门店信息

huipay-h5
游梦婷 1 year ago
parent 698a728b86
commit 4e7121cfd0
  1. 8
      App.vue
  2. 10
      Utils/groupBuying.js
  3. 12
      pages.json
  4. 4
      subpackages/groupBuyingConfiguration/groupBuyingConfiguration.vue
  5. 151
      subpackages/groupBuyingConfiguration/storeMessage/storeMessage.vue

@ -4,11 +4,11 @@
// url: 'http://192.168.3.4:9301/crest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/',
//
url: 'https://pay.dctpay.com/crest',
imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com',
// url: 'https://pay.dctpay.com/crest',
// imgUrl: 'https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com',
//
// url: 'https://gratia-pay.dctpay.com/crest',
// imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com',
url: 'https://gratia-pay.dctpay.com/crest',
imgUrl: 'https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com',
userInfo: "",
openId: '',
h5code: '',

@ -95,4 +95,14 @@ export const findGroupServeRuleByGroup = params => {
//查询团购内容
export const findStoreGroupContent = params => {
return POST('GET', `${base}/storeGroup/findStoreGroupContent`, params).then(res => res.data);
}
//新增门店扩展信息
export const editStoreExtMsg = params => {
return POST('POST', `${base}/storeGroup/editStoreExtMsg`, params).then(res => res.data);
}
//查询门店扩展信息
export const findStoreExtMsgByStoreId = params => {
return POST('POST', `${base}/storeGroup/findStoreExtMsgByStoreId`, params).then(res => res.data);
}

@ -607,9 +607,21 @@
"softinputNavBar": "none"
}
}
},
{
"path":"groupBuyingConfiguration/storeMessage/storeMessage",
"style": {
"navigationBarTitleText": "门店信息",
"enablePullDownRefresh": false,
"app-plus": {
"titleNView": false, //
"softinputNavBar": "none"
}
}
}
]

@ -28,6 +28,10 @@
title: '团购产品',
url:'./groupProduct/groupProduct',
img: '/static/img/home4.png'
},{
title: '门店信息',
url:'./storeMessage/storeMessage',
img: '/static/img/home4.png'
}
],

@ -0,0 +1,151 @@
<template>
<view class="all-container backcor6 pd-main font15" style="padding-bottom: 60px;">
<view class="form-gorup backcorfff ">
<view class="dis-flex marb10 bor-botm1 pd-main">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0">营业时间:
</view>
<input type="text" v-model.trim="messageData.openingHours" placeholder-class="corf6 font15"
class=" flex-1 " placeholder="请输入营业时间,例如: 8:00-20:00">
</view>
<view class="dis-flex marb10 bor-botm1 margin10">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">门店地址:
</view>
<textarea :cursor-spacing="50" class="height45 border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.address" placeholder="请输入门店地址"
placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="dis-flex marb10 bor-botm1 margin10">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">门店标签:
</view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeLabel"
placeholder="请输入门店标签(用','隔开)例如:可电话预订,可吸烟" placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="dis-flex marb10 bor-botm1 margin10">
<view class="group-title marRight10 fontwig6 padleft15 paddtright10 flex-s0 self-top">门店关键词:
</view>
<textarea :cursor-spacing="50" class=" border-r flex-1 backcor6 paading10 marb10" :focus="false"
:disable-default-padding="false" v-model.trim="messageData.storeTag"
placeholder="请输入门店关键词(用','隔开)例如:火锅,川菜" placeholder-class="font15" :maxlength="999"></textarea>
</view>
<view class="footer-btn">
<button class="backcor89 fcorfff" @click="clickToSave">保存</button>
</view>
</view>
</view>
</template>
<script>
import {
editStoreExtMsg,
findStoreExtMsgByStoreId
} from '@/Utils/groupBuying.js'
const app = getApp();
export default {
data() {
return {
storeId: '',
messageData: {
address: '', //
openingHours: '', //
storeId: '', //
storeLabel: '', //
storeTag: '', //
}
}
},
onLoad(options) {
if (options.storeId) {
this.storeId = options.storeId;
this.messageData.storeId = options.storeId;
this.findStoreExtMsgByStoreId();
}
},
methods: {
/* 点击保存 */
clickToSave() {
if (!this.messageData.address || !this.messageData.openingHours || !this.messageData.storeLabel || !this
.messageData.storeTag) {
uni.showToast({
icon: 'none',
title: '请填写完整哦!'
})
return
}
this.editStoreExtMsg();
},
editStoreExtMsg() {
console.log(this.messageData, "this.messageData")
editStoreExtMsg(this.messageData).then(res => {
let title;
if (res.return_code == '000000') {
title = res.return_data;
setTimeout(() => {
uni.navigateBack();
}, 1000)
} else {
title = res.return_msg;
}
uni.showToast({
title: title,
icon: 'none',
duration: 2000
})
})
},
findStoreExtMsgByStoreId() {
let params = {
storeId: this.storeId
}
findStoreExtMsgByStoreId(params).then(res => {
if (res.return_code == '000000') {
if (res.return_data) {
this.messageData.address = res.return_data.address;
this.messageData.openingHours = res.return_data.openingHours;
this.messageData.storeId = res.return_data.storeId;
this.messageData.storeLabel = res.return_data.storeLabel;
this.messageData.storeTag = res.return_data.storeTag;
// console.log(res.return_data, "res.return_data")
}
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
}
})
},
}
}
</script>
<style lang="scss" scoped>
.margin10 {
margin: 10px;
}
/* 底部按钮 */
.footer-btn {
position: fixed;
bottom: 0;
left: 0;
right: 0;
button {
height: 50px;
line-height: 50px;
}
}
</style>
Loading…
Cancel
Save