This commit is contained in:
zmj 2024-04-28 08:48:30 +08:00
parent 6555449109
commit ec548c021c
5 changed files with 324 additions and 88 deletions

View File

@ -1427,8 +1427,23 @@
"pages": [{ "pages": [{
"path": "list/index", "path": "list/index",
"style": { "style": {
"navigationBarTitleText": "商品管理", "navigationBarTitleText": "商品管理13",
"enablePullDownRefresh": true "enablePullDownRefresh": true,
"app-plus": {
"scrollIndicator": false, //
"subNVues": [{
"id": "concatpro", //
"path": "list/subnvue/concat", //
"type": "popup",
"style": {
"position": "absolute",
"dock": "right",
"width": "750rpx",
"height": "2000rpx",
"background": "rgba(0,0,0,0.2)"
}
}]
}
} }
}, },
{ {

View File

@ -1,6 +1,5 @@
<template> <template>
<view class="content"> <view class="content">
<button @click="test">叫我按钮></button>
<view class="content-top"> <view class="content-top">
<view class="content-tops"> <view class="content-tops">
<view class="content-top_img" v-if="Object.keys(userInfoData).length>0"> <view class="content-top_img" v-if="Object.keys(userInfoData).length>0">
@ -105,7 +104,7 @@
</view> </view>
<view class="tools-two" v-else-if="isgShow&&userInfoData.mer_info.setting_status==1"> <view class="tools-two" v-else-if="isgShow&&userInfoData.mer_info.setting_status==1">
<view class="" v-for="(item,k) in typelist" :key='k' @click="navation(item)"> <view class="" v-for="(item,k) in typelist" :key='k' @click="navation(item)">
<view class="tools-two-img"> <view class="tools-two-img " :id="'asas'+k">
<image :src="item.image" mode=""></image> <image :src="item.image" mode=""></image>
</view> </view>
<view class="tools-two-title"> {{item.name}}</view> <view class="tools-two-title"> {{item.name}}</view>
@ -455,6 +454,7 @@
}, },
data() { data() {
return { return {
elInfo: {},
isAuto: false, // isAuto: false, //
isShowAuth: false, // isShowAuth: false, //
loadEndFlag: false, loadEndFlag: false,
@ -847,16 +847,6 @@
}, },
async onLoad() { async onLoad() {
setTimeout(() => {
console.log("执行了")
const subNVue = uni.getSubNVueById('concat')
subNVue.show('slide-in-left', 200, () => {
console.log('subNVue 原生子窗体显示成功');
})
}, 500)
this.Fheight = uni.getSystemInfoSync().windowHeight + 'px'; this.Fheight = uni.getSystemInfoSync().windowHeight + 'px';
await this.$onLaunched; await this.$onLaunched;
this.list1(); this.list1();
@ -865,6 +855,12 @@
this.$u.sleep(5000).then(() => { this.$u.sleep(5000).then(() => {
this.loadEndFlag = true; this.loadEndFlag = true;
}); });
uni.$once('diverIndexSubEmit', () => {
uni.navigateTo({
url: '/pages/product/list/index'
})
})
}, },
onReachBottom() { onReachBottom() {
@ -875,6 +871,20 @@
}, 10) }, 10)
} }
}, },
onReady() {
let that = this
const query = uni.createSelectorQuery().in(this);
query
.select(".tools-two-img")
.boundingClientRect((data) => {
let info = JSON.stringify(data)
that.elInfo = data
// #ifdef APP-PLUS
that.openDiver()
// #endif
})
.exec();
},
onShow() { onShow() {
if (this.loadEndFlag) { if (this.loadEndFlag) {
@ -888,10 +898,10 @@
this.$bus.$off('value-updated') this.$bus.$off('value-updated')
}, },
methods: { methods: {
test() { openDiver() {
uni.navigateTo({ const subNVue = uni.getSubNVueById('concat')
url: '/pages/test/index' subNVue.show('zoom-out', 300)
}) uni.$emit('diverIndexEmit', this.elInfo);
}, },
// //
handleToWithDraw(item, index) { handleToWithDraw(item, index) {

View File

@ -1,17 +1,143 @@
<template> <template>
<view class="" style="width: 750rpx;height: 2000rpx;"> <view class="" style="width: 750rpx;height: 100%;">
<view class="" style="top: 500rpx;left: 100rpx;"> <view class="target" :style="{left:(left-9)+'px',top:(top-9)+'px'}">
<image src="/static/images/adds.png" style="width: 50rpx;height: 50rpx" alt="" /> <image src="/static/images/index7.png" class="imgs"></image>
</view>
<view class="" style="width: 462rpx;height: 106rpx;">
<view class="tras" :class="{'act':isActive}">
<text class="font">点击商品管理,发布商品</text>
</view>
<image src="/static/images/bg2.png" style="width: 762rpx;height: 106rpx;z-index: -1;"></image>
</view>
<view class="next-btn">
<text class="next-btn-text font" @click="next">下一步(3/4){{isActive}}</text>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() {
return {
isActive: false,
left: 33,
top: 459.54547119140625,
subNVue: null,
offsetX: 0,
offsetY: 0,
}
},
methods: {
next() {
this.subNVue.hide('zoom-in', 300, )
setTimeout(() => {
uni.$emit('diverIndexSubEmit');
}, 300)
} }
},
onLoad() {
this.subNVue = uni.getSubNVueById('concat')
let that = this
uni.$once('diverIndexEmit', (data) => {
console.log('data', data)
// that.left = data.left
// that.top = data.top
})
setTimeout(() => {
that.isActive = true
}, 500)
}
}
</script> </script>
<style> <style>
/* 定义动画效果 */
.target {
position: relative;
width: 160rpx;
height: 160rpx;
border-radius: 160rpx;
background-color: white;
}
.greenLine {
width: 10rpx;
height: 100rpx;
background-color: green;
position: absolute;
left: 40px;
transform: translate(-50%, 0);
z-index: 999;
top: -40px;
}
.imgs {
width: 62px;
height: 62px;
position: absolute;
left: 40px;
top: 40px;
transform: translate(-50%, -50%);
}
.tras {
position: absolute;
z-index: 999 !important;
width: 0;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 462rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
}
.bgimg {
width: 200rpx;
position: absolute;
z-index: 1;
}
.img {
opacity: 0;
width: 50rpx;
height: 50rpx;
transition-property: opacity;
transition-duration: 1s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.next-btn {
position: absolute;
bottom: 100rpx;
left: 375rpx;
transform: translateX(-50%);
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
}
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
</style> </style>

View File

@ -1,63 +1,13 @@
<template> <template>
<view style="padding-bottom: 200rpx;"> <view style="padding-bottom: 200rpx;">
<button @click="openDiver">anniy</button>
<view class="order-index" ref="container"> <view class="order-index" ref="container">
<view class="search" style="margin-bottom: 24rpx;"> <view class="search" style="margin-bottom: 24rpx;">
<u-search :showAction="true" actionText="搜索" v-model="keyword" :animation="true" <u-search :showAction="true" actionText="搜索" v-model="keyword" :animation="true"
:actionStyle="{color: '#20B128'}" @search="keywordSearch" @custom="keywordSearch" :actionStyle="{color: '#20B128'}" @search="keywordSearch" @custom="keywordSearch"
:clearabled="false" @clickIcon="scanQRcodes"></u-search> :clearabled="false" @clickIcon="scanQRcodes"></u-search>
</view> </view>
<!-- <view class="header">
<div class="header_count">
<swiper indicator-dots="true" :circular="circular" indicator-color="#E4E4E4"
indicator-active-color="#E93323" previous-margin="0" next-margin="0" :current="swiperCur"
@change="swiperChange">
<block>
<swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator">
<picker class="item" mode="multiSelector" :range="[menuList,menuCList]"
:range-key="'cate_name'" @columnchange="columnchange" @change="changeMenu"
@cancel="cancelMenu">
<image mode='widthFix' class="image" src="@/static/images/daoru.png"></image>
<text class="text">分类筛选</text>
</picker>
<navigator class="item"
:url="`/pages/product/storeClassification/index?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_cate.png">
</image>
<text class="text">店铺分类</text>
</navigator>
<navigator class="item"
:url="`/pages/product/addGoods/freightTemplate?mer_id=${mer_id}`"
hover-class='none'>
<image mode='widthFix' class="image" src="../static/images/product_freight.png">
</image>
<text class="text">运费模板</text>
</navigator>
</view>
</swiper-item>
</block>
</swiper>
</div>
</view> -->
<!-- <view class="longTab">
<scroll-view scroll-x="true" style="white-space: nowrap; display: flex;" scroll-with-animation
class="menu" :scroll-left="tabLeft" show-scrollbar="true">
<view class="longItem" :style="'width:' + isWidth + 'px'" :data-index="index"
:class="index === tabClick ? 'click' : ''" v-for="(item, index) in tabList" :key="index"
:id="'id' + index" @click="selectMenu(item, index)">
{{ item.name }}
</view>
<view v-if="tabList.length" class="underlineBox"
:style="'transform:translateX(' + isLeft + 'px);width:' + isWidth + 'px'">
<view class="underline bg-color-white"></view>
</view>
</scroll-view>
</view> -->
<u-tabs :current='current' :list="tabList" @click="selectMenu" type='primary' lineColor='#32BB3B'></u-tabs> <u-tabs :current='current' :list="tabList" @click="selectMenu" type='primary' lineColor='#32BB3B'></u-tabs>
<view class="wrapper" style="background-color: #F1F1F1;"> <view class="wrapper" style="background-color: #F1F1F1;">
<view class='product_list' v-if="productList && productList.length > 0"> <view class='product_list' v-if="productList && productList.length > 0">
<view v-for="(item,index) in productList" :key="index" class="card" <view v-for="(item,index) in productList" :key="index" class="card"
@ -212,7 +162,7 @@
<view class="footer-li" @click="handClick(2)"> <view class="footer-li" @click="handClick(2)">
扫码入库 扫码入库
</view> </view>
<view class="footer-li act" @click="handClick(3)"> <view class="footer-li act fbsp" @click="handClick(3)">
发布商品 发布商品
</view> </view>
</view> </view>
@ -351,6 +301,7 @@
}, },
data() { data() {
return { return {
elInfo: "",
current: 0, current: 0,
flag1: true, flag1: true,
flag: true, flag: true,
@ -444,8 +395,30 @@
this.where.page = ++this.where.page; this.where.page = ++this.where.page;
this.getList(this.mer_id, false); this.getList(this.mer_id, false);
}, },
onReady() {
let that = this
const query = uni.createSelectorQuery().in(this);
query
.select(".fbsp")
.boundingClientRect((data) => {
let info = JSON.stringify(data)
that.elInfo = data
// #ifdef APP-PLUS
setTimeout(() => {
that.openDiver()
}, 1000)
// #endif
})
.exec();
},
methods: { methods: {
openDiver() {
let that = this
const subNVue = uni.getSubNVueById('concatpro')
subNVue.show('zoom-out', 300, () => {
uni.$emit('diverProductEmit', that.elInfo);
})
},
handClick(type) { handClick(type) {
if (type == 2) { if (type == 2) {
// #ifndef APP-PLUS // #ifndef APP-PLUS
@ -455,7 +428,6 @@
return return
// #endif // #endif
} }
// console.log(type)
if (type == 3) { if (type == 3) {
uni.navigateTo({ uni.navigateTo({
url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}` url: `/pages/product/addGood/addGood?mer_id=${this.mer_id}`
@ -491,10 +463,8 @@
// // longPressActions: { // // longPressActions: {
// // itemList: ['', '', ''], // // itemList: ['', '', ''],
// // success: function(data) { // // success: function(data) {
// // console.log('' + (data.tapIndex + 1) + ',' + (data.index + 1) + '');
// // }, // // },
// // fail: function(err) { // // fail: function(err) {
// // console.log(err.errMsg);
// // } // // }
// // } // // }
// }); // });
@ -514,7 +484,6 @@
getProductTitle() { getProductTitle() {
productTitle(this.mer_id).then(res => { productTitle(this.mer_id).then(res => {
this.tabList = res.data; this.tabList = res.data;
console.log(this.tabList)
let clickIndex = 0; let clickIndex = 0;
this.tabList.forEach((item, index) => { this.tabList.forEach((item, index) => {
item.name = item.name + `(${item.count})` item.name = item.name + `(${item.count})`
@ -530,7 +499,6 @@
selectMenu(item) { selectMenu(item) {
let index = this.tabList.findIndex(items => items.name == item.name); let index = this.tabList.findIndex(items => items.name == item.name);
this.where.type = item.type; this.where.type = item.type;
console.log(this.where.type)
this.loading = this.loaded = false; this.loading = this.loaded = false;
this.where.page = 1; this.where.page = 1;
this.shopList = []; this.shopList = [];
@ -565,9 +533,7 @@
// //
this.getProductTitle(); this.getProductTitle();
}).catch(res => { }).catch(res => {})
console.log(res)
})
}, },
// //
@ -946,12 +912,10 @@
// }) // })
// that.getList(this.mer_id, false) // that.getList(this.mer_id, false)
// } else if (res.cancel) { // } else if (res.cancel) {
// // console.log('');
// } // }
// } // }
// }); // });
} else { } else {
console.log("laizhe1")
that.onAndOff(item, 1) that.onAndOff(item, 1)
// this.productList = [] // this.productList = []
// this.getList(this.mer_id, false); // this.getList(this.mer_id, false);
@ -959,7 +923,6 @@
}, },
// //
onAndOff(item, status) { onAndOff(item, status) {
// console.log("")
let that = this; let that = this;
productOffApi(that.mer_id, item.product_id, { productOffApi(that.mer_id, item.product_id, {
status: status status: status
@ -971,7 +934,6 @@
that.loading = false that.loading = false
that.loaded = false that.loaded = false
that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0); that.$set(item, 'is_show', item.is_show == 0 ? 1 : 0);
console.log("萨芬大沙发沙发")
that.getList(this.mer_id, true) that.getList(this.mer_id, true)
}); });
}).catch(err => { }).catch(err => {
@ -1713,8 +1675,6 @@
overflow: hidden; overflow: hidden;
width: 184rpx; width: 184rpx;
height: 72rpx; height: 72rpx;
} }
.act { .act {

View File

@ -0,0 +1,125 @@
<template>
<view class="" style="width: 750rpx;height: 100%;">
<view class="target" :style="{left:left+'px',top:top+'px'}" v-if="top">
<text style="color:white;text-align: center;font-size: 32rpx;line-height: 32px;">发布商品</text>
</view>
<view class="next-btn" :style="{top:bottomBtn +'px'}">
<text class="next-btn-text font" @click="next">我知道了</text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isActive: false,
left: 0,
top: 0,
subNVue: null,
bottomBtn: 800,
}
},
methods: {
test() {
this.subNVue.hide()
},
next() {
this.subNVue.hide('zoom-in', 300, )
}
},
onLoad() {
let that = this
this.subNVue = uni.getSubNVueById('concatpro')
uni.$on('diverProductEmit', (data) => {
console.log('data', data)
that.left = data.left
that.top = data.top
})
const res = uni.getSystemInfo({
success: (res => {
that.bottomBtn = res.screenHeight - 150
// this.clientHeight = res.windowHeight-uni.upx2px(80)
})
});
}
}
</script>
<style>
/* 定义动画效果 */
.target {
position: relative;
font-size: 32rpx;
border-radius: 40rpx;
height: 72rpx;
background-color: #32BB3B;
width: 302rpx;
}
.imgs {
width: 62px;
height: 62px;
position: absolute;
left: 40px;
top: 40px;
transform: translate(-50%, -50%);
}
.tras {
width: 0;
transition-property: width;
transition-duration: 3s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.act {
width: 500rpx;
}
.font {
font-size: 28rpx;
color: white;
lines: 1;
}
.bgimg {
width: 200rpx;
position: absolute;
z-index: 1;
}
.img {
opacity: 0;
width: 50rpx;
height: 50rpx;
transition-property: opacity;
transition-duration: 1s;
transition-delay: 0.1s;
transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1.0);
}
.next-btn {
position: absolute;
left: 375rpx;
transform: translateX(-50%);
width: 240rpx;
height: 76rpx;
border: 1px solid white;
border-radius: 38rpx;
}
.next-btn-text {
line-height: 76rpx;
text-align: center;
}
</style>