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