wangjiahai 2 years ago
parent
commit
270d09af35
  1. 31
      common/request.api.js
  2. 15
      pages.json
  3. 108
      pages/card/card_detail.vue
  4. 0
      uni_modules/loading-state/changelog.md
  5. 47
      uni_modules/loading-state/components/loading-state/loading-state.vue
  6. 81
      uni_modules/loading-state/package.json
  7. 1
      uni_modules/loading-state/readme.md

31
common/request.api.js

@ -3,34 +3,5 @@ import request from '@/utils/requester.js'
export default {
login: (params = {}) => request.post("/wxmpapi/sysuser/login", params),
wxBindMobile: (params = {}) => request.post("/lpkcustomer/wxBindMobile", params),
sayhello: (params = {}) => request.get("/sayb", params),
getSalesReport: (params = {}) => request.get("/system/reportCenter/getSalesReport", params),
getGoodsOnWay: (params = {}) => request.get("/system/reportCenter/getGoodsOnWay", params),
getThresholdAnalysis: (params = {}) => request.get("/system/risk/getThresholdAnalysis", params),
// 查看预警信息
selectBusinessRiskInfo: (params = {}) => request.post("/wxmpapi/v1/businessData/selectBusinessRiskInfo", params),
// 获取审核报告内容
getReportInfo: (params = {}) => request.post("/reportwxmpapi/v1/csmcashreport/getCsmReportByComSid", params),
// 获取今日回款明细
getCsmReportTodayByComSid: (params = {}) => request.post(
"/reportwxmpapi/v1/csmcashreportcashed/getCsmReportTodayByComSid",
params),
// 获取昨日销售报表
getCsmReportYesterdayByComSid: (params = {}) => request.post(
"/reportwxmpapi/v1/csmcashreportsales/getCsmReportYesterdayByComSid",
params),
// 库存汇总表
getReportInventoryDayGather: (params = {}) => request.get("/reportwxmpapi/reportinventory/getReportInventoryDayGather/" +
params,
params),
// 仓库库存明细表
getReportInventoryDayStore: (params = {}) => request.get(
"/reportwxmpapi/reportinventory/getReportInventoryDayStore/" + params, params),
// 烟草仓库库存明细表
getReportInventoryDayToStore: (params = {}) => request.get(
"/reportwxmpapi/reportinventory/getReportInventoryDayToStore/" + params, params)
cardList: (params = {}) => request.post("/lpkgiftcard/gifCardByCustomerSid", params),
}

15
pages.json

@ -1,9 +1,22 @@
{
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/login/login",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
},
{
"path": "pages/card/card_detail",
"style": {
"navigationBarTitleText": "礼包详情"
}
},
{
"path": "pages/card/card",
"style": {
"navigationBarTitleText": "uni-app"
"navigationBarTitleText": "礼包"
}
},
{

108
pages/card/card_detail.vue

@ -2,7 +2,6 @@
<view>
<image src="../../static/edit_bg.png" style="width: 100%;height: 40vw;z-index: 0;"></image>
<!-- 3+13+7+4 =27 -->
<view style="display: flex;flex-direction: column;margin-top: -40vw;">
<view style="display: flex;flex-direction: row;justify-content: space-between;align-items: center;">
<view style="flex: 1;display: flex;flex-direction: column;z-index: 1;margin-left: 15px;">
@ -26,6 +25,34 @@
<image src="../../static/pName.png" style="width: 15px;height: 15px;margin-left: 15px;"></image>
<view style="margin-left: 15px;font-size: 14px;">{{data.pname}}</view>
</view>
<view style="background: #FFFFFF;border-radius: 20rpx;padding: 15px;margin: 10px 15px;">
<view
style="display: flex;flex-direction: row;align-items: center;border-bottom: 1rpx #f1f2f3 solid;padding-bottom: 10px;">
<image src="../../static/mingxi.png" style="width: 15px;height: 15px;"></image>
<view style="margin-left: 10px;font-size: 14px;">商品明细</view>
</view>
<view v-for="(item,index) in data.list" style="display: flex;flex-direction: row;margin-top: 15px;">
<image src="../../static/logo.png" style="width: 60px;height: 60px;flex-shrink: 0;"></image>
<view style="margin-left: 10px;margin-right: 10px;">
<text class="text" style="flex: 1;font-weight: 500;">background: #FFFFFF;border-radius:
20rpx;padding: 15px;margin: 10px 15px;
</text>
<view style="font-size: 12px;color: #666666;">可用数量{{item.lNum}}</view>
</view>
<view style="flex-shrink: 0;font-size: 12px;color: #666666;">x{{item.num}}</view>
</view>
</view>
</view>
<view style="height: 60px;"></view>
<view
style="position: fixed;bottom: 0;height: 50px;background: #f3f4f6;border-top: 1rpx #cacaca solid;width: 100%;display: flex;flex-direction: row;box-sizing: border-box;align-items: center;padding-right: 15px;">
<view style="flex: 1;"></view>
<view class="btn" style="flex-shrink: 0;font-size: 30rpx;color: #191919;">
预约记录</view>
<view class="btn" style="flex-shrink: 0;font-size: 30rpx;color: royalblue;">预约提货</view>
</view>
</view>
</template>
@ -35,16 +62,71 @@
data() {
return {
page: {
remarks: ''
sid: ''
},
data: {
time: "2023.10.20-2025.10.20",
name: "卡号:123456789",
pname: "闭包名称",
state: "已失效",
showBtn: false,
list: [{
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}, {
goods: '大白菜',
pic: '',
num: 10,
lNum: 1
}]
}
}
},
onLoad(options) {
this.page.sid = options.sid
},
methods: {
}
@ -52,8 +134,30 @@
</script>
<style>
.text {
white-space: normal;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
uni-page-body,
page {
background: #F1F2F3;
}
.btn {
border: 1px solid;
padding-left: 25rpx;
padding-right: 25rpx;
padding-top: 10rpx;
padding-bottom: 10rpx;
border-radius: 50rpx;
height: 20px;
margin-left: 25rpx;
}
</style>

0
uni_modules/loading-state/changelog.md

47
uni_modules/loading-state/components/loading-state/loading-state.vue

@ -0,0 +1,47 @@
<template>
<view>
<view v-if="state === 0">
<uni-load-more status="loading"></uni-load-more>
</view>
<!-- 错误 -->
<z-paging-empty-view v-if="state === 1" emptyViewText="很抱歉,加载失败" :showEmptyViewReload="true"
:emptyViewImg="errorImg" @reload="reload">
</z-paging-empty-view>
<view v-if="state != 0 && state != 1">
<slot></slot>
</view>
</view>
</template>
<script>
import zStatic from '../../../z-paging/components/z-paging/js/z-paging-static.js'
export default {
data() {
return {
state: 0
};
},
computed: {
errorImg() {
return zStatic.base64Error
}
},
methods: {
setLoadState(state) {
this.state = state
},
getLoadState() {
return this.state
},
reload() {
this.request()
},
request() {
this.$emit('request');
}
}
}
</script>
<style>
</style>

81
uni_modules/loading-state/package.json

@ -0,0 +1,81 @@
{
"id": "loading-state",
"displayName": "loading-state",
"version": "1.0.0",
"description": "loading-state",
"keywords": [
"loading-state"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "u",
"aliyun": "u"
},
"client": {
"Vue": {
"vue2": "u",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "u",
"Android Browser": "u",
"微信浏览器(Android)": "u",
"QQ浏览器(Android)": "u"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "u",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

1
uni_modules/loading-state/readme.md

@ -0,0 +1 @@
# loading-state
Loading…
Cancel
Save