页面细节调整

dev
shuxiaoquan 1 year ago
parent 2da5869dd6
commit f2b5fdd97c
  1. 8
      pages/activity/newGoods.vue
  2. 40
      pages/activity/newsshop.vue
  3. 51
      pages/goods/components/SkuPopup.vue
  4. 163
      pages/goods/detail.vue
  5. 4
      pages/index/index.vue
  6. 2
      pages/news/article/classify.vue

@ -308,15 +308,15 @@
position: absolute;
top: -68rpx;
right: 0;
right: 20rpx;
}
}
.price {
display: flex;
justify-content: flex-end;
margin-top: 14rpx;
margin-top: 50rpx;
margin-right: 30rpx;
.lowPrice {
height: 50rpx;
font-size: 36rpx;
@ -324,7 +324,7 @@
font-weight: 600;
color: #DE041C;
line-height: 50rpx;
margin-right: 30rpx;
margin-right: 20rpx;
}
.buyNow {

@ -8,26 +8,26 @@
<view class="newsshop-bd">
<view class="newsshop-sale">
<view class="a">
<image src="@/static/news/newshop-03.png"></image>
<image src="https://www.saas.njrenzhou.com/static/news/newshop-03.png"></image>
</view>
<view class="info">
<scroll-view scroll-x class="b">
<view class="li">
<view class="item" v-for="i in 12" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<image class="icon" src="@/static/news/newshop-05.png"></image>
<image class="icon" src="https://www.saas.njrenzhou.com/static/news/newshop-05.png"></image>
<view class="p"><text>23999</text></view>
</view>
</view>
</view>
<view class="li">
<view class="item" v-for="i in 12" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<image class="icon" src="@/static/news/newshop-05.png"></image>
<image class="icon" src="https://www.saas.njrenzhou.com/static/news/newshop-05.png"></image>
<view class="p"><text>23999</text></view>
</view>
</view>
@ -40,7 +40,7 @@
</view>
<view class="newsshop-hot">
<view class="a">
<image src="@/static/news/newshop-04.png"></image>
<image src="https://www.saas.njrenzhou.com/static/news/newshop-04.png"></image>
</view>
<view class="info">
<view class="d">
@ -50,10 +50,10 @@
<scroll-view scroll-x class="b">
<view class="li">
<view class="item" v-for="i in 24" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<image class="icon" src="@/static/news/newshop-06.png"></image>
<image class="icon" src="https://www.saas.njrenzhou.com/static/news/newshop-06.png"></image>
<view class="p"><text>23999</text></view>
<view class="o">160</view>
</view>
@ -61,10 +61,10 @@
</view>
<view class="li">
<view class="item" v-for="i in 24" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<image class="icon" src="@/static/news/newshop-06.png"></image>
<image class="icon" src="https://www.saas.njrenzhou.com/static/news/newshop-06.png"></image>
<view class="p"><text>23999</text></view>
<view class="o">160</view>
</view>
@ -80,7 +80,7 @@
<scroll-view scroll-x class="b">
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -89,7 +89,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -98,7 +98,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -107,7 +107,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -124,7 +124,7 @@
<scroll-view scroll-x class="b">
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -133,7 +133,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -142,7 +142,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -151,7 +151,7 @@
</view>
<view class="li">
<view class="item" v-for="i in 16" :key="i">
<image class="pic" src="@/static/home/phone.jpg"></image>
<image class="pic" src="https://www.saas.njrenzhou.com/static/home/phone.jpg"></image>
<view class="title">iphone 15pro</view>
<view class="price">
<text>23999</text>
@ -447,7 +447,7 @@
overflow: hidden;
border-radius: 10rpx;
padding-bottom: 30rpx;
background: #fff url(@/static/news/newshop-01.png) center top no-repeat;
background: #fff url(https://www.saas.njrenzhou.com/static/news/newshop-01.png) center top no-repeat;
background-size: 100% auto;
.a {
@ -524,7 +524,7 @@
overflow: hidden;
border-radius: 10rpx;
padding-bottom: 30rpx;
background: #fff url(@/static/news/newshop-02.png) center top no-repeat;
background: #fff url(https://www.saas.njrenzhou.com/static/news/newshop-02.png) center top no-repeat;
background-size: 100% auto;
.a {

@ -73,19 +73,22 @@
const app = this
const { goods: { goods_name, goods_image, skuList } } = app
const skuData = []
skuList.forEach(item => {
skuData.push({
_id: item.id,
goods_sku_id: item.goods_sku_id,
goods_id: item.goods_id,
goods_name: goods_name,
image: item.image_url ? item.image_url : goods_image,
price: item.goods_price * 100,
stock: item.stock_num,
spec_value_ids: item.spec_value_ids,
sku_name_arr: app.getSkuNameArr(item.spec_value_ids)
})
})
if(skuList && skuList.length > 0){
skuList.forEach(item => {
skuData.push({
_id: item.id,
goods_sku_id: item.goods_sku_id,
goods_id: item.goods_id,
goods_name: goods_name,
image: item.image_url ? item.image_url : goods_image,
price: item.goods_price * 100,
stock: item.stock_num,
spec_value_ids: item.spec_value_ids,
sku_name_arr: app.getSkuNameArr(item.spec_value_ids)
})
})
}
return skuData
},
@ -118,16 +121,18 @@
const { goods: { specList } } = this
const defaultData = [{ name: '默认', list: [{ name: '默认' }] }]
const specData = []
specList.forEach(group => {
const children = []
group.valueList.forEach(specValue => {
children.push({ name: specValue.spec_value })
})
specData.push({
name: group.spec_name,
list: children
})
})
if(specList && specList.length > 0){
specList.forEach(group => {
const children = []
group.valueList.forEach(specValue => {
children.push({ name: specValue.spec_value })
})
specData.push({
name: group.spec_name,
list: children
})
})
}
return specData.length ? specData : defaultData
},

@ -3,7 +3,7 @@
<u-navbar>
<view class="slot-wrap">
<input type="text" placeholder="iPhone15" class="searInput" />
<input type="text" @click="toSearch()" disabled placeholder="iPhone15" class="searInput" />
</view>
</u-navbar>
@ -11,6 +11,7 @@
<view class="share">
<view class="sp"></view>
<image src="/static/detail/share.png" mode="" class="shareIcon"></image>
<button open-type="share"></button>
</view>
<view class="swiper">
<swiper class="swiper" circular :indicator-dots="indicatorDots" :autoplay="autoplay"
@ -42,17 +43,18 @@
</view>
</view>
</view>
<view class="pro" @click="goMember" v-if="userInfo.user_type==10">
<!-- v-if="userInfo.user_type==10" -->
<view class="pro">
<view class="proMem">
<text v-if="userInfo.user_type==10">Plus</text>
<text v-if="userInfo.user_type==20">分销</text>
会员
PRO会员
</view>
<view class="proInfo">
开通<text v-if="userInfo.user_type==10">Plus</text>
<text v-if="userInfo.user_type==20">分销</text>会员 预计再省
<text v-if="userInfo.user_type==20">分销</text>会员预计再省
</view>
<view class="proBtn">
<view class="proBtn" @click="goMember">
立即开通
</view>
</view>
@ -62,7 +64,7 @@
</view>
<view class="goodsOpera">
<view class="goodsNum" @click="copyNum">
<text>{{goods.skuList[0].goods_sku_id}}</text>
<text>{{goods.goods_id}}</text>
<image src="/static/detail/copy.png" mode=""></image>
</view>
<view class="operaImg">
@ -90,7 +92,7 @@
<image src="../../static/detail/rightIcon.png" mode=""></image>
</view>
<view class="address">
{{}}
<!-- {{addressInfo?addressInfo:''}} -->
</view>
</view>
</view>
@ -123,12 +125,12 @@
<view class="aboutSuggest">
相关推荐
</view>
<view class="more">
<!-- <view class="more">
查看更多
</view>
</view> -->
</view>
<view class="goodsList">
<view class="goodsItem" v-for="(item,index) in suggestGoodsList" :key="index">
<view class="goodsItem" v-for="(item,index) in suggestGoodsList" :key="index" @click="toDetail(item.goods_id)">
<view class="img">
<image :src="item.goods_image" mode="" class="goodsImg"></image>
</view>
@ -141,9 +143,7 @@
</view>
</view>
</view>
<view class="vacancy">
</view>
<view class="detail-content" v-html="goods.content"></view>
<view class="footer">
<view class="fooLeft">
<view class="footerCus firstBtn">
@ -153,6 +153,7 @@
<view class="customer">
客服
</view>
<button open-type="contact"></button>
</view>
<view class="footerCus " @click="shoppingCart">
<view class="cusIcon">
@ -301,7 +302,9 @@
setPrice: false,
openDialog: false,
goodsId: '',
goods: {},
goods: {
skuList: []
},
suggestGoodsList: [],
userInfo: {},
addressList: [],
@ -312,15 +315,23 @@
this.isPre = options.isPre
this.pre_id = options.pre_id;
this.goodsId=options.goodsId;
this.getGoodsDetail(options.goodsId)
},
onShow() {
this.getAddressList()
this.getSuggestGoods()
this.userInfo = uni.getStorageSync('userInfo');
if(uni.getStorageSync('AccessToken')){
this.getAddressList()
this.getSuggestGoods()
this.userInfo = uni.getStorageSync('userInfo');
}else{
this.userInfo = {}
}
this.getGoodsDetail()
},
methods: {
toDetail (id){
uni.navigateTo({
url: "/pages/goods/detail?goodsId="+id
})
},
//
onKonw(){
uni.navigateTo({
@ -361,9 +372,11 @@
return new Promise((resolve, reject) => {
address.defaultId().then(res => {
if (res.code == 200) {
for (var i = 0; i < that.addressList.length; i++) {
if (res.data.defaultId == that.addressList[i].address_id) {
that.addressInfo = that.addressList[i]
if(that.addressList.length>0){
for (var i = 0; i < that.addressList.length; i++) {
if (res.data.defaultId == that.addressList[i].address_id) {
that.addressInfo = that.addressList[i]
}
}
}
}
@ -371,17 +384,26 @@
.catch()
})
},
toSearch() {
uni.navigateTo({
url: "/pages/search/index"
})
},
choseSku() {
this.showSkuPopup = true
},
//
getGoodsDetail(goodsId) {
getGoodsDetail() {
const that = this
return new Promise((resolve, reject) => {
GoodsApi.detail(goodsId)
GoodsApi.detail(this.goodsId)
.then(result => {
that.goods = result.data.detail;
that.allPicture = result.data.detail.goods_images.length
let info = result.data.detail;
info.content = info.content
.replace(/style=""/g,'')
.replace(/<img src=/g,'<img style="width: 100%; display:block" src=')
that.goods = info;
that.allPicture = info.goods_images.length
})
.catch()
})
@ -397,7 +419,7 @@
.catch()
},
goHome() {
uni.navigateTo({
uni.switchTab({
url: '/pages/index/index'
})
},
@ -408,6 +430,12 @@
})
},
goMember() {
if(!uni.getStorageSync("AccessToken")) {
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
uni.navigateTo({
url: '/pages/member/index'
})
@ -418,16 +446,16 @@
url: '/pages/cart/index'
})
},
goSearch() {
//
uni.navigateTo({
url: '/pages/search/index'
})
},
addCar() {
if(!uni.getStorageSync("AccessToken")) {
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
//
const that = this
goodsCar.add(that.goods.goods_id, that.goods.skuList[0].goods_sku_id, that.goods.spec_type == 20 ? 1 : 1)
goodsCar.add(that.goods.goods_id, (that.goods.skuList && that.goods.skuList.length >0?that.goods.skuList[0].goods_sku_id:''), that.goods.spec_type == 20 ? 1 : 1)
.then(res => {
if (res.status == 200) {
that.$toast(res.message)
@ -436,6 +464,12 @@
.catch()
},
buyNow() {
if(!uni.getStorageSync("AccessToken")) {
uni.navigateTo({
url: "/pages/login/index"
})
return ;
}
//
uni.navigateTo({
url: '/pages/sureOrder/index?goodsInfo=' + JSON.stringify(this.goods)
@ -451,8 +485,18 @@
.detail {
width: 100%;
height: 100%;
&-content{
padding: 30rpx;
font-size: 26rpx;
line-height: 50rpx;
width: 710rpx;
margin: 0 auto;
margin-top: 30rpx;
background-color: #fff;
box-sizing: border-box;
}
}
.slot-wrap {
width: 400rpx;
margin-left: 60rpx;
@ -498,15 +542,26 @@
}
.share {
display: flex;
justify-content: space-between;
margin-top: 28rpx;
z-index: 22;
top: 128rpx;
width: 54rpx;
height: 54rpx;
position: absolute;
right: 30rpx;
.sp {
width: 54rpx;
height: 54rpx;
display: none;
}
button{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
.shareIcon {
width: 54rpx;
height: 54rpx;
@ -709,12 +764,11 @@
.goodsDetail {
.goodsName {
width: 672rpx;
height: 80rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 33rpx;
line-height: 50rpx;
margin: 28rpx 0 0 28rpx;
}
@ -931,10 +985,10 @@
display: flex;
flex-wrap: wrap;
margin-top: 30rpx;
padding-bottom: 20rpx;
overflow: hidden;
.goodsItem {
margin-right: 18rpx;
.img {
width: 204rpx;
height: 168rpx;
@ -957,10 +1011,9 @@
width: 184rpx;
height: 80rpx;
font-size: 28rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #000000;
line-height: 33rpx;
line-height: 40rpx;
display: -webkit-box;
overflow: hidden;
text-overflow: ellipsis;
@ -1020,25 +1073,33 @@
.footerCus {
margin-right: 44rpx;
text-align: center;
position: relative;
.cusIcon {
width: 38rpx;
height: 38rpx;
margin: 0 auto;
image {
width: 100%;
height: 100%;
}
}
button{
width: 100%;
height: 100%;
position: absolute;
left: 0;
top: 0;
z-index: 2;
opacity: 0;
}
.customer {
width: 40rpx;
height: 28rpx;
font-size: 20rpx;
font-family: PingFang SC, PingFang SC;
font-weight: 400;
color: #3D3D3D;
line-height: 28rpx;
line-height: 40rpx;
}
.car {

@ -1254,7 +1254,7 @@
display: block;
width: 90rpx;
margin: 0 auto;
text-align: center;
text-align: left;
margin-top: 5rpx;
}
}
@ -1660,7 +1660,7 @@
font-weight: 600;
text-align: left;
white-space: nowrap;
line-height: 36rpx;
line-height: 50rpx;
}
.text_16 {

@ -64,7 +64,7 @@
uni.showToast({
title: "提交成功"
})
uni.$emit("reloadClasssify")
uni.$emit("reloadClasssify",{msg:'页面更新'})
setTimeout(()=>{
uni.navigateBack({
delta: 1

Loading…
Cancel
Save