aaa
This commit is contained in:
parent
18421bc31b
commit
984d221e2e
|
@ -72,8 +72,15 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
this.deviceNo = res.result;
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
this.deviceNo = getQueryParam(decodedValue, 'deviceNo')
|
||||
// this.deviceNo = res.result;
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
|
|
|
@ -167,11 +167,19 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
this.$u.get(`/app/device/${res.result}/bySn`).then((res) =>{
|
||||
// console.log('扫描结果:', res);
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
||||
this.$u.get(`/app/device/${id}/bySn`).then((res) =>{
|
||||
if(res.code == 200){
|
||||
this.qrResult = 'CTKG-' + res.data.mac
|
||||
|
||||
// console.log(this.qrResult);
|
||||
// uni.navigateTo({
|
||||
// url:'/page_fenbao/device/lianjie?mac=' + this.qrResult + '&storeId=' + this.storeId
|
||||
// })
|
||||
|
|
|
@ -88,9 +88,17 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
let id = res.result
|
||||
this.$u.get(`/app/device/${res.result}/withSuitList`).then((res) =>{
|
||||
// console.log('扫描结果:', res);
|
||||
// let id = res.result
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
||||
this.$u.get(`/app/device/${id}/withSuitList`).then((res) =>{
|
||||
if(res.code == 200){
|
||||
uni.navigateTo({
|
||||
url: '/page_components/fuwu/index?id=' + id
|
||||
|
@ -295,13 +303,14 @@
|
|||
width: 150rpx;
|
||||
height: 134rpx;
|
||||
// background-color: #D9D8FF;
|
||||
border-radius: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
// margin-right: 28rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
mode: "aspectFill";
|
||||
margin-top: 10rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
}
|
||||
.cen{
|
||||
|
|
|
@ -102,8 +102,15 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
this.qrResult = res.result; // 将扫描结果存储在数据中
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
this.qrResult = getQueryParam(decodedValue, 'deviceNo')
|
||||
// this.qrResult = res.result; // 将扫描结果存储在数据中
|
||||
},
|
||||
fail: err => {
|
||||
console.error('扫描失败:', err);
|
||||
|
|
|
@ -483,6 +483,8 @@
|
|||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
console.log('扫描结果:', res);
|
||||
|
||||
|
||||
this.qrResult = res.result;
|
||||
// this.$u.get(`/app/device/${this.qrResult}/withSuitList`).then((res) =>{
|
||||
// if(res.code == 200){
|
||||
|
|
|
@ -128,9 +128,15 @@
|
|||
onlyFromCamera: true,
|
||||
scanType: ['qrCode'],
|
||||
success: res => {
|
||||
// console.log('扫描结果:', res);
|
||||
let id = res.result
|
||||
this.$u.get(`/app/device/${res.result}/withSuitList`).then((res) => {
|
||||
function getQueryParam(url, paramName) {
|
||||
let regex = new RegExp(`[?&]${paramName}=([^&]*)`);
|
||||
let results = regex.exec(url);
|
||||
return results ? decodeURIComponent(results[1].replace(/\+/g, ' ')) : null;
|
||||
}
|
||||
let sceneValue = res.result
|
||||
let decodedValue = decodeURIComponent(sceneValue);
|
||||
let id = getQueryParam(decodedValue, 'deviceNo')
|
||||
this.$u.get(`/app/device/${id}/withSuitList`).then((res) => {
|
||||
if (res.code == 200) {
|
||||
uni.navigateTo({
|
||||
url: '/page_components/fuwu/index?id=' + id
|
||||
|
|
Loading…
Reference in New Issue
Block a user