This commit is contained in:
zmj 2024-05-06 18:19:27 +08:00
parent f84d98efd6
commit c104b03819
9 changed files with 101 additions and 99 deletions

View File

@ -1427,7 +1427,7 @@
"pages": [{ "pages": [{
"path": "list/index", "path": "list/index",
"style": { "style": {
"navigationBarTitleText": "商品管理13", "navigationBarTitleText": "商品管理",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"app-plus": { "app-plus": {
"scrollIndicator": false, // "scrollIndicator": false, //

View File

@ -186,70 +186,73 @@
<view class='money font-color'> <view class='money font-color'>
<text style="font-size:56rpx ;">{{storeInfo.price}}</text><text <text style="font-size:56rpx ;">{{storeInfo.price}}</text><text
style="font-size: 40rpx;color:#777777 ;">/</text> style="font-size: 40rpx;color:#777777 ;">/{{storeInfo.unit_name}}</text>
</view> </view>
<view class="" style="font-size:32rpx ;color:#444444 ;margin: 20rpx 0;"> <view class="" style="font-size:32rpx ;color:#444444 ;margin: 20rpx 0;">
{{storeInfo.store_name ? storeInfo.store_name : ''}} {{storeInfo.store_name ? storeInfo.store_name : ''}}
</view> </view>
</view> </view>
<view class="attribute"> <view class="attribute" v-if='product_attribute.leval'>
<view class="attribute-li" v-for="(item,index) in 10"> <view class="attribute-li">
<view class="" style="display: flex;flex-direction: column;align-items: center;"> <view class="" style="display: flex;flex-direction: column;align-items: center;">
<view class="" style="margin-bottom: 10rpx;"> <view class="" style="margin-bottom: 10rpx;">
书海性sdsd 等级
</view> </view>
<view class=""> <view class="">
阿萨德 {{product_attribute.leval}}
</view> </view>
</view> </view>
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx" <u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
color="#A1A1A1"></u-line> color="#A1A1A1"></u-line>
</view> </view>
<view class="attribute-fixed-right"> <view class="attribute-li">
<view class="" style="display: flex;flex-direction: column;align-items: center;">
<view class="" style="margin-bottom: 10rpx;">
产地
</view>
<view class="">
{{product_attribute.address.substring(0,3)}}
</view>
</view>
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
color="#A1A1A1"></u-line>
</view>
<view class="attribute-li">
<view class="" style="display: flex;flex-direction: column;align-items: center;">
<view class="" style="margin-bottom: 10rpx;">
包装
</view>
<view class="">
{{product_attribute.pack}}
</view>
</view>
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
color="#A1A1A1"></u-line>
</view>
<view class="attribute-li" v-for="item in product_attribute.attr">
<view class="" style="display: flex;flex-direction: column;align-items: center;">
<view class="" style="margin-bottom: 10rpx;">
{{item.label}}
</view>
<view class="">
{{item.value}}
</view>
</view>
<u-line direction="col" style="margin: 0 20rpx;" length="60rpx"
color="#A1A1A1"></u-line>
</view>
<view class="attribute-fixed-right" v-if="storeInfo.product_attribute.attr.length>5">
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
</view> </view>
</view> </view>
<!--
<view
v-if="storeInfo.product_type == 0 || storeInfo.product_type == 3 || storeInfo.product_type == 1"
class='wrapper '>
<view v-if="storeInfo.product_type != 1" class='share acea-row row-between row-bottom'
style="padding: 0;margin: 0;">
<view class='money font-color'>
<text class='num'>{{storeInfo.price}}</text>
</view>
<view class='iconfont icon-fenxiang' v-if="comForm != 'admin'"></view>
</view>
<view class='introduce line2'>
<text v-if="storeInfo.merchant.type_name"
class="font-bg-red">{{storeInfo.merchant.type_name}}</text>
<text v-else-if="storeInfo.merchant.is_trader"
class="font-bg-red bg">自营</text>{{storeInfo.store_name ? storeInfo.store_name : ''}}
</view>
<view class='label acea-row row-between-wrapper' style="padding-bottom: 10px">
<view v-if="storeInfo.product_type != 3">
原价:{{storeInfo.ot_price ? storeInfo.ot_price : ''}}</view>
<view>
库存:{{storeInfo.stock ? storeInfo.stock : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
</view>
<view>
销量:{{storeInfo.sales ? storeInfo.sales : 0}}{{storeInfo.unit_name ? storeInfo.unit_name : ''}}
</view>
</view>
</view> -->
<view class='card'> <view class='card'>
<view style="display: flex;justify-content: space-between;" @click="selecAttr"> <view style="display: flex;justify-content: space-between;" @click="selecAttr">
<view class="">{{attrTxt}} <view class="">{{attrTxt}}
<text class='atterTxt'>{{attrValue}}</text> <text class='atterTxt'>{{attrValue}}</text>
</view> </view>
<view class=""> <view class="">
1 1{{storeInfo.unit_name}}
<text class='iconfont icon-jiantou'></text> <text class='iconfont icon-jiantou'></text>
</view> </view>
</view> </view>
@ -261,13 +264,6 @@
<view class='iconfont icon-jiantou'></view> <view class='iconfont icon-jiantou'></view>
</view> </view>
</view> </view>
<!--运费-->
<!-- <view class='attribute acea-row row-between-wrapper card' @click="showShip">
<view class="acea-row row-between-wrapper">运费
<text class='atterTxt'>{{shippingValue}}</text>
</view>
<view class='iconfont icon-jiantou'></view>
</view> -->
<!--保障--> <!--保障-->
<view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper' <view v-if="guarantee && guarantee.length" class='attribute acea-row row-between-wrapper'
@click="showGuaranee"> @click="showGuaranee">
@ -491,7 +487,8 @@
itemNew: [], itemNew: [],
indicatorDots: false, indicatorDots: false,
preview_key: '', preview_key: '',
comForm: '' // admin comForm: '', // admin
product_attribute: {}
}; };
}, },
computed: configMap(['hide_mer_status'], mapGetters(['isLogin', 'uid'])), computed: configMap(['hide_mer_status'], mapGetters(['isLogin', 'uid'])),
@ -691,8 +688,6 @@
} }
that.$set(that, 'storeInfo', storeInfo); that.$set(that, 'storeInfo', storeInfo);
that.$set(that, 'description', storeInfo.content); that.$set(that, 'description', storeInfo.content);
// that.description
console.log(that.description, 'sd')
if (typeof that.description.content == 'string') { if (typeof that.description.content == 'string') {
try { try {
that.description.content = JSON.parse(that.description.content); that.description.content = JSON.parse(that.description.content);
@ -758,6 +753,7 @@
getPreviewProDetail(params).then(res => { getPreviewProDetail(params).then(res => {
uni.hideLoading(); uni.hideLoading();
let storeInfo = res.data; let storeInfo = res.data;
this.product_attribute = res.data.product_attribute
if (storeInfo.video_link && storeInfo.slider_image.length > 1) { if (storeInfo.video_link && storeInfo.slider_image.length > 1) {
this.videoCoverImg = storeInfo.slider_image[0] this.videoCoverImg = storeInfo.slider_image[0]
storeInfo.slider_image.splice(0, 1) storeInfo.slider_image.splice(0, 1)

View File

@ -862,7 +862,7 @@
uni.$on('diverIndexSubEmit', () => { uni.$on('diverIndexSubEmit', () => {
this.subNVue.hide() this.subNVue.hide()
uni.navigateTo({ uni.navigateTo({
url: '/pages/product/list/index?diver=1' url: '/pages/product/list/index'
}) })
}) })

View File

@ -229,7 +229,7 @@
.next-btn { .next-btn {
position: absolute; position: absolute;
bottom: 100rpx; bottom: 100px;
left: 375rpx; left: 375rpx;
transform: translateX(-50%); transform: translateX(-50%);
width: 240rpx; width: 240rpx;

View File

@ -440,17 +440,15 @@
if (this.import == 1) { if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id); uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack(); uni.navigateBack();
} else uni.redirectTo({ } else {
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6` uni.navigateBack();
}) }
}).catch(() => { }).catch(() => {
uni.redirectTo({ uni.navigateBack();
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=2`
})
}) })
}) })
.catch(rej => { .catch(rej => {
// Toast(rej); Toast(rej);
}); });
}, },
async submit() { async submit() {

View File

@ -686,9 +686,11 @@
if (this.import == 1) { if (this.import == 1) {
uni.$emit('importAttrValueOK', this.setFormData.import_id); uni.$emit('importAttrValueOK', this.setFormData.import_id);
uni.navigateBack(); uni.navigateBack();
} else uni.redirectTo({ } else {
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${that.mer_id}&type=6` url: `/pages/product/list/index?mer_id=${that.mer_id}&type=6`
}) })
}
}).catch(() => { }).catch(() => {
uni.navigateBack() uni.navigateBack()
}) })
@ -704,9 +706,11 @@
uni.redirectTo({ uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6` url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
}) })
} else uni.redirectTo({ } else {
uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6` url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
}) })
}
}).catch(() => { }).catch(() => {
uni.redirectTo({ uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6` url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`

View File

@ -9,8 +9,7 @@
<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">
:style="{height:[1,7].includes(where.type) ?'410rpx':'336rpx'}">
<view class="card-top"> <view class="card-top">
<view class="" style="width: 196rpx;height: 196rpx;position: relative;margin-right: 20rpx;"> <view class="" style="width: 196rpx;height: 196rpx;position: relative;margin-right: 20rpx;">
<u--image :src="item.image" width='196rpx' height='196rpx' duration="450"></u--image> <u--image :src="item.image" width='196rpx' height='196rpx' duration="450"></u--image>
@ -43,35 +42,32 @@
<view class="" style="padding:10rpx 20rpx 20rpx; 20rpx"> <view class="" style="padding:10rpx 20rpx 20rpx; 20rpx">
<u-line color="#CECECE" style="margin: 0rpx 0 0px 0"></u-line> <u-line color="#CECECE" style="margin: 0rpx 0 0px 0"></u-line>
</view> </view>
<view style="display: flex;justify-content: space-between;font-size: 28rpx;font-size: 28rpx;">
<view class="" <view style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
style="display: flex;justify-content: space-between;font-size: 28rpx;font-size: 28rpx;">
<view class="" style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="showOverly=true,xjItem=item" @click="showOverly=true,xjItem=item"
v-if='where.type==6||where.type==5||where.type==7||where.type==2'> v-if='where.type==6||where.type==5||where.type==7||where.type==2'>
删除 删除
</view> </view>
<view class="" v-if="where.type==2" <view v-if="where.type==2"
style="border-right: 1px solid #CECECE;flex: 1;text-align: center;" style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="Fline(item)"> @click="Fline(item)">
修改库存 修改库存
</view> </view>
<view class="" v-else style="border-right: 1px solid #CECECE;flex: 1;text-align: center;" <view v-else style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="Fline(item)"> @click="Fline(item)">
修改库存 修改库存
</view> </view>
<view v-if=' where.type==1||where.type==3'
<view class="" v-if=' xjList.includes(where.type) '
style="border-right: 1px solid #CECECE;flex: 1;text-align: center;" style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="showOverly=true,xjItem=item"> @click="showOverly=true,xjItem=item">
下架 下架
</view> </view>
<view class="" v-if='sjList.includes(where.type)' <view v-if='sjList.includes(where.type)'
style="border-right: 1px solid #CECECE;flex: 1;text-align: center;" style="border-right: 1px solid #CECECE;flex: 1;text-align: center;"
@click="handleShelves(item,1)"> @click="handleShelves(item,1)">
上架 上架
</view> </view>
<view class="" style="flex: 1;text-align: center;" @click="editGoods(item)"> <view style="flex: 1;text-align: center;" @click="editGoods(item)">
编辑商品 编辑商品
</view> </view>
@ -347,7 +343,9 @@
this.getList(this.mer_id, false); this.getList(this.mer_id, false);
}, },
onShow() { onShow() {
if (!this.newUser) return let userInfo = JSON.parse(uni.getStorageSync('USER_INFO'))
isNewMer(userInfo.uid, userInfo.service?.mer_id).then(res => {
if (res.data == 'true') {
let that = this let that = this
setTimeout(() => { setTimeout(() => {
const query = uni.createSelectorQuery().in(this); const query = uni.createSelectorQuery().in(this);
@ -363,6 +361,9 @@
}) })
.exec(); .exec();
}, 500) }, 500)
}
})
}, },
methods: { methods: {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="" style="width: 750rpx;height: 100%;"> <view class="" style="width: 750rpx;height: 100%;">
<view class="jump" @click="jump"> <view class="jump" @click="next">
<text class="font">跳过 </text> <text class="font">跳过 </text>
</view> </view>
<view class="target" :style="{left:left+'px',top:top+'px'}" v-if="top"> <view class="target" :style="{left:left+'px',top:top+'px'}" v-if="top">

View File

@ -64,7 +64,7 @@
</view> </view>
</view> --> </view> -->
<view style="height: 150rpx;"></view> <view style="height: 150rpx;"></view>
<!-- <view class="btn-view"> <!-- <view class="btn-view">f
<button class="btn" @click="show=true">确认修改</button> <button class="btn" @click="show=true">确认修改</button>
</view> --> </view> -->
<view class="submit-btn"> <view class="submit-btn">
@ -147,10 +147,13 @@
this.show = false; this.show = false;
this.$nextTick(() => { this.$nextTick(() => {
Toast('更新成功'); Toast('更新成功');
setTimeout(() => {
uni.navigateBack()
}, 2000)
}) })
uni.redirectTo({ // uni.redirectTo({
url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6` // url: `/pages/product/list/index?mer_id=${this.mer_id}&type=6`
}) // })
// uni.navigateBack({ // uni.navigateBack({
// success: () => { // success: () => {
// let stock = 0; // let stock = 0;