首次提交

This commit is contained in:
duan
2024-06-06 11:48:06 +08:00
parent 7d3ace3cd2
commit 3fe43d0841
270 changed files with 51481 additions and 1 deletions

View File

@@ -0,0 +1,550 @@
<template>
<view v-if="XCXIsSelect !='否'">
<view class="padding">
<view class=" padding-lr bg-white radius">
<u-form :model="form" ref="uForm" label-position="top" :label-style='lableStyle'>
<u-form-item label="真实姓名" :border-bottom='false'>
<u-input :disabled="disabled" placeholder="请输入真实姓名" v-model="form.userName" />
</u-form-item>
<u-form-item label="证件号码" :border-bottom='false'>
<u-input :disabled="disabled" placeholder="请输入身份证号码" v-model="form.identityCardNumber" />
</u-form-item>
</u-form>
</view>
<view class=" padding bg-white radius margin-top">
<view class="margin-top"
style="border: 2rpx dashed #484B74; width: 100%;height: 320rpx;position: relative;">
<view style="text-align: center;margin: 80rpx auto 0;" @click="addImages(1)"
v-if="!form.identityCardFront">
<image src="../../../static/my/photo.png" mode="widthFix" style="width: 73rpx;"></image>
<view class="text-sm text-gray margin-top-sm">请拍摄身份证正面</view>
</view>
<image @click="disabled? '':addImages(1)" v-else :src="form.identityCardFront"
style="width: 100%;height: 320rpx;"></image>
</view>
<!-- <view class="text-lg">上传身份证反面</view> -->
<view class="margin-top"
style="border: 2rpx dashed #484B74; width: 100%;height: 320rpx;position: relative;">
<view style="text-align: center;margin: 80rpx auto 0;" @click="addImages(2)"
v-if="!form.identityCardVerso">
<image src="../../../static/my/photo.png" mode="widthFix" style="width: 73rpx;"></image>
<view class="text-sm text-gray margin-top-sm">请拍摄身份证反面</view>
</view>
<image @click="disabled? '':addImages(2)" v-else :src="form.identityCardVerso"
style="width: 100%;height: 320rpx;"></image>
</view>
<view class="margin-top"
style="border: 2rpx dashed #484B74; width: 100%;height: 320rpx;position: relative;">
<view style="text-align: center;margin: 80rpx auto 0;" @click="addImages(3)"
v-if="!form.selfIdentityCard">
<image src="../../../static/my/photo.png" mode="widthFix" style="width: 73rpx;"></image>
<view class="text-sm text-gray margin-top-sm">请拍摄手持身份证正面</view>
</view>
<image @click="disabled? '':addImages(3)" v-else :src="form.selfIdentityCard"
style="width: 100%;height: 320rpx;"></image>
</view>
</view>
<view class="padding bg-white radius margin-top">
<view class="text-bold">缴纳保证金</view>
<view class="flex justify-between margin-top-sm">
<view class="text-gray">满足订单量及好评率即可申请退还保证金</view>
<view class="text-bold" style="color: #FF6A04;">¥{{money}}</view>
</view>
</view>
<view class="padding margin-top footer text-xxl">
<text @tap="isShowAgree" class="cuIcon" :class="showAgree?'cuIcon-radiobox':'cuIcon-round'">同意并接受</text>
<!-- 协议地址 -->
<navigator url="/pages/riderMy/paotuixieyi" open-type="navigate">跑腿代购用户协议</navigator>
</view>
<view style="height: 120rpx;"></view>
</view>
<view class="bg-white flex justify-between align-center padding-lr"
style="position: fixed;bottom: 0;width: 100%;height: 120rpx;">
<view class="">
<text class="text-lg text-bold text-black">支付</text>
<text class="text-red">¥{{money}}</text>
</view>
<view>
<u-button v-if="!disabled" @click="submit" class="" :custom-style="customStyle" shape="circle"
:hair-line="false">提交认证</u-button>
</view>
</view>
<u-popup v-model="showpay" mode="bottom" close-icon="close-circle" close-icon-pos="top-right"
close-icon-color="#8f9298" close-icon-size="50">
<view class="popup_pay">
<view class="bg margin-top padding-lr radius">
<view style="padding: 0 20upx;margin-top: 36rpx;">
<view
style="display: flex;height: 100upx;align-items: center;padding: 20upx 0;justify-content: center;"
v-for="(item,index) in openLists" :key='index'>
<image :src="item.image" style="width: 55upx;height: 55upx;border-radius: 50upx;">
</image>
<view style="font-size: 30upx;margin-left: 20upx;width: 70%;">
{{item.name}}
</view>
<radio-group name="openWay" style="margin-left: 45rpx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#FF7F00" :checked="openWay == item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<view class="pay_btns" @click="pay()">确认支付</view>
</view>
</u-popup>
</view>
</template>
<script>
import configdata from '@/common/config.js';
export default {
data() {
return {
form: {
userName: '',
// phone: '',
identityCardNumber: '',
identityCardFront: '',
identityCardVerso: '',
selfIdentityCard: '',
cashDeposit: ''
},
disabled: false,
lableStyle: {
color: '#000',
fontSize: '36upx',
fontWeight: 700
},
customStyle: {
backgroundColor: '#FF6A04',
color: '#FFFFFF',
border: 0,
width: '200rpx'
},
btnStyle: {
backgroundColor: '#FF6A04',
color: '#FFFFFF',
},
money: 0,
showAgree: false, //协议是否选择
sessionkey: '',
showpay: false,
openWay: 1,
openLists: [],
indentNumber: '',
XCXIsSelect:'否'
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if(this.XCXIsSelect =='否'){
uni.setNavigationBarTitle({
title: '隐私政策'
});
}else{
uni.setNavigationBarTitle({
title: '实名认证'
});
}
// #ifdef MP-WEIXIN
this.openLists = [{
id: 1,
image: '../../../static/my/weixin.png',
name: '微信'
}]
this.openWay = 1
// #endif
// #ifdef H5
this.openLists = [
{
id: 1,
image: '../../../static/my/weixin.png',
name: '微信'
},
{
id: 2,
image: '../../../static/my/zhifubao.png',
name: '支付宝'
}
]
this.openWay = 1
// #endif
// #ifdef APP-PLUS
this.openLists = [{
id: 1,
image: '../../../static/my/weixin.png',
name: '微信'
},
{
id: 2,
image: '../../../static/my/zhifubao.png',
name: '支付宝'
}
]
// #endif
this.getRZmoney()
this.sessionkey = this.$queue.getData("sessionkey");
},
methods: {
isShowAgree() {
this.showAgree = !this.showAgree
},
getRZmoney() {
this.$Request.get("/app/common/type/273").then(res => {
if (res.code == 0) {
this.money = res.data.value
this.form.cashDeposit = res.data.value
}
});
},
selectWay: function(item) {
this.openWay = item.id;
},
submit() {
let that = this
console.log(that.form)
if (!that.form.userName) {
uni.showToast({
title: '请输入真实姓名',
icon: 'none',
duration: 1000
})
return;
}
if (!that.form.identityCardNumber) {
uni.showToast({
title: '请输入身份证号',
icon: 'none',
duration: 1000
})
return;
}
if (!that.form.identityCardFront) {
uni.showToast({
title: '请上传身份证正面',
icon: 'none',
duration: 1000
})
return;
}
if (!that.form.identityCardVerso) {
uni.showToast({
title: '请上传身份证反面',
icon: 'none',
duration: 1000
})
return;
}
if (!that.form.selfIdentityCard) {
uni.showToast({
title: '请上传手持身份证正面',
icon: 'none',
duration: 1000
})
return;
}
if (!this.showAgree) {
uni.showToast({
title: '请勾选跑腿代购用户协议',
icon: 'none',
duration: 1000
})
return;
}
// #ifdef MP-WEIXIN
that.$Request.postJson("/app/wxPayErrRider/wxPayJsApiRiderCertification/3", that.form).then(res => {
if (res.code == 0) {
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.data.timestamp,
nonceStr: res.data.noncestr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.sign,
success: function(res) {
console.log(res)
uni.hideLoading();
uni.showToast({
title: '实名认证提交成功',
icon: 'none'
});
setTimeout(function() {
uni.navigateBack(1)
}, 1000)
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
uni.hideLoading();
that.$queue.showToast('支付失败');
}
});
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
// #endif
// #ifdef H5
this.showpay = true
// #endif
// #ifdef APP-PLUS
this.showpay = true
// #endif
},
getUserInfo() {
this.$Request.get("/app/userinfo/findUserInfoById").then(res => {
if (res.code == 0) {
this.form.name = res.data.name ? res.data.name : ''
this.form.idNumber = res.data.idNumber ? res.data.idNumber : ''
this.form.front = res.data.front ? res.data.front : ''
this.form.back = res.data.back ? res.data.back : ''
if (res.data.status == 1) {
this.disabled = true
}
if (res.data.status == 2) {
this.form.remek = res.data.remek ? res.data.remek : ''
}
}
});
},
addImages(e) {
let that = this
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < 1; i++) {
that.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
// url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
console.log(uploadFileRes)
if (e == 1) {
that.form.identityCardFront = JSON.parse(uploadFileRes
.data).data
} else if (e == 2) {
that.form.identityCardVerso = JSON.parse(uploadFileRes
.data).data
} else if (e == 3) {
that.form.selfIdentityCard = JSON.parse(uploadFileRes.data)
.data
}
uni.hideLoading();
}
});
}
}
})
},
config: function(name) {
var info = null;
if (name) {
var name2 = name.split("."); //字符分割
if (name2.length > 1) {
info = configdata[name2[0]][name2[1]] || null;
} else {
info = configdata[name] || null;
}
if (info == null) {
let web_config = cache.get("web_config");
if (web_config) {
if (name2.length > 1) {
info = web_config[name2[0]][name2[1]] || null;
} else {
info = web_config[name] || null;
}
}
}
}
return info;
},
pay() {
if (this.openWay == 0) {
this.$queue.showToast('请选择支付方式!')
return;
}
if (this.openWay == 1) {
// #ifdef H5
this.$Request.postJson("/app/wxPayErrRider/wxPayJsApiRiderCertification/2", this.form).then(
res => {
console.log(res)
if (res.code == 0) {
console.log()
this.callPay(res.data);
} else {
uni.showToast({
icon: 'none',
title: '支付失败!'
});
}
});
// #endif
// #ifdef APP-PLUS
// 微信APP支付 根据订单id获取支付信息
this.$Request.postJson("/app/wxPayErrRider/wxPayJsApiRiderCertification/1", this.form).then(
res => {
console.log(JSON.stringify(res), '微信支付信息')
this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
});
// #endif
} else if (this.openWay == 2) { //支付宝支付
// #ifdef H5
this.$Request.postJson("/app/wxPayErrRider/wxPayJsApiRiderCertification/5", this.form).then(
res => {
console.log(res)
if (res.code == 0) {
console.log()
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
} else {
uni.showToast({
icon: 'none',
title: '支付失败!'
});
}
});
// #endif
console.log('支付宝')
// APP支付宝支付
// #ifdef APP
this.$Request.postJson("/app/wxPayErrRider/wxPayJsApiRiderCertification/4", this.form).then(
res => {
console.log(JSON.stringify(res), '支付宝支付信息')
this.setPayment('alipay', res.data);
});
// #endif
}
},
callPay: function(response) {
console.log(response)
if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', this.onBridgeReady(response), false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', this.onBridgeReady(response));
document.attachEvent('onWeixinJSBridgeReady', this.onBridgeReady(response));
}
} else {
this.onBridgeReady(response);
}
},
onBridgeReady: function(response) {
let that = this;
// if (!response.package) {
// return;
// }
console.log(response, 111111)
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": response.appid, //公众号名称,由商户传入
"timeStamp": response.timestamp, //时间戳自1970年以来的秒数
"nonceStr": response.noncestr, //随机串
"package": response.package,
"signType": response.signType, //微信签名方式:
"paySign": response.sign //微信签名
},
function(res) {
console.log(res, '/*-/*-/*-')
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
uni.showLoading({
title: '支付成功'
});
setTimeout(function() {
uni.hideLoading();
uni.navigateBack()
}, 1000);
} else {
uni.hideLoading();
}
WeixinJSBridge.log(response.err_msg);
}
);
},
isCheckPay(status, name, order) {
if (status == 0) {
this.setPayment(name, order);
} else {
uni.hideLoading();
uni.showToast({
title: '支付信息有误',
icon: 'none'
});
}
},
setPayment(name, order) {
console.log(name, '*-*-*', order)
uni.requestPayment({
provider: name,
orderInfo: order, //微信、支付宝订单数据
success: function(res) {
console.log(res)
uni.hideLoading();
uni.showLoading({
title: '支付成功'
});
setTimeout(function() {
uni.navigateBack()
}, 1000);
},
fail: function(err) {
console.log(err)
uni.hideLoading();
},
complete() {
uni.hideLoading();
}
});
},
}
}
</script>
<style>
.footer {
/* // padding-left: 140upx; */
/* justify-content: center; */
margin-top: 32upx;
font-size: 24upx;
color: #666666;
display: flex;
text-align: center;
align-items: center;
}
/* 支付弹框 */
.popup_pay {
width: 100%;
}
.pay_btns {
width: 90%;
margin: 0 auto 40rpx;
text-align: center;
background: #FF7F00;
height: 80rpx;
border-radius: 16rpx;
color: #ffffff;
line-height: 80rpx;
margin-top: 20rpx;
}
</style>

85
pages/riderMy/kefu.vue Normal file
View File

@@ -0,0 +1,85 @@
<template>
<view class="content">
<view class="kefu_box">
<view class="title">联系电话</view>
<view style="font-size: 32rpx;">{{mobile}}</view>
<view class="btn" @click="PhoneCall">一键拨打</view>
<view class="image">
<image src="../../../static/logo.png"></image>
</view>
<view class="tit">长按二维码添加微信</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
mobile: '17884849832'
}
},
methods: {
PhoneCall() {
uni.makePhoneCall({
phoneNumber: this.mobile //仅为示例
});
}
}
}
</script>
<style>
page {
background: #F2F2F2;
}
.content {
width: 100%;
}
.kefu_box {
width: 90%;
margin: 0 auto;
background: #ffffff;
border-radius: 17rpx;
margin-top: 40rpx;
padding: 35rpx 0rpx;
text-align: center;
}
.title {
padding: 20rpx 0rpx;
font-size: 41rpx;
letter-spacing: 2rpx;
}
.btn {
background: #FF6A04;
color: #ffffff;
width: 42%;
margin: 0 auto;
border-radius: 54rpx;
padding: 20rpx 0rpx;
font-size: 37rpx;
letter-spacing: 2rpx;
margin-top: 25rpx;
}
.image {
width: 40%;
height: 300rpx;
margin: 0 auto;
padding: 20rpx 0rpx;
}
.image image {
width: 100%;
height: 100%;
}
.tit {
color: #666666;
font-size: 28rpx;
}
</style>

645
pages/riderMy/kefu/chat.vue Normal file
View File

@@ -0,0 +1,645 @@
<template>
<view>
<view style="width: 100%;">
<view style="display: flex;flex-direction: column;" v-for="(item,index) in ListItem" :key='index' >
<view style="margin-top: 15rpx;width: 100%;text-align: center;font-size: 26rpx;color: #999999;">
{{item.createTime}}</view>
<view v-if="item.sendType === 2" style="width: 83%;margin-right: 15%;">
<view class="chat-listitem" style="float: left;margin-left: 10rpx;">
<view>
<image src="../../../static/logo.png" class="chat-listitem-image"></image>
</view>
<view v-if="item.content && item.type === 1" class="chat-listitem-text"
style="margin-left: 20rpx;">{{item.content}}</view>
<image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content"
style="height: 200rpx;width: 200rpx;margin-left: 20rpx;"></image>
</view>
</view>
<view v-if="item.sendType === 1" style="width: 83%;margin-left: 15%;">
<view class="chat-listitem" style="float: right;">
<view v-if="item.content && item.type === 1" @longpress="copy(item.content)"
class="chat-listitem-text" style="margin-right: 20rpx;">{{item.content}}</view>
<view v-if="item.content && item.type === 4" @click="goShop(item.content[3])"
style="width: 400rpx;background: #FFFFFF;height: max-content;margin-right: 20rpx;margin-top: 10rpx;border-radius: 20rpx;">
<image :src="item.content[0]" class="chat-listitem-image-type4"
style="width: 400rpx;height: 350rpx;"></image>
<view style="padding: 10rpx;padding-bottom: 20rpx;">
<view style="color: #ed5732;font-size: 34rpx;"><text style="font-size: 22rpx;"> </text>
{{item.content[2]}}</view>
<view
style="overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;width: 100%;height: 75upx;">
{{item.content[1]}}</view>
</view>
</view>
<view v-if="item.content && item.type === 3"
style="width: 500rpx;background: #FFFFFF;height: max-content;margin-right: 20rpx;margin-top: 10rpx;border-radius: 20rpx;padding: 15rpx 10rpx;">
<view style="color: #000000;font-weight: 600;margin-left: 10rpx;">你正在咨询的订单</view>
<view style="display: flex;">
<image :src="item.content[0]" class="chat-listitem-image-type4"
style="margin-left: 7rpx;margin-top: 20rpx;width: 110rpx;height: 110rpx;"></image>
<view
style="margin-top: 15rpx;padding: 10rpx 0rpx 5rpx 10rpx;width: 75%;background: #f5f5f5;margin-left: 10rpx;">
<view
style="font-size: 28rpx;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;height: 75upx;width: 100%;">
{{item.content[1]}}</view>
<view style="color: #ed5732;font-size: 28rpx;"><text style="font-size: 22rpx;">
</text>{{item.content[5]}}
</view>
</view>
</view>
<view style="color: #999999;margin-top: 10rpx;margin-left: 12rpx;">
<view>订单编号{{item.content[3]}}</view>
<view style="margin-top: 10rpx;">创建时间{{item.content[4]}}</view>
</view>
<view
style="float: right;margin-right: 10rpx;margin-top: 15rpx;background: #F9221D;color: #FFFFFF;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
@click="goDingdanDetail(item.content[2])">查看</view>
</view>
<image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content"
style="height: 200rpx;width: 200rpx;margin-right: 20rpx;"></image>
<view>
<image v-if="item.chat.userHead" :src="item.chat.userHead" class="chat-listitem-image">
</image>
<image v-else src="../../../static/logo.png" class="chat-listitem-image"></image>
</view>
</view>
</view>
<!-- <view v-if="item.sendType === 4" style="width: 83%;margin-left: 15%;">
<view class="chat-listitem" style="float: right;">
<view style="height: max-content;">
<image :src="type4[0]" mode=""></image>
</view>
<image @tap="viewImg(item.content)" v-if="item.content && item.type === 2" :src="item.content" style="height: 200rpx;width: 170rpx;margin-right: 20rpx;"></image>
<view>
<image :src="item.chat.userHead" class="chat-listitem-image"></image>
</view>
</view>
</view> -->
</view>
</view>
<view v-if="ShopState"
style="width: 95%;margin-left: 20rpx;height: 150upx;position: fixed;bottom: 120upx;z-index: 99;background-color: #FFFFFF;border-radius: 20rpx;">
<view style="display: flex;width: 100%;color: #000000;padding: 20rpx;">
<image :src="Shopimage" style="width: 110rpx;height: 110rpx;"></image>
<view style="margin-left: 20rpx;width: 400rpx;">
<view
style="font-size: 34rpx;color: #000000;overflow: hidden;text-overflow: ellipsis;flex-wrap: nowrap;white-space: nowrap;width: 98%;">
{{ShopTitle}}</view>
<view style="margin-top: 20rpx;color: #ed5732;font-size: 34rpx;">{{Shopmoney}}</view>
</view>
<view style="text-align: right;">
<image @click="ShopClose" src="../../../static/image/close.png"
style="width: 30rpx;height: 30rpx;"></image>
<view
style="margin-top: 20rpx;background: #F9221D;color: #FFFFFF;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
@click="goMaijia">发送给商家</view>
</view>
</view>
</view>
<!-- <view v-if="orderState"
style="width: 95%;margin-left: 20rpx;height: 150upx;position: fixed;bottom: 120upx;z-index: 99;background-color: #FFFFFF;border-radius: 20rpx;">
<view style="display: flex;width: 100%;color: #000000;padding: 20rpx;">
<image :src="orderimage" style="width: 110rpx;height: 110rpx;"></image>
<view style="margin-left: 20rpx;width: 400rpx;">
<view
style="font-size: 34rpx;color: #000000;overflow: hidden;text-overflow: ellipsis;flex-wrap: nowrap;white-space: nowrap;width: 98%;">
你可能想咨询该订单</view>
<view style="margin-top: 20rpx;color: #ed5732;font-size: 34rpx;">{{ordermoney}}</view>
</view>
<view style="text-align: right;">
<image @click="orderClose" src="../../../static/image/close.png"
style="width: 30rpx;height: 30rpx;"></image>
<view
style="margin-top: 20rpx;background: #F9221D;color: #000000;border-radius: 50rpx;width: 150rpx;height: 50rpx;font-size: 24rpx;text-align: center;line-height: 50rpx;"
@click="goDingdan">发送订单</view>
</view>
</view>
</view> -->
<!-- 底部聊天输入框 -->
<view class="input-box">
<!-- <view class="justify-between padding-lr" style="display: flex;margin-top: 15rpx;width: 100%;background-color: #eee;padding-top: 4upx;">
<image src="../../../static/image/add.png" @click="chooseImage(['album'])"
style="width: 60rpx;height: 60rpx;margin-top: 8rpx;margin-right: 12rpx;"></image>
<input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
style="width: 72%;height: 70rpx;background: #fff;margin: 4rpx 10rpx 0;border-radius: 70rpx;padding-left: 10rpx;color: #000000;" />
<view class="save" @tap='setChatSave(1)'>发送</view>
</view> -->
<view class="justify-between padding-lr align-center"
style="display: flex;width: 100%;background-color: #EEEEEE;">
<image src="../../../static/image/add.png" @click="chooseImage(['album'])"
style="width: 60rpx;height: 60rpx;margin-right: 12rpx;border-radius: 50upx;"></image>
<input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
style="width: 72%;height: 70rpx;background: #fff;margin: 0 10rpx;border-radius: 5rpx;padding-left: 10rpx;" />
<view class="save" @tap='setChatSave(1)'>发送</view>
</view>
</view>
</view>
</template>
<script>
import configdata from '../../../common/config.js';
export default {
data() {
return {
connected: false,
connecting: false,
msg: false,
type4: [],
listRight: {
chat: {
userHead: ""
},
content: "",
sendType: 1,
type: 1
},
content: '',
chatId: '',
type: 1,
ListItem: [],
ShopState: false,
ShopordersId: '',
Shopimage: '',
Shopmoney: '',
ShopTitle: '',
orderState: false,
ordersId: '',
orderimage: '',
orderNum: '',
ordermoney: '',
orderTitle: '',
orderCreateTime: '',
className: '',
Shopsales: '',
hand: 1,
index: 0,
page: 0,
size: 1000,
countDown: ''
};
},
computed: {
showMsg() {
if (this.connected) {
if (this.msg) {
return '收到消息:' + this.msg
} else {
return '等待接收消息'
}
} else {
return '尚未连接'
}
}
},
onUnload() {
uni.closeSocket()
uni.hideLoading()
},
onLoad(d) {
if (d.className) {
this.className = d.className;
if (d.className === 'shop') {
this.ShopState = true;
this.ShopordersId = d.ordersId;
this.Shopimage = d.image;
this.Shopmoney = d.money;
this.Shopsales = d.sales;
this.ShopTitle = d.title;
} else if (d.className === 'order') {
this.orderState = true;
this.ordersId = d.id;
this.orderimage = d.image;
this.ordermoney = d.money;
this.orderTitle = d.title;
this.orderNum = d.orderNum;
this.orderCreateTime = d.createTime;
}
}
this.getChatSave();
this.connect();
},
onShow() {
if (this.connected || this.connecting) {
} else {
this.connect();
}
},
onHide() {
uni.closeSocket()
},
methods: {
copy(content) {
uni.showModal({
title: '温馨提示',
content: '确认要复制此文字吗?',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
uni.setClipboardData({
data: content,
success: r => {
this.$queue.showToast('复制成功');
}
});
}
}
});
},
h5Copy(content) {
if (!document.queryCommandSupported('copy')) {
// 不支持
return false
}
let textarea = document.createElement("textarea")
textarea.value = content
textarea.readOnly = "readOnly"
document.body.appendChild(textarea)
textarea.select() // 选择对象
textarea.setSelectionRange(0, content.length) //核心
let result = document.execCommand("copy") // 执行浏览器复制命令
textarea.remove()
return result
},
getDateDiff(data) {
// 传进来的data必须是日期格式不能是时间戳
//var str = data;
//将字符串转换成时间格式
var timePublish = new Date(data);
var timeNow = new Date();
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var month = day * 30;
var result = "2";
var diffValue = timeNow - timePublish;
var diffMonth = diffValue / month;
var diffWeek = diffValue / (7 * day);
var diffDay = diffValue / day;
var diffHour = diffValue / hour;
var diffMinute = diffValue / minute;
if (diffMonth > 3) {
result = timePublish.getFullYear() + "-";
result += timePublish.getMonth() + "-";
result += timePublish.getDate();
} else if (diffMonth > 1) { //月
result = data.substring(0, 10);
} else if (diffWeek > 1) { //周
result = data.substring(0, 10);
} else if (diffDay > 1) { //天
result = data.substring(0, 10);
} else if (diffHour > 1) { //小时
result = parseInt(diffHour) + "小时前";
} else if (diffMinute > 1) { //分钟
result = parseInt(diffMinute) + "分钟前";
} else {
result = "刚刚";
}
return result;
},
goDingdanDetail(id) {
uni.navigateTo({
url: '../member/orderdetail?id=' + id
});
},
goShop(ordersId) {
uni.navigateTo({
url: './commoditydetail?ordersId=' + ordersId
});
},
ShopClose() {
this.ShopState = false;
},
orderClose() {
this.orderState = false;
},
goDingdan() {
this.orderState = false;
this.setChatSave(3);
},
goMaijia() {
this.ShopState = false;
this.setChatSave(4);
},
connect() {
let userId = this.$queue.getData('userId');
if (this.connected || this.connecting) {
uni.showModal({
content: '正在连接或者已经连接,请勿重复连接',
showCancel: false
})
return false
}
let token = uni.getStorageSync('token')
this.connecting = true
uni.showLoading({
title: '连接中...'
})
uni.connectSocket({
// url: 'wss://game.shengqianxiong.com.cn/wss/websocket/' + userId,
// url: 'ws://74165o0188.uicp.fun/sqx_fast/websocket/' + userId,
url: this.config("WSHOST") + userId,
data() {
return {
msg: 'Hello'
}
},
header: {
'content-type': 'application/json',
'token': token
},
method: 'GET',
success(res) {
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
},
fail(err) {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
}
})
uni.onSocketOpen((res) => {
this.connecting = false
this.connected = true
uni.hideLoading()
// uni.showToast({
// icon: 'none',
// title: '连接成功'
// })
console.log('onOpen', res);
})
uni.onSocketError((err) => {
this.connecting = false
this.connected = false
uni.hideLoading()
uni.showModal({
content: '网络较差,请稍后再试',
showCancel: false
})
console.log('onError', err);
})
uni.onSocketMessage((res) => {
// let that = this;
// let datas = JSON.parse(res.data)
// let data = {
// chat: {
// userHead: '../../static/logo.png'
// },
// content: datas.content,
// type: datas.type,
// sendType: datas.sendType
// }
// that.ListItem.push(data);
this.getTimeOrListItem1();
console.log('onMessage', res)
})
uni.onSocketClose((res) => {
this.connected = false
this.startRecive = false
this.msg = false
console.log('onClose', res)
})
},
close() {
uni.closeSocket()
},
getTimeOrListItem1() {
this.$Request.getT('/app/chats/list?chatId=' + this.chatId).then(
res => {
this.ListItem = [];
if (res.data) {
var time = '';
res.data.forEach(d => {
d.createTime = this.getDateDiff(d.createTime);
if (d.createTime === time) {
d.createTime = '';
} else {
time = d.createTime;
}
if (!d.chat.userHead) {
// d.chat.userHead = '../../static/logo.png';
let avatar = this.$queue.getData('avatar');
d.chat.userHead = avatar
}
if (d.type === 4) {
let data = d.content.split(',');
d.content = data;
}
if (d.type === 3) {
let data = d.content.split(',');
d.content = data;
}
this.ListItem.push(d);
});
setTimeout(() => {
uni.pageScrollTo({
scrollTop: 99999,
duration: 0
});
}, 50);
}
uni.hideLoading();
});
},
getChatSave() {
let userId = this.$queue.getData('userId');
let phone = this.$queue.getData('phone');
let userName = this.$queue.getData('userName');
if (!phone) {
phone = this.$queue.getData('userName');
}
let avatar = this.$queue.getData('avatar');
let data = {
userId: userId,
userHead: avatar,
userName: userName,
storeId: '0',
storeHead: '码兄外卖',
storeName: ''
}
this.$Request.postJson('/app/chats/save', data).then(res => {
if (res.status === 0) {
this.chatId = res.data.chatId;
uni.showLoading({
title: '加载中...'
});
this.getTimeOrListItem1();
}
});
},
setChatSave(type) {
//type:1文字 2图片
if (type === 1 && this.content == '') {
this.$queue.showToast('请输入聊天内容');
return;
}
if (this.chatId == '' || this.chatId == undefined) {
this.$queue.showToast('网络较差,请稍后再试');
return;
}
let userId = this.$queue.getData('userId');
if (type === 4) {
this.content = this.Shopimage + ',' + this.ShopTitle + ',' + this.Shopmoney + ',' + this.ShopordersId;
}
if (type === 3) {
this.content = this.orderimage + ',' + this.orderTitle + ',' + this.ordersId + ',' + this.orderNum +
',' + this.orderCreateTime +
',' + this.ordermoney
}
let data = {
userId: userId,
content: this.content,
chatId: this.chatId,
type: type,
storeId: '0',
sendType: '1'
}
data = JSON.stringify(data);
let that = this;
uni.sendSocketMessage({
data: data,
success(res) {
let avatar = that.$queue.getData('avatar');
if (!avatar) {
avatar = '../../static/logo.png';
}
setTimeout(() => {
that.getTimeOrListItem1();
}, 50);
console.log(that.content);
},
fail(err) {
console.log(err);
}
})
this.content = '';
},
//发送图片
chooseImage(sourceType) {
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < res.tempFilePaths.length; i++) {
this.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
url: this.config("APIHOST") + '/alioss/upload', //真实的接口地址
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
this.content = JSON.parse(uploadFileRes.data).data;
this.setChatSave(2);
uni.hideLoading();
}
});
}
}
})
},
config: function(name) {
var info = null;
if (name) {
var name2 = name.split("."); //字符分割
if (name2.length > 1) {
info = configdata[name2[0]][name2[1]] || null;
} else {
info = configdata[name] || null;
}
if (info == null) {
// let web_config = cache.get("web_config");
// if (web_config) {
// if (name2.length > 1) {
// info = web_config[name2[0]][name2[1]] || null;
// } else {
// info = web_config[name] || null;
// }
// }
}
}
return info;
},
//查看大图
viewImg(item) {
let imgsArray = [];
imgsArray[0] = item;
uni.previewImage({
current: 0,
urls: imgsArray
});
},
},
};
</script>
<style>
page {
/* background: #1c1b20; */
}
.input-box {
position: fixed;
bottom: 0;
left: 0;
height: 100rpx;
width: 100%;
display: flex;
box-sizing: content-box;
z-index: 999;
/* background-color: #ececec; */
/* padding: 0 5rpx; */
}
.chat-listitem {
display: flex;
margin-top: 20rpx;
padding: 10rpx;
}
.chat-listitem-text {
color: #000000;
background: #FFFFFF;
margin-top: 10rpx;
width: fit-content;
padding: 15rpx;
font-size: 30rpx;
height: max-content;
word-wrap: break-word;
word-break: break-all;
border-radius: 10rpx;
}
.chat-listitem-image-type4 {
color: #000000;
background: #FFFFFF;
width: fit-content;
font-size: 30rpx;
height: max-content;
word-wrap: break-word;
word-break: break-all;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
.chat-listitem-image {
margin-top: 5rpx;
width: 75rpx;
height: 75rpx;
border-radius: 5rpx;
}
.save {
width: 130rpx;
text-align: center;
border-radius: 10rpx;
height: 70rpx;
color: #FFF;
background: #1789FD;
margin: 5rpx 10rpx 0;
line-height: 70rpx;
}
</style>

238
pages/riderMy/kefu/kefu.vue Normal file
View File

@@ -0,0 +1,238 @@
<template>
<view style="height: 100vh;">
<!-- border-radius: 32upx; -->
<view style="text-align: center;background: #FFFFFF;padding: 30upx;">
<view class="item">
<view class="lef">
<image src="../../../static/my/QQ.png"></image>
<view class="txt">
<text>QQ</text>
<text>{{qq}}</text>
</view>
</view>
<view @click="copyHref" class="copy" data-txt='qq'>复制QQ</view>
</view>
<view class="item">
<view class="lef">
<image src="../../../static/my/wx.png"></image>
<view class="txt">
<text>微信</text>
<text>{{weixin}}</text>
</view>
</view>
<view @click="copyHref" class="copy" data-txt='weixin'>复制微信</view>
</view>
<view class="item">
<view class="lef">
<image src="../../../static/my/phone.png"></image>
<view class="txt">
<text>电话</text>
<text>{{phone}}</text>
</view>
</view>
<view @click="copyHref" data-txt='phone' class="copy">拨打电话</view>
</view>
<!-- #ifdef MP-WEIXIN -->
<view class="item">
<view class="lef">
<image src="../../../static/my/kf.png"></image>
<view class="txt">
<text>在线客服</text>
<text>在线客服专员为你解答问题</text>
</view>
</view>
<button class="copys" data-txt='qq' open-type="contact">在线客服</button>
</view>
<!-- #endif -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
image: 'https://taobao.xianmxkj.com/custom.jpg',
isWeiXin: false,
weixin: '',
qq: '',
phone: '',
webviewStyles: {
progress: {
color: '#FF2638'
}
}
};
},
onLoad() {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.isWeiXin = true;
}
// #endif
//微信号码
this.$Request.getT('/app/common/type/44').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.weixin = res.data.value;
}
}
});
//客服电话
this.$Request.getT('/app/common/type/252').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.phone = res.data.value;
}
}
});
//qq号码
this.$Request.getT('/app/common/type/274').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.qq = res.data.value;
}
}
});
},
onPullDownRefresh: function() {
uni.stopPullDownRefresh(); // 停止刷新
},
methods: {
//邀请码复制
copyHref(e) {
console.log(e.target.dataset.txt)
if (e.target.dataset.txt == 'qq') {
this.copy(this.qq)
} else if (e.target.dataset.txt == 'weixin') {
this.copy(this.weixin)
} else {
uni.makePhoneCall({
phoneNumber: this.phone
})
}
},
copy(item) {
uni.setClipboardData({
data: item,
success: r => {
this.$queue.showToast('复制成功');
}
});
},
saveImg() {
let that = this;
uni.saveImageToPhotosAlbum({
filePath: that.image,
success(res) {
that.$queue.showToast('保存成功');
}
});
},
rests() {
uni.showToast({
title: '已刷新请再次长按识别',
mask: false,
duration: 1500,
icon: 'none'
});
window.location.reload();
}
}
};
</script>
<style scoped>
/* @import '../../static/css/index.css'; */
.item {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 36rpx;
}
.items {
margin-bottom: 0;
}
.lef {
display: flex;
justify-content: flex-start;
align-items: center;
}
.item image {
width: 89rpx;
height: 89rpx;
margin-right: 26rpx;
}
.item .txt {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: flex-start;
}
.txt>text:nth-child(1) {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #1F2029;
/* line-height: 87rpx; */
margin-bottom: 10rpx;
}
.txt>text:nth-child(2) {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
/* line-height: 87rpx; */
}
.copy {
width: 140rpx;
height: 54rpx;
background: #FF1E43;
border-radius: 27rpx;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
}
.copys {
height: 54rpx;
background: #FF1E43;
border-radius: 27rpx;
text-align: center;
line-height: 54rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: #FFFFFF;
margin-right: 0rpx;
}
/*
<!-- <view style="font-size: 38upx;color: #000000">添加客服微信咨询</view>
<view style="font-size: 32upx;margin-top: 32upx;color: #000000">微信号:{{weixin}}</view>
<view @click="copyHref" style="width:200upx;margin-top: 32upx;font-size: 30upx;margin-left: 36%;color: #FFFFFF;background: #FF2638;padding: 4upx 20upx;border-radius: 24upx;">一键复制</view>
<image @click="saveImg" mode="aspectFit" style="margin-top: 32upx" :src="image"></image>
<view style="font-size: 28upx;color: #000000;margin-top: 32upx" v-if="isWeiXin">{{ isWeiXin ? '长按识别上方二维码' : '' }}</view>
<view v-if="isWeiXin" style="font-size: 24upx;color: #000000;margin-top: 80upx" @click="rests">无法识别?</view> -->
*/
</style>

View File

@@ -0,0 +1,170 @@
<template>
<view class="">
<view v-if="chatList.length" class="content ">
<view class="radius padding-lr-sm bg" style="margin-top: 4rpx;" @click="goIM(item)"
v-for="(item,index) in chatList" :key='index'>
<view class="flex padding-tb " v-if="userId == item.userId">
<view>
<u-image shape="circle" width='80rpx' height="80rpx" :src="item.shopCover"></u-image>
</view>
<view class="flex-sub margin-left-sm">
<view class="flex justify-between">
<view style="width: 55%;">{{item.shopName}}</view>
<view class="text-grey">{{item.createTime}}</view>
</view>
<view class="flex justify-between">
<view class="text-grey">{{ item.messageType == 1? item.content : '[图片]'}}</view>
<view v-if="item.riderUnread"
style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
{{item.riderUnread}}
</view>
</view>
</view>
</view>
<view class="flex padding-tb" v-else>
<view>
<u-image shape="circle" width='80rpx' height="80rpx" :src="item.shopCover"></u-image>
</view>
<view class="flex-sub margin-left-sm">
<view class="flex justify-between">
<view style="width: 55%;">{{item.shopName}}</view>
<view class="text-grey">{{item.createTime}}</view>
</view>
<view class="flex justify-between">
<view class="text-grey">{{ item.messageType == 1? item.content : '[图片]'}}</view>
<view v-if="item.riderUnread"
style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
{{item.riderUnread}}
</view>
</view>
</view>
</view>
</view>
</view>
<empty v-if="!chatList.length && !msgList.length" content='暂无消息'></empty>
</view>
</template>
<script>
import empty from '../../../components/empty.vue'
export default {
components: {
empty
},
data() {
return {
page: 1,
limit: 20,
chatList: [],
userId: '',
msgList: [],
count: 0,
time: '',
messageCount: 0,
scrollTop: false,
}
},
onPullDownRefresh: function() {
this.page = 1;
this.getChatList();
},
onLoad() {
this.$queue.showLoading("加载中...")
that.userId = uni.getStorageSync('userId')
if (that.userId) {
that.time = setInterval(function() {
that.getChatList()
// that.getMsgList()
that.$nextTick(function() {
that.messageCount = uni.getStorageSync('messageCount')
})
}, 10000)
} else {
that.chatList = []
that.msgList = []
}
},
onShow() {
let that = this
this.page = 1;
this.getChatList();
},
onHide() {
clearInterval(this.time)
},
methods: {
getChatList() {
this.$Request.getT("/app/ordersChat/selectOrdersChatPageRider", {
page: this.page,
limit: this.limit,
// shopId: uni.getStorageSync('shopId')
}).then(res => {
if (res.code === 0) {
this.totalCount = res.data.totalCount
if (this.page == 1) {
this.chatList = res.data.list
} else {
res.data.list.forEach(d => {
this.chatList.push(d);
});
}
this.count = res.data.totalCount;
}
uni.hideLoading();
uni.stopPullDownRefresh();
// if (res.code == 0) {
// this.chatList = res.data.list
// }
});
},
goIM(e) {
let userId = this.$queue.getData('userId');
if (e.userId == userId) {
userId = e.byUserId
} else {
userId = e.userId
}
uni.navigateTo({
url: '/pages/riderMy/kefu/liaotianshi?orderId=' + e.ordersId
})
},
goMsg() {
uni.navigateTo({
url: '/pages/msg/message'
})
}
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
onReachBottom: function() {
if (this.chatList.length == this.count) {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
} else {
this.page = this.page + 1;
this.getChatList();
}
},
}
</script>
<style>
page {
background-color: #F7F7F7;
}
.bg {
background: #FFFFFF;
}
</style>

View File

@@ -0,0 +1,533 @@
<template>
<view>
<view style="width: 100%;padding-bottom: 140rpx;">
<view style="display: flex;flex-direction: column;" v-for="(item,index) in ListItem" :key='index'>
<view style="margin-top: 15rpx;width: 100%;text-align: center;font-size: 26rpx;color: #999999;">
{{item.createTime}}
</view>
<view v-if="item.riderId === userId" style="width: 83%;margin-left: 15%;">
<view class="chat-listitem" style="float: right;">
<view v-if="item.content && item.messageType === 1" @longpress="copy(item.content)"
class="chat-listitem-text" style="margin-right: 20rpx;">{{item.content}}</view>
<image @tap="viewImg(item.content)" v-if="item.content && item.messageType === 2"
:src="item.content" style="height: 200rpx;width: 200rpx;margin-right: 20rpx;"></image>
<view>
<image v-if="item.riderAvatar" :src="item.riderAvatar" class="chat-listitem-image"></image>
<image v-else src="../../../static/logo.png" class="chat-listitem-image"></image>
</view>
</view>
</view>
<view v-if="item.riderId != userId" style="width: 83%;margin-right: 15%;">
<view class="chat-listitem" style="float: left;margin-left: 10rpx;">
<view>
<image v-if="item.shopCover" :src="item.shopCover" class="chat-listitem-image"></image>
<image v-else-if="item.userAvatar" :src="item.userAvatar" class="chat-listitem-image"></image>
<image v-else src="../../../static/logo.png" class="chat-listitem-image"></image>
</view>
<view v-if="item.content && item.messageType === 1" class="chat-listitem-text"
style="margin-left: 20rpx;">{{item.content}}</view>
<image @tap="viewImg(item.content)" v-if="item.content && item.messageType === 2"
:src="item.content" style="height: 200rpx;width: 200rpx;margin-left: 20rpx;"></image>
</view>
</view>
</view>
</view>
<!-- 跳转订单 -->
<view class="order" @click="bindorder()">
<image src="../../../static/image/order.png"></image>
</view>
<!-- 底部聊天输入框 -->
<view class="input-box ">
<view class="justify-between padding-lr align-center"
style="display: flex;width: 100%;background-color: #EEEEEE;">
<image src="../../../static/image/add.png" @click="chooseImage(['album'])"
style="width: 60rpx;height: 60rpx;margin-right: 12rpx;border-radius: 50upx;"></image>
<input confirm-type="send" @confirm='setChatSave(1)' type="text" v-model="content"
style="width: 72%;height: 70rpx;background: #fff;margin: 0 10rpx;border-radius: 5rpx;padding-left: 10rpx;" />
<view class="save" @tap='setChatSave(1)'>发送</view>
</view>
</view>
</view>
</template>
<script>
import configdata from '../../../common/config.js';
export default {
data() {
return {
connected: false,
connecting: false,
msg: false,
type4: [],
listRight: {
chat: {
userHead: ""
},
content: "",
sendType: 1,
type: 1
},
content: '',
chatId: '',
type: 1,
ListItem: [],
ShopState: false,
ShopordersId: '',
Shopimage: '',
Shopmoney: '',
ShopTitle: '',
orderState: false,
ordersId: '',
userId: '',
orderimage: '',
orderNum: '',
teamId: '',
hand: 1,
index: 0,
page: 0,
size: 1000,
countDown: '',
chatConversationId: '',
byUserId: '',
orderId: ''
};
},
computed: {
showMsg() {
if (this.connected) {
if (this.msg) {
return '收到消息:' + this.msg
} else {
return '等待接收消息'
}
} else {
return '尚未连接'
}
}
},
onUnload() {
// uni.closeSocket()
uni.hideLoading()
},
onLoad(d) {
console.log(d)
this.userId = this.$queue.getData('userId');
this.byUserId = d.byUserId
this.indentId = d.indentId
this.orderId = d.orderId
this.connect();
// if (d.teamName) {
// uni.setNavigationBarTitle({
// title: d.teamName
// });
// }
},
onShow() {
if (this.connected || this.connecting) {
} else {
this.connect();
}
},
onHide() {
// uni.closeSocket()
},
onUnload() {
this.close()
},
methods: {
// 跳转订单
bindorder() {
console.log(this.ordersId)
uni.navigateTo({
url: '/pages/index/orderdetail/orderdetail?orderId='+this.orderId
})
},
copy(content) {
uni.showModal({
title: '温馨提示',
content: '确认要复制此文字吗?',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if (res.confirm) {
uni.setClipboardData({
data: content,
success: r => {
this.$queue.showToast('复制成功');
}
});
}
}
});
},
getDateDiff(data) {
// 传进来的data必须是日期格式不能是时间戳
//var str = data;
//将字符串转换成时间格式
var timePublish = new Date(data);
var timeNow = new Date();
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var month = day * 30;
var result = "2";
var diffValue = timeNow - timePublish;
var diffMonth = diffValue / month;
var diffWeek = diffValue / (7 * day);
var diffDay = diffValue / day;
var diffHour = diffValue / hour;
var diffMinute = diffValue / minute;
if (diffMonth > 3) {
result = timePublish.getFullYear() + "-";
result += timePublish.getMonth() + "-";
result += timePublish.getDate();
} else if (diffMonth > 1) { //月
result = data.substring(0, 10);
} else if (diffWeek > 1) { //周
result = data.substring(0, 10);
} else if (diffDay > 1) { //天
result = data.substring(0, 10);
} else if (diffHour > 1) { //小时
result = parseInt(diffHour) + "小时前";
} else if (diffMinute > 1) { //分钟
result = parseInt(diffMinute) + "分钟前";
} else {
result = "刚刚";
}
return result;
},
connect() {
let that = this;
let userId = that.$queue.getData('userId');
if (that.connected || that.connecting) {
uni.showModal({
content: '正在连接或者已经连接,请勿重复连接',
showCancel: false
})
return false
}
that.connecting = true
uni.showLoading({
title: '连接中...'
})
console.log(userId, '*******************')
uni.connectSocket({
// url: 'ws://192.168.1.17:8881/gameTeamChat/' + userId + '_' + this.teamId,
// url: 'wss://game.shengqianxiong.com.cn/wss/gameTeamChat/' + userId + '_' + this.teamId,
// url: 'ws://192.168.1.17:8180/sqx_fast/chatSocket/' + userId,
url: this.config("WSHOST1") + this.orderId,
data() {
return {
msg: 'Hello'
}
},
header: {
'content-type': 'application/json'
},
method: 'GET',
success(res) {
uni.hideLoading();
that.getTimeOrListItem1();
// 这里是接口调用成功的回调,不是连接成功的回调,请注意
},
fail(err) {
// 这里是接口调用失败的回调,不是连接失败的回调,请注意
console.log("--------------" + JSON.stringify(err))
}
});
uni.onSocketOpen((res) => {
that.connecting = false
that.connected = true
uni.hideLoading()
// uni.showToast({
// icon: 'none',
// title: '连接成功'
// })
console.log('onOpen', res);
})
uni.onSocketError((err) => {
that.connecting = false
that.connected = false
uni.hideLoading()
uni.showModal({
content: '网络较差,请稍后再试',
showCancel: false
})
console.log('onError', err);
})
uni.onSocketMessage((res) => {
// let that = this;
// let datas = JSON.parse(res.data)
// let data = {
// chat: {
// userHead: '../../../static/logo2.png'
// },
// content: datas.content,
// type: datas.type,
// sendType: datas.sendType
// }
// that.ListItem.push(data);
this.getTimeOrListItem1();
console.log('onMessage', res)
})
uni.onSocketClose((res) => {
that.connected = false
that.startRecive = false
that.msg = false
console.log('onClose', res)
});
},
close() {
uni.closeSocket()
},
getTimeOrListItem1() {
this.$Request.get('/app/ordersChat/selectGameChatDetails?page=1&limit=1000&ordersId=' + this.orderId+'&type=2')
.then(
res => {
this.ListItem = [];
if (res.data) {
var time = '';
res.data.list.forEach(d => {
if (!d.avatar) {
// d.chat.userHead = '../../static/logo.png';
let avatar = this.$queue.getData('avatar');
d.avatar = avatar
}
this.ListItem.push(d);
});
this.ListItem = this.ListItem.reverse();
setTimeout(() => {
uni.pageScrollTo({
scrollTop: 99999,
duration: 0
});
}, 50);
}
uni.hideLoading();
});
},
getChatSave() {
let userId = this.$queue.getData('userId');
let phone = this.$queue.getData('phone');
let userName = this.$queue.getData('userName');
if (!phone) {
phone = this.$queue.getData('userName');
}
let avatar = this.$queue.getData('avatar');
let data = {
userId: userId,
userHead: avatar,
userName: userName,
storeId: '0',
storeHead: '省钱兄陪玩',
storeName: ''
}
this.$Request.postJson('/chat/save', data).then(res => {
if (res.status === 0) {
this.chatId = res.data.chatId;
uni.showLoading({
title: '加载中...'
});
this.getTimeOrListItem1();
}
});
},
setChatSave(type) {
//type:1文字 2图片
if (type === 1 && this.content == '') {
this.$queue.showToast('请输入聊天内容');
return;
}
// if (this.chatId == '' || this.chatId == undefined) {
// this.$queue.showToast('网络较差,请稍后再试');
// return;
// }
let userId = this.$queue.getData('userId');
let avatar = this.$queue.getData('avatar');
let phone = this.$queue.getData('phone');
let userName = this.$queue.getData('userName');
if (!phone) {
phone = this.$queue.getData('userName');
}
console.log(this.byUserId)
let data = {
content: this.content,
messageType: type,
riderId: this.userId,
chatConversationId: this.chatConversationId,
ordersId: this.orderId
}
data = JSON.stringify(data);
let that = this;
uni.sendSocketMessage({
data: data,
success(res) {
let avatar = that.$queue.getData('avatar');
if (!avatar) {
avatar = '../../static/logo.png';
}
let data = {
chat: {
userHead: avatar
},
content: that.content,
type: type,
userId: userId
}
console.log(data, 'data99999999999999999')
// that.ListItem.push(data);
setTimeout(() => {
that.getTimeOrListItem1();
}, 50);
console.log(that.content);
},
fail(err) {
console.log(err);
}
})
this.content = '';
},
//发送图片
chooseImage(sourceType) {
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < res.tempFilePaths.length; i++) {
this.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
console.log(uploadFileRes)
this.content = JSON.parse(uploadFileRes.data).data;
this.setChatSave(2);
uni.hideLoading();
}
});
}
}
})
},
config: function(name) {
var info = null;
if (name) {
var name2 = name.split("."); //字符分割
if (name2.length > 1) {
info = configdata[name2[0]][name2[1]] || null;
} else {
info = configdata[name] || null;
}
if (info == null) {
let web_config = cache.get("web_config");
if (web_config) {
if (name2.length > 1) {
info = web_config[name2[0]][name2[1]] || null;
} else {
info = web_config[name] || null;
}
}
}
}
return info;
},
//查看大图
viewImg(item) {
let imgsArray = [];
imgsArray[0] = item;
uni.previewImage({
current: 0,
urls: imgsArray
});
},
},
};
</script>
<style>
page {
/* background: #1c1b20; */
}
.input-box {
position: fixed;
bottom: 0;
left: 0;
height: 120rpx;
width: 100%;
display: flex;
box-sizing: content-box;
z-index: 999;
/* background-color: #ececec; */
/* padding: 0 5rpx; */
}
.chat-listitem {
display: flex;
margin-top: 20rpx;
padding: 10rpx;
}
.chat-listitem-text {
color: #000000;
background: #FFFFFF;
margin-top: 10rpx;
width: fit-content;
padding: 15rpx;
font-size: 30rpx;
height: max-content;
word-wrap: break-word;
word-break: break-all;
border-radius: 10rpx;
}
.chat-listitem-image-type4 {
color: #000000;
background: #FFFFFF;
width: fit-content;
font-size: 30rpx;
height: max-content;
word-wrap: break-word;
word-break: break-all;
border-top-left-radius: 20rpx;
border-top-right-radius: 20rpx;
}
.chat-listitem-image {
margin-top: 5rpx;
width: 75rpx;
height: 75rpx;
border-radius: 5rpx;
}
.save {
width: 130rpx;
text-align: center;
border-radius: 70rpx;
height: 70rpx;
color: #FFF;
background: #1789FD;
margin: 5rpx 10rpx 0;
line-height: 70rpx;
}
.order {
position: fixed;
bottom: 65px;
right: 15px;
}
.order image {
width: 120rpx;
height: 120rpx;
}
</style>

View File

@@ -0,0 +1,583 @@
<template>
<view class="content">
<view class="acont_part1">
<view class="part1_bg">
<image src="../../../../static/rider/image-bg.png"></image>
</view>
<view class="part1_box">
<view class="text-right margin-top-sm margin-right-sm" @click="goDet">查看明细</view>
<view class="balance">
<view class="balance_name">保证金余额()</view>
<view class="balance_price">{{mayMoney?mayMoney:0}}</view>
</view>
<view class="part1_btn">
<view class="btn_left" @click="tuiBtn()">退保证金</view>
<view class="btn_right" @click="openPay()">缴纳保证金</view>
</view>
</view>
</view>
<view class="acont_part2">
<view class="acount_type">保证金规则</view>
<view class="acount_box" v-for="(item,index) in list" :key="item.id">
<view class="name">{{item.name}}</view>
<view class="tit">{{item.tit}}</view>
</view>
</view>
<!-- 支付方式 -->
<u-popup v-model="shows" mode="center" width="640rpx" height="640rpx" border-radius="14" :closeable="true"
close-icon="close-circle" close-icon-size="50" close-icon-color="#CCCCCC" @close="closePopup()">
<view style="width: 100%;height: 300upx;background: #FFFFFF;">
<view class="receipt_code">
<view class="code_title">请输入支付金额</view>
<u-input v-model="earnestMoney" type="text" placeholder="请输入支付金额" :border="true" />
<view class="margin-tb padding-lr radius bg-white" style="height: 220upx;">
<view class="flex align-center justify-between padding-tb-sm" v-for="(item,index) in payList"
:key='index'>
<image :src="item.image" style="width: 80upx;height: 80upx;border-radius: 50upx;"></image>
<view class="flex-sub text-xl text-bold margin-left">{{item.name}}</view>
<radio-group name="openWay" style="margin-left: 20upx;" @change='selectWay(item)'>
<label class="tui-radio">
<radio class="red" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
<view class="sure" @click="jiaoBtn">确定</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
shows: false,
baozhengjin: 0,
disabled: true,
moneys: '',
list: [{
id: 1,
name: '保证金退款',
tit: '48小时内无订单记录即可申请退保证金保证金统一退款至账户余额实时到账。'
}, {
id: 2,
name: '保证金缴纳',
tit: '所有跑腿专人直送订单需缴纳保证金,没有缴纳者将无法接订单,建议您及时缴纳。'
}],
mayMoney: 0,
openWay: 1,
payList: [],
earnestMoney: ''
}
},
onLoad() {
//获取保证金
this.$Request.getT('/app/common/type/273').then(res => {
if (res.code === 0) {
this.baozhengjin = res.data.value;
}
});
// #ifdef MP-WEIXIN
this.payList = [{
id: 1,
image: '../../../../static/my/weixin.png',
name: '微信'
}]
this.openWay = 1
// #endif
// #ifdef H5
this.payList = [{
id: 2,
image: '../../../../static/my/zhifubao.png',
name: '支付宝'
}]
this.openWay = 2
// #endif
// #ifdef APP-PLUS
this.payList = [{
id: 1,
image: '../../../../static/my/weixin.png',
name: '微信'
},
{
id: 2,
image: '../../../../static/my/zhifubao.png',
name: '支付宝'
}
]
// #endif
},
onShow() {
this.taskData()
},
methods: {
openPay() {
this.$Request.getT("/app/wxPayErrRider/selectCertificationFlag").then(res => {
if (res.code == 0) {
this.shows = true
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
// 跳转保证金明细
goDet() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/Acontlist'
})
},
selectWay: function(item) {
this.openWay = item.id;
},
zhifu() {
this.shows = true
},
// 关闭底部弹出层
closePopup() {
this.shows = false
},
// 获取任务数据
taskData() {
let that = this;
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
//this.$queue.showLoading("加载中...");
//可以提现金额查询预估收入查询
this.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
uni.hideLoading();
if (res.code === 0 && res.data) {
that.mayMoney = res.data.cashDeposit;
if (!res.data.cashDeposit) {
// this.earnestMoney=this.baozhengjin;
// this.disabled=true;
} else {
// this.disabled=false;
}
} else if (res.code === -102) {
this.$queue.showToast(res.msg);
this.$queue.logout();
} else {
that.mayMoney = '0';
}
});
}
},
// 缴纳
jiaoBtn() {
let that = this;
if (!that.earnestMoney) {
that.$queue.showToast('请输入支付金额');
return;
}
uni.showLoading({
title: '支付中'
});
// 微信支付
if (that.openWay == 1) {
// #ifdef APP-PLUS
uni.hideLoading();
// 微信APP支付 根据订单id获取支付信息
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=1').then(
ret => {
// console.log(JSON.stringify(ret), '支付信息')
if (ret.code == 0) {
console.log(JSON.stringify(ret), '支付信息')
that.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
console.log(ua.indexOf('micromessenger'))
if (ua.indexOf('micromessenger') !== -1) {
let openId = that.$queue.getData('openid') ? that.$queue.getData('openid') : '';
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=2')
.then(
res => {
if (res.code == 0) {
that.callPay(res);
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
}
// #endif
// #ifdef MP-WEIXIN
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=3').then(
res => {
console.log('res', res)
if (res.code == 0) {
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.data.timestamp,
nonceStr: res.data.noncestr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.sign,
success: function(res) {
that.shows = false
that.earnestMoney = ''
uni.hideLoading();
that.taskData()
that.$queue.showToast('支付成功');
setTimeout(function() {
uni.hideLoading();
}, 1000);
},
fail: function(err) {
that.shows = false
that.earnestMoney = ''
console.log('fail:' + JSON.stringify(err));
uni.hideLoading();
that.$queue.showToast('支付失败');
}
});
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
} else if (that.openWay == 2) { //支付宝支付
uni.hideLoading();
// #ifdef H5
let userId = this.$queue.getData('userId');
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=5')
.then(res => {
if (res.code == 0) {
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
that.earnestMoney = ''
that.shows = false
} else {
uni.hideLoading();
that.$queue.showToast(res.msg);
}
});
// #endif
// #ifdef APP-PLUS
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=4').then(
ret => {
uni.hideLoading();
// console.log(JSON.stringify(ret), '支付信息')
if (ret.code == 0) {
that.setPayment('alipay', ret.data);
that.shows = false
// that.isCheckPay(ret.code, 'alipay', ret.data);
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
}
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', that.onBridgeReady(response), false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', that.onBridgeReady(response));
document.attachEvent('onWeixinJSBridgeReady', that.onBridgeReady(response));
}
} else {
that.onBridgeReady(response);
}
},
onBridgeReady: function(response) {
let that = this;
console.log(!response.package, '2222222')
// if (!response.package) {
// return;
// }
that.earnestMoney = ''
that.shows = false
console.log(response, '1111111111')
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": response.data.appid, //公众号名称,由商户传入
"timeStamp": response.data.timestamp, //时间戳自1970年以来的秒数
"nonceStr": response.data.noncestr, //随机串
"package": response.data.package,
"signType": response.data.signType, //微信签名方式:
"paySign": response.data.sign //微信签名
},
function(res) {
console.log(res, '/*-/*-/*-')
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
that.taskData()
uni.showLoading({
title: '支付成功'
});
setTimeout(function() {
uni.hideLoading();
}, 1000);
} else {
uni.hideLoading();
}
WeixinJSBridge.log(response.err_msg);
}
);
},
isCheckPay(status, name, order) {
console.log(status, name, order, '111111')
this.earnestMoney = ''
this.shows = false
if (status == 0) {
this.setPayment(name, order);
} else {
uni.hideLoading();
uni.showToast({
title: '支付信息有误',
icon: 'none'
});
}
},
setPayment(name, order) {
let that = this
console.log(name, '*-*-*', order)
uni.requestPayment({
provider: name,
orderInfo: order, //微信、支付宝订单数据
success: function(res) {
console.log(res)
that.taskData()
uni.hideLoading();
that.earnestMoney = ''
that.shows = false
uni.showLoading({
title: '支付成功'
});
},
fail: function(err) {
console.log(err)
uni.hideLoading();
},
complete() {
uni.hideLoading();
}
});
},
// 退保证金
tuiBtn() {
let that = this
if (that.mayMoney == 0) {
uni.showToast({
icon: 'none',
title: '暂无保证金'
})
return
}
uni.showModal({
title: '提示',
content: '确认退还保证金吗?如果存在未完成订单和未处理完成的投诉无法退还,需要先处理完毕后再申请',
success: function(res) {
if (res.confirm) {
that.$Request.getT('/app/cash/cashDepositMoney').then(res => {
console.log(res)
if (res.code == 0) {
uni.showToast({
title: '申请成功'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
setTimeout(function() {
that.taskData()
}, 1000)
});
}
},
})
}
}
}
</script>
<style>
/* 支付金额弹框 */
.receipt_code {
width: 90%;
margin: 0 auto;
}
.code_title {
width: 100%;
line-height: 100rpx;
font-size: 31rpx;
font-weight: bold;
text-align: center;
letter-spacing: 2rpx;
margin-top: 21rpx;
margin-bottom: 25rpx;
}
.u-input--border {
border: 1px solid #F2F2F2 !important;
background: #F2F2F2 !important;
color: #999999 !important;
font-weight: 500 !important;
letter-spacing: 2rpx !important;
}
.u-input__input {
font-size: 30rpx;
font-weight: bold;
flex: 1;
color: #999999 !important;
min-height: 85rpx !important;
margin-top: 7rpx;
}
.sure {
width: 100%;
height: 80rpx;
background: #FF7F00;
color: white;
border-radius: 46rpx;
text-align: center;
line-height: 80rpx;
margin-top: 30rpx;
letter-spacing: 2rpx;
}
.content {
width: 100%;
position: relative;
}
.acont_part1 {
width: 100%;
}
.part1_bg image {
width: 100%;
height: 730rpx;
}
.part1_box {
width: 90%;
height: 400rpx;
background: #ffffff;
position: absolute;
top: 70rpx;
left: 37rpx;
border-radius: 25rpx;
}
.balance {
width: 90%;
margin: 0 auto;
text-align: center;
/* margin-top: 50rpx; */
line-height: 55rpx;
}
.balance_name {
font-size: 26rpx;
letter-spacing: 2rpx;
}
.balance_price {
margin-top: 10rpx;
font-weight: bold;
font-size: 60rpx;
}
.part1_btn {
width: 90%;
margin: 0 auto;
margin-top: 80rpx;
display: flex;
}
.btn_left {
flex: 1;
border: 1rpx solid #CCCCCC;
text-align: center;
line-height: 80rpx;
color: black;
font-size: 24rpx;
border-radius: 12rpx;
margin-right: 10rpx;
}
.btn_right {
flex: 1;
border: 1rpx solid #CCCCCC;
text-align: center;
line-height: 80rpx;
background: #FF7F00;
color: white;
font-size: 24rpx;
border-radius: 12rpx;
margin-left: 10rpx;
}
.acont_part2 {
width: 90%;
position: absolute;
bottom: -100rpx;
left: 37rpx;
}
.acount_type {
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
line-height: 75rpx;
}
.name {
font-size: 26rpx;
font-weight: bold;
letter-spacing: 2rpx;
line-height: 70rpx;
}
.tit {
color: #666666;
font-size: 25rpx;
}
</style>

View File

@@ -0,0 +1,119 @@
<template>
<view>
<view class="content" v-if="list.length" >
<view class="list_box" v-for="(item,index) in list" :key="index">
<view class="list_left">
<view class="name">{{item.title}}</view>
<view class="flex justify-between align-center">
<view style="color: red;">{{item.type==1?'+':'-'}} {{item.money}}</view>
<view class="data">{{item.createTime}}</view>
</view>
</view>
<!-- <view class="list_right" style="color: red;" v-if="item.type==2">- {{item.money}}</view> -->
<!-- <view class="list_right" style="color: #33D442;" v-if="item.type==1">+ {{item.money}}</view> -->
</view>
</view>
<empty v-else></empty>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
totalCount: 0
}
},
onLoad() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/selectCashDeposit?classify=1&page='+this.page+'&limit=15').then(res => {
if(res.code==0){
// this.list = res.data.list
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = this.list.concat(res.data.list)
}
this.totalCount = res.data.totalPage
}
console.log('res',res)
uni.stopPullDownRefresh();
});
},
},
// 上拉加载
onReachBottom: function() {
if (this.page < this.totalCount) {
this.page += 1;
this.taskData();
} else {
uni.showToast({
title: '已经最后一页啦',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.taskData();
},
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
background: #FFFFFF;
/* margin-top: 20rpx; */
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
}
</style>

View File

@@ -0,0 +1,133 @@
<template>
<view style="text-align: left">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
<text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==1"> 提现成功</text>
<text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==0"> 提现中</text>
<text style="margin-bottom: 8upx;color: #FF332F" v-if="item.state==-1"> 提现失败</text>
</view>
<view style="color: #999999;font-size: 28upx;">
<view v-if="item.classify == 1">
<view style="margin-bottom: 8upx">支付宝账号 {{ item.zhifubao }}</view>
<view style="margin-bottom: 8upx">支付宝姓名 {{ item.zhifubaoName }}</view>
<view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
</view>
<view v-if="item.classify == 2">
<view>微信提现</view>
<view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
</view>
<view style="margin-bottom: 8upx" v-if="item.state==1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8upx;color: #FF2638" v-if="item.state==-1">失败原因{{item.refund}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text style="color: #FF332F;font-size: 32upx;font-weight: 600">{{ item.money }}</text>
</view>
</view>
</view>
</view>
<!-- 加载更多提示 -->
<view class="s-col is-col-24" v-if="list.length > 0">
<load-more :loadingType="loadingType" :contentText="contentText"></load-more>
</view>
<!-- 加载更多提示 -->
<empty v-if="list.length == 0" des="暂无数据"></empty>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
page: 1,
size: 10,
list: [],
loadingType: 0,
scrollTop: false,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
}
};
},
onLoad: function(e) {
this.$queue.showLoading('加载中...');
this.getMoney();
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
methods: {
getMoney(type) {
this.loadingType = 1;
let userId = this.$queue.getData('userId');
let data = {
page: this.page,
limit: this.size,
userId: userId
};
this.$Request.getT('/app/cash/selectPayDetails', data).then(res => {
if (res.code === 0) {
if (this.page === 1) {
this.list = [];
}
res.data.list.forEach(d => {
// if (d.state === -1) {
// d.state = '已退款';
// } else if (d.state === 0) {
// d.state = '提现中';
// } else if (d.state === 1) {
// d.state = '提现成功';
// }
this.list.push(d);
});
if (res.data.list.length === this.size) {
this.loadingType = 0;
} else {
this.loadingType = 3;
}
} else {
this.loadingType = 2;
}
uni.hideLoading();
if (type === 'Refresh') {
uni.stopPullDownRefresh(); // 停止刷新
}
});
}
},
onLoad: function(e) {
this.getMoney();
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMoney();
},
onPullDownRefresh: function() {
this.page = 1;
this.getMoney('Refresh');
}
};
</script>
<style lang="scss" scoped>
// @import '../../static/css/index.css';
page {
background: #ffffff;
}
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
</style>

View File

@@ -0,0 +1,281 @@
<template>
<view class="container" v-if="XCXIsSelect!='否'">
<!-- <list-cell title="收款人姓名" type="text" placeholder="请输入支付宝收款人姓名" v-model="userName"></list-cell>
<list-cell title="支付宝账号" type="number" placeholder="请输入要绑定的支付宝手机号" v-model="mobile" :maxlength="11"></list-cell> -->
<u-form :model="form" ref="uForm">
<u-form-item label="收款人姓名" label-width="250"><u-input type="text" placeholder="请输入支付宝收款人姓名" v-model="userName" /></u-form-item>
<u-form-item label="支付宝账号" label-width="250"><u-input type="text" placeholder="请输入要绑定的支付宝手机号" v-model="mobile" /></u-form-item>
</u-form>
<button v-if="btn" class="confirm-btn" @click="toLogin" :disabled="logining">{{btn}}</button>
<view style="padding: 32upx 64upx;font-size: 24upx;color: #999999;">提示请正确填写收款人的支付宝账户和真实的收款人姓名否则将无法正常收款</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
mobile: '',
userName: '',
btn:'绑定账户',
logining: false,
form:{},
XCXIsSelect:'否'
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if(this.XCXIsSelect =='否'){
uni.setNavigationBarTitle({
title: '隐私政策'
});
}else{
uni.setNavigationBarTitle({
title: '账号绑定'
});
}
let userId = this.$queue.getData("userId");
if (userId) {
this.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
if (res.code === 0 && res.data) {
if (res.data.zhiFuBao) {
this.mobile = res.data.zhiFuBao;
this.btn = '修改账户';
}else{
this.btn = '绑定账户';
}
if (res.data.zhiFuBaoName) {
this.userName = res.data.zhiFuBaoName;
}
}else{
this.btn = '绑定账户';
}
});
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
toLogin() {
let userId = this.$queue.getData("userId");
let token = uni.getStorageSync("token");
const {
mobile,
userName
} = this;
if (!mobile) {
this.$queue.showToast("请设置收款人支付宝账号");
} else if (!userName) {
this.$queue.showToast("请设置收款人姓名");
} else {
this.$queue.showLoading("修改中...");
this.$Request.postJson("/app/user/updateUser",{
zhiFuBao: mobile,
zhiFuBaoName: userName
}).then(
res => {
if (res.code === 0) {
this.navBack();
} else {
this.$queue.showToast(res.msg)
}
uni.hideLoading();
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.container {
padding: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: whitesmoke;
color: grey;
/* font-size: $font-lg; */
&:after {
border-radius: 60px;
}
}
.wrapper {
position: relative;
z-index: 90;
background: #fff;
padding-bottom: 20px;
}
.back-btn {
position: absolute;
left: 20px;
z-index: 9999;
padding-top: var(--status-bar-height);
top: 20px;
font-size: 20px;
/* color: $font-color-dark; */
}
.left-top-sign {
font-size: 80px;
/* color: $page-color-base; */
position: relative;
}
.right-top-sign {
position: absolute;
top: 40px;
right: -15px;
z-index: 95;
&:before,
&:after {
display: block;
content: "";
width: 20px;
height: 40px;
background: -moz-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -webkit-gradient(linear,
left top,
left right,
color-stop(0, #fa4dbe),
color-stop(100%, #fbaa58));
background: -webkit-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -o-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -ms-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: linear-gradient(to left, #fa4dbe 0, #fbaa58 100%);
}
&:before {
transform: rotate(50deg);
border-radius: 0 50px 0 0;
}
&:after {
position: absolute;
right: -198px;
top: 0;
transform: rotate(-50deg);
border-radius: 50px 0 0 0;
/* background: pink; */
}
}
.left-bottom-sign {
position: absolute;
left: -270px;
bottom: -320px;
/*border: 100upx solid #d0d1fd;*/
border-radius: 50%;
padding: 90px;
}
.welcome {
position: relative;
left: 30px;
top: -50px;
font-size: 23px;
color: #555;
text-shadow: 1px 0px 1px rgba(0, 0, 0, .3);
}
.input-content {
padding: 0 20px;
}
.input-item {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 0 30px;
/* background: $page-color-light; */
height: 64px;
border-radius: 4px;
margin-bottom: 30px;
&:last-child {
margin-bottom: 0;
}
.tit {
height: 30px;
line-height: 28px;
/* font-size: $font-sm+2upx;
color: $font-color-base; */
}
input {
height: 40px;
/* font-size: $font-base + 2upx;
color: $font-color-dark; */
width: 100%;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #FF4701;
color: #fff;
/* font-size: $font-lg; */
&:after {
border-radius: 60px;
}
}
.forget-section {
/* font-size: $font-sm+2upx;
color: $font-color-spec; */
text-align: center;
margin-top: 40px;
}
.register-section {
position: fixed;
left: 0;
bottom: 30px;
width: 100%;
/* font-size: $font-sm+2upx;
color: $font-color-base; */
text-align: center;
text {
/* color: $font-color-spec; */
margin-left: 10px;
}
}
</style>

View File

@@ -0,0 +1,116 @@
<template>
<view>
<view class="content" v-if="list.length" >
<view class="list_box" v-for="(item,index) in list" :key="index">
<view class="list_left">
<view class="name">{{item.title}}</view>
<view class="data">{{item.createTime}}</view>
</view>
<view class="list_right" style="color: red;" v-if="item.type==2">- {{item.money}}</view>
<view class="list_right" style="color: #33D442;" v-if="item.type==1">+ {{item.money}}</view>
</view>
</view>
<empty v-else></empty>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
totalCount: 0
}
},
onLoad() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/findMoneyDetails?classify=3&page='+this.page+'&limit=15').then(res => {
if(res.code==0){
// this.list = res.data.list
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = this.list.concat(res.data.list)
}
this.totalCount = res.data.totalPage
}
console.log('res',res)
uni.stopPullDownRefresh();
});
},
},
// 上拉加载
onReachBottom: function() {
if (this.page < this.totalCount) {
this.page += 1;
this.taskData();
} else {
uni.showToast({
title: '已经最后一页啦',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.taskData();
},
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
background: #FFFFFF;
/* margin-top: 20rpx; */
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
}
</style>

View File

@@ -0,0 +1,632 @@
<template>
<view class="content" v-if="XCXIsSelect !='否'">
<view class="part_one">
<view class="one_title">可提现金额</view>
<view class="one_price">¥{{mayMoney}}</view>
</view>
<view class="part_two">
<view class="two_title">提现金额
<text>提现最低额度{{minMoney}}</text>
</view>
<view class="two_box">
¥
<u-input v-model="money" type="number" :clearable="false" :border="border" placeholder="请输入提现金额" />
</view>
<view class="beizhu">*注单笔限制提现最低额度{{minMoney}}最大提现额度为{{manMoney}}单笔提现手续费{{shouxufei*100}}%</view>
</view>
<view class="part_three">
<view class="three_name">兑换方式</view>
<view class="btn">
<view class="btn_left" :class="current==2?'btna':''" @click="bindToindex(2)">
<image src="../../../../static/my/weixin.png"></image>
<text>微信</text>
</view>
<view class="btn_right" :class="current==1?'btna':''" @click="bindToindex(1)">
<image src="../../../../static/my/zhifubao.png"></image>
<text>支付宝</text>
</view>
</view>
</view>
<view class="part_four">
<view class="submit" @click="getOut()">立即提现</view>
<view class="four_box">
<view class="box_left" @click="goZhifuBao">
提现账户
</view>
<view class="box_right" @click="list">
提现记录
</view>
<view class="box_right" @click="isShow">
微信收款码
</view>
</view>
</view>
<!-- 微信收款码弹框 -->
<u-popup v-model="show" mode="center">
<view class="padding">
<view class="text-center text-lg text-bold flex justify-between">
<view></view>
<view>添加微信收款码</view>
<view @click="show=false">X</view>
</view>
<!-- <view class="text-center padding-top-sm padding-bottom-lg" style="color: #999999;">请提交微信号和微信二维码
</view> -->
<view style="width: 80%;margin: 0 auto;">
<view class="margin-top" @click.stop="weixin"
style="border: 4rpx solid #010101;border-radius: 16rpx;overflow: hidden;">
<image v-if="!wximg" src="../../../../static/image/erweima.png"></image>
<image v-else :src="wximg" mode=""></image>
</view>
</view>
<!-- <view class="text-center margin-top-sm " @click="submit"
style="border-radius: 10rpx;background-color: #7E59FF;color: #fff;height: 80rpx;line-height: 80rpx;">保存</view> -->
</view>
</u-popup>
</view>
</template>
<script>
import { showToast } from '../../../../common/queue';
export default {
data() {
return {
show: false,
current: '1',
// value: 10,
money: '',
zhifubaoName: '',
zhifubao: '',
shouxufei: 0.01,
minMoney: '10',
manMoney: '200',
mayMoney: '',
XCXIsSelect: '否',
wximg: '',
values: ''
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if (this.XCXIsSelect == '否') {
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '余额提现'
});
}
},
onShow() {
this.getMoney()
//最低可提现金额度
this.$Request.getT('/app/common/type/112').then(res => {
if (res.code === 0) {
this.minMoney = res.data.value
}
});
//最高可提现金额度
this.$Request.getT('/app/common/type/153').then(res => {
if (res.code === 0) {
this.manMoney = res.data.value
}
});
//手续费
this.$Request.getT('/app/common/type/114').then(res => {
if (res.code === 0) {
this.shouxufei = res.data.value
}
});
this.$Request.getT('/app/common/type/290').then(res => { //判断微信提现方式
if (res.code == 0) {
if (res.data && res.data.value) {
this.values = res.data.value
}
}
})
},
methods: {
//用户收款码弹框
isShow() {
this.getMoney()
this.show = true
},
//微信 支付宝提现选择
bindToindex(e) {
this.current = e
console.log(e, this.current)
},
list() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/cashList'
});
},
goZhifuBao() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/zhifubao'
});
},
getMoney() {
let that = this;
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
//this.$queue.showLoading("加载中...");
//可以提现金额查询预估收入查询
that.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
if (res.code === 0 && res.data) {
that.mayMoney = res.data.balance;
that.zhifubao = res.data.zhiFuBao;
that.zhifubaoName = res.data.zhiFuBaoName;
that.wximg = res.data.cashQrCode
} else if (res.code === -102) {
that.$queue.showToast(res.msg);
that.$queue.logout();
// uni.navigateTo({
// url: '/pages/public/login'
// });
} else {
that.mayMoney = '0';
//this.$queue.showToast(res.msg);
}
});
}
},
getOut() {
let that = this;
let token = that.$queue.getData('token');
let userId = that.$queue.getData('userId');
if (token) {
if (that.current == 1) {
if (!that.zhifubao || !that.zhifubaoName) {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/zhifubao'
});
return
}
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (Number(that.money) < Number(that.minMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能小于' + that.minMoney + '元'
});
return;
}
if (Number(that.money) > Number(that.manMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能大于' + that.manMoney + '元'
});
return;
}
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n姓名:' + that.zhifubaoName + '\n提现金额:' + that.money + '\n提现手续费:' +
parseFloat(that.money * that.shouxufei).toFixed(2) + '元' + '\n收款账号' + that.zhifubao + '',
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
that.$Request.getT('/app/cash/cashMoney?classify=' + that.current +
'&money=' + that.money).then(res => {
if (res.code === 0) {
that.$queue.showToast('提现申请成功,预计三个工作日到账');
that.getMoney();
that.mayMoney = ''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
}
uni.hideLoading();
});
}
}
});
} else if (that.current == 2) {
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (Number(that.money) < Number(that.minMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能小于' + that.minMoney + '元'
});
return;
}
if (Number(that.money) > Number(that.manMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能大于' + that.manMoney + '元'
});
return;
}
if (that.values == 2) {
that.$Request.getT('/app/userinfo/findUserInfoById').then(res => {
if (res.code === 0) {
let wxImg = res.data.cashQrCode;
if (!wxImg) {
uni.showModal({
title: '提现提示',
content: '请上传微信收款码',
showCancel: true,
cancelText: '取消',
confirmText: '上传',
success: res => {
if (res.confirm) {
that.show = true
}
},
fail: () => {},
complete: () => {}
});
return;
}
if (that.money * 1 >= that.minMoney * 1) {
uni.showModal({
title: '提现申请提示',
content: '金额:' + that.money + '元' + ',' + '手续费:' + (that
.money * that.shouxufei).toFixed(2),
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
let data = {
money: that.money,
classify: 2
}
that.$Request.getT('/app/cash/cashMoney',
data).then(
res => {
if (res.code === 0) {
setTimeout(function() {
that.$queue.showToast(
'提现申请成功,预计三个工作日到账'
);
}, 1000)
that.getMoney();
that.money = ''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
}
uni.hideLoading();
});
}
}
});
} else {
setTimeout(function() {
that.$queue.showToast('提现金额必须大于或等于' + that.minMoney + '元才可提现');
}, 1000)
}
} else {
that.$queue.showToast('网络状态不好,请刷新后重试!');
}
});
} else {
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (parseFloat(that.money).toFixed(1) >= that.minMoney) {
uni.showModal({
title: '提现申请提示',
content: '金额:' + that.money + '元' + ',' + '手续费:' + parseFloat(that
.money * that.shouxufei).toFixed(2),
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
let data = {
money: that.money,
classify: 2,
type: 3
}
that.$Request.getT('/shop/shopmoney/shopCashMoney', data).then(
res => {
if (res.code === 0) {
setTimeout(function() {
that.$queue.showToast(
'提现申请成功,预计三个工作日到账');
}, 1000)
that.getMoney();
that.money =''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
that.getMoney();
}
uni.hideLoading();
});
}
}
});
} else {
that.$queue.showToast('提现金额必须大于或等于' + that.minMoney + '元才可提现');
}
}
}
} else {
uni.showToast({
title: '提现失败'
})
}
},
weixin() {
let that = this
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
success: (res) => {
that.$queue.showLoading("上传中...");
for (let i = 0; i < 1; i++) {
uni.uploadFile({ // 上传接口
url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload', //真实的接口地址
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
let img = JSON.parse(uploadFileRes.data).data
let userId = that.$queue.getData('userId');
let data = {
cashQrCode: img
}
that.$Request.postJson('/app/user/updateUser',
data).then(
res => {
if (res.code == 0) {
that.getMoney()
setTimeout(function() {
that.$queue.showToast('上传成功')
}, 1000)
}
});
uni.hideLoading();
// that.show = false
}
});
}
}
});
},
}
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
}
.part_one {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
height: 170rpx;
}
.one_title {
width: 90%;
margin: 0 auto;
font-size: 32rpx;
letter-spacing: 1rpx;
padding-top: 30rpx;
}
.one_price {
width: 90%;
margin: 0 auto;
margin-top: 20rpx;
font-size: 47rpx;
font-weight: bold;
}
.part_two {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
}
.two_title {
width: 90%;
margin: 0 auto;
line-height: 95rpx;
font-size: 34rpx;
}
.two_title text {
font-size: 27rpx;
margin-left: 34rpx;
}
.two_box {
width: 90%;
margin: 0 auto;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: bold;
}
.u-input__input {
font-size: 50rpx !important;
color: #747474 !important;
border-bottom: 1rpx solid #cccccc;
}
.tit {
width: 90%;
margin: 0 auto;
font-size: 31rpx;
margin-top: 10rpx;
color: black;
}
.beizhu {
width: 90%;
margin: 0 auto;
line-height: 55rpx;
color: red;
letter-spacing: 1rpx;
}
.part_three {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
}
.three_name {
width: 90%;
margin: 0 auto;
font-size: 33rpx;
color: black;
line-height: 80rpx;
}
.btn {
width: 96%;
margin: 0 auto;
display: flex;
padding-bottom: 30rpx;
}
.btn_left {
flex: 1;
height: 90rpx;
border: 1rpx solid #ccc;
border-radius: 20rpx;
margin-right: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btn_right {
flex: 1;
/* width: 240rpx; */
height: 90rpx;
border: 1rpx solid #ccc;
border-radius: 20rpx;
margin-left: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btna {
border: 1rpx solid #E34B21 !important;
}
.btn_left image {
width: 50rpx;
height: 50rpx;
margin-right: 12rpx;
}
.btn_right image {
width: 50rpx;
height: 50rpx;
margin-right: 12rpx;
}
.part_four {
width: 90%;
margin: 0 auto;
/* background: #FFFFFF; */
margin-top: 20rpx;
border-radius: 20rpx;
}
.submit {
width: 100%;
height: 90rpx;
background: #F8501F;
color: #F8EBD2;
text-align: center;
line-height: 90rpx;
font-size: 37rpx;
border-radius: 12rpx;
}
.four_box {
width: 90%;
margin: 0 auto;
height: 125rpx;
display: flex;
color: #838383;
}
.box_left {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.box_right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -0,0 +1,176 @@
<template>
<view class="my_account">
<view class="account_top">
<view class="account_name">账户余额</view>
<view class="account_price">{{moneys}}<text></text></view>
<view class="account_btn" @click="bindTxmoney">立即提现</view>
</view>
<!-- 我的列表 -->
<view class="mylist">
<view class="list_box" v-for="(item,index) in mylist" :key="index" @click="bindTomy(item.name)">
<view class="list_left">
<view class="list_img">
<image :src="item.image"></image>
</view>
<view class="list_name">{{item.name}}</view>
</view>
<view class="list_right">
<image src="../../../static/my/icon_go.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
moneys:0,
mylist: [{
id: 1,
name: '保证金',
image: '../../../static/rider/qqq.png'
}, {
id: 2,
name: '账户明细',
image: '../../../static/rider/qq.png'
}]
}
},
onShow() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/findBalance').then(res => {
if(res.code==0){
if(res.data){
this.moneys = res.data
}
}
console.log('res',res)
});
},
bindTxmoney() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/Txmoney/Txmoney'
})
},
bindTomy(name) {
console.log(name)
if (name == '保证金') {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/AcontMoney'
})
} else if (name == '账户明细') {
uni.navigateTo({
url: '/pages/riderMy/myAccount/Acontlist/Acontlist'
})
}
}
}
}
</script>
<style>
.my_account {
width: 100%;
}
.account_top {
width: 100%;
height: 280rpx;
background: #FF7F00;
position: relative;
}
.account_name {
position: absolute;
top: 80rpx;
left: 80rpx;
color: white;
font-size: 30rpx;
letter-spacing: 2rpx;
}
.account_price {
position: absolute;
top: 140rpx;
left: 80rpx;
color: white;
font-size: 50rpx;
letter-spacing: 2rpx;
}
.account_price text {
font-size: 25rpx;
margin-left: 10rpx;
}
.account_btn {
width: 190rpx;
height: 66rpx;
background: #ffffff;
color: #FF7F00;
border-radius: 66rpx;
text-align: center;
line-height: 66rpx;
position: absolute;
top: 140rpx;
right: 40rpx;
font-size: 24rpx;
}
/* 我的列表 */
.mylist {
width: 93%;
margin: 0 auto;
background-color: #FFFFFF;
margin-top: 10rpx;
border-radius: 23rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
height: 95rpx;
}
.list_left {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
}
.list_img {
margin-right: 10rpx;
}
.list_img image {
width: 50rpx;
height: 50rpx;
}
.list_name {
font-size: 25rpx;
letter-spacing: 2rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
}
.list_right image {
width: 12rpx;
height: 20rpx;
}
</style>

View File

@@ -0,0 +1,233 @@
<template>
<view class="comment">
<view class="comment_tabs">
<view class="box" v-for="(item,index) in list" :key="index" @click="change(index)" :class="{btna:count == index}">{{item}}</view>
</view>
<view class="tab_box" :class="{dis:btnnum == 0}">
<view class="content">
<view class="content_box" v-for="(item,index) in head" :key="item.id">
<view class="comment_head">
<view class="head_left">
<view class="img">
<image :src="item.avatar?item.avatar:'../../../static/logo.png'"></image>
</view>
<view class="comment_name">{{item.nickName?item.nickName:'匿名'}}</view>
</view>
<view class="head_right" v-if="item.satisfactionFlag=='0'">
<view class="image">
<image src="../../../static/rider/zan.png"></image>
</view>
<view class="comment_tit">满意</view>
</view>
</view>
<view class="comment_title">{{item.evaluateMessage}}</view>
</view>
</view>
<empty v-if="head.length == 0" ></empty>
</view>
<view class="tab_box" :class="{dis:btnnum == 1}">
<view class="content">
<view class="content_box" v-for="(item,index) in head" :key="item.id">
<view class="comment_head">
<view class="head_left">
<view class="img">
<image :src="item.avatar?item.avatar:'../../../static/logo.png'"></image>
</view>
<view class="comment_name">{{item.nickName?item.nickName:'匿名'}}</view>
</view>
<view class="head_right" v-if="item.satisfactionFlag=='1'">
<view class="image">
<image src="../../../static/rider/zz.png"></image>
</view>
<view class="comment_tit comment_tit1">不满意</view>
</view>
</view>
<view class="comment_title">{{item.evaluateMessage}}</view>
</view>
</view>
<empty v-if="head.length == 0" ></empty>
</view>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
list: ["满意", "不满意"],
btnnum: 0,
count: "",
head: [],
page:1,
limit:10,
totalCount:0,
satisfactionFlag:0
}
},
mounted() {
this.bindorder()
},
methods: {
change(e) {
// console.log(e)
this.head = []
this.page = 1
this.count = e
this.btnnum = e
this.satisfactionFlag = e
this.bindorder()
},
// 获取数据
bindorder() {
this.$Request.getT('/app/userinfo/findEvaluate',
{
page:this.page,
limit:this.limit,
satisfactionFlag:this.satisfactionFlag
}).then(res => {
if(res.code==0){
// this.head = res.data
if (this.page == 1) {
this.head = res.data.list
} else {
this.head = this.head.concat(res.data.list)
}
this.totalCount = res.data.totalCount
}else{
console.log('失败:',res.data)
}
uni.stopPullDownRefresh();
});
},
},
// 上拉加载
onReachBottom: function() {
if(this.page<this.totalCount){
this.page = this.page + 1;
this.bindorder();
}else{
uni.showToast({
title:'已经最后一页啦',
icon:'none'
})
}
},
// 下拉刷新
onPullDownRefresh: function() {
this.page = 1;
this.bindorder();
},
}
</script>
<style>
body {
background: #F5F5F5;
}
.comment {
width: 100%;
}
.comment_tabs {
width: 100%;
display: flex;
background: #FFFFFF;
height: 90rpx;
}
.box {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.btna {
background-color: #E6E6E6;
}
.tab_box {
display: none;
}
.dis {
display: block;
}
/* 满意 */
.content {
width: 90%;
margin: 0 auto;
background: #ffffff;
border-radius: 16rpx;
margin-top: 30rpx;
}
.content_box {
height: 145rpx;
}
.img image {
width: 50rpx;
height: 50rpx;
border-radius: 50%;
}
.comment_head {
width: 90%;
margin: 0 auto;
display: flex;
}
.comment_name {
color: #333333;
font-size: 22rpx;
margin-left: 10rpx;
}
.head_left {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
height: 65rpx;
margin-top: 20rpx;
}
.head_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
color: #3390FF;
font-size: 20rpx;
}
.image {
margin-right: 11rpx;
margin-top: 8rpx;
}
.image image {
width: 22rpx;
height: 22rpx;
}
.comment_title {
width: 90%;
margin: 0 auto;
color: #333333;
font-size: 25rpx;
}
/* 不满意 */
.comment_tit1 {
color: #cccccc;
}
</style>

View File

@@ -0,0 +1,358 @@
<template>
<view class="content">
<view class="complain_cont">
<view class="complain_tabs" v-show="!isShow">
<u-tabs :list="list" :is-scroll="true" name="illegal" :current="current" active-color="#FF7F00"
@change="change"></u-tabs>
</view>
</view>
<u-tabs :list="listTab" :is-scroll="false" inactive-color="#333333" active-color="#FF7F00" :current="currentIndex" @change="changeTab">
</u-tabs>
<view class="tabs_box dis">
<!-- 全部 -->
<view class="complain_box" v-for="(item,index) in orderlist" :key="index" @click="bindonline(item)">
<view class="complain_part1">
<view class="part1_left" v-if="item.illegal">{{item.illegal}}</view>
<view class="part1_left" v-if="item.wrongExplain">{{item.wrongExplain}}</view>
<view class="part1_right">扣款{{item.deductMoney}}</view>
</view>
<view class="complain_part2" v-if="item.shipAddressDetail">
<image src="../../../static/image/black.png"></image>
<text>{{item.shipAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.deilveryAddressDetail">
<image src="../../../static/image/orange.png"></image>
<text>{{item.deilveryAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.shopAddressDetail">
<image src="../../../static/image/black.png"></image>
<text>{{item.shopAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.userAddressDetail">
<image src="../../../static/image/orange.png"></image>
<text>{{item.userAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.indentNumber">
<image src="../../../static/image/orange.png"></image>
<text>订单号{{item.indentNumber}}</text>
</view>
<u-line color="#E6E6E6" />
<view class="complain_title">
<span v-if="item.complaintState=='1'">可申诉</span>
<span v-if="item.complaintState=='2'">申诉中</span>
<span v-if="item.complaintState=='3'">申诉未通过</span>
<span v-if="item.complaintState=='4'">申诉通过</span>
</view>
</view>
<view class="empty" v-if="orderlist.length == 0">
<view
style="display: block; width: 90%; margin: 0 auto; position: fixed;top: 35%;left: 0rpx;right: 0rpx;text-align: center;">
<image src="../../../static/image/empty.png" style="width: 300rpx;height: 300rpx;"></image>
<view style="color: #CCCCCC;">暂无内容</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isShow: false,
page: 1,
limit: 10,
complaintType: null,
complaintState: '',
listTab: [{
name: '全部'
}, {
name: '可申诉'
}, {
name: '申诉中'
}, {
name: '申诉未通过'
}, {
name: '申诉通过'
}],
currentIndex: 0,
list: [{
id: '',
illegal: '全部'
}],
current: 0,
orderlist: [],
totalCount: 0,
illegalId: ''
}
},
mounted() {
},
onLoad() {
this.getTypeList()
this.bindorder()
},
methods: {
getTypeList() {
this.$Request.getT('/app/illegalType/selectIllegalTypeList').then(res => {
if (res.code == 0) {
this.list = [...this.list, ...res.data]
}
});
},
bindlist(index) {
console.log(index)
this.current = index;
this.isShow = !this.isShow
},
// 获取全部数据
bindorder() {
this.$Request.getT('/app/tbindent/findAllComplaint', {
page: this.page,
limit: this.limit,
complaintState: this.complaintState,
illegalId: this.illegalId
}).then(res => {
if (res.code == 0) {
this.totalCount = res.data.totalCount
if (this.page == 1) {
this.orderlist = res.data.list
} else {
this.orderlist = this.list_box.concat(res.data.list)
}
} else {
console.log('失败:', res.data)
}
});
},
change(index) {
console.log(index)
this.illegalId = this.list[index].id
this.orderlist = []
this.current = index;
this.currentIndex = 0
this.page = 1
this.complaintState = ''
this.bindorder()
},
changeTab(index) {
this.orderlist = []
this.currentIndex = index
this.page = 1
if (index == 0) {
this.complaintState = ''
} else {
this.complaintState = index
}
this.bindorder()
},
bindonline(item) {
// if(item.complaintState == 1 || item.complaintState == 4) {
uni.navigateTo({
url: '/pages/riderMy/myComplain/online_complain/online_complain?indentNumber=' + item
.indentNumber + '&complaintId=' + item.complaintId
})
// }
},
bindshow() {
this.isShow = !this.isShow
},
},
// 上拉加载
onReachBottom: function() {
if (this.page < this.totalCount) {
this.page = this.page + 1;
} else {
uni.showToast({
title: '已经最后一页啦',
icon: 'none'
})
}
this.bindorder();
}
}
</script>
<style>
body {
background-color: #F5F5F5;
}
.empty {
width: 100%;
background: #ffffff;
/* #ifdef MP-WEIXIN */
height: 93vh;
/* #endif */
/* #ifndef MP-WEIXIN */
height: 80vh;
/* #endif */
}
.u-tab-item {
font-weight: 400 !important;
color: #000000 !important;
font-size: 24rpx !important;
}
.tabs_box {
/* display: none; */
/* position: absolute; */
/* top: 144rpx; */
}
.dis {
/* display: block; */
/* width: 100%; */
/* position: absolute; */
/* top: 100rpx; */
}
.content {
width: 100%;
position: relative;
}
.complain_cont {
width: 100%;
position: relative;
/* display: flex; */
}
.complain_tabs {
width: 100%;
}
.complain_btn {
width: 15%;
background: #FFFFFF;
box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
height: 88rpx;
position: absolute;
top: 0rpx;
right: 0rpx;
z-index: 10075;
}
.btn {
color: #999999;
font-size: 25rpx;
letter-spacing: 2rpx;
text-align: center;
line-height: 88rpx;
}
.complain_none {
width: 15%;
background: #FFFFFF;
box-shadow: -2rpx 1rpx 3rpx 0rpx rgba(39, 39, 39, 0.11);
height: 88rpx;
position: absolute;
top: 88rpx;
right: 0rpx;
}
.popup_list {
width: 97%;
margin: 0 auto;
position: relative;
top: 90rpx;
}
.list_tabs {
width: 90%;
height: auto;
display: flex;
justify-content: start;
flex-wrap: wrap;
}
.tabs {
border: 1rpx solid #cccccc;
padding: 0rpx 25rpx;
line-height: 50rpx;
margin: 10rpx 10rpx;
}
/* 全部 */
.complain_box {
width: 90%;
margin: 0 auto;
/* height: 300rpx; */
background: #ffffff;
margin-top: 30rpx;
border-radius: 17rpx;
}
.complain_part1 {
width: 90%;
margin: 0 auto;
display: flex;
/* padding-top: 20rpx; */
}
.part1_left {
flex: 1;
font-size: 26rpx;
font-weight: bold;
letter-spacing: 2rpx;
height: 80rpx;
justify-content: left;
align-items: center;
display: flex;
}
.part1_right {
flex: 1;
color: #FF1B1B;
display: flex;
justify-content: flex-end;
align-items: center;
}
.complain_part2 {
width: 90%;
margin: 0 auto;
height: 50rpx;
display: flex;
justify-content: left;
align-items: center;
}
.complain_part2 image {
width: 15rpx;
height: 15rpx;
margin-right: 20rpx;
}
.complain_part2 text {
color: #999999;
font-size: 24rpx;
}
.u-line {
border-bottom-width: 3px !important;
margin-top: 20rpx !important;
}
.complain_title {
width: 90%;
margin: 0 auto;
height: 80rpx;
display: flex;
justify-content: flex-end;
align-items: center;
color: #FF2727;
font-size: 27rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
</style>

View File

@@ -0,0 +1,195 @@
<template>
<view class="content">
<view class="online_box">
<view class="online_title">{{datas.illegal}}</view>
<u-line color="#E6E6E6" />
<view class="online" style="padding-top: 10rpx;">
<view class="online_tit">违规说明</view>
<view class="online_test">{{datas.wrongExplain}}</view>
</view>
<view class="online">
<view class="online_tit">关联订单</view>
<view class="online_text" v-if="datas.shipAddressDetail" >
<image src="../../../../static/image/black.png"></image>
<text>{{datas.shipAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.deilveryAddressDetail">
<image src="../../../../static/image/orange.png"></image>
<text>{{datas.deilveryAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.shopAddressDetail">
<image src="../../../../static/image/black.png"></image>
<text>{{datas.shopAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.userAddressDetail">
<image src="../../../../static/image/orange.png"></image>
<text>{{datas.userAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.indentNumber" @click="copyOrder(datas.indentNumber)">
<image src="../../../../static/image/orange.png"></image>
<text>订单号{{datas.indentNumber}}</text>
</view>
</view>
<view class="online">
<view class="online_tit">违规说明</view>
<view style="font-size: 24rpx;margin-top: 10rpx;">{{datas.resultHanding}}</view>
<view class="pnline_tip">如果配送中上报异常审核成功后违规消除不扣款</view>
</view>
</view>
<view class="btn" v-if="datas.complaintState=='1'" @click="bindonline">在线申诉</view>
<view class="btn btn1" v-if="datas.complaintState=='2'" >申诉中</view>
<view class="btn" v-if="datas.complaintState=='3'"@click="bindonline" >申诉未通过</view>
<view class="btn" v-if="datas.complaintState=='4'" >申诉通过</view>
</view>
</template>
<script>
export default {
data() {
return {
list: [{
id: 1,
img: '../../../../static/image/black.png',
name: '西安智能大厦'
}, {
id: 2,
img: '../../../../static/image/orange.png',
name: '用户地址隐藏',
}],
indentNumber:'',
datas:{},
complaintId: ''
}
},
onLoad(options) {
console.log(options)
this.indentNumber =options.indentNumber
this.complaintId = options.complaintId
// this.bindorder()
},
onShow() {
console.log('`````````````11111111')
if(this.indentNumber!=''){
this.bindorder()
}
},
methods: {
copyOrder(value) {
uni.setClipboardData({
data: value, //要被复制的内容
success: () => { //复制成功的回调函数
uni.showToast({ //提示
title: '复制成功'
})
}
});
},
bindonline() {
uni.navigateTo({
url: '/pages/riderMy/myOnline/myOnline?indentNumber='+this.indentNumber+'&complaintType='+this.datas.complaintType+'&complaintId='+this.complaintId
})
},
// 获取数据
bindorder() {
this.$Request.getT('/app/tbindent/findComplaint',
{
indentNumber:this.indentNumber,
complaintId: this.complaintId
}).then(res => {
if(res.code==0){
this.datas = res.data
}else{
console.log('失败:',res.data)
}
});
},
}
}
</script>
<style>
body {
background-color: #F5F5F5;
}
.content {
width: 100%;
}
.online_box {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 30rpx;
}
.online_title {
font-size: 28rpx;
font-weight: bold;
letter-spacing: 2rpx;
width: 90%;
margin: 0 auto;
line-height: 80rpx;
}
.online {
width: 90%;
margin: 0 auto;
padding-bottom: 34rpx;
}
.online_tit {
font-size: 27rpx;
letter-spacing: 2rpx;
font-weight: bolder;
line-height: 40rpx;
}
.online_test {
color: #333333;
font-size: 26rpx;
letter-spacing: 2rpx;
line-height: 38rpx;
}
.online_text {}
.online_text image {
width: 15rpx;
height: 15rpx;
}
.online_text text {
font-size: 21rpx;
color: #333333;
margin-left: 15rpx;
letter-spacing: 1rpx;
}
.pnline_tip {
color: #999999;
font-size: 25rpx;
line-height: 50rpx;
}
.btn {
width: 90%;
margin: 0 auto;
background: #FF7F00;
line-height: 90rpx;
text-align: center;
color: white;
border-radius: 15rpx;
margin-top: 20rpx;
font-size: 28rpx;
}
.btn1{
background: #ccc;
}
</style>

View File

@@ -0,0 +1,157 @@
<template>
<view class="content">
<view class="online_box">
<view class="online">
<view class="tit">申诉理由</view>
<view class="text_box" style="margin-top: 20rpx;">
<u-input v-model="value" height="300" :type="type" :border="border" :clearable="false" placeholder="请描述问题发生的情况" />
</view>
</view>
</view>
<view class="btn" @click="bindorder">立即提交</view>
</view>
</template>
<script>
export default {
data() {
return {
value: '',
type: 'textarea',
border: true,
indentNumber:'',
complaintType:'',
complaintName:'',
complaintId: '',
}
},
onLoad(options) {
console.log(options)
this.indentNumber =options.indentNumber
this.complaintId =options.complaintId
},
methods: {
bindorder(){
if(this.value==''){
uni.showToast({
title:'请填写申诉原因',
icon:'none'
})
return
}
this.$Request.postJson('/app/tbindent/appealIndent',
{
indentNumber:this.indentNumber,
// appealType:this.complaintType,
appealMessage:this.value,
complaintId: this.complaintId
}).then(res => {
if(res.code==0){
uni.showToast({
title:'提交成功',
icon:'none'
})
setTimeout(function(){
uni.redirectTo({
url:'/pages/riderMy/myComplain/myComplain'
})
},1500)
}else{
console.log('失败:',res.data)
}
});
}
}
}
</script>
<style>
body {
background-color: #F5F5F5;
}
.content {
width: 100%;
}
.online_box {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
border-radius: 20rpx;
margin-top: 30rpx;
padding-top: 20rpx;
padding-bottom: 40rpx;
}
.part1 {
width: 90%;
margin: 0 auto;
height: 80rpx;
display: flex;
align-items: center;
}
.online_left {
flex: 1;
font-size: 27rpx;
font-weight: bold;
letter-spacing: 2rpx;
}
.online_right {
color: #999999;
font-size: 22rpx;
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
}
.online_right image {
width: 12rpx;
height: 21rpx;
margin-left: 10rpx;
}
.online_title {
font-size: 28rpx;
font-weight: bold;
letter-spacing: 2rpx;
width: 90%;
margin: 0 auto;
line-height: 80rpx;
}
.online {
width: 90%;
margin: 0 auto;
padding-bottom: 34rpx;
}
.tit {
font-size: 27rpx;
font-weight: bold;
letter-spacing: 2rpx;
margin-top: 19rpx;
}
.u-input--border {
border: none !important;
background: #F5F5F5 !important;
}
.btn {
width: 90%;
margin: 0 auto;
background: #FF7F00;
line-height: 90rpx;
text-align: center;
color: white;
border-radius: 15rpx;
margin-top: 20rpx;
font-size: 28rpx;
}
</style>

1238
pages/riderMy/order.vue Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,36 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<!-- <view v-html="tit"> </view> -->
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
tit: '',
content: ''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize() {
this.$Request.getT('/app/userinfo/userAgreement').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>

116
pages/riderMy/profit.vue Normal file
View File

@@ -0,0 +1,116 @@
<template>
<view>
<view class="content" v-if="list.length">
<view class="list_box" v-for="item in list" :key="item.id">
<view class="list_left">
<view class="name">{{item.title}}</view>
<view class="data">{{item.createTime}}</view>
</view>
<view class="list_right" style="color: red;" v-if="item.type==1">- {{item.money}}</view>
<view class="list_right" style="color: #33D442;" v-if="item.type==2">+ {{item.money}}</view>
</view>
</view>
<empty v-else ></empty>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
page:1,
limit:10,
totalCount:0,
list: []
}
},
onLoad() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
let userId = this.$queue.getData('userId');
this.$Request.getT('/app/userMoney/profitDetailed',{
userId:userId,
page:this.page,
limit:this.limit
}).then(res => {
if(res.code==0){
if (this.page == 1) {
this.list = res.data.data.list
} else {
this.list = this.list_box.concat(res.data.data.list)
}
this.totalCount = res.data.data.totalCount
}
console.log('res',res)
});
},
},
// 上拉加载
onReachBottom: function() {
if(this.page<this.totalCount){
this.page = this.page + 1;
}else{
uni.showToast({
title:'已经最后一页啦',
icon:'none'
})
}
this.taskData();
}
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
background: #FFFFFF;
margin-top: 20rpx;
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
}
</style>

646
pages/riderMy/riderMy.vue Normal file
View File

@@ -0,0 +1,646 @@
<template>
<view class="bg">
<view class="content">
<!-- <u-navbar :is-back="true" :title="title"></u-navbar> -->
<!-- 顶部 -->
<view class="header">
<!-- #ifdef MP-WEIXIN -->
<view class="head_image">
<button v-if="userId" open-type="chooseAvatar" @chooseavatar="onChooseAvatar" style="background-color: rgba(255, 255, 255, 0) !important;border: none !important;margin-top: 30rpx;">
<image :src="avatar?avatar:'../../static/logo.png'" style="border-radius: 50%;"></image>
</button>
<image v-else :src="avatar?avatar:'../../static/logo.png'" style="border-radius: 50%;"></image>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="head_image">
<image v-if="userId" @click="upavatar()" :src="avatar?avatar:'../../static/logo.png'" style="border-radius: 50%;"></image>
<image v-else :src="avatar?avatar:'../../static/logo.png'" style="border-radius: 50%;"></image>
</view>
<!-- #endif -->
<view class="head_name" v-if="userId">
<view class="name" @click="upNickName()">{{nickName}}</view>
<view v-if="XCXIsSelect !='否'">
<view class="approve" v-if="checkCertification=='0'">实名认证审核中</view>
<view class="approve" v-if="checkCertification=='1'">已实名</view>
<view class="approve" @click="bindapprove" v-if="checkCertification=='2'">实名认证未通过</view>
<view class="approve" @click="bindapprove" v-if="checkCertification==null">未实名认证</view>
</view>
</view>
<view class="head_name" v-if="!userId">
<button class="logins" @click="goLogin">登录</button>
</view>
</view>
</view>
<!-- 收入和订单 -->
<view style="border-radius: 24rpx;overflow: hidden;width: 93%;margin: 0 auto;background: #ffffff;"
v-if="XCXIsSelect !='否'">
<view class="user_box">
<view class="box">
<view class="user_name">
<u-section title="今日收入" :right="false" line-color="#FE3B27"></u-section>
</view>
<view class="user_price">{{indent.incomeday?indent.incomeday:0}} <text></text></view>
<view class="user_tit ">今日收入金额</view>
</view>
<view class="box">
<view class="user_name">
<u-section title="本月收入" :right="false" line-color="#009C66"></u-section>
</view>
<view class="user_price">{{indent.incomemonth?indent.incomemonth:0}} <text></text></view>
<view class="user_tit ">本月收入金额</view>
</view>
</view>
<view class="user_box">
<view class="box">
<view class="user_name">
<u-section title="累计收入" :right="false" line-color="#FE3B27"></u-section>
</view>
<view class="user_price">{{indent.incomesum?indent.incomesum:0}} <text></text></view>
<view class="user_tit ">累计收入金额</view>
</view>
<view class="box" @click="myOrders()">
<view class="user_name">
<u-section title="订单统计" :right="false" line-color="#009C66"></u-section>
</view>
<view class="user_price">{{indent.indentCount?indent.indentCount:0}} <text></text></view>
<view class="user_tit ">今日完成单量</view>
</view>
</view>
</view>
<!-- 我的列表 -->
<view class="mylist">
<view v-if="XCXIsSelect !='否'" class="list_box" v-for="(item,index) in mylist" :key="index"
@click="bindmy(item.name)">
<view class="list_left">
<view class="list_img">
<image :src="item.image" mode="scaleToFill"></image>
</view>
<view class="list_name">{{item.name}}</view>
</view>
<view class="list_right">
<view v-if="item.messageCount" class="bott">{{item.messageCount}}</view>
<image src="../../static/my/icon_go.png"></image>
</view>
</view>
<view v-if="XCXIsSelect =='否'" class="list_box" v-for="(item,index) in datalist" :key="index"
@click="bindmy(item.name)">
<view class="list_left">
<view class="list_img">
<image :src="item.image"></image>
</view>
<view class="list_name">{{item.name}}</view>
</view>
<view class="list_right">
<image src="../../static/my/icon_go.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
onShareAppMessage(res) { //发送给朋友
return {
title: this.tuiguang,
path: '/pages/index/index',
imageUrl: this.tuiguangImg,
}
},
onShareTimeline(res) { //分享到朋友圈
return {
title: this.tuiguang,
path: '/pages/index/index',
imageUrl: this.tuiguangImg,
}
},
data() {
return {
tuiguang: '',
tuiguangImg: '',
show: false,
title: '我的',
mylist: [
{
id: 1,
name: '我的订单',
image: '../../static/rider/77.png'
},{
id: 2,
name: '资金账户',
image: '../../static/rider/22.png'
},
{
id: 3,
name: '我的评价',
image: '../../static/rider/33.png'
},
{
id: 4,
name: '违规申诉',
image: '../../static/rider/44.png'
},
{
id: 5,
name: '联系客服',
image: '../../static/my/8.png'
}, {
id: 6,
name: '消息中心',
image: '../../static/rider/liaotin.png',
messageCount:''
},
{
id: 7,
name: '意见反馈',
image: '../../static/rider/66.png'
},
{
id: 9,
name: '系统设置',
image: '../../static/rider/55.png'
}
],
datalist: [{
id: 3,
name: '我的评价',
image: '../../static/rider/33.png'
},
{
id: 4,
name: '违规申诉',
image: '../../static/rider/44.png'
}, {
id: 5,
name: '消息中心',
image: '../../static/rider/liaotin.png'
},
// {
// id: 6,
// name: '用户协议',
// image: '../../static/rider/66.png'
// },
// {
// id: 7,
// name: '隐私政策',
// image: '../../static/rider/77.png'
// },
{
id: 9,
name: '系统设置',
image: '../../static/rider/55.png'
}
],
information: {}, //个人信息
daySr: '',
orders: '',
indent: {},
avatar: '',
nickName: '匿名',
checkCertification: '',
userId: '',
token: '',
XCXIsSelect: '否',
//messageCount: ''
}
},
onLoad() {
this.$Request.getT('/app/common/type/331').then(res => {
if (res.code === 0) {
uni.setStorageSync('tuiguang', res.data.value)
this.tuiguang = res.data.value
}
});
this.$Request.getT('/app/common/type/332').then(res => {
if (res.code === 0) {
uni.setStorageSync('tuiguangImg', res.data.value)
this.tuiguangImg = res.data.value
}
});
},
onShow() {
this.mylist[5].messageCount = uni.getStorageSync('messageCount')
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
this.token = this.$queue.getData('token');
this.userId = this.$queue.getData('userId');
if (this.token) {
this.shouru()
this.getUserInfo(this.userId);
} else {
// this.goLogin();
}
},
methods: {
//微信填写能力获取头像
onChooseAvatar(e){
console.log(e.detail.avatarUrl)
let that = this;
let token = uni.getStorageSync('token');
uni.showLoading({
title: '上传中...'
});
uni.uploadFile({
// url: config.APIHOST1 + '/alioss/upload', //仅为示例,非真实的接口地址
url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload', //仅为示例,非真实的接口地址
filePath: e.detail.avatarUrl,
header: {
token: token
},
name: 'file',
success: uploadFileRes => {
let url = JSON.parse(uploadFileRes.data).data;
that.$Request.postJson(
'/app/user/updateUserImageUrl?avatar=' + url).then(
res => {
uni.hideLoading();
if (res.code === 0) {
that.$queue.showToast(
"更新成功");
that.getUserInfo();
}
});
}
});
},
//修改用户名
upNickName(){
uni.navigateTo({
url:'./updateNickName'
})
},
//修改用户头像
upavatar() {
let that = this;
var url = null;
let userId = this.$queue.getData('userId');
uni.showActionSheet({
// itemList按钮的文字接受的是数组
itemList: ["查看头像", "从相册选择图片"],
success(e) {
var index = e.tapIndex
if (index === 0) {
// 用户点击了预览当前图片
// 可以自己实现当前头像链接的读取
let url = that.avatar;
let arr = []
arr.push(url)
uni.previewImage({
// 预览功能图片也必须是数组的
urls: arr
})
} else if (index === 1) {
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album'], //从相册选择
success: function(res) {
uni.showLoading({
title: '上传中...'
});
let token = uni.getStorageSync('token');
uni.uploadFile({
// url: config.APIHOST1 + '/alioss/upload', //仅为示例,非真实的接口地址
url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload', //仅为示例,非真实的接口地址
filePath: res.tempFilePaths[0],
header: {
token: token
},
name: 'file',
success: uploadFileRes => {
url = JSON.parse(uploadFileRes.data).data;
that.$Request.postJson(
'/app/user/updateUserImageUrl?avatar=' + url).then(
res => {
uni.hideLoading();
if (res.code === 0) {
that.$queue.showToast(
"更新成功");
that.getUserInfo();
}
});
}
});
}
});
}
}
})
},
// 查看今日收入
profit() {
if (!this.userId) {
uni.navigateTo({
url: '/pages/login/login'
})
return
}
uni.navigateTo({
url: '/pages/riderMy/profit'
})
},
// 查看订单统计
myOrders() {
if (!this.userId) {
uni.navigateTo({
url: '/pages/login/login'
})
return
}
uni.navigateTo({
url: '/pages/riderMy/order'
})
},
bindapprove() {
uni.navigateTo({
url: '/pages/riderMy/approve/approve'
})
},
bindmy(name) {
console.log(name)
let that = this
if (!that.token) {
uni.navigateTo({
url: '/pages/login/login'
})
return
}
if (name == '资金账户') {
uni.navigateTo({
url: '/pages/riderMy/myAccount/myAccount'
})
}else if (name == '我的订单') {
uni.navigateTo({
url: '/pages/riderMy/order'
})
} else if (name == '我的评价') {
uni.navigateTo({
url: '/pages/riderMy/myComment/myComment'
})
} else if (name == '联系客服') {
uni.navigateTo({
url: '/pages/riderMy/kefu/chat'
})
} else if (name == '用户协议') {
uni.navigateTo({
url: '/pages/riderMy/xieyi'
})
} else if (name == '隐私政策') {
uni.navigateTo({
url: '/pages/riderMy/mimi'
})
} else if (name == '违规申诉') {
uni.navigateTo({
url: '/pages/riderMy/myComplain/myComplain'
})
} else if (name == '培训中心') {
uni.navigateTo({
url: '/pages/riderMy/trainingList'
})
} else if (name == '消息中心') {
uni.navigateTo({
url: '/pages/riderMy/kefu/liaotian'
})
} else if (name == '系统设置') {
uni.navigateTo({
url: '/pages/riderMy/set/set'
})
} else if (name == '意见反馈') {
uni.navigateTo({
url: '/pages/riderMy/set/yijian'
})
}
},
//检测是否登录
checkLogin() {
},
// 获取个人信息
getUserInfo(userId) {
this.$Request.getT("/app/tbindent/findUserInfoById").then(res => {
if (res.code == 0) {
this.$nextTick(function() {
this.avatar = res.data.avatar ? res.data.avatar : '../../static/logo.png'
this.nickName = res.data.nickName
uni.setStorageSync('userName',res.data.userName)
this.checkCertification = res.data.checkCertification
console.log(this.checkCertification, '实名认证')
this.userId = res.data.userId
})
} else {
this.$queue.logout();
uni.showModal({
showCancel: false,
title: '登录失败',
content: res.msg,
});
}
});
},
// 今日收入、订单量
shouru() {
this.$Request.getT('/app/userinfo/findIncome').then(res => {
if (res.code == 0) {
// this.daySr = res.data.income
// this.orders = res.data.indentCount
this.indent = res.data
}
console.log('res', res)
});
},
// 跳转去登录
goLogin() {
// this.$queue.setData('href', '/pages/my/index');
uni.navigateTo({
url: '/pages/login/login'
});
},
}
}
</script>
<style>
button::after {
border: none;
/* background-color: none; */
}
.u-icon__icon {
font-size: 35rpx !important;
font-weight: bold !important;
}
.u-title {
color: #000000 !important;
}
.u-navbar-fixed {
background: none !important;
}
body {
background: #F5F5F5;
}
.bg {}
.logins {
border: none;
background: #F8501F;
color: #fff;
width: 200rpx;
margin: 70rpx 20rpx;
height: 70rpx;
line-height: 70rpx;
}
.content {
background: linear-gradient(0deg, #F5F5F5 0%, #fed9ba 100%);
width: 100%;
}
/* 顶部 */
.header {
width: 100%;
height: 200rpx;
display: flex;
}
.head_image {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.head_image image {
width: 90rpx;
height: 90rpx;
}
.head_name {
flex: 4;
position: relative;
margin-left: -14rpx;
}
.name {
position: absolute;
top: 65rpx;
}
.approve {
position: absolute;
top: 100rpx;
font-size: 24rpx;
color: #999999;
}
/* 用户信息 */
.user_box {
display: flex;
height: 210rpx;
position: relative;
top: -15rpx;
padding: 0 20rpx;
}
.box {
flex: 1;
/* margin-left: 40rpx; */
margin-top: 40rpx;
}
.user_price {
font-size: 44rpx;
margin-top: 10rpx;
}
.user_price text {
font-size: 21rpx;
margin-left: 10rpx;
}
.user_tit {
color: #B3B3B3;
font-size: 21rpx;
margin-top: 10rpx;
}
.u-section__title {
font-weight: 500 !important;
color: #333333 !important;
font-size: 14px !important;
padding-left: 10px;
}
/* 我的列表 */
.mylist {
width: 93%;
margin: 0 auto;
background-color: #FFFFFF;
margin-top: 10rpx;
border-radius: 23rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
height: 95rpx;
}
.list_left {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
}
.list_img {
margin-right: 10rpx;
}
.list_img image {
width: 32rpx;
height: 32rpx;
}
.list_name {
font-size: 25rpx;
letter-spacing: 2rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
}
.list_right image {
width: 12rpx;
height: 20rpx;
}
.bott {
background: red;
color: #ffffff;
padding: 5rpx 10rpx;
border-radius: 60%;
font-size: 23rpx;
margin-right: 15rpx;
}
</style>

View File

@@ -0,0 +1,31 @@
<template>
<view style="font-size: 14px;line-height: 26px;padding: 32upx;" class="home1">
<view style="font-size: 28upx;" v-html="content" ></view>
</view>
</template>
<script>
export default {
data() {
return {
content:''
}
},
onLoad() {
this.getGuize();
},
methods: {
getGuize(){
this.$Request.getT('/app/common/type/233').then(res =>{
if(res.code === 0){
this.content = res.data.value;
}
});
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,44 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<!-- <view v-html="tit"> </view> -->
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
tit: '',
content: ''
}
},
onLoad() {
// this.getGuize();
// 隐私政策
this.$Request.getT('/app/common/type/237').then(res => { //用户完成成功
if (res.code == 0) {
if (res.data && res.data.value) {
this.content = res.data.value;
}
}
})
},
methods: {
getGuize() {
this.$Request.getT('/app/userinfo/privacyPolicy').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
/* background: #1c1b20; */
}
</style>

121
pages/riderMy/set/set.vue Normal file
View File

@@ -0,0 +1,121 @@
<template>
<view class=" padding-lr">
<!-- <view class="flex padding-tb" @click="goNav('/pages/public/pwd')">
<view class="flex-sub text-df" style="line-height: 50upx;">修改密码</view>
<image src="../../../static/image/go.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view> -->
<view class="flex padding-tb" @click="goNav('/pages/riderMy/trainingList')">
<view class="flex-sub text-df" style="line-height: 50upx;">帮助中心</view>
<image src="../../../static/image/go.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex padding-tb" @click="goNav('/pages/riderMy/set/xieyi')">
<view class="flex-sub text-df" style="line-height: 50upx;">用户协议</view>
<image src="../../../static/image/go.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex padding-tb" @click="goNav('/pages/riderMy/set/mimi')">
<view class="flex-sub text-df" style="line-height: 50upx;">隐私政策</view>
<image src="../../../static/image/go.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex padding-tb" @click="goNav('/pages/riderMy/set/about')">
<view class="flex-sub text-df" style="line-height: 50upx;">关于我们</view>
<image src="../../../static/image/go.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="btn" @click="TuiLogin">退出登录</view>
</view>
</template>
<script>
export default {
data() {
return {
userId: ""
}
},
onLoad() {
this.userId = uni.getStorageSync('userId')
},
methods: {
goNav(e) {
uni.navigateTo({
url: e
})
},
//退出登录
TuiLogin() {
let that = this
if (that.userId) {
uni.showModal({
title: '提示',
content: '确认退出登录吗?',
success: function(res) {
if (res.confirm) {
uni.removeStorageSync('userId')
uni.removeStorageSync('token')
uni.removeStorageSync('avatar')
uni.removeStorageSync('nickName')
uni.removeStorageSync('phone')
uni.removeStorageSync('invitationCode')
uni.removeStorageSync('inviterCode')
uni.removeStorageSync('platform')
uni.removeStorageSync('sex')
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('checkCertification')
// uni.navigateBack()
uni.redirectTo({
url:'/pages/index/index'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
} else {
uni.showModal({
title: '提示',
content: '您还未登录,请先登录',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.navigateTo({
url: '/pages/my/loginphone'
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
},
}
}
</script>
<style>
page {
background: #FFFFFF;
}
.btn {
width: 100%;
height: 80upx;
background: #FF6A04;
color: #FFFFFF;
border-radius: 6upx;
text-align: center;
line-height: 80upx;
margin-top: 40upx;
font-size: 34upx;
/* color: #fff; */
}
</style>

View File

@@ -0,0 +1,44 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<!-- <view v-html="tit"> </view> -->
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
export default {
data() {
return {
tit: '',
content: ''
}
},
onLoad() {
// this.getGuize();
// 用户协议
this.$Request.getT('/app/common/type/236').then(res => { //用户完成成功
if (res.code == 0) {
if (res.data && res.data.value) {
this.content = res.data.value;
}
}
})
},
methods: {
getGuize() {
this.$Request.getT('/app/userinfo/userAgreement').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>

View File

@@ -0,0 +1,194 @@
<template>
<view class="page" style="background-color: #ffffff;">
<view class="feedback-title">
<text>问题和意见</text>
<text @tap="chooseMsg">快速键入</text>
</view>
<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.content"
class="feedback-textare" /></view>
<view v-if="XCXIsSelect !='否'">
<view class="feedback-title"><text>QQ/邮箱</text></view>
<view class="feedback-body"><input class="feedback-input" v-model="sendDate.contact"
placeholder="方便我们联系你 " /></view>
</view>
<button style="" class="feedback-submit" @tap="send">提交</button>
</view>
</template>
<script>
export default {
data() {
return {
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 5,
content: '',
contact: ''
},
XCXIsSelect: '否',
};
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
// let deviceInfo = {
// appid: plus.runtime.appid,
// imei: plus.device.imei, //设备标识
// p: plus.os.name === 'Android' ? 'a' : 'i', //平台类型i表示iOS平台a表示Android平台。
// md: plus.device.model, //设备型号
// app_version: plus.runtime.version,
// plus_version: plus.runtime.innerVersion, //基座版本号
// os: plus.os.version,
// net: '' + plus.networkinfo.getCurrentType()
// };
// this.sendDate = Object.assign(deviceInfo, this.sendDate);
},
methods: {
close(e) {
this.imageList.splice(e, 1);
},
chooseMsg() {
//快速输入
uni.showActionSheet({
itemList: this.msgContents,
success: res => {
this.sendDate.content = this.msgContents[res.tapIndex];
}
});
},
chooseImg() {
//选择图片
uni.chooseImage({
sourceType: ['camera', 'album'],
sizeType: 'compressed',
count: 8 - this.imageList.length,
success: res => {
this.imageList = this.imageList.concat(res.tempFilePaths);
}
});
},
chooseStar(e) {
//点击评星
this.sendDate.score = e;
},
previewImage() {
//预览图片
uni.previewImage({
urls: this.imageList
});
},
send() {
//发送反馈
console.log(JSON.stringify(this.sendDate));
if (!this.sendDate.content) {
uni.showToast({
icon: 'none',
title: '请输入反馈内容'
});
return;
}
if (!this.sendDate.contact) {
uni.showToast({
icon: 'none',
title: '请填写QQ或邮箱'
});
return;
}
this.$queue.showLoading('加载中...');
this.$Request.postJson('/app/shop/userFeedback', {
shopId: uni.getStorageSync("shopId"),
userEmail: this.sendDate.contact,
feedbackMessage: this.sendDate.content,
// state: 2
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '投诉成功'
});
setTimeout(function() {
uni.navigateBack();
}, 1000);
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '投诉失败',
content: res.msg
});
}
});
}
}
};
</script>
<style>
@font-face {
font-family: uniicons;
font-weight: normal;
font-style: normal;
src: url('https://img-cdn-qiniu.dcloud.net.cn/fonts/uni.ttf') format('truetype');
}
page {
background-color: #F5F5F5 !important;
}
view {
font-size: 28upx;
}
/*问题反馈*/
.feedback-title {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 20upx;
color: #8f8f94;
font-size: 28upx;
}
.feedback-star-view.feedback-title {
justify-content: flex-start;
margin: 0;
}
.feedback-body {
font-size: 32upx;
padding: 16upx;
margin: 16upx;
border-radius: 16upx;
background: #FFFFFF;
/* color: #FFF; */
}
.feedback-textare {
height: 200upx;
font-size: 34upx;
line-height: 50upx;
width: 100%;
box-sizing: border-box;
padding: 20upx 30upx 0;
}
.feedback-input {
font-size: 32upx;
height: 60upx;
/* padding: 15upx 20upx; */
line-height: 60upx;
}
.feedback-submit {
background: #FFCC00;
/* color: #ffffff; */
margin: 20upx;
margin-top: 32upx;
}
</style>

View File

@@ -0,0 +1,77 @@
<template>
<view style="line-height: 26px;padding: 32upx;" class="home1">
<!-- <view v-html="tit"> </view> -->
<!-- <view style="font-size: 28upx;" v-html="content"></view> -->
<u-parse :html="content"></u-parse>
</view>
</template>
<script>
export default {
data() {
return {
list: [],
content: ''
}
},
onLoad(e) {
this.taskData(e.id)
},
methods: {
// 获取任务数据
taskData(e) {
this.$Request.getT('/app/userinfo/TrainingCenter?id='+e).then(res => {
if(res.code==0){
this.content = res.data.message
}
});
},
}
}
</script>
<style>
page {
background: #FFFFFF;
}
.content {
width: 100%;
background: #FFFFFF;
margin-top: 20rpx;
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
/* .list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
} */
</style>

View File

@@ -0,0 +1,48 @@
<template>
<view>
<view style="margin-top: 4upx;" class="bg-white flex justify-between align-center padding" v-for="(item,index) in dataList" :key='index' @click="goDet(item)" >
<view class="text-lg">{{index+1}}.{{item.title}}</view>
<image src="../../static/image/go.png" style="width: 20rpx;height: 34rpx;" mode="aspectFill"></image>
</view>
</view>
</template>
<script>
export default {
data() {
return {
page: 1,
limit: 10,
dataList: []
}
},
onLoad() {
this.getDataList()
},
methods: {
getDataList() {
let data = {
page: this.page,
limit: this.limit,
type:2
}
this.$Request.getT("/app/userinfo/trainingCenterList",data).then(res => {
this.dataList = res.data.list
})
},
goDet(e) {
uni.navigateTo({
url: '/pages/riderMy/trainingCenter?id='+e.trainingId
})
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getDataList();
},
}
</script>
<style>
</style>

View File

@@ -0,0 +1,197 @@
<template>
<view class="container">
<view class="wrapper">
<view class="input-content">
<view class="cu-form-group" style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">原昵称</text>
<input type="text" :value="oldnickName" placeholder-class="input-empty" disabled="true" />
</view>
<view class="cu-form-group" style="border: 2upx solid whitesmoke;margin-bottom: 20px;border-radius: 30px">
<text class="title">新昵称</text>
<input type="nickname" v-model="nickName" placeholder="请设置新昵称" placeholder-class="input-empty" maxlength="20"
minlength="6" />
</view>
</view>
<button class="confirm-btn" @click="updatNickName">修改昵称</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
nickName: '',
oldnickName: ''
}
},
onLoad() {
this.oldnickName = this.$queue.getData('userName');
},
methods: {
updatNickName() {
var patrn = /[`~!@#$%^&*()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘',。、 ]/im;
if (patrn.test(this.nickName)) { // 如果包含特殊字符返回false
this.$queue.showToast('包含特殊字符,请重新输入');
return;
}
uni.showLoading({
title: '提交中...'
});
let userId = this.$queue.getData('userId');
let data = {
userName:this.nickName
}
this.$Request.postT('/app/user/updateUserName',data).then(res => {
uni.hideLoading();
if (res.code === 0) {
this.$queue.showToast("更新成功");
setTimeout(() => {
uni.navigateBack();
}, 500);
}
});
},
},
}
</script>
<style lang='scss'>
page {
background: #fff;
}
.send-msg {
border-radius: 30px;
color: white;
height: 30px;
font-size: 14px;
line-height: 30px;
background: #e10a07;
}
.container {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.wrapper {
position: relative;
z-index: 90;
background: #fff;
padding-bottom: 20px;
}
.right-top-sign {
position: absolute;
top: 40px;
right: -15px;
z-index: 95;
&:before,
&:after {
display: block;
content: "";
width: 20px;
height: 40px;
background: -moz-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -webkit-gradient(linear,
left top,
left right,
color-stop(0, #fa4dbe),
color-stop(100%, #fbaa58));
background: -webkit-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -o-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -ms-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: linear-gradient(to left, #fa4dbe 0, #fbaa58 100%);
}
&:before {
transform: rotate(50deg);
border-radius: 0 50px 0 0;
}
&:after {
position: absolute;
right: -198px;
top: 0;
transform: rotate(-50deg);
border-radius: 50px 0 0 0;
/* background: pink; */
}
}
.left-bottom-sign {
position: absolute;
left: -270px;
bottom: -320px;
/*border: 100upx solid #d0d1fd;*/
border-radius: 50%;
padding: 90px;
}
.welcome {
position: relative;
left: 30px;
top: -55px;
font-size: 28px;
color: #555;
text-shadow: 1px 0px 1px rgba(0, 0, 0, .3);
}
.input-content {
padding: 0 20px;
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 40px;
background: #FF7F00;
color: #fff;
&:after {
border-radius: 60px;
}
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 40px;
background: whitesmoke;
color: grey;
&:after {
border-radius: 60px;
}
}
.forget-section {
text-align: center;
margin-top: 40px;
}
.register-section {
position: fixed;
left: 0;
bottom: 30px;
width: 100%;
text-align: center;
text {
margin-left: 10px;
}
}
</style>