商品管理 登录界面 等修改
This commit is contained in:
parent
eaab87688a
commit
d0257b52be
|
@ -287,11 +287,11 @@
|
|||
v-html="description.content.replace(/<br\/>/ig, '')"></view>
|
||||
<!-- #endif -->
|
||||
<view v-else class="product_content">
|
||||
<view v-if="description.content && description.content.title" class="title">
|
||||
<view v-if="description.content && description.content.title" class="product_content_title">
|
||||
{{description.content.title}}
|
||||
</view>
|
||||
<view v-if="description.content && description.content.image" class="pictures">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item">
|
||||
<view v-if="description.content && description.content.image" class="pictures" style="background-color: #fff;">
|
||||
<image v-for="(item,index) in description.content.image" :key="index" :src="item" mode="aspectFit">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -704,11 +704,6 @@
|
|||
that.getConfig();
|
||||
uni.hideLoading();
|
||||
},
|
||||
|
||||
onHide() {
|
||||
|
||||
this.CartCount = 0
|
||||
},
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
|
@ -2525,4 +2520,20 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.product_content{
|
||||
background-color: #fff;
|
||||
&_title{
|
||||
width: 100%;
|
||||
height: auto;
|
||||
line-height: 50rpx;
|
||||
padding: 28rpx;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
}
|
||||
image{
|
||||
width: 750rpx;
|
||||
height: 750rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -63,7 +63,7 @@
|
|||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,'商品管理')">
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index7.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
|
@ -167,7 +167,7 @@
|
|||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,'客服记录')">
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index6.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
|
@ -185,7 +185,7 @@
|
|||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,'商品管理')">
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index7.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
|
@ -287,7 +287,7 @@
|
|||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,'客服记录')">
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index6.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
|
@ -354,7 +354,7 @@
|
|||
</view>
|
||||
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,'客服记录')">
|
||||
@click="navigator(`/pages/chat/customer_list/index?type=1&mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index6.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">客服记录</text>
|
||||
|
@ -372,7 +372,7 @@
|
|||
<text class="text">订单管理</text>
|
||||
</view>
|
||||
<view class="examine"
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,'商品管理')">
|
||||
@click="navigator(`/pages/product/list/index?mer_id=${mer_id}`,2)">
|
||||
<image class="icon_img" src="@/static/images/index7.png" mode="aspectFit">
|
||||
</image>
|
||||
<text class="text">商品管理</text>
|
||||
|
@ -902,7 +902,7 @@
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (t == '商品管理') {
|
||||
if (t == 2) {
|
||||
uni.switchTab({
|
||||
url: url
|
||||
})
|
||||
|
|
|
@ -224,7 +224,7 @@
|
|||
if (this.product_id) {
|
||||
// editGoodsDetils = getStorage('editGoodsDetils');
|
||||
editGoodsDetils = this.$store.state.storage.storage;
|
||||
console.log(editGoodsDetils);
|
||||
// console.log('ss',editGoodsDetils.content);
|
||||
// editGoodsDetils = getStorage('editGoodsDetils');
|
||||
// console.log('初始化商品详情',editGoodsDetils);
|
||||
Object.keys(this.addGoodsSecoundData).forEach(item => {
|
||||
|
|
|
@ -437,6 +437,8 @@
|
|||
// this.getDeliveryType();
|
||||
if (this.product_id) {
|
||||
this.initDataEditData();
|
||||
}else {
|
||||
setStorage('editCommodity',{});
|
||||
}
|
||||
},
|
||||
onBackPress() {
|
||||
|
@ -584,6 +586,7 @@
|
|||
}
|
||||
productDetail(this.merId, this.product_id).then(res => {
|
||||
setStorage('editGoodsDetils', res.data);
|
||||
if(res.data.content_arr) res.data.content = res.data.content_arr;
|
||||
this.$store.commit('setStorage', res.data);
|
||||
let editGoodsDetils = res.data;
|
||||
Object.keys(this.setFormData).forEach(item => {
|
||||
|
@ -627,7 +630,6 @@
|
|||
let that = this;
|
||||
that.$util.uploadImageOne('upload/image', function(res) {
|
||||
that.setFormData.imageList.push(res.data.path);
|
||||
|
||||
});
|
||||
},
|
||||
clk() {
|
||||
|
|
|
@ -264,15 +264,15 @@
|
|||
postData[key]=info[key];
|
||||
})
|
||||
postData.stock = postData.attrValue[0].stock;
|
||||
console.log(postData);
|
||||
if(postData.store_name.trim().length<=0)return Toast('请输入商品名称');
|
||||
if(postData.imageList.length<=0)return Toast('请上传商品图片');
|
||||
if(postData.cate_name.trim().length<=0)return Toast('请选择平台分类');
|
||||
if(postData.unit_name.trim().length<=0)return Toast('请输入商品单位');
|
||||
// console.log(postData);
|
||||
if(!postData.store_name||postData.store_name?.trim().length<=0)return Toast('请输入商品名称');
|
||||
if(!postData.imageList||postData.imageList.length<=0)return Toast('请上传商品图片');
|
||||
if(postData.cate_name?.trim().length<=0)return Toast('请选择平台分类');
|
||||
if(postData.unit_name?.trim().length<=0)return Toast('请输入商品单位');
|
||||
if(!postData.attrValue[0].price||postData.attrValue[0].price<0)return Toast('价格不能小于0');
|
||||
if(!postData.stock||postData.stock<0)return Toast('库存不能小于0');
|
||||
if(postData.content.title.trim().length<=0)return Toast('请输入商品详情');
|
||||
if(postData.content.image.length<=0)return Toast('请上传商品图片');
|
||||
if(!postData.content.title||postData.content.title?.trim().length<=0)return Toast('请输入商品详情');
|
||||
if(!postData.content.image||postData.content.image?.length<=0)return Toast('请上传商品图片');
|
||||
// return Toast('通过');
|
||||
if (getStorage('addGoodsFormData').spec_type == 0) {
|
||||
// postData.attr = [getStorage('singleSpecification')];
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<view class="input_content">
|
||||
<view class="input_content_textarea">
|
||||
<textarea v-model="prodectContent.store_name" placeholder="请输入简介" placeholder-class="placeholderStyle"
|
||||
<textarea v-model="prodectContent.store_name" placeholder="请输入商品详情" placeholder-class="placeholderStyle"
|
||||
:maxlength="maxLength" />
|
||||
<view><text v-if="prodectContent.store_name">{{prodectContent.store_name.length}}</text><text
|
||||
v-else>0</text>/{{maxLength}}</view>
|
||||
|
@ -31,7 +31,8 @@
|
|||
<text v-else>0</text>/200
|
||||
</view>
|
||||
</view>
|
||||
<view class="input_content_describe_textarea"><textarea v-model="prodectContent.store_info" value=""
|
||||
<view class="input_content_describe_textarea">
|
||||
<textarea v-model="prodectContent.store_info" value=""
|
||||
placeholder="请填写商品简介" placeholderClass="placeholderClass" maxlength="200" /></view>
|
||||
</view>
|
||||
|
||||
|
@ -40,7 +41,7 @@
|
|||
<view class="input_content_keyword_value"><input v-model="prodectContent.keyword" type="text" value=""
|
||||
placeholder="填写关键字" /></view>
|
||||
</view>
|
||||
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||
<avatar style="height: 1px;" @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||
</avatar>
|
||||
</view>
|
||||
</template>
|
||||
|
@ -110,7 +111,7 @@
|
|||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
// console.log(this.$props.prodectContent);
|
||||
},
|
||||
methods: {
|
||||
handleChooseImage() {
|
||||
|
@ -142,10 +143,11 @@
|
|||
[TOKENNAME]: 'Bearer ' + store.state.app.token
|
||||
},
|
||||
success: (uploadFileRes) => {
|
||||
// console.log(uploadFileRes.data);
|
||||
// console.log(JSON.parse(uploadFileRes.data));
|
||||
let imgData = JSON.parse(uploadFileRes.data)
|
||||
// that.prodectContent.imageList.push(imgData.data.path)
|
||||
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore}
|
||||
if(!that.prodectContent.imageList)that.prodectContent.imageList=[];
|
||||
that.prodectContent = { imageList: [...that.prodectContent.imageList, imgData.data.path] ,store_name:this.upstore};
|
||||
},
|
||||
complete(res) {
|
||||
// console.log(res)
|
||||
|
|
|
@ -47,11 +47,13 @@
|
|||
v-model="account" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
v-model="captcha" />
|
||||
|
||||
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
v-model="captcha" maxlength="4" />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
|
||||
@click="handleVerify">
|
||||
{{ text }}
|
||||
|
@ -61,8 +63,8 @@
|
|||
<div class="item" v-if="isShowCode">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
v-model="codeVal" />
|
||||
<input type="number" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
v-model="codeVal" maxlength="4" />
|
||||
<div class="code" @click="getcaptcha">
|
||||
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
|
||||
</div>
|
||||
|
@ -95,8 +97,9 @@
|
|||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
<input type="number" placeholder="填写验证码" maxLength='4' placeholder-class="placeholder" class="codeIput"
|
||||
v-model="captcha" />
|
||||
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''"
|
||||
@click="handleVerify">
|
||||
{{ text }}
|
||||
|
@ -110,10 +113,11 @@
|
|||
v-model="password" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item" v-if="isShowCode">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" placeholder-class="placeholder" class="codeIput"
|
||||
<input type="number" placeholder="填写验证码" maxlength="4" placeholder-class="placeholder" class="codeIput"
|
||||
v-model="codeVal" />
|
||||
<div class="code" @click="getcaptcha">
|
||||
<image class="code-img" style="width: 100%;height: 100%;" :src="codeUrl" />
|
||||
|
@ -156,9 +160,11 @@
|
|||
<input type='number' placeholder='填写手机号码' placeholder-class='placeholder'
|
||||
v-model="account"></input>
|
||||
</view>
|
||||
|
||||
<view class="item acea-row row-between-wrapper">
|
||||
<input type='number' placeholder='填写验证码' placeholder-class='placeholder' class="codeIput"
|
||||
<input type='number' placeholder='填写验证码' maxlength="4" placeholder-class='placeholder' class="codeIput"
|
||||
v-model="captcha"></input>
|
||||
|
||||
<button class="code" :class="disabled === true ? 'on' : ''" :disabled='disabled'
|
||||
@click="handleVerify">
|
||||
{{ text }}
|
||||
|
@ -892,7 +898,9 @@
|
|||
// #ifdef APP-PLUS
|
||||
jpushModule.initJPushService()
|
||||
jpushModule.getRegistrationID(result => {
|
||||
|
||||
if (result.registerID) {
|
||||
|
||||
bindJG({
|
||||
phone: this.account,
|
||||
jg_register_id: result.registerID
|
||||
|
|
Loading…
Reference in New Issue