源文件

This commit is contained in:
gyq
2024-05-23 14:39:33 +08:00
commit a1128dd791
2997 changed files with 500069 additions and 0 deletions

View File

@@ -0,0 +1,174 @@
<template>
<view class="me-wrapper global-wrapper bgF2">
<JHeaderTitle title="我的" bgColor="#fff" :back="false"></JHeaderTitle>
<view class="me-card">
<view class="me-card-left">
<image :src="userInfo.avatarUrl" mode="scaleToFill" />
<view class="user-info">
<view class="user-name single-text-beyond">{{ userInfo.realname }}</view>
<view class="user-phone">{{ phone(userInfo.telphone) }} </view>
</view>
</view>
<view class="me-card-right">
<view class="user-edit">
<image src="/static/iconImg/icon-edit.svg" mode="scaleToFill"
@tap="jumpPage('/pageWork/setUp/accountSetting')" />
</view>
<view class="user-scan">
<image src="/static/iconImg/scan-code.svg" mode="scaleToFill" @tap="scanCode" />
</view>
</view>
</view>
<view class="list-wrap">
<template v-for="(v, i) in newList" :key="i">
<ListCard v-bind="v" v-if="v.title != ''"></ListCard>
</template>
</view>
<view class="setting-block"></view>
<ListCard title="设置" imgUrl="/static/iconImg/setting.svg" isBorder="isBorder" url="/pageWork/setUp/setUp"></ListCard>
<blcok v-for="v in vdata.adList" :key="v.adverId">
<JeepayBanner :list="v.appContent" :interval='v.changeTime' v-if="v.appPlaceType == 2" />
<JeepayAdCard :list='v.appContent' v-if="v.appPlaceType == 1" />
</blcok>
<view class="setting-block"></view>
<!-- #ifdef APP-PLUS -->
<view style="height: 120rpx;"></view>
<!-- #endif -->
</view>
</template>
<script setup>
import { ref, reactive } from "vue"
import { onLoad, onShow } from "@dcloudio/uni-app"
import { $getUserInfo, $scanCodeLogin, $adList } from "@/http/apiManager.js"
import JHeaderTitle from "@/components/newComponents/JHeaderTitle/JHeaderTitle.vue"
import ListCard from "./components/ListCard.vue"
import navList from "../workbench/navList/navList"
onShow(() => {
getUserInfo()
})
const newList = [
{
title: '我的邀请码',
url: '/pages/publicizeCode/publicizeCode',
imgUrl: '/static/indexImg/pub-icon.svg',
},
...navList
]
const userInfo = ref({})
const vdata = reactive({})
const getUserInfo = () => {
$getUserInfo().then(({ bizData }) => {
userInfo.value = bizData
console.log(userInfo.value)
})
}
const phone = (val) => {
if (!val) return
return val.slice(0, 3) + "****" + val.slice(-4)
}
const jumpPage = (url) => {
uni.navigateTo({
url,
})
}
const scanCode = () => {
uni.scanCode({
success: function (res) {
console.log("条码类型:" + res.scanType)
console.log("条码内容:" + res.result)
$scanCodeLogin({
qrcodeNo: res.result,
qrcodeStatus: "scaned",
}).then((val) => {
uni.navigateTo({
url: "./scan?id=" + res.result,
})
})
},
fail(err) {
console.log(err)
},
})
}
// 请求首页广告
$adList({ appPlace: 3 }).then(({ bizData }) => {
bizData.forEach(v => {
v.appContent = JSON.parse(v.appContent)
})
vdata.adList = bizData
console.log(bizData)
})
</script>
<style lang="scss" scoped>
.me-wrapper {
width: 100%;
.me-card {
display: flex;
justify-content: space-between;
align-items: center;
padding: 50rpx;
background-color: #fff;
.me-card-left {
display: flex;
image {
width: 130rpx;
height: 130rpx;
border-radius: 10rpx;
}
.user-info {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-left: 30rpx;
.user-name {
width: 300rpx;
font-size: 33rpx;
}
.user-phone {
font-size: 27rpx;
color: #8c8c8c;
}
}
}
.me-card-right {
display: flex;
view {
position: relative;
width: 70rpx;
height: 70rpx;
border-radius: 10px;
background: rgba(119, 55, 254, 0.15);
&:last-child {
margin-left: 20rpx;
}
}
image {
position: absolute;
top: 50%;
left: 50%;
width: 30rpx;
height: 30rpx;
transform: translate(-50%, -50%);
}
}
}
}
.setting-block {
height: 20rpx;
background-color: #f2f2f2;
}
</style>

View File

@@ -0,0 +1,67 @@
<template>
<view class="list-main bgF" :style="{ marginTop: mTop, marginBottom: mBot }" @tap="jumpPage">
<image :src="imgUrl" mode="scaleToFill" />
<view class="main-info" :class="[isBorder]">
{{ title }}
<image src="/static/iconImg/right-arrow.svg" mode="scaleToFill" />
</view>
</view>
</template>
<script setup>
const props = defineProps({
mTop: {
type: String,
default: "0",
},
imgUrl: {
type: String,
},
title: {
type: String,
},
url: {
type: String,
},
isBorder: {
type: String,
},
})
const jumpPage = () => {
uni.navigateTo({
url: props.url,
})
}
</script>
<style lang="scss" scoped>
.list-main {
display: flex;
justify-content: space-between;
align-items: center;
height: 110rpx;
font-size: 33rpx;
image {
width: 40rpx;
height: 40rpx;
// margin: 0 50rpx 0 0;
margin-left: 50rpx;
margin-right: 30rpx;
}
.main-info {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
height: 100%;
border-bottom: 1rpx solid #e5e5e5;
image {
margin-right: 50rpx;
}
}
}
.isBorder {
border: none !important;
}
</style>

View File

@@ -0,0 +1,88 @@
<template>
<JHeaderTitle title="登录确认" bgColor="#fff" imgUrl="/static/iconImg/icon-x.svg" @back="back"></JHeaderTitle>
<view class="scan-content">
<view class="computer">
<image src="/static/iconImg/computer.svg" mode=""></image>
<text>您正在登录代理商管理系统网站</text>
</view>
<view class="btn confirm" @tap="codeOk('confirmed')">确认登录</view>
<view class="btn cancel" @tap="codeOk('canceled')">取消登录</view>
</view>
</template>
<script setup>
import JHeaderTitle from '@/components/newComponents/JHeaderTitle/JHeaderTitle'
import { ref, reactive } from 'vue'
import { $scanCodeLogin } from '@/http/apiManager.js'
import { onLoad } from '@dcloudio/uni-app'
const code = ref('')
onLoad((option) => {
console.log(option)
code.value = option.id
})
// 点击左上交的取消按钮
const back = () => codeOk('canceled')
const codeOk = (val) => {
$scanCodeLogin({ qrcodeNo: code.value, qrcodeStatus: val })
.then((res) => {
uni.showToast({
title: val == 'confirmed' ? '登录成功' : '已取消'
})
setTimeout(function () {
uni.navigateBack({})
}, 1000)
})
.catch((err) => {
console.log(err)
})
}
</script>
<style scoped lang="scss">
.scan-content {
height: 100%;
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
.computer {
margin-top: 260rpx;
margin-bottom: 150rpx;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
image {
width: 200rpx;
height: 200rpx;
}
text {
line-height: 46px;
font-size: 33rpx;
color: #000000;
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 360rpx;
height: 110rpx;
border-radius: 20rpx;
background: #4dab68;
font-size: 33rpx;
}
.confirm {
color: #fff;
background-color: $primaryColor;
}
.cancel {
margin-top: 35rpx;
color: #666;
background: transparent;
}
}
</style>