|
@@ -25,12 +25,14 @@
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
import { getMallRechargeShortLink } from "@/api/recharge";
|
|
import { getMallRechargeShortLink } from "@/api/recharge";
|
|
|
|
|
+import { getDetB} from "@/api/order";
|
|
|
export default {
|
|
export default {
|
|
|
- name: "shPayCp",
|
|
|
|
|
|
|
+ name: "debtResult",
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
orderInfo:[],
|
|
orderInfo:[],
|
|
|
- copyText:""
|
|
|
|
|
|
|
+ copyText:"",
|
|
|
|
|
+ remainDebtPrice:0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad(){
|
|
onLoad(){
|
|
@@ -38,19 +40,24 @@ export default {
|
|
|
//返回上一页时刷新
|
|
//返回上一页时刷新
|
|
|
let pages = getCurrentPages();
|
|
let pages = getCurrentPages();
|
|
|
let prevPage = pages[ pages.length - 2 ];
|
|
let prevPage = pages[ pages.length - 2 ];
|
|
|
- if(prevPage.$vm){
|
|
|
|
|
- prevPage.$vm.pageAction = {refresh:1}
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ prevPage.$vm.refreshPage = 1
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
init(){
|
|
init(){
|
|
|
let amount = this.option.amount?parseFloat(this.option.amount):0
|
|
let amount = this.option.amount?parseFloat(this.option.amount):0
|
|
|
- getMallRechargeShortLink().then(res=>{
|
|
|
|
|
- if(res.code == 1){
|
|
|
|
|
- let link = res.data.link ? res.data.link:''
|
|
|
|
|
- this.copyText = "售后金额¥"+amount+"元,已充值到你的账户\n点击下面链接查看你的账户余额\n"+link+"\n链接30天后失效"
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ let orderId = this.option.orderId?this.option.orderId:0
|
|
|
|
|
+ let that = this
|
|
|
|
|
+ getDetB({id:orderId}).then(res => {
|
|
|
|
|
+ that.orderInfo = res.data
|
|
|
|
|
+ that.remainDebtPrice = that.orderInfo.remainDebtPrice?parseFloat(that.orderInfo.remainDebtPrice):0
|
|
|
|
|
+ getMallRechargeShortLink({orderId:orderId}).then(res=>{
|
|
|
|
|
+ if(res.code == 1){
|
|
|
|
|
+ let rechargeAccountLink = res.data.rechargeAccountLink ? res.data.rechargeAccountLink:''
|
|
|
|
|
+ let orderLink = res.data.orderLink?res.data.orderLink:''
|
|
|
|
|
+ that.copyText = "已售后,欠款减少"+amount+"元,本单剩余欠款"+that.remainDebtPrice+"元,点击下面链接查看详情\n\n余额 "+rechargeAccountLink+"\n\n本单 "+orderLink+"\n\n链接30天后失效"
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
copyBack(){
|
|
copyBack(){
|
|
@@ -60,7 +67,7 @@ export default {
|
|
|
uni.showToast({ title: '复制成功', icon: 'success', duration: 2000 })
|
|
uni.showToast({ title: '复制成功', icon: 'success', duration: 2000 })
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
uni.navigateBack()
|
|
uni.navigateBack()
|
|
|
- }, 800)
|
|
|
|
|
|
|
+ }, 500)
|
|
|
},
|
|
},
|
|
|
fail: () => {
|
|
fail: () => {
|
|
|
uni.showToast({ title: '复制失败', icon: 'none', duration: 2000 })
|
|
uni.showToast({ title: '复制失败', icon: 'none', duration: 2000 })
|