Merge pull request '新增商品位置移动' (#1) from main into prod

Reviewed-on: jia/shop-applet#1
This commit is contained in:
weipengfei 2023-11-04 17:29:18 +08:00
commit 4cba438873
2 changed files with 34 additions and 16 deletions

View File

@ -196,7 +196,9 @@
} from '@/api/api.js'
import {
chooseImage,
Toast
Toast,
getStorage,
navigateTo
} from '@/libs/uniApi'
export default {
data() {
@ -215,12 +217,12 @@
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
src: '/static/images/SMRK/bar.png'
},
// {
// name: '',
// type: 3,
// // src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
// src: '/static/images/SMRK/img.png'
// }
{
name: '非标手动入库',
type: 3,
// src: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/saoma.png'
src: '/static/images/SMRK/img.png'
}
],
shadowStyle: {
backgroundImage: "none",
@ -551,8 +553,9 @@
this.scanCode();
this.pageType = 1;
}else {
this.photograph();
this.pageType = 2;
// this.photograph();
// this.pageType = 2;
this.jumpAddGoods();
}
},
//
@ -645,7 +648,23 @@
this.showModel = false;
}
})
}
},
//
jumpAddGoods() {
const data = getStorage('addGoodsFormData');
if (data && data.product_id) {
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'];
waitDeleteData.forEach(item => {
if (getStorage(item)) {
removeStorage(item);
}
})
}
navigateTo(1, '/pages/product/addGoods/index', {
mer_id: this.mer_id
});
},
},
onPullDownRefresh() {
uni.stopPullDownRefresh()
@ -688,8 +707,8 @@
}
.select_item {
// width: 220.84rpx;
width: 336rpx;
width: 220.84rpx;
// width: 336rpx;
height: 189.47rpx;
border-radius: 8px;
background-color: #eee;

View File

@ -9,11 +9,11 @@
<block>
<swiper-item :class="{ active: 0 == swiperCur }">
<view class="slide-navigator">
<view class="item" hover-class='none' @click="jumpAddGoods">
<!-- <view class="item" hover-class='none' @click="jumpAddGoods">
<image mode='widthFix' class="image" src="../static/images/product_add.png">
</image>
<text class="text">添加商品</text>
</view>
</view> -->
<navigator class="item"
:url="`/pages/product/goodsOnSale/index?mer_id=${mer_id}&type=1`"
hover-class='none'>
@ -481,8 +481,7 @@
const data = getStorage('addGoodsFormData');
if (data && data.product_id) {
let waitDeleteData = ['addGoodsFormData', 'singleSpecification', 'attrValue', 'modifyPriceData',
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'
];
'addGoodsSecoundData', 'goodsDis', 'editGoodsDetils'];
waitDeleteData.forEach(item => {
if (getStorage(item)) {
removeStorage(item);