This commit is contained in:
parent
bfdb7488d8
commit
acd3d172e7
|
@ -240,4 +240,10 @@ export function scanUpload(field,token,data) {
|
|||
*/
|
||||
export function getAdminInfo(merId) {
|
||||
return request.get(`server/${merId}/store/info`, {}, { login: true });
|
||||
}
|
||||
/**
|
||||
* 修改商户信息
|
||||
*/
|
||||
export function updateAdminInfo(data,merId) {
|
||||
return request.post(`server/${merId}/store/update`, data, { login: true });
|
||||
}
|
|
@ -18,4 +18,4 @@ export function shopNearby(data){
|
|||
}
|
||||
export function shopDetail(data){
|
||||
return request.get('store/merchant/detail/'+data.id,{},{noAuth:true});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -86,7 +86,8 @@
|
|||
"maps" : {
|
||||
"amap" : {
|
||||
"appkey_ios" : "f868a24eddab123b4e3a2cadb78b6fba",
|
||||
"appkey_android" : "a4fc891e60ccdf388ce0996cc833aca1"
|
||||
"appkey_android" : "a4fc891e60ccdf388ce0996cc833aca1",
|
||||
"name" : "amapKPWKfVew"
|
||||
}
|
||||
},
|
||||
"payment" : {
|
||||
|
@ -99,7 +100,8 @@
|
|||
"amap" : {
|
||||
"__platform__" : [ "ios", "android" ],
|
||||
"appkey_ios" : "f868a24eddab123b4e3a2cadb78b6fba",
|
||||
"appkey_android" : "a4fc891e60ccdf388ce0996cc833aca1"
|
||||
"appkey_android" : "a4fc891e60ccdf388ce0996cc833aca1",
|
||||
"name" : "amapKPWKfVew"
|
||||
}
|
||||
},
|
||||
"push" : {},
|
||||
|
|
|
@ -64,19 +64,37 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="popup_group_item" >
|
||||
<view class="popup_group_item_label">商户承诺</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message" v-if="shopInfo.detail">
|
||||
<input v-model="shopInfo.detail.promise" type="text" placeholder="请填写商户承诺" />
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="popup_group_item" >
|
||||
<view class="popup_group_item_label">提货点营业时间</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message" style="display: flex;">
|
||||
<input style="text-align: center;" v-model="shopInfo.mer_take_time[0]" type="text" placeholder="请填写详细地址" />-<input style="text-align: center;" v-model="shopInfo.mer_take_time[1]" type="text" placeholder="请填写详细地址" />
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- <view class="popup_group_item" >
|
||||
<view class="popup_group_item_label">提货点营业日期</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
<input v-model="shopInfo.mer_address" type="text" placeholder="请填写详细地址" />
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="popup_group_item" @click="setSpecifica" >
|
||||
</view> -->
|
||||
<view class="popup_group_item" >
|
||||
<view class="popup_group_item_label">客服电话</view>
|
||||
<view class="popup_group_item_value">
|
||||
<view class="popup_group_item_message">
|
||||
<span v-if="shopInfo.mer_phone" class="popup_group_item_message_value">{{shopInfo.mer_phone}}</span>
|
||||
<input v-model="shopInfo.mer_phone" type="text" placeholder="请填写客服电话" />
|
||||
<!-- <span v-else>去设置</span> -->
|
||||
</view>
|
||||
<view><span class="iconfont"></span></view>
|
||||
|
@ -84,25 +102,40 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="popup_group">
|
||||
<view class="radio">
|
||||
<view class="radio_label ">商户地址</view>
|
||||
<checkbox-group class="select_group flex_start" @change="deliveryWayChange">
|
||||
<!-- <label class="radio_select" v-for="(val, i) in deliveryFreeList" :key="val.value">
|
||||
<view><checkbox :value="val.value" :checked="setFormData.delivery_way.includes(val.value)" /></view>
|
||||
<view>{{ val.name }}</view>
|
||||
</label> -->
|
||||
</checkbox-group>
|
||||
<view class="popup_group_item" >
|
||||
<view class="popup_group_item_label">商户信息</view>
|
||||
<view class="popup_group_item_value" style="overflow: scroll;">
|
||||
<view class="popup_group_item_message" v-if="shopInfo.detail">
|
||||
<textarea v-model="shopInfo.detail.detail" type="text" placeholder="商户信息" />
|
||||
<!-- <span v-else>去设置</span> -->
|
||||
</view>
|
||||
<!-- <view><span class="iconfont"></span></view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="upload">
|
||||
<text class="item-title">请上传商户轮播图</text>
|
||||
<text class="item-desc">(图片最多可上传10张,图片格式支持JPG、PNG、JPEG)</text>
|
||||
<view class="update-list">
|
||||
<view class='pictrue' v-for="(item,index) in pics" :key="index" :data-index="index" @click="getPhotoClickIdx">
|
||||
<image :src='item.img'></image>
|
||||
<text class='iconfont icon-guanbi1' @click.stop='DelPic(index)'></text>
|
||||
</view>
|
||||
<view class='pictrue acea-row row-center-wrapper row-column' @click='uploadpic' v-if="pics.length < 10">
|
||||
<text class='iconfont icon-icon25201'></text>
|
||||
<view>上传图片</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="handle"><view class="handle_button" @click="handleNextStep">保存信息</view></view>
|
||||
<view class="handle"><view class="handle_button" @click="updateInfo">保存信息</view></view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getAdminInfo} from '@/api/admin.js'
|
||||
import {getAdminInfo,updateAdminInfo} from '@/api/admin.js'
|
||||
export default {
|
||||
components: {
|
||||
},
|
||||
|
@ -110,7 +143,8 @@ export default {
|
|||
return {
|
||||
shopInfo:{},
|
||||
mer_id:'',
|
||||
|
||||
detail:'',
|
||||
pics:[],
|
||||
};
|
||||
},
|
||||
onLoad(option){
|
||||
|
@ -127,7 +161,57 @@ export default {
|
|||
this.shopInfo=res.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
updateInfo(){
|
||||
let data1={
|
||||
detail:this.shopInfo.detail.detail,
|
||||
promise:this.shopInfo.detail.promise,
|
||||
images:this.pics,
|
||||
services:['wifi','免费停车']
|
||||
}
|
||||
|
||||
updateAdminInfo(data1,this.mer_id).then((res)=>{
|
||||
if(res.status==200){
|
||||
this.$util.Tips({
|
||||
title: res.message
|
||||
})
|
||||
setTimeout(()=>{
|
||||
uni.navigateBack()
|
||||
|
||||
},2000)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 图片预览
|
||||
// 获得相册 idx
|
||||
getPhotoClickIdx(e) {
|
||||
let _this = this;
|
||||
let idx = e.currentTarget.dataset.index;
|
||||
_this.imgPreview(_this.pics, idx);
|
||||
},
|
||||
// 图片预览
|
||||
imgPreview: function(list, idx) {
|
||||
// list:图片 url 数组
|
||||
if (list && list.length > 0) {
|
||||
uni.previewImage({
|
||||
current: list[idx], // 传 Number H5端出现不兼容
|
||||
urls: list
|
||||
});
|
||||
}
|
||||
},
|
||||
DelPic: function(index) {
|
||||
let that = this,
|
||||
pic = this.pics[index];
|
||||
that.pics.splice(index, 1);
|
||||
that.$set(that, 'pics', that.pics);
|
||||
},
|
||||
uploadpic: function() {
|
||||
let that = this;
|
||||
that.$util.uploadImageOne('upload/image', function(res) {
|
||||
that.pics.push({img:res.data.path});
|
||||
that.$set(that, 'pics', that.pics);
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -141,7 +225,45 @@ export default {
|
|||
padding-top: 20rpx;
|
||||
padding-bottom: 156rpx;
|
||||
}
|
||||
|
||||
.pictrue {
|
||||
width: 130rpx;
|
||||
height: 130rpx;
|
||||
margin: 24rpx 22rpx 0 0;
|
||||
position: relative;
|
||||
font-size: 11px;
|
||||
color: #bbb;
|
||||
&:nth-child(4n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
&:nth-last-child(1) {
|
||||
border: 0.5px solid #ddd;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
uni-image,
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 1px;
|
||||
img {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.icon-guanbi1 {
|
||||
font-size: 33rpx;
|
||||
position: absolute;
|
||||
top: -10px;
|
||||
right: -10px;
|
||||
}
|
||||
}
|
||||
.tip {
|
||||
padding: 16rpx 0 0 40rpx;
|
||||
font-size: 22rpx;
|
||||
|
@ -154,7 +276,36 @@ export default {
|
|||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.upload {
|
||||
display: -webkit-box;
|
||||
display: -moz-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-lines: multiple;
|
||||
-moz-box-lines: multiple;
|
||||
-o-box-lines: multiple;
|
||||
-webkit-flex-wrap: wrap;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.upload {
|
||||
margin-top: 20rpx;
|
||||
padding: 20rpx 0;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.item-desc {
|
||||
color: #B2B2B2;
|
||||
font-size: 22rpx;
|
||||
display: block;
|
||||
margin-top: 9rpx;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
.update-list{
|
||||
display: flex;
|
||||
}
|
||||
.popup_group {
|
||||
background: #fff;
|
||||
margin: 31rpx auto;
|
||||
|
|
Loading…
Reference in New Issue