正在显示
46 个修改的文件
包含
4803 行增加
和
0 行删除
.DS_Store
0 → 100644
不能预览此文件类型
.hbuilderx/launch.json
0 → 100644
| 1 | +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ | ||
| 2 | + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 | ||
| 3 | + "version": "0.0", | ||
| 4 | + "configurations": [{ | ||
| 5 | + "default" : | ||
| 6 | + { | ||
| 7 | + "launchtype" : "local" | ||
| 8 | + }, | ||
| 9 | + "mp-weixin" : | ||
| 10 | + { | ||
| 11 | + "launchtype" : "local" | ||
| 12 | + }, | ||
| 13 | + "type" : "uniCloud" | ||
| 14 | + } | ||
| 15 | + ] | ||
| 16 | +} |
App.vue
0 → 100644
| 1 | +<script> | ||
| 2 | + export default { | ||
| 3 | + onLaunch: function() { | ||
| 4 | + }, | ||
| 5 | + onShow: function() { | ||
| 6 | + }, | ||
| 7 | + onHide: function() { | ||
| 8 | + } | ||
| 9 | + } | ||
| 10 | +</script> | ||
| 11 | + | ||
| 12 | +<style lang="scss"> | ||
| 13 | + /*每个页面公共css */ | ||
| 14 | + @import "@/uni_modules/uview-ui/index.scss"; | ||
| 15 | + /* 项目基础样式 */ | ||
| 16 | + @import "./app.scss"; | ||
| 17 | + @font-face { | ||
| 18 | + font-family: 'HelveticaNeue-Medium'; | ||
| 19 | + src: url('@/static/fonts/HelveticaNeue-Medium.otf') format('truetype'); | ||
| 20 | + } | ||
| 21 | +</style> |
api/order.js
0 → 100644
| 1 | +const http = uni.$u.http | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * 创建订单 | ||
| 5 | + * @param { | ||
| 6 | + groundId: "场地ID", | ||
| 7 | + orderDate: "订单日期", | ||
| 8 | + hourList: { | ||
| 9 | + startHour: "", | ||
| 10 | + endHour: "" | ||
| 11 | + } | ||
| 12 | + } | ||
| 13 | + *@@return { | ||
| 14 | + orderId: "订单id", | ||
| 15 | + orderNo: "订单编号", | ||
| 16 | + belongGym: "所属球馆", | ||
| 17 | + groundNum: "场地号", | ||
| 18 | + orderTime: "下单时间", | ||
| 19 | + appointmentStartTime: "预约开始时间", | ||
| 20 | + appointmentEndTime : "预约结束时间", | ||
| 21 | + payAmount: "支付金额", | ||
| 22 | + peopleNum: "参与人数", | ||
| 23 | + serviceCharge: "手续费", | ||
| 24 | + commission: "抽佣", | ||
| 25 | + orderType: "0整租1约球", | ||
| 26 | + state: "0待确定1已确定2取消3不满足开场条件取消", | ||
| 27 | + businessId: "商家id", | ||
| 28 | + clientId: "客户id" | ||
| 29 | + } | ||
| 30 | + */ | ||
| 31 | +export const createOrde = (data, config= {}) => http.post('/ground-business/ground/createOrder', data, {custom: {auth: true}}) | ||
| 32 | + | ||
| 33 | +/** | ||
| 34 | + * 确定订单 | ||
| 35 | + * @param { | ||
| 36 | + orderId: "订单ID" | ||
| 37 | + } | ||
| 38 | +*/ | ||
| 39 | +export const confirmOrder = (data) => http.get('/ground-business/ground/confirmOrder', { params: data, custom: {auth: true}}) | ||
| 40 | + | ||
| 41 | +/** | ||
| 42 | + * 商户取消订单 | ||
| 43 | + * @param { | ||
| 44 | + orderId: "订单ID", | ||
| 45 | + type: "0取消订单1不满足开场条件取消" | ||
| 46 | + } | ||
| 47 | +*/ | ||
| 48 | +export const cancelOrder = (data) => http.post('/ground-business/ground/businessCancelOrder', data, {custom: {auth: true}}) | ||
| 49 | + | ||
| 50 | +/** | ||
| 51 | + * 查询实时订单列表 | ||
| 52 | + * @return { | ||
| 53 | + orderId: "订单ID", | ||
| 54 | + orderNo: "", | ||
| 55 | + belongGym: "附属球馆", | ||
| 56 | + groundNum: "场地号", | ||
| 57 | + orderTime: "下单时间", | ||
| 58 | + appointmentStartTime: "预约开始时间", | ||
| 59 | + appointmentEndTime : "预约结束时间", | ||
| 60 | + payAmount: "支付金额", | ||
| 61 | + peopleNum: "参与人数", | ||
| 62 | + serviceCharge: "手续费", | ||
| 63 | + commission: "抽佣", | ||
| 64 | + orderType: "0整租1约球", | ||
| 65 | + state: "0待确定1已确定2取消3不满足开场条件取消", | ||
| 66 | + businessId: "商家id", | ||
| 67 | + clientId: "客户id" | ||
| 68 | + } | ||
| 69 | +*/ | ||
| 70 | +export const getOrderList = (data) => http.get('/ground-order/order/list', {params: data, custom: {auth: true}}) | ||
| 71 | + | ||
| 72 | +/** | ||
| 73 | + * 商家查询退款订单列表 | ||
| 74 | + * @param { | ||
| 75 | + businessId: "商家ID", | ||
| 76 | + pageNum: "页码", | ||
| 77 | + pageSize: "页数" | ||
| 78 | + } | ||
| 79 | +*/ | ||
| 80 | +export const getAftersalesOrder = (data) => http.get('/ground-order/aftersales/list', { params: data, custom: {auth: true}}) | ||
| 81 | + | ||
| 82 | +/** | ||
| 83 | + * 商家查询订单评价列表 | ||
| 84 | + * @param { | ||
| 85 | + businessId: "商家ID", | ||
| 86 | + pageNum: "页码", | ||
| 87 | + pageSize: "页数" | ||
| 88 | + } | ||
| 89 | +*/ | ||
| 90 | +export const getCommentOrder = (data) => http.get('/ground-order/comment/list', { params: data, custom: {auth: true}}) | ||
| 91 | + | ||
| 92 | + | ||
| 93 | +/** | ||
| 94 | + * 获取订单状态 | ||
| 95 | +*/ | ||
| 96 | +export const getOrderState = (data) => http.get('/system/dict/data/type/order_state', { params: data, custom: {auth: true}}) | ||
| 97 | + | ||
| 98 | +/** | ||
| 99 | + * 获取退货订单状态 | ||
| 100 | +*/ | ||
| 101 | +export const getRefundState = (data) => http.get('/system/dict/data/type/aftersales_state', { params: data, custom: {auth: true}}) | ||
| 102 | + | ||
| 103 | +/** | ||
| 104 | + * 获取订单评价状态 | ||
| 105 | +*/ | ||
| 106 | +export const getCommentState = (data) => http.get('/system/dict/data/type/order_comment_state', { params: data, custom: {auth: true}}) | ||
| 107 | + | ||
| 108 | +/** | ||
| 109 | + * 商家审核申请退款 | ||
| 110 | + * @param { | ||
| 111 | + salesId: "售后ID", | ||
| 112 | + state: "0拒绝退款1退全款2发起人退50%其余退全款" | ||
| 113 | + } | ||
| 114 | +*/ | ||
| 115 | +export const businessLookRefund = (data) => http.post('/ground-order/myOrder/approveAfterSale', data, { custom: {auth: true}}) | ||
| 116 | + | ||
| 117 | +/** | ||
| 118 | + * 商家回复评价 | ||
| 119 | + * @param { | ||
| 120 | + commentId: "评论ID", | ||
| 121 | + reply: "回复内容" | ||
| 122 | + } | ||
| 123 | +*/ | ||
| 124 | +export const businessReply = (data) => http.post('/ground-order/comment/replyComment', data, { custom: {auth: true}}) | ||
| 125 | + | ||
| 126 | +/** | ||
| 127 | + * 商家申诉恶意评价 | ||
| 128 | + * @param { | ||
| 129 | + commentId: "评论ID", | ||
| 130 | + appealReason: "申诉原因" | ||
| 131 | + } | ||
| 132 | +*/ | ||
| 133 | +export const businessAppealReason = (data) => http.post('/ground-order/comment/appealComment', data, { custom: {auth: true}}) |
api/sport.js
0 → 100644
| 1 | +const http = uni.$u.http | ||
| 2 | +/** | ||
| 3 | + * 获取运动类型 | ||
| 4 | + * @param { | ||
| 5 | + pageNum: 1 | ||
| 6 | + pageSize: 10 | ||
| 7 | + } | ||
| 8 | + */ | ||
| 9 | +export const getSportList = (data) => http.get('/system/sports/list', {params: data, custom: {auth: true} }) | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 获取营业周次和单价 | ||
| 13 | + */ | ||
| 14 | +export const getPriods = () => http.get('/system/dict/data/type/periods', {custom: {auth: true} }) | ||
| 15 | + | ||
| 16 | + | ||
| 17 | +/** | ||
| 18 | + * 新增场地 | ||
| 19 | + * @param { | ||
| 20 | + groundCode: "场地码", | ||
| 21 | + groundNum: "场地号", | ||
| 22 | + isOutdoor: "是否为户外", | ||
| 23 | + address: "地址", | ||
| 24 | + sportsRange: "球类", | ||
| 25 | + weekday: "周时间", | ||
| 26 | + orderHours: "订单时长", | ||
| 27 | + discount: "折扣", | ||
| 28 | + longitude: "经度(用于定位)", | ||
| 29 | + latitude: "纬度(用于定位)", | ||
| 30 | + groundPicture: "场地图片", | ||
| 31 | + weekdayList: [ | ||
| 32 | + { | ||
| 33 | + weekday: 星期, | ||
| 34 | + hourList: [ | ||
| 35 | + { | ||
| 36 | + startHour: "开始时间", | ||
| 37 | + endHour: "结束时间", | ||
| 38 | + price: "价格" | ||
| 39 | + } | ||
| 40 | + ] | ||
| 41 | + } | ||
| 42 | + ] | ||
| 43 | + } | ||
| 44 | + */ | ||
| 45 | +export const addGround = (data, config= {}) => http.post('/ground-business/ground', data, {custom: {auth: true}}) | ||
| 46 | + | ||
| 47 | +/** | ||
| 48 | + * 根据ID获取场地详情 | ||
| 49 | + * @@return { | ||
| 50 | + groundId: "场地ID", | ||
| 51 | + belongGym: "附属球馆", | ||
| 52 | + groundCode: "场地码", | ||
| 53 | + groundNum: "场地号", | ||
| 54 | + isOutdoor: "是否为户外", | ||
| 55 | + address: "地址", | ||
| 56 | + sportsRange: "球类", | ||
| 57 | + weekday: "周时间", | ||
| 58 | + orderHours: "订单时长", | ||
| 59 | + discount: "折扣", | ||
| 60 | + longitude: "经度(用于定位)", | ||
| 61 | + latitude: "纬度(用于定位)", | ||
| 62 | + groundPicture: "场地图片", | ||
| 63 | + hourList: { | ||
| 64 | + hourId: "时长ID", | ||
| 65 | + startHour: "开始时间", | ||
| 66 | + endHour: "结束时间", | ||
| 67 | + price: "价格", | ||
| 68 | + groundId: "场地ID", | ||
| 69 | + isLocked: "是否上锁" | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | + */ | ||
| 73 | +export const getGroundDetail = (groundId) => http.get(`/ground-business/ground/${groundId}`, {custom: {auth: true}}) | ||
| 74 | + | ||
| 75 | +/** | ||
| 76 | + * 更新场地信息 | ||
| 77 | + * @param { | ||
| 78 | + groundCode: "场地码", | ||
| 79 | + groundNum: "场地号", | ||
| 80 | + isOutdoor: "是否为户外", | ||
| 81 | + address: "地址", | ||
| 82 | + sportsRange: "球类", | ||
| 83 | + weekday: "周时间", | ||
| 84 | + orderHours: "订单时长", | ||
| 85 | + discount: "折扣", | ||
| 86 | + longitude: "经度(用于定位)", | ||
| 87 | + latitude: "纬度(用于定位)", | ||
| 88 | + groundPicture: "场地图片", | ||
| 89 | + weekdayList: { | ||
| 90 | + weekday: 1, | ||
| 91 | + hourList: { | ||
| 92 | + startHour: "开始时间", | ||
| 93 | + endHour: "结束时间", | ||
| 94 | + price: "价格" | ||
| 95 | + } | ||
| 96 | + } | ||
| 97 | + } | ||
| 98 | + */ | ||
| 99 | +export const updateGroundInfo = (data, config= {}) => http.put('/ground-business/ground', data, {custom: {auth: true}}) | ||
| 100 | + | ||
| 101 | +/** | ||
| 102 | + * 删除场地列表 | ||
| 103 | + */ | ||
| 104 | +export const delGroundInfo = (groundId) => http.delete(`/ground-business/ground/${groundId}`, {}, {custom: {auth: true}}) | ||
| 105 | + | ||
| 106 | +/** | ||
| 107 | + * 锁定场地 | ||
| 108 | + * @param { | ||
| 109 | + groundId: "场地id", | ||
| 110 | + orderDate: "锁定日期", | ||
| 111 | + hourList: { | ||
| 112 | + startHour: "开始时间", | ||
| 113 | + endHour: "结束时间", | ||
| 114 | + isLocked: "0解锁1锁定" | ||
| 115 | + } | ||
| 116 | + } | ||
| 117 | + */ | ||
| 118 | +export const lockGround = (data) => http.post('/ground-business/ground/lockGround', data, {custom: {auth: true}}) | ||
| 119 | + | ||
| 120 | +/** | ||
| 121 | + * 营业时间列表查询 | ||
| 122 | + * @param { | ||
| 123 | + currentDate: "时间范围", | ||
| 124 | + groundId: "场地ID不传就是查全部" | ||
| 125 | + } | ||
| 126 | + *@return { | ||
| 127 | + endHour: "结束时间", | ||
| 128 | + startHour: "开始时间", | ||
| 129 | + lockDate: "锁定日期", | ||
| 130 | + groundId: "场地id", | ||
| 131 | + groundCode: 场地编号, | ||
| 132 | + lockby: "操作人", | ||
| 133 | + operateTime: "操作时间", | ||
| 134 | + isLocked: "0未锁定1已锁" | ||
| 135 | + } | ||
| 136 | + */ | ||
| 137 | +export const businessTimeList = (data) => http.post('/ground-business/ground/businessHourList', data, {custom: {auth: true}}) | ||
| 138 | + | ||
| 139 | +/** | ||
| 140 | + * 查询场地列表 | ||
| 141 | + *@return { | ||
| 142 | + groundId: "场地ID", | ||
| 143 | + belongGym: "附属球馆", | ||
| 144 | + groundCode: "场地码", | ||
| 145 | + groundNum: "场地号", | ||
| 146 | + isOutdoor: "是否为户外", | ||
| 147 | + address: "地址", | ||
| 148 | + sportsRange: "球类", | ||
| 149 | + weekday: "周时间", | ||
| 150 | + businessId: "球馆ID" | ||
| 151 | + orderHours: "订单时长", | ||
| 152 | + discount: "折扣", | ||
| 153 | + longitude: "经度(用于定位)", | ||
| 154 | + latitude: "纬度(用于定位)", | ||
| 155 | + groundPhotos: "场地图片", | ||
| 156 | + distance: "距离千米" | ||
| 157 | + } | ||
| 158 | + */ | ||
| 159 | +export const getGroundList = (data) => http.get('/ground-business/ground/list', {params: data, custom: {auth: true}}) | ||
| 160 | + | ||
| 161 | +/** | ||
| 162 | + * 查询球馆列表 | ||
| 163 | + * @param { | ||
| 164 | + longitude: "经度", | ||
| 165 | + latitude: "纬度" | ||
| 166 | + } | ||
| 167 | + *@return { | ||
| 168 | + groundId: "场地ID" | ||
| 169 | + businessName: "商家名称", | ||
| 170 | + businessLicenseNo: "社会统一码", | ||
| 171 | + gymName: "球馆名称", | ||
| 172 | + contacts: "联系人", | ||
| 173 | + contactsPhone: "联系人电话", | ||
| 174 | + province: "省", | ||
| 175 | + city: "市", | ||
| 176 | + county: "县", | ||
| 177 | + address: "地址", | ||
| 178 | + gymPicture: "球馆图片" | ||
| 179 | + gymNum: "球馆号", | ||
| 180 | + serviceCharge: "服务费", | ||
| 181 | + commission: "佣金", | ||
| 182 | + username: "用户名" | ||
| 183 | + businessLicensePicture: "商家许可证照片" | ||
| 184 | + belongGym: "附属球馆" | ||
| 185 | + groundCode: "场地码", | ||
| 186 | + groundNum: "场地号", | ||
| 187 | + isOutdoor: "是否为户外", | ||
| 188 | + sportsRange: "球类", | ||
| 189 | + rank: "评分", | ||
| 190 | + price: "平均价格", | ||
| 191 | + businessTime: "营业时间" | ||
| 192 | + businessId: "球馆ID" | ||
| 193 | + longitude: "经度(用于定位)", | ||
| 194 | + latitude: "纬度(用于定位)", | ||
| 195 | + distance: "距离千米" | ||
| 196 | + } | ||
| 197 | + */ | ||
| 198 | +export const getBusinessList = (data, config= {}) => http.get('/ground-business/business/list', {params: data, custom: {auth: true}}) | ||
| 199 | + | ||
| 200 | +/** | ||
| 201 | + * 选择时间段页面营业时间列表 | ||
| 202 | + * @param { | ||
| 203 | + groundId: "场地id", | ||
| 204 | + currentDate: "选择日期", | ||
| 205 | + } | ||
| 206 | + * @return { | ||
| 207 | + discountHours: "连续x小时打折", | ||
| 208 | + discount: "打折", | ||
| 209 | + data: [ | ||
| 210 | + { | ||
| 211 | + startHour: "开始时间", | ||
| 212 | + endHour: "结束时间", | ||
| 213 | + price: "价格" | ||
| 214 | + } | ||
| 215 | + ] | ||
| 216 | + } | ||
| 217 | + */ | ||
| 218 | +export const getOrderHourList = (data, config= {}) => http.post('/ground-business/ground/orderHourList', data, config) | ||
| 219 | + | ||
| 220 | +/** | ||
| 221 | + * 发起约球 | ||
| 222 | + * @param { | ||
| 223 | + groundId: "场地id", | ||
| 224 | + peopleNum: "参与人数(不包括发起人)", | ||
| 225 | + orderDate: "订场日期", | ||
| 226 | + hourList: [ | ||
| 227 | + { | ||
| 228 | + startHour: "开始时间", | ||
| 229 | + endHour: "结束时间", | ||
| 230 | + } | ||
| 231 | + ] | ||
| 232 | + } | ||
| 233 | + * @return { | ||
| 234 | + orderId: "订单id", | ||
| 235 | + orderNo: "订单编号", | ||
| 236 | + belongGym: "所属球馆", | ||
| 237 | + groundNum: "场地号", | ||
| 238 | + orderTime: "下单时间", | ||
| 239 | + appointmentStartTime: "预约开始时间", | ||
| 240 | + appointmentEndTime : "预约结束时间", | ||
| 241 | + payAmount: "支付金额", | ||
| 242 | + peopleNum: "参与人数", | ||
| 243 | + serviceCharge: "手续费", | ||
| 244 | + commission: "抽佣", | ||
| 245 | + orderType: "0整租1约球", | ||
| 246 | + state: "0待确定1已确定2取消3不满足开场条件取消", | ||
| 247 | + businessId: "商家id", | ||
| 248 | + clientId: "客户id" | ||
| 249 | + groundId: "场地ID" | ||
| 250 | + } | ||
| 251 | + */ | ||
| 252 | +export const sendBooking = (data, config= {}) => http.post('/ground-business/ground/createDateOrder', data, config) | ||
| 253 | + | ||
| 254 | +/** | ||
| 255 | + * 待拼场场地列表 | ||
| 256 | + * @return { | ||
| 257 | + orderId: "订单id", | ||
| 258 | + orderNo: "订单编号", | ||
| 259 | + belongGym: "球馆名称", | ||
| 260 | + groundNum: "场地号", | ||
| 261 | + address: "地址", | ||
| 262 | + orderTime: "下单时间", | ||
| 263 | + appointmentStartTime: "拼场时间段-开始时间", | ||
| 264 | + appointmentEndTime : "拼场时间段-结束时间", | ||
| 265 | + price: "价格", | ||
| 266 | + peopleNum: "需求人数", | ||
| 267 | + rank: "整体评分", | ||
| 268 | + envRank: "环境评分", | ||
| 269 | + serviceRank: "服务评分", | ||
| 270 | + priceRank : "性价比评分", | ||
| 271 | + organizer: "发起人", | ||
| 272 | + joinPeopleNum: "已拼场人数", | ||
| 273 | + clientList: [ | ||
| 274 | + { | ||
| 275 | + createTime: "参与时间", | ||
| 276 | + clientId: "客户id", | ||
| 277 | + clientName: "客户名称" | ||
| 278 | + } | ||
| 279 | + ] | ||
| 280 | + } | ||
| 281 | + */ | ||
| 282 | +export const selectDateGroundList = (data, config= {}) => http.post('/ground-business/ground/selectDateGroundList', data, config) | ||
| 283 | + |
api/user.js
0 → 100644
| 1 | +const http = uni.$u.http | ||
| 2 | +/** | ||
| 3 | + * 登录 | ||
| 4 | + * @param { | ||
| 5 | + account: 用户名, | ||
| 6 | + password: 密码 | ||
| 7 | + } | ||
| 8 | + */ | ||
| 9 | +export const userLogin = (data, config= {}) => http.post('/login', data, config) | ||
| 10 | + | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 注册 | ||
| 14 | + * @param { | ||
| 15 | + account: 用户名, | ||
| 16 | + password: 密码 | ||
| 17 | + } | ||
| 18 | + */ | ||
| 19 | +export const userReg = (data, config= {}) => http.post('/users/register', data, config) | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * 微信登陆授权 | ||
| 23 | + * @param { | ||
| 24 | + returnUrl: 请求地址 | ||
| 25 | + } | ||
| 26 | + */ | ||
| 27 | +export const userWXLogin = (data) => http.get('/weChatLogin/authorize', {params: data }) | ||
| 28 | + | ||
| 29 | +/** | ||
| 30 | + * 通过openid登陆 | ||
| 31 | + * @param { | ||
| 32 | + openid: 前端传入用户openid | ||
| 33 | + type: 0公众号授权1小程序授权 | ||
| 34 | + } | ||
| 35 | + */ | ||
| 36 | +export const userOpenIdLogin = (data) => http.get('/weChatLogin/authorize', {params: data }) | ||
| 37 | + | ||
| 38 | +/** | ||
| 39 | + * 获取用户信息 | ||
| 40 | + */ | ||
| 41 | +export const getUserInfo = () => http.get('/system/user/profile', {custom: {auth: true}}) | ||
| 42 | + | ||
| 43 | +/** | ||
| 44 | + * 修改用户信息 | ||
| 45 | + */ | ||
| 46 | +export const updateUserInfo = (data) => http.put('/system/user/profile', data, {custom: {auth: true}}) | ||
| 47 | + | ||
| 48 | +/** | ||
| 49 | + * 修改用户密码 | ||
| 50 | + */ | ||
| 51 | +export const updateUserPwd = (data) => http.put('/system/user/profile/updatePwd', {}, {params: data, custom: {auth: true}}) | ||
| 52 | + | ||
| 53 | + | ||
| 54 | +/** | ||
| 55 | + * 商家注册 | ||
| 56 | + * @param { | ||
| 57 | + username: "用户名", | ||
| 58 | + password: "密码", | ||
| 59 | + businessName: "商家名称", | ||
| 60 | + businessLicenseNo: "统一社会信用代码", | ||
| 61 | + gymName: "球馆名称", | ||
| 62 | + contacts: "联系人", | ||
| 63 | + contactsPhone: "联系人电话", | ||
| 64 | + province: "省", | ||
| 65 | + city: "市", | ||
| 66 | + county: "县", | ||
| 67 | + address: "地址", | ||
| 68 | + gymPicture: "球馆图片" | ||
| 69 | + } | ||
| 70 | + */ | ||
| 71 | +export const businessReg = (data, config={}) => http.post('/ground-business/business/register',data, config) | ||
| 72 | + | ||
| 73 | +/** | ||
| 74 | + * 查询可提现金额 | ||
| 75 | + * * @returns 返回信息对象:{msg, code, data} | ||
| 76 | + */ | ||
| 77 | +export const getAmount = (data, config= {}) => http.get('/ground-business/cash/cashAvaliable', {params: data, custom: {auth: true} }) | ||
| 78 | + | ||
| 79 | +/** | ||
| 80 | + * 申请提现 | ||
| 81 | + * * @param { | ||
| 82 | + cashoutAmount: 提现金额 | ||
| 83 | + } | ||
| 84 | + */ | ||
| 85 | +export const cashAmout = (data) => http.post('/ground-business/cash/cashApply', data, {custom: {auth: true}}) | ||
| 86 | + | ||
| 87 | +/** | ||
| 88 | + * 添加提现账户 | ||
| 89 | + * * @param { | ||
| 90 | + account: "卡号", | ||
| 91 | + accountName: "开户名称", | ||
| 92 | + accountBank: "开户行" | ||
| 93 | + } | ||
| 94 | + */ | ||
| 95 | +export const addBank = (data) => http.post('/ground-business/account', data, {custom: {auth: true} }) | ||
| 96 | + | ||
| 97 | +/** | ||
| 98 | + * 修改提现账户 | ||
| 99 | + * * @param { | ||
| 100 | + account: "卡号", | ||
| 101 | + accountName: "开户名称", | ||
| 102 | + accountBank: "开户行" | ||
| 103 | + } | ||
| 104 | + */ | ||
| 105 | +export const updateBank = (data) => http.put('/ground-business/account', data, {custom: {auth: true} }) | ||
| 106 | + | ||
| 107 | +/** | ||
| 108 | + * 删除提现账户(解除绑定银行卡) | ||
| 109 | + * * @param { | ||
| 110 | + account: "卡号", | ||
| 111 | + accountName: "开户名称", | ||
| 112 | + accountBank: "开户行" | ||
| 113 | + } | ||
| 114 | + */ | ||
| 115 | +export const deleteBank = (accountIds) => http.delete(`/ground-business/account/${accountIds}`,{}, {custom: {auth: true} }) | ||
| 116 | + | ||
| 117 | +/** | ||
| 118 | + * 根据businessId获取商家提现账户信息 | ||
| 119 | + * * @param { | ||
| 120 | + businessId: "商家ID" | ||
| 121 | + } | ||
| 122 | + */ | ||
| 123 | +export const getBank = (businessId) => http.get(`/ground-business/account/${businessId}`, {custom: {auth: true} }) | ||
| 124 | + | ||
| 125 | +/** | ||
| 126 | + * 查询当前用户钱包余额 | ||
| 127 | + * @returns 返回信息对象:{msg, code, data: {walletId, money: '金额', username: '用户名'}} | ||
| 128 | + */ | ||
| 129 | +export const getUserAmout = () => http.get('/ground-business/wallet/balance', {custom: {auth: true} }) | ||
| 130 | + | ||
| 131 | +/** | ||
| 132 | + * 钱包充值 | ||
| 133 | + * @param { | ||
| 134 | + amount:充值金额, | ||
| 135 | + type: 0公众号1小程序 | ||
| 136 | + } | ||
| 137 | + * @returns 返回信息对象:{appId, nonceStr, paySign, signType, prepayId, timeStamp, packageValue } | ||
| 138 | + */ | ||
| 139 | +export const recharge = (data) => http.get('/ground-business/wallet/charge', {params: data, custom: {auth: true} }) | ||
| 140 | + | ||
| 141 | +/** | ||
| 142 | + * 获取当前商家 | ||
| 143 | + * @returns 返回信息对象:{ | ||
| 144 | + businessId: "商家ID", | ||
| 145 | + businessName: "商家名称", | ||
| 146 | + businessLicenseNo: "统一社会信用代码", | ||
| 147 | + gymName: "球馆名称", | ||
| 148 | + contacts: "联系人", | ||
| 149 | + contactsPhone: "联系人电话", | ||
| 150 | + province: "省", | ||
| 151 | + city: "市", | ||
| 152 | + county: "县", | ||
| 153 | + address: "地址", | ||
| 154 | + gymNum: "球馆号", | ||
| 155 | + serviceCharge: "支付手续费", | ||
| 156 | + commission: "佣金", | ||
| 157 | + username: "用户名", | ||
| 158 | + businessLicensePicture: "商家许可证照片" | ||
| 159 | + gymPicture: "球馆图片", | ||
| 160 | + latitude: null | ||
| 161 | + longitude: null | ||
| 162 | + order: null | ||
| 163 | + orderDate: null | ||
| 164 | + orderEndTime: null | ||
| 165 | + orderStartTime: null | ||
| 166 | + params: {} | ||
| 167 | + province: "广西壮族自治区" | ||
| 168 | + remark: null | ||
| 169 | + searchValue: null | ||
| 170 | + serviceCharge: 0 | ||
| 171 | + sportsRange: "篮球,足球" | ||
| 172 | + updateBy: null | ||
| 173 | + updateTime: null | ||
| 174 | + username: "我是测试" | ||
| 175 | + * } | ||
| 176 | +*/ | ||
| 177 | +export const getBusinessInfo = (data) => http.get('/ground-business/business/currentBusiness', {params: data, custom: {auth: true} }) | ||
| 178 | + | ||
| 179 | +/** | ||
| 180 | + * 修改当前商家信息 | ||
| 181 | + * @param { | ||
| 182 | + businessId: "商家ID", | ||
| 183 | + businessName: "商家名称", | ||
| 184 | + businessLicenseNo: "统一社会信用代码", | ||
| 185 | + gymName: "球馆名称", | ||
| 186 | + contacts: "联系人", | ||
| 187 | + contactsPhone: "联系人电话", | ||
| 188 | + province: "省", | ||
| 189 | + city: "市", | ||
| 190 | + county: "县", | ||
| 191 | + address: "地址", | ||
| 192 | + gymNum: "球馆号", | ||
| 193 | + serviceCharge: "支付手续费", | ||
| 194 | + commission: "佣金", | ||
| 195 | + username: "用户名", | ||
| 196 | + businessLicensePicture: "商家许可证照片" | ||
| 197 | + gymPicture: "球馆图片", | ||
| 198 | + latitude: null | ||
| 199 | + longitude: null | ||
| 200 | + order: null | ||
| 201 | + orderDate: null | ||
| 202 | + orderEndTime: null | ||
| 203 | + orderStartTime: null | ||
| 204 | + params: {} | ||
| 205 | + province: "广西壮族自治区" | ||
| 206 | + remark: null | ||
| 207 | + searchValue: null | ||
| 208 | + serviceCharge: 0 | ||
| 209 | + sportsRange: "篮球,足球" | ||
| 210 | + updateBy: null | ||
| 211 | + updateTime: null | ||
| 212 | + username: "我是测试" | ||
| 213 | + } | ||
| 214 | +*/ | ||
| 215 | +export const updateBusinessInfo = (data) => http.put('/ground-business/business', data, {custom: {auth: true} }) |
app.scss
0 → 100644
| 1 | +/* utils.scss */ | ||
| 2 | +@import "/utils/utils.scss"; | ||
| 3 | + | ||
| 4 | +page { | ||
| 5 | + background: #fafafa; | ||
| 6 | +} | ||
| 7 | + | ||
| 8 | +@keyframes rotate { | ||
| 9 | + 0% { | ||
| 10 | + transform: rotate(0deg) scale(1); | ||
| 11 | + } | ||
| 12 | + | ||
| 13 | + 100% { | ||
| 14 | + transform: rotate(360deg) scale(1); | ||
| 15 | + } | ||
| 16 | +} | ||
| 17 | + | ||
| 18 | +/* #ifdef H5*/ | ||
| 19 | + | ||
| 20 | +uni-page { | ||
| 21 | + box-shadow: 0 1rpx 44rpx rgba(169, 169, 169, .3); | ||
| 22 | +} | ||
| 23 | + | ||
| 24 | +.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom, | ||
| 25 | +.uni-app--showlayout+uni-tabbar.uni-tabbar-bottom .uni-tabbar, | ||
| 26 | +.uni-app--showlayout+uni-tabbar.uni-tabbar-top, | ||
| 27 | +.uni-app--showlayout+uni-tabbar.uni-tabbar-top .uni-tabbar { | ||
| 28 | + left: var(--window-left); | ||
| 29 | + right: var(--window-right); | ||
| 30 | +} | ||
| 31 | + | ||
| 32 | +.footer-fixed { | ||
| 33 | + left: var(--window-left) !important; | ||
| 34 | + right: var(--window-right) !important; | ||
| 35 | +} | ||
| 36 | + | ||
| 37 | +.u-mask,.u-drawer { | ||
| 38 | + left: var(--window-left) !important; | ||
| 39 | + right: var(--window-right) !important; | ||
| 40 | +} | ||
| 41 | + | ||
| 42 | +/* #endif */ | ||
| 43 | + |
components/commentCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="comment_card" :class="{isPadding: isPadding}"> | ||
| 3 | + <CommentRate></CommentRate> | ||
| 4 | + <view class="comment_content u-line-2"> | ||
| 5 | + 不错不错,这个地方环境非常好,水饮料种类也很多,非常推荐过来,尤其是附近的小伙伴一定要过来看看 | ||
| 6 | + </view> | ||
| 7 | + <!-- 评价图片 --> | ||
| 8 | + <u-album :urls="urls2" :rowCount="4"></u-album> | ||
| 9 | + </view> | ||
| 10 | +</template> | ||
| 11 | + | ||
| 12 | +<script> | ||
| 13 | + import CommentRate from './commentRate.vue' | ||
| 14 | + export default{ | ||
| 15 | + components: { CommentRate }, | ||
| 16 | + props: { | ||
| 17 | + isPadding: { | ||
| 18 | + type: Boolean, | ||
| 19 | + default: false | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + data(){ | ||
| 23 | + return { | ||
| 24 | + urls2: [ | ||
| 25 | + 'https://cdn.uviewui.com/uview/album/1.jpg', | ||
| 26 | + 'https://cdn.uviewui.com/uview/album/2.jpg', | ||
| 27 | + 'https://cdn.uviewui.com/uview/album/3.jpg', | ||
| 28 | + 'https://cdn.uviewui.com/uview/album/4.jpg', | ||
| 29 | + 'https://cdn.uviewui.com/uview/album/5.jpg', | ||
| 30 | + 'https://cdn.uviewui.com/uview/album/6.jpg', | ||
| 31 | + 'https://cdn.uviewui.com/uview/album/7.jpg', | ||
| 32 | + 'https://cdn.uviewui.com/uview/album/8.jpg', | ||
| 33 | + 'https://cdn.uviewui.com/uview/album/9.jpg', | ||
| 34 | + 'https://cdn.uviewui.com/uview/album/10.jpg' | ||
| 35 | + ] | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | +</script> | ||
| 40 | + | ||
| 41 | +<style scoped lang="scss"> | ||
| 42 | + .comment_card{ | ||
| 43 | + margin-bottom: 40rpx; | ||
| 44 | + background-color: #fff; | ||
| 45 | + } | ||
| 46 | + .isPadding{ | ||
| 47 | + border-radius: 16rpx; | ||
| 48 | + padding: 30rpx 24rpx 40rpx; | ||
| 49 | + } | ||
| 50 | + .comment_content{ | ||
| 51 | + color: #333; | ||
| 52 | + font-size: 24rpx; | ||
| 53 | + line-height: 40rpx; | ||
| 54 | + margin: 24rpx 0 18rpx 0; | ||
| 55 | + } | ||
| 56 | + .album { | ||
| 57 | + @include flex; | ||
| 58 | + align-items: flex-start; | ||
| 59 | + | ||
| 60 | + &__avatar { | ||
| 61 | + background-color: $u-bg-color; | ||
| 62 | + padding: 5px; | ||
| 63 | + border-radius: 3px; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + &__content { | ||
| 67 | + margin-left: 10px; | ||
| 68 | + flex: 1; | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | +</style> |
components/commentRate.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="commentRate"> | ||
| 3 | + <view class="left"> | ||
| 4 | + <image class="avatar" src="https://cdn.uviewui.com/uview/album/2.jpg" mode="widthFix"></image> | ||
| 5 | + </view> | ||
| 6 | + <view class="right"> | ||
| 7 | + <view class="info"> | ||
| 8 | + <view class="top"> | ||
| 9 | + <text class="name">CLOOL</text> | ||
| 10 | + <text class="arenaNum">预订场号:3号场</text> | ||
| 11 | + </view> | ||
| 12 | + <u-rate :count="count" active-color="#FF9900" size="20" inactiveColor="#CDCDCD" v-model="value"></u-rate> | ||
| 13 | + </view> | ||
| 14 | + <view class="comment_time">2022-12-26</view> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | +</template> | ||
| 18 | + | ||
| 19 | +<script> | ||
| 20 | + export default{ | ||
| 21 | + data(){ | ||
| 22 | + return { | ||
| 23 | + count: 5, | ||
| 24 | + value: 2 | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | + } | ||
| 28 | +</script> | ||
| 29 | + | ||
| 30 | +<style lang="scss" scoped> | ||
| 31 | + .commentRate{ | ||
| 32 | + display: flex; | ||
| 33 | + align-items: center; | ||
| 34 | + justify-content: space-between; | ||
| 35 | + font-size: 24rpx; | ||
| 36 | + line-height: 32rpx; | ||
| 37 | + color: #999; | ||
| 38 | + .left{ | ||
| 39 | + width: 64rpx; | ||
| 40 | + height: 64rpx; | ||
| 41 | + border-radius: 50%; | ||
| 42 | + overflow: hidden; | ||
| 43 | + margin-right: 16rpx; | ||
| 44 | + .avatar{ | ||
| 45 | + width: 100%; | ||
| 46 | + height: 100%; | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | + .right{ | ||
| 50 | + display: flex; | ||
| 51 | + justify-content: space-between; | ||
| 52 | + flex: 1; | ||
| 53 | + height: 100%; | ||
| 54 | + .top { | ||
| 55 | + margin-bottom: 8rpx; | ||
| 56 | + .name{ | ||
| 57 | + color: #333; | ||
| 58 | + margin-right: 10rpx; | ||
| 59 | + } | ||
| 60 | + } | ||
| 61 | + } | ||
| 62 | + } | ||
| 63 | +</style> |
components/commonTabbar.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <u-tabbar | ||
| 3 | + :value="tabbarValue" | ||
| 4 | + :fixed="true" | ||
| 5 | + :border="false" | ||
| 6 | + :placeholder="true" | ||
| 7 | + :safeAreaInsetBottom="true" | ||
| 8 | + activeColor="#333" | ||
| 9 | + inactiveColor="#999" | ||
| 10 | + :zIndex="9999" | ||
| 11 | + > | ||
| 12 | + <u-tabbar-item name="home" text="首页" @click="navRouter('/pages/home/home')"> | ||
| 13 | + <image | ||
| 14 | + style="width: 48rpx;height: 48rpx;" | ||
| 15 | + slot="active-icon" | ||
| 16 | + src="@/static/tabbarIcon/home_active.png" | ||
| 17 | + mode="widthFix" | ||
| 18 | + ></image> | ||
| 19 | + <image | ||
| 20 | + style="width: 48rpx;height: 48rpx;" | ||
| 21 | + slot="inactive-icon" | ||
| 22 | + src="@/static/tabbarIcon/home.png" | ||
| 23 | + mode="widthFix" | ||
| 24 | + ></image> | ||
| 25 | + </u-tabbar-item> | ||
| 26 | + <u-tabbar-item name="mall" text="商城" @click="navRouter('/pages/mall/mall')"> | ||
| 27 | + <image | ||
| 28 | + style="width: 48rpx;height: 48rpx;" | ||
| 29 | + slot="active-icon" | ||
| 30 | + src="@/static/tabbarIcon/mall_active.png" | ||
| 31 | + mode="widthFix" | ||
| 32 | + ></image> | ||
| 33 | + <image | ||
| 34 | + style="width: 48rpx;height: 48rpx;" | ||
| 35 | + slot="inactive-icon" | ||
| 36 | + src="@/static/tabbarIcon/mall.png" | ||
| 37 | + mode="widthFix" | ||
| 38 | + ></image> | ||
| 39 | + </u-tabbar-item> | ||
| 40 | + <u-tabbar-item name="order" text="订单" @click="navRouter('/pages/order/order')"> | ||
| 41 | + <image | ||
| 42 | + style="width: 48rpx;height: 48rpx;" | ||
| 43 | + slot="active-icon" | ||
| 44 | + src="@/static/tabbarIcon/order_active.png" | ||
| 45 | + mode="widthFix" | ||
| 46 | + ></image> | ||
| 47 | + <image | ||
| 48 | + style="width: 48rpx;height: 48rpx;" | ||
| 49 | + slot="inactive-icon" | ||
| 50 | + src="@/static/tabbarIcon/order.png" | ||
| 51 | + mode="widthFix" | ||
| 52 | + ></image> | ||
| 53 | + </u-tabbar-item> | ||
| 54 | + <u-tabbar-item name="data" text="数据" @click="navRouter('/pages/data/data')"> | ||
| 55 | + <image | ||
| 56 | + style="width: 48rpx;height: 48rpx;" | ||
| 57 | + slot="active-icon" | ||
| 58 | + src="@/static/tabbarIcon/data_active.png" | ||
| 59 | + mode="widthFix" | ||
| 60 | + ></image> | ||
| 61 | + <image | ||
| 62 | + style="width: 48rpx;height: 48rpx;" | ||
| 63 | + slot="inactive-icon" | ||
| 64 | + src="@/static/tabbarIcon/data.png" | ||
| 65 | + mode="widthFix" | ||
| 66 | + ></image> | ||
| 67 | + </u-tabbar-item> | ||
| 68 | + <u-tabbar-item name="my" text="我的" @click="navRouter('/pages/my/my')"> | ||
| 69 | + <image | ||
| 70 | + style="width: 48rpx;height: 48rpx;" | ||
| 71 | + slot="active-icon" | ||
| 72 | + src="@/static/tabbarIcon/my_active.png" | ||
| 73 | + mode="widthFix" | ||
| 74 | + ></image> | ||
| 75 | + <image | ||
| 76 | + style="width: 48rpx;height: 48rpx;" | ||
| 77 | + slot="inactive-icon" | ||
| 78 | + src="@/static/tabbarIcon/my.png" | ||
| 79 | + mode="widthFix" | ||
| 80 | + ></image> | ||
| 81 | + </u-tabbar-item> | ||
| 82 | + </u-tabbar> | ||
| 83 | +</template> | ||
| 84 | + | ||
| 85 | +<script> | ||
| 86 | + export default { | ||
| 87 | + props: { | ||
| 88 | + tabbarValue: { | ||
| 89 | + type: String, | ||
| 90 | + default: 'home' | ||
| 91 | + } | ||
| 92 | + }, | ||
| 93 | + name:"commonTabbar", | ||
| 94 | + methods: { | ||
| 95 | + navRouter(path, name){ | ||
| 96 | + uni.redirectTo({ | ||
| 97 | + url: path | ||
| 98 | + }) | ||
| 99 | + } | ||
| 100 | + } | ||
| 101 | + } | ||
| 102 | +</script> | ||
| 103 | + | ||
| 104 | +<style lang="scss" scoped> | ||
| 105 | +.u-page__item__slot-icon{ | ||
| 106 | + width: 48rpx; | ||
| 107 | +} | ||
| 108 | +</style> |
components/data/dataCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view> | ||
| 3 | + <view class="dis-flex flex-y-center flex-x-between"> | ||
| 4 | + <text class="title_common">今日实时数据</text> | ||
| 5 | + <text class="col-9 f-24">04-15 17:20</text> | ||
| 6 | + </view> | ||
| 7 | + <view class="dis-flex flex-y-center flex-x-between"> | ||
| 8 | + <view class="box active"> | ||
| 9 | + <text class="f-24">预计收入</text> | ||
| 10 | + <view class="f-36 f-w-600">{{ formatPrice[0] }}<text class="f-24 f-w-500">{{ '.' + formatPrice[1] }}</text></view> | ||
| 11 | + </view> | ||
| 12 | + <view class="box"> | ||
| 13 | + <text class="f-24">有效订单</text> | ||
| 14 | + <view class="f-36 f-w-600">50</view> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | + export default { | ||
| 22 | + name:"dataCard", | ||
| 23 | + props: { | ||
| 24 | + title: { | ||
| 25 | + type: String, | ||
| 26 | + default: '' | ||
| 27 | + }, | ||
| 28 | + time: { | ||
| 29 | + type: String, | ||
| 30 | + default: '' | ||
| 31 | + }, | ||
| 32 | + orderNum: { | ||
| 33 | + type: Number, | ||
| 34 | + default: 0 | ||
| 35 | + }, | ||
| 36 | + proReveenue: { | ||
| 37 | + type: String, | ||
| 38 | + default: '' | ||
| 39 | + } | ||
| 40 | + }, | ||
| 41 | + computed: { | ||
| 42 | + formatPrice(){ | ||
| 43 | + return this.proReveenue.split('.') | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | + } | ||
| 47 | +</script> | ||
| 48 | + | ||
| 49 | +<style lang="scss" scoped> | ||
| 50 | +.box{ | ||
| 51 | + display: flex; | ||
| 52 | + flex-direction: column; | ||
| 53 | + align-items: center; | ||
| 54 | + justify-content: center; | ||
| 55 | + gap: 10rpx; | ||
| 56 | + width: 320rpx; | ||
| 57 | + height: 130rpx; | ||
| 58 | + background: #F6F7FB; | ||
| 59 | + border-radius: 12rpx; | ||
| 60 | + color: #3d3d3d; | ||
| 61 | + margin-top: 44rpx; | ||
| 62 | + &.active{ | ||
| 63 | + background: #FFE8DA; | ||
| 64 | + border: 2rpx solid #FFB336; | ||
| 65 | + } | ||
| 66 | +} | ||
| 67 | +</style> |
components/data/dataComputed.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="pro_income" :style="{marginTop: marginTop + 'px' }"> | ||
| 3 | + <view v-show="showTitle" class="f-32 l-h-38 col-3d f-w-500 mb-20">预计收入</view> | ||
| 4 | + <view class="computed" :style="{backgroundColor: bgColor}"> | ||
| 5 | + <view class="cell"> | ||
| 6 | + <text class="col-9 f-24 l-h-32 f-w-400">预计收入</text> | ||
| 7 | + <text>487.50</text> | ||
| 8 | + </view> | ||
| 9 | + <text class="string">=</text> | ||
| 10 | + <view class="cell"> | ||
| 11 | + <text class="col-9 f-24 l-h-32 f-w-400">今日已完单</text> | ||
| 12 | + <text>458.41</text> | ||
| 13 | + </view> | ||
| 14 | + <text class="string">+</text> | ||
| 15 | + <view class="cell"> | ||
| 16 | + <text class="col-9 f-24 l-h-32 f-w-400">今日下单进行中</text> | ||
| 17 | + <text>29.09</text> | ||
| 18 | + </view> | ||
| 19 | + </view> | ||
| 20 | + </view> | ||
| 21 | +</template> | ||
| 22 | + | ||
| 23 | +<script> | ||
| 24 | + export default { | ||
| 25 | + name:"dataComputed", | ||
| 26 | + props: { | ||
| 27 | + showTitle: { | ||
| 28 | + type: Boolean, | ||
| 29 | + default: true | ||
| 30 | + }, | ||
| 31 | + bgColor: { | ||
| 32 | + type: String, | ||
| 33 | + default: '#F6F7FB' | ||
| 34 | + }, | ||
| 35 | + marginTop: { | ||
| 36 | + type: Number, | ||
| 37 | + default: 40 | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | + } | ||
| 41 | +</script> | ||
| 42 | + | ||
| 43 | +<style lang="scss" scoped> | ||
| 44 | +.pro_income{ | ||
| 45 | + .computed{ | ||
| 46 | + display: flex; | ||
| 47 | + align-items: center; | ||
| 48 | + padding: 0 20rpx; | ||
| 49 | + height: 120rpx; | ||
| 50 | + background: #F6F7FB; | ||
| 51 | + border-radius: 12rpx; | ||
| 52 | + .cell{ | ||
| 53 | + font-weight: 500; | ||
| 54 | + color: #3d3d3d; | ||
| 55 | + font-size: 32rpx; | ||
| 56 | + line-height: 42rpx; | ||
| 57 | + } | ||
| 58 | + .string{ | ||
| 59 | + color: #3d3d3d; | ||
| 60 | + font-size: 36rpx; | ||
| 61 | + line-height: 48rpx; | ||
| 62 | + font-weight: 600; | ||
| 63 | + margin: 0 30rpx; | ||
| 64 | + } | ||
| 65 | + } | ||
| 66 | +} | ||
| 67 | +</style> |
components/data/dataDetail.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="detail_content"> | ||
| 3 | + <!-- 时间列表 --> | ||
| 4 | + <view class="time_list"> | ||
| 5 | + <view | ||
| 6 | + v-for="item in timeList" | ||
| 7 | + :key="item.id" | ||
| 8 | + class="time_item" | ||
| 9 | + :class="{active: current === item.id}" | ||
| 10 | + @click="current = item.id" | ||
| 11 | + > | ||
| 12 | + {{ item.text }} | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + <!-- 收入列表 --> | ||
| 16 | + <view class="revenue"> | ||
| 17 | + <DataComputed v-show="current === 0" :showTitle="false" bgColor="transparent" :marginTop="0" /> | ||
| 18 | + <view v-show="current === 3" class="month"> | ||
| 19 | + 4<text class="f-36 l-h-48">月</text> | ||
| 20 | + </view> | ||
| 21 | + <view v-show="current !== 0"> | ||
| 22 | + <view class="dis-flex flex-dir-column flex-y-center"> | ||
| 23 | + <text class="f-w-600 col-3d f-48 l-h-64">123456</text> | ||
| 24 | + <text class="f-28 col-9 l-h-38 m-top10">总收入</text> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | + <view class="px-20" style="background-color: #fff;"> | ||
| 29 | + <RevenueCard v-for="item in 5" :key="item" /> | ||
| 30 | + </view> | ||
| 31 | + </view> | ||
| 32 | +</template> | ||
| 33 | + | ||
| 34 | +<script> | ||
| 35 | + import DataComputed from '@/components/data/dataComputed.vue' | ||
| 36 | + import RevenueCard from '@/components/data/revenueCard.vue' | ||
| 37 | + export default { | ||
| 38 | + name:"dataDetail", | ||
| 39 | + components: { DataComputed, RevenueCard }, | ||
| 40 | + data() { | ||
| 41 | + return { | ||
| 42 | + current: 0, | ||
| 43 | + timeList: [ | ||
| 44 | + { id: 0, text: '今日', time: new Date() }, | ||
| 45 | + { id: 1, text: '近7日', time: '' }, | ||
| 46 | + { id: 2, text: '近30日', time: '' }, | ||
| 47 | + { id: 3, text: '近1年', time: '' } | ||
| 48 | + ] | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | +</script> | ||
| 53 | + | ||
| 54 | +<style lang="scss" scoped> | ||
| 55 | +.detail_content{ | ||
| 56 | + padding: 20rpx 30rpx 0; | ||
| 57 | + .time_list{ | ||
| 58 | + display: flex; | ||
| 59 | + align-items: center; | ||
| 60 | + justify-content: space-between; | ||
| 61 | + margin-bottom: 68rpx; | ||
| 62 | + .time_item{ | ||
| 63 | + width: 160rpx; | ||
| 64 | + height: 60rpx; | ||
| 65 | + background: #FFF0C3; | ||
| 66 | + color: #666; | ||
| 67 | + font-size: 28rpx; | ||
| 68 | + line-height: 60rpx; | ||
| 69 | + border-radius: 12rpx; | ||
| 70 | + text-align: center; | ||
| 71 | + &.active{ | ||
| 72 | + color: #333; | ||
| 73 | + background: linear-gradient( 45deg, #FEE14D 0%, #FFC24D 100%); | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + .revenue{ | ||
| 78 | + position: relative; | ||
| 79 | + display: flex; | ||
| 80 | + align-items: center; | ||
| 81 | + justify-content: center; | ||
| 82 | + height: 200rpx; | ||
| 83 | + background: radial-gradient(ellipse at 10% 20%, #e186ff33 0%, #86fbff33 90%); | ||
| 84 | + border-radius: 12rpx 12rpx 0rpx 0rpx; | ||
| 85 | + .month{ | ||
| 86 | + position: absolute; | ||
| 87 | + top: -44rpx; | ||
| 88 | + left: 40rpx; | ||
| 89 | + color: #3d3d3d; | ||
| 90 | + font-size: 72rpx; | ||
| 91 | + font-weight: 500; | ||
| 92 | + line-height: 96rpx; | ||
| 93 | + } | ||
| 94 | + } | ||
| 95 | +} | ||
| 96 | +</style> |
components/data/dataPandect.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="data_content"> | ||
| 3 | + <!-- 今日数据 --> | ||
| 4 | + <view class="today_data"> | ||
| 5 | + <view class="px-20"> | ||
| 6 | + <DataCard title="今日实时数据" time="04-15 17:20" :orderNum="50" proReveenue="487.50" /> | ||
| 7 | + <DataComputed /> | ||
| 8 | + </view> | ||
| 9 | + <view class="echarts_box"> | ||
| 10 | + <Echarts :option="lineOption" /> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | + <!-- 时间范围内数据 --> | ||
| 14 | + <view class="time_data"> | ||
| 15 | + <view class="time_list"> | ||
| 16 | + <view class="time_item active">近7日</view> | ||
| 17 | + <view class="time_item">近30日</view> | ||
| 18 | + <view class="time_item">近1年</view> | ||
| 19 | + </view> | ||
| 20 | + <view class="bg-fff px-20 py-38" style="border-radius: 12rpx;"> | ||
| 21 | + <DataCard title="近7日数据" time="04.08-04.14" :orderNum="379" proReveenue="4580.50" /> | ||
| 22 | + <view class="echarts_box"> | ||
| 23 | + <Echarts :option="barOption" /> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + </view> | ||
| 28 | +</template> | ||
| 29 | + | ||
| 30 | +<script> | ||
| 31 | + import DataComputed from '@/components/data/dataComputed.vue' | ||
| 32 | + import DataCard from '@/components/data/dataCard.vue' | ||
| 33 | + import Echarts from '@/components/echarts.vue' | ||
| 34 | + export default { | ||
| 35 | + name:"dataPandect", | ||
| 36 | + components: { DataCard, DataComputed, Echarts }, | ||
| 37 | + data() { | ||
| 38 | + return { | ||
| 39 | + // 一周内柱状图表 | ||
| 40 | + barOption:{ | ||
| 41 | + title: { | ||
| 42 | + text: '收入数据图', | ||
| 43 | + textStyle: { | ||
| 44 | + fontSize: '16px', | ||
| 45 | + color: '#3d3d3d', | ||
| 46 | + fontWeight: 500 | ||
| 47 | + } | ||
| 48 | + }, | ||
| 49 | + color: ['#FFB336'], | ||
| 50 | + tooltip: { | ||
| 51 | + trigger: 'axis', | ||
| 52 | + axisPointer: { | ||
| 53 | + type: 'shadow' | ||
| 54 | + } | ||
| 55 | + }, | ||
| 56 | + grid: { | ||
| 57 | + left: '3%', | ||
| 58 | + right: '4%', | ||
| 59 | + bottom: '3%', | ||
| 60 | + containLabel: true | ||
| 61 | + }, | ||
| 62 | + xAxis: [ | ||
| 63 | + { | ||
| 64 | + name: '日期', | ||
| 65 | + nameLocation: 'start', | ||
| 66 | + nameTextStyle: { | ||
| 67 | + padding: [0, 10, 0, 0], | ||
| 68 | + color: '#999999' | ||
| 69 | + }, | ||
| 70 | + axisLabel: { | ||
| 71 | + textStyle: { | ||
| 72 | + color: '#999' | ||
| 73 | + } | ||
| 74 | + }, | ||
| 75 | + type: 'category', | ||
| 76 | + data: ['04.08', '04.09', '04.10', '04.11', '04.12', '04.13', '04.14'], | ||
| 77 | + axisTick: { | ||
| 78 | + alignWithLabel: true | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + ], | ||
| 82 | + yAxis: [ | ||
| 83 | + { | ||
| 84 | + name: '单位:元', | ||
| 85 | + nameTextStyle: { | ||
| 86 | + padding: [0, 40, 0, 0], | ||
| 87 | + color: '#999999' | ||
| 88 | + }, | ||
| 89 | + axisLabel: { | ||
| 90 | + textStyle: { | ||
| 91 | + color: '#999' | ||
| 92 | + } | ||
| 93 | + }, | ||
| 94 | + type: 'value' | ||
| 95 | + } | ||
| 96 | + ], | ||
| 97 | + series: [ | ||
| 98 | + { | ||
| 99 | + name: 'Direct', | ||
| 100 | + type: 'bar', | ||
| 101 | + barWidth: '30%', | ||
| 102 | + data: [800, 3300, 1800, 950, 2756, 925, 1920] | ||
| 103 | + } | ||
| 104 | + ] | ||
| 105 | + }, | ||
| 106 | + // 今日数据图标 | ||
| 107 | + lineOption: { | ||
| 108 | + tooltip: { | ||
| 109 | + trigger: 'axis' | ||
| 110 | + }, | ||
| 111 | + legend: { | ||
| 112 | + data: ['今日预计收入', '昨日收入'] | ||
| 113 | + }, | ||
| 114 | + grid: { | ||
| 115 | + left: '6%', | ||
| 116 | + right: '4%', | ||
| 117 | + bottom: '9%', | ||
| 118 | + containLabel: true | ||
| 119 | + }, | ||
| 120 | + xAxis: { | ||
| 121 | + nameLocation: 'start', | ||
| 122 | + nameGap: 30, | ||
| 123 | + type: 'category', | ||
| 124 | + boundaryGap: false, | ||
| 125 | + data: [1, 4, 7, 10, 13, 16, 19, 22], | ||
| 126 | + name: '时段' | ||
| 127 | + }, | ||
| 128 | + yAxis: { | ||
| 129 | + nameLocation: 'end', | ||
| 130 | + type: 'value', | ||
| 131 | + name: '单位:元', | ||
| 132 | + minInterval: 0.1, //分割刻度 | ||
| 133 | + interval: 200, | ||
| 134 | + }, | ||
| 135 | + series: [ | ||
| 136 | + { | ||
| 137 | + name: '今日预计收入', | ||
| 138 | + data: [0, 0, 0, 58, 210, 380, 450, 800], | ||
| 139 | + type: 'line', | ||
| 140 | + itemStyle: { | ||
| 141 | + normal: { | ||
| 142 | + color: '#0472FB', | ||
| 143 | + lineStyle: { | ||
| 144 | + color: '#0472FB' | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + }, | ||
| 148 | + areaStyle: { | ||
| 149 | + color: 'rgba(4,114,251,0.3)' | ||
| 150 | + } | ||
| 151 | + }, | ||
| 152 | + { | ||
| 153 | + name: '昨日收入', | ||
| 154 | + data: [0, 0, 0, 110, 180, 480, 530, 900], | ||
| 155 | + type: 'line', | ||
| 156 | + itemStyle: { | ||
| 157 | + normal: { | ||
| 158 | + color: '#FFB336', | ||
| 159 | + lineStyle: { | ||
| 160 | + color: '#FFB336' | ||
| 161 | + } | ||
| 162 | + } | ||
| 163 | + }, | ||
| 164 | + areaStyle: { | ||
| 165 | + opacity: 0 | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + ] | ||
| 169 | + }, | ||
| 170 | + // 长时间图表 | ||
| 171 | + longTimeOption: { | ||
| 172 | + title: { | ||
| 173 | + text: 'Stacked Area Chart' | ||
| 174 | + }, | ||
| 175 | + tooltip: { | ||
| 176 | + trigger: 'axis', | ||
| 177 | + axisPointer: { | ||
| 178 | + type: 'cross', | ||
| 179 | + label: { | ||
| 180 | + backgroundColor: '#6a7985' | ||
| 181 | + } | ||
| 182 | + } | ||
| 183 | + }, | ||
| 184 | + grid: { | ||
| 185 | + left: '3%', | ||
| 186 | + right: '4%', | ||
| 187 | + bottom: '3%', | ||
| 188 | + containLabel: true | ||
| 189 | + }, | ||
| 190 | + xAxis: [ | ||
| 191 | + { | ||
| 192 | + type: 'category', | ||
| 193 | + boundaryGap: false, | ||
| 194 | + data: ['2024.03.14', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', '2024.04.14'], | ||
| 195 | + axisLabel: { | ||
| 196 | + interval:5 | ||
| 197 | + } | ||
| 198 | + } | ||
| 199 | + ], | ||
| 200 | + yAxis: [ | ||
| 201 | + { | ||
| 202 | + show: false, | ||
| 203 | + type: 'value' | ||
| 204 | + } | ||
| 205 | + ], | ||
| 206 | + series: [ | ||
| 207 | + { | ||
| 208 | + name: 'Email', | ||
| 209 | + type: 'line', | ||
| 210 | + stack: 'Total', | ||
| 211 | + areaStyle: {}, | ||
| 212 | + smooth:true, | ||
| 213 | + itemStyle: { | ||
| 214 | + normal: { | ||
| 215 | + color: "#FFB336", //改变折线点的颜色 | ||
| 216 | + lineStyle: { | ||
| 217 | + color: "#FFB336", //改变折线颜色 | ||
| 218 | + }, | ||
| 219 | + } | ||
| 220 | + }, | ||
| 221 | + areaStyle: { | ||
| 222 | + color: { | ||
| 223 | + type: 'linear', | ||
| 224 | + x: 0, | ||
| 225 | + y: 0, | ||
| 226 | + x2: 0, | ||
| 227 | + y2: 1, | ||
| 228 | + colorStops: [ | ||
| 229 | + { | ||
| 230 | + offset: 0.6, | ||
| 231 | + color: '#FFCB74' | ||
| 232 | + }, | ||
| 233 | + { | ||
| 234 | + offset: 1, | ||
| 235 | + color: '#fff' | ||
| 236 | + } | ||
| 237 | + ] | ||
| 238 | + } | ||
| 239 | + }, | ||
| 240 | + data: [120, 132, 101, 134, 90, 230, 210] | ||
| 241 | + } | ||
| 242 | + ] | ||
| 243 | + } | ||
| 244 | + } | ||
| 245 | + } | ||
| 246 | + } | ||
| 247 | +</script> | ||
| 248 | + | ||
| 249 | +<style lang="scss" scoped> | ||
| 250 | +.data_content{ | ||
| 251 | + padding: 20rpx 30rpx 0; | ||
| 252 | + .echarts_box{ | ||
| 253 | + height: 580rpx; | ||
| 254 | + margin-top: 40rpx; | ||
| 255 | + } | ||
| 256 | + .today_data{ | ||
| 257 | + padding: 38rpx 0; | ||
| 258 | + background: #FFFFFF; | ||
| 259 | + border-radius: 12rpx; | ||
| 260 | + } | ||
| 261 | + .time_data{ | ||
| 262 | + margin-top: 40rpx; | ||
| 263 | + .time_list{ | ||
| 264 | + display: flex; | ||
| 265 | + align-items: center; | ||
| 266 | + justify-content: space-between; | ||
| 267 | + margin-bottom: 40rpx; | ||
| 268 | + .time_item{ | ||
| 269 | + width: 200rpx; | ||
| 270 | + height: 60rpx; | ||
| 271 | + background: #FFF0C3; | ||
| 272 | + color: #666; | ||
| 273 | + font-size: 28rpx; | ||
| 274 | + line-height: 60rpx; | ||
| 275 | + border-radius: 12rpx; | ||
| 276 | + text-align: center; | ||
| 277 | + &.active{ | ||
| 278 | + color: #333; | ||
| 279 | + background: linear-gradient( 45deg, #FEE14D 0%, #FFC24D 100%); | ||
| 280 | + } | ||
| 281 | + } | ||
| 282 | + } | ||
| 283 | + } | ||
| 284 | +} | ||
| 285 | +</style> |
components/data/revenueCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="revenueCard"> | ||
| 3 | + <view class="f-24 l-h-32 mb-10"> | ||
| 4 | + <text class="col-3 ">10:31</text> | ||
| 5 | + <text class="col-9 m-l-20">订单流水号:000026</text> | ||
| 6 | + </view> | ||
| 7 | + <view class="dis-flex flex-y-center flex-x-between"> | ||
| 8 | + <view class="left dis-flex flex-dir-column"> | ||
| 9 | + <text class="col-3d f-28 l-h-38">今麦郎熟水凉白开饮用水</text> | ||
| 10 | + <text class="col-9 f-24 l-h-32">500ml</text> | ||
| 11 | + </view> | ||
| 12 | + <view class="right dis-flex flex-dir-column col-primary"> | ||
| 13 | + <text class="f-w-500 f-28 l-h-38 t-r">+2</text> | ||
| 14 | + <text class="f-24 l-h-32">下单进行中</text> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | + export default { | ||
| 22 | + | ||
| 23 | + } | ||
| 24 | +</script> | ||
| 25 | + | ||
| 26 | +<style lang="scss" scoped> | ||
| 27 | + .revenueCard{ | ||
| 28 | + background-color: #fff; | ||
| 29 | + padding: 40rpx 0; | ||
| 30 | + border-bottom: 2rpx solid #EEEEEE; | ||
| 31 | + } | ||
| 32 | +</style> |
components/echarts.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view> | ||
| 3 | + <l-echart ref="chartRef" @finished="init"></l-echart> | ||
| 4 | + </view> | ||
| 5 | +</template> | ||
| 6 | + | ||
| 7 | +<script> | ||
| 8 | +import * as echarts from '@/pages_data/static/echarts.min.js' | ||
| 9 | +export default { | ||
| 10 | + props: { | ||
| 11 | + option: { | ||
| 12 | + type: Object, | ||
| 13 | + require: true | ||
| 14 | + } | ||
| 15 | + }, | ||
| 16 | + // 组件能被调用必须是组件的节点已经被渲染到页面上 | ||
| 17 | + methods: { | ||
| 18 | + async init() { | ||
| 19 | + // chart 图表实例不能存在data里 | ||
| 20 | + const chart = await this.$refs.chartRef.init(echarts); | ||
| 21 | + chart.setOption(this.option) | ||
| 22 | + } | ||
| 23 | + } | ||
| 24 | +} | ||
| 25 | +</script> | ||
| 26 | + | ||
| 27 | +<style> | ||
| 28 | + | ||
| 29 | +</style> |
components/goodsList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view v-show="goodsList.length > 0" class="cate-right-cont"> | ||
| 3 | + <view class="cate-two-box"> | ||
| 4 | + <view class="cate-cont-box"> | ||
| 5 | + <view class="w-full" v-for="(item, idx) in goodsList" :key="idx" @click="goodDetail(item.id)"> | ||
| 6 | + <view class="cate-img-padding"> | ||
| 7 | + <view class="content-left"> | ||
| 8 | + <image class="image" mode="widthFix" :src="item.pic"></image> | ||
| 9 | + </view> | ||
| 10 | + <view class="content-right"> | ||
| 11 | + <view class="title u-line-2"> | ||
| 12 | + {{ item.name }} | ||
| 13 | + </view> | ||
| 14 | + <u-icon name="arrow-right-double"></u-icon> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | + </view> | ||
| 19 | + </view> | ||
| 20 | + </view> | ||
| 21 | +</template> | ||
| 22 | + | ||
| 23 | +<script> | ||
| 24 | + export default { | ||
| 25 | + name:"goodsCard", | ||
| 26 | + props: { | ||
| 27 | + goodsList: { | ||
| 28 | + type: Array, | ||
| 29 | + require: true | ||
| 30 | + } | ||
| 31 | + }, | ||
| 32 | + methods: { | ||
| 33 | + goodDetail(goodsID){ | ||
| 34 | + uni.navigateTo({ | ||
| 35 | + url: '/pages_mall/goodsDetail/goodsDetail?goods_id=' + goodsID | ||
| 36 | + }) | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | + } | ||
| 40 | +</script> | ||
| 41 | + | ||
| 42 | +<style lang="scss" scoped> | ||
| 43 | +// 右侧二级分类 | ||
| 44 | + .cate-cont-box { | ||
| 45 | + margin-bottom: 30rpx; | ||
| 46 | + padding-bottom: 10rpx; | ||
| 47 | + background: #fff; | ||
| 48 | + overflow: hidden; | ||
| 49 | + .cate-img-padding{ | ||
| 50 | + display: flex; | ||
| 51 | + align-items: center; | ||
| 52 | + .content-left{ | ||
| 53 | + width: 120rpx; | ||
| 54 | + height: 120rpx; | ||
| 55 | + .image{ | ||
| 56 | + width: 100%; | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + .content-right{ | ||
| 60 | + display: flex; | ||
| 61 | + align-items: center; | ||
| 62 | + justify-content: center; | ||
| 63 | + flex: 1; | ||
| 64 | + height: 120rpx; | ||
| 65 | + padding: 5rpx 30rpx; | ||
| 66 | + .title{ | ||
| 67 | + color: #333; | ||
| 68 | + font-size: 26rpx; | ||
| 69 | + font-weight: 500; | ||
| 70 | + margin-bottom: 10rpx; | ||
| 71 | + } | ||
| 72 | + .content-title{ | ||
| 73 | + display: inline-block; | ||
| 74 | + color: #999; | ||
| 75 | + font-size: 22rpx; | ||
| 76 | + margin: 15rpx 0 15rpx 0; | ||
| 77 | + text-overflow: ellipsis; | ||
| 78 | + overflow: hidden; | ||
| 79 | + white-space: nowrap; | ||
| 80 | + } | ||
| 81 | + .tip{ | ||
| 82 | + font-size: 24rpx; | ||
| 83 | + margin-bottom: 12rpx; | ||
| 84 | + .delivery{ | ||
| 85 | + width: 80rpx; | ||
| 86 | + height: 24rpx; | ||
| 87 | + margin-left: 10rpx; | ||
| 88 | + border: 1px solid #40AE36; | ||
| 89 | + border-radius: 4rpx; | ||
| 90 | + padding: 3rpx; | ||
| 91 | + color: #40AE36; | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + .price{ | ||
| 95 | + position: relative; | ||
| 96 | + font-size: 22rpx; | ||
| 97 | + color: #999; | ||
| 98 | + margin-top: 10rpx; | ||
| 99 | + .price-detail{ | ||
| 100 | + width: 116rpx; | ||
| 101 | + height: 27rpx; | ||
| 102 | + font-size: 32rpx; | ||
| 103 | + font-family: PingFangSC; | ||
| 104 | + font-weight: 500; | ||
| 105 | + color: #F55726; | ||
| 106 | + } | ||
| 107 | + .price-old{ | ||
| 108 | + width: 90rpx; | ||
| 109 | + height: 21rpx; | ||
| 110 | + font-size: 22rpx; | ||
| 111 | + font-family: PingFangSC; | ||
| 112 | + font-weight: 400; | ||
| 113 | + color: #CCCCCC; | ||
| 114 | + margin-left: 6rpx; | ||
| 115 | + } | ||
| 116 | + .addCart{ | ||
| 117 | + position: absolute; | ||
| 118 | + top: -8rpx; | ||
| 119 | + right: 6rpx; | ||
| 120 | + width: 46rpx; | ||
| 121 | + height: 46rpx; | ||
| 122 | + background-color: #40AE36; | ||
| 123 | + border-radius: 50%; | ||
| 124 | + text-align: center; | ||
| 125 | + line-height: 44rpx; | ||
| 126 | + } | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | + .name { | ||
| 131 | + display: block; | ||
| 132 | + padding-bottom: 30rpx; | ||
| 133 | + text-align: center; | ||
| 134 | + font-size: 26rpx; | ||
| 135 | + color: #444444; | ||
| 136 | + } | ||
| 137 | + | ||
| 138 | + .cate-img-padding { | ||
| 139 | + padding: 16rpx 16rpx 4rpx 16rpx; | ||
| 140 | + } | ||
| 141 | + | ||
| 142 | + .cate-img { | ||
| 143 | + position: relative; | ||
| 144 | + width: 100%; | ||
| 145 | + padding-top: 100%; | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | +</style> |
components/home/AccessCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="access"> | ||
| 3 | + <view class="access_head"> | ||
| 4 | + <text class="col-3d f-w-500 f-32 m-r-10">近30天</text>数据更新时间06/13 | ||
| 5 | + </view> | ||
| 6 | + <view class="access_body"> | ||
| 7 | + <view class="access_item"> | ||
| 8 | + <text>访问人数</text> | ||
| 9 | + <text class="number f-w-500 f-36 l-h-48 m-top10">0</text> | ||
| 10 | + </view> | ||
| 11 | + <view class="access_item"> | ||
| 12 | + <text>订单数 ></text> | ||
| 13 | + <text class="number f-w-500 f-36 l-h-48 m-top10">0</text> | ||
| 14 | + </view> | ||
| 15 | + </view> | ||
| 16 | + </view> | ||
| 17 | +</template> | ||
| 18 | + | ||
| 19 | +<script> | ||
| 20 | +</script> | ||
| 21 | + | ||
| 22 | +<style lang="scss" scoped> | ||
| 23 | +// 访问量 | ||
| 24 | +.access{ | ||
| 25 | + width: 100%; | ||
| 26 | + height: 240rpx; | ||
| 27 | + background-color: #fff; | ||
| 28 | + border-radius: 12rpx; | ||
| 29 | + padding: 20rpx; | ||
| 30 | + box-sizing: border-box; | ||
| 31 | + .access_head{ | ||
| 32 | + color: #999; | ||
| 33 | + font-size: 20rpx; | ||
| 34 | + } | ||
| 35 | + .access_body{ | ||
| 36 | + display: flex; | ||
| 37 | + align-items: center; | ||
| 38 | + justify-content: space-around; | ||
| 39 | + .access_item{ | ||
| 40 | + display: flex; | ||
| 41 | + flex-direction: column; | ||
| 42 | + align-items: center; | ||
| 43 | + color: #3d3d3d; | ||
| 44 | + font-size: 24rpx; | ||
| 45 | + line-height: 32rpx; | ||
| 46 | + margin-top: 40rpx; | ||
| 47 | + .number{ | ||
| 48 | + font-family: 'HelveticaNeue-Medium'; | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | +} | ||
| 53 | +</style> |
components/home/ExistingBureau.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="existing_bureau"> | ||
| 3 | + <view v-for="item in 3" :key="item" class="bureau_item" @click="goRouter"> | ||
| 4 | + <view class="left"> | ||
| 5 | + <image class="cover_img" src="@/static/homeImg/bgimg.webp" mode=""></image> | ||
| 6 | + </view> | ||
| 7 | + <view class="right"> | ||
| 8 | + <text class="f-w-500 f-28 l-h-38 mb-10">北宋奇案·汴京</text> | ||
| 9 | + <view class="line-2"> | ||
| 10 | + <text>1号包间</text> | ||
| 11 | + <text class="m-l-20">¥99/人</text> | ||
| 12 | + </view> | ||
| 13 | + <text class="col-3d">06月03日 今天19:30</text> | ||
| 14 | + <text class="detail">详情</text> | ||
| 15 | + <view class="avatar_group"> | ||
| 16 | + <u-avatar-group | ||
| 17 | + :urls="urls" | ||
| 18 | + size="15" | ||
| 19 | + maxCount="4" | ||
| 20 | + gap="0.4" | ||
| 21 | + /> | ||
| 22 | + <text class="col-3d">等7人</text> | ||
| 23 | + </view> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | +</template> | ||
| 28 | + | ||
| 29 | +<script> | ||
| 30 | + export default { | ||
| 31 | + data(){ | ||
| 32 | + return { | ||
| 33 | + urls: [ | ||
| 34 | + 'https://cdn.uviewui.com/uview/album/1.jpg', | ||
| 35 | + 'https://cdn.uviewui.com/uview/album/2.jpg', | ||
| 36 | + 'https://cdn.uviewui.com/uview/album/3.jpg', | ||
| 37 | + 'https://cdn.uviewui.com/uview/album/4.jpg', | ||
| 38 | + 'https://cdn.uviewui.com/uview/album/7.jpg', | ||
| 39 | + 'https://cdn.uviewui.com/uview/album/6.jpg', | ||
| 40 | + 'https://cdn.uviewui.com/uview/album/5.jpg' | ||
| 41 | + ] | ||
| 42 | + } | ||
| 43 | + }, | ||
| 44 | + methods: { | ||
| 45 | + goRouter(){ | ||
| 46 | + uni.navigateTo({ | ||
| 47 | + url: '/pages/bureauDetail/bureauDetail' | ||
| 48 | + }) | ||
| 49 | + } | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | +</script> | ||
| 53 | + | ||
| 54 | +<style scoped lang="scss"> | ||
| 55 | + .existing_bureau{ | ||
| 56 | + padding: 0 14rpx; | ||
| 57 | + .bureau_item{ | ||
| 58 | + display: flex; | ||
| 59 | + align-items: center; | ||
| 60 | + border-bottom: 1px solid #eee; | ||
| 61 | + padding: 30rpx 0; | ||
| 62 | + &:last-child{ | ||
| 63 | + border-bottom: 0; | ||
| 64 | + } | ||
| 65 | + .left{ | ||
| 66 | + width: 120rpx; | ||
| 67 | + height: 120rpx; | ||
| 68 | + border-radius: 12rpx; | ||
| 69 | + overflow: hidden; | ||
| 70 | + margin-right: 20rpx; | ||
| 71 | + .cover_img{ | ||
| 72 | + width: 100%; | ||
| 73 | + height: 100%; | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + .right{ | ||
| 77 | + position: relative; | ||
| 78 | + flex: 1; | ||
| 79 | + display: flex; | ||
| 80 | + flex-direction: column; | ||
| 81 | + font-size: 24rpx; | ||
| 82 | + line-height: 32rpx; | ||
| 83 | + .line-2{ | ||
| 84 | + color: #FFD900; | ||
| 85 | + margin-bottom: 8rpx; | ||
| 86 | + } | ||
| 87 | + .detail { | ||
| 88 | + position: absolute; | ||
| 89 | + top: 0; | ||
| 90 | + right: 40rpx; | ||
| 91 | + color: #FFD900; | ||
| 92 | + &::after{ | ||
| 93 | + position: absolute; | ||
| 94 | + top: 50%; | ||
| 95 | + right: -22rpx; | ||
| 96 | + transform: translateY(-50%); | ||
| 97 | + content: ''; | ||
| 98 | + width: 0; | ||
| 99 | + height: 0; | ||
| 100 | + border-top: 6rpx solid transparent; | ||
| 101 | + border-bottom: 6rpx solid transparent; | ||
| 102 | + border-left: 12rpx solid #FFD900; | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + .avatar_group{ | ||
| 106 | + position: absolute; | ||
| 107 | + bottom: -8rpx; | ||
| 108 | + right: 36rpx; | ||
| 109 | + display: flex; | ||
| 110 | + align-items: center; | ||
| 111 | + gap: 4rpx; | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + } | ||
| 115 | + } | ||
| 116 | +</style> |
components/home/PitchList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="pitch_list"> | ||
| 3 | + <view v-for="item in pitchList" :key="item.groundId" class="pitch_item" @click="goRouter(`/pages_arenaControl/addArena/addArena?groundId=${item.groundId}`)"> | ||
| 4 | + <view class="left"> | ||
| 5 | + <image class="cover_img" :src="item.groundPhotos"></image> | ||
| 6 | + </view> | ||
| 7 | + <view class="right"> | ||
| 8 | + <view class="right_text"> | ||
| 9 | + <text class="f-w-500 f-28 l-h-38 col-3d mb-10">{{ item.groundNum }}号包间</text> | ||
| 10 | + <text>{{ item.isOutdoor === 0 ? '室内' : '室外' }}<text class="m-l-20">{{ item.price }}¥/小时</text></text> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | +</template> | ||
| 16 | + | ||
| 17 | +<script> | ||
| 18 | + import { pro_http } from '@/utils/baseUrl.js' | ||
| 19 | + export default { | ||
| 20 | + name:"pitchCard", | ||
| 21 | + props: { | ||
| 22 | + pitchList: { | ||
| 23 | + type: Array, | ||
| 24 | + require: true | ||
| 25 | + } | ||
| 26 | + }, | ||
| 27 | + data() { | ||
| 28 | + return {pro_http} | ||
| 29 | + }, | ||
| 30 | + computed: { | ||
| 31 | + formatPhoto(){ | ||
| 32 | + return (groundPhotos) => { | ||
| 33 | + let imgList = groundPhotos.split(',') | ||
| 34 | + return imgList[0] | ||
| 35 | + } | ||
| 36 | + } | ||
| 37 | + }, | ||
| 38 | + methods: { | ||
| 39 | + goRouter(path){ | ||
| 40 | + uni.navigateTo({ | ||
| 41 | + url: path | ||
| 42 | + }) | ||
| 43 | + } | ||
| 44 | + } | ||
| 45 | + } | ||
| 46 | +</script> | ||
| 47 | + | ||
| 48 | +<style lang="scss" scoped> | ||
| 49 | +.pitch_list{ | ||
| 50 | + display: flex; | ||
| 51 | + flex-direction: column; | ||
| 52 | + padding: 30rpx 20rpx; | ||
| 53 | + .pitch_item{ | ||
| 54 | + position: relative; | ||
| 55 | + display: flex; | ||
| 56 | + align-items: center; | ||
| 57 | + overflow: hidden; | ||
| 58 | + margin-bottom: 20rpx; | ||
| 59 | + &:last-child { | ||
| 60 | + margin-bottom: 0; | ||
| 61 | + } | ||
| 62 | + .left{ | ||
| 63 | + width: 120rpx; | ||
| 64 | + height: 120rpx; | ||
| 65 | + border-radius: 12rpx; | ||
| 66 | + margin-right: 40rpx; | ||
| 67 | + overflow: hidden; | ||
| 68 | + .cover_img{ | ||
| 69 | + width: 100%; | ||
| 70 | + height: 100%; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | + .right{ | ||
| 74 | + flex: 1; | ||
| 75 | + display: flex; | ||
| 76 | + align-items: center; | ||
| 77 | + justify-content: space-between; | ||
| 78 | + .right_text{ | ||
| 79 | + display: flex; | ||
| 80 | + flex-direction: column; | ||
| 81 | + justify-content: center; | ||
| 82 | + font-size: 24rpx; | ||
| 83 | + line-height: 32rpx; | ||
| 84 | + color: #FFD900; | ||
| 85 | + } | ||
| 86 | + .QRCode{ | ||
| 87 | + right: 60rpx; | ||
| 88 | + width: 72rpx; | ||
| 89 | + height: 72rpx; | ||
| 90 | + } | ||
| 91 | + } | ||
| 92 | + } | ||
| 93 | + .add_mode{ | ||
| 94 | + display: flex; | ||
| 95 | + align-items: center; | ||
| 96 | + justify-content: center; | ||
| 97 | + font-size: 28rpx; | ||
| 98 | + line-height: 38rpx; | ||
| 99 | + color: #999; | ||
| 100 | + height: 120rpx; | ||
| 101 | + background: #FFFFFF; | ||
| 102 | + margin-top: 20rpx; | ||
| 103 | + border-radius: 12rpx; | ||
| 104 | + } | ||
| 105 | +} | ||
| 106 | +</style> |
components/home/PlayNav.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="play_list"> | ||
| 3 | + <view v-for="(item, index) in navList" :key="index" :class="{active: index === current}" class="play_item" @click="toggle(item.id,index)"> | ||
| 4 | + <text>{{ item.title }}</text> | ||
| 5 | + <image class="bg_nav" :src="item.bgImg" mode="widthFix"></image> | ||
| 6 | + </view> | ||
| 7 | + </view> | ||
| 8 | +</template> | ||
| 9 | + | ||
| 10 | +<script> | ||
| 11 | + import bg1 from '@/static/homeImg/bg_1.png' | ||
| 12 | + import bg2 from '@/static/homeImg/bg_2.png' | ||
| 13 | + import bg3 from '@/static/homeImg/bg_3.png' | ||
| 14 | + export default { | ||
| 15 | + data() { | ||
| 16 | + return { | ||
| 17 | + current: 0, | ||
| 18 | + navList: [ | ||
| 19 | + { id: 1, title: '狼人杀', bgImg: bg1}, | ||
| 20 | + { id: 2, title: '剧本杀', bgImg: bg2}, | ||
| 21 | + { id: 3, title: '密室逃脱', bgImg: bg3} | ||
| 22 | + ] | ||
| 23 | + } | ||
| 24 | + }, | ||
| 25 | + methods: { | ||
| 26 | + toggle(id, index){ | ||
| 27 | + this.current = index | ||
| 28 | + this.$emit('playName', id) | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | +</script> | ||
| 33 | + | ||
| 34 | +<style lang="scss" scoped> | ||
| 35 | +.play_list{ | ||
| 36 | + display: flex; | ||
| 37 | + align-items: flex-end; | ||
| 38 | + justify-content: space-between; | ||
| 39 | + min-height: 100rpx; | ||
| 40 | + margin: 20rpx 0; | ||
| 41 | + .play_item{ | ||
| 42 | + position: relative; | ||
| 43 | + width: 200rpx; | ||
| 44 | + height: 80rpx; | ||
| 45 | + text-align: center; | ||
| 46 | + line-height: 80rpx; | ||
| 47 | + color: #fff; | ||
| 48 | + font-size: 28rpx; | ||
| 49 | + background: linear-gradient( 45deg, #966CFF 0%, #C3ACFF 59%); | ||
| 50 | + border-radius: 12rpx; | ||
| 51 | + transition: all .3s ease; | ||
| 52 | + &:nth-child(2){ | ||
| 53 | + .bg_nav{ | ||
| 54 | + width: 96rpx; | ||
| 55 | + right: -11%; | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + &:nth-child(3){ | ||
| 59 | + .bg_nav{ | ||
| 60 | + width: 78rpx; | ||
| 61 | + right: -8%; | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + .bg_nav{ | ||
| 65 | + position: absolute; | ||
| 66 | + top: 0; | ||
| 67 | + right: -20%; | ||
| 68 | + width: 135rpx; | ||
| 69 | + } | ||
| 70 | + &.active{ | ||
| 71 | + width: 250rpx; | ||
| 72 | + height: 100rpx; | ||
| 73 | + line-height: 100rpx; | ||
| 74 | + font-weight: 500; | ||
| 75 | + font-size: 36rpx; | ||
| 76 | + .bg_nav{ | ||
| 77 | + transform: scale(1.5); | ||
| 78 | + top: 20rpx; | ||
| 79 | + right: -32rpx; | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + &:nth-child(2) { | ||
| 83 | + background: linear-gradient( 45deg, #FF9B8A 0%, #FFCBC2 68%); | ||
| 84 | + } | ||
| 85 | + &:nth-child(3) { | ||
| 86 | + background: linear-gradient( 45deg, #75ACFF 0%, #A0C6FF 57%); | ||
| 87 | + } | ||
| 88 | + } | ||
| 89 | +} | ||
| 90 | +</style> |
components/home/ScriptList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="scriptList"> | ||
| 3 | + <view v-for="item in 3" :key="item" class="scritp_item" @click="goRouter"> | ||
| 4 | + <view class="left"> | ||
| 5 | + <image class="cover_img" src="@/static/homeImg/bgimg.webp" mode=""></image> | ||
| 6 | + <text class="people_num">6人本</text> | ||
| 7 | + </view> | ||
| 8 | + <view class="right"> | ||
| 9 | + <text class="f-32 col-3d f-w-500 l-h-38 mb-10">北宋奇案·汴京</text> | ||
| 10 | + <text class="col-9">古风/推理/悬疑/高阶</text> | ||
| 11 | + <text class="rate">8.1分</text> | ||
| 12 | + <text class="u-line-1 col-9">一段北宋时期耻辱的历史,两个南宋同朝...</text> | ||
| 13 | + </view> | ||
| 14 | + </view> | ||
| 15 | + </view> | ||
| 16 | +</template> | ||
| 17 | + | ||
| 18 | +<script> | ||
| 19 | +export default { | ||
| 20 | + methods: { | ||
| 21 | + goRouter(){ | ||
| 22 | + uni.navigateTo({ | ||
| 23 | + url: '/pages/bureauDetail/bureauDetail' | ||
| 24 | + }) | ||
| 25 | + } | ||
| 26 | + } | ||
| 27 | +} | ||
| 28 | +</script> | ||
| 29 | + | ||
| 30 | +<style lang="scss" scoped> | ||
| 31 | + .scriptList{ | ||
| 32 | + padding: 0 20rpx; | ||
| 33 | + .scritp_item{ | ||
| 34 | + display: flex; | ||
| 35 | + align-items: center; | ||
| 36 | + padding: 30rpx 0; | ||
| 37 | + border-bottom: 1px solid #eee; | ||
| 38 | + &:last-child{ | ||
| 39 | + border-bottom: 0; | ||
| 40 | + } | ||
| 41 | + .left{ | ||
| 42 | + position: relative; | ||
| 43 | + width: 140rpx; | ||
| 44 | + height: 180rpx; | ||
| 45 | + border-radius: 8rpx; | ||
| 46 | + overflow: hidden; | ||
| 47 | + margin-right: 20rpx; | ||
| 48 | + .cover_img{ | ||
| 49 | + width: 100%; | ||
| 50 | + height: 100%; | ||
| 51 | + } | ||
| 52 | + .people_num{ | ||
| 53 | + position: absolute; | ||
| 54 | + left: 0; | ||
| 55 | + bottom: 0; | ||
| 56 | + width: 100%; | ||
| 57 | + height: 32rpx; | ||
| 58 | + background-color: rgba(0, 0, 0, 0.7); | ||
| 59 | + line-height: 32rpx; | ||
| 60 | + color: #fff; | ||
| 61 | + text-align: center; | ||
| 62 | + font-size: 24rpx; | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | + .right{ | ||
| 66 | + display: flex; | ||
| 67 | + flex-direction: column; | ||
| 68 | + flex: 1; | ||
| 69 | + font-size: 24rpx; | ||
| 70 | + line-height: 32rpx; | ||
| 71 | + .rate{ | ||
| 72 | + color: #FFD900; | ||
| 73 | + margin-top: 18rpx; | ||
| 74 | + margin-bottom: 14rpx; | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | +</style> |
components/mall/mallHeared.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="head_box"> | ||
| 3 | + <u-navbar title="商城管理" leftIconSize="0" placeholder :autoBack="true" bgColor="transparent" :titleStyle="{fontSize: '36rpx', color: '#333', fontWeight: 500}" /> | ||
| 4 | + <view class="dis-flex flex-x-around mt-60"> | ||
| 5 | + <view class="dis-flex flex-dir-column flex-y-center col-3d"> | ||
| 6 | + <text class="f-28 l-h-38 mb-10">今日预计收入/元</text> | ||
| 7 | + <view class="f-48 f-w-500">487<text class="f-24">.05</text></view> | ||
| 8 | + </view> | ||
| 9 | + <view class="dis-flex flex-dir-column flex-y-center col-3d"> | ||
| 10 | + <text class="f-28 l-h-38 mb-10">有效订单/单</text> | ||
| 11 | + <view class="f-48 f-w-500">50<text class="f-24"></text></view> | ||
| 12 | + </view> | ||
| 13 | + </view> | ||
| 14 | + | ||
| 15 | + <view class="function_list"> | ||
| 16 | + <view v-for="item in funcionList" :key="item.id" class="dis-flex flex-dir-column flex-y-center" @click="goRouter(item.routerPath)"> | ||
| 17 | + <image style="width: 80rpx;" class="mb-10" :src="item.iconName" mode="widthFix"></image> | ||
| 18 | + <text class="l-h-32 col-3d f-24">{{ item.text }}</text> | ||
| 19 | + </view> | ||
| 20 | + </view> | ||
| 21 | + | ||
| 22 | + </view> | ||
| 23 | +</template> | ||
| 24 | + | ||
| 25 | +<script> | ||
| 26 | + import add from '@/static/mallImg/add_goods.png' | ||
| 27 | + import edit from '@/static/mallImg/edit_goods.png' | ||
| 28 | + import del from '@/static/mallImg/del_goods.png' | ||
| 29 | + import info from '@/static/mallImg/info_goods.png' | ||
| 30 | + export default { | ||
| 31 | + name:"mallHeatar", | ||
| 32 | + data() { | ||
| 33 | + return { | ||
| 34 | + funcionList: [ | ||
| 35 | + { id: 1, text: '新建商品', iconName: add, routerPath: '/pages_mall/goods/addGoods' }, | ||
| 36 | + { id: 2, text: '商品编辑', iconName: edit, routerPath: '/pages_mall/goods/edidGoods' }, | ||
| 37 | + { id: 3, text: '下架商品', iconName: del, routerPath: '/pages_mall/goods/underGoods' }, | ||
| 38 | + { id: 4, text: '库存信息', iconName: info, routerPath: '/pages_mall/goods/stockInformation' }, | ||
| 39 | + ] | ||
| 40 | + }; | ||
| 41 | + }, | ||
| 42 | + methods: { | ||
| 43 | + goRouter(path){ | ||
| 44 | + uni.navigateTo({ | ||
| 45 | + url: path | ||
| 46 | + }) | ||
| 47 | + } | ||
| 48 | + } | ||
| 49 | + } | ||
| 50 | +</script> | ||
| 51 | + | ||
| 52 | +<style lang="scss" scoped> | ||
| 53 | +.head_box{ | ||
| 54 | + height: 596rpx; | ||
| 55 | + background: linear-gradient(to right, #F7ECEC, #ECF1F7); | ||
| 56 | + .function_list{ | ||
| 57 | + display: flex; | ||
| 58 | + justify-content: space-between; | ||
| 59 | + margin: 26rpx 30rpx 0; | ||
| 60 | + padding: 40rpx 38rpx; | ||
| 61 | + background: #FFFFFF; | ||
| 62 | + border-radius: 20rpx 20rpx 20rpx 20rpx; | ||
| 63 | + } | ||
| 64 | +} | ||
| 65 | +</style> |
components/mall/mallSelect.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="goods_show"> | ||
| 3 | + <view class="show_title">商品预览</view> | ||
| 4 | + <view class="cate-content"> | ||
| 5 | + <!-- 左侧 一级分类 --> | ||
| 6 | + <scroll-view class="cate-left" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> | ||
| 7 | + <text v-for="(item, index) in classifyList" :key="index" class="type-nav" :class="{ selected: curIndex == index }" @click="handleSelectNav(index)">{{ item.name }}</text> | ||
| 8 | + </scroll-view> | ||
| 9 | + <!-- 右侧 二级分类 --> | ||
| 10 | + <scroll-view class="cate-right" :scroll-y="true" :style="{ height: `${scrollHeight}px` }"> | ||
| 11 | + <!-- 分类显示列表 --> | ||
| 12 | + <GoodsList :goodsList="showProductList" /> | ||
| 13 | + <!-- 空数据显示 --> | ||
| 14 | + <view v-show="showProductList.length === 0" > | ||
| 15 | + <u-empty mode="list" /> | ||
| 16 | + </view> | ||
| 17 | + </scroll-view> | ||
| 18 | + </view> | ||
| 19 | + </view> | ||
| 20 | +</template> | ||
| 21 | + | ||
| 22 | +<script> | ||
| 23 | + import GoodsList from '@/components/goodsList.vue' | ||
| 24 | + export default { | ||
| 25 | + name:"mallSelect", | ||
| 26 | + components: { GoodsList }, | ||
| 27 | + props: { | ||
| 28 | + scrollHeight: { | ||
| 29 | + type: Number, | ||
| 30 | + default: 0 | ||
| 31 | + } | ||
| 32 | + }, | ||
| 33 | + data() { | ||
| 34 | + return { | ||
| 35 | + // 商品分类列表 | ||
| 36 | + classifyList: [ | ||
| 37 | + {name: '篮球'}, {name: '饮品'}, {name: '足球'}, {name: '羽毛球'}, {name: '乒乓球'}, {name: '棒球'}, {name: '排球'}, {name: '网球'} | ||
| 38 | + ], | ||
| 39 | + showProductList: [ | ||
| 40 | + {id: 1, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 41 | + {id: 2, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 42 | + {id: 4, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 43 | + {id: 5, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 44 | + {id: 6, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 45 | + {id: 7, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'}, | ||
| 46 | + {id: 8, pic: 'https://cbu01.alicdn.com/img/ibank/2016/759/755/3743557957_600065101.jpg', name: '今麦郎熟水凉白开饮用核实过后广寒深宫hi哦干哈...'} | ||
| 47 | + ], // 当前展示商品列表 | ||
| 48 | + curIndex: 0, // 一级分类 | ||
| 49 | + activeIndex: 0, // 二级分类 | ||
| 50 | + } | ||
| 51 | + }, | ||
| 52 | + methods: { | ||
| 53 | + // 一级分类:选中分类 | ||
| 54 | + handleSelectNav(index) { | ||
| 55 | + this.curIndex = index | ||
| 56 | + this.activeIndex = 0 | ||
| 57 | + }, | ||
| 58 | + // 获取商品列表 | ||
| 59 | + async getShopList() { | ||
| 60 | + | ||
| 61 | + }, | ||
| 62 | + // 显示当前商品列表 | ||
| 63 | + showProduct() { | ||
| 64 | + | ||
| 65 | + }, | ||
| 66 | + onCellect(id) { | ||
| 67 | + | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | +</script> | ||
| 72 | + | ||
| 73 | +<style lang="scss" scoped> | ||
| 74 | +.goods_show{ | ||
| 75 | + border-radius: 20rpx 20rpx 0 0; | ||
| 76 | + overflow: hidden; | ||
| 77 | + .show_title{ | ||
| 78 | + position: relative; | ||
| 79 | + height: 84rpx; | ||
| 80 | + box-sizing: border-box; | ||
| 81 | + border-bottom: 2rpx solid #eee; | ||
| 82 | + padding-left: 46rpx; | ||
| 83 | + font-size: 32rpx; | ||
| 84 | + font-weight: 500; | ||
| 85 | + line-height: 84rpx; | ||
| 86 | + background-color: #fff; | ||
| 87 | + &::before{ | ||
| 88 | + content: ''; | ||
| 89 | + position: absolute; | ||
| 90 | + top: 50%; | ||
| 91 | + left: 30rpx; | ||
| 92 | + transform: translateY(-50%); | ||
| 93 | + width: 6rpx; | ||
| 94 | + height: 24rpx; | ||
| 95 | + border-radius: 20rpx; | ||
| 96 | + background-color: #FFB336; | ||
| 97 | + } | ||
| 98 | + } | ||
| 99 | +} | ||
| 100 | + | ||
| 101 | +// 分类内容 | ||
| 102 | +.cate-content { | ||
| 103 | + display: flex; | ||
| 104 | + z-index: 1; | ||
| 105 | + background: #fff; | ||
| 106 | +} | ||
| 107 | + // 一级分类+二级分类 20 | ||
| 108 | + .cate-left { | ||
| 109 | + height: 100%; | ||
| 110 | + display: flex; | ||
| 111 | + flex-direction: column; | ||
| 112 | + flex: 0 0 23%; | ||
| 113 | + background: #f8f8f8; | ||
| 114 | + color: #444; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + .cate-right { | ||
| 118 | + display: flex; | ||
| 119 | + flex-direction: column; | ||
| 120 | + height: 100%; | ||
| 121 | + overflow: hidden; | ||
| 122 | + .secondary-nav{ | ||
| 123 | + position: relative; | ||
| 124 | + height: 110rpx; | ||
| 125 | + padding: 30rpx; | ||
| 126 | + .nav-list{ | ||
| 127 | + display: inline-block; | ||
| 128 | + font-size: 24rpx; | ||
| 129 | + color: #666; | ||
| 130 | + padding: 10rpx; | ||
| 131 | + white-space: nowrap; | ||
| 132 | + background-color: #EDEFF2; | ||
| 133 | + border-radius: 6rpx; | ||
| 134 | + margin-right: 12rpx; | ||
| 135 | + &.activeStyle{ | ||
| 136 | + color: #333; | ||
| 137 | + background-color: rgba(64, 174, 54, .2); | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + .showAll{ | ||
| 141 | + display: flex; | ||
| 142 | + justify-content: center; | ||
| 143 | + align-items: center; | ||
| 144 | + position: absolute; | ||
| 145 | + top: 0; | ||
| 146 | + right: 0; | ||
| 147 | + width: 76rpx; | ||
| 148 | + height: 110rpx; | ||
| 149 | + background-color: #fff; | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + .cate-right-cont { | ||
| 153 | + width: 100%; | ||
| 154 | + display: flex; | ||
| 155 | + flex-flow: row wrap; | ||
| 156 | + align-content: flex-start; | ||
| 157 | + | ||
| 158 | + .cate-two-box { | ||
| 159 | + width: 100%; | ||
| 160 | + } | ||
| 161 | + } | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + // 左侧一级分类 | ||
| 165 | + .type-nav { | ||
| 166 | + position: relative; | ||
| 167 | + width: 180rpx; | ||
| 168 | + height: 110rpx; | ||
| 169 | + z-index: 10; | ||
| 170 | + display: block; | ||
| 171 | + font-size: 28rpx; | ||
| 172 | + display: flex; | ||
| 173 | + justify-content: center; | ||
| 174 | + align-items: center; | ||
| 175 | + &.selected { | ||
| 176 | + background: #fff; | ||
| 177 | + color: #FFB336; | ||
| 178 | + border-right: none; | ||
| 179 | + font-size: 28rpx; | ||
| 180 | + &::before{ | ||
| 181 | + content: ''; | ||
| 182 | + position: absolute; | ||
| 183 | + top: 50%; | ||
| 184 | + left: 0; | ||
| 185 | + transform: translateY(-50%); | ||
| 186 | + width: 6rpx; | ||
| 187 | + height: 24rpx; | ||
| 188 | + border-radius: 20rpx; | ||
| 189 | + background-color: #FFB336; | ||
| 190 | + } | ||
| 191 | + } | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | +</style> |
components/my/StoreControl.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="function_card"> | ||
| 3 | + <view class="col-3d f-28 l-h-38 f-w-500 px-20 mb-20">门店管理</view> | ||
| 4 | + <view class="function_list"> | ||
| 5 | + <view class="function_item" v-for="(item, index) in myMenu" :key="index" @click="goRouter(item.routerPath)"> | ||
| 6 | + <view class="list_img"> | ||
| 7 | + <image class="list_icon" :src="item.icon" mode="widthFix"></image> | ||
| 8 | + </view> | ||
| 9 | + <text class="col-3d f-24 l-h-32 m-top10">{{ item.text }}</text> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | + </view> | ||
| 13 | +</template> | ||
| 14 | + | ||
| 15 | +<script> | ||
| 16 | + import Script from '@/static/myImg/script.png' | ||
| 17 | + import Store from '@/static/myImg/store.png' | ||
| 18 | + import Employee from '@/static/myImg/employee.png' | ||
| 19 | + import Vip from '@/static/myImg/vip.png' | ||
| 20 | + export default { | ||
| 21 | + data(){ | ||
| 22 | + return { | ||
| 23 | + myMenu: [ | ||
| 24 | + { text: '剧本/主题', icon: Script, routerPath: '/pages_my/ScriptControl/ScriptControl' }, | ||
| 25 | + { text: '门店管理', icon: Store, routerPath: '/pages_my/courtManage/courtManage' }, | ||
| 26 | + { text: '员工管理', icon: Employee, routerPath: '/pages_my/employeeControl/employeeControl'}, | ||
| 27 | + { text: '会员管理', icon: Vip, routerPath: '/pages_my/myVip/myVip'} | ||
| 28 | + ] | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + methods: { | ||
| 32 | + goRouter(path){ | ||
| 33 | + uni.navigateTo({ | ||
| 34 | + url: path | ||
| 35 | + }) | ||
| 36 | + } | ||
| 37 | + } | ||
| 38 | + } | ||
| 39 | +</script> | ||
| 40 | + | ||
| 41 | +<style scoped lang="scss"> | ||
| 42 | + .function_card{ | ||
| 43 | + background: #FFFFFF; | ||
| 44 | + margin: 20rpx 30rpx 0; | ||
| 45 | + border-radius: 12rpx; | ||
| 46 | + padding: 20rpx 0; | ||
| 47 | + .function_title{ | ||
| 48 | + line-height: 84rpx; | ||
| 49 | + height: 84rpx; | ||
| 50 | + padding-left: 36rpx; | ||
| 51 | + font-size: 28rpx; | ||
| 52 | + color: #333; | ||
| 53 | + border-bottom: 2rpx solid #E1E1E1; | ||
| 54 | + box-sizing: border-box; | ||
| 55 | + } | ||
| 56 | + .function_list{ | ||
| 57 | + display: flex; | ||
| 58 | + gap: 28rpx; | ||
| 59 | + flex-wrap: wrap; | ||
| 60 | + padding: 22rpx 30rpx; | ||
| 61 | + .function_item{ | ||
| 62 | + width: calc((100% - 90rpx) / 4); | ||
| 63 | + display: flex; | ||
| 64 | + flex-direction: column; | ||
| 65 | + align-items: center; | ||
| 66 | + font-size: 28rpx; | ||
| 67 | + line-height: 40rpx; | ||
| 68 | + color: #3d3d3d; | ||
| 69 | + .list_img{ | ||
| 70 | + display: flex; | ||
| 71 | + align-items: center; | ||
| 72 | + justify-content: center; | ||
| 73 | + width: 48rpx; | ||
| 74 | + height: 48rpx; | ||
| 75 | + margin-bottom: 14rpx; | ||
| 76 | + .list_icon{ | ||
| 77 | + width: 100%; | ||
| 78 | + } | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | +</style> |
components/my/functionList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="function_card"> | ||
| 3 | + <view class="function_list"> | ||
| 4 | + <view class="function_item" v-for="(item, index) in myMenu" :key="index" @click="goRouter(item.routerPath)"> | ||
| 5 | + <view class="list_img"> | ||
| 6 | + <image class="list_icon" :src="item.icon" mode="widthFix"></image> | ||
| 7 | + </view> | ||
| 8 | + <text class="col-3d f-24 l-h-32 m-top10">{{ item.text }}</text> | ||
| 9 | + </view> | ||
| 10 | + </view> | ||
| 11 | + </view> | ||
| 12 | +</template> | ||
| 13 | + | ||
| 14 | +<script> | ||
| 15 | + import Reflects from '@/static/myImg/reflect.png' | ||
| 16 | + import Recharge from '@/static/myImg/recharge.png' | ||
| 17 | + import BankCard from '@/static/myImg/bank-card.png' | ||
| 18 | + export default { | ||
| 19 | + data(){ | ||
| 20 | + return { | ||
| 21 | + myMenu: [ | ||
| 22 | + { text: '提现', icon: Reflects, routerPath: '/pages_my/myReflect/myReflect?type='+ 0 }, | ||
| 23 | + { text: '充值', icon: Recharge, routerPath: '/pages_my/myReflect/myReflect?type=' + 1 }, | ||
| 24 | + { text: '银行卡', icon: BankCard, routerPath: '/pages_my/bankCard/bankCard'} | ||
| 25 | + ] | ||
| 26 | + } | ||
| 27 | + }, | ||
| 28 | + methods: { | ||
| 29 | + goRouter(path){ | ||
| 30 | + uni.navigateTo({ | ||
| 31 | + url: path | ||
| 32 | + }) | ||
| 33 | + } | ||
| 34 | + } | ||
| 35 | + } | ||
| 36 | +</script> | ||
| 37 | + | ||
| 38 | +<style scoped lang="scss"> | ||
| 39 | + .function_card{ | ||
| 40 | + background: #FFFFFF; | ||
| 41 | + height: 140rpx; | ||
| 42 | + box-sizing: border-box; | ||
| 43 | + .function_title{ | ||
| 44 | + line-height: 84rpx; | ||
| 45 | + height: 84rpx; | ||
| 46 | + padding-left: 36rpx; | ||
| 47 | + font-size: 28rpx; | ||
| 48 | + color: #333; | ||
| 49 | + border-bottom: 2rpx solid #E1E1E1; | ||
| 50 | + box-sizing: border-box; | ||
| 51 | + } | ||
| 52 | + .function_list{ | ||
| 53 | + display: flex; | ||
| 54 | + gap: 28rpx; | ||
| 55 | + flex-wrap: wrap; | ||
| 56 | + padding: 22rpx 30rpx; | ||
| 57 | + .function_item{ | ||
| 58 | + width: calc((100% - 90rpx) / 3); | ||
| 59 | + display: flex; | ||
| 60 | + flex-direction: column; | ||
| 61 | + align-items: center; | ||
| 62 | + font-size: 28rpx; | ||
| 63 | + line-height: 40rpx; | ||
| 64 | + color: #3d3d3d; | ||
| 65 | + .list_img{ | ||
| 66 | + display: flex; | ||
| 67 | + align-items: center; | ||
| 68 | + justify-content: center; | ||
| 69 | + width: 48rpx; | ||
| 70 | + height: 48rpx; | ||
| 71 | + margin-bottom: 14rpx; | ||
| 72 | + .list_icon{ | ||
| 73 | + width: 100%; | ||
| 74 | + } | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | +</style> |
components/my/myHeader.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="header_box"> | ||
| 3 | + <!-- 未登录用户信息 --> | ||
| 4 | + <view v-if="!token" class="userInfo"> | ||
| 5 | + <u-avatar src="" size="120rpx"></u-avatar> | ||
| 6 | + <view class="right" @click="goRouter('/pages/login/index')"> | ||
| 7 | + <view class="username">登录/注册</view> | ||
| 8 | + </view> | ||
| 9 | + </view> | ||
| 10 | + <!-- 用户信息 --> | ||
| 11 | + <view v-else class="userInfo"> | ||
| 12 | + <u-avatar :src="userInfo.avatar" size="120rpx"></u-avatar> | ||
| 13 | + <view class="right"> | ||
| 14 | + <view class="username" @click="goRouter('/pages_my/editUserInfo/editUserInfo')"> | ||
| 15 | + <text class="col-3d f-28 l-h-38 my-20 m-r-10">猎人事务所</text> | ||
| 16 | + <u-icon name="arrow-right" size="10" color="#333"></u-icon> | ||
| 17 | + </view> | ||
| 18 | + <view class="intro"> | ||
| 19 | + <image style="width: 32rpx;" src="@/static/homeImg/QRCode.png" mode="widthFix" @click="showQRcode = true"></image> | ||
| 20 | + </view> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | + <!-- 场地管理 --> | ||
| 24 | + <view class="pay_pitch" @click="goRouter('/pages_my/arenaControl/arenaControl')"> | ||
| 25 | + <text>{{ isPay ? '续费门店' : '激活门店' }}</text> | ||
| 26 | + </view> | ||
| 27 | + <text v-show="isPay" class="tip">【剧本杀】2025-06-20到期</text> | ||
| 28 | + <!-- 出示二维码 --> | ||
| 29 | + <u-popup :show="showQRcode" round="20" mode="center" closeable overlayOpacity="0" @close="showQRcode = false"> | ||
| 30 | + <view class="QRcode_box"> | ||
| 31 | + <view class="QRCoce_img"> | ||
| 32 | + <image style="width: 270rpx;height: 270rpx;" src="@/static/homeImg/big_QRCode.png" mode="widthFix"></image> | ||
| 33 | + </view> | ||
| 34 | + <view class="btn">保存二维码</view> | ||
| 35 | + </view> | ||
| 36 | + </u-popup> | ||
| 37 | + </view> | ||
| 38 | +</template> | ||
| 39 | + | ||
| 40 | +<script> | ||
| 41 | + import { getUserInfo } from '@/api/user.js' | ||
| 42 | + import { mapGetters } from 'vuex' | ||
| 43 | + export default { | ||
| 44 | + props: { | ||
| 45 | + userInfo: { | ||
| 46 | + type: Object, | ||
| 47 | + require: true | ||
| 48 | + } | ||
| 49 | + }, | ||
| 50 | + data() { | ||
| 51 | + return { | ||
| 52 | + isPay: false, | ||
| 53 | + showQRcode: false, | ||
| 54 | + } | ||
| 55 | + }, | ||
| 56 | + computed: { ...mapGetters(['token']) }, | ||
| 57 | + methods: { | ||
| 58 | + goRouter(path){ | ||
| 59 | + uni.navigateTo({ | ||
| 60 | + url: path | ||
| 61 | + }) | ||
| 62 | + } | ||
| 63 | + } | ||
| 64 | + } | ||
| 65 | +</script> | ||
| 66 | + | ||
| 67 | +<style scoped lang="scss"> | ||
| 68 | +// 头部盒子 | ||
| 69 | +.header_box{ | ||
| 70 | + position: relative; | ||
| 71 | + height: 376rpx; | ||
| 72 | + box-sizing: border-box; | ||
| 73 | + background-size: cover; | ||
| 74 | + // 用户信息 | ||
| 75 | + .userInfo{ | ||
| 76 | + position: absolute; | ||
| 77 | + top: 216rpx; | ||
| 78 | + left: 30rpx; | ||
| 79 | + display: flex; | ||
| 80 | + align-items: center; | ||
| 81 | + z-index: 10; | ||
| 82 | + .right{ | ||
| 83 | + display: flex; | ||
| 84 | + flex-direction: column; | ||
| 85 | + justify-content: space-between; | ||
| 86 | + flex: 1; | ||
| 87 | + margin-left: 20rpx; | ||
| 88 | + height: 100%; | ||
| 89 | + font-size: 24rpx; | ||
| 90 | + color: #fff; | ||
| 91 | + .username{ | ||
| 92 | + display: flex; | ||
| 93 | + align-items: center; | ||
| 94 | + font-size: 32rpx; | ||
| 95 | + line-height: 48rpx; | ||
| 96 | + font-weight: 500; | ||
| 97 | + } | ||
| 98 | + .intro{ | ||
| 99 | + display: flex; | ||
| 100 | + align-items: center; | ||
| 101 | + gap: 4rpx; | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + // 购买场地 | ||
| 106 | + .pay_pitch{ | ||
| 107 | + position: absolute; | ||
| 108 | + top: 248rpx; | ||
| 109 | + right: 30rpx; | ||
| 110 | + display: flex; | ||
| 111 | + align-items: center; | ||
| 112 | + justify-content: center; | ||
| 113 | + width: 140rpx; | ||
| 114 | + height: 56rpx; | ||
| 115 | + color: #fff; | ||
| 116 | + font-size: 28rpx; | ||
| 117 | + line-height: 38rpx; | ||
| 118 | + background: linear-gradient( 270deg, #001020 0%, #4A4E64 100%); | ||
| 119 | + border-radius: 8rpx; | ||
| 120 | + clip-path: polygon(0% 0%, 100% 0%, 100% 94%, 50% 100%, 0% 94%); | ||
| 121 | + } | ||
| 122 | + .tip{ | ||
| 123 | + position: absolute; | ||
| 124 | + top: 306rpx; | ||
| 125 | + right: 30rpx; | ||
| 126 | + font-size: 20rpx; | ||
| 127 | + line-height: 26rpx; | ||
| 128 | + color: #3d3d3d; | ||
| 129 | + } | ||
| 130 | + // 显示二维码 | ||
| 131 | + .QRcode_box{ | ||
| 132 | + width: 500rpx; | ||
| 133 | + height: 550rpx; | ||
| 134 | + background: #FFFFFF; | ||
| 135 | + box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.2); | ||
| 136 | + border-radius: 20rpx; | ||
| 137 | + padding: 40rpx; | ||
| 138 | + .QRCoce_img{ | ||
| 139 | + display: flex; | ||
| 140 | + align-items: center; | ||
| 141 | + justify-content: center; | ||
| 142 | + margin: 0 auto; | ||
| 143 | + width: 360rpx; | ||
| 144 | + height: 360rpx; | ||
| 145 | + } | ||
| 146 | + .btn{ | ||
| 147 | + width: 280rpx; | ||
| 148 | + height: 60rpx; | ||
| 149 | + line-height: 60rpx; | ||
| 150 | + background: #FFB336; | ||
| 151 | + border-radius: 12rpx; | ||
| 152 | + text-align: center; | ||
| 153 | + color: #fff; | ||
| 154 | + font-size: 28rpx; | ||
| 155 | + margin: 0 auto; | ||
| 156 | + } | ||
| 157 | + } | ||
| 158 | +} | ||
| 159 | +</style> |
components/my/userList.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="userList"> | ||
| 3 | + <view class="col-3d f-28 l-h-38 f-w-500 px-20 mb-20">功能中心</view> | ||
| 4 | + <u-cell-group :border="false"> | ||
| 5 | + <u-cell | ||
| 6 | + v-for="(item, index) in userList" | ||
| 7 | + :key="index" :titleStyle="titleStyle" | ||
| 8 | + :rightIconStyle="rightIconStyle" | ||
| 9 | + :title="item.title" | ||
| 10 | + :border="false" | ||
| 11 | + :isLink="true" | ||
| 12 | + @click="goRouter(item.routerPath)" | ||
| 13 | + > | ||
| 14 | + <image class="userList_icon" slot="icon" :src="item.icon" mode="widthFix"></image> | ||
| 15 | + </u-cell> | ||
| 16 | + </u-cell-group> | ||
| 17 | + </view> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | + import Message from '@/static/myImg/message.png' | ||
| 22 | + import Comment from '@/static/myImg/comment.png' | ||
| 23 | + import Data from '@/static/myImg/data.png' | ||
| 24 | + import Safe from '@/static/myImg/safe.png' | ||
| 25 | + export default { | ||
| 26 | + data(){ | ||
| 27 | + return { | ||
| 28 | + userList: [ | ||
| 29 | + { title: '消息设置', icon: Message, routerPath: '/pages_my/msgSetting/msgSetting' }, | ||
| 30 | + { title: '场地评论', icon: Comment, routerPath: '/pages/arenaComment/arenaComment' }, | ||
| 31 | + { title: '资料设置', icon: Data, routerPath: '/pages_my/dataSetting/dataSetting' }, | ||
| 32 | + { title: '账号与安全', icon: Safe, routerPath: '/pages_my/userInfo/userInfo' } | ||
| 33 | + ], | ||
| 34 | + titleStyle: { | ||
| 35 | + fontSize: '28rpx', | ||
| 36 | + color: '#3d3d3d', | ||
| 37 | + marginLeft: '20rpx' | ||
| 38 | + }, | ||
| 39 | + rightIconStyle: { | ||
| 40 | + color: '#333', | ||
| 41 | + fontSize: '24rpx' | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + }, | ||
| 45 | + methods: { | ||
| 46 | + goRouter(path){ | ||
| 47 | + uni.navigateTo({ | ||
| 48 | + url: path | ||
| 49 | + }) | ||
| 50 | + } | ||
| 51 | + } | ||
| 52 | + } | ||
| 53 | +</script> | ||
| 54 | + | ||
| 55 | +<style lang="scss" scoped> | ||
| 56 | + .userList{ | ||
| 57 | + padding: 20rpx 0; | ||
| 58 | + margin: 20rpx 30rpx 0; | ||
| 59 | + background-color: #fff; | ||
| 60 | + border-radius: 12rpx; | ||
| 61 | + } | ||
| 62 | + .userList_icon{ | ||
| 63 | + width: 48rpx; | ||
| 64 | + height: 48rpx; | ||
| 65 | + } | ||
| 66 | +</style> |
components/order/bookingOrderCard.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order_card mb-20"> | ||
| 3 | + <view class="header_bg"> | ||
| 4 | + <text class="col-f f-36 l-h-48 f-w-500">狼人杀</text> | ||
| 5 | + <image class="bg_nav" src="@/static/homeImg/bg_1.png" mode="widthFix"></image> | ||
| 6 | + </view> | ||
| 7 | + <u-cell-group> | ||
| 8 | + <u-cell | ||
| 9 | + v-for="(value, key, index) in formatObj" | ||
| 10 | + :title="key" | ||
| 11 | + :titleStyle="{fontSize: '26rpx', color: '#666', lineHeight: '34rpx'}" | ||
| 12 | + :key="index" | ||
| 13 | + :border="index < ObjectLength - 1" | ||
| 14 | + > | ||
| 15 | + <text slot="value" class="f-26 col-6 l-h-32">{{ value }}</text> | ||
| 16 | + </u-cell> | ||
| 17 | + <u-cell title="订单状态" :titleStyle="{fontSize: '26rpx', color: '#666', lineHeight: '34rpx'}" :value="stateValue" /> | ||
| 18 | + </u-cell-group> | ||
| 19 | + <slot name="refund"></slot> | ||
| 20 | + <slot name="comment"></slot> | ||
| 21 | + <view v-if="orderList.refundReason" class="btn_list m-top30"> | ||
| 22 | + <view v-if="orderList.state === 0" class="btn_right cancel" @click="lookRefund(0)">拒绝退款</view> | ||
| 23 | + <view v-if="orderList.state === 0" class="btn_right" @click="lookRefund(1)">同意退款</view> | ||
| 24 | + </view> | ||
| 25 | + <view v-else-if="orderList.commentContent" class="btn_list m-top30"> | ||
| 26 | + <view class="btn_right cancel">回复评价</view> | ||
| 27 | + <view class="btn_right">恶意差评申诉</view> | ||
| 28 | + </view> | ||
| 29 | + <view v-else class="btn_list m-top30"> | ||
| 30 | + <view class="btn_left"> | ||
| 31 | + <u-icon name="phone" size="20" color="#3D3D3D"></u-icon> | ||
| 32 | + <text class="m-l-10 col-3d f-28 f-w-500">顾客</text> | ||
| 33 | + </view> | ||
| 34 | + <view class="btn_right cancel">取消订单</view> | ||
| 35 | + <view class="btn_right">确认订单</view> | ||
| 36 | + </view> | ||
| 37 | + </view> | ||
| 38 | +</template> | ||
| 39 | + | ||
| 40 | +<script> | ||
| 41 | + import { businessAppealReason, businessReply, businessLookRefund } from '@/api/order.js' | ||
| 42 | + export default { | ||
| 43 | + name:"orderCard", | ||
| 44 | + props: { | ||
| 45 | + orderList: { | ||
| 46 | + type: Object, | ||
| 47 | + require: true | ||
| 48 | + }, | ||
| 49 | + // 订单状态 | ||
| 50 | + stateValue: { | ||
| 51 | + type: String, | ||
| 52 | + require: true | ||
| 53 | + } | ||
| 54 | + }, | ||
| 55 | + computed: { | ||
| 56 | + // 订单背景 | ||
| 57 | + formatBgColor(){ | ||
| 58 | + let colorObj = { | ||
| 59 | + 0: '#FFA100', | ||
| 60 | + 1: '#0096E7', | ||
| 61 | + 2: '#DF0000' | ||
| 62 | + } | ||
| 63 | + return colorObj[this.orderStatus] | ||
| 64 | + }, | ||
| 65 | + // 格式化球场订单名称 | ||
| 66 | + formatBallName(){ | ||
| 67 | + return (keyValue) => { | ||
| 68 | + let obj = { | ||
| 69 | + orderNo: '订单流水号', | ||
| 70 | + peopelNum: '参与人数', | ||
| 71 | + belongGym: '场馆', | ||
| 72 | + groundNum: '场地号', | ||
| 73 | + appointmentStartTime: "预约开始时间", | ||
| 74 | + appointmentEndTime: "预约结束时间", | ||
| 75 | + orderType: '订单类型', | ||
| 76 | + serviceCharge: '手续费', | ||
| 77 | + commission: '抽佣', | ||
| 78 | + contacts: '联系人', | ||
| 79 | + contactsPhone: '联系方式', | ||
| 80 | + commentName: '评论人', | ||
| 81 | + envRank: '环境评价', | ||
| 82 | + serviceRank: '服务评价', | ||
| 83 | + priceRank: '性价比评价' | ||
| 84 | + } | ||
| 85 | + return obj[keyValue] | ||
| 86 | + } | ||
| 87 | + }, | ||
| 88 | + // 格式化遍历对象 | ||
| 89 | + formatObj() { | ||
| 90 | + let keys = Object.keys(this.orderList) | ||
| 91 | + let arrs = keys.filter(item => this.formatBallName(item)) | ||
| 92 | + let keysNames = arrs.map(item => this.formatBallName(item)) | ||
| 93 | + let values = arrs.map(item => this.orderList[item]) | ||
| 94 | + const combinedObject = keysNames.reduce((obj, key, index) => { | ||
| 95 | + if(key === '订单类型'){ | ||
| 96 | + obj[key] = values[index] === 0 ? '整租' : '约球' | ||
| 97 | + } else { | ||
| 98 | + obj[key] = values[index] | ||
| 99 | + } | ||
| 100 | + return obj | ||
| 101 | + }, {}) | ||
| 102 | + return combinedObject | ||
| 103 | + }, | ||
| 104 | + // 获取对象长度 | ||
| 105 | + ObjectLength(){ | ||
| 106 | + return Object.keys(this.orderList).length | ||
| 107 | + } | ||
| 108 | + }, | ||
| 109 | + methods: { | ||
| 110 | + // 商家审核退款 | ||
| 111 | + lookRefund(num) { | ||
| 112 | + if(num === 0) { | ||
| 113 | + uni.showModal({ | ||
| 114 | + title: '提示', | ||
| 115 | + content: '是否拒绝用户退款', | ||
| 116 | + success: async function (res) { | ||
| 117 | + if (res.confirm) { | ||
| 118 | + await businessLookRefund(num) | ||
| 119 | + uni.$u.toast('拒绝成功') | ||
| 120 | + } else if (res.cancel) { | ||
| 121 | + uni.$u.toast('取消退款') | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + }) | ||
| 125 | + } else { | ||
| 126 | + this.$emit('showRefund', true) | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + } | ||
| 132 | +</script> | ||
| 133 | + | ||
| 134 | +<style lang="scss" scoped> | ||
| 135 | +.order_card{ | ||
| 136 | + padding-bottom: 38rpx; | ||
| 137 | + background: #FFFFFF; | ||
| 138 | + border-radius: 20rpx; | ||
| 139 | + overflow: hidden; | ||
| 140 | + .header_bg{ | ||
| 141 | + position: relative; | ||
| 142 | + padding: 26rpx 32rpx; | ||
| 143 | + box-sizing: border-box; | ||
| 144 | + height: 100rpx; | ||
| 145 | + overflow: hidden; | ||
| 146 | + background: linear-gradient( 270deg, #966CFF 0%, #C3ACFF 100%); | ||
| 147 | + .bg_nav{ | ||
| 148 | + position: absolute; | ||
| 149 | + width: 170rpx; | ||
| 150 | + top: 0; | ||
| 151 | + right: 0; | ||
| 152 | + } | ||
| 153 | + } | ||
| 154 | + .order_title{ | ||
| 155 | + display: flex; | ||
| 156 | + align-items: center; | ||
| 157 | + height: 100rpx; | ||
| 158 | + color: #fff; | ||
| 159 | + line-height: 100rpx; | ||
| 160 | + font-size: 32rpx; | ||
| 161 | + font-weight: 600; | ||
| 162 | + background-color: #FFA100; | ||
| 163 | + padding-left: 20rpx; | ||
| 164 | + } | ||
| 165 | + .btn_list{ | ||
| 166 | + display: flex; | ||
| 167 | + align-items: center; | ||
| 168 | + gap: 30rpx; | ||
| 169 | + padding: 0 40rpx; | ||
| 170 | + .btn_left{ | ||
| 171 | + display: flex; | ||
| 172 | + align-items: center; | ||
| 173 | + justify-content: center; | ||
| 174 | + width: 200rpx; | ||
| 175 | + height: 80rpx; | ||
| 176 | + background: #F0F0F2; | ||
| 177 | + border-radius: 200rpx; | ||
| 178 | + } | ||
| 179 | + .btn_right{ | ||
| 180 | + width: 200rpx; | ||
| 181 | + height: 80rpx; | ||
| 182 | + color: #fff; | ||
| 183 | + line-height: 80rpx; | ||
| 184 | + text-align: center; | ||
| 185 | + font-weight: 500; | ||
| 186 | + font-size: 28rpx; | ||
| 187 | + background: linear-gradient( 270deg, #FCBF1C 0%, #FFAE00 100%); | ||
| 188 | + border-radius: 200rpx; | ||
| 189 | + &.cancel{ | ||
| 190 | + background: #F0F0F2; | ||
| 191 | + color: #333; | ||
| 192 | + } | ||
| 193 | + } | ||
| 194 | + } | ||
| 195 | +} | ||
| 196 | +</style> |
index.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="en"> | ||
| 3 | + <head> | ||
| 4 | + <meta charset="UTF-8" /> | ||
| 5 | + <script> | ||
| 6 | + var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || | ||
| 7 | + CSS.supports('top: constant(a)')) | ||
| 8 | + document.write( | ||
| 9 | + '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + | ||
| 10 | + (coverSupport ? ', viewport-fit=cover' : '') + '" />') | ||
| 11 | + </script> | ||
| 12 | + <title></title> | ||
| 13 | + <!--preload-links--> | ||
| 14 | + <!--app-context--> | ||
| 15 | + </head> | ||
| 16 | + <body> | ||
| 17 | + <div id="app"><!--app-html--></div> | ||
| 18 | + <script type="module" src="/main.js"></script> | ||
| 19 | + </body> | ||
| 20 | +</html> |
main.js
0 → 100644
| 1 | +import App from './App' | ||
| 2 | +import CommonTabbar from '@/components/commonTabbar.vue' | ||
| 3 | + | ||
| 4 | +// #ifndef VUE3 | ||
| 5 | +import Vue from 'vue' | ||
| 6 | +import './uni.promisify.adaptor' | ||
| 7 | +Vue.config.productionTip = false | ||
| 8 | +import uView from '@/uni_modules/uview-ui' | ||
| 9 | +import store from './store/index.js' | ||
| 10 | + | ||
| 11 | +Vue.component('CommonTabbar', CommonTabbar) | ||
| 12 | +Vue.use(uView) | ||
| 13 | +App.mpType = 'app' | ||
| 14 | +const app = new Vue({ | ||
| 15 | + ...App, | ||
| 16 | + store | ||
| 17 | +}) | ||
| 18 | +// 引入请求封装,将app参数传递到配置中 | ||
| 19 | +require('./utils/request.js')(app) | ||
| 20 | +app.$mount() | ||
| 21 | +// #endif | ||
| 22 | + | ||
| 23 | +// #ifdef VUE3 | ||
| 24 | +import { createSSRApp } from 'vue' | ||
| 25 | +export function createApp() { | ||
| 26 | + const app = createSSRApp(App) | ||
| 27 | + return { | ||
| 28 | + app | ||
| 29 | + } | ||
| 30 | +} | ||
| 31 | +// #endif |
manifest.json
0 → 100644
| 1 | +{ | ||
| 2 | + "name" : "运动中国", | ||
| 3 | + "appid" : "__UNI__EFBA169", | ||
| 4 | + "description" : "", | ||
| 5 | + "versionName" : "1.0.0", | ||
| 6 | + "versionCode" : "100", | ||
| 7 | + "transformPx" : false, | ||
| 8 | + /* 5+App特有相关 */ | ||
| 9 | + "app-plus" : { | ||
| 10 | + "usingComponents" : true, | ||
| 11 | + "nvueStyleCompiler" : "uni-app", | ||
| 12 | + "compilerVersion" : 3, | ||
| 13 | + "splashscreen" : { | ||
| 14 | + "alwaysShowBeforeRender" : true, | ||
| 15 | + "waiting" : true, | ||
| 16 | + "autoclose" : true, | ||
| 17 | + "delay" : 0 | ||
| 18 | + }, | ||
| 19 | + /* 模块配置 */ | ||
| 20 | + "modules" : { | ||
| 21 | + "Payment" : {} | ||
| 22 | + }, | ||
| 23 | + /* 应用发布信息 */ | ||
| 24 | + "distribute" : { | ||
| 25 | + /* android打包配置 */ | ||
| 26 | + "android" : { | ||
| 27 | + "permissions" : [ | ||
| 28 | + "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", | ||
| 29 | + "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", | ||
| 30 | + "<uses-permission android:name=\"android.permission.VIBRATE\"/>", | ||
| 31 | + "<uses-permission android:name=\"android.permission.READ_LOGS\"/>", | ||
| 32 | + "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>", | ||
| 33 | + "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>", | ||
| 34 | + "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>", | ||
| 35 | + "<uses-permission android:name=\"android.permission.CAMERA\"/>", | ||
| 36 | + "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>", | ||
| 37 | + "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>", | ||
| 38 | + "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>", | ||
| 39 | + "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>", | ||
| 40 | + "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>", | ||
| 41 | + "<uses-feature android:name=\"android.hardware.camera\"/>", | ||
| 42 | + "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" | ||
| 43 | + ] | ||
| 44 | + }, | ||
| 45 | + /* ios打包配置 */ | ||
| 46 | + "ios" : {}, | ||
| 47 | + /* SDK配置 */ | ||
| 48 | + "sdkConfigs" : { | ||
| 49 | + "maps" : {}, | ||
| 50 | + "payment" : { | ||
| 51 | + "weixin" : { | ||
| 52 | + "__platform__" : [ "ios", "android" ], | ||
| 53 | + "appid" : "wx7902d7df47ea6739", | ||
| 54 | + "UniversalLinks" : "" | ||
| 55 | + } | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + } | ||
| 59 | + }, | ||
| 60 | + /* 快应用特有相关 */ | ||
| 61 | + "quickapp" : {}, | ||
| 62 | + /* 小程序特有相关 */ | ||
| 63 | + "mp-weixin" : { | ||
| 64 | + "appid" : "wx7902d7df47ea6739", | ||
| 65 | + "setting" : { | ||
| 66 | + "urlCheck" : false, | ||
| 67 | + "es6" : true, | ||
| 68 | + "postcss" : true, | ||
| 69 | + "minified" : true | ||
| 70 | + }, | ||
| 71 | + "usingComponents" : true, | ||
| 72 | + "lazyCodeLoading" : "requiredComponents", | ||
| 73 | + "optimization" : { | ||
| 74 | + "subPackages" : true | ||
| 75 | + }, | ||
| 76 | + "permission" : { | ||
| 77 | + "scope.userLocation" : { | ||
| 78 | + "desc" : "获取你当前的位置信息" | ||
| 79 | + } | ||
| 80 | + }, | ||
| 81 | + "unipush" : { | ||
| 82 | + "enable" : false | ||
| 83 | + } | ||
| 84 | + }, | ||
| 85 | + "mp-alipay" : { | ||
| 86 | + "usingComponents" : true | ||
| 87 | + }, | ||
| 88 | + "mp-baidu" : { | ||
| 89 | + "usingComponents" : true | ||
| 90 | + }, | ||
| 91 | + "mp-toutiao" : { | ||
| 92 | + "usingComponents" : true | ||
| 93 | + }, | ||
| 94 | + "uniStatistics" : { | ||
| 95 | + "enable" : false | ||
| 96 | + }, | ||
| 97 | + "vueVersion" : "2" | ||
| 98 | +} |
mixins/loadMore.js
0 → 100644
| 1 | +export default { | ||
| 2 | + data() { | ||
| 3 | + return { | ||
| 4 | + query: { | ||
| 5 | + pageNum: 1, | ||
| 6 | + pageSize: 10 | ||
| 7 | + }, | ||
| 8 | + isRefresh: false, | ||
| 9 | + flag: false, // 上拉触底开关 | ||
| 10 | + } | ||
| 11 | + }, | ||
| 12 | + // 下拉刷新页面 | ||
| 13 | + onPullDownRefresh() { | ||
| 14 | + this.query.pageSize = 10 | ||
| 15 | + this.total = 0 | ||
| 16 | + this.flag = false | ||
| 17 | + this.showList = [] | ||
| 18 | + this.getList() | ||
| 19 | + }, | ||
| 20 | + // 上拉触底函数 | ||
| 21 | + onReachBottom() { | ||
| 22 | + if(this.flag) return | ||
| 23 | + if(this.query.pageSize >= this.total) return uni.showToast({title: '内容已全部加载完成',duration: 1000}) | ||
| 24 | + this.query.pageSize += 10 | ||
| 25 | + this.getList() | ||
| 26 | + }, | ||
| 27 | +} |
mixins/upload.js
0 → 100644
| 1 | +import { pro_http } from '@/utils/baseUrl.js' | ||
| 2 | +export default { | ||
| 3 | + data() { | ||
| 4 | + return { | ||
| 5 | + mainCoverList: [], // 主图列表 | ||
| 6 | + detailList: [] // 详情列表 | ||
| 7 | + } | ||
| 8 | + }, | ||
| 9 | + onReady() { | ||
| 10 | + //如果需要兼容微信小程序,并且校验规则中含有方法等,只能通过setRules方法设置规则。 | ||
| 11 | + this.$refs.uForm.setRules(this.rules) | ||
| 12 | + }, | ||
| 13 | + methods: { | ||
| 14 | + // 删除视频或图片 | ||
| 15 | + deletePic(event) { | ||
| 16 | + if(event.name === 'mainCover') { | ||
| 17 | + this.mainCoverList.splice(event.index, 1) | ||
| 18 | + } else { | ||
| 19 | + this.detailList.splice(event.index, 1) | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + // 新增视频或图片 | ||
| 23 | + async afterRead(event) { | ||
| 24 | + // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式 | ||
| 25 | + let lists = [].concat(event.file) | ||
| 26 | + let list = event.name === 'mainCover' ? this.mainCoverList : this.detailList | ||
| 27 | + let fileListLen = list.length | ||
| 28 | + lists.map((item) => { | ||
| 29 | + list.push({ | ||
| 30 | + ...item, | ||
| 31 | + status: 'uploading', | ||
| 32 | + message: '上传中' | ||
| 33 | + }) | ||
| 34 | + }) | ||
| 35 | + for (let i = 0; i < lists.length; i++) { | ||
| 36 | + const result = await this.uploadFilePromise(lists[i].url) | ||
| 37 | + let item = list[fileListLen] | ||
| 38 | + list.splice(fileListLen, 1, Object.assign(item, { | ||
| 39 | + status: 'success', | ||
| 40 | + message: '', | ||
| 41 | + url: result.fileName, | ||
| 42 | + fileName: result.fileName, | ||
| 43 | + })) | ||
| 44 | + fileListLen++ | ||
| 45 | + } | ||
| 46 | + }, | ||
| 47 | + uploadFilePromise(url) { | ||
| 48 | + return new Promise((resolve, reject) => { | ||
| 49 | + let a = uni.uploadFile({ | ||
| 50 | + url: pro_http + '/common/upload', | ||
| 51 | + filePath: url, | ||
| 52 | + name: 'file', | ||
| 53 | + formData: { | ||
| 54 | + user: 'test' | ||
| 55 | + }, | ||
| 56 | + success: (res) => { | ||
| 57 | + setTimeout(() => { | ||
| 58 | + const result = JSON.parse(res.data) | ||
| 59 | + resolve(result) | ||
| 60 | + }, 1000) | ||
| 61 | + } | ||
| 62 | + }); | ||
| 63 | + }) | ||
| 64 | + }, | ||
| 65 | + // 获取当前位置 | ||
| 66 | + getMapLocation(){ | ||
| 67 | + let _this = this | ||
| 68 | + uni.chooseLocation({ | ||
| 69 | + success:(res)=> { | ||
| 70 | + _this.form.address = res.address | ||
| 71 | + _this.form.latitude = res.latitude | ||
| 72 | + _this.form.longitude = res.longitude | ||
| 73 | + } | ||
| 74 | + }) | ||
| 75 | + } | ||
| 76 | + } | ||
| 77 | +} |
pages.json
0 → 100644
| 1 | +{ | ||
| 2 | + "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages | ||
| 3 | + { | ||
| 4 | + "path" : "pages/login/login", | ||
| 5 | + "style" : | ||
| 6 | + { | ||
| 7 | + "navigationBarTitleText" : "", | ||
| 8 | + "navigationStyle": "custom", | ||
| 9 | + "enablePullDownRefresh" : false | ||
| 10 | + } | ||
| 11 | + }, | ||
| 12 | + { | ||
| 13 | + "path" : "pages/home/home", | ||
| 14 | + "style" : | ||
| 15 | + { | ||
| 16 | + "navigationBarTitleText" : "", | ||
| 17 | + "navigationBarBackgroundColor": "#fff", | ||
| 18 | + "navigationStyle": "custom", | ||
| 19 | + "enablePullDownRefresh" : false | ||
| 20 | + } | ||
| 21 | + }, | ||
| 22 | + { | ||
| 23 | + "path" : "pages/mall/mall", | ||
| 24 | + "style" : | ||
| 25 | + { | ||
| 26 | + "navigationBarTitleText" : "", | ||
| 27 | + "navigationStyle": "custom", | ||
| 28 | + "enablePullDownRefresh" : false | ||
| 29 | + } | ||
| 30 | + }, | ||
| 31 | + { | ||
| 32 | + "path" : "pages/order/order", | ||
| 33 | + "style" : | ||
| 34 | + { | ||
| 35 | + "navigationBarTitleText" : "", | ||
| 36 | + "navigationStyle": "custom", | ||
| 37 | + "enablePullDownRefresh" : true, | ||
| 38 | + "onReachBottomDistance": 180 | ||
| 39 | + } | ||
| 40 | + }, | ||
| 41 | + { | ||
| 42 | + "path" : "pages/data/data", | ||
| 43 | + "style" : | ||
| 44 | + { | ||
| 45 | + "navigationBarTitleText" : "经营数据", | ||
| 46 | + "navigationBarBackgroundColor": "#fff", | ||
| 47 | + "enablePullDownRefresh" : false | ||
| 48 | + } | ||
| 49 | + }, | ||
| 50 | + { | ||
| 51 | + "path" : "pages/my/my", | ||
| 52 | + "style" : | ||
| 53 | + { | ||
| 54 | + "navigationBarTitleText" : "", | ||
| 55 | + "navigationStyle": "custom", | ||
| 56 | + "enablePullDownRefresh" : false | ||
| 57 | + } | ||
| 58 | + }, | ||
| 59 | + { | ||
| 60 | + "path" : "pages/login/index", | ||
| 61 | + "style" : | ||
| 62 | + { | ||
| 63 | + "navigationBarTitleText" : "用户名登录", | ||
| 64 | + "enablePullDownRefresh" : false | ||
| 65 | + } | ||
| 66 | + }, | ||
| 67 | + { | ||
| 68 | + "path" : "pages/register/register", | ||
| 69 | + "style" : | ||
| 70 | + { | ||
| 71 | + "navigationBarTitleText" : "用户注册", | ||
| 72 | + "enablePullDownRefresh" : false | ||
| 73 | + } | ||
| 74 | + }, | ||
| 75 | + { | ||
| 76 | + "path" : "pages/arenaComment/arenaComment", | ||
| 77 | + "style" : | ||
| 78 | + { | ||
| 79 | + "navigationBarTitleText" : "场地评论", | ||
| 80 | + "enablePullDownRefresh" : false | ||
| 81 | + } | ||
| 82 | + }, | ||
| 83 | + { | ||
| 84 | + "path" : "pages/bureauDetail/bureauDetail", | ||
| 85 | + "style" : | ||
| 86 | + { | ||
| 87 | + "navigationBarTitleText" : "", | ||
| 88 | + "navigationStyle": "custom" | ||
| 89 | + } | ||
| 90 | + } | ||
| 91 | + ], | ||
| 92 | + | ||
| 93 | + // 分包加载规则 | ||
| 94 | + "subPackages": [ | ||
| 95 | + // 场地分包 | ||
| 96 | + { | ||
| 97 | + "root": "pages_arenaControl", | ||
| 98 | + "pages": [ | ||
| 99 | + { | ||
| 100 | + "path" : "arenaControl/arenaControl", | ||
| 101 | + "style" : | ||
| 102 | + { | ||
| 103 | + "navigationBarTitleText" : "场地管理", | ||
| 104 | + "navigationBarBackgroundColor": "#fff", | ||
| 105 | + "enablePullDownRefresh" : false | ||
| 106 | + } | ||
| 107 | + }, | ||
| 108 | + { | ||
| 109 | + "path" : "addArena/addArena", | ||
| 110 | + "style" : | ||
| 111 | + { | ||
| 112 | + "navigationBarTitleText" : "新建场地", | ||
| 113 | + "navigationBarBackgroundColor": "#fff", | ||
| 114 | + "enablePullDownRefresh" : false | ||
| 115 | + } | ||
| 116 | + }, | ||
| 117 | + { | ||
| 118 | + "path" : "lockArena/lockArena", | ||
| 119 | + "style" : | ||
| 120 | + { | ||
| 121 | + "navigationBarTitleText" : "预约锁定", | ||
| 122 | + "navigationBarBackgroundColor": "#fff", | ||
| 123 | + "enablePullDownRefresh" : false | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + ] | ||
| 127 | + }, | ||
| 128 | + // 我的分包 | ||
| 129 | + { | ||
| 130 | + "root": "pages_my", | ||
| 131 | + "pages": [ | ||
| 132 | + { | ||
| 133 | + "path" : "myWallet/myWallet", | ||
| 134 | + "style" : | ||
| 135 | + { | ||
| 136 | + "navigationBarTitleText" : "我的钱包", | ||
| 137 | + "enablePullDownRefresh" : false | ||
| 138 | + } | ||
| 139 | + }, | ||
| 140 | + { | ||
| 141 | + "path" : "myReflect/myReflect", | ||
| 142 | + "style" : | ||
| 143 | + { | ||
| 144 | + "navigationBarTitleText" : "我的操作", | ||
| 145 | + "enablePullDownRefresh" : false | ||
| 146 | + } | ||
| 147 | + }, | ||
| 148 | + { | ||
| 149 | + "path" : "myVip/myVip", | ||
| 150 | + "style" : | ||
| 151 | + { | ||
| 152 | + "navigationBarTitleText" : "会员管理", | ||
| 153 | + "enablePullDownRefresh" : false | ||
| 154 | + } | ||
| 155 | + }, | ||
| 156 | + { | ||
| 157 | + "path" : "editSuccess/editSuccess", | ||
| 158 | + "style" : | ||
| 159 | + { | ||
| 160 | + "navigationBarTitleText" : "", | ||
| 161 | + "enablePullDownRefresh" : false | ||
| 162 | + } | ||
| 163 | + }, | ||
| 164 | + { | ||
| 165 | + "path" : "bankCard/bankCard", | ||
| 166 | + "style" : | ||
| 167 | + { | ||
| 168 | + "navigationBarTitleText" : "银行卡", | ||
| 169 | + "enablePullDownRefresh" : false | ||
| 170 | + } | ||
| 171 | + }, | ||
| 172 | + { | ||
| 173 | + "path" : "dataSetting/dataSetting", | ||
| 174 | + "style" : | ||
| 175 | + { | ||
| 176 | + "navigationBarTitleText" : "资料设置", | ||
| 177 | + "navigationBarBackgroundColor": "#fff", | ||
| 178 | + "enablePullDownRefresh" : false | ||
| 179 | + } | ||
| 180 | + }, | ||
| 181 | + { | ||
| 182 | + "path" : "arenaControl/arenaControl", | ||
| 183 | + "style" : | ||
| 184 | + { | ||
| 185 | + "navigationBarTitleText" : "场地管理", | ||
| 186 | + "navigationStyle": "custom", | ||
| 187 | + "enablePullDownRefresh" : false | ||
| 188 | + } | ||
| 189 | + }, | ||
| 190 | + { | ||
| 191 | + "path" : "employeeControl/employeeControl", | ||
| 192 | + "style" : | ||
| 193 | + { | ||
| 194 | + "navigationBarTitleText" : "员工管理", | ||
| 195 | + "navigationBarBackgroundColor": "#fff", | ||
| 196 | + "enablePullDownRefresh" : false | ||
| 197 | + } | ||
| 198 | + }, | ||
| 199 | + { | ||
| 200 | + "path" : "courtManage/courtManage", | ||
| 201 | + "style" : | ||
| 202 | + { | ||
| 203 | + "navigationBarTitleText" : "门店管理", | ||
| 204 | + "navigationBarBackgroundColor": "#fff", | ||
| 205 | + "enablePullDownRefresh" : false | ||
| 206 | + } | ||
| 207 | + }, | ||
| 208 | + { | ||
| 209 | + "path" : "msgSetting/msgSetting", | ||
| 210 | + "style" : | ||
| 211 | + { | ||
| 212 | + "navigationBarTitleText" : "消息设置", | ||
| 213 | + "navigationBarBackgroundColor": "#fff", | ||
| 214 | + "enablePullDownRefresh" : false | ||
| 215 | + } | ||
| 216 | + }, | ||
| 217 | + { | ||
| 218 | + "path" : "userInfo/userInfo", | ||
| 219 | + "style" : | ||
| 220 | + { | ||
| 221 | + "navigationBarTitleText" : "账号与安全", | ||
| 222 | + "navigationBarBackgroundColor": "#F6F7FB", | ||
| 223 | + "enablePullDownRefresh" : false | ||
| 224 | + } | ||
| 225 | + }, | ||
| 226 | + { | ||
| 227 | + "path" : "editUserInfo/editUserInfo", | ||
| 228 | + "style" : | ||
| 229 | + { | ||
| 230 | + "navigationBarTitleText" : "编辑信息", | ||
| 231 | + "navigationBarBackgroundColor": "#F6F7FB", | ||
| 232 | + "enablePullDownRefresh" : false | ||
| 233 | + } | ||
| 234 | + }, | ||
| 235 | + { | ||
| 236 | + "path" : "editPassword/editPassword", | ||
| 237 | + "style" : | ||
| 238 | + { | ||
| 239 | + "navigationBarTitleText" : "修改密码", | ||
| 240 | + "navigationBarBackgroundColor": "#F6F7FB", | ||
| 241 | + "enablePullDownRefresh" : false | ||
| 242 | + } | ||
| 243 | + }, | ||
| 244 | + { | ||
| 245 | + "path" : "ScriptControl/ScriptControl", | ||
| 246 | + "style" : | ||
| 247 | + { | ||
| 248 | + "navigationBarTitleText" : "" | ||
| 249 | + } | ||
| 250 | + }, | ||
| 251 | + { | ||
| 252 | + "path" : "uploadPrimary/uploadPrimary", | ||
| 253 | + "style" : | ||
| 254 | + { | ||
| 255 | + "navigationBarTitleText" : "", | ||
| 256 | + "navigationStyle": "custom" | ||
| 257 | + } | ||
| 258 | + }, | ||
| 259 | + { | ||
| 260 | + "path" : "addPrimary/addPrimary", | ||
| 261 | + "style" : | ||
| 262 | + { | ||
| 263 | + "navigationBarTitleText" : "添加主题" | ||
| 264 | + } | ||
| 265 | + }, | ||
| 266 | + { | ||
| 267 | + "path" : "myStore/myStore", | ||
| 268 | + "style" : | ||
| 269 | + { | ||
| 270 | + "navigationBarTitleText" : "我的门店", | ||
| 271 | + "navigationStyle": "custom" | ||
| 272 | + } | ||
| 273 | + } | ||
| 274 | + ] | ||
| 275 | + }, | ||
| 276 | + // 数据分包 | ||
| 277 | + { | ||
| 278 | + "root": "pages_data", | ||
| 279 | + "pages": [ | ||
| 280 | + { | ||
| 281 | + "path": "dataDetail/dataDetail", | ||
| 282 | + "style": { | ||
| 283 | + "navigationBarTitleText" : "数据详情", | ||
| 284 | + "navigationBarBackgroundColor": "#fff", | ||
| 285 | + "enablePullDownRefresh" : false | ||
| 286 | + } | ||
| 287 | + } | ||
| 288 | + ] | ||
| 289 | + }, | ||
| 290 | + // 商城分包 | ||
| 291 | + { | ||
| 292 | + "root": "pages_mall", | ||
| 293 | + "pages": [ | ||
| 294 | + { | ||
| 295 | + "path" : "goods/addGoods", | ||
| 296 | + "style" : | ||
| 297 | + { | ||
| 298 | + "navigationBarTitleText" : "新建商品", | ||
| 299 | + "navigationBarBackgroundColor": "#fff", | ||
| 300 | + "enablePullDownRefresh" : false | ||
| 301 | + } | ||
| 302 | + }, | ||
| 303 | + { | ||
| 304 | + "path" : "goods/edidGoods", | ||
| 305 | + "style" : | ||
| 306 | + { | ||
| 307 | + "navigationBarTitleText" : "编辑商品", | ||
| 308 | + "navigationBarBackgroundColor": "#fff", | ||
| 309 | + "enablePullDownRefresh" : false | ||
| 310 | + } | ||
| 311 | + }, | ||
| 312 | + { | ||
| 313 | + "path" : "goods/underGoods", | ||
| 314 | + "style" : | ||
| 315 | + { | ||
| 316 | + "navigationBarTitleText" : "下架商品", | ||
| 317 | + "navigationBarBackgroundColor": "#fff", | ||
| 318 | + "enablePullDownRefresh" : false | ||
| 319 | + } | ||
| 320 | + }, | ||
| 321 | + { | ||
| 322 | + "path" : "goods/stockInformation", | ||
| 323 | + "navigationBarBackgroundColor": "#fff", | ||
| 324 | + "style" : | ||
| 325 | + { | ||
| 326 | + "navigationBarTitleText" : "商品信息", | ||
| 327 | + "enablePullDownRefresh" : false | ||
| 328 | + } | ||
| 329 | + }, | ||
| 330 | + { | ||
| 331 | + "path" : "goodsDetail/goodsDetail", | ||
| 332 | + "style" : | ||
| 333 | + { | ||
| 334 | + "navigationBarTitleText" : "", | ||
| 335 | + "enablePullDownRefresh" : false | ||
| 336 | + } | ||
| 337 | + } | ||
| 338 | + ] | ||
| 339 | + } | ||
| 340 | + ], | ||
| 341 | + | ||
| 342 | + // 分包预下载规则 | ||
| 343 | + "preloadRule": { | ||
| 344 | + "pages/my/my": { | ||
| 345 | + "network": "all", | ||
| 346 | + "packages": ["pages_my"] | ||
| 347 | + }, | ||
| 348 | + "pages/mall/mall": { | ||
| 349 | + "network": "all", | ||
| 350 | + "packages": ["pages_mall"] | ||
| 351 | + } | ||
| 352 | + }, | ||
| 353 | + // 底部导航管理 | ||
| 354 | + "tabBar": { | ||
| 355 | + "color": "#999", | ||
| 356 | + "selectedColor": "#333", | ||
| 357 | + "borderStyle": "black", | ||
| 358 | + "backgroundColor": "#ffffff", | ||
| 359 | + "list": [ | ||
| 360 | + { | ||
| 361 | + "pagePath": "pages/home/home", | ||
| 362 | + "iconPath": "static/tabbarIcon/home.png", | ||
| 363 | + "selectedIconPath": "static/tabbarIcon/home_active.png", | ||
| 364 | + "text": "首页" | ||
| 365 | + }, | ||
| 366 | + { | ||
| 367 | + "pagePath": "pages/mall/mall", | ||
| 368 | + "iconPath": "static/tabbarIcon/mall.png", | ||
| 369 | + "selectedIconPath": "static/tabbarIcon/mall_active.png", | ||
| 370 | + "text": "商城" | ||
| 371 | + }, | ||
| 372 | + { | ||
| 373 | + "pagePath": "pages/order/order", | ||
| 374 | + "iconPath": "static/tabbarIcon/order.png", | ||
| 375 | + "selectedIconPath": "static/tabbarIcon/order_active.png", | ||
| 376 | + "text": "订单" | ||
| 377 | + }, | ||
| 378 | + { | ||
| 379 | + "pagePath": "pages/data/data", | ||
| 380 | + "iconPath": "static/tabbarIcon/data.png", | ||
| 381 | + "selectedIconPath": "static/tabbarIcon/data_active.png", | ||
| 382 | + "text": "数据" | ||
| 383 | + },{ | ||
| 384 | + "pagePath": "pages/my/my", | ||
| 385 | + "iconPath": "static/tabbarIcon/my.png", | ||
| 386 | + "selectedIconPath": "static/tabbarIcon/my_active.png", | ||
| 387 | + "text": "我的" | ||
| 388 | + }] | ||
| 389 | + }, | ||
| 390 | + "globalStyle": { | ||
| 391 | + // #ifdef H5 | ||
| 392 | + // "navigationStyle": "custom", | ||
| 393 | + "maxWidth": 750, | ||
| 394 | + "rpxCalcMaxDeviceWidth": 750, // rpx 计算所支持的最大设备宽度,单位 px,默认值为 960 | ||
| 395 | + "rpxCalcBaseDeviceWidth": 560, // rpx 计算使用的基准设备宽度,设备实际宽度超出 rpx 计算所支持的最大设备宽度时将按基准宽度计算,单位 px,默认值为 375 | ||
| 396 | + "rpxCalcIncludeWidth": 9999, // rpx 计算特殊处理的值,始终按实际的设备宽度计算,单位 rpx,默认值为 750 | ||
| 397 | + // #endif | ||
| 398 | + "navigationBarBackgroundColor": "#ffffff", | ||
| 399 | + "navigationBarTitleText": "", | ||
| 400 | + "navigationBarTextStyle": "black", | ||
| 401 | + "backgroundTextStyle": "dark" | ||
| 402 | + }, | ||
| 403 | + "uniIdRouter": {}, | ||
| 404 | + "easycom": { | ||
| 405 | + "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" | ||
| 406 | + } | ||
| 407 | +} |
pages/.DS_Store
0 → 100644
不能预览此文件类型
pages/arenaComment/arenaComment.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="more_comment"> | ||
| 3 | + <CommentCard v-for="item in 5" :key="item" :isPadding="true"></CommentCard> | ||
| 4 | + </view> | ||
| 5 | +</template> | ||
| 6 | + | ||
| 7 | +<script> | ||
| 8 | + import CommentCard from '@/components/commentCard.vue' | ||
| 9 | + export default { | ||
| 10 | + components: { CommentCard }, | ||
| 11 | + data() { | ||
| 12 | + return { | ||
| 13 | + | ||
| 14 | + }; | ||
| 15 | + } | ||
| 16 | + } | ||
| 17 | +</script> | ||
| 18 | + | ||
| 19 | +<style lang="scss" scoped> | ||
| 20 | +.more_comment{ | ||
| 21 | + padding: 30rpx; | ||
| 22 | + background-color: #F6F6F6; | ||
| 23 | +} | ||
| 24 | +</style> |
pages/bureauDetail/bureauDetail.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="bureau_detail"> | ||
| 3 | + <!-- 详情头部 --> | ||
| 4 | + <view class="bureau_header"> | ||
| 5 | + <u-navbar placeholder :autoBack="true" leftIconColor="#fff" bgColor="transparent" /> | ||
| 6 | + <view class="detail_info"> | ||
| 7 | + <view class="left"> | ||
| 8 | + <image class="cover_img" src="@/static/homeImg/bgimg.webp" mode=""></image> | ||
| 9 | + </view> | ||
| 10 | + <view class="right"> | ||
| 11 | + <text class="f-32 l-h-38 f-w-500">北宋奇案·汴京</text> | ||
| 12 | + <view class="top"> | ||
| 13 | + <text class="col-primary">8.6分</text> | ||
| 14 | + <text>古风/推理/悬疑/其他</text> | ||
| 15 | + </view> | ||
| 16 | + <view class="top"> | ||
| 17 | + <text>4男2女</text> | ||
| 18 | + <text>8小时</text> | ||
| 19 | + <text>高阶</text> | ||
| 20 | + </view> | ||
| 21 | + <view class="top"> | ||
| 22 | + <text class="col-primary f-w-500 f-36 l-h-48">¥148元/人</text> | ||
| 23 | + <text>1号包间</text> | ||
| 24 | + </view> | ||
| 25 | + </view> | ||
| 26 | + </view> | ||
| 27 | + <!-- 门店 --> | ||
| 28 | + <view class="store"> | ||
| 29 | + <image class="logo_img" src="@/static/homeImg/home.png" mode="widthFix"></image> | ||
| 30 | + <text>门店:猎人事务所</text> | ||
| 31 | + </view> | ||
| 32 | + </view> | ||
| 33 | + <!-- 组局人员 --> | ||
| 34 | + <view class="bureau_body"> | ||
| 35 | + <view class="people_box"> | ||
| 36 | + <view class="people_header"> | ||
| 37 | + <view class="left"> | ||
| 38 | + <view class="col-9 f-24 l-h-32 mb-10">开始时间</view> | ||
| 39 | + <view class="col-f f-28 l-h-38">06月06日 周四 14:00</view> | ||
| 40 | + </view> | ||
| 41 | + <view class="right"> | ||
| 42 | + <image style="width: 120rpx;height: 80rpx;" src="@/static/homeImg/cat.png" mode=""></image> | ||
| 43 | + <view> | ||
| 44 | + <view class="col-9 f-24 l-h-32 mb-10">空余车位</view> | ||
| 45 | + <view class="col-f f-28 l-h-38">等<text class="col-primary">1</text>男<text class="col-primary">1</text>女</view> | ||
| 46 | + </view> | ||
| 47 | + </view> | ||
| 48 | + </view> | ||
| 49 | + <view class="people_body"> | ||
| 50 | + <image v-for="(item, index) in urls" :key="index" class="avatar" :src="item" mode=""></image> | ||
| 51 | + </view> | ||
| 52 | + </view> | ||
| 53 | + </view> | ||
| 54 | + </view> | ||
| 55 | +</template> | ||
| 56 | + | ||
| 57 | +<script> | ||
| 58 | + export default { | ||
| 59 | + data() { | ||
| 60 | + return { | ||
| 61 | + urls: [ | ||
| 62 | + 'https://cdn.uviewui.com/uview/album/1.jpg', | ||
| 63 | + 'https://cdn.uviewui.com/uview/album/2.jpg', | ||
| 64 | + 'https://cdn.uviewui.com/uview/album/3.jpg', | ||
| 65 | + 'https://cdn.uviewui.com/uview/album/4.jpg', | ||
| 66 | + 'https://cdn.uviewui.com/uview/album/7.jpg', | ||
| 67 | + 'https://cdn.uviewui.com/uview/album/6.jpg', | ||
| 68 | + 'https://cdn.uviewui.com/uview/album/5.jpg' | ||
| 69 | + ] | ||
| 70 | + }; | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | +</script> | ||
| 74 | + | ||
| 75 | +<style lang="scss" scoped> | ||
| 76 | +.bureau_header{ | ||
| 77 | + position: relative; | ||
| 78 | + height: 600rpx; | ||
| 79 | + background: radial-gradient(ellipse, #fff -110%, #1d2a3a 60%); | ||
| 80 | + .detail_info{ | ||
| 81 | + display: flex; | ||
| 82 | + align-items: center; | ||
| 83 | + margin-top: 40rpx; | ||
| 84 | + padding-left: 30rpx; | ||
| 85 | + .left{ | ||
| 86 | + width: 180rpx; | ||
| 87 | + height: 240rpx; | ||
| 88 | + border-radius: 8rpx; | ||
| 89 | + overflow: hidden; | ||
| 90 | + margin-right: 20rpx; | ||
| 91 | + .cover_img{ | ||
| 92 | + width: 100%; | ||
| 93 | + height: 100%; | ||
| 94 | + } | ||
| 95 | + } | ||
| 96 | + .right{ | ||
| 97 | + display: flex; | ||
| 98 | + flex-direction: column; | ||
| 99 | + flex: 1; | ||
| 100 | + font-size: 24rpx; | ||
| 101 | + line-height: 32rpx; | ||
| 102 | + color: #fff; | ||
| 103 | + .top{ | ||
| 104 | + display: flex; | ||
| 105 | + align-items: center; | ||
| 106 | + gap: 20rpx; | ||
| 107 | + margin-top: 30rpx; | ||
| 108 | + } | ||
| 109 | + } | ||
| 110 | + } | ||
| 111 | + .store{ | ||
| 112 | + display: flex; | ||
| 113 | + align-items: center; | ||
| 114 | + justify-content: center; | ||
| 115 | + position: absolute; | ||
| 116 | + left: 30rpx; | ||
| 117 | + bottom: 40rpx; | ||
| 118 | + width: 340rpx; | ||
| 119 | + height: 60rpx; | ||
| 120 | + font-size: 24rpx; | ||
| 121 | + color: #fff; | ||
| 122 | + background: linear-gradient(270deg, rgba(51,51,51,0.6) 0%, rgba(34,34,34,0.6) 51%, rgba(51,51,51,0.6) 100%); | ||
| 123 | + border-radius: 8rpx; | ||
| 124 | + .logo_img{ | ||
| 125 | + width: 32rpx; | ||
| 126 | + margin-right: 10rpx; | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | +} | ||
| 130 | +.bureau_body{ | ||
| 131 | + height: calc(100vh - 590rpx); | ||
| 132 | + border-radius: 10rpx; | ||
| 133 | + margin-top: -10rpx; | ||
| 134 | + padding: 40rpx 30rpx; | ||
| 135 | + box-sizing: border-box; | ||
| 136 | + .people_box{ | ||
| 137 | + padding: 20rpx; | ||
| 138 | + background: #333333; | ||
| 139 | + border-radius: 20rpx; | ||
| 140 | + .people_header{ | ||
| 141 | + display: flex; | ||
| 142 | + align-items: center; | ||
| 143 | + justify-content: space-between; | ||
| 144 | + margin-bottom: 20rpx; | ||
| 145 | + .right{ | ||
| 146 | + display: flex; | ||
| 147 | + align-items: center; | ||
| 148 | + gap: 20rpx; | ||
| 149 | + } | ||
| 150 | + } | ||
| 151 | + .people_body{ | ||
| 152 | + display: flex; | ||
| 153 | + flex-wrap: wrap; | ||
| 154 | + gap: 26rpx; | ||
| 155 | + height: 260rpx; | ||
| 156 | + padding: 20rpx; | ||
| 157 | + background: #FFFFFF; | ||
| 158 | + border-radius: 12rpx; | ||
| 159 | + .avatar{ | ||
| 160 | + width: 100rpx; | ||
| 161 | + height: 100rpx; | ||
| 162 | + border-radius: 50%; | ||
| 163 | + } | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | +} | ||
| 167 | +</style> |
pages/data/data.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="data_container"> | ||
| 3 | + <!-- 头部模块 --> | ||
| 4 | + <u-sticky > | ||
| 5 | + <view class="nav-header"> | ||
| 6 | + <view class="nav_box" :class="{active: currentData === 0}" @click="currentData = 0">总览</view> | ||
| 7 | + <view class="nav_box" :class="{active: currentData === 1}" @click="currentData = 1">收入明细</view> | ||
| 8 | + </view> | ||
| 9 | + </u-sticky> | ||
| 10 | + <!-- 内容模块 --> | ||
| 11 | + <view class="content"> | ||
| 12 | + <!-- 数据总览 --> | ||
| 13 | + <DataPandect v-show="currentData === 0" /> | ||
| 14 | + <!-- 数据明细 --> | ||
| 15 | + <DataDetail v-show="currentData === 1" /> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 18 | +</template> | ||
| 19 | + | ||
| 20 | +<script> | ||
| 21 | +import DataPandect from '@/components/data/dataPandect.vue' | ||
| 22 | +import DataDetail from '@/components/data/dataDetail.vue' | ||
| 23 | +export default { | ||
| 24 | + components: { DataPandect, DataDetail }, | ||
| 25 | + data(){ | ||
| 26 | + return { | ||
| 27 | + currentData: 0, // 切换数据 | ||
| 28 | + } | ||
| 29 | + } | ||
| 30 | +} | ||
| 31 | +</script> | ||
| 32 | + | ||
| 33 | +<style lang="scss" scoped> | ||
| 34 | +.data_container { | ||
| 35 | + background-color: #F6F7FB; | ||
| 36 | + padding-bottom: 180rpx; | ||
| 37 | + min-height: 100vh; | ||
| 38 | + // 头部模块 | ||
| 39 | + .nav-header{ | ||
| 40 | + display: flex; | ||
| 41 | + align-items: center; | ||
| 42 | + justify-content: center; | ||
| 43 | + height: 80rpx; | ||
| 44 | + background-color: #fff; | ||
| 45 | + .nav_box{ | ||
| 46 | + position: relative; | ||
| 47 | + flex: 1; | ||
| 48 | + height: 100%; | ||
| 49 | + color: #BBBBBB; | ||
| 50 | + font-size: 32rpx; | ||
| 51 | + text-align: center; | ||
| 52 | + line-height: 80rpx; | ||
| 53 | + &.active{ | ||
| 54 | + font-weight: 500; | ||
| 55 | + color: #333; | ||
| 56 | + &::after{ | ||
| 57 | + position: absolute; | ||
| 58 | + bottom: 0; | ||
| 59 | + left: 50%; | ||
| 60 | + transform: translateX(-50%); | ||
| 61 | + content: ''; | ||
| 62 | + width: 40rpx; | ||
| 63 | + height: 8rpx; | ||
| 64 | + background-color: #FFA100; | ||
| 65 | + border-radius: 20rpx; | ||
| 66 | + } | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + } | ||
| 70 | +} | ||
| 71 | +</style> |
pages/home/home.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="main_container"> | ||
| 3 | + <!-- 自定义头部模块 --> | ||
| 4 | + <u-navbar placeholder> | ||
| 5 | + <view class="u-nav-slot" slot="left" > | ||
| 6 | + <text style="color: #333;font-size: 36rpx;font-weight: 500;">猎人事务所</text> | ||
| 7 | + </view> | ||
| 8 | + </u-navbar> | ||
| 9 | + <!-- 搜索 --> | ||
| 10 | + <u-search | ||
| 11 | + v-model="keyword" | ||
| 12 | + placeholder="搜索场地" | ||
| 13 | + :showAction="false" | ||
| 14 | + height="80rpx" | ||
| 15 | + shape="square" | ||
| 16 | + bgColor="#F6F6F6" | ||
| 17 | + margin="20rpx 0" | ||
| 18 | + :inputStyle="{fontSzie: '28rpx',color: '#999'}" | ||
| 19 | + @custom="vadile" | ||
| 20 | + @search="vadile" | ||
| 21 | + /> | ||
| 22 | + <!-- 访问量 --> | ||
| 23 | + <AccessCard /> | ||
| 24 | + <!-- 玩法列表 --> | ||
| 25 | + <PlayNav @playName="onPlayName" /> | ||
| 26 | + <!-- 房间列表 --> | ||
| 27 | + <view class="room"> | ||
| 28 | + <!-- 头部导航 --> | ||
| 29 | + <view class="nav_header"> | ||
| 30 | + <view | ||
| 31 | + v-if="!(playId === 1 && item.title=== '剧本')" class="nav_item" | ||
| 32 | + v-for="(item, index) in navList" | ||
| 33 | + :key="index" | ||
| 34 | + :class="{active: expertActive === index}" | ||
| 35 | + @click="toggleList(item, index)" | ||
| 36 | + > | ||
| 37 | + <view class="nav_content"> | ||
| 38 | + <text>{{ item.title }}</text> | ||
| 39 | + <text class="badge">({{ item.number }})</text> | ||
| 40 | + </view> | ||
| 41 | + </view> | ||
| 42 | + </view> | ||
| 43 | + <!-- 内容列表 --> | ||
| 44 | + <view class="expert_content"> | ||
| 45 | + <swiper class="swiper" :current="expertActive" @animationfinish="toggleSwiper"> | ||
| 46 | + <swiper-item> | ||
| 47 | + <view class="swiper-item"> | ||
| 48 | + <scroll-view scroll-y="true" class="scroll-history"> | ||
| 49 | + <!-- 场地 --> | ||
| 50 | + <PitchList :pitchList="showList" /> | ||
| 51 | + </scroll-view> | ||
| 52 | + </view> | ||
| 53 | + </swiper-item> | ||
| 54 | + <swiper-item v-if="playId !== 1"> | ||
| 55 | + <view class="swiper-item"> | ||
| 56 | + <scroll-view scroll-y="true" class="scroll-history"> | ||
| 57 | + <!-- 剧本 --> | ||
| 58 | + <ScriptList /> | ||
| 59 | + </scroll-view> | ||
| 60 | + </view> | ||
| 61 | + </swiper-item> | ||
| 62 | + <swiper-item> | ||
| 63 | + <view class="swiper-item"> | ||
| 64 | + <scroll-view scroll-y="true" class="scroll-history"> | ||
| 65 | + <!-- 已有组局 --> | ||
| 66 | + <ExistingBureau /> | ||
| 67 | + </scroll-view> | ||
| 68 | + </view> | ||
| 69 | + </swiper-item> | ||
| 70 | + </swiper> | ||
| 71 | + </view> | ||
| 72 | + <u-loadmore | ||
| 73 | + :loading-text="loadingText" | ||
| 74 | + :loadmore-text="loadmoreText" | ||
| 75 | + :nomore-text="nomoreText" | ||
| 76 | + /> | ||
| 77 | + </view> | ||
| 78 | + <!-- 新建场地 --> | ||
| 79 | + <view v-if="showList.length === 0" class="add_mode" @click="goRouter"> | ||
| 80 | + <u-icon name="plus-circle"></u-icon> | ||
| 81 | + <text class="m-l-20">新建场地</text> | ||
| 82 | + </view> | ||
| 83 | + <!-- 没有填写商家信息时提示 --> | ||
| 84 | + <u-popup :show="showTip" round="20" mode="center" closeable @close="showTip = false"> | ||
| 85 | + <view class="tip_container"> | ||
| 86 | + <view class="tip_title">- 温馨提示 -</view> | ||
| 87 | + <view class="tip_content"> | ||
| 88 | + 请设置企业资料 方可使用小程序 | ||
| 89 | + </view> | ||
| 90 | + <view class="btn">去设置</view> | ||
| 91 | + <image class="bg_img" src="@/static/logo_start.png" mode="widthFix"></image> | ||
| 92 | + </view> | ||
| 93 | + </u-popup> | ||
| 94 | + </view> | ||
| 95 | +</template> | ||
| 96 | + | ||
| 97 | +<script> | ||
| 98 | + import { getGroundList, getSportList } from '@/api/sport.js' | ||
| 99 | + import AccessCard from '@/components/home/AccessCard.vue' | ||
| 100 | + import PlayNav from '@/components/home/PlayNav.vue' | ||
| 101 | + import PitchList from '@/components/home/PitchList.vue' | ||
| 102 | + import ScriptList from '@/components/home/ScriptList.vue' | ||
| 103 | + import ExistingBureau from '@/components/home/ExistingBureau.vue' | ||
| 104 | + import { mapGetters } from 'vuex' | ||
| 105 | + import { pro_http } from '@/utils/baseUrl.js' | ||
| 106 | + import loadMore from '@/mixins/loadMore.js' | ||
| 107 | + export default { | ||
| 108 | + components: { AccessCard, PlayNav, PitchList, ScriptList, ExistingBureau }, | ||
| 109 | + data() { | ||
| 110 | + return { | ||
| 111 | + pro_http, | ||
| 112 | + keyword: null, // 输入场地号 | ||
| 113 | + sportsRange: null, //运动类型 | ||
| 114 | + showTip: true, // 提示信息 | ||
| 115 | + expertActive: 0, | ||
| 116 | + playId: 1, // 1,2,3分别表示狼人杀,剧本杀,密室逃脱 | ||
| 117 | + loadingText: '努力加载中', | ||
| 118 | + loadmoreText: '点击加载更多', | ||
| 119 | + nomoreText: '实在没有了', | ||
| 120 | + navList: [ | ||
| 121 | + { title: '场地', number: 9, componentName: 'PitchList' }, | ||
| 122 | + { title: '剧本', number: 10, componentName: 'ScriptList' }, | ||
| 123 | + { title: '已有组局', number: 6, componentName: 'ExistingBureau' }, | ||
| 124 | + ], | ||
| 125 | + showList: [ | ||
| 126 | + { groundId: 1, groundPhotos: 'https://cdn.uviewui.com/uview/album/1.jpg', groundNum: 1, price: '160', isOutdoor: 0}, | ||
| 127 | + { groundId: 2, groundPhotos: 'https://cdn.uviewui.com/uview/album/1.jpg', groundNum: 2, price: '160', isOutdoor: 0}, | ||
| 128 | + { groundId: 3, groundPhotos: 'https://cdn.uviewui.com/uview/album/1.jpg', groundNum: 3, price: '160', isOutdoor: 0}, | ||
| 129 | + { groundId: 4, groundPhotos: 'https://cdn.uviewui.com/uview/album/1.jpg', groundNum: 4, price: '160', isOutdoor: 0} | ||
| 130 | + ] | ||
| 131 | + } | ||
| 132 | + }, | ||
| 133 | + async onShow() { | ||
| 134 | + }, | ||
| 135 | + computed: { | ||
| 136 | + ...mapGetters(['userInfo']) | ||
| 137 | + }, | ||
| 138 | + // 下拉刷新页面 | ||
| 139 | + onPullDownRefresh() { | ||
| 140 | + this.query.pageSize = 10 | ||
| 141 | + this.total = 0 | ||
| 142 | + this.flag = false | ||
| 143 | + this.sportsRange = null | ||
| 144 | + this.keyword = null | ||
| 145 | + this.current = -9 | ||
| 146 | + this.showList = [] | ||
| 147 | + this.getList() | ||
| 148 | + }, | ||
| 149 | + methods: { | ||
| 150 | + // 切换显示列表 | ||
| 151 | + toggleList(item, index){ | ||
| 152 | + if(this.playId === 1 && index === 2) { | ||
| 153 | + this.expertActive = 1 | ||
| 154 | + }else { | ||
| 155 | + this.expertActive = index | ||
| 156 | + } | ||
| 157 | + }, | ||
| 158 | + // 获取玩法名称 | ||
| 159 | + onPlayName(id){ | ||
| 160 | + this.playId = id | ||
| 161 | + this.expertActive = 0 | ||
| 162 | + }, | ||
| 163 | + // 检测手机滑动 | ||
| 164 | + toggleSwiper(event){ | ||
| 165 | + this.expertActive = event.detail?.current | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + } | ||
| 169 | +</script> | ||
| 170 | + | ||
| 171 | +<style lang="scss" scoped> | ||
| 172 | +.main_container{ | ||
| 173 | + padding: 0 30rpx; | ||
| 174 | + min-height: 100vh; | ||
| 175 | + padding-bottom: 30rpx; | ||
| 176 | + background: linear-gradient(to bottom, #FFFFFF -20%, #F5F6FA); | ||
| 177 | + .room { | ||
| 178 | + background: #FFFFFF; | ||
| 179 | + border-radius: 20rpx; | ||
| 180 | + padding-bottom: 10rpx; | ||
| 181 | + .nav_header{ | ||
| 182 | + display: flex; | ||
| 183 | + align-items: center; | ||
| 184 | + justify-content: space-around; | ||
| 185 | + height: 80rpx; | ||
| 186 | + border-bottom: 2rpx solid #eee; | ||
| 187 | + .nav_item{ | ||
| 188 | + position: relative; | ||
| 189 | + text-align: center; | ||
| 190 | + line-height: 80rpx; | ||
| 191 | + color: #999; | ||
| 192 | + .nav_content{ | ||
| 193 | + position: relative; | ||
| 194 | + font-size: 28rpx; | ||
| 195 | + .badge{ | ||
| 196 | + position: absolute; | ||
| 197 | + top: 50%; | ||
| 198 | + right: -50rpx; | ||
| 199 | + color: #999; | ||
| 200 | + transform: translateY(-50%); | ||
| 201 | + } | ||
| 202 | + } | ||
| 203 | + &.active{ | ||
| 204 | + color: #333333; | ||
| 205 | + &::after{ | ||
| 206 | + position: absolute; | ||
| 207 | + left: 50%; | ||
| 208 | + bottom: 0; | ||
| 209 | + content: ''; | ||
| 210 | + width: 40rpx; | ||
| 211 | + height: 6rpx; | ||
| 212 | + transform: translateX(-50%); | ||
| 213 | + background-color: #333; | ||
| 214 | + border-radius: 200rpx; | ||
| 215 | + } | ||
| 216 | + } | ||
| 217 | + } | ||
| 218 | + } | ||
| 219 | + } | ||
| 220 | + // 新建场地 | ||
| 221 | + .add_mode{ | ||
| 222 | + display: flex; | ||
| 223 | + align-items: center; | ||
| 224 | + justify-content: center; | ||
| 225 | + font-size: 28rpx; | ||
| 226 | + line-height: 38rpx; | ||
| 227 | + color: #999; | ||
| 228 | + height: 120rpx; | ||
| 229 | + background: #FFFFFF; | ||
| 230 | + margin-top: 20rpx; | ||
| 231 | + border-radius: 12rpx; | ||
| 232 | + } | ||
| 233 | + // 提示信息 | ||
| 234 | + .tip_container{ | ||
| 235 | + position: relative; | ||
| 236 | + display: flex; | ||
| 237 | + align-items: center; | ||
| 238 | + justify-content: space-between; | ||
| 239 | + flex-direction: column; | ||
| 240 | + width: 690rpx; | ||
| 241 | + height: 480rpx; | ||
| 242 | + background: #FFFFFF; | ||
| 243 | + border-radius: 24rpx; | ||
| 244 | + padding: 40rpx 0; | ||
| 245 | + box-sizing: border-box; | ||
| 246 | + .tip_title{ | ||
| 247 | + text-align: center; | ||
| 248 | + color: #333; | ||
| 249 | + font-size: 32rpx; | ||
| 250 | + line-height: 42rpx; | ||
| 251 | + } | ||
| 252 | + .tip_content{ | ||
| 253 | + width: 196rpx; | ||
| 254 | + height: 76rpx; | ||
| 255 | + font-size: 28rpx; | ||
| 256 | + color: #3D3D3D; | ||
| 257 | + line-height: 38rpx; | ||
| 258 | + text-align: center; | ||
| 259 | + } | ||
| 260 | + .btn{ | ||
| 261 | + width: 372rpx; | ||
| 262 | + height: 76rpx; | ||
| 263 | + background: #333333; | ||
| 264 | + border-radius: 686rpx; | ||
| 265 | + text-align: center; | ||
| 266 | + line-height: 76rpx; | ||
| 267 | + color: #fff; | ||
| 268 | + font-size: 28rpx; | ||
| 269 | + } | ||
| 270 | + .bg_img{ | ||
| 271 | + position: absolute; | ||
| 272 | + top: 70rpx; | ||
| 273 | + left: 262rpx; | ||
| 274 | + object-fit: cover; | ||
| 275 | + } | ||
| 276 | + } | ||
| 277 | + // 二维码显示 | ||
| 278 | + .QRcode_box{ | ||
| 279 | + width: 690rpx; | ||
| 280 | + height: 690rpx; | ||
| 281 | + background: #FFFFFF; | ||
| 282 | + box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.2); | ||
| 283 | + border-radius: 20rpx; | ||
| 284 | + padding: 40rpx; | ||
| 285 | + box-sizing: border-box; | ||
| 286 | + .QRCoce_img{ | ||
| 287 | + display: flex; | ||
| 288 | + align-items: center; | ||
| 289 | + justify-content: center; | ||
| 290 | + margin: 40rpx auto 0; | ||
| 291 | + width: 360rpx; | ||
| 292 | + height: 360rpx; | ||
| 293 | + } | ||
| 294 | + .btn{ | ||
| 295 | + width: 280rpx; | ||
| 296 | + height: 60rpx; | ||
| 297 | + line-height: 60rpx; | ||
| 298 | + background: #F5F7FA; | ||
| 299 | + border-radius: 12rpx; | ||
| 300 | + text-align: center; | ||
| 301 | + color: #333; | ||
| 302 | + font-weight: 500; | ||
| 303 | + font-size: 32rpx; | ||
| 304 | + margin: 0 auto; | ||
| 305 | + } | ||
| 306 | + } | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | + | ||
| 310 | +// 滑动区域模块 | ||
| 311 | +.expert_content{ | ||
| 312 | + padding: 20rpx 30rpx; | ||
| 313 | +} | ||
| 314 | +.scroll-history { | ||
| 315 | + height: 500rpx; | ||
| 316 | +} | ||
| 317 | +.swiper { | ||
| 318 | + height: 500rpx; | ||
| 319 | +} | ||
| 320 | +.swiper-item { | ||
| 321 | + display: block; | ||
| 322 | +} | ||
| 323 | +.scroll-item { | ||
| 324 | + margin-bottom: 10px; | ||
| 325 | +} | ||
| 326 | + | ||
| 327 | +</style> |
pages/login/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="login-container"> | ||
| 3 | + <view class="login-title">手机号码或用户名登录</view> | ||
| 4 | + <u-form :model="logForm" ref="logForm"> | ||
| 5 | + <u-form-item prop="username"> | ||
| 6 | + <u-input v-model="logForm.username" border="bottom" fontSize="36rpx" color="#333" :adjustPosition="false" placeholder="请输入用户名" /> | ||
| 7 | + </u-form-item> | ||
| 8 | + <u-form-item prop="password"> | ||
| 9 | + <u-input v-model="logForm.password" border="bottom" fontSize="36rpx" color="#333" type="password" :adjustPosition="false" placeholder="请输入密码" /> | ||
| 10 | + </u-form-item> | ||
| 11 | + <u-form-item> | ||
| 12 | + <u-checkbox-group v-model="checked"> | ||
| 13 | + <u-checkbox shape="circle" size="16" activeColor="#333"></u-checkbox> | ||
| 14 | + <text class="agreement">我已阅读并同意《用户协议》及《隐私协议》</text> | ||
| 15 | + </u-checkbox-group> | ||
| 16 | + </u-form-item> | ||
| 17 | + </u-form> | ||
| 18 | + <view class="btn" @click="submit">登录</view> | ||
| 19 | + <view class="tip"> | ||
| 20 | + 没有账号?<text style="color: #FFD900;" @click="goReg">去注册</text> | ||
| 21 | + </view> | ||
| 22 | + </view> | ||
| 23 | +</template> | ||
| 24 | + | ||
| 25 | +<script> | ||
| 26 | + export default { | ||
| 27 | + data() { | ||
| 28 | + return { | ||
| 29 | + logForm: { username: '', password: ''}, | ||
| 30 | + checked: [], | ||
| 31 | + logRules: { | ||
| 32 | + username: [ | ||
| 33 | + { required: true, message: '请填写用户名', trigger: ['blur']}, | ||
| 34 | + // { pattern: /^[0-9a-zA-Z]*$/g, transform(value) { return String(value) }, message: '只能包含字母或数字', trigger: 'change' }, | ||
| 35 | + { min: 4, max: 12, message: '长度在6-12个字符之间', trigger: 'change' } | ||
| 36 | + ], | ||
| 37 | + password: [ | ||
| 38 | + { required: true, message: '请填写密码', trigger: ['blur']}, | ||
| 39 | + // { pattern: /^(?=.*[A-Z])[a-zA-Z0-9]+$/, transform(value) { return String(value) }, message: '字母数字组成且必须包含大写字母', trigger: ['change', 'blur'] }, | ||
| 40 | + { min: 6, max: 16, message: '长度在6-16个字符之间', trigger: ['change'] }, | ||
| 41 | + ] | ||
| 42 | + } | ||
| 43 | + } | ||
| 44 | + }, | ||
| 45 | + // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 | ||
| 46 | + onReady() { | ||
| 47 | + this.$refs.logForm.setRules(this.logRules); | ||
| 48 | + }, | ||
| 49 | + methods: { | ||
| 50 | + goReg(){ | ||
| 51 | + uni.navigateTo({ | ||
| 52 | + url: '/pages/register/register' | ||
| 53 | + }) | ||
| 54 | + }, | ||
| 55 | + // 提交登录 | ||
| 56 | + submit() { | ||
| 57 | + if(this.checked.length > 0) { | ||
| 58 | + this.$refs.logForm.validate().then(valid => { | ||
| 59 | + if (valid) { | ||
| 60 | + this.$store.dispatch('Login', this.logForm).then(res => { | ||
| 61 | + uni.switchTab({ | ||
| 62 | + url: '/pages/home/home' | ||
| 63 | + }) | ||
| 64 | + }) | ||
| 65 | + } | ||
| 66 | + }) | ||
| 67 | + } else { | ||
| 68 | + uni.$u.toast('请勾选用户协议和隐私协议') | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + } | ||
| 72 | + } | ||
| 73 | +</script> | ||
| 74 | + | ||
| 75 | +<style scoped lang="scss"> | ||
| 76 | + .login-container{ | ||
| 77 | + position: relative; | ||
| 78 | + padding: 0 30rpx; | ||
| 79 | + box-sizing: border-box; | ||
| 80 | + height: calc(100vh - 88rpx); | ||
| 81 | + max-height: 100vh; | ||
| 82 | + .login-title{ | ||
| 83 | + color: #3d3d3d; | ||
| 84 | + font-size: 56rpx; | ||
| 85 | + margin: 40rpx 0 80rpx 0; | ||
| 86 | + line-height: 74rpx; | ||
| 87 | + font-weight: 500; | ||
| 88 | + } | ||
| 89 | + .agreement{ | ||
| 90 | + color: #333; | ||
| 91 | + line-height: 38rpx; | ||
| 92 | + font-size: 28rpx; | ||
| 93 | + } | ||
| 94 | + .btn{ | ||
| 95 | + width: 100%; | ||
| 96 | + height: 88rpx; | ||
| 97 | + text-align: center; | ||
| 98 | + line-height: 88rpx; | ||
| 99 | + font-size: 32rpx; | ||
| 100 | + background-color: #333; | ||
| 101 | + border-radius: 12rpx; | ||
| 102 | + color: #fff; | ||
| 103 | + margin-top: 30rpx; | ||
| 104 | + } | ||
| 105 | + .tip{ | ||
| 106 | + position: absolute; | ||
| 107 | + bottom: 44rpx; | ||
| 108 | + left: 50%; | ||
| 109 | + font-size: 36rpx; | ||
| 110 | + color: #333; | ||
| 111 | + transform: translateX(-50%); | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | +</style> |
pages/login/login.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="login-container"> | ||
| 3 | + <image class="login-bg" src="@/static/logo_start.png" mode="widthFix"></image> | ||
| 4 | + <view class="login-btn"> | ||
| 5 | + <u-button shape="circle" style="color: #111;font-size: 32rpx;" @click="goLogin">手机号码或用户名登录/注册</u-button> | ||
| 6 | + </view> | ||
| 7 | + <view class="agreement"> | ||
| 8 | + <u-checkbox-group v-model="checked"> | ||
| 9 | + <u-checkbox name="agreement" size="16" shape="circle" labelColor="#333" labelSize="14" activeColor="#333" label="我已阅读并同意《用户协议》及《隐私协议》"></u-checkbox> | ||
| 10 | + </u-checkbox-group> | ||
| 11 | + </view> | ||
| 12 | + <!-- 弹出框 --> | ||
| 13 | + <u-modal :show="show" :content='content' showCancelButton closeOnClickOverlay @close="show = false" @cancel="show = false" @confirm="onConfirm"></u-modal> | ||
| 14 | + </view> | ||
| 15 | +</template> | ||
| 16 | + | ||
| 17 | +<script> | ||
| 18 | + export default { | ||
| 19 | + data(){ | ||
| 20 | + return { | ||
| 21 | + checked: [], | ||
| 22 | + show: false, | ||
| 23 | + content: '请勾选用户协议和隐私协议' | ||
| 24 | + } | ||
| 25 | + }, | ||
| 26 | + methods: { | ||
| 27 | + goLogin(){ | ||
| 28 | + if(this.checked.length > 0) { | ||
| 29 | + uni.redirectTo({ | ||
| 30 | + url: '/pages/login/index' | ||
| 31 | + }) | ||
| 32 | + } else { | ||
| 33 | + this.show = true | ||
| 34 | + } | ||
| 35 | + }, | ||
| 36 | + onConfirm(){ | ||
| 37 | + uni.redirectTo({ | ||
| 38 | + url: '/pages/login/index' | ||
| 39 | + }) | ||
| 40 | + } | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + } | ||
| 44 | +</script> | ||
| 45 | + | ||
| 46 | +<style lang="scss" scoped> | ||
| 47 | +.login-container { | ||
| 48 | + position: relative; | ||
| 49 | + height: 100vh; | ||
| 50 | + background-color: #F3CA32; | ||
| 51 | + .login-bg{ | ||
| 52 | + position: absolute; | ||
| 53 | + width: 972rpx; | ||
| 54 | + top: 204rpx; | ||
| 55 | + left: 96rpx; | ||
| 56 | + } | ||
| 57 | + .login-btn{ | ||
| 58 | + position: absolute; | ||
| 59 | + top: 60%; | ||
| 60 | + left: 50%; | ||
| 61 | + width: 600rpx; | ||
| 62 | + transform: translateX(-50%); | ||
| 63 | + } | ||
| 64 | + .agreement{ | ||
| 65 | + display: flex; | ||
| 66 | + align-items: center; | ||
| 67 | + justify-content: center; | ||
| 68 | + position: absolute; | ||
| 69 | + bottom: 68rpx; | ||
| 70 | + left: 50%; | ||
| 71 | + width: 100%; | ||
| 72 | + transform: translateX(-50%); | ||
| 73 | + } | ||
| 74 | +} | ||
| 75 | +</style> |
pages/mall/mall.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="mall_container"> | ||
| 3 | + <!-- 头部模块 --> | ||
| 4 | + <MallHeared /> | ||
| 5 | + <!-- 商品展示 --> | ||
| 6 | + <MallSelect :scrollHeight="scrollHeight" /> | ||
| 7 | + </view> | ||
| 8 | +</template> | ||
| 9 | + | ||
| 10 | +<script> | ||
| 11 | + import { rpx2px } from '@/utils/util.js' | ||
| 12 | + import MallSelect from '@/components/mall/mallSelect.vue' | ||
| 13 | + import MallHeared from '@/components/mall/mallHeared.vue' | ||
| 14 | + export default { | ||
| 15 | + components: { MallHeared, MallSelect }, | ||
| 16 | + data() { | ||
| 17 | + return { | ||
| 18 | + scrollHeight: 0, // 计算当前可用高度 | ||
| 19 | + }; | ||
| 20 | + }, | ||
| 21 | + onLoad() { | ||
| 22 | + this.setListHeight() | ||
| 23 | + }, | ||
| 24 | + methods: { | ||
| 25 | + // 设置列表内容的高度 | ||
| 26 | + setListHeight() { | ||
| 27 | + const { windowHeight } = uni.getSystemInfoSync() | ||
| 28 | + this.scrollHeight = windowHeight - rpx2px(700) | ||
| 29 | + }, | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | +</script> | ||
| 33 | + | ||
| 34 | +<style lang="scss" scoped> | ||
| 35 | +.mall_container{ | ||
| 36 | + min-height: 100vh; | ||
| 37 | +} | ||
| 38 | +</style> |
pages/my/.DS_Store
0 → 100644
不能预览此文件类型
pages/my/my.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="my_pages"> | ||
| 3 | + <!-- 头部模块 --> | ||
| 4 | + <MyHeader :userInfo="userInfo" /> | ||
| 5 | + <!-- 用户菜单 --> | ||
| 6 | + <view class="user_menu"> | ||
| 7 | + <view class="user_money"> | ||
| 8 | + <view class="dis-flex flex-y-center flex-x-between"> | ||
| 9 | + <view class="dis-flex flex-y-center mb-20"> | ||
| 10 | + <text class="f-28 l-h-38 f-w-500 m-r-10">账户总览</text> | ||
| 11 | + <u-icon :name="showMoney ? 'eye' : 'eye-off'" size="12" color="#fff" @click="showMoney = !showMoney"></u-icon> | ||
| 12 | + </view> | ||
| 13 | + <view class="dis-flex flex-y-center" @click="goRouter('/pages_my/myWallet/myWallet')"> | ||
| 14 | + <u-icon name="rmb-circle" size="14" color="#fff"></u-icon> | ||
| 15 | + <text class="f-24 l-h-32 m-l-10 m-r-10">我的钱包</text> | ||
| 16 | + <u-icon name="arrow-right" size="10" color="#fff"></u-icon> | ||
| 17 | + </view> | ||
| 18 | + </view> | ||
| 19 | + <view style="color: #ddd;" class="dis-flex flex-dir-column"> | ||
| 20 | + <text class="mb-10 f-24 l-h-32">余额</text> | ||
| 21 | + <text class="col-f f-36 l-h-48">{{ showMoney ? '¥2000' : hideDigits('2000') }}</text> | ||
| 22 | + </view> | ||
| 23 | + </view> | ||
| 24 | + <!-- 菜单列表 --> | ||
| 25 | + <FunctionList /> | ||
| 26 | + </view> | ||
| 27 | + <!-- 门店管理 --> | ||
| 28 | + <StoreControl /> | ||
| 29 | + <!-- 功能中心 --> | ||
| 30 | + <UserList /> | ||
| 31 | + </view> | ||
| 32 | +</template> | ||
| 33 | + | ||
| 34 | +<script> | ||
| 35 | + import FunctionList from '@/components/my/functionList.vue' | ||
| 36 | + import UserList from '@/components/my/userList.vue' | ||
| 37 | + import MyHeader from '@/components/my/myHeader.vue' | ||
| 38 | + import StoreControl from '@/components/my/StoreControl.vue' | ||
| 39 | + import { getUserAmout, getUserInfo } from '@/api/user.js' | ||
| 40 | + import { pro_http } from '@/utils/baseUrl.js' | ||
| 41 | + export default { | ||
| 42 | + components: { FunctionList, UserList, MyHeader, StoreControl }, | ||
| 43 | + data() { | ||
| 44 | + return{ | ||
| 45 | + pro_http, | ||
| 46 | + showMoney: true, // 是否显示余额 | ||
| 47 | + userAmout: 0, // 用户余额 | ||
| 48 | + userInfo: {} | ||
| 49 | + } | ||
| 50 | + }, | ||
| 51 | + computed: { | ||
| 52 | + hideDigits() { | ||
| 53 | + return (amount) => { | ||
| 54 | + // 使用正则表达式替换数字为星号 | ||
| 55 | + return amount.replace(/\d/g, '*'); | ||
| 56 | + } | ||
| 57 | + } | ||
| 58 | + }, | ||
| 59 | + // async onLoad() { | ||
| 60 | + // const { money } = await getUserAmout() | ||
| 61 | + // this.userAmout = money | ||
| 62 | + // }, | ||
| 63 | + // async onShow() { | ||
| 64 | + // this.userInfo = await getUserInfo() | ||
| 65 | + // this.userInfo.avatar = uni.$u.test.url(this.userInfo.avatar) ? this.userInfo.avatar : pro_http + this.userInfo.avatar | ||
| 66 | + // }, | ||
| 67 | + methods: { | ||
| 68 | + goRouter(path){ | ||
| 69 | + uni.navigateTo({ | ||
| 70 | + url: path | ||
| 71 | + }) | ||
| 72 | + } | ||
| 73 | + } | ||
| 74 | + } | ||
| 75 | +</script> | ||
| 76 | + | ||
| 77 | +<style lang="scss" scoped> | ||
| 78 | +.my_pages{ | ||
| 79 | + min-height: 100vh; | ||
| 80 | + padding-bottom: 40rpx; | ||
| 81 | + background: linear-gradient(to left bottom, #DEF2FF, #F4F5F9, #FFDDC2); | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +// 用户菜单 | ||
| 85 | +.user_menu{ | ||
| 86 | + position: relative; | ||
| 87 | + height: 340rpx; | ||
| 88 | + background: #FFFFFF; | ||
| 89 | + box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(0,0,0,0.1); | ||
| 90 | + border-radius: 12rpx; | ||
| 91 | + margin: 0 30rpx; | ||
| 92 | + z-index: 20; | ||
| 93 | + overflow: hidden; | ||
| 94 | + .user_money{ | ||
| 95 | + height: 200rpx; | ||
| 96 | + box-sizing: border-box; | ||
| 97 | + padding: 20rpx 30rpx; | ||
| 98 | + background: linear-gradient( 45deg, #676D93 0%, #9DACC7 100%); | ||
| 99 | + color: #fff; | ||
| 100 | + } | ||
| 101 | +} | ||
| 102 | +</style> |
pages/order/order.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <view class="order_container"> | ||
| 3 | + <!-- 订单头部 --> | ||
| 4 | + <u-sticky> | ||
| 5 | + <!-- 自定义头部 --> | ||
| 6 | + <u-navbar | ||
| 7 | + :title="orderType === 'mall' ? '商城订单' : '门店订单'" | ||
| 8 | + leftIcon="list" | ||
| 9 | + bgColor="#24262B" | ||
| 10 | + :placeholder="true" | ||
| 11 | + leftIconColor="#fff" | ||
| 12 | + :titleStyle="{color: '#fff'}" | ||
| 13 | + @leftClick="show = !show" | ||
| 14 | + /> | ||
| 15 | + <!-- 头部导航栏 --> | ||
| 16 | + <view class="order_header"> | ||
| 17 | + <u-tabs | ||
| 18 | + :list="orderType === 'mall' ? mallNavlist : bookingNavlist" | ||
| 19 | + lineColor="#FFA100" | ||
| 20 | + :activeStyle="{ color: '#fff' }" | ||
| 21 | + :inactiveStyle="{ color: '#BBB' }" | ||
| 22 | + @click="toggleOrder" | ||
| 23 | + /> | ||
| 24 | + <!-- 下拉选项 --> | ||
| 25 | + <u-transition :show="show" :duration="300"> | ||
| 26 | + <view class="selectOrder"> | ||
| 27 | + <view class="select_item" :class="{active: orderType === 'mall'}" @click="orderType = 'mall'"> | ||
| 28 | + <text>商城订单</text> | ||
| 29 | + </view> | ||
| 30 | + <view class="select_item" :class="{active: orderType === 'booking'}" @click="orderType = 'booking'"> | ||
| 31 | + <text>球场订单</text> | ||
| 32 | + </view> | ||
| 33 | + <view class="select_item" v-for="(item, index) in employeeList" :key="index"> | ||
| 34 | + <u-icon :name="item.iconNane" size="20"></u-icon> | ||
| 35 | + <text class="m-l-10">{{ item.title }}</text> | ||
| 36 | + </view> | ||
| 37 | + </view> | ||
| 38 | + </u-transition> | ||
| 39 | + </view> | ||
| 40 | + </u-sticky> | ||
| 41 | + <!-- 下拉选择订单类型列表 --> | ||
| 42 | + <view class="px-30 my-30"> | ||
| 43 | + <uni-data-select | ||
| 44 | + v-model="stateVlue" | ||
| 45 | + placeholder="请选择订单的状态" | ||
| 46 | + :localdata="stateList" | ||
| 47 | + @change="getList" | ||
| 48 | + /> | ||
| 49 | + </view> | ||
| 50 | + <!-- 订单列表 --> | ||
| 51 | + <view v-if="stateList.length > 0" class="px-30 m-top20"> | ||
| 52 | + <BookingOrderCard | ||
| 53 | + v-for="(item, index) in showList" | ||
| 54 | + :key="index" | ||
| 55 | + :orderList="item" | ||
| 56 | + :number="index + 1" | ||
| 57 | + :stateValue="formatState(item.state)" | ||
| 58 | + @showRefund="(value) => showRefund = value" | ||
| 59 | + > | ||
| 60 | + <!-- 退款 --> | ||
| 61 | + <template #refund> | ||
| 62 | + <view class="m-top30 px-30" v-show="item.refundReason"> | ||
| 63 | + <text class="col-6 f-26 l-h-32">退款原因</text> | ||
| 64 | + <view class="m-top30"> | ||
| 65 | + <u--textarea v-model="item.refundReason" disabled placeholder="请输入内容" ></u--textarea> | ||
| 66 | + </view> | ||
| 67 | + </view> | ||
| 68 | + </template> | ||
| 69 | + <!-- 评价 --> | ||
| 70 | + <template #comment> | ||
| 71 | + <view class="m-top30 px-30" v-show="item.commentContent"> | ||
| 72 | + <text class="col-6 f-26 l-h-32">评论内容</text> | ||
| 73 | + <view class="m-top30"> | ||
| 74 | + <u--textarea v-model="item.commentContent" disabled placeholder="请输入内容" ></u--textarea> | ||
| 75 | + </view> | ||
| 76 | + </view> | ||
| 77 | + </template> | ||
| 78 | + </BookingOrderCard> | ||
| 79 | + <view v-show="!showList.length > 0" > | ||
| 80 | + <u-empty text="暂无订单" /> | ||
| 81 | + </view> | ||
| 82 | + </view> | ||
| 83 | + <!-- 遮罩层 --> | ||
| 84 | + <u-overlay :show="show" zIndex="98" opacity="0" @click="show = false"></u-overlay> | ||
| 85 | + <!-- 选择退款比例 --> | ||
| 86 | + <u-modal | ||
| 87 | + :show="showRefund" | ||
| 88 | + :title="title" showCancelButton | ||
| 89 | + @cancel="showRefund = false" | ||
| 90 | + @close="showRefund = false" | ||
| 91 | + @confirm="sendRefund" | ||
| 92 | + > | ||
| 93 | + <view class="slot-content"> | ||
| 94 | + <u-radio-group | ||
| 95 | + v-model="radiovalue" | ||
| 96 | + placement="row" | ||
| 97 | + > | ||
| 98 | + <u-radio | ||
| 99 | + :customStyle="{marginBottom: '8px', marginRight: '10px'}" | ||
| 100 | + v-for="(item, index) in radiolist" | ||
| 101 | + :key="index" | ||
| 102 | + :value="item.value" | ||
| 103 | + :label="item.name" | ||
| 104 | + :name="item.value" | ||
| 105 | + > | ||
| 106 | + </u-radio> | ||
| 107 | + </u-radio-group> | ||
| 108 | + </view> | ||
| 109 | + </u-modal> | ||
| 110 | + | ||
| 111 | + </view> | ||
| 112 | +</template> | ||
| 113 | + | ||
| 114 | +<script> | ||
| 115 | + import BookingOrderCard from '@/components/order/bookingOrderCard.vue' | ||
| 116 | + import { getOrderList, getAftersalesOrder, getCommentOrder, getOrderState, getRefundState, getCommentState, businessLookRefund } from '@/api/order.js' | ||
| 117 | + import loadMore from '../../mixins/loadMore' | ||
| 118 | + import { mapGetters } from 'vuex' | ||
| 119 | + export default { | ||
| 120 | + components: { BookingOrderCard }, | ||
| 121 | + mixins: [loadMore], | ||
| 122 | + data() { | ||
| 123 | + return { | ||
| 124 | + show: false, // 是否显示遮罩层 | ||
| 125 | + title: '确定允许退款吗,请选择退款比例', | ||
| 126 | + showRefund: false, | ||
| 127 | + total: 0, //订单数量 | ||
| 128 | + name: '实时订单', //订单状态名 | ||
| 129 | + orderType: 'booking', // 订单类型 商家订单或者球场订单 | ||
| 130 | + stateVlue: null, //当前选择状态码 | ||
| 131 | + stateList: [], // 显示订单列表 | ||
| 132 | + orderState: [], // 订单类型数据 | ||
| 133 | + refundState: [], // 退货订单类型数据 | ||
| 134 | + commentState: [], // 评价订单类型数据 | ||
| 135 | + // 基本案列数据 | ||
| 136 | + radiolist: [{name: '退全款', value: 1}, {name: '退款50%', value: 2}], | ||
| 137 | + // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中 | ||
| 138 | + radiovalue: 1, | ||
| 139 | + // 商城导航列表 | ||
| 140 | + mallNavlist: [ | ||
| 141 | + { name: '自提', badge: { value: 2 } }, | ||
| 142 | + { name: '待配送', badge: { value: 2 } }, | ||
| 143 | + { name: '退款', badge: { value: 2 } }, | ||
| 144 | + { name: '已完成', badge: { isDot: true } }, | ||
| 145 | + ], | ||
| 146 | + // 球场导航列表 | ||
| 147 | + bookingNavlist: [ | ||
| 148 | + { name: '实时订单', badge: { value: 0 } }, | ||
| 149 | + { name: '退款售后', badge: { value: 0 } }, | ||
| 150 | + { name: '订单评价', badge: { value: 0 } } | ||
| 151 | + ], | ||
| 152 | + // 订单列表 | ||
| 153 | + showList: [], // 显示订单列表 | ||
| 154 | + // 商家订单功能列表 | ||
| 155 | + mallList: [ | ||
| 156 | + {title: '扫一扫', iconNane: 'scan'} | ||
| 157 | + ], | ||
| 158 | + // 员工订单功能列表 | ||
| 159 | + employeeList: [ | ||
| 160 | + {title: '扫一扫', iconNane: 'scan'}, | ||
| 161 | + {title: '张三', iconNane: 'account'}, | ||
| 162 | + {title: '18172289999', iconNane: 'phone'}, | ||
| 163 | + {title: '退出登录', iconNane: 'share-square'} | ||
| 164 | + ] | ||
| 165 | + } | ||
| 166 | + }, | ||
| 167 | + computed: { | ||
| 168 | + ...mapGetters(['userInfo']), | ||
| 169 | + formatState(){ | ||
| 170 | + return (stateNum) => { | ||
| 171 | + let stateValue = '' | ||
| 172 | + this.stateList.forEach(item => { | ||
| 173 | + if(Number(item.value) === stateNum) { | ||
| 174 | + stateValue = item.text | ||
| 175 | + } | ||
| 176 | + }) | ||
| 177 | + return stateValue | ||
| 178 | + } | ||
| 179 | + } | ||
| 180 | + }, | ||
| 181 | + // async onLoad() { | ||
| 182 | + // // 获取三种订单状态 | ||
| 183 | + // const [ orderState, refundState, commentState ] = await Promise.all([ | ||
| 184 | + // getOrderState(), | ||
| 185 | + // getRefundState(), | ||
| 186 | + // getCommentState() | ||
| 187 | + // ]) | ||
| 188 | + // this.orderState = orderState | ||
| 189 | + // this.refundState = refundState | ||
| 190 | + // this.commentState = commentState | ||
| 191 | + // this.stateList = this.getStatus(this.orderState) | ||
| 192 | + // }, | ||
| 193 | + // 获取订单列表 | ||
| 194 | + // mounted() { | ||
| 195 | + // this.getList() | ||
| 196 | + // }, | ||
| 197 | + methods: { | ||
| 198 | + // 选择订单类型 | ||
| 199 | + selectMode(){}, | ||
| 200 | + // 切换订单获取相应列表 | ||
| 201 | + toggleOrder(item){ | ||
| 202 | + this.name = item.name | ||
| 203 | + this.getList() | ||
| 204 | + }, | ||
| 205 | + // 显示列表 | ||
| 206 | + getList(){ | ||
| 207 | + let query = { ...this.query, businessId: this.userInfo.businessId, state: this.stateVlue } | ||
| 208 | + if(this.name === '实时订单') { | ||
| 209 | + this.getNewList(query) | ||
| 210 | + this.stateList = this.getStatus(this.orderState) | ||
| 211 | + } else if(this.name === '退款售后') { | ||
| 212 | + this.getRefundList(query) | ||
| 213 | + this.stateList = this.getStatus(this.refundState) | ||
| 214 | + } else { | ||
| 215 | + this.getCommentList(query) | ||
| 216 | + this.stateList = this.getStatus(this.commentState) | ||
| 217 | + } | ||
| 218 | + uni.stopPullDownRefresh() | ||
| 219 | + }, | ||
| 220 | + // 获取订单状态 | ||
| 221 | + getStatus(arr){ | ||
| 222 | + return arr.map(item => { | ||
| 223 | + return { | ||
| 224 | + value: item.dictValue, | ||
| 225 | + text: item.dictLabel | ||
| 226 | + } | ||
| 227 | + }) | ||
| 228 | + }, | ||
| 229 | + // 获取实时订单列表 | ||
| 230 | + async getNewList(query) { | ||
| 231 | + const { rows, total } = await getOrderList(query) | ||
| 232 | + this.showList = rows | ||
| 233 | + this.total = total | ||
| 234 | + this.bookingNavlist[0].badge.value = total | ||
| 235 | + }, | ||
| 236 | + // 获取退款订单列表 | ||
| 237 | + async getRefundList(query){ | ||
| 238 | + const { rows, total } = await getAftersalesOrder(query) | ||
| 239 | + this.showList = rows | ||
| 240 | + this.total = total | ||
| 241 | + this.bookingNavlist[1].badge.value = total | ||
| 242 | + }, | ||
| 243 | + // 获取订单评论列表 | ||
| 244 | + async getCommentList(query){ | ||
| 245 | + const { rows, total } = await getCommentOrder(query) | ||
| 246 | + this.showList = rows | ||
| 247 | + this.total = total | ||
| 248 | + this.bookingNavlist[2].badge.value = total | ||
| 249 | + }, | ||
| 250 | + // 发起退款 | ||
| 251 | + async sendRefund(){ | ||
| 252 | + await businessLookRefund(this.radiovalue) | ||
| 253 | + uni.$u.toast('退款成功') | ||
| 254 | + this.showRefund = false | ||
| 255 | + } | ||
| 256 | + } | ||
| 257 | + } | ||
| 258 | +</script> | ||
| 259 | + | ||
| 260 | +<style lang="scss" scoped> | ||
| 261 | +@import '@/static/css/order.scss' | ||
| 262 | +</style> |
-
请 注册 或 登录 后发表评论