['门店列表可滚动']
This commit is contained in:
@@ -247,18 +247,17 @@
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// 内容
|
// 内容
|
||||||
.content {
|
.content {
|
||||||
|
overflow: hidden;
|
||||||
.header {
|
.header {
|
||||||
padding: $padding * 2 0;
|
padding: $padding * 2 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@extend .vertical;
|
@extend .vertical;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: $title-size + 14;
|
font-size: $title-size + 14;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.subtitle {
|
.subtitle {
|
||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
@@ -272,7 +271,6 @@
|
|||||||
min-height: 85vh;
|
min-height: 85vh;
|
||||||
padding: $padding $padding * 2 $padding * 2;
|
padding: $padding $padding * 2 $padding * 2;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
.inputs {
|
.inputs {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: $margin;
|
margin-top: $margin;
|
||||||
@@ -281,7 +279,6 @@
|
|||||||
padding-left: 200rpx;
|
padding-left: 200rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
min-height: 90rpx;
|
min-height: 90rpx;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -289,17 +286,15 @@
|
|||||||
width: 200rpx;
|
width: 200rpx;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
width: 100%;
|
||||||
height: 90rpx;
|
height: 90rpx;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
font-size: $title-size;
|
font-size: $title-size;
|
||||||
}
|
}
|
||||||
|
|
||||||
.picker-text {
|
.picker-text {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-right: 90rpx;
|
padding-right: 90rpx;
|
||||||
|
|
||||||
.picker-icon {
|
.picker-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|||||||
@@ -149,16 +149,16 @@
|
|||||||
<!-- 选择店铺 -->
|
<!-- 选择店铺 -->
|
||||||
<uni-popup ref="storePopup">
|
<uni-popup ref="storePopup">
|
||||||
<view class="category-popup">
|
<view class="category-popup">
|
||||||
<block v-if="storesArr.length <0">
|
<block v-if="storesArr.length>0">
|
||||||
<view class="header">
|
<view class="header">
|
||||||
<view class="title">选择店铺</view>
|
<view class="title">选择店铺</view>
|
||||||
</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-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-name">{{item.name}}</view>
|
||||||
<view class="category-content">{{item.address}}</view>
|
<view class="category-content">{{item.address}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</scroll-view>
|
||||||
<view class="btns">
|
<view class="btns">
|
||||||
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
|
<button type="default" size="default" @click="affirmCategory('stores', 'storePopup')">确定</button>
|
||||||
</view>
|
</view>
|
||||||
@@ -168,8 +168,8 @@
|
|||||||
<view class="btns" v-if="storePer">
|
<view class="btns" v-if="storePer">
|
||||||
<button type="default" size="default" @click="$Router.push({name:'shopCreate'})">新建店铺</button>
|
<button type="default" size="default" @click="$Router.push({name:'shopCreate'})">新建店铺</button>
|
||||||
</view>
|
</view>
|
||||||
<view class=""v-else>
|
<view v-else>
|
||||||
<view class="btns" v-if="storePer">
|
<view class="btns">
|
||||||
<button type="default" size="default">当前没有创建店铺的权限</button>
|
<button type="default" size="default">当前没有创建店铺的权限</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -221,6 +221,7 @@
|
|||||||
servicesArr : [], // 可选服务
|
servicesArr : [], // 可选服务
|
||||||
type : 1, // 1为商品,2为服务
|
type : 1, // 1为商品,2为服务
|
||||||
storePer : true,// 默认可以创建门店
|
storePer : true,// 默认可以创建门店
|
||||||
|
shopRefresh: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
@@ -228,6 +229,59 @@
|
|||||||
return this.percent * this.skus_price
|
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() {
|
created() {
|
||||||
// 编辑状态信息
|
// 编辑状态信息
|
||||||
if(this.$Route.query.type && this.$Route.query.type === 'edit'){
|
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