修改html标签为uni标签,修改rem单位为rpx,修改提示及确认为uniapi,修改登录模块为uni接口,修改css入口为APP.vue,增加app端样式支持
This commit is contained in:
@ -1,148 +1,152 @@
|
||||
<template>
|
||||
<div class="user">
|
||||
<div class="header bg-color-red acea-row row-between-wrapper">
|
||||
<div class="picTxt acea-row row-between-wrapper">
|
||||
<div class="pictrue">
|
||||
<img :src="userInfo.avatar" />
|
||||
</div>
|
||||
<div class="text">
|
||||
<div class="acea-row row-middle">
|
||||
<div class="name line1">{{ userInfo.nickname }}</div>
|
||||
<div class="member acea-row row-middle" v-if="userInfo.vip">
|
||||
<img :src="userInfo.vipIcon" />
|
||||
{{ userInfo.vipName }}
|
||||
</div>
|
||||
</div>
|
||||
<div @click="goPersonalData()" class="id" v-if="userInfo.phone">
|
||||
ID:{{ userInfo.uid || 0}}
|
||||
<span class="iconfont icon-bianji1"></span>
|
||||
</div>
|
||||
<view class="user">
|
||||
<view class="header bg-color-red acea-row row-between-wrapper">
|
||||
<view class="picTxt acea-row row-between-wrapper">
|
||||
<view class="pictrue">
|
||||
<image :src="userInfo.avatar" />
|
||||
</view>
|
||||
<view class="text">
|
||||
<view class="acea-row row-middle">
|
||||
<view class="name line1">{{ userInfo.nickname }}</view>
|
||||
<view class="member acea-row row-middle" v-if="userInfo.vip">
|
||||
<image :src="userInfo.vipIcon" />
|
||||
<text>{{ userInfo.vipName }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view @click="goPersonalData()" class="id" v-if="userInfo.phone">
|
||||
<text>ID:{{ userInfo.uid || 0}}</text>
|
||||
<text class="iconfont icon-bianji1"></text>
|
||||
</view>
|
||||
<button
|
||||
open-type="getPhoneNumber"
|
||||
@getphonenumber="getPhoneNumber"
|
||||
class="binding"
|
||||
v-else
|
||||
>
|
||||
<span>绑定手机号</span>
|
||||
<text>绑定手机号</text>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<span class="iconfont icon-shezhi" @click="goPersonalData()"></span>
|
||||
</div>
|
||||
<div class="wrapper">
|
||||
<div class="nav acea-row row-middle">
|
||||
<div @click="goUserAccount()" class="item">
|
||||
<div>我的余额</div>
|
||||
<div class="num">{{ userInfo.nowMoney || 0 }}</div>
|
||||
</div>
|
||||
<div
|
||||
</view>
|
||||
</view>
|
||||
<text class="iconfont icon-shezhi" @click="goPersonalData()"></text>
|
||||
</view>
|
||||
<view class="wrapper">
|
||||
<view class="nav acea-row row-middle">
|
||||
<view @click="goUserAccount()" class="item">
|
||||
<text>我的余额</text>
|
||||
<text class="num">{{ userInfo.nowMoney || 0 }}</text>
|
||||
</view>
|
||||
<view
|
||||
@click="goUserPromotion()"
|
||||
class="item"
|
||||
v-if="userInfo.isPromoter === 1 || userInfo.statu === 2"
|
||||
>
|
||||
<div>当前佣金</div>
|
||||
<div class="num">{{ userInfo.brokeragePrice || 0 }}</div>
|
||||
</div>
|
||||
<div @click="goIntegral()" class="item" v-else>
|
||||
<div>当前积分</div>
|
||||
<div class="num">{{ userInfo.integral || 0 }}</div>
|
||||
</div>
|
||||
<div @click="goUserCoupon()" class="item">
|
||||
<div>优惠券</div>
|
||||
<div class="num">{{ userInfo.couponCount || 0 }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="myOrder">
|
||||
<div class="title acea-row row-between-wrapper">
|
||||
<div>我的订单</div>
|
||||
<div @click="goMyOrder()" class="allOrder">
|
||||
<text>当前佣金</text>
|
||||
<text class="num">{{ userInfo.brokeragePrice || 0 }}</text>
|
||||
</view>
|
||||
<view @click="goIntegral()" class="item" v-else>
|
||||
<text>当前积分</text>
|
||||
<text class="num">{{ userInfo.integral || 0 }}</text>
|
||||
</view>
|
||||
<view @click="goUserCoupon()" class="item">
|
||||
<text>优惠券</text>
|
||||
<text class="num">{{ userInfo.couponCount || 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="myOrder">
|
||||
<view class="title acea-row row-between-wrapper">
|
||||
<text>我的订单</text>
|
||||
<text @click="goMyOrder()" class="allOrder">
|
||||
全部订单
|
||||
<span class="iconfont icon-jiantou"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="orderState acea-row row-middle">
|
||||
<div @click="goMyOrder(0)" class="item">
|
||||
<div class="pictrue">
|
||||
<img :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" />
|
||||
<span
|
||||
<text class="iconfont icon-jiantou"></text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="orderState acea-row row-middle">
|
||||
<view @click="goMyOrder(0)" class="item">
|
||||
<view class="pictrue">
|
||||
<image :src="$VUE_APP_RESOURCES_URL + '/images/dfk.png'" />
|
||||
<text
|
||||
class="order-status-num"
|
||||
v-if="orderStatusNum.unpaidCount > 0"
|
||||
>{{ orderStatusNum.unpaidCount }}</span>
|
||||
</div>
|
||||
<div>待付款</div>
|
||||
</div>
|
||||
<div @click="goMyOrder(1)" class="item">
|
||||
<div class="pictrue">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" />
|
||||
<span
|
||||
>{{ orderStatusNum.unpaidCount }}</text>
|
||||
</view>
|
||||
<view>待付款</view>
|
||||
</view>
|
||||
<view @click="goMyOrder(1)" class="item">
|
||||
<view class="pictrue">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/dfh.png'" />
|
||||
<text
|
||||
class="order-status-num"
|
||||
v-if="orderStatusNum.unshippedCount > 0"
|
||||
>{{ orderStatusNum.unshippedCount }}</span>
|
||||
</div>
|
||||
<div>待发货</div>
|
||||
</div>
|
||||
<div @click="goMyOrder(2)" class="item">
|
||||
<div class="pictrue">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" />
|
||||
<span
|
||||
>{{ orderStatusNum.unshippedCount }}</text>
|
||||
</view>
|
||||
<view>待发货</view>
|
||||
</view>
|
||||
<view @click="goMyOrder(2)" class="item">
|
||||
<view class="pictrue">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/dsh.png'" />
|
||||
<text
|
||||
class="order-status-num"
|
||||
v-if="orderStatusNum.receivedCount > 0"
|
||||
>{{ orderStatusNum.receivedCount }}</span>
|
||||
</div>
|
||||
<div>待收货</div>
|
||||
</div>
|
||||
<div @click="goMyOrder(3)" class="item">
|
||||
<div class="pictrue">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" />
|
||||
<span
|
||||
>{{ orderStatusNum.receivedCount }}</text>
|
||||
</view>
|
||||
<text>待收货</text>
|
||||
</view>
|
||||
<view @click="goMyOrder(3)" class="item">
|
||||
<view class="pictrue">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/dpj.png'" />
|
||||
<text
|
||||
class="order-status-num"
|
||||
v-if="orderStatusNum.evaluatedCount > 0"
|
||||
>{{ orderStatusNum.evaluatedCount }}</span>
|
||||
</div>
|
||||
<div>待评价</div>
|
||||
</div>
|
||||
<div @click="goReturnList()" class="item">
|
||||
<div class="pictrue">
|
||||
<img :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" />
|
||||
<span
|
||||
>{{ orderStatusNum.evaluatedCount }}</text>
|
||||
</view>
|
||||
<text>待评价</text>
|
||||
</view>
|
||||
<view @click="goReturnList()" class="item">
|
||||
<view class="pictrue">
|
||||
<image :src="$VUE_APP_RESOURCES_URL+'/images/sh.png'" />
|
||||
<text
|
||||
class="order-status-num"
|
||||
v-if="orderStatusNum.refundCount > 0"
|
||||
>{{ orderStatusNum.refundCount }}</span>
|
||||
</div>
|
||||
<div>售后/退款</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="myService">
|
||||
<div class="title acea-row row-middle">我的服务</div>
|
||||
<div class="serviceList acea-row row-middle">
|
||||
>{{ orderStatusNum.refundCount }}</text>
|
||||
</view>
|
||||
<text>售后/退款</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="myService">
|
||||
<view class="title acea-row row-middle">
|
||||
<text>我的服务</text>
|
||||
</view>
|
||||
<view class="serviceList acea-row row-middle">
|
||||
<template v-for="(item, MyMenusIndex) in MyMenus">
|
||||
<div class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
|
||||
<div class="pictrue">
|
||||
<img :src="item.pic" />
|
||||
</div>
|
||||
<div>{{ item.name }}</div>
|
||||
</div>
|
||||
<view class="item" :key="MyMenusIndex" @click="goPages(MyMenusIndex)" v-if="item.url">
|
||||
<view class="pictrue">
|
||||
<image :src="item.pic" />
|
||||
</view>
|
||||
<view>{{ item.name }}</view>
|
||||
</view>
|
||||
</template>
|
||||
<!--<div-->
|
||||
<!--class="item"-->
|
||||
<!--@click="changeswitch(true)"-->
|
||||
<!--v-if="userInfo.phone && isWeixin"-->
|
||||
<!-->-->
|
||||
<!--<div class="pictrue"><img :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></div>-->
|
||||
<!--<div>账号切换</div>-->
|
||||
<!--</div>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p style="text-align: center;margin-top: 1rem">By@意象</p>
|
||||
<div class="footer-line-height"></div>
|
||||
</view>
|
||||
</view>
|
||||
<!--<view -->
|
||||
<!--class="item"-->
|
||||
<!--@click="changeswitch(true)"-->
|
||||
<!--v-if="userInfo.phone && isWeixin"-->
|
||||
<!-->-->
|
||||
<!--<view class="pictrue"><image :src="$VUE_APP_RESOURCES_URL+'/images/switch.png'" /></view>-->
|
||||
<!--<view>账号切换</!--<view>-->
|
||||
<!--</!--<view>-->
|
||||
<!-- </view>
|
||||
</view>-->
|
||||
</view>
|
||||
<view style="text-align: center;margin-top: 1rem">By@意象</view>
|
||||
<view class="footer-line-height"></view>
|
||||
<SwitchWindow
|
||||
v-on:changeswitch="changeswitch"
|
||||
:switchActive="switchActive"
|
||||
:login_type="userInfo.login_type"
|
||||
></SwitchWindow>
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { getUser, getMenuUser, bindingPhone } from "@/api/user";
|
||||
@ -186,7 +190,9 @@ export default {
|
||||
goMyOrder(type) {
|
||||
this.$yrouter.push({
|
||||
path: "/pages/order/MyOrder/index",
|
||||
query: { type }
|
||||
query: {
|
||||
type
|
||||
}
|
||||
});
|
||||
},
|
||||
goUserCoupon() {
|
||||
@ -199,7 +205,9 @@ export default {
|
||||
this.$yrouter.push("/pages/user/promotion/UserPromotion/index");
|
||||
},
|
||||
goUserAccount() {
|
||||
this.$yrouter.push({ path: "/pages/user/UserAccount/index" });
|
||||
this.$yrouter.push({
|
||||
path: "/pages/user/UserAccount/index"
|
||||
});
|
||||
},
|
||||
goPersonalData() {
|
||||
this.$yrouter.push("/pages/user/PersonalData/index");
|
||||
@ -207,7 +215,9 @@ export default {
|
||||
getPhoneNumber: function(e) {
|
||||
console.log(e.mp.detail);
|
||||
if (e.mp.detail.errMsg == "getPhoneNumber:ok") {
|
||||
uni.showLoading({ title: "绑定中" });
|
||||
uni.showLoading({
|
||||
title: "绑定中"
|
||||
});
|
||||
wx.login({
|
||||
success: loginRes => {
|
||||
bindingPhone({
|
||||
@ -263,18 +273,31 @@ export default {
|
||||
url === "/pages/user/promotion/UserPromotion/index" &&
|
||||
this.userInfo.statu === 1
|
||||
) {
|
||||
if (!this.userInfo.isPromoter)
|
||||
return this.$dialog.toast({ mes: "您还没有推广权限!!" });
|
||||
if (!this.userInfo.isPromoter) {
|
||||
uni.showToast({
|
||||
title: "您还没有推广权限!!",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
url === "/pages/orderAdmin/OrderIndex/index" &&
|
||||
!this.userInfo.adminid
|
||||
) {
|
||||
return this.$dialog.toast({ mes: "您还不是管理员!!" });
|
||||
uni.showToast({
|
||||
title: "您还不是管理员!!",
|
||||
icon: "none",
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.$yrouter.push({ path: this.MyMenus[index].uniapp_url });
|
||||
this.$yrouter.push({
|
||||
path: this.MyMenus[index].uniapp_url
|
||||
});
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
@ -289,6 +312,7 @@ export default {
|
||||
.footer-line-height {
|
||||
height: 1rem;
|
||||
}
|
||||
|
||||
.order-status-num {
|
||||
min-width: 0.33rem;
|
||||
background-color: #fff;
|
||||
@ -305,9 +329,11 @@ export default {
|
||||
.pictrue {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.switch-h5 {
|
||||
margin-left: 0.2rem;
|
||||
}
|
||||
|
||||
.binding {
|
||||
margin-top: 0.1rem;
|
||||
display: inline-block;
|
||||
|
Reference in New Issue
Block a user