初始化商家端
This commit is contained in:
494
pages/md/storeInformation/storeInformation.vue
Normal file
494
pages/md/storeInformation/storeInformation.vue
Normal file
@ -0,0 +1,494 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center storeInformation_flex_0"
|
||||
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub storeInformation_fd0_0'>
|
||||
<view style="width: 80rpx;" class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
|
||||
<text class='fu-iconfont2 storeInformation_fd0_0_c0_c0' @tap.stop="handleJumpDiy" data-type="back"
|
||||
data-url="1"></text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-stretch justify-center flex-sub'>
|
||||
<text class='storeInformation_fd0_0_c1_c0'>店铺资料</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center storeInformation_fd0_0_c2' @tap="sureTap">
|
||||
<text class="text-lg">保存</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout storeInformation_flex_1">
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_0'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_0_c0_c0'>头像</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center' @tap="soloChooseImage('logo','logo',false,false)">
|
||||
<image class='storeInformation_fd1_0_c1_c0' mode="aspectFill" :src='logo'></image>
|
||||
<image class='storeInformation_fd1_0_c1_c1' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_1'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_1_c0_c0'>店铺名称</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_1_c1_c0'>{{datails.store_name}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_2'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_2_c0_c0'>店铺分类</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_2_c1_c0'>{{datails.storecategory_title
|
||||
}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_2'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_2_c0_c0'>抽佣比例</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_2_c1_c0'>{{datails.score_rate
|
||||
}}%</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_3'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_3_c0_c0'>店铺地址</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_3_c1_c0'>{{datails.address}}{{datails.address_address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd1_4' @tap.stop="handleJumpDiy"
|
||||
data-type="navigateTo" :data-url="`/pages/md/authenticationInformation/authenticationInformation`">
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd1_4_c0_c0'>认证信息</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<image class='storeInformation_fd1_4_c1_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center">
|
||||
<view class='flex flex-wrap align-center flex-sub storeInformation_fd2_0'>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout storeInformation_flex_3">
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd3_0'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd3_0_c0_c0'>店铺电话</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<!-- <text class=''>400-1234-1234</text> -->
|
||||
<input maxlength="11" type="number" class="storeInformation_fd3_0_c1_c0" placeholder="请输入店铺电话" v-model="service_phone"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd3_1' @tap.stop="handleJumpDiy"
|
||||
data-type="navigateTo" :data-url="`/pages/md/rotationChart/rotationChart`">
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd3_1_c0_c0'>店铺轮播图</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<image class='storeInformation_fd3_1_c1_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd3_2' @tap.stop="handleJumpDiy"
|
||||
data-type="navigateTo" :data-url="`/pages/md/shopQualification/shopQualification?index=` + 2">
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd3_2_c0_c0'>店铺资质</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<image class='storeInformation_fd3_2_c1_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd3_3' @tap.stop="handleJumpDiy"
|
||||
data-type="navigateTo" :data-url="`/pages/md/shopQualification/shopQualification?index=` + 1">
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd3_3_c0_c0'>店铺环境</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<image class='storeInformation_fd3_3_c1_c0' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-between storeInformation_fd3_4'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='storeInformation_fd3_4_c0_c0'>店铺背景环境</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center' @tap="soloChooseImage('background_imageid','background_image',false,false)">
|
||||
<image class='storeInformation_fd3_4_c1_c0' mode="aspectFill" :src='background_image'></image>
|
||||
<image class='storeInformation_fd3_4_c1_c1' mode="aspectFit" :src='STATIC_URL+"29.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import UploadImage from '@/common/utils/upload-image.js'
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
datails: {},
|
||||
mobile:'',
|
||||
introduce:'',
|
||||
meal_notice:'',
|
||||
logo:'',
|
||||
logo_id:'',
|
||||
background_image:'',
|
||||
service_phone:"",
|
||||
background_imageid:""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch: {},
|
||||
onShow() {
|
||||
this.getStore();
|
||||
},
|
||||
|
||||
methods: {
|
||||
//获取店铺信息
|
||||
getStore() {
|
||||
this.$api.post(global.apiUrls.postGetShopInfo)
|
||||
.then(res => {
|
||||
if (res.data.code == 1) {
|
||||
this.datails = res.data.data;
|
||||
this.mobile=res.data.data.mobile;
|
||||
this.introduce=res.data.data.introduce;
|
||||
this.meal_notice=res.data.data.meal_notice;
|
||||
this.logo=res.data.data.logo;
|
||||
this.service_phone=res.data.data.service_phone;
|
||||
this.logo_id=res.data.data.logo_id;
|
||||
this.background_image=res.data.data.background_image;
|
||||
}
|
||||
console.log(res.data)
|
||||
})
|
||||
},
|
||||
//上传单图、多图方法
|
||||
soloChooseImage(id, path, obj, obj1, fnName = false) {
|
||||
let self = this
|
||||
if (!obj) obj = this
|
||||
if (!obj1) obj1 = this
|
||||
if (self.uploading) {
|
||||
return
|
||||
}
|
||||
// 从相册中选择图片
|
||||
uni.chooseImage({
|
||||
count: 1, // 默认3
|
||||
sizeType: ['original', 'compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
success: function(res) {
|
||||
self.uploading = true
|
||||
// 开始上传
|
||||
new UploadImage(res.tempFiles, {
|
||||
complete: function(res) {
|
||||
self.uploading = false
|
||||
if (id) self.$set(obj, id, res[0].id)
|
||||
if (path) self.$set(obj1, path, res[0].path)
|
||||
if (fnName) self[fnName]()
|
||||
},
|
||||
})
|
||||
},
|
||||
})
|
||||
},
|
||||
sureTap(){
|
||||
let data = {
|
||||
logo:this.logo,
|
||||
service_phone:this.service_phone,
|
||||
background_image:this.background_imageid
|
||||
}
|
||||
this.$api.post(global.apiUrls.Get64868bb21965a,data).then(res=>{
|
||||
this.$message.info(res.data.msg)
|
||||
if(res.data.code==1){
|
||||
this.getStore()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background: rgba(255, 255, 255, 1);
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.storeInformation_flex_0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
top: 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.storeInformation_fd0_0_c2 {
|
||||
width: 80rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd0_0_c1_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd0_0_c0_c0 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd0_0 {
|
||||
margin: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_flex_1 {
|
||||
padding: 0rpx 0rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_4_c1_c0 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_4_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_4 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_3_c1_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
// -webkit-line-clamp: 1;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
max-width: 443rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_3_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_3 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_2_c1_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_2_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_2 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_1_c1_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_1_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_1 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_0_c1_c1 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_0_c1_c0 {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_0_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd1_0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd2_0 {
|
||||
background: rgba(248, 248, 248, 1);
|
||||
background-size: 100% auto !important;
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.storeInformation_flex_3 {
|
||||
padding: 0rpx 0rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_4_c1_c1 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_4_c1_c0 {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_4_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_4 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_3_c1_c0 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_3_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_3 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_2_c1_c0 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_2_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_2 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_1_c1_c0 {
|
||||
width: 14rpx;
|
||||
height: 26rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 0rpx 0rpx 16rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_1_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_1 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_0_c1_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_0_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.storeInformation_fd3_0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 32rpx 32rpx 32rpx 0rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user