合并代码
This commit is contained in:
parent
98d307ebd7
commit
53bc5bb6df
|
@ -195,7 +195,7 @@ const shop = {
|
||||||
* 查看收藏记录
|
* 查看收藏记录
|
||||||
* @param {Object} param
|
* @param {Object} param
|
||||||
*/
|
*/
|
||||||
addProductCollect(param) {
|
collect(param) {
|
||||||
return util.request({
|
return util.request({
|
||||||
url: `/shopify/collect`,
|
url: `/shopify/collect`,
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
|
@ -253,6 +253,19 @@ const shop = {
|
||||||
load: true,
|
load: true,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取发布的商品列表
|
||||||
|
* @param {Object} param
|
||||||
|
*/
|
||||||
|
getProductionListByUserId(param) {
|
||||||
|
return util.request({
|
||||||
|
url: `/shopify/appProductionApi/getProductionListByUserId`,
|
||||||
|
data: param.data,
|
||||||
|
method: 'GET',
|
||||||
|
load: true,
|
||||||
|
})
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
export default shop
|
export default shop
|
|
@ -6,8 +6,8 @@ const config = {
|
||||||
// #endif
|
// #endif
|
||||||
// #ifndef H5
|
// #ifndef H5
|
||||||
// host: 'http://1641c8e0.r22.cpolar.top',
|
// host: 'http://1641c8e0.r22.cpolar.top',
|
||||||
// host: 'http://192.168.0.189:8080',
|
host: 'http://192.168.0.189:8080',
|
||||||
host: 'http://192.168.0.102:8080',
|
// host: 'http://192.168.0.102:8080',
|
||||||
// #endif
|
// #endif
|
||||||
// 上传文件二级路径
|
// 上传文件二级路径
|
||||||
uploadFilePath: "/homecommon/file/preview?fileName=",
|
uploadFilePath: "/homecommon/file/preview?fileName=",
|
||||||
|
|
|
@ -92,6 +92,8 @@
|
||||||
const isLong = ref(false)
|
const isLong = ref(false)
|
||||||
// 收藏按钮判定
|
// 收藏按钮判定
|
||||||
const collectBtnActive = ref(false)
|
const collectBtnActive = ref(false)
|
||||||
|
// 是否显示广告
|
||||||
|
const showAd = ref(false)
|
||||||
// 设置时间
|
// 设置时间
|
||||||
const alarmTime = computed(() => {
|
const alarmTime = computed(() => {
|
||||||
let result = uni.$store.state.alarmTime
|
let result = uni.$store.state.alarmTime
|
||||||
|
@ -415,6 +417,10 @@
|
||||||
// 播放变化
|
// 播放变化
|
||||||
function handleTimeupdate(ev) {
|
function handleTimeupdate(ev) {
|
||||||
videoTime.value = ev.detail
|
videoTime.value = ev.detail
|
||||||
|
// 如果有商品id 并且 当前播放时间大于商家设定的广告弹出时间
|
||||||
|
if (props.item.productId && (videoTime.value.currentTime > props.item.popupTime)) {
|
||||||
|
showAd.value = true
|
||||||
|
}
|
||||||
// console.log('videoTime.value', videoTime.value)
|
// console.log('videoTime.value', videoTime.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -591,18 +597,18 @@
|
||||||
<!-- 底部用户信息 -->
|
<!-- 底部用户信息 -->
|
||||||
<view class="panelBottom pa l0 r0 b0 pl40 pb30">
|
<view class="panelBottom pa l0 r0 b0 pl40 pb30">
|
||||||
<!-- 商品信息 -->
|
<!-- 商品信息 -->
|
||||||
<view class="goods df fdr mb20 br10" v-if="0">
|
<view class="goods df fdr mb20 br10" :class="{'active': showAd}" v-if="showAd">
|
||||||
<!-- 商品图片 -->
|
<!-- 商品图片 -->
|
||||||
<image class="image wh100 mr15 br10" src="/static/openPage.png" mode="aspectFill" />
|
<image class="image wh100 mr15 br10" :src="item.productImage" mode="aspectFill" />
|
||||||
|
|
||||||
<view class="df fdc jcsb f1">
|
<view class="df fdc jcsb f1">
|
||||||
<view class="">
|
<view class="name">
|
||||||
<text class="cfff f28">果农大王霹雳美味榴莲果子</text>
|
<text class="text cfff f28">{{item.productName}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="info df fdr aic mr10">
|
<view class="info df fdr aic mr10">
|
||||||
<text class="price mr10 cfff f28 b">超低价¥6.66</text>
|
<text class="price mr10 cfff f28 b">¥{{item.productPrice}}</text>
|
||||||
<text class="cfff f1 f20">已售666+单</text>
|
<text class="cfff f1 f20">已售{{item.sales}}单</text>
|
||||||
<uni-icons type="close" color="#fff" />
|
<!-- <uni-icons type="close" color="#fff" /> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -716,16 +722,35 @@
|
||||||
.panelBottom {
|
.panelBottom {
|
||||||
padding-right: 150rpx;
|
padding-right: 150rpx;
|
||||||
|
|
||||||
//
|
// 图片
|
||||||
|
.image {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 产品
|
||||||
.goods {
|
.goods {
|
||||||
padding: 10rpx;
|
padding: 10rpx;
|
||||||
width: 480rpx;
|
width: 480rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
background-color: rgba(0, 0, 0, .3);
|
background-color: rgba(0, 0, 0, .3);
|
||||||
|
opacity: 0;
|
||||||
|
transition-duration: .5s;
|
||||||
|
|
||||||
|
//
|
||||||
|
&.active {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 产品图片
|
||||||
|
.name .text {
|
||||||
|
lines: 2;
|
||||||
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// 视频播放进度条
|
||||||
.videoProgress {
|
.videoProgress {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
<script setup>
|
||||||
|
/**
|
||||||
|
* 商品详情
|
||||||
|
*/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
</style>
|
|
@ -38,27 +38,6 @@
|
||||||
"navigationBarBackgroundColor": "#fff"
|
"navigationBarBackgroundColor": "#fff"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "pages/merchant/order/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "商家订单",
|
|
||||||
"onReachBottomDistance": 100,
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/merchant/commodity-release/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "发布商品"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/merchant/specifications/index",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "规格",
|
|
||||||
"navigationStyle": "custom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "pages/shop/commodity/index",
|
"path": "pages/shop/commodity/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
@ -81,7 +60,8 @@
|
||||||
"navigationStyle": "custom",
|
"navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
"path": "pages/shop/order/index",
|
"path": "pages/shop/order/index",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单",
|
"navigationBarTitleText": "订单",
|
||||||
|
@ -822,7 +802,7 @@
|
||||||
"current": 0,
|
"current": 0,
|
||||||
"list": [{
|
"list": [{
|
||||||
"name": "test",
|
"name": "test",
|
||||||
"path": "pages/index/wallet/wallet"
|
"path": "pages/index/index"
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -125,23 +125,15 @@
|
||||||
// 底部菜单高度
|
// 底部菜单高度
|
||||||
const footerMenuHeight = ref(0)
|
const footerMenuHeight = ref(0)
|
||||||
// 当前任务
|
// 当前任务
|
||||||
const task = computed(() => {
|
const task = computed(() => uni.$store.state.task)
|
||||||
return uni.$store.state.task
|
|
||||||
})
|
|
||||||
// 用户信息
|
// 用户信息
|
||||||
const userinfo = computed(() => uni.$store.state.userinfo || {})
|
const userinfo = computed(() => uni.$store.state.userinfo || {})
|
||||||
// 当前tab选中
|
// 当前tab选中
|
||||||
const tabCurrent = computed(() => {
|
const tabCurrent = computed(() => tab[tabIndex.value])
|
||||||
return tab[tabIndex.value]
|
|
||||||
})
|
|
||||||
// 当前视频元素对象
|
// 当前视频元素对象
|
||||||
const currentVideoRef = computed(() => {
|
const currentVideoRef = computed(() => proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]])
|
||||||
return proxy.$refs[`videoRef${tabIndex.value}`][current[tabIndex.value]]
|
|
||||||
})
|
|
||||||
// 系统配置
|
// 系统配置
|
||||||
const config = computed(() => {
|
const config = computed(() => uni.$store.state.config)
|
||||||
return uni.$store.state.config
|
|
||||||
})
|
|
||||||
|
|
||||||
// 加载完成之后
|
// 加载完成之后
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
|
@ -269,7 +261,6 @@
|
||||||
|
|
||||||
// 获取更多推荐视频
|
// 获取更多推荐视频
|
||||||
function getMoreRecList() {
|
function getMoreRecList() {
|
||||||
console.log('recList', recList)
|
|
||||||
if (recList.total <= recList.data.length) return
|
if (recList.total <= recList.data.length) return
|
||||||
recList.pageNum++
|
recList.pageNum++
|
||||||
getRecList()
|
getRecList()
|
||||||
|
@ -284,7 +275,7 @@
|
||||||
pageSize: recList.pageSize,
|
pageSize: recList.pageSize,
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
// console.log('getRecList then rs', rs)
|
console.log('getRecList then rs', rs)
|
||||||
// 设置列表
|
// 设置列表
|
||||||
setList(rs, recList)
|
setList(rs, recList)
|
||||||
}).catch(rs => {
|
}).catch(rs => {
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
uni.requestPayment({
|
uni.requestPayment({
|
||||||
provider: 'alipay',
|
provider: 'alipay',
|
||||||
orderInfo: rs.data,
|
orderInfo: rs.msg,
|
||||||
success: rs => {
|
success: rs => {
|
||||||
console.log('requestPayment', rs)
|
console.log('requestPayment', rs)
|
||||||
util.getPurse()
|
util.getPurse()
|
||||||
|
|
|
@ -175,7 +175,7 @@
|
||||||
<image src="/static/mine-ruzhushangjia.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mine-ruzhushangjia.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">店铺管理</text>
|
<text class="txt mt10 wsn">店铺管理</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item ver" @click="link('/pages/merchant/business-operator/index')">
|
<view class="item ver" @click="link('/pages/shop/store/commodities')">
|
||||||
<image src="/static/mien-dianpuguanli.png" mode="aspectFit" class="wh50" />
|
<image src="/static/mien-dianpuguanli.png" mode="aspectFit" class="wh50" />
|
||||||
<text class="txt mt10 wsn">商品管理</text>
|
<text class="txt mt10 wsn">商品管理</text>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
<view class="area">
|
<view class="area">
|
||||||
<view class="line rows" @click="loginLink('/pages/mine/userinfo')">
|
<view class="line rows" @click="loginLink('/pages/mine/userinfo')">
|
||||||
<view class="avatar">
|
<view class="avatar">
|
||||||
<image class="head-portrait wh80" :src="userinfo.userPortrait" mode="aspectFill" />
|
<image class="head-portrait wh80" :src="userinfo.avatar" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
<view class="info f1 ml20">
|
<view class="info f1 ml20">
|
||||||
<view class="">{{userinfo.userNickname}}</view>
|
<view class="">{{userinfo.userNickname}}</view>
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
user.personalSignature = userinfo.personalSignature
|
user.personalSignature = userinfo.personalSignature
|
||||||
user.id = userinfo.id + ''
|
user.id = userinfo.id + ''
|
||||||
user.birthday = userinfo.birthday
|
user.birthday = userinfo.birthday
|
||||||
|
user.avatar = userinfo.avatar
|
||||||
// 修改性别下标
|
// 修改性别下标
|
||||||
genderIndex.value = gender.findIndex(item => item.id == userinfo.sex)
|
genderIndex.value = gender.findIndex(item => item.id == userinfo.sex)
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
import {
|
import {
|
||||||
reactive,
|
reactive,
|
||||||
getCurrentInstance,
|
getCurrentInstance,
|
||||||
ref
|
ref,
|
||||||
|
computed,
|
||||||
} from 'vue';
|
} from 'vue';
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
useStore
|
||||||
|
} from 'vuex'
|
||||||
// 工具库
|
// 工具库
|
||||||
import util from '@/common/js/util';
|
import util from '@/common/js/util';
|
||||||
// api
|
// api
|
||||||
|
@ -19,6 +23,7 @@
|
||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
|
const store = useStore()
|
||||||
|
|
||||||
class Form {
|
class Form {
|
||||||
videoId = ''
|
videoId = ''
|
||||||
|
@ -62,6 +67,14 @@
|
||||||
const userSelect = reactive([])
|
const userSelect = reactive([])
|
||||||
// 用户关键字
|
// 用户关键字
|
||||||
const userKeyword = ref('')
|
const userKeyword = ref('')
|
||||||
|
// 产品列表
|
||||||
|
const product = reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
list: [],
|
||||||
|
})
|
||||||
|
// 用户信息
|
||||||
|
const userinfo = computed(() => store.state.userinfo)
|
||||||
|
|
||||||
//
|
//
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
|
@ -104,6 +117,9 @@
|
||||||
// 获取标签
|
// 获取标签
|
||||||
getLabel()
|
getLabel()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取我发布的产品
|
||||||
|
getProductList()
|
||||||
})
|
})
|
||||||
|
|
||||||
// 获取视频详情
|
// 获取视频详情
|
||||||
|
@ -176,7 +192,7 @@
|
||||||
data: {
|
data: {
|
||||||
pageNum: label.pageNum,
|
pageNum: label.pageNum,
|
||||||
pageSize: label.pageSize,
|
pageSize: label.pageSize,
|
||||||
name: labelKeyword.value,
|
tagName: labelKeyword.value,
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
@ -213,7 +229,7 @@
|
||||||
function addLabel() {
|
function addLabel() {
|
||||||
api.video.setLabel({
|
api.video.setLabel({
|
||||||
data: {
|
data: {
|
||||||
name: labelKeyword.value,
|
tagName: labelKeyword.value,
|
||||||
}
|
}
|
||||||
}).then(rs => {
|
}).then(rs => {
|
||||||
if (rs.code == 200) {
|
if (rs.code == 200) {
|
||||||
|
@ -238,7 +254,7 @@
|
||||||
*/
|
*/
|
||||||
function handleSelectLabel(ev, index) {
|
function handleSelectLabel(ev, index) {
|
||||||
// 是否包含
|
// 是否包含
|
||||||
const findIndex = labelSelect.findIndex(item => item.id == ev.id)
|
const findIndex = labelSelect.findIndex(item => item.tagId == ev.tagId)
|
||||||
//
|
//
|
||||||
if (findIndex < 0) {
|
if (findIndex < 0) {
|
||||||
if (labelSelect.length >= 5) util.alert('最多上传5个')
|
if (labelSelect.length >= 5) util.alert('最多上传5个')
|
||||||
|
@ -313,12 +329,6 @@
|
||||||
const data = {
|
const data = {
|
||||||
...form
|
...form
|
||||||
}
|
}
|
||||||
// let fnName = 'saveVideo'
|
|
||||||
|
|
||||||
// // 如果是编辑
|
|
||||||
// if (form.videoId) {
|
|
||||||
// fnName = 'updateVideo'
|
|
||||||
// }
|
|
||||||
|
|
||||||
//视频状态 0草稿 1待审核 2审核失败 3已发布 4已下架
|
//视频状态 0草稿 1待审核 2审核失败 3已发布 4已下架
|
||||||
data.status = status ? status : 0
|
data.status = status ? status : 0
|
||||||
|
@ -351,7 +361,7 @@
|
||||||
}
|
}
|
||||||
// 如果有选择的标签
|
// 如果有选择的标签
|
||||||
if (labelSelect[0]) {
|
if (labelSelect[0]) {
|
||||||
data.tags = labelSelect.map(item => item.id).join(',')
|
data.tags = labelSelect.map(item => item.tagId).join(',')
|
||||||
}
|
}
|
||||||
// if (userSelect[0]) {
|
// if (userSelect[0]) {
|
||||||
// data.subscriberId = userSelect.map(item => item.userId).join(',')
|
// data.subscriberId = userSelect.map(item => item.userId).join(',')
|
||||||
|
@ -378,6 +388,48 @@
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取更多商品
|
||||||
|
function getMoreProductList() {
|
||||||
|
if (product.list.length >= product.total) return
|
||||||
|
product.pageNum++
|
||||||
|
getProductList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取已发布的商品列表
|
||||||
|
function getProductList() {
|
||||||
|
api.shop.getProductionListByUserId({
|
||||||
|
data: {
|
||||||
|
pageNum: product.pageNum,
|
||||||
|
pageSize: product.pageSize,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code == 200) {
|
||||||
|
if (product.pageNum == 1) product.list.length = 0
|
||||||
|
product.list.push(...rs.rows)
|
||||||
|
product.total = rs.total
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 选择商品
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function handleProduct(item) {
|
||||||
|
if (form.productId == item.id) return
|
||||||
|
form.productId = item.id
|
||||||
|
form.productName = item.name
|
||||||
|
form.productPrice = item.price
|
||||||
|
form.productImage = item.sliderImage.split(',')[0]
|
||||||
|
form.commission = item.commission
|
||||||
|
proxy.$refs.productRef.close()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -421,7 +473,7 @@
|
||||||
<!-- 标签 -->
|
<!-- 标签 -->
|
||||||
<view class="labels items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
<view class="labels items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||||
<view class="mr10">#{{item.name}}</view>
|
<view class="mr10">#{{item.tagName}}</view>
|
||||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -456,13 +508,39 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view class="product mtb20" v-if="userinfo.isShop == 1" @click="$refs.productRef.open()">
|
||||||
|
<view class="key">添加商品链接</view>
|
||||||
|
|
||||||
|
<view class="main mtb20 ptb20 tac br20" v-if="!form.productId">点击选择</view>
|
||||||
|
<view class="main df oh mtb20 plr30 br20" v-else>
|
||||||
|
<view class="df oh mtb20">
|
||||||
|
<view class="col oh df fdc jcsb f1 mr20">
|
||||||
|
<view class="name">{{form.productName}}</view>
|
||||||
|
<view class="price thd cFF9B27 f28">
|
||||||
|
<text class="price thd mr20">价格{{form.productPrice}}</text>
|
||||||
|
<text class="commission thd">佣金{{form.commission}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="wh200 fs0 c999 bfff br10">
|
||||||
|
<image class="br10" :src="form.productImage" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="second df jcr mtb20">
|
||||||
|
<view>需要在第</view>
|
||||||
|
<input type="text" v-model="form.popupTime" class="input" />
|
||||||
|
<view>秒展示</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
<view class="fill" style="height: 150rpx;"></view>
|
<view class="fill" style="height: 150rpx;"></view>
|
||||||
|
|
||||||
<view class="footer rows plr30 bfff shadow">
|
<view class="footer rows plr30 bfff shadow">
|
||||||
<view class="btn bar lg disabled w180" @click="handleSubmit(0)">存草稿</view>
|
<view class="btn bar lg disabled w180" @click="handleSubmit(0)">存草稿</view>
|
||||||
<view class="btn bar lg colourful f1 ml30" @click="handleSubmit(1)">发布作品</view>
|
<view class="btn bar lg colourful f1 ml30" @click="handleSubmit(1)">发布作品</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 话题列表 -->
|
<!-- 话题列表 -->
|
||||||
|
@ -475,9 +553,9 @@
|
||||||
<view class="selection">
|
<view class="selection">
|
||||||
<view class="option df aic" v-for="(item,index) in label.list" :key="index"
|
<view class="option df aic" v-for="(item,index) in label.list" :key="index"
|
||||||
@click="handleSelectLabel(item,index)" :class="{
|
@click="handleSelectLabel(item,index)" :class="{
|
||||||
active: labelSelect.map(node => node.id).includes(item.id)
|
active: labelSelect.map(node => node.tagId).includes(item.tagId)
|
||||||
}">
|
}">
|
||||||
<text class="thd f1">#{{item.name}}</text>
|
<text class="thd f1">#{{item.tagName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
@ -486,7 +564,7 @@
|
||||||
<!-- 结果 -->
|
<!-- 结果 -->
|
||||||
<view class="reult items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
<view class="reult items mt20 df fww c333 f28" v-if="labelSelect[0]">
|
||||||
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
<view class="item fmid mr20 mb20 plr20 bar" v-for="(item,index) in labelSelect" :key="index">
|
||||||
<view class="mr10">#{{item.name}}</view>
|
<view class="mr10">#{{item.tagName}}</view>
|
||||||
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
<uni-icons type="closeempty" size="28rpx" @click="handleLabelSelectDel(item,index)" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -534,6 +612,27 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-popup>
|
</uni-popup>
|
||||||
|
|
||||||
|
<!-- 发布的产品列表 -->
|
||||||
|
<uni-popup ref="productRef" type="bottom">
|
||||||
|
<view class="productAlt popBot bfff">
|
||||||
|
<view class="header ptb30 tac">我的商品展示</view>
|
||||||
|
<view class="listBox">
|
||||||
|
<scroll-view class="scroll" scroll-y="true" @scrolltolower="getMoreProductList">
|
||||||
|
<view class="item df aic mlr20 ptb20" v-for="(item,index) in product.list" :key="index"
|
||||||
|
@click="handleProduct(item)">
|
||||||
|
<view class="wh120">
|
||||||
|
<image class="br10" :src="item.sliderImage.split(',')[0]" mode="aspectFill" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="f1 t2hd ml20 c666 f30">
|
||||||
|
<text class="t2hd">{{item.name}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</scroll-view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -600,4 +699,26 @@
|
||||||
background-color: #F4F4F4;
|
background-color: #F4F4F4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 产品
|
||||||
|
.productAlt {
|
||||||
|
.scroll {
|
||||||
|
height: 800rpx;
|
||||||
|
|
||||||
|
.item+.item {
|
||||||
|
border-top: 2rpx solid #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 商家视频展示的秒数
|
||||||
|
.second {
|
||||||
|
|
||||||
|
.input {
|
||||||
|
width: 80rpx;
|
||||||
|
text-align: center;
|
||||||
|
flex: none;
|
||||||
|
border-bottom: 2rpx solid #111;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
|
@ -1,16 +1,79 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
// 商品管理
|
// 商品管理
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref
|
ref,
|
||||||
|
reactive,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import {
|
import {
|
||||||
onLoad,
|
onLoad,
|
||||||
onReachBottom
|
onReachBottom
|
||||||
} from "@dcloudio/uni-app"
|
} from "@dcloudio/uni-app"
|
||||||
|
|
||||||
//
|
// 顶部导航
|
||||||
import apex from "@/components/header/apex.vue"
|
import apex from "@/components/header/apex.vue"
|
||||||
|
// api
|
||||||
|
import api from '@/api/index.js'
|
||||||
|
// 工具库
|
||||||
|
import util from '@/common/js/util.js'
|
||||||
|
// 产品列表
|
||||||
|
const product = reactive({
|
||||||
|
list: [],
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
})
|
||||||
|
|
||||||
|
onLoad(() => {
|
||||||
|
// 获取列表
|
||||||
|
getList()
|
||||||
|
})
|
||||||
|
|
||||||
|
// 获取更多商品
|
||||||
|
function refeshList() {
|
||||||
|
if (product.list.length >= product.total) return
|
||||||
|
product.pageNum++
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取更多商品
|
||||||
|
function getMoreList() {
|
||||||
|
if (product.list.length >= product.total) return
|
||||||
|
product.pageNum++
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
// 请求列表
|
||||||
|
function getList() {
|
||||||
|
//
|
||||||
|
api.shop.getProductionListByUserId({
|
||||||
|
data: {
|
||||||
|
pageSize: product.pageSize,
|
||||||
|
pageNum: product.pageNum,
|
||||||
|
}
|
||||||
|
}).then(rs => {
|
||||||
|
if (rs.code === 200) {
|
||||||
|
if (product.pageNum == 1) product.list.length = 0
|
||||||
|
product.list.push(...rs.rows)
|
||||||
|
product.total = rs.total
|
||||||
|
return
|
||||||
|
}
|
||||||
|
util.alert({
|
||||||
|
content: rs.msg,
|
||||||
|
showCancel: false,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param {Object} item
|
||||||
|
*/
|
||||||
|
function handleEdit(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: util.setUrl('/pages/release/commodity',{
|
||||||
|
id: item.id
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -22,27 +85,26 @@
|
||||||
</apex>
|
</apex>
|
||||||
|
|
||||||
<view class="listBox oh">
|
<view class="listBox oh">
|
||||||
<view class="item oh mtb20 mlr20 plr20 bfff br20" v-for="(item,index) in 10" :key="index">
|
<view class="item oh mtb20 mlr20 plr20 bfff br20" v-for="(item,index) in product.list" :key="index">
|
||||||
<!-- 商品信息 -->
|
<!-- 商品信息 -->
|
||||||
<view class="product line df ptb20">
|
<view class="product line df ptb20">
|
||||||
<view class="poster wh160">
|
<view class="poster wh160">
|
||||||
<image class="wh160 br10"
|
<image class="wh160 br10" :src="item.sliderImage.split(',')[0]"
|
||||||
src="https://img13.360buyimg.com/n1/jfs/t1/117234/35/34799/82687/6449f2b4Fd6e2eef9/a754c5e178c9e9be.jpg.avif"
|
|
||||||
mode="aspectFill" />
|
mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="info df fdc jcsb f1 ml20">
|
<view class="info df fdc jcsb f1 ml20">
|
||||||
<view class="name t2hd c333 f28">靠枕 纯棉靠枕 车载居家 纯棉100% 卡通靠枕 人体工学</view>
|
<view class="name t2hd c333 f28">{{item.name}}</view>
|
||||||
|
|
||||||
<view class="count fs0 c999 f24">销量:0</view>
|
<view class="count fs0 c999 f24">销量:{{item.sales}}</view>
|
||||||
|
|
||||||
<view class="other df aic">
|
<view class="other df aic">
|
||||||
<view class="price f1 cFF9B27">
|
<view class="price f1 cFF9B27">
|
||||||
<text class="f30">价格:</text>
|
<text class="f30">价格:</text>
|
||||||
<text class="f20">¥</text>
|
<text class="f20">¥</text>
|
||||||
<text class="f30">89</text>
|
<text class="f30">{{item.price}}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="f1 c999 f24">库存:×1</view>
|
<!-- <view class="f1 c999 f24">库存:×1</view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -53,13 +115,13 @@
|
||||||
<view class="btn sm bar closeHollow plr30">改价</view>
|
<view class="btn sm bar closeHollow plr30">改价</view>
|
||||||
<!-- 在没有进行中的订单才能删除 -->
|
<!-- 在没有进行中的订单才能删除 -->
|
||||||
<!-- <view class="btn sm bar closeHollow plr30">删除</view> -->
|
<!-- <view class="btn sm bar closeHollow plr30">删除</view> -->
|
||||||
<view class="btn sm bar warmHollow plr30">编辑</view>
|
<view class="btn sm bar warmHollow plr30" @click="handleEdit(item)">编辑</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
//
|
//
|
||||||
</style>
|
</style>
|
|
@ -127,7 +127,8 @@
|
||||||
<view class="c333 f28">不想要了</view>
|
<view class="c333 f28">不想要了</view>
|
||||||
<view class="imgList mt10 c666 f24">
|
<view class="imgList mt10 c666 f24">
|
||||||
<template v-for="(item,index) in 3" :key="index">
|
<template v-for="(item,index) in 3" :key="index">
|
||||||
<image class="imgs wh80 br10" src="/static/logo.png" mode="aspectFill" />
|
<image class="imgs wh80 br10" src="/static/logo.png"
|
||||||
|
mode="aspectFill" />
|
||||||
</template>
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -153,6 +154,9 @@
|
||||||
</view>
|
</view>
|
||||||
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
|
<!-- <JyOrderCard v-for="(item, index) in 10" type="user_order"></JyOrderCard> -->
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 填充 -->
|
||||||
|
<view class="fill" style="height: 30rpx;"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue