调整业绩账户,新增微信支付渠道
This commit is contained in:
@@ -10,8 +10,8 @@ import router from '../router'
|
|||||||
|
|
||||||
// 基础配置
|
// 基础配置
|
||||||
const config = {
|
const config = {
|
||||||
apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
// apiUrl : 'https://douhuo.douhuofalv.com/api/',
|
||||||
// apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
apiUrl : 'https://api.douhuotest.douhuofalv.com/api/', //测试环境
|
||||||
timeout : 60000
|
timeout : 60000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name" : "抖火",
|
"name" : "抖火",
|
||||||
"appid" : "__UNI__C305C03",
|
"appid" : "__UNI__C305C03",
|
||||||
"description" : "纵有疾风起,人生不言弃",
|
"description" : "纵有疾风起,人生不言弃",
|
||||||
"versionName" : "1.3.1",
|
"versionName" : "1.3.2",
|
||||||
"versionCode" : 103,
|
"versionCode" : 103,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>"
|
||||||
],
|
],
|
||||||
@@ -53,10 +54,11 @@
|
|||||||
"ad" : {},
|
"ad" : {},
|
||||||
"share" : {
|
"share" : {
|
||||||
"weixin" : {
|
"weixin" : {
|
||||||
"appid" : "wx9ca2a763085ab4b6",
|
"appid" : "wx1bcdeda0dec3f1bd",
|
||||||
"UniversalLinks" : ""
|
"UniversalLinks" : ""
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"payment" : {}
|
||||||
},
|
},
|
||||||
"icons" : {
|
"icons" : {
|
||||||
"android" : {
|
"android" : {
|
||||||
|
|||||||
10
pages.json
10
pages.json
@@ -554,6 +554,16 @@
|
|||||||
"enablePullDownRefresh": false,
|
"enablePullDownRefresh": false,
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
"path": "pages/im/chat",
|
||||||
|
"auth": true,
|
||||||
|
"name": "ImChat",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "聊天窗口",
|
||||||
|
"enablePullDownRefresh": false,
|
||||||
|
"disableScroll": true,
|
||||||
|
"navigationBarBackgroundColor": "#FFFFFF"
|
||||||
|
}
|
||||||
}],
|
}],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
|
|||||||
@@ -25,9 +25,26 @@
|
|||||||
</view>
|
</view>
|
||||||
<block v-if="list.length > 0">
|
<block v-if="list.length > 0">
|
||||||
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
<view class="log-flex" v-for="(item, index) in list" :key="index">
|
||||||
<view class="type nowrap">{{item.type}}</view>
|
<view class="log-flex-item">
|
||||||
<view class="perf nowrap">{{item.perf}}</view>
|
<label>类 型</label>
|
||||||
<view class="time nowrap">{{item.created_at}}</view>
|
<view class="log-flex-val nowrap">{{item.type}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="log-flex-item">
|
||||||
|
<label>服务费</label>
|
||||||
|
<view class="log-flex-val nowrap">{{item.perf}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="log-flex-item">
|
||||||
|
<label>客 户</label>
|
||||||
|
<view class="log-flex-val nowrap">{{item.nick_name || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="log-flex-item">
|
||||||
|
<label>推荐人</label>
|
||||||
|
<view class="log-flex-val nowrap">{{item.parent_name || '-'}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="log-flex-item">
|
||||||
|
<label>时 间</label>
|
||||||
|
<view class="log-flex-val nowrap">{{item.created_at}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else>
|
||||||
@@ -176,23 +193,21 @@
|
|||||||
margin: 0 -30rpx 10rpx;
|
margin: 0 -30rpx 10rpx;
|
||||||
}
|
}
|
||||||
.log-flex{
|
.log-flex{
|
||||||
padding: 5rpx 0;
|
border-bottom: solid 1rpx #F6F6F6;
|
||||||
display: flex;
|
padding: 20rpx 0;
|
||||||
justify-content: space-between;
|
&:last-child{border-bottom: none;}
|
||||||
line-height: 70rpx;
|
&-item{
|
||||||
align-items: center;
|
line-height: 54rpx;
|
||||||
font-size: 30rpx;
|
font-size: 32rpx;
|
||||||
color: #666666;
|
display: flex;
|
||||||
.type{
|
label{
|
||||||
width: 150rpx;
|
color: gray;
|
||||||
|
width: 100rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.time{
|
&-val{
|
||||||
width: 300rpx;
|
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
width: calc(100% - 100rpx);
|
||||||
.perf{
|
|
||||||
width: calc( 100% - 450rpx);
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
48
pages/im/chat.vue
Normal file
48
pages/im/chat.vue
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<template>
|
||||||
|
<view class="chat">
|
||||||
|
<scroll-view class="chat-soll" scroll-y>
|
||||||
|
<view v-for="(item, index) in 50" :key="index">{{item}}滚动的聊天记录</view>
|
||||||
|
</scroll-view>
|
||||||
|
<view class="chat-footer">
|
||||||
|
<view class="chat-inputs">
|
||||||
|
<view class="">常用语</view>
|
||||||
|
<input type="text" placeholder="输入框" confirm-type="send">
|
||||||
|
<view class="">表情</view>
|
||||||
|
<view class="">加</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.chat{
|
||||||
|
background: #ddd;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
|
.chat-soll{
|
||||||
|
height: 50vh;
|
||||||
|
}
|
||||||
|
.chat-footer{
|
||||||
|
background: white;
|
||||||
|
padding: 30rpx 30rpx 60rpx 30rpx;
|
||||||
|
.chat-inputs{
|
||||||
|
display: flex;
|
||||||
|
background: #f6f7f9;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 40rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -22,14 +22,14 @@
|
|||||||
付款码支付
|
付款码支付
|
||||||
</view>
|
</view>
|
||||||
<radio class="choose-radio" value="code"></radio>
|
<radio class="choose-radio" value="code"></radio>
|
||||||
</label>
|
</label> -->
|
||||||
<label class="choose-item nowrap">
|
<label class="choose-item nowrap">
|
||||||
<view class="choose-text">
|
<view class="choose-text">
|
||||||
<image src="@/static/icons/pay_wechat.png" mode="aspectFill"></image>
|
<image src="@/static/icons/pay_wechat.png" mode="aspectFill"></image>
|
||||||
微信支付
|
微信支付
|
||||||
</view>
|
</view>
|
||||||
<radio class="choose-radio" value="wx"></radio>
|
<radio class="choose-radio" value="wx" :checked="payMethod == 'wx'"></radio>
|
||||||
</label> -->
|
</label>
|
||||||
<label class="choose-item nowrap">
|
<label class="choose-item nowrap">
|
||||||
<view class="choose-text">
|
<view class="choose-text">
|
||||||
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
|
<image src="@/static/icons/pay_ali.png" mode="aspectFill"></image>
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
mask : true
|
mask : true
|
||||||
})
|
})
|
||||||
if(this.$Route.query.paytype === 'free'){
|
if(this.$Route.query.paytype === 'free'){
|
||||||
this.payMethod = "ali"
|
this.payMethod = "wx"
|
||||||
umsFreeInfo(this.$Route.query.serviceId).then(res => {
|
umsFreeInfo(this.$Route.query.serviceId).then(res => {
|
||||||
let { order_id, price, order_no } = res;
|
let { order_id, price, order_no } = res;
|
||||||
this.orderId = order_id
|
this.orderId = order_id
|
||||||
@@ -157,10 +157,9 @@
|
|||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
case 'wx':
|
case 'wx':
|
||||||
uni.showToast({
|
if(this.payType == 'price') this.onUmsPay('mp')
|
||||||
title: '微信支付暂未开放,请敬期待',
|
if(this.payType == 'diff') this.onDiffUmsPay('mp')
|
||||||
icon : 'none'
|
if(this.payType == 'free') this.onFreePay('mp')
|
||||||
})
|
|
||||||
break;
|
break;
|
||||||
case 'ali':
|
case 'ali':
|
||||||
if(this.payType == 'price') this.onUmsPay('mp_alipay')
|
if(this.payType == 'price') this.onUmsPay('mp_alipay')
|
||||||
@@ -179,8 +178,13 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.getState = true
|
this.getState = true
|
||||||
this.trade_id = res.trade_id
|
this.trade_id = res.trade_id
|
||||||
if(res.alipay){
|
switch (type){
|
||||||
plus.runtime.openURL(res.alipay)
|
case 'mp':
|
||||||
|
this.onMiniWx()
|
||||||
|
break;
|
||||||
|
case 'mp_alipay':
|
||||||
|
plus.runtime.openURL(res.alipay)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -199,8 +203,38 @@
|
|||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
this.getState = true
|
this.getState = true
|
||||||
this.trade_id = res.trade_id
|
this.trade_id = res.trade_id
|
||||||
if(res.alipay){
|
switch (type){
|
||||||
plus.runtime.openURL(res.alipay)
|
case 'mp':
|
||||||
|
this.onMiniWx()
|
||||||
|
break;
|
||||||
|
case 'mp_alipay':
|
||||||
|
plus.runtime.openURL(res.alipay)
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 银联三方自由服务包支付
|
||||||
|
onFreePay(type){
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask : true
|
||||||
|
})
|
||||||
|
umsFree(this.orderId, type).then(res => {
|
||||||
|
uni.hideLoading()
|
||||||
|
this.getState = true
|
||||||
|
this.trade_id = res.trade_id
|
||||||
|
switch (type){
|
||||||
|
case 'mp':
|
||||||
|
this.onMiniWx()
|
||||||
|
break;
|
||||||
|
case 'mp_alipay':
|
||||||
|
plus.runtime.openURL(res.alipay)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -251,24 +285,23 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 银联三方自由服务包支付
|
// 打开微信小程序收银台
|
||||||
onFreePay(type){
|
onMiniWx(){
|
||||||
wx.showLoading({
|
let token = this.$store.getters.getToken
|
||||||
title: '加载中...',
|
let tradeId = res.trade_id
|
||||||
mask : true
|
plus.share.getServices(e => {
|
||||||
})
|
let wxIndex = e.findIndex(val => val.id == 'weixin')
|
||||||
umsFree(this.orderId, type).then(res => {
|
let sweixin = null
|
||||||
uni.hideLoading()
|
if(wxIndex >= 0){
|
||||||
this.getState = true
|
sweixin = e[wxIndex]
|
||||||
this.trade_id = res.trade_id
|
sweixin ? sweixin.launchMiniProgram({
|
||||||
if(res.alipay){
|
id : 'gh_918c81628d6f',
|
||||||
plus.runtime.openURL(res.alipay)
|
path: 'pages/pay/pay?type=app&trade_id=' + tradeId + '&token=' + token,
|
||||||
|
}): uni.showToast({
|
||||||
|
title: '当前环境暂不支持微信支付',
|
||||||
|
icon : 'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
|
||||||
title: err.message,
|
|
||||||
icon : 'none'
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 更新订单列表
|
// 更新订单列表
|
||||||
|
|||||||
@@ -268,6 +268,8 @@
|
|||||||
},
|
},
|
||||||
// 创建订单
|
// 创建订单
|
||||||
onCreateOrder(){
|
onCreateOrder(){
|
||||||
|
console.log('需要检查一下是否已经做了业务员签约')
|
||||||
|
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ['个人订单', '客户订单'],
|
itemList: ['个人订单', '客户订单'],
|
||||||
success : res => {
|
success : res => {
|
||||||
|
|||||||
Reference in New Issue
Block a user