254 lines
6.7 KiB
Plaintext
254 lines
6.7 KiB
Plaintext
<template>
|
|
<view>
|
|
<view class="" style=" width: 100%; height: 310rpx; background: linear-gradient(45deg,#FF6B35,#FF8B65);">
|
|
|
|
</view>
|
|
<view class=""
|
|
style=" margin: 0 30rpx; margin-top: -110rpx; padding: 30rpx; background-color: #fff; border-radius: 20rpx; ">
|
|
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
|
|
<view class="" style="font-size: 36rpx; font-weight: 600;">
|
|
{{userInfo?.nick}}
|
|
</view>
|
|
<view @click="Service.GoPage('/pages/userFunc/setData')" class="">
|
|
<up-icon name="arrow-right" size="18" color='#333333' :bold='true'></up-icon>
|
|
</view>
|
|
</view>
|
|
<view class=""
|
|
style="display: flex; align-items: center; margin-top: 40rpx; justify-content: space-between; ">
|
|
<view @click="Service.GoPage('/pages/userFunc/integration')" class=""
|
|
style=" width: 48%; display: flex;align-items: center;">
|
|
<view class=""
|
|
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
|
|
<img :src="Service.GetIconImg('/static/index/user/code.png')"
|
|
style="width: 50rpx; height: 50rpx; " alt="" />
|
|
</view>
|
|
<view class=""
|
|
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
|
|
{{accInfo?.integral}}积分
|
|
</view>
|
|
<view class="">
|
|
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="" @click="Service.GoPage('/pages/userFunc/trade?type='+1)"
|
|
style=" width: 48%; display: flex;align-items: center;">
|
|
<view class=""
|
|
style=" display: flex;align-items: center;justify-content: center; width: 80rpx; height: 80rpx; background-color: #FF6B35; border-radius: 50%; ">
|
|
<img :src="Service.GetIconImg('/static/index/user/list.png')"
|
|
style="width: 50rpx; height: 50rpx; " alt="" />
|
|
</view>
|
|
<view class=""
|
|
style=" margin-left: -20rpx; flex: 1; text-align: center; font-size: 28rpx; font-weight: 600;">
|
|
交易记录
|
|
</view>
|
|
<view class="">
|
|
<up-icon name="arrow-right" size="14" color='#9CA3AF' :bold='true'></up-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 管理中心 -->
|
|
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
|
|
<text class="section-title" style="font-weight: 600;">商家管理中心</text>
|
|
<view class="service-grid">
|
|
<view class="service-item" @click="gotopage(controItem)" v-for="(controItem,serviceIndex) in controList"
|
|
:key="serviceIndex">
|
|
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
|
|
<image :src="Service.GetIconImg(controItem.img)" class="service-icon"></image>
|
|
</view>
|
|
<text class="service-text">{{controItem.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 个人服务 -->
|
|
<view class="service-section" style="margin: 40rpx 30rpx 0; border-radius: 20rpx; ">
|
|
<text class="section-title" style="font-weight: 600;">我的服务</text>
|
|
<view class="" style=" margin-top: 40rpx; display: grid; grid-template-columns: repeat(2,1fr); ">
|
|
<view style=" margin-bottom: 20rpx; display: flex; align-items: center;" @click="serviceFunc(myServiceItem,serviceIndex)"
|
|
v-for="(myServiceItem,serviceIndex) in myServiceList" :key="serviceIndex">
|
|
<view class="flex-center" style=" border-radius: 50%; padding: 20rpx; background-color: #FFF5F0; ">
|
|
<image :src="Service.GetIconImg(myServiceItem.img)" class="service-icon"></image>
|
|
</view>
|
|
<text
|
|
style=" flex: 1; margin-left: 30rpx; font-size: 28rpx; font-weight: 600; ">{{myServiceItem.name}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { onShow, onLoad } from "@dcloudio/uni-app";
|
|
import { Service } from "@/Service/Service"
|
|
import { ref } from "vue";
|
|
import { vpUserService } from '@/Service/vp/vpUserService'
|
|
|
|
interface accInfo {
|
|
account : number
|
|
integral : number
|
|
userId : string
|
|
}
|
|
|
|
interface userInfo {
|
|
nick : string
|
|
integral : number
|
|
}
|
|
|
|
|
|
let controList = ref([
|
|
{
|
|
img: '/static/index/user/analysis.png',
|
|
name: '数据统计',
|
|
path: '/pages/userFunc/statistics'
|
|
},
|
|
{
|
|
img: '/static/index/user/trad.png',
|
|
name: '订单记录',
|
|
path: '/pages/userFunc/trade?type=' + 0
|
|
|
|
},
|
|
{
|
|
img: '/static/index/user/shop.png',
|
|
name: '商品管理',
|
|
path: '/pages/goods/goodsContro'
|
|
},
|
|
{
|
|
img: '/static/index/user/store.png',
|
|
name: '编辑店铺',
|
|
path: '/pages/userFunc/editStore'
|
|
},
|
|
{
|
|
img: '/static/index/user/store.png',
|
|
name: '积分明细',
|
|
path: '/pages/userFunc/storeInter'
|
|
}
|
|
])
|
|
|
|
|
|
let myServiceList = ref([
|
|
{
|
|
img: '/static/index/user/request.png',
|
|
name: '客服咨询',
|
|
path: ''
|
|
},
|
|
{
|
|
img: '/static/index/user/set.png',
|
|
name: '系统设置',
|
|
path: '/pages/userFunc/set'
|
|
},
|
|
{
|
|
img: '/static/index/user/set.png',
|
|
name: '会员码',
|
|
path: '/pages/userFunc/vip'
|
|
},
|
|
{
|
|
img: '/static/index/user/set.png',
|
|
name: '推广码',
|
|
path: '/pages/userFunc/promoteCode'
|
|
},
|
|
{
|
|
img: '/static/index/user/set.png',
|
|
name: '收货地址',
|
|
path: '/pages/userFunc/addressList'
|
|
}
|
|
])
|
|
|
|
let page = ref(1)
|
|
|
|
let accInfo = ref<accInfo>()
|
|
let userInfo = ref<userInfo>()
|
|
|
|
onLoad(() => {
|
|
|
|
});
|
|
|
|
onShow(() => {
|
|
getUserinfo()
|
|
getUseraccInfo()
|
|
});
|
|
|
|
const gotopage = (item : any) => {
|
|
if (item.path) {
|
|
Service.GoPage(item.path)
|
|
}
|
|
}
|
|
|
|
const serviceFunc = (item : any, index : any) => {
|
|
if (index == 0) {
|
|
wx.openCustomerServiceChat({
|
|
extInfo: { url: 'https://work.weixin.qq.com/kfid/kfc959c128ce7801256' },
|
|
corpId: 'wwb1123fbb286554ab',
|
|
success(res) { },
|
|
fail(err) {
|
|
console.log(err, '失败')
|
|
// 失败回调
|
|
}
|
|
})
|
|
} else {
|
|
Service.GoPage(item.path)
|
|
}
|
|
}
|
|
|
|
const getUserinfo = () => {
|
|
vpUserService.GetUserInfo().then(res => {
|
|
userInfo.value = res.data.userInfo
|
|
})
|
|
}
|
|
|
|
const getUseraccInfo = () => {
|
|
vpUserService.GetUserAccInfo(page.value).then(res => {
|
|
accInfo.value = res.data.accInfo
|
|
})
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
page {
|
|
background-color: #f6f6f6;
|
|
}
|
|
|
|
.flex-center {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* 服务区域通用样式 */
|
|
.service-section,
|
|
.value-added-section {
|
|
background-color: #fff;
|
|
margin: 20rpx 0rpx;
|
|
overflow: hidden;
|
|
padding: 20rpx;
|
|
}
|
|
|
|
/* 服务网格 */
|
|
.service-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
padding: 10rpx 20rpx 30rpx;
|
|
}
|
|
|
|
.service-item {
|
|
width: 25%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
padding: 20rpx 0;
|
|
}
|
|
|
|
.service-icon {
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
}
|
|
|
|
.service-text {
|
|
font-size: 24rpx;
|
|
color: #666;
|
|
margin-top: 16rpx;
|
|
text-align: center;
|
|
}
|
|
</style> |