<template>
|
<view class="my">
|
<yk-authpup ref="authpup" type="top" @changeAuth="changeAuth" noticeTitle="便于您使用该功能上传您的照片用于核实身份场景中读取相册内容" permissionID="WRITE_EXTERNAL_STORAGE"></yk-authpup>
|
<yk-authpup ref="camears" type="top" @changeAuth="changeAuth2" noticeTitle="便于您使用该功能便于您拍摄上传用于核实身份场景" permissionID="CAMERA"></yk-authpup>
|
<view class="startBar" style="background-color: #e3b400;"></view>
|
<view class="myTop">
|
<view class="headimg">
|
<image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="" mode="widthFix" @tap="setImg"></image>
|
<view class="">
|
<template>
|
<view v-if="userInfo == null" @tap="$util.goPages('/pages/login/login')">未登录</view>
|
<view v-else>{{userInfo.phone}}</view>
|
</template>
|
<template v-if="userInfo != null && Config">
|
<template v-if="userInfo.status == 1">
|
<view class="edu" v-if="userInfo != null && userInfo.edu_auth == 0 && Config.put_open == 2 && userInfo.over_auth == 0">额度:未认证</view>
|
<view class="edu" v-else-if="userInfo != null && userInfo.edu_auth == 0 && Config.put_open == 2 && userInfo.over_auth == 1">额度:授信中</view>
|
<view class="edu" v-else-if="userInfo != null && userInfo.edu_auth == 1 && Config.put_open == 2">额度:{{userInfo.const}}</view>
|
</template>
|
<template v-else>
|
<view class="edu">额度:授信失败</view>
|
</template>
|
</template>
|
<template v-if="userInfo != null && userInfo.face_auth == 0">
|
<view class="edu" @tap="$util.checkGoPages('/pages/my/my')">未认证(去认证)</view>
|
</template>
|
</view>
|
</view>
|
</view>
|
|
<view class="myNavs">
|
<view class="myNavs-tips" @tap="$util.checkLogin('/pages/order/order')">
|
<text class="myNavs-tips-text">我的订单</text>
|
<view class="myNavs-tips-rgt">
|
<text>查看全部</text>
|
<image src="/static/imgs/right.png" mode=""></image>
|
</view>
|
</view>
|
<view class="myNavs-view">
|
<view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=1')">
|
<image class="myNavs-item-icon" src="/static/imgs/my-n-1.png" mode="widthFix"></image>
|
<text class="myNavs-item-text">待支付</text>
|
</view>
|
<view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=3')">
|
<image class="myNavs-item-icon" src="/static/imgs/my-n-5.png" mode="widthFix"></image>
|
<text class="myNavs-item-text">待签约</text>
|
</view>
|
<view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=4')">
|
<image class="myNavs-item-icon" src="/static/imgs/my-n-2.png" mode="widthFix"></image>
|
<text class="myNavs-item-text">待发货</text>
|
</view>
|
<view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=5')">
|
<image class="myNavs-item-icon" src="/static/imgs/my-n-3.png" mode="widthFix"></image>
|
<text class="myNavs-item-text">待收货</text>
|
</view>
|
<view class="myNavs-item" @tap="$util.checkLogin('/pages/order/order?status=8')">
|
<image class="myNavs-item-icon" src="/static/imgs/my-n-4.png" mode="widthFix"></image>
|
<text class="myNavs-item-text">已完成</text>
|
</view>
|
</view>
|
</view>
|
|
<view class="myServe">
|
<view class="myNavs-tips">
|
<text class="myNavs-tips-text">我的服务</text>
|
</view>
|
<view class="myServe-view">
|
<view class="myServe-item" @tap="$util.checkLogin('/pages/profile/profile')">
|
<image src="/static/imgs/my-s-1.png" mode="widthFix"></image>
|
<text>个人信息</text>
|
</view>
|
<view class="myServe-item" @tap="$util.checkLogin('/pages/logs/logs')" v-if="Config && Config.put_open == 2">
|
<image src="/static/imgs/my-s-2.png" mode="widthFix"></image>
|
<text>账单信息</text>
|
</view>
|
<view class="myServe-item" @tap="$util.checkLogin('/pages/bank/bank')">
|
<image src="/static/imgs/my-s-3.png" mode="widthFix"></image>
|
<text>银行卡</text>
|
</view>
|
<view class="myServe-item" @tap="$util.checkLogin('/pages/address/address')">
|
<image src="/static/imgs/my-s-4.png" mode="widthFix"></image>
|
<text>我的地址</text>
|
</view>
|
<view class="myServe-item" @tap="$util.checkLogin('/pages/collect/collect')">
|
<image src="/static/imgs/my-s-5.png" mode="widthFix"></image>
|
<text>我的收藏</text>
|
</view>
|
<view class="myServe-item" @tap="goKefu">
|
<image src="/static/imgs/my-s-6.png" mode="widthFix"></image>
|
<text>联系客服</text>
|
</view>
|
<view class="myServe-item" @tap="toHuishou" >
|
<template v-if="isShop">
|
<image src="/static/imgs/quanshou.png" mode="widthFix"></image>
|
<text>会员权收</text></template>
|
|
</view>
|
|
</view>
|
</view>
|
<view class="myBeiAn">
|
<view class="">
|
<text @tap="agreeDialog1">《用户协议》</text>
|
<text>|</text>
|
<text @tap="agreeDialog2">《隐私政策》</text>
|
</view>
|
<view >客服电话:400-636-0330(8:00-20:00)</view>
|
<view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 智葆汇科技 All Rights Reserved.</view>
|
<view style="display: flex;justify-content: center;gap: 5px;">
|
<view style="display: flex;align-items: center;justify-content: start;gap: 2px;" @tap="goWebUrl('https://beian.mps.gov.cn/#/query/webSearch')">
|
<image src="/static/imgs/wangan.png" style="width: 30rpx;height: 30rpx;"></image>
|
<span>新公网安备65010202001358号</span>
|
</view>
|
<view @click="goWebUrl('https://beian.miit.gov.cn/')">{{Config.icp}}</view>
|
</view>
|
<!-- <view @tap="goWebUrl('http://beian.miit.gov.cn')">APP备案号: {{Config.icp}}</view>-->
|
|
</view>
|
<agreePup ref="agreePup1" :gp="1" title="注册协议"></agreePup>
|
<agreePup ref="agreePup2" :gp="2" title="隐私政策"></agreePup>
|
|
<uni-popup type="center" ref="comment" >
|
<view style="background-image: url('/static/imgs/BOXSDF.png');background-repeat: no-repeat;background-size: 100% 100%">
|
<view style="border-radius: 48rpx;padding: 28rpx 20rpx">
|
<view style="text-align: center;padding-top: 30rpx;" >
|
<image src="/static/imgs/wuImg.png" style="width: 372rpx;height: 240rpx;"></image>
|
</view>
|
<view style="font-size: 32rpx;font-weight: 600;color: #333333;text-align: center;margin-top: 34rpx;margin-bottom: 80rpx;padding: 0 28rpx;">{{errState}}</view>
|
<view @click="$refs.comment.close()" style="font-weight: 500;font-size: 32rpx;color: #fff;text-align: center;padding: 24rpx 28rpx;border-top: 2rpx solid #EEEEEE;background: #FF1472;;border-radius: 40rpx ;">好的</view>
|
</view>
|
</view>
|
|
</uni-popup>
|
</view>
|
</template>
|
|
<script>
|
import ykAuthpup from "@/components/yk-authpup/yk-authpup";
|
import agreePup from "@/components/agreePup/agreePup";
|
export default {
|
components: {
|
agreePup
|
},
|
data() {
|
return {
|
userInfo: this.$util.getUserInfo(),
|
Config: {put_open: 1},
|
isShop:false,
|
errState:'',
|
boughtEquity: 0,
|
}
|
},
|
onLoad() {
|
},
|
async onShow() {
|
this.getConfig()
|
this.getUserInfo()
|
const _this = this;
|
if(_this.$util.getUserInfo()?.phone){
|
await uni.request({
|
url: _this.$webHost+'/api/v2/auth/qxgIosUnionLogin?phone='+_this.$util.getUserInfo().phone,
|
// url: _this.$webHost+'/api/v2/auth/iosShopUnionLogin?phone='+_this.$util.getUserInfo().phone + '&configureToDomain=4',
|
data:{
|
customerId: uni.getStorageSync('qxgLogin').customerId,
|
appId: uni.getStorageSync('qxgLogin').appId
|
},
|
success: function (res) {
|
_this.isShop = res?.data?.data?.isShop;
|
_this.boughtEquity = res?.data?.data?.boughtEquity;
|
uni.setStorageSync('qxgLogin', res.data.data)
|
}
|
})
|
}
|
},
|
methods: {
|
toHuishou(){
|
const _this = this;
|
if(!_this.isShop){
|
return
|
}
|
if(_this.boughtEquity) {
|
uni.request({
|
url: _this.$webHost + '/api/v2/customer/ryxIsBuyEquity?phone=' + _this.$util.getUserInfo().phone,
|
data: {
|
customerId: uni.getStorageSync('qxgLogin').customerId,
|
// appId: uni.getStorageSync('qxgLogin').appId,
|
appId: _this.$APPID
|
},
|
success: function (res) {
|
if (res.data.code == 200) {
|
uni.navigateTo({
|
url: '/pages/quanshou/index'
|
})
|
|
} else {
|
_this.errState = res.data.data;
|
_this.$refs.comment.open()
|
|
}
|
}
|
})
|
} else {
|
uni.navigateTo({
|
url: '/pages/quanyi/index'
|
})
|
}
|
|
},
|
|
goKefu() {
|
if(this.Config && this.Config.kefu_open == 1) {
|
this.wechatWork()
|
} else {
|
this.$util.checkLogin('/pages/customer/customer')
|
}
|
},
|
setImg(){
|
if(uni.getSystemInfoSync().platform != 'ios'){
|
this.$refs['authpup'].open()
|
}else{
|
this.chooseImg()
|
}//调起自定义权限目的弹框,具体可看示例里面很详细
|
},
|
changeAuth () {
|
//这里是权限通过后执行自己的代码逻辑
|
if(uni.getSystemInfoSync().platform !='ios'){
|
this.$refs['camears'].open()
|
}
|
this.chooseImg()
|
},
|
changeAuth2(){
|
this.chooseImg()
|
},
|
chooseImg () {
|
let t = this
|
uni.chooseImage({
|
count: 1, // 默认9
|
sizeType: ['original', 'compressed'],
|
success: (chooseImageRes) => {
|
let tempFilePaths = chooseImageRes.tempFilePaths
|
let token = uni.getStorageSync('lzsc-token')
|
let header = {
|
'Accept': 'application/json',
|
'authorization': token,
|
}
|
uni.showLoading({
|
title: '上传中..',
|
})
|
uni.uploadFile({
|
url: t.$baseUrl + '/api/user/setAvatar',
|
filePath: tempFilePaths[0],
|
header: header,
|
name: 'file',
|
success: (uploadFileRes) => {
|
uni.hideLoading()
|
let res = JSON.parse(uploadFileRes.data)
|
res = JSON.parse(t.$util.decryptDes(res.data))
|
t.userInfo.avatar = res.avatar
|
uni.setStorageSync('user-info', JSON.stringify(res))
|
}
|
})
|
}
|
})
|
},
|
getUserInfo () {
|
let t = this
|
t.$util.post('User/getUser').then(res => {
|
t.userInfo = res.data
|
})
|
},
|
agreeDialog1 (e) {
|
this.$refs.agreePup1.dialog = !this.$refs.agreePup1.dialog
|
},
|
agreeDialog2 (e) {
|
this.$refs.agreePup2.dialog = !this.$refs.agreePup2.dialog
|
},
|
goWebUrl (url) {
|
// #ifdef APP-PLUS
|
plus.runtime.openURL(url)
|
// #endif
|
},
|
getConfig () {
|
let t = this
|
t.$util.post('Index/getConfig').then(res => {
|
t.Config = res.data
|
})
|
},
|
wechatWork () {
|
let t = this
|
if(t.Config){
|
if(t.Config.put_open == 1){
|
uni.showModal({
|
title: '联系客服',
|
content: '请联系客服电话:' + t.Config.kefu_phone,
|
showCancel: false,
|
success: function (res) {
|
if (res.confirm) {
|
}
|
}
|
});
|
} else {
|
console.log(t.Config)
|
uni.share({
|
provider: "weixin",
|
openCustomerServiceChat: true,
|
customerUrl: t.Config.work_url, //企业微信地址
|
corpid: t.Config.work_id, //企业id
|
success: (res) => {
|
console.log("success:" + JSON.stringify(res))
|
},
|
fail: (err) => {
|
console.log("fail:" + JSON.stringify(err))
|
}
|
})
|
}
|
}
|
}
|
}
|
}
|
</script>
|
|
<style>
|
@import url(/static/css/my.css);
|
</style>
|