|
@@ -13,9 +13,9 @@
|
|
|
<view class="store-wrap" >
|
|
<view class="store-wrap" >
|
|
|
<view :class="{ 'grayscale': item.forstStatus === '1' }">
|
|
<view :class="{ 'grayscale': item.forstStatus === '1' }">
|
|
|
<view @click="orderDetail(item)" class="">
|
|
<view @click="orderDetail(item)" class="">
|
|
|
- <view class="store-list">
|
|
|
|
|
- <view class="store-content">
|
|
|
|
|
- <view class="content">
|
|
|
|
|
|
|
+ <view class="store-list ">
|
|
|
|
|
+ <view class="store-content ">
|
|
|
|
|
+ <view class="content ">
|
|
|
<view class="desc flex-row justify-start ">
|
|
<view class="desc flex-row justify-start ">
|
|
|
<view :class="item.serviceAttribute == 1? 'service-type':'service-mode'">
|
|
<view :class="item.serviceAttribute == 1? 'service-type':'service-mode'">
|
|
|
{{item.serviceAttrDesc}}
|
|
{{item.serviceAttrDesc}}
|
|
@@ -24,7 +24,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="order-state">
|
|
|
|
|
|
|
+ <view class="order-state ">
|
|
|
<view class="order-num">
|
|
<view class="order-num">
|
|
|
<view class="h-order-num">
|
|
<view class="h-order-num">
|
|
|
<image src="/static/index/u217.png" mode=""></image>订单编号:{{ item.orderNo }}
|
|
<image src="/static/index/u217.png" mode=""></image>订单编号:{{ item.orderNo }}
|
|
@@ -65,7 +65,7 @@
|
|
|
<!-- <view class="btn" v-if="!item.canPay && item.orderStatus == 6" @click="orderFinish(item)">-->
|
|
<!-- <view class="btn" v-if="!item.canPay && item.orderStatus == 6" @click="orderFinish(item)">-->
|
|
|
<!-- <text>结束订单</text>-->
|
|
<!-- <text>结束订单</text>-->
|
|
|
<!-- </view>-->
|
|
<!-- </view>-->
|
|
|
- <view class="btn" v-if="item.canPay" @click="oneClickPay(item)">
|
|
|
|
|
|
|
+ <view class="btn" @click="oneClickPay(item)">
|
|
|
<text>一键付款</text>
|
|
<text>一键付款</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="btn" v-if="item.orderStatus == 5 || item.orderStatus == 11" @click="cancelOrder(item)">
|
|
<view class="btn" v-if="item.orderStatus == 5 || item.orderStatus == 11" @click="cancelOrder(item)">
|
|
@@ -80,7 +80,8 @@
|
|
|
<!-- </view>-->
|
|
<!-- </view>-->
|
|
|
|
|
|
|
|
<view @click="orderSign(item)" class="btn">
|
|
<view @click="orderSign(item)" class="btn">
|
|
|
- <text>签到</text>
|
|
|
|
|
|
|
+ <u-icon name="/static/order/saoma.png" color="#2979ff" size="20"></u-icon>
|
|
|
|
|
+ <text>扫码签到</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -91,19 +92,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+ <myPay ref="myPay" :blPay="blPay" :orderNo="orderNo" :openType="openType" :selectBlPay="selectBlPay" :balance="userInfo.balance" @payResult="payResult"></myPay>
|
|
|
</mescroll-uni>
|
|
</mescroll-uni>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import myPay from '../../../components/pay/pay';
|
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js";
|
|
|
import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
|
|
import MescrollMoreItemMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mixins/mescroll-more-item.js"
|
|
|
export default {
|
|
export default {
|
|
|
mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
|
|
mixins: [MescrollMixin, MescrollMoreItemMixin], // 注意此处还需使用MescrollMoreItemMixin (必须写在MescrollMixin后面)
|
|
|
- components: {},
|
|
|
|
|
|
|
+ components: {
|
|
|
|
|
+ myPay
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ openType:1,
|
|
|
|
|
+ selectBlPay:true,
|
|
|
|
|
+ blPay:true,
|
|
|
|
|
+ orderNo:'',
|
|
|
|
|
+ userInfo:{},
|
|
|
downOption: {
|
|
downOption: {
|
|
|
auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
|
|
auto: false // 不自动加载 (mixin已处理第一个tab触发downCallback)
|
|
|
},
|
|
},
|
|
@@ -159,32 +168,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ payResult(e){
|
|
|
|
|
+ if (e.payResult){
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'success',
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ title: '付款成功'
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ this.downCallback()
|
|
|
|
|
+ this.getUserInfo()
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
orderSign(e){
|
|
orderSign(e){
|
|
|
- let that = this
|
|
|
|
|
-
|
|
|
|
|
- uni.getLocation({
|
|
|
|
|
- type: 'gcj02',
|
|
|
|
|
- success: function (res) {
|
|
|
|
|
- var latitude = res.latitude;
|
|
|
|
|
- var longitude = res.longitude;
|
|
|
|
|
-
|
|
|
|
|
- console.log(res)
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- that.$api.orderSign({
|
|
|
|
|
- orderId:e.orderId,
|
|
|
|
|
- latitude:latitude,
|
|
|
|
|
- longitude:longitude
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
-
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- fail:function (err) {
|
|
|
|
|
-
|
|
|
|
|
- console.log(err)
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ uni.scanCode({
|
|
|
|
|
+ onlyFromCamera: true,
|
|
|
|
|
+ hideAlbum: true,
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ let result = JSON.parse(res.result)
|
|
|
|
|
+ that.$api.orderSign({
|
|
|
|
|
+ orderId:e.orderId,
|
|
|
|
|
+ storeId:result.storeId,
|
|
|
|
|
+ timestamp:result.timestamp
|
|
|
|
|
+ }).then(res1=>{
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon: 'success',
|
|
|
|
|
+ duration: 2000,
|
|
|
|
|
+ title: '签到成功'
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -201,11 +217,24 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
appointment(order){
|
|
appointment(order){
|
|
|
- this.$emit('openPayAppointment',order,2)
|
|
|
|
|
|
|
+ //支付预约费用
|
|
|
|
|
+ this.blPay = false
|
|
|
|
|
+ this.orderNo = order.subOrderNo
|
|
|
|
|
+ this.openType = 1
|
|
|
|
|
+ this.$refs.myPay.openPopup()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
oneClickPay(order){
|
|
oneClickPay(order){
|
|
|
- this.$emit('openPay',order,1)
|
|
|
|
|
|
|
+ //支付订单费用
|
|
|
|
|
+ this.blPay = true
|
|
|
|
|
+ this.orderNo = order.orderNo
|
|
|
|
|
+ this.openType = 2
|
|
|
|
|
+ if (this.userInfo.balance *1 > order.payAmount *1){
|
|
|
|
|
+ this.selectBlPay = true
|
|
|
|
|
+ }else {
|
|
|
|
|
+ this.selectBlPay = false
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$refs.myPay.openPopup()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
@@ -267,7 +296,12 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ getUserInfo() {
|
|
|
|
|
+ this.$api.getUserInfo().then(res => {
|
|
|
|
|
+ this.userInfo = res.data.data
|
|
|
|
|
+ uni.setStorageSync('userInfo', res.data.data)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
//点击空布局按钮的回调
|
|
//点击空布局按钮的回调
|
|
|
emptyClick() {
|
|
emptyClick() {
|
|
@@ -282,26 +316,24 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
cancelOrder(item){
|
|
cancelOrder(item){
|
|
|
- console.log('++++++++++++++++++++',item)
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- content: '请确认是否取消订单!',
|
|
|
|
|
- success: function (res) {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- let that = this
|
|
|
|
|
- this.$api.cancelOrder({
|
|
|
|
|
- orderId:item.orderId
|
|
|
|
|
- }).then(res=>{
|
|
|
|
|
- that.downCallback()
|
|
|
|
|
- that.$api.getUserInfo().then( res=> {
|
|
|
|
|
- uni.setStorageSync('userInfo', res.data.data);
|
|
|
|
|
- });
|
|
|
|
|
- })
|
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
|
- console.log('用户点击取消');
|
|
|
|
|
- }
|
|
|
|
|
- }.bind(this)
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ content: '请确认是否取消订单!',
|
|
|
|
|
+ success: function (res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ this.$api.cancelOrder({
|
|
|
|
|
+ orderId:item.orderId
|
|
|
|
|
+ }).then(res=>{
|
|
|
|
|
+ that.downCallback()
|
|
|
|
|
+ that.$api.getUserInfo().then( res=> {
|
|
|
|
|
+ uni.setStorageSync('userInfo', res.data.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ })
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }.bind(this)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
orderDetail(item) {
|
|
orderDetail(item) {
|