Commit 08fab624 authored by ly's avatar ly

修改bug

parent 7d23f0c2
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
"appid" : "__UNI__DE04B13", "appid" : "__UNI__DE04B13",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : 106, "versionCode" : 107,
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
......
...@@ -11,13 +11,13 @@ ...@@ -11,13 +11,13 @@
<view class='i-line' v-if=" IndexList&& IndexList.length>0"> <view class='i-line' v-if=" IndexList&& IndexList.length>0">
<view class="line-item" v-for="item in IndexList" :key="item.id"> <view class="line-item" v-for="item in IndexList" :key="item.id">
<view class='item-des'>{{item.content}}</view> <view class='item-des'>{{item.content}}</view>
<view class='item-time'>{{item.gmtCreated}}</view> <view class='item-time'>{{item.gmtModified}}</view>
</view> </view>
</view> </view>
<view v-else class="i-lins-null"> <view v-else class="i-lins-null">
暂时还没有数据哦,点击我要发布去发布一条吧 暂时还没有数据哦
</view> </view>
</scroll-view> </scroll-view>
<view class='my-n-footer'> <view class='my-n-footer'>
......
...@@ -20,13 +20,13 @@ ...@@ -20,13 +20,13 @@
<label class='l-text'>物品名称</label> <label class='l-text'>物品名称</label>
</view> </view>
<view class="line-r"> <view class="line-r">
<input class='r-val' @input="changeName($event)" placeholder-style="color:#9E9E9E" :value='categoryName' placeholder="请输入物品名称"/> <input class='r-val' @input="changeName($event)" maxlength="10" placeholder-style="color:#9E9E9E" :value='categoryName' placeholder="请输入物品名称"/>
</view> </view>
</view> </view>
<view class='cate-des'> <view class='cate-des'>
<view class='des-name'>物品描述</view> <view class='des-name'>物品描述</view>
<textarea class='des-contain' @input="desVal($event)" placeholder="请补充商品品牌、型号、购买渠道、购买时间、入手价格(如有),有助于更快完成鉴定"></textarea> <textarea class='des-contain' @input="desVal($event)" maxlength="100" placeholder="请补充商品品牌、型号、购买渠道、购买时间、入手价格(如有),有助于更快完成鉴定"></textarea>
</view> </view>
<view class='cate-upload'> <view class='cate-upload'>
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
return false return false
} }
if(self.categoryName.length>10){ if(self.categoryName.length>10){
this.toast('不能超过10个字') self.toast('不能超过10个字')
return false return false
} }
if(self.desQuest==''){ if(self.desQuest==''){
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
return false return false
} }
if(self.desQuest.length>100){ if(self.desQuest.length>100){
this.toast('不能超过100个字') self.toast('不能超过100个字')
return false return false
} }
if(self.newList.length==0){ if(self.newList.length==0){
...@@ -214,6 +214,7 @@ ...@@ -214,6 +214,7 @@
console.log(e.detail.value.length) console.log(e.detail.value.length)
if(e.detail.value.length>10){ if(e.detail.value.length>10){
this.toast('不能超过10个字') this.toast('不能超过10个字')
// this.categoryName=
return false return false
}else{ }else{
this.categoryName= e.detail.value this.categoryName= e.detail.value
......
No preview for this file type
.in-pages{ .in-pages{
width: 100%; width: 100%;
height: 100vh; height: 100vh;
min-height: 1624rpx; // min-height: 1624rpx;
background: #F7FAFF; background: #F7FAFF;
.in-header{ .in-header{
height: 605rpx; height: 605rpx;
...@@ -264,8 +264,8 @@ ...@@ -264,8 +264,8 @@
.in-footer{ .in-footer{
// height: 400rpx; // height: 400rpx;
.box-at-home{ .box-at-home{
// height:680rpx; // height:800rpx;
padding-bottom:120rpx; padding-bottom:220rpx;
.main-box{ .main-box{
display:flex; display:flex;
flex-wrap: wrap; flex-wrap: wrap;
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
// position: sticky; // position: sticky;
top:0; top:0;
// right:0; // right:0;
margin-left: 216rpx; margin-left: 215rpx;
// z-index:99; // z-index:99;
display: inline-block; display: inline-block;
width:118rpx; width:118rpx;
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
IndexList:[], IndexList:[],
bannerList:[], bannerList:[],
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 60,
total: 0, total: 0,
hasNextText:'上拉加载更多', hasNextText:'上拉加载更多',
loadFlag:true, loadFlag:true,
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
}, },
onPageScroll(e) { onPageScroll(e) {
// 页面滚动时设置isFixed和scrollTop // 页面滚动时设置isFixed和scrollTop
console.log(e,'876') // console.log(e,'876')
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
if( e.scrollTop > 290){ if( e.scrollTop > 290){
this.isFixed = true; this.isFixed = true;
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
this.token=token this.token=token
this.init() this.init()
this.searchGood()
}, },
onReady() { onReady() {
const isAgree = uni.getStorageSync('m-agreement') const isAgree = uni.getStorageSync('m-agreement')
...@@ -132,25 +133,12 @@ ...@@ -132,25 +133,12 @@
if(bannerList){ if(bannerList){
self.bannerList=JSON.parse(bannerList) self.bannerList=JSON.parse(bannerList)
} }
const {current,total,size,data }=goodList
const hasNextPage=total-self.pageSize*self.pageNum>0?true:false //是否有下一页
if(self.loadFlag){
// console.log(33);
self.IndexList=self.IndexList.concat(data)
}else{
// console.log(34);
self.IndexList=data
}
self.hasNextPage=hasNextPage
self.loadFlag=false
}).catch(err=>{ }).catch(err=>{
console.log(err,'请求出错') console.log(err,'请求出错')
}) })
}, },
goDetail(item){ goDetail(item){
console.log(item,'8766') // console.log(item,'8766')
const params={ const params={
goodId:item.id goodId:item.id
} }
...@@ -164,24 +152,26 @@ ...@@ -164,24 +152,26 @@
if(val==0){ if(val==0){
//浏览量 //浏览量
if(this.showUP==false){ if(this.showUP==false){
this.sort='look_sum asc'
}else{
this.sort='look_sum desc' this.sort='look_sum desc'
}else{
this.sort='look_sum asc'
} }
}else{ }else{
//价格 //价格
if(this.showUP==false){ if(this.showUP==false){
//倒序
this.sort='goods_money asc'
}else{
this.sort='goods_money desc' this.sort='goods_money desc'
}else{
//倒序
this.sort='goods_money asc'
} }
} }
this.pageNum=1
// this.IndexList=[]
this.searchGood() this.searchGood()
}, },
// 查询商品 // 查询商品
...@@ -194,7 +184,7 @@ ...@@ -194,7 +184,7 @@
"size":pageSize, "size":pageSize,
"sort":sort "sort":sort
} }
console.log(params,'查询商品')
self.$request('/pawn/category/getGoodsPage','POST',params).then(res => { self.$request('/pawn/category/getGoodsPage','POST',params).then(res => {
const {current,total,size,records }=res.result const {current,total,size,records }=res.result
...@@ -244,6 +234,8 @@ ...@@ -244,6 +234,8 @@
this.sort='goods_money desc' this.sort='goods_money desc'
this.showUP=!this.showUP this.showUP=!this.showUP
} }
this.pageNum=1
// this.IndexList=[]
this.searchGood() this.searchGood()
}, },
toupperTop:function(e){ toupperTop:function(e){
...@@ -268,6 +260,7 @@ ...@@ -268,6 +260,7 @@
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
this.token=token this.token=token
this.init() this.init()
this.searchGood()
} }
} }
</script> </script>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<view class='header-des'> <view class='header-des'>
<view class='des-name' v-if="userTel!=''">{{userTel}}</view> <view class='des-name' v-if="userTel!=''">{{userTel}}</view>
<view class='des-name' v-else @click='goLogin'>注册/登录</view> <view class='des-name' v-else @click='goLogin'>注册/登录</view>
<view class='des-text'>花承诺保护您的信息安全</view> <view class='des-text'>花承诺保护您的信息安全</view>
</view> </view>
</view> </view>
<view class="my-contain"> <view class="my-contain">
......
...@@ -38,6 +38,14 @@ ...@@ -38,6 +38,14 @@
methods: { methods: {
needSubmit(){ needSubmit(){
const self=this const self=this
if(self.mobileVal==''){
self.toast('内容不能为空')
return false
}
if(self.mobileVal==''){
self.toast('手机号不能为空')
return false
}
const params={ const params={
"cell": self.mobileVal, "cell": self.mobileVal,
"content": self.desQuest "content": self.desQuest
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
<view class='p-footer'> <view class='p-footer'>
<view class='footer-l'> <view class='footer-l'>
<view class='l-attention' @click="Clickatten"> <view class='l-attention' @click="Clickatten">
<view :class="showAtten ?'a-icon-show':'a-icon' "></view> <view :class="follow ?'a-icon-show':'a-icon' "></view>
<view class='a-text' v-if="showAtten==false">关注</view> <view class='a-text' v-if="follow==false">关注</view>
<view class='a-texts' v-else>已关注</view> <view class='a-texts' v-else>已关注</view>
</view> </view>
<view class='l-tel' @click='callTel'> <view class='l-tel' @click='callTel'>
...@@ -72,7 +72,6 @@ ...@@ -72,7 +72,6 @@
export default { export default {
data() { data() {
return { return {
showAtten:false,
showback:false, showback:false,
quantity:1, quantity:1,
bannerList:[], bannerList:[],
...@@ -85,7 +84,8 @@ ...@@ -85,7 +84,8 @@
lookSum:0, lookSum:0,
goodsDesc:'', goodsDesc:'',
token:'', token:'',
mobileNum:'' mobileNum:'',
follow:false
} }
}, },
onLoad(options) { onLoad(options) {
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
} }
self.$request('/pawn/category/getGoodsDetail','POST',params).then(res => { self.$request('/pawn/category/getGoodsDetail','POST',params).then(res => {
console.log(res.result,'index'); console.log(res.result,'index');
const { goodsImage,goodsDetailImages,goodsName,stock,lookSum,goodsMoney,goodsDesc}=res.result const { goodsImage,goodsDetailImages,goodsName,stock,lookSum,goodsMoney,goodsDesc,follow}=res.result
self.productInfo=res.result self.productInfo=res.result
self.goodsImage=goodsImage self.goodsImage=goodsImage
self.goodsMoney=goodsMoney self.goodsMoney=goodsMoney
...@@ -117,6 +117,7 @@ ...@@ -117,6 +117,7 @@
self.lookSum=lookSum self.lookSum=lookSum
self.goodsDesc=goodsDesc self.goodsDesc=goodsDesc
self.bannerList=JSON.parse(goodsDetailImages) self.bannerList=JSON.parse(goodsDetailImages)
self.follow=follow
}).catch(err=>{ }).catch(err=>{
console.log(err,'请求出错') console.log(err,'请求出错')
}) })
...@@ -137,6 +138,10 @@ ...@@ -137,6 +138,10 @@
if(this.token==''){ if(this.token==''){
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
}else{ }else{
if(this.quantity==0){
this.toast('商品数量不能为0')
return false
}
this.Go('uni:/pages/detailResult/detailResult','redirect') this.Go('uni:/pages/detailResult/detailResult','redirect')
} }
}, },
...@@ -144,8 +149,8 @@ ...@@ -144,8 +149,8 @@
this.showback=true this.showback=true
}, },
addCount(){ addCount(){
console.log(this.quantity,'8888')
if(this.quantity>=self.stock){ if(this.quantity>=this.stock){
uni.showToast({ uni.showToast({
title: '超过库存量了', title: '超过库存量了',
icon: "none", icon: "none",
...@@ -186,7 +191,7 @@ ...@@ -186,7 +191,7 @@
if(this.token==''){ if(this.token==''){
this.Go('uni:/pages/login/login') this.Go('uni:/pages/login/login')
}else{ }else{
this.showAtten=!this.showAtten this.follow=!this.follow
const self=this const self=this
const params={ const params={
"goodId": self.goodId "goodId": self.goodId
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class='box-contain'> <view class='box-contain'>
<view class='r-line'> <view class='r-line'>
<label class='line-text'>姓名</label> <label class='line-text'>姓名</label>
<input class='line-input' type="text" :value="nameVal" @input="changeName($event)" placeholder="请输入姓名" /> <input class='line-input' maxlength="4" type="text" :value="nameVal" @input="changeName($event)" placeholder="请输入姓名" />
</view> </view>
<view class='r-line'> <view class='r-line'>
<label class='line-text'>联系方式</label> <label class='line-text'>联系方式</label>
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
<view class='r-line'> <view class='r-line'>
<label class='line-text'>擅长鉴定</label> <label class='line-text'>擅长鉴定</label>
<input class='line-inputs' :value="desVal" @input="changeDes($event)" placeholder="请输入您擅长鉴定的种类" /> <input class='line-inputs' :value="desVal" maxlength="10" @input="changeDes($event)" placeholder="请输入您擅长鉴定的种类" />
</view> </view>
</view> </view>
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
const regex = /^1[3456789]\d{9}$/; const regex = /^1[3456789]\d{9}$/;
console.log(!regex.test(e.detail.value),'086') console.log(!regex.test(e.detail.value),'086')
if(!regex.test(e.detail.value)){ if(!regex.test(e.detail.value)){
this.toast('请输入正确的手机号22') this.toast('请输入正确的手机号')
return false return false
}else{ }else{
this.mobileVal= e.detail.value this.mobileVal= e.detail.value
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
...@@ -12,7 +12,7 @@ const request=async(url,type,data)=>{ ...@@ -12,7 +12,7 @@ const request=async(url,type,data)=>{
rd = JSON.stringify(common) rd = JSON.stringify(common)
} }
console.log(baseUrl,url,'rd') console.log(rd,'rd')
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
const token=uni.getStorageSync('token') const token=uni.getStorageSync('token')
uni.request({ uni.request({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment