|
@@ -6,10 +6,14 @@
|
|
<view class="userInfo-box">
|
|
<view class="userInfo-box">
|
|
<view class="userInfo-img"><image class="portrait" :src="image || '../../static/error/missing-face.png'"></image></view>
|
|
<view class="userInfo-img"><image class="portrait" :src="image || '../../static/error/missing-face.png'"></image></view>
|
|
<view class="userInfo-xinxi">
|
|
<view class="userInfo-xinxi">
|
|
- <view class="title clamp"><text>{{name}}</text></view>
|
|
|
|
- <view class="phone"><text>{{phone}}</text></view>
|
|
|
|
|
|
+ <view class="title clamp">
|
|
|
|
+ <text>{{ name }}</text>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="phone">
|
|
|
|
+ <text>{{ phone }}</text>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
- <view class="balance clamp">{{address}}</view>
|
|
|
|
|
|
+ <view class="balance clamp">{{ address }}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="userInfoList">
|
|
<view class="userInfoList">
|
|
@@ -43,27 +47,43 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
+ <uni-popup ref="popuphx" class="agree-wrapper">
|
|
|
|
+ <view class="hx-wrapper">
|
|
|
|
+ <view class="hx-img"><image src="../../static/img/hxbg.png" mode=""></image></view>
|
|
|
|
+ <view class="hx-body">
|
|
|
|
+ <view class="hx-title">输入核销码核销</view>
|
|
|
|
+ <input type="text" v-model="code" placeholder="请输入核销码" placeholder-class="hx-placeholder" />
|
|
|
|
+ <view class="hx-btn" @click="qhx">立即核销</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="hx-close" @click="close"><image src="../../static/icon/close.png" mode=""></image></view>
|
|
|
|
+ </view>
|
|
|
|
+ </uni-popup>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { my } from '@/api/merchant.js'
|
|
|
|
|
|
+import { my,verific } from '@/api/merchant.js';
|
|
|
|
+import uniPopup from '@/components/uni-popup/uni-popup.vue';
|
|
export default {
|
|
export default {
|
|
|
|
+ components: {
|
|
|
|
+ uniPopup
|
|
|
|
+ },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- image:'',
|
|
|
|
- name:'',
|
|
|
|
- phone:'',
|
|
|
|
- address:'',
|
|
|
|
|
|
+ image: '',
|
|
|
|
+ name: '',
|
|
|
|
+ phone: '',
|
|
|
|
+ address: '',
|
|
|
|
+ code: ''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad() {
|
|
onLoad() {
|
|
- my({}).then(({data}) =>{
|
|
|
|
|
|
+ my({}).then(({ data }) => {
|
|
this.image = data.image;
|
|
this.image = data.image;
|
|
this.name = data.name;
|
|
this.name = data.name;
|
|
this.phone = data.phone;
|
|
this.phone = data.phone;
|
|
- this.address = data.detailed_address
|
|
|
|
- })
|
|
|
|
|
|
+ this.address = data.detailed_address;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
//跳转
|
|
//跳转
|
|
@@ -72,25 +92,40 @@ export default {
|
|
url
|
|
url
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ close() {
|
|
|
|
+ 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)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
//调取扫描二维码
|
|
//调取扫描二维码
|
|
sao() {
|
|
sao() {
|
|
let obj = this;
|
|
let obj = this;
|
|
- // #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
|
|
|
|
|
|
+ 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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|
|
@@ -103,6 +138,81 @@ page {
|
|
padding: 0;
|
|
padding: 0;
|
|
margin: 0;
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
+// 弹窗
|
|
|
|
+.hx-wrapper {
|
|
|
|
+ width: 536rpx;
|
|
|
|
+ height: 630rpx;
|
|
|
|
+ position: relative;
|
|
|
|
+
|
|
|
|
+ // background-color: #fff;
|
|
|
|
+ .hx-img {
|
|
|
|
+ width: 536rpx;
|
|
|
|
+ height: 281rpx;
|
|
|
|
+
|
|
|
|
+ image {
|
|
|
|
+ width: 536rpx;
|
|
|
|
+ height: 281rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .hx-close {
|
|
|
|
+ position: absolute;
|
|
|
|
+ left: 243rpx;
|
|
|
|
+ bottom: -80rpx;
|
|
|
|
+ width: 52rpx;
|
|
|
|
+ height: 52rpx;
|
|
|
|
+
|
|
|
|
+ image {
|
|
|
|
+ width: 52rpx;
|
|
|
|
+ height: 52rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .hx-body {
|
|
|
|
+ width: 536rpx;
|
|
|
|
+ height: 349rpx;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ border-radius: 0 0 10rpx 10rpx;
|
|
|
|
+
|
|
|
|
+ .hx-title {
|
|
|
|
+ width: 536rpx;
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #333333;
|
|
|
|
+ line-height: 1;
|
|
|
|
+ padding-top: 42rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ input {
|
|
|
|
+ width: 439rpx;
|
|
|
|
+ height: 68rpx;
|
|
|
|
+ background: #dbf3e9;
|
|
|
|
+ border-radius: 10rpx;
|
|
|
|
+ margin: 39rpx auto 0;
|
|
|
|
+ padding-left: 26rpx;
|
|
|
|
+
|
|
|
|
+ .hx-placeholder {
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #52c696;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .hx-btn {
|
|
|
|
+ margin: 44rpx auto 0;
|
|
|
|
+ width: 353rpx;
|
|
|
|
+ height: 71rpx;
|
|
|
|
+ background: #52c696;
|
|
|
|
+ border-radius: 34rpx;
|
|
|
|
+ font-size: 36rpx;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #f8f9f9;
|
|
|
|
+ line-height: 71rpx;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
|
|
.content {
|
|
.content {
|
|
background-color: #eeeded;
|
|
background-color: #eeeded;
|