|
|
@@ -62,7 +62,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { my,verific } from '@/api/merchant.js';
|
|
|
+import { my, verific } from '@/api/merchant.js';
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -93,39 +93,44 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
close() {
|
|
|
- this.$refs.popuphx.close()
|
|
|
- this.code = ''
|
|
|
+ this.$refs.popuphx.close();
|
|
|
+ this.code = '';
|
|
|
},
|
|
|
qhx() {
|
|
|
- verific({verify_code:this.code,
|
|
|
- is_confirm: 1,//1是核销,0是查看
|
|
|
- }).then(e => {
|
|
|
- this.$api.msg('核销成功')
|
|
|
- this.close()
|
|
|
- }).catch(e => {
|
|
|
- console.log(e)
|
|
|
+ verific({
|
|
|
+ verify_code: this.code,
|
|
|
+ is_confirm: 1 //1是核销,0是查看
|
|
|
})
|
|
|
+ .then(e => {
|
|
|
+ this.$api.msg('核销成功');
|
|
|
+ this.close();
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ console.log(e);
|
|
|
+ });
|
|
|
},
|
|
|
//调取扫描二维码
|
|
|
sao() {
|
|
|
let obj = this;
|
|
|
- this.$refs.popuphx.open();
|
|
|
- // // #ifndef H5
|
|
|
- // uni.scanCode({
|
|
|
- // success(e) {
|
|
|
- // obj.orderVerific(e.result);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // // #endif
|
|
|
- // // #ifdef H5
|
|
|
- // this.weichatObj.scanQRCode({
|
|
|
- // needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
|
|
- // scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
|
|
|
- // success: function(res) {
|
|
|
- // obj.orderVerific(res.resultStr); // 当needResult 为 1 时,扫码返回的结果
|
|
|
- // }
|
|
|
- // });
|
|
|
- // // #endif
|
|
|
+ // #ifndef H5
|
|
|
+ uni.scanCode({
|
|
|
+ success(e) {
|
|
|
+ obj.code = e.result;
|
|
|
+ obj.$refs.popuphx.open();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
+ // #ifdef H5
|
|
|
+ let wx = require('jweixin-module');
|
|
|
+ wx.scanQRCode({
|
|
|
+ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果,
|
|
|
+ scanType: ['qrCode', 'barCode'], // 可以指定扫二维码还是一维码,默认二者都有
|
|
|
+ success: function(res) {
|
|
|
+ obj.code = res.resultStr; // 当needResult 为 1 时,扫码返回的结果
|
|
|
+ obj.$refs.popuphx.open();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ // #endif
|
|
|
}
|
|
|
}
|
|
|
};
|