|
|
@@ -6,41 +6,22 @@
|
|
|
<div class="user-wrap-top">
|
|
|
<div class="user-blo-left">
|
|
|
<div class="user-name-warp">
|
|
|
- <div class="user-name">{{ shopUser.name }}</div>
|
|
|
+ <div class="user-name">石少华</div>
|
|
|
<div class="user-level-img">
|
|
|
- <block v-if="!$util.isEmpty(shopUser)">
|
|
|
- <template v-if="1==1">
|
|
|
+ <block>
|
|
|
+ <template>
|
|
|
<div class="nomal-text">普通客户</div>
|
|
|
</template>
|
|
|
- <template v-else>
|
|
|
- <template v-if="shopUser.member > 0">
|
|
|
- <appVipModule
|
|
|
- class="level-img"
|
|
|
- :vipImgUrl="`${constant.imgUrl}/retail/member/grade/${shopUser.member}.png`"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <template v-if="mobile != '' && subscribe == 1">
|
|
|
- <appVipModule
|
|
|
- class="level-img"
|
|
|
- :vipImgUrl="`${constant.imgUrl}/retail/member/grade/member.png`"
|
|
|
- />
|
|
|
- </template>
|
|
|
- <template v-else>
|
|
|
- <div class="nomal-text">普通客户</div>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
- </template>
|
|
|
</block>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="user-level">
|
|
|
- <div>成长值 {{ shopUser.growth }}/{{ shopUser.userAsset.nextLevelGrowth }}</div>
|
|
|
+ <div>ID 98</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="user-blo-right login-attr-wrap">
|
|
|
<img
|
|
|
- :src="smallAvatarUrl | default_avatar"
|
|
|
+ :src="`${constant.imgUrl}/hhb_small.png`"
|
|
|
alt="头像"
|
|
|
mode="widthFix"
|
|
|
/>
|
|
|
@@ -49,37 +30,41 @@
|
|
|
<div class="user-wrap-bottom">
|
|
|
<div class="level-lint">
|
|
|
<progress
|
|
|
- :percent="percentNum"
|
|
|
+ percent="0"
|
|
|
stroke-width="2"
|
|
|
activeColor="#ffe4bd"
|
|
|
backgroundColor="#FF2842"
|
|
|
/>
|
|
|
</div>
|
|
|
- <div>ID {{ shopUser.id }}</div>
|
|
|
+ <div>成长值 580 </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</div>
|
|
|
- <template v-if="!$util.isEmpty(shopUser)">
|
|
|
+ <template>
|
|
|
<div class="surplus-wrap">
|
|
|
<div class="surplus-left">
|
|
|
<div>我的余额(¥)</div>
|
|
|
- <div class="my-surplus">{{ shopUser.userAsset.balance || 0.00 }}</div>
|
|
|
+ <div class="my-surplus">0.00</div>
|
|
|
</div>
|
|
|
<div class="surplus-right">
|
|
|
-
|
|
|
<button
|
|
|
class="button-com red"
|
|
|
- @click="pageToFn({
|
|
|
- url: '/pages/pay/index',
|
|
|
- query: {
|
|
|
- pageStatus: 'payment'
|
|
|
- }
|
|
|
- })"
|
|
|
- >付款</button>
|
|
|
+ @click="
|
|
|
+ pageToFn({
|
|
|
+ url: '/pages/pay/index',
|
|
|
+ query: {
|
|
|
+ pageStatus: 'payment',
|
|
|
+ },
|
|
|
+ })
|
|
|
+ "
|
|
|
+ >
|
|
|
+ 付款
|
|
|
+ </button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+
|
|
|
<div class="list-content">
|
|
|
<tui-list-view class="tui-list-view">
|
|
|
<tui-list-cell
|
|
|
@@ -133,36 +118,19 @@
|
|
|
<div class="list-label">支付密码</div>
|
|
|
</div>
|
|
|
</tui-list-cell>
|
|
|
-
|
|
|
</tui-list-view>
|
|
|
</div>
|
|
|
-
|
|
|
- <login-popup
|
|
|
- :show="popupShow"
|
|
|
- :info="wxInfo"
|
|
|
- :merchantInfo="merchantInfo"
|
|
|
- :isPublic="isPublic"
|
|
|
- :subscribe.sync="subscribe"
|
|
|
- :mobile.sync="mobile"
|
|
|
- @hide="hidePopup"
|
|
|
- />
|
|
|
- <app-trademark />
|
|
|
- <go-login :show.sync="loginShow" />
|
|
|
<tab-bar :current="4"></tab-bar>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapGetters } from "vuex";
|
|
|
import TuiListView from "@/components/plugin/list-view";
|
|
|
import TuiListCell from "@/components/plugin/list-cell";
|
|
|
import LoginPopup from "@/pages/home/components/login-popup";
|
|
|
import AppTrademark from "@/components/module/app-trademark";
|
|
|
import GoLogin from "@/pages/home/components/go-login.vue";
|
|
|
import AppVipModule from "@/components/module/app-vip";
|
|
|
-import { getMiniAppUrl, isWxBrowser } from "@/utils/common";
|
|
|
-import { getMerchantInfo } from "@/api/common";
|
|
|
-import { getShopUser } from "@/utils/auth";
|
|
|
export default {
|
|
|
name: "user",
|
|
|
components: {
|
|
|
@@ -171,9 +139,9 @@ export default {
|
|
|
LoginPopup,
|
|
|
AppTrademark,
|
|
|
GoLogin,
|
|
|
- AppVipModule
|
|
|
+ AppVipModule,
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
constant: this.$constant,
|
|
|
popupShow: false,
|
|
|
@@ -184,89 +152,22 @@ export default {
|
|
|
merchantInfo: {},
|
|
|
mobile: "",
|
|
|
subscribe: 0,
|
|
|
- currentTabIndex: 4
|
|
|
+ currentTabIndex: 4,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
|
- mobile (newVal, oldVal) { }
|
|
|
+
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters({ shopUser: "getShopUser" }),
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- ...mapGetters({ loginInfo: "getLoginInfo" }),
|
|
|
- // #endif
|
|
|
- smallAvatarUrl () {
|
|
|
- return this.shopUser.smallAvatarUrl || "";
|
|
|
- },
|
|
|
- percentNum () {
|
|
|
- if (this.$util.isEmpty(this.shopUser)) {
|
|
|
- return 0;
|
|
|
- }
|
|
|
- return Math.round(
|
|
|
- (this.shopUser.userAsset.growth /
|
|
|
- this.shopUser.userAsset.nextLevelGrowth) *
|
|
|
- 100
|
|
|
- );
|
|
|
- }
|
|
|
},
|
|
|
- onLoad (option) {
|
|
|
- // this.init()
|
|
|
+ onLoad(option) {
|
|
|
},
|
|
|
methods: {
|
|
|
- init () {
|
|
|
- getShopUser().then(res => {
|
|
|
- this.mobile = res.mobile;
|
|
|
- this.subscribe = parseInt(res.subscribe);
|
|
|
- if (this.option.scan == 1) {
|
|
|
- //没有注册手机号或关注公众号的
|
|
|
- if (this.$util.isEmpty(res.mobile) || res.subscribe == 0) {
|
|
|
- this.isPublic = true;
|
|
|
- this.popupShow = true;
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- getMerchantInfo().then(res => {
|
|
|
- this.merchantInfo = res.data;
|
|
|
- });
|
|
|
- },
|
|
|
- pageToFn (item) {
|
|
|
- if (this.$util.isLogin()) {
|
|
|
- this.$util.pageTo(item);
|
|
|
- } else {
|
|
|
- this.loginShow = true;
|
|
|
- }
|
|
|
- },
|
|
|
- showPopup () {
|
|
|
- // #ifdef H5
|
|
|
- this.pageTo("/pages/user/register");
|
|
|
- // #endif
|
|
|
- // #ifdef MP-WEIXIN
|
|
|
- this.popupShow = true;
|
|
|
- // #endif
|
|
|
- },
|
|
|
- hidePopup () {
|
|
|
- this.popupShow = false;
|
|
|
- },
|
|
|
- logoutFn () {
|
|
|
- return false;
|
|
|
- uni.clearStorageSync();
|
|
|
- // #ifdef H5
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/pages/home/index",
|
|
|
- type: 4
|
|
|
- });
|
|
|
- // #endif
|
|
|
- // #ifndef H5
|
|
|
- this.$util.pageTo({
|
|
|
- url: "/pages/home/index",
|
|
|
- type: 4
|
|
|
- });
|
|
|
- // #endif
|
|
|
- },
|
|
|
- tabClick (index) {
|
|
|
- this.currentTabIndex = index
|
|
|
+ init() {},
|
|
|
+ pageToFn(item) {
|
|
|
+ this.$util.pageTo(item)
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
@@ -392,4 +293,4 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|