吆喝
This commit is contained in:
@@ -0,0 +1,71 @@
|
||||
<template>
|
||||
<view class="articles">
|
||||
<integral-articles :Commodity="listData"></integral-articles>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import integralArticles from "@/pagesA/components/integralArticles.vue"
|
||||
export default {
|
||||
components: {
|
||||
integralArticles
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
listData: [],
|
||||
pages: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
allPage: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
onLoad(options) {
|
||||
uni.setNavigationBarTitle({
|
||||
title: options.name
|
||||
})
|
||||
this.Commodity = this.list
|
||||
this.getgoods()
|
||||
},
|
||||
methods: {
|
||||
//获取 商品
|
||||
getgoods() {
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: '/api/delivery/goods/list',
|
||||
methods: "POST",
|
||||
data: {
|
||||
page: that.pages.currentPage,
|
||||
limit: that.pages.pageSize,
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
if (that.pages.currentPage == 1) {
|
||||
that.listData = res.data.list;
|
||||
that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||
} else {
|
||||
that.listData.push(...res.data.list)
|
||||
}
|
||||
this.pages.currentPage++;
|
||||
}
|
||||
// this.score = res.data.score
|
||||
// that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pages.currentPage <= this.pages.allPage) {
|
||||
this.getgoods();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.articles {
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,236 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#333" @click="navBack"></uni-icons>
|
||||
商品详情
|
||||
</view>
|
||||
|
||||
<view class="Content">
|
||||
<!-- 轮播图 -->
|
||||
<view>
|
||||
<swiper class="home-swiper-banner" style="height: 750rpx;" indicator-color="rgba(255, 255, 255, 0.3)"
|
||||
indicator-active-color="#FFFFFF" :indicator-dots="true" :autoplay="true" :interval="3000"
|
||||
:duration="500">
|
||||
<swiper-item v-for="(item,index) in detailsdata.cimages" :key="index" @tap="detail(item.link,0)">
|
||||
<image style="width: 100%;height: 750rpx;" :src="item" mode="aspectFill">
|
||||
</image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="commodity flex alcenter">
|
||||
<view class="flex ml15 alcenter">
|
||||
<view class="mr20">
|
||||
<text class="ft24 ftw500">{{detailsdata.price}}</text>
|
||||
<text class="ft14 ftw500">积分</text>
|
||||
</view>
|
||||
<text class="ftw500"
|
||||
style="padding: 4rpx 28rpx; color: #FFC4CF; font-size: 22rpx;background-color: #FF3E62; border-radius: 20rpx;">兑换{{detailsdata.sale_num}}</text>
|
||||
</view>
|
||||
<view class="ftw500" style="margin-right: 56rpx;font-size: 52rpx;text-align: center;">
|
||||
<view class="">{{score}}</view>
|
||||
<view class="ft12 ftw500" style="color: #969CD7;">当前积分</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="informationbox">
|
||||
<view class="name text-over">{{detailsdata.name}}</view>
|
||||
|
||||
<!-- <view class="specifications ">
|
||||
<view class="">规格:12354</view>
|
||||
<uni-icons type="right" size="12" color="#333" style="margin-right: 24rpx;"></uni-icons>
|
||||
</view> -->
|
||||
<view class="specifications ">
|
||||
<view class="">库存:{{detailsdata.stock_num}}</view>
|
||||
<uni-icons type="right" size="12" color="#333" style="margin-right: 24rpx;"></uni-icons>
|
||||
</view>
|
||||
|
||||
<!-- 底部 照片 -->
|
||||
<view class="imgsbxo">
|
||||
<view class="imgtop flex alcenter center">
|
||||
<view class="imgtop_left"></view>
|
||||
<text>商品详情</text>
|
||||
<view class="imgtop_right"></view>
|
||||
</view>
|
||||
<view class="" style="font-size: 0;" v-for="(item,index) in detailsdata.cimages">
|
||||
<image style="width: 100%;" :src="item" mode="aspectFill">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom_button">
|
||||
<view class="exchange" @click="clickexchange(detailsdata.id)">立即兑换</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
banners: [{}, {}, {}, {}, {}],
|
||||
|
||||
score:"",
|
||||
detailsdata:{}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log('e', e.id)
|
||||
// this.shanchu(7)
|
||||
this.getuser()
|
||||
//实际
|
||||
this.shanchu(e.id)
|
||||
|
||||
},
|
||||
methods: {
|
||||
shanchu(id) {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/goods/info',
|
||||
methods: "POST",
|
||||
data: {
|
||||
goods_id: id
|
||||
},
|
||||
}).then(res => {
|
||||
if(res.code == 1){
|
||||
this.detailsdata = res.data
|
||||
console.log(this.detailsdata);
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
//获取 用户积分
|
||||
getuser() {
|
||||
this.$httpRequest({
|
||||
url: '/api/user/index',
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
console.log(res.data.score);
|
||||
this.score = res.data.score
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
clickexchange(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/integral/commodityOrder?id=' + id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
/* position: relative; */
|
||||
background-color: #F7F8F9;
|
||||
padding-top: 58rpx;
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 160rpx;
|
||||
line-height: 160rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.Content {
|
||||
position: absolute;
|
||||
left: 0rpx;
|
||||
top: 0rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.commodity {
|
||||
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/commodity_bg.png);
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 136rpx;
|
||||
height: 136rpx;
|
||||
margin-top: -16rpx;
|
||||
z-index: 1;
|
||||
position: relative;
|
||||
color: #ffffff;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.informationbox {
|
||||
margin-bottom: 160rpx;
|
||||
}
|
||||
|
||||
.name {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #fff;
|
||||
padding-left: 34rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.specifications {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #fff;
|
||||
padding-left: 34rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.imgsbxo {}
|
||||
|
||||
.imgtop {
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.imgtop_left {
|
||||
width: 100rpx;
|
||||
height: 10rpx;
|
||||
margin-right: 20rpx;
|
||||
background: linear-gradient(90deg, rgba(28, 28, 29, 0) 0%, #D8D8D8 100%);
|
||||
}
|
||||
|
||||
.imgtop_right {
|
||||
width: 100rpx;
|
||||
height: 10rpx;
|
||||
margin-left: 20rpx;
|
||||
background: linear-gradient(270deg, rgba(28, 28, 29, 0) 0%, #D8D8D8 100%);
|
||||
}
|
||||
|
||||
.bottom_button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.exchange {
|
||||
margin: 16rpx 28rpx 0 28rpx;
|
||||
height: 80rpx;
|
||||
background-color: #FFD8A9;
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,356 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||
我的订单
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<view class="typeTab">
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==-1}]" @click="changeType(-1)">全部</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==0}]" @click="changeType(0)">待付款</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==1}]" @click="changeType(1)">待发货</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==2}]" @click="changeType(2)">待收货</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==3}]" @click="changeType(3)">已完成</view>
|
||||
<!-- <view :class="['typeItem',{'typeCheck':typeCheck==4}]" @click="changeType(4)">已取消</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==5}]" @click="changeType(5)">已退款</view> -->
|
||||
</view>
|
||||
|
||||
<view class="myList">
|
||||
<view class="lineItem" v-for="(item,index) in listData" :key="item.id">
|
||||
<view class="lineInfo box">
|
||||
<view class="lineName">
|
||||
<view class="ft12 ftw500 cl-999">下单时间:{{item.addtime}}</view>
|
||||
<view class="ft12 ftw500 " style="color: #EF1857;" v-if="item.status == 0">待付款</view>
|
||||
<view class="ft12 ftw500 cl-333" v-else-if="item.status == 1">待发货</view>
|
||||
<view class="ft12 ftw500 cl-333" v-else-if="item.status == 2">待收货</view>
|
||||
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 3">已完成</view>
|
||||
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 4">已取消</view>
|
||||
<view class="ft12 ftw500 cl-999" v-else-if="item.status == 5">已退款</view>
|
||||
</view>
|
||||
<view class="lineDescribe flex">
|
||||
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="item.cimage"
|
||||
mode="">
|
||||
</image>
|
||||
<view class="ml10 flex"
|
||||
style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{item.goods_name}}
|
||||
</view>
|
||||
<view class="flex alcenter" style="justify-content: space-between">
|
||||
<view class="" style="color: #EF1857;">
|
||||
<text class="ftw500 cl-333" style="font-size: 24rpx;">实付款:</text>
|
||||
<text class="ft20 ftw500">{{item.total_price}}</text>
|
||||
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||
</view>
|
||||
<view class="clE075" @click="goOrder(item,index)" v-if="item.status == 0">去付款</view>
|
||||
<view class="clfff" @click="clickexchange" v-else-if="item.status == 1">联系客服</view>
|
||||
<view class="clfff" @click="goOrder(item,index)" v-else-if="item.status == 2">查看订单
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<uni-load-more :status="status" :content-text="contentText" />
|
||||
</view>
|
||||
<uni-popup type="center" ref="pointsyes">
|
||||
<view class="pointsyesbox">
|
||||
<view class="ft16" style="margin-top: 30rpx;">
|
||||
<text>客服电话:</text>
|
||||
<text>{{serviceInfo.service_mobile}}</text>
|
||||
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(serviceInfo.service_mobile)">
|
||||
</image>
|
||||
</view>
|
||||
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
remark: "",
|
||||
typeCheck: -1,
|
||||
listData: [],
|
||||
pages: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
allPage: 1,
|
||||
},
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: "上拉显示更多",
|
||||
contentrefresh: "正在加载...",
|
||||
contentnomore: "没有更多数据了"
|
||||
},
|
||||
serviceInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.status = 'more';
|
||||
this.changeType(-1)
|
||||
this.getserviceInfo()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pages.currentPage <= this.pages.allPage) {
|
||||
this.getorder()
|
||||
this.status = 'more';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
//切换
|
||||
changeType(item) {
|
||||
this.pages.currentPage = 1
|
||||
this.pages.allPage = 1
|
||||
this.typeCheck = item
|
||||
this.getorder()
|
||||
},
|
||||
getorder() {
|
||||
this.status = 'loading';
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/order/list',
|
||||
methods: "POST",
|
||||
data: {
|
||||
page: this.pages.currentPage,
|
||||
limit: this.pages.pageSize,
|
||||
status: this.typeCheck
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.status = ''
|
||||
if (this.pages.currentPage == 1) {
|
||||
this.listData = res.data.list;
|
||||
this.pages.allPage = Math.ceil(res.data.total / this.pages.pageSize);
|
||||
} else if (res.data.list.length > 0) {
|
||||
this.listData.push(...res.data.list)
|
||||
console.log(this.listData);
|
||||
} else {
|
||||
this.status = 'noMore';
|
||||
this.pages.isNextPage = 1;
|
||||
}
|
||||
this.pages.currentPage++;
|
||||
}
|
||||
}).catch(err => {
|
||||
this.status = '';
|
||||
})
|
||||
},
|
||||
|
||||
getserviceInfo() { //app信息拿取电话
|
||||
this.$httpRequest({
|
||||
url: "/api/user/serviceInfo",
|
||||
method: "GET"
|
||||
}).then(res => {
|
||||
|
||||
this.serviceInfo = res.data;
|
||||
console.log(this.serviceInfo);
|
||||
})
|
||||
},
|
||||
|
||||
goOrder(item, index) {
|
||||
console.log(item, index);
|
||||
uni.navigateTo({ //订单
|
||||
url: '/pagesA/integral/completeorder?id=' + this.listData[index].order_id
|
||||
})
|
||||
},
|
||||
|
||||
clickexchange() {
|
||||
this.$refs.pointsyes.open()
|
||||
},
|
||||
copy(value) {
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
});
|
||||
},
|
||||
navorder() {
|
||||
this.$refs.pointsyes.close()
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||
padding-top: 58rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 356rpx;
|
||||
background-color: #Ffffff;
|
||||
min-height: 100vh;
|
||||
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 26rpx;
|
||||
/* background-color: #Ffffff; */
|
||||
}
|
||||
|
||||
.typeTab {
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 32rpx;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 40rpx;
|
||||
margin: 0 30rpx;
|
||||
}
|
||||
|
||||
.typeCheck {
|
||||
color: #333333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.typeCheck:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 48rpx;
|
||||
height: 4rpx;
|
||||
background-color: #333333;
|
||||
bottom: -8rpx;
|
||||
left: calc(50% - 30rpx);
|
||||
}
|
||||
|
||||
|
||||
.lineImg {
|
||||
width: 192rpx;
|
||||
height: 240rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.lineName {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #F7F8F9;
|
||||
padding: 24rpx;
|
||||
}
|
||||
|
||||
.lineDescribe {
|
||||
padding: 20rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
|
||||
}
|
||||
|
||||
.lineNum {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #EF1857;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.lineItem {
|
||||
display: flex;
|
||||
padding-bottom: 24rpx;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.noListData {
|
||||
position: absolute;
|
||||
top: 40vh;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0;
|
||||
}
|
||||
|
||||
.noImg {
|
||||
width: 314rpx;
|
||||
height: 228rpx;
|
||||
}
|
||||
|
||||
.noText {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.24);
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.lineInfo {
|
||||
height: 300rpx;
|
||||
}
|
||||
|
||||
.clE075 {
|
||||
width: 148rpx;
|
||||
height: 60rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
border-radius: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.clfff {
|
||||
width: 148rpx;
|
||||
height: 60rpx;
|
||||
border: 2rpx solid #D8D8D8;
|
||||
border-radius: 30rpx;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.pointsyesbox {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.button {
|
||||
height: 80rpx;
|
||||
width: 312rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="content">
|
||||
<view class="ml20 mr15 pt15">
|
||||
<view class="mb20" v-for="(item,index) in datalist" :key="index" >
|
||||
<view class="flex alcenter">
|
||||
<text class="ft14 ftw500 cl-333">{{item.accept_name}}</text>
|
||||
<text class="ft14 ftw500 cl-333 pl20">{{item.show_mobile}}</text>
|
||||
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;" @click="clicknewaddress(2,item)"></uni-icons>
|
||||
</view>
|
||||
<view class="ft14 ftw500 cl-999" style="margin-top: 12rpx;">{{item.accept_province}}{{item.accept_city}}{{item.accept_exp_area}}{{item.accept_address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom_button ">
|
||||
<view class="practices button" @click="clicknewaddress(1,'')">新增地址</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
datalist: []
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.getlist()
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
clicknewaddress(index, item) {
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/integral/newaddress?type=' + index + "&data=" + JSON.stringify(item)
|
||||
})
|
||||
},
|
||||
getlist() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/address/list',
|
||||
data: this.data,
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
console.log(res);
|
||||
if (res.code == 1) {
|
||||
this.datalist = res.data.list
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
background-color: #fff;
|
||||
height: 100vh;
|
||||
|
||||
}
|
||||
|
||||
.content {
|
||||
background-color: #fff;
|
||||
padding-bottom: 160rpx;
|
||||
}
|
||||
|
||||
.bottom_button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.practices {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin: 14rpx 80rpx 0 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,286 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||
填写订单
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<!-- 地址 -->
|
||||
<view class="addressbox box pt16 pb16" >
|
||||
<view class="flex alcenter">
|
||||
<image style="width: 40rpx; height: 40rpx;margin-left: 12rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/address.png"
|
||||
mode="" @tap.stop="shopaddress"></image>
|
||||
<text class="ft14 ftw500 cl-333" style="padding-left: 18rpx;" @tap.stop="shopaddress">{{address.accept_name}}</text>
|
||||
<text class="ft14 ftw500 cl-333 pl20" @tap.stop="shopaddress">{{address.accept_mobile}}</text>
|
||||
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;" @tap="navaddress"></uni-icons>
|
||||
</view>
|
||||
<view v-if="address.accept_province || address.accept_city || address.accept_exp_area || address.accept_address" class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;" @tap.stop="shopaddress">
|
||||
{{address.accept_province}}{{address.accept_city}}{{address.accept_exp_area}}{{address.accept_address}}
|
||||
</view>
|
||||
<view v-else class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;" @tap.stop="shopaddress">
|
||||
<text>请填写收货地址</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 商品信息 -->
|
||||
<view class="messagebox box flex">
|
||||
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="detailsdata.cimage" mode="">
|
||||
</image>
|
||||
<view class="ml10 flex" style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{detailsdata.name}}</view>
|
||||
<view class="" style="color: #EF1857;">
|
||||
<text class="ft20 ftw500">{{detailsdata.price}}</text>
|
||||
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品信息选择 -->
|
||||
<view class="message_select box ">
|
||||
<view class="flex ml15 mr15" style="justify-content: space-between">
|
||||
<view class="ft14 ftw5000 cl-333">商品总价</view>
|
||||
<view class="ft14 ftw5000 cl-333">{{detailsdata.price}}积分</view>
|
||||
</view>
|
||||
<view class=" " style="width: 100%;height: 2rpx; background-color: #F7F8F9;margin: 36rpx 0;"></view>
|
||||
<view class="flex ml15 mr15" style="justify-content: space-between">
|
||||
<view class="ft14 ftw5000 cl-333">总运费</view>
|
||||
<view class="ft14 ftw5000 " style="color: #EF1857;">免运费</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class=" box " style="height: 100rpx;line-height: 100rpx;">
|
||||
<view class="flex ml15 mr15 alcenter" style="justify-content: space-between">
|
||||
<view class="ft14 ftw5000 cl-333">使用积分</view>
|
||||
<image style="width: 28rpx;height: 28rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/select_icon.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="box " style="height: 100rpx;line-height: 100rpx;width: 100%;">
|
||||
<view class="flex ml15 mr15 alcenter" style="justify-content: space-between">
|
||||
<view class="ft14 ftw5000 cl-333" style="width: 50%;">备注</view>
|
||||
<input class="uni-input" v-model="remark" placeholder="请输入内容" style="text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom_button ">
|
||||
<view style="height: 88rpx;display: flex;justify-content: space-between;width: 100%;align-items: baseline">
|
||||
<view class="" style="height: 80rpx;">
|
||||
<text class="ftw5000 ft14 cl-999" style="margin-left: 34rpx;margin-right: 20rpx;">共1件</text>
|
||||
<text class="ftw5000 ft14 cl-999">合计:</text>
|
||||
<text class="ftw5000 ft16 " style="color: #EF1857;">{{detailsdata.price}}</text>
|
||||
<text class="ftw5000 ft14 " style="color: #EF1857;">积分</text>
|
||||
</view>
|
||||
<view class="exchange button" @click="clickexchange">提交订单</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- <uni-popup type="center" ref="pointsyes">
|
||||
<view class="pointsyesbox">
|
||||
<view class="ft24">积分扣除成功</view>
|
||||
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||
</view>
|
||||
</uni-popup> -->
|
||||
<addresspopup ref="addresspopup" @replacement="replacement"></addresspopup>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import addresspopup from "@/pagesA/components/addresspopup.vue";
|
||||
export default {
|
||||
components: {
|
||||
addresspopup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
remark: "",
|
||||
detailsdata: {},
|
||||
address: {}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shanchu(e.id)
|
||||
},
|
||||
onShow(){
|
||||
this.getlist()
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
shanchu(id) {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/goods/info',
|
||||
methods: "POST",
|
||||
data: {
|
||||
goods_id: id
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
this.detailsdata = res.data
|
||||
console.log(this.detailsdata);
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
//获取快递地址
|
||||
getlist() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/address/list',
|
||||
data: this.data,
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
for (var i = 0; i < res.data.list.length; i++) {
|
||||
res.data.list[i].is_default = 0
|
||||
if (res.data.list[i].is_default == 1) {
|
||||
this.address = res.data.list[i]
|
||||
return
|
||||
} else if (i + 1 == res.data.list.length) {
|
||||
this.address = res.data.list[0]
|
||||
}
|
||||
}
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
shopaddress(){
|
||||
if(!this.address.accept_province || !this.address.accept_city || !this.address.accept_exp_area || !this.address.accept_address){
|
||||
this.navaddress();
|
||||
return;
|
||||
}
|
||||
this.$refs.addresspopup.addressshop(this.address)
|
||||
},
|
||||
|
||||
clickexchange() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/order/create',
|
||||
data: {
|
||||
goods_id: this.detailsdata.id,
|
||||
address_id: this.address.id,
|
||||
buy_num: 1,
|
||||
remark: this.remark
|
||||
},
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
uni.navigateTo({ //订单
|
||||
url: '/pagesA/integral/completeorder?id=' + res.data.order_id
|
||||
})
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
return
|
||||
this.$refs.pointsyes.open()
|
||||
},
|
||||
|
||||
navaddress() {
|
||||
uni.navigateTo({ //地址
|
||||
url: '/pagesA/integral/address'
|
||||
})
|
||||
},
|
||||
replacement(data){
|
||||
this.address = data
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||
padding-top: 54rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 356rpx;
|
||||
height: 356rpx;
|
||||
background-color: #F7F8F9;
|
||||
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 26rpx;
|
||||
}
|
||||
|
||||
.addressbox {
|
||||
height: 160rpx;
|
||||
padding-right: 28rpx;
|
||||
}
|
||||
|
||||
.messagebox {
|
||||
padding: 22rpx 24rpx;
|
||||
}
|
||||
|
||||
.message_select {
|
||||
padding: 40rpx 0;
|
||||
}
|
||||
|
||||
.bottom_button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.exchange {
|
||||
margin: 16rpx 28rpx 0 28rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
|
||||
}
|
||||
|
||||
.button {
|
||||
height: 80rpx;
|
||||
width: 312rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.pointsyesbox {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
.box {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,394 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||
订单详情
|
||||
</view>
|
||||
<view class="">
|
||||
<view class="flex alcenter ml15 mb10" v-if="orderdata.status == 0">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/payment_.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">待付款</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 1">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/distribution.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">待发货</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10 " v-else-if="orderdata.status == 2">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/deliver_goods.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">已发货</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 3">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">已完成</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 4">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">已取消</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 5">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">已退款</text>
|
||||
</view>
|
||||
|
||||
<view class="flex alcenter ml15 mb10" v-else-if="orderdata.status == 26">
|
||||
<image style="width: 72rpx;height: 72rpx;" src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/Successful.png" mode="">
|
||||
</image>
|
||||
<text class="ml10 ft22 ftw600 cl-333">兑换成功</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="content">
|
||||
<!-- 地址 -->
|
||||
<view class="addressbox box pt16 pb16">
|
||||
<view class="flex alcenter">
|
||||
<image style="width: 40rpx; height: 40rpx;margin-left: 12rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/address.png" mode=""></image>
|
||||
<text class="ft14 ftw500 cl-333" style="padding-left: 18rpx;">{{orderdata.accept_name}}</text>
|
||||
<text class="ft14 ftw500 cl-333 pl20">{{orderdata.accept_mobile}}</text>
|
||||
<uni-icons type="right" size="18" color="#333333" style="margin-left: auto;"></uni-icons>
|
||||
</view>
|
||||
<view class="ft14 ftw500 cl-999" style="margin-left: 70rpx;margin-top: 12rpx;">
|
||||
{{orderdata.accept_province}}{{orderdata.accept_city}}{{orderdata.accept_exp_area}}{{orderdata.accept_address}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品信息 -->
|
||||
<view class="messagebox box flex">
|
||||
<view class=""></view>
|
||||
<image style="width: 176rpx;height: 176rpx;border-radius: 14rpx;" :src="orderdata.cimage" mode="">
|
||||
</image>
|
||||
<view class="ml10 flex" style="width: 456rpx; flex-direction: column;justify-content: space-around">
|
||||
<view class="text-over2 ftw500 cl-333" style="font-size: 30rpx;">{{orderdata.goods_name}}</view>
|
||||
<view class="" style="color: #EF1857;">
|
||||
<text class="ft20 ftw500">{{orderdata.total_amount}}</text>
|
||||
<text class="ft14 ftw500" style="margin-left: 12rpx;">积分</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品信息选择 -->
|
||||
<view class="message_select box ">
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">商品总价</view>
|
||||
<view class="ft14 ftw5000 " style="color: #EF1857;">{{orderdata.total_amount}}积分</view>
|
||||
</view>
|
||||
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">总运费</view>
|
||||
<view class="ft14 ftw5000 cl-333">{{orderdata.delivery_fee == 0.00 ? '免费': orderdata.delivery_fee }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="boxitem " v-if="orderdata.express_no !==''">
|
||||
<view class="ft14 ftw5000 cl-333">物流单号</view>
|
||||
<view class="ft14 ftw5000 cl-333 alcenter flex" style="line-height: 30rpx;">
|
||||
<view class="" style="width: 380rpx; word-wrap:break-word;text-align: right;">
|
||||
{{orderdata.express_no}}
|
||||
</view>
|
||||
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.express_no)">
|
||||
</image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="boxitem" v-if="orderdata.order_no !==''">
|
||||
<view class="ft14 ftw5000 cl-333">订单编号</view>
|
||||
<view class="ft14 ftw5000 cl-333 alcenter">{{orderdata.order_no}}
|
||||
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(orderdata.order_no)"></image>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">支付方式</view>
|
||||
<view class="ft14 ftw5000 cl-333">积分</view>
|
||||
</view>
|
||||
<view class="boxitem" v-if="orderdata.addtime !==''">
|
||||
<view class="ft14 ftw5000 cl-333">下单时间</view>
|
||||
<view class="ft14 ftw5000 cl-333">{{orderdata.addtime}}</view>
|
||||
</view>
|
||||
<view class="boxitem" v-if="orderdata.addtime !==''">
|
||||
<view class="ft14 ftw5000 cl-333">备注</view>
|
||||
<view class="ft14 ftw5000 cl-333">{{orderdata.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="bottom_button ">
|
||||
|
||||
<view class="bottom_button" v-if="orderdata.is_pay == 1 && orderdata.status == 2">
|
||||
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
|
||||
<view class="exchange button" @click="queren">确认收货</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="bottom_button" v-else-if="orderdata.is_pay == 0">
|
||||
<view class="exchange practice" style="height: 80rpx;" @click="clickexchange">联系客服</view>
|
||||
<view class="exchange button" @click="getdeliveryOrder">立即兑换</view>
|
||||
</view>
|
||||
<view class="practices" @click="clickexchange" v-else-if="orderdata.is_pay == 1">联系客服</view>
|
||||
</view>
|
||||
|
||||
<uni-popup type="center" ref="pointsyes">
|
||||
<view class="pointsyesbox">
|
||||
<view class="ft16" style="margin-top: 30rpx;">
|
||||
<text>客服电话:</text>
|
||||
<text>{{serviceInfo.service_mobile}}</text>
|
||||
<image style="width: 28rpx;height: 28rpx;padding-left: 14rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/copy.png" mode="" @click="copy(serviceInfo.service_mobile)">
|
||||
</image>
|
||||
</view>
|
||||
<view class="button" style="margin-top: 92rpx;padding: 20rpx 0;" @click="navorder">确定</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
remark: "",
|
||||
id: "",
|
||||
orderdata: {},
|
||||
serviceInfo: {}
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
console.log(e);
|
||||
this.id = e.id
|
||||
this.getorderinfo()
|
||||
this.getserviceInfo()
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
//获取订单详情
|
||||
getorderinfo() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/order/info',
|
||||
methods: "POST",
|
||||
data: {
|
||||
order_id: this.id,
|
||||
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
console.log(res);
|
||||
this.orderdata = res.data.info
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
//支付订单
|
||||
getdeliveryOrder() {
|
||||
this.$httpRequest({
|
||||
url: '/api/pay/deliveryOrder',
|
||||
methods: "POST",
|
||||
data: {
|
||||
order_id: this.id,
|
||||
},
|
||||
}).then(res => {
|
||||
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: "商品兑换成功",
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
this.getorderinfo()
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
},
|
||||
|
||||
getserviceInfo() { //app信息拿取电话
|
||||
this.$httpRequest({
|
||||
url: "/api/user/serviceInfo",
|
||||
method: "GET"
|
||||
}).then(res => {
|
||||
this.serviceInfo = res.data;
|
||||
})
|
||||
},
|
||||
queren() {
|
||||
this.$httpRequest({
|
||||
url: "/api/delivery/order/receive",
|
||||
method: "POST",
|
||||
data: {
|
||||
order_id: this.id,
|
||||
},
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: "已确认收货",
|
||||
icon: 'none',
|
||||
duration: 3000
|
||||
})
|
||||
this.getorderinfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
clickexchange() {
|
||||
this.$refs.pointsyes.open()
|
||||
},
|
||||
|
||||
navorder() {
|
||||
this.$refs.pointsyes.close()
|
||||
},
|
||||
|
||||
navaddress() {
|
||||
uni.navigateTo({ //订单
|
||||
url: '/pagesA/integral/address'
|
||||
})
|
||||
},
|
||||
|
||||
copy(value) {
|
||||
uni.setClipboardData({
|
||||
data: value, //要被复制的内容
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||
padding-top: 58rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 356rpx;
|
||||
/* height: 356rpx; */
|
||||
background-color: #F7F8F9;
|
||||
padding-bottom: 160rpx;
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 0 26rpx;
|
||||
}
|
||||
|
||||
.addressbox {
|
||||
height: 160rpx;
|
||||
padding-right: 28rpx;
|
||||
}
|
||||
|
||||
.messagebox {
|
||||
padding: 22rpx 24rpx;
|
||||
}
|
||||
|
||||
.message_select {}
|
||||
|
||||
.bottom_button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.exchange {
|
||||
margin: 16rpx 28rpx 0 28rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
|
||||
}
|
||||
|
||||
.button {
|
||||
height: 80rpx;
|
||||
width: 312rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.pointsyesbox {
|
||||
width: 500rpx;
|
||||
height: 300rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
text-align: center;
|
||||
padding: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.practice {
|
||||
height: 80rpx;
|
||||
width: 312rpx;
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
color: #000000;
|
||||
border: 2rpx solid #D8D8D8;
|
||||
}
|
||||
|
||||
.practices {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx;
|
||||
|
||||
border: 2rpx solid #D8D8D8;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin: 14rpx 80rpx 0 80rpx;
|
||||
}
|
||||
|
||||
.boxitem {
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
justify-content: space-between;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 2rpx solid #F7F8F9;
|
||||
}
|
||||
|
||||
|
||||
.box {
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,223 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#ffffff" @click="navBack"></uni-icons>
|
||||
积分商城
|
||||
</view>
|
||||
<view class="integralbox">
|
||||
<view class="integral_top">
|
||||
<view class="ftw500" style="font-size: 72rpx;color: #333;">{{score}}</view>
|
||||
<view class="ftw500 ft12" style="color: #846666;">当前积分</view>
|
||||
</view>
|
||||
|
||||
<view class="integral_bottom">
|
||||
<view class="flex wrap">
|
||||
<view class="integral_itme flex alcenter plr15" style="flex-direction: column"
|
||||
@click="navpointsdetail">
|
||||
<image class="barIcon" style="width: 64rpx;height: 64rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/js.png" mode="scaleToFill">
|
||||
</image>
|
||||
<view class="">积分明细</view>
|
||||
</view>
|
||||
<view class="integral_itme flex alcenter plr15" style="flex-direction: column" @click="navOrder">
|
||||
<image class="barIcon" style="width: 64rpx;height: 64rpx;"
|
||||
src="https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jsdd.png" mode="scaleToFill">
|
||||
</image>
|
||||
<view class="">订单记录</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="exchange" @click="shopjing">
|
||||
<view class="">兑换金豆</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="exclusive mt12 mb16" @click="exclusive">
|
||||
<view class="exclusiveitem flex alcenter space">
|
||||
<view class="">恒泰业主专享</view>
|
||||
<image style="width: 20rpx;height: 20rpx;" src="https://yaohe666.com/static/jf/right_ionc.png" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="articles">
|
||||
<integral-articles :Commodity="listData"></integral-articles>
|
||||
</view>
|
||||
<integralTrade ref="integral" @success="getuser"> </integralTrade>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import integralArticles from "@/pagesA/components/integralArticles.vue"
|
||||
import integralTrade from "@/pagesA/components/integralTrade.vue"
|
||||
export default {
|
||||
components: {
|
||||
integralArticles,
|
||||
integralTrade
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
listData: [],
|
||||
Commodity: [],
|
||||
score:"",
|
||||
pages: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
allPage: 1,
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.Commodity = this.list
|
||||
this.getgoods()
|
||||
},
|
||||
onShow(){
|
||||
this.getuser()
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
exclusive() {
|
||||
uni.navigateTo({ //专享
|
||||
url: '/pagesA/integral/Exclusive?name=' + "恒泰业主专享"
|
||||
})
|
||||
},
|
||||
navpointsdetail() { //明细
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/integral/pointsdetail'
|
||||
})
|
||||
},
|
||||
navOrder() { //订单
|
||||
uni.navigateTo({
|
||||
url: '/pagesA/integral/Order'
|
||||
})
|
||||
},
|
||||
shopjing() {
|
||||
this.$refs.integral.pointsyesshop()
|
||||
},
|
||||
//获取 用户积分
|
||||
getuser() {
|
||||
this.$httpRequest({
|
||||
url: '/api/user/index',
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
console.log(res.data.score);
|
||||
this.score = res.data.score
|
||||
}).catch(err => {
|
||||
})
|
||||
},
|
||||
//获取 商品
|
||||
getgoods(){
|
||||
let that = this;
|
||||
that.$httpRequest({
|
||||
url: '/api/delivery/goods/list',
|
||||
methods: "POST",
|
||||
data: {
|
||||
page: that.pages.currentPage,
|
||||
limit: that.pages.pageSize,
|
||||
},
|
||||
}).then(res => {
|
||||
if(res.code == 1){
|
||||
if (that.pages.currentPage == 1) {
|
||||
that.listData = res.data.list;
|
||||
that.pages.allPage = Math.ceil(res.data.total / that.pages.pageSize);
|
||||
} else {
|
||||
that.listData.push(...res.data.list)
|
||||
}
|
||||
this.pages.currentPage++;
|
||||
}
|
||||
}).catch(err => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pages.currentPage <= this.pages.allPage) {
|
||||
this.getgoods();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.page {
|
||||
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jf_bg.png);
|
||||
background-size: 100% 389rpx;
|
||||
height: 389rpx;
|
||||
padding-top: 44rpx;
|
||||
background-color: #F7F8F9;
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 128rpx;
|
||||
line-height: 128rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.integralbox {
|
||||
background-image: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/jb_bg1.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: 700rpx 392rpx;
|
||||
margin: 0 25rpx;
|
||||
height: 389rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.integral_top {
|
||||
margin-top: 36rpx;
|
||||
margin-left: 88rpx;
|
||||
}
|
||||
|
||||
.integral_bottom {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.exchange {
|
||||
width: 240rpx;
|
||||
height: 80rpx;
|
||||
background: linear-gradient(90deg, #FFA100 0%, #FFD11E 100%);
|
||||
border-radius: 40rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
margin-right: 34rpx;
|
||||
}
|
||||
|
||||
.exclusiveitem {
|
||||
margin: 0 25rpx;
|
||||
width: 700rpx;
|
||||
height: 100rpx;
|
||||
padding: 0 24rpx 0 32rpx;
|
||||
background: linear-gradient(158deg, #FFF7EA 0%, #FFFFFF 100%);
|
||||
border-radius: 24rpx;
|
||||
}
|
||||
|
||||
.articles {
|
||||
/* margin: 0 25rpx; */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="message_select box ">
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">收货人</view>
|
||||
<input class="uni-input" style="width: 440rpx;" v-model="data.accept_name" placeholder="请输入收货人姓名" />
|
||||
</view>
|
||||
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">手机号</view>
|
||||
<input class="uni-input" style="width: 440rpx;" type="number" maxlength="11" v-model="data.accept_mobile" placeholder="请输入手机号码" />
|
||||
</view>
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">所在地区</view>
|
||||
<pick-regions :defaultRegion="defaultRegionCode" @getRegion="handleGetRegion">
|
||||
<view class="flex alcenter" style="width: 440rpx; justify-content: space-between;color: grey;">
|
||||
|
||||
<text v-if="data.accept_province==''">请选择省、市、区</text>
|
||||
<text v-else
|
||||
style="color: #191919; line-height: 30rpx;">{{data.accept_province}},{{data.accept_city}},{{data.accept_exp_area}}</text>
|
||||
|
||||
<uni-icons class="backIcon" type="right" size="18" color="#333333"></uni-icons>
|
||||
</view>
|
||||
</pick-regions>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">详细地址</view>
|
||||
<input class="uni-input" style="width: 440rpx;" v-model="data.accept_address" placeholder="请输入详细地址" />
|
||||
</view>
|
||||
|
||||
<view class="boxitem">
|
||||
<view class="ft14 ftw5000 cl-333">设置默认地址</view>
|
||||
<switch :checked="checkeddata" @change="switch1Change" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="bottom_button " v-if="type == 1">
|
||||
<view class="practices button" @click="baocun">保存</view>
|
||||
</view>
|
||||
<view class="bottom_button" v-else>
|
||||
<view class="baocun1 button" @click="shanchu">删除</view>
|
||||
<view class="baocun2 button" @click="xiugai">修改</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pickRegions from '@/pagesA/components/pick-regions/pick-regions.vue'
|
||||
export default {
|
||||
components: {
|
||||
pickRegions
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
data: {
|
||||
accept_name: "",
|
||||
accept_mobile: "",
|
||||
accept_province: "",
|
||||
accept_city: "",
|
||||
accept_exp_area: "",
|
||||
accept_address: "",
|
||||
is_default: 0,
|
||||
},
|
||||
defaultRegionCode: '100000',
|
||||
type: 1,
|
||||
ids: "",
|
||||
checkeddata: true
|
||||
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
let data = JSON.parse(e.data)
|
||||
|
||||
|
||||
if (data.is_default == 1) {
|
||||
this.checkeddata = true
|
||||
} else {
|
||||
this.checkeddata = false
|
||||
}
|
||||
if (e.type == 1) {
|
||||
this.type == 1
|
||||
uni.setNavigationBarTitle({
|
||||
title: "新增地址"
|
||||
})
|
||||
} else {
|
||||
this.type = 2
|
||||
uni.setNavigationBarTitle({
|
||||
title: "修改地址"
|
||||
})
|
||||
|
||||
this.ids = data.id
|
||||
this.data.accept_name = data.accept_name
|
||||
this.data.accept_mobile = data.accept_mobile
|
||||
this.data.accept_province = data.accept_province
|
||||
this.data.accept_city = data.accept_city
|
||||
this.data.accept_exp_area = data.accept_exp_area
|
||||
this.data.accept_address = data.accept_address
|
||||
this.data.is_default = data.is_default
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
switch1Change(e) {
|
||||
if (e.detail.value) {
|
||||
this.data.is_default = 1
|
||||
this.checkeddata = e.detail.value
|
||||
|
||||
} else {
|
||||
this.data.is_default = 0
|
||||
this.checkeddata = e.detail.value
|
||||
}
|
||||
},
|
||||
// 获取选择的地区
|
||||
handleGetRegion(region) {
|
||||
this.data.accept_province = region[0].name
|
||||
this.data.accept_city = region[1].name
|
||||
this.data.accept_exp_area = region[2].name
|
||||
},
|
||||
baocun() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/address/add',
|
||||
data: this.data,
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: "创建成功",
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
uni.navigateBack(1);
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
shanchu() {
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/address/del',
|
||||
data: {
|
||||
id: this.ids
|
||||
},
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: "删除成功",
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
uni.navigateBack(1)
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
xiugai() {
|
||||
this.data.id = this.ids
|
||||
this.$httpRequest({
|
||||
url: '/api/delivery/address/edit',
|
||||
data: this.data,
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
if (res.code == 1) {
|
||||
uni.showToast({
|
||||
title: "修改成功",
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
}).catch(err => {
|
||||
console.log('bind user err');
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {}
|
||||
|
||||
.message_select {
|
||||
margin: 25rpx;
|
||||
width: 700rpx;
|
||||
}
|
||||
|
||||
.boxitem {
|
||||
display: flex;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 30rpx;
|
||||
border-bottom: 2rpx solid #F7F8F9;
|
||||
}
|
||||
|
||||
.bottom_button {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 160rpx;
|
||||
z-index: 1;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.practices {
|
||||
height: 80rpx;
|
||||
width: 100%;
|
||||
border-radius: 40rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin: 14rpx 80rpx 0 80rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.baocun1 {
|
||||
height: 80rpx;
|
||||
width: 45%;
|
||||
border-radius: 40rpx;
|
||||
border: 2rpx solid #D8D8D8;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin: 14rpx 40rpx 0 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.baocun2 {
|
||||
height: 80rpx;
|
||||
width: 45%;
|
||||
border-radius: 40rpx;
|
||||
background: linear-gradient(123deg, #00E075 0%, #09D89E 100%);
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
margin: 14rpx 40rpx 0 40rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,260 @@
|
||||
<template>
|
||||
<view class="pagesContent">
|
||||
<view class="navBack">
|
||||
<uni-icons class="backIcon" type="left" size="24" color="#333333" @click="navBack"></uni-icons>
|
||||
积分明细
|
||||
</view>
|
||||
<view class="box flex alcenter"
|
||||
style="height: 120rpx; margin: 0 26rpx; width: 700rpx;justify-content: space-between">
|
||||
<view class="flex alcenter" style="margin-left: 36rpx;">
|
||||
<text class="ft14 ftw500" style="color: #666666;">积分余额:</text>
|
||||
<text class="ft24 ftw600 cl-333">{{score}}</text>
|
||||
</view>
|
||||
<view class="ft14 ftw500" style="margin-right: 36rpx; border: 2rpx solid #09D89E;width: 172rpx;
|
||||
height: 60rpx; text-align: center; line-height: 60rpx; color: #09D89E;border-radius: 12rpx;" @click="shopjing">兑换金豆
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="typeTab">
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==2}]" @click="changeType(2)">收入明细</view>
|
||||
<view :class="['typeItem',{'typeCheck':typeCheck==1}]" @click="changeType(1)">支出明细</view>
|
||||
</view>
|
||||
|
||||
<view class="myList">
|
||||
<view class="lineItem" v-for="(item,index) in listData" :key="item.id">
|
||||
<view class="lineInfo">
|
||||
<view class="lineName">{{item.memo}}</view>
|
||||
<view class="lineDescribe">{{item.createtime}}</view>
|
||||
</view>
|
||||
<view class="lineNum">{{item.score}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-load-more :status="status" :content-text="contentText" />
|
||||
</view>
|
||||
<integralTrade ref="integral"> </integralTrade>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import integralTrade from "@/pagesA/components/integralTrade.vue"
|
||||
export default {
|
||||
components: {
|
||||
integralTrade
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
remark: "",
|
||||
typeCheck: 2,
|
||||
listData: [],
|
||||
pages: {
|
||||
currentPage: 1,
|
||||
pageSize: 10,
|
||||
allPage: 1,
|
||||
},
|
||||
status: 'more',
|
||||
contentText: {
|
||||
contentdown: "上拉显示更多",
|
||||
contentrefresh: "正在加载...",
|
||||
contentnomore: "没有更多数据了"
|
||||
},
|
||||
score:"",
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.status = 'more';
|
||||
this.changeType(2)
|
||||
this.getuser()
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.pages.currentPage <= this.pages.allPage) {
|
||||
this.getuserscoreinfo()
|
||||
this.status = 'more';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack(1);
|
||||
},
|
||||
changeType(item) {
|
||||
this.typeCheck = item
|
||||
this.getuserscoreinfo()
|
||||
},
|
||||
getuserscoreinfo() {
|
||||
this.status = 'loading';
|
||||
this.$httpRequest({
|
||||
url: '/api/user/userscoreinfo',
|
||||
methods: "POST",
|
||||
data: {
|
||||
page: this.pages.currentPage,
|
||||
limit: this.pages.pageSize,
|
||||
type: this.typeCheck
|
||||
},
|
||||
}).then(res => {
|
||||
this.status = ''
|
||||
if (this.pages.currentPage == 1) {
|
||||
this.listData = res.rows;
|
||||
this.pages.allPage = Math.ceil(res.data.total / this.pages.pageSize);
|
||||
} else if (res.rows.length > 0) {
|
||||
this.listData.push(...res.rows)
|
||||
} else {
|
||||
this.status = 'noMore';
|
||||
this.pages.isNextPage = 1;
|
||||
}
|
||||
this.pages.currentPage++;
|
||||
}).catch(err => {
|
||||
this.status = '';
|
||||
})
|
||||
},
|
||||
//获取 用户积分
|
||||
getuser() {
|
||||
this.$httpRequest({
|
||||
url: '/api/user/index',
|
||||
methods: "POST",
|
||||
}).then(res => {
|
||||
console.log(res.data.score);
|
||||
this.score = res.data.score
|
||||
}).catch(err => {})
|
||||
},
|
||||
|
||||
shopjing() {
|
||||
this.$refs.integral.pointsyesshop()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.pagesContent {
|
||||
background: url(https://wx.yaohe.hnjrdzkj.xyz/static/wechat/shop/wechat/static/order_bg.png);
|
||||
padding-top: 58rpx;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 750rpx 356rpx;
|
||||
background-color: #Ffffff;
|
||||
min-height: 100vh;
|
||||
|
||||
}
|
||||
|
||||
.navBack {
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
position: absolute;
|
||||
left: 16rpx;
|
||||
top: 0rpx;
|
||||
}
|
||||
|
||||
.content {
|
||||
padding: 0 26rpx;
|
||||
/* background-color: #Ffffff; */
|
||||
}
|
||||
|
||||
.typeTab {
|
||||
padding: 0 42rpx;
|
||||
padding-top: 80rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.typeItem {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 40rpx;
|
||||
margin-right: 70rpx;
|
||||
}
|
||||
|
||||
.typeCheck {
|
||||
color: #333333;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.typeCheck:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 48rpx;
|
||||
height: 4px;
|
||||
background-color: #333333;
|
||||
bottom: -16rpx;
|
||||
left: calc(50% - 30rpx);
|
||||
}
|
||||
|
||||
|
||||
.lineImg {
|
||||
width: 192rpx;
|
||||
height: 240rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.lineName {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 48rpx;
|
||||
|
||||
}
|
||||
|
||||
.lineDescribe {
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
|
||||
.lineNum {
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #EF1857;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.lineItem {
|
||||
display: flex;
|
||||
padding-top: 24rpx;
|
||||
padding-bottom: 30rpx;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #F7F8F9;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.noListData {
|
||||
position: absolute;
|
||||
top: 40vh;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
font-size: 0;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.noImg {
|
||||
width: 314rpx;
|
||||
height: 228rpx;
|
||||
}
|
||||
|
||||
.noText {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 255, 255, 0.24);
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user