Commit 0996b060 authored by 罗超's avatar 罗超

Merge branch 'master' of http://gitlab.oytour.com/viitto/mallapp

parents c535a095 91cd0889
......@@ -31,7 +31,9 @@ export default {
data() {
return {
show: true,
orderInfo: {}
orderInfo: {},
};
},
created() {
......@@ -64,6 +66,7 @@ export default {
);
},
Pay() {
let that=this;
let orderInfo = this.orderInfo;
uni.requestPayment({
provider: 'wxpay',
......@@ -75,7 +78,7 @@ export default {
success: function(res) {
console.log('success', res);
uni.navigateTo({
url: '/pages/order-submit/pay-success'
url: '/pages/order-submit/pay-success?payInfo='+JSON.stringify(that.payInfo)
});
},
fail: function(err) {
......
......@@ -28,8 +28,7 @@ export default {
backgroundImage: x.backgroundImage,
backgroundRepeat: x.backgroundRepeat,
backgroundSize: x.backgroundSize,
backgroundPosition: x.backgroundPosition,
border:'1px solid red'
backgroundPosition: x.backgroundPosition
};
if (this.ad.height == "auto") {
x.formatStyle.position = "unset";
......
......@@ -25,6 +25,7 @@
:interval="5000"
name="picUrl"
:border-radius="0"
@click="clickHandler"
></u-swiper>
</template>
......@@ -46,9 +47,9 @@ export default {
},
methods: {
clickHandler(i) {
if (banners[i].url && banners[i].url.length > 0) {
if (this.banners[i].url && this.banners[i].url.length > 0) {
uni.navigateTo({
url: banners[i].url,
url: this.banners[i].url,
});
}
},
......
......@@ -23,40 +23,38 @@
<view class="tips">{{ list.length }}</view>
</view>
<view class="goodbox update-goodbox" v-for="(y, i) in list" :key="i">
<image :src="y.goods_info.pic_url" mode="aspectFill" class="image" />
<image :src="y.CoverImagePath" mode="aspectFill" class="image" />
<view class="goodinfo">
<view class="name">{{ y.goods_info.name }}</view>
<view class="name">{{ y.GoodsName }}</view>
<view class="attr">
<text>已选择 </text>
<text
v-for="(x, xi) in y.goods_info.attr_list"
v-for="(x, xi) in y.SpecificationList"
:key="xi"
style="margin:0 5px;"
>
{{ x.attr_group_name }}{{ x.attr_name }}
{{ x }}
</text>
</view>
<view class="price">
<view class="left" :style="{ color: mc }">
<text class="small"></text>
<text>{{ y.total_original_price.split(".")[0] }}</text>
<text class="small"
>.{{ y.total_original_price.split(".")[1] || "00" }}</text
>
<text>{{ y.Final_Price }}</text>
</view>
<view class="right">x{{ y.num }}</view>
<view class="right">x{{ y.Number }}</view>
</view>
<view style="display: flex; flex-direction: row-reverse;margin-top:10px;">
<u-button
shape="circle"
size="medium"
:custom-style="customStyle"
@click="goService(y.id)"
v-if="y.refund_status==0"
@click="goService(y.DetailId)"
v-if="y.IsApplyForAfterSale==2"
>申请售后</u-button
>
<text v-if="y.refund_status!=0" style="font-size:28rpx;color:gray;">
已申请售后{{y.refund.status_text}}
<text v-if="y.IsApplyForAfterSale!=2" style="font-size:28rpx;color:gray;">
已申请售后
</text>
</view>
</view>
......
......@@ -29,6 +29,7 @@
{
"path": "pages/webbox/webbox"
}
],
"subPackages": [{
"root": "pages/goods",
......@@ -47,6 +48,16 @@
}
]
},
{
"root": "pages/member",
"pages": [{
"path": "index/index"
},
{
"path": "privilege"
}
]
},
{
"root": "pages/balance",
"pages": [{
......@@ -85,6 +96,9 @@
},
{
"path": "level/level"
},
{
"path": "examine"
}
]
......@@ -177,6 +191,9 @@
},
{
"path": "express"
},
{
"path": "expressdetail"
}
]
}
......
......@@ -30,27 +30,31 @@
@scrolltolower="lower"
:style="{ height: '100%' }">
<view style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in logsList" :key="index" class='logsList' @click="godetail(item.id)">
<view v-for="(item, index) in logsList" :key="index" class='logsList' @click="godetail(item)">
<view class="logsList_l">
<Text class='l_name'>{{item.desc}}</Text>
<Text style='font-size: 13px;color: #666;'>{{item.created_at}}</Text>
<Text class='l_name'>{{item.Description}}</Text>
<Text style='font-size: 13px;color: #666;'>{{item.CreateDate}}</Text>
</view>
<view class="logsList_r">
<Text :style="{color:item.type==1 ? mainColor:'#6ABE60'}">{{item.type==1 ? '+':'-'}}{{item.money}}</Text>
<Text :style="{color:item.Type==1 ? mainColor:'#6ABE60'}">{{item.Type==1 ? '+':'-'}}{{item.Balance}}</Text>
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth= 'goback'></auth>
<view class="loading" v-if="load">
<u-loading mode="flower" size="48"></u-loading>
<Text style='color: #fff;margin-top: 10rpx;'>加载中...</Text>
</view>
</view>
</template>
......@@ -60,7 +64,7 @@
data() {
return {
pageTitle:"余额记录",
load:false,
showAuth:false,
contentHeight:0,
mainColor: "",
......@@ -69,6 +73,18 @@
date:'',
date2:'',
logsList:[],
msg:{
pageIndex: 1,
pageSize:10,
CreateDate:''
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
components:{
......@@ -114,7 +130,7 @@
let time2 = date1.getFullYear() + "-" + (date1.getMonth() + 1)
this.date = time1
this.date2 = time2
this.msg.CreateDate = time2
this.balancedata()
this.getlogs()
},
......@@ -147,31 +163,36 @@
getlogs(){
this.load=true
uni.showNavigationBarLoading();
let h=this.apiheader()
this.request(
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: "",
header:h,
data: {
r: "api/balance/logs",
date:this.date2,
}
url: '/api/AppletUser/GetMemberBalancePageList',
data: this.msg
},
res => {
this.load=false
this.logsList = res.data.list
uni.hideNavigationBarLoading()
uni.hideLoading();
if(res.resultCode==1){
this.logsList = this.logsList.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
}
}
);
},
fun_date(num){
let date = this.date;
let date2 = this.date2;
let date2 = this.msg.CreateDate;
let currentDate = new Date(date2);
this.msg.pageIndex=1;
this.logsList=[];
if(num==-1){
let lastDate = currentDate.setMonth(currentDate.getMonth() - 1); // 输出日期格式为毫秒形式1551398400000
......@@ -183,7 +204,7 @@
lastDate = lastYear + '年' + lastMonth +'月';
let lastDate2 = lastYear + '-' + lastMonth;
this.date = lastDate;
this.date2 = lastDate2;
this.msg.CreateDate = lastDate2;
this.getlogs()
}else if(num==1){
......@@ -196,7 +217,7 @@
nextDate = nextYear + '年' + nextMonth+'月';
let nextDate2 = nextYear + '-' + nextMonth;
this.date = nextDate;
this.date2 = nextDate2;
this.msg.CreateDate = nextDate2;
this.getlogs()
}
......@@ -213,11 +234,20 @@
url: url
})
},
godetail(id){
godetail(item){
uni.navigateTo({
url: '/pages/balance/detail?id='+id
url: '/pages/balance/detail?item='+ encodeURIComponent(JSON.stringify(item))
})
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.getlogs();
} else {
this.status = "nomore";
}
},
}
}
</script>
......
......@@ -5,24 +5,31 @@
<Text>交易金额</Text>
</view>
<Text class='bd_r' :style="{color:g.type==1 ? mainColor:'#6ABE60',}">{{g.type==1 ? '+':'-'}}{{g.money}}</Text>
<Text class='bd_r' :style="{color:g.Type==1 ? mainColor:'#6ABE60',}">{{g.Type==1 ? '+':'-'}}{{g.Balance}}</Text>
</view>
<view class="bd_box" >
<view class='bd_box_l'>
<Text>交易时间</Text>
</view>
<Text >{{g.created_at}}</Text>
<Text >{{g.CreateDate}}</Text>
</view>
<view class="bd_box" style="align-items: flex-start;">
<view class='bd_box_l'>
<Text>交易详情</Text>
</view>
<view style='width: calc(100vw - 20px - 80px);'>
<Text >{{g.desc}}</Text>
<Text >{{g.Description}}</Text>
</view>
</view>
<view class="bd_box" >
<view class='bd_box_l'>
<Text>备注</Text>
</view>
<Text >{{g.Remarks}}</Text>
</view>
</view>
</template>
......@@ -54,7 +61,11 @@
},
onLoad(option){
this.getlogdetail(option.id)
if (option.item) {
this.g = JSON.parse(decodeURIComponent(option.item));
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
......@@ -65,24 +76,7 @@
methods: {
getlogdetail(id){
uni.showNavigationBarLoading();
let h=this.apiheader()
this.request(
{
url: "",
header:h,
data: {
r: "api/balance/log-detail",
id:id
}
},
res => {
uni.hideNavigationBarLoading()
this.g = res.data.detail;
}
);
},
}
......
......@@ -2,7 +2,7 @@
<view class="cdetailStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-tabs :list="list" :is-scroll="false" :current="msg.AuditStatus" @change="change" :active-color='mainColor' bg-color='#f3f4f6'></u-tabs>
<u-empty v-if="g==''" text="暂无数据" mode="data"></u-empty>
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
style="
......@@ -65,7 +65,7 @@
contentHeight:0,
mainColor:'',
secondary:'',
g:'',
g:[],
list:[
{name: '全部'},
......@@ -125,7 +125,10 @@
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
console.log(res.data.pageData)
console.log(this.g)
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
......
......@@ -98,6 +98,7 @@ export default {
mainColor: "",
active: 0,
contentHeight: 0,
pageId:0
};
},
components: {
......@@ -120,7 +121,11 @@ export default {
addialog,
quicknav
},
onLoad() {
onLoad(options) {
console.log(options,'option');
if(options&&options.page_id){
this.pageId=options.page_id
}
let c = this.$uiConfig.is_bang ? 78 : 50;
this.contentHeight = this.$utils.calcContentHeight(c);
this.init();
......@@ -138,6 +143,7 @@ export default {
{
url: '/api/Mall/GetHome',
data: {
page_id:this.pageId
},
},
(res) => {
......
<template>
<view class="memberStyle" :style="{'height':contentHeight}">
<view class='memberTop'>
<view class="memberT_box">
<view style='display: flex;flex-direction: row;align-items: center;margin-top: 10px;'>
<u-avatar src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_default.jpg" size="100"></u-avatar>
<view style='margin-left: 30px;display: flex;flex-direction: column;justify-content: space-around;height: 50px;color: #fff;'>
<Text>哈哈</Text>
<view class="member">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_cardmember-0.png" mode='aspectFill' style="width: 24px;height: 24px;border-radius: 12px;"></image>
<Text style='margin-right: 10px;'>普通用户</Text>
</view>
</view>
</view>
<view class='balance'>
<view class='balance_l'>
<Text style='font-size: 10px;'>账号余额</Text>
<Text style='font-size: 22px;'>¥0.5</Text>
</view>
<view class='balance_r' @click="gobalance()">
<Text>去充值</Text>
</view>
</view>
<view style="width: 100%;height: 200px;border-radius: 10px;overflow: hidden;margin-top: 10px;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/user_cardmember-0.png" mode='aspectFill' style="width: 100%;height: 100%;"></image>
</view>
<image src="../../../static/images/icon/card-bottom.png" mode='widthFix' style="width: 100%;position: absolute;left: 0;bottom: 0;" ></image>
</view>
</view>
<view class="memberC">
<image src="../../../static/images/icon/banner.png" mode='widthFix' style="width: 100%;margin-top: 5px;" ></image>
<view class="mc_box" @click="goUrl()">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
contentHeight:0,
mainColor:'',
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
uni.setNavigationBarTitle({
title: '会员中心',
});
},
methods: {
goUrl(){
uni.navigateTo({
url: '/pages/member/privilege'
});
},
gobalance(){
uni.navigateTo({
url: '/pages/balance/recharge'
});
}
}
}
</script>
<style>
.memberStyle{
background: #fff;
}
.memberStyle .memberTop{
width: 100%;
height: 350px;
display: flex;
flex-direction: column;
align-items: center;
background: #292A30;
position: relative;
overflow: hidden;
}
.memberStyle .memberTop .memberT_box{
width: 90%;
display: flex;
flex-direction: column;
}
.memberStyle .memberTop .member{
background: #3B3641;
width: 80px;
font-size: 10px;
color:#fff;
height: 18px;
border-radius: 9px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.memberStyle .balance{
width: 100%;
height: 80px;
background: #464954;
border-radius: 10px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 0 15px;
margin-top: 10px;
}
.memberStyle .balance_l{
display: flex;
flex-direction: column;
color: #fff;
}
.memberStyle .balance_r{
display: flex;
align-items: center;
justify-content: center;
width: 80px;
height: 30px;
border-radius: 15px;
border: 1px solid #fff;
color: #fff;
}
.memberStyle .memberC{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
}
.mc_box{
width: 94%;
height: 100px;
border-radius: 10px;
border: 1px solid #D6C8AB;
margin-top: 10px;
}
</style>
<template>
<view class="privilegeStyle" :style="{'height':contentHeight}">
<view class="privilege_t">
<image src="../../static/images/icon/privilegebg.jpeg" mode='aspectFit' style="width: 100%;height: 250px;" ></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
contentHeight:0,
mainColor:'',
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
uni.setNavigationBarTitle({
title: '会员特权说明',
});
},
methods: {
}
}
</script>
<style>
.privilegeStyle{
background: #fff;
}
.privilegeStyle .privilege_t{
width: 100%;
height: 250px;
}
</style>
......@@ -42,6 +42,9 @@
</view>
<view class="right">x{{ y.num }}</view>
</view>
<view v-if="y.address_disabled">
<u-tag size="mini" text="不在配送范围内" type="warning" />
</view>
</view>
</view>
</template>
......@@ -123,6 +126,7 @@
</view>
<view class="right">
<u-button
:disabled="mchs[0].address_enable"
size="80"
:ripple="true"
shape="circle"
......@@ -270,7 +274,7 @@ export default {
exitPay() {
this.payExit = false;
uni.redirectTo({
url: "/pages/order/index/index",
url: "/pages/order/index/index?status=0",
});
},
closePay() {
......@@ -593,6 +597,11 @@ export default {
</script>
<style>
button[disabled]{
color: rgba(0,0,0,.3)!important;
background-color: #f7f7f7!important;
}
/* @font-face {
font-family: "oswald";
src: url("https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/smallapp/Oswald-Regular.ttf");
......
......@@ -5,7 +5,7 @@
<img src="/static/images/icon/pay-success.png" class="img" />
</view>
<view class="title">订单支付成功</view>
<view class="price">实付 ¥119.00</view>
<view class="price">实付 ¥{{payInfo.total_price}}</view>
<view class="btn-box">
<u-button
style="display: inline-block;"
......@@ -53,9 +53,13 @@ export default {
},
mainColor: "",
recommend: [],
payInfo:{},
};
},
onLoad(option) {
if (option.payInfo) {
this.payInfo=JSON.parse(option.payInfo)
}
uni.setNavigationBarTitle({
title: "支付成功",
});
......@@ -82,7 +86,7 @@ export default {
},
redictToOrders() {
uni.redirectTo({
url: "/pages/order/index/index",
url: "/pages/order/index/index?status=2",
});
},
goHome() {
......
......@@ -2,25 +2,25 @@
<view class="applyrefund" v-if="!loading">
<view class="head">
<view class="goods">
<image :src="good.goods_info.pic_url" mode="aspectFill" class="image" />
<image :src="good.CoverImagePath" mode="aspectFill" class="image" />
<view class="good-info">
<view class="name-box">
<view class="name">{{ good.goods_info.name }}</view>
<view class="name">{{ good.GoodsName }}</view>
</view>
<view class="price">
<text>单价:</text>
<text style="color: #222; margin-right: 30rpx;">{{
good.unit_price
good.Final_Price
}}</text>
<text>购买数量:</text>
<text style="color: #222;">{{ good.num }}</text>
<text style="color: #222;">{{ good.Number }}</text>
</view>
</view>
</view>
</view>
<view class="apply">
<view class="item" @click="refundsHandler">
<view class="item" @click="refundsHandler(1)">
<image
src="@/static/images/icon/tui.png"
mode="aspectFill"
......@@ -32,7 +32,7 @@
<u-icon name="arrow" size="32" color="#333"></u-icon>
</view>
</view>
<view class="item">
<view class="item" @click="refundsHandler(2)">
<image
src="@/static/images/icon/huan.png"
mode="aspectFill"
......@@ -72,25 +72,23 @@ export default {
methods: {
init() {
let h = this.apiheader();
this.request(
this.request2(
{
url: "",
header: h,
url: '/api/AppletOrder/GetAppletMyOrderAfterSaleInfo',
data: {
r: "api/order/apply-refund",
id: this.id,
},
OrderDetailId: this.id
}
},
(res) => {
this.good = res.data.detail;
this.good = res.data;
this.loading = false;
uni.hideNavigationBarLoading();
}
);
},
refundsHandler() {
refundsHandler(type) {
uni.navigateTo({
url: "/pages/order/after-sale/refunds?id=" + this.id,
url: "/pages/order/after-sale/refunds?id=" + this.id +'&type=' +type,
});
},
},
......
......@@ -4,50 +4,51 @@
<view class="head" :style="[headStyle]">
<view class="detail">
<view class="status">{{
d.status_text == "已退款" ? "已完成" : d.status_text
d.ReOrderStatusName
}}</view>
<view style="margin: 0 -40rpx;" v-if="d.status!=3">
<view style="margin: 0 -40rpx;" v-if="d.ReOrderStatus!=3">
<u-steps
:list="d.type==1?statusList:statusHuanList"
:list="d.Type==1?statusList:statusHuanList"
:current="currentStatus"
active-color="#FFF"
un-active-color="#eee"
:dot-color="mc"
></u-steps>
</view>
<!-- <view style="height:45px" v-if="d.status==3">&nbsp;</view> -->
<!-- <view style="height:45px" v-if="d.ReOrderStatus==3">&nbsp;</view> -->
</view>
</view>
<view class="block shenhe">
<view class="title" v-if="d.status == 1">商家正在审核</view>
<view class="title" v-else-if="d.status == 2">商家审核通过</view>
<view class="title" v-if="d.ReOrderStatus == 1">商家正在审核</view>
<view class="title" v-else-if="d.ReOrderStatus == 2">商家审核通过</view>
<view class="title" v-else>商家拒绝退货</view>
<view class="content" v-if="d.status == 1"
<view class="content" v-if="d.ReOrderStatus == 1"
>商家已经收到了您的申请,会尽快和您取得联系,处理本次申请,请您耐心等待</view
>
<view class="content" v-else-if="d.status == 2">
<view class="content" v-else-if="d.ReOrderStatus == 2">
尊敬的客户,让您久等了,很抱歉出现了让您不满意的情况,我们将配合您尽快完成本次售后申请
</view>
<!-- TODO字段没有 -->
<view class="content" v-else>
审核留言:{{d.merchant_remark}}
审核留言:{{d.Remark}}
</view>
</view>
<view
style="margin-top: 40rpx;"
class="block"
v-if="d.status_text=='已换货'"
v-if="d.ReOrderStatusName=='已换货'"
>
<view class="good-title">换货物流</view>
<view class="filed">
<view class="key">快递公司</view>
<view class="val">
{{ d.merchant_express }}
{{ d.TExpressList[0].ExpressName }}
</view>
</view>
<view class="filed">
<view class="key">快递单号</view>
<view class="val">
{{ d.merchant_express_no }}
{{ d.TExpressList[0].ExpressNumber }}
</view>
</view>
<view class="filed">
......@@ -59,24 +60,25 @@
</view>
<view style="margin-top: 40rpx; padding-bottom: 16rpx;" class="block">
<view class="good-title">商品信息</view>
<view class="good-info" @click="reditrectToGoodHandler(d.detail[0].goods_info.id)">
<view class="good-info" @click="reditrectToGoodHandler(d.OrderInfo.OrderId)">
<image
:src="d.detail[0].goods_info.pic_url"
:src="d.OrderInfo.CoverImagePath"
class="img"
mode="aspectFill"
/>
<view class="detail">
<view class="name-box">
<view class="name">{{ d.detail[0].goods_info.name }}</view>
<view class="name">{{ d.OrderInfo.GoodsName }}</view>
</view>
<view>
<text>单价:</text>
<!-- <text>单价:</text> -->
<text>总价:</text>
<text style="font-size: 30rpx; color: #000; margin-right: 40rpx;"
>{{ d.detail[0].unit_price }}</text
>{{ d.OrderInfo.Final_Price }}</text
>
<text>数量:</text>
<text style="font-size: 30rpx; color: #000; margin-right: 40rpx;"
>{{ d.detail[0].num }}</text
>{{ d.OrderInfo.Number }}</text
>
</view>
</view>
......@@ -84,9 +86,9 @@
<view class="customer">
<button
open-type="contact"
:send-message-title="d.detail[0].goods_info.name"
:send-message-title="d.OrderInfo.GoodsName"
:send-message-path="path"
:send-message-img="d.detail[0].goods_info.pic_url"
:send-message-img="d.OrderInfo.Final_Price"
:show-message-card="true"
>
<u-icon
......@@ -129,9 +131,9 @@
</view>
<view class="filed split">
<view class="key">服务类型</view>
<view class="val">{{ d.type == 1 ? "退货" : "换货" }}</view>
<view class="val">{{ d.Type == 1 ? "退货" : "换货" }}</view>
</view>
<template v-if="d.status == 2">
<template v-if="d.ReOrderStatus == 2">
<view class="filed">
<view class="key">商品退回</view>
<view class="val">快递返回</view>
......@@ -157,7 +159,7 @@
<view
style="margin-top: 40rpx;"
class="block"
v-if="d.status == 2 && (!d.express || d.express == '')"
v-if="d.ReOrderStatus == 2 && (!d.express || d.express == '')"
>
<view class="good-title">商品寄回</view>
<view class="filed">
......@@ -208,7 +210,7 @@
<view
style="margin-top: 40rpx;"
class="block"
v-if="d.status == 2 && d.express && d.express != ''"
v-if="d.ReOrderStatus == 2 && d.express && d.express != ''"
>
<view class="good-title">商品寄回</view>
<view class="filed">
......@@ -411,27 +413,26 @@ export default {
init() {
this.isover = false;
let h = this.apiheader();
this.request(
this.request2(
{
url: "",
header: h,
url: '/api/AppletOrder/GetAppletOrderAfterSaleInfo',
data: {
r: "api/order/refund-detail",
id: this.id,
},
ReOrderId:this.id
}
},
(res) => {
this.d = res.data.detail;
this.expressList = res.data.express_list;
this.d = res.data;
this.expressList = res.data.OrderInfo;
this.loading = false;
this.currentStatus = this.d.status - 1;
if (this.d.status_text == "已发货,待商家处理") {
this.currentStatus += 1;
} else if (this.d.status_text == "待退款" || this.d.status_text == "已换货") {
this.currentStatus += 2;
} else if (this.d.status_text == "已退款") {
this.currentStatus += 3;
}
this.currentStatus = this.d.ReOrderStatus - 1;
// if (this.d.ReOrderStatusName == 1) {
// this.currentStatus += 1;
// } else if (this.d.ReOrderStatusName == "待退款" || this.d.status_text == "已换货") {
// this.currentStatus += 2;
// } else if (this.d.status_text == "已退款") {
// this.currentStatus += 3;
// }
}
);
},
......
......@@ -4,7 +4,7 @@
:style="{
height: contentHeight,
}"
v-if="!loading"
>
<view
style="height: calc(100vh - 50px); background: #fff;"
......@@ -31,7 +31,7 @@
<view class="orderList">
<view
class="listBox"
@click="redirectToDetail(item.id)"
@click="redirectToDetail(item.ReOrderId)"
v-for="(item, index) in g"
:key="index"
>
......@@ -44,33 +44,32 @@
flex: 1;
width: 1rpx;
"
>单号:{{ item.order_no }}</Text
>单号:{{ item.ReOrderNo }}</Text
>
<view class="viewtype">
<image
class="img"
v-if="item.type == 1"
v-if="item.Type == 1"
src="/static/images/icon/tui.png"
mode="aspectFill"
/>
<image
class="img"
v-if="item.type == 2"
v-if="item.Type == 2"
src="/static/images/icon/huan.png"
mode="aspectFill"
/>
<text>{{ item.type == 1 ? "退货" : "换货" }}</text>
<text>{{ item.Type == 1 ? "退货退款" : "换货" }}</text>
</view>
</view>
<view class="listBox_c">
<template v-if="item.detail.length == 1">
<template >
<!-- <template v-if="item.OrderDetailModel.length == 1"> -->
<view
v-for="(cx, ci) in item.detail"
:key="ci"
class="box_bottom"
>
<image
:src="cx.goods_info.pic_url"
:src="item.OrderDetailModel.CoverImagePath"
style="width: 140rpx; height: 140rpx; border-radius: 8rpx;"
mode="aspectFill"
/>
......@@ -86,7 +85,7 @@
>
<view style="height: 1rpx; flex: 1;">
<view class="topic_cont_text">{{
cx.goods_info.name
item.OrderDetailModel.GoodsName
}}</view>
</view>
<view>
......@@ -94,15 +93,15 @@
>申请数量:</text
>
<text style="font-size: 26rpx; color: #000;">{{
cx.goods_info.num
item.OrderDetailModel.Number
}}</text>
</view>
</view>
</view>
<view class="progress">
<view class="status-text">{{ item.status_text=='已退款'?'已完成':item.status_text }}</view>
<view class="status-text">{{ item.ReOrderStatusName }}</view>
<view class="status-tips">
<text v-if="item.status == 1"
<text v-if="item.ReOrderStatus == 1"
>请您耐心等待商家审核</text
>
</view>
......@@ -114,6 +113,14 @@
</view>
</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>
......@@ -135,15 +142,24 @@ export default {
g: [],
loading: true,
showModal: false,
item: "",
index: 0,
goodData: [],
showGoodList: false,
isover: false,
customStyle: {
marginLeft: "20px",
padding: "0 30rpx",
},
msg:{
pageIndex: 1,
pageSize:10,
OrderId:'',
ReOrderStatus:'',
ReOrderNo:'',
},
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
themCustomStyle: {
marginLeft: "20px",
padding: "0 30rpx",
......@@ -177,34 +193,33 @@ export default {
});
},
init() {
this.isover = false;
let h = this.apiheader();
this.request(
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: "",
header: h,
data: {
r: "api/order/list",
status: 5,
page: this.page,
},
url: '/api/AppletOrder/GetAppletOrderAfterPageList',
data: this.msg
},
(res) => {
this.loading = false;
this.g = this.g.concat(res.data.list);
this.page_count = res.data.pagination.page_count;
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.isover = true;
this.status = "nomore";
}
}
);
},
lower(e) {
if (this.page < this.page_count) {
this.page++;
if (this.msg.pageIndex < this.page_count) {
this.msg.pageIndex++;
this.status = "loading";
this.init();
} else {
this.isover = true;
this.status = "nomore";
}
},
},
......
......@@ -3,25 +3,25 @@
<u-top-tips ref="uTips"></u-top-tips>
<view class="head">
<view class="goods">
<image :src="good.goods_info.pic_url" mode="aspectFill" class="image" />
<image :src="good.CoverImagePath" mode="aspectFill" class="image" />
<view class="good-info">
<view class="name-box">
<view class="name">{{ good.goods_info.name }}</view>
<view class="name">{{ good.GoodsName }}</view>
</view>
<view class="price">
<text>单价:</text>
<text style="color: #222; margin-right: 30rpx;">{{
good.unit_price
good.Final_Price
}}</text>
<text>购买数量:</text>
<text style="color: #222;">{{ good.num }}</text>
<text style="color: #222;">{{ good.Number }}</text>
</view>
</view>
</view>
<view class="num-box">
<view class="left">申请数量</view>
<view class="right">
<u-number-box :disabled="forms.type==1" :min="1" :max="good.num" v-model="good.num"></u-number-box>
<u-number-box :disabled="forms.Type==1" :min="1" :max="good.Number" v-model="forms.ReNumber" @change="valChange"></u-number-box>
</view>
</view>
</view>
......@@ -35,10 +35,10 @@
placeholder="请描述申请售后服务的具体原因"
maxlength="150"
placeholder-style="font-size:13px"
:value="forms.remark"
:value="forms.Remark"
@input="inputremarkHandler"
/>
<view class="maxnum">{{ forms.remark.length }}/150</view>
<view class="maxnum">{{ forms.Remark.length }}/150</view>
</view>
<view class="upload">
<u-upload
......@@ -59,7 +59,7 @@
>为了帮您更好的解决问题,请务必上传照片凭证</view
>
</view>
<view class="apply" v-if="forms.type==1">
<view class="apply" v-if="forms.Type==1">
<view class="title">
<view class="left">退款方式</view>
<view class="right active">原支付返回</view>
......@@ -82,6 +82,7 @@
class="user-item"
style="padding-bottom: 40rpx; border-bottom: 2rpx solid #f5f5f5;"
>
<!-- TODO暂无字段 -->
<view class="icon">
<u-icon name="user-circle-o" size="32" color="#000"></u-icon>
</view>
......@@ -122,11 +123,12 @@ export default {
good: {},
loading: false,
forms: {
id: 0,
type: 1,
pic_list: [],
refund_price: 0,
remark: "",
OrderDetialId: 0,
Type: 1,
ReNumber:0,
VoucherList: [],
Refund: 0,
Remark: "",
},
submitStatus: false,
fileList: [],
......@@ -147,31 +149,30 @@ export default {
console.log("jump in");
uni.showNavigationBarLoading();
this.id = option.id || 98180;
this.forms.type = option.type || 1;
this.forms.id = this.id;
this.chosenId = option.chosenId;
this.forms.Type = option.type || 1;
this.forms.OrderDetialId = this.id;
// this.chosenId = option.chosenId;
uni.setNavigationBarTitle({
title: "退货",
title: option.type==1?"退货":'换货',
});
this.btn2.background = this.$uiConfig.mainColor;
this.init();
},
methods: {
init() {
let h = this.apiheader();
this.request(
this.request2(
{
url: "",
header: h,
url: '/api/AppletOrder/GetAppletMyOrderAfterSaleInfo',
data: {
r: "api/order/apply-refund",
id: this.id,
OrderDetailId: this.id
},
},
(res) => {
this.good = res.data.detail;
if (this.forms.type == 1) {
this.forms.refund_price = this.good.total_price;
this.good = res.data;
this.forms.ReNumber = res.data.Number;
if (this.forms.Type == 1) {
this.forms.Refund = res.data.Final_Price;
}
this.loading = false;
uni.hideNavigationBarLoading();
......@@ -179,12 +180,15 @@ export default {
);
},
inputremarkHandler(e) {
this.forms.remark = e.detail.value;
this.forms.Remark = e.detail.value;
},
uploadSuccessHandler(data, index, lists) {
console.log(JSON.parse(data));
let r = JSON.parse(data);
this.forms.pic_list.push(r.data.url);
this.forms.VoucherList.push(r.data.url);
},
valChange(val){
this.forms.ReNumber = Number(val.value) ;
},
submitHandler() {
let that = this;
......@@ -194,26 +198,21 @@ export default {
if (!that.submitStatus) {
that.submitStatus = true;
let msg = "";
if (that.forms.remark == "") {
if (that.forms.Remark == "") {
msg = "亲,请描述一下你遇到的问题吧";
} else if (that.forms.pic_list.length == 0) {
} else if (that.forms.VoucherList.length == 0) {
msg = "亲,请上传一张说明截图吧";
}
if (msg == "") {
let h = that.apiheader();
h["content-type"] = "application/x-www-form-urlencoded";
that.forms["r"] = "api/order/refund-submit";
that.request(
that.request2(
{
url: "",
header: h,
data: that.forms,
method: "POST",
url: '/api/AppletOrder/SetAppletMyOrderAfterSale',
data: that.forms
},
(res) => {
console.log(res);
if (res.code == 0) {
if (res.resultCode == 1) {
uni.showModal({
content: "提交售后申请成功,稍后客服专员将与您取得联系。",
showCancel: false,
......
......@@ -3,16 +3,16 @@
<view class="status-box">
<view class="item">
<view class="name">快递公司:</view>
<view class="val">{{ express }}</view>
<view class="val">{{ expressInfo.ExpressName }}</view>
</view>
<view class="item">
<view class="name">运单号:</view>
<view class="val">{{ express_no }}</view>
<view class="val">{{ expressInfo.ExpressNumber }}</view>
</view>
<view class="item">
<view class="name">运送状态:</view>
<view class="val" :style="{ color: mainColor }">{{
d.status_text
expressInfo.Remark
}}</view>
</view>
</view>
......@@ -81,12 +81,12 @@ export default {
data() {
return {
mainColor: "",
express: "",
express_no: "",
d: {},
loading: false,
address: "",
OrderId:0,
last: {},
expressInfo:{},
address:'',
};
},
onLoad(option) {
......@@ -94,33 +94,24 @@ export default {
title: "物流信息",
});
this.mainColor = this.$uiConfig.mainColor;
this.express = option.express || "圆通速递";
this.express_no = option.no || "YT2042624009816";
this.OrderId = option.OrderId
// this.express = option.express || "圆通速递";
// this.express_no = option.no || "YT2042624009816";
this.address = option.address || "四川成都市高新西区万景峰二期";
this.init();
},
methods: {
init() {
let h = this.apiheader();
this.request(
this.request2(
{
url: "",
header: h,
url: '/api/AppletOrder/GetAppletMyOrderExpressInfo',
data: {
r: "api/order/express-detail",
express: this.express,
express_no: this.express_no,
customer_name: "",
},
OrderId: this.OrderId
}
},
(res) => {
this.loading = false;
this.d = res.data.express;
this.d.list = this.d.list.reverse();
if (this.d.status == 3) {
this.last = this.d.list[0];
this.d.list.splice(0, 1);
}
this.expressInfo = res.data
}
);
},
......
......@@ -114,7 +114,7 @@
:custom-style="customStyle"
v-on:click.stop="cancel(item, index)"
v-if="
item.OrderStatusName == '未付款' || item.OrderStatusName == '待发货'
item.OrderStatus == '1' || item.OrderStatus == '2'
"
>取消订单</u-button
>
......@@ -126,44 +126,52 @@
v-if="item.OrderStatusName == '待发货'"
>申请退货</u-button
> -->
<u-button
<!-- <u-button
shape="circle"
size="medium"
:custom-style="customStyle"
v-if="item.OrderStatusName == '待评价'"
v-if="item.OrderStatus == '4'"
>评价晒单</u-button
> -->
<u-button
shape="circle"
size="medium"
:custom-style="customStyle"
v-if="item.OrderStatus == '6'"
>待处理</u-button
>
<u-button
shape="circle"
size="medium"
:custom-style="themCustomStyle"
v-on:click.stop="payment(item)"
v-if="item.OrderStatusName == '未付款'"
v-if="item.OrderStatus == '1'"
>立即支付</u-button
>
<u-button
shape="circle"
size="medium"
:custom-style="
item.OrderStatusName == '待收货' ? customStyle : themCustomStyle
item.OrderStatus == '3' ? customStyle : themCustomStyle
"
v-if="item.OrderStatusName != '未付款'"
v-if="item.OrderStatus != '1'"
@click.stop="buy(item)"
>再次购买</u-button
>
<u-button
<!-- <u-button
shape="circle"
size="medium"
:custom-style="customStyle"
v-if="item.OrderStatusName == '待收货'"
v-if="item.OrderStatus == '3'"
@click="goExpressHandler(orders)"
>查看物流</u-button
>
> -->
<u-button
shape="circle"
size="medium"
:custom-style="customStyle"
v-if="item.OrderStatusName == '待收货'"
@click="shouhuoHandler(item.id)"
v-if="item.OrderStatus == '3'"
@click="shouhuoHandler(item.OrderId)"
>确认收货</u-button
>
</view>
......@@ -182,7 +190,7 @@
</view>
<!-- 取消提示 -->
<u-modal
<!-- <u-modal
v-model="showModal"
content="是否取消订单?"
:show-cancel-button="true"
......@@ -190,7 +198,29 @@
@confirm="confirm"
:border-radius="20"
>
</u-modal>
</u-modal> -->
<u-popup v-model="showModal"
mode="center"
length="80%">
<view style='display: flex;flex-direction: column;align-items: center;background: #fff;'>
<view style="display: flex;align-items: center;justify-content: center;height:70px ;">
<Text>是否取消订单?</Text>
</view>
<view style="display: flex;flex-direction: column;height:80px ;margin-left: 15px;width: 100%;" v-if='msg.OrderStatus==2'>
<Text style='margin-left: 10px;margin-top: 5px;'>备注</Text>
<input class="uni-input inputM" style='margin-left: 10px;margin-top: 5px;' v-model="Cancelmsg.Remark" placeholder="输入备注"/>
</view>
<view style="display: flex;flex-direction: row;align-items: center;height: 50px;border-top: 1px solid #F5F5F5;width: 100%;">
<view style="width: 50%;display: flex;align-items: center;justify-content: center" @click="showModal=false">
<Text>取消</Text>
</view>
<view style="width: 50%;color: #a0cfff;display: flex;align-items: center;justify-content: center" @click="confirm">
<Text>确定</Text>
</view>
</view>
</view>
</u-popup>
<u-modal
v-model="showReviceModal"
content="是否确认收货?"
......@@ -199,7 +229,7 @@
@confirm="submitReviceGoodHandler"
:border-radius="20"
></u-modal>
<u-toast ref="uToast" />
<good-list
:list="goodData"
v-if="showGoodList"
......@@ -241,7 +271,7 @@ export default {
payExit:false,
page_count: 1,
g: [],
submitId:0,
showModal: false,
item: "",
index: 0,
......@@ -358,24 +388,24 @@ export default {
shouhuoHandler(id) {
this.showReviceModal = true;
this.submitId = id;
},
submitReviceGoodHandler() {
let that = this;
let h = this.apiheader();
submitReviceGoodHandler() { //确认收货
let that = this
uni.requestSubscribeMessage({
tmplIds: that.template_message_list,
complete(res) {
that.request(
that.request2(
{
url: "",
header: h,
url: '/api/AppletOrder/SetAppletOrderGoodsReceiving',
data: {
r: "api/order/confirm",
id: that.submitId,
},
OrderId: that.submitId
}
},
(res) => {
that.$refs.uToast.show({ title: res.msg });
uni.showToast({
title:res.message
})
that.change(4);
}
);
......@@ -425,6 +455,7 @@ export default {
},
cancel(e, index) {
this.showModal = true;
this.Cancelmsg.Remark= '',
this.index = index;
this.item = e;
this.Cancelmsg.OrderId = e.OrderId;
......@@ -454,11 +485,25 @@ export default {
data: this.Cancelmsg
},
(res) => {
if(this.Cancelmsg.Type==1){
uni.showToast({
title:res.message,
icon:'none'
})
this.g.splice(this.index, 1);
}else{
uni.showToast({
title: "取消成功,请等待审核",
position: "bottom",
icon: "none",
duration: 2000,
});
this.msg.pageIndex = 1;
this.g = [];
this.init();
}
}
);
},
......@@ -499,7 +544,6 @@ export default {
reloadUserinfo() {
this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false;
this.init();
this.getOrderStatus();
},
goback(){
......
This diff is collapsed.
......@@ -25,10 +25,10 @@
</view>
<view class="box_center" @click="isdetail(index)">
<view class="center_l" >
<!-- TODO暂不确定头像字段字段的名字 -->
<u-avatar :src="item.Photo" mode="square" size="70"></u-avatar>
<view class="box_ltext">
<Text class='l_name'>{{item.nickname}}</Text>
<Text class='l_name'>{{item.UserName}}</Text>
</view>
<Text v-if='item.Grade==0'>自购返佣</Text>
<Text v-if='item.Grade==1'>一级分销</Text>
......@@ -36,7 +36,7 @@
</view>
<view class="center_l">
<!-- TODO返佣金额 -->
<Text>预计佣金:<Text :style="{color:mainColor}">{{item.share_money}}</Text></Text>
<Text>预计佣金:<Text :style="{color:mainColor}">0</Text></Text>
<u-icon name="arrow" v-if='item.showdetail==false'></u-icon>
<u-icon name="arrow-down" v-if='item.showdetail==true'></u-icon>
</view>
......
<template>
<view class="examineStyle" :style="{'height':contentHeight}">
<view style="width: 100%;height: 100%;">
<u-empty v-if="g.length==0" text="暂无数据" mode="data"></u-empty>
<template v-if="g.length > 0">
<view
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 style="display: flex;flex-direction: column;align-items: center;">
<view v-for="(item, index) in g" :key="index" class="listbox">
<view class="box_top">
<u-avatar :src="item.Photo" size="110"></u-avatar>
<view class="box_r">
<view style="width: 100%;display: flex;flex-direction: row;align-items: center;justify-content: space-between;">
<view style="width: 190px;">
<Text class='l_name'>{{item.UserName}}</Text>
</view>
<Text style='font-size: 12px;'>来源:{{item.SourceName}}</Text>
</view>
<Text style='font-size: 12px;'>申请时间:{{item.CreateDate}}</Text>
</view>
</view>
<view class="box_b">
<Text >分销商名称:{{item.Name}}</Text>
<Text >分销商电话:{{item.Mobile}}</Text>
</view>
<view class="box_bootom">
<u-button type="error"size="mini" style='margin-right: 15px;' @click='handle(2,item.UserId)'>拒绝</u-button>
<u-button type="success" size="mini" @click='handle(1,item.UserId)'>同意</u-button>
<!-- <view class="box_bo_item" style="margin-right: 15px;">
<Text style='color: #19be6b;'>同意</Text>
</view>
<view class="box_bo_item">
<Text style='color: #fa3534;'>拒绝</Text>
</view> -->
</view>
</view>
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#f3f4f6"
/>
</scroll-view>
</view>
</template>
</view>
<u-modal
v-model="showModal"
:content="timsg.Type==1?'通过审核':'拒绝通过'"
:show-cancel-button="true"
:show-title="false"
@confirm="confirm"
:border-radius="20"
></u-modal>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "分销商审核",
contentHeight:0,
mainColor:'',
secondary:'',
current:0,
g:[],
timsg:{
UserId:0,
Type:0,
},
showModal:false,
msg:{
pageIndex: 1,
pageSize:10,
Name:'',
Source:'',
NickName:'',
Mobile:'',
},
page_count:1,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
}
},
created(){
this.contentHeight = this.$utils.calcContentHeight(-40)+'px';
this.mainColor = this.$uiConfig.mainColor;
this.secondary = this.$uiConfig.secondary;
this.init()
},
mounted() {
let currentPages = getCurrentPages();
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: this.pageTitle,
});
},
methods: {
init(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/GetHpUserReferralsAuditList',
data: this.msg
},
(res) => {
uni.hideLoading();
this.g = this.g.concat(res.data.pageData);
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++;
this.status = "loading";
this.init();
} else {
this.status = "nomore";
}
},
handle(type,UserId){
this.timsg.Type = type;
this.timsg.UserId = UserId;
this.showModal=true;
},
confirm(){
uni.showLoading({
title: '加载中'
});
this.request2(
{
url: '/api/AppletUser/SetHpUserReferralsAudit',
data: this.timsg
},
(res) => {
uni.hideLoading();
this.g=[];
this.msg.pageIndex=1;
this.init();
}
);
}
}
}
</script>
<style>
.examineStyle{
background: #f3f4f6;
}
.examineStyle .loading{
width: 200rpx;
height: 200rpx;
background: #000000;
opacity: 0.7;
border-radius: 10rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: fixed;
left: 50%;
top:30%;
margin-left: -100rpx;
z-index: 999;
}
.examineStyle .listbox{
width: 100%;
background: #fff;
padding: 0 15px;
margin-bottom: 15px;
display: flex;
flex-direction: column;
align-items: center;
}
.examineStyle .box_top{
width:100% ;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 10px 0 ;
border-bottom: 1px solid #f5f5f5;
}
.examineStyle .box_r{
width: calc(100vw - 30px - 55px - 20px);
height: 55px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.box_r .l_name{
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.examineStyle .box_b{
width: 100%;
padding: 15px 0;
display: flex;
flex-direction: column;
}
.examineStyle .box_bootom{
width: 100%;
height: 60px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-end;
}
.examineStyle .box_bootom .box_bo_item{
width: 50px;
height: 30px;
border-radius: 15px;
display: flex;
align-items: center;
justify-content: center;
border: 1px solid #c8c9cc;
}
</style>
......@@ -92,6 +92,11 @@
<Text class='item_text'>{{sharedata.CustomModel.PromoteQRCodeName}}</Text>
</view>
<view class="menus_item" @click="goUrl('/pages/share/examine')" v-if='sharedata.UserInfo.HpReferralsGradeAudit==1'>
<!-- <image :src="sharedata.CustomModel.PromoteQRCodeImage" style="width: 30px;height: 30px" mode='widthFix'></image> -->
<Text class='item_text'>分销商审核</Text>
</view>
</view>
</view>
......
......@@ -4,15 +4,15 @@
<view :style="{ 'background-image': 'url(' + level_bg2 + ')', backgroundSize: '100%' }" v-if='level_bg2!="" ' class="imgbg">
<Text class='leveltop'>满足以下条件即可升级</Text>
<view class='levelc'>
<Text>{{level.GradeInfo.UpGradeConditionName}}</Text>
<Text>{{level.GradeInfo.UpGradeConditionName}}{{level.GradeInfo.ReferralsNumber}}</Text>
<view style="display: flex;flex-direction: row;align-items: center;" @click="show=true">
<Text style='font-size: 14px;color:#c8c9cc ;'>等级说明</Text>
<u-icon name="arrow" color='#c8c9cc'></u-icon>
</view>
</view>
<view class="level_b">
<!-- TODO接口暂无 -->
<view class="level_b" @click="Upgrade">
<Text>立即升级</Text>
</view>
</view>
......@@ -80,7 +80,6 @@
methods: {
init(){
uni.showNavigationBarLoading();
let h = this.apiheader();
this.request2(
{
......@@ -94,6 +93,27 @@
}
);
},
Upgrade(){
uni.showNavigationBarLoading();
this.request2(
{
url: '/api/AppletUser/SetUserDistrbutorUpgrade',
data: {
Id:this.level.GradeInfo.Id
}
},
(res) => {
uni.hideNavigationBarLoading()
uni.showToast({
title:res.message,
icon:'none'
})
}
);
}
}
}
</script>
......
<template>
<view class="userStyle">
<view class="userBox" :style="{ 'margin-bottom': bottommargin }">
<view :style="{ 'background-image': 'url(' + meueData.user_center.top_pic_url + ')', backgroundSize: '100% 330rpx' }" class="imgbg">
<view :style="{ 'background-image': 'url(' + (meueData.user_center.top_pic_url?meueData.user_center.top_pic_url:'') + ')', backgroundSize: '100% 330rpx' }" class="imgbg">
<view style="display: flex;flex-direction: row;align-items: center;width: 100%;" v-if="meueData.user_center.top_style == 1">
<u-avatar :src="user_info.avatar" size="140" style="margin-left: 50rpx;"></u-avatar>
<view style="display: flex;flex-direction: column;justify-content: center;">
<Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
<view class="member" @click="goUrl('/pages/member/index/index')">
<image :src="meueData.user_center.top_pic_url" mode='aspectFill' style="width: 26px;height: 26px;border-radius: 13px;"></image>
<Text style='margin-right: 10px;'>{{user_info.identity.level_name!=null ?user_info.identity.level_name:'普通用户' }}</Text>
</view>
</view>
</view>
<view style="display: flex;flex-direction: column;align-items: center;" v-if="meueData.user_center.top_style == 2">
<u-avatar :src="user_info.avatar" size="140"></u-avatar>
<Text style="color: #FFF;margin-left: 20rpx;font-size: 36rpx;" @click="login(user_info)">{{ user_info.nickname ? user_info.nickname : '立即登录' }}</Text>
<view class="member" @click="goUrl('/pages/member/index/index')">
<image :src="meueData.user_center.top_pic_url" mode='aspectFill' style="width: 26px;height: 26px;border-radius: 13px;"></image>
<Text style='margin-right: 10px;'>{{user_info.identity.level_name!=null ?user_info.identity.level_name:'普通用户' }}</Text>
</view>
</view>
<view class="ReceiptAdder" @click="goUrl('/pages/address/address')" :style="{ background: mainColor }">
<u-icon name="location" color="#fff" size="40"></u-icon>
......@@ -66,7 +77,7 @@
<!-- 待评价 -->
<view v-if="item.link_url =='/pages/order/index/index?status=4'&&user_info.MyOrder.WaitCommentNum>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.WaitCommentNum }}</view>
<!-- 售后 -->
<view v-if="item.link_url =='/pages/order/index/index?status=5'&&user_info.MyOrder.AfterSaleNum>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.AfterSaleNum }}</view>
<view v-if="item.link_url =='/pages/order/refund/index'&&user_info.MyOrder.AfterSaleNum>0" class="badge" :style="{ background: mainColor }">{{ user_info.MyOrder.AfterSaleNum }}</view>
</view>
</view>
</view>
......@@ -181,9 +192,16 @@ console.log(wx.getStorageSync('basedata'))
);
},
goUrl(url) {
if(url =='/pages/order/refund/index'){
uni.navigateTo({
url: '/pages/order/after-sale/refunds-list'
});
}else{
uni.navigateTo({
url: url
});
}
},
reloadUserinfo() {
this.userinfo();
......@@ -363,4 +381,16 @@ console.log(wx.getStorageSync('basedata'))
align-items: center;
padding: 0 20rpx;
}
.userStyle .member{
background: #3B3641;
width: 80px;
font-size: 10px;
color:#fff;
height: 18px;
border-radius: 9px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
</style>
export default {
install(Vue, options) {
Vue.prototype.host = "https://wx.weibaoge.cn/web/index.php?_mall_id=1285"
//Vue.prototype.host2 = "http://192.168.0.110:8200"
Vue.prototype.host2 = "https://mallApi.oytour.com"
//Vue.prototype.host2 = "https://mallApi.oytour.com"
//Vue.prototype.host2 = "http://mallapi.oytour.com"
Vue.prototype.request = function(param, success, failed) {
//网络请求
uni.request({
url: this.host + "&r=" + param.data.r,
method: param.method || "GET",
header: param.header || {
'content-type': "application/json"
},
data: param.data,
success: res => {
if (res.data.code != 0 && res.data.msg != "商品未上架") {
}
typeof success == "function" && success(res.data);
},
fail: (e) => {
console.log("网络请求fail:" + JSON.stringify(e));
uni.showModal({
content: "" + res.errMsg
});
typeof failed == "function" && failed(res.data);
}
});
}
Vue.prototype.request2 = function(param, success, failed) {
//网络请求
uni.request({
......
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