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"
:is-scroll="false"
:current="current"
@change="change"
:active-color="mainColor"
></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 style="display: flex;align-items: center;justify-content: space-between;width: 100%;margin-top: 5px;">
...@@ -33,16 +11,8 @@ ...@@ -33,16 +11,8 @@
<Text style='font-size: 12px; color: #B5B5B5;'>时间:{{x.CreateDate}}</Text> <Text style='font-size: 12px; color: #B5B5B5;'>时间:{{x.CreateDate}}</Text>
</view> </view>
</view> </view>
<u-loadmore <u-loadmore :status="status" :load-text="loadText" :font-size="24" :margin-top="20" :margin-bottom="20" bg-color="#f3f4f6" />
: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">
...@@ -50,16 +20,14 @@ ...@@ -50,16 +20,14 @@
<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
}, },
...@@ -67,19 +35,21 @@ export default { ...@@ -67,19 +35,21 @@ export default {
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,
...@@ -102,9 +72,9 @@ export default { ...@@ -102,9 +72,9 @@ export default {
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;
...@@ -113,9 +83,8 @@ export default { ...@@ -113,9 +83,8 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: this.pageTitle, title: this.pageTitle,
}); });
}, },
onLoad(){ onLoad() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
if (!this.u) { if (!this.u) {
this.u = { this.u = {
...@@ -123,15 +92,13 @@ export default { ...@@ -123,15 +92,13 @@ export default {
avatarUrl: "" avatarUrl: ""
}; };
this.showAuth = true; this.showAuth = true;
} else{ } else {
this.init(); this.init();
} }
}, },
methods: { methods: {
change(index) { 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;
...@@ -139,15 +106,13 @@ export default { ...@@ -139,15 +106,13 @@ export default {
}, },
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', url: '/api/AppletUser/GetMemberIntegralPageList',
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);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
...@@ -164,30 +129,28 @@ export default { ...@@ -164,30 +129,28 @@ export default {
this.status = "loading"; this.status = "loading";
this.init(); this.init();
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
}, },
reloadUserinfo() { reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
// this.showAuth=false;
this.init(); this.init();
}, },
//关闭登录窗口 //关闭登录窗口
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;
...@@ -202,14 +165,14 @@ export default { ...@@ -202,14 +165,14 @@ export default {
top: 30%; top: 30%;
margin-left: -100rpx; margin-left: -100rpx;
z-index: 999; z-index: 999;
} }
.integralDStyle .interDList{
width:100% ; .integralDStyle .interDList {
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>
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,10 +234,8 @@ ...@@ -234,10 +234,8 @@
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"],
...@@ -245,12 +243,11 @@ ...@@ -245,12 +243,11 @@
}, },
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 = []
...@@ -405,32 +399,30 @@ ...@@ -405,32 +399,30 @@
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") let SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").SmallShopId uni.getStorageSync("mall_UserInfo").SmallShopId :
: 0; 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id if (SmallShopId == 0) { //如果微店id为0 去找所属微店id
SmallShopId = uni.getStorageSync("mall_UserInfo") SmallShopId = uni.getStorageSync("mall_UserInfo") ?
? uni.getStorageSync("mall_UserInfo").UserSmallShopId uni.getStorageSync("mall_UserInfo").UserSmallShopId :
: 0; 0;
} }
return { return {
title: this.comGoodTitle, title: this.comGoodTitle,
query: "GoodsId=" + this.GoodsId + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId, query: "GoodsId=" + this.GoodsId + "&user_id=" + uid + "&SmallShopId=" + SmallShopId,
imageUrl: this.comGoodImg, imageUrl: this.comGoodImg,
}; };
}, },
//点击商品 //点击商品
getShowInfo() { getShowInfo() {
this.isShowInfo = !this.isShowInfo; this.isShowInfo = !this.isShowInfo;
} }
}, },
mounted() {}, mounted() {},
created() { created() {
...@@ -438,7 +430,3 @@ ...@@ -438,7 +430,3 @@
}, },
} }
</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>
......
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