Commit 0c84d628 authored by 黄奎's avatar 黄奎

页面修改

parent b2887f7f
<template> <template>
<view class="integralDStyle" :style="{ height: contentHeight }"> <view class="integralDStyle" :style="{ height: contentHeight }">
<u-tabs <u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mainColor"></u-tabs>
:list="list" <u-empty v-if="g.length == 0" text="暂无积分明细" mode="list"></u-empty>
:is-scroll="false" <view v-if="g.length > 0" style="height: calc(100vh - 50px);width: calc(100vw);overflow: hidden; ">
:current="current" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower" :style="{ height: '100%' }">
@change="change" <view class="interDList" v-for="(x, i) in g" :key="i">
:active-color="mainColor" <Text>{{x.Description}}</Text>
<view style="display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;">
></u-tabs> <Text :style="{color:x.Type==1?mainColor:secondary}">{{x.Type==1?'+':'-'}}{{x.Integral}}积分</Text>
<u-empty v-if="g.length == 0" text="暂无积分明细" mode="list"></u-empty> <Text style='font-size: 12px; color: #B5B5B5;'>时间:{{x.CreateDate}}</Text>
</view>
<view </view>
v-if="g.length > 0" <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
style=" </scroll-view>
height: calc(100vh - 50px); </view>
width: calc(100vw); <!-- 加载中 -->
overflow: hidden; <view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
" <Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
> </view>
<scroll-view <!-- 取消提示 -->
:scroll-y="true" <u-toast ref="uToast" />
:enable-back-to-top="true" <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth='gbAuth'></auth>
:enable-flex="true" </view>
@scrolltolower="lower"
:style="{ height: '100%' }"
>
<view class="interDList" v-for="(x, i) in g" :key="i">
<Text>{{x.Description}}</Text>
<view style="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>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
<!-- 加载中 -->
<view class="loading" v-if="loading">
<u-loading mode="flower" size="48">></u-loading>
<Text style="color: #fff; margin-top: 10rpx;">加载中...</Text>
</view>
<!-- 取消提示 -->
<u-toast ref="uToast" />
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'gbAuth'></auth>
</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, },
msg:{ ],
pageIndex: 1, showAuth: false,
pageSize:10, msg: {
Type:0 pageIndex: 1,
}, pageSize: 10,
mainColor: "", Type: 0
secondary:'', },
contentHeight: 0, mainColor: "",
page: 1, secondary: '',
page_count: 1, contentHeight: 0,
g: [], page: 1,
loading: false, page_count: 1,
isover: false, g: [],
status: "loadmore", loading: false,
loadText: { isover: false,
loadmore: "轻轻上拉,加载更多", status: "loadmore",
loading: "努力加载中", loadText: {
nomore: "没有更多了", loadmore: "轻轻上拉,加载更多",
}, loading: "努力加载中",
}; nomore: "没有更多了",
}, },
created() { };
this.contentHeight = this.$utils.calcContentHeight(-40) + "px"; },
this.mainColor = this.$uiConfig.mainColor; created() {
this.secondary = this.$uiConfig.secondary; this.contentHeight = this.$utils.calcContentHeight(-40) + "px";
}, this.mainColor = this.$uiConfig.mainColor;
mounted() { this.secondary = this.$uiConfig.secondary;
let currentPages = getCurrentPages(); },
let u = "/" + currentPages[currentPages.length - 1].route; mounted() {
let pages = wx.getStorageSync("basedata") let currentPages = getCurrentPages();
? wx.getStorageSync("basedata").bar_title let u = "/" + currentPages[currentPages.length - 1].route;
: []; let pages = wx.getStorageSync("basedata") ?
pages.forEach((x) => { wx.getStorageSync("basedata").bar_title :
if (x.value == u) { [];
this.pageTitle = x.new_name ? x.new_name : x.name; pages.forEach((x) => {
} if (x.value == u) {
}); this.pageTitle = x.new_name ? x.new_name : x.name;
uni.setNavigationBarTitle({ }
title: this.pageTitle, });
}); uni.setNavigationBarTitle({
title: this.pageTitle,
}, });
onLoad(){ },
this.u = uni.getStorageSync("mall_UserInfo"); onLoad() {
if (!this.u) { this.u = uni.getStorageSync("mall_UserInfo");
this.u = { if (!this.u) {
nickName: "未登录", this.u = {
avatarUrl: "" nickName: "未登录",
}; avatarUrl: ""
this.showAuth = true; };
} else{ this.showAuth = true;
this.init(); } else {
} this.init();
}, }
methods: { },
change(index) { methods: {
change(index) {
this.current = index; this.current = index;
this.msg.pageIndex = 1;
this.msg.pageIndex = 1; this.g = [];
this.g = []; this.loading = true;
this.loading = true; this.init();
this.init(); },
}, 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 => {
}, if (res.resultCode == 1) {
res => { this.loading = false;
this.g = this.g.concat(res.data.pageData);
if(res.resultCode==1){ this.page_count = res.data.pageCount;
this.loading = false; if (this.page_count == 1) {
this.g = this.g.concat(res.data.pageData); this.status = "nomore";
this.page_count = res.data.pageCount; }
if (this.page_count == 1) { }
this.status = "nomore"; }
} );
} },
} lower(e) {
); if (this.msg.pageIndex < this.page_count) {
}, this.msg.pageIndex++;
lower(e) { this.status = "loading";
if (this.msg.pageIndex < this.page_count) { this.init();
this.msg.pageIndex++; } else {
this.status = "loading"; this.status = "nomore";
this.init(); }
} else { },
reloadUserinfo() {
this.status = "nomore"; this.u = uni.getStorageSync("mall_UserInfo");
} this.init();
}, },
reloadUserinfo() { //关闭登录窗口
this.u = uni.getStorageSync("mall_UserInfo"); gbAuth() {
// this.showAuth=false; uni.navigateBack()
this.init(); }
}, },
//关闭登录窗口 };
gbAuth(){
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;
opacity: 0.7; opacity: 0.7;
border-radius: 10rpx; border-radius: 10rpx;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
position: fixed; position: fixed;
left: 50%; left: 50%;
top: 30%; top: 30%;
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
.integralDStyle .interDList{
width:100% ; .integralDStyle .interDList {
padding: 20px 15px; width: 100%;
display: flex; padding: 20px 15px;
flex-direction: column; display: flex;
background: #fff; flex-direction: column;
border-top: 1px solid #f5f5f5; background: #fff;
border-top: 1px solid #f5f5f5;
} }
</style> </style>
This diff is collapsed.
...@@ -197,7 +197,7 @@ ...@@ -197,7 +197,7 @@
return { return {
vlist: [], vlist: [],
videoIndex: 0, videoIndex: 0,
swiperHeight: 0,//高度 swiperHeight: 0, //高度
GoodsId: 0, //商品id GoodsId: 0, //商品id
nav: 0, nav: 0,
goodObj: {}, //商品对象 goodObj: {}, //商品对象
...@@ -214,7 +214,7 @@ ...@@ -214,7 +214,7 @@
comGoodImg: '', //商品缩小图 comGoodImg: '', //商品缩小图
comGoodTitle: '', //商品名称 comGoodTitle: '', //商品名称
comGoodPrice: '', //商品价格 comGoodPrice: '', //商品价格
showSku: false,//是否显示商品SKU showSku: false, //是否显示商品SKU
sku: {}, sku: {},
showAuth: false, showAuth: false,
u: {}, u: {},
...@@ -234,23 +234,20 @@ ...@@ -234,23 +234,20 @@
this.GoodsId = option.GoodsId; this.GoodsId = option.GoodsId;
this.sysheight = uni.getSystemInfoSync().windowHeight; this.sysheight = uni.getSystemInfoSync().windowHeight;
this.swiperHeight = `${this.sysheight}px`; this.swiperHeight = `${this.sysheight}px`;
this.videoIndex = 0; //默认加载第一条
this.videoIndex=0; //默认加载第一条
this.vlist = []; this.vlist = [];
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"], menus: ["shareAppMessage", "shareTimeline"],
}); });
}, },
methods: { methods: {
//获取商品视频 //获取商品视频
getVideoHeight(type) getVideoHeight(type) {
{
//视频填充方式(0默认,1-填充) //视频填充方式(0默认,1-填充)
if(type==0){ if (type == 0) {
return 'contain' return 'contain'
}else{ } else {
return 'fill' return 'fill'
} }
}, },
...@@ -273,14 +270,11 @@ ...@@ -273,14 +270,11 @@
this.videoContextList[curIndex].seek(0) this.videoContextList[curIndex].seek(0)
this.isPlay = true this.isPlay = true
this.videoIndex = curIndex; this.videoIndex = curIndex;
this.comGoodImg = this.vlist[curIndex].picUrl; this.comGoodImg = this.vlist[curIndex].picUrl;
this.comGoodTitle = this.vlist[curIndex].name; this.comGoodTitle = this.vlist[curIndex].name;
this.comGoodPrice = this.vlist[curIndex].price; this.comGoodPrice = this.vlist[curIndex].price;
this.GoodsId = this.vlist[curIndex].id; this.GoodsId = this.vlist[curIndex].id;
this.sku = this.vlist[curIndex]; this.sku = this.vlist[curIndex];
let xz = this.vlist.length - e.detail.current; let xz = this.vlist.length - e.detail.current;
if (xz == 1) { if (xz == 1) {
this.msg.pageIndex++; this.msg.pageIndex++;
...@@ -355,7 +349,7 @@ ...@@ -355,7 +349,7 @@
picUrl: data[0].cover_pic, picUrl: data[0].cover_pic,
price: this.goodObj.price, price: this.goodObj.price,
video_url: data[0].video_url, video_url: data[0].video_url,
VideoType:data[0].video_type VideoType: data[0].video_type
} }
this.vlist.push(obj); this.vlist.push(obj);
this.videoContextList = [] this.videoContextList = []
...@@ -402,43 +396,37 @@ ...@@ -402,43 +396,37 @@
}; };
}, },
onShareTimeline() { onShareTimeline() {
setTimeout(() => { setTimeout(() => {
this.getReceive(); this.getReceive();
}, 2500); }, 2500);
let uid = uni.getStorageSync("mall_UserInfo") let uid = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserId uni.getStorageSync("mall_UserInfo").UserId :
: 0; 0;
if(uid==0){ if (uid == 0) {
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0 uid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0
}
let SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId
: 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").UserSmallShopId
: 0;
} }
return { let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
title: this.comGoodTitle, uni.getStorageSync("mall_UserInfo").SmallShopId :
query: "GoodsId=" + this.GoodsId + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId, 0;
imageUrl: this.comGoodImg, if (SmallShopId == 0) { //如果微店id为0 去找所属微店id
}; SmallShopId = uni.getStorageSync("mall_UserInfo") ?
uni.getStorageSync("mall_UserInfo").UserSmallShopId :
0;
}
return {
title: this.comGoodTitle,
query: "GoodsId=" + this.GoodsId + "&user_id=" + uid + "&SmallShopId=" + SmallShopId,
imageUrl: this.comGoodImg,
};
}, },
//点击商品 //点击商品
getShowInfo() { getShowInfo() {
this.isShowInfo = !this.isShowInfo; this.isShowInfo = !this.isShowInfo;
} }
}, },
mounted() {}, mounted() {},
created() { created() {
this.nav = uni.getMenuButtonBoundingClientRect().top; this.nav = uni.getMenuButtonBoundingClientRect().top;
}, },
} }
</script> </script>
\ No newline at end of file
<style>
</style>
<template> <template>
<web-view :src="url"></web-view> <web-view :src="url"></web-view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
url:"" url: ""
} }
}, },
onLoad: function (option) { //option为object类型,会序列化上个页面传递的参数 onLoad: function(option) { //option为object类型,会序列化上个页面传递的参数
this.url=decodeURIComponent(option.u) this.url = decodeURIComponent(option.u)
} }
} }
</script> </script>
<style> <style>
</style> </style>
\ No newline at end of file
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