Browse Source

Merge pull request 'feat: 配置项对接;' (#9) from fox into master

Reviewed-on: http://175.178.51.79:3000/Augcl/pet-front/pulls/9
master
Fox 2 weeks ago
parent
commit
1c29ae6320
23 changed files with 604 additions and 370 deletions
  1. +5
    -1
      components/dForm/index.vue
  2. +1
    -1
      otherPages/authentication/connectAddress/detail.vue
  3. +16
    -3
      otherPages/authentication/connectAddress/index.vue
  4. +28
    -14
      otherPages/authentication/examination/baseCompleted.vue
  5. +8
    -1
      otherPages/authentication/examination/errorDetail.vue
  6. +1
    -1
      otherPages/authentication/examination/start.vue
  7. +18
    -3
      otherPages/authentication/serve/index.vue
  8. +15
    -23
      otherPages/binding/grade/index.vue
  9. +11
    -5
      otherPages/binding/list/index.vue
  10. +160
    -99
      otherPages/binding/share/index.vue
  11. +15
    -5
      otherPages/binding/withdrawal/index.vue
  12. +9
    -5
      otherPages/myOrdersManage/bond/index.vue
  13. +39
    -25
      otherPages/myOrdersManage/bond/refund.vue
  14. +8
    -4
      otherPages/myOrdersManage/withdrawal/index.vue
  15. +88
    -72
      otherPages/userManage/pet/components/petHealthInfo.vue
  16. +10
    -1
      otherPages/workbenchManage/examNotice/index.vue
  17. +27
    -31
      otherPages/workbenchManage/myLevel/commponents/myData.vue
  18. +0
    -3
      otherPages/workbenchManage/myUser/components/haveOrder.vue
  19. +15
    -0
      otherPages/workbenchManage/myUser/index.vue
  20. +28
    -31
      otherPages/workbenchManage/myWallet/components/myData.vue
  21. +13
    -7
      pages/userManage/index.scss
  22. +36
    -35
      pages/userManage/index.vue
  23. +53
    -0
      utils/authorize.js

+ 5
- 1
components/dForm/index.vue View File

@ -137,6 +137,10 @@
})
}
const setDataByKey = (key, value) => {
formData[key] = value || null
}
const setData = (data) => {
list.forEach(item => {
const { key } = item
@ -152,7 +156,7 @@
return dFormRef.value.validate()
}
defineExpose({ setData, getData, validate })
defineExpose({ setDataByKey, setData, getData, validate })
</script>
<style>


+ 1
- 1
otherPages/authentication/connectAddress/detail.vue View File

@ -45,7 +45,7 @@
</up-form>
<view>
<up-parse class="size-28" :content="configList.pet_km_text.paramValueArea" containerStyle="{
<up-parse class="size-28" :content="configList.adress_statement.paramValueArea" containerStyle="{
color: '#707070',
fontSize: '22rpx',
lineHeight: '35rpx',


+ 16
- 3
otherPages/authentication/connectAddress/index.vue View File

@ -1,8 +1,14 @@
<template>
<view class="page">
<view class="tips flex-rowl">
<image src="@/static/images/ydd/icon2.png" mode=""></image>
<text class="color-ffb size-22 ml16">普通喂养员可设置3个接单地址优选喂养员可设置5个接单地址</text>
<image :src="configList.top_adress.paramValueImage" mode=""></image>
<view class="ml16">
<up-parse :content="configList.my_information_statement.paramValueArea" containerStyle="{
color: '#FFBF60',
fontSize: '22rpx',
lineHeight: '40rpx',
}"></up-parse>
</view>
</view>
<view v-if="list.length">
@ -73,7 +79,8 @@
<script setup>
import {
ref
ref,
computed,
} from 'vue'
import {
onShow
@ -84,6 +91,12 @@
deleteAddress
} from "@/api/address/address.js"
import Modal from "@/components/Modal/index.vue"
import { useStore } from 'vuex'
const store = useStore();
const configList = computed(() => {
return store.getters.configList
})
const list = ref([])
const modal = ref(null)


+ 28
- 14
otherPages/authentication/examination/baseCompleted.vue View File

@ -12,8 +12,14 @@
<text>基本考核答题已完成</text>
</view>
<view class="flex-rowl top-desc">
<up-icon class="icon" name="error-circle" color="#707070" size="27rpx"></up-icon>
<text>进行培训考核的答题前请认真观看下面的视频和资料</text>
<image class="icon" :src="configList.pet_base_test.paramValueImage"></image>
<view>
<up-parse :content="configList.pet_base_test.paramValueArea" containerStyle="{
color: '#707070',
fontSize: '22rpx',
lineHeight: '29rpx',
}"></up-parse>
</view>
</view>
</view>
<view class="info-box">
@ -41,13 +47,14 @@
服务培训
</view>
<view class="info-box-content">
<!-- v-for="item in trainList"
:key="`train-${item.id}`"
@click="openPopup(item.title, item.content)" -->
<view class="flex-colc info-item"
v-for="item in trainList"
:key="`train-${item.id}`"
@click="openPopup(item.title, item.content)"
@click="openPopup('服务培训', configList.pet_service_training.paramValueArea)"
>
<image :src="configList.pet_service_training.paramValueImage" mode="widthFix"></image>
<text class="desc">{{ item.title }}</text>
<!-- <text class="desc">{{ item.title }}</text> -->
</view>
</view>
@ -101,14 +108,14 @@
}
}
const trainList = ref([])
const fetchTrainList = async () => {
try {
trainList.value = await getTrainList()
} catch (err) {
// const trainList = ref([])
// const fetchTrainList = async () => {
// try {
// trainList.value = await getTrainList()
// } catch (err) {
}
}
// }
// }
const popupData = reactive({
show: false,
@ -127,7 +134,7 @@
onShow(() => {
fetchServiceList()
fetchTrainList()
// fetchTrainList()
})
</script>
@ -182,6 +189,8 @@
.icon {
margin-right: 12rpx;
width: 27rpx;
height: 27rpx;
}
}
}
@ -263,6 +272,11 @@
margin-bottom: 28rpx;
}
&-content {
max-height: 80vh;
overflow-y: auto;
}
&-title {
color: #000000;
font-weight: 700;


+ 8
- 1
otherPages/authentication/examination/errorDetail.vue View File

@ -37,8 +37,15 @@
import { ref } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { getQuestionList, getQuestionOptions, answeBaseByQuestionId, answeTrainByQuestionId } from '@/api/examination'
import { useStore } from 'vuex'
import questionCard from '../components/questionCard.vue';
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const list = ref([
{
@ -111,7 +118,7 @@
onShow(() => {
// todo: fetch
restTimes.value = 3
restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0)
initList()
})


+ 1
- 1
otherPages/authentication/examination/start.vue View File

@ -63,7 +63,7 @@
petType.value = option.petType
// todo: fetch
restTimes.value = 3
restTimes.value = parseInt(configList.value.pet_work_num.paramValueText || 0)
})
const toNext = () => {


+ 18
- 3
otherPages/authentication/serve/index.vue View File

@ -1,8 +1,14 @@
<template>
<view class="page bg-fff">
<view class="size-22 color-ffb flex-rowl tip">
<up-icon class="icon" name="error-circle" color="#FFBF60" size="36rpx"></up-icon>
<text>完善服务信息和接单状态后才可以开始接单哦</text>
<image class="icon" :src="configList.my_information_statement.paramValueImage"></image>
<view>
<up-parse :content="configList.my_information_statement.paramValueArea" containerStyle="{
color: '#FFBF60',
fontSize: '22rpx',
lineHeight: '40rpx',
}"></up-parse>
</view>
</view>
<view class="info">
<view class="title mt24">
@ -75,7 +81,7 @@
</template>
<script setup>
import { ref, reactive, computed } from "vue";
import { ref, reactive, computed, onMounted } from "vue";
import { useStore } from 'vuex'
import { onShow } from '@dcloudio/uni-app'
import { ossUpload } from '@/utils/oss-upload/oss/index.js'
@ -86,6 +92,10 @@
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const fetchUpdate = () => {
// todo
}
@ -233,9 +243,12 @@
onShow(() => {
store.dispatch('fetchPetTypeOptions')
store.dispatch('fetchIncreaseServiceOptions')
})
onMounted(()=> {
// todo: fetch data and init data
serveInfoRef.value.setDataByKey('base', configList.value.pet_basic_services.paramValueText)
})
</script>
@ -251,6 +264,8 @@
margin: 0 28rpx 37rpx 28rpx;
.icon {
width: 36rpx;
height: 36rpx;
margin-right: 15rpx;
}
}


+ 15
- 23
otherPages/binding/grade/index.vue View File

@ -86,33 +86,25 @@
</view>
</view>
</view>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }">
<view class="form_item">
累积数据:即注册至今的累计数据
</view>
<view class="line1">
</view>
<view class="form_item">
当月注册用户:在本月初至今您成功邀请绑定的新用户数量
<p>累积注册用户:您入驻合伙人至今成功邀请绑定的用户数量</p>
</view>
<view class="line1">
</view>
<view class="form_item">
当月下单用户:在本月初至今成功邀请绑定的新用户中截止今天成功下单的用户数;
<p>累积下单用户:您入驻合伙人至今成功邀请绑定的新用户中截止今日成功下单的用户数</p>
</view>
<view class="line1">
</view>
<view class="form_item">
当月有效用户:本月初至今下单的用户中截止今日订单已完成的用户数量;
<p>累积有效用户:您入驻合伙人至今成功下单的新用户中截止今日所有订单已完成的用户数</p>
</view>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }" >
<up-parse :content="configList.cumulative_data_statement.paramValueArea" containerStyle="{
color: '#A55822',
fontSize: '22rpx',
lineHeight: '29rpx',
}"></up-parse>
</view>
</view>
</template>
<script>
<script setup>
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
</script>
<style scoped lang="scss">


+ 11
- 5
otherPages/binding/list/index.vue View File

@ -24,7 +24,7 @@
快速定位宠友群体
</view>
</view>
<image :src="icon1" mode=""></image>
<image :src="configList.icon_popularize_strategy.paramValueImage" mode=""></image>
</view>
<view class="flex-between tips-item">
<view class="flex-colc item">
@ -35,7 +35,7 @@
快速定位宠友群体
</view>
</view>
<image :src="icon2" mode=""></image>
<image :src="configList.icon_popularize_tutorial.paramValueImage" mode=""></image>
</view>
</view>
</view>
@ -55,13 +55,19 @@
import {
onMounted,
reactive,
ref
ref,
computed,
} from "vue"
import { useStore } from 'vuex'
import YCard from "../components/y-card.vue"
const icon1 = ref('/static/images/levelImage/gl.png')
const icon2 = ref('/static/images/levelImage/jc.png')
const shareRef = ref('share')
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const cardData = {
methodNum: "方法一",
title: "邀请码邀请",


+ 160
- 99
otherPages/binding/share/index.vue View File

@ -1,124 +1,185 @@
<template>
<view class="share w100 h100">
<view class="flex-colc content w100">
<image :src="url" mode=""></image>
<view class="btn color-fff size-30 flex-rowc" @tap="getImageInfo">
保存海报
</view>
</view>
</view>
<view class="page">
<view class="flex-colt content">
<view style="width: 750rpx; height: 1125rpx;">
<canvas id="myCanvas" canvas-id="firstCanvas1" type="2d" style="width: 100%; height: 100%;"></canvas>
</view>
<view class="flex-rowc btns">
<button plain class="flex-rowc btn btn-save" @click="saveImg" >保存海报</button>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
url: "",
}
},
onLoad(options) {
this.url = options.url
},
methods: {
getImageInfo() {
// uni.getImageInfo({
// src: this.url,
// success: res => {
// this.savePosterPath(res.path)
// }
// })
uni.downloadFile({
url: this.url,
success: res => {
this.savePosterPath(res.tempFilePath)
}
})
},
savePosterPath(path) {
uni.getSetting({
success: res => {
console.log(res)
if (res.authSetting['scope.writePhotosAlbum']) {
uni.authorize({
scope: 'scope.writePhotosAlbum',
success: () => {
uni.saveImageToPhotosAlbum({
filePath: path,
success: () => {
uni.showToast({
title: "保存成功"
})
},
fail: () => {
uni.showToast({
title: "保存失败",
icon: "none"
})
}
})
}
})
} else {
uni.showModal({
title: "权限提醒",
content: "是否开启保存相册功能?",
success: res1 => {
if (res1.confirm) {
uni.openSetting({
success: result => {
uni.showToast({
title: "保存成功"
})
},
fail: () => {
uni.showToast({
title: "保存失败",
icon: "none"
})
}
})
}
<script setup>
import { ref, reactive, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import { useStore } from "vuex"
import authorize from '@/utils/authorize.js'
const store = useStore();
const configList = computed(() => {
return store.getters.configList
})
const url = ref()
const canvasData = reactive({
width: null,
height: null,
canvas: null
})
const savePath = ref()
const draw = () => {
uni.showLoading({
title: "拼命绘画中..."
})
wx.createSelectorQuery()
.select('#myCanvas') // canvasid
.fields({
node: true,
size: true
})
.exec(async (res) => {
const _canvas = res[0].node
//
const ctx = _canvas.getContext('2d')
// Canvas
const width = res[0].width
const height = res[0].height
//
const dpr = wx.getWindowInfo().pixelRatio
//dpr
// dpr 2 4
// 3 6
console.log("--dpr", dpr)
_canvas.width = width * dpr
_canvas.height = height * dpr
let Ratio = _canvas.width / 750
canvasData.canvas = _canvas
ctx.scale(dpr, dpr)
ctx.clearRect(0, 0, width, height)
canvasData.width = _canvas.width
canvasData.height = _canvas.height
//
const bgImage = _canvas.createImage()
bgImage.src = configList.value.background_poster.paramValueImage
bgImage.onload = () => {
ctx.drawImage(bgImage, 0, 0, width, height)
//
const coderImage = _canvas.createImage()
coderImage.src = url.value
coderImage.onload = () => {
const x = 270 * Ratio / dpr
const y = 672 * Ratio / dpr
const size = 197 * Ratio / dpr
ctx.drawImage(coderImage, x, y, size, size)
uni.hideLoading()
setTimeout(() => {
wx.canvasToTempFilePath({
x: 0,
y: 0,
width: _canvas.width,
height: _canvas.height,
canvas: _canvas,
success: (res) => {
let tempFilePath = res.tempFilePath;
savePath.value = tempFilePath
console.log('--savePath', savePath.value)
// saveImgToPhone(tempFilePath)
},
fail: () => {
uni.showToast({
title: "保存失败",
icon: "none"
})
fail: (err) => {
console.log('--canvasToTempFilePath--fail', err)
}
})
}
});
})
}
})
}
})
}
const saveImg = () => {
authorize('scope.writePhotosAlbum').then((res) => {
saveImgToPhone(savePath.value)
})
}
const saveImgToPhone = (image) => {
/* 获取图片的信息 */
uni.getImageInfo({
src: image,
success: function(image) {
/* 保存图片到手机相册 */
uni.saveImageToPhotosAlbum({
filePath: image.path,
success: function() {
uni.showModal({
title: '保存成功',
content: '图片已成功保存到相册',
showCancel: false
});
},
complete(res) {
console.log(res);
}
});
}
}
});
}
onLoad((options) => {
// url.value = options.url
//
url.value = configList.value.share_qr_url.paramValueImage
draw()
})
</script>
<style scoped lang="scss">
.share {
background-color: #FFEFD8;
.page {
background-color: #FFFFFF;
width: 100vw;
height: 100vh;
min-height: 100vh;
.content {
position: fixed;
bottom: 30rpx;
padding-top: 19rpx;
}
image {
width: 250rpx;
height: 237rpx;
background-color: #fff;
margin-bottom: 186rpx;
.btns {
width: 100%;
margin-top: 7rpx;
}
.btn {
display: inline-block;
border: none;
width: 594rpx;
height: 94rpx;
height: auto;
padding: 27rpx 0;
border-radius: 94rpx;
background-color: #FFBF60;
color: #FFFFFF;
font-size: 30rpx;
line-height: 40rpx;
}
}
</style>

+ 15
- 5
otherPages/binding/withdrawal/index.vue View File

@ -21,10 +21,11 @@
提现说明
</view>
<view>
1单日提现次数上限为5次;单笔提现上限200元;
</view>
<view>
2直接提现至微信账户无法提现至支付宝;
<up-parse :content="configList.withdrawal_statement.paramValueArea" containerStyle="{
color: '#707070',
fontSize: '30rpx',
lineHeight: '45rpx',
}"></up-parse>
</view>
<up-button class="buttom" type="warning" text="提现" shape="circle" @click="cashClick"></up-button>
</view>
@ -37,8 +38,17 @@
<script setup>
import {
ref
ref,
computed,
} from "vue"
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const num = ref('');;
const fullName = ref('')
const inputDialogRef = ref(null)


+ 9
- 5
otherPages/myOrdersManage/bond/index.vue View File

@ -29,12 +29,8 @@
<view class="text3">
保证金说明
</view>
<view>
履约保证金用于处理轻度违约行为以及交易纠纷;具体规则可在<text
:style="{color:'#FFBF60'}">履约保证金协议</text>中查看如平台有任何私自克扣/乱扣费的情况可向市场监督局投诉平台会对违约做出公正的判罚同时接受公正的处理
</view>
<view >
若在服务过程中由于伴宠师自身原因发生用户的隐私或财产被侵犯等涉及法律相关问题并不是保证金可以解决的;如若发生恶性事件平台会坚决走法律程序判定责任并追责请各位伴宠师严于律己
<up-parse class="size-28" :content="configList.pet_money_text.paramValueArea"></up-parse>
</view>
</view>
</view>
@ -52,9 +48,13 @@
import {
useStore
} from "vuex"
import { onShow } from '@dcloudio/uni-app'
const money = ref()
const store = useStore();
const configList = computed(() => {
return store.getters.configList
})
const userInfo = computed(() => {
return store.getters.userInfo
})
@ -90,6 +90,10 @@
})
}
}
onShow(() => {
money.value = Number(configList.value.pet_money.pet_money_text)
})
</script>
<style scoped lang="scss">


+ 39
- 25
otherPages/myOrdersManage/bond/refund.vue View File

@ -15,24 +15,11 @@
</view>
</view>
<view class="center">
<view class="text">
退还前提
</view>
<p>账户中无未完成/未结算的服务订单无待提现的余额退还规则</p>
<view class="text">
余额退还规则
</view>
<p>1.履约保证金退还即注销喂养师身份;</p>
<p>2.退还过程产生的手续费由平台承担;</p>
<p>3.只可全额退还账户中履约保证金余额不可分批退还;</p>
<p>4.如果认证成功后未成功接单认证费全额退款;</p>
<p>5.成功接单并赚取酬劳后认证费正式收取收取后不予退款;</p>
<p>6.成为喂养员后无违规行为且没有未完成的任务;退还缴纳的全部履约保证金;</p>
<p>7.成为喂养员后有违规行为或仍有未完成的任务;退还账户中剩余履约保证金;</p>
<up-parse class="size-28" :content="configList.pet_mmoney_text.paramValueArea"></up-parse>
</view>
<view class="level text1">
有关履约保证金的其他规则详见
<view class="text4">
<view class="text4" @click="openPopup('pet_lv_yue')">
履约保证金&认证费协议
</view>
</view>
@ -40,22 +27,29 @@
<text>退还并注销伴宠师</text>
</view>
<up-popup :show="popupData.show" @close="closePopup" :round="10">
<view style="max-height: 80vh; overflow-y: auto; padding: 20rpx;">
<up-parse class="size-28" :content="popupData.content"></up-parse>
</view>
</up-popup>
<up-popup
:show="popupVisible"
:show="codePopupVisible"
mode="center"
bgColor="transparent"
@close="onPopupClose"
@close="onCodePopupClose"
>
<view class="popup">
<image class="popup-bg" src="../static/bond/bg-popup.png"></image>
<image class="popup-bg" :src="configList.pet_mmoney_back.paramValueImage"></image>
<view class="flex-colc popup-content">
<text>您已申请退还请联系服务顾问</text>
<image class="qr" :src="qrCodeImage" mode="widthFix"></image>
<image class="qr" :src="configList.pet_code.paramValueImage" mode="widthFix"></image>
</view>
<view class="btn-close" @click="popupVisible = false">
<view class="btn-close" @click="codePopupVisible = false">
<up-icon name="close-circle-fill" color="#ffffff" size="60rpx"></up-icon>
</view>
</view>
@ -64,14 +58,20 @@
</template>
<script setup>
import { ref } from 'vue'
import { ref, reactive, computed } from 'vue'
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const money = ref()
const qrCodeImage = ref()
const popupVisible = ref(false)
const codePopupVisible = ref(false)
const onPopupClose = () => {
const onCodePopupClose = () => {
uni.reLaunch({
url: '/pages/workbenchManage/index'
})
@ -81,7 +81,21 @@
const onRefund = () => {
// todo: subimt refund and fetch qrcode and open popup
popupVisible.value = true
codePopupVisible.value = true
}
const popupData = reactive({
show: false,
content: null,
})
const openPopup = (key) => {
popupData.content = configList.value[key]?.paramValueArea || "";
popupData.show = true;
}
const closePopup = () => {
popupData.show = false
}
</script>


+ 8
- 4
otherPages/myOrdersManage/withdrawal/index.vue View File

@ -19,10 +19,11 @@
提现说明
</view>
<view>
1单日提现次数上限为5次;·单笔提现上限200元;
</view>
<view>
2直接提现至微信账户无法提现至支付宝;
<up-parse :content="configList.withdrawal_statement.paramValueArea" containerStyle="{
color: '#707070',
fontSize: '30rpx',
lineHeight: '45rpx',
}"></up-parse>
</view>
<view @click="handleSubmit" class="buttom level" :style="{ borderRadius: '41rpx' }">
提现
@ -55,6 +56,9 @@
}, ]
})
const store = useStore();
const configList = computed(() => {
return store.getters.configList
})
const userInfo = computed(() => {
return store.getters.userInfo
})


+ 88
- 72
otherPages/userManage/pet/components/petHealthInfo.vue View File

@ -1,57 +1,69 @@
<template>
<view>
<view class="personal-pet-health-info">
<view class="personal-pet-info-title border-bottom">
宠物健康情况
</view>
<u--form labelPosition="left" :model="petHealthInfo" ref="uForm">
<u-form-item required label="疫苗" :prop="`petHealthInfo.vaccine`" labelWidth="80" borderBottom
@click="showVaccine = true">
<u--input v-model="petHealthInfo.vaccine" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="驱虫" :prop="`petHealthInfo.deworm`" labelWidth="80" borderBottom
@click="showExpelling = true">
<u--input v-model="petHealthInfo.deworm" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item label="绝育" :prop="`petHealthInfo.neutered`" labelWidth="80" borderBottom
@click="showSterilization = true" ref="item1">
<u--input v-model="petHealthInfo.neutered" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item v-if="petType === 'dog' || petType === '狗狗' " label="狗证"
:prop="`petHealthInfo.doglicenseStatus`" labelWidth="80" borderBottom @click="showDog = true"
ref="item1">
<u--input v-model="petHealthInfo.doglicenseStatus" disabled disabledColor="#ffffff"
placeholder="请选择" placeholderStyle="text-align:right;color:#AAA" border="none"
inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<view class="dog-tips" v-if="petType === 'dog' || petType === '狗狗'">
<u-icon name="info-circle" color="#A94F20" size="12"></u-icon>
<view style="margin-left: 3px;">
未办理养犬许可证且需要外出遛狗, 犬只存在被相关单位收缴
甚至捕杀的可能请您遵守当地养犬规范合法文明养犬具体
请您查看当地养犬条例
</view>
</view>
<!-- 赶进度先注释 -->
<!-- <u-form-item required label="健康" :prop="`petHealthInfo.healths`" labelWidth="80" @click="healthsSelect"> -->
<u-form-item required label="健康" :prop="`petHealthInfo.health`" labelWidth="80">
<u--input disabledColor="#ffffff" placeholder="请输入"
v-model="petHealthInfo.health"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<view slot="right">
<u-icon v-if="showHealths" name="arrow-down" color="#AAA"></u-icon>
<u-icon v-else name="arrow-right" color="#AAA"></u-icon>
</view>
</u-form-item>
</u--form>
</view>
<view >
<view class="personal-pet-health-info">
<view class="personal-pet-info-title border-bottom">
宠物健康情况
</view>
<u--form labelPosition="left" :model="petHealthInfo" ref="uForm">
<u-form-item required label="疫苗" :prop="`petHealthInfo.vaccineStatus`" labelWidth="80" borderBottom
@click="showVaccine = true">
<u--input v-model="petHealthInfo.vaccineStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item required label="驱虫" :prop="`petHealthInfo.dewormingStatus`" labelWidth="80" borderBottom
@click="showExpelling = true">
<u--input v-model="petHealthInfo.dewormingStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item label="绝育" :prop="`petHealthInfo.sterilization`" labelWidth="80" borderBottom
@click="showSterilization = true" ref="item1">
<u--input v-model="petHealthInfo.sterilization" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<u-form-item v-if="petType === 'dog' || petType === '狗狗' " label="狗证" :prop="`petHealthInfo.doglicenseStatus`" labelWidth="80" borderBottom
@click="showDog = true" ref="item1">
<u--input v-model="petHealthInfo.doglicenseStatus" disabled disabledColor="#ffffff" placeholder="请选择"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<u-icon slot="right" name="arrow-right" color="#AAA"></u-icon>
</u-form-item>
<view class="dog-tips" v-if="petType === 'dog' || petType === '狗狗'">
<image class="icon" :src="configList.pet_dog_license.paramValueImage"></image>
<view>
<up-parse :content="configList.pet_dog_license.paramValueArea" containerStyle="{
color: '#A94F20',
fontSize: '12px',
}"></up-parse>
</view>
</view>
<u-form-item required label="健康" :prop="`petHealthInfo.healths`" labelWidth="80"
@click="healthsSelect">
<u--input disabled disabledColor="#ffffff" placeholder="请选择(多选)" :value="petHealthInfo.healthStatus && petHealthInfo.healthStatus.join(',')"
placeholderStyle="text-align:right;color:#AAA" border="none" inputAlign="right"></u--input>
<view slot="right">
<u-icon v-if="showHealths" name="arrow-down" color="#AAA"></u-icon>
<u-icon v-else name="arrow-right" color="#AAA" ></u-icon>
</view>
</u-form-item>
</u--form>
</view>
<view class="health-select" v-show="showHealths">
<view style="padding: 10px;height: 85%;">
<u-checkbox-group v-model="petHealthInfo.healthStatus" @change="checkboxChange" placement="column" activeColor="#ffbf60">
<u-checkbox :customStyle="{marginBottom: '8px'}" v-for="(item, index) in healthData"
:key="index" :label="item" :name="item">
</u-checkbox>
</u-checkbox-group>
<u--input placeholder="请输入其他健康特征"
:disabled="!(petHealthInfo.healthStatus && petHealthInfo.healthStatus.includes('其他'))"
border="surround" maxlength='20'
:customStyle="{backgroundColor: '#fff'}"
@change="updatePetHealthInfo()"
v-model="petHealthInfo.remark"></u--input>
</view>
</view>
<!-- 赶进度先注释 -->
<!-- <view class="health-select" v-show="showHealths">
@ -221,22 +233,26 @@
</script>
<style lang="scss">
.personal-pet-health-info {
background-color: #fff;
padding: 10px 20px 0 20px;
margin-top: 10px;
}
.health-select {
background-color: #fffcf2;
padding: 10px 20px;
}
.dog-tips {
color: #A94F20;
font-size: 12px;
display: flex;
align-items: baseline;
margin-top: 5px;
}
</style>
.personal-pet-health-info{
background-color: #fff;
padding: 10px 20px 0 20px;
margin-top: 10px;
}
.health-select{
background-color: #fffcf2;
padding: 10px 20px;
}
.dog-tips{
color: #A94F20;
font-size: 12px;
display: flex;
align-items: baseline;
margin-top: 5px;
.icon {
width: 12px;
height: 12px;
margin-right: 3px;
}
}
</style>

+ 10
- 1
otherPages/workbenchManage/examNotice/index.vue View File

@ -52,13 +52,22 @@ import submitBut from "../../../components/submitBut/index.vue"
import tab from "@/plugins/tab";
import {getStorage} from "../../../utils/auth";
import modal from "../../../plugins/modal";
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
onShow(() => {
answerCount.value = getStorage("userInfo").answerCount
console.log(answerCount.value);
})
const type = getStorage("userInfo")?.petType?.split(',')
const sumNum = ref(3)
const sumNum = computed(() => {
return parseInt(configList.value.pet_work_num.paramValueText || 0)
})
const answerCount = ref(0)
const typeData = ref(
[


+ 27
- 31
otherPages/workbenchManage/myLevel/commponents/myData.vue View File

@ -1,41 +1,29 @@
<template>
<view class="my-data">
<view class="my-data-mounth">
<cardTitle :cardTitle="nounthName"></cardTitle>
<cardData :cardData="nounthData"></cardData>
</view>
</view>
<view>
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="totalName"></cardTitle>
<cardData :cardData="totalData"></cardData>
<view class="my-data">
<view class="my-data-mounth">
<cardTitle :cardTitle="nounthName"></cardTitle>
<cardData :cardData="nounthData"></cardData>
</view>
</view>
</view>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }">
<view class="form_item">
累积数据:即注册至今的累计数据
</view>
<view class="line1">
</view>
<view class="form_item">
当月注册用户:在本月初至今您成功邀请绑定的新用户数量
<p>累积注册用户:您入驻合伙人至今成功邀请绑定的用户数量</p>
</view>
<view class="line1">
</view>
<view class="form_item">
当月下单用户:在本月初至今成功邀请绑定的新用户中截止今天成功下单的用户数;
<p>累积下单用户:您入驻合伙人至今成功邀请绑定的新用户中截止今日成功下单的用户数</p>
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="totalName"></cardTitle>
<cardData :cardData="totalData"></cardData>
</view>
</view>
<view class="line1">
</view>
<view class="form_item">
当月有效用户:本月初至今下单的用户中截止今日订单已完成的用户数量;
<p>累积有效用户:您入驻合伙人至今成功下单的新用户中截止今日所有订单已完成的用户数</p>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }" >
<up-parse :content="configList.cumulative_data_statement.paramValueArea" containerStyle="{
color: '#A55822',
fontSize: '22rpx',
lineHeight: '29rpx',
}"></up-parse>
</view>
</view>
</template>
<script setup>
@ -45,6 +33,14 @@
ref,
reactive
} from "vue"
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const nounthName = ref('当月数据')
const totalName = ref('累计数据')
const nounthData = reactive([{


+ 0
- 3
otherPages/workbenchManage/myUser/components/haveOrder.vue View File

@ -47,9 +47,6 @@
</view>
</view>
</view>
<!-- <view class="mt60" :style="{color:'#A55822',fontSize:'22rpx',backgroundColor:'#FFF4E6',borderRadius:'16rpx'}">
*累计报酬:当该用户订单完成时才会纳入报酬计算
</view> -->
</template>
<script>


+ 15
- 0
otherPages/workbenchManage/myUser/index.vue View File

@ -50,6 +50,13 @@
</view>
</view>
</view>
<view style="margin-top: 17rpx; padding: 15rpx 29rpx; background-color: #FFF4E6; border-radius: 16rpx;" >
<up-parse :content="configList.cumulative_reward_statement.paramValueArea" containerStyle="{
color: '#A55822',
fontSize: '22rpx',
lineHeight: '29rpx',
}"></up-parse>
</view>
</view>
</template>
@ -59,6 +66,7 @@ import {
reactive,
onMounted
} from "vue"
import { useStore } from 'vuex'
import haveOrder from "./components/haveOrder.vue"
import noOrder from "./components/noOrder.vue"
import {
@ -70,6 +78,13 @@ import {
bindCode
} from "@/api/home.js"
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const code = ref('asdasaadsdsa')
const url = ref('https://uview-plus.jiangruyi.com/components/button.html')
const current = ref(0)


+ 28
- 31
otherPages/workbenchManage/myWallet/components/myData.vue View File

@ -1,41 +1,30 @@
<template>
<view class="my-data">
<view class="my-data-mounth">
<cardTitle :cardTitle="nounthName"></cardTitle>
<cardData :cardData="nounthData"></cardData>
</view>
</view>
<view>
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="totalName"></cardTitle>
<cardData :cardData="totalData"></cardData>
<view class="my-data">
<view class="my-data-mounth">
<cardTitle :cardTitle="nounthName"></cardTitle>
<cardData :cardData="nounthData"></cardData>
</view>
</view>
</view>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }">
<view class="form_item">
累积数据:即注册至今的累计数据
</view>
<view class="line1">
</view>
<view class="form_item">
当月注册用户:在本月初至今您成功邀请绑定的新用户数量
<p>累积注册用户:您入驻合伙人至今成功邀请绑定的用户数量</p>
</view>
<view class="line1">
<view class="my-data">
<view class="my-data-total">
<cardTitle :cardTitle="totalName"></cardTitle>
<cardData :cardData="totalData"></cardData>
</view>
</view>
<view class="form_item">
当月下单用户:在本月初至今成功邀请绑定的新用户中截止今天成功下单的用户数;
<p>累积下单用户:您入驻合伙人至今成功邀请绑定的新用户中截止今日成功下单的用户数</p>
</view>
<view class="line1">
</view>
<view class="form_item">
当月有效用户:本月初至今下单的用户中截止今日订单已完成的用户数量;
<p>累积有效用户:您入驻合伙人至今成功下单的新用户中截止今日所有订单已完成的用户数</p>
<view class="bottom box-size child" :style="{ borderRadius: '16rpx' }" >
<up-parse :content="configList.cumulative_data_statement.paramValueArea" containerStyle="{
color: '#A55822',
fontSize: '22rpx',
lineHeight: '29rpx',
}"></up-parse>
</view>
</view>
</template>
<script setup>
@ -45,6 +34,14 @@
ref,
reactive
} from "vue"
import { useStore } from 'vuex'
const store = useStore()
const configList = computed(() => {
return store.getters.configList
})
const nounthName = ref('当月数据')
const totalName = ref('累计数据')
const nounthData = reactive([{


+ 13
- 7
pages/userManage/index.scss View File

@ -7,14 +7,20 @@
.base-leavel {
display: flex;
.petMaster {
display: block;
width: 125rpx;
height: 34rpx;
margin-left: 10rpx;
}
}
}
.role-tag {
display: inline-block;
width: 125rpx;
height: 34rpx;
margin: 19rpx 0;
& + & {
margin-left: 10rpx;
}
}
.login{
padding: 40rpx;
}
@ -62,4 +68,4 @@
color: #000000;
font-size: 28rpx;
line-height: 40rpx;
}
}

+ 36
- 35
pages/userManage/index.vue View File

@ -10,8 +10,10 @@
<view style="width: calc(100% - 120rpx); padding-left: 20rpx;box-sizing: border-box;">
<view class="base-leavel">
<text>{{getIsLogin()?userInfo.userName:"欢迎来到版宠师"}}</text>
<image class="petMaster" :src="petMaster" mode="aspectFill"></image>
<image class="petMaster" :src="partnerMaster" mode="aspectFill"></image>
</view>
<view>
<image v-if="petMaster" class="role-tag" :src="petMaster" mode="aspectFill"></image>
<image v-if="partnerMaster" class="role-tag" :src="partnerMaster" mode="aspectFill"></image>
</view>
<view>
手机号:{{ userInfo?.userTelephone }}
@ -87,12 +89,14 @@
height="68rpx"></up-image>
<view>平台协议</view>
</view>
<view @click="openCustomerServiceChat" class="icon-list">
<up-image class="mb20" :show-loading="true"
src="https://cdn.catmdogd.com/Work/image/work/icon3.png" width="68rpx"
height="68rpx"></up-image>
<view>联系客服</view>
</view>
<button plain class="btn-share" open-type="contact">
<view class="icon-list">
<up-image class="mb20" :show-loading="true"
src="https://cdn.catmdogd.com/Work/image/work/icon3.png" width="68rpx"
height="68rpx"></up-image>
<view>联系客服</view>
</view>
</button>
<button plain class="btn-share" open-type="share">
<view class="icon-list">
<up-image class="mb20" :show-loading="true"
@ -183,22 +187,36 @@
const show = ref(false)
const content = ref("")
const modal = ref(null)
const petMasterLevel = ref(1)
const partnerLevel = ref(0)
const LEVEL_AND_KEY_FIELDS_MAPPING = {
'1': 'primary',
'2': 'intermediate',
'3': 'senior',
}
//
const petMaster = computed(() => {
const paths = [configList.value?.pet_primary?.paramValueImage, configList.value?.pet_senior
?.paramValueImage
];
return paths[petMasterLevel.value];
const { userBcs, userBcsRole } = userInfo.value
if (!userBcs) {
return ''
}
const key = `pet_${LEVEL_AND_KEY_FIELDS_MAPPING[userBcsRole]}`
return configList.value?.[key]?.paramValueImage
})
//
const partnerMaster = computed(() => {
const paths = [configList.value?.partner_intermediate?.paramValueImage, configList.value?.partner_senior
?.paramValueImage
];
return paths[partnerLevel.value];
const { userHh } = userInfo.value
if (!userHh) {
return ''
}
const key = `partner_${LEVEL_AND_KEY_FIELDS_MAPPING[userHh]}`
return configList.value?.[key]?.paramValueImage
})
if (getIsLogin() && getToken()) {
@ -270,23 +288,6 @@
// 退
}
// openCustomerServiceChat
const openCustomerServiceChat = () => {
uni.openCustomerServiceChat({
extInfo: {
url: "https://work.weixin.qq.com/kfid/kfc135d138d063817e1"
},
sessionFrom: '1000',
//
success: function(res) {
console.log('成功打开客服会话', res);
},
//
fail: function(err) {
console.error('打开客服会话失败', err);
}
});
};
</script>
<style scoped lang="scss">
@import "index";


+ 53
- 0
utils/authorize.js View File

@ -0,0 +1,53 @@
function authorize(scope){
return new Promise((success, error) => {
uni.authorize({
/* scope.writePhotosAlbum 类型是保存到相册 */
scope,
success,
complete(res) {
/* 判断如果没有授权就打开设置选项让用户重新授权 */
uni.getSetting({
success(res) {
if (!res.authSetting[scope]) {
setting()
}
}
});
}
});
function setting(){
uni.showModal({
title: '当前操作未授权,请授权!',
content: '拒绝授权将影响本小程序部分功能的使用',
confirmText: '授权',
success(e) {
if(!e.confirm){
return error()
}
uni.openSetting({
success(res) {
if (!res.authSetting[scope]) {
uni.showToast({
title: '授权失败',
icon: 'none',
})
return error()
}
success()
}
});
}
})
}
})
}
export default authorize

Loading…
Cancel
Save