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