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>
<template> <template>
<scroll-view <scroll-view :scroll-y="true" @scroll="scrollHandler" @scrolltoupper="scrollTopHandler" style="height: 100vh;">
:scroll-y="true"
@scroll="scrollHandler"
@scrolltoupper="scrollTopHandler"
style="height: 100vh;">
<view class="userStyle"> <view class="userStyle">
<view <view class="headStatus" v-if="scrollTop > 50" :style="[headStyle,
class="headStatus"
v-if="scrollTop > 50"
:style="[
headStyle,
{ {
zIndex: scrollTop < 10 ? 'unset' : 2, zIndex: scrollTop < 10 ? 'unset' : 2,
opacity: scrollTop < 10 ? '100' : scrollTop, opacity: scrollTop < 10 ? '100' : scrollTop,
}, },
]" ]">
> <view class="title" v-if="scrollTop > 50">{{pageTitle}}</view>
<!-- <view class="arrow" >
<u-icon name="arrow-left" size="48" color="#FFF"></u-icon>
</view> -->
<view class="title" v-if="scrollTop > 50">{{pageTitle}}</view>
</view> </view>
<view class="userBox" :style="{ 'margin-bottom': bottommargin }"> <view class="userBox" :style="{ 'margin-bottom': bottommargin }">
<view <view :style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url ? meueData.user_center.top_pic_url : '') + ')', backgroundSize: '100% 310px' }"
:style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url ? meueData.user_center.top_pic_url : '') + ')', backgroundSize: '100% 310px' }" class="imgbg" :class="{'miniHeadTop':meueData.user_center.is_foot_bar_status!=1&&meueData.user_center.is_account_status!=1}">
class="imgbg" :class="{'miniHeadTop':meueData.user_center.is_foot_bar_status!=1&&meueData.user_center.is_account_status!=1}"
>
<view class="titlenav" :style="{paddingTop:nav}">{{pageTitle}}</view> <view class="titlenav" :style="{paddingTop:nav}">{{pageTitle}}</view>
<view class='topheard' :style="{'margin-top':modelstype==0?'52px':(modelstype==1?'37px':(modelstype==2)?'33px':0) }" v-if="meueData.user_center.top_style == 1"> <view class='topheard' :style="{'margin-top':modelstype==0?'52px':(modelstype==1?'37px':(modelstype==2)?'33px':0) }"
v-if="meueData.user_center.top_style == 1">
<u-avatar :src="user_info.avatar" size="140" style="margin-left: 50rpx;"></u-avatar> <u-avatar :src="user_info.avatar" size="140" style="margin-left: 50rpx;"></u-avatar>
<view style="display: flex;flex-direction: column;justify-content: center;height: 50px;margin-left: 20rpx"> <view style="display: flex;flex-direction: column;justify-content: center;height: 50px;margin-left: 20rpx">
<Text style="color: #FFF;font-size: 36rpx;max-width: 200px;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;" <Text style="color: #FFF;font-size: 36rpx;max-width: 200px;overflow: hidden;display: inline-block;white-space: nowrap; text-overflow:ellipsis;"
@click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
<view class="member" v-if="is_icon_members_grade == 1&& user_info.nickname"> <view class="member" v-if="is_icon_members_grade == 1&& user_info.nickname">
<image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px;height: 22px;border-radius: 11px;"></image> <image :src="user_info.identity.level_icon" mode="aspectFill" style="width: 22px;height: 22px;border-radius: 11px;"></image>
<Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text> <Text style="margin-right: 10px;">{{ user_info.identity.level_name != null ? user_info.identity.level_name : '普通用户' }}</Text>
</view> </view>
</view> </view>
</view> </view>
<view style="display: flex;flex-direction: column;align-items: center;margin-top: 23px;margin-bottom: 5px;" v-if="meueData.user_center.top_style == 2"> <view style="display: flex;flex-direction: column;align-items: center;margin-top: 23px;margin-bottom: 5px;" v-if="meueData.user_center.top_style == 2">
<u-avatar :src="user_info.avatar" size="120"></u-avatar> <u-avatar :src="user_info.avatar" size="120"></u-avatar>
<Text style="color: #FFF;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text> <Text style="color: #FFF;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
...@@ -61,25 +46,24 @@ ...@@ -61,25 +46,24 @@
<text style="font-size: 21px;">{{user_info.coupon?user_info.coupon:0}}</text> <text style="font-size: 21px;">{{user_info.coupon?user_info.coupon:0}}</text>
<text>{{couponsObj.name}}</text> <text>{{couponsObj.name}}</text>
</view> </view>
</view> </view>
<view class="ReceiptAdder" v-if="IsEducation!=1" @click="goUrl('/pages/address/address')" :style="{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}"> <view class="ReceiptAdder" v-if="IsEducation!=1" @click="goUrl('/pages/address/address')" :style="{top:modelstype==0?'160rpx':(modelstype==1?'180rpx':'160rpx')}">
<u-icon name="location" color="#fff" size="23"></u-icon> <u-icon name="location" color="#fff" size="23"></u-icon>
<Text style="color: #fff;font-size: 12px;margin-left: 20rpx;">收货地址</Text> <Text style="color: #fff;font-size: 12px;margin-left: 20rpx;">收货地址</Text>
</view> </view>
<view class="Receiptbalance" v-if="meueData.user_center&&meueData.user_center.is_account_status == 1"> <view class="Receiptbalance" v-if="meueData.user_center&&meueData.user_center.is_account_status == 1">
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" <view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url == '/pages/balance/balance'"
v-if="item.link_url == '/pages/balance/balance'" @click="goUrl(item.link_url)"> @click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 22px;height: auto" mode ='widthFix' ></image> <image :src="item.icon_url" style="width: 22px;height: auto" mode='widthFix'></image>
<view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;"> <view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;">
<span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.balance?(user_info.balance>10000?(user_info.balance/10000).toFixed(1)+'w':user_info.balance):0}}</span> <span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.balance?(user_info.balance>10000?(user_info.balance/10000).toFixed(1)+'w':user_info.balance):0}}</span>
<span style=''>{{item.name}}</span> <span style=''>{{item.name}}</span>
</view> </view>
</view> </view>
<view style="width: 1px;height: 34px;background: #E8E8E8;"></view> <view style="width: 1px;height: 34px;background: #E8E8E8;"></view>
<view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" <view class="Receiptbalance_item" v-for="(item, index) in meueData.user_center.account" :key="index" v-if="item.link_url == '/pages/user-center/integral-detail/integral-detail'"
v-if="item.link_url == '/pages/user-center/integral-detail/integral-detail'" @click="goUrl(item.link_url)"> @click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 17px;;height: auto" mode ='widthFix'></image> <image :src="item.icon_url" style="width: 17px;;height: auto" mode='widthFix'></image>
<view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;"> <view style="margin-left: 15px;display: flex;flex-direction: column;justify-content: space-between;">
<span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.integral?(user_info.integral>10000?(user_info.integral/10000).toFixed(1)+'w':user_info.integral):0}}</span> <span style='font-size: 21px;color: #0D0D0D;font-weight: 200;'>{{user_info.integral?(user_info.integral>10000?(user_info.integral/10000).toFixed(1)+'w':user_info.integral):0}}</span>
<span>{{item.name}}</span> <span>{{item.name}}</span>
...@@ -87,118 +71,93 @@ ...@@ -87,118 +71,93 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order_bar" v-if="meueData.user_center.is_order_bar_status == 1"> <view class="order_bar" v-if="meueData.user_center.is_order_bar_status == 1">
<u-section title="我的订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/order/index/index?status=0')"></u-section> <u-section title="我的订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/order/index/index?status=0')"></u-section>
<view class="order_bar_list"> <view class="order_bar_list">
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index" :name="item.name" @click="goUrl(item.link_url)"> <view class="order_bar_item" v-for="(item, index) in meueData.user_center.order_bar" :key="index" :name="item.name"
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode ='widthFix'></image> @click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image>
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> <Text style="margin-top: 10rpx;">{{ item.name }}</Text>
<!-- 待付款 --> <!-- 待付款 -->
<view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/order/index/index?status=1' && user_info.MyOrder.NonPayment > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.NonPayment }} {{ user_info.MyOrder.NonPayment }}
</view> </view>
<!-- 待发货 --> <!-- 待发货 -->
<view v-if="item.link_url == '/pages/order/index/index?status=2' && user_info.MyOrder.WaitSendGoods > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/order/index/index?status=2' && user_info.MyOrder.WaitSendGoods > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitSendGoods }} {{ user_info.MyOrder.WaitSendGoods }}
</view> </view>
<!-- 待收货 --> <!-- 待收货 -->
<view v-if="item.link_url == '/pages/order/index/index?status=3' && user_info.MyOrder.WaitReceiving > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/order/index/index?status=3' && user_info.MyOrder.WaitReceiving > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitReceiving }} {{ user_info.MyOrder.WaitReceiving }}
</view> </view>
<!-- 待评价 --> <!-- 待评价 -->
<view v-if="item.link_url == '/pages/order/order-commit' && user_info.MyOrder.WaitCommentNum > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/order/order-commit' && user_info.MyOrder.WaitCommentNum > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.WaitCommentNum }} {{ user_info.MyOrder.WaitCommentNum }}
</view> </view>
<!-- 售后 --> <!-- 售后 -->
<view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/order/after-sale/refunds-list' && user_info.MyOrder.AfterSaleNum > 0" class="badge"
:style="{ background: mainColor }">
{{ user_info.MyOrder.AfterSaleNum }} {{ user_info.MyOrder.AfterSaleNum }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="order_bar" style="margin-top:20rpx;" v-if="meueData.user_center.is_sdorder_bar_status == 1"> <view class="order_bar" style="margin-top:20rpx;" v-if="meueData.user_center.is_sdorder_bar_status == 1">
<u-section title="司导订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/guidecar/orderList?status=0')"></u-section> <u-section title="司导订单" sub-title="查看更多" style="width: 100%;padding:0px 0 10px ;" @click="goUrl('/pages/guidecar/orderList?status=0')"></u-section>
<view class="order_bar_list"> <view class="order_bar_list">
<view class="order_bar_item" v-for="(item, index) in meueData.user_center.sdorder_bar" :key="index" :name="item.name" @click="goUrl(item.link_url)"> <view class="order_bar_item" v-for="(item, index) in meueData.user_center.sdorder_bar" :key="index" :name="item.name"
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode ='widthFix'></image> @click="goUrl(item.link_url)">
<image :src="item.icon_url" style="width: 60rpx;height: auto" mode='widthFix'></image>
<Text style="margin-top: 10rpx;">{{ item.name }}</Text> <Text style="margin-top: 10rpx;">{{ item.name }}</Text>
<!-- 待付款 --> <!-- 待付款 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=1' && user_info.MyGuideCarOrder.NonPayment > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/guidecar/orderList?status=1' && user_info.MyGuideCarOrder.NonPayment > 0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.NonPayment }} {{ user_info.MyGuideCarOrder.NonPayment }}
</view> </view>
<!-- 待确认 --> <!-- 待确认 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=2' && user_info.MyGuideCarOrder.WaitSendGoods > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/guidecar/orderList?status=2' && user_info.MyGuideCarOrder.WaitSendGoods > 0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.WaitSendGoods }} {{ user_info.MyGuideCarOrder.WaitSendGoods }}
</view> </view>
<!-- 待出行 --> <!-- 待出行 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=3' && user_info.MyGuideCarOrder.WaitReceiving > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/guidecar/orderList?status=3' && user_info.MyGuideCarOrder.WaitReceiving > 0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.WaitReceiving }} {{ user_info.MyGuideCarOrder.WaitReceiving }}
</view> </view>
<!-- 出行中 --> <!-- 出行中 -->
<view v-if="item.link_url == '/pages/guidecar/orderList?status=4' && user_info.MyGuideCarOrder.Completed > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/guidecar/orderList?status=4' && user_info.MyGuideCarOrder.Completed > 0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.Completed }} {{ user_info.MyGuideCarOrder.Completed }}
</view> </view>
<!-- 待评价 --> <!-- 待评价 -->
<view v-if="item.link_url == '/pages/guidecar/order-commit' && user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0" class="badge" :style="{ background: mainColor }"> <view v-if="item.link_url == '/pages/guidecar/order-commit' && user_info.MyGuideCarOrder.GuideCarWaitCommentNum > 0"
class="badge" :style="{ background: mainColor }">
{{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }} {{ user_info.MyGuideCarOrder.GuideCarWaitCommentNum }}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<template v-if="meueData.user_center&&meueData.user_center.nar_menus.length>0"> <template v-if="meueData.user_center&&meueData.user_center.nar_menus.length>0">
<view v-if="meueData.user_center && meueData.user_center.is_menu_status == 1" <view v-if="meueData.user_center && meueData.user_center.is_menu_status == 1" v-for="(mItem,mIndex) in meueData.user_center.nar_menus"
v-for="(mItem,mIndex) in meueData.user_center.nar_menus" :key="mIndex" :style="{'marginTop':mIndex==0&&(meueData.user_center.is_foot_bar_status==1||meueData.user_center.is_account_status==1)?'25px':''}" class="headCommon"> :key="mIndex" :style="{'marginTop':mIndex==0&&(meueData.user_center.is_foot_bar_status==1||meueData.user_center.is_account_status==1)?'25px':''}"
class="headCommon">
<view style="margin:10px;">{{mItem.MenuNavTitle}}</view> <view style="margin:10px;">{{mItem.MenuNavTitle}}</view>
<view :class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'" style="width:100%;"> <view :class="mItem.MenuNavStyle == 1 ? 'menus' : 'menus2'" style="width:100%;">
<view <view :class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'" v-for="(item, index) in mItem.MeunList"
:class="mItem.MenuNavStyle == 1 ? 'menus_item' : 'menus_item2'" :key="index" :name="item.name" @click="goUrl(item.link_url)" v-if="pandu(item)">
v-for="(item, index) in mItem.MeunList" <image :src="item.icon_url" :style="{width:mItem.MenuNavStyle == 1 ?'20px':'12px',height: 'auto'}" mode="widthFix"></image>
:key="index" <Text :style="{ 'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx', 'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '10rpx' }">
:name="item.name"
@click="goUrl(item.link_url)"
v-if="pandu(item)"
>
<image :src="item.icon_url" :style="{width:mItem.MenuNavStyle == 1 ?'20px':'12px',height: 'auto'}" mode="widthFix"
></image>
<Text
:style="{ 'margin-top': mItem.MenuNavStyle == 1 ? '10rpx' : '0rpx', 'margin-left': mItem.MenuNavStyle == 1 ? '0rpx' : '10rpx' }"
>
{{ item.name }} {{ item.name }}
</Text> </Text>
<button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button> <button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<!-- <view :class="meueData.user_center.menu_style == 1 ? 'menus2' : 'menus'" v-if="meueData.user_center&& meueData.user_center.is_menu_status == 1" style="margin-bottom: 50px;">
<view
:class="meueData.user_center.menu_style == 1 ? 'menus_item2' : 'menus_item'"
v-for="(item, index) in meueData.user_center.menus"
:key="index"
:name="item.name"
@click="goUrl(item.link_url)"
v-if="pandu(item)"
>
<image :src="item.icon_url" :style="{width:meueData.user_center.menu_style == 1 ?'12px':'20px',height: 'auto'}" mode="widthFix"
></image>
<Text
:style="{ 'margin-top': meueData.user_center.menu_style == 1 ? '0rpx' : '10rpx', 'margin-left': meueData.user_center.menu_style == 1 ? '10rpx' : '0rpx' }"
>
{{ item.name }}
</Text>
<button open-type="contact" class="contButton" v-if="item.link_url == 'contact' && item.name == '客服'"></button>
</view>
</view> -->
<!-- <view class="copyright">
<image :src="meueData.user_center.copyright.pic_url" mode="widthFix" style="width: 95px;"></image>
<Text style="margin-top: 10rpx;color: #666666;">{{ meueData.user_center.copyright.description }}</Text>
</view> -->
</view> </view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> <auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth>
<tabbars></tabbars> <tabbars></tabbars>
...@@ -207,525 +166,531 @@ ...@@ -207,525 +166,531 @@
</template> </template>
<script> <script>
import tabbars from '@/components/tabbar/index'; import tabbars from '@/components/tabbar/index';
import auth from '../../components/auth/index.vue'; import auth from '../../components/auth/index.vue';
export default {
export default { data() {
data() { return {
return { isloading: true,
isloading: true, pageTitle: '用户中心',
pageTitle: '用户中心', navHeight: 0,
navHeight: 0, contentHeight: 0,
contentHeight: 0, cstyle: {},
cstyle: {}, meueData: {}, //菜单
meueData: {}, //菜单 user_info: {}, //个人信息
user_info: {}, //个人信息 headStyle: {},
headStyle: {}, bottommargin: 0,
bottommargin: 0, listbottom: 0,
listbottom: 0, showAuth: false,
showAuth: false, mainColor: '',
mainColor: '', secondary: '',
secondary: '', u: {},
u: {}, is_icon_members_grade: 0,
is_icon_members_grade: 0, nav: 0,
nav:0, scrollTop: 0,
scrollTop:0, couponsObj: {},
couponsObj:{}, modelstype: 0, //机型类型
modelstype:0,//机型类型 shopBasics: {},
shopBasics:{}, mall_UserInfo: {},
mall_UserInfo:{}, IsEducation: 0, //1是0否是网课模式
IsEducation:0,//1是0否是网课模式 };
};
},
components: {
tabbars,
auth
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.IsEducation = uni.getStorageSync('basedata')
? (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation?uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation:0)
:0;
this.userinfo();
},
onLoad() {
this.navHeight = this.$navHeight - 2;
this.u = wx.getStorageSync('basedata').user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo");
this.nav = uni.getMenuButtonBoundingClientRect().top+'px';
this.headStyle.background = `linear-gradient(to right, '#6E75EA',80%, '#B984EC')`;
this.headStyle.paddingTop = this.nav ;
if (!this.mall_UserInfo) {
this.showAuth = true;
}
},
mounted() {
let currentPages = getCurrentPages();
let c = this.$uiConfig.is_bang ? 80 : 52;
this.bottommargin = c - 2 + 'px';
this.listbottom = c - 2 + 50 + 'px';
this.contentHeight = this.$utils.calcContentHeight(c);
if(this.contentHeight>690 && this.contentHeight<776){
this.modelstype=1
}else if(this.contentHeight>=776){
this.modelstype=2
}
this.is_icon_members_grade = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_icon_members_grade : 0;
let u = '/' + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : [];
// pages.forEach(x => {
// if (x.value == u) {
// this.pageTitle = x.new_name ? x.new_name : x.name;
// }
// });
uni.setNavigationBarTitle({
title: '用户中心'
});
},
onShow() {
this.userinfo(2);
},
methods: {
goHome() {
uni.redirectTo({ url: '/pages/index/main' });
},
pandu(item){
let flag=true;
let IsOpen = this.shopBasics.model&&this.shopBasics.model.IsOpen?this.shopBasics.model.IsOpen:1;
let SmallShopId = this.mall_UserInfo.SmallShopId?this.mall_UserInfo.SmallShopId:0;
let UserSmallShopId = this.mall_UserInfo.UserSmallShopId?this.mall_UserInfo.UserSmallShopId:0;
switch(item.link_url)
{
case "/pages/share/index/index" :
if(this.user_info.isShowDistributionCenter == 1)
{
flag=true;
}
else{
flag=false;
}
break;
case "/pages/microShop/index/index":
//开启
if(IsOpen==2)
{
// if(SmallShopId==0 && UserSmallShopId!=0)
// {
// flag=false;
// }
// else{
// flag=true;
// }
flag=true;
}
//关闭
else{
if(SmallShopId!=0 || UserSmallShopId!=0 )
{
flag=true;
}
else{
flag=false;
}
}
break;
}
return flag;
},
//获取菜单配置
userinfo(type=1) {
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/Mall/GetUserCenter',
data: {}
},
res => {
uni.hideNavigationBarLoading();
this.meueData = res.data.config;
this.user_info = res.data.user_info;
this.meueData.user_center.account.forEach(x=>{
if(x.link_url =="/pages/coupon/index/index" ){
this.couponsObj = x
}
})
if(this.mall_UserInfo&& type==1){
this.getLogin()
}
}
);
let u = uni.getStorageSync("mall_UserInfo");
if(u&& type==1){
this.getMicroShopBasics()
}
},
getLogin() {
var that = this;
let pid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId")?uni.getStorageSync("SmallShopId").SmallShopId:0;
that.request2(
{
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: this.mall_UserInfo.OpenId,
Name: this.mall_UserInfo.Name,
Photo: this.mall_UserInfo.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId:SmallShopId,
UserPageType: Up,
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
uni.removeStorageSync("Up");
}
}
);
}, },
getMicroShopBasics(){ components: {
this.request2( tabbars,
{ auth
url: '/api/AppletUser/GetMicroShopBasics',
data: {}
},
(res) => {
this.shopBasics = res.data;
}
);
}, },
goUrl(url) { created() {
if (url == '/pages/balance/balance') { this.mainColor = this.$uiConfig.mainColor;
uni.navigateTo({ this.secondary = this.$uiConfig.secondary;
url: '/pages/balance/balance?balance=' + this.user_info.balance this.IsEducation = uni.getStorageSync('basedata') ?
}); (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
} else { .IsEducation : 0) :
uni.navigateTo({ 0;
url: url
});
}
},
reloadUserinfo() {
this.userinfo(); this.userinfo();
this.u = this.user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo"):{};
// this.showAuth = false;
}, },
login(name) { onLoad() {
if ((name && name.nickname == '') || !name || !name.nickname) { this.navHeight = this.$navHeight - 2;
this.u = wx.getStorageSync('basedata').user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo");
this.nav = uni.getMenuButtonBoundingClientRect().top + 'px';
this.headStyle.background = `linear-gradient(to right, '#6E75EA',80%, '#B984EC')`;
this.headStyle.paddingTop = this.nav;
if (!this.mall_UserInfo) {
this.showAuth = true; this.showAuth = true;
} }
}, },
//关闭登录窗口 mounted() {
gbAuth() { let currentPages = getCurrentPages();
this.showAuth = false; let c = this.$uiConfig.is_bang ? 80 : 52;
}, this.bottommargin = c - 2 + 'px';
scrollHandler(e) { this.listbottom = c - 2 + 50 + 'px';
this.scrollTop = e.detail.scrollTop; this.contentHeight = this.$utils.calcContentHeight(c);
//this.$forceUpdate(); if (this.contentHeight > 690 && this.contentHeight < 776) {
this.modelstype = 1
} else if (this.contentHeight >= 776) {
this.modelstype = 2
}
this.is_icon_members_grade = uni.getStorageSync('basedata') ? uni.getStorageSync('basedata').mall.setting.is_icon_members_grade :
0;
let u = '/' + currentPages[currentPages.length - 1].route;
let pages = wx.getStorageSync('basedata') ? wx.getStorageSync('basedata').bar_title : [];
uni.setNavigationBarTitle({
title: '用户中心'
});
}, },
scrollTopHandler() { onShow() {
this.scrollTop = 0; this.userinfo(2);
}, },
methods: {
} goHome() {
}; uni.redirectTo({
url: '/pages/index/main'
});
},
pandu(item) {
let flag = true;
let IsOpen = this.shopBasics.model && this.shopBasics.model.IsOpen ? this.shopBasics.model.IsOpen : 1;
let SmallShopId = this.mall_UserInfo.SmallShopId ? this.mall_UserInfo.SmallShopId : 0;
let UserSmallShopId = this.mall_UserInfo.UserSmallShopId ? this.mall_UserInfo.UserSmallShopId : 0;
switch (item.link_url) {
case "/pages/share/index/index":
if (this.user_info.isShowDistributionCenter == 1) {
flag = true;
} else {
flag = false;
}
break;
case "/pages/microShop/index/index":
//开启
if (IsOpen == 2) {
flag = true;
}
//关闭
else {
if (SmallShopId != 0 || UserSmallShopId != 0) {
flag = true;
} else {
flag = false;
}
}
break;
}
return flag;
},
//获取菜单配置
userinfo(type = 1) {
uni.showNavigationBarLoading();
this.request2({
url: '/api/Mall/GetUserCenter',
data: {}
},
res => {
uni.hideNavigationBarLoading();
this.meueData = res.data.config;
this.user_info = res.data.user_info;
this.meueData.user_center.account.forEach(x => {
if (x.link_url == "/pages/coupon/index/index") {
this.couponsObj = x
}
})
if (this.mall_UserInfo && type == 1) {
this.getLogin()
}
}
);
let u = uni.getStorageSync("mall_UserInfo");
if (u && type == 1) {
this.getMicroShopBasics()
}
},
getLogin() {
var that = this;
let pid = uni.getStorageSync("pid") ? uni.getStorageSync("pid").pid : 0;
let Up = uni.getStorageSync("Up") ? uni.getStorageSync("Up").Up : 0;
let SmallShopId = uni.getStorageSync("SmallShopId") ? uni.getStorageSync("SmallShopId").SmallShopId : 0;
that.request2({
url: '/api/AppletLogin/Login',
data: {
Source: 1,
OpenId: this.mall_UserInfo.OpenId,
Name: this.mall_UserInfo.Name,
Photo: this.mall_UserInfo.Photo,
Moblie: '',
SuperiorId: pid,
SmallShopId: SmallShopId,
UserPageType: Up,
}
},
res => {
if (res.resultCode == 1) {
uni.setStorageSync('mall_UserInfo', res.data);
uni.removeStorageSync('pid');
uni.removeStorageSync('SmallShopId');
uni.removeStorageSync("Up");
}
}
);
},
getMicroShopBasics() {
this.request2({
url: '/api/AppletUser/GetMicroShopBasics',
data: {}
},
(res) => {
this.shopBasics = res.data;
}
);
},
goUrl(url) {
if (url == '/pages/balance/balance') {
uni.navigateTo({
url: '/pages/balance/balance?balance=' + this.user_info.balance
});
} else {
uni.navigateTo({
url: url
});
}
},
reloadUserinfo() {
this.userinfo();
this.u = this.user_info;
this.mall_UserInfo = uni.getStorageSync("mall_UserInfo") ? uni.getStorageSync("mall_UserInfo") : {};
},
login(name) {
if ((name && name.nickname == '') || !name || !name.nickname) {
this.showAuth = true;
}
},
//关闭登录窗口
gbAuth() {
this.showAuth = false;
},
scrollHandler(e) {
this.scrollTop = e.detail.scrollTop;
},
scrollTopHandler() {
this.scrollTop = 0;
},
}
};
</script> </script>
<style> <style>
.body { .body {
background: #f3f4f6; background: #f3f4f6;
} }
.userStyle .userBox {
height: 100%; .userStyle .userBox {
display: flex; height: 100%;
flex-direction: column; display: flex;
align-items: center; flex-direction: column;
background: #f3f4f6; align-items: center;
min-height: 100vh; background: #f3f4f6;
} min-height: 100vh;
.userStyle .imgbg { }
width: 100%;
height: 310px; .userStyle .imgbg {
display: flex; width: 100%;
flex-direction: column; height: 310px;
align-items: center; display: flex;
position: relative; flex-direction: column;
align-items: center;
} position: relative;
.userStyle .headimg {
width: 140rpx; }
height: 140rpx;
border-radius: 50%; .userStyle .headimg {
margin-left: 60rpx; width: 140rpx;
} height: 140rpx;
.userStyle .footprint { border-radius: 50%;
width: 80%; margin-left: 60rpx;
height: 140rpx; }
display: flex;
flex-direction: row; .userStyle .footprint {
align-items: center; width: 80%;
justify-content: space-around; height: 140rpx;
} display: flex;
.userStyle .footprint_item { flex-direction: row;
width: 200rpx; align-items: center;
height: 90rpx; justify-content: space-around;
display: flex; }
flex-direction: column;
align-items: center; .userStyle .footprint_item {
justify-content: space-between; width: 200rpx;
} height: 90rpx;
.userStyle .footprint_item_bottom { display: flex;
display: flex; flex-direction: column;
flex-direction: row; align-items: center;
align-items: center; justify-content: space-between;
justify-content: center; }
}
.userStyle .account_bar { .userStyle .footprint_item_bottom {
width: 94%; display: flex;
height: 110rpx; flex-direction: row;
border-radius: 10rpx; align-items: center;
background: #fff; justify-content: center;
display: flex; }
flex-direction: row;
align-items: center; .userStyle .account_bar {
justify-content: space-around; width: 94%;
padding: 0 20rpx; height: 110rpx;
} border-radius: 10rpx;
.userStyle .account_bar_item { background: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: row;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-around;
border-right: 1px solid #d1d1d1; padding: 0 20rpx;
width: 25%; }
}
.userStyle .account_bar_item:last-child { .userStyle .account_bar_item {
border-right: 0; display: flex;
} flex-direction: column;
.userStyle .order_bar { align-items: center;
width: 94%; justify-content: space-between;
border-radius: 10rpx; border-right: 1px solid #d1d1d1;
background: #fff; width: 25%;
display: flex; }
flex-direction: column;
align-items: center; .userStyle .account_bar_item:last-child {
padding: 30rpx; border-right: 0;
margin-top: 80rpx; }
}
.userStyle .order_bar .order_bar_list { .userStyle .order_bar {
width: 100%; width: 94%;
display: flex; border-radius: 10rpx;
flex-direction: row; background: #fff;
align-items: center; display: flex;
justify-content: space-between; flex-direction: column;
} align-items: center;
.userStyle .order_bar_item { padding: 30rpx;
display: flex; margin-top: 80rpx;
flex-direction: column; }
align-items: center;
margin-top: 20rpx; .userStyle .order_bar .order_bar_list {
position: relative; width: 100%;
} display: flex;
.userStyle .badge { flex-direction: row;
position: absolute; align-items: center;
right: -10rpx; justify-content: space-between;
top: -10rpx; }
padding: 0 12rpx;
display: flex; .userStyle .order_bar_item {
align-items: center; display: flex;
justify-content: center; flex-direction: column;
font-size: 20rpx; align-items: center;
color: #fff; margin-top: 20rpx;
height: 30rpx; position: relative;
border-radius: 15rpx; }
}
.userStyle .menus { .userStyle .badge {
width: 94%; position: absolute;
border-radius: 10rpx; right: -10rpx;
background: #fff; top: -10rpx;
display: flex; padding: 0 12rpx;
flex-direction: row; display: flex;
flex-wrap: wrap; align-items: center;
align-items: center; justify-content: center;
margin-top: 30rpx; font-size: 20rpx;
} color: #fff;
.userStyle .menus2 { height: 30rpx;
width: 94%; border-radius: 15rpx;
border-radius: 10rpx; }
background: #fff;
display: flex; .userStyle .menus {
flex-direction: column; width: 94%;
margin-top: 20rpx; border-radius: 10rpx;
/* margin-bottom: 20px; */ background: #fff;
} display: flex;
.userStyle .menus .menus_item { flex-direction: row;
width: 25%; flex-wrap: wrap;
height: 110rpx; align-items: center;
margin: 20rpx 0 10rpx; margin-top: 30rpx;
display: flex; }
flex-direction: column;
align-items: center; .userStyle .menus2 {
justify-content: space-around; width: 94%;
position: relative; border-radius: 10rpx;
} background: #fff;
.menus_item2 .contButton, display: flex;
.menus_item .contButton { flex-direction: column;
width: 100%; margin-top: 20rpx;
height: 100%; }
position: absolute;
left: 0; .userStyle .menus .menus_item {
top: 0; width: 25%;
opacity: 0; height: 110rpx;
} margin: 20rpx 0 10rpx;
.userStyle .menus2 .menus_item2 { display: flex;
width: 100%; flex-direction: column;
height: 90rpx; align-items: center;
display: flex; justify-content: space-around;
flex-direction: row; position: relative;
align-items: center; }
margin-left: 30rpx;
position: relative; .menus_item2 .contButton,
} .menus_item .contButton {
.userStyle .copyright { width: 100%;
padding: 70rpx 0; height: 100%;
display: flex; position: absolute;
flex-direction: column; left: 0;
align-items: center; top: 0;
} opacity: 0;
.userStyle .ReceiptAdder { }
position: absolute;
right: 0; .userStyle .menus2 .menus_item2 {
top: 160rpx; width: 100%;
width: 100px; height: 90rpx;
height: 24px; display: flex;
border-top-left-radius: 12px; flex-direction: row;
border-bottom-left-radius: 12px; align-items: center;
display: flex; margin-left: 30rpx;
flex-direction: row; position: relative;
align-items: center; }
padding: 0 20rpx;
background: rgba(55, 55, 55, 0.15) .userStyle .copyright {
} padding: 70rpx 0;
.userStyle .member { display: flex;
background: #3b3641; flex-direction: column;
width: 80px; align-items: center;
font-size: 10px; }
color: #fff;
height: 18px; .userStyle .ReceiptAdder {
border-radius: 9px; position: absolute;
display: flex; right: 0;
flex-direction: row; top: 160rpx;
align-items: center; width: 100px;
justify-content: space-between; height: 24px;
margin-top: 10px; border-top-left-radius: 12px;
} border-bottom-left-radius: 12px;
.userStyle .titlenav{ display: flex;
width: 100%;text-align: center;font-size: 16px;color: #FFFFFF; flex-direction: row;
} align-items: center;
.userStyle .top_b{ padding: 0 20rpx;
width: 86%; background: rgba(55, 55, 55, 0.15)
height: 65px; }
display: flex;
flex-direction: row; .userStyle .member {
align-items: center; background: #3b3641;
justify-content: space-between; width: 80px;
/* margin-top: 20px; */ font-size: 10px;
} color: #fff;
.userStyle .top_b_item{ height: 18px;
width: 26%; border-radius: 9px;
height: 50px; display: flex;
display: flex; flex-direction: row;
flex-direction: column; align-items: center;
align-items: center; justify-content: space-between;
justify-content: space-between; margin-top: 10px;
color: #FFFFFF; }
font-size: 12px;
} .userStyle .titlenav {
.userStyle .Receiptbalance{ width: 100%;
width: 94%; text-align: center;
height: 62px; font-size: 16px;
position: absolute; color: #FFFFFF;
left: 3%; }
bottom: -20px;
background: #FFFFFF; .userStyle .top_b {
border-radius: 6px; width: 86%;
display: flex; height: 65px;
flex-direction: row; display: flex;
align-items: center; flex-direction: row;
justify-content: space-around; align-items: center;
padding: 0 10px; justify-content: space-between;
} }
.userStyle .Receiptbalance_item{
width: 40%; .userStyle .top_b_item {
height: 50px; width: 26%;
display: flex; height: 50px;
flex-direction: row; display: flex;
align-items: center; flex-direction: column;
font-size: 12px; align-items: center;
color: #534D62; justify-content: space-between;
color: #FFFFFF;
} font-size: 12px;
.userStyle .headStatus { }
overflow: hidden;
position: relative; .userStyle .Receiptbalance {
width: 140vw; width: 94%;
padding-right: 40vw; height: 62px;
padding-bottom: 10px; position: absolute;
position: fixed; left: 3%;
left: 0; bottom: -20px;
right: 0; background: #FFFFFF;
top: 0; border-radius: 6px;
display: flex; display: flex;
background-image: linear-gradient( flex-direction: row;
to right, align-items: center;
#6E75EA, justify-content: space-around;
#B984EC padding: 0 10px;
); }
} .userStyle .Receiptbalance_item {
.userStyle .headStatus .arrow { width: 40%;
height: 24px; height: 50px;
margin: 5px 10px; display: flex;
width: 24px; flex-direction: row;
} align-items: center;
.userStyle .headStatus .title { font-size: 12px;
font-size: 18px; color: #534D62;
color: #fff;
flex: 1; }
width: 1px;
/* margin-left: 10px; */ .userStyle .headStatus {
line-height: 34px; overflow: hidden;
text-align: center; position: relative;
} width: 140vw;
.userStyle .topheard{ padding-right: 40vw;
display: flex;flex-direction: row;align-items: center;width: 100%; padding-bottom: 10px;
margin-bottom: 20px; position: fixed;
} left: 0;
.userStyle .miniHeadTop{ right: 0;
height:200px; top: 0;
} display: flex;
.userBox .headCommon{ background-image: linear-gradient(to right,
width:94%; #6E75EA,
margin-top:25px; #B984EC);
border-radius: 10px;
background-color: #fff; }
}
.userBox .headHasTOP{ .userStyle .headStatus .arrow {
margin-top:25px; height: 24px;
} margin: 5px 10px;
</style> width: 24px;
}
.userStyle .headStatus .title {
font-size: 18px;
color: #fff;
flex: 1;
width: 1px;
line-height: 34px;
text-align: center;
}
.userStyle .topheard {
display: flex;
flex-direction: row;
align-items: center;
width: 100%;
margin-bottom: 20px;
}
.userStyle .miniHeadTop {
height: 200px;
}
.userBox .headCommon {
width: 94%;
margin-top: 25px;
border-radius: 10px;
background-color: #fff;
}
.userBox .headHasTOP {
margin-top: 25px;
}
</style>
\ No newline at end of file
...@@ -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