1.对接桌码

2.对接消息通知
3.对接扫码分配二维码
huipay-app-dev
杨杰 1 year ago
parent 704f9ec888
commit 0b7da8dfcf
  1. 3
      App.vue
  2. 21
      Utils/Api.js
  3. 166
      components/downloadUp.vue
  4. 170
      manifest.json
  5. 16
      pages/index/bindScan/bindScan.vue
  6. 18
      pages/index/merchant-details/merchant-details.vue
  7. 24
      pages/index/salesOrderList/salesOrderList.vue
  8. 18
      pages/index/scanCodeAllocation/scanCodeAllocation.vue
  9. 6
      pages/tabBar/home/home.vue

@ -60,8 +60,7 @@
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
uni.setStorageSync('platform', res.platform); uni.setStorageSync('platform', res.platform);
plus.runtime.getProperty(plus.runtime.appid, function(inf) { plus.runtime.getProperty(plus.runtime.appid, function(inf) {
uni.setStorageSync('version', inf.version); // uni.setStorageSync('version', inf.versionCode);
uni.setStorageSync('versionCode', inf.versionCode); //
}); });
let uuid = plus.device.uuid; let uuid = plus.device.uuid;

@ -177,18 +177,6 @@ export const deviceRefund = params => {
// //门店添加设备
// export const bindStoreDevice = params => {
// return POST('POST', `${base}/device/bindStoreDevice`, params).then(res => res.data);
// }
// //业务员查询设备列表
// export const getSalesmanDeviceList = params => {
// return POST('GET', `${base}/device/getSalesmanDeviceList`, params).then(res => res.data);
// }
// //门店查询设备列表
// export const getStoreDeviceList = params => {
// return POST('GET', `${base}/device/getStoreDeviceList`, params).then(res => res.data);
// }
//业务员查询统计 //业务员查询统计
export const moveHomeCount = params => { export const moveHomeCount = params => {
@ -282,7 +270,16 @@ export const uniPush = params => {
export const connectStoreCid = params => { export const connectStoreCid = params => {
return POST('POST', `${base}/storeCid/connectStoreCid`, params).then(res => res.data); return POST('POST', `${base}/storeCid/connectStoreCid`, params).then(res => res.data);
} }
//解除绑定
export const unbindStore = params => {
return POST('POST', `${base}/payQrCode/unbindStore`, params).then(res => res.data);
}
//结束播报语音 //结束播报语音
export const voiceSucceed = params => { export const voiceSucceed = params => {
return POST('GET', `${base}/storeCid/voiceSucceed`, params).then(res => res.data); return POST('GET', `${base}/storeCid/voiceSucceed`, params).then(res => res.data);
} }
//查询版本号?termType=APP
export const queryVersion = params => {
return POST('GET', `${base}/sysVersion/queryVersion`, params).then(res => res.data);
}

@ -2,21 +2,24 @@
<view class="content" v-if="bannerShow"> <view class="content" v-if="bannerShow">
<!-- 弹出层 --> <!-- 弹出层 -->
<view class="uni-banner"> <view class="uni-banner">
<image src="/static/img/startUpHeader01.png" class="startUpHeaderLogo" /> <!-- <image src="../static/logo.png" class="startUpHeaderLogo" /> -->
<view class="banner_box"> <view class="banner_box">
<view class="startUpHeaderBox h6">发现新版本</view> <view class="startUpHeaderBox h6">发现新版本</view>
<view class="conter">{{ msg }}</view> <view class="conter">{{ msg }}</view>
<view class="banner_foot"><button @click="goUpdate(updateApkObj)" class="banner_foot_button">前往升级</button></view> <view class="banner_foot"><button @click="goUpdate()" class="banner_foot_button">前往升级</button></view>
</view> </view>
</view> </view>
<view class="uni-mask"></view> <view class="uni-mask"></view>
</view> </view>
</template> </template>
<script> <script>
import { comparisonVersionHandler } from '@/common/js/tools'; // import {
import { getUpgrade } from '@/common/js/apis'; // getUpgrade
// } from '@/common/js/apis';
export default { import {
queryVersion
} from '../Utils/Api.js'
export default {
data() { data() {
return { return {
bannerShow: false, // app bannerShow: false, // app
@ -28,42 +31,36 @@ export default {
created() { created() {
const appUpdate = uni.getStorageSync('platform'); const appUpdate = uni.getStorageSync('platform');
// #ifdef APP-PLUS // #ifdef APP-PLUS
this.type = appUpdate == 'android' ? 2 : 1;
this.checkUpdate(); this.checkUpdate();
// #endif // #endif
}, },
methods: { methods: {
checkUpdate() { checkUpdate() {
const self = this, let that = this;
localAppVersonName = uni.getStorageSync('version'), let localAppVersonName = uni.getStorageSync('version');
localAppVerson = uni.getStorageSync('versionCode');
// #ifdef APP-PLUS // #ifdef APP-PLUS
plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { let datas = {
getUpgrade({ termType: "app"
appType: self.type }
}).then(res => { queryVersion(datas).then(res => {
const { data } = res.data; if (res.return_code == '000000') {
if (res.data.code !== '200') return; if (res.return_data.versionType == 1 && that.comparisonVersionHandler(localAppVersonName,
// res.return_data.version)) {
if (data.apkVersion && comparisonVersionHandler(localAppVersonName, data.apkVersion.appVersonName)) { that.downloadWgt(res.return_data.fileUrl);
uni.hideTabBar()
self.updateApkObj = data.apkVersion;
self.msg = data.apkVersion.versonLog;
self.bannerShow = true;
return;
// app
} else if (data.wgtVersion && comparisonVersionHandler(localAppVerson, data.wgtVersion.appVerson)) {
self.downloadWgt(data.wgtVersion.downloadUrl);
return; return;
} else { }
if (res.return_data.versionType == 2 && that.comparisonVersionHandler(localAppVersonName,
res.return_data.version)) {
that.updateApkObj = res.return_data;
that.bannerShow = true; //
return; return;
} }
}); }
}); })
// #endif // #endif
}, },
downloadWgt(updateWgtUrl) { downloadWgt(updateWgtUrl) {
// //
// wgt // wgt
@ -72,8 +69,7 @@ export default {
plus.nativeUI.showWaiting('正在更新...'); plus.nativeUI.showWaiting('正在更新...');
plus.downloader plus.downloader
.createDownload( .createDownload(
updateWgtUrl, updateWgtUrl, {
{
filename: '_doc/update/' filename: '_doc/update/'
}, },
function(d, status) { function(d, status) {
@ -89,8 +85,9 @@ export default {
// wgt // wgt
plus.nativeUI.showWaiting('安装文件...'); plus.nativeUI.showWaiting('安装文件...');
plus.runtime.install( plus.runtime.install(
path, path, {
{ force: true }, force: true
},
function() { function() {
plus.nativeUI.closeWaiting(); plus.nativeUI.closeWaiting();
plus.nativeUI.alert('应用资源更新完成!', function() { plus.nativeUI.alert('应用资源更新完成!', function() {
@ -102,14 +99,17 @@ export default {
} }
); );
}, },
goUpdate(updateApkObj) { goUpdate() {
if (this.type == 2) { if (this.type == 2) {
// //
var dtask = plus.downloader.createDownload(updateApkObj.downloadUrl, {}, function(d, status) { var dtask = plus.downloader.createDownload(
this.updateApkObj.fileUrl, {},
function(d, status) {
this.bannerShow = false; this.bannerShow = false;
// //
if (status == 200) { if (status == 200) {
plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), {}, {}, function(error) { plus.runtime.install(plus.io.convertLocalFileSystemURL(d.filename), {}, {}, function(
error) {
uni.showToast({ uni.showToast({
title: '安装失败', title: '安装失败',
mask: false, mask: false,
@ -138,7 +138,8 @@ export default {
showLoading.setTitle('已连接到服务器'); showLoading.setTitle('已连接到服务器');
break; break;
case 3: case 3:
prg = parseInt((parseFloat(task.downloadedSize) / parseFloat(task.totalSize)) * 100); prg = parseInt((parseFloat(task.downloadedSize) / parseFloat(task.totalSize)) *
100);
showLoading.setTitle(' 正在下载' + prg + '% '); showLoading.setTitle(' 正在下载' + prg + '% ');
break; break;
case 4: case 4:
@ -158,26 +159,55 @@ export default {
} else if (this.type == 1) { // iosapp store } else if (this.type == 1) { // iosapp store
plus.runtime.openURL(updateApkObj.downloadUrl); plus.runtime.openURL(updateApkObj.downloadUrl);
} }
},
//
comparisonVersionHandler(reqV, curV) {
/*
curV string :当前最新
reqV string :之前
返回 true 表示需要升级
*/
if (curV && reqV) {
curV = String(curV);
reqV = String(reqV);
//
let arr1 = curV.split('.'), //
arr2 = reqV.split('.');
let minLength = Math.min(arr1.length, arr2.length),
position = 0,
diff = 0;
//
while (position < minLength && ((diff = parseInt(arr1[position]) - parseInt(arr2[position])) == 0)) {
position++;
}
diff = (diff != 0) ? diff : (arr1.length - arr2.length);
//curVreqVtrue
return diff > 0;
} else {
//
return false;
} }
} }
}; }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.content, .content,
#img { #img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.content .con { .content .con {
font-size: 0; font-size: 0;
display: flex; display: flex;
align-items: center; align-items: center;
} }
#info { #info {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
@ -189,24 +219,24 @@ export default {
text-align: center; text-align: center;
color: #fff; color: #fff;
font-size: 24rpx; font-size: 24rpx;
} }
.wrapper { .wrapper {
width: 36rpx; width: 36rpx;
height: 72rpx; height: 72rpx;
position: absolute; position: absolute;
top: 0; top: 0;
overflow: hidden; overflow: hidden;
} }
.right { .right {
right: 0; right: 0;
} }
.left { .left {
left: 0; left: 0;
} }
@ -214,8 +244,8 @@ export default {
/* 弹出层形式的广告 */ /* 弹出层形式的广告 */
.uni-banner { .uni-banner {
display: flex; display: flex;
align-items: center; align-items: center;
flex-direction: column; flex-direction: column;
@ -240,33 +270,33 @@ export default {
.startUpHeaderBox { .startUpHeaderBox {
width: 100%; width: 100%;
height: 96rpx; height: 96rpx;
background-image: url('/static/img/startUpHeader02.png'); background-image: url('/static/logo.png');
background-position: left top; background-position: left top;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
} }
} }
.banner_box .h6 { .banner_box .h6 {
text-align: center; text-align: center;
line-height: 96rpx; line-height: 96rpx;
font-size: 36rpx; font-size: 36rpx;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
} }
.banner_box .conter { .banner_box .conter {
font-size: 28rpx; font-size: 28rpx;
color: #333; color: #333;
margin: 48rpx; margin: 48rpx;
} }
.banner_foot { .banner_foot {
width: 238rpx; width: 238rpx;
margin: 48rpx auto; margin: 48rpx auto;
} }
.banner_foot_button { .banner_foot_button {
background-image: linear-gradient(to right, #3aaf7a, #41bf7f); background-image: linear-gradient(to right, #3aaf7a, #41bf7f);
line-height: 72rpx; line-height: 72rpx;
height: 72rpx; height: 72rpx;
@ -276,13 +306,13 @@ export default {
border-radius: 40rpx; border-radius: 40rpx;
border: none; border: none;
box-shadow: 0 8rpx 20rpx 0 rgba(46, 189, 88, 0.36); box-shadow: 0 8rpx 20rpx 0 rgba(46, 189, 88, 0.36);
} }
.banner_foot_button:active { .banner_foot_button:active {
background-image: linear-gradient(to right, #41bf7f, #3aaf7a); background-image: linear-gradient(to right, #41bf7f, #3aaf7a);
} }
.uni-mask { .uni-mask {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
position: fixed; position: fixed;
width: 100%; width: 100%;
@ -290,5 +320,5 @@ export default {
left: 0; left: 0;
top: 0; top: 0;
z-index: 2; z-index: 2;
} }
</style> </style>

@ -1,30 +1,30 @@
{ {
"name" : "惠支付", "name": "惠支付",
"appid" : "__UNI__190622D", "appid": "__UNI__190622D",
"description" : "", "description": "",
"versionName" : "1.0.0", "versionName": "1.0.0",
"versionCode" : "100", "versionCode": 101,
"transformPx" : false, "transformPx": false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus": {
"usingComponents" : true, "usingComponents": true,
"nvueStyleCompiler" : "uni-app", "nvueStyleCompiler": "uni-app",
"compilerVersion" : 3, "compilerVersion": 3,
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
/* */ /* */
"modules" : { "modules": {
"Push" : {} "Push": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
/* android */ /* android */
"android" : { "android": {
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.VIBRATE\"/>", "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
@ -43,91 +43,91 @@
] ]
}, },
/* ios */ /* ios */
"ios" : { "ios": {
"dSYMs" : false "dSYMs": false
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs": {
"push" : { "push": {
"unipush" : { "unipush": {
"offline" : false, "offline": false,
"hms" : {} "hms": {}
} }
}, },
"ad" : {} "ad": {}
}, },
"icons" : { "icons": {
"android" : { "android": {
"hdpi" : "unpackage/res/icons/72x72.png", "hdpi": "unpackage/res/icons/72x72.png",
"xhdpi" : "unpackage/res/icons/96x96.png", "xhdpi": "unpackage/res/icons/96x96.png",
"xxhdpi" : "unpackage/res/icons/144x144.png", "xxhdpi": "unpackage/res/icons/144x144.png",
"xxxhdpi" : "unpackage/res/icons/192x192.png" "xxxhdpi": "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios": {
"appstore" : "unpackage/res/icons/1024x1024.png", "appstore": "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad": {
"app" : "unpackage/res/icons/76x76.png", "app": "unpackage/res/icons/76x76.png",
"app@2x" : "unpackage/res/icons/152x152.png", "app@2x": "unpackage/res/icons/152x152.png",
"notification" : "unpackage/res/icons/20x20.png", "notification": "unpackage/res/icons/20x20.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"proapp@2x" : "unpackage/res/icons/167x167.png", "proapp@2x": "unpackage/res/icons/167x167.png",
"settings" : "unpackage/res/icons/29x29.png", "settings": "unpackage/res/icons/29x29.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"spotlight" : "unpackage/res/icons/40x40.png", "spotlight": "unpackage/res/icons/40x40.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png" "spotlight@2x": "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone": {
"app@2x" : "unpackage/res/icons/120x120.png", "app@2x": "unpackage/res/icons/120x120.png",
"app@3x" : "unpackage/res/icons/180x180.png", "app@3x": "unpackage/res/icons/180x180.png",
"notification@2x" : "unpackage/res/icons/40x40.png", "notification@2x": "unpackage/res/icons/40x40.png",
"notification@3x" : "unpackage/res/icons/60x60.png", "notification@3x": "unpackage/res/icons/60x60.png",
"settings@2x" : "unpackage/res/icons/58x58.png", "settings@2x": "unpackage/res/icons/58x58.png",
"settings@3x" : "unpackage/res/icons/87x87.png", "settings@3x": "unpackage/res/icons/87x87.png",
"spotlight@2x" : "unpackage/res/icons/80x80.png", "spotlight@2x": "unpackage/res/icons/80x80.png",
"spotlight@3x" : "unpackage/res/icons/120x120.png" "spotlight@3x": "unpackage/res/icons/120x120.png"
} }
} }
} }
} }
}, },
/* */ /* */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "", "appid": "",
"setting" : { "setting": {
"urlCheck" : false "urlCheck": false
}, },
"usingComponents" : true "usingComponents": true
}, },
"mp-alipay" : { "mp-alipay": {
"usingComponents" : true "usingComponents": true
}, },
"mp-baidu" : { "mp-baidu": {
"usingComponents" : true "usingComponents": true
}, },
"mp-toutiao" : { "mp-toutiao": {
"usingComponents" : true "usingComponents": true
}, },
"uniStatistics" : { "uniStatistics": {
"enable" : false "enable": false
}, },
"vueVersion" : "2", "vueVersion": "2",
"h5" : { "h5": {
"router" : { "router": {
"base" : "/cweb", "base": "/cweb",
"mode" : "hash" "mode": "hash"
}, },
"title" : "惠支付", "title": "惠支付",
"devServer" : { "devServer": {
"https" : false "https": false
}, },
"sdkConfigs" : { "sdkConfigs": {
"maps" : { "maps": {
"qqmap" : { "qqmap": {
"key" : "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" "key": "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB"
}
} }
} }
},
} }
} }

@ -17,16 +17,16 @@
<view class="mart10 fcor666 padleft15 font14" v-else>创建: {{item.createTime | timeFormat('yyyy-mm-dd')}} <view class="mart10 fcor666 padleft15 font14" v-else>创建: {{item.createTime | timeFormat('yyyy-mm-dd')}}
{{item.createTime | timeFormat('hh:mm')}} {{item.createTime | timeFormat('hh:mm')}}
</view> </view>
<button class="btns" @click="bindStore(item.id)" v-if="typeId == 1">绑定二维码</button> <button class="btns" @click="unbindStore(item.id)">解除绑定</button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
bindStore,
getSalesmanQrCodeList, getSalesmanQrCodeList,
getStoreQrCodeList getStoreQrCodeList,
unbindStore
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
@ -135,12 +135,12 @@
} }
}); });
}, },
// //
bindStore(item) { unbindStore(item) {
let that = this; let that = this;
uni.showModal({ uni.showModal({
title: '绑二维码', title: '绑二维码',
content: '是否绑当前二维码。', content: '是否绑当前二维码。',
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
uni.showLoading({ uni.showLoading({
@ -150,7 +150,7 @@
"qrCodeId": item, "qrCodeId": item,
"storeId": that.storeId "storeId": that.storeId
} }
bindStore(params).then(res => { unbindStore(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({

@ -90,7 +90,7 @@
<view class="margle10 font14 fcor999 width90p">{{item.storeRegion.address}}</view> <view class="margle10 font14 fcor999 width90p">{{item.storeRegion.address}}</view>
</view> </view>
<view class="height45 width100"> <view class="height45 width100">
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,1)">绑定二维码</button> <button class="btns mart10 margle10" @click.stop="jumpBindScan(item,1)">绑定二维码</button>
<button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,2)">二维码列表</button> <button class="btns mart10 margle10" @click.stop="jumpBindScan(item.id,2)">二维码列表</button>
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,1)">绑定设备</button> --> <!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,1)">绑定设备</button> -->
<!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,2)">设备列表</button> --> <!-- <button class="btns mart10 marRight10" @click.stop="jumpService(item.id,2)">设备列表</button> -->
@ -199,10 +199,26 @@
}, },
// //
jumpBindScan(item, items) { jumpBindScan(item, items) {
if (items == 1) {
//
uni.scanCode({
success: function(res) {
let scanCont = res.result.split('=');
let scanNo = scanCont[1];
uni.navigateTo({
url: '/pages/index/scanCodeAllocation/scanCodeAllocation?storename=' +
item.name + '&scanno=' + scanNo +
'&storeId=' + item.id
})
}
});
} else {
uni.navigateTo({ uni.navigateTo({
url: '../bindScan/bindScan?storeid=' + item + '&type=' + items url: '../bindScan/bindScan?storeid=' + item + '&type=' + items
}) })
} }
}
} }
} }
</script> </script>

@ -29,17 +29,12 @@
<view class="margle10 font13 fcor999">申请数量: 1</view> <view class="margle10 font13 fcor999">申请数量: 1</view>
</view> </view>
<view class="width90 paddbotm10 alijusstart"> <view class="width90 paddbotm10 alijusstart">
<view class="otstatucs border-r marRight10" @click.stop="scanNo(item)"
v-if="item.status == 2 && item.deviceType == 2">
分配桌码
</view>
<view class="otstatucs border-r marRight10" @click.stop="orderRefund(item.orderNo)" <view class="otstatucs border-r marRight10" @click.stop="orderRefund(item.orderNo)"
v-if="item.status == 2 && item.deviceType == 1"> v-if="item.status == 2">
订单退款 订单退款
</view> </view>
<view class="otstatucs border-r marRight10" @click.stop="replace(item.orderAssignList[0].id)" <view class="otstatucs border-r marRight10" @click.stop="replace(item.orderAssignList[0].id)"
v-if="item.status == 3 && item.deviceType == 1"> v-if="item.status == 3">
更换设备 更换设备
</view> </view>
</view> </view>
@ -134,21 +129,6 @@
} }
}) })
}, },
//
scanNo(item) {
//
uni.scanCode({
success: function(res) {
let scanCont = res.result.split('=');
let scanNo = scanCont[1];
uni.navigateTo({
url: '/pages/index/scanCodeAllocation/scanCodeAllocation?storename=' +
item.storeName + '&scanno=' + scanNo + '&orderno=' + item.orderNo
})
}
});
},
// //
jumpService(item) { jumpService(item) {
if (this.goodtyid == 2) { if (this.goodtyid == 2) {

@ -11,30 +11,30 @@
<view class="font14 fcor333 text2 width75 fotrt">{{scanNo}}</view> <view class="font14 fcor333 text2 width75 fotrt">{{scanNo}}</view>
</view> </view>
<view class="btn" @tap="assignOrder">提交绑定</view> <view class="btn" @tap="bindStore">提交绑定</view>
</view> </view>
</template> </template>
<script> <script>
import { import {
assignOrder bindStore
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
export default { export default {
data() { data() {
return { return {
scanNo: '', //, scanNo: '', //,
storeName: '', // storeName: '', //
orderNo: '' // storeId: '' //
} }
}, },
onLoad(options) { onLoad(options) {
this.scanNo = options.scanno; this.scanNo = options.scanno;
this.storeName = options.storename; this.storeName = options.storename;
this.orderNo = options.orderno; this.storeId = options.storeId;
}, },
methods: { methods: {
// //
assignOrder() { bindStore() {
uni.showModal({ uni.showModal({
title: '温馨提示', title: '温馨提示',
content: '是否分配当前设备', content: '是否分配当前设备',
@ -43,13 +43,11 @@
uni.showLoading({ uni.showLoading({
title: '加载中' title: '加载中'
}) })
let serviceList = [];
serviceList.push(this.scanNo);
let datas = { let datas = {
"orderNo": this.orderNo, "serialNumber": this.scanNo,
"deviceNoList": serviceList "storeId": this.storeId
} }
assignOrder(datas).then(res => { bindStore(datas).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({

@ -64,6 +64,8 @@
</view> </view>
</view> </view>
<view class="width100 height40p"></view> <view class="width100 height40p"></view>
<downloadup></downloadup>
</view> </view>
</template> </template>
@ -76,8 +78,12 @@
connectStoreCid, connectStoreCid,
voiceSucceed voiceSucceed
} from '../../../Utils/Api.js' } from '../../../Utils/Api.js'
import downloadup from '../../../components/downloadUp.vue'
let app = getApp(); let app = getApp();
export default { export default {
components: {
downloadup
},
data() { data() {
return { return {
funcList: [], funcList: [],

Loading…
Cancel
Save