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