修改页面
This commit is contained in:
846
pages/dpxq/immediatePayment/immediatePayment copy.vue
Normal file
846
pages/dpxq/immediatePayment/immediatePayment copy.vue
Normal file
@ -0,0 +1,846 @@
|
||||
<template>
|
||||
<view class="page" v-if="token" :style="themeColor">
|
||||
<view class="flex benben-position-layout flex flex-wrap align-center immediatePayment_flex_0"
|
||||
:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx'}">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub immediatePayment_fd0_0'>
|
||||
<view v-if="source == 'app'" class='flex flex-wrap align-center'>
|
||||
<!-- <text class='fu-iconfont2 immediatePayment_fd0_0_c0_c0'></text> -->
|
||||
<button class="fu-iconfont2 immediatePayment_fd0_0_c0_c0" style="background: #fff;"
|
||||
open-type="launchApp" app-parameter="wechat"></button>
|
||||
</view>
|
||||
<view v-else class='flex flex-wrap align-center' @tap.stop="popupShow1684575594621=true">
|
||||
<text class='fu-iconfont2 immediatePayment_fd0_0_c0_c0'></text>
|
||||
<!-- <button class="fu-iconfont2 immediatePayment_fd0_0_c0_c0" style="background: #fff;" open-type="launchApp" app-parameter="wechat"></button> -->
|
||||
</view>
|
||||
<view class='flex flex-wrap align-stretch justify-center flex-sub'>
|
||||
<text class='immediatePayment_fd0_0_c1_c0'>支付</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center immediatePayment_fd0_0_c2'>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction flex-wrap align-center benben-flex-layout immediatePayment_flex_1">
|
||||
<view class='flex flex-wrap align-end'>
|
||||
<text class='immediatePayment_fd1_0_c0'>¥</text>
|
||||
<template v-if="isDeduct == 0">
|
||||
<text class='immediatePayment_fd1_0_c1' v-if="!is_agreem">{{pay_moeny}}</text>
|
||||
<text class='immediatePayment_fd1_0_c1'
|
||||
v-else>{{Number(pay_moeny)-Number(deduct_money) > 0 ? (Number(pay_moeny)-Number(deduct_money)).toFixed(2) : 0}}</text>
|
||||
</template>
|
||||
|
||||
<template v-if="isDeduct == 1">
|
||||
<text class='immediatePayment_fd1_0_c1' v-if="!is_agreem">{{oldMoney}}</text>
|
||||
<text class='immediatePayment_fd1_0_c1'
|
||||
v-else>{{Number(oldMoney)-Number(deduct_money) > 0 ? (Number(oldMoney)-Number(deduct_money)).toFixed(2) : 0}}</text>
|
||||
</template>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center immediatePayment_fd1_1'>
|
||||
<text class='immediatePayment_fd1_1_c0'>支付剩余时间:</text>
|
||||
<benben-countdown class='' :time-type='true' :count-time="time" @timeEnd="handleTimeEnd">
|
||||
<template #default="{ d, h, i, s }">
|
||||
<text class='immediatePayment_fd1_1_c1_c2'>{{h}}</text>
|
||||
|
||||
<text class='immediatePayment_fd1_1_c1_c3'>:</text>
|
||||
|
||||
<text class='immediatePayment_fd1_1_c1_c4'>{{i}}</text>
|
||||
|
||||
<text class='immediatePayment_fd1_1_c1_c5'>:</text>
|
||||
|
||||
<text class='immediatePayment_fd1_1_c1_c6'>{{s}}</text>
|
||||
|
||||
<text></text>
|
||||
</template>
|
||||
</benben-countdown>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
<!---flex布局flex布局开始-->
|
||||
<!-- && source != 'app' -->
|
||||
<view class="flex benben-flex-layout flex-wrap align-center immediatePayment_flex_2" v-if="score > 0">
|
||||
<view class='flex flex-wrap align-center justify-between flex-sub immediatePayment_fd2_0'>
|
||||
<view class='flex flex-direction flex-sub flex-wrap'>
|
||||
<text class='immediatePayment_fd2_0_c0_c0'>使用抵用券抵扣<text
|
||||
class="text-sm">(当前可用抵用券:{{user_score}})</text></text>
|
||||
<text class='immediatePayment_fd2_0_c1_c0'>抵扣{{deduct_money}}</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<benben-flex-switch-new class-name='flex flex immediatePayment_fd2_0_c1_c1' v-model="is_agreem"
|
||||
:disabled='Number(deduct_money) <= 0 || isdeduction == 1 || source == "app"' :auto='true'>
|
||||
<template v-slot:checked>
|
||||
|
||||
<view class='flex flex position-relative align-center'>
|
||||
<image class='immediatePayment_checkfd2_0_c1_c1_c0_c0' mode="aspectFit"
|
||||
:src='STATIC_URL+"85.png"'>
|
||||
</image>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
<template v-slot:unchecked>
|
||||
|
||||
<view class='flex flex position-relative justify-end align-center'>
|
||||
<image class='immediatePayment_noCheckfd2_0_c1_c1_c1_c0' mode="aspectFit"
|
||||
:src='STATIC_URL+"123.png"'>
|
||||
</image>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
</benben-flex-switch-new>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
|
||||
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout immediatePayment_flex_3">
|
||||
<view class='flex flex-direction flex-wrap align-stretch immediatePayment_fd3_0'>
|
||||
<view class='flex flex-wrap align-center immediatePayment_fd3_0_c0'>
|
||||
<text class='immediatePayment_fd3_0_c0_c0'>选择支付方式</text>
|
||||
</view>
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<benben-select-diy ref="showSelectPopup1684574445816"
|
||||
class-name='flex flex-direction flex-wrap align-stretch flex immediatePayment_fd3_0_c1_c0'
|
||||
:items.sync="select_pay" v-model="select_id" default-type="value" default-label="name"
|
||||
:allow-cancel='true' type="radio" :disabled='false'>
|
||||
<template v-for='(item,key0) in select_pay'>
|
||||
<view v-if="item.isSelected" class='flex align-center flex immediatePayment_fd3_0_c1_c0_c0'
|
||||
:key="key0" @tap="$refs.showSelectPopup1684574445816.tapHandle(key0)">
|
||||
<image class='immediatePayment_fd3_0_c1_c0_c0_c0' mode="aspectFit" :src='item.image'>
|
||||
</image>
|
||||
<text class='immediatePayment_fd3_0_c1_c0_c0_c1'>{{item.name}}</text>
|
||||
<image class='immediatePayment_fd3_0_c1_c0_c0_c2' mode="aspectFit"
|
||||
:src='STATIC_URL+"85.png"'></image>
|
||||
</view>
|
||||
<view v-else class='flex align-center flex immediatePayment_fd3_0_c1_c0_c1' :key="key0"
|
||||
@tap="$refs.showSelectPopup1684574445816.tapHandle(key0)">
|
||||
<image class='immediatePayment_fd3_0_c1_c0_c1_c0' mode="aspectFit" :src='item.image'>
|
||||
</image>
|
||||
<text class='immediatePayment_fd3_0_c1_c0_c1_c1'>{{item.name}}</text>
|
||||
<image class='immediatePayment_fd3_0_c1_c0_c1_c2' mode="aspectFit"
|
||||
:src='STATIC_URL+"179.png"'></image>
|
||||
</view>
|
||||
</template>
|
||||
</benben-select-diy>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="flex flex-direction flex-wrap align-center benben-position-layout flex immediatePayment_flex_4">
|
||||
<button class='immediatePayment_fd4_0' @tap.stop="determineAskforFunc()">立即支付</button>
|
||||
|
||||
</view>
|
||||
<view :style="{height: '127rpx'}"></view>
|
||||
<benben-popup v-model="popupShow1684575594621" :mask="true" mode='center'>
|
||||
<!---flex布局flex布局开始-->
|
||||
<view class="flex flex-direction align-center benben-flex-layout immediatePayment_flex_5">
|
||||
<text class='immediatePayment_fd5_0'>确认离开收银台?</text>
|
||||
<text class='immediatePayment_fd5_1'>您的订单还未完成支付,请尽快支付</text>
|
||||
<view class='flex flex-wrap align-center immediatePayment_fd5_2'>
|
||||
<button class='immediatePayment_fd5_2_c0' @tap.stop="handleJumpDiy" data-type="switchTab"
|
||||
:data-url="`/pages/tabBar/myOrder/myOrder`">确认离开</button>
|
||||
<button class='immediatePayment_fd5_2_c1' @tap.stop="popupShow1684575594621=false">继续支付</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!---flex布局flex布局结束-->
|
||||
|
||||
</benben-popup>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import {
|
||||
LOGIN_PAGE_URL,
|
||||
SYSTEM_CONFIG,
|
||||
ACCEPT_PLATFORM
|
||||
} from '@/common/config.js'
|
||||
export default {
|
||||
components: {},
|
||||
|
||||
|
||||
data() {
|
||||
return {
|
||||
orderMoney: 0,
|
||||
"popupShow1684575594621": false,
|
||||
time: 0,
|
||||
"is_agreem": false,
|
||||
score: 0,
|
||||
"select_pay": [{
|
||||
"name": "微信支付",
|
||||
"value": "1",
|
||||
"image": "https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/1d066923b9b33614a9df47ea787e5af9.png"
|
||||
},
|
||||
|
||||
// {
|
||||
// "name": "余额支付",
|
||||
// "value": "3",
|
||||
// "image": "https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220615/6188e5b4967f1b162ee2c0c93fd7cf94.png"
|
||||
// },
|
||||
],
|
||||
"select_id": "1",
|
||||
"pay_moeny": "",
|
||||
"state": "",
|
||||
sn: '',
|
||||
deduct_money: "",
|
||||
user_score: "",
|
||||
payTimer: null,
|
||||
source: '',
|
||||
token: '',
|
||||
isdeduction: '',
|
||||
score: 0,
|
||||
isDeduct: 0,
|
||||
oldMoney: 0
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
themeColor() {
|
||||
return this.$store.getters.themeColor
|
||||
},
|
||||
|
||||
},
|
||||
watch: {},
|
||||
onLoad(options) {
|
||||
let {
|
||||
money,
|
||||
state,
|
||||
time,
|
||||
sn,
|
||||
source,
|
||||
isdeduction,
|
||||
score
|
||||
} = options
|
||||
if (money !== undefined) this.pay_moeny = money
|
||||
if (state !== undefined) this.state = state
|
||||
if (time !== undefined) this.time = time
|
||||
if (sn !== undefined) this.sn = sn
|
||||
if (source !== undefined) this.source = source
|
||||
if (isdeduction !== undefined) this.isdeduction = isdeduction
|
||||
if (score !== undefined) this.score = score
|
||||
|
||||
// if (is_agreem !== undefined) this.is_agreem = is_agreem
|
||||
// console.log('is_agreem=', is_agreem)
|
||||
// if (this.source != 'app') {
|
||||
// this.is_agreem = this.isdeduction == 1
|
||||
// }
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
this.select_pay.push({
|
||||
"name": "支付宝支付",
|
||||
"value": "2",
|
||||
"image": "https://zhongben-crm.oss-cn-zhangjiakou.aliyuncs.com/uploads/images/20220615/6188e5b4967f1b162ee2c0c93fd7cf94.png"
|
||||
})
|
||||
// #endif
|
||||
},
|
||||
onUnload() {
|
||||
if (this.payTimer) {
|
||||
clearInterval(this.payTimer);
|
||||
}
|
||||
},
|
||||
onReady() {
|
||||
|
||||
},
|
||||
onShow() {
|
||||
this.token = global.token || ''
|
||||
if (!this.token) {
|
||||
uni.navigateTo({
|
||||
url: LOGIN_PAGE_URL
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
this.getInfo();
|
||||
this.get64a62b3d77830()
|
||||
},
|
||||
onHide() {
|
||||
|
||||
},
|
||||
onResize() {
|
||||
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
onReachBottom(e) {
|
||||
|
||||
},
|
||||
onPageScroll(e) {
|
||||
|
||||
},
|
||||
methods: {
|
||||
handleTimeEnd() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
getInfo() {
|
||||
this.$api
|
||||
.post(global.apiUrls.post5c78c4772da97, {
|
||||
user_id: (global.userInfo && global.userInfo.id) || 0
|
||||
})
|
||||
.then(res => {
|
||||
res = res.data;
|
||||
if (res.code == 1) {
|
||||
this.score = res.data.score - 0;
|
||||
}
|
||||
});
|
||||
},
|
||||
get64a62b3d77830() {
|
||||
this.$api.post(global.apiUrls.get64a62b3d77830, {
|
||||
order_sn: this.sn
|
||||
}).then(res => {
|
||||
res = res.data;
|
||||
if (res.code == 1) {
|
||||
this.deduct_money = res.data.deduct_money
|
||||
this.user_score = res.data.user_score
|
||||
console.log('res.data.is_deduct=', res.data.is_deduct)
|
||||
if (res.data.is_deduct == 1) {
|
||||
this.is_agreem = true
|
||||
this.isDeduct = 1
|
||||
this.oldMoney = res.data.order_money
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//判断自取
|
||||
determineAskforFunc() {
|
||||
let that = this;
|
||||
console.log(that.is_agreem)
|
||||
if (that.is_agreem) {
|
||||
this.get64a633e0099ce()
|
||||
} else {
|
||||
this.paySure()
|
||||
// this.post6757f462c15d3()
|
||||
}
|
||||
|
||||
return
|
||||
},
|
||||
post6757f462c15d3() {
|
||||
this.$api.post(global.apiUrls.post6757f462c15d3, {
|
||||
order_sn: this.sn
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
if (res.data.data.is_pay == 1) {
|
||||
this.isdeduction = 1
|
||||
this.paySure()
|
||||
} else {
|
||||
this.$urouter.redirectTo(
|
||||
`/pages/dpxq/paymentResults/paymentResults?pay=5&state=${this.state}&sn=${this.sn}`
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
get64a633e0099ce() {
|
||||
this.$api.post(global.apiUrls.get64a633e0099ce, {
|
||||
order_sn: this.sn
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
if (res.data.data.is_pay == 1) {
|
||||
this.paySure()
|
||||
} else {
|
||||
this.$urouter.redirectTo(
|
||||
`/pages/dpxq/paymentResults/paymentResults?pay=5&state=${this.state}&sn=${this.sn}`
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
paySure() {
|
||||
let that = this;
|
||||
if (that.select_id == 3) {
|
||||
this.$api.post(global.apiUrls.postPayOrder, {
|
||||
order_sn: this.sn
|
||||
})
|
||||
.then(res => {
|
||||
if (res.data.code == 1) {
|
||||
that.$urouter.redirectTo(
|
||||
`/pages/dpxq/paymentResults/paymentResults?pay=${that.select_id}&state=${that.state}&sn=${that.sn}`
|
||||
);
|
||||
} else {
|
||||
this.$message.info(res.data.msg)
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log("err: ", err);
|
||||
})
|
||||
|
||||
} else {
|
||||
uni.showLoading({
|
||||
title: '正在支付',
|
||||
mask: true
|
||||
})
|
||||
|
||||
let paytype = that.select_id == '1' ? 3 : 2
|
||||
let url = that.select_id == '1' ? global.apiUrls.wxPay : global.apiUrls.aliPay;
|
||||
let params = {
|
||||
order_sn: this.sn
|
||||
}
|
||||
if (this.select_id == 1) {
|
||||
params.wxpaytype = 'AppPay'
|
||||
// #ifdef MP-WEIXIN
|
||||
params.wxpaytype = 'MiniPay'
|
||||
// #endif
|
||||
}
|
||||
// // #ifdef MP-WEIXIN
|
||||
// paytype = 'mini'
|
||||
// // #endif
|
||||
that.$api.post(url, params).then(res => {
|
||||
|
||||
console.log(res)
|
||||
uni.hideLoading()
|
||||
res = res.data
|
||||
if (res.code == 1) {
|
||||
console.log('支付', res);
|
||||
|
||||
if (that.select_id == 2) {
|
||||
// uni.requestPayment({
|
||||
// provider: 'alipay',
|
||||
// orderInfo: res.data, //微信、支付宝订单数据
|
||||
// success: function(res) {
|
||||
// uni.showToast({ title: '支付成功~', icon: 'none' });
|
||||
// that.$urouter.redirectTo(`/pages/dpxq/paymentResults/paymentResults?pay=${that.select_id}&state=${that.state}&sn=${that.sn}`);
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// console.log('fail:' + JSON.stringify(err));
|
||||
// }
|
||||
// });
|
||||
// #ifdef APP
|
||||
plus.runtime.openWeb(res.data.result.payCode);
|
||||
// #endif
|
||||
if (that.payTimer) {
|
||||
clearInterval(that.payTimer);
|
||||
}
|
||||
that.payTimer = setInterval(function() {
|
||||
console.log(2);
|
||||
that.$api.get(global.apiUrls.getOrderDetail, {
|
||||
order_sn: that.sn
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == 1) {
|
||||
let payStatus = res.data.data.status - 0;
|
||||
console.log(payStatus);
|
||||
if (payStatus > 0) {
|
||||
clearInterval(that.payTimer);
|
||||
uni.redirectTo({
|
||||
url: `/pages/dpxq/paymentResults/paymentResults?pay=${that.select_id}&state=${that.state}&sn=${that.sn}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
// clearInterval(this.payTimer)
|
||||
}, 5000)
|
||||
} else {
|
||||
// console.log(JSON.stringify(res.data.result));
|
||||
// #ifdef APP-PLUS
|
||||
plus.share.getServices(function(res) {
|
||||
console.log(res, '<--res')
|
||||
var sweixin = null;
|
||||
for (var i = 0; i < res.length; i++) {
|
||||
var t = res[i];
|
||||
if (t.id == 'weixin') {
|
||||
sweixin = t;
|
||||
}
|
||||
}
|
||||
if (sweixin) {
|
||||
console.log(1);
|
||||
let payMoney = Number(that.pay_moeny) - (that.is_agreem ? Number(
|
||||
that.deduct_money) : 0)
|
||||
sweixin.launchMiniProgram({
|
||||
id: 'gh_2d502cf377f1', //这里写你的小程序原始id(以gh开头)
|
||||
type: 0, //这里是不同的环境(默认0正式 2体验)
|
||||
path: `/pages/dpxq/immediatePayment/immediatePayment?source=app&state=${that.state}&money=${payMoney}&time=${that.time}&sn=${that.sn}&isdeduction=${that.is_agreem ? 1 : 2}` //这里是指定页的路径,如需传参直接字符串拼接(首页可以省略)
|
||||
}, function(res) {
|
||||
console.log(234);
|
||||
console.log(JSON.stringify(res));
|
||||
if (that.payTimer) {
|
||||
clearInterval(that.payTimer);
|
||||
}
|
||||
that.payTimer = setInterval(function() {
|
||||
console.log(2);
|
||||
that.$api.get(global.apiUrls
|
||||
.getOrderDetail, {
|
||||
order_sn: that.sn
|
||||
})
|
||||
.then(res => {
|
||||
console.log(res.data.data)
|
||||
if (res.data.code == 1) {
|
||||
let payStatus = res.data
|
||||
.data.status - 0;
|
||||
console.log(payStatus);
|
||||
if (payStatus > 0) {
|
||||
clearInterval(that
|
||||
.payTimer);
|
||||
uni.redirectTo({
|
||||
url: `/pages/dpxq/paymentResults/paymentResults?pay=${that.select_id}&state=${that.state}&sn=${that.sn}`
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err)
|
||||
});
|
||||
// clearInterval(this.payTimer)
|
||||
}, 3000)
|
||||
}, function(err) {
|
||||
console.log(JSON.stringify(err));
|
||||
});
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '您还没有安装微信',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
}, function(res) {
|
||||
console.log(JSON.stringify(res));
|
||||
});
|
||||
// `/pages/dpxq/immediatePayment/immediatePayment?state=${info.pick_type}&money=${info.payable_money}&time=${info.surplus_pay_time}&sn=${info.order_sn}`
|
||||
// uni.requestPayment({
|
||||
// provider: 'wxpay',
|
||||
// orderInfo: res.data.result.payCode, //微信、支付宝订单数据
|
||||
// success: function(res) {
|
||||
// uni.showToast({ title: '支付成功~', icon: 'none' });
|
||||
// that.$urouter.redirectTo(`/pages/dpxq/paymentResults/paymentResults?pay=${that.select_id}&state=${that.state}&sn=${that.sn}`);
|
||||
// },
|
||||
// fail: function(err) {
|
||||
// console.log('fail:' + JSON.stringify(err));
|
||||
// }
|
||||
// });
|
||||
// #endif
|
||||
// #ifdef MP-WEIXIN
|
||||
uni.requestPayment({
|
||||
provider: 'wxpay',
|
||||
timeStamp: res.data.result.payCode.timeStamp,
|
||||
nonceStr: res.data.result.payCode.nonceStr,
|
||||
package: res.data.result.payCode.package,
|
||||
signType: res.data.result.payCode.signType,
|
||||
paySign: res.data.result.payCode.paySign,
|
||||
success: res => {
|
||||
uni.showToast({
|
||||
title: '支付成功~',
|
||||
icon: 'none'
|
||||
});
|
||||
that.$urouter.redirectTo(
|
||||
`/pages/dpxq/paymentResults/paymentResults?source=${this.source}&pay=${this.select_id}&state=${this.state}&sn=${that.sn}`
|
||||
);
|
||||
},
|
||||
fail: err => {
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
}
|
||||
});
|
||||
// #endif
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
min-height: calc(100vh - var(--window-bottom));
|
||||
background: rgba(246, 247, 249, 1);
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_0 {
|
||||
background: #fff;
|
||||
width: 750rpx;
|
||||
height: 88rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
top: 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.immediatePayment_fd0_0_c2 {
|
||||
width: 32rpx;
|
||||
height: 32rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd0_0_c1_c0 {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd0_0_c0_c0 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
line-height: 88rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd0_0 {
|
||||
margin: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_1 {
|
||||
padding: 72rpx 0rpx 120rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c1_c6 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c1_c5 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c1_c4 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c1_c3 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c1_c2 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1_c0 {
|
||||
color: #666666;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
line-height: 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_1 {
|
||||
margin: 16rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_0_c1 {
|
||||
color: #E32121;
|
||||
font-size: 64rpx;
|
||||
font-weight: 500;
|
||||
line-height: 64rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd1_0_c0 {
|
||||
color: #E32121;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_2 {
|
||||
padding: 0rpx 32rpx 0rpx 32rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_noCheckfd2_0_c1_c1_c1_c0 {
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_checkfd2_0_c1_c1_c0_c0 {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
border-radius: 24rpx 24rpx 24rpx 24rpx;
|
||||
}
|
||||
|
||||
::v-deep .immediatePayment_fd2_0_c1_c1 {
|
||||
margin: 0rpx 0rpx 0rpx 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd2_0_c1_c0 {
|
||||
color: red;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd2_0_c0_c0 {
|
||||
color: #333333;
|
||||
font-size: 28rpx;
|
||||
font-weight: 500;
|
||||
line-height: 42rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd2_0 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
padding: 32rpx 32rpx 32rpx 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_3 {
|
||||
padding: 32rpx 30rpx 2rpx 32rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c1_c2 {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin: 0rpx 0rpx 0rpx auto;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c1_c1 {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c1_c0 {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 16rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c1 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 28rpx 0rpx 28rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c0_c2 {
|
||||
width: 36rpx;
|
||||
height: 36rpx;
|
||||
margin: 0rpx 0rpx 0rpx auto;
|
||||
border-radius: 18rpx 18rpx 18rpx 18rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c0_c1 {
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c0_c0 {
|
||||
width: 52rpx;
|
||||
height: 52rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
margin: 0rpx 16rpx 0rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c1_c0_c0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 28rpx 0rpx 28rpx 0rpx;
|
||||
}
|
||||
|
||||
::v-deep .immediatePayment_fd3_0_c1_c0 {
|
||||
width: 622rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c0_c0 {
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
margin: 0rpx 0rpx 8rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0_c0 {
|
||||
border-bottom: 1px solid #eee;
|
||||
padding: 40rpx 0rpx 24rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd3_0 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
padding: 0rpx 32rpx 0rpx 32rpx;
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_4 {
|
||||
width: 750rpx;
|
||||
height: 127rpx;
|
||||
overflow: hidden;
|
||||
z-index: 10;
|
||||
bottom: calc(0rpx + var(--window-bottom));
|
||||
}
|
||||
|
||||
.immediatePayment_fd4_0 {
|
||||
background: rgba(255, 147, 0, 1);
|
||||
border-radius: 44rpx 44rpx 44rpx 44rpx;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
width: 686rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.immediatePayment_flex_5 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
border-radius: 16rpx 16rpx 16rpx 16rpx;
|
||||
padding: 40rpx 24rpx 0 24rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd5_2_c1 {
|
||||
background: rgba(255, 255, 255, 1);
|
||||
font-size: 28rpx;
|
||||
color: rgba(255, 147, 0, 1);
|
||||
padding: 0rpx 61rpx 0rpx 61rpx;
|
||||
margin: 0rpx 0rpx 0rpx 12rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd5_2_c0 {
|
||||
border-right: 1px solid #eee;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
font-size: 28rpx;
|
||||
color: rgba(153, 153, 153, 1);
|
||||
padding: 0rpx 61rpx 0rpx 61rpx;
|
||||
margin: 0rpx 12rpx 0rpx 0rpx;
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
.immediatePayment_fd5_2 {
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
|
||||
.immediatePayment_fd5_1 {
|
||||
line-height: 52rpx;
|
||||
font-size: 28rpx;
|
||||
font-weight: 400;
|
||||
color: #333333;
|
||||
margin: 40rpx 0rpx 40rpx 0rpx;
|
||||
}
|
||||
|
||||
.immediatePayment_fd5_0 {
|
||||
line-height: 44rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
</style>
|
||||
@ -361,6 +361,7 @@
|
||||
title: '正在支付',
|
||||
mask: true
|
||||
})
|
||||
|
||||
let paytype = that.select_id == '1' ? 3 : 2
|
||||
let url = that.select_id == '1' ? global.apiUrls.wxPay : global.apiUrls.aliPay;
|
||||
let params = {
|
||||
@ -382,6 +383,7 @@
|
||||
res = res.data
|
||||
if (res.code == 1) {
|
||||
console.log('支付', res);
|
||||
|
||||
if (that.select_id == 2) {
|
||||
// uni.requestPayment({
|
||||
// provider: 'alipay',
|
||||
@ -422,7 +424,7 @@
|
||||
console.log(err)
|
||||
});
|
||||
// clearInterval(this.payTimer)
|
||||
}, 3000)
|
||||
}, 5000)
|
||||
} else {
|
||||
// console.log(JSON.stringify(res.data.result));
|
||||
// #ifdef APP-PLUS
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -55,7 +55,7 @@
|
||||
:class="{ 'checkTitlefd1_0': tabls == '4', 'flex flex-wrap align-center myOrder_titlefd1_0_c7': true }"
|
||||
@tap="tabClick(4)" :id="`benben_tabsfd1_0-title-item-${'4'}`">
|
||||
|
||||
<text>待评价</text>
|
||||
<text>已完成</text>
|
||||
<text v-if="detailsnum && detailsnum.to_be_evaluated > 0">({{detailsnum.to_be_evaluated}})</text>
|
||||
</view>
|
||||
</view>
|
||||
@ -280,7 +280,7 @@
|
||||
case 6:
|
||||
return '待到店自提';
|
||||
case 7:
|
||||
return '待评价';
|
||||
return '已评价';
|
||||
case 8:
|
||||
return '已完成';
|
||||
case -1:
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -74,14 +74,39 @@
|
||||
<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout nearbyMerchants_flex_3">
|
||||
<view class='flex flex-wrap align-center nearbyMerchants_fd3_0' v-for="(item, index) in list" style="position: relative;"
|
||||
:key="index">
|
||||
<view class="point-bg">
|
||||
<view class="point-bg-txt">积分{{item.score_rate}}%</view>
|
||||
</view>
|
||||
<!-- <image class='point-bg' mode="scaleToFill" src='https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/point_bg.png'
|
||||
style="width: 140rpx;height: 100rpx;z-index: 9999999999999;">
|
||||
</image> -->
|
||||
<image
|
||||
class="point-bg"
|
||||
src="https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/point_bg.png"
|
||||
:style="{
|
||||
position: 'absolute',
|
||||
top: '-32rpx',
|
||||
left: '-32rpx',
|
||||
width: '120rpx',
|
||||
height: '112rpx',
|
||||
zIndex: 10
|
||||
}"
|
||||
>
|
||||
<!-- 文字内容需要单独用 view 包裹 -->
|
||||
<text class="point-bg-txt" :style="{
|
||||
position: 'absolute',
|
||||
fontSize: '16rpx',
|
||||
top: '-54rpx',
|
||||
left: '8rpx',
|
||||
width: '112rpx',
|
||||
height: '112rpx',
|
||||
zIndex: 10
|
||||
}">积分{{item.score_rate}}%</text>
|
||||
</image>
|
||||
|
||||
<view class='flex flex-direction flex-wrap align-start' @click.stop="handleToDetail(item)"
|
||||
style="position: relative;">
|
||||
<view class='flex flex-wrap align-center'>
|
||||
<image class='nearbyMerchants_fd3_0_c0_c1_c0' mode="aspectFill" :src='item.logo'></image>
|
||||
</view>
|
||||
|
||||
<!-- <image class="nearbyMerchants_fd3_0_c0_c0001" :src='STATIC_URL+"23.png"' mode="widthFix">
|
||||
</image> -->
|
||||
<!-- <view class='flex flex-wrap align-center justify-center nearbyMerchants_fd3_0_c0_c0'
|
||||
@ -844,7 +869,20 @@
|
||||
// background: rgba(246, 247, 249, 1);
|
||||
background-size: 100% auto !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.point-bg {
|
||||
/* 注意:nvue 中不需要设置 background 相关属性 */
|
||||
resize-mode: cover; /* 替代 background-size: cover */
|
||||
}
|
||||
|
||||
.point-bg-txt {
|
||||
transform: rotate(315deg);
|
||||
font-size: 20rpx;
|
||||
color: #ffffff;
|
||||
margin-left: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
.nearbyMerchants_flex_0 {
|
||||
background: rgba(255, 147, 0, 1);
|
||||
width: 750rpx;
|
||||
@ -1332,22 +1370,4 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.point-bg {
|
||||
background: url(https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/point_bg.png) no-repeat;
|
||||
background-size: cover;
|
||||
position: absolute;
|
||||
top: -32rpx;
|
||||
left: -32rpx;
|
||||
z-index: 10;
|
||||
width: 112rpx;
|
||||
height: 112rpx;
|
||||
}
|
||||
|
||||
.point-bg-txt {
|
||||
transform: rotate(315deg);
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
margin-left: 12rpx;
|
||||
margin-top: 32rpx;
|
||||
}
|
||||
</style>
|
||||
1354
pages/tabBar/nearbyMerchants/nearbyMerchants2.nvue
Normal file
1354
pages/tabBar/nearbyMerchants/nearbyMerchants2.nvue
Normal file
File diff suppressed because it is too large
Load Diff
29
pages/tabBar/nearbyMerchants/nearbyMerchants3.nvue
Normal file
29
pages/tabBar/nearbyMerchants/nearbyMerchants3.nvue
Normal file
@ -0,0 +1,29 @@
|
||||
<template>
|
||||
<view style="width: 100px; height: 100px; position: relative;">
|
||||
<view class="point-bg"></view>
|
||||
<text class="point-bg-txt">积分10%</text>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* 无 scoped 或使用 ::v-deep */
|
||||
.point-bg {
|
||||
background: url('https://lvtai-files.oss-cn-beijing.aliyuncs.com/mini/point_bg.png') no-repeat;
|
||||
background-size: cover;
|
||||
position: absolute;
|
||||
top: -16px;
|
||||
left: -16px;
|
||||
z-index: 10;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
.point-bg-txt {
|
||||
-webkit-transform: rotate(315deg);
|
||||
transform: rotate(315deg);
|
||||
font-size: 10px;
|
||||
color: red;
|
||||
margin-left: 6px;
|
||||
margin-top: 16px;
|
||||
display: inline-block; /* 确保 transform 生效 */
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user