Commit b9408f48 authored by 罗超's avatar 罗超

1

parent f589bd63
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
:current="current" :current="current"
@change="change" @change="change"
:active-color="mainColor" :active-color="mainColor"
bar-height='4' bar-height="4"
height="100" height="100"
:show-bar="showBar"
></u-tabs> ></u-tabs>
<u-empty v-if="g.length == 0" text="暂无相关卡券" mode="order"></u-empty> <u-empty v-if="g.length == 0" text="暂无相关卡券" mode="order"></u-empty>
<view <view
...@@ -39,38 +39,37 @@ ...@@ -39,38 +39,37 @@
>没有更多卡券了</u-divider >没有更多卡券了</u-divider
> >
</scroll-view> </scroll-view>
</view> </view>
<!-- 加载中 --> <!-- 加载中 -->
<view class="loading" v-if="loading"> <view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading> <u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text> <Text style="color: #fff; margin-top: 10rpx">加载中...</Text>
</view> </view>
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="goback"
></auth>
</view> </view>
</template> </template>
<script> <script>
import error from '../../../components/error/error.vue'; import error from "../../../components/error/error.vue";
import auth from "../../../components/auth/index.vue"; import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
error, error,
auth auth,
}, },
data() { data() {
return { return {
pageTitle: "我的卡券", pageTitle: "我的卡券",
current: 0, current: 0,
showAuth: false, showAuth: false,
list: [ list: [{ name: "未使用" }, { name: "已使用" }, { name: "已过期" }],
{ name: "未使用" },
{ name: "已使用" },
{ name: "已过期" },
],
mainColor: "", mainColor: "",
contentHeight: 0, contentHeight: 0,
page: 1, page: 1,
...@@ -81,7 +80,8 @@ export default { ...@@ -81,7 +80,8 @@ export default {
item: "", item: "",
index: 0, index: 0,
isover: false, isover: false,
u:{}, u: {},
showBar: true,
}; };
}, },
created() { created() {
...@@ -91,13 +91,16 @@ export default { ...@@ -91,13 +91,16 @@ export default {
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: "未登录", nickName: "未登录",
avatarUrl: "" avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else{ } else {
this.loading = true; this.loading = true;
this.init(); this.init();
} }
// #ifdef MP-ALIPAY
this.showBar = false;
// #endif
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
...@@ -116,7 +119,6 @@ export default { ...@@ -116,7 +119,6 @@ export default {
}, },
methods: { methods: {
change(index) { change(index) {
this.current = index; this.current = index;
this.page = 1; this.page = 1;
this.g = []; this.g = [];
...@@ -142,8 +144,8 @@ export default { ...@@ -142,8 +144,8 @@ export default {
this.loading = true; this.loading = true;
this.init(); this.init();
}, },
goback(){ goback() {
uni.navigateBack() uni.navigateBack();
}, },
}, },
}; };
...@@ -171,5 +173,4 @@ export default { ...@@ -171,5 +173,4 @@ export default {
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
</style> </style>
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
:current="msg.UseState" :current="msg.UseState"
@change="change" @change="change"
:active-color="mainColor" :active-color="mainColor"
:show-bar="showBar"
height="100" height="100"
></u-tabs> ></u-tabs>
<u-empty v-if="g.length == 0" text="暂无相关优惠券" mode="coupon"></u-empty> <u-empty v-if="g.length == 0" text="暂无相关优惠券" mode="coupon"></u-empty>
...@@ -28,32 +29,53 @@ ...@@ -28,32 +29,53 @@
> >
<view class="couponList"> <view class="couponList">
<view class="item" v-for="(x, i) in g" :key="i" @click="godetails(x)"> <view class="item" v-for="(x, i) in g" :key="i" @click="godetails(x)">
<view :class="msg.UseState==0? 'ticket':'ticket2'"> <view :class="msg.UseState == 0 ? 'ticket' : 'ticket2'">
<view class="miane"> <view class="miane">
<view class="money"> <view class="money">
<!-- <text style="font-size: 44px;">{{x.sub_price.toString().split('.')[0]}}</text> <!-- <text style="font-size: 44px;">{{x.sub_price.toString().split('.')[0]}}</text>
<text v-if="x.coupon.type==1"></text> --> <text v-if="x.coupon.type==1"></text> -->
<text class="small" v-if="x.CouponType==1"></text> <text class="small" v-if="x.CouponType == 1"></text>
<Text style='font-size: 44px;'>{{ Number(x.DiscountsPrice) }} </Text> <Text style="font-size: 44px"
<Text class="small">{{x.CouponType==2?'折':""}}</Text> >{{ Number(x.DiscountsPrice) }}
</Text>
<Text class="small">{{ x.CouponType == 2 ? "折" : "" }}</Text>
</view> </view>
<view class="tiaojian">{{Number(x.MinConsumePrice)}}元可用</view> <view class="tiaojian"
>{{ Number(x.MinConsumePrice) }}元可用</view
>
</view> </view>
<view style='width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;top:-5px'></view> <view
<view style='width: 10px;height: 10px;border-radius: 5px;background: #f3f4f6;position: absolute;right: -5px;bottom:-5px'></view> style="
width: 10px;
height: 10px;
border-radius: 5px;
background: #f3f4f6;
position: absolute;
right: -5px;
top: -5px;
"
></view>
<view
style="
width: 10px;
height: 10px;
border-radius: 5px;
background: #f3f4f6;
position: absolute;
right: -5px;
bottom: -5px;
"
></view>
</view> </view>
<view class="detail"> <view class="detail">
<view class="coupond"> <view class="coupond">
<view class="name">{{x.Name}}</view> <view class="name">{{ x.Name }}</view>
<view class="date">{{x.StartDate+"-"+x.EndDate}}</view> <view class="date">{{ x.StartDate + "-" + x.EndDate }}</view>
<Text class="rule" v-if='x.UseTypeStr==1'>限商品类别</Text> <Text class="rule" v-if="x.UseTypeStr == 1">限商品类别</Text>
<Text class="rule" v-if='x.UseTypeStr==2'>限商品</Text> <Text class="rule" v-if="x.UseTypeStr == 2">限商品</Text>
<Text class="rule" v-if='x.UseTypeStr==3'>全场通用</Text> <Text class="rule" v-if="x.UseTypeStr == 3">全场通用</Text>
<Text class="rule" v-if='x.UseTypeStr==4'>当面付</Text> <Text class="rule" v-if="x.UseTypeStr == 4">当面付</Text>
</view> </view>
</view> </view>
</view> </view>
...@@ -69,17 +91,34 @@ ...@@ -69,17 +91,34 @@
/> />
</scroll-view> </scroll-view>
</view> </view>
<view style="width: 100%;height: 50px;background: #FFFFFF;display: flex;align-items: center;justify-content: center;position: absolute;left: 0;bottom: 0;" @click="goUrl"> <view
style="
width: 100%;
height: 50px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
left: 0;
bottom: 0;
"
@click="goUrl"
>
<Text>去领券</Text> <Text>去领券</Text>
</view> </view>
<!-- 加载中 --> <!-- 加载中 -->
<view class="loading" v-if="loading"> <view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading> <u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text> <Text style="color: #fff; margin-top: 10rpx">加载中...</Text>
</view> </view>
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view> </view>
</template> </template>
...@@ -87,25 +126,21 @@ ...@@ -87,25 +126,21 @@
import auth from "../../../components/auth/index.vue"; import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
auth auth,
}, },
data() { data() {
return { return {
pageTitle: "我的优惠券", pageTitle: "我的优惠券",
showAuth:false, showAuth: false,
U:{}, U: {},
list: [ list: [{ name: "未使用" }, { name: "已使用" }, { name: "已过期" }],
{ name: "未使用" },
{ name: "已使用" },
{ name: "已过期" },
],
mainColor: "", mainColor: "",
contentHeight: 0, contentHeight: 0,
msg:{ msg: {
pageIndex: 1, pageIndex: 1,
pageSize:10, pageSize: 10,
UseState:0 UseState: 0,
}, },
page_count: 1, page_count: 1,
g: [], g: [],
...@@ -116,11 +151,15 @@ export default { ...@@ -116,11 +151,15 @@ export default {
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
showBar: true,
}; };
}, },
created() { created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px"; this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
// #ifdef MP-ALIPAY
this.showBar = false;
// #endif
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
...@@ -142,16 +181,15 @@ export default { ...@@ -142,16 +181,15 @@ export default {
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: "未登录", nickName: "未登录",
avatarUrl: "" avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else{ } else {
this.init(); this.init();
} }
}, },
methods: { methods: {
change(index) { change(index) {
this.msg.UseState = index; this.msg.UseState = index;
this.msg.pageIndex = 1; this.msg.pageIndex = 1;
this.g = []; this.g = [];
...@@ -159,16 +197,13 @@ export default { ...@@ -159,16 +197,13 @@ export default {
this.init(); this.init();
}, },
init() { init() {
this.request2( this.request2(
{ {
url: '/api/AppletUser/GetMemberCouponPageList', url: "/api/AppletUser/GetMemberCouponPageList",
data: this.msg data: this.msg,
}, },
res => { (res) => {
if (res.resultCode == 1) {
if(res.resultCode==1){
this.loading = false; this.loading = false;
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
...@@ -186,7 +221,6 @@ export default { ...@@ -186,7 +221,6 @@ export default {
this.status = "loading"; this.status = "loading";
this.init(); this.init();
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
}, },
...@@ -196,22 +230,24 @@ export default { ...@@ -196,22 +230,24 @@ export default {
this.init(); this.init();
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth(){ gbAuth() {
uni.navigateBack() uni.navigateBack();
}, },
godetails(item){ godetails(item) {
if(this.msg.UseState ==0){ if (this.msg.UseState == 0) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/coupon/details/details?item=" + encodeURIComponent(JSON.stringify(item))+'&type=1' url:
"/pages/coupon/details/details?item=" +
encodeURIComponent(JSON.stringify(item)) +
"&type=1",
}); });
} }
}, },
goUrl(){ goUrl() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/coupon/list/list" url: "/pages/coupon/list/list",
}); });
} },
}, },
}; };
</script> </script>
...@@ -239,21 +275,21 @@ export default { ...@@ -239,21 +275,21 @@ export default {
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
.couponStyle .couponList{ .couponStyle .couponList {
width: 100%; width: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.couponStyle .couponitem{ .couponStyle .couponitem {
width: 94% ; width: 94%;
display: flex; display: flex;
align-items: center; align-items: center;
height: 180rpx; height: 180rpx;
background: #F2EBE4; background: #f2ebe4;
margin-top: 20rpx; margin-top: 20rpx;
} }
.couponStyle .couponitem .couponitem_l{ .couponStyle .couponitem .couponitem_l {
width: 180rpx; width: 180rpx;
height: 180rpx; height: 180rpx;
display: flex; display: flex;
...@@ -262,9 +298,8 @@ export default { ...@@ -262,9 +298,8 @@ export default {
justify-content: space-around; justify-content: space-around;
padding: 20rpx; padding: 20rpx;
color: #fff; color: #fff;
} }
.couponStyle .couponitem .couponitem_r{ .couponStyle .couponitem .couponitem_r {
width: calc(100vw - 220rpx); width: calc(100vw - 220rpx);
height: 180rpx; height: 180rpx;
display: flex; display: flex;
...@@ -297,7 +332,7 @@ export default { ...@@ -297,7 +332,7 @@ export default {
} }
.couponStyle .item .ticket2 { .couponStyle .item .ticket2 {
position: relative; position: relative;
background: #C3C3C3; background: #c3c3c3;
width: 125px; width: 125px;
height: 100px; height: 100px;
display: flex; display: flex;
...@@ -326,10 +361,9 @@ export default { ...@@ -326,10 +361,9 @@ export default {
background: #fff; background: #fff;
padding: 10px; padding: 10px;
display: flex; display: flex;
} }
.couponStyle .item .detail .coupond { .couponStyle .item .detail .coupond {
flex:1; flex: 1;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
...@@ -340,19 +374,17 @@ export default { ...@@ -340,19 +374,17 @@ export default {
color: #000; color: #000;
} }
.couponStyle .item .detail .coupond .date { .couponStyle .item .detail .coupond .date {
font-family: '23'; font-family: "23";
margin-top: 5px; margin-top: 5px;
font-size: 12px; font-size: 12px;
color: #777; color: #777;
} }
.couponStyle .item .detail .coupond .rule{ .couponStyle .item .detail .coupond .rule {
font-size: 12px; font-size: 12px;
color:#777; color: #777;
margin-top:5 px; margin-top: 5 px;
} }
.couponStyle .item .detail .chosen { .couponStyle .item .detail .chosen {
width: 20px; width: 20px;
} }
</style> </style>
<style> <style>
.order_Content { .order_Content {
width: 100%; width: 100%;
} }
.order_Inner { .order_Inner {
width: 100%; width: 100%;
padding: 20px; padding: 20px;
margin-bottom: 10px; margin-bottom: 10px;
background-color: #fff; background-color: #fff;
} }
.order_NContent { .order_NContent {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
font-size: 13px; font-size: 13px;
color: #121212; color: #121212;
} }
.order_Status { .order_Status {
color: #FF4048; color: #ff4048;
color: 12px; color: 12px;
} }
.order_Car { .order_Car {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 15px; margin-top: 15px;
} }
.order_Price { .order_Price {
color: #121212; color: #121212;
font-size: 15px; font-size: 15px;
} }
.order_carImg image { .order_carImg image {
width: 200rpx; width: 200rpx;
height: 130rpx; height: 130rpx;
} }
.order_middle { .order_middle {
font-size: 13px; font-size: 13px;
color: #121212; color: #121212;
width: 53%; width: 53%;
} }
.order_carName { .order_carName {
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
margin-bottom: 5px; margin-bottom: 5px;
...@@ -54,12 +54,12 @@ ...@@ -54,12 +54,12 @@
text-overflow: ellipsis; text-overflow: ellipsis;
font-weight: bold; font-weight: bold;
width: 100%; width: 100%;
} }
.order_guidIndfo { .order_guidIndfo {
width: 100%; width: 100%;
height: 45px; height: 45px;
background-color: #FAF8F9; background-color: #faf8f9;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -69,21 +69,21 @@ ...@@ -69,21 +69,21 @@
margin-top: 15px; margin-top: 15px;
border-radius: 7px; border-radius: 7px;
font-weight: bold; font-weight: bold;
} }
.order_BtnList { .order_BtnList {
margin-top: 20px; margin-top: 20px;
position: relative; position: relative;
height: 30px; height: 30px;
} }
.order_Btn_inner { .order_Btn_inner {
width: 70%; width: 70%;
position: absolute; position: absolute;
right: 0; right: 0;
} }
.order_Btn_Com { .order_Btn_Com {
padding: 5px 10px; padding: 5px 10px;
border: 1px solid #888888; border: 1px solid #888888;
border-radius: 14px; border-radius: 14px;
...@@ -91,17 +91,17 @@ ...@@ -91,17 +91,17 @@
font-size: 12px; font-size: 12px;
float: right; float: right;
margin-right: 15px; margin-right: 15px;
} }
.order_Btn_inner .order_Btn_Com:first-child { .order_Btn_inner .order_Btn_Com:first-child {
margin-right: 0; margin-right: 0;
} }
</style> </style>
<template> <template>
<view class="quick-box" style="height:100vh;"> <view class="quick-box" style="height:100vh;">
<view class="guid-head"> <view class="guid-head">
<u-tabs name="Name" :list="headData" :is-scroll="true" :current="current" :font-size="28" height="100" <u-tabs name="Name" :list="headData" :is-scroll="true" :current="current" :font-size="28" height="100"
:active-color="mainColor" @change="getChild"></u-tabs> :active-color="mainColor" @change="getChild" :show-bar="showBar"></u-tabs>
</view> </view>
<u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty> <u-empty v-if="dataList.length==0" text="暂无数据" mode="data"></u-empty>
<scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true" <scroll-view v-else :scroll-y="true" style="background-color: #f0f4f7;" :enable-back-to-top="true" :enable-flex="true"
...@@ -183,13 +183,13 @@ ...@@ -183,13 +183,13 @@
</view> </view>
</template> </template>
<script> <script>
import payCom from '@/components/pay/pay'; import payCom from "@/components/pay/pay";
import auth from "@/components/auth/index"; import auth from "@/components/auth/index";
import tabbar from "@/components/tabbar/index"; import tabbar from "@/components/tabbar/index";
export default { export default {
components: { components: {
auth, auth,
payCom payCom,
}, },
data() { data() {
return { return {
...@@ -201,11 +201,11 @@ ...@@ -201,11 +201,11 @@
pageIndex: 1, pageIndex: 1,
pageSize: 5, pageSize: 5,
OrderId: 0, OrderId: 0,
StartTime: '', StartTime: "",
EndTime: '', EndTime: "",
OrderStatus: 0, OrderStatus: 0,
OrderNo: '', OrderNo: "",
OrderType: 11 //默认写死 OrderType: 11, //默认写死
}, },
scrollHeight: 0, scrollHeight: 0,
pageCount: 1, pageCount: 1,
...@@ -224,26 +224,31 @@ ...@@ -224,26 +224,31 @@
Cancelmsg: { Cancelmsg: {
OrderId: 0, OrderId: 0,
Type: 1, Type: 1,
Remark: '', Remark: "",
}, },
payInfo: { payInfo: {
OpenId: '', OpenId: "",
OrderId: '', OrderId: "",
OrderPayType: 1, OrderPayType: 1,
GoodsName: '' GoodsName: "",
}, },
payBtn: false, payBtn: false,
payExit: false, payExit: false,
showBar: true,
}; };
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
// #ifdef MP-ALIPAY
this.showBar = false;
// #endif
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ? let pages = wx.getStorageSync("basedata")
wx.getStorageSync("basedata").bar_title : []; ? wx.getStorageSync("basedata").bar_title
: [];
pages.forEach((x) => { pages.forEach((x) => {
if (x.value == u) { if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name; this.pageTitle = x.new_name ? x.new_name : x.name;
...@@ -259,7 +264,7 @@ ...@@ -259,7 +264,7 @@
onLoad(option) { onLoad(option) {
this.current = option.status || 0; this.current = option.status || 0;
this.getHeadList(); this.getHeadList();
this.payInfo.OpenId = uni.getStorageSync('mall_UserInfo').OpenId; this.payInfo.OpenId = uni.getStorageSync("mall_UserInfo").OpenId;
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
}, },
methods: { methods: {
...@@ -275,7 +280,8 @@ ...@@ -275,7 +280,8 @@
}, },
//获取头部数据 //获取头部数据
getHeadList() { getHeadList() {
this.request2({ this.request2(
{
url: "/api/AppletGCOrder/GuidCarOrderStatusEnumList", url: "/api/AppletGCOrder/GuidCarOrderStatusEnumList",
data: this.msg, data: this.msg,
}, },
...@@ -284,9 +290,9 @@ ...@@ -284,9 +290,9 @@
this.headData = res.data; this.headData = res.data;
var obj = { var obj = {
Id: 0, Id: 0,
Name: '全部' Name: "全部",
} };
this.headData.unshift(obj) this.headData.unshift(obj);
this.msg.OrderStatus = this.headData[this.current].Id; this.msg.OrderStatus = this.headData[this.current].Id;
this.getContent(); this.getContent();
} }
...@@ -305,9 +311,10 @@ ...@@ -305,9 +311,10 @@
this.dataList = []; this.dataList = [];
} }
uni.showLoading({ uni.showLoading({
title: '加载中' title: "加载中",
}); });
this.request2({ this.request2(
{
url: "/api/AppletGCOrder/GetAppletGoodsGuidecarOrderPageList", url: "/api/AppletGCOrder/GetAppletGoodsGuidecarOrderPageList",
data: this.msg, data: this.msg,
}, },
...@@ -341,37 +348,37 @@ ...@@ -341,37 +348,37 @@
//取消订单 //取消订单
cancel(e, index) { cancel(e, index) {
this.showModal = true; this.showModal = true;
this.Cancelmsg.Remark = '', (this.Cancelmsg.Remark = ""), (this.index = index);
this.index = index;
this.subItem = e; this.subItem = e;
this.Cancelmsg.OrderId = e.OrderId; this.Cancelmsg.OrderId = e.OrderId;
this.Cancelmsg.Type = e.OrderStatus == 1 ? 1 : 2; this.Cancelmsg.Type = e.OrderStatus == 1 ? 1 : 2;
}, },
//确认订单 //确认订单
confirm() { confirm() {
let that = this let that = this;
// that.showModal = false; // that.showModal = false;
if (that.Cancelmsg.Type == 2 && that.Cancelmsg.Remark == '') { if (that.Cancelmsg.Type == 2 && that.Cancelmsg.Remark == "") {
uni.showToast({ uni.showToast({
title: '备注不能为空', title: "备注不能为空",
icon: 'none' icon: "none",
}) });
return return;
} }
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: that.dataList[0].template_message_list, tmplIds: that.dataList[0].template_message_list,
complete(res) { complete(res) {
that.request2({ that.request2(
url: '/api/AppletOrder/CancelAppletGoodsOrderInfo', {
data: that.Cancelmsg url: "/api/AppletOrder/CancelAppletGoodsOrderInfo",
data: that.Cancelmsg,
}, },
(res) => { (res) => {
that.showModal = false; that.showModal = false;
if (that.Cancelmsg.Type == 1) { if (that.Cancelmsg.Type == 1) {
uni.showToast({ uni.showToast({
title: res.message, title: res.message,
icon: 'none' icon: "none",
}) });
that.dataList.splice(that.index, 1); that.dataList.splice(that.index, 1);
} else { } else {
uni.showToast({ uni.showToast({
...@@ -386,8 +393,8 @@ ...@@ -386,8 +393,8 @@
} }
} }
); );
} },
}) });
}, },
//再次购买 //再次购买
buy(y) { buy(y) {
...@@ -402,7 +409,7 @@ ...@@ -402,7 +409,7 @@
AddressId: 0, AddressId: 0,
}; };
y.DetailList.forEach((x) => { y.DetailList.forEach((x) => {
ShoppingCartIdList.push(x.Id) ShoppingCartIdList.push(x.Id);
let g = { let g = {
GoodsId: x.GoodsId, GoodsId: x.GoodsId,
Number: x.Number, Number: x.Number,
...@@ -412,8 +419,11 @@ ...@@ -412,8 +419,11 @@
}); });
forms = good; forms = good;
uni.navigateTo({ uni.navigateTo({
url: '/pages/order-submit/order-submit?formData=' + encodeURIComponent(JSON.stringify(forms)) + url:
'&IsFormShoppingCart=2&ShoppingCartIdList=' + JSON.stringify(ShoppingCartIdList) "/pages/order-submit/order-submit?formData=" +
encodeURIComponent(JSON.stringify(forms)) +
"&IsFormShoppingCart=2&ShoppingCartIdList=" +
JSON.stringify(ShoppingCartIdList),
}); });
}, },
payment(e) { payment(e) {
...@@ -421,7 +431,7 @@ ...@@ -421,7 +431,7 @@
this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10); this.payInfo.GoodsName = e.DetailList[0].GoodsName.slice(0, 10);
this.payInfo.PaymentWay = e.PaymentWay; this.payInfo.PaymentWay = e.PaymentWay;
this.payInfo.total_price = e.Income; this.payInfo.total_price = e.Income;
this.payBtn = true this.payBtn = true;
}, },
exitPay() { exitPay() {
this.payExit = false; this.payExit = false;
...@@ -433,9 +443,9 @@ ...@@ -433,9 +443,9 @@
//跳转到详情 //跳转到详情
goDetail(item) { goDetail(item) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/guidecar/orderDetail?OrderId=' + item.OrderId url: "/pages/guidecar/orderDetail?OrderId=" + item.OrderId,
}) });
}
}, },
}; },
};
</script> </script>
This diff is collapsed.
This diff is collapsed.
<template> <template>
<view class="integralDStyle" :style="{ height: contentHeight }"> <view class="integralDStyle" :style="{ height: contentHeight }">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mainColor" height="100"></u-tabs> <u-tabs
:list="list"
:is-scroll="false"
:current="current"
@change="change"
:active-color="mainColor"
height="100"
:show-bar="showBar"
></u-tabs>
<u-empty v-if="g.length == 0" text="暂无积分明细" mode="list"></u-empty> <u-empty v-if="g.length == 0" text="暂无积分明细" mode="list"></u-empty>
<view v-if="g.length > 0" style="height: calc(100vh - 50px);width: calc(100vw);overflow: hidden; "> <view
<scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }"> v-if="g.length > 0"
style="height: calc(100vh - 50px); width: calc(100vw); overflow: hidden"
>
<scroll-view
:scroll-y="true"
:enable-back-to-top="true"
:enable-flex="true"
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="interDList" v-for="(x, i) in g" :key="i"> <view class="interDList" v-for="(x, i) in g" :key="i">
<Text>{{x.Description}}</Text> <Text>{{ x.Description }}</Text>
<view style="display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;"> <view
<Text :style="{color:x.Type==1?mainColor:secondary}">{{x.Type==1?'+':'-'}}{{x.Integral}}积分</Text> style="
<Text style='font-size: 12px; color: #B5B5B5;'>时间:{{x.CreateDate}}</Text> display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
margin-top: 5px;
"
>
<Text :style="{ color: x.Type == 1 ? mainColor : secondary }"
>{{ x.Type == 1 ? "+" : "-" }}{{ x.Integral }}积分</Text
>
<Text style="font-size: 12px; color: #b5b5b5"
>时间:{{ x.CreateDate }}</Text
>
</view> </view>
</view> </view>
<u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" /> <u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view> </scroll-view>
</view> </view>
<!-- 加载中 --> <!-- 加载中 -->
<view class="loading" v-if="loading"> <view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading> <u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text> <Text style="color: #fff; margin-top: 10rpx">加载中...</Text>
</view> </view>
<!-- 取消提示 --> <!-- 取消提示 -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth> <auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view> </view>
</template> </template>
<script> <script>
import auth from "../../../components/auth/index.vue"; import auth from "../../../components/auth/index.vue";
export default { export default {
components: { components: {
auth auth,
}, },
data() { data() {
return { return {
pageTitle: "积分明细", pageTitle: "积分明细",
current: 0, current: 0,
list: [{ list: [
name: "收入" {
name: "收入",
}, },
{ {
name: "支出" name: "支出",
}, },
], ],
showAuth: false, showAuth: false,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
Type: 0 Type: 0,
}, },
mainColor: "", mainColor: "",
secondary: '', secondary: "",
contentHeight: 0, contentHeight: 0,
page: 1, page: 1,
page_count: 1, page_count: 1,
...@@ -62,19 +103,23 @@ ...@@ -62,19 +103,23 @@
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
showBar: true,
}; };
}, },
created() { created() {
this.contentHeight = this.$utils.calcContentHeight(-40) + "px"; this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
// #ifdef MP-ALIPAY
this.showBar = false;
// #endif
}, },
mounted() { mounted() {
let currentPages = getCurrentPages(); let currentPages = getCurrentPages();
let u = "/" + currentPages[currentPages.length - 1].route; let u = "/" + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync("basedata") ? let pages = wx.getStorageSync("basedata")
wx.getStorageSync("basedata").bar_title : ? wx.getStorageSync("basedata").bar_title
[]; : [];
pages.forEach((x) => { pages.forEach((x) => {
if (x.value == u) { if (x.value == u) {
this.pageTitle = x.new_name ? x.new_name : x.name; this.pageTitle = x.new_name ? x.new_name : x.name;
...@@ -89,7 +134,7 @@ ...@@ -89,7 +134,7 @@
if (!this.u) { if (!this.u) {
this.u = { this.u = {
nickName: "未登录", nickName: "未登录",
avatarUrl: "" avatarUrl: "",
}; };
this.showAuth = true; this.showAuth = true;
} else { } else {
...@@ -106,12 +151,13 @@ ...@@ -106,12 +151,13 @@
}, },
init() { init() {
this.loading = true; this.loading = true;
this.msg.Type = this.current + 1 this.msg.Type = this.current + 1;
this.request2({ this.request2(
url: '/api/AppletUser/GetMemberIntegralPageList', {
data: this.msg url: "/api/AppletUser/GetMemberIntegralPageList",
data: this.msg,
}, },
res => { (res) => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.loading = false; this.loading = false;
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
...@@ -138,19 +184,19 @@ ...@@ -138,19 +184,19 @@
}, },
//关闭登录窗口 //关闭登录窗口
gbAuth() { gbAuth() {
uni.navigateBack() uni.navigateBack();
}
}, },
}; },
};
</script> </script>
<style> <style>
.integralDStyle { .integralDStyle {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f3f4f6; background: #f3f4f6;
} }
.integralDStyle .loading { .integralDStyle .loading {
width: 200rpx; width: 200rpx;
height: 200rpx; height: 200rpx;
background: #000000; background: #000000;
...@@ -165,14 +211,14 @@ ...@@ -165,14 +211,14 @@
top: 30%; top: 30%;
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
.integralDStyle .interDList { .integralDStyle .interDList {
width: 100%; width: 100%;
padding: 20px 15px; padding: 20px 15px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #fff; background: #fff;
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment