286 lines
8.5 KiB
Vue
Raw Normal View History

2025-03-14 16:27:50 +08:00
<template>
<view>
<!-- 常用工具 -->
<view class="interact-tools" style="margin-bottom: 15px">
<div class="paddingBox">
<view class="interact-container">
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/invite')"
2025-04-30 14:42:40 +08:00
v-if="userInfonew.expert"
2025-04-21 17:39:41 +08:00
>
<image src="/static/mine/stion.png" mode=""></image>
<view>我的推荐</view>
</view>
<view
class="interact-item"
@click="navigateTo('/pages/mine/inviteinput')"
2025-04-30 14:42:40 +08:00
v-if="!userInfonew.expert"
2025-04-21 17:39:41 +08:00
>
<image src="/static/mine/smk.png" mode=""></image>
<view>邀请</view>
</view>
<view
2025-04-30 14:42:40 +08:00
v-if="userInfonew.expert != 1"
2025-04-21 17:39:41 +08:00
class="interact-item"
@click="navigateTo('/pages/mine/expert/index')"
>
<image src="/static/mine/mon.png" mode=""></image>
<view>达人申请</view>
</view>
<view
2025-04-30 14:42:40 +08:00
v-if="userInfonew.storeId == null || userInfonew.storeId == ''"
2025-04-21 17:39:41 +08:00
class="interact-item"
@click="navigateTo('/pages/mine/openShop/index')"
>
<image src="/static/mine/shop.png" mode=""></image>
<view>店铺申请</view>
</view>
<!-- <view class="interact-item" @click="navigateTo('/pages/mine/makeMoney/index')">
<image src="/static/mine/mony.png" mode=""></image>
<view>赚钱</view>
</view> -->
2025-03-14 16:27:50 +08:00
<view class="interact-item" @click="navigateTo('/pages/mine/signIn')">
<image src="/static/mine/sign.png" mode=""></image>
<view>每日签到</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/point/myPoint')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/mypoint.png" mode=""></image>
<view>我的积分</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/cart/coupon/myCoupon')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/mycoupon.png" mode=""></image>
<view>优惠券</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/myCollect')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/myfavorite.png" mode=""></image>
<view>我的关注</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/myTracks')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/myhistory.png" mode=""></image>
<view>我的足迹</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/order/evaluate/myEvaluate')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/mycommit.png" mode=""></image>
<view>我的评价</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/order/complain/complainList')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/shensu.png" mode=""></image>
<view>我的投诉</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/set/feedBack')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/feedback.png" mode=""></image>
<view>意见反馈</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/cart/coupon/couponCenter')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/couponcenter.png" mode=""></image>
<view>领券中心</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/address/addressManage')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/myaddress.png" mode=""></image>
<view>地址管理</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
@click="navigateTo('/pages/mine/set/setUp')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/setting.png" mode=""></image>
<view>设置</view>
</view>
2025-04-21 17:39:41 +08:00
<view
class="interact-item"
2025-04-30 14:42:40 +08:00
@click="navigateTo('/pages/mine/mydistribution/index?')"
v-if="userInfonew.expert"
2025-04-21 17:39:41 +08:00
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/distribution.png" mode=""></image>
<view>我的分销</view>
</view>
2025-04-21 17:39:41 +08:00
<!-- <view class="interact-item" @click="distribution">
<image src="/static/mine/distribution.png" mode=""></image>
<view>我的分销</view>
</view> -->
<view
class="interact-item"
@click="navigateTo('/pages/promotion/bargain/log')"
>
2025-03-14 16:27:50 +08:00
<image src="/static/mine/kanjia.png" mode=""></image>
<view>砍价记录</view>
</view>
2025-04-30 14:42:40 +08:00
<view
class="interact-item"
@click="save"
v-if="userInfonew.storeId != ''"
>
<image src="/static/mine/somp.png" mode=""></image>
<view>扫一扫</view>
</view>
2025-03-14 16:27:50 +08:00
</view>
</div>
</view>
</view>
</template>
<script>
2025-04-30 14:42:40 +08:00
import { distribution, getGoodstake } from "@/api/goods";
2025-04-21 17:39:41 +08:00
import { getUserInfo } from "@/api/members";
2025-03-14 16:27:50 +08:00
export default {
2025-04-21 17:39:41 +08:00
props: {
2025-04-30 14:42:40 +08:00
userInfo: {
type: Object,
default: () => {},
},
2025-04-21 17:39:41 +08:00
},
data() {
return {
2025-04-30 14:42:40 +08:00
userInfonew: {}, // 用户信息
2025-04-21 17:39:41 +08:00
};
},
onShow() {},
onLoad() {},
2025-04-30 14:42:40 +08:00
watch: {
userInfo: {
handler(newVal, oldVal) {
console.log("watch", newVal, oldVal);
this.userInfonew = {};
this.userInfonew = newVal;
},
},
2025-04-21 17:39:41 +08:00
},
2025-04-30 14:42:40 +08:00
mounted() {},
2025-03-14 16:27:50 +08:00
methods: {
2025-04-30 14:42:40 +08:00
save() {
uni.scanCode({
success: (res) => {
console.log("==", res);
const par = res.result.split("|");
getGoodstake(par[0], par[1], { storeid: par[2] }).then((resfn) => {
console.log("resfn", resfn);
if (resfn.data.success) {
uni.showToast({
title: resfn.data.message,
icon: "none",
});
}
// }
});
},
2025-04-21 17:39:41 +08:00
});
},
2025-04-30 14:42:40 +08:00
2025-03-14 16:27:50 +08:00
navigateTo(url) {
uni.navigateTo({
url,
});
},
distribution() {
distribution().then((res) => {
if (res.data.result) {
let type = res.data.result.distributionStatus;
if (type == "PASS") {
uni.navigateTo({
url: "/pages/mine/distribution/home",
});
} else if (type == "REFUSE") {
uni.navigateTo({
url: "/pages/mine/distribution/auth",
});
} else if (type == "RETREAT") {
uni.showToast({
title: "您的分销资格已被清退。请联系管理员!",
duration: 2000,
icon: "none",
});
} else {
uni.showToast({
title: "您的信息正在审核",
duration: 2000,
icon: "none",
});
}
} else if (!res.data.success && res.data.code == 22000) {
uni.showToast({
title: "分销功能暂未开启",
duration: 2000,
icon: "none",
});
} else {
// 没有资格申请 先去实名认证
uni.navigateTo({
url: "/pages/mine/distribution/auth",
});
}
});
},
},
};
</script>
<style lang="scss" scoped>
.interact-tools {
border-left: none;
border-right: none;
.interactBox {
height: 156rpx;
}
.interact-container {
margin: 0 20rpx;
background: #fff;
border-radius: 20rpx;
box-shadow: 0 4rpx 24rpx 0 rgba($color: #f6f6f6, $alpha: 1);
.interact-item-img {
width: 52rpx !important;
height: 52rpx !important;
// margin-bottom: !important;
margin: 0 auto 6rpx auto !important;
}
image {
width: 52rpx;
height: 52rpx;
margin-bottom: 6rpx;
}
display: flex;
align-items: center;
flex-wrap: wrap;
text-align: center;
.interact-item {
font-size: $font-sm;
width: 25%;
height: 160rpx;
padding: 30rpx;
}
}
}
</style>