余额支付

main
123456 3 weeks ago
parent 16c2610037
commit de36f27994
  1. 2
      manifest.json
  2. 54
      pages/index/index.vue
  3. 37
      pages/peiwan/confirm.vue
  4. 31
      pages/users/center/index.vue
  5. 62
      pages/users/chat/index.vue
  6. 2
      pages/users/edit/index.vue
  7. 39
      pages/users/recharge/index.vue
  8. 30
      pages/users/task/index.vue
  9. BIN
      static/yue.png
  10. 2
      unpackage/dist/dev/app-plus/app-config-service.js
  11. 2530
      unpackage/dist/dev/app-plus/app-service.js
  12. 387
      unpackage/dist/dev/app-plus/app-view.js
  13. 2
      unpackage/dist/dev/app-plus/manifest.json
  14. BIN
      unpackage/dist/dev/app-plus/static/yue.png
  15. BIN
      unpackage/dist/dev/app-plus/static/余额.png

@ -1,5 +1,5 @@
{
"name" : "chunwan",
"name" : "纯玩",
"appid" : "__UNI__7C06BEE",
"description" : "",
"versionName" : "1.0.0",

@ -220,13 +220,27 @@
},
methods: {
//
trackUpload(res){
this.$api.trackUpload({
async trackUpload(res,type){
const {code, data,} = await this.$api.trackUpload({
userId: uni.getStorageSync("userInfo").id,
lat: res.latitude,
lon: res.longitude,
});
if(code == 200){
if(type==1){
uni.navigateTo({
url: "/pages/pipei/tongcheng/index"
})
}else if(type == 2){
uni.navigateTo({
url: "/pages/pipei/yuyin/index"
})
}else if(type == 3){
uni.navigateTo({
url: "/pages/pipei/shipin/index"
})
}
}
},
//
async userBalance() {
@ -383,15 +397,20 @@
}
})
},
openPage(index,id){
openPage(index,id){
const that = this;
if(index == 1){
if(this.userInfo.realnameFlag == 0){
this.isPopup = true
return ;
}
uni.navigateTo({
url: "/pages/pipei/tongcheng/index"
})
}
uni.getLocation({
type: 'gcj02',
success(res) {
that.trackUpload(res,1)
}
})
}else if(index == 2){
if(this.userInfo.realnameFlag == 0){
this.isPopup = true
@ -413,10 +432,14 @@
})
return ;
}
}
uni.navigateTo({
url: "/pages/pipei/yuyin/index"
}
uni.getLocation({
type: 'gcj02',
success(res) {
that.trackUpload(res,2)
}
})
}else if(index == 3){
if(this.userInfo.realnameFlag == 0){
this.isPopup = true
@ -438,9 +461,12 @@
})
return ;
}
}
uni.navigateTo({
url: "/pages/pipei/shipin/index"
}
uni.getLocation({
type: 'gcj02',
success(res) {
that.trackUpload(res,3)
}
})
}else if(index == 4){
uni.navigateTo({

@ -86,9 +86,10 @@
<view class="title">支付方式</view>
<view class="pay" v-if="payInfo && payInfo.length >= 1">
<template v-for="(a,i) in payInfo">
<view class="item" v-if="a=='wx-1' || a=='ali-1'" :key="i" :class="tabIndex == i?'item-on':''" @click="tabItem(i,a)">
<view class="item" v-if="a=='wx-1' || a=='ali-1' || a=='integral-1'" :key="i" :class="tabIndex == i?'item-on':''" @click="tabItem(i,a)">
<view class="a" v-if="a=='wx-1'"><image src="@/static/wxpay.png"></image>微信支付</view>
<view class="a" v-if="a=='ali-1'"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="a" v-if="a=='ali-1'"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="a" v-if="a=='integral-1'"><image src="@/static/yue.png"></image>余额支付<text>账户余额{{userInfo.money}}</text></view>
<view class="b">
<image class="img1" src="@/static/icon-check.png"></image>
<image class="img2" src="@/static/icon-check-on.png"></image>
@ -127,7 +128,8 @@
lat: "",
lon: "",
lufeiTotal: 0,
distance: 0,
distance: 0,
userInfo: {},
sellerServiceList: [],
params: {
year: true,
@ -144,9 +146,25 @@
onLoad(o) {
this.id = o.id;
this.userSellerServiceList();
this.getConfigData();
this.getConfigData();
this.getUserInfo();
},
methods: {
methods: {
//
async getUserInfo() {
const { code, data , msg } = await this.$api.findUserInfo({userId: uni.getStorageSync("userInfo").id});
if(code == 200){
this.userInfo = data;
uni.setStorageSync("userInfo",data);
}else{
uni.showToast({
title: msg,
position: "bottom",
icon: "none",
})
}
},
calculateDistance(lat1, lon1, lat2, lon2) {
const radius = 6371; //
@ -277,7 +295,7 @@
uni.showToast({
icon: "none",
position: "bottom",
title: "见面位置"
title: "请选择见面位置"
})
return ;
}
@ -446,7 +464,12 @@
.a{
flex: 1;
display: flex;
align-items: center;
align-items: center;
text{
margin-left: 20rpx;
font-size: 22rpx;
color: #999999;
}
image{
width: 60rpx;
height: 60rpx;

@ -111,9 +111,10 @@
<view class="title">支付方式</view>
<view class="pay" v-if="payInfo && payInfo.length >= 1">
<template v-for="(a,i) in payInfo">
<view class="item" v-if="a=='wx-1' || a=='ali-1'" :key="i" :class="payIndex == i?'item-on':''" @click="tabPay(i,a)">
<view class="item" v-if="a=='wx-1' || a=='ali-1' || a=='integral-1'" :key="i" :class="payIndex == i?'item-on':''" @click="tabPay(i,a)">
<view class="a" v-if="a=='wx-1'"><image src="@/static/wxpay.png"></image>微信支付</view>
<view class="a" v-if="a=='ali-1'"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="a" v-if="a=='integral-1'"><image src="@/static/yue.png"></image>余额支付<text>账户余额{{userInfo.money}}</text></view>
<view class="b">
<image class="img1" src="@/static/icon-check.png"></image>
<image class="img2" src="@/static/icon-check-on.png"></image>
@ -239,7 +240,16 @@
})
return ;
}
if(this.payType == 'integral-1'){
if(this.list[this.tabIndex].presentPrice > this.userInfo.money){
uni.showToast({
icon: "none",
position: "bottom",
title: "账户余额不足"
})
return ;
}
}
uni.showLoading({
title: "正在支付"
})
@ -262,12 +272,21 @@
async toPay(outTradeNo) {
const that = this;
const {code, data, msg} = await that.$api.paymentOrder({
payType: that.payType =='wx-1'?1:2,
payType: that.payType =='wx-1'?1:(that.payType=='ali-1'?2:3),
outTradeNo
})
if(code == 200){
console.log(data)
uni.hideLoading()
if(that.payType == 'integral-1'){
uni.showToast({
title: "支付成功"
})
that.payType = ""
that.getUserInfo();
that.getList();
return ;
}
uni.requestPayment({
provider: that.payType == 'ali-1'?'alipay':'wxpay',
orderInfo: that.payType == 'ali-1'?data.orderInfo:JSON.parse(data.orderInfo), //
@ -438,7 +457,11 @@
}
.a{
flex: 1;
text{
margin-left: 20rpx;
font-size: 22rpx;
color: #999999;
}
display: flex;
align-items: center;
image{

@ -121,10 +121,18 @@
</view>
</view>
<view class="b" v-if="isOpen">
<image @click="uploadImg()" src="@/static/chat-zhaopian.png"></image>
<image @click="uploadVideo()" src="@/static/chat-xiangji.png"></image>
<image @click="openShiping()" src="@/static/chat-yinshipin.png"></image>
<image @click="openGift()" src="@/static/chat-liwu.png"></image>
<view class="dt" @click="uploadImg()">
<image src="@/static/chat-zhaopian.png"></image>
</view>
<view class="dt" @click="uploadVideo()">
<image src="@/static/chat-xiangji.png"></image>
</view>
<view class="dt" @click="openShiping()">
<image src="@/static/chat-yinshipin.png"></image>
</view>
<view class="dt" @click="openGift()">
<image src="@/static/chat-liwu.png"></image>
</view>
</view>
<view class="c" v-if="isBiaoqing">
<image @click="toClick(i)" v-for="i in 75" :key="i" :src="'https://api.lyiyuan.cn/profile/upload/static/face/'+i+'.gif'"></image>
@ -692,19 +700,23 @@
num: type == 5?that.count:(that.count+1),
message: type == 3?that.content: that.img
})
if(code == 200){
if(code == 200){
let svgaSrc = null
if(that.giftList && that.giftList.length > 0){
svgaSrc = that.giftList[that.tabIndex].specialEffects
}
uni.sendSocketMessage({data:JSON.stringify({
"userId": uni.getStorageSync("userInfo").id,
sellerId:that.id,
type,
num: (that.count+1),
message: (type == 3?that.content: that.img),
svgaSrc: that.giftList[that.tabIndex].specialEffects,
svgaSrc: svgaSrc?svgaSrc:'',
"topic":"message"
})})
if(type==5){
that.svgaSrc = that.giftList[that.tabIndex].specialEffects
if(that.svgaSrc){
if(svgaSrc){
that.svgaSrc = svgaSrc
that.isSvga = true;
that.$refs.cSvgaRef.call("clear");
that.$refs.cSvgaRef.call("startAnimation")
@ -715,7 +727,6 @@
}
that.isOpen = false;
that.isBiaoqing = false;
that.isToggle = true;
that.show1 = false;
that.userBalance();
that.editorCtx.clear();
@ -1111,13 +1122,13 @@
/* #endif */
height: calc(100vh - 190rpx - 88rpx - 70rpx);
&-on{
height: calc(100vh - 190rpx - 88rpx - 70rpx - 160rpx);
height: calc(100vh - 190rpx - 88rpx - 70rpx - 260rpx);
}
&-active{
height: calc(100vh - 120rpx - 88rpx - 70rpx);
}
&-active1{
height: calc(100vh - 120rpx - 88rpx - 70rpx - 160rpx);
height: calc(100vh - 120rpx - 88rpx - 70rpx - 260rpx);
}
.changyong{
overflow: hidden;
@ -1487,22 +1498,27 @@
}
.b{
width: 100%;
height: 160rpx;
height: 260rpx;
display: flex;
align-items: center;
justify-content: space-between;
border-top: 1px solid #E2E2E2;
padding: 0 45rpx;
box-sizing: border-box;
image{
width: 100rpx;
height: 100rpx;
display: block;
.dt{
flex: 1;
display: flex;
justify-content: center;
margin-top: 30rpx;
image{
width: 100rpx;
height: 100rpx;
display: block;
}
}
}
.c{
width: 100%;
height: 160rpx;
height: 260rpx;
overflow-y: auto;
overflow-x: hidden;
border-top: 1px solid #E2E2E2;
@ -1515,12 +1531,12 @@
opacity: 0;
}
image{
width: 70rpx;
height: 70rpx;
width: 24px;
height: 24px;
float: left;
margin-top: 6rpx;
margin-bottom: 6rpx;
margin-right: 5rpx;
margin-top: 5rpx;
margin-bottom: 5rpx;
margin-right: 7rpx;
}
}
}

@ -120,7 +120,7 @@
<view class="b">
<view class="txt" @click="show = true" v-if="!userInfo.sexFlag">请选择</view>
<view class="list" v-else>
<view class="li" v-for="(a,i) in userInfo.sexFlag" @click="show = true">{{a}}</view>
<view class="li" v-for="(a,i) in userInfo.sexFlag" :key="i" @click="show = true">{{a}}</view>
</view>
<image src="@/static/icon-arrow.png"></image>
</view>

@ -19,9 +19,10 @@
<view class="title">选择充值方式</view>
<view class="content">
<template v-for="(a,i) in payInfo">
<view class="item" v-if="a=='wx-1' || a=='ali-1'" :key="i" :class="tabIndex == i?'item-on':''" @click="tabItem(i,a)">
<view class="item" v-if="a=='wx-1' || a=='ali-1' || a=='integral-1'" :key="i" :class="tabIndex == i?'item-on':''" @click="tabItem(i,a)">
<view class="a" v-if="a=='wx-1'"><image src="@/static/wxpay.png"></image>微信支付</view>
<view class="a" v-if="a=='ali-1'"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="a" v-if="a=='ali-1'"><image src="@/static/zfb.png"></image>支付宝支付</view>
<view class="a" v-if="a=='integral-1'"><image src="@/static/yue.png"></image>余额支付<text>账户余额{{userInfo.money}}</text></view>
<view class="b">
<image class="img1" src="@/static/icon-check.png"></image>
<image class="img2" src="@/static/icon-check-on.png"></image>
@ -92,6 +93,16 @@
title: "请选择支付方式"
})
return ;
}
if(this.payType == 'integral-1'){
if(this.obj.giveCoins > this.userInfo.money){
uni.showToast({
icon: "none",
position: "bottom",
title: "账户余额不足"
})
return ;
}
}
that.show = false;
that.tabIndex = -1;
@ -116,11 +127,22 @@
async toPay(outTradeNo) {
const that = this;
const {code, data, msg} = await that.$api.paymentOrder({
payType: that.payType =='wx-1'?1:2,
payType: that.payType =='wx-1'?1:(that.payType=='ali-1'?2:3),
outTradeNo
})
if(code == 200){
uni.hideLoading()
uni.hideLoading()
if(that.payType == 'integral-1'){
uni.showToast({
title: "支付成功"
})
that.payType = ""
setTimeout(()=>{
that.getUserInfo();
that.getList();
},2000)
return ;
}
uni.requestPayment({
provider: that.payType == 'ali-1'?'alipay':'wxpay',
orderInfo: that.payType == 'ali-1'?data.orderInfo:JSON.parse(data.orderInfo), //
@ -129,7 +151,7 @@
title: "支付成功"
})
setTimeout(()=>{
that.getUserInfo();
that.getUserInfo();
that.getList();
},2000)
},
@ -228,7 +250,12 @@
.a{
flex: 1;
display: flex;
align-items: center;
align-items: center;
text{
margin-left: 20rpx;
font-size: 22rpx;
color: #999999;
}
image{
width: 60rpx;
height: 60rpx;

@ -8,7 +8,7 @@
<view class="content" v-if="info.noviceList && info.noviceList.length > 0">
<view class="item" v-for="(a,i) in info.noviceList" :key="i">
<view class="a">{{a.name}}<view class="num">金币<text>+{{a.coins}}</text></view></view>
<view class="b" v-if="a.isFinish == 0">去完成</view>
<view class="b" v-if="a.isFinish == 0" @click="openPage(a)">去完成</view>
<view class="b b-on" v-else>已完成</view>
</view>
</view>
@ -16,7 +16,7 @@
<view class="content" v-if="info.dayList && info.dayList.length > 0">
<view class="item" v-for="(a,i) in info.dayList" :key="i">
<view class="a">{{a.name}}<view class="num">金币<text>+{{a.coins}}</text></view></view>
<view class="b" v-if="a.isFinish == 0" @click="toPage()">去完成</view>
<view class="b" v-if="a.isFinish == 0" @click="openPage(a)">去完成</view>
<view class="b b-on" v-else>已完成</view>
</view>
</view>
@ -41,10 +41,28 @@
this.getList();
},
methods: {
toPage() {
uni.switchTab({
url: "/pages/index/index"
})
openPage(a) {
if(a.id==1002 || a.id==1003|| a.id==1004){
uni.switchTab({
url: "/pages/index/index"
})
}else if(a.id==1000){
uni.switchTab({
url: "/pages/user/index"
})
}else if(a.id==1001){
uni.navigateTo({
url: "/pages/dongtai/add"
})
}else if(a.id==1||a.id==2||a.id==4){
uni.navigateTo({
url: "/pages/users/edit/index"
})
}else if(a.id==3){
uni.navigateTo({
url: "/pages/users/renzheng/index"
})
}
},
async getList() {
const { code, data } = await this.$api.taskList({

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Loading…
Cancel
Save