This commit is contained in:
@fawn-nine
2023-10-07 13:23:46 +08:00
4 changed files with 37 additions and 24 deletions

View File

@@ -7,8 +7,8 @@ Vue.prototype.$music = music
Vue.prototype.$bgm = bgm Vue.prototype.$bgm = bgm
// 地址 // 地址
Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/" // Vue.prototype.$baseUrl = "http://192.168.110.100:9100/pb/"
// Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/" Vue.prototype.$baseUrl = "http://59.110.212.44:9100/pb/"

View File

@@ -36,7 +36,7 @@
<view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]"> <view v-if="linkProducts && linkProducts.length > 0 && linkProducts[0]">
<view class="spbh" v-for="(item, index) in linkProducts" :key="item.id"> <view class="spbh" v-for="(item, index) in linkProducts" :key="item.id">
<view class="flexbox aligncenter" @click="previewProduct(item,index)"> <view class="flexbox aligncenter" @click="previewProduct(item,index)">
<view class="spbhimg"> <view class="spbhimg" >
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit"></image>
</view> </view>
<text class="username nowrap ">{{item.productName}}</text> <text class="username nowrap ">{{item.productName}}</text>
@@ -170,13 +170,13 @@
<view style="height: 120rpx;"></view> <view style="height: 120rpx;"></view>
</view> </view>
<view class="" v-if="upoShow"> <view class="" v-if="upoShow">
<u-popup :show="upoShow" :round="10" @close="closeUpo"> <u-popup :show="upoShow" :round="10" @close="closeUpo" style="z-index: 2;">
<view class="tanchu"> <view class="tanchu">
<view class="list"> <view class="list">
<view class="imgBox"> <view class="imgBox">
<image v-if="linkimg == ''" src="../../static/icon/wufeng.jpg" mode="aspectFit" <image v-if="linkimg == ''" src="../../static/icon/wufeng.jpg" mode="aspectFit"
style="width: 100%; height: 100%;"></image> style="width: 100%; height: 100%;"></image>
<image v-else :src="linkimg" mode="aspectFit" style="width: 100%; height: 100%;"></image> <image v-else :src="linkimg" mode="aspectFit" style="width: 100%; height: 100%;" @click="previewImage(linkimg)"></image>
<view class="xiangxi" v-if="productId != linkProducts[linkCur].productId" <view class="xiangxi" v-if="productId != linkProducts[linkCur].productId"
@click="gotoDetail(linkProducts[linkCur])"> @click="gotoDetail(linkProducts[linkCur])">
<text>查看详情</text> <text>查看详情</text>
@@ -185,8 +185,8 @@
<view :class="['spbh', linkCur == index ? 'cur' :'']" v-for="(item, index) in linkProducts" <view :class="['spbh', linkCur == index ? 'cur' :'']" v-for="(item, index) in linkProducts"
:key="item.id"> :key="item.id">
<view class="flexbox aligncenter" @click="previewProduct(item,index)"> <view class="flexbox aligncenter" @click="previewProduct(item,index)">
<view class="spbhimg"> <view class="spbhimg" >
<image :src="item.productImages" mode="aspectFit"></image> <image :src="item.productImages" mode="aspectFit" ></image>
</view> </view>
<text class="username nowrap ">{{item.productName}}</text> <text class="username nowrap ">{{item.productName}}</text>
<text class="price" <text class="price"

View File

@@ -201,16 +201,16 @@
<view v-if="tjProList.length > 0" > <view v-if="tjProList.length > 0" >
<view class="flexbox" style="flex-wrap: wrap;"> <view class="flexbox" style="flex-wrap: wrap;">
<view class="goodsItem" v-for="(item,index) in tjProList" :key="index" <view class="goodsItem" v-for="(item,index) in tjProList" :key="index"
@click="goDetail(item.shopproudicts[0].productId)"> @click="goDetail(item.productId)">
<image :src="item.shopproudicts[0]&&item.shopproudicts[0].productImages" mode="" class="goodsImg"></image> <image :src="item.productImages" mode="" class="goodsImg"></image>
<view class="goodsContent"> <view class="goodsContent">
<view class="goodsName"> <view class="goodsName">
{{item.shopproudicts[0]?item.shopproudicts[0].productName:''}} {{item.productName}}
</view> </view>
<view class="goodsPrice"> <view class="goodsPrice">
<span class="price" v-if="item.shopproudicts[0] && item.shopproudicts[0].activityPrice && item.shopproudicts[0].activityPrice > 0">{{item.shopproudicts[0].activityPrice}}</span> <span class="price" v-if="item.activityPrice && item.activityPrice > 0">{{item.activityPrice}}</span>
<span class="price" v-else>{{item.shopproudicts[0]?item.shopproudicts[0].price:''}}</span> <span class="price" v-else>{{item.price}}</span>
<span class="Salesnum">已售{{item.shopproudicts[0]?item.shopproudicts[0].sumSales:''}} </span> <span class="Salesnum">已售{{item.sumSales}} </span>
</view> </view>
</view> </view>
</view> </view>
@@ -307,9 +307,9 @@
onHide() { onHide() {
this.page = 1 this.page = 1
this.tjProList = [] this.tjProList = []
if(this.tagList.length > 0){ // if(this.tagList.length > 0){
this.tabsid = this.tagList[0].splId // this.tabsid = this.tagList[0].splId
} // }
}, },
//页面显示 //页面显示
onShow() { onShow() {
@@ -392,16 +392,17 @@
}, },
getJtData(){ getJtData(){
this.$http this.$http
.post('book/label/list',{ // .post('book/label/list',{
.post('book/label/getProductsByLabel',{
'splId': this.tabsid, 'splId': this.tabsid,
'limit': this.pageSize, 'limit': this.pageSize,
'page': this.page 'page': this.page
}) })
.then(res => { .then(res => {
if(res.code == 0 && res.page.list.length > 0){ if(res.code == 0 && res.page.records.length > 0){
this.tjProList = this.tjProList.concat(res.page.list) this.tjProList = this.tjProList.concat(res.page.records)
this.totalPage = res.page.totalPage this.totalPage = res.page.pages
this.status = 3 this.status = 3
console.log(this.tjProList,'按标签检索结果') console.log(this.tjProList,'按标签检索结果')
}else{ }else{

View File

@@ -50,7 +50,7 @@
<view class="tanchu"> <view class="tanchu">
<view class="dp_title">请输入昵称</view> <view class="dp_title">请输入昵称</view>
<u--input v-model="userMes.nickname" placeholder="请输入昵称" border="surround" clearable></u--input> <u--input v-model="userMes.nickname" placeholder="请输入昵称" border="surround" clearable></u--input>
<u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="choseNickname()" <u-button color="linear-gradient(to right, #72d386, #317e42)" text="确定" @click="choseNickname(userMes.nickname)"
style="margin-top: 50rpx;"></u-button> style="margin-top: 50rpx;"></u-button>
<view @click="nicknameShow=false" class="dp_canBtn">取消</view> <view @click="nicknameShow=false" class="dp_canBtn">取消</view>
</view> </view>
@@ -124,7 +124,8 @@
nickname: '', nickname: '',
tel: '', tel: '',
password: '', password: '',
Repassword: '' Repassword: '',
oldName:'', // 老的用户名
}, },
avatarShow: false, avatarShow: false,
nicknameShow: false, nicknameShow: false,
@@ -176,6 +177,7 @@
that.userMes.nickname = res.user.nickname that.userMes.nickname = res.user.nickname
that.userMes.tel = res.user.tel that.userMes.tel = res.user.tel
that.userMes.avatar = res.user.avatar that.userMes.avatar = res.user.avatar
that.userMes.oldName = that.userMes.nickname
}); });
} }
}, },
@@ -212,8 +214,18 @@
// 昵称 // 昵称
choseNickname(e) { choseNickname(e) {
let that = this let that = this
that.choseData() if(e && e != ''){
that.nicknameShow = false
that.choseData()
that.nicknameShow = false
}else{
that.userMes.nickname = that.userMes.oldName
console.log(that.userMes.nickname)
uni.showToast({
title:'请输入昵称',
icon:'none'
})
}
}, },
// 性别 // 性别