初始化商家端
This commit is contained in:
1253
pages/spgl/addProduct/addProduct.vue
Normal file
1253
pages/spgl/addProduct/addProduct.vue
Normal file
File diff suppressed because it is too large
Load Diff
140
pages/spgl/batchManagement/batchManagement.vue
Normal file
140
pages/spgl/batchManagement/batchManagement.vue
Normal file
@ -0,0 +1,140 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center batchManagement_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub batchManagement_fd0_0' >
|
||||
<view class='flex flex-wrap align-center batchManagement_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back" data-url="1" >
|
||||
<text class='fu-iconfont2 batchManagement_fd0_0_c0_c0' ></text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center' >
|
||||
<text class='batchManagement_fd0_0_c1_c0' >商品管理</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-end batchManagement_fd0_0_c2' >
|
||||
<benben-flex-switch-new class-name='flex flex batchManagement_fd0_0_c2_c0' v-model="is_tick" :disabled='false' :auto='true' >
|
||||
<template v-slot:checked>
|
||||
|
||||
<view class='flex flex position-relative align-center' >
|
||||
<image class='batchManagement_checkfd0_0_c2_c0_c0_c0' mode="aspectFit" :src='STATIC_URL+"44.png"'></image>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<template v-slot:unchecked>
|
||||
|
||||
<view class='flex flex position-relative justify-end align-center' >
|
||||
<image class='batchManagement_noCheckfd0_0_c2_c0_c1_c0' mode="aspectFit" :src='STATIC_URL+"117.png"'></image>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
</benben-flex-switch-new>
|
||||
<text class='batchManagement_fd0_0_c2_c1' >全选</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}" ></view>
|
||||
<benben-goods-classify :top='88' >
|
||||
</benben-goods-classify>
|
||||
<view class="flex align-center justify-between benben-position-layout flex batchManagement_flex_2" >
|
||||
<button class='batchManagement_fd2_0' @tap.stop="handleJumpDiy" data-type="back" data-url="1" >下架</button>
|
||||
<button class='batchManagement_fd2_1' >删除</button>
|
||||
|
||||
</view>
|
||||
<view :style="{height: '128rpx'}" ></view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
components:{},
|
||||
|
||||
|
||||
data(){
|
||||
return {"is_tick":false};
|
||||
},
|
||||
computed:{
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch:{},
|
||||
onLoad(options){
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
onReady(){
|
||||
|
||||
},
|
||||
onShow(){
|
||||
|
||||
},
|
||||
onHide(){
|
||||
|
||||
},
|
||||
onResize(){
|
||||
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
|
||||
},
|
||||
onReachBottom(e){
|
||||
|
||||
},
|
||||
onPageScroll(e){
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page{
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background:rgba(248, 248, 248, 1);background-size: 100% auto !important;
|
||||
}
|
||||
.batchManagement_flex_0{
|
||||
background:#fff;width:750rpx;height:88rpx;overflow:hidden;z-index:10;top:0rpx;background-size:100% auto !important;
|
||||
}
|
||||
.batchManagement_fd0_0_c2_c1{
|
||||
color:#373737;font-size:28rpx;font-weight:400;line-height:30rpx;
|
||||
}
|
||||
.batchManagement_noCheckfd0_0_c2_c0_c1_c0{
|
||||
width:32rpx;height:32rpx;
|
||||
}
|
||||
.batchManagement_checkfd0_0_c2_c0_c0_c0{
|
||||
width:32rpx;height:32rpx;
|
||||
}
|
||||
::v-deep .batchManagement_fd0_0_c2_c0{
|
||||
margin:0rpx 16rpx 0rpx 0rpx;
|
||||
}
|
||||
.batchManagement_fd0_0_c2{
|
||||
width:200rpx;
|
||||
}
|
||||
.batchManagement_fd0_0_c1_c0{
|
||||
font-size:36rpx;font-weight:500;color:#333;line-height:88rpx;
|
||||
}
|
||||
.batchManagement_fd0_0_c0_c0{
|
||||
font-size:32rpx;font-weight:500;color:#333;line-height:88rpx;
|
||||
}
|
||||
.batchManagement_fd0_0_c0{
|
||||
width:200rpx;
|
||||
}
|
||||
.batchManagement_fd0_0{
|
||||
margin:0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
.batchManagement_flex_2{
|
||||
background:rgba(255, 255, 255, 1);width:750rpx;height:128rpx;overflow:hidden;z-index:10;bottom:calc(0rpx + var(--window-bottom));background-size:100% auto !important;
|
||||
}
|
||||
.batchManagement_fd2_1{
|
||||
border:1px solid rgba(237, 64, 64, 1);background:rgba(255, 255, 255, 1);border-radius:100rpx 100rpx 100rpx 100rpx;font-size:28rpx;color:rgba(237, 64, 64, 1);width:339rpx;height:80rpx;line-height:80rpx;font-weight:500;margin:0rpx 24rpx 0rpx 0rpx;
|
||||
}
|
||||
.batchManagement_fd2_0{
|
||||
background:rgba(229, 229, 229, 1);border-radius:100rpx 100rpx 100rpx 100rpx;font-size:28rpx;color:rgba(102, 102, 102, 1);width:339rpx;height:80rpx;line-height:80rpx;font-weight:500;margin:0rpx 0rpx 0rpx 24rpx;
|
||||
}
|
||||
</style>
|
||||
408
pages/spgl/commodityManagement/commodityManagement.vue
Normal file
408
pages/spgl/commodityManagement/commodityManagement.vue
Normal file
@ -0,0 +1,408 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center commodityManagement_flex_0"
|
||||
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub commodityManagement_fd0_0'>
|
||||
<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1">
|
||||
<text class='fu-iconfont2 commodityManagement_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='commodityManagement_fd0_0_c1_c0'>分类管理</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center commodityManagement_fd0_0_c2'>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout commodityManagement_flex_1">
|
||||
<view v-for="(item,inedx) in goodsClass" :key="index" class='flex flex-wrap align-center justify-between flex-sub commodityManagement_fd1_0'>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='commodityManagement_fd1_0_c0_c0'>{{item.name}}</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center' @tap.stop="editTap(item)">
|
||||
<image class='commodityManagement_fd1_0_c1_c0' mode="aspectFit" :src='STATIC_URL+"61.png"'></image>
|
||||
<text class='commodityManagement_fd1_0_c1_c1'>编辑</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<fu-empty-ui v-if="goodsClass.length==0"></fu-empty-ui>
|
||||
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
<view class="flex flex-direction flex-wrap align-center benben-position-layout flex commodityManagement_flex_2">
|
||||
<button class='commodityManagement_fd2_0' @tap.stop="popupShow1684226988403=true">添加分类</button>
|
||||
|
||||
</view>
|
||||
<view :style="{height: '148rpx'}"></view>
|
||||
<benben-popup v-model="popupShow1684226988403" :mask="true" mode='center'>
|
||||
<!---添加分类flex布局开始-->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center">
|
||||
<view class='flex flex-direction flex-wrap align-stretch commodityManagement_fd3_0'>
|
||||
<view class='flex flex-wrap align-center justify-center flex-sub'>
|
||||
<text class='commodityManagement_fd3_0_c0_c0'>添加分类</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center commodityManagement_fd3_0_c1'>
|
||||
<image class='commodityManagement_fd3_0_c1_c0' mode="aspectFit" :src='STATIC_URL+"62.png"'>
|
||||
</image>
|
||||
<text>分类名称</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-center commodityManagement_fd3_0_c2'>
|
||||
<input class='commodityManagement_fd3_0_c2_c0' type="text" placeholder="请输入商品分类名称"
|
||||
confirm-type="done" :maxlength="-1" placeholder-style="color:#999;font-size:28rpx"
|
||||
v-model="fd3_0_c2_c0" />
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center commodityManagement_fd3_0_c3'>
|
||||
<text class='commodityManagement_fd3_0_c3_c0' @tap.stop="popupShow1684226988403=false">取消</text>
|
||||
<text class='commodityManagement_fd3_0_c3_c1' @tap="addTap">确定</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---添加分类flex布局结束-->
|
||||
|
||||
</benben-popup>
|
||||
<benben-popup v-model="popupShow1684227700130" :mask="true" mode='center'>
|
||||
<!---编辑分类名称flex布局开始-->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center">
|
||||
<view class='flex flex-direction flex-wrap align-stretch commodityManagement_fd4_0'>
|
||||
<view class='flex flex-wrap align-center justify-end flex-sub'>
|
||||
<text class='commodityManagement_fd4_0_c0_c0'>编辑商品分类</text>
|
||||
<image class='commodityManagement_fd4_0_c0_c1' :src='STATIC_URL+"2.png"'
|
||||
@tap.stop="popupShow1684227700130=false"></image>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center commodityManagement_fd4_0_c1'>
|
||||
<image class='commodityManagement_fd4_0_c1_c0' mode="aspectFit" :src='STATIC_URL+"62.png"'>
|
||||
</image>
|
||||
<text>分类名称</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-center commodityManagement_fd4_0_c2'>
|
||||
<input class='commodityManagement_fd4_0_c2_c0' type="text" placeholder="请输入商品分类名称"
|
||||
confirm-type="done" :maxlength="-1" placeholder-style="color:#999;font-size:28rpx"
|
||||
v-model="fd4_0_c2_c0" />
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center commodityManagement_fd4_0_c3'>
|
||||
<text class='commodityManagement_fd4_0_c3_c0' @tap.stop="delTap">删除</text>
|
||||
<text class='commodityManagement_fd4_0_c3_c1' @tap="sureTap">确定</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---编辑分类名称flex布局结束-->
|
||||
|
||||
</benben-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
"fd4_0_c2_c0": "",
|
||||
"popupShow1684227700130": false,
|
||||
"fd3_0_c2_c0": "",
|
||||
"popupShow1684226988403": false,
|
||||
goodsClass:[],
|
||||
classId:""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch: {},
|
||||
onLoad(options) {
|
||||
this.post6487d63dc3e21()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
//商品分类列表
|
||||
post6487d63dc3e21(){
|
||||
this.$api.post(global.apiUrls.post6487d63dc3e21).then(res=>{
|
||||
if(res.data.code==1){{
|
||||
this.goodsClass = res.data.data
|
||||
}}
|
||||
})
|
||||
},
|
||||
//添加商家分类
|
||||
addTap(){
|
||||
if(!this.fd3_0_c2_c0) return this.$message.info('请输入商品分类名称')
|
||||
this.$api.post(global.apiUrls.post6486bc83caec2,{
|
||||
name:this.fd3_0_c2_c0
|
||||
}).then(res=>{
|
||||
if(res.data.code==1){
|
||||
this.popupShow1684226988403 = false
|
||||
this.fd3_0_c2_c0 = ""
|
||||
this.post6487d63dc3e21()
|
||||
}
|
||||
})
|
||||
},
|
||||
editTap(item){
|
||||
this.classId = item.aid;
|
||||
this.fd4_0_c2_c0 = item.name
|
||||
this.popupShow1684227700130 = true
|
||||
},
|
||||
sureTap(){
|
||||
if(!this.fd4_0_c2_c0) return this.$message.info('请输入商品分类名称')
|
||||
this.$api.post(global.apiUrls.post6486c879ba7f3,{
|
||||
name:this.fd4_0_c2_c0,
|
||||
aid:this.classId
|
||||
}).then(res=>{
|
||||
if(res.data.code==1){
|
||||
this.popupShow1684227700130 = false
|
||||
this.fd4_0_c2_c0 = ""
|
||||
this.post6487d63dc3e21()
|
||||
}
|
||||
})
|
||||
},
|
||||
delTap(){
|
||||
this.$api.post(global.apiUrls.post6486c9004af38,{
|
||||
aid:this.classId
|
||||
}).then(res=>{
|
||||
if(res.data.code==1){
|
||||
this.popupShow1684227700130 = false
|
||||
this.fd4_0_c2_c0 = ""
|
||||
this.post6487d63dc3e21()
|
||||
}else{
|
||||
this.$message.info(res.data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background: rgba(248, 248, 248, 1);
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.commodityManagement_flex_0 {
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
top: 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.commodityManagement_fd0_0_c2 {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd0_0_c1_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd0_0_c0_c0 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd0_0 {
|
||||
margin: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_flex_1 {
|
||||
padding: 0rpx 024rpx 0rpx 024rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd1_0_c1_c1 {
|
||||
color: #59A6F4;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd1_0_c1_c0 {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 8rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd1_0_c0_c0 {
|
||||
color: #0E0E0C;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
line-height: 30rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd1_0 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
margin: 24rpx 0rpx 0rpx 0rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding: 32rpx 24rpx 32rpx 24rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_flex_2 {
|
||||
background: rgba(248, 248, 248, 1);
|
||||
width: 750rpx;
|
||||
height: 148rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
bottom: calc(0rpx + var(--window-bottom));
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.commodityManagement_fd2_0 {
|
||||
background: rgba(255, 147, 0, 1);
|
||||
border-radius: 44rpx 44rpx 44rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
width: 686rpx;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c3_c1 {
|
||||
color: #FF9300;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
padding: 24rpx 99rpx 24rpx 99rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c3_c0 {
|
||||
border-right: 1px solid #eee;
|
||||
color: #999999;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
padding: 24rpx 99rpx 24rpx 99rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c3 {
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c2_c0 {
|
||||
background: rgba(248, 248, 248, 1);
|
||||
width: 482rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c2 {
|
||||
margin: 0rpx 0rpx 35rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c1_c0 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 12rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c1 {
|
||||
margin: 32rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0_c0_c0 {
|
||||
color: #000000;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd3_0 {
|
||||
background: #fff;
|
||||
width: 530rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding: 32rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c3_c1 {
|
||||
color: #FF9300;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
padding: 24rpx 99rpx 24rpx 99rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c3_c0 {
|
||||
border-right: 1px solid #eee;
|
||||
color: #999999;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 32rpx;
|
||||
padding: 24rpx 99rpx 24rpx 99rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c3 {
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c2_c0 {
|
||||
background: rgba(248, 248, 248, 1);
|
||||
width: 482rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding-left: 16rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c2 {
|
||||
margin: 0rpx 0rpx 35rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c1_c0 {
|
||||
width: 12rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 12rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c1 {
|
||||
margin: 32rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c0_c1 {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 24rpx 0rpx 105rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0_c0_c0 {
|
||||
color: #000000;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 48rpx;
|
||||
}
|
||||
|
||||
.commodityManagement_fd4_0 {
|
||||
background: #fff;
|
||||
width: 530rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding: 32rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
</style>
|
||||
267
pages/spgl/galleryPage/galleryPage.vue
Normal file
267
pages/spgl/galleryPage/galleryPage.vue
Normal file
@ -0,0 +1,267 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center galleryPage_flex_0"
|
||||
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub galleryPage_fd0_0'>
|
||||
<view class='flex flex-wrap align-center galleryPage_fd0_0_c0' @tap.stop="handleJumpDiy"
|
||||
data-type="back" data-url="1">
|
||||
<text class='fu-iconfont2 galleryPage_fd0_0_c0_c0'></text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<text class='galleryPage_fd0_0_c1_c0'>图库</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center justify-end galleryPage_fd0_0_c2' @tap.stop="sureTap">
|
||||
<text class='galleryPage_fd0_0_c2_c0'>完成</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center galleryPage_flex_1">
|
||||
<view class='flex flex-wrap align-center flex-sub galleryPage_fd1_0'>
|
||||
<text class='fu-iconfont2 galleryPage_fd1_0_c0'></text>
|
||||
<input class='flex-sub galleryPage_fd1_0_c1' type="text" placeholder="请输入关键词进行搜索" @confirm="searchTap()" confirm-type="done"
|
||||
:maxlength="-1" placeholder-style="color:rgba(191, 191, 191, 1);font-size:26rpx" v-model="name" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="flex flex-direction align-center list" v-for="(item,index) in listData" :key="index">
|
||||
<image class="shop-pic" :src="item.image" mode="aspectFill"></image>
|
||||
<view>{{item.name}}</view>
|
||||
<image @tap="checkTap(index)" class="check-img"
|
||||
:src='item.checked?STATIC_URL+"44.png":STATIC_URL+"117.png"'></image>
|
||||
</view>
|
||||
</view>
|
||||
<fu-empty-ui v-if="listData.length==0"></fu-empty-ui>
|
||||
<!---flex布局flex布局结束-->
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
page: 1, // 分页
|
||||
allowLoadMore: true, // 允许加载更多
|
||||
loadedAll: false, // 已加载全部数据
|
||||
noListData: false, // 没有列表数据
|
||||
listData: [], //订单列表 数组
|
||||
name: '', //搜索关键字
|
||||
nameimg: '', //上个页面带入,是哪个图片上传
|
||||
count: '' //上个页面带入,最多选择记账
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch: {},
|
||||
onLoad(options) {
|
||||
this.count = options.count
|
||||
this.nameimg = options.name
|
||||
this.getImages()
|
||||
},
|
||||
// 下拉刷新
|
||||
onPullDownRefresh() {
|
||||
this.page = 1;
|
||||
this.allowLoadMore = true;
|
||||
this.loadedAll = false;
|
||||
this.noListData = false;
|
||||
this.listData = [];
|
||||
this.getImages(() => {
|
||||
uni.stopPullDownRefresh();
|
||||
});
|
||||
},
|
||||
//上拉加载更多
|
||||
onReachBottom(e) {
|
||||
this.getImages();
|
||||
},
|
||||
methods: {
|
||||
sureTap() {
|
||||
let character = [];
|
||||
let aid = [];
|
||||
this.listData.forEach(item => {
|
||||
if (item.checked) {
|
||||
character.push(item.image)
|
||||
aid.push(item.aid)
|
||||
}
|
||||
})
|
||||
if (character.length == 0) return this.$message.info('请选择图片');
|
||||
// character.forEach(item => {
|
||||
// item.path = item.image
|
||||
// })
|
||||
uni.$emit("ADDIMG", {
|
||||
image: JSON.stringify(character),
|
||||
aid:aid,
|
||||
type: this.nameimg
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack({})
|
||||
}, 300)
|
||||
},
|
||||
searchTap(e){
|
||||
console.log(this.name)
|
||||
this.page = 1;
|
||||
this.allowLoadMore = true;
|
||||
this.loadedAll = false;
|
||||
this.noListData = false;
|
||||
this.listData = [];
|
||||
this.getImages()
|
||||
},
|
||||
//获取图库
|
||||
getImages(fn) {
|
||||
if (!this.allowLoadMore || this.loadedAll || this.noListData) return;
|
||||
this.allowLoadMore = false;
|
||||
this.$api.post(global.apiUrls.post6488278581ec3, {
|
||||
page: this.page,
|
||||
name: this.name
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
let tempLists = res.data.data.data,
|
||||
totalPage = res.data.data.last_page,
|
||||
listData = this.listData;
|
||||
|
||||
this.listData.push(...tempLists);
|
||||
this.listData.forEach(item => {
|
||||
item.checked = false
|
||||
})
|
||||
console.log(this.listData)
|
||||
this.allowLoadMore = true;
|
||||
if (this.page >= totalPage) this.loadedAll = true;
|
||||
if (this.page == 1 && this.listData.length == 0) this.noListData = true;
|
||||
this.page += 1;
|
||||
} else {
|
||||
this.allowLoadMore = true;
|
||||
}
|
||||
if (fn) fn();
|
||||
})
|
||||
},
|
||||
|
||||
//选择
|
||||
checkTap(index) {
|
||||
let list = this.listData;
|
||||
this.listData[index].checked = !this.listData[index].checked;
|
||||
let length = (this.listData.map((item, index) => (item.checked ? `${item.name}` : '')).filter(item =>
|
||||
item != '')).length;
|
||||
console.log(length)
|
||||
if (length <= this.count) {} else {
|
||||
this.listData[index].checked = false;
|
||||
}
|
||||
list = list.map((item) => {
|
||||
item.checked = item.checked;
|
||||
return item;
|
||||
})
|
||||
this.listData = list
|
||||
console.log(this.listData)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background: rgba(248, 248, 248, 1);
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
.item{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 16rpx 0 32rpx;
|
||||
.list{
|
||||
margin-right: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
position: relative;
|
||||
}
|
||||
.shop-pic{
|
||||
width: 218rpx;
|
||||
height: 218rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.check-img{
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
position: absolute;
|
||||
top: 18rpx;
|
||||
right: 16rpx;
|
||||
}
|
||||
view{
|
||||
width: 218rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.galleryPage_flex_0 {
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
top: 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0_c2_c0 {
|
||||
line-height: 35rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 400;
|
||||
color: rgba(255, 147, 0, 1);
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0_c2 {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0_c1_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0_c0_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 36rpx;
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0_c0 {
|
||||
width: 150rpx;
|
||||
}
|
||||
|
||||
.galleryPage_fd0_0 {
|
||||
margin: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.galleryPage_flex_1 {
|
||||
background: transparent;
|
||||
padding: 24rpx 24rpx 0rpx 24rpx;
|
||||
}
|
||||
|
||||
.galleryPage_fd1_0_c1 {
|
||||
margin: 0rpx 0rpx 0rpx 20rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: var(--benbenFontColor0);
|
||||
}
|
||||
|
||||
.galleryPage_fd1_0_c0 {
|
||||
font-size: 28rpx;
|
||||
color: rgba(153, 153, 153, 1);
|
||||
}
|
||||
|
||||
.galleryPage_fd1_0 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
padding: 18rpx 24rpx 18rpx 24rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
</style>
|
||||
104
pages/spgl/priceDescription/priceDescription.vue
Normal file
104
pages/spgl/priceDescription/priceDescription.vue
Normal file
@ -0,0 +1,104 @@
|
||||
<template>
|
||||
<view class="page" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center priceDescription_flex_0" :style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub priceDescription_fd0_0' >
|
||||
<view class='flex flex-wrap align-center' @tap.stop="handleJumpDiy" data-type="back" data-url="1" >
|
||||
<text class='fu-iconfont2 priceDescription_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='priceDescription_fd0_0_c1_c0' >商品规格说明</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center priceDescription_fd0_0_c2' >
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}" ></view>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center priceDescription_flex_1" >
|
||||
<jyf-parser class='priceDescription_fd1_0' >
|
||||
</jyf-parser>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
export default {
|
||||
components:{},
|
||||
|
||||
|
||||
data(){
|
||||
return {};
|
||||
},
|
||||
computed:{
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch:{},
|
||||
onLoad(options){
|
||||
|
||||
},
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
onReady(){
|
||||
|
||||
},
|
||||
onShow(){
|
||||
|
||||
},
|
||||
onHide(){
|
||||
|
||||
},
|
||||
onResize(){
|
||||
|
||||
},
|
||||
onPullDownRefresh(){
|
||||
|
||||
},
|
||||
onReachBottom(e){
|
||||
|
||||
},
|
||||
onPageScroll(e){
|
||||
|
||||
},
|
||||
methods:{
|
||||
|
||||
}
|
||||
};
|
||||
</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;
|
||||
}
|
||||
.priceDescription_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;
|
||||
}
|
||||
.priceDescription_fd0_0_c2{
|
||||
width:32rpx;height:32rpx;
|
||||
}
|
||||
.priceDescription_fd0_0_c1_c0{
|
||||
font-size:36rpx;font-weight:500;color:#333;line-height:88rpx;
|
||||
}
|
||||
.priceDescription_fd0_0_c0_c0{
|
||||
font-size:32rpx;font-weight:500;color:#333;line-height:88rpx;
|
||||
}
|
||||
.priceDescription_fd0_0{
|
||||
margin:0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
.priceDescription_flex_1{
|
||||
background:rgba(255, 255, 255, 1);padding:24rpx 24rpx 0rpx 24rpx;background-size:100% auto !important;
|
||||
}
|
||||
::v-deep .priceDescription_fd1_0{
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
1187
pages/spgl/productSpecifications/productSpecifications.vue
Normal file
1187
pages/spgl/productSpecifications/productSpecifications.vue
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user