tianyi 1 month ago
parent
commit
802ce78def
  1. 34
      pages/shop/addGoods.vue

34
pages/shop/addGoods.vue

@ -31,9 +31,8 @@
<input type="digit" class="content-input" v-model="formData.orderFiled" placeholder="请输入排名">
</uni-forms-item>
<uni-forms-item label="商品分类" name="editTitle">
<view style="border: 4rpx solid #eee;display: flex;flex: 1;border-radius: 10rpx;">
<input type="text" placeholder="请选择商品分类" disabled v-model="typeItem.categoryName"
class="content-input" @tap="goGategoryLow" style="border: 0;">
<view @click="goGategoryLow" style="height:70rpx;border: 4rpx solid #eee;display: flex;flex: 1;border-radius: 10rpx;">
<text class="content-input" style="height:70rpx;border: 0;">{{typeItem.categoryName}}</text>
<uni-icons type="right" size="16"
style="margin-left: 40rpx;line-height: 70rpx;"></uni-icons>
</view>
@ -117,7 +116,6 @@
<uni-forms-item label="详细图文" name="startPayNum">
<view class="xiangxi-box">
<sp-editor
:keys="keys"
@init="initEditor"
@input="inputOver"
@upinImage="upinImage"
@ -168,7 +166,7 @@
</template>
<script>
import SpEditor from '@/package2/components/sp-editor/components/sp-editor/sp-editor.vue'
import SpEditor from '@/pages/sp-editor/components/sp-editor/sp-editor.vue'
export default {
components: {
@ -239,18 +237,7 @@
onShow() {
this.attrId = uni.getStorageSync('attrId');
this.shopMerchantType = uni.getStorageSync('shopMerchantType');
uni.authorize({
scope: 'scope.writePhotosAlbum',
success() {
},
fail() {
uni.showToast({
title: "您未授权,图片上传功能可能会出现错误",
icon: 'none'
})
}
})
if (this.hasSelectedTypeItem(this.typeItem)) {
this.typeItem = JSON.parse(JSON.stringify(this.typeItem))
this.formData.categoryId = this.typeItem.id
@ -386,22 +373,19 @@
//
goGategoryLow() {
uni.navigateTo({
url: '/package2/myCenter/addType'
url: '/pages/shop/addType'
})
},
//
getGategoryList() {
this.NB.sendRequest("/auth/getShopByUser", {
this.NB.sendRequest("/app/productCategory/list", {
shopId:uni.getStorageSync('shopId')
}, false, 'get', 'application/x-www-form-urlencoded').then((res) => {
if (res.code == 200) {
this.productCategoryList = Array.isArray(res.result) ? res.result : []
this.syncSelectedCategory()
} else {
uni.showToast({
title: res.message,
icon: 'none'
})
this.tui.toast(res.message)
}
})
},
@ -941,7 +925,7 @@
goAttributeList(){
this.$refs.addTypeDialog.close()
uni.navigateTo({
url: '/package2/myCenter/attributeList?from=addGoods'
url: '/pages/shop/attributeList?from=addGoods'
})
},
async upLoadFile(path) {
@ -1012,9 +996,7 @@
}
.back-btn {
position: absolute;
bottom: 0;
left: 0;
padding-top: 110rpx;
}
.title-name {

Loading…
Cancel
Save