zhouzhenyuan 10 months ago
parent 398cd3c9a3
commit c21e88f45e
  1. 2
      pages/category/index.vue
  2. 224
      pages/goods/detail.vue
  3. 2
      pages/login/index.vue
  4. 37
      pages/news/park/addressEdit.vue
  5. 9
      pages/news/park/addressList.vue
  6. 7
      pages/search/index.vue
  7. 3
      pages/user/index.vue

@ -100,7 +100,7 @@
goodsDetail(item){
//
uni.navigateTo({
url:'/pages/goods/detail'
url:'/pages/goods/detail?goodsId='+item.goods_id
})
},
}

@ -1,10 +1,10 @@
<template>
<view class="detail">
<view>
<u-navbar title="" :border-bottom="false" title-color="#fff" ></u-navbar>
<u-navbar title="" :border-bottom="false" title-color="#fff"></u-navbar>
</view>
<view class="head">
<view class="search">
<image src="/static/tabbar/home.png" mode="" class="icon" @click="goHome"></image>
<view class="searInput" @click="goSearch">
@ -18,14 +18,14 @@
</view>
<view class="swiper">
<scroll-view class="goods" scroll-x="true" @scroll="scroll">
<view class="goodsItem" v-for="(item,index) in 4" :key="index">
<image src="/static/detail/tv.png" mode="" class="goodsImg"></image>
<view class="goodsItem" v-for="(item,index) in goods.goods_images" :key="index">
<image :src="item.preview_url" mode="" class="goodsImg"></image>
<view class="num">
<view class="numSp">
</view>
<view class="numInfo">
{{index+1}}/4
{{index+1}}/{{goods.goods_images.length}}
</view>
</view>
</view>
@ -37,15 +37,15 @@
<view class="goodsPrice">
<view class="left">
<view class="leftPrice">
<text></text>4980
<text></text>{{goods.goods_price_min}}
</view>
<view class="sellPrice">
<text class="sellLeft">分销价</text>3999
<text class="sellLeft">分销价</text>{{}}
</view>
</view>
<view class="right">
<view class="rightPrice">
4980
{{goods.line_price_min}}
</view>
<view class="rightInfo">
降价通知
@ -65,8 +65,7 @@
</view>
<view class="goodsDetail">
<view class="goodsName">
夏普4T-M70H7DA 70英寸 4K 高清进口屏智能语音
平板液晶电视机6575
{{goods.goods_name}}
</view>
<view class="goodsOpera">
<view class="goodsNum">
@ -149,7 +148,7 @@
</view>
</view>
<view class="vacancy">
</view>
<view class="footer">
<view class="fooLeft">
@ -170,7 +169,7 @@
</view>
</view>
</view>
<view class="fooRight">
<view class="addCar" v-if="!isPre">
加入购物车
@ -182,15 +181,15 @@
立即预约
</view>
</view>
</view>
<view class="dia" v-if="openDialog">
<view class="preSuc" v-if="diaShow">
<view class="preSuc" v-if="diaShow">
<view class="preImg">
<image src="../../static/order/ld.png" mode="" class="ldImg"></image>
</view>
<view class="preTitle">
预约成功
预约成功
</view>
<view class="iKnow">
我知道了
@ -205,7 +204,7 @@
</view>
<view class="msp">
<text>秒杀价:</text>
<input type="text" placeholder="秒杀价格可低于成本价" class="inp"/>
<input type="text" placeholder="秒杀价格可低于成本价" class="inp" />
</view>
<view class="qj">
<text class="msQj">秒杀区间:</text>
@ -221,7 +220,7 @@
</view>
<view class="msLimit">
<text>秒杀限购:</text>
<switch @change="switch1Change" />
<switch @change="switch1Change" />
</view>
<view class="peoLimit">
<text>每人限购</text>
@ -275,7 +274,7 @@
<view class="shareText">
生成海报
</view>
</view>
</view>
</view>
<view class="shareCancel" @click="shareCancel">
取消
@ -285,55 +284,70 @@
</view>
</template>
<script>
import * as GoodsApi from '@/api/goods'
export default {
data() {
return {
diaShow:false,
diaShow: false,
searchValue: '',
isPre:false,
setPrice:false,
openDialog:false,
isPre: false,
setPrice: false,
openDialog: false,
goodsId: '',
goods:{},
}
},
onLoad(options){
onLoad(options) {
this.isPre = options.isPre
this.getGoodsDetail(options.goodsId)
},
methods:{
goHome(){
methods: {
//
getGoodsDetail(val) {
const that = this
return new Promise((resolve, reject) => {
GoodsApi.detail(val)
.then(result => {
that.goods = result.data.detail
})
.catch(reject)
})
},
goHome() {
uni.navigateTo({
url:'/pages/index/index'
url: '/pages/index/index'
})
},
goRanking(){
goRanking() {
//
uni.navigateTo({
url:'/pages/activity/charts'
url: '/pages/activity/charts'
})
},
goMember(){
goMember() {
uni.navigateTo({
url:'/pages/member/index'
url: '/pages/member/index'
})
},
shoppingCart(){
shoppingCart() {
//
uni.switchTab({
url:'/pages/cart/index'
url: '/pages/cart/index'
})
},
goSearch(){
goSearch() {
//
uni.navigateTo({
url:'/pages/search/index'
url: '/pages/search/index'
})
},
buyNow(){
buyNow() {
//
uni.navigateTo({
url:'/pages/sureOrder/index'
url: '/pages/sureOrder/index'
})
},
shareCancel(){
shareCancel() {
//
},
}
@ -855,10 +869,12 @@
}
}
}
.vacancy{
.vacancy {
width: 100%;
height: 150rpx;
}
.footer {
position: fixed;
bottom: 0;
@ -872,15 +888,18 @@
align-items: center;
text-align: center;
justify-content: space-between;
.fooLeft{
.fooLeft {
display: flex;
align-items: center;
}
.fooRight{
.fooRight {
display: flex;
align-items: center;
margin-right: 20rpx;
}
.firstBtn {
margin-left: 60rpx;
}
@ -907,11 +926,13 @@
color: #3D3D3D;
line-height: 28rpx;
}
.car{
.car {
width: 60rpx;
}
}
.addCar{
.addCar {
width: 196rpx;
height: 78rpx;
background: #FF9E2B;
@ -924,7 +945,8 @@
line-height: 78rpx;
text-align: center;
}
.buyNow{
.buyNow {
width: 212rpx;
height: 78rpx;
background: linear-gradient(102deg, #FE5E06 0%, #F3221A 100%);
@ -939,18 +961,20 @@
margin-left: 8rpx;
}
}
.dia{
.dia {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(69,69,69,0.44);
background: rgba(69, 69, 69, 0.44);
display: flex;
justify-content: center;
align-items: center;
text-align: center;
.preSuc{
.preSuc {
width: 560rpx;
height: 400rpx;
background: linear-gradient(180deg, #FFE4E4 0%, #FFFFFF 100%);
@ -959,17 +983,20 @@
display: flex;
flex-direction: column;
align-items: center;
.preImg{
.preImg {
width: 100rpx;
height: 100rpx;
position: relative;
top: -50rpx;
.ldImg{
.ldImg {
width: 100%;
height: 100%;
}
}
.preTitle{
.preTitle {
height: 44rpx;
font-size: 32rpx;
font-family: PingFang SC, PingFang SC;
@ -978,7 +1005,8 @@
line-height: 38rpx;
margin-top: 32rpx;
}
.iKnow{
.iKnow {
width: 412rpx;
height: 72rpx;
background: #F55349;
@ -993,13 +1021,15 @@
margin-top: 70rpx;
}
}
.setMs{
.setMs {
width: 656rpx;
height: 690rpx;
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
opacity: 1;
.msprice{
.msprice {
width: 100%;
height: 44rpx;
font-size: 32rpx;
@ -1011,15 +1041,18 @@
margin-top: 24rpx;
margin-bottom: 26rpx;
}
.msLine{
.msLine {
margin-bottom: 30rpx;
}
.msp{
.msp {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 30rpx;
.inp{
.inp {
width: 440rpx;
height: 72rpx;
background: #FFFFFF;
@ -1030,22 +1063,26 @@
line-height: 72rpx;
}
}
.qj{
.qj {
font-size: 28rpx;
font-weight: 400;
color: #262626;
line-height: 33rpx;
margin-bottom: 34rpx;
.msQj{
.msQj {
position: relative;
left:-218rpx;
left: -218rpx;
}
.date{
.date {
display: flex;
align-items: center;
justify-content: center;
margin-top: 16rpx;
.timeCommn{
.timeCommn {
width: 260rpx;
height: 68rpx;
background: #F1F1F1;
@ -1058,15 +1095,18 @@
color: #929292;
padding-left: 34rpx;
}
.beginTime{
.beginTime {
margin-right: 16rpx;
}
.endTime{
.endTime {
margin-left: 20rpx;
}
}
}
.msLimit{
.msLimit {
display: flex;
justify-content: space-between;
padding: 0 38rpx 0 42rpx;
@ -1076,11 +1116,13 @@
color: #262626;
line-height: 33rpx;
}
.peoLimit{
.peoLimit {
display: flex;
margin-left: 42rpx;
align-items: center;
.num{
.num {
width: 106rpx;
height: 60rpx;
background: #FFFFFF;
@ -1092,11 +1134,13 @@
margin: 0 18rpx 0 16rpx;
}
}
.operaBtn{
.operaBtn {
display: flex;
justify-content: center;
margin-top: 52rpx;
.btnComm{
.btnComm {
width: 216rpx;
height: 70rpx;
background: #EEEEEE;
@ -1105,14 +1149,15 @@
line-height: 70rpx;
text-align: center;
}
.sureBtn{
.sureBtn {
width: 214rpx;
height: 74rpx;
background: linear-gradient(180deg, #FD5D06 0%, #F3211A 100%);
border-radius: 100rpx 100rpx 100rpx 100rpx;
opacity: 1;
text-align: center;
line-height:74rpx ;
line-height: 74rpx;
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
@ -1120,7 +1165,8 @@
}
}
}
.shareWechat{
.shareWechat {
width: 656rpx;
height: 884rpx;
background: #FFFFFF;
@ -1129,22 +1175,26 @@
display: flex;
flex-direction: column;
padding-top: 24rpx;
.shareGoods{
.shareGoods {
margin-left: 28rpx;
width: 604rpx;
height: 382rpx;
border-radius: 0rpx 0rpx 0rpx 0rpx;
opacity: 1;
image{
image {
width: 100%;
height: 100%;
}
}
.shareInfo{
.shareInfo {
display: flex;
align-items: center;
margin-top: 12rpx;
.shareGoodsInfo{
.shareGoodsInfo {
width: 410rpx;
height: 120rpx;
font-size: 28rpx;
@ -1152,7 +1202,8 @@
color: #000000;
line-height: 33rpx;
}
.sharePrice{
.sharePrice {
height: 64rpx;
font-size: 46rpx;
font-family: PingFang SC, PingFang SC;
@ -1161,14 +1212,16 @@
line-height: 54rpx;
}
}
.shareOpera{
.shareOpera {
display: flex;
align-items: center;
justify-content: space-around;
margin-top: 36rpx;
margin-bottom: 46rpx;
.operaItem{
.imgIcon{
.operaItem {
.imgIcon {
width: 88rpx;
height: 88rpx;
background: linear-gradient(180deg, #EC6244 0%, #FA938C 100%);
@ -1177,17 +1230,21 @@
line-height: 88rpx;
text-align: center;
color: #fff;
.iconIm{
.iconIm {
font-size: 32rpx;
}
}
.weChatIcon{
.weChatIcon {
background: #28C445;
}
.hb{
.hb {
background: linear-gradient(180deg, #53A2EE 0%, #6FB2F4 100%);
}
.shareText{
.shareText {
width: 96rpx;
height: 34rpx;
font-size: 24rpx;
@ -1198,7 +1255,8 @@
}
}
}
.shareCancel{
.shareCancel {
width: 556rpx;
height: 82rpx;
background: #EEEEEE;

@ -68,6 +68,7 @@
that.countdown = that.countdown - 1
} else {
that.showCountDown = false
that.countdown = 60
clearInterval(that.countDownFun)
}
@ -136,6 +137,7 @@
.login {
width: 100%;
background: #fffafb url(@/static/news/login-bg.png) center top no-repeat;
background-size: 100% 100%;
background-size: 100% auto;
min-height: 100vh;

@ -16,8 +16,8 @@
<view class="item">
<view class="a">所属城市</view>
<view class="b">
<picker mode="region">
<view class="select">请选择省市区<u-icon name="arrow-right"></u-icon></view>
<picker mode="region" :value="form.region" @change="bindCityChange">
<view class="select">{{cityInfo.province}}{{cityInfo.city}}{{cityInfo.area}}<u-icon name="arrow-right"></u-icon></view>
</picker>
</view>
</view>
@ -45,8 +45,15 @@
export default {
data() {
return {
array:[],
index:0,
checked: false,
value: "",
cityInfo:{
province:'请选择省市区',
city:'',
area:''
},
form: {
content: '',
name: '',
@ -54,13 +61,35 @@
region: [],
detail: ''
},
addressDetail:null,
};
},
methods: {
onLoad(optios){
if(optios.addressDetail){
this.addressDetail =JSON.parse(optios.addressDetail) ;
this.cityInfo.province = this.addressDetail.region.province;
this.cityInfo.city = this.addressDetail.region.city;
this.cityInfo.area = this.addressDetail.region.region;
this.form.name = this.addressDetail.name;
this.form.phone = this.addressDetail.phone;
this.form.region = [this.addressDetail.province_id,this.addressDetail.city_id,this.addressDetail.region_id];
this.form.detail = this.addressDetail.detail;
console.log(this.addressDetail,'收货地址详情')
}
},
methods: {
bindCityChange(e){
console.log(e,'选择的省市区数据')
this.cityInfo.province = e.detail.value[0];
this.cityInfo.city = e.detail.value[1];
this.cityInfo.area = e.detail.value[2];
this.form.region = e.detail.code;
},
saveAddress() {
//
const that = this
AddressApi.add(that.form)
let params = that.form
AddressApi.add(params)
.then(result => {
that.$toast(result.message)
uni.navigateBack()

@ -6,7 +6,7 @@
<view class="d">
{{item.detail}}
</view>
<image src="/static/order/edit.png"></image>
<image src="/static/order/edit.png" @click="editAddress(item)"></image>
</view>
</view>
<view class="footer">
@ -29,6 +29,7 @@
this.getAddressList()
},
methods: {
getAddressList() {
const that = this
return new Promise((resolve, reject) => {
@ -39,6 +40,12 @@
.catch(reject)
})
},
editAddress(item){
//
uni.navigateTo({
url:'/pages/news/park/addressEdit?addressDetail=' + JSON.stringify(item)
})
},
addAddress(){
uni.navigateTo({
url:'/pages/news/park/addressEdit'

@ -3,7 +3,7 @@
<view class="search">
<image src="/static/home/search.png" mode="" class="searchIcon"></image>
<input v-model="searchValue" class="input" focus="true" placeholder="请输入您搜索的商品" type="text" />
<view class="searchBtn">
<view class="searchBtn" @click="getSearchInfo">
搜索
</view>
</view>
@ -86,7 +86,10 @@
},
methods: {
getSearchInfo(){
//
},
}
}
</script>

@ -87,7 +87,7 @@
src="https://lanhu.oss-cn-beijing.aliyuncs.com/FigmaDDSSlicePNG734520a67fe8e1d927b6d6e351bd2ade.png"
class="thumbnail_4"></image>
</view>
<view class="grounding" v-if="userInfo.user_type==1">
<view class="grounding">
<view class="image-text_2">
<image src="/static/user/shelf.png" class="label_1"></image>
<view class="text-group_2">
@ -477,7 +477,6 @@
//
onRefreshPage() {
this.isLogin = checkLogin()
console.log(this.isLogin,'是否登录')
//
this.getUserInfo()
},

Loading…
Cancel
Save