cashier_app/pages/list/render/WxmpUserRender.vue

65 lines
1.6 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
订单列表页面 数据渲染
业务 通知人管理
@author terrfly
@site https://www.jeequan.com
@date 2022/11/28 17:44
-->
<template>
<view class="notice-main">
<view class="notice-title">
<view class="notice-name single-text-beyond">{{ props.record.nickname }}</view>
<JeepayStateSwitch v-model:state="props.record.sendStatus" :showSwitchType="true" :updateStateFunc="updateStateFunc" />
</view>
<view class="notice-info">{{ props.record.wxOpenId }}</view>
</view>
</template>
<script setup>
import { reactive, ref } from "vue"
import cal from '@/commons/utils/cal.js'
import go from '@/commons/utils/go.js'
import datamap from '@/commons/utils/datamap.js'
import { reqLoad, API_URL_WXMP_USER_LIST } from "@/http/apiManager.js"
import infoBox from '@/commons/utils/infoBox.js'
// 定义传入属性
const props = defineProps({
record: {type:Object, default: () => {}}, // 渲染对象
})
function updateStateFunc (sendStatus) {
return reqLoad.updateById(API_URL_WXMP_USER_LIST, props.record.userId, { sendStatus : sendStatus }).then(({bizData}) => {
infoBox.showSuccessToast('更新成功')
})
}
</script>
<style lang="scss" scoped>
.notice-main {
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 40rpx;
height: 175rpx;
background-color: $J-bg-ff;
.notice-title {
display: flex;
align-items: center;
justify-content: space-between;
.notice-name {
width: 480rpx;
font-size: 30rpx;
}
}
.notice-info {
margin-top: 16rpx;
font-size: 26rpx;
color: $J-color-t99;
}
}
</style>