Compare commits

...

2 Commits

Author SHA1 Message Date
wtq
a5b303c73c '!' 2025-12-16 10:37:42 +08:00
wtq
cba285c943 '修改饿了么名称' 2025-12-15 10:46:39 +08:00
43 changed files with 384 additions and 812 deletions

View File

@@ -120,9 +120,9 @@ function App() {
return 0
case '美团外卖':
return 1
case '饿了么':
return 2
case '饿百新零售':
// case '淘宝闪购':
// return 2
case '淘宝闪购新零售':
return 3
case '京东商城':
return 5

View File

@@ -13,7 +13,7 @@ const {
appKeepAlive, // 应用保活
listenMsg, // 监听消息
} = App()
const { watchVersion } = useGlobalFunc() // 监听版本
// const { watchVersion } = useGlobalFunc() // 监听版本
// 三端通用
const {
@@ -33,16 +33,16 @@ onLaunch(() => {
uni['globalAlert'] = globalAlert // 挂载全局可覆盖tabar弹窗
// plus.device.setWakelock(true) //打开程序后一直保持唤醒状态(常亮)
watchVersion((isUpdate: boolean) => {
// 检查是否更新版本
if (isUpdate) {
// uni.globalAlert({
// data: {
// type: 3,
// },
// watchVersion((isUpdate: boolean) => {
// // 检查是否更新版本
// if (isUpdate) {
// // uni.globalAlert({
// // data: {
// // type: 3,
// // },
// // })
// }
// })
}
})
// 初始化平台
if (!getStorage('terrace')) setStorage('terrace', 'jxcs')

View File

@@ -144,80 +144,80 @@ function useGlobalFunc() {
success?: Function
}
function appWxLogin(options: appWxLoginType) {
uni.getProvider({
service: 'share',
success: function (res) {
// res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
if(res.provider[0] == 'weixin'){
// 微信开放平台的应用标识
// 预登录
let weixinService: AnyObject
plus.oauth.getServices((services) => {
if (services && services.length) {
for (var i = 0, len = services.length; i < len; i++) {
if (services[i].id === 'weixin') {
weixinService = services[i]
break
}
}
// 如果没有获取到微信服务,则退出授权
if (!weixinService) {
return uni.jxAlert({
title: '登录失败',
content: '请先下载微信',
})
}
// uni.getProvider({
// service: 'share',
// success: function (res) {
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// if(res.provider[0] == 'weixin'){
// // 微信开放平台的应用标识
// // 预登录
// let weixinService: AnyObject
// plus.oauth.getServices((services) => {
// if (services && services.length) {
// for (var i = 0, len = services.length; i < len; i++) {
// if (services[i].id === 'weixin') {
// weixinService = services[i]
// break
// }
// }
// // 如果没有获取到微信服务,则退出授权
// if (!weixinService) {
// return uni.jxAlert({
// title: '登录失败',
// content: '请先下载微信',
// })
// }
// 进行微信授权,拿到 code
weixinService.authorize(async (event: AnyObject) => {
//此处获取code的关键
let data = {
authType: "weixinapp",
authSecret: event.code,
}
// event.code 发给后端验证,验证成功后处理业务
let res = await login.applets_login(data)
console.log('ZSW-res', res);
if (res.code == 0) {
// 第一次登录绑定手机号码
if (res.data.tokenType == 2) {
options.bangding && options.bangding(res.data.token)
}
// // 进行微信授权,拿到 code
// weixinService.authorize(async (event: AnyObject) => {
// //此处获取code的关键
// let data = {
// authType: "weixinapp",
// authSecret: event.code,
// }
// // event.code 发给后端验证,验证成功后处理业务
// let res = await login.applets_login(data)
// console.log('ZSW-res', res);
// if (res.code == 0) {
// // 第一次登录绑定手机号码
// if (res.data.tokenType == 2) {
// options.bangding && options.bangding(res.data.token)
// }
// 登录成功
if (res.data.tokenType != 2) {
options.success && options.success(res.data)
}
} else {
if ((res.desc).indexOf('row') == -1) {
uni.jxAlert({
title: '提示',
content: `登录失败:${res.desc || res.data}`
})
} else {
uni.jxAlert({
title: '提示',
content: `登录失败:对不起该账号未绑定门店,请联系官方客服进行绑定!`
})
}
// // 登录成功
// if (res.data.tokenType != 2) {
// options.success && options.success(res.data)
// }
// } else {
// if ((res.desc).indexOf('row') == -1) {
// uni.jxAlert({
// title: '提示',
// content: `登录失败:${res.desc || res.data}`
// })
// } else {
// uni.jxAlert({
// title: '提示',
// content: `登录失败:对不起该账号未绑定门店,请联系官方客服进行绑定!`
// })
// }
}
})
} else {
uni.jxAlert({
title: '提示',
content: '本机不支持微信登录',
})
}
})
}else{
uni.jxAlert({
title: '提示',
content: '请先下载微信',
})
}
}
})
// }
// })
// } else {
// uni.jxAlert({
// title: '提示',
// content: '本机不支持微信登录',
// })
// }
// })
// }else{
// uni.jxAlert({
// title: '提示',
// content: '请先下载微信',
// })
// }
// }
// })
// if (plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })) { // 判断用户是否安装了微信
// // 微信开放平台的应用标识
@@ -375,42 +375,42 @@ function useGlobalFunc() {
* @param {string} [id] 小程序原始ID
*/
function openWeixin(url: string, id = 'gh_e9161397303e') {
uni.getProvider({
service: 'share',
success: function (res) {
// res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// isInstallWx.value = res.provider[0] == 'weixin' ? true : false
if(res.provider[0] == 'weixin'){
// 跳转到微信小程序进行物料申请
plus.share.getServices(function (res) {
var sweixin = null;
for (var i = 0; i < res.length; i++) {
var t: AnyObject = res[i];
if (t.id == 'weixin') {
sweixin = t;
}
}
if (sweixin) {
sweixin.launchMiniProgram({
id: id, //这里写你的小程序原始id以gh开头
type: 0, //这里是不同的环境( 0-正式版; 1-测试版; 2-体验版。 默认值为0。
path: url, //这里是指 定页的路径,如需传参直接字符串拼接(首页可以省略)
});
}
}, function (res) {
uni.jxAlert({
title: '提示',
content: '打开小程序失败',
})
});
}else{
uni.jxAlert({
title: '温馨提示',
content: '请先下载微信',
})
}
}
})
// uni.getProvider({
// service: 'share',
// success: function (res) {
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// // isInstallWx.value = res.provider[0] == 'weixin' ? true : false
// if(res.provider[0] == 'weixin'){
// // 跳转到微信小程序进行物料申请
// plus.share.getServices(function (res) {
// var sweixin = null;
// for (var i = 0; i < res.length; i++) {
// var t: AnyObject = res[i];
// if (t.id == 'weixin') {
// sweixin = t;
// }
// }
// if (sweixin) {
// sweixin.launchMiniProgram({
// id: id, //这里写你的小程序原始id以gh开头
// type: 0, //这里是不同的环境( 0-正式版; 1-测试版; 2-体验版。 默认值为0。
// path: url, //这里是指 定页的路径,如需传参直接字符串拼接(首页可以省略)
// });
// }
// }, function (res) {
// uni.jxAlert({
// title: '提示',
// content: '打开小程序失败',
// })
// });
// }else{
// uni.jxAlert({
// title: '温馨提示',
// content: '请先下载微信',
// })
// }
// }
// })
// if (plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })) { // 判断用户是否安装了微信
// // 跳转到微信小程序进行物料申请
// plus.share.getServices(function (res) {

View File

@@ -78,28 +78,29 @@ function useOrderInfo() {
* @param {string} vendorID 品牌ID
*/
async function printerOrder(vendorOrderID: string, vendorID: string) {
if (getStorage('defaultPrinter') == '0') {
// 蓝牙打印机
bluetoothPrinter(vendorOrderID)
} else if (getStorage('defaultPrinter') == '1') {
// 网络打印机
internetPrinter(vendorOrderID, vendorID)
} else {
// 手动选择
uni.jxConfirm({
title: '选择设备',
content: '请选择打印设备进行打印',
confirmText: '网络打印',
cancelText: '蓝牙打印',
isReturn: 1,
success: () => {
internetPrinter(vendorOrderID, vendorID)
},
fail: () => {
bluetoothPrinter(vendorOrderID)
}
})
}
// if (getStorage('defaultPrinter') == '0') {
// // 蓝牙打印机
// bluetoothPrinter(vendorOrderID)
// } else if (getStorage('defaultPrinter') == '1') {
// // 网络打印机
// internetPrinter(vendorOrderID, vendorID)
// } else {
// // 手动选择
// uni.jxConfirm({
// title: '选择设备',
// content: '请选择打印设备进行打印',
// confirmText: '网络打印',
// cancelText: '蓝牙打印',
// isReturn: 1,
// success: () => {
// internetPrinter(vendorOrderID, vendorID)
// },
// fail: () => {
// bluetoothPrinter(vendorOrderID)
// }
// })
// }
}
/**

View File

@@ -1,7 +1,7 @@
{
"name" : "京西到家商家版",
"appid" : "__UNI__F9A47D3",
"description" : "1、商户通过京西平台同时管理美团、饿了么、京东等多个外卖平台实现一键上架、下架、修改、删除多个平台商品2、商户通过京西平台可以同时对、美团专送、达达、顺丰同城等多个专送平台召唤偶骑手",
"description" : "1、商户通过京西平台同时管理美团、淘宝闪购、京东等多个外卖平台实现一键上架、下架、修改、删除多个平台商品2、商户通过京西平台可以同时对、美团专送、达达、顺丰同城等多个专送平台召唤偶骑手",
"versionName" : "1.0.0",
"versionCode" : 100,
"transformPx" : false,
@@ -238,11 +238,12 @@
"app-harmony" : {
// "darkmode" : true,
// "themeLocation" : "theme.json",
"safearea": { //iOS平台的安全区域
"background": "#ffffff",
"backgroundDark": "#2f0508", // HX 3.1.19+支持
"bottom": {
"offset": "none" // 在没有 tabBar 时,底部区域是否需要占位
"safearea" : {
//iOS平台的安全区域
"background" : "#ffffff",
"backgroundDark" : "#2f0508", // HX 3.1.19+支持
"bottom" : {
"offset" : "none" // 在没有 tabBar 时,底部区域是否需要占位
}
},
"distribute" : {
@@ -268,26 +269,14 @@
}
},
"icons" : {
"foreground" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/1024.png",
"background" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/1024.png"
"foreground" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/hormony_foreground1024.png",
"background" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/harmony_background1024.png"
},
"splashScreens" : {
"startWindowIcon" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/1024.png",
"startWindowIcon" : "D:/wtq/交接文档new (2)/交接文档new/交接文档new/京西菜市商家版/素材/hormony_foreground1024.png",
"startWindowBackground" : ""
},
"modules" : {
"uni-oauth" : {
"weixin" : {
"appid" : "wx18111a41fd17f24f"
}
},
"uni-share" : {
"weixin" : {
"appid" : "wx18111a41fd17f24f"
}
},
"uni-map" : {}
},
"modules" : {},
"targetSdkVersion" : "6.0.0.868",
"permissions" : [
{

View File

@@ -239,17 +239,17 @@
"navigationBarTitleText": "扫码进店"
}
},
{
"path": "enterGroupChat/enterGroupChat",
"style": {
"navigationBarTitleText": "进入群聊",
"mp-weixin": {
"usingComponents": {
"cell": "plugin://chatGroupPlugin/cell"
}
}
}
},
// {
// "path": "enterGroupChat/enterGroupChat",
// "style": {
// "navigationBarTitleText": "进入群聊",
// "mp-weixin": {
// "usingComponents": {
// "cell": "plugin://chatGroupPlugin/cell"
// }
// }
// }
// },
{
"path": "message/message",
"style": {
@@ -274,12 +274,12 @@
"navigationBarTitleText": "设置"
}
},
{
"path": "printerSetUp/printerSetUp",
"style": {
"navigationBarTitleText": "蓝牙打印机设置"
}
},
// {
// "path": "printerSetUp/printerSetUp",
// "style": {
// "navigationBarTitleText": "蓝牙打印机设置"
// }
// },
{
"path": "businessLicense/businessLicense",
"style": {

View File

@@ -80,7 +80,7 @@
(sku.ebaiSyncStatus & 2) !== 2 &&
(sku.ebaiSyncStatus & 4) !== 4
"
>饿佰:该商品无法修改价格,请联系运营修改</view
>淘宝闪购:该商品无法修改价格,请联系运营修改</view
>
<view class="cell-top">
<view class="price">

View File

@@ -18,9 +18,9 @@ function options() {
/**
* 进入群聊
*/
function getGroupChat() {
openWeixin('subPages/merchantChild/enterGroupChat/enterGroupChat')
}
// function getGroupChat() {
// openWeixin('subPages/merchantChild/enterGroupChat/enterGroupChat')
// }
/**
* 注册时间
@@ -38,48 +38,49 @@ function options() {
}
/**
* 物料申请
*/
function moveToWM() {
let tel = store.state.storeInfo.allStoreInfo.marketManPhone ? store.state.storeInfo.allStoreInfo.marketManPhone : "18048531223"
if (getStorage('terrace') != 'jxcs') {
// 果园禁止物料跳转
uni.jxAlert({
title: '物料申请',
content: `非常抱歉,无法进入物料商城,请联系运营${tel}`
})
return
} else {
if (store.state.storeInfo.allStoreInfo.packageSwitch === 1) {
uni.jxAlert({
title: '物料申请',
content: `非常抱歉,无法进入物料商城,请联系运营${tel}`
})
return
}
}
// /**
// * 物料申请
// */
// function moveToWM() {
// let tel = store.state.storeInfo.allStoreInfo.marketManPhone ? store.state.storeInfo.allStoreInfo.marketManPhone : "18048531223"
// if (getStorage('terrace') != 'jxcs') {
// // 果园禁止物料跳转
// uni.jxAlert({
// title: '物料申请',
// content: `非常抱歉,无法进入物料商城,请联系运营${tel}`
// })
// return
// } else {
// if (store.state.storeInfo.allStoreInfo.packageSwitch === 1) {
// uni.jxAlert({
// title: '物料申请',
// content: `非常抱歉,无法进入物料商城,请联系运营${tel}`
// })
// return
// }
// }
if (store.state.storeInfo.storeStatus === -2) {
uni.jxAlert({
title: '物料申请',
content: '门店已被禁用,请联系运营'
})
}
openWeixin(`pages/index/index?storeID=666666&fromStoreID=${getStorage('storeID')}&storeType=c4`, 'gh_0d7e2243b51f')
}
// if (store.state.storeInfo.storeStatus === -2) {
// uni.jxAlert({
// title: '物料申请',
// content: '门店已被禁用,请联系运营'
// })
// }
// openWeixin(`pages/index/index?storeID=666666&fromStoreID=${getStorage('storeID')}&storeType=c4`, 'gh_0d7e2243b51f')
// }
/**
* 查询是否有新账单
*/
const isInstallWx = ref<boolean>(false) // 是否安装微信
onLoad(async () => {
uni.getProvider({
service: 'share',
success: function (res) {
// res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
isInstallWx.value = res.provider[0] == 'weixin' ? true : false
}})
// uni.getProvider({
// service: 'share',
// success: function (res) {
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// isInstallWx.value = res.provider[0] == 'weixin' ? true : false
// }})
// if (plus.runtime.isApplicationExist({ pname: 'com.tencent.mm', action: 'weixin://' })) {
// isInstallWx.value = true
// } else {
@@ -261,9 +262,9 @@ function options() {
return {
getGroupChat, // 跳转加入群聊
// getGroupChat, // 跳转加入群聊
getSelfInfo, // 获取门店来京西的时间
moveToWM, // 物料申请
// moveToWM, // 物料申请
newBillShow, // 是否有新账单
billList, // 账单列表
msgCount, // 是否有信息

View File

@@ -99,12 +99,13 @@
</template>
<script lang="ts" setup>
import { store } from '@/store';
import options from './options'
import { computed, ref } from 'vue'
const {
getGroupChat, // 跳转加入群聊
// getGroupChat, // 跳转加入群聊
getSelfInfo, // 获取门店来京西的时间
moveToWM, // 物料申请
// moveToWM, // 物料申请
newBillShow, // 是否有新订单
msgCount, // 是否有信息
billList, // 账单列表
@@ -131,12 +132,12 @@ const oldVersion = ref<string>(uni.getSystemInfoSync().appVersion) // 版本号
// 不用展示信息的图标
// 未下载微信不展示
const grindListData = ref([
{
id: 1,
icon: '/static/merchant-icon/1.png',
title: '加入群聊',
isIos: true,
},
// {
// id: 1,
// icon: '/static/merchant-icon/1.png',
// title: '加入群聊',
// isIos: true,
// },
{
id: 2,
icon: '/static/merchant-icon/2.png',
@@ -167,12 +168,12 @@ const grindListData = ref([
title: '消息通知',
isIos: false,
},
{
id: 7,
icon: '/static/merchant-icon/7.png',
title: '物料申请',
isIos: true,
},
// {
// id: 7,
// icon: '/static/merchant-icon/7.png',
// title: '物料申请',
// isIos: true,
// },
{
id: 16,
icon: '/static/merchant-icon/8.png',
@@ -221,12 +222,12 @@ const grindListData = ref([
title: '注册时间',
isIos: false,
},
{
id: 15,
icon: '/static/merchant-icon/17.png',
title: '打开小程序',
isIos: true,
},
// {
// id: 15,
// icon: '/static/merchant-icon/17.png',
// title: '打开小程序',
// isIos: true,
// },
{
id: 18,
icon: '/static/merchant-icon/19.png',
@@ -250,12 +251,12 @@ const grindListData = ref([
title: '配送余额',
isIos: false,
},
{
id: 17,
icon: '/static/merchant-icon/18.png',
title: '检查更新',
isIos: false,
},
// {
// id: 17,
// icon: '/static/merchant-icon/18.png',
// title: '检查更新',
// isIos: false,
// },
])
/*************************************************
@@ -276,9 +277,9 @@ const newGrindListData: AnyObject = computed(() => {
function grindData(title: number) {
switch (title) {
case 1:
getGroupChat() // 加入群聊
break
// case 1:
// getGroupChat() // 加入群聊
// break
case 2:
uni.navigateTo({
url: '/subPages/merchantChild/businessLicense/businessLicense',
@@ -305,7 +306,7 @@ function grindData(title: number) {
}) // 消息通知
break
case 7:
moveToWM()
// moveToWM()
break
case 8:
uni.navigateTo({
@@ -338,9 +339,9 @@ function grindData(title: number) {
case 16:
uni.navigateTo({ url: '/subPages/merchantChild/shareStore/shareStore' }) // 扫码进店
break
case 17:
isUpdate(1) // 检查更新
break
// case 17:
// isUpdate(1) // 检查更新
// break
case 18:
uni.navigateTo({ url: '/subPages/merchantChild/useInfo/useInfo' }) // 个人信息
break

View File

@@ -112,7 +112,6 @@ function userInfo() {
},
success: function (res) {
logOutFn();
// uni.navigateTo({ url: '/subPages/login/wxLogin/wxLogin' })
uni.reLaunch({ url: '/subPages/login/wxLogin/wxLogin' })
},
fail: () => {
@@ -125,9 +124,14 @@ function userInfo() {
* 切换门店
*/
function switchStore() {
uni.navigateTo({ url: "/subPages/switchStore/switchStore" });
console.log('你有反应吗')
uni.navigateTo({ url: "/subPages/switchStore/switchStore",
complete(res){
console.log('你有反应吗,为啥不跳转',JSON.stringify(res,undefined,4))
}
});
// store.commit('storeInfo/jxLoadingFn', true)
// console.log('切换门店11111111111')
// console.log('切换门店11111111111',JSON.stringify(uni.getSystemInfoSync(),undefined,4))
// openAppProduct({
// success: (res : any) => {
// console.log('切换门店,,,,,,,,success: ', JSON.stringify(res,undefined,4));

View File

@@ -22,7 +22,7 @@
:title="
item.vendorID == 1
? `【美团${item.orderDesc}】${item.userID === '0' ? '群发消息' : item.userID}`
: `【饿了么】${item.userID}`
: `【淘宝闪购】${item.userID}`
"
:avatar="
item.vendorID == 1

View File

@@ -36,7 +36,7 @@
<!-- <img src="https://image.jxc4.com/jxapp/z_send_normal.png" alt="" class="connectUser" @tap.stop="connectUser(item)"> -->
</view>
<view class="see-map" @tap.stop="callPhone(item)">拨打电话</view>
<view class="see-map" @tap.stop="connectUser(item)">发消息</view>
<view class="see-map" @tap.stop="connectUser(item)" v-if="item.vendorID === 1" >发消息</view>
<!-- <view class="phone">
<view>
<text v-if="item.consigneeMobile">临1</text>

View File

@@ -167,7 +167,7 @@ const vendorArr = ref<Array<vendorArrType>>([
{ id: -1, name: '全部' },
{ id: 0, name: '京东到家' },
{ id: 1, name: '美团外卖' },
{ id: 3, name: '饿百新零售' },
{ id: 3, name: '淘宝闪购新零售' },
{ id: 5, name: '京东商城' },
{ id: 9, name: '京西商城' },
])
@@ -183,7 +183,7 @@ const waybillVendorArr = ref<Array<vendorArrType>>([
{ id: -1, name: '全部' },
{ id: 0, name: '京东到家专送' },
{ id: 1, name: '美团专送' },
{ id: 3, name: '饿百专送' },
{ id: 3, name: '淘宝闪购专送' },
{ id: 101, name: '达达众包' },
{ id: 102, name: '美团配送' },
{ id: 103, name: '蜂鸟配送' },

View File

@@ -14,7 +14,7 @@
}
.icon-3 {
background-image: url(https://image.jxc4.com/image/9b6dc6f925111cf1d72175df9669c738.png)
background-image: url(https://image.jxc4.com/image/06a27a6503a6695824bf361ded5f1d45.png)
}
.icon-4 {

View File

@@ -42,7 +42,7 @@ export default {
/**
* 饿百im单聊状态
* 淘宝闪购im单聊状态
*/
imEbStatus(state: StoreInfoStoreType) {
return state.imOnlineStatus.filter(item => item.vendorID === 3)
@@ -55,7 +55,7 @@ export default {
imStatus(state: StoreInfoStoreType, getters: AnyObject) {
let str = ''
if (getters.imMtStatus.length > 0 && !getters.imMtStatus[0].errMsg && getters.imMtStatus[0].imStatus === 0) str = '美团'
if (getters.imEbStatus.length > 0 && !getters.imEbStatus[0].errMsg && getters.imEbStatus[0].imStatus === 0) str = str ? str + '/饿百':'饿百'
if (getters.imEbStatus.length > 0 && !getters.imEbStatus[0].errMsg && getters.imEbStatus[0].imStatus === 0) str = str ? str + '/淘宝闪购':'淘宝闪购'
return str
},

View File

@@ -16,22 +16,23 @@
<text>关于京西</text>
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
</view>
<view class="version" @tap="moreTap">
<!-- @tap="moreTap" -->
<view class="version" >
<text>当前版本</text>
<text class="version-num">𝑽 {{ oldVersion }}</text>
</view>
<view class="version-text" @tap="popup.open()">
<!-- <view class="version-text" @tap="popup.open()">
<text>版本说明</text>
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
</view>
</view> -->
<!-- ios不展示 -->
<view class="version-text" @tap="isUpdate(1)" v-if="isHuawei">
<!-- <view class="version-text" @tap="isUpdate(1)" v-if="isHuawei">
<text>检查更新</text>
<view>
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
<text v-if="isVarsion" class="newVarsion"></text>
</view>
</view>
</view> -->
</view>
</view>

View File

@@ -2,12 +2,16 @@
<!-- 状态栏 -->
<view class="status_bar"></view>
<!-- 导航栏 border -->
<uni-nav-bar left-icon="left" left-text="返回" :title="navTitle" rightWidth="200rpx" @clickLeft="clickLeft">
<!-- 导航栏 border :left-text=" isLogin ? '返回': '首页'" :title="navTitle"-->
<uni-nav-bar left-icon="left" rightWidth="200rpx" @clickLeft="clickLeft">
<view style="flex: 1;flex-direction: row;display: flex;align-items: center;justify-content: center;overflow: hidden;">
<text style="font-weight: bold;font-size: 36rpx;">{{ navTitle }}</text>
</view>
<template #right>
<view @tap="switchTerrace" class="switchTerrace">
<jx-icon icon="qiehuan" color="#2dd091" />
<text style="color: #2dd091"> 切换平台</text>
<text style="color: #2dd091;"> 切换平台</text>
</view>
</template>
</uni-nav-bar>
@@ -103,6 +107,7 @@ const {
agreement, // 是否同意协议
isAgreement, // 是否同意协议
clickLeft, // 点击返回
// isLogin, // 是否登录
} = weixinFn()
</script>

View File

@@ -3,7 +3,7 @@ import useGlobalFunc from "@/composables/useGlobalFunc";
import { store } from "@/store";
import { getStorage, setStorage } from "@/utils/storage";
import { onShow } from "@dcloudio/uni-app";
import { onBeforeUnmount, ref, Ref } from "vue";
import { computed, onBeforeUnmount, ref, Ref } from "vue";
import toast from "@/utils/toast";
@@ -167,11 +167,26 @@ function weixinFn() {
}
}
// const isLogin = computed(() => {
// return getStorage('token') ? true : false
// })
const clickLeft = (() => {
// console.log('点击返回,当前的登录状态',getStorage('token'))
// uni.navigateBack({
// delta: 1
// });
uni.navigateBack({
delta: 1
});
// if(isLogin.value){
// uni.navigateBack({
// delta: 1
// });
// }else{
// uni.switchTab({ url: '/pages/merchant/index' })
// }
})
@@ -197,6 +212,7 @@ function weixinFn() {
agreement, // 是否同意协议
isAgreement, // 是否同意协议
clickLeft, // 点击返回
// isLogin, // 是否登录
}
}

View File

@@ -1,5 +1,5 @@
import toast from "@/utils/toast";
import { ref } from "vue";
import { computed, ref } from "vue";
import useGlobalFunc from "@/composables/useGlobalFunc";
import { getStorage, setStorage } from "@/utils/storage";
import { store } from "@/store";
@@ -45,12 +45,15 @@ export default {
// } else {
// isWx.value = false
// }
uni.getProvider({
service: 'share',
success: function (res) {
// res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
isWx.value = res.provider[0] == 'weixin' ? true : false
}})
isWx.value = false
// // return
// uni.getProvider({
// service: 'share',
// success: function (res) {
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// isWx.value = res.provider[0] == 'weixin' ? true : false
// }})
}
/**
@@ -148,13 +151,29 @@ export default {
}
//#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 {
@@ -168,7 +187,8 @@ export default {
navTitle,
isWx,
getStorage,
clickLeft
clickLeft,
isLogin
}
}
}

View File

@@ -2,8 +2,11 @@
<!-- 状态栏 -->
<view class="status_bar"></view>
<!-- 导航栏 :border="false" -->
<uni-nav-bar left-icon="left" left-text="返回" :title="navTitle" rightWidth="200rpx" style="padding:10rpx 0" @clickLeft="clickLeft">
<!-- 导航栏 :border="false" :left-text=" isLogin ? '返回': '首页'" :title="navTitle"-->
<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;">
<text style="font-weight: bold;font-size: 36rpx;">{{ navTitle }}</text>
</view>
<template #right>
<view @tap="switchTerrace" class="switchTerrace">
<jx-icon icon="qiehuan" color="#2dd091" />

View File

@@ -28,10 +28,10 @@
</view>
<!-- 立即充值 -->
<view class="btn-root" v-if="isInstallWx">
<!-- <view class="btn-root" v-if="isInstallWx">
<view @tap="handleChargeNow(5)" class="btn store">品牌充值</view>
<view @tap="handleChargeNow(4)" class="btn">门店充值</view>
</view>
</view> -->
</template>
<script lang="ts" setup >
@@ -50,13 +50,13 @@ const deliveryList = ref<Array<AnyObject>>([])
*/
const isInstallWx = ref<boolean>(false)
onShow(() => {
uni.getProvider({
service: 'share',
success: function (res) {
// res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
isInstallWx.value = res.provider[0] == 'weixin' ? true : false
}
})
// uni.getProvider({
// service: 'share',
// success: function (res) {
// // res.provider[0] === 'weixin' ? 微信已经安装 : 微信尚未安装
// isInstallWx.value = res.provider[0] == 'weixin' ? true : false
// }
// })
// if (
// plus.runtime.isApplicationExist({

View File

@@ -122,8 +122,8 @@ export default {
async function saveInvoiceInfo() {
try {
let findItem = store.getters['storeInfo/platformInfo'].filter((item:AnyObject) => item.vendorID === 3)
if(findItem.length === 0) return toast('未绑定饿百门店',2)
// if(!ebStoreInfo || JSON.stringify(ebStoreInfo) === '{}') return toast('未绑定饿百门店')
if(findItem.length === 0) return toast('未绑定淘宝闪购门店',2)
// if(!ebStoreInfo || JSON.stringify(ebStoreInfo) === '{}') return toast('未绑定淘宝闪购门店')
if(+invoice_mode_index.value) invoiceInfo.value.invoice_mode = invoice_mode_array.value[invoice_mode_index.value].value
if(+invoice_material_index.value) invoiceInfo.value.invoice_material = invoice_material_array.value[invoice_material_index.value].value
if(+invoice_class_index.value) invoiceInfo.value.invoice_class = invoice_class_array.value[invoice_class_index.value].value

View File

@@ -176,6 +176,7 @@ function setUp() {
*/
const defaultPrinterValue = ref<string>('0')
const defaultPrinter = ref<Array<string>>(['蓝牙打印机', '网络打印机', '手动选择打印机'])
// const defaultPrinter = ref<Array<string>>(['网络打印机', '手动选择打印机'])
// 切换打印设备
function defaultPrinterChange(e: AnyObject) {
defaultPrinterValue.value = e.detail.value
@@ -430,12 +431,12 @@ function setUp() {
}
/**
* 蓝牙打印机设置
*/
function bluetoothPrinterSetUp() {
uni.navigateTo({ url: '/subPages/merchantChild/printerSetUp/printerSetUp' })
}
// /**
// * 蓝牙打印机设置
// */
// function bluetoothPrinterSetUp() {
// uni.navigateTo({ url: '/subPages/merchantChild/printerSetUp/printerSetUp' })
// }
/**
@@ -553,7 +554,7 @@ function setUp() {
copyRightFn, // 京西协议
// printerName, // 绑定的打印机品牌
// bindPrinter, // 绑定打印机
bluetoothPrinterSetUp, // 蓝牙打印机设置
// bluetoothPrinterSetUp, // 蓝牙打印机设置
switchUpc, // 是否打印Upc
newPrinterName, // 当前绑定打印机设备
DeletePrinterSeq, // 清空打印队列

View File

@@ -46,7 +46,7 @@
</view>
<!-- 默认使用打印机设备 -->
<view class="picking-root">
<!-- <view class="picking-root">
<picker
:value="defaultPrinterValue"
:range="defaultPrinter"
@@ -59,7 +59,7 @@
</view>
</view>
</picker>
</view>
</view> -->
<!-- 网络打印机设置 -->
<view class="inter-printer">
@@ -91,8 +91,8 @@
</view>
</view>
<!-- 蓝牙打印机设置 -->
<view class="bluetooth-printer">
<!-- 蓝牙打印机设置 只支持元服务 -->
<!-- <view class="bluetooth-printer">
<view class="title-tip">蓝牙打印机设置</view>
<view class="item" @tap="bluetoothPrinterSetUp">
<view>蓝牙打印机</view>
@@ -133,7 +133,7 @@
style="zoom: 0.85"
/>
</view>
</view>
</view> -->
<!-- 消息设置 -->
<view class="inter-printer" v-if="isExistMtStore || isExistEbStore">
@@ -150,7 +150,7 @@
<text v-else class="printer-name">未知状态</text>
</view>
<view class="item" v-if="isExistEbStore">
<view>饿百IM单聊状态</view>
<view>淘宝闪购IM单聊状态</view>
<switch
v-if="!store.getters['storeInfo/imEbStatus'][0].errMsg"
:checked="imEbStoreStatus"
@@ -174,7 +174,7 @@
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
</view>
<view class="item" v-if="isExistEbStore" @tap="jumpInvoiceSet">
<view>发票设置饿百</view>
<view>发票设置淘宝闪购</view>
<jx-icon icon="gengduo" color="rgb(220, 220, 220)"></jx-icon>
</view>
</view>
@@ -246,7 +246,7 @@ const {
copyRightFn, // 京西协议
// printerName, // 绑定的打印机品牌
// bindPrinter, // 绑定打印机
bluetoothPrinterSetUp, // 蓝牙打印机设置
// bluetoothPrinterSetUp, // 蓝牙打印机设置
switchUpc, // 是否打印Upc
newPrinterName, // 当前绑定打印机名字
DeletePrinterSeq, // 清空打印队列

View File

@@ -61,7 +61,8 @@ async function getStoreInfo() {
storeID: getStorage('storeID'),
}
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)
}
/**
@@ -116,7 +117,7 @@ async function shareStoreFn(
getQrCode(path)
} else if (vendorID == 3) {
// 饿了么
shareText.value = '饿了么/微信/支付宝扫码进店/'
shareText.value = '淘宝闪购/微信/支付宝扫码进店/'
share.value.open()
path = `https://h5.ele.me/newretail/p/shop/?&id=${vendorStoreID}`
getQrCode(path)

View File

@@ -56,7 +56,7 @@ const msgChatFn = function () {
title:
useData.vendorID == 1
? `【美团${useData.orderDesc}${useData.userID === '0' ? '群发消息' : useData.userID}`
: `饿了么${useData.userID}`,
: `淘宝闪购${useData.userID}`,
})
// 获取聊天数据

View File

@@ -39,8 +39,8 @@ const phoneList = ref<Array<PhoneListType>>([
mobild: phoneData.operatorPhone2,
},
{
icon: 'https://image.jxc4.com/image/8ac4b05dfef6b18639489d32cd421551.png',
company: '饿佰运营',
icon: 'https://image.jxc4.com/image/06a27a6503a6695824bf361ded5f1d45.png',
company: '淘宝闪购运营',
name: phoneData.operatorName3 || '暂无',
mobild: phoneData.operatorPhone3,
},

View File

@@ -56,6 +56,7 @@ function orderDetailFn() {
invoiceTitle.value = newData.invoiceTitle
invoiceTaxerID.value = newData.invoiceTaxerID
orderData.value = newData
// console.log('打印订单信息',JSON.stringify(orderData.value,undefined,4))
GetOrderInfo(newData, vendorOrderID)
} else {
uni.jxAlert({

View File

@@ -146,7 +146,7 @@
<!-- <img src="https://image.jxc4.com/jxapp/z_send_normal.png" alt="" class="connectUser"> -->
</view>
<view class="see-map" @tap.stop="callPhone(orderData)">拨打电话</view>
<view class="see-map" @tap.stop="realMobile">发消息</view>
<view class="see-map" @tap.stop="realMobile" v-if="orderData.vendorID === 1">发消息</view>
<!-- <view>
<text v-if="orderData.consigneeMobile" class="mobile">临1</text>
<text

View File

@@ -1,110 +0,0 @@
{
"id": "wtq-harmony",
"displayName": "wtq-harmony",
"version": "1.0.0",
"description": "wtq-harmony",
"keywords": [
"wtq-harmony"
],
"repository": "",
"engines": {
"HBuilderX": "^3.6.8",
"uni-app": "^3.1.0",
"uni-app-x": "^3.1.0"
},
"dcloudext": {
"type": "uts",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "",
"data": "",
"permissions": ""
},
"npmurl": "",
"darkmode": "-",
"i18n": "-",
"widescreen": "-"
},
"uni_modules": {
"uni-ext-api": {
"uni": {
"openAppProduct": {
"name": "openAppProduct",
"app": {
"js": false,
"kotlin": false,
"swift": false,
"arkts": true
}
}
}
},
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "-",
"aliyun": "-",
"alipay": "-"
},
"client": {
"uni-app": {
"vue": {
"vue2": "-",
"vue3": "-"
},
"web": {
"safari": "-",
"chrome": "-"
},
"app": {
"vue": "-",
"nvue": "-",
"android": "-",
"ios": "-",
"harmony": "-"
},
"mp": {
"weixin": "-",
"alipay": "-",
"toutiao": "-",
"baidu": "-",
"kuaishou": "-",
"jd": "-",
"harmony": "-",
"qq": "-",
"lark": "-"
},
"quickapp": {
"huawei": "-",
"union": "-"
}
},
"uni-app-x": {
"web": {
"safari": "-",
"chrome": "-"
},
"app": {
"android": "-",
"ios": "-",
"harmony": "-"
},
"mp": {
"weixin": "-"
}
}
}
}
}
}

View File

@@ -1,7 +0,0 @@
# wtq-harmony
### 开发文档
[UTS 语法](https://uniapp.dcloud.net.cn/tutorial/syntax-uts.html)
[UTS API插件](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html)
[UTS uni-app兼容模式组件](https://uniapp.dcloud.net.cn/plugin/uts-component.html)
[UTS 标准模式组件](https://doc.dcloud.net.cn/uni-app-x/plugin/uts-vue-component.html)
[Hello UTS](https://gitcode.net/dcloud/hello-uts)

View File

@@ -1,3 +0,0 @@
{
"minSdkVersion": "21"
}

View File

@@ -1,95 +0,0 @@
/**
* 引用 Android 系统库,示例如下:
* import { Context } from "android.content.Context";
* [可选实现,按需引入]
*/
/* 引入 interface.uts 文件中定义的变量 */
import { MyApiOptions, MyApiResult, MyApi, MyApiSync } from '../interface.uts';
/* 引入 unierror.uts 文件中定义的变量 */
import { MyApiFailImpl } from '../unierror';
/**
* 引入三方库
* [可选实现,按需引入]
*
* 在 Android 平台引入三方库有以下两种方式:
* 1、[推荐] 通过 仓储 方式引入,将 三方库的依赖信息 配置到 config.json 文件下的 dependencies 字段下。详细配置方式[详见](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html#dependencies)
* 2、直接引入将 三方库的aar或jar文件 放到libs目录下。更多信息[详见](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html#android%E5%B9%B3%E5%8F%B0%E5%8E%9F%E7%94%9F%E9%85%8D%E7%BD%AE)
*
* 在通过上述任意方式依赖三方库后,使用时需要在文件中 import如下示例
* import { LottieAnimationView } from 'com.airbnb.lottie.LottieAnimationView'
*/
/**
* UTSAndroid 为平台内置对象,不需要 import 可直接调用其API[详见](https://uniapp.dcloud.net.cn/uts/utsandroid.html#utsandroid)
*/
/**
* 异步方法
*
* uni-app项目中vue/nvue调用示例
* 1、引入方法声明 import { myApi } from "@/uni_modules/uts-api"
* 2、方法调用
* myApi({
* paramA: false,
* complete: (res) => {
* console.log(res)
* }
* });
* uni-app x项目uvue中调用示例
* 1、引入方法及参数声明 import { myApi, MyApiOptions } from "@/uni_modules/uts-api";
* 2、方法调用
* let options = {
* paramA: false,
* complete: (res : any) => {
* console.log(res)
* }
* } as MyApiOptions;
* myApi(options);
*
*/
export const myApi : MyApi = function (options : MyApiOptions) {
if (options.paramA == true) {
// 返回数据
const res : MyApiResult = {
fieldA: 85,
fieldB: true,
fieldC: 'some message'
};
options.success?.(res);
options.complete?.(res);
} else {
// 返回错误
const err = new MyApiFailImpl(9010001);
options.fail?.(err)
options.complete?.(err)
}
}
/**
* 同步方法
*
* uni-app项目中vue/nvue调用示例
* 1、引入方法声明 import { myApiSync } from "@/uni_modules/uts-api"
* 2、方法调用 myApiSync(true)
*
* uni-app x项目uvue中调用示例
* 1、引入方法及参数声明 import { myApiSync } from "@/uni_modules/uts-api";
* 2、方法调用 myApiSync(true)
*/
export const myApiSync : MyApiSync = function (paramA : boolean) : MyApiResult {
// 返回数据,根据插件功能获取实际的返回值
const res : MyApiResult = {
fieldA: 85,
fieldB: paramA,
fieldC: 'some message'
};
return res;
}
/**
* 更多插件开发的信息详见https://uniapp.dcloud.net.cn/plugin/uts-plugin.html
*/

View File

@@ -1,4 +0,0 @@
{
"dependencies": {
}
}

View File

@@ -1,72 +0,0 @@
import {
OpenAppProduct,
OpenAppProductOptions,
OpenAppProductSuccess,
OpenAppProductFail,
OpenAppProductComplete
} from '../interface.uts'
import bundleManager from '@ohos.bundle.bundleManager';
import vibrator from '@ohos.miscservice.Vibrator';
export {
OpenAppProduct,
OpenAppProductOptions,
OpenAppProductSuccess,
OpenAppProductFail,
OpenAppProductComplete,
}
import { productViewManager } from '@kit.StoreKit';
import { hilog } from '@kit.PerformanceAnalysisKit';
import type { common, Want } from '@kit.AbilityKit';
import { BusinessError } from '@kit.BasicServicesKit';
export function openAppProduct(options : OpenAppProductOptions) {
let isSuccess = true;
try {
const request : Want = {
parameters: {
// 此处填入要加载的应用包名,例如: bundleName: "com.huawei.hmsapp.appgallery"
bundleName: bundleManager.getBundleInfoForSelfSync(bundleManager.BundleFlag.GET_BUNDLE_INFO_DEFAULT).name // 加载当前包名
}
};
productViewManager.loadProduct(getContext() as common.UIAbilityContext, request, {
onError: (err : BusinessError) => {
isSuccess = false;
hilog.info(0, 'TAG', `loadProduct onError. code is ${err.code}, message is ${err.message}`);
let result : OpenAppProductFail = {
errMsg: err.message ?? ""
};
const completeResult : OpenAppProductComplete = {
errMsg: err.message ?? ""
}
options?.fail?.(result);
options?.complete?.(completeResult);
}
} as productViewManager.ProductViewCallback);
} catch (err) {
isSuccess = false;
hilog.error(0, 'TAG', `loadProduct failed. code is ${err.code}, message is ${err.message}`);
let result : OpenAppProductFail = {
errMsg: err.message ?? ""
};
const completeResult : OpenAppProductComplete = {
errMsg: err.message ?? ""
}
options?.fail?.(result);
options?.complete?.(completeResult);
}
// productViewManager.loadProduct 没有成功回调,故以此方式判断是否成功执行
if (isSuccess) {
let result : OpenAppProductSuccess = {
errMsg: "ok"
};
const completeResult : OpenAppProductComplete = {
errMsg: "ok"
}
options?.success?.(result);
options?.complete?.(completeResult);
}
}

View File

@@ -1,3 +0,0 @@
{
"deploymentTarget": "12"
}

View File

@@ -1,85 +0,0 @@
/**
* 引用 iOS 系统库,示例如下:
* import { UIDevice } from "UIKit";
* [可选实现,按需引入]
*/
/* 引入 interface.uts 文件中定义的变量 */
import { MyApiOptions, MyApiResult, MyApi, MyApiSync } from '../interface.uts';
/* 引入 unierror.uts 文件中定义的变量 */
import { MyApiFailImpl } from '../unierror';
/**
* 引入三方库
* [可选实现,按需引入]
*
* 在 iOS 平台引入三方库有以下两种方式:
* 1、通过引入三方库framework 或者.a 等方式,需要将 .framework 放到 ./Frameworks 目录下,将.a 放到 ./Libs 目录下。更多信息[详见](https://uniapp.dcloud.net.cn/plugin/uts-plugin.html#ios-平台原生配置)
* 2、通过 cocoaPods 方式引入,将要引入的 pod 信息配置到 config.json 文件下的 dependencies-pods 字段下。详细配置方式[详见](https://uniapp.dcloud.net.cn/plugin/uts-ios-cocoapods.html)
*
* 在通过上述任意方式依赖三方库后,使用时需要在文件中 import:
* 示例import { LottieLoopMode } from 'Lottie'
*/
/**
* UTSiOS 为平台内置对象,不需要 import 可直接调用其API[详见](https://uniapp.dcloud.net.cn/uts/utsios.html)
*/
/**
* 异步方法
*
* uni-app项目中vue/nvue调用示例
* 1、引入方法声明 import { myApi } from "@/uni_modules/uts-api"
* 2、方法调用
* myApi({
* paramA: false,
* complete: (res) => {
* console.log(res)
* }
* });
*
*/
export const myApi : MyApi = function (options : MyApiOptions) {
if (options.paramA == true) {
// 返回数据
const res : MyApiResult = {
fieldA: 85,
fieldB: true,
fieldC: 'some message'
};
options.success?.(res);
options.complete?.(res);
} else {
// 返回错误
let failResult = new MyApiFailImpl(9010001);
options.fail?.(failResult)
options.complete?.(failResult)
}
}
/**
* 同步方法
*
* uni-app项目中vue/nvue调用示例
* 1、引入方法声明 import { myApiSync } from "@/uni_modules/uts-api"
* 2、方法调用
* myApiSync(true);
*
*/
export const myApiSync : MyApiSync = function (paramA : boolean) : MyApiResult {
// 返回数据,根据插件功能获取实际的返回值
const res : MyApiResult = {
fieldA: 85,
fieldB: paramA,
fieldC: 'some message'
};
return res;
}
/**
* 更多插件开发的信息详见https://uniapp.dcloud.net.cn/plugin/uts-plugin.html
*/

View File

@@ -1,54 +0,0 @@
export interface Uni {
/**
* openAppProduct()
* @description
* 跳转应用市场详情页
* @param {OpenAppProductOptions} options
* @return {void}
* @example
```typescript
uni.openAppProduct({});
```
*/
openAppProduct(options : OpenAppProductOptions) : void;
}
export type OpenAppProduct = (options : OpenAppProductOptions) => void;
export type OpenAppProductSuccess = {
/**
* 错误信息
*/
errMsg : string
};
export type OpenAppProductSuccessCallback = (result : OpenAppProductSuccess) => void;
export type OpenAppProductFail = {
/**
* 错误信息
*/
errMsg : string
};
export type OpenAppProductFailCallback = (result : OpenAppProductFail) => void;
export type OpenAppProductComplete = {
/**
* 错误信息
*/
errMsg : string
};
export type OpenAppProductCompleteCallback = (result : OpenAppProductComplete) => void;
export type OpenAppProductOptions = {
/**
* 接口调用成功的回调函数
* @defaultValue null
*/
success ?: OpenAppProductSuccessCallback | null,
/**
* 接口调用失败的回调函数
* @defaultValue null
*/
fail ?: OpenAppProductFailCallback | null,
/**
* 接口调用结束的回调函数(调用成功、失败都会执行)
* @defaultValue null
*/
complete ?: OpenAppProductCompleteCallback | null
};

View File

@@ -1,41 +0,0 @@
/* 此规范为 uni 规范,可以按照自己的需要选择是否实现 */
import { MyApiErrorCode, MyApiFail } from "./interface.uts"
/**
* 错误主题
* 注意:错误主题一般为插件名称,每个组件不同,需要使用时请更改。
* [可选实现]
*/
export const UniErrorSubject = 'uts-api';
/**
* 错误信息
* @UniError
* [可选实现]
*/
export const MyAPIErrors : Map<MyApiErrorCode, string> = new Map([
/**
* 错误码及对应的错误信息
*/
[9010001, 'custom error mseeage1'],
[9010002, 'custom error mseeage2'],
]);
/**
* 错误对象实现
*/
export class MyApiFailImpl extends UniError implements MyApiFail {
override errCode: MyApiErrorCode
/**
* 错误对象构造函数
*/
constructor(errCode : MyApiErrorCode) {
super();
this.errSubject = UniErrorSubject;
this.errCode = errCode;
this.errMsg = MyAPIErrors.get(errCode) ?? "";
}
}

View File

@@ -16,6 +16,8 @@ class Bluetooth {
}
//初始化蓝牙模块,检查蓝牙是否已打开
openBluetoothAdapter() {
return
return new Promise((resolve, reject) => {
uni.openBluetoothAdapter({
success: res => {

View File

@@ -77,7 +77,7 @@ const printerTemplate = async function (data: AnyObject) {
.setSize(1, 2)
.setAlign('ct')
.printArrayP(30)
.print(`饿百取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
.print(`淘宝闪购取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
}
// 分割线
@@ -240,7 +240,7 @@ const printerTemplate = async function (data: AnyObject) {
.setSize(1, 2)
.setAlign('ct')
.printArrayP(30)
.print(`饿百取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
.print(`淘宝闪购取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
}
// 分割线
@@ -419,7 +419,7 @@ const printerTemplate = async function (data: AnyObject) {
.setAlign('ct')
.setBold(true)
.printArrayP(30)
.print(`饿百取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
.print(`淘宝闪购取货码: ${tmpOrder.vendorOrderID2.slice(tmpOrder.vendorOrderID2.length - 4)}`)
}
// 分割线
@@ -591,10 +591,10 @@ function vendorID2(vendorID: number) {
return '京东到家'
case 1:
return '美团外卖'
case 2:
return '饿了么'
// case 2:
// return '淘宝闪购'
case 3:
return '饿百新零售'
return '淘宝闪购新零售'
case 5:
return '京东商城'
case 9:

View File

@@ -162,10 +162,10 @@ export default {
"-4": "已删除"
},
"ebaiSupplierID": {
"2233065879": "饿百好菜",
"2267230126": "饿百果园",
"1921188187760": "饿百商超",
"22267134648": "饿百菜市"
"2233065879": "淘宝闪购好菜",
"2267230126": "淘宝闪购果园",
"1921188187760": "淘宝闪购商超",
"22267134648": "淘宝闪购菜市"
},
"ebaiSupplierInfo": {
"2233065879": {
@@ -359,7 +359,7 @@ export default {
"userApplyCancelWaitMinute": 30
},
"3": {
"chineseName": "饿百新零售",
"chineseName": "淘宝闪购新零售",
"userApplyCancelWaitMinute": 15
}
},
@@ -478,8 +478,8 @@ export default {
"vendorName": {
"0": "京东到家",
"1": "美团外卖",
"2": "饿了么",
"3": "饿百新零售",
// "2": "淘宝闪购",
"3": "淘宝闪购新零售",
"4": "银豹",
"5": "京东商城",
"9": "京西商城",