['门店列表可滚动']
This commit is contained in:
@@ -247,18 +247,17 @@
|
||||
<style lang="scss" scoped>
|
||||
// 内容
|
||||
.content {
|
||||
overflow: hidden;
|
||||
.header {
|
||||
padding: $padding * 2 0;
|
||||
box-sizing: border-box;
|
||||
@extend .vertical;
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: $title-size + 14;
|
||||
font-weight: bold;
|
||||
line-height: 90rpx;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: $title-size-m;
|
||||
color: $text-gray;
|
||||
@@ -272,7 +271,6 @@
|
||||
min-height: 85vh;
|
||||
padding: $padding $padding * 2 $padding * 2;
|
||||
box-sizing: border-box;
|
||||
|
||||
.inputs {
|
||||
position: relative;
|
||||
margin-top: $margin;
|
||||
@@ -281,7 +279,6 @@
|
||||
padding-left: 200rpx;
|
||||
line-height: 90rpx;
|
||||
min-height: 90rpx;
|
||||
|
||||
label {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -289,17 +286,15 @@
|
||||
width: 200rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
font-size: $title-size;
|
||||
}
|
||||
|
||||
.picker-text {
|
||||
position: relative;
|
||||
padding-right: 90rpx;
|
||||
|
||||
.picker-icon {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
|
||||
@@ -149,16 +149,16 @@
|
||||
<!-- 选择店铺 -->
|
||||
<uni-popup ref="storePopup">
|
||||
<view class="category-popup">
|
||||
<block v-if="storesArr.length <0">
|
||||
<block v-if="storesArr.length>0">
|
||||
<view class="header">
|
||||
<view class="title">选择店铺</view>
|
||||
</view>
|
||||
<view class="category-flex">
|
||||
<scroll-view class="category-flex" scroll-y="true">
|
||||
<view class="category-flex-item" :class="{'show' : item.check}" v-for="(item, index) in storesArr" :key="index" @click="item.check = !item.check">
|
||||
<view class="category-name">{{item.name}}</view>
|
||||
<view class="category-content">{{item.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="btns">
|
||||
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
|
||||
</view>
|
||||
@@ -168,8 +168,8 @@
|
||||
<view class="btns" v-if="storePer">
|
||||
<button type="default" size="default" @click="$Router.push({name:'shopCreate'})">新建店铺</button>
|
||||
</view>
|
||||
<view class=""v-else>
|
||||
<view class="btns" v-if="storePer">
|
||||
<view v-else>
|
||||
<view class="btns">
|
||||
<button type="default" size="default">当前没有创建店铺的权限</button>
|
||||
</view>
|
||||
</view>
|
||||
@@ -221,6 +221,7 @@
|
||||
servicesArr : [], // 可选服务
|
||||
type : 1, // 1为商品,2为服务
|
||||
storePer : true,// 默认可以创建门店
|
||||
shopRefresh: false
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@@ -228,6 +229,59 @@
|
||||
return this.percent * this.skus_price
|
||||
}
|
||||
},
|
||||
beforeRouteLeave(to, from, next){
|
||||
if(to.name === 'shopCreate'){
|
||||
this.shopRefresh = true
|
||||
}
|
||||
next()
|
||||
},
|
||||
onShow(){
|
||||
if(this.shopRefresh){
|
||||
// 编辑状态信息
|
||||
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
|
||||
managesGoodsEdit(this.$Route.query.id).then(res => {
|
||||
let storesArr = res.stores.map(val => {
|
||||
let check = (res.data.stores.findIndex(obj => obj.store_id === val.store_id)) >= 0
|
||||
if(check){
|
||||
stores.push(val.store_id)
|
||||
}
|
||||
return {
|
||||
check,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.storesArr = storesArr
|
||||
this.stores = stores
|
||||
this.storePer = res.storePer
|
||||
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
return
|
||||
}
|
||||
// 添加配置信息
|
||||
managesCreate({
|
||||
category_cid: this.$Route.query.cid
|
||||
}).then(res => {
|
||||
res.stores = res.stores.map(val => {
|
||||
return {
|
||||
check: false,
|
||||
...val
|
||||
}
|
||||
})
|
||||
this.storesArr = res.stores
|
||||
this.storePer = res.storePer
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 编辑状态信息
|
||||
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
|
||||
|
||||
47846
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
47846
unpackage/dist/dev/app-plus/app-service.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user