Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
504
src/apps/AppCreditPoints/AppCreditPoints.vue
Normal file
504
src/apps/AppCreditPoints/AppCreditPoints.vue
Normal file
@@ -0,0 +1,504 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="credit-points">
|
||||
<div class="fixed-top">
|
||||
<div class="header-tab" style="background-color: #197df0">
|
||||
<div
|
||||
class="tab-item"
|
||||
v-for="(item, index) in tabList"
|
||||
:key="index"
|
||||
@click="tabClick(index)"
|
||||
>
|
||||
{{ item }}<span class="active-line" v-if="tabIndex == index"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-blue"></div>
|
||||
<div class="header-content">
|
||||
<div class="item">
|
||||
<div class="num color-5AAD6A">
|
||||
{{
|
||||
tabIndex == 0
|
||||
? info["家庭积分"] || "0"
|
||||
: Number(info["个人积分"]) || "0"
|
||||
}}
|
||||
</div>
|
||||
<div class="label">{{ tabIndex == 0 ? "家庭" : "个人" }}总分</div>
|
||||
</div>
|
||||
<div class="item" v-if="tabIndex != 1">
|
||||
<div class="num color-4185F5">
|
||||
{{
|
||||
tabIndex == 0
|
||||
? info["剩余总分"] || "0"
|
||||
: info["个人积分"] || "0"
|
||||
}}
|
||||
</div>
|
||||
<div class="label">剩余总分</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="num color-CD413A">
|
||||
{{
|
||||
tabIndex == 0
|
||||
? info["家庭排行"] || "0"
|
||||
: info["个人排行"] || "0"
|
||||
}}
|
||||
</div>
|
||||
<div class="label">{{ tabIndex == 0 ? "家庭" : "个人" }}排名</div>
|
||||
</div>
|
||||
<img src="https://cdn.cunwuyun.cn/dvcp/credit/head.png" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!showDetail" style="padding-top: 432rpx">
|
||||
<div class="ranking-content" v-if="info['列表'] && info['列表'].length">
|
||||
<div class="item" v-if="info['列表'].length > 1">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/2.png"
|
||||
alt=""
|
||||
class="top-img"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][1].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][1].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ $formatName(info["列表"][1].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][1].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][1].integral }}</p>
|
||||
</div>
|
||||
<div class="item-top item" v-if="info['列表'].length > 0">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/1.png"
|
||||
alt=""
|
||||
class="top-img-one"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][0].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][0].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ $formatName(info["列表"][0].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][0].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][0].integral }}</p>
|
||||
</div>
|
||||
<div class="item" v-if="info['列表'].length > 2">
|
||||
<img
|
||||
src="https://cdn.cunwuyun.cn/dvcp/credit/3.png"
|
||||
alt=""
|
||||
class="top-img"
|
||||
/>
|
||||
<img
|
||||
:src="info['列表'][2].photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="info['列表'][2].photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4" v-else>
|
||||
{{ $formatName(info["列表"][2].name) }}
|
||||
</div>
|
||||
<p class="user-name mar-b8">
|
||||
{{ info["列表"][2].name }}{{ tabIndex == 0 ? "家" : "" }}
|
||||
</p>
|
||||
<p class="item-num">{{ info["列表"][2].integral }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ranking-list" v-if="info['列表'] && info['列表'].length">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in info['列表']"
|
||||
:key="index"
|
||||
v-if="index > 2"
|
||||
>
|
||||
<span class="item-num">{{ index + 1 }}</span>
|
||||
<img
|
||||
:src="item.photo"
|
||||
alt=""
|
||||
class="user-img mar-b4"
|
||||
v-if="item.photo"
|
||||
/>
|
||||
<div class="user-name-bg mar-b4 mar-r24" v-else>
|
||||
{{ $formatName(item.name) }}
|
||||
</div>
|
||||
<span class="item-name"
|
||||
>{{ item.name }}{{ tabIndex == 0 ? "家" : "" }}</span
|
||||
>
|
||||
<span class="item-point">{{ item.integral }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="detail-content" v-if="showDetail && list.length">
|
||||
<div class="title">积分明细</div>
|
||||
<div class="item" v-for="(item, index) in list" :key="index">
|
||||
<div class="item-info">
|
||||
<p>
|
||||
{{ tabIndex == 0 ? item.residentName + ":" : ""
|
||||
}}{{ item.description }}
|
||||
</p>
|
||||
<span> {{ item.doTime }}</span>
|
||||
</div>
|
||||
<div
|
||||
class="item-num"
|
||||
:class="'color-' + (item.changeIntegral >= 0 ? 0 : 1)"
|
||||
>
|
||||
{{
|
||||
item.changeIntegral > 0
|
||||
? "+" + item.changeIntegral
|
||||
: item.changeIntegral
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppCreditPoints",
|
||||
appName: '积分排行',
|
||||
computed: {
|
||||
...mapState(["user", "token"]),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tabList: ["家庭积分", "个人积分"],
|
||||
tabIndex: 0,
|
||||
showDetail: false, //是否显示积分明细
|
||||
info: {},
|
||||
current: 1,
|
||||
list: [],
|
||||
areaId: "",
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
// if (uni.getStorageSync("areaId")) {
|
||||
// this.areaId = uni.getStorageSync("areaId");
|
||||
// } else {
|
||||
// this.areaId = this.$areaId;
|
||||
// }
|
||||
// if (options.type == "detail") {
|
||||
// this.showDetail = true;
|
||||
// this.getList();
|
||||
// }
|
||||
// uni.setNavigationBarTitle({
|
||||
// title: options.title,
|
||||
// });
|
||||
// this.getInfo();
|
||||
},
|
||||
methods: {
|
||||
tabClick(index) {
|
||||
this.tabIndex = index;
|
||||
this.getInfo();
|
||||
this.getList();
|
||||
},
|
||||
// 积分排行
|
||||
getInfo() {
|
||||
this.info = {};
|
||||
// var url = `/app/appresident/rank?id=00255e188d1225f3fe022cb4eed44a84&type=${this.tabIndex}` //积分排行
|
||||
var url = `/app/appresident/rank?id=${this.user.residentId}&type=${this.tabIndex}&areaId=${this.areaId}`; //积分排行
|
||||
this.$http.post(url).then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.info = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 积分明细列表
|
||||
getList() {
|
||||
// var url = `/app/appvillagerintegraldetail/IntegralList?residentId=00255e188d1225f3fe022cb4eed44a84&type=${this.tabIndex}¤t=${this.current}&size=10` //积分明细
|
||||
var url = `/app/appvillagerintegraldetail/IntegralList?residentId=${this.user.residentId}&type=${this.tabIndex}¤t=${this.current}&size=10`; //积分明细
|
||||
this.$http.post(url).then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (this.current > res.data.pages) {
|
||||
return;
|
||||
}
|
||||
const records =
|
||||
this.current > 1
|
||||
? [...this.list, ...res.data.records]
|
||||
: res.data.records;
|
||||
this.list = records;
|
||||
}
|
||||
});
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.showDetail) return;
|
||||
this.current = this.current + 1;
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.page {
|
||||
width: 100%;
|
||||
background-color: #f3f6f9;
|
||||
.credit-points {
|
||||
.bg-blue {
|
||||
width: 100%;
|
||||
height: 176rpx;
|
||||
background-color: #197df0;
|
||||
}
|
||||
.header-content {
|
||||
width: 690rpx;
|
||||
height: 256rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin: -130rpx 0 40rpx 30rpx;
|
||||
padding: 100rpx 60rpx 40rpx 60rpx;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
.item {
|
||||
text-align: center;
|
||||
z-index: 99;
|
||||
.num {
|
||||
font-family: DIN;
|
||||
font-size: 52rpx;
|
||||
font-weight: bold;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40rpx;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
.color-5AAD6A {
|
||||
color: #5aad6a;
|
||||
}
|
||||
.color-4185F5 {
|
||||
color: #4185f5;
|
||||
}
|
||||
.color-CD413A {
|
||||
color: #cd413a;
|
||||
}
|
||||
}
|
||||
img {
|
||||
position: absolute;
|
||||
width: 360rpx;
|
||||
height: 250rpx;
|
||||
top: -40rpx;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.ranking-content {
|
||||
padding: 94rpx 30rpx 0;
|
||||
background-color: #fff;
|
||||
.item {
|
||||
display: inline-block;
|
||||
width: 216rpx;
|
||||
box-shadow: 0 4rpx 20rpx 0 rgba(0, 0, 0, 0.12);
|
||||
border-radius: 12rpx;
|
||||
padding: 40rpx 0 76rpx 0;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
.user-name {
|
||||
font-size: 30rpx;
|
||||
font-family: PingFang-SC-Medium, PingFang-SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
.item-num {
|
||||
font-size: 46rpx;
|
||||
font-weight: 6000;
|
||||
color: #2c51ce;
|
||||
line-height: 54rpx;
|
||||
}
|
||||
.top-img {
|
||||
width: 100%;
|
||||
height: 34rpx;
|
||||
position: absolute;
|
||||
top: -11rpx;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
.item-top {
|
||||
margin: -46rpx 20rpx 0;
|
||||
.user-img {
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
}
|
||||
.user-name-bg {
|
||||
width: 104rpx;
|
||||
height: 104rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4e8eee;
|
||||
font-size: 28rpx;
|
||||
line-height: 104rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.top-img-one {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
top: -22rpx;
|
||||
left: 0;
|
||||
height: 46rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ranking-list {
|
||||
background-color: #fff;
|
||||
.item {
|
||||
width: 100%;
|
||||
height: 120rpx;
|
||||
line-height: 120rpx;
|
||||
background: #fff;
|
||||
padding: 0 64rpx;
|
||||
box-sizing: border-box;
|
||||
.item-num {
|
||||
display: inline-block;
|
||||
width: 68rpx;
|
||||
color: #858594;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.user-img {
|
||||
margin-right: 24rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.item-name {
|
||||
color: #333;
|
||||
font-size: 30rpx;
|
||||
display: inline-block;
|
||||
width: 240rpx;
|
||||
}
|
||||
.item-point {
|
||||
display: inline-block;
|
||||
width: 210rpx;
|
||||
text-align: right;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
.mar-r24 {
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.user-img {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.user-name-bg {
|
||||
display: inline-block;
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #4e8eee;
|
||||
font-size: 28rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
}
|
||||
.mar-b4 {
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.mar-b8 {
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.detail-content {
|
||||
width: 690rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
margin: 432rpx 0 0 32rpx;
|
||||
padding: 30rpx 30rpx 94rpx;
|
||||
box-sizing: border-box;
|
||||
.title {
|
||||
font-size: 34rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 48rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
.item {
|
||||
padding: 34rpx 0 32rpx 0;
|
||||
border-bottom: 2rpx solid #ddd;
|
||||
display: flex;
|
||||
.item-info {
|
||||
width: 500rpx;
|
||||
p {
|
||||
word-break: break-all;
|
||||
font-size: 32rpx;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
line-height: 44px;
|
||||
}
|
||||
span {
|
||||
display: inline-block;
|
||||
margin-top: 8rpx;
|
||||
font-size: 24px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
font-weight: 400;
|
||||
color: #999;
|
||||
line-height: 34rpx;
|
||||
}
|
||||
}
|
||||
.item-num {
|
||||
width: calc(100% - 500rpx);
|
||||
text-align: right;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.color-0 {
|
||||
color: #2c51ce !important;
|
||||
}
|
||||
.color-1 {
|
||||
color: #e6736e !important;
|
||||
}
|
||||
.fixed-top {
|
||||
z-index: 999;
|
||||
}
|
||||
.header-tab {
|
||||
height: 96rpx;
|
||||
background-color: #4181FF;
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-tab .tab-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.header-tab .tab-active {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.header-tab .active-line {
|
||||
position: absolute;
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
background: #FFF;
|
||||
top: 48rpx;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
BIN
src/apps/AppCreditPoints/component/img/line.png
Normal file
BIN
src/apps/AppCreditPoints/component/img/line.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 700 B |
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- $dict.getDict('yesOrNo') -->
|
||||
<!-- $dict.getDict('yesOrNo') -->
|
||||
<u-select v-model="showType" :list="typeList" label-name="dictName" value-name="dictValue"
|
||||
@confirm="confirmTypeSelect"/>
|
||||
</div>
|
||||
|
||||
@@ -1,26 +1,72 @@
|
||||
<template>
|
||||
<div class="detail">
|
||||
<div class="detail-list">
|
||||
<div>
|
||||
<div>申请人:<div>李毅</div></div>
|
||||
<div>新冠疫苗接种</div>
|
||||
<div class="detail-info">
|
||||
<div class="detail-name">申请人:<span>李毅</span></div>
|
||||
<div class="detail-type">新冠疫苗接种</div>
|
||||
</div>
|
||||
<div>
|
||||
<div>2020-05-06 13:45</div>
|
||||
<div>
|
||||
<img src="" alt="">
|
||||
<div class="detail-area">
|
||||
<div class="time">2020-05-06 13:45</div>
|
||||
<div class="address">
|
||||
<img src="" alt="" class="addr-img">
|
||||
<div>新港镇三联村</div>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="detail-text">
|
||||
经村两委及村篮球队青年商讨决定,我村赴黎平参加百村杯篮球赛经费分两阶段分发,第一阶段为小组循环赛,第二阶段为淘汰赛。
|
||||
第一阶段费用预计一万元整,其中包括队员球服两套,住宿、饮食
|
||||
</div>
|
||||
<div>
|
||||
<div class="detail-img">
|
||||
<img :src="item.url" alt="" v-for="(item, i) in data.files" :key="i" @click="previewImage(data.files, item.url)" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 审核通过、不通过 -->
|
||||
<div class="integral">
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 只读通过、不通过 -->
|
||||
<div class="readOnly">
|
||||
<div class="item">
|
||||
<div>积分审核</div>
|
||||
<div>通过</div>
|
||||
</div>
|
||||
<!-- 通过 -->
|
||||
<div v-if="nopass === 0">
|
||||
<div class="item">
|
||||
<div>积分类别</div>
|
||||
<div>乡村建设类</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>积分事项</div>
|
||||
<div>多字段显示</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>积分方式</div>
|
||||
<div>+20</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 不通过 -->
|
||||
<div v-else>
|
||||
<div class="item nopass">
|
||||
<div>不通过的理由</div>
|
||||
<div class="textarea">我村赴黎平参加百村杯篮球赛经费分两阶段分发, 第一阶段为小组循环赛,第二阶段为淘汰赛。第一 其中包括队员球服两套,住宿、饮食</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div>审核人</div>
|
||||
<div>李维民</div>
|
||||
</div>
|
||||
<div class="item last">
|
||||
<div>审核时间</div>
|
||||
<div>2022-02-18 18:16:27</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style="height: 56px"></div>
|
||||
<div class="saveBtn">保存</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -30,8 +76,9 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
data: {
|
||||
files: []
|
||||
}
|
||||
files: [],
|
||||
},
|
||||
nopass: 1
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -50,13 +97,115 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
.detail {
|
||||
|
||||
img {
|
||||
.detail-list {
|
||||
padding: 20px 30px;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
margin-bottom: 16px;
|
||||
|
||||
.detail-info {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
.detail-name {
|
||||
font-size: 30px;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.detail-type {
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
color: #135AB8;
|
||||
font-size: 24px;
|
||||
background-color: #e6edf7;
|
||||
padding: 0 25px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.detail-area {
|
||||
display: flex;
|
||||
color: #999999;
|
||||
font-size: 22px;
|
||||
margin-top: 15px;
|
||||
|
||||
.address {
|
||||
display: flex;
|
||||
margin-left: 30px;
|
||||
|
||||
.addr-img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-text {
|
||||
color: #333333;
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
.detail-img {
|
||||
|
||||
img {
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
img:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
img:nth-child(3n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.integral {}
|
||||
|
||||
.readOnly {
|
||||
padding: 20px 30px;
|
||||
box-sizing: border-box;
|
||||
background-color: #FFFFFF;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 30px 0;
|
||||
font-size: 32px;
|
||||
color: #333333;
|
||||
border-bottom: 1px solid #D8DDE6;
|
||||
|
||||
.textarea {
|
||||
margin-top: 30px;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.nopass {
|
||||
flex-direction: column;
|
||||
border-bottom: 1px solid #D8DDE6;
|
||||
}
|
||||
|
||||
.last {
|
||||
border-bottom: none;
|
||||
}
|
||||
// .item:nth-last-child(1) {
|
||||
// border-bottom: none;
|
||||
// }
|
||||
}
|
||||
|
||||
.saveBtn {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
height: 112px;
|
||||
width: 100%;
|
||||
line-height: 112px;
|
||||
background-color: #3975C6;
|
||||
font-size: 32px;
|
||||
color: #FFFFFF;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
509
src/apps/AppSuperMarket/AppSuperMarket.vue
Normal file
509
src/apps/AppSuperMarket/AppSuperMarket.vue
Normal file
@@ -0,0 +1,509 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<div class="supermarket">
|
||||
<div
|
||||
class="fixed-top title"
|
||||
@click="$linkTo(`./system?areaName=${areaName}`)"
|
||||
v-if="propAreaId == '341021104000'"
|
||||
>
|
||||
{{ areaName }}信用好超市管理制度,点击查看 >>
|
||||
</div>
|
||||
<div
|
||||
class="goods-list"
|
||||
v-if="numList.length"
|
||||
:style="
|
||||
propAreaId == '341021104000'
|
||||
? 'padding-top: 80rpx;'
|
||||
: 'padding-top: 0;'
|
||||
"
|
||||
>
|
||||
<div class="left">
|
||||
<div
|
||||
:class="numIndex == index ? 'item active' : 'item'"
|
||||
v-for="(item, index) in numList"
|
||||
:key="index"
|
||||
@click="numClick(index)"
|
||||
>
|
||||
<i v-show="item.total > 0">{{ item.total }}</i>
|
||||
{{ item.type }}分区
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(item, index) in goodsList[numIndex]"
|
||||
:key="index"
|
||||
>
|
||||
<img :src="item.photo[0].url" alt="" />
|
||||
<div class="item-info">
|
||||
<p class="item-name">{{ item.merchandiseName }}</p>
|
||||
<div class="item-point">
|
||||
<span class="num">{{ item.costIntegral }}</span
|
||||
>积分
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
<div></div>
|
||||
<div class="item-bottom__right">
|
||||
<image
|
||||
v-show="item.num > 0"
|
||||
@click="cut(numIndex, index)"
|
||||
src="/static/img/cut.png"
|
||||
/>
|
||||
<input v-show="item.num > 0" v-model="item.num" />
|
||||
<image
|
||||
src="/static/img/add.png"
|
||||
@click="add(numIndex, index)"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty v-else />
|
||||
<div class="goods-footer" v-if="numList.length">
|
||||
<div class="goods-footer__top">
|
||||
<h2>
|
||||
{{ userInfo.familyName || user.nickName
|
||||
}}{{ userInfo.familyName ? "家" : "" }}
|
||||
</h2>
|
||||
<span>剩余积分:{{ userInfo.familyIntegral || 0 }}分</span>
|
||||
</div>
|
||||
<div class="goods-footer__bottom">
|
||||
<div class="goods-footer__bottom__left">
|
||||
<h3>共{{ total }}件商品</h3>
|
||||
<div class="goods-footer__bottom--middle">
|
||||
<span>合计 :</span>
|
||||
<i>{{ money }}</i>
|
||||
<em>积分</em>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="goods-footer__bottom--btn"
|
||||
@click="toOrder"
|
||||
hover-class="text-hover"
|
||||
>
|
||||
去结算
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
|
||||
export default {
|
||||
name: "AppSuperMarket",
|
||||
appName: '信用好超市',
|
||||
data() {
|
||||
return {
|
||||
numList: [],
|
||||
numIndex: 0,
|
||||
goodsList: [],
|
||||
areaId: "",
|
||||
userInfo: {},
|
||||
areaName: "",
|
||||
propAreaId: "",
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapState(["global", "user", "token"]),
|
||||
|
||||
total() {
|
||||
let total = 0;
|
||||
if (!this.numList.length) {
|
||||
return total;
|
||||
}
|
||||
|
||||
this.numList.forEach((item) => {
|
||||
total = item.total + total;
|
||||
});
|
||||
|
||||
return total;
|
||||
},
|
||||
|
||||
money() {
|
||||
let money = 0;
|
||||
if (!this.goodsList.length) {
|
||||
return money;
|
||||
}
|
||||
|
||||
this.goodsList.forEach((arr) => {
|
||||
arr.forEach((item) => {
|
||||
money = money + Number(item.num) * item.costIntegral;
|
||||
});
|
||||
});
|
||||
|
||||
return money;
|
||||
},
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.propAreaId = this.$areaId;
|
||||
uni.$on("update", () => {
|
||||
this.getInfo();
|
||||
});
|
||||
|
||||
if (uni.getStorageSync("areaId")) {
|
||||
this.areaId = uni.getStorageSync("areaId");
|
||||
}
|
||||
this.getUserInfo();
|
||||
this.getInfo();
|
||||
},
|
||||
onShow() {
|
||||
this.getUserInfo();
|
||||
},
|
||||
methods: {
|
||||
getInfo() {
|
||||
this.$http
|
||||
.post(`/admin/area/queryAreaByAreaid?id=${this.areaId}`, null, {})
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (res.data) {
|
||||
this.areaName = res.data.name;
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
getUserInfo() {
|
||||
this.$http
|
||||
.post(
|
||||
`/app/appresident/queryFamilyById?id=${this.user.residentId}`,
|
||||
null,
|
||||
{}
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
this.userInfo = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
toOrder() {
|
||||
if (this.user.status == 0) {
|
||||
if (!this.user.phone) {
|
||||
return this.$linkTo("/pages/phone/bingPhoneNumber?from=auth");
|
||||
} else {
|
||||
return this.$linkTo("/pages/auth/authenticationInfo");
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.total) {
|
||||
return this.$toast("请选择商品");
|
||||
}
|
||||
|
||||
if (this.money > this.userInfo.familyIntegral) {
|
||||
return this.$toast("积分不足");
|
||||
}
|
||||
|
||||
let goods = [];
|
||||
|
||||
this.goodsList.forEach((arr) => {
|
||||
arr.forEach((item) => {
|
||||
if (item.num) {
|
||||
goods.push(item);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
this.$linkTo(
|
||||
`/subPages/creditPoints/submitOrder?familyId=${
|
||||
this.userInfo.familyId
|
||||
}&userName=${this.userInfo.familyName}&memberId=${
|
||||
this.userInfo.memberId
|
||||
}&goods=${JSON.stringify(goods)}&total=${this.total}&money=${
|
||||
this.money
|
||||
}&familyIntegral=${this.userInfo.familyIntegral}`
|
||||
);
|
||||
},
|
||||
|
||||
getList() {
|
||||
this.$http
|
||||
.post(
|
||||
`/app/appvillagerintegralmerchandise/listByIntegral?areaId=${this.areaId}`,
|
||||
null,
|
||||
{}
|
||||
)
|
||||
.then((res) => {
|
||||
if (res.code === 0) {
|
||||
if (res.data) {
|
||||
this.numList = Object.keys(res.data).map((item) => {
|
||||
return {
|
||||
type: item,
|
||||
total: 0,
|
||||
};
|
||||
});
|
||||
this.goodsList = Object.values(res.data).map((item) => {
|
||||
item.map((items) => {
|
||||
items.num = 0;
|
||||
items.photo = JSON.parse(items.photo);
|
||||
|
||||
return items;
|
||||
});
|
||||
|
||||
return item;
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
add(index, i) {
|
||||
this.$set(
|
||||
this.goodsList[index][i],
|
||||
"num",
|
||||
Number(this.goodsList[index][i].num) + 1
|
||||
);
|
||||
|
||||
let total = 0;
|
||||
this.goodsList[index].forEach((item) => {
|
||||
total = total + item.num;
|
||||
});
|
||||
|
||||
this.$set(this.numList[index], "total", total);
|
||||
},
|
||||
|
||||
cut(index, i) {
|
||||
this.$set(
|
||||
this.goodsList[index][i],
|
||||
"num",
|
||||
Number(this.goodsList[index][i].num) - 1
|
||||
);
|
||||
|
||||
let total = 0;
|
||||
this.goodsList[index].forEach((item) => {
|
||||
total = total + item.num;
|
||||
});
|
||||
|
||||
this.$set(this.numList[index], "total", total);
|
||||
},
|
||||
|
||||
numClick(index) {
|
||||
this.numIndex = index;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 28rpx;
|
||||
|
||||
.item-bottom__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 60rpx;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 27rpx;
|
||||
height: 27rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 90rpx;
|
||||
height: 60rpx;
|
||||
padding: 0 20rpx;
|
||||
margin: 0 10rpx;
|
||||
background: #f6f6f6;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.goods-footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 111;
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
|
||||
.goods-footer__top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 80rpx;
|
||||
padding: 0 30rpx;
|
||||
background: #eff4ff;
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.goods-footer__bottom--btn {
|
||||
width: 212rpx;
|
||||
height: 104rpx;
|
||||
line-height: 104rpx;
|
||||
font-size: 36rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: #197df0;
|
||||
}
|
||||
|
||||
.goods-footer__bottom__left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
padding: 0 32rpx;
|
||||
|
||||
h3 {
|
||||
color: #f94246;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.goods-footer__bottom--middle {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
span {
|
||||
color: #f94246;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
i {
|
||||
position: relative;
|
||||
top: 2rpx;
|
||||
margin-right: 12px;
|
||||
color: #fa444b;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
em {
|
||||
color: #f94246;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-footer__bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 104rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.page {
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
.supermarket {
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
background: #eff4ff;
|
||||
padding-left: 30rpx;
|
||||
color: #3a7ee2;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.goods-list {
|
||||
// padding-top: 80rpx;
|
||||
padding-bottom: 184px;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
overflow-y: hidden;
|
||||
.left {
|
||||
width: 168rpx;
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
float: left;
|
||||
background: #faf9fb;
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 104rpx;
|
||||
line-height: 1.1;
|
||||
border-bottom: 2rpx solid #d8e5ff;
|
||||
text-align: center;
|
||||
color: #333;
|
||||
font-size: 28rpx;
|
||||
border-left: 6rpx solid #faf9fb;
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
right: 8rpx;
|
||||
top: 8rpx;
|
||||
height: 28rpx;
|
||||
line-height: 28rpx;
|
||||
padding: 0 12rpx;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
border-radius: 13rpx;
|
||||
background: #fb4e44;
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
border-left: 6rpx solid #1d58fe;
|
||||
background: linear-gradient(
|
||||
270deg,
|
||||
#ffffff 0%,
|
||||
#ffffff 77%,
|
||||
#e7eafa 100%
|
||||
);
|
||||
}
|
||||
}
|
||||
.right {
|
||||
float: left;
|
||||
width: calc(100% - 168rpx);
|
||||
height: 100%;
|
||||
overflow-y: scroll;
|
||||
.item {
|
||||
width: 100%;
|
||||
padding: 28rpx 30rpx 44rpx;
|
||||
box-sizing: border-box;
|
||||
img {
|
||||
width: 192rpx;
|
||||
height: 192rpx;
|
||||
border: 2rpx solid #d7d5d5;
|
||||
}
|
||||
.item-info {
|
||||
display: inline-block;
|
||||
width: 276rpx;
|
||||
padding-left: 30rpx;
|
||||
vertical-align: top;
|
||||
.item-name {
|
||||
width: 100%;
|
||||
word-break: break-all;
|
||||
line-height: 42rpx;
|
||||
margin-bottom: 30rpx;
|
||||
font-size: 30rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
}
|
||||
.item-point {
|
||||
color: #fa4a51;
|
||||
font-size: 24rpx;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #fa4a51;
|
||||
line-height: 34rpx;
|
||||
.num {
|
||||
font-size: 40rpx;
|
||||
font-family: PingFangSC-Semibold, PingFang SC;
|
||||
font-weight: 600;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
68
src/apps/AppSuperMarket/Search.vue
Normal file
68
src/apps/AppSuperMarket/Search.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="Search">
|
||||
<AiTopFixed>
|
||||
<u-search placeholder="请输入标题" :show-action="false" search-icon-color="#ccc" v-model="search.title" @search="search.current = 1, getList()"/>
|
||||
</AiTopFixed>
|
||||
<p class="text">请通过搜索“<span>手机号或身份证号</span>”后选择结算对象</p>
|
||||
<div class="family-list">
|
||||
<div class="item">
|
||||
<div class="name">卓作旺家</div>
|
||||
<div class="num">剩余积分:480分</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Search',
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
title: '',
|
||||
current: 1
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
getList() {
|
||||
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
uni-page-body{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.Search {
|
||||
::v-deep .u-search{
|
||||
margin-bottom: 0!important;
|
||||
}
|
||||
.text{
|
||||
font-size: 28px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #999;
|
||||
line-height: 40px;
|
||||
margin-top: 120px;
|
||||
text-align: center;
|
||||
span{
|
||||
color: #135AB8;
|
||||
}
|
||||
}
|
||||
.item{
|
||||
line-height: 44px;
|
||||
padding: 34px 56px;
|
||||
background: #FFF;
|
||||
border-bottom: 1px solid #D8DDE6;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Regular, PingFang SC;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
244
src/apps/AppSuperMarket/SubmitOrder.vue
Normal file
244
src/apps/AppSuperMarket/SubmitOrder.vue
Normal file
@@ -0,0 +1,244 @@
|
||||
<template>
|
||||
<div class="order">
|
||||
<div class="order-info">
|
||||
<h2>{{ userName }}家</h2>
|
||||
<span>剩余积分:{{ familyIntegral }}分</span>
|
||||
</div>
|
||||
<image class="line" src="/static/img/line.png" />
|
||||
<div class="order-list">
|
||||
<div class="order-item" v-for="(item, index) in goods" :key="index">
|
||||
<image :src="item.photo[0].url" />
|
||||
<div class="order-item__right flex1">
|
||||
<h2>{{ item.merchandiseName }}</h2>
|
||||
<div class="order-item__right--info">
|
||||
<span>{{ item.costIntegral }}</span>
|
||||
<i>积分</i>
|
||||
</div>
|
||||
<div class="item-bottom">
|
||||
<div></div>
|
||||
<div class="item-bottom__right">
|
||||
<span>x {{ item.num }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-footer">
|
||||
<div class="goods-footer__bottom">
|
||||
<div class="goods-footer__bottom__left">
|
||||
<h3>共{{ total }}件商品</h3>
|
||||
<div class="goods-footer__bottom--middle">
|
||||
<span>合计 :</span>
|
||||
<i>{{ money }}</i>
|
||||
<em>积分</em>
|
||||
</div>
|
||||
</div>
|
||||
<div class="goods-footer__bottom--btn" @click="submit" hover-class="text-hover">确认提交</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
total: 0,
|
||||
money: 0,
|
||||
goods: [],
|
||||
memberId: '',
|
||||
userName: '',
|
||||
familyId: '',
|
||||
familyIntegral: 0
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.userName = query.userName
|
||||
this.total = query.total
|
||||
this.familyIntegral = query.familyIntegral
|
||||
this.money = query.money
|
||||
this.memberId = query.memberId
|
||||
this.familyId = query.familyId
|
||||
this.goods = JSON.parse(query.goods)
|
||||
},
|
||||
|
||||
methods: {
|
||||
submit () {
|
||||
this.$loading()
|
||||
this.$http.post(`/app/appvillagerintegralshoporder/createOrderForWx`, {
|
||||
memberId: this.memberId,
|
||||
familyId: this.familyId,
|
||||
orderIntegral: this.money,
|
||||
shopId: this.goods[0].shopId,
|
||||
merchandiseList: this.goods.map(item => {
|
||||
return {
|
||||
merchandiseId: item.id,
|
||||
merchandiseNumber: item.num
|
||||
}
|
||||
})
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
uni.$emit('update')
|
||||
this.$linkTo('/subPages/creditPoints/result?type=0')
|
||||
} else {
|
||||
this.$linkTo('/subPages/creditPoints/result?type=1')
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.order {
|
||||
min-height: 100%;
|
||||
background: #fff;
|
||||
|
||||
.line {
|
||||
width: 100%;
|
||||
height: 8rpx;
|
||||
}
|
||||
|
||||
.order-item {
|
||||
display: flex;
|
||||
padding: 28rpx 30rpx 44rpx;
|
||||
|
||||
.order-item__right--info {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
span {
|
||||
margin-right: 8rpx;
|
||||
color: #FA4A51;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
i {
|
||||
color: #FA4A51;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: 2rpx;
|
||||
margin-bottom: 30rpx;
|
||||
color: #333333;
|
||||
font-size: 30rpx;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
& > image {
|
||||
width: 192rpx;
|
||||
height: 192rpx;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-list {
|
||||
margin-top: 20rpx;
|
||||
padding-bottom: 110rpx;
|
||||
}
|
||||
|
||||
.order-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 128rpx;
|
||||
padding: 0 30rpx;
|
||||
color: #333333;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.goods-footer {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
box-shadow: 0px -1px 4px 0px rgba(214, 214, 214, 0.5);
|
||||
background: #fff;
|
||||
|
||||
.goods-footer__bottom--btn {
|
||||
width: 212rpx;
|
||||
height: 104rpx;
|
||||
line-height: 104rpx;
|
||||
font-size: 36rpx;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
background: #197DF0;
|
||||
}
|
||||
|
||||
.goods-footer__bottom__left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
padding: 0 32rpx;
|
||||
|
||||
h3 {
|
||||
color: #F94246;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.goods-footer__bottom--middle {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
|
||||
span {
|
||||
color: #F94246;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
i {
|
||||
position: relative;
|
||||
top: 2rpx;
|
||||
margin-right: 6px;
|
||||
color: #FA444B;
|
||||
font-size: 40rpx;
|
||||
}
|
||||
|
||||
em {
|
||||
color: #F94246;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods-footer__bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 104rpx;
|
||||
}
|
||||
}
|
||||
.item-bottom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 28rpx;
|
||||
|
||||
.item-bottom__right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 90rpx;
|
||||
height: 60rpx;
|
||||
padding: 0 20rpx;
|
||||
margin: 0 10rpx;
|
||||
background: #F6F6F6;
|
||||
border-radius: 10rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
68
src/apps/AppSuperMarket/Success.vue
Normal file
68
src/apps/AppSuperMarket/Success.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<div class="success">
|
||||
<img src="./components/img/success.png" alt="" v-if="status">
|
||||
<img src="./components/img/fail.png" alt="" v-else>
|
||||
<p>{{status ? '上报成功!' : '上报失败!'}}</p>
|
||||
<div class="footer" @click="back">{{status ? '确定' : '我知道了'}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
status: 1
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '健康上报'
|
||||
},
|
||||
onLoad(option) {
|
||||
this.status = option.status
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack()
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
uni-page-body{
|
||||
height: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
.success {
|
||||
text-align: center;
|
||||
img{
|
||||
width: 192px;
|
||||
height: 192px;
|
||||
margin: 96px 0 16px 0;
|
||||
}
|
||||
p{
|
||||
line-height: 50px;
|
||||
color: #333;
|
||||
font-size: 36px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
margin-bottom: 72px;
|
||||
}
|
||||
.footer{
|
||||
width: calc(100% - 96px);
|
||||
height: 88px;
|
||||
line-height: 88px;
|
||||
background: #1365DD;
|
||||
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
|
||||
font-size: 32px;
|
||||
font-family: PingFangSC-Medium, PingFang SC;
|
||||
font-weight: 500;
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
border-radius: 8px;
|
||||
margin-left: 48px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
BIN
src/apps/AppSuperMarket/components/img/fail.png
Normal file
BIN
src/apps/AppSuperMarket/components/img/fail.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
src/apps/AppSuperMarket/components/img/success.png
Normal file
BIN
src/apps/AppSuperMarket/components/img/success.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
Reference in New Issue
Block a user