Browse Source

commit

master
jiangcaijun 1 year ago
parent
commit
12701b891e
11 changed files with 354 additions and 287 deletions
  1. +7
    -12
      components/active-card/address-list.vue
  2. +55
    -21
      components/active-card/order-list.vue
  3. +10
    -14
      pages.json
  4. +3
    -14
      pages/home/index.vue
  5. +32
    -0
      pages/my/kanwudetails.vue
  6. +12
    -10
      pages/my/kanwus.vue
  7. +0
    -22
      pages/my/my-kanwu-details.vue
  8. +0
    -22
      pages/my/my-order-details.vue
  9. +0
    -172
      pages/my/my-order-list.vue
  10. +116
    -0
      pages/my/orderdetails.vue
  11. +119
    -0
      pages/my/orders.vue

+ 7
- 12
components/active-card/address-list.vue View File

@ -1,14 +1,8 @@
<template>
<view class="active-card">
<view class="active-title">{{item.name}}</view>
<view class="active-card" @click="seeDetail">
<view class="active-title">{{item.name}}</view>
<view class="active-time flex align-center">
<text>电话{{item.phone}}</text>
</view>
<view class="active-time flex align-center">
<text>地址{{item.region}}</text>
</view>
<view class="active-time flex align-center">
<text>详细地址{{item.detailAddress}}</text>
<text>{{item.text}}</text>
</view>
</view>
</template>
@ -53,11 +47,12 @@
.active-title {
word-wrap:break-word;
word-break:break-all;
font-size: 32rpx;
font-size: 28rpx;
color: #000;
font-weight: 700;
margin-top: 20rpx;
margin-bottom: 20rpx;
line-height: 60rpx;
padding-left: 10rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -67,7 +62,7 @@
word-wrap:break-word;
word-break:break-all;
color: #707070;
font-size: 28rpx;
font-size: 24rpx;
margin: 20rpx 0;
image {
width: 33rpx;


+ 55
- 21
components/active-card/order-list.vue View File

@ -1,29 +1,28 @@
<template>
<view class="active-card">
<view class="active-title">{{item.title}}</view>
<view class="active-time flex align-center">
<text>商品{{item.shopName}}</text>
</view>
<view class="active-add flex align-center">
<text>地址{{item.addressText}}</text>
</view>
<view class="active-add flex align-center">
<text>价格{{item.price}}</text>
</view>
<view class="active-add flex align-center">
<text>数量{{item.num}}</text>
</view>
<view class="active-add flex align-center" v-if="item.type == 1">
<text>类型微信订单</text>
<view class="order-status">已退款</view>
<view class="active-title">
<text class="font-32">订单编号{{item.tranNo}}</text>
</view>
<view class="active-add flex align-center" v-else>
<text>类型积分订单</text>
<view class="active-time flex align-center">
<text>下单时间2023-08-16 12:16:31</text>
</view>
<view class="active-title">
<text>订购项目数学+试卷</text>
</view>
<view class="active-time2 flex align-center">
<text>下单时间{{item.createTime}}</text>
<text>订单金额¥0.01</text>
</view>
<view class="footer">
<view @click="toShouhou" class="order-botton gray">售后退款</view>
<view @click="seeDetail" class="order-botton red">订单详情</view>
</view>
</view>
</template>
@ -47,8 +46,11 @@
}
},
methods:{
seeDetail(){
seeDetail() {
this.$emit('seeDetail',this.item)
},
toShouhou() {
}
}
}
@ -61,13 +63,35 @@
border-radius: 12rpx;
box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16);
overflow: hidden;
padding-bottom: 10rpx;
padding: 10rpx;
margin-bottom: 20rpx;
position: relative;
.order-status{
position: absolute;
right: 18rpx;
top: 50rpx;
font-size: 24rpx;
color: red;
}
.order-botton {
font-size: 24rpx;
color: red;
padding: 10rpx;
width: 100rpx;
line-height: 40rpx;
border-radius: 30rpx;
text-align: center;
margin-left: 10rpx;
float: right;
border: 1rpx solid #ccc;
}
.active-title {
word-wrap:break-word;
word-break:break-all;
font-size: 32rpx;
font-size: 28rpx;
color: #000;
font-weight: 700;
margin-top: 20rpx;
@ -156,4 +180,14 @@
}
}
}
.red {
border-color: red !important;
color: red !important;
}
.gray {
border-color: #999 !important;
color: #888 !important;
}
</style>

+ 10
- 14
pages.json View File

@ -13,31 +13,27 @@
}
},
{
"path": "pages/my/login-kehu",
"path": "pages/my/kanwus",
"style": {
"navigationBarTitleText": "登录"
}
},{
"path": "pages/my/my-order-list",
"style": {
"navigationBarTitleText": "订阅历史"
"navigationBarTitleText": "刊物目录"
}
},{
"path": "pages/my/my-order-details",
},
{
"path": "pages/my/kanwudetails",
"style": {
"navigationBarTitleText": "订单详情"
"navigationBarTitleText": "刊物详情"
}
},
{
"path": "pages/my/my-kanwu-list",
"path": "pages/my/orders",
"style": {
"navigationBarTitleText": "刊物目录"
"navigationBarTitleText": "订阅记录"
}
},
{
"path": "pages/my/my-kanwu-details",
"path": "pages/my/orderdetails",
"style": {
"navigationBarTitleText": "刊物详情"
"navigationBarTitleText": "订阅详情"
}
}
],


+ 3
- 14
pages/home/index.vue View File

@ -111,21 +111,10 @@
onLoad() {
},
onPullDownRefresh() {
},
onReachBottom() {
},
onPullDownRefresh() {
},
// h5
onReady() {
this.$com.displayNav()
},
methods:{
//
checkboxChange(e) {
let values = e.detail.value;
if (values[0] == 1) {
@ -150,13 +139,13 @@
//
seeDetail(){
uni.navigateTo({
url:`/pages/my/my-kanwu-list`
url:`/pages/my/kanwus`
})
},
//
newDetail(){
uni.navigateTo({
url:`/pages/my/my-order-list`
url:`/pages/my/orders`
})
},
lower(){
@ -210,7 +199,7 @@
text-align: justify;
text-align-last: justify;
line-height: 68rpx;
width: 68rpx;
width: 88rpx;
padding: 0 24rpx;
}
input{


+ 32
- 0
pages/my/kanwudetails.vue View File

@ -0,0 +1,32 @@
<template>
<view class="home-pages">
<view class="context">
<rich-text :nodes="nodes"></rich-text>
</view>
</view>
</template>
<script>
export default {
data() {
return {
nodes: "<p><strong>语文 人教版</strong></p><p><strong>商品价格:¥39</strong></p><p><strong>商品原价:¥39</strong></p><p>订阅须知:</p><p>本公司提供的小学语文、数学、英语报纸均为四开四版彩色周报,每学期20期报纸+4张月考试卷,合计39元/套,订阅成功后将按照每4期为一次,共分六次配送,订阅时请注意以下几点:</p><p>一、订阅时间,以学期为单位分为两个时间段</p><p>1、期末预定:每学期期未预订下学期报纸,预订的报纸按以下时间配送。(第一周配送1-4期,后5次将每隔三周左右配送一次.)</p><p>2、开学前后订阅: 每学期开学前一周和开学后的第一个月内订阅,报纸配送的时间为订阅成功后一周左右配送1-4期的报纸,后续报纸均与预订报纸配送的时间一致。</p><p>、配送方式:班级集体订阅报纸,本公司直接配送到学校,更好的方便学生与教学同步使用报纸 (免收配送费)。</p><p>客服电话: 15819859838</p>"
}
},
methods: {
}
}
</script>
<style>
.home-pages {
padding: 28rpx 29rpx 0;
min-height: 80vh;
background-color: #F7F7F7;
}
.context {
padding: 20rpx;
background-color: #FFF;
}
</style>

pages/my/my-kanwu-list.vue → pages/my/kanwus.vue View File

@ -27,27 +27,25 @@
},
list:[
{
name:"刊物名称",
text:"刊物信息"
name:"语文学习报+试卷",
text:"【人教版】每学期20期彩色周报及4张单元试卷"
},
{
name:"刊物名称",
text:"刊物信息"
name:"数学学习报+试卷",
text:"【湘教版】每学期20期彩色周报及4张单元试卷"
},{
name:"刊物名称",
text:"刊物信息"
name:"英语学习报+试卷",
text:"【北大师版】每学期26期彩色周报及14张单元试卷"
}
]
}
},
onLoad() {
// this.list = [];
this.params.pageNo = 1;
this.params.total = null;
this.params.isLock = true;
},
// h5
onReady() {
this.$com.displayNav()
},
@ -74,8 +72,11 @@
}
},
methods:{
seeDetail(item){
uni.navigateTo({
url:`/pages/my/kanwudetails`
})
}
}
}
</script>
@ -83,6 +84,7 @@
<style lang="scss" scoped>
.home-pages {
padding: 28rpx 29rpx 0;
min-height: 80vh;
background-color: #F7F7F7;
.swiper{

+ 0
- 22
pages/my/my-kanwu-details.vue View File

@ -1,22 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

+ 0
- 22
pages/my/my-order-details.vue View File

@ -1,22 +0,0 @@
<template>
<view>
</view>
</template>
<script>
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
</style>

+ 0
- 172
pages/my/my-order-list.vue View File

@ -1,172 +0,0 @@
<template>
<view class="home-pages">
<view style="color: #707070;
font-size: 28rpx;">
</view>
<view class="home-content">
<u-tabs
:list="tabList"
lineWidth="70"
lineHeight="3"
lineColor= "#00CCCC"
:activeStyle="{
color: '#000000',
fontWeight: 'bold',
transform: 'scale(1.35)'
}"
:inactiveStyle="{
color: '#000000',
transform: 'scale(1)'
}"
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;"
@click="tabClick"
>
</u-tabs>
<scroll-view scroll-y="true" class="scroll-y"
<card v-for="(item,i) in list" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></card>
</scroll-view>
</view>
</view>
</template>
<script>
import card from '@/components/active-card/order-list.vue'
export default{
components:{
card,
},
data(){
return{
params:{
pageNo:1,
state:'0',
pageSize:10,
total: null,
isLock: true
},
current:0,
list:[],
tabList: [
{
id:'0',
name:'未支付'
},
{
id:'1',
name:'已支付'
},
{
id:'2',
name:'已发货'
},
{
id:'3',
name:'已收货'
}
]
}
},
onLoad() {
this.list = [];
this.params.state = "0";
this.params.pageNo = 1;
this.params.total = null;
this.params.isLock = true;
this.queryPageListJobRelease();
},
// h5
onReady() {
this.$com.displayNav()
},
onPullDownRefresh() {
this.list = [];
this.params.pageNo = 1;
this.params.total = null;
this.params.isLock = true;
this.queryPageListJobRelease()
},
onReachBottom() {
if(this.params.isLock){
this.params.isLock = false;
if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){
this.$Toast('没有更多数据了哦!');
setTimeout(()=>{
this.params.isLock = true;
},3000)
return
}
this.params.pageNo+=1;
this.$Toast('数据加载成功!');
this.queryPageListJobRelease();
}
},
methods:{
queryPageListJobRelease(){//
if(this.pageNo>1){
uni.showLoading({})
}
this.$api('getOrderList',this.params)
.then(res=>{
if(res.code == 200){
if(this.params.total== null) {
this.params.total = res.result.total
}
if(this.params.pageNo>1){
uni.hideLoading();
}
this.list = this.list.concat(res.result.records);
this.params.isLock = true;
}else {
if(this.params.pageNo>1){
uni.hideLoading();
}
this.params.isLock = true;
}
})
},
tabClick(e){
this.params.state = e.id;
this.params.pageNo =1;
this.list = [];
this.queryPageListJobRelease();
},
}
}
</script>
<style lang="scss" scoped>
.home-pages {
padding: 28rpx 29rpx 0;
background-color: #F7F7F7;
.swiper{
position: relative;
height: calc(100% -7vh);
width: 100%;
height: 1800px;
}
.scroll-Y {
height: calc(300vh - 660rpx);
padding-top: 20rpx;
}
.home-content {
.active-card{
margin-top: 20rpx;;
border-radius: 0;
border: none;
border-style: none;
box-shadow: none;
}
}
}
</style>

+ 116
- 0
pages/my/orderdetails.vue View File

@ -0,0 +1,116 @@
<template>
<view class="home-content">
<view class="gray-line"/>
<view class="from">
<view class="from-line">
<span class="label-class">订单编号:</span>
<view><input v-model="release.tranNo"/></view>
</view>
<view class="from-line">
<span class="label-class">创建时间:</span>
<view><input v-model="release.createTime"/></view>
</view>
<view class="from-line">
<span class="label-class">姓名:</span>
<view><input v-model="release.name"/></view>
</view>
<view class="from-line">
<span class="label-class">联系方式:</span>
<view><input v-model="release.mobile"/></view>
</view>
<view class="from-line">
<span class="label-class">学校:</span>
<view><input v-model="release.shool"/></view>
</view>
<view class="from-line">
<span class="label-class">年级:</span>
<view><input v-model="release.nclass"/></view>
</view>
<view class="from-line">
<span class="label-class">班级:</span>
<view><input v-model="release.class"/></view>
</view>
</view>
<view class="gray-line"/>
<view class="from">
<view class="from-line">
<span class="label-class">订阅内容</span>
</view>
<view class="form-context">
¥ 39.00 数学 + 试卷 共21份试卷
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
release:{
tranNo: "7368742356479233423",
createTime: "2031-09-09 22:10:09",
name: "廖",
mobile: "1992898292",
shool: "花样年华华盖中学",
nclass: "高中一年级",
class: "1409班"
}
}
},
methods: {
}
}
</script>
<style lang="scss" scoped>
.home-content {
.gray-line {
width: 100vw;
height: 10rpx;
background-color: #F0F0F0;
}
.from {
margin-top: 20rpx;
background-color: #FFFFFF;
padding: 25rpx;
}
.from-line {
height: 78rpx;
display: flex;
background-color: #FFFFFF;
.label-class{
line-height: 68rpx;
width: 148rpx;
color: #333;
}
input{
padding-left: 10rpx;
height: 68rpx;
color: #aaa;
}
}
.form-context{
padding: 36rpx;
color: #888;
font-size: 30rpx;
}
}
</style>

+ 119
- 0
pages/my/orders.vue View File

@ -0,0 +1,119 @@
<template>
<view class="home-pages">
<view class="home-content">
<card v-for="(item,i) in list" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></card>
</view>
</view>
</template>
<script>
import card from '@/components/active-card/order-list.vue'
export default{
components:{
card,
},
data(){
return{
params:{
pageNo:1,
state:'0',
pageSize:10,
total: null,
isLock: true
},
current:0,
list:[{tranNo: "69732894782348932"},{tranNo: "69732894782348931"}],
}
},
onLoad() {
this.params.state = "0";
this.params.pageNo = 1;
this.params.total = null;
this.params.isLock = true;
this.queryPageListJobRelease();
},
onReady() {
this.$com.displayNav()
},
onPullDownRefresh() {
this.list = [];
this.params.pageNo = 1;
this.params.total = null;
this.params.isLock = true;
this.queryPageListJobRelease()
},
onReachBottom() {
if(this.params.isLock){
this.params.isLock = false;
if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){
this.$Toast('没有更多数据了哦!');
setTimeout(()=>{
this.params.isLock = true;
},3000)
return
}
this.params.pageNo+=1;
this.$Toast('数据加载成功!');
this.queryPageListJobRelease();
}
},
methods:{
queryPageListJobRelease(){//
// if(this.pageNo>1){
// uni.showLoading({})
// }
// this.$api('getOrderList',this.params)
// .then(res=>{
// if(res.code == 200){
// if(this.params.total== null) {
// this.params.total = res.result.total
// }
// if(this.params.pageNo>1){
// uni.hideLoading();
// }
// this.list = this.list.concat(res.result.records);
// this.params.isLock = true;
// }else {
// if(this.params.pageNo>1){
// uni.hideLoading();
// }
// this.params.isLock = true;
// }
// })
},
tabClick(e){
// this.params.state = e.id;
// this.params.pageNo =1;
// this.list = [];
// this.queryPageListJobRelease();
},
seeDetail(item){
uni.navigateTo({
url:`/pages/my/orderdetails`
})
}
}
}
</script>
<style lang="scss" scoped>
.home-pages {
padding: 28rpx 29rpx 0;
background-color: #F7F7F7;
min-height: 80vh;
.home-content {
min-height: 80vh;
.active-card{
margin-top: 20rpx;;
border-radius: 0;
border: none;
border-style: none;
box-shadow: none;
}
}
}
</style>

Loading…
Cancel
Save