小程序编译0.0.0
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<template>
|
||||
<view class="content">
|
||||
<navseat :opacity='false' :title='"开票审核"' :titleshow='true' :iconshow='false' :heightshow='true'
|
||||
:namecolor='"#fff"' iconcolor='#fff'></navseat>
|
||||
<view class="content_top">
|
||||
<view :class="form.user_type == 1 ? 'content_topview':''" @click="clickakex(1)">
|
||||
个人
|
||||
@@ -52,7 +54,8 @@
|
||||
<image :src="form.img" style="width: 100%; height: 100%;" mode=""></image>
|
||||
</view>
|
||||
<view class="Box_boxtow" v-else>
|
||||
<image src="@/static/xj.png" style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
<image src="https://czg-invoicing.oss-cn-beijing.aliyuncs.com/static/xj.png"
|
||||
style="width: 60rpx;height: 58rpx;" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="preservation flex-colum">
|
||||
@@ -69,7 +72,12 @@
|
||||
|
||||
<script>
|
||||
import _ from 'lodash'
|
||||
import navseat from '@/components/navseat.vue'
|
||||
import uploadImage from "@/js_sdk/yushijie-ossutil/ossutil/uploadFile.js";
|
||||
export default {
|
||||
components: {
|
||||
navseat
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
showtext: 0,
|
||||
@@ -87,28 +95,61 @@
|
||||
status_note: '', //原因备注
|
||||
price: '',
|
||||
|
||||
},
|
||||
queryParams: {
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
async onLoad(e) {
|
||||
if (e.id) {
|
||||
console.log(e)
|
||||
this.form.id = e.id
|
||||
this.form.open_id = e.open_id
|
||||
await this.$onLaunched;
|
||||
// e.id是从列表进的id
|
||||
if (e.q) {
|
||||
try {
|
||||
if (e.q) {
|
||||
const q = decodeURIComponent(e.q) // 获取到二维码原始链接内容
|
||||
// this.form.id = e.id
|
||||
let queryParams = {};
|
||||
let queryString = q.split('?')[1];
|
||||
if (queryString) {
|
||||
// 将查询字符串分割成单个参数
|
||||
let params = queryString.split('&');
|
||||
params.forEach((param) => {
|
||||
this.form.body = param.split('=')[1] ? param.split('=')[1] : '';
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
} catch (e) {}
|
||||
} else {
|
||||
this.form.body = e.id
|
||||
}
|
||||
// 获取开票抬头
|
||||
// 这是H5
|
||||
// #ifdef H5
|
||||
this.getInvoiceList()
|
||||
this.form.body = e.id
|
||||
this.form.open_id = e.open_id
|
||||
// #endif
|
||||
|
||||
|
||||
// 这是微信
|
||||
// #ifdef MP-WEIXIN
|
||||
this.showtitle = true
|
||||
this.form.open_id = uni.cache.get('open_id')
|
||||
// #endif
|
||||
|
||||
|
||||
try {
|
||||
let res = await this.api.szzpyfailccho({
|
||||
id: this.form.id,
|
||||
id: this.form.body,
|
||||
view_type: this.form.view_type
|
||||
})
|
||||
try {
|
||||
if (res.code == 1) {
|
||||
this.form = res.data
|
||||
}
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
if (res.code == 1) {
|
||||
this.form = res.data
|
||||
}
|
||||
} else {
|
||||
this.form.body = e.body
|
||||
this.form.open_id = e.open_id
|
||||
} catch (e) {
|
||||
//TODO handle the exception
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -134,35 +175,32 @@
|
||||
this.subCategoryList = []
|
||||
},
|
||||
upload() {
|
||||
uni.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
})
|
||||
uni.chooseImage({
|
||||
success: (chooseImageRes) => {
|
||||
uni.pro.showLoading({
|
||||
title: '上传中',
|
||||
mask: true
|
||||
});
|
||||
const tempFilePaths = chooseImageRes.tempFilePaths;
|
||||
uni.uploadFile({
|
||||
url: 'https://cashieradmin.sxczgkj.cn' + '/api/qiNiuContent',
|
||||
filePath: tempFilePaths[0],
|
||||
name: 'file',
|
||||
formData: {
|
||||
open_id: this.form.open_id,
|
||||
},
|
||||
|
||||
success: (uploadFileRes) => {
|
||||
count: 1, //默认9
|
||||
sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], //从相册选择,和摄像头功能,默认二者都有
|
||||
success: res => {
|
||||
var thisimgUrlcaca = res.tempFilePaths[0];
|
||||
uploadImage(thisimgUrlcaca, 'merchantinformation/',
|
||||
result => {
|
||||
uni.showToast({
|
||||
title: '上传成功',
|
||||
icon: 'none',
|
||||
})
|
||||
uni.pro.hideLoading();
|
||||
let data = JSON.parse(uploadFileRes.data)
|
||||
this.form.img = data.data[0]
|
||||
});
|
||||
this.form.img = result
|
||||
console.log(this.form)
|
||||
},
|
||||
fail: () => {
|
||||
uni.pro.hideLoading();
|
||||
}
|
||||
});
|
||||
uni.hideLoading()
|
||||
}, result => {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: result.message || result.msg,
|
||||
icon: 'none',
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -211,11 +249,19 @@
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.navigateTo({
|
||||
url: '/pages/hindex/involist?typeshow=' + 1
|
||||
})
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
setTimeout(() => {
|
||||
if (res.data.url) {
|
||||
window.location.href = res.data.url
|
||||
}
|
||||
}, 1000);
|
||||
// #endif
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user