'适配深色模式'
This commit is contained in:
@@ -38,6 +38,10 @@ function App() {
|
||||
success(res) {
|
||||
setStorage('brand', res.brand || 'pc')
|
||||
// 保存本机系统信息
|
||||
console.log('获取系统主题信息',JSON.stringify(res,undefined,4),)
|
||||
// console.log(res,'监听系统主题变化,获取系统主题信息','res.osTheme',res.osTheme)
|
||||
|
||||
store.commit('serveInfo/saveSysTheme',res.osTheme)
|
||||
// 详细字段信息参考 https://uniapp.dcloud.net.cn/api/system/info.html#%E7%B3%BB%E7%BB%9F%E4%BF%A1%E6%81%AF%E7%9A%84%E6%A6%82%E5%BF%B5
|
||||
store.commit('serveInfo/setSystemInfo', JSON.stringify(res))
|
||||
},
|
||||
|
||||
37
src/App.vue
37
src/App.vue
@@ -1,3 +1,5 @@
|
||||
|
||||
|
||||
<script setup lang="ts">
|
||||
import jxMOdal from '@/components/dialog/dialogUtil'
|
||||
// import { onLaunch, onShow } from '@dcloudio/uni-app'
|
||||
@@ -8,12 +10,14 @@ import useGlobalFunc from './composables/useGlobalFunc'
|
||||
import { getStorage, setStorage } from './utils/storage'
|
||||
import { store } from "@/store";
|
||||
import { onLaunch, onShow, onHide } from "@dcloudio/uni-app";
|
||||
import { computed } from 'vue'
|
||||
|
||||
const {
|
||||
appKeepAlive, // 应用保活
|
||||
listenMsg, // 监听消息
|
||||
} = App()
|
||||
// const { watchVersion } = useGlobalFunc() // 监听版本
|
||||
let themeColor = '#efefef'
|
||||
|
||||
// 三端通用
|
||||
const {
|
||||
@@ -30,7 +34,13 @@ onLaunch(() => {
|
||||
onPrinterChange() // 监听打印机状态
|
||||
// appKeepAlive() // 应用保活
|
||||
// listenMsg() // 监听消息穿透
|
||||
|
||||
// console.log('监听系统主题变化,111111111')
|
||||
uni.onThemeChange((res) => {
|
||||
console.log(res,'监听系统主题变化',res.theme)
|
||||
store.commit('serveInfo/saveSysTheme',res.theme)
|
||||
// this.theme = res.theme; // 更新主题状态
|
||||
// this.applyTheme(this.theme);
|
||||
});
|
||||
uni['globalAlert'] = globalAlert // 挂载全局可覆盖tabar弹窗
|
||||
// plus.device.setWakelock(true) //打开程序后一直保持唤醒状态(常亮)
|
||||
// watchVersion((isUpdate: boolean) => {
|
||||
@@ -43,21 +53,40 @@ onLaunch(() => {
|
||||
// // })
|
||||
// }
|
||||
// })
|
||||
|
||||
// 初始化平台
|
||||
if (!getStorage('terrace')) setStorage('terrace', 'jxcs')
|
||||
store.dispatch('serveInfo/get_services')
|
||||
});
|
||||
onShow(() => {
|
||||
console.log("App Show");
|
||||
SystemInfo() // 获取本机设备信息
|
||||
});
|
||||
onHide(() => {
|
||||
console.log("App Hide");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
<style >
|
||||
@import './static/font/iconfont.css';
|
||||
page {
|
||||
/* page {
|
||||
background-color: #efefef;
|
||||
} */
|
||||
|
||||
|
||||
/*深色模式时 */
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body,page{
|
||||
background-color: #191919 !important;
|
||||
}
|
||||
}
|
||||
|
||||
/*浅色模式时 */
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
body,page{
|
||||
background-color: #efefef !important;
|
||||
color: #686767;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@@ -246,7 +246,7 @@ const merchant = {
|
||||
/**
|
||||
* 设置美团门店IM线上状态
|
||||
* @param {object} params 请求参数
|
||||
* @return {object} appPoiCode:美团门店id imStatus:状态 0-关闭 1-开启
|
||||
* @return {object} appPoiCode:美团门店id imStatus:状态 0-关闭 1-开启 京东 0:忙碌;1:在线 v.ImStatus
|
||||
*/
|
||||
set_mt_store_im_status: async (params: AnyObject): Promise<AnyObject> => {
|
||||
return request.api('/v2/im/SetPoiIMStatus', 'POST', params)
|
||||
|
||||
@@ -97,11 +97,14 @@ function itemClick(type: string) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
$btncolor: #0b7ffe;
|
||||
page {
|
||||
background: transparent;
|
||||
@media (prefers-color-scheme: light) {
|
||||
page {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.mask-content {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
|
||||
@@ -6,6 +6,7 @@ const jxMOdal = {
|
||||
*/
|
||||
alert(options: any) {
|
||||
let platform = uni.getSystemInfoSync().platform
|
||||
console.log('弹框提示',platform)
|
||||
if (platform == 'android') {
|
||||
dialog.alert({
|
||||
content: options.content,
|
||||
|
||||
@@ -56,8 +56,10 @@ function closeReturn() {
|
||||
const appId = ref<string>(configCms.appId)
|
||||
</script>
|
||||
<style>
|
||||
page {
|
||||
background: transparent;
|
||||
@media (prefers-color-scheme: light) {
|
||||
page {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -34,6 +34,7 @@ let time1: any = null
|
||||
watch(
|
||||
() => store.state.storeInfo.jxLoading,
|
||||
(nVal) => {
|
||||
console.log('监听跳转的信息',nVal)
|
||||
if (nVal) {
|
||||
clearTimeout(time)
|
||||
isLoading.value = true
|
||||
@@ -78,7 +79,7 @@ $size: 120rpx;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: rgba($color: #fff, $alpha: 1);
|
||||
// background-color: rgba($color: #fff, $alpha: 1);
|
||||
opacity: 0;
|
||||
transition: all 0.5s;
|
||||
|
||||
@@ -171,4 +172,16 @@ $size: 120rpx;
|
||||
transform: translateY(0rpx);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.jx-loading{
|
||||
background-color: rgba($color: #fff, $alpha: 1);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.jx-loading{
|
||||
background-color: rgba($color: #000, $alpha: 1);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -33,7 +33,7 @@
|
||||
<script lang="ts" setup >
|
||||
import { store } from '@/store'
|
||||
import toast from '@/utils/toast'
|
||||
import { onBeforeUnmount, ref } from 'vue'
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
function firstLogin() {
|
||||
// uni.reLaunch({
|
||||
// url: '/subPages/login/wxLogin/wxLogin',
|
||||
@@ -117,4 +117,16 @@ onBeforeUnmount(() => {
|
||||
border: 2rpx solid $jx-primary;
|
||||
color: $jx-primary;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.login-empty{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.login-empty{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<view class="price-root">
|
||||
<!-- -->
|
||||
<view class="price-root" :style="{'color':appTheme || color === '#969696' ? color : '#ffffff'}">
|
||||
<text v-if="isSymbol" class="money">{{ symbol }}</text>
|
||||
<text class="number">{{ money }}</text>
|
||||
</view>
|
||||
@@ -15,6 +16,7 @@
|
||||
* @param (color) 颜色
|
||||
* @param (size) 大小
|
||||
*/
|
||||
import { store } from '@/store'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface priceType {
|
||||
@@ -37,7 +39,7 @@ const props = withDefaults(defineProps<priceType>(), {
|
||||
sizeM: '32rpx',
|
||||
sizeN: '32rpx',
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
const money = computed(() => {
|
||||
if (props.isMoney) {
|
||||
return (+props.price / 100).toFixed(2)
|
||||
@@ -61,4 +63,16 @@ const money = computed(() => {
|
||||
.number {
|
||||
font-size: v-bind(sizeN);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.price-root{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.price-root{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -38,8 +38,10 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
//仅编译到vue页面
|
||||
/* #ifndef APP-NVUE */
|
||||
.show-scrollbar ::-webkit-scrollbar {width: 0;height: 0;background-color: transparent;}
|
||||
.z-index{z-index: 999;}
|
||||
/* #endif */
|
||||
/* #endif */
|
||||
}
|
||||
@@ -608,15 +608,15 @@ function useGlobalFunc() {
|
||||
const storeMaps = computed(() => {
|
||||
return store.state.storeInfo.allStoreInfo
|
||||
})
|
||||
function isTxd() {
|
||||
let state = false
|
||||
storeMaps.value.StoreMaps.forEach((item: AnyObject) => {
|
||||
if (item.vendorID == 16) {
|
||||
state = true
|
||||
}
|
||||
})
|
||||
return state
|
||||
}
|
||||
// function isTxd() {
|
||||
// let state = false
|
||||
// storeMaps.value.StoreMaps.forEach((item: AnyObject) => {
|
||||
// if (item.vendorID == 16) {
|
||||
// state = true
|
||||
// }
|
||||
// })
|
||||
// return state
|
||||
// }
|
||||
//#endregion
|
||||
|
||||
/**
|
||||
@@ -625,6 +625,7 @@ function useGlobalFunc() {
|
||||
const getMtStoreIMStatus = async () => {
|
||||
let mtStore = isExistPlatformID(1)
|
||||
let ebStore = isExistPlatformID(3)
|
||||
let jdStore = isExistPlatformID(0)
|
||||
let data = []
|
||||
if (mtStore && mtStore.length > 0) {
|
||||
data.push({
|
||||
@@ -639,11 +640,18 @@ function useGlobalFunc() {
|
||||
vendorOrgCode: ebStore[0].vendorOrgCode + '',
|
||||
vendorStoreID: ebStore[0].vendorStoreID + ''
|
||||
})
|
||||
|
||||
if (jdStore && jdStore.length > 0) data.push({
|
||||
vendorID: 0,
|
||||
vendorOrgCode: jdStore[0].vendorOrgCode + '',
|
||||
vendorStoreID: jdStore[0].vendorStoreID + ''
|
||||
})
|
||||
|
||||
if (data.length === 0) return
|
||||
let res = await merchant.get_mt_store_im_status({ data: JSON.stringify(data) })
|
||||
let arr: any = []
|
||||
if (res.code === '0') {
|
||||
|
||||
console.log('获取IM单聊状态信息',res)
|
||||
res.data.forEach((item: AnyObject) => {
|
||||
if (item.errMsg && item.errMsg) arr.push({
|
||||
...item,
|
||||
@@ -765,7 +773,7 @@ function useGlobalFunc() {
|
||||
wholeCalcPrice, // 格式化今日订单数据
|
||||
singleCalcPrice, // 格式化今日订单数据
|
||||
setPrinterStatus, // 查询打印机状态并连接
|
||||
isTxd, // 判断是否有淘鲜达
|
||||
// isTxd, // 判断是否有淘鲜达
|
||||
getMtStoreIMStatus, // 获取美团IM单聊状态
|
||||
isExistPlatformID, // 是否含有平台门店
|
||||
analyEmoji, // 解析emoji表情
|
||||
|
||||
@@ -10,6 +10,8 @@ import printerTemplate from '@/utils/bluetoothPrinter/printerTemplate'
|
||||
import configCms from "@/utils/configCms"
|
||||
import order from "@/api/https/order"
|
||||
import merchant from "@/api/https/merchant"
|
||||
import { computed } from "vue"
|
||||
import { store } from "@/store"
|
||||
|
||||
function useOrderInfo() {
|
||||
const bluetooth = new Bluetooth()
|
||||
@@ -33,6 +35,7 @@ function useOrderInfo() {
|
||||
})
|
||||
}
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
|
||||
/************************************************************
|
||||
* 拨打电话
|
||||
@@ -284,6 +287,7 @@ function useOrderInfo() {
|
||||
waybillVendor, // 转换厂商
|
||||
afterSalesDetaile, // 售后详情
|
||||
bluetoothPrinter, // 打印订单
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
"name" : "京西到家商家版",
|
||||
"appid" : "__UNI__F9A47D3",
|
||||
"description" : "1、商户通过京西平台同时管理美团、淘宝闪购、京东等多个外卖平台实现一键上架、下架、修改、删除多个平台商品;2、商户通过京西平台可以同时对、美团专送、达达、顺丰同城等多个专送平台召唤偶骑手",
|
||||
"versionName" : "1.0.0",
|
||||
"versionCode" : 100,
|
||||
"versionName" : "1.0.1",
|
||||
"versionCode" : 101,
|
||||
"transformPx" : false,
|
||||
// "uni-app" : {
|
||||
// "debug" : true
|
||||
@@ -198,6 +198,8 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"darkmode" : true,
|
||||
"themeLocation" : "theme.json",
|
||||
"appid" : "wx08a5c2a8581414ff",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
@@ -236,8 +238,8 @@
|
||||
}
|
||||
},
|
||||
"app-harmony" : {
|
||||
// "darkmode" : true,
|
||||
// "themeLocation" : "theme.json",
|
||||
"darkmode" : true,
|
||||
"themeLocation" : "theme.json",
|
||||
"safearea" : {
|
||||
//iOS平台的安全区域
|
||||
"background" : "#ffffff",
|
||||
@@ -274,7 +276,7 @@
|
||||
},
|
||||
"splashScreens" : {
|
||||
"startWindowIcon" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/hormony_foreground1024.png",
|
||||
"startWindowBackground" : ""
|
||||
"startWindowBackground" : "#ffffff"
|
||||
},
|
||||
"modules" : {},
|
||||
"targetSdkVersion" : "6.0.0.868",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.skuName-cell {
|
||||
box-sizing: border-box;
|
||||
background: white;
|
||||
// background: white;
|
||||
padding: 19rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 15rpx 15rpx;
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
.skuName-name {
|
||||
color: #333;
|
||||
// color: #333;
|
||||
font-size: 32rpx;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
@@ -92,7 +92,7 @@
|
||||
.skuName-tips {
|
||||
font-size: 28rpx;
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
// color: #333;
|
||||
}
|
||||
|
||||
.red {
|
||||
@@ -163,7 +163,7 @@
|
||||
align-items: center;
|
||||
|
||||
.price {
|
||||
color: #333;
|
||||
// color: #333;
|
||||
width: 23%;
|
||||
flex-shrink: 0;
|
||||
text-align: center;
|
||||
@@ -180,7 +180,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.promotion-price {
|
||||
.promotionPrice {
|
||||
color: #F60D58;
|
||||
}
|
||||
|
||||
@@ -222,10 +222,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
.stock-location{
|
||||
display: flex;
|
||||
// color:#666;
|
||||
margin-top:20rpx;
|
||||
justify-content: center
|
||||
}
|
||||
|
||||
.cell-bottom {
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
// color: #666;
|
||||
padding: 5rpx 0;
|
||||
}
|
||||
|
||||
@@ -302,4 +309,46 @@
|
||||
to {
|
||||
transform: scale3d(1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.skuName-cell{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.skuName-name,
|
||||
.skuName-tips,
|
||||
.price{
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.sku-name-id{
|
||||
color:#818181;
|
||||
}
|
||||
|
||||
.stock-location,
|
||||
.cell-bottom{
|
||||
color:#666;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.skuName-cell{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.skuName-name,
|
||||
.skuName-tips,
|
||||
.price{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.sku-name-id,
|
||||
.stock-location{
|
||||
color:#dadada;
|
||||
}
|
||||
|
||||
.cell-bottom{
|
||||
color:#b5b5b5;
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
{{ skuName.prefix ? '[' + skuName.prefix + ']' : ''
|
||||
}}{{ skuName.name }}
|
||||
</view>
|
||||
<view @tap.stop="copyInfo(''+ skuName.id, '复制nameID成功')" style="color:#818181;">
|
||||
<view @tap.stop="copyInfo(''+ skuName.id, '复制nameID成功')" class="sku-name-id">
|
||||
<text>{{ skuName.id }}</text>
|
||||
<jx-icon icon="fuzhi" color="#818181" style="margin-left: 10rpx;"></jx-icon>
|
||||
</view>
|
||||
@@ -126,7 +126,7 @@
|
||||
</view>
|
||||
</view>
|
||||
<!-- 库存以及位置码 -->
|
||||
<view style="display: flex;color:#666;margin-top:20rpx;justify-content: center">
|
||||
<view class="stock-location">
|
||||
<view @tap="openDialog(skuName,sku,'stock')">
|
||||
库存:{{sku.stock}}
|
||||
<jx-icon icon="shuxie" color="#999" :size="24" />
|
||||
|
||||
@@ -175,7 +175,7 @@ watch(
|
||||
width: 100%;
|
||||
border-left: 1rpx solid rgb(223, 223, 223);
|
||||
height: 90rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
box-shadow: 10rpx 0rpx 10rpx rgb(207, 207, 207);
|
||||
border-bottom: 1rpx solid rgb(224, 224, 224);
|
||||
padding: 0 10rpx;
|
||||
@@ -214,4 +214,16 @@ watch(
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.filter-root{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.filter-root{
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -8,6 +8,9 @@
|
||||
<uni-search-bar
|
||||
cancelButton="none"
|
||||
clearButton="auto"
|
||||
class="uni-search-bar"
|
||||
:bgColor="appTheme ? '#F8F8F8': '#000000'"
|
||||
:textColor="appTheme ? '#000000' : '#ffffff'"
|
||||
placeholder="请输入关键字 例如:精华液"
|
||||
@confirm="confirm"
|
||||
@input="input"
|
||||
@@ -26,7 +29,8 @@ import { ref, watch } from 'vue'
|
||||
* props
|
||||
*/
|
||||
interface propsType {
|
||||
isFilter: string | number
|
||||
isFilter: string | number,
|
||||
appTheme:boolean
|
||||
}
|
||||
const props = defineProps<propsType>()
|
||||
|
||||
@@ -101,10 +105,10 @@ function createGoods() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.search-root {
|
||||
box-sizing: border-box;
|
||||
background-color: $jx-primary;
|
||||
// background-color: $jx-primary;
|
||||
padding: 0 20rpx 2rpx 20rpx;
|
||||
height: 92rpx;
|
||||
display: flex;
|
||||
@@ -114,7 +118,7 @@ function createGoods() {
|
||||
.add-shopping {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
font-size: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -126,4 +130,26 @@ function createGoods() {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.search-root{
|
||||
background-color: $jx-primary;
|
||||
}
|
||||
|
||||
.add-shopping{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.search-root,
|
||||
.add-shopping{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.add-shopping,
|
||||
.uni-search-bar{
|
||||
border: 1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,6 +1,6 @@
|
||||
// 一级
|
||||
.one-item {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
height: 90rpx;
|
||||
overflow: hidden;
|
||||
transition: all 0.4s;
|
||||
@@ -42,4 +42,56 @@
|
||||
border-left: 7rpx solid transparent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 一级展开动画
|
||||
.one-item-active {
|
||||
height: v-bind(oneHeight) !important;
|
||||
background-color: rgb(236, 252, 233);
|
||||
|
||||
// 三角图标动画
|
||||
.icon-jiantou1 {
|
||||
display: inline-block;
|
||||
transform: rotate(90deg) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 一级选中高亮
|
||||
.never-pen-active {
|
||||
background-color: $jx-primary;
|
||||
color: #fff;
|
||||
border-bottom: 1rpx solid #fff;
|
||||
}
|
||||
|
||||
// 一级展开背景
|
||||
.item-name {
|
||||
color: $jx-primary;
|
||||
.noe-seat-active {
|
||||
border-left: 7rpx solid $jx-primary !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 二级高亮
|
||||
.tow-item-active {
|
||||
color: $jx-primary;
|
||||
background-color: #fff;
|
||||
|
||||
// 二级选中高亮
|
||||
.tow-seat-active {
|
||||
border-left: 7rpx solid $jx-primary !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.one-item{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.one-item{
|
||||
background-color: #000;
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,7 @@
|
||||
v-for="(item, index) in cat"
|
||||
:key="index"
|
||||
class="one-item"
|
||||
:style="{'color': appTheme ? '': oneActive == index && item.children.length == 0 ? '#4eb331' : '#ffffff'}"
|
||||
:class="{
|
||||
'one-item-active':
|
||||
index == oneActive && item.children.length != 0 && isOpen,
|
||||
@@ -25,6 +26,7 @@
|
||||
<!-- 第二层 -->
|
||||
<view
|
||||
class="tow-item"
|
||||
:style="{'background-color':appTheme ? '#ffffff' : towActive == childIndex ? '#777777': '#565656'}"
|
||||
:class="{ 'tow-item-active': towActive == childIndex }"
|
||||
v-for="(childItem, childIndex) in item.children"
|
||||
:key="childIndex"
|
||||
@@ -36,17 +38,18 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup >
|
||||
import { Ref, ref } from 'vue'
|
||||
import { computed, Ref, ref } from 'vue'
|
||||
import leftBarFn from './left-bar'
|
||||
import { store } from '@/store';
|
||||
|
||||
/*************************************************
|
||||
* 接收数据
|
||||
*/
|
||||
interface propsType {
|
||||
dafauleData: Array<AnyObject>
|
||||
dafauleData: Array<AnyObject>,
|
||||
appTheme:boolean
|
||||
}
|
||||
const props = defineProps<propsType>()
|
||||
|
||||
const {
|
||||
cat, // 右侧菜单数据
|
||||
GetStoreCategoryMap, // 获取数据
|
||||
@@ -82,9 +85,9 @@ function oneItemFn(item: AnyObject, index: number) {
|
||||
* 二级菜单点击
|
||||
*/
|
||||
const towActive = ref<number>(-1) // 高亮
|
||||
function towItemFn(childItem: AnyObject, index: number) {
|
||||
function towItemFn(childItem: AnyObject, index: number | string) {
|
||||
if (towActive.value == index) return
|
||||
towActive.value = index
|
||||
towActive.value = +index
|
||||
eimt('oneMenuClick', childItem.categoryID)
|
||||
}
|
||||
|
||||
@@ -98,42 +101,4 @@ defineExpose({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './left-bar.scss';
|
||||
|
||||
// 一级展开动画
|
||||
.one-item-active {
|
||||
height: v-bind(oneHeight) !important;
|
||||
background-color: rgb(236, 252, 233);
|
||||
|
||||
// 三角图标动画
|
||||
.icon-jiantou1 {
|
||||
display: inline-block;
|
||||
transform: rotate(90deg) !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 一级选中高亮
|
||||
.never-pen-active {
|
||||
background-color: $jx-primary;
|
||||
color: #fff;
|
||||
border-bottom: 1rpx solid #fff;
|
||||
}
|
||||
|
||||
// 一级展开背景
|
||||
.item-name {
|
||||
color: $jx-primary;
|
||||
.noe-seat-active {
|
||||
border-left: 7rpx solid $jx-primary !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 二级高亮
|
||||
.tow-item-active {
|
||||
color: $jx-primary;
|
||||
background-color: #fff;
|
||||
|
||||
// 二级选中高亮
|
||||
.tow-seat-active {
|
||||
border-left: 7rpx solid $jx-primary !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,4 +1,4 @@
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { onLoad, onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
import { store } from '@/store'
|
||||
@@ -36,27 +36,22 @@ function shoppingMangerFn() {
|
||||
leftBarRef.value.GetStoreCategoryMap()
|
||||
}, 500)
|
||||
}
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
|
||||
/*************************************************
|
||||
* 获取数据
|
||||
*/
|
||||
let oldStoreID: any = 0
|
||||
onShow(() => {
|
||||
console.log('查看用户收i否登录,99999999')
|
||||
if(getStorage('token')){
|
||||
console.log('登录,你进来了吗')
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: '#000000', // 背景颜色,必选
|
||||
animation: {
|
||||
duration: 400, // 过渡动画时长,单位 ms
|
||||
timingFunc: 'easeInOut' // 动画效果
|
||||
}
|
||||
});
|
||||
}
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: getStorage('token') || !appTheme.value ? '#ffffff' : '#000000', // 前景文字颜色,必选
|
||||
backgroundColor: '#000000', // 背景颜色,必选
|
||||
});
|
||||
uni.setTabBarStyle({backgroundColor:appTheme.value ? '#ffffff' : '#111111'})
|
||||
if (oldStoreID != getStorage('storeID') && oldStoreID != 0) {
|
||||
triggered.value = true
|
||||
}
|
||||
// console.log('查看用户收i否登录,99999999')
|
||||
oldStoreID = getStorage('storeID')
|
||||
})
|
||||
|
||||
@@ -720,6 +715,7 @@ function shoppingMangerFn() {
|
||||
toExaminePopup, // 改价审核实例
|
||||
toExamineConfirm, // 确定操作审核
|
||||
toExamineValue, // 审核输入内容
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
background-color: $jx-primary;
|
||||
// background-color: $jx-primary;
|
||||
}
|
||||
|
||||
.MountWrap {
|
||||
@@ -38,7 +38,7 @@
|
||||
.jx-popup-update {
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-radius: 0 0 15rpx 15rpx;
|
||||
|
||||
.text {
|
||||
@@ -129,4 +129,56 @@
|
||||
padding: 20rpx;
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.shopping-cel {
|
||||
:deep(.uni-searchbar) {
|
||||
padding: 0 !important;
|
||||
width: 610rpx !important;
|
||||
height: 70rpx;
|
||||
|
||||
.uni-searchbar__box {
|
||||
border-radius: 7rpx !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-center-root {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left-bar-root {
|
||||
width: 200rpx;
|
||||
box-shadow: 0rpx 10rpx 10rpx rgb(207, 207, 207);
|
||||
}
|
||||
|
||||
.right-center {
|
||||
width: calc(100vw - 200rpx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.status_bar{
|
||||
background-color: $jx-primary;
|
||||
}
|
||||
|
||||
.main-center-root,
|
||||
.jx-popup-update{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.abnormal-order,
|
||||
.main-center-root{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.jx-popup-update{
|
||||
background-color: #222;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@@ -4,12 +4,12 @@
|
||||
<shopping-search
|
||||
class="shopping-cel"
|
||||
:isFilter="isFilter"
|
||||
:appTheme="appTheme"
|
||||
@serachShopping="serachShopping"
|
||||
@clearInpu="clearInpu"
|
||||
@createGoods="createGoods"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="main-center-root">
|
||||
<view class="left-bar-root">
|
||||
<scroll-view
|
||||
@@ -18,6 +18,7 @@
|
||||
>
|
||||
<left-bar
|
||||
ref="leftBarRef"
|
||||
:appTheme="appTheme"
|
||||
:dafauleData="dafauleData"
|
||||
@oneMenuClick="oneMenuClick"
|
||||
/>
|
||||
@@ -135,6 +136,7 @@
|
||||
|
||||
<!-- 修改库存以及商品 -->
|
||||
<uni-popup ref="popupDialog" type="top">
|
||||
<view class="status_bar"></view>
|
||||
<view class="jx-popup-update" >
|
||||
<view class="text">
|
||||
{{ skuNameItem.type === 'stock' ? '修改库存' : '修改货架码' }}
|
||||
@@ -210,6 +212,7 @@ const {
|
||||
toExaminePopup, // 改价审核实例
|
||||
toExamineConfirm, // 确定操作审核
|
||||
toExamineValue, // 审核输入内容
|
||||
appTheme
|
||||
} = shoppingMangerFn()
|
||||
</script>
|
||||
|
||||
@@ -221,32 +224,4 @@ page {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './main.scss';
|
||||
|
||||
.shopping-cel {
|
||||
:deep(.uni-searchbar) {
|
||||
padding: 0 !important;
|
||||
width: 610rpx !important;
|
||||
height: 70rpx;
|
||||
|
||||
.uni-searchbar__box {
|
||||
border-radius: 7rpx !important;
|
||||
height: auto !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-center-root {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.left-bar-root {
|
||||
width: 200rpx;
|
||||
box-shadow: 0rpx 10rpx 10rpx rgb(207, 207, 207);
|
||||
}
|
||||
|
||||
.right-center {
|
||||
width: calc(100vw - 200rpx);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
import { timeFormatD } from '@/utils/tools'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import { onLoad, onPullDownRefresh,onShow } from '@dcloudio/uni-app'
|
||||
import { onLoad, onPullDownRefresh,onReady,onShow } from '@dcloudio/uni-app'
|
||||
import { store } from '@/store'
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc'
|
||||
import merchant from "@/api/https/merchant"
|
||||
@@ -13,17 +13,22 @@ import merchant from "@/api/https/merchant"
|
||||
const merchantFn = function () {
|
||||
const { logOutFn, getMtStoreIMStatus } = useGlobalFunc()
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
// onReady(() => {
|
||||
|
||||
// })
|
||||
|
||||
|
||||
onShow(() => {
|
||||
if(getStorage('token')){
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: '#000000', // 背景颜色,必选
|
||||
animation: {
|
||||
duration: 400, // 过渡动画时长,单位 ms
|
||||
timingFunc: 'easeInOut' // 动画效果
|
||||
}
|
||||
});
|
||||
}
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: getStorage('token') || !appTheme.value ? '#ffffff' : '#000000', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
|
||||
uni.setTabBarStyle({backgroundColor:appTheme.value ? '#ffffff' : '#111111'})
|
||||
// console.log('监听系统主题的变化,商家中心',appTheme.value)
|
||||
// console.log('监听系统主题变化,appTheme',appTheme.value)
|
||||
|
||||
})
|
||||
|
||||
/*************************************************
|
||||
|
||||
@@ -79,7 +79,7 @@ const {
|
||||
.status_bar {
|
||||
height: calc(var(--status-bar-height) + 20rpx);
|
||||
width: 100%;
|
||||
background-color: $jx-primary;
|
||||
// background-color: $jx-primary;
|
||||
}
|
||||
.new-msg {
|
||||
display: flex;
|
||||
@@ -145,4 +145,16 @@ const {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.status_bar{
|
||||
background-color: $jx-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.status_bar{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,18 +1,14 @@
|
||||
.options-root {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
// border:1px solid red;
|
||||
|
||||
:deep(.popupAnimation) {
|
||||
z-index: 1000000;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.grid-item-box {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
@@ -20,14 +16,6 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
// width: 100px;
|
||||
width: 130rpx;
|
||||
// flex: 1 1 25%; /* 这将确保每个项目占据大约1/3的宽度 */
|
||||
// max-width: 25%; /* 限制最大宽度以防止内容溢出 */
|
||||
// box-sizing: border-box; /* 包括padding和border在内的总宽度 */
|
||||
padding: 10px; /* 可选:添加一些内边距 */
|
||||
|
||||
.image {
|
||||
width: 75rpx;
|
||||
height: 75rpx;
|
||||
@@ -43,7 +31,8 @@
|
||||
// 我的账单
|
||||
.bill-new {
|
||||
position: absolute;
|
||||
top: 15rpx;
|
||||
// top: 15rpx;
|
||||
top: 0rpx;
|
||||
right: 15rpx;
|
||||
background-color: $jx-warring;
|
||||
color: #fff;
|
||||
@@ -73,7 +62,8 @@
|
||||
// 差评管理
|
||||
.evaluate-number {
|
||||
position: absolute;
|
||||
top: 20rpx;
|
||||
// top: 20rpx;
|
||||
top: 0rpx;
|
||||
right: 30rpx;
|
||||
color: #fff;
|
||||
background-color: $jx-warring;
|
||||
@@ -122,4 +112,34 @@
|
||||
100% {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
.grid-box{
|
||||
display:grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(175rpx, 1fr))
|
||||
}
|
||||
|
||||
|
||||
.grid-box-item{
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.options-root{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.grid-box{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.options-root{
|
||||
background-color:#1c1c1c;
|
||||
}
|
||||
|
||||
.grid-box{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -54,12 +54,12 @@
|
||||
</template>
|
||||
</uni-grid> -->
|
||||
|
||||
<view style="display:grid;grid-template-columns: repeat(auto-fill, minmax(175rpx, 1fr))">
|
||||
<view style="" class="grid-box">
|
||||
<view
|
||||
v-for="(item, i) in newGrindListData"
|
||||
:key="i"
|
||||
@tap="grindData(item.id)"
|
||||
|
||||
class="grid-box-item"
|
||||
>
|
||||
<view class="grid-item-box" >
|
||||
<image :src="item.icon" mode="scaleToFill" class="image" />
|
||||
@@ -192,12 +192,13 @@ const grindListData = ref([
|
||||
title: '门店评分',
|
||||
isIos: false,
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
icon: '/static/merchant-icon/11.png',
|
||||
title: '帮助中心',
|
||||
isIos: false,
|
||||
},
|
||||
// 找不到源码,无法进行深色模式适配,暂时注释
|
||||
// {
|
||||
// id: 10,
|
||||
// icon: '/static/merchant-icon/11.png',
|
||||
// title: '帮助中心',
|
||||
// isIos: false,
|
||||
// },
|
||||
{
|
||||
id: 11,
|
||||
icon: '/static/merchant-icon/12.png',
|
||||
@@ -318,9 +319,9 @@ function grindData(title: number) {
|
||||
url: '/subPages/merchantChild/storeScore/storeScore',
|
||||
}) // 门店评分
|
||||
break
|
||||
case 10:
|
||||
uni.navigateTo({ url: '/subPages/merchantChild/helpCenter/helpCenter' }) // 帮助中心
|
||||
break
|
||||
// case 10:
|
||||
// uni.navigateTo({ url: '/subPages/merchantChild/helpCenter/helpCenter' }) // 帮助中心
|
||||
// break
|
||||
case 11:
|
||||
uni.navigateTo({ url: '/subPages/orderChild/getPhone/getPhone' }) // 联系客服
|
||||
break
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.order-data-root {
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
@@ -46,4 +46,18 @@
|
||||
.afterNumber::before{
|
||||
content: '-';
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.order-data-root{
|
||||
background-color:#fff;
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.order-data-root{
|
||||
background-color:#1c1c1c;
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -42,4 +42,18 @@
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.order-data-root{
|
||||
background-color:#fff;
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.order-data-root{
|
||||
background-color:#1c1c1c;
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
top: 0;
|
||||
z-index: 9;
|
||||
box-sizing: border-box;
|
||||
background-color: #4eb331;
|
||||
// background-color: #4eb331;
|
||||
z-index: 1;
|
||||
|
||||
|
||||
.store-timer {
|
||||
text-align: center;
|
||||
color: #fcff06;
|
||||
@@ -56,7 +56,7 @@
|
||||
.timer-root {
|
||||
margin-top: 5rpx;
|
||||
line-height: 1;
|
||||
padding: 10rpx 10rpx;
|
||||
padding: 10rpx 10rpx 10rpx 0rpx;
|
||||
background-color: rgba(0, 0, 0, 0.15);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
@@ -197,4 +197,21 @@
|
||||
// padding: 20rpx;
|
||||
// border-radius: 15rpx;
|
||||
// }
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.merchant-root{
|
||||
background-color:$jx-primary;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.merchant-root{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.esc-btn,
|
||||
.swithcStore-btn{
|
||||
background-color: #222;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@ import useGlobalFunc from "@/composables/useGlobalFunc";
|
||||
|
||||
function userInfo() {
|
||||
// vuex
|
||||
const { newMessage, logOutFn, isTxd, getMtStoreIMStatus } = useGlobalFunc()
|
||||
const { newMessage, logOutFn, getMtStoreIMStatus } = useGlobalFunc()
|
||||
|
||||
|
||||
/**
|
||||
@@ -124,38 +124,7 @@ function userInfo() {
|
||||
* 切换门店
|
||||
*/
|
||||
function switchStore() {
|
||||
console.log('你有反应吗')
|
||||
uni.navigateTo({ url: "/subPages/switchStore/switchStore",
|
||||
complete(res){
|
||||
console.log('你有反应吗,为啥不跳转',JSON.stringify(res,undefined,4))
|
||||
}
|
||||
});
|
||||
// store.commit('storeInfo/jxLoadingFn', true)
|
||||
// console.log('切换门店11111111111',JSON.stringify(uni.getSystemInfoSync(),undefined,4))
|
||||
// openAppProduct({
|
||||
// success: (res : any) => {
|
||||
// console.log('切换门店,,,,,,,,success: ', JSON.stringify(res,undefined,4));
|
||||
// },
|
||||
// fail: (err : any) => {
|
||||
// console.error('切换门店,,,,,,,,,,,,fail: ', JSON.stringify(err,undefined,4));
|
||||
// },
|
||||
// complete: (res : any) => {
|
||||
// console.log('切换门店,,,,,,,,,,,,complete: ', JSON.stringify(res,undefined,4));
|
||||
// }
|
||||
// });
|
||||
|
||||
// vibrator.hasVibrator().then((hasVibrator:any) => {
|
||||
// if (hasVibrator) {
|
||||
// // 执行振动,参数可以是预定义的模式或者自定义的时长数组
|
||||
// vibrator.vibrate(new Array(0, 1000), () => {
|
||||
// console.log('振动完成');
|
||||
// });
|
||||
// } else {
|
||||
// console.log('设备不支持振动');
|
||||
// }
|
||||
// }).catch((error:any) => {
|
||||
// console.error('获取振动服务失败', error);
|
||||
// });
|
||||
uni.navigateTo({ url: "/subPages/switchStore/switchStore"})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
</view>
|
||||
<view class="info-root">
|
||||
<view class="user-infor-root">
|
||||
<!-- @longtap="" -->
|
||||
<image
|
||||
:src="storeInfo.avatar"
|
||||
mode="scaleToFill"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
|
||||
import toast from '@/utils/toast'
|
||||
import { onPullDownRefresh, onShow } from '@dcloudio/uni-app'
|
||||
import { onPullDownRefresh, onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import { store } from "@/store"
|
||||
import { Decrypt, timeFormatDHM } from '@/utils/tools'
|
||||
@@ -20,21 +20,20 @@ const messageFn = function () {
|
||||
// 用户列表
|
||||
const userListData = ref<Array<AnyObject>>([])
|
||||
|
||||
const appTheme = computed(() => store.getters['serveInfo/appTheme'] === 'light' )
|
||||
// onReady(() => {
|
||||
|
||||
// })
|
||||
|
||||
/*************************************************
|
||||
* 获取用户列表
|
||||
*/
|
||||
onShow(async () => {
|
||||
console.log('你登录了吗')
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: "#ffffff",
|
||||
// backgroundColor: "#ff0000",
|
||||
// animation: {
|
||||
// duration: 400,
|
||||
// timingFunc: "easeIn",
|
||||
// },
|
||||
// });
|
||||
|
||||
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000': '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
uni.setTabBarStyle({backgroundColor:appTheme.value ? '#ffffff' : '#111111'})
|
||||
if(getStorage('storeMessge')){
|
||||
if(store.state.storeInfo.allStoreInfo.id !== getStorage('storeID')) await store.dispatch('storeInfo/getOneStore',getStorage("storeID"))
|
||||
await getMtStoreIMStatus() // 获取美团im单聊状态
|
||||
@@ -81,6 +80,8 @@ const messageFn = function () {
|
||||
if(brr && brr.length>0){
|
||||
let mtVendorIDInfo = brr.find((item:AnyObject) => item.vendorID === 1)
|
||||
let ebVendorIDInfo = brr.find((item:AnyObject) => item.vendorID === 3)
|
||||
let jdVendorIDInfo = brr.find((item:AnyObject) => item.vendorID === 0)
|
||||
// console.log(jdVendorIDInfo,'brr,999999999*****',brr)
|
||||
if(mtVendorIDInfo){
|
||||
arr.push({
|
||||
vendorStoreID: mtVendorIDInfo.vendorStoreID,
|
||||
@@ -96,6 +97,14 @@ const messageFn = function () {
|
||||
appID: ebVendorIDInfo.vendorOrgCode
|
||||
})
|
||||
}
|
||||
|
||||
if(jdVendorIDInfo){
|
||||
arr.push({
|
||||
vendorStoreID: jdVendorIDInfo.vendorStoreID,
|
||||
vendorID: "0",
|
||||
appID: jdVendorIDInfo.vendorOrgCode
|
||||
})
|
||||
}
|
||||
}
|
||||
return arr
|
||||
}
|
||||
@@ -109,6 +118,9 @@ const messageFn = function () {
|
||||
}
|
||||
let venderIDInfo = arr.find((item:AnyObject) => item.vendorID === '1')
|
||||
let ebStore = arr.find((item:AnyObject) => item.vendorID === '3')
|
||||
let jdStore = arr.find((item:AnyObject) => item.vendorID === '0')
|
||||
// console.log(jdStore,'jdStore',JSON.stringify(arr,undefined,4))
|
||||
// let jdStore = arr.find((item:AnyObject) => item.vendorID === '3')
|
||||
|
||||
let res = await message.get_IM_user_list(data)
|
||||
// res = msgInfo.userList // 模拟数据
|
||||
@@ -118,9 +130,11 @@ const messageFn = function () {
|
||||
let newArr: any = []
|
||||
let fmtUserList = venderIDInfo ? res.data[`${venderIDInfo.appID}:${venderIDInfo.vendorStoreID}:1`] || [] : [] // 美团
|
||||
let febUserList = ebStore && JSON.stringify(ebStore) !== '{}' ? res.data[`${ebStore.appID}:${ebStore.vendorStoreID}:3`] || [] : [] // 饿百
|
||||
let jdUserList = jdStore && JSON.stringify(jdStore) !== '{}' ? res.data[`${jdStore.appID}:${jdStore.vendorStoreID}:0`] || [] : [] // 饿百
|
||||
// let febUserList = res.data[`${ebStore.appID}:${ebStore.vendorStoreID}:3`] || []
|
||||
let reverseList = fmtUserList.reverse()
|
||||
let reverseListEb = febUserList.reverse()
|
||||
let reverseListJD = jdUserList.reverse()
|
||||
// 格式化数据
|
||||
reverseList.map((element: any) => {
|
||||
let resData = JSON.parse(element)
|
||||
@@ -195,6 +209,23 @@ const messageFn = function () {
|
||||
})
|
||||
}
|
||||
|
||||
if(reverseListJD && reverseListJD.length>0){
|
||||
reverseListJD.forEach((element:string) => {
|
||||
let resData = JSON.parse(element)
|
||||
console.log('京东消息,用户列表',resData)
|
||||
let latestMsgHandler = resData.latestMsg
|
||||
|
||||
let userList = {
|
||||
...resData,
|
||||
latestMsg: latestMsgHandler,
|
||||
latestTime: timeFormatDHM(+new Date(resData.latestTime )),
|
||||
orderInfo: {},
|
||||
orderDesc: ''
|
||||
}
|
||||
newArr.push(userList)
|
||||
});
|
||||
}
|
||||
|
||||
userListData.value = newArr
|
||||
} else {
|
||||
toast('获取信息异常')
|
||||
@@ -238,7 +269,8 @@ const messageFn = function () {
|
||||
charItem, // 进入聊天页面
|
||||
userListData, // 用户列表
|
||||
jumpToSetUp, // 跳到设置页面
|
||||
store
|
||||
store,
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,16 +18,18 @@
|
||||
<uni-list-chat
|
||||
:clickable="true"
|
||||
@click="charItem(item)"
|
||||
:class="appTheme ? '':'darkMode'"
|
||||
:avatar-circle="true"
|
||||
:title="
|
||||
item.vendorID == 1
|
||||
? `【美团${item.orderDesc}】${item.userID === '0' ? '群发消息' : item.userID}`
|
||||
: `【淘宝闪购】${item.userID}`
|
||||
: item.vendorID == 3 ? `【淘宝闪购】${item.userID}` : `【京东】${item.userID}`
|
||||
"
|
||||
:avatar="
|
||||
item.vendorID == 1
|
||||
? 'https://image.jxc4.com/image/75654ab606494a0efdb0cf7d7ad060d9.png'
|
||||
: 'https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png'
|
||||
: item.vendorID == 3 ? 'https://image.jxc4.com/image/6c2f1dfd95890df8ef5e27bde15c4e7f.png'
|
||||
: 'https://image.jxc4.com/image/884664b80ffd2eda64a4aab9f4dc402e.png'
|
||||
"
|
||||
:note="item.latestMsg"
|
||||
:time="item.latestTime"
|
||||
@@ -39,8 +41,6 @@
|
||||
</template>
|
||||
|
||||
<jx-empty v-else title="暂无消息" />
|
||||
|
||||
|
||||
<!-- 公共组件 -->
|
||||
<jx-login-empty title="马上登录,查看消息" />
|
||||
<jx-loading />
|
||||
@@ -52,11 +52,21 @@
|
||||
charItem, // 聊天详情
|
||||
userListData, // 用户列表
|
||||
jumpToSetUp, // 跳到设置页面
|
||||
store
|
||||
store,
|
||||
appTheme
|
||||
} = messageFn()
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .darkMode{
|
||||
.uni-list-chat{
|
||||
background-color:#000000 !important;
|
||||
}
|
||||
|
||||
.uni-list-chat__content-title{
|
||||
color:#ffffff !important;
|
||||
}
|
||||
}
|
||||
.chat-border:nth-child(1) {
|
||||
border-top: 2rpx solid rgb(230, 230, 230);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.abnormal-order{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.abnormal-order{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
.abnormal-order {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
margin-bottom: 25rpx;
|
||||
padding-bottom: 1rpx;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
}
|
||||
|
||||
.after-sales-root {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
.top-title {
|
||||
@extend %globalStyle;
|
||||
@@ -14,9 +14,9 @@
|
||||
font-size: 30rpx;
|
||||
padding: 25rpx 15rpx;
|
||||
|
||||
.order {
|
||||
color: rgb(0, 0, 0);
|
||||
}
|
||||
// .order {
|
||||
// color: rgb(0, 0, 0);
|
||||
// }
|
||||
|
||||
.success {
|
||||
color: rgb(0, 0, 0);
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
.detaile-text {
|
||||
@extend %globalStyle;
|
||||
background-color: #fcf1f0;
|
||||
// background-color: #fcf1f0;
|
||||
color: $jx-warring;
|
||||
}
|
||||
|
||||
@@ -192,4 +192,34 @@
|
||||
border-left: 1rpx solid rgb(223, 223, 223);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.after-sales-root{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.order{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.detaile-text{
|
||||
background-color: #fcf1f0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.after-sales-root{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
|
||||
.order{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.detaile-text{
|
||||
background-color: #5a5959;
|
||||
}
|
||||
}
|
||||
@@ -87,7 +87,7 @@ const wbVendor = computed(() => {
|
||||
border: none !important;
|
||||
}
|
||||
.compelet-root {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
padding-bottom: 1rpx;
|
||||
|
||||
.address {
|
||||
@@ -95,7 +95,7 @@ const wbVendor = computed(() => {
|
||||
justify-content: space-between;
|
||||
padding: 15rpx;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
// color: #000000;
|
||||
background-color: rgba($color: #908f96, $alpha: 0.15);
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
@@ -126,4 +126,25 @@ const wbVendor = computed(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.compelet-root{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.address{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.compelet-root{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
|
||||
.address{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -383,13 +383,13 @@ const isShow = computed(() => {
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20rpx 15rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-bottom: 6rpx dashed #e7e7e7;
|
||||
|
||||
.order {
|
||||
.timer {
|
||||
margin-top: 6rpx;
|
||||
color: rgb(0, 0, 0);
|
||||
// color: rgb(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -440,7 +440,7 @@ const isShow = computed(() => {
|
||||
.order-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #ffffff;
|
||||
// background-color: #ffffff;
|
||||
// padding: 15rpx;
|
||||
padding: 10rpx;
|
||||
border-bottom: 2rpx dashed #e7e7e7;
|
||||
@@ -507,4 +507,29 @@ const isShow = computed(() => {
|
||||
line-height:25px;
|
||||
margin:auto 10px;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.order-info,
|
||||
.order-title{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.num-root,
|
||||
.timer{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.order-info,
|
||||
.order-title{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.num-root,
|
||||
.timer{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,8 +1,23 @@
|
||||
@media (prefers-color-scheme: light) {
|
||||
.jx-tabs{
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.jx-tabs{
|
||||
background-color: #000;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.jx-tabs {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
border-top: 1rpx solid #f8f8f8;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-bottom: 1rpx solid rgb(214, 214, 214);
|
||||
|
||||
// border: 1px solid red;
|
||||
|
||||
@@ -1,9 +1,43 @@
|
||||
@media (prefers-color-scheme: light) {
|
||||
.switch-filter{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.condition,
|
||||
.title{
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.confirm,
|
||||
.cancel{
|
||||
color: #696969;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.switch-filter{
|
||||
background-color: #222;
|
||||
}
|
||||
|
||||
.condition,
|
||||
.title,
|
||||
.value{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.confirm,
|
||||
.cancel{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.switch-filter {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
.condition {
|
||||
text-align: center;
|
||||
color: #999999;
|
||||
// color: #999999;
|
||||
margin-top: var(--status-bar-height);
|
||||
}
|
||||
|
||||
@@ -24,9 +58,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #999999;
|
||||
}
|
||||
// .title {
|
||||
// color: #999999;
|
||||
// }
|
||||
|
||||
.value {
|
||||
padding: 5rpx 15rpx;
|
||||
@@ -43,14 +77,14 @@
|
||||
|
||||
.cancel,
|
||||
.confirm {
|
||||
color: #696969;
|
||||
// color: #696969;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.confirm {
|
||||
color: #000;
|
||||
// color: #000;
|
||||
border-left: 1rpx solid #999999;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ function handleSelfDelivered() {
|
||||
}
|
||||
.distribution-root {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
@@ -320,4 +320,26 @@ function handleSelfDelivered() {
|
||||
color: #999999;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.distribution-root{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
.address{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.distribution-root{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
|
||||
.address{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -82,7 +82,7 @@ async function AcceptOrRefuseOrder(
|
||||
<style lang="scss" scoped>
|
||||
.pending-order-root {
|
||||
box-sizing: border-box;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
// 操作按钮
|
||||
.operation-btn {
|
||||
@@ -109,4 +109,17 @@ async function AcceptOrRefuseOrder(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.pending-order-root{
|
||||
background-color: #fff
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.pending-order-root{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -79,7 +79,7 @@ async function pickingComplete(vendorOrderID: string, vendorID: string) {
|
||||
}
|
||||
.pending-picking-root {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
.remarks {
|
||||
padding: 15rpx;
|
||||
@@ -122,4 +122,23 @@ async function pickingComplete(vendorOrderID: string, vendorID: string) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.pending-picking-root{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.pending-picking-root{
|
||||
background-color: #000;
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
|
||||
.remarks{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,10 +3,10 @@ import { store } from '@/store'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { timeFormatD, jx_trembling } from '@/utils/tools'
|
||||
import { onLoad, onShow, onReady } from '@dcloudio/uni-app'
|
||||
import { watch, ref, onBeforeUnmount } from 'vue'
|
||||
import { onLoad, onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { watch, ref, onBeforeUnmount, computed } from 'vue'
|
||||
import order from "@/api/https/order"
|
||||
import merchant from "@/api/https/merchant"
|
||||
|
||||
/**
|
||||
* 订单管理方法
|
||||
* @author zhangshuwie <2966211270@qq.com>
|
||||
@@ -32,6 +32,11 @@ function orderInfoFn() {
|
||||
await store.dispatch('storeInfo/getOneStore',getStorage("storeID"))
|
||||
}
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
// onReady(() => {
|
||||
|
||||
// })
|
||||
|
||||
|
||||
/**
|
||||
* tab单击事件
|
||||
@@ -130,6 +135,15 @@ function orderInfoFn() {
|
||||
* 安卓通知情况
|
||||
*/
|
||||
onShow(() => {
|
||||
uni.setTabBarStyle({backgroundColor:appTheme.value ? '#ffffff' : '#111111'})
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#ffffff', // 前景文字颜色,必选
|
||||
// backgroundColor: '#000000', // 背景颜色,必选
|
||||
// animation: {
|
||||
// duration: 400, // 过渡动画时长,单位 ms
|
||||
// timingFunc: 'easeInOut' // 动画效果
|
||||
// }
|
||||
// });
|
||||
let port = uni.getSystemInfoSync().platform
|
||||
switch (port) {
|
||||
case 'android':
|
||||
@@ -169,16 +183,11 @@ function orderInfoFn() {
|
||||
const isRest = ref<boolean>(true)
|
||||
const isStatu = ref<boolean>(false)
|
||||
onShow(async () => {
|
||||
|
||||
|
||||
// uni.setNavigationBarColor({
|
||||
// frontColor: '#ffffff', // 前景文字颜色,必选
|
||||
// backgroundColor: '#000000', // 背景颜色,必选
|
||||
// animation: {
|
||||
// duration: 400, // 过渡动画时长,单位 ms
|
||||
// timingFunc: 'easeInOut' // 动画效果
|
||||
// }
|
||||
// });
|
||||
console.log('监听系统主题的变化,订单页面',appTheme.value)
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: '#000000', // 背景颜色,必选
|
||||
});
|
||||
|
||||
uni.removeTabBarBadge({ index: 0 })
|
||||
if (!store.state.storeInfo.allStoreInfo.id) {
|
||||
@@ -475,6 +484,7 @@ function orderInfoFn() {
|
||||
notice, // 通知
|
||||
lockScreen, // 锁屏
|
||||
setNotice, // 设置来单不响
|
||||
appTheme, // 主题
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
@touchstart="touchS()"
|
||||
@touchend="touchE($event, 1)"
|
||||
/>
|
||||
|
||||
<!-- 当前门店是否休息 -->
|
||||
<view
|
||||
v-if="!isStatu"
|
||||
@@ -39,6 +38,9 @@
|
||||
<text class="btn" @tap="orderFilterRef.openRef()">更多条件</text>
|
||||
<uni-search-bar
|
||||
v-model="keyword"
|
||||
class="uni-search-bar"
|
||||
:bgColor="appTheme ? '#ffffff': '#000000'"
|
||||
:textColor="appTheme ? '#000000' : '#ffffff'"
|
||||
@confirm="searchStore(keyword)"
|
||||
@clear="clearIpt"
|
||||
cancelButton="none"
|
||||
@@ -54,15 +56,9 @@
|
||||
<!-- 待配送筛选 -->
|
||||
<template v-if="orderState == 3">
|
||||
<view class="filter-order">
|
||||
<view :class="{ active: active == 0 }" @tap="distributionStatu(0)"
|
||||
>全 部</view
|
||||
>
|
||||
<view :class="{ active: active == 1 }" @tap="distributionStatu(1)"
|
||||
>未抢单</view
|
||||
>
|
||||
<view :class="{ active: active == 2 }" @tap="distributionStatu(2)"
|
||||
>已抢单</view
|
||||
>
|
||||
<view :class="{ active: active == 0 }" @tap="distributionStatu(0)">全 部</view>
|
||||
<view :class="{ active: active == 1 }" @tap="distributionStatu(1)">未抢单</view>
|
||||
<view :class="{ active: active == 2 }" @tap="distributionStatu(2)">已抢单</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
@@ -75,7 +71,7 @@
|
||||
refresher-enabled
|
||||
:refresher-triggered="triggered"
|
||||
@refresherrefresh="refresherrefresh"
|
||||
refresher-background="#efefef"
|
||||
:refresher-background="appTheme ? '#efefef' : '#000000'"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<!-- 待接单 -->
|
||||
@@ -241,6 +237,7 @@ const {
|
||||
notice, // 通知
|
||||
lockScreen, // 锁屏
|
||||
setNotice, // 设置来单不响
|
||||
appTheme, // 主题
|
||||
} = orderInfoFn()
|
||||
/**
|
||||
* 联系运营页面跳转
|
||||
@@ -335,8 +332,30 @@ function touchE(e: AnyObject, type: number) {
|
||||
.status_bar {
|
||||
height: var(--status-bar-height);
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.filter-order,
|
||||
.filter-root,
|
||||
.status_bar{
|
||||
background-color: #fff
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.filter-order,
|
||||
.filter-root,
|
||||
.status_bar{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.uni-search-bar{
|
||||
border:1rpx solid #eee;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.open-status-msg {
|
||||
position: absolute;
|
||||
z-index: 99999999999;
|
||||
@@ -377,7 +396,6 @@ function touchE(e: AnyObject, type: number) {
|
||||
box-sizing: border-box;
|
||||
height: 90rpx;
|
||||
padding: 15rpx;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -474,7 +492,7 @@ page {
|
||||
padding: 15rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
view {
|
||||
box-sizing: border-box;
|
||||
|
||||
@@ -10,5 +10,25 @@ export default {
|
||||
*/
|
||||
getUpdateOrder(state: ServeinfoStoreType) {
|
||||
return state.updateOrder
|
||||
},
|
||||
|
||||
/**
|
||||
* 主题颜色
|
||||
*/
|
||||
appTheme(state:ServeinfoStoreType){
|
||||
console.log(state,'获取设备信息,state',JSON.parse(state.sysInfo))
|
||||
let flag = state.sysTheme
|
||||
// #ifdef APP-HARMONY
|
||||
// flag = JSON.parse(state.sysInfo).osTheme || 'light'
|
||||
// #endif
|
||||
// console.log(JSON.parse(state.sysInfo),'JSON.parse(state.sysInfo)')
|
||||
// #ifndef APP-HARMONY
|
||||
// flag = JSON.parse(state.sysInfo).theme || 'light'
|
||||
flag = 'dark'
|
||||
|
||||
// #endif
|
||||
|
||||
return flag
|
||||
|
||||
}
|
||||
}
|
||||
@@ -21,6 +21,7 @@ export interface ServeinfoStoreType {
|
||||
isAgreement: boolean // 是否同意用户协议
|
||||
isAgreementIf: boolean // 勾选协议问题
|
||||
serviceInfo: object // 服务信息
|
||||
sysTheme:string // 系统主题
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -38,7 +39,8 @@ export const serveInfo: Module<ServeinfoStoreType, State> = {
|
||||
isNetWork: true, // 手机是否连接上网络默认有网
|
||||
isAgreement: false, // 是否同意用户协议
|
||||
isAgreementIf: false, // 勾选协议问题
|
||||
serviceInfo: {} // 服务信息
|
||||
serviceInfo: {}, // 服务信息
|
||||
sysTheme:'light' // 系统主题 light / dark
|
||||
}),
|
||||
mutations,
|
||||
actions,
|
||||
|
||||
@@ -88,5 +88,13 @@ export default {
|
||||
*/
|
||||
setServiceInfo(state: ServeinfoStoreType, payload: Object) {
|
||||
state.serviceInfo = payload
|
||||
},
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 保存系统主题
|
||||
*/
|
||||
saveSysTheme(state:ServeinfoStoreType,payload:string){
|
||||
state.sysTheme = payload
|
||||
}
|
||||
}
|
||||
@@ -48,6 +48,13 @@ export default {
|
||||
return state.imOnlineStatus.filter(item => item.vendorID === 3)
|
||||
},
|
||||
|
||||
/**
|
||||
* 淘宝闪购im单聊状态
|
||||
*/
|
||||
imJdStatus(state: StoreInfoStoreType) {
|
||||
return state.imOnlineStatus.filter(item => item.vendorID === 0)
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 单聊状态(消息)
|
||||
@@ -56,6 +63,7 @@ export default {
|
||||
let str = ''
|
||||
if (getters.imMtStatus.length > 0 && !getters.imMtStatus[0].errMsg && getters.imMtStatus[0].imStatus === 0) str = '美团'
|
||||
if (getters.imEbStatus.length > 0 && !getters.imEbStatus[0].errMsg && getters.imEbStatus[0].imStatus === 0) str = str ? str + '/淘宝闪购':'淘宝闪购'
|
||||
if (getters.imJdStatus.length > 0 && !getters.imJdStatus[0].errMsg && getters.imJdStatus[0].imStatus === 0) str = str ? str + '/京东':'京东'
|
||||
return str
|
||||
},
|
||||
|
||||
|
||||
@@ -71,6 +71,7 @@ export default {
|
||||
*/
|
||||
jxLoadingFn(state: StoreInfoStoreType, payload: boolean) {
|
||||
state.jxLoading = payload
|
||||
// state.jxLoading = true
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,37 @@
|
||||
<template>
|
||||
<web-view :src="webUrl" />
|
||||
<web-view :src="webUrl" class="webview-background" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup >
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { store } from '@/store'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
|
||||
const webUrl = ref<string>('')
|
||||
onLoad((options: any) => {
|
||||
webUrl.value = options.url
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff',
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@media (prefers-color-scheme: light) {
|
||||
.webview-background{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.webview-background{
|
||||
background-color:#686767 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -47,18 +47,27 @@
|
||||
|
||||
<script lang="ts" setup >
|
||||
import toast from '@/utils/toast'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc'
|
||||
import { getStorage } from "@/utils/storage";
|
||||
import useOrderInfo from '@/composables/useOrderInfo'
|
||||
import { store } from '@/store';
|
||||
onShow(() => {
|
||||
isUpdate(2)
|
||||
})
|
||||
|
||||
const { watchVersion } = useGlobalFunc()
|
||||
|
||||
const oldVersion = ref<string>(uni.getSystemInfoSync().appVersion)
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
// 华为不展示
|
||||
const isHuawei = computed(() => {
|
||||
let brand = uni.getSystemInfoSync().brand
|
||||
@@ -164,7 +173,7 @@ page {
|
||||
}
|
||||
|
||||
.center-root {
|
||||
background-color: rgb(255, 255, 255);
|
||||
// background-color: rgb(255, 255, 255);
|
||||
width: 100%;
|
||||
margin-top: 100rpx;
|
||||
border-top: 1rpx solid rgb(231, 231, 231);
|
||||
@@ -265,4 +274,16 @@ page {
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.center-root{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.center-root{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -9,6 +9,7 @@
|
||||
primaryColor="#aaa"
|
||||
class="input"
|
||||
:inputBorder="false"
|
||||
:class="appTheme ? 'lightMode' : 'darkMode'"
|
||||
type="number"
|
||||
v-model="phone"
|
||||
placeholder="请输入手机号"
|
||||
@@ -27,6 +28,7 @@
|
||||
primaryColor="#aaa"
|
||||
class="input"
|
||||
:inputBorder="false"
|
||||
:class="appTheme ? 'lightMode' : 'darkMode'"
|
||||
maxlength="6"
|
||||
type="number"
|
||||
v-model="code"
|
||||
@@ -46,7 +48,7 @@
|
||||
import jxIcon from '@/components/jx-icon/jx-icon.vue'
|
||||
import jxInput from '@/components/jx-input/jx-input.vue'
|
||||
import toast from '@/utils/toast'
|
||||
import { ref, Ref } from 'vue'
|
||||
import { computed, ref, Ref } from 'vue'
|
||||
import login from '@/api/https/login'
|
||||
import { jx_throttles } from '@/utils/tools'
|
||||
import { store } from '@/store'
|
||||
@@ -57,6 +59,7 @@ const code: Ref<string> = ref('')
|
||||
const emit = defineEmits<{
|
||||
(e: 'codeLogin', data: AnyObject): void
|
||||
}>()
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
|
||||
async function codeLogin() {
|
||||
if (!store.state.serveInfo.isAgreement) {
|
||||
@@ -140,6 +143,19 @@ const sendCodeThroottle = jx_throttles({
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .darkMode{
|
||||
.uni-easyinput__content{
|
||||
background-color: #191919 !important;
|
||||
color:#ffffff !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .lightMode{
|
||||
.uni-easyinput__content{
|
||||
background-color: #efefef !important;
|
||||
}
|
||||
}
|
||||
|
||||
.code-from-root {
|
||||
border-bottom: 2rpx solid rgb(234, 234, 234);
|
||||
line-height: 70rpx;
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
|
||||
.phone-login-root {
|
||||
width: 100%;
|
||||
.top-mask {
|
||||
height: 15rpx;
|
||||
background-color: rgb(242, 242, 242);
|
||||
}
|
||||
// .top-mask {
|
||||
// // height: 15rpx;
|
||||
// background-color: rgb(242, 242, 242);
|
||||
// }
|
||||
|
||||
.img {
|
||||
margin: 25rpx 0;
|
||||
@@ -207,4 +207,32 @@
|
||||
100% {
|
||||
transform: translateX(0rpx);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.status_bar{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.top-mask{
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.checkBoxText{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.status_bar{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.top-mask{
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.checkBoxText{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
<!-- 状态栏 -->
|
||||
<view class="status_bar"></view>
|
||||
|
||||
<!-- 导航栏 border :left-text=" isLogin ? '返回': '首页'" :title="navTitle"-->
|
||||
<uni-nav-bar left-icon="left" rightWidth="200rpx" @clickLeft="clickLeft">
|
||||
<!-- 导航栏 -->
|
||||
<uni-nav-bar left-icon="left" :dark="!appTheme" rightWidth="200rpx" @clickLeft="clickLeft">
|
||||
<view style="flex: 1;flex-direction: row;display: flex;align-items: center;justify-content: center;overflow: hidden;">
|
||||
<text style="font-weight: bold;font-size: 36rpx;">{{ navTitle }}</text>
|
||||
</view>
|
||||
@@ -17,7 +17,7 @@
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="phone-login-root">
|
||||
<view class="top-mask"></view>
|
||||
<!-- <view class="top-mask"></view> -->
|
||||
<view class="img">
|
||||
<image @tap="switchTerrace" :src="log" mode="scaleToFill" />
|
||||
</view>
|
||||
@@ -64,8 +64,10 @@
|
||||
:checked="isAgreement"
|
||||
value="cb"
|
||||
color="#2dd091"
|
||||
:backgroundColor="appTheme ? '#efefef' : '#191919'"
|
||||
style="transform: scale(0.7); border-radius: 50%"
|
||||
/>我已阅读并同意
|
||||
/>
|
||||
<text class="checkBoxText">我已阅读并同意</text>
|
||||
</checkbox-group>
|
||||
</label>
|
||||
<text class="text" @tap="user">《用户协议》</text>
|
||||
@@ -74,6 +76,7 @@
|
||||
<view
|
||||
class="lab"
|
||||
:class="{ 'lab-active': store.state.serveInfo.isAgreementIf }"
|
||||
|
||||
>请勾选同意后在进行登录</view
|
||||
>
|
||||
</view>
|
||||
@@ -93,6 +96,7 @@ import CodeLogin from './codeLogin/codeLogin.vue'
|
||||
import PasWordLogin from './paswordLogin/paswordLogin.vue'
|
||||
import weixinFn from './weixin'
|
||||
import { store } from '@/store'
|
||||
|
||||
const {
|
||||
loginTypeList, // 切换tab
|
||||
activeItem, // tab高亮
|
||||
@@ -108,6 +112,7 @@ const {
|
||||
isAgreement, // 是否同意协议
|
||||
clickLeft, // 点击返回
|
||||
// isLogin, // 是否登录
|
||||
appTheme
|
||||
} = weixinFn()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
<uni-easyinput
|
||||
primaryColor="#aaa"
|
||||
:inputBorder="false"
|
||||
:class="appTheme ? 'lightMode' : 'darkMode'"
|
||||
class="input"
|
||||
type="text"
|
||||
v-model="phone"
|
||||
@@ -26,6 +27,7 @@
|
||||
<uni-easyinput
|
||||
primaryColor="#aaa"
|
||||
:inputBorder="false"
|
||||
:class="appTheme ? 'lightMode' : 'darkMode'"
|
||||
class="input"
|
||||
type="password"
|
||||
v-model="pwd"
|
||||
@@ -44,7 +46,7 @@ import jxInput from '@/components/jx-input/jx-input.vue'
|
||||
import toast from '@/utils/toast'
|
||||
import login from '@/api/https/login'
|
||||
import md5 from 'js-md5'
|
||||
import { Ref, ref } from 'vue'
|
||||
import { computed, Ref, ref } from 'vue'
|
||||
import { store } from '@/store'
|
||||
|
||||
const phone: Ref<string> = ref('')
|
||||
@@ -53,8 +55,9 @@ const pwd: Ref<string> = ref('')
|
||||
const emit = defineEmits<{
|
||||
(e: 'pwdLogin', data: AnyObject): void
|
||||
}>()
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
async function pwdLogin() {
|
||||
console.log('密码,pwd.value',pwd.value)
|
||||
if (!store.state.serveInfo.isAgreement) {
|
||||
// 提示用户未勾选
|
||||
let time: any = null
|
||||
@@ -66,6 +69,7 @@ async function pwdLogin() {
|
||||
}, 200)
|
||||
return false
|
||||
}
|
||||
|
||||
if (phone.value == '') return toast('用户名不规范')
|
||||
if (pwd.value.length < 4) return toast('密码不规范')
|
||||
let data = {
|
||||
@@ -84,6 +88,19 @@ async function pwdLogin() {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .darkMode{
|
||||
.uni-easyinput__content{
|
||||
background-color: #191919 !important;
|
||||
color:#ffffff !important;
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .lightMode{
|
||||
.uni-easyinput__content{
|
||||
background-color: #efefef !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pwd-from-root {
|
||||
border-bottom: 2rpx solid rgb(234, 234, 234);
|
||||
line-height: 70rpx;
|
||||
|
||||
@@ -12,20 +12,21 @@ import toast from "@/utils/toast";
|
||||
*@return {*}
|
||||
*@param {}-
|
||||
*/
|
||||
// https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png
|
||||
// https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png
|
||||
function weixinFn() {
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
const log = ref<string>('ttps://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg')
|
||||
const navTitle = ref<string>('京西到家商家')
|
||||
onShow(() => {
|
||||
console.log('系统类型', getStorage('terrace'));
|
||||
if (getStorage('terrace') == 'jxcs') {
|
||||
log.value = 'https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png'
|
||||
navTitle.value = '京西到家商家'
|
||||
} else if(getStorage('terrace') == 'jxgy'){
|
||||
log.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
navTitle.value = '京西果园商家'
|
||||
}else{
|
||||
log.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
log.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
// 获取cid
|
||||
@@ -123,20 +124,20 @@ function weixinFn() {
|
||||
// 京西菜市商家
|
||||
if (res.tapIndex == 0) {
|
||||
setStorage('terrace', 'jxcs')
|
||||
log.value = 'https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png'
|
||||
navTitle.value = '京西到家商家'
|
||||
}
|
||||
// 京西果园商家
|
||||
if (res.tapIndex == 1) {
|
||||
setStorage('terrace', 'jxgy')
|
||||
log.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
navTitle.value = '京西果园商家'
|
||||
}
|
||||
|
||||
// 京西到家商家
|
||||
if (res.tapIndex == 2) {
|
||||
setStorage('terrace', 'gblm')
|
||||
log.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
log.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
uni.hideLoading()
|
||||
@@ -213,6 +214,7 @@ function weixinFn() {
|
||||
isAgreement, // 是否同意协议
|
||||
clickLeft, // 点击返回
|
||||
// isLogin, // 是否登录
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,4 +114,16 @@
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.status_bar{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.status_bar{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
@@ -1,194 +0,0 @@
|
||||
import toast from "@/utils/toast";
|
||||
import { computed, ref } from "vue";
|
||||
import useGlobalFunc from "@/composables/useGlobalFunc";
|
||||
import { getStorage, setStorage } from "@/utils/storage";
|
||||
import { store } from "@/store";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import login from "@/api/https/login"
|
||||
const { setUserInfo, appWxLogin } = useGlobalFunc()
|
||||
export default {
|
||||
setup() {
|
||||
// 跳转手机号登录
|
||||
function phoneLogin() {
|
||||
// console.log('当前是属于哪个平台',getStorage('terrace'))
|
||||
uni.navigateTo({
|
||||
url: '/subPages/login/index',
|
||||
})
|
||||
}
|
||||
|
||||
const log = ref<string>('https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg')
|
||||
const navTitle = ref<string>('京西到家商家')
|
||||
onShow(() => {
|
||||
isDownWx()
|
||||
if (getStorage('terrace') == 'jxcs') {
|
||||
log.value = 'https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg'
|
||||
navTitle.value = '京西到家商家'
|
||||
} else if(getStorage('terrace') == 'jxgy'){
|
||||
log.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
navTitle.value = '京西果园商家'
|
||||
}else{
|
||||
log.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
// 获取cid
|
||||
plus.push.getClientInfoAsync((info) => {
|
||||
let cid = info["clientid"];
|
||||
setStorage('cid', cid)
|
||||
}, () => { });
|
||||
})
|
||||
|
||||
// ******************** 是否下载微信 *****************************
|
||||
const isWx = ref<boolean>(false)
|
||||
function isDownWx() {
|
||||
// if (plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })) {
|
||||
// isWx.value = true
|
||||
// } else {
|
||||
// isWx.value = false
|
||||
// }
|
||||
|
||||
isWx.value = false
|
||||
// // return
|
||||
// uni.getProvider({
|
||||
// service: 'share',
|
||||
// success: function (res) {
|
||||
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
|
||||
// isWx.value = res.provider[0] == 'weixin' ? true : false
|
||||
// }})
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户协议
|
||||
*/
|
||||
function user() {
|
||||
let url = 'https://www.jxc4.com/managerApp/jxdjService.html'
|
||||
uni.navigateTo({ url: `/subPages/agreement/jxcs?url=${url}` })
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 隐私协议
|
||||
*/
|
||||
function privacy() {
|
||||
let url = 'https://www.jxc4.com/managerApp/jxdjPrivacy.html'
|
||||
uni.navigateTo({ url: `/subPages/agreement/jxcs?url=${url}` })
|
||||
}
|
||||
|
||||
// 微信登录弹窗实例
|
||||
const wxPopup = ref<any>(null)
|
||||
|
||||
// ******************** wx登录类 *****************************
|
||||
//#region
|
||||
// 微信登录
|
||||
function appWxLoginFn() {
|
||||
appWxLogin({
|
||||
bangding: (authToken: string) => {
|
||||
// 显示自定义加载图(vuex)
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
uni.navigateTo({ url: `/subPages/login/addAuth/addAuth?authToken=${authToken}` })
|
||||
},
|
||||
success: (data: AnyObject) => {
|
||||
setUserInfo(data)
|
||||
saveUserType()
|
||||
}
|
||||
})
|
||||
wxPopup.value.close()
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* 存储用户信息
|
||||
*/
|
||||
async function saveUserType() {
|
||||
let res = await login.get_self_info()
|
||||
setStorage('userType', res.code == 0 ? res.data.type : 0)
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
// ******************** 切换平台 *****************************
|
||||
//#region
|
||||
let timer: any = null
|
||||
function switchTerrace() {
|
||||
uni.showActionSheet({
|
||||
title: '请选择使用平台',
|
||||
itemColor: '#5ab83e',
|
||||
itemList: ['京西到家商家', '京西果园商家','京西超市商家'],
|
||||
popover: {
|
||||
width: 5000,
|
||||
},
|
||||
success: function (res) {
|
||||
uni.showLoading({
|
||||
title: '正在切换系统',
|
||||
})
|
||||
timer = setTimeout(() => {
|
||||
// 京西菜市商家
|
||||
if (res.tapIndex == 0) {
|
||||
setStorage('terrace', 'jxcs')
|
||||
log.value = 'hhttps://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg'
|
||||
navTitle.value = '京西到家商家'
|
||||
}
|
||||
// 京西果园商家
|
||||
if (res.tapIndex == 1) {
|
||||
setStorage('terrace', 'jxgy')
|
||||
log.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
navTitle.value = '京西果园商家'
|
||||
}
|
||||
// 京西到家商家
|
||||
if (res.tapIndex == 2) {
|
||||
setStorage('terrace', 'gblm')
|
||||
log.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
toast('切换成功', 1)
|
||||
clearTimeout(timer)
|
||||
}, 500)
|
||||
},
|
||||
fail: () => {
|
||||
console.log('ZSW-取消')
|
||||
},
|
||||
})
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
const isLogin = computed(() => {
|
||||
return getStorage('token') ? true : false
|
||||
})
|
||||
|
||||
/**
|
||||
* 返回
|
||||
*/
|
||||
const clickLeft = (() => {
|
||||
console.log('点击返回,当前的登录状态,11111111',isLogin.value)
|
||||
if(isLogin.value){
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}else{
|
||||
uni.switchTab({ url: '/pages/merchant/index' })
|
||||
}
|
||||
// uni.navigateBack({
|
||||
// uni.navigateBack({
|
||||
// delta: 1
|
||||
// });
|
||||
// })
|
||||
})
|
||||
|
||||
return {
|
||||
phoneLogin,
|
||||
user,
|
||||
privacy,
|
||||
wxPopup,
|
||||
appWxLoginFn,
|
||||
switchTerrace,
|
||||
log,
|
||||
navTitle,
|
||||
isWx,
|
||||
getStorage,
|
||||
clickLeft,
|
||||
isLogin
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
<template>
|
||||
<!-- 状态栏 -->
|
||||
<view class="status_bar"></view>
|
||||
|
||||
<!-- 导航栏 :border="false" :left-text=" isLogin ? '返回': '首页'" :title="navTitle"-->
|
||||
<uni-nav-bar left-icon="left" rightWidth="200rpx" style="padding:10rpx 0" @clickLeft="clickLeft">
|
||||
<!-- 导航栏 style="padding:20rpx 0" -->
|
||||
<uni-nav-bar left-icon="left" :dark="!appTheme" rightWidth="200rpx" @clickLeft="clickLeft" >
|
||||
<view style="flex: 1;flex-direction: row;display:flex;align-items: center;justify-content: center;overflow: hidden;">
|
||||
<text style="font-weight: bold;font-size: 36rpx;">{{ navTitle }}</text>
|
||||
</view>
|
||||
@@ -15,7 +14,7 @@
|
||||
</template>
|
||||
</uni-nav-bar>
|
||||
|
||||
<view class="logo">
|
||||
<view class="logo" >
|
||||
<image @tap="switchTerrace" :src="log" mode="scaleToFill" />
|
||||
</view>
|
||||
|
||||
@@ -43,6 +42,7 @@
|
||||
</view>
|
||||
|
||||
<view class="info">欢迎进入京西到家商家版</view>
|
||||
|
||||
|
||||
<uni-popup ref="wxPopup" type="bottom">
|
||||
<view class="wxPopup-root">
|
||||
@@ -65,14 +65,219 @@
|
||||
</uni-popup>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./wxLogin.ts">
|
||||
<script lang="ts" setup>
|
||||
import toast from "@/utils/toast";
|
||||
import { computed, ref } from "vue";
|
||||
import useGlobalFunc from "@/composables/useGlobalFunc";
|
||||
import { getStorage, setStorage } from "@/utils/storage";
|
||||
import { store } from "@/store";
|
||||
import { onReady, onShow } from "@dcloudio/uni-app";
|
||||
import login from "@/api/https/login"
|
||||
const { setUserInfo, appWxLogin } = useGlobalFunc()
|
||||
// export default {
|
||||
// setup() {
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
const isLogin = computed(() => { return getStorage('token') ? true : false })
|
||||
|
||||
// 跳转手机号登录
|
||||
function phoneLogin() {
|
||||
// console.log('当前是属于哪个平台',getStorage('terrace'))
|
||||
uni.navigateTo({
|
||||
url: '/subPages/login/index',
|
||||
})
|
||||
}
|
||||
|
||||
// const log = ref<string>('https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg')
|
||||
const log = ref<string>('https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png')
|
||||
const navTitle = ref<string>('京西到家商家')
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000': '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
onShow(() => {
|
||||
isDownWx()
|
||||
if (getStorage('terrace') == 'jxcs') {
|
||||
// log.value = 'https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png'
|
||||
navTitle.value = '京西到家商家'
|
||||
} else if(getStorage('terrace') == 'jxgy'){
|
||||
// log.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
log.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
navTitle.value = '京西果园商家'
|
||||
}else{
|
||||
// log.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
log.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
// 获取cid
|
||||
plus.push.getClientInfoAsync((info) => {
|
||||
let cid = info["clientid"];
|
||||
setStorage('cid', cid)
|
||||
}, () => { });
|
||||
})
|
||||
|
||||
// ******************** 是否下载微信 *****************************
|
||||
const isWx = ref<boolean>(false)
|
||||
function isDownWx() {
|
||||
// if (plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })) {
|
||||
// isWx.value = true
|
||||
// } else {
|
||||
// isWx.value = false
|
||||
// }
|
||||
|
||||
isWx.value = false
|
||||
// // return
|
||||
// uni.getProvider({
|
||||
// service: 'share',
|
||||
// success: function (res) {
|
||||
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
|
||||
// isWx.value = res.provider[0] == 'weixin' ? true : false
|
||||
// }})
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户协议
|
||||
*/
|
||||
function user() {
|
||||
let url = 'https://www.jxc4.com/managerApp/jxdjService.html'
|
||||
uni.navigateTo({ url: `/subPages/agreement/jxcs?url=${url}` })
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 隐私协议
|
||||
*/
|
||||
function privacy() {
|
||||
let url = 'https://www.jxc4.com/managerApp/jxdjPrivacy.html'
|
||||
uni.navigateTo({ url: `/subPages/agreement/jxcs?url=${url}` })
|
||||
}
|
||||
|
||||
// 微信登录弹窗实例
|
||||
const wxPopup = ref<any>(null)
|
||||
|
||||
// ******************** wx登录类 *****************************
|
||||
//#region
|
||||
// 微信登录
|
||||
function appWxLoginFn() {
|
||||
appWxLogin({
|
||||
bangding: (authToken: string) => {
|
||||
// 显示自定义加载图(vuex)
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
uni.navigateTo({ url: `/subPages/login/addAuth/addAuth?authToken=${authToken}` })
|
||||
},
|
||||
success: (data: AnyObject) => {
|
||||
setUserInfo(data)
|
||||
saveUserType()
|
||||
}
|
||||
})
|
||||
wxPopup.value.close()
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* 存储用户信息
|
||||
*/
|
||||
async function saveUserType() {
|
||||
let res = await login.get_self_info()
|
||||
setStorage('userType', res.code == 0 ? res.data.type : 0)
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
// ******************** 切换平台 *****************************
|
||||
//#region
|
||||
let timer: any = null
|
||||
function switchTerrace() {
|
||||
uni.showActionSheet({
|
||||
title: '请选择使用平台',
|
||||
itemColor: '#5ab83e',
|
||||
itemList: ['京西到家商家', '京西果园商家','京西超市商家'],
|
||||
popover: {
|
||||
width: 5000,
|
||||
},
|
||||
success: function (res) {
|
||||
uni.showLoading({
|
||||
title: '正在切换系统',
|
||||
})
|
||||
timer = setTimeout(() => {
|
||||
// 京西菜市商家
|
||||
if (res.tapIndex == 0) {
|
||||
setStorage('terrace', 'jxcs')
|
||||
log.value = 'https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png'
|
||||
navTitle.value = '京西到家商家'
|
||||
}
|
||||
// 京西果园商家
|
||||
if (res.tapIndex == 1) {
|
||||
setStorage('terrace', 'jxgy')
|
||||
log.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
navTitle.value = '京西果园商家'
|
||||
}
|
||||
// 京西到家商家
|
||||
if (res.tapIndex == 2) {
|
||||
setStorage('terrace', 'gblm')
|
||||
log.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
navTitle.value = '京西超市商家'
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
toast('切换成功', 1)
|
||||
clearTimeout(timer)
|
||||
}, 500)
|
||||
},
|
||||
fail: () => {
|
||||
console.log('ZSW-取消')
|
||||
},
|
||||
})
|
||||
}
|
||||
//#endregion
|
||||
|
||||
/**
|
||||
* 返回
|
||||
*/
|
||||
const clickLeft = (() => {
|
||||
console.log('点击返回,当前的登录状态,11111111',isLogin.value)
|
||||
if(isLogin.value){
|
||||
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}else{
|
||||
uni.switchTab({ url: '/pages/merchant/index' })
|
||||
}
|
||||
// uni.navigateBack({
|
||||
// uni.navigateBack({
|
||||
// delta: 1
|
||||
// });
|
||||
// })
|
||||
})
|
||||
|
||||
// return {
|
||||
// appTheme,
|
||||
// phoneLogin,
|
||||
// user,
|
||||
// privacy,
|
||||
// wxPopup,
|
||||
// appWxLoginFn,
|
||||
// switchTerrace,
|
||||
// log,
|
||||
// navTitle,
|
||||
// isWx,
|
||||
// getStorage,
|
||||
// clickLeft,
|
||||
// isLogin
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './wxLogin.scss';
|
||||
</style>
|
||||
<style>
|
||||
page {
|
||||
background-color: #fff;
|
||||
@media (prefers-color-scheme: light) {
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -40,8 +40,8 @@ import useGlobalFunc from '@/composables/useGlobalFunc'
|
||||
import { store } from '@/store'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
const { openWeixin } = useGlobalFunc()
|
||||
|
||||
const deliveryList = ref<Array<AnyObject>>([])
|
||||
@@ -72,6 +72,15 @@ onShow(() => {
|
||||
getStoreMoney() // 门店账号余额
|
||||
deliveryList.value = store.state.storeInfo.allStoreInfo.StoreMaps
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
const accountBalance = ref<number>(0)
|
||||
/*************************************************
|
||||
* 品牌门店余额
|
||||
@@ -142,7 +151,7 @@ function handleChargeNow(type: number) {
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
border-bottom: 1rpx solid rgb(235, 235, 235);
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -154,7 +163,7 @@ function handleChargeNow(type: number) {
|
||||
}
|
||||
|
||||
.delivery-root {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-bottom: 1rpx solid rgb(235, 235, 235);
|
||||
|
||||
.delivery {
|
||||
@@ -204,4 +213,18 @@ function handleChargeNow(type: number) {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.delivery-root,
|
||||
.balance{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.delivery-root,
|
||||
.balance{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,14 +6,23 @@
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { timeFormatD } from '@/utils/tools'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import merchant from '@/api/https/merchant'
|
||||
import { store } from '@/store'
|
||||
|
||||
onShow(async () => {
|
||||
await QueryActivity()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff',// 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取店铺活动信息
|
||||
*/
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.list-cell {
|
||||
position: relative;
|
||||
margin: 20rpx 20rpx 0;
|
||||
background: white;
|
||||
// background: white;
|
||||
border-radius: 10rpx;
|
||||
height: 144rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
.bill-name {
|
||||
font-size: 36rpx;
|
||||
color: #373c40;
|
||||
// color: #373c40;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@@ -82,4 +82,25 @@
|
||||
100% {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.list-cell{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.bill-name{
|
||||
color:#373c40;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.list-cell{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.bill-name{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ import JxEmpty from '@/components/jx-empty/jx-empty.vue'
|
||||
import { store } from '@/store'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { Ref, ref } from 'vue'
|
||||
import { computed, Ref, ref } from 'vue'
|
||||
|
||||
interface BillListType {
|
||||
billName: string
|
||||
@@ -60,6 +60,8 @@ onLoad((options) => {
|
||||
billList.value = JSON.parse(options?.billList)
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
|
||||
function goLatestBill(url: string, index: string | number) {
|
||||
uni.navigateTo({
|
||||
url: `/subPages/merchantChild/billDetaile/billDetaile?url=${url}&index=${index}`,
|
||||
@@ -71,6 +73,10 @@ function goLatestBill(url: string, index: string | number) {
|
||||
*/
|
||||
const newOrder = ref<boolean>(true)
|
||||
onShow(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
newOrder.value = getStorage('newBillUrl') === store.state.serveInfo.orderUrl
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<web-view
|
||||
:update-title="false"
|
||||
class="webview-background"
|
||||
:src="`https://wx.jxc4.com/billshow/${path}`"
|
||||
v-if="path !== ''"
|
||||
></web-view>
|
||||
@@ -12,9 +13,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import JxEmpty from '@/components/jx-empty/jx-empty.vue'
|
||||
import { setStorage } from '@/utils/storage'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { Ref, ref } from 'vue'
|
||||
import { store } from '@/store'
|
||||
import { setStorage,getStorage } from '@/utils/storage'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||
import { computed, Ref, ref } from 'vue'
|
||||
|
||||
const path: Ref<string> = ref('')
|
||||
onLoad((options) => {
|
||||
@@ -24,7 +26,31 @@ onLoad((options) => {
|
||||
setStorage('newBillUrl', options?.url)
|
||||
}
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: !appTheme.value ? '#ffffff' : '#000000', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<style lang="scss" scoped>
|
||||
// .webview-background{
|
||||
// background-color: #000000; /* 例如,设置为白色背景 */
|
||||
// color:#ffffff;
|
||||
// }
|
||||
// @media (prefers-color-scheme: light) {
|
||||
// .webview-background{
|
||||
// background-color: #000000;
|
||||
// color:#ffffff;
|
||||
// }
|
||||
// }
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.webview-background{
|
||||
background-color:#686767;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,7 +1,7 @@
|
||||
// 营业执照
|
||||
.business-license {
|
||||
.title {
|
||||
color: #999;
|
||||
// color: #999;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
font-weight: 400;
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
.cell {
|
||||
padding: 20rpx;
|
||||
background: white;
|
||||
// background: white;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
|
||||
display: flex;
|
||||
@@ -38,7 +38,7 @@
|
||||
.time {
|
||||
width: 200rpx;
|
||||
text-align: center;
|
||||
background: #efefef;
|
||||
// background: #efefef;
|
||||
border-radius: 8rpx;
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
@@ -57,4 +57,54 @@
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.business-license{
|
||||
background-color:#eee;
|
||||
}
|
||||
|
||||
.cell{
|
||||
background-color:#fff;
|
||||
|
||||
}
|
||||
|
||||
.time{
|
||||
background-color: #efefef;
|
||||
}
|
||||
|
||||
.title{
|
||||
color:#999;
|
||||
}
|
||||
|
||||
.cell>text,
|
||||
.cell>input,
|
||||
.licence-type,
|
||||
.darkMode{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.business-license,
|
||||
.time{
|
||||
background-color:#222;
|
||||
}
|
||||
|
||||
.cell{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.business-license,
|
||||
.title,
|
||||
.cell>text,
|
||||
.cell>input,
|
||||
.licence-type,
|
||||
.darkMode{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.item{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import merchant from "@/api/https/merchant"
|
||||
import toast from "@/utils/toast"
|
||||
import { computed, ref } from "vue"
|
||||
import { qiniuyun } from '@/utils/qiniuUploader'
|
||||
import { onLoad } from "@dcloudio/uni-app"
|
||||
import { onLoad,onReady } from "@dcloudio/uni-app"
|
||||
import { store } from "@/store"
|
||||
import { getStorage } from "@/utils/storage"
|
||||
|
||||
@@ -14,6 +14,13 @@ import { getStorage } from "@/utils/storage"
|
||||
function businessLicense() {
|
||||
const qiniuyunUploadImg = qiniuyun() // 七牛云sdk
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取营业执照信息
|
||||
@@ -213,6 +220,7 @@ function businessLicense() {
|
||||
imgChangeLicence2Image, // 上传图片
|
||||
confirmSubmit, // 提交修改
|
||||
imgUrls, // 上传的图片
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
>
|
||||
<view class="time">{{ businessData.licenceValid || '请选择' }}</view>
|
||||
</picker>
|
||||
<view class="">至</view>
|
||||
<view class="darkMode">至</view>
|
||||
<!-- 结束时间 -->
|
||||
<picker
|
||||
mode="date"
|
||||
@@ -71,6 +71,7 @@
|
||||
<jx-upload-img
|
||||
:title="'营业执照:'"
|
||||
:type="'licence'"
|
||||
:appTheme="appTheme"
|
||||
:img="imgUrls.licence"
|
||||
@imgChange="imgChangeLicence"
|
||||
></jx-upload-img>
|
||||
@@ -97,16 +98,14 @@
|
||||
>
|
||||
<view class="time">{{ businessData.licence2Valid || '请选择' }}</view>
|
||||
</picker>
|
||||
<view class="">至</view>
|
||||
<view class="darkMode">至</view>
|
||||
<!-- 结束时间 -->
|
||||
<picker
|
||||
mode="date"
|
||||
:value="businessData.licence2Expire"
|
||||
@change="fnDateChange($event, 4)"
|
||||
>
|
||||
<view class="time">{{
|
||||
businessData.licence2Expire || '请选择'
|
||||
}}</view>
|
||||
<view class="time">{{ businessData.licence2Expire || '请选择' }}</view>
|
||||
</picker>
|
||||
</view>
|
||||
</view>
|
||||
@@ -137,6 +136,7 @@ const {
|
||||
imgChangeLicence2Image, // 上传图片
|
||||
confirmSubmit, // 提交修改
|
||||
imgUrls, // 上传的图片
|
||||
appTheme
|
||||
} = businessLicense()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
.id {
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
// color: #333;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
// 评分
|
||||
.score {
|
||||
background: white;
|
||||
// background: white;
|
||||
height: 80rpx;
|
||||
border-bottom: 1rpx solid rgba(204, 204, 204, 0.4);
|
||||
display: flex;
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
.text {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
// color: #666;
|
||||
font-weight: 400;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
@@ -65,7 +65,7 @@
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
padding: 30rpx 20rpx 40rpx;
|
||||
background: white;
|
||||
// background: white;
|
||||
text-indent: 2em;
|
||||
text-align: justify;
|
||||
}
|
||||
@@ -73,7 +73,7 @@
|
||||
// tag
|
||||
.tag {
|
||||
padding: 20rpx;
|
||||
background: white;
|
||||
// background: white;
|
||||
|
||||
.span {
|
||||
display: inline-block;
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
<!-- 评论 -->
|
||||
<view class="comment-text">
|
||||
<!-- 图片 -->
|
||||
<view v-if="comment.msg && JSON.parse(comment.msg).comment_pictures" style="display: flex;overflow-x:auto;margin-bottom: 20rpx;">
|
||||
<view v-if="commentMsg" style="display: flex;overflow-x:auto;margin-bottom: 20rpx;" >
|
||||
<img
|
||||
v-for="(item,index) in (JSON.parse(comment.msg).comment_pictures).split(',')"
|
||||
:key="index"
|
||||
@@ -56,12 +56,8 @@
|
||||
>
|
||||
</view>
|
||||
|
||||
<text v-if="comment.status === 0">{{
|
||||
comment.score4Content ? comment.score4Content : '暂无评价'
|
||||
}}</text>
|
||||
<text v-else user-select>{{
|
||||
comment.updatedScoreContent ? comment.updatedScoreContent : '暂无评价'
|
||||
}}</text>
|
||||
<text v-if="comment.status === 0">{{ comment.score4Content ? comment.score4Content : '暂无评价' }}</text>
|
||||
<text v-else user-select>{{ comment.updatedScoreContent ? comment.updatedScoreContent : '暂无评价' }}</text>
|
||||
</view>
|
||||
<!-- tag -->
|
||||
<view class="tag" v-show="venderTags.length > 0">
|
||||
@@ -147,6 +143,10 @@ const emit = defineEmits<{
|
||||
(e: 'TapMsg'): void
|
||||
}>()
|
||||
|
||||
const commentMsg = computed(() => {
|
||||
return props.comment.msg && JSON.parse(props.comment.msg).comment_pictures
|
||||
})
|
||||
|
||||
/**
|
||||
* 点击订单内容
|
||||
*/
|
||||
@@ -164,9 +164,9 @@ function moveToOrderDetail() {
|
||||
/**
|
||||
* 预览图片
|
||||
*/
|
||||
function previewImg(skuNameArr:Array<string>,index:number) {
|
||||
function previewImg(skuNameArr:Array<string>,index:number | string) {
|
||||
let arr = skuNameArr.map(item => item.includes('https') ? item : item.replace('http','https') )
|
||||
previewImage(arr,index)
|
||||
previewImage(arr,+index)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -281,4 +281,34 @@ function positive($num: number) {
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './commentList.scss';
|
||||
@media (prefers-color-scheme: light) {
|
||||
.score,
|
||||
.comment-text,
|
||||
.tag{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.id{
|
||||
color:#333;
|
||||
}
|
||||
|
||||
.score>.text{
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.score
|
||||
.comment-text,
|
||||
.tag{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.id,
|
||||
.score>.text,
|
||||
.comment-text>text,
|
||||
.tag>.text{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<tabs :commentNumber="badCommentCount" @switchTab="switchTab"></tabs>
|
||||
<tabs :commentNumber="badCommentCount" @switchTab="switchTab" :appTheme = "appTheme"></tabs>
|
||||
<scroll-view
|
||||
style="height: calc(100vh - 94rpx)"
|
||||
scroll-y
|
||||
@@ -28,12 +28,13 @@
|
||||
<script lang="ts" setup>
|
||||
import commentList from './commentList/commentList.vue'
|
||||
import tabs from './tabs/tabs.vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ref, Ref } from 'vue'
|
||||
import { onLoad,onReady } from '@dcloudio/uni-app'
|
||||
import { computed, ref, Ref } from 'vue'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { jxNextPage } from '@/utils/tools'
|
||||
import merchant from "@/api/https/merchant"
|
||||
import { store } from '@/store'
|
||||
/**
|
||||
* 评价数量
|
||||
*/
|
||||
@@ -43,6 +44,14 @@ onLoad(async (options) => {
|
||||
await getComment()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 切换tab
|
||||
*/
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: currentStatus === 0 }"
|
||||
:style="{'color':currentStatus === 0 ? '#4eb331' : appTheme ? '' : '#ffffff'}"
|
||||
@tap="handleClick(0)"
|
||||
>
|
||||
待处理差评({{ commentNumber }})
|
||||
@@ -11,6 +12,7 @@
|
||||
<view
|
||||
class="tab-item"
|
||||
:class="{ active: currentStatus === 1 }"
|
||||
:style="{'color':currentStatus === 1 ? '#4eb331' : appTheme ? '' : '#ffffff'}"
|
||||
@tap="handleClick(1)"
|
||||
>
|
||||
全部评价
|
||||
@@ -30,7 +32,8 @@ import { ref, Ref } from 'vue'
|
||||
* props
|
||||
*/
|
||||
interface NumberType {
|
||||
commentNumber: number
|
||||
commentNumber: number,
|
||||
appTheme:boolean
|
||||
}
|
||||
defineProps<NumberType>()
|
||||
|
||||
@@ -84,4 +87,16 @@ function handleClick(index: number) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.tabs{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.tabs{
|
||||
background-color:#000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,3 +1,32 @@
|
||||
<template>
|
||||
<web-view src="https://wx.jxc4.com/helpcenter"></web-view>
|
||||
</template>
|
||||
<web-view src="https://wx.jxc4.com/helpcenter" class="webview-background"></web-view>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { store } from '@/store';
|
||||
import { onReady } from '@dcloudio/uni-app';
|
||||
import { computed } from 'vue';
|
||||
import { getStorage } from '@/utils/storage'
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@media (prefers-color-scheme: light) {
|
||||
.webview-background{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.webview-background{
|
||||
background-color:#686767;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -55,7 +55,7 @@
|
||||
</picker>
|
||||
|
||||
</view>
|
||||
<button size="mini" class="query-button" @tap="queryInvoice" style="height: 50rpx;line-height: 50rpx;font-size: 30rpx;">查询</button>
|
||||
<button size="mini" class="query-button" @tap="queryInvoice('all')" style="height: 50rpx;line-height: 50rpx;font-size: 30rpx;">查询</button>
|
||||
</view>
|
||||
|
||||
<view style="margin-top: 20px;">
|
||||
@@ -124,6 +124,7 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<jx-empty v-if="invoiceList.length ===0 && invoiceListEB.length === 0" title="暂无发票申请" />
|
||||
|
||||
<uni-popup ref="popupDialog" type="top">
|
||||
<view class="jx-popup-update" >
|
||||
@@ -154,7 +155,8 @@
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
|
||||
|
||||
|
||||
<!-- 公共组件 -->
|
||||
<jx-loading />
|
||||
|
||||
@@ -162,10 +164,10 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { store } from '@/store'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { onLoad, onReady, onShow } from '@dcloudio/uni-app';
|
||||
import order from '@/api/https/order'
|
||||
import { getStorage } from '@/utils/storage';
|
||||
import { ref } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { clearList, timeFormatD } from "@/utils/tools";
|
||||
import toast from '@/utils/toast';
|
||||
import merchant from '@/api/https/merchant';
|
||||
@@ -182,20 +184,28 @@
|
||||
const invoiceId = ref('') // 发票id
|
||||
const invoiceImg = ref('') // 发票图片地址
|
||||
const qiniuyunUploadImg = qiniuyun() // 七牛云sdk
|
||||
|
||||
const ebStoreInfo = ref<AnyObject>()
|
||||
|
||||
onLoad(async() => {
|
||||
if(store.getters['storeInfo/imMtStatus'] && store.getters['storeInfo/imMtStatus'].length>0) queryInvoice('mt') // 存在美团门店
|
||||
|
||||
if(store.getters['storeInfo/platformInfo'] && store.getters['storeInfo/platformInfo'].length>0){
|
||||
let findItem = store.getters['storeInfo/platformInfo'].filter((item:AnyObject) => item.vendorID === 3)
|
||||
if(JSON.stringify(findItem) !== '{}') queryInvoice('eb',findItem[0])
|
||||
if(JSON.stringify(findItem) !== '{}') {
|
||||
ebStoreInfo.value = findItem[0]
|
||||
queryInvoice('eb',findItem[0])
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// uni.getSystemInfoSync().platform == 'ios'
|
||||
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 上传发票图片
|
||||
*/
|
||||
@@ -301,7 +311,7 @@
|
||||
* 查询发票信息
|
||||
*/
|
||||
const queryInvoice = async (type:string,ebStore?:any) => {
|
||||
if(type === 'mt'){
|
||||
if(type === 'mt' || type === 'all'){
|
||||
let data:AnyObject = {
|
||||
storeId: getStorage('storeID'),
|
||||
startTime: fromTime.value + ' 00:00:00',
|
||||
@@ -311,6 +321,7 @@
|
||||
}
|
||||
let res = await order.query_mt_invoice(data)
|
||||
if(res.code === '0') invoiceList.value = res.data.data
|
||||
if(ebStoreInfo.value && type === 'all') queryInvoice('eb')
|
||||
}else if(type === 'eb'){
|
||||
let res = await order.get_invoice_info({
|
||||
vendorId:'3',
|
||||
@@ -328,7 +339,7 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15rpx 0;
|
||||
background-color: #fafafa;
|
||||
// background-color: #fafafa;
|
||||
border-top: 1rpx solid #e2e2e2;
|
||||
border-bottom: 1rpx solid #e2e2e2;
|
||||
font-size: 28rpx;
|
||||
@@ -506,4 +517,25 @@
|
||||
border-radius: 15rpx;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.time-root{
|
||||
background-color:#fafafa;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.time-root{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #222;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -13,6 +13,8 @@
|
||||
background-size: contain;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.list-item {
|
||||
background: white;
|
||||
padding: 20rpx;
|
||||
@@ -25,6 +27,15 @@
|
||||
0 17rpx 2rpx -6rpx rgba(black, .2);
|
||||
}
|
||||
|
||||
|
||||
// .darkMode{
|
||||
// box-shadow: 0 1rpx 1rpx rgba(white, .2),
|
||||
// 0 8rpx 0 -3rpx black,
|
||||
// 0 9rpx 1rpx -3rpx rgba(white, .2),
|
||||
// 0 16rpx 0 -6rpx black,
|
||||
// 0 17rpx 2rpx -6rpx rgba(white, .2);
|
||||
// }
|
||||
|
||||
.new-icon,
|
||||
.old-icon {
|
||||
width: 90rpx;
|
||||
@@ -58,7 +69,7 @@
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
color: #333;
|
||||
// color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
@@ -81,4 +92,37 @@
|
||||
100% {
|
||||
transform: scale3d(1, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.list-item{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.old-icon{
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.title{
|
||||
color:#333;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.list-item{
|
||||
background-color:#000;
|
||||
box-shadow: 0 1rpx 1rpx rgba(white, .2),
|
||||
0 8rpx 0 -3rpx black,
|
||||
0 9rpx 1rpx -3rpx rgba(white, .2),
|
||||
0 16rpx 0 -6rpx black,
|
||||
0 17rpx 2rpx -6rpx rgba(white, .2);
|
||||
}
|
||||
|
||||
.old-icon{
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.title{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,19 @@
|
||||
<template>
|
||||
<view class="list">
|
||||
<text class="list-title">一周内的消息通知</text>
|
||||
<view v-for="item in msgList" :key="item.id" v-if="msgList.length != 0">
|
||||
<view class="list-item" @tap="moveToDetail(item.messageID, item.id)">
|
||||
<view class="content">
|
||||
<div class="new-icon" v-if="item.readCount === 0">新消息</div>
|
||||
<div class="old-icon" v-else>已查看</div>
|
||||
<div class="title">{{ item.title }}</div>
|
||||
<template v-if="msgList.length != 0">
|
||||
<view v-for="item in msgList" :key="item.id" >
|
||||
<view class="list-item" @tap="moveToDetail(item.messageID, item.id)" :class="{'darkMode':!appTheme}">
|
||||
<view class="content">
|
||||
<div class="new-icon" v-if="item.readCount === 0">新消息</div>
|
||||
<div class="old-icon" v-else>已查看</div>
|
||||
<div class="title">{{ item.title }}</div>
|
||||
</view>
|
||||
<div class="create-time">{{ timeFormatHMS(item.createdAt) }}</div>
|
||||
</view>
|
||||
<div class="create-time">{{ timeFormatHMS(item.createdAt) }}</div>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<jx-empty title="暂无消息通知" v-else />
|
||||
</view>
|
||||
|
||||
@@ -22,9 +25,10 @@
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { timeFormatD, timeFormatHMS } from '@/utils/tools'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { onShow,onReady } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import merchant from '@/api/https/merchant'
|
||||
import { store } from '@/store'
|
||||
|
||||
/**
|
||||
* 获取信息列表
|
||||
@@ -48,6 +52,15 @@ const msgList = ref<Array<MsgListType>>([
|
||||
onShow(async () => {
|
||||
await getMessageData()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
async function getMessageData() {
|
||||
let data = {
|
||||
storeIDs: JSON.stringify([+getStorage('storeID')]),
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<view class="msg-page">
|
||||
<view class="cell">
|
||||
<jx-icon icon="xinxi"></jx-icon>
|
||||
<jx-icon icon="xinxi" :color="appTheme ? '#000': '#fff'"></jx-icon>
|
||||
<text class="text">{{ msgData.title }}</text>
|
||||
</view>
|
||||
<view class="cell">
|
||||
<jx-icon icon="shijian"></jx-icon>
|
||||
<jx-icon icon="shijian" :color="appTheme ? '#000': '#fff'"></jx-icon>
|
||||
<text class="text">{{ timeFormatHMS(msgData.createdAt) }}</text>
|
||||
</view>
|
||||
<view class="content">
|
||||
@@ -26,9 +26,11 @@
|
||||
<script lang="ts" setup>
|
||||
import toast from '@/utils/toast'
|
||||
import { timeFormatHMS } from '@/utils/tools'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { ref } from 'vue'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
import merchant from '@/api/https/merchant'
|
||||
import { store } from '@/store'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
|
||||
const messageID = ref<number>(0)
|
||||
const id = ref<number>(0)
|
||||
@@ -38,6 +40,14 @@ onLoad(async (options) => {
|
||||
await GetStoreMessages()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取信息详情
|
||||
*/
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
margin-bottom: 10rpx;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
border-bottom: 1rpx solid #e5e5e5;
|
||||
background: white;
|
||||
// background: white;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -73,7 +73,7 @@
|
||||
margin-bottom: 10rpx;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
border-bottom: 1rpx solid #e5e5e5;
|
||||
background: white;
|
||||
// background: white;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -145,4 +145,16 @@
|
||||
/* 移动元素的动画 */
|
||||
.fade-move {
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.common{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.common{
|
||||
background-color:#111;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +1,75 @@
|
||||
<template>
|
||||
<jx-empty title="未获取到调价包" v-if="empty" />
|
||||
<view v-else>
|
||||
<view v-show="!showmodal">
|
||||
<view class="price-value" v-for="(item, i) in pricePack" :key="i">
|
||||
<view class="price-item">
|
||||
<view class="s1 common">
|
||||
<text>开始价格:</text>
|
||||
<text class="num">¥{{ item.beginPrice / 100 }}</text>
|
||||
</view>
|
||||
<view class="s2 common">
|
||||
<text>提高:</text>
|
||||
<text class="num">{{ item.pricePercentage }}%</text>
|
||||
</view>
|
||||
<view class="s3 common">
|
||||
<text>再加:</text>
|
||||
<text class="num">{{ item.priceAdd ? item.priceAdd : 0 }}</text>
|
||||
<jx-empty title="未获取到调价包" v-if="empty" />
|
||||
<view v-else>
|
||||
<view v-show="!showmodal">
|
||||
<view class="price-value" v-for="(item, i) in pricePack" :key="i">
|
||||
<view class="price-item" >
|
||||
<view class="s1 common">
|
||||
<text>开始价格:</text>
|
||||
<text class="num">¥{{ item.beginPrice / 100 }}</text>
|
||||
</view>
|
||||
<view class="s2 common">
|
||||
<text>提高:</text>
|
||||
<text class="num">{{ item.pricePercentage }}%</text>
|
||||
</view>
|
||||
<view class="s3 common">
|
||||
<text>再加:</text>
|
||||
<text class="num">{{ item.priceAdd ? item.priceAdd : 0 }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="btn" @tap="isShowmodal">修改</button>
|
||||
</view>
|
||||
<button class="btn" @tap="isShowmodal">修改</button>
|
||||
</view>
|
||||
|
||||
<view class="modal" v-show="showmodal">
|
||||
<view class="price-value" v-for="(price, index) in current" :key="index">
|
||||
<view class="price-item">
|
||||
<view class="news1 common">
|
||||
<text>开始价格:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt"
|
||||
v-model="price.beginPrice"
|
||||
/>¥
|
||||
<view class="modal" v-show="showmodal">
|
||||
<view class="price-value" v-for="(price, index) in current" :key="index">
|
||||
<view class="price-item">
|
||||
<view class="news1 common">
|
||||
<text>开始价格:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt"
|
||||
v-model="price.beginPrice"
|
||||
/>¥
|
||||
</view>
|
||||
<view class="news2 common">
|
||||
<text>提高:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt"
|
||||
v-model="price.pricePercentage"
|
||||
/>%
|
||||
</view>
|
||||
<view class="news3 common">
|
||||
<text>再加:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt3"
|
||||
v-model="price.priceAdd"
|
||||
/>¥
|
||||
</view>
|
||||
<jx-icon
|
||||
class="icon-x common"
|
||||
icon="shanchu"
|
||||
@tap="delrow(price.id, index)"
|
||||
color="rgb(230, 3, 3)"
|
||||
></jx-icon>
|
||||
</view>
|
||||
<view class="news2 common">
|
||||
<text>提高:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt"
|
||||
v-model="price.pricePercentage"
|
||||
/>%
|
||||
</view>
|
||||
<view class="news3 common">
|
||||
<text>再加:</text>
|
||||
<input
|
||||
type="number"
|
||||
class="num num-ipt3"
|
||||
v-model="price.priceAdd"
|
||||
/>¥
|
||||
</view>
|
||||
<jx-icon
|
||||
class="icon-x common"
|
||||
icon="shanchu"
|
||||
@tap="delrow(price.id, index)"
|
||||
color="rgb(230, 3, 3)"
|
||||
></jx-icon>
|
||||
</view>
|
||||
<view class="btn-group">
|
||||
<button size="mini" class="btn2" @tap="showmodal = false">取消</button>
|
||||
<button size="mini" class="btn2" @tap="add">添加区间</button>
|
||||
<button size="mini" class="btn2 btn-update" @tap="confirm">修改</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-group">
|
||||
<button size="mini" class="btn2" @tap="showmodal = false">取消</button>
|
||||
<button size="mini" class="btn2" @tap="add">添加区间</button>
|
||||
<button size="mini" class="btn2 btn-update" @tap="confirm">修改</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公共组件 -->
|
||||
<jx-loading />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad,onReady } from '@dcloudio/uni-app'
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
import jxEmpty from '@/components/jx-empty/jx-empty.vue'
|
||||
import jxIcon from '@/components/jx-icon/jx-icon.vue'
|
||||
@@ -88,6 +88,14 @@ onLoad(async (options) => {
|
||||
await getConfig()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取调价包
|
||||
*/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.select-root {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
padding: 10rpx 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
|
||||
.business-status {
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
|
||||
.business-text {
|
||||
@@ -78,11 +78,11 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 15rpx 0;
|
||||
background-color: #fafafa;
|
||||
// background-color: #fafafa;
|
||||
border-top: 1rpx solid #e2e2e2;
|
||||
border-bottom: 1rpx solid #e2e2e2;
|
||||
font-size: 28rpx;
|
||||
color: #919191;
|
||||
// color: #919191;
|
||||
|
||||
.slect-edit {
|
||||
display: flex;
|
||||
@@ -95,7 +95,7 @@
|
||||
.time-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #e6e6e6;
|
||||
// background-color: #e6e6e6;
|
||||
padding: 10rpx 20rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
@@ -146,4 +146,41 @@
|
||||
content: '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.select-root,
|
||||
.business-status{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.time-root{
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.time-root{
|
||||
color: #919191;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.select-root,
|
||||
.business-status,
|
||||
.time-root{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.all-text,
|
||||
.business-status,
|
||||
.time-root{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* 营业数据
|
||||
*/
|
||||
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad,onReady } from "@dcloudio/uni-app";
|
||||
import merchant from "@/api/https/merchant"
|
||||
import { getStorage } from "@/utils/storage";
|
||||
import toast from "@/utils/toast";
|
||||
@@ -30,6 +30,14 @@ export default function orderRealTime() {
|
||||
isUpperfif.value = JSON.parse(options!.isUpperfif)
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取平台数据-平台名称
|
||||
*/
|
||||
|
||||
@@ -146,4 +146,41 @@
|
||||
content: '-';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.select-root,
|
||||
.business-status{
|
||||
background-color:#fff;
|
||||
}
|
||||
|
||||
.time-root{
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
|
||||
.time-root{
|
||||
color: #919191;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.select-root,
|
||||
.business-status,
|
||||
.time-root{
|
||||
background-color:#000;
|
||||
}
|
||||
|
||||
.time-item{
|
||||
background-color: #111;
|
||||
}
|
||||
|
||||
.all-text,
|
||||
.business-status,
|
||||
.time-root{
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
* 营业数据
|
||||
*/
|
||||
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { onLoad, onReady } from "@dcloudio/uni-app";
|
||||
import merchant from "@/api/https/merchant"
|
||||
import { getStorage } from "@/utils/storage";
|
||||
import toast from "@/utils/toast";
|
||||
@@ -27,6 +27,13 @@ export default function orderRealTime() {
|
||||
await getToDay() // 获取今日数据
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/*************************************************
|
||||
* 平台列表数据
|
||||
|
||||
@@ -43,8 +43,8 @@
|
||||
<uni-popup ref="popup" type="center">
|
||||
<view class="jx-popup-update">
|
||||
<text class="text">{{currentValue === storeInfo.payeeName ? '收款信息':'验证收款人信息'}}</text>
|
||||
<input class="ipt" v-if="currentValue !== storeInfo.payeeName" v-model="currentValue" placeholder="请输入完整的姓名"/>
|
||||
|
||||
<input class="ipt" v-if="!isDisplayComInfo" v-model="currentValue" placeholder="请输入完整的姓名"/>
|
||||
|
||||
<view class="tip" v-else>
|
||||
<!-- 收款人姓名 -->
|
||||
<view class="item">
|
||||
@@ -71,8 +71,10 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btn-root" v-if="currentValue === storeInfo.payeeName">
|
||||
<view class="btn-ok" @tap="copyInfoAllText">复制</view>
|
||||
<view class="btn-root" >
|
||||
<view class="btn-ok" @tap="copyInfoAllText" v-if="isDisplayComInfo">复制</view>
|
||||
<view class="btn-esc" @tap="closePopup">{{ isDisplayComInfo ? '关闭' : '取消'}}</view>
|
||||
<view class="btn-ok" v-if="!isDisplayComInfo" @tap="sureStockOrCode">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</uni-popup>
|
||||
@@ -81,14 +83,30 @@
|
||||
<script lang="ts" setup >
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc'
|
||||
import { store } from '@/store'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { ref } from 'vue'
|
||||
import { onReady } from '@dcloudio/uni-app'
|
||||
import { computed, ref } from 'vue'
|
||||
const { copyInfo, previewImage } = useGlobalFunc()
|
||||
|
||||
const storeInfo = store.state.storeInfo.allStoreInfo
|
||||
|
||||
const popup = ref()
|
||||
const currentValue = ref('')
|
||||
const isDisplayComInfo = ref<boolean>(false)
|
||||
|
||||
function sureStockOrCode() {
|
||||
if(currentValue.value !== storeInfo.payeeName) toast('校验失败',2)
|
||||
else{
|
||||
isDisplayComInfo.value = true
|
||||
}
|
||||
}
|
||||
|
||||
function closePopup() {
|
||||
popup.value.close()
|
||||
isDisplayComInfo.value = false
|
||||
currentValue.value = ""
|
||||
}
|
||||
|
||||
/**
|
||||
* 复制所有信息
|
||||
@@ -99,6 +117,14 @@
|
||||
popup.value.close()
|
||||
}
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 隐藏收款人信息
|
||||
*/
|
||||
@@ -162,7 +188,7 @@
|
||||
.jx-popup-update {
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
// border-radius: 0 0 15rpx 15rpx;
|
||||
border-radius: 15rpx;
|
||||
|
||||
@@ -191,6 +217,7 @@
|
||||
justify-content: space-between;
|
||||
margin: 40rpx 0 0rpx 0;
|
||||
|
||||
.btn-esc,
|
||||
.btn-ok {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
@@ -202,6 +229,23 @@
|
||||
color: #fff;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.btn-esc {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.jx-popup-update{
|
||||
background-color:#fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.jx-popup-update{
|
||||
background-color:#222;
|
||||
color:#fff
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -19,7 +19,7 @@
|
||||
flex-shrink: 0;
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
border: 1rpx solid #efefef;
|
||||
// border: 1rpx solid #efefef;
|
||||
border-radius: 10rpx;
|
||||
opacity: 1;
|
||||
transition: all 0.5s;
|
||||
@@ -36,7 +36,7 @@
|
||||
.onlineStatus{
|
||||
margin: 20rpx;
|
||||
height: 120rpx;
|
||||
background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
// background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
border-top-right-radius: 20rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
@@ -82,3 +82,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.onlineStatus{
|
||||
background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
}
|
||||
|
||||
.logo>.icon{
|
||||
border: 1rpx solid #efefef;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.onlineStatus{
|
||||
background:linear-gradient(180deg, #7b7878, #bdbdbd);
|
||||
}
|
||||
|
||||
.logo>.icon{
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref,computed } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||
import { store } from '@/store'
|
||||
import configCms from '@/utils/configCms'
|
||||
import merchant from '@/api/https/merchant';
|
||||
@@ -63,6 +63,15 @@
|
||||
if(vendorInfo.value.vendorID === 1 ) businessStatusList.value = businessStatusList.value.filter(item => item.id!==-2)
|
||||
})
|
||||
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 平台名字
|
||||
*/
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<view v-if="storeMaps.length != 0">
|
||||
<template v-for="item in storeMaps" :key="item.vendorStoreID">
|
||||
<view class="cell" @tap="platformManager(item)">
|
||||
<template v-for="item in storeMaps" :key="item.vendorStoreID" >
|
||||
<view class="cell" @tap="platformManager(item)" :style="{'background-color':appTheme ? '': '#111111'}">
|
||||
<view class="left">
|
||||
<view class="vendor">
|
||||
<text :class="`icon icon-${item.vendorID}`"></text>
|
||||
<view class="vendor-name">
|
||||
<view class="vendor-name" :style="{'color':appTheme ? '' : '#ffffff'}">
|
||||
<view>{{
|
||||
vendorName[item.vendorID]
|
||||
? vendorName[item.vendorID]
|
||||
@@ -34,6 +34,7 @@
|
||||
v-if="!earningType"
|
||||
class="btn2"
|
||||
size="mini"
|
||||
:style="{'background-color':appTheme ? '' : '#222222','color':appTheme ? '' : '#ffffff'}"
|
||||
@tap.stop="openPricePack(item)"
|
||||
>
|
||||
加价比例
|
||||
@@ -43,13 +44,13 @@
|
||||
</template>
|
||||
</view>
|
||||
<jx-empty title="您还没有开通任何店铺哟" v-else />
|
||||
|
||||
|
||||
<!-- 公共组件 -->
|
||||
<jx-loading />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad,onReady } from '@dcloudio/uni-app'
|
||||
import merchant from '@/api/https/merchant'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import { computed, ref } from 'vue'
|
||||
@@ -61,6 +62,14 @@ onLoad(async () => {
|
||||
await getStoreInfo()
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取店铺数据
|
||||
*/
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
.storeStatus{
|
||||
margin: 20rpx;
|
||||
height: 220rpx;
|
||||
background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
// background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
border-top-right-radius: 20rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
@@ -126,4 +126,24 @@
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.storeStatus{
|
||||
background:linear-gradient(180deg, #a4e8f5, #fff);
|
||||
}
|
||||
|
||||
.time{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.storeStatus{
|
||||
background:linear-gradient(180deg, #7b7878, #bdbdbd);
|
||||
}
|
||||
|
||||
.time{
|
||||
background-color: #888;
|
||||
}
|
||||
}
|
||||
@@ -1,207 +0,0 @@
|
||||
import { computed, ref } from 'vue'
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import { getStorage } from '@/utils/storage';
|
||||
import merchant from '@/api/https/merchant';
|
||||
import { timeFormatD } from "@/utils/tools";
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc';
|
||||
import { store } from '@/store'
|
||||
import toast from "@/utils/toast";
|
||||
export default {
|
||||
setup() {
|
||||
const businessStatusList = ref([
|
||||
{ id: 1, name: '营业' },
|
||||
{ id: 0, name: '临时休息' },
|
||||
{ id: -1, name: '休息' }
|
||||
// { id: -2, name: '禁用' },
|
||||
])
|
||||
const businessHours = ref<AnyObject>({}) // 营业时间段
|
||||
const businessStatus = ref(1) // 营业状态,默认营业
|
||||
const newAutoEnableAt = ref<string>('')
|
||||
const popupTime = ref() // 临时休息的时间弹框
|
||||
const dayList = ref(["休息到明天", "休息到后天"]); // 临时休息时间段
|
||||
const currentTime = ref(0)
|
||||
const storeName = ref('') // 门店名称
|
||||
const logoUrl = ref('https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png')
|
||||
|
||||
const { isTxd } = useGlobalFunc()
|
||||
|
||||
onLoad(async () => {
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
if (getStorage('terrace') === 'jxgy') logoUrl.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
else if (getStorage('terrace') === 'gblm') logoUrl.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
await getStores()
|
||||
store.commit('storeInfo/jxLoadingFn', false)
|
||||
})
|
||||
|
||||
|
||||
const switchOpenTime = computed(() => {
|
||||
if (newAutoEnableAt.value) {
|
||||
let now = +new Date(timeFormatD(+new Date()));
|
||||
let time = +new Date(timeFormatD(newAutoEnableAt.value));
|
||||
let num = time - now;
|
||||
if (num < 0) {
|
||||
return "营业时间错误请联系运营";
|
||||
} else {
|
||||
let day = num / 1000 / 3600 / 24;
|
||||
if (day < 1) return "门店将在今天自动营业";
|
||||
else if (day >= 1 && day < 2) return "门店将在明天自动营业";
|
||||
else if (day >= 2 && day < 3) return "门店将在后天自动营业";
|
||||
else return `将在 ${timeFormatD(newAutoEnableAt.value)} 自动营业`;
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取门店数据
|
||||
*/
|
||||
async function getStores() {
|
||||
await store.dispatch('storeInfo/getOneStore',getStorage("storeID"))
|
||||
const stateData = store.state.storeInfo.allStoreInfo
|
||||
storeName.value = stateData.name // 门店名
|
||||
businessStatus.value = stateData.status // 营业状态
|
||||
newAutoEnableAt.value = stateData.autoEnableAt // 手机门店休息时间
|
||||
businessHours.value = store.getters['storeInfo/businessHours'] // 营业时间
|
||||
}
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 去修改营业时间
|
||||
*/
|
||||
function setTime() {
|
||||
uni.navigateTo({ url: `/subPages/merchantChild/setBusinessTime/setBusinessTime` })
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* 修改营业状态
|
||||
*/
|
||||
function setStatus(item: AnyObject) {
|
||||
if (item.id === businessStatus.value) return
|
||||
// console.log('修改营业状态', item)
|
||||
|
||||
if (item.id === 1) {
|
||||
uni.jxConfirm({
|
||||
title: '提示',
|
||||
content: '确定要将此门店设置为营业吗?',
|
||||
success: async () => {
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: 1,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
setTxdIngState(1)
|
||||
newAutoEnableAt.value = ''
|
||||
toast("操作成功", 1)
|
||||
// state.value = 1;
|
||||
// businessStatus.value = item.id
|
||||
await getStores()
|
||||
// uni.navigateBack()
|
||||
},
|
||||
})
|
||||
} else if (item.id === 0) {
|
||||
// console.log('设置门店为临时休息')
|
||||
popupTime.value.open()
|
||||
// businessStatus.value = item.id
|
||||
} else if (item.id === -1) {
|
||||
uni.jxConfirm({
|
||||
title: '提示',
|
||||
content: '确定要将此门店设置为休息吗?',
|
||||
success: async () => {
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: -1,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
setTxdIngState(-1)
|
||||
newAutoEnableAt.value = ''
|
||||
// businessStatus.value = item.id
|
||||
toast("操作成功", 1)
|
||||
await getStores()
|
||||
// uni.navigateBack()
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置第三方平台
|
||||
*/
|
||||
async function setTxdIngState(type: number) {
|
||||
if (isTxd()) {
|
||||
let data = {
|
||||
vendorOrgCode: 34402634,
|
||||
txdStores: JSON.stringify({
|
||||
flag: [1],
|
||||
txdStoreID: `JX${getStorage('storeID')}`,
|
||||
status: type
|
||||
})
|
||||
}
|
||||
await merchant.update_txd_store(data)
|
||||
}
|
||||
|
||||
// 更新线上平台的营业状态
|
||||
let arr = store.state.storeInfo.allStoreInfo.StoreMaps.map((item: AnyObject) => {
|
||||
if (item.isSync) return item.vendorID + ''
|
||||
})
|
||||
|
||||
arr = arr.filter((item: string) => item !== '9')
|
||||
if (arr.length > 0) {
|
||||
let data = {
|
||||
storeID: getStorage('storeID'),
|
||||
vendorIDs: arr.join(','),
|
||||
status: type
|
||||
}
|
||||
await merchant.update_vendors_store_states(data);
|
||||
}
|
||||
// uni.navigateBack()
|
||||
}
|
||||
|
||||
async function storeRest() {
|
||||
let autoEnableAt = currentTime.value
|
||||
? timeFormatD(+new Date() + 2 * 24 * 3600 * 1000)
|
||||
: timeFormatD(+new Date() + 1 * 24 * 3600 * 1000)
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: 0,
|
||||
autoEnableAt,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
setTxdIngState(0)
|
||||
toast("操作成功", 1);
|
||||
popupTime.value.close()
|
||||
businessStatus.value = 0;
|
||||
newAutoEnableAt.value = autoEnableAt
|
||||
getStores()
|
||||
}
|
||||
|
||||
function radioChange(e: any) {
|
||||
let findIndex = dayList.value.findIndex(item => item === e.detail.value)
|
||||
if (findIndex !== -1) currentTime.value = findIndex
|
||||
}
|
||||
|
||||
return {
|
||||
businessStatusList, // 营业时间列表
|
||||
businessHours, // 营业时间段
|
||||
businessStatus, // 营业状态
|
||||
switchOpenTime, // 临时休息 多久后自动回复营业
|
||||
setTime, // 去修改营业时间
|
||||
setStatus, // 修改营业状态
|
||||
popupTime, // 临时休息的时间弹框
|
||||
dayList, // 临时休息时间段
|
||||
currentTime, // 临时休息时间 动态index
|
||||
storeRest, // 临时休息的时间弹框 确认
|
||||
radioChange, // 临时休息的时间弹框 change事件
|
||||
storeName, // 门店名
|
||||
logoUrl // logoUrl
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
<view class="time">
|
||||
<view v-for="(item,index) in businessStatusList" :key="index"
|
||||
class="timeItem"
|
||||
:class="{'disabledColor':businessStatus === item.id}"
|
||||
:class="{disabledColor:businessStatus === item.id}"
|
||||
@tap="setStatus(item)">
|
||||
<jx-icon
|
||||
v-if="businessStatus === item.id"
|
||||
@@ -32,7 +32,8 @@
|
||||
:size="38"
|
||||
color="#fff"
|
||||
></jx-icon>
|
||||
{{ item.id === 1 && businessStatus === item.id && item.id!==0?'营业中':item.name }}
|
||||
<!-- item.id === 1 && businessStatus === item.id && item.id !==0 -->
|
||||
{{ item.id === 1 && businessStatus === item.id ? '营业中':item.name }}
|
||||
<text v-if="item.id === -1">(不推荐)</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -67,7 +68,221 @@
|
||||
<jx-loading />
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./setBusinessStatus" >
|
||||
<script lang="ts" setup >
|
||||
import { computed, ref } from 'vue'
|
||||
import { onLoad,onReady } from "@dcloudio/uni-app";
|
||||
import { getStorage } from '@/utils/storage';
|
||||
import merchant from '@/api/https/merchant';
|
||||
import { timeFormatD } from "@/utils/tools";
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc';
|
||||
import { store } from '@/store'
|
||||
import toast from "@/utils/toast";
|
||||
// export default {
|
||||
// setup() {
|
||||
const businessStatusList = ref([
|
||||
{ id: 1, name: '营业' },
|
||||
{ id: 0, name: '临时休息' },
|
||||
{ id: -1, name: '休息' }
|
||||
// { id: -2, name: '禁用' },
|
||||
])
|
||||
const businessHours = ref<AnyObject>({}) // 营业时间段
|
||||
const businessStatus = ref(1) // 营业状态,默认营业
|
||||
const newAutoEnableAt = ref<string>('')
|
||||
const popupTime = ref() // 临时休息的时间弹框
|
||||
const dayList = ref(["休息到明天", "休息到后天"]); // 临时休息时间段
|
||||
const currentTime = ref(0)
|
||||
const storeName = ref('') // 门店名称
|
||||
const logoUrl = ref('https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png')
|
||||
|
||||
// const { isTxd } = useGlobalFunc()
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
onLoad(async () => {
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
if (getStorage('terrace') === 'jxgy') logoUrl.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
else if (getStorage('terrace') === 'gblm') logoUrl.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
await getStores()
|
||||
store.commit('storeInfo/jxLoadingFn', false)
|
||||
})
|
||||
|
||||
|
||||
const switchOpenTime = computed(() => {
|
||||
if (newAutoEnableAt.value) {
|
||||
let now = +new Date(timeFormatD(+new Date()));
|
||||
let time = +new Date(timeFormatD(newAutoEnableAt.value));
|
||||
let num = time - now;
|
||||
if (num < 0) {
|
||||
return "营业时间错误请联系运营";
|
||||
} else {
|
||||
let day = num / 1000 / 3600 / 24;
|
||||
if (day < 1) return "门店将在今天自动营业";
|
||||
else if (day >= 1 && day < 2) return "门店将在明天自动营业";
|
||||
else if (day >= 2 && day < 3) return "门店将在后天自动营业";
|
||||
else return `将在 ${timeFormatD(newAutoEnableAt.value)} 自动营业`;
|
||||
}
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* 获取门店数据
|
||||
*/
|
||||
async function getStores() {
|
||||
await store.dispatch('storeInfo/getOneStore',getStorage("storeID"))
|
||||
const stateData = store.state.storeInfo.allStoreInfo
|
||||
storeName.value = stateData.name // 门店名
|
||||
businessStatus.value = stateData.status // 营业状态
|
||||
newAutoEnableAt.value = stateData.autoEnableAt // 手机门店休息时间
|
||||
businessHours.value = store.getters['storeInfo/businessHours'] // 营业时间
|
||||
}
|
||||
|
||||
|
||||
/*************************************************
|
||||
* 去修改营业时间
|
||||
*/
|
||||
function setTime() {
|
||||
uni.navigateTo({ url: `/subPages/merchantChild/setBusinessTime/setBusinessTime` })
|
||||
}
|
||||
|
||||
/*************************************************
|
||||
* 修改营业状态
|
||||
*/
|
||||
function setStatus(item: AnyObject) {
|
||||
if (item.id === businessStatus.value) return
|
||||
// console.log('修改营业状态', item)
|
||||
|
||||
if (item.id === 1) {
|
||||
uni.jxConfirm({
|
||||
title: '提示',
|
||||
content: '确定要将此门店设置为营业吗?',
|
||||
success: async () => {
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: 1,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
// setTxdIngState(1)
|
||||
newAutoEnableAt.value = ''
|
||||
toast("操作成功", 1)
|
||||
// state.value = 1;
|
||||
// businessStatus.value = item.id
|
||||
await getStores()
|
||||
// uni.navigateBack()
|
||||
},
|
||||
})
|
||||
} else if (item.id === 0) {
|
||||
// console.log('设置门店为临时休息')
|
||||
popupTime.value.open()
|
||||
// businessStatus.value = item.id
|
||||
} else if (item.id === -1) {
|
||||
uni.jxConfirm({
|
||||
title: '提示',
|
||||
content: '确定要将此门店设置为休息吗?',
|
||||
success: async () => {
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: -1,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
// setTxdIngState(-1)
|
||||
newAutoEnableAt.value = ''
|
||||
// businessStatus.value = item.id
|
||||
toast("操作成功", 1)
|
||||
await getStores()
|
||||
// uni.navigateBack()
|
||||
},
|
||||
})
|
||||
} else {
|
||||
// 禁用
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * 设置第三方平台
|
||||
// */
|
||||
// async function setTxdIngState(type: number) {
|
||||
// if (isTxd()) {
|
||||
// let data = {
|
||||
// vendorOrgCode: 34402634,
|
||||
// txdStores: JSON.stringify({
|
||||
// flag: [1],
|
||||
// txdStoreID: `JX${getStorage('storeID')}`,
|
||||
// status: type
|
||||
// })
|
||||
// }
|
||||
// await merchant.update_txd_store(data)
|
||||
// }
|
||||
|
||||
// // 更新线上平台的营业状态
|
||||
// let arr = store.state.storeInfo.allStoreInfo.StoreMaps.map((item: AnyObject) => {
|
||||
// if (item.isSync) return item.vendorID + ''
|
||||
// })
|
||||
|
||||
// arr = arr.filter((item: string) => item !== '9')
|
||||
// if (arr.length > 0) {
|
||||
// let data = {
|
||||
// storeID: getStorage('storeID'),
|
||||
// vendorIDs: arr.join(','),
|
||||
// status: type
|
||||
// }
|
||||
// await merchant.update_vendors_store_states(data);
|
||||
// }
|
||||
// // uni.navigateBack()
|
||||
// }
|
||||
|
||||
async function storeRest() {
|
||||
let autoEnableAt = currentTime.value
|
||||
? timeFormatD(+new Date() + 2 * 24 * 3600 * 1000)
|
||||
: timeFormatD(+new Date() + 1 * 24 * 3600 * 1000)
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
status: 0,
|
||||
autoEnableAt,
|
||||
}),
|
||||
};
|
||||
await merchant.update_store(data);
|
||||
// setTxdIngState(0)
|
||||
toast("操作成功", 1);
|
||||
popupTime.value.close()
|
||||
businessStatus.value = 0;
|
||||
newAutoEnableAt.value = autoEnableAt
|
||||
getStores()
|
||||
}
|
||||
|
||||
function radioChange(e: any) {
|
||||
let findIndex = dayList.value.findIndex(item => item === e.detail.value)
|
||||
if (findIndex !== -1) currentTime.value = findIndex
|
||||
}
|
||||
|
||||
// return {
|
||||
// businessStatusList, // 营业时间列表
|
||||
// businessHours, // 营业时间段
|
||||
// businessStatus, // 营业状态
|
||||
// switchOpenTime, // 临时休息 多久后自动回复营业
|
||||
// setTime, // 去修改营业时间
|
||||
// setStatus, // 修改营业状态
|
||||
// popupTime, // 临时休息的时间弹框
|
||||
// dayList, // 临时休息时间段
|
||||
// currentTime, // 临时休息时间 动态index
|
||||
// storeRest, // 临时休息的时间弹框 确认
|
||||
// radioChange, // 临时休息的时间弹框 change事件
|
||||
// storeName, // 门店名
|
||||
// logoUrl // logoUrl
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
.info {
|
||||
padding: 30rpx 30rpx 60rpx 30rpx;
|
||||
box-sizing: border-box;
|
||||
background: linear-gradient(0deg, #ffe2d2, #fdf6f0);
|
||||
// background: linear-gradient(0deg, #ffe2d2, #fdf6f0);
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
box-sizing: border-box;
|
||||
margin-top: -35rpx;
|
||||
border-radius: 30rpx 30rpx 0 0;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
|
||||
.time {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background-color: #f6f7fb;
|
||||
// background-color: #f6f7fb;
|
||||
border-radius: 15rpx;
|
||||
|
||||
text {
|
||||
@@ -32,7 +32,7 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.time-active {
|
||||
.timeActive {
|
||||
box-sizing: border-box;
|
||||
padding: 18rpx;
|
||||
border: 2rpx solid $jx-primary;
|
||||
@@ -52,7 +52,7 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
padding: 30rpx;
|
||||
box-sizing: border-box;
|
||||
box-shadow: -10rpx 0rpx 10rpx rgb(166, 166, 166);
|
||||
@@ -65,4 +65,38 @@
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.info{
|
||||
background: linear-gradient(0deg, #ffe2d2, #fdf6f0);
|
||||
}
|
||||
|
||||
.time-root,
|
||||
.button{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.time{
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.info{
|
||||
background:linear-gradient(180deg, #7b7878, #bdbdbd);
|
||||
}
|
||||
|
||||
.time-root{
|
||||
background-color: #888;
|
||||
}
|
||||
|
||||
.time,
|
||||
.button{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.button{
|
||||
color:#000;
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import { store } from "@/store";
|
||||
|
||||
export default {
|
||||
setup() {
|
||||
const { isTxd } = useGlobalFunc()
|
||||
// const { isTxd } = useGlobalFunc()
|
||||
|
||||
// ******************** 时间选择组件操作 *****************************
|
||||
//#region
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
closeTime2: formatTime(time.timer4),
|
||||
}),
|
||||
}
|
||||
setTxdIngTime(time)
|
||||
// setTxdIngTime(time)
|
||||
let updateTimerRes = await merchant.update_store(data)
|
||||
if (updateTimerRes.code == 0) {
|
||||
uni.jxAlert({
|
||||
@@ -141,23 +141,23 @@ export default {
|
||||
|
||||
|
||||
// ******************** 修改淘鲜达线上时间 *****************************
|
||||
//#region
|
||||
async function setTxdIngTime(time: AnyObject) {
|
||||
if (isTxd()) {
|
||||
let data = {
|
||||
vendorOrgCode: 34402634,
|
||||
txdStores: JSON.stringify({
|
||||
flag: [2],
|
||||
txdStoreID: `JX${getStorage('storeID')}`,
|
||||
startTime: time.timer1,
|
||||
endTime: time.timer2
|
||||
})
|
||||
}
|
||||
await merchant.update_txd_store(data)
|
||||
} else {
|
||||
console.log('此店铺暂无淘鲜达店铺')
|
||||
}
|
||||
}
|
||||
// //#region
|
||||
// async function setTxdIngTime(time: AnyObject) {
|
||||
// if (isTxd()) {
|
||||
// let data = {
|
||||
// vendorOrgCode: 34402634,
|
||||
// txdStores: JSON.stringify({
|
||||
// flag: [2],
|
||||
// txdStoreID: `JX${getStorage('storeID')}`,
|
||||
// startTime: time.timer1,
|
||||
// endTime: time.timer2
|
||||
// })
|
||||
// }
|
||||
// await merchant.update_txd_store(data)
|
||||
// } else {
|
||||
// console.log('此店铺暂无淘鲜达店铺')
|
||||
// }
|
||||
// }
|
||||
//#endregion
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<view>● 门店营业时间需在配送站点营业时间内才会有骑手配送</view>
|
||||
<view>● 如需在此时间范围外营业,请咨询业务经理调整配送方式</view>
|
||||
<view>● 第二段营业时间需要在第一段营业时间之后</view>
|
||||
<view>● 淘先达仅使用营业时间一</view>
|
||||
<!-- <view>● 淘先达仅使用营业时间一</view> -->
|
||||
</view>
|
||||
|
||||
<view class="time-root">
|
||||
@@ -12,7 +12,7 @@
|
||||
<view class="time one">
|
||||
<view
|
||||
class="left"
|
||||
:class="{ 'time-active': timeActive == 1 }"
|
||||
:class="{ timeActive : timeActive == 1 }"
|
||||
@tap="setTime(1)"
|
||||
>
|
||||
{{ businessTime.timer1 }}
|
||||
@@ -20,7 +20,7 @@
|
||||
<text class="middle">至</text>
|
||||
<view
|
||||
class="right"
|
||||
:class="{ 'time-active': timeActive == 2 }"
|
||||
:class="{ timeActive : timeActive == 2 }"
|
||||
@tap="setTime(2)"
|
||||
>
|
||||
{{ businessTime.timer2 }}
|
||||
@@ -31,7 +31,7 @@
|
||||
<view class="time two">
|
||||
<view
|
||||
class="left"
|
||||
:class="{ 'time-active': timeActive == 3 }"
|
||||
:class="{ timeActive : timeActive == 3 }"
|
||||
@tap="setTime(3)"
|
||||
>
|
||||
{{ businessTime.timer3 }}
|
||||
@@ -39,7 +39,7 @@
|
||||
<text class="middle">至</text>
|
||||
<view
|
||||
class="right"
|
||||
:class="{ 'time-active': timeActive == 4 }"
|
||||
:class="{ timeActive : timeActive == 4 }"
|
||||
@tap="setTime(4)"
|
||||
>
|
||||
{{ businessTime.timer4 }}
|
||||
@@ -61,7 +61,189 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./setBusinessTime" >
|
||||
<script lang="ts" setup >
|
||||
import { computed, ref } from 'vue'
|
||||
import { onLoad,onReady } from "@dcloudio/uni-app";
|
||||
import { getStorage } from '@/utils/storage';
|
||||
import merchant from '@/api/https/merchant';
|
||||
// import useGlobalFunc from '@/composables/useGlobalFunc';
|
||||
import { store } from "@/store";
|
||||
|
||||
// export default {
|
||||
// setup() {
|
||||
// const { isTxd } = useGlobalFunc()
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
// ******************** 时间选择组件操作 *****************************
|
||||
//#region
|
||||
const dateTimePicker = ref<any>(null) // 时间组件实例
|
||||
const timeActive = ref<number>(0) // 时间选择高亮
|
||||
const timeIng = ref<string>('00:00') // 选择器的当前时间
|
||||
// 确认选择时间
|
||||
function confirm(e: AnyObject): void {
|
||||
switch (timeActive.value) {
|
||||
case 1:
|
||||
businessTime.value.timer1 = e.value
|
||||
break
|
||||
case 2:
|
||||
businessTime.value.timer2 = e.value
|
||||
break
|
||||
case 3:
|
||||
businessTime.value.timer3 = e.value
|
||||
break
|
||||
case 4:
|
||||
businessTime.value.timer4 = e.value
|
||||
break
|
||||
}
|
||||
}
|
||||
// 打开时间设置
|
||||
function setTime(type: number): void {
|
||||
timeActive.value = type
|
||||
let time = businessTime.value
|
||||
switch (type) {
|
||||
case 1:
|
||||
timeIng.value = time.timer1
|
||||
break
|
||||
case 2:
|
||||
timeIng.value = time.timer2
|
||||
break
|
||||
case 3:
|
||||
timeIng.value = time.timer3
|
||||
break
|
||||
case 4:
|
||||
timeIng.value = time.timer4
|
||||
break
|
||||
}
|
||||
dateTimePicker.value.open()
|
||||
}
|
||||
// 时间标题
|
||||
const timeTitle = computed(() => {
|
||||
let type = timeActive.value
|
||||
if (type == 1 || type == 3) {
|
||||
return '选择开始时间'
|
||||
} else {
|
||||
return '选择结束时间'
|
||||
}
|
||||
})
|
||||
//#endregion
|
||||
|
||||
|
||||
// ******************** 获取门店营业时间 *****************************
|
||||
//#region
|
||||
const businessTime = ref<AnyObject>({})
|
||||
onLoad(async() => {
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
if(!store.getters['storeInfo/businessHours']) await store.dispatch('storeInfo/getOneStore',getStorage("storeID"))
|
||||
businessTime.value = store.getters['storeInfo/businessHours']
|
||||
store.commit('storeInfo/jxLoadingFn', false)
|
||||
})
|
||||
//#endregion
|
||||
|
||||
|
||||
// ******************** 保存营业时间 *****************************
|
||||
//#region
|
||||
async function saveBusinessTime() {
|
||||
let time = businessTime.value
|
||||
// 一开始时间大于结束时间
|
||||
if (formatTime(time.timer1) >= formatTime(time.timer2)) {
|
||||
return uni.jxAlert({
|
||||
title: '营业时间一',
|
||||
content: `开始时间不能大于结束时间,您可以修改为【${time.timer2}至${time.timer1}】`
|
||||
})
|
||||
}
|
||||
// 第二段时间小于第一段时间
|
||||
if (time.timer3 != '00:00' && time.timer4 != '00:00') {
|
||||
if (formatTime(time.timer3) < formatTime(time.timer2)) {
|
||||
return uni.jxAlert({
|
||||
title: '提示',
|
||||
content: `第二段营业时间不能小于第一段营业时间,您可以修改到【${time.timer2}】点之后`
|
||||
})
|
||||
}
|
||||
}
|
||||
// 二开始时间大于结束时间
|
||||
if (formatTime(time.timer3) > formatTime(time.timer4)) {
|
||||
return uni.jxAlert({
|
||||
title: '营业时间二',
|
||||
content: `开始时间不能大于结束时间,您可以修改为【${time.timer3}至${time.timer4}】`
|
||||
})
|
||||
}
|
||||
|
||||
let data = {
|
||||
storeID: getStorage("storeID"),
|
||||
payload: JSON.stringify({
|
||||
openTime1: formatTime(time.timer1),
|
||||
closeTime1: formatTime(time.timer2),
|
||||
openTime2: formatTime(time.timer3),
|
||||
closeTime2: formatTime(time.timer4),
|
||||
}),
|
||||
}
|
||||
// setTxdIngTime(time)
|
||||
let updateTimerRes = await merchant.update_store(data)
|
||||
if (updateTimerRes.code == 0) {
|
||||
uni.jxAlert({
|
||||
title: '提示',
|
||||
content: '修改成功,请返回下拉刷新',
|
||||
success: () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
uni.jxAlert({
|
||||
title: '操作提示',
|
||||
content: `提示:${updateTimerRes.desc}`,
|
||||
success: () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
// 格式化数据
|
||||
function formatTime(time: string): number {
|
||||
let newTime = time.slice(0, 2) + time.slice(-2)
|
||||
return +newTime
|
||||
}
|
||||
//#endregion
|
||||
|
||||
|
||||
// // ******************** 修改淘鲜达线上时间 *****************************
|
||||
// // #region
|
||||
// async function setTxdIngTime(time: AnyObject) {
|
||||
// if (isTxd()) {
|
||||
// let data = {
|
||||
// vendorOrgCode: 34402634,
|
||||
// txdStores: JSON.stringify({
|
||||
// flag: [2],
|
||||
// txdStoreID: `JX${getStorage('storeID')}`,
|
||||
// startTime: time.timer1,
|
||||
// endTime: time.timer2
|
||||
// })
|
||||
// }
|
||||
// await merchant.update_txd_store(data)
|
||||
// } else {
|
||||
// console.log('此店铺暂无淘鲜达店铺')
|
||||
// }
|
||||
// }
|
||||
// //#endregion
|
||||
|
||||
|
||||
// return {
|
||||
// dateTimePicker, // 时间组件实例
|
||||
// confirm, // 选择时间val
|
||||
// businessTime, // 营业时间
|
||||
// timeActive, // 时间选择高亮
|
||||
// setTime, // 打开时间设置
|
||||
// timeTitle, // 选择器标题
|
||||
// saveBusinessTime, // 确定修改时间
|
||||
// timeIng, // 选择器的当前时间
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
.storeStatus{
|
||||
margin: 20rpx;
|
||||
// height: 220rpx;
|
||||
background:linear-gradient(180deg, #d6f7d0, #fff);
|
||||
// background:linear-gradient(180deg, #d6f7d0, #fff);
|
||||
border-top-right-radius: 20rpx;
|
||||
border-top-left-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
@@ -51,4 +51,25 @@
|
||||
opacity: 0.6;
|
||||
background-color: #ffad49;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.storeStatus{
|
||||
// background-color:#fff;
|
||||
background:linear-gradient(180deg, #d6f7d0, #fff);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.storeStatus{
|
||||
// background-color:#000;
|
||||
background:linear-gradient(180deg, #7b7878, #bdbdbd);
|
||||
}
|
||||
|
||||
.uni-input,
|
||||
.item>input{
|
||||
color:#fff
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ref, watch } from 'vue'
|
||||
import { onLoad, onPullDownRefresh } from "@dcloudio/uni-app";
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { onLoad, onPullDownRefresh, onReady } from "@dcloudio/uni-app";
|
||||
import { getStorage } from '@/utils/storage';
|
||||
import { store } from '@/store'
|
||||
import toast from "@/utils/toast";
|
||||
@@ -28,16 +28,23 @@ export default {
|
||||
const invoice_contact_phone = ref('')
|
||||
const storeName = ref('') // 门店名称
|
||||
const ebaiStore = ref<any>({})
|
||||
const logoUrl = ref('https://image.jxc4.com/image/9b9436561e7ff7d8d764787b1aa5182e.jpg')
|
||||
const logoUrl = ref('https://image.jxc4.com/image/987f5c2f23452cdcbddde16f055437f5.png')
|
||||
|
||||
onLoad(async () => {
|
||||
store.commit('storeInfo/jxLoadingFn', true)
|
||||
if (getStorage('terrace') === 'jxgy') logoUrl.value = 'https://image.jxc4.com/image/9e26e6d4e8646d340c21dfe595ac4d08.jpg'
|
||||
else if (getStorage('terrace') === 'gblm') logoUrl.value = 'https://image.jxc4.com/image/5cd356df441a32295798f78a39491464.png'
|
||||
if (getStorage('terrace') === 'jxgy') logoUrl.value = 'https://image.jxc4.com/image/5b24d0fae35b45d99a911bb09ecfa927.png'
|
||||
else if (getStorage('terrace') === 'gblm') logoUrl.value = 'https://image.jxc4.com/image/a2164dbb2289734a7d96e778040c5776.png'
|
||||
await getStores()
|
||||
store.commit('storeInfo/jxLoadingFn', false)
|
||||
})
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: !appTheme.value ? '#ffffff' : '#000000', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
watch(() => store.getters['storeInfo/platformInfo'],
|
||||
(val) => {
|
||||
@@ -154,7 +161,8 @@ export default {
|
||||
bindPickerChange, // 选择确认框
|
||||
saveInvoiceInfo, // 保存发票信息
|
||||
storeName, // 门店名
|
||||
logoUrl // logoUrl
|
||||
logoUrl, // logoUrl
|
||||
appTheme
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,10 +10,10 @@
|
||||
<view class="title1">{{storeName}}</view>
|
||||
<view style="margin-top: 40rpx;">
|
||||
<view class="item">
|
||||
联系人:<input class="uni-input" style="margin-left: 18rpx;" v-model="invoiceInfo.invoice_contact.person" placeholder="发票联系人"/>
|
||||
联系人:<input class="uni-input" :placeholder-style="appTheme ? '' : 'color:#cccbcb'" style="margin-left: 18rpx;" v-model="invoiceInfo.invoice_contact.person" placeholder="发票联系人"/>
|
||||
</view>
|
||||
<view class="item">
|
||||
联系电话:<input class="uni-input" v-model="invoiceInfo.invoice_contact.phone" placeholder="联系电话" />
|
||||
联系电话:<input class="uni-input" :placeholder-style="appTheme ? '' : 'color:#cccbcb'" v-model="invoiceInfo.invoice_contact.phone" placeholder="联系电话" />
|
||||
</view>
|
||||
<view class="item">
|
||||
开具方式:
|
||||
@@ -53,7 +53,9 @@
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@media (prefers-color-scheme: light) {
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -11,7 +11,7 @@
|
||||
// 来单提示
|
||||
.tips-root {
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
// margin-top: 20rpx;
|
||||
|
||||
.item {
|
||||
@extend %item;
|
||||
@@ -78,11 +78,12 @@
|
||||
}
|
||||
|
||||
.title-tip {
|
||||
background-color: rgb(245, 245, 245);
|
||||
padding: 0 0 20rpx 25rpx;
|
||||
font-size: 30rpx;
|
||||
// background-color: rgb(245, 245, 245);
|
||||
padding: 20rpx 0 20rpx 25rpx;
|
||||
font-size: 34rpx;
|
||||
color: #616161;
|
||||
border-bottom: 1rpx solid rgb(220, 220, 220);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.outLogin-root {
|
||||
@@ -112,7 +113,7 @@
|
||||
.jx-popup-update {
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
background-color: #fff;
|
||||
// background-color: #fff;
|
||||
border-radius: 0 0 15rpx 15rpx;
|
||||
|
||||
.text {
|
||||
@@ -183,4 +184,29 @@
|
||||
// padding: 20rpx;
|
||||
// border-radius: 15rpx;
|
||||
// }
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.title-tip{
|
||||
background-color: rgb(245, 245, 245);
|
||||
}
|
||||
|
||||
.jx-popup-update{
|
||||
background-color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.title-tip{
|
||||
background-color:#191919;
|
||||
}
|
||||
|
||||
.item{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.jx-popup-update{
|
||||
background-color: #222;
|
||||
color:#fff;
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import merchant from "@/api/https/merchant"
|
||||
import { store } from '@/store'
|
||||
import { getStorage, setStorage } from '@/utils/storage'
|
||||
import toast from '@/utils/toast'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { onReady, onShow } from '@dcloudio/uni-app'
|
||||
import { computed, nextTick, ref } from 'vue'
|
||||
import useGlobalFunc from '@/composables/useGlobalFunc'
|
||||
|
||||
@@ -22,24 +22,40 @@ function setUp() {
|
||||
// IM单聊状态是否开启-饿百
|
||||
const imEbStoreStatus = ref<number>(0)
|
||||
|
||||
// IM单聊状态是否开启-京东
|
||||
const imJdStoreStatus = ref<number>(0)
|
||||
|
||||
// 美团门店信息
|
||||
const mtStoreInfo = ref<AnyObject>({})
|
||||
|
||||
// 饿百门店信息
|
||||
const ebStoreInfo = ref<AnyObject>({})
|
||||
|
||||
// 京东门店信息
|
||||
const jdStoreInfo = ref<AnyObject>({})
|
||||
|
||||
// 是否含有美团门店
|
||||
const isExistMtStore = ref<boolean>(false)
|
||||
|
||||
// 是否含有饿百门店
|
||||
const isExistEbStore = ref<boolean>(false)
|
||||
|
||||
// 是否含有京东门店
|
||||
const isExistJdStore = ref<boolean>(false)
|
||||
|
||||
/**
|
||||
* 获取页面初始化信息
|
||||
*/
|
||||
onShow(async () => {
|
||||
await getStoreMsg()
|
||||
})
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#ffffff' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
// 打印机品牌
|
||||
const printerData = ref<AnyObject>({
|
||||
0: '未绑定',
|
||||
@@ -69,9 +85,11 @@ function setUp() {
|
||||
// 获取第三方美团门店
|
||||
if (JSON.stringify(store.state.storeInfo.allStoreInfo) !== '{}') {
|
||||
let mtStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 1)
|
||||
|
||||
if (mtStore && JSON.stringify(mtStore) !== '{}') {
|
||||
mtStoreInfo.value = mtStore
|
||||
isExistMtStore.value = true
|
||||
// console.log(isExistMtStore.value,'获取第三方美团门店,mtStore,1111111111',mtStore)
|
||||
let mtStatus = store.state.storeInfo.imOnlineStatus.filter(item => item.vendorID === 1)
|
||||
imMtStoreStatus.value = mtStatus.length > 0 ? mtStatus[0].imStatus : 0
|
||||
}
|
||||
@@ -83,7 +101,17 @@ function setUp() {
|
||||
let ebStataus = store.state.storeInfo.imOnlineStatus.filter(item => item.vendorID === 3)
|
||||
imEbStoreStatus.value = ebStataus.length > 0 ? ebStataus[0].imStatus : 0
|
||||
}
|
||||
|
||||
// let jdStore = store.state.storeInfo.allStoreInfo.StoreMaps.find((item: { vendorID: number }) => item.vendorID === 0)
|
||||
// console.log('打印京东门店,是否存在京东',jdStore)
|
||||
// if (jdStore && JSON.stringify(jdStore) !== '{}') {
|
||||
// jdStoreInfo.value = jdStore
|
||||
// isExistJdStore.value = true
|
||||
// // let jdStataus = store.state.storeInfo.imOnlineStatus.filter(item => item.vendorID === 0)
|
||||
// // imJdStoreStatus.value = jdStataus.length > 0 ? jdStataus[0].imStatus : 0
|
||||
// }
|
||||
}
|
||||
// console.log(isExistMtStore.value,'获取第三方美团门店,mtStore')
|
||||
// 网络打印机
|
||||
netPrinter.value = (store.state.serveInfo.serviceInfo as any).printerVendorInfo
|
||||
for (let i in netPrinter.value) {
|
||||
@@ -130,7 +158,7 @@ function setUp() {
|
||||
{
|
||||
id: 1,
|
||||
title: '用户协议',
|
||||
url: 'https://www.jxc4.com/managerApp/jxdjService.html',
|
||||
url: `https://www.jxc4.com/managerApp/jxdjService.html`,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
@@ -375,10 +403,10 @@ function setUp() {
|
||||
*/
|
||||
async function switchImMtStoreStatus(e: AnyObject, vendorID: number) {
|
||||
let data = [
|
||||
{
|
||||
{
|
||||
vendorID: vendorID,
|
||||
vendorStoreID: vendorID === 1 ? mtStoreInfo.value.vendorStoreID + '' : ebStoreInfo.value.vendorStoreID + '',
|
||||
vendorOrgCode: vendorID === 1 ? mtStoreInfo.value.vendorOrgCode + '' : ebStoreInfo.value.vendorOrgCode + '',
|
||||
vendorStoreID: vendorID === 1 ? mtStoreInfo.value.vendorStoreID + '' : vendorID === 3 ? ebStoreInfo.value.vendorStoreID + '' : jdStoreInfo.value.vendorStoreID,
|
||||
vendorOrgCode: vendorID === 1 ? mtStoreInfo.value.vendorOrgCode + '' : vendorID === 3 ? ebStoreInfo.value.vendorOrgCode + '' : jdStoreInfo.value.vendorOrgCode,
|
||||
imStatus: e.detail.value ? 1 : 0
|
||||
}
|
||||
]
|
||||
@@ -562,9 +590,11 @@ function setUp() {
|
||||
switchprinterDisabled, // 网络打印机禁用开关,
|
||||
imMtStoreStatus, // IM单聊状态是否开启
|
||||
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
||||
imJdStoreStatus, // IM单聊状态是否开启 京东
|
||||
switchImMtStoreStatus, // 更改IM单聊门店状态
|
||||
isExistMtStore, // 是否绑定美团门店
|
||||
isExistEbStore, // 是否绑定饿百门店
|
||||
isExistJdStore, // 是否绑定京东门店
|
||||
printerFontSize, // 蓝牙打印机字体大小
|
||||
retryActive, // 默认选中重试次数
|
||||
changeRetry, // 选择重试次数
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 消息设置 -->
|
||||
<view class="inter-printer" v-if="isExistMtStore || isExistEbStore">
|
||||
<!-- 消息设置 || isExistJdStore-->
|
||||
<view class="inter-printer" v-if="isExistMtStore || isExistEbStore ">
|
||||
<view class="title-tip">消息设置</view>
|
||||
<view class="item" v-if="isExistMtStore">
|
||||
<view>美团IM单聊状态</view>
|
||||
@@ -160,6 +160,17 @@
|
||||
/>
|
||||
<text v-else class="printer-name">未知状态</text>
|
||||
</view>
|
||||
<!-- <view class="item" v-if="isExistJdStore">
|
||||
<view>京东IM单聊状态</view>
|
||||
<switch
|
||||
v-if="!store.getters['storeInfo/imJdStatus'][0].errMsg"
|
||||
:checked="imJdStoreStatus"
|
||||
@change="switchImMtStoreStatus($event,0)"
|
||||
color="#4EB331"
|
||||
style="zoom: 0.85"
|
||||
/>
|
||||
<text v-else class="printer-name">未知状态</text>
|
||||
</view> -->
|
||||
</view>
|
||||
|
||||
<!-- 其它设置 -->
|
||||
@@ -254,9 +265,11 @@ const {
|
||||
switchprinterDisabled, // 网络打印机禁用开关
|
||||
imMtStoreStatus, // IM单聊状态是否开启
|
||||
imEbStoreStatus, // IM单聊状态是否开启 饿百
|
||||
imJdStoreStatus, // IM单聊状态是否开启 京东
|
||||
switchImMtStoreStatus, // 更改IM单聊门店状态
|
||||
isExistMtStore, // 是否绑定美团门店
|
||||
isExistEbStore, // 是否绑定饿百门店
|
||||
isExistJdStore, // 是否绑定京东门店
|
||||
printerFontSize, // 蓝牙打印机字体大小
|
||||
retryActive, // 默认选中重试次数
|
||||
changeRetry, // 选择重试次数
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.store-vender {
|
||||
min-height: 90rpx;
|
||||
background: white;
|
||||
// background: white;
|
||||
border-top: 1rpx solid #e5e5e5;
|
||||
border-bottom: 1rpx solid #e5e5e5;
|
||||
display: flex;
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
.code-text {
|
||||
font-size: 26rpx;
|
||||
color: rgb(71, 71, 71);
|
||||
// color: rgb(71, 71, 71);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -89,4 +89,25 @@
|
||||
padding: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.store-vender{
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.code-text{
|
||||
color: rgb(71, 71, 71);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.store-vender{
|
||||
background-color: #000;
|
||||
}
|
||||
|
||||
.code-text{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
}}</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<jx-icon icon="erweima" :size="60" color="rgb(71, 71, 71)" />
|
||||
<jx-icon icon="erweima" :size="60" :color="appTheme ? 'rgb(71, 71, 71)': '#ffffff'" />
|
||||
<text class="code-text">店铺码</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -43,15 +43,26 @@
|
||||
import merchant from "@/api/https/merchant"
|
||||
import configCms from '@/utils/configCms'
|
||||
import { getStorage } from '@/utils/storage'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { onLoad, onReady } from '@dcloudio/uni-app'
|
||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
||||
import drawQrcode from '@/utils/weapp.qrcode.esm.js'
|
||||
import { clearList } from '@/utils/tools'
|
||||
import { store } from "@/store"
|
||||
|
||||
onLoad(async () => {
|
||||
await getStoreInfo()
|
||||
})
|
||||
|
||||
|
||||
const appTheme = computed(() => { return store.getters['serveInfo/appTheme'] === 'light'})
|
||||
onReady(() => {
|
||||
uni.setNavigationBarColor({
|
||||
frontColor: appTheme.value ? '#000000' : '#ffffff', // 前景文字颜色,必选
|
||||
backgroundColor: appTheme.value ? '#4eb331' : '#000000', // 背景颜色,必选
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* 获取店铺数据
|
||||
*/
|
||||
@@ -63,6 +74,7 @@ async function getStoreInfo() {
|
||||
let storeInfoRes = await merchant.get_stores(data)
|
||||
// storeMaps.value = storeInfoRes.data.stores[0].StoreMaps
|
||||
storeMaps.value = storeInfoRes.data.stores[0].StoreMaps.filter((item:AnyObject) => item.vendorID !== 16 && item.vendorID !== 14)
|
||||
console.log('storeMaps,查看门店店铺信息',JSON.stringify(storeInfoRes,undefined,4))
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user