6/10合并最新代码
This commit is contained in:
@@ -1,32 +1,30 @@
|
||||
<script setup>
|
||||
import { onLaunch } from '@dcloudio/uni-app'
|
||||
import { onLaunch } from '@dcloudio/uni-app'
|
||||
|
||||
// 应用启动时执行
|
||||
onLaunch(() => {
|
||||
// 应用启动时执行
|
||||
onLaunch(() => {
|
||||
console.log('App 启动')
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
// 只有 App 平台才获取 CID
|
||||
getPushCID()
|
||||
// #endif
|
||||
})
|
||||
})
|
||||
|
||||
// 获取 uniPush 2.0 CID
|
||||
function getPushCID() {
|
||||
// 获取 uniPush 2.0 CID
|
||||
function getPushCID() {
|
||||
uni.getPushClientId({
|
||||
success: (res) => {
|
||||
success: res => {
|
||||
console.log('推送初始化成功')
|
||||
console.log('CID =', res.cid)
|
||||
|
||||
// 存起来备用
|
||||
uni.setStorageSync('push_cid', res.cid)
|
||||
},
|
||||
fail: (err) => {
|
||||
fail: err => {
|
||||
console.error('获取推送 CID 失败', err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* @Author: Zy
|
||||
* @Date: 2026-05-15 11:37:01
|
||||
* @LastEditor: Zy
|
||||
* @LastEditTime: 2026-05-19 16:32:46
|
||||
* @LastEditTime: 2026-06-09 11:19:15
|
||||
*/
|
||||
import request, {
|
||||
get,
|
||||
@@ -80,3 +80,24 @@ export function getVillageHouseList_keyword(data, searchValue = '') {
|
||||
export function uploadFile(file) {
|
||||
return post('/resource/oss/upload', file)
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef pushData data
|
||||
* @property {string} userid 用户id
|
||||
* @property {string} channel resident 居民端 buttler 管家端
|
||||
* @property {string} title 推送标题
|
||||
* @property {string} content 推送内容
|
||||
*/
|
||||
/**
|
||||
* @description: 单推接口
|
||||
* @param {pushData} data
|
||||
* @return
|
||||
*/
|
||||
export function PushSingle(data) {
|
||||
return post("/api/push/single", {
|
||||
userid: 'xxx',
|
||||
channel: "buttler",
|
||||
title: data.title,
|
||||
content: data.content
|
||||
})
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import TabsComponents from '@/components/tabs/tabs.vue'
|
||||
@@ -76,7 +76,7 @@ const statusTabs = [
|
||||
},
|
||||
{
|
||||
name: '待处理',
|
||||
value: 0
|
||||
value: 3
|
||||
},
|
||||
{
|
||||
name: '已完成',
|
||||
@@ -84,7 +84,7 @@ const statusTabs = [
|
||||
}
|
||||
]
|
||||
// 切换状态(全部/待分配/待解决/已完成)筛选
|
||||
const switchStatus = (value: number) => {
|
||||
const switchStatus = value => {
|
||||
activeStatus.value = value
|
||||
if (value === -1) {
|
||||
querySearch.value.status = undefined
|
||||
@@ -146,7 +146,7 @@ function resetList() {
|
||||
}
|
||||
|
||||
// actions
|
||||
function handleComplaint(id: string) {
|
||||
function handleComplaint(id) {
|
||||
uni.navigateTo({
|
||||
url: '/pageSubPack/complaint/Details_handle?id=' + id
|
||||
})
|
||||
|
||||
@@ -68,7 +68,11 @@
|
||||
</view>
|
||||
|
||||
<!-- submit -->
|
||||
<view v-if="complainInfo.status === '0'" class="action_btn" @tap="handleSelecthouse">
|
||||
<view
|
||||
v-if="complainInfo.status === '0' || complainInfo.status === '1'"
|
||||
class="action_btn"
|
||||
@tap="handleSelecthouse"
|
||||
>
|
||||
<text>处理</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -12,11 +12,10 @@
|
||||
<view class="areabox">
|
||||
<textarea
|
||||
style="width: 100%; height: 100%; overflow: hidden"
|
||||
:value="form.handleContent"
|
||||
v-model="form.handleContent"
|
||||
:maxlength="-1"
|
||||
auto-height
|
||||
placeholder="请输入"
|
||||
@blur="handleBlur"
|
||||
placeholder-style="font-size:28rpx;"
|
||||
/>
|
||||
</view>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
lower-threshold="60"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<radio-group @change="radioChange">
|
||||
<radio-group @change="radioChange" v-if="searchlist.length > 0">
|
||||
<label v-for="(item, index) in searchlist" :key="index">
|
||||
<view
|
||||
class="item flex items-center justify-between"
|
||||
@@ -55,6 +55,9 @@
|
||||
</view>
|
||||
</label>
|
||||
</radio-group>
|
||||
<view class="nodata" v-else>
|
||||
<text>暂无数据</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- submit -->
|
||||
|
||||
@@ -213,7 +213,7 @@ const handleLogin = () => {
|
||||
phone: phoneNumber.value,
|
||||
smsCode: verifyCode.value,
|
||||
scene: 'butler_login',
|
||||
cid:push_cid
|
||||
cid: push_cid
|
||||
}
|
||||
getLoginBySms(params)
|
||||
.then(res => {
|
||||
|
||||
@@ -42,6 +42,7 @@ import { ref } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import filePicker from '@/components/filePicker/filePicker.vue'
|
||||
import { ticketComputed } from '@/api/ticket.js'
|
||||
import { PushSingle } from '@/api/common.js'
|
||||
const form = ref({
|
||||
id: '',
|
||||
descrition: '',
|
||||
@@ -65,6 +66,7 @@ function handleSelecthouse() {
|
||||
ticketComputed(obj)
|
||||
.then(() => {
|
||||
uni.navigateBack()
|
||||
PushSingle()
|
||||
})
|
||||
.catch(() => {
|
||||
uni.showToast({
|
||||
|
||||
Reference in New Issue
Block a user