!81 2022-1-22 Leung

Merge pull request !81 from Admin/sit-Leung
This commit is contained in:
Admin 2022-01-22 13:52:42 +00:00 committed by Gitee
commit cac6711624
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
7 changed files with 45 additions and 31 deletions

View File

@ -88,13 +88,13 @@ export default {
message: "手机号码输入有误",
});
return;
} else if (this.alladdress === "") {
} else if (!this.alladdress || this.alladdress === "") {
this.$message({
type: "warning",
message: "请输入详细地址",
});
return;
} else if (this.userpeople === "") {
} else if (!this.userpeople || this.userpeople === "") {
this.$message({
type: "warning",
message: "请输入姓名",

View File

@ -169,7 +169,7 @@ export default {
break;
case 1:
//Checking City
if(obj.id.indexOf(provinceId)<0)
if(obj.id.toString().indexOf(provinceId)<0)
{
console.log('500 : error via checking validatePickedValues');
_self.returnValueArr.splice(index,1);
@ -183,7 +183,7 @@ export default {
break;
case 2:
//Checking Area
if(areaId && obj.id.indexOf(areaId)<0)
if(areaId && obj.id.toString().indexOf(areaId)<0)
{
console.log('501 : error via checking validatePickedValues');
_self.returnValueArr.splice(index,1);
@ -226,7 +226,7 @@ export default {
stringStartWith=stringStartWith+"-";
let result=[];
dataColArea.forEach(function(ele){
if(ele.id.indexOf(stringStartWith)===0)
if(ele.id.toString().indexOf(stringStartWith)===0)
{
result.push(ele);
}
@ -462,6 +462,9 @@ export default {
padding-bottom:.25rem;
background:url("../assets/image/ico-location.png") no-repeat 98% center;
background-size:16px;
position:relative;
top:.5rem;
padding-left:.875rem;
}
.ts-area-picker-mobile{
display:flex;
@ -485,7 +488,7 @@ export default {
display:none;
}
.ts-area-picker-container,.ts-area-picker-value-displayer{
width:42.5rem;
width:42.25rem;
}
.ts-area-picker-value-displayer{
padding-left:1rem;

View File

@ -44,7 +44,7 @@
<a class="rc-xl-up rc-btn rc-btn--icon rc-icon ts-login--xs rc-iconography rc-interactive" aria-label="login" @click="turnlogin">
<span class="rc-screen-reader-text">
登录
个人中心
</span>
<em class="rc-screen-reader" v-show="loginornot"></em>
</a>
@ -306,7 +306,7 @@
<li class="rc-list__item">
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" href="javascript:void();" @click="turnlogin">
个人中心
<em class="rc-screen-reader"></em>
<em class="rc-screen-reader" v-if="loginornot"></em>
</a>
</li>
<li class="rc-list__item">
@ -362,9 +362,9 @@ export default {
let usernot=this.$store.state.userInfo;
//console.log(usernot);
if(usernot){
this.loginornot=true
}else{
this.loginornot=false
}else{
this.loginornot=true
this.usermessage=usernot;
}
if(isInitialized)
@ -402,14 +402,16 @@ export default {
},
//
turnlogin(){
if(this.usermessage==null||this.usermessage==undefined){
this.$router.push({ name: "userlogin-login",
params:{id:12,key:'222'}
})
let userInfo = this.$store.state.userInfo;
if(!userInfo){
this.$router.push({
name: "userlogin-login",
params:{}
})
}else{
this.$router.push({ name: "personal-mypersonal",
})
this.$router.push({
name: "personal-mypersonal",
})
}
}

View File

@ -155,8 +155,6 @@ ul li ol li em strong i {
span {
display: block;
margin-left: 3px;
}
i {

View File

@ -40,7 +40,7 @@
</div>
</div>
</div>
<div class="rc_contline">1</div>
<div class="rc_contline"></div>
<div class="rc-main" v-for="(item, index) in goldmedal" :key="index">
<div class="rc-usermain">
<div class="rc-image">

View File

@ -135,7 +135,7 @@
<i class="ts-row-title">商品规格</i>
</div>
<div class="ts-tag-list">
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[activeIndexa==index?'active':'unactive',item.leftAllotment?'':'disabled']">
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[activeIndexa==index?'active':'unactive',item.leftAllotment>0?'':'disabled']">
{{ item.specifications }}
</em>
</div>
@ -218,7 +218,7 @@
<img :src="userimage" alt="" />
<div class="rc-contair">
<div class="rc-left">
<div>
<div v-if="item.couponAmount">
<i></i><span>{{ item.couponAmount }}</span>
</div>
</div>
@ -313,13 +313,13 @@ export default {
let data = await goodsmessage(singleCode);
if (data && data.data.length>0) {
newlist.push(data.data[0]);
if(data.data[0].leftAllotment && !stopLeftAllotmentChecking) {
if(data.data[0].leftAllotment>0 && !stopLeftAllotmentChecking) {
activeIndexa = stopIndex;
curItem = data.data[0];
stopLeftAllotmentChecking=true;
}
stopIndex++;
}
stopIndex++;
}
productAttachmentList = newlist[0].productAttachmentList;
userbuy = true;
@ -452,11 +452,14 @@ export default {
//
async getconf(memberId, couponId) {
let data = await getConfig(memberId, couponId);
let msg = '领取成功';
if (data) {
this.$message({
type: "warning",
message: data.msg,
});
if(data.code!='0')
msg = data.msg;
this.$message({
type: "warning",
message: msg,
});
}
},
@ -535,7 +538,14 @@ export default {
},
plus(num, index) {
this.sales_num = parseInt(this.sales_num) + 1;
if(this.sales_num >= this.curItem.leftAllotment) {
this.$message({
type: "warning",
message: '已达到本品最大购买上限',
});
} else {
this.sales_num = parseInt(this.sales_num) + 1;
}
},
//
sub(num, index) {
@ -551,7 +561,7 @@ export default {
// let mobile=JSON.parse(location.getItem('userInfo'));
// console.log(userid,mobile);
let data = await postCourseId(
this.productCode,
item.productCode,
this.sales_num,
this.usermessage.data.id,
this.usermessage.data.mobile,
@ -614,7 +624,7 @@ export default {
}
},
selectsearch(item, index) {
if(!item.leftAllotment)
if(!item.leftAllotment || item.leftAllotment<=0)
return;
this.activeIndexa = index;
this.curItem = item;

View File

@ -104,6 +104,7 @@
<div class="rc-max-width--xl rc-margin-bottom--lg">
<div class="usersearch">
<div class="rc-contair">
<div class="ts-no-data" v-if="!rccontair.length">暂未发现相关记录</div>
<ul class="ts-product-list">
<li
v-for="(item, index) in rccontair"