lin
2026-04-24 867dfffde10a7388acaeb92767eecd92965ff2fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
<template>
    <view class="myView">
        <image class="myView-bg" src="@/static/imgs/my-bg.png" mode="scaleToFill"></image>
        <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"></view>
        <view class="myContent">
            <view class="myHeader">
                <image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="avatar" mode=""></image>
                <!-- <image :src="userInfo != null ? userInfo.avatar : '/static/imgs/headimg.png'" class="avatar" mode="" @tap="setImg"></image> -->
                <view class="myNick">
                    <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 class="auth" v-if="userInfo && userInfo.over_auth != 1" @tap="$util.checkGoPages('/pages/my/my')">
                <image src="@/static/imgs/notice.png" mode=""></image>
                <text>您还未进行实名认证,点击前往实名认证</text>
                <view class="">去认证</view>
            </view> -->
            
            <!-- <view class="num-wrapper tui-skeleton-rect">
              <view class="num-item" style="display: flex;background: white;border-radius: 24rpx;padding: 22rpx;width: 48%;" @tap="$util.checkLogin('/pages/collect/collect')">
                <view style="padding-right: 32rpx;">
                  <image style="width: 48rpx;height: 48rpx;margin-top: 30rpx;" src="/static/imgs/Star.png"></image>
                </view>
                <view style="flex: 1">
                  <view class="txt" style="color: #666;text-align:left">我的收藏</view>
                  <view class="num" style="color: #333;text-align:left;margin-top: 8rpx;">0</view>
            
                </view>
              </view>
              <view style="display: flex;background: white;border-radius: 24rpx;padding: 22rpx;width: 48%;" class="num-item" @tap="$util.checkLogin('/pages/address/address')">
                <view style="padding-right: 32rpx;">
                  <image style="width: 48rpx;height: 48rpx;margin-top: 30rpx;" src="/static/imgs/History.png"></image>
                </view>
                <view style="flex: 1">
                  <view class="txt" style="color: #666;text-align:left">我的地址</view>
                  <view class="num" style="color: #333;text-align:left;margin-top: 5rpx;">0</view>
            
                </view>
            
              </view>
            </view> -->
            
            <view class="navs">
                <view class="title" @tap="$util.checkLogin('/pages/order/order')">
                    <text>我的订单</text>
                    <view class="navs-rgt">
                        <text>查看全部</text>
                        <image src="/static/imgs/right.png" mode=""></image>
                    </view>
                </view>
                <view class="navCon">
                    <view class="navCon-v" v-for="(item, index) in navData" @tap="$util.checkLogin(item.url)">
                        <image :src="'../../static/imgs/nv' + item.index + '.png'" mode=""></image>
                        <view>{{item.text}}</view>
                    </view>
                </view>
            </view>
            
            <view class="mySer">
                <view class="title">我的服务</view>
                <view class="mySerCon">
                    <template v-for="(item, index) in mySerData">
                        <view class="mySerCon-v" @tap="$util.checkLogin(item.url)" v-if="item.index != 6">
                            <image :src="'../../static/imgs/mf' + item.index + '.png'" mode=""></image>
                            <view>{{item.text}}</view>
                        </view>
                        <view class="mySerCon-v" @tap="goKefu" v-else>
                            <image :src="'../../static/imgs/mf' + item.index + '.png'" mode=""></image>
                            <view>{{item.text}}</view>
                        </view>
                    </template>
                </view>
            </view>
            <!-- <view style="text-align: center;font-size: 24rpx;color: #666666;margin: 80rpx 0;">
                客服电话:400-6229-771(8:00-20:00)
            </view> -->
            <view class="myBeiAn">
                <view class="">
                    <text @tap="agreeDialog1">《用户协议》</text>
                    <text>|</text>
                    <text @tap="agreeDialog2">《隐私政策》</text>
                </view>
                <view @tap="goWebUrl('http://beian.miit.gov.cn')">APP备案号: {{Config.icp}}</view>
                <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 数澜科技 All Rights Reserved.</view>
                <!-- <view @tap="goWebUrl('http://beian.miit.gov.cn')">Copyright © 2025 {{Config.url}} All Rights Reserved.</view> -->
                
            </view>
            <agreePup ref="agreePup1" :gp="1" title="注册协议"></agreePup>
            <agreePup ref="agreePup2" :gp="2" title="隐私政策"></agreePup>
            
        </view>
    </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},
                navData: [
                    {index: 1, text: '待支付', url: '/pages/order/order?status=1'},
                    {index: 3, text: '待发货', url: '/pages/order/order?status=4'},
                    {index: 4, text: '待收货', url: '/pages/order/order?status=5'},
                    // {index: 2, text: '待签约', url: '/pages/order/order?status=3'},
                    {index: 5, text: '已完成', url: '/pages/order/order?status=8'}
                ],
                mySerData: [
                    {index: 1, text: '个人信息', url: '/pages/profile/profile'},
                    // {index: 2, text: '账单信息', url: '/pages/logs/logs'},
                    // {index: 3, text: '银行卡', url: '/pages/bank/bank'},
                    {index: 2, text: '我的地址', url: '/pages/address/address'},
                    {index: 3, text: '我的收藏', url: '/pages/collect/collect'},
                    // {index: 4, text: '会员权收', url: '/pages/quanshou/index'},
                    {index: 6, text: '联系客服'},
                ]
            }
        },
        onLoad() {
        },
        onShow() {
            this.getConfig()
            this.getUserInfo()
        },
        methods: {
            // 收藏+浏览记录
            goMenuPage(url) {
              if (this.userInfo) {
                uni.navigateTo({
                  animationType: 'zoom-fade-out',
                  animationDuration: 200,
                  url
                })
              }
            },
            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/my2.css);
    
    .num-wrapper {
        width: 650rpx;
        margin: 30rpx auto;
        z-index: 30;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: #fff;
        gap: 20rpx;
        
      }
      .num-wrapper .num-item {
        width: 33.33%;
        text-align: center;
      
        
      }
      .num-wrapper .num {
          font-size: 42rpx;
          font-weight: bold;
    }
      
    .num-wrapper .txt {
        margin-top: 10rpx;
        font-size: 26rpx;
        color: rgba(255, 255, 255, 0.6);
    }
</style>