update 增加审核,增加个推语音,修复BUG

This commit is contained in:
qijq 2025-08-15 11:58:11 +08:00
parent b73d5d0878
commit 5829608f98
19 changed files with 766 additions and 299 deletions

View File

@ -20,7 +20,7 @@
"type" : "uniCloud" "type" : "uniCloud"
}, },
{ {
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
}, },
{ {

View File

@ -23,7 +23,6 @@ export default {
if (hasAgreed) { if (hasAgreed) {
this.onAPPUpdate(); this.onAPPUpdate();
} }
this.initAppOrderPush(); this.initAppOrderPush();
// #endif // #endif
}, },
@ -74,33 +73,6 @@ export default {
success: (res) => { success: (res) => {
var push_clientid = res.cid; var push_clientid = res.cid;
console.log("客户端推送标识cid:", push_clientid); console.log("客户端推送标识cid:", push_clientid);
uni.showToast({
title: push_clientid,
icon: "success",
duration: 1000,
});
console.log(push_clientid);
uni.setClipboardData({
data: push_clientid, //
success: () => {
// 1
// uni.showToast({
// title: "",
// icon: "success",
// duration: 1000,
// });
},
fail: () => {
// 1
uni.showToast({
title: "复制失败,请重试",
icon: "none",
duration: 1000,
});
},
});
}, },
fail(err) { fail(err) {
console.log(err); console.log(err);
@ -113,9 +85,15 @@ export default {
if (res.data) { if (res.data) {
const app = getApp(); const app = getApp();
if (!app.globalData.isAppActive) { if (!app.globalData.isAppActive) {
// //
uni.setStorageSync("pendingPushData", res.data); if (res.type == "click") {
uni.createPushMessage(res.data); this.handlePushClick(res.data.payload);
} else {
this.handlePushSound(res.data);
uni.setStorageSync("pendingPushData", res.data);
//
uni.createPushMessage(res.data);
}
} else { } else {
console.log("应用已打开,直接处理消息"); console.log("应用已打开,直接处理消息");
// UI // UI
@ -125,7 +103,126 @@ export default {
}); });
const _self = this; const _self = this;
// },
// -
handlePushClick(payload) {
console.log("处理通知栏点击:", payload);
console.log(payload.category);
// payload
switch (payload.category) {
case "mchOnLineOrderList":
uni.setStorageSync("currentTab2", 0);
uni.switchTab({
url: "/pages/order/order",
});
break;
case "mchAbnormalOrderList":
uni.setStorageSync("currentTab2", 1);
uni.switchTab({
url: "/pages/order/order",
});
break;
case "mchRetrunOrderList":
uni.setStorageSync("currentTab2", 2);
uni.switchTab({
url: "/pages/order/order",
});
break;
default:
uni.switchTab({
url: "/pages/order/order",
});
}
//
uni.removeStorageSync("pendingPushData");
},
// -
// handlePushSound
handlePushSound(pushData) {
console.log(pushData.payload);
try {
// category使
const category = pushData.payload.category;
var AUDIO = uni.createInnerAudioContext();
//
let soundFile = "";
switch (category) {
case "mchOnLineOrderList":
AUDIO.src = "/static/mp3/jinxingzhong.MP3";
AUDIO.play();
break;
case "mchAbnormalOrderList":
AUDIO.src = "/static/mp3/yichang.MP3";
AUDIO.play();
break;
case "mchRetrunOrderList":
AUDIO.src = "/static/mp3/tuihuo.MP3";
AUDIO.play();
break;
}
//
AUDIO.onError((res) => {
console.error("播放声音失败:", res);
});
// -99
//
AUDIO.onEnded(() => {
AUDIO.pause();
AUDIO.destroy();
AUDIO = null;
});
// Android
// #ifdef APP-PLUS && ANDROID
if (plus.os.name === "Android") {
this.playNativeAndroidSound(soundFile);
}
// #endif
} catch (e) {
console.error("播放推送声音失败:", e);
}
},
// Android
playNativeAndroidSound(soundFile) {
try {
const main = plus.android.runtimeMainActivity();
const MediaPlayer = plus.android.importClass(
"android.media.MediaPlayer"
);
// '/static'Android assets
const androidAssetPath = soundFile.replace(/^\/static\//, "");
const mediaPlayer = new MediaPlayer();
const assetFileDescriptor = main
.getAssets()
.openFd("www/" + androidAssetPath);
mediaPlayer.setDataSource(
assetFileDescriptor.getFileDescriptor(),
assetFileDescriptor.getStartOffset(),
assetFileDescriptor.getLength()
);
mediaPlayer.prepare();
mediaPlayer.start();
mediaPlayer.setOnCompletionListener(
new plus.android.Proxy(function () {
mediaPlayer.release();
})
);
} catch (e) {
console.error("Android原生播放失败:", e);
}
}, },
}, },
}; };

View File

@ -0,0 +1,31 @@
import http from "../utils/http";
import config from "../config/config";
/**
* 提交聊天举报
* @author Seven
* @data 2025-3-28
* @param {
* snsUserReport:
* {
* "reportedUserId":"1000067",
* "reportedNickname":"微信用户",
* "reporterPhone":"18278596806",
* "reportCategory":"1",
* "reportContent":"经常被骚扰"
* }
*
* files: 867ce8b9452246a18be865786efa923d.jpeg
* }
* @returns { }
* @see https://mall.gpxscs.cn/admin/shop/shop-order-base/mch/order/list
*/
export function GetSubmitReport(params) {
return http({
url: "/sns/snsUserReport/submitReport",
method: "post",
data: params,
baseURL: config.apiMobile,
});
}

View File

@ -1,173 +1,172 @@
{ {
"name" : "小发同城", "name": "小发同城",
"appid" : "__UNI__95F809F", "appid": "__UNI__95F809F",
"package" : "com.xiaofa.shopAdmin", "package": "com.xiaofa.shopAdmin",
"description" : "", "description": "",
"versionName" : "1.0.1", "versionName": "1.0.0",
"versionCode" : 101, "versionCode": 100,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
},
/* */
"modules": {
"Maps": {},
"Camera": {},
"Record": {},
"VideoPlayer": {},
"UIWebview": {},
"Push": {}
},
/* */
"distribute": {
/* android */
"android": {
"targetSdkVersion": 30,
"minSdkVersion": 21,
"compileSdkVersion": 30,
"permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios": {
"privacyDescription": {
"NSPhotoLibraryAddUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
"NSPhotoLibraryUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
"NSCameraUsageDescription": "此App会在上传头像图片服务中访问您的相机权限",
"NSMicrophoneUsageDescription": "此APP会在使用声音识别服务中使用您的麦克风权限",
"NSLocationWhenInUseUsageDescription": "此App会在使用导航服务中使用您的定位权限",
"NSLocationAlwaysUsageDescription": "此App会在使用导航服务中使用您的定位权限",
"NSLocationAlwaysAndWhenInUseUsageDescription": "此App会在使用导航服务中使用您的定位权限"
}, },
/* */ "dSYMs": false,
"modules" : { "UIBackgroundModes": "audio"
"Maps" : {}, },
"Camera" : {}, /* SDK */
"Record" : {}, "sdkConfigs": {
"VideoPlayer" : {}, "maps": {},
"UIWebview" : {}, "push": {
"Push" : {} "unipush": {
}, "version": "2",
/* */ "offline": false,
"distribute" : { "appid": "rQxaGAKl7t83KlTubAaKC3",
/* android */ "appkey": "QSElTn6ttq5nmrIZtFhCT"
"android" : { }
"targetSdkVersion" : 30,
"minSdkVersion" : 21,
"compileSdkVersion" : 30,
"permissions" : [
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
"<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
]
},
/* ios */
"ios" : {
"privacyDescription" : {
"NSPhotoLibraryAddUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
"NSPhotoLibraryUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
"NSCameraUsageDescription" : "此App会在上传头像图片服务中访问您的相机权限",
"NSMicrophoneUsageDescription" : "此APP会在使用声音识别服务中使用您的麦克风权限",
"NSLocationWhenInUseUsageDescription" : "此App会在使用导航服务中使用您的定位权限",
"NSLocationAlwaysUsageDescription" : "此App会在使用导航服务中使用您的定位权限",
"NSLocationAlwaysAndWhenInUseUsageDescription" : "此App会在使用导航服务中使用您的定位权限"
},
"dSYMs" : false
},
/* SDK */
"sdkConfigs" : {
"maps" : {},
"push" : {
"unipush" : {
"version" : "2",
"offline" : false,
"appid" : "rQxaGAKl7t83KlTubAaKC3",
"appkey" : "QSElTn6ttq5nmrIZtFhCT"
}
}
},
"icons" : {
"android" : {
"hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png"
},
"ios" : {
"appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : {
"app" : "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png"
},
"iphone" : {
"app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png"
}
}
},
"splashscreen" : {
"androidStyle" : "default",
"useOriginalMsgbox" : true
}
},
"uniStatistics" : {
"enable" : true
} }
}, },
/* */ "icons": {
"quickapp" : {}, "android": {
/* */ "hdpi": "unpackage/res/icons/72x72.png",
"mp-weixin" : { "xhdpi": "unpackage/res/icons/96x96.png",
"appid" : "", "xxhdpi": "unpackage/res/icons/144x144.png",
"setting" : { "xxxhdpi": "unpackage/res/icons/192x192.png"
"urlCheck" : false
}, },
"usingComponents" : true "ios": {
}, "appstore": "unpackage/res/icons/1024x1024.png",
"h5" : { "ipad": {
// "devServer" : { "app": "unpackage/res/icons/76x76.png",
// "https" : true, "app@2x": "unpackage/res/icons/152x152.png",
// "host" : "127.0.0.1", "notification": "unpackage/res/icons/20x20.png",
// "port" : 8080, "notification@2x": "unpackage/res/icons/40x40.png",
// "disableHostCheck" : true, "proapp@2x": "unpackage/res/icons/167x167.png",
// "proxy" : { "settings": "unpackage/res/icons/29x29.png",
// "/place/v2/suggestion" : { "settings@2x": "unpackage/res/icons/58x58.png",
// "target" : "https://api.map.baidu.com", "spotlight": "unpackage/res/icons/40x40.png",
// "changeOrigin" : true, "spotlight@2x": "unpackage/res/icons/80x80.png"
// "secure" : false },
// }, "iphone": {
// "/admin/shop/shop-base-product-category/list" : { "app@2x": "unpackage/res/icons/120x120.png",
// "target" : "https://mall.gpxscs.cn", "app@3x": "unpackage/res/icons/180x180.png",
// "changeOrigin" : true "notification@2x": "unpackage/res/icons/40x40.png",
// } "notification@3x": "unpackage/res/icons/60x60.png",
// } "settings@2x": "unpackage/res/icons/58x58.png",
// }, "settings@3x": "unpackage/res/icons/87x87.png",
"title" : "小发商城商家中心", "spotlight@2x": "unpackage/res/icons/80x80.png",
"template" : "index.html", "spotlight@3x": "unpackage/res/icons/120x120.png"
"router" : { }
"mode" : "history",
"base" : "/mchapp/"
} }
},
"splashscreen": {
"androidStyle": "default",
"useOriginalMsgbox": true
}
}, },
"mp-alipay" : { "uniStatistics": {
"usingComponents" : true "enable": true
}
},
/* */
"quickapp": {},
/* */
"mp-weixin": {
"appid": "",
"setting": {
"urlCheck": false
}, },
"mp-baidu" : { "usingComponents": true
"usingComponents" : true },
}, "h5": {
"mp-toutiao" : { // "devServer" : {
"usingComponents" : true // "https" : true,
}, // "host" : "127.0.0.1",
"uniStatistics" : { // "port" : 8080,
"enable" : false, // "disableHostCheck" : true,
"version" : "2" // "proxy" : {
}, // "/place/v2/suggestion" : {
"vueVersion" : "2", // "target" : "https://api.map.baidu.com",
"fallbackLocale" : "zh-Hans" // "changeOrigin" : true,
// "secure" : false
// },
// "/admin/shop/shop-base-product-category/list" : {
// "target" : "https://mall.gpxscs.cn",
// "changeOrigin" : true
// }
// }
// },
"title": "小发商城商家中心",
"template": "index.html",
"router": {
"mode": "history",
"base": "/mchapp/"
}
},
"mp-alipay": {
"usingComponents": true
},
"mp-baidu": {
"usingComponents": true
},
"mp-toutiao": {
"usingComponents": true
},
"uniStatistics": {
"enable": false,
"version": "2"
},
"vueVersion": "2",
"fallbackLocale": "zh-Hans"
} }
/* 5+App */ /* 5+App */

View File

@ -92,7 +92,7 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ {
"path": "pages/order/orderInfo", "path": "pages/order/orderInfo",
"style": { "style": {
"navigationBarTitleText": "订单详情" "navigationBarTitleText": "订单详情"
@ -116,6 +116,12 @@
"navigationBarTitleText": "聊天设置" "navigationBarTitleText": "聊天设置"
} }
}, },
{
"path": "pages/IM/complaint",
"style": {
"navigationBarTitleText": "聊天设置"
}
},
{ {
"path": "pages/viewCenter/viewCenter", "path": "pages/viewCenter/viewCenter",
"style": { "style": {

View File

@ -6,11 +6,13 @@
{ 'disable-scroll': showVoiceMask }, { 'disable-scroll': showVoiceMask },
]" ]"
> >
<u-navbar <u-navbar :title="ImItemInfo.username" :autoBack="true" :placeholder="true">
:title="ImItemInfo.username" <u-icon
:autoBack="true" name="more-dot-fill"
:placeholder="true" slot="right"
></u-navbar> @click="skipuComplaint"
></u-icon>
</u-navbar>
<view class="tui-chat-content" id="tui-chat-content"> <view class="tui-chat-content" id="tui-chat-content">
<!-- <tui-loadmore <!-- <tui-loadmore
v-if="loadding" v-if="loadding"
@ -1008,6 +1010,13 @@ export default {
urls: this.msgImgList, urls: this.msgImgList,
}); });
}, },
skipuComplaint() {
uni.navigateTo({
url: `/pages/IM/complaint?reciprocalImInfo=${JSON.stringify(
this.ImItemInfo
)}`,
});
},
}, },
onPageScroll(e) { onPageScroll(e) {
if (e.scrollTop == 0 && !this.loadding) { if (e.scrollTop == 0 && !this.loadding) {

View File

@ -0,0 +1,295 @@
<template>
<view class="complaint-container">
<u-cell
title="举报"
:isLink="true"
class="cell"
@click="showComplaintPopup = true"
></u-cell>
<u-popup
class="complaint-popup"
zIndex="996"
:show="showComplaintPopup"
mode="center"
closeable
@close="showComplaintPopup = false"
>
<view class="complaint-popup-content">
<view class="complaint-popup-title">举报</view>
<u-radio-group
v-model="radiovalue1"
placement="column"
class="radio-group"
>
<u-radio
class="radio-item"
:customStyle="{ marginBottom: '8px' }"
v-for="(item, index) in radioList"
:key="index"
:label="item.name"
:name="item.id"
></u-radio>
</u-radio-group>
<u--textarea
class="textarea"
v-model="reportContent"
placeholder="请仔细描述举报对象的恶意行为"
:maxlength="200"
height="150"
count
></u--textarea>
<imgUpload
class="imgUpload"
:imgArr="primaryImg"
uploadImgCount="3"
imgCount="3"
:imgSize="8"
:header="header"
:async="true"
:config="config"
:isAdd="true"
url="https://mall.gpxscs.cn/mobile/shop/oss/upload"
:formData="formData"
@result="handerResultUrl"
></imgUpload>
<view class="phone">
<view class="lable">联系方式</view>
<view class="input">
<u--input
placeholder="请输入您的手机号码"
border="surround"
v-model="phone"
:maxlength="11"
></u--input>
</view>
</view>
<view class="btn-content">
<u-button
class="btn-item"
:hairline="true"
:plain="true"
@click="handerlSubmit"
>
提交
</u-button>
</view>
</view>
</u-popup>
<u-toast ref="uToast" class="toast"></u-toast>
</view>
</template>
<script>
import imgUpload from "@/components/poiuy-uImgUpload/imgUpload.vue";
import { GetSubmitReport } from "@/api/complaint";
export default {
components: {
imgUpload,
},
data() {
return {
showComplaintPopup: false,
radioList: [
{
id: "1",
name: "该账号发布违规违法信息",
},
{
id: "2",
name: "该账号对我进行辱骂骚扰",
},
{
id: "3",
name: "该账号发布淫秽色情内容",
},
{
id: "4",
name: "该账号发布违规违法内容",
},
{
id: "5",
name: "其他",
},
],
// u-radio-groupv-modelradioname
radiovalue1: "1",
reportContent: "",
phone: "",
header: [],
config: {
delIcon: "", //icon
resultTip: true, //
resultType: "1", //
loadIcon: "", //
loadText: "", //
},
primaryImg: [],
formData: {
perm_key: "",
},
ImItemInfo: {
username: "",
user_id: "",
},
};
},
onShow() {
this.formData.perm_key = uni.getStorageSync("ukey") || "";
},
onLoad(options) {
if (options.reciprocalImInfo) {
this.ImItemInfo = JSON.parse(options.reciprocalImInfo);
}
},
computed: {},
methods: {
handerResultUrl(e, type) {
this.primaryImg = e.all;
},
async handerlSubmit() {
if (this.primaryImg.length <= 0) {
this.$refs.uToast.show({
message: "请上传凭证图片",
type: "error",
duration: 1000,
});
return;
}
if (!this.reportContent) {
this.$refs.uToast.show({
message: "请填写举报对象的恶意行为",
type: "error",
duration: 1000,
});
return;
}
if (this.phone && !uni.$u.test.mobile(this.phone)) {
this.$refs.uToast.show({
message: "请填写正确的手机号",
type: "error",
duration: 1000,
});
return;
}
let radioItem = this.radioList.find(
(item) => item.id == this.radiovalue1
);
let params = {
reportCategory: this.radiovalue1,
reportContent: this.reportContent,
reportedNickname: this.ImItemInfo.username,
reportedUserId: this.ImItemInfo.friend_id,
reporterPhone: this.phone,
evidenceImages: JSON.stringify(
this.primaryImg.map((item, index) => {
return {
url: item.url,
description: radioItem.name + index,
};
})
),
};
let res = await GetSubmitReport(params);
if (res && res.status == 200) {
this.showComplaintPopup = false;
this.$refs.uToast.show({
message: "提交成功",
type: "succeed",
duration: 1000,
});
this.radiovalue1 = "1";
this.reportContent = "";
this.primaryImg = [];
this.phone = "";
}
this.showComplaintPopup = false;
},
},
};
</script>
<style lang="scss">
.complaint-container {
@import "@/styles/variables.scss";
.cell {
background: #fff;
}
.complaint-popup {
::v-deep.u-popup__content {
border-radius: 16rpx;
}
::v-deep.u-fade-enter-to {
z-index: 10076 !important;
}
.complaint-popup-content {
width: 700rpx;
.complaint-popup-title {
padding: 40rpx;
text-align: center;
font-weight: bold;
font-size: 36rpx;
}
.radio-group {
margin: 0 32rpx;
.radio-item {
margin-bottom: 24rpx !important;
}
}
.textarea {
margin: 48rpx 30rpx;
background: #eeeeee;
::v-deep .u-textarea__count {
background: #eeeeee !important;
}
}
.imgUpload {
margin: 24rpx 30rpx;
}
.phone {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0 30rpx;
border-top: 1px solid #eeeeee;
border-bottom: 1px solid #eeeeee;
}
.btn-content {
margin: 48rpx 28rpx;
.btn-item {
background: $base-color;
color: #fff;
}
}
}
}
.complaint-popup {
::v-deep.u-transition {
z-index: 995 !important;
}
}
.toast {
::v-deep.u-transition {
z-index: 12000 !important;
}
}
}
</style>

View File

@ -322,7 +322,7 @@
class="id-radio-group" class="id-radio-group"
@change="handelRaddio" @change="handelRaddio"
> >
<view v-for="(item, index) in radioItems" :key="index"> <view v-for="(item, index2) in radioItems" :key="index2">
<tui-radio <tui-radio
class="id-radio" class="id-radio"
:checked="item.checked" :checked="item.checked"

View File

@ -2,7 +2,7 @@
<view class="my-container"> <view class="my-container">
<status-bar <status-bar
:backgroundColor="'#fff'" :backgroundColor="'#fff'"
:background="'linear-gradient(to left, #ff3000, #a70300)'" :background="'#fe6456'"
v-if="true" v-if="true"
></status-bar> ></status-bar>

View File

@ -81,11 +81,11 @@
<view class="body"> <view class="body">
<view class="info"> <view class="info">
<view class="img_box"> <view class="img_box">
<image <view
v-for="(item, index) of orderItem.order_items.slice(0, 3)" v-for="(item, index) of orderItem.order_items.slice(0, 3)"
:src="item.order_item_image"
mode="aspectFit" mode="aspectFit"
class="img" class="img"
:style="{ backgroundImage: `url('${item.order_item_image}')` }"
/> />
</view> </view>
@ -587,8 +587,6 @@ export default {
this.currOrderItem.sf_order_info.feed = JSON.parse( this.currOrderItem.sf_order_info.feed = JSON.parse(
this.currOrderItem.sf_order_info.feed this.currOrderItem.sf_order_info.feed
); );
console.log("有值feed", this.currOrderItem.sf_order_info);
} }
}, },
mounted() { mounted() {
@ -1011,6 +1009,9 @@ export default {
.img { .img {
width: 96rpx; width: 96rpx;
height: 96rpx; height: 96rpx;
background-position: 100% 100%;
background-repeat: no-repeat;
background-size: 100% 100%;
// background: #666; // background: #666;
} }
} }

View File

@ -633,11 +633,15 @@ export default {
if (newValue) { if (newValue) {
this.pageNum = 1; this.pageNum = 1;
if (newValue == "mchRetrunOrderList") { if (newValue == "mchRetrunOrderList") {
console.log("触发getSalesReturnOrderList"); if (this.currentTab2 == 2) {
this.getSalesReturnOrderList(); this.getSalesReturnOrderList();
console.log("触发getSalesReturnOrderList");
}
} else { } else {
this.getOrderList(false); if (this.currentTab2 != 2) {
console.log("触发getOrderList"); this.getOrderList(false);
console.log("触发getOrderList");
}
} }
} }
}, },
@ -645,7 +649,15 @@ export default {
}, },
onLoad() {}, onLoad() {},
onShow() { onShow() {
this.getOrderList(); const currentTab2 = uni.getStorageSync("currentTab2");
console.log(currentTab2);
if (currentTab2) {
this.handleTab2(currentTab2);
uni.removeStorageSync("currentTab2");
} else {
this.getOrderList();
}
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.pageNum = 1; this.pageNum = 1;
@ -653,6 +665,7 @@ export default {
this.getOrderList(); this.getOrderList();
}, },
methods: { methods: {
// 线
async getOrderList(isLoding = true) { async getOrderList(isLoding = true) {
let accountDashboard = uni.getStorageSync("accountDashboard"); let accountDashboard = uni.getStorageSync("accountDashboard");
let auditInfo = uni.getStorageSync("auditInfo"); let auditInfo = uni.getStorageSync("auditInfo");
@ -930,7 +943,13 @@ export default {
this.getOrderList(); this.getOrderList();
}, },
handleTab2(e) { handleTab2(e) {
this.currentTab2 = e.index; if (e.index || e.index == 0) {
this.currentTab2 = e.index;
} else {
this.currentTab2 = e;
}
console.log("触发了handleTab2", e);
this.pageNum = 1; this.pageNum = 1;
this.keyword = ""; this.keyword = "";
@ -1105,6 +1124,7 @@ export default {
padding: 0 20rpx; padding: 0 20rpx;
padding-bottom: 16rpx; padding-bottom: 16rpx;
border-bottom: 1px solid #eeeeee; border-bottom: 1px solid #eeeeee;
background: #f9f9f9;
// ::v-deep .tui-tabs-title { // ::v-deep .tui-tabs-title {
// font-size: 36rpx !important; // font-size: 36rpx !important;
// } // }
@ -1216,11 +1236,11 @@ export default {
border-radius: 8rpx; border-radius: 8rpx;
.uni-swiper-list { .uni-swiper-list {
height: calc(100vh - 250px); height: calc(100vh - 500rpx);
} }
.uni-swiper-return-list { .uni-swiper-return-list {
height: calc(100vh - 250px); height: calc(100vh - 500rpx);
} }
.order-msg-tips { .order-msg-tips {

View File

@ -1127,6 +1127,7 @@ export default {
.addAndEditProduct-container { .addAndEditProduct-container {
width: 100vw; width: 100vw;
height: calc(100vh - 120rpx); height: calc(100vh - 120rpx);
background: #f5f6fa;
overflow: auto; overflow: auto;
.nav-bar { .nav-bar {

View File

@ -68,7 +68,10 @@
</tui-collapse> </tui-collapse>
</block> </block>
</scroll-view> </scroll-view>
<view class="right-box" :style="{ height: height + 'px' }"> <view
class="right-box"
:style="{ height: height + 'px', top: top + 'px' }"
>
<view class="commodity-status"> <view class="commodity-status">
<u-tabs <u-tabs
class="u-tabs" class="u-tabs"
@ -195,6 +198,7 @@
]" ]"
> >
<u--image <u--image
class="img-box"
:src="item.product_image" :src="item.product_image"
radius="12" radius="12"
width="64px" width="64px"
@ -667,6 +671,9 @@ export default {
//#ifdef H5 //#ifdef H5
top = 24; top = 24;
//#endif //#endif
//#ifdef APP-PLUS
top = 44;
//#endif
this.height = res.windowHeight - uni.upx2px(header); this.height = res.windowHeight - uni.upx2px(header);
this.top = top + uni.upx2px(header); this.top = top + uni.upx2px(header);
}, },
@ -1683,10 +1690,16 @@ page {
.commodity-img { .commodity-img {
position: relative; position: relative;
margin-right: 20rpx; margin-right: 20rpx;
width: 128rpx; width: 64px;
height: 128rpx; height: 64px;
border: 1px solid $uni-border-color; border: 1px solid $uni-border-color;
border-radius: 24rpx; border-radius: 24rpx;
overflow: hidden;
.img-box {
width: 64px;
height: 64px;
}
} }
.commodity-img-sold-out { .commodity-img-sold-out {

View File

@ -103,7 +103,7 @@
<scroll-view <scroll-view
v-if="commodityList.length > 0 && !loadingCommodityData" v-if="commodityList.length > 0 && !loadingCommodityData"
scroll-y scroll-y
:style="{ height: height - 118 + 'px', top: top + 'px' }" :style="{ height: height - 140 + 'px', top: top + 'px' }"
:show-scrollbar="false" :show-scrollbar="false"
@scrolltolower="handerScrolltolower" @scrolltolower="handerScrolltolower"
refresher-enabled refresher-enabled
@ -124,8 +124,8 @@
]" ]"
> >
<u--image <u--image
class="img-box"
:src="item.product_image" :src="item.product_image"
radius="12"
width="64px" width="64px"
height="64px" height="64px"
></u--image> ></u--image>
@ -205,10 +205,10 @@
</view> </view>
</view> </view>
<view class="productList-bottom"> <view class="productList-bottom">
<view class="bottom-item" @click="skipuClassify">分类管理</view> <view class="bottom-item">操作管理</view>
<view class="bottom-item"> <view class="bottom-item">
<u-icon class="u-icon" name="grid" size="16" color="#222"></u-icon> <u-icon class="u-icon" name="grid" size="16" color="#222"></u-icon>
<view class="bottom-item-name">分类管理</view> <view class="bottom-item-name" @click="skipuClassify">分类管理</view>
</view> </view>
<view class="bottom-item"> <view class="bottom-item">
<u-icon class="u-icon" name="list-dot" size="16" color="#222"></u-icon> <u-icon class="u-icon" name="list-dot" size="16" color="#222"></u-icon>
@ -417,7 +417,7 @@ export default {
top = 25; top = 25;
//#endif //#endif
//#ifdef APP-PLUS //#ifdef APP-PLUS
top = 70; top = 50;
//#endif //#endif
this.height = res.windowHeight - uni.upx2px(header); this.height = res.windowHeight - uni.upx2px(header);
this.top = top + uni.upx2px(header); this.top = top + uni.upx2px(header);
@ -1089,10 +1089,16 @@ page {
.commodity-img { .commodity-img {
position: relative; position: relative;
margin-right: 20rpx; margin-right: 20rpx;
width: 128rpx; width: 64px;
height: 128rpx; height: 64px;
border: 1px solid $uni-border-color; border: 1px solid $uni-border-color;
border-radius: 24rpx; border-radius: 24rpx;
overflow: hidden;
.img-box {
width: 64px;
height: 64px;
}
} }
.commodity-img-sold-out { .commodity-img-sold-out {

Binary file not shown.

View File

@ -39,71 +39,60 @@ const actions = {
async setPush({ commit }, pushBase) { async setPush({ commit }, pushBase) {
console.log(pushBase); console.log(pushBase);
commit("SET_PUSH", pushBase); commit("SET_PUSH", pushBase);
// 判断唤醒
const pendingPushData = uni.getStorageSync("pendingPushData");
const AUDIO = uni.createInnerAudioContext(); var AUDIO = null;
AUDIO.stop();
switch (pushBase.payload.category) {
case "mchContract":
uni.navigateTo({ url: "/pages/audit/checkAudit" });
break;
// 订单详情
case "mchOrderDetail":
// AUDIO.src = "../../static/mp3/jinxingzhong.MP3";
// AUDIO.play();
let params = { //多次会调用播放新的文件时,提前销毁实例,可避免-99错误
orderId: pushBase.payload.orderId, if (AUDIO) {
}; try {
AUDIO.pause();
AUDIO.destroy();
AUDIO = null;
} catch (e) {
console.log(e);
}
}
AUDIO = uni.createInnerAudioContext();
try {
// AUDIO.stop();
switch (pushBase.payload.category) {
// 订单详情
case "mchOrderDetail":
let params = {
orderId: pushBase.payload.orderId,
};
let res = await GetOrderDetail(params); let res = await GetOrderDetail(params);
console.log(res); console.log(res);
if (res && res.status == 200) { if (res && res.status == 200) {
commit("SET_ORDER_DETAIL", res.data); commit("SET_ORDER_DETAIL", res.data);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
} }
} break;
break; // 订单列表
// 订单列表 case "mchOnLineOrderList":
case "mchOnLineOrderList": AUDIO.src = "../../static/mp3/jinxingzhong.MP3";
AUDIO.src = "../../static/mp3/jinxingzhong.MP3"; AUDIO.play();
AUDIO.play(); console.log("播放成功");
commit("SET_ORDER_STATUS_API", pushBase.payload.category); commit("SET_ORDER_STATUS_API", pushBase.payload.category);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData"); break;
uni.navigateTo({ // 异常订单
url: "/pages/order/order", case "mchAbnormalOrderList":
}); AUDIO.src = "../../static/mp3/yichang.MP3";
} AUDIO.play();
break; commit("SET_ORDER_STATUS_API", pushBase.payload.category);
// 异常订单
case "mchAbnormalOrderList": break;
// AUDIO.src = require("@static/mp3/1.MP3"); // 退款订单
commit("SET_ORDER_STATUS_API", pushBase.payload.category); case "mchRetrunOrderList":
if (pendingPushData) { AUDIO.src = "../../static/mp3/tuihuo.MP3";
uni.removeStorageSync("pendingPushData"); AUDIO.play();
uni.navigateTo({ commit("SET_ORDER_STATUS_API", pushBase.payload.category);
url: "/pages/order/order",
}); break;
} }
break; } catch (e) {
// 退款订单 console.log(e);
case "mchRetrunOrderList":
AUDIO.src = "../../static/mp3/tuihuo.MP3";
AUDIO.play();
commit("SET_ORDER_STATUS_API", pushBase.payload.category);
if (pendingPushData) {
uni.removeStorageSync("pendingPushData");
uni.navigateTo({
url: "/pages/order/order",
});
}
break;
} }
}, },
}; };

View File

@ -108,20 +108,22 @@ const actions = {
const platform = uni.getSystemInfoSync().platform; const platform = uni.getSystemInfoSync().platform;
var push_clientid = ""; var push_clientid = "";
var osType = ""; var os_type = "";
push_clientid = await getPushClientId(); push_clientid = await getPushClientId();
if (platform == "android") { if (platform == "android") {
osType = 1; os_type = 1;
} else { } else {
osType = 2; os_type = 2;
} }
params.cid = push_clientid; params.cid = push_clientid;
params.osType = osType; params.os_type = os_type;
console.log("push_clientid", push_clientid); console.log("push_clientid", push_clientid);
console.log("登录时传的params", params);
// #endif // #endif
const res = await GetAccountLogin(params); const res = await GetAccountLogin(params);
@ -154,25 +156,25 @@ const actions = {
const platform = uni.getSystemInfoSync().platform; const platform = uni.getSystemInfoSync().platform;
var push_clientid = ""; var push_clientid = "";
var osType = ""; var os_type = "";
push_clientid = await getPushClientId(); push_clientid = await getPushClientId();
if (platform == "android") { if (platform == "android") {
osType = 1; os_type = 1;
} else { } else {
osType = 2; os_type = 2;
} }
params.cid = push_clientid; params.cid = push_clientid;
params.osType = osType; params.os_type = os_type;
// #endif // #endif
console.log("登录时的params", params); console.log("登录时的params", params);
const res = await GetLogin(params); const res = await GetLogin(params);
console.log(res);
if (res && res.status == 200) { if (res && res.status == 200) {
let mobile = ""; let mobile = "";

View File

@ -42,8 +42,6 @@ service.interceptors.response.use(
(response) => { (response) => {
const res = response.data; const res = response.data;
console.log(res);
if (res && res.status == 250) { if (res && res.status == 250) {
uni.$u.toast(`提示:${res.msg}`); uni.$u.toast(`提示:${res.msg}`);