用户管理购物车、地址增加假数据

master
panqihua 2 years ago
parent 724c6ff816
commit ab8a2b6d5a
  1. 32
      src/api/platform/address.js
  2. 155
      src/api/platform/follower.js
  3. 2
      src/api/platform/user.js
  4. 31
      src/views/platform/user/buyDetail.vue
  5. 31
      src/views/platform/user/cart.vue
  6. 26
      src/views/platform/user/discount.vue
  7. 30
      src/views/platform/user/walletDetail.vue

@ -1,12 +1,32 @@
import request from "@/utils/request";
import request from '@/utils/request'
// 查询收货地址列表
export function listAddress(query) {
return request({
url: "/platform/address/list",
method: "get",
params: query,
});
return new Promise(resolve => {
resolve({
'total': 1,
'rows': [
{
'createBy': null,
'createTime': '2023-01-13 09:36:21',
'updateBy': null,
'updateTime': null,
'remark': null,
'id': 1,
'consignee': '张三',
'phone': '13250211954',
'province': '广东省',
'city': '佛山市',
'area': '南海区',
'address': '桂城街道',
'isDefault': false,
'userId': 115
}
],
'code': 200,
'msg': '查询成功'
})
})
}
// 查询收货地址详细

@ -1,9 +1,152 @@
import request from "@/utils/request";
// 查询收货地址列表
export function listFollower(user_id) {
return request({
url: `/platform/follower/list/${user_id}`,
method: "get",
});
return new Promise(resolve => {
resolve({
'total': 2,
'rows': [
{
'createBy': null,
'createTime': '2023-01-14 02:17:30',
'updateBy': null,
'updateTime': null,
'remark': null,
'id': 1,
'following': 115,
'follower': 116,
'followingUser': {
'createBy': null,
'createTime': '2023-01-12 09:16:00',
'updateBy': null,
'updateTime': null,
'remark': null,
'userId': 116,
'deptId': null,
'userName': null,
'nickName': 'dsfgfd234234',
'email': null,
'phonenumber': '13250211978',
'sex': '1',
'avatar': '/profile/avatar/2023/01/12/blob_20230112055008A001.png',
'password': null,
'status': '0',
'delFlag': null,
'loginIp': null,
'loginDate': null,
'dept': null,
'roles': null,
'roleIds': null,
'postIds': null,
'roleId': null,
'wechatNickName': 'dfg345',
'balance': null,
'referrerId': null,
'referrerSysUser': {
'createBy': null,
'createTime': null,
'updateBy': null,
'updateTime': null,
'remark': null,
'userId': null,
'deptId': null,
'userName': null,
'nickName': '若依',
'email': null,
'phonenumber': null,
'sex': null,
'avatar': null,
'password': null,
'status': null,
'delFlag': null,
'loginIp': null,
'loginDate': null,
'dept': null,
'roles': null,
'roleIds': null,
'postIds': null,
'roleId': null,
'wechatNickName': null,
'balance': null,
'referrerId': null,
'referrerSysUser': null,
'admin': false
},
'admin': false
},
'followerUser': null
},
{
'createBy': null,
'createTime': '2023-01-14 02:17:30',
'updateBy': null,
'updateTime': null,
'remark': null,
'id': 2,
'following': 115,
'follower': 101,
'followingUser': {
'createBy': null,
'createTime': '2023-01-11 20:26:31',
'updateBy': null,
'updateTime': null,
'remark': null,
'userId': 101,
'deptId': null,
'userName': null,
'nickName': 'adsfsaf',
'email': null,
'phonenumber': '13250211954',
'sex': '1',
'avatar': '',
'password': null,
'status': '0',
'delFlag': null,
'loginIp': null,
'loginDate': null,
'dept': null,
'roles': null,
'roleIds': null,
'postIds': null,
'roleId': null,
'wechatNickName': null,
'balance': null,
'referrerId': null,
'referrerSysUser': {
'createBy': null,
'createTime': null,
'updateBy': null,
'updateTime': null,
'remark': null,
'userId': null,
'deptId': null,
'userName': null,
'nickName': '若依',
'email': null,
'phonenumber': null,
'sex': null,
'avatar': null,
'password': null,
'status': null,
'delFlag': null,
'loginIp': null,
'loginDate': null,
'dept': null,
'roles': null,
'roleIds': null,
'postIds': null,
'roleId': null,
'wechatNickName': null,
'balance': null,
'referrerId': null,
'referrerSysUser': null,
'admin': false
},
'admin': false
},
'followerUser': null
}
],
'code': 200,
'msg': '查询成功'
})
})
}

@ -509,7 +509,7 @@ export function getUser(userId) {
'updateBy': null,
'updateTime': null,
'remark': '测试员',
'userId': 2,
'userId': 115,
'deptId': 105,
'userName': 'ry',
'nickName': '若依',

@ -24,22 +24,31 @@
<el-table v-loading="loading" :data="buyDetailList">
<el-table-column label="新创建时间" align="center">
2022-12-31 12:31
</el-table-column>
<el-table-column label="订单号" align="center">
13114145464165
</el-table-column>
<el-table-column label="类型" align="center">
自提
</el-table-column>
<el-table-column label="订单金额" align="center">
120000.00
</el-table-column>
<el-table-column label="支付方式" align="center">
支付宝
</el-table-column>
<el-table-column label="订单状态" align="center">
待商家接单
</el-table-column>
<el-table-column label="收货地址" align="center">
河南省郑州市金水区光明路185号
</el-table-column>
<el-table-column label="收货人" align="center">
张三
</el-table-column>
<el-table-column label="手机号" align="center">
18888888888
</el-table-column>
</el-table>
@ -55,17 +64,17 @@ export default {
dicts: ['delivery_method'],
data() {
return {
loading: false,
buyDetailList: [],
total: 0,
loading: false,
buyDetailList: [{}],
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
delivery_method: undefined,
dateRange: undefined
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
delivery_method: undefined,
dateRange: undefined
}
}
},
mounted() {
@ -90,4 +99,4 @@ export default {
.query-form {
margin-bottom: 20px;
}
</style>
</style>

@ -2,16 +2,22 @@
<div class="app-container">
<el-table v-loading="loading" :data="cartList">
<el-table-column label="添加时间" align="center">
2022-12-31 12:31
</el-table-column>
<el-table-column label="商品名称" align="center">
商品名称
</el-table-column>
<el-table-column label="图片" align="center">
<img src="http://www.dummyimage.com/50x50"/>
</el-table-column>
<el-table-column label="规格" align="center">
黑色.L
</el-table-column>
<el-table-column label="数量" align="center">
10
</el-table-column>
<el-table-column label="店铺" align="center">
店铺名
</el-table-column>
</el-table>
@ -21,7 +27,6 @@
</div>
</template>
<script>
import { listCart } from "@/api/platform/cart";
export default {
name: "Cart",
props: {
@ -29,17 +34,17 @@ export default {
},
data() {
return {
//
loading: false,
//
cartList: [],
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
},
//
loading: false,
//
cartList: [{}],
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10
}
}
},
methods: {
@ -61,4 +66,4 @@ export default {
}
}
}
</script>
</script>

@ -32,16 +32,22 @@
<el-table v-loading="loading" :data="discountList">
<el-table-column label="领取时间" align="center">
2022-12-31 12:31
</el-table-column>
<el-table-column label="名称" align="center">
6.18大促
</el-table-column>
<el-table-column label="优惠" align="center">
1
</el-table-column>
<el-table-column label="发券人" align="center">
平台
</el-table-column>
<el-table-column label="状态" align="center">
已使用
</el-table-column>
<el-table-column label="使用时间" align="center">
2022-12-31 12:31
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
@ -55,16 +61,16 @@ export default {
name: "Discount",
data() {
return {
loading: false,
discountList: [],
total: 0,
loading: false,
discountList: [{}],
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
dateRange: undefined
},
//
queryParams: {
pageNum: 1,
pageSize: 10,
dateRange: undefined
}
}
},
mounted() {
@ -99,4 +105,4 @@ export default {
margin-bottom: 20px;
}
}
</style>
</style>

@ -46,16 +46,22 @@
<el-table v-loading="loading" :data="walletDetailList">
<el-table-column label="新创建时间" align="center">
2022-12-31 12:31
</el-table-column>
<el-table-column label="订单号" align="center">
13114145464165
</el-table-column>
<el-table-column label="收支类型" align="center">
收入
</el-table-column>
<el-table-column label="金额" align="center">
120000.00
</el-table-column>
<el-table-column label="类型" align="center">
提现
</el-table-column>
<el-table-column label="钱包余额" align="center">
10000.000
</el-table-column>
</el-table>
@ -71,17 +77,17 @@ export default {
dicts: ['wallet_type'],
data() {
return {
loading: false,
walletDetailList: [],
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
wallet_type: undefined,
dateRange: undefined
},
loading: false,
walletDetailList: [{}],
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 10,
wallet_type: undefined,
dateRange: undefined
}
}
},
mounted() {
@ -133,4 +139,4 @@ $space: 20px;
margin-left: 20px;
}
}
</style>
</style>

Loading…
Cancel
Save