首次提交

This commit is contained in:
duan
2024-06-06 11:50:53 +08:00
parent cab4751927
commit 544c3b65b2
344 changed files with 72919 additions and 1 deletions

323
my/address/add.vue Normal file
View File

@@ -0,0 +1,323 @@
<template>
<view class="" v-if="XCXIsSelect=='是'">
<form>
<view class="cu-form-group">
<view class="title">联系人</view>
<input placeholder="请输入联系人" name="input" v-model="form.userName"></input>
</view>
<view class="cu-form-group">
<view class="title">联系电话</view>
<input placeholder="请输入联系电话" name="input" v-model="form.userPhone" maxlength="11"></input>
</view>
<view class="cu-form-group" @click="pickerShow">
<view class="title">所在地区</view>
<input placeholder="请选择地区" name="input" disabled v-model="form.address"></input>
<text class='cuIcon-locationfill text-orange'></text>
</view>
<view class="cu-form-group">
<view class="title">详细地址</view>
<input placeholder="请输入详细地址" name="input" v-model="form.addressDetail"></input>
</view>
<view class="cu-form-group">
<view class="title">设为默认</view>
<switch @change="SwitchA" :class="form.addressDefault?'checked':''"
:checked="form.addressDefault?true:false"></switch>
</view>
</form>
<view class="btn" v-if="!id">
<view class="address_push" @click="submit">保存</view>
</view>
<view class="btn" v-if="id">
<view class="address_push" @click="updata">修改</view>
</view>
</view>
<view v-else>
<view style="font-size: 28upx;" v-html="content"></view>
</view>
</template>
<script>
import {
requestAndroidPermission,
gotoAppPermissionSetting
} from '@/components/permission.js'
export default {
data() {
return {
form: {
addressId: '',
userName: '',
userPhone: '',
address: '',
addressDetail: '',
addressDefault: 0, //默认地址 0不默认 1默认
lng: '',
lat: ''
},
// switchA: false,
region: '',
id: '',
latitude: '',
longitude: '',
XCXIsSelect: '是',
content: ''
}
},
onLoad(option) {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是';
if (this.XCXIsSelect == '否') {
this.getGuize()
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '添加地址'
});
}
this.id = option.id
if (option.id) {
this.getAddressDet(option.id)
uni.setNavigationBarTitle({
title: "修改地址"
})
}
},
methods: {
getGuize() {
this.$Request.getT('/app/common/type/237').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
},
pickerShow() {
let that = this
// An highlighted block
uni.chooseLocation({
success: function(res) {
console.log(res)
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
let latitude = res.latitude; //纬度
let longitude = res.longitude; //经度
that.form.lng = longitude
that.form.lat = latitude
that.form.addressDetail = res.name
let data = {
lat: latitude,
lng: longitude
}
that.$Request.get("/app/address/selectCity", data).then(res => {
if (res.code == 0) {
that.form.province = res.data.province
that.form.city = res.data.city
that.form.district = res.data.district
that.form.address = res.data.province + res.data.city + res.data
.district
}
});
},fail(e) {
console.log(e)
uni.showModal({
title: '温馨提示',
content: '您的定位权限未开启,请开启后再来刷新操作吧!',
showCancel: true,
cancelText: '取消',
confirmText: '确认',
success: res => {
if(res.confirm){
// #ifdef MP-WEIXIN
uni.openSetting({ // 打开设置页
success(rea) {
console.log(rea.authSetting)
}
});
// #endif
// #ifdef APP-PLUS
gotoAppPermissionSetting()
// #endif
}
}
});
}
});
},
SwitchA(e) {
console.log(e.detail.value)
this.form.addressDefault = e.detail.value
},
// 选择地区回调
regionConfirm(e) {
console.log(e)
this.form.province = e.province.label
this.form.city = e.city.label
this.form.area = e.area.label
this.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
console.log(this.region)
},
// 提交
submit() {
if (!this.form.userName) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (!this.form.userPhone) {
uni.showToast({
title: '请输入联系电话',
icon: 'none'
})
return
}
if (this.form.userPhone.length<=10) {
uni.showToast({
title: '请输入正确联系电话',
icon: 'none'
})
return
}
if (!this.form.address) {
uni.showToast({
title: '请选择所在地区',
icon: 'none'
})
return
}
if (!this.form.addressDetail) {
uni.showToast({
title: '请输入详细地址',
icon: 'none'
})
return
}
this.form.addressDefault = this.form.addressDefault ? 1 : 0
this.$Request.postJson("/app/address/insertAddress", this.form).then(res => {
if (res.code == 0) {
uni.showToast({
title: '保存成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
}
});
},
// 修改
updata() {
if (!this.form.userName) {
uni.showToast({
title: '请输入姓名',
icon: 'none'
})
return
}
if (!this.form.userPhone) {
uni.showToast({
title: '请输入联系电话',
icon: 'none'
})
return
}
if (!this.form.address) {
uni.showToast({
title: '请选择所在地区',
icon: 'none'
})
return
}
if (!this.form.addressDetail) {
uni.showToast({
title: '请输入详细地址',
icon: 'none'
})
return
}
let data = {
addressId: this.form.addressId,
userName: this.form.userName,
userPhone: this.form.userPhone,
province: this.form.province,
city: this.form.city,
district: this.form.district,
address: this.form.address,
addressDetail: this.form.addressDetail,
addressDefault: this.form.addressDefault ? 1 : 0,
lng: this.form.lng,
lat: this.form.lat,
}
this.$Request.postJson("/app/address/updateAddress", data).then(res => {
if (res.code == 0) {
uni.showToast({
title: '修改成功',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1500)
}
});
},
// 根据id获取地址详情
getAddressDet(e) {
this.$Request.get("/app/address/selectAddressById?addressId=" + e).then(res => {
if (res.code == 0) {
this.form.addressId = res.data.addressId
this.form.userName = res.data.userName
this.form.userPhone = res.data.userPhone
this.form.address = res.data.province + res.data.city + res.data.district
this.form.addressDetail = res.data.addressDetail
this.form.lng = res.data.lng
this.form.lat = res.data.lat
this.form.addressDefault = res.data.addressDefault
that.form.province = res.data.province
that.form.city = res.data.v
that.form.district = res.data.district
}
});
}
}
}
</script>
<style>
page {
background-color: #fff !important;
}
/* 添加收货地址 */
.btn {
/* position: fixed;
bottom: 0rpx; */
width: 100%;
height: 100rpx;
line-height: 100rpx;
background-color: white;
margin-top: 30rpx;
}
.address_push {
width: 90%;
height: 80rpx;
margin: 0 auto;
background: #FCD202;
border-radius: 20rpx;
color: white;
text-align: center;
line-height: 80rpx;
font-size: 35rpx;
}
</style>

335
my/address/index.vue Normal file
View File

@@ -0,0 +1,335 @@
<template>
<view class="address" v-if="XCXIsSelect=='是'">
<view class="bg-white radius margin-sm" v-for="(item, index) in list" :key="index">
<view class="content_top" @click="goBack(item)">
<view class="content_part1">
<view class="content_name">{{item.userName}}</view>
<view class="content_number">
{{item.userPhone}}
</view>
<view class="content_btn" v-if="item.addressDefault">默认</view>
</view>
<view class="content_part2">
{{item.province}}{{item.city}}{{item.district}}{{item.addressDetail}}
</view>
</view>
<!-- 线条 -->
<!-- <u-line color="#c1c1c1" border-style="solid" direction="row"></u-line> -->
<view class="content_bottom">
<view class="bottom_right">
<view class="write" @click.stop="update(item)">
<image src="../static/address/write.png"></image>
</view>
<view class="dete" @click.stop="del(item)">
<image src="../static/address/dete.png"></image>
</view>
</view>
</view>
</view>
<empty v-if="list.length == 0"></empty>
<view style="height: 100rpx;"></view>
<!-- 添加收货地址 -->
<view class="btn">
<view class="address_push" @click="addAddress">添加收货地址</view>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
list: [],
checked: false,
page: 1,
limit: 10,
add: 0,
addressType: '',
totalCount: 0,
XCXIsSelect: '是',
}
},
onLoad(option) {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是';
if (this.XCXIsSelect == '否') {
this.getGuize()
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '地址管理'
});
}
this.add = option.add ? option.add : 0
if (option.addressType) {
this.addressType = option.addressType
}
},
onShow() {
this.page = 1
this.getAddressList()
},
methods: {
bindOrdersure() {
uni.navigateTo({
url: '/pages/order_sure/order_sure'
})
},
// 添加地址
addAddress() {
uni.navigateTo({
url: '/my/address/add?page=2'
})
},
// 获取地址列表
getAddressList() {
let data = {
page: this.page,
limit: this.limit
}
this.$Request.get("/app/address/selectAddressList", data).then(res => {
if (res.code == 0) {
this.totalCount = res.data.totalCount
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = [...this.list, ...res.data.list]
}
}
uni.stopPullDownRefresh();
uni.hideLoading();
});
},
// 设为默认地址
checkboxChange(e) {
console.log(e)
// this.list.forEach(res => {
// if (res.addressId == e.addressId) {
let data = {
addressId: e.addressId,
userName: e.userName,
userPhone: e.userPhone,
address: e.address,
addressDetail: e.addressDetail,
addressDefault: e.addressDefault ? 0 : 1
}
this.$Request.postJson("/app/address/updateAddress", data).then(res => {
if (res.code == 0) {
this.getAddressList()
}
});
// } else {
// res.addressDefault = 0
// }
// })
},
// 跳转修改
update(e) {
uni.navigateTo({
url: '/my/address/add?id=' + e.addressId
})
},
// 删除地址
del(e) {
let that = this
uni.showModal({
title: '提示',
content: '确认删除吗',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
that.$Request.post("/app/address/deleteAddress", {
addressId: e.addressId
}).then(res => {
if (res.code == 0) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
that.page = 1
that.getAddressList()
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
// 点击地址返回上一页
goBack(e) {
console.log(e)
if (this.add) {
let pages = getCurrentPages();
let prevPage = pages[pages.length - 2];
// 修改上一页面的addressId
// #ifdef MP-WEIXIN
prevPage.$vm._data.addressId = e.addressId
prevPage.$vm._data.addressType = this.addressType
uni.navigateBack()
// #endif
// #ifdef H5
prevPage._data.addressId = e.addressId
prevPage._data.addressType = this.addressType
uni.navigateBack()
// #endif
// #ifdef APP-PLUS
uni.setStorageSync('addressId',e.addressId)
uni.setStorageSync('addressType',this.addressType)
setTimeout(function(){
uni.navigateBack()
},10)
// #endif
}
}
},
onReachBottom: function() {
if(this.list.length<this.totalCount) {
this.page = this.page + 1;
this.getAddressList()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.getAddressList();
},
}
</script>
<style>
body {
background-color: #eeeeee;
background-size: cover;
box-sizing: border-box;
}
.address {
width: 100%;
}
.address_content {
width: 100%;
background: #FFFFFF;
margin-top: 20rpx;
}
.content_top {
width: 90%;
margin: 0 auto;
}
.content_part1 {
font-size: 32rpx;
color: #333333;
display: flex;
align-items: center;
padding-top: 30rpx;
}
.content_name {
font-size: 36rpx;
font-weight: bold;
}
.content_number {
margin-left: 20rpx;
}
.content_btn {
padding: 4rpx 10rpx;
border-radius: 10rpx;
border: 1rpx solid #FCD202;
color: #FCD202;
margin-left: 20rpx;
font-size: 22rpx;
text-align: center;
}
.content_part2 {
color: #999999;
font-size: 28rpx;
margin-top: 20rpx;
margin-bottom: 30rpx;
}
.content_bottom {
display: flex;
width: 90%;
margin: 0 auto;
height: 60rpx;
}
.bottom_left {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
}
.bottom_right {
flex: 1;
position: relative;
display: flex;
justify-content: center;
align-items: center;
}
.write image {
width: 35rpx;
height: 35rpx;
}
.dete image {
width: 35rpx;
height: 35rpx;
}
.write {
position: absolute;
right: 75rpx;
}
.dete {
position: absolute;
right: 0rpx;
}
/* 添加收货地址 */
.btn {
position: fixed;
bottom: 0rpx;
width: 100%;
height: 100rpx;
line-height: 100rpx;
background-color: white;
padding-top: 10rpx;
}
.address_push {
width: 90%;
height: 80rpx;
margin: 0 auto;
background: #FCD202;
border-radius: 20rpx;
color: white;
text-align: center;
line-height: 80rpx;
font-size: 35rpx;
}
</style>

704
my/apply/index.vue Normal file
View File

@@ -0,0 +1,704 @@
<template>
<view class="padding">
<view style="padding-bottom: 20upx;color: red;" v-if="auditReason && shop.status == 2">{{auditReason}}</view>
<view class="text-white padding bg radius">
<u-form :model="shop" label-position="top">
<u-form-item label="商铺主营类型">
<u-input v-model="shop.shopTypeName" placeholder="请输入商铺主营类型" disabled @click="show = true" />
</u-form-item>
<u-form-item label="商铺名称">
<u-input v-model="shop.name" placeholder="请填写 (必填)" />
</u-form-item>
<u-form-item label="省市区">
<u-input v-model="shop.address" disabled placeholder="请填写" @click="bindOpen" />
</u-form-item>
<u-form-item label="商铺详细地址">
<!-- <u-input v-model="shop.detailedAddress" placeholder="请填写" /> -->
<textarea v-model="shop.detailedAddress" placeholder-style="color: #aaaaaa;font-size: 28rpx;"
placeholder="请填写商铺详细地址" style="height: 120rpx;width: 100%;font-size: 28rpx;" />
</u-form-item>
</u-form>
</view>
<view class="text-white padding bg radius margin-top">
<u-form :model="shop" label-position="top">
<u-form-item label="联系人姓名">
<u-input v-model="shop.userName" placeholder="请输入真实姓名" />
</u-form-item>
<u-form-item label="身份证号">
<u-input v-model="shop.isNumber" maxlength="20" placeholder="请填写 (必填)" />
</u-form-item>
<u-form-item label="联系电话">
<u-input v-model="shop.phone" disabled type="number" placeholder="请填写 (必填)" />
</u-form-item>
<u-form-item label="验证码" v-if="shop.status == null||shop.status == 2">
<u-input v-model="shop.verCode" type="number" placeholder="请填写 (必填)"
style="width: 50%;display: inline-block;" />
<button class="send-msg" @click="sendMsg">{{sendTime}}</button>
</u-form-item>
</u-form>
</view>
<view class="text-white padding bg radius margin-tb">
<view>
<view class="text-lg margin-top-sm text-black">店铺logo</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view v-if="detailsImg.length">
<view class="margin-top flex margin-right-sm flex-wrap">
<view class="flex"
style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;">
<image :src="detailsImg" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="removeImg(1)">
<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
</view>
</view>
</view>
</view>
<view class="margin-top" @click="addImages(2)" v-if="detailsImg.length<=0">
<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center">
<view>
<view class="text-center">
<image src="../static/apply/addimg.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center text-black">添加图片</view>
</view>
</view>
</view>
</view>
</view>
<view>
<view class="text-lg margin-top-sm text-black">营业执照</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view v-if="shop.business.length">
<view class="margin-top flex margin-right-sm flex-wrap">
<view class="flex"
style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;">
<image :src="shop.business" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="removeImgs(1)">
<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
</view>
</view>
</view>
</view>
<view class="margin-top" @click="addImage(1)" v-if="shop.business.length<=0">
<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center">
<view>
<view class="text-center">
<image src="../static/apply/addimg.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center text-black">添加图片</view>
</view>
</view>
</view>
</view>
</view>
<view>
<view class="text-lg margin-top-sm text-black">身份证正面</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view v-if="shop.front.length">
<view class="margin-top flex margin-right-sm flex-wrap">
<view class="flex"
style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;">
<image :src="shop.front" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="removeImgs(2)">
<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
</view>
</view>
</view>
</view>
<view class="margin-top" @click="addImage(2)" v-if="shop.front.length<=0">
<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center">
<view>
<view class="text-center">
<image src="../static/apply/addimg.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center text-black">添加图片</view>
</view>
</view>
</view>
</view>
</view>
<view>
<view class="text-lg margin-top-sm text-black">身份证反面片</view>
<view class="flex" style="overflow: hidden;flex-wrap: wrap;">
<view v-if="shop.back.length">
<view class="margin-top flex margin-right-sm flex-wrap">
<view class="flex"
style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;">
<image :src="shop.back" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="removeImgs(3)">
<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
</view>
</view>
</view>
</view>
<view class="margin-top" @click="addImage(3)" v-if="shop.back.length<=0">
<view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center">
<view>
<view class="text-center">
<image src="../static/apply/addimg.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center text-black">添加图片</view>
</view>
</view>
</view>
</view>
</view>
</view>
<u-button v-if="shop.status == null || shop.status == 2" @click="submit" class="margin-top"
:custom-style="customStyle" shape="square" :hair-line="false">提交审核
</u-button>
<u-button v-if="shop.status == 0" class="margin-top" disabled :custom-style="customStyle" shape="square"
:hair-line="false">审核中
</u-button>
<!-- 分类列表 -->
<u-select v-model="show" :list="shopList" valueName='id' labelName="shopTypeName" @confirm="confirm"></u-select>
</view>
</template>
<script>
import configdata from '@/common/config.js';
export default {
data() {
return {
shop: {
type: '',
typeid: '',
name: '',
address: '',
shopTypeName: '',
detailedAddress: '',
userName: '',
isNumber: '',
phone: '',
verCode: '',
latitude: '',
longitude: '',
//详情图
detailsImg: [],
business: '',
front: '',
back: ""
},
customStyle: {
backgroundColor: '#FFCC00',
color: '#000000',
border: 0
},
status: 1,
//详情图
detailsImg: [],
shopId: '',
page: 1,
limit: 100,
show: false,
shopList: [],
city: '',
province: '',
district: '',
auditReason: '',
Settedlist: [],
sending: false,
sendTime: '获取验证码',
count: 60,
XCXIsSelect: '是',
}
},
onLoad(option) {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if (this.XCXIsSelect == '否') {
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '商家入驻'
});
}
// uni.getLocation({
// type: 'gcj02',
// success: (res) => {
// console.log(res.latitude);
// console.log(res.longitude);
// console.log("res___:" + JSON.stringify(res));
// },
// fail(e) {
// console.log(e);
// }
// });
// this.Settedlist = uni.getStorageSync("Settedlist")
// if(this.Settedlist){
// this.auditReason = this.Settedlist.auditReason
// this.shop.name = this.Settedlist.shopName
// this.shop.typeid = this.Settedlist.shopTypeId
// this.shop.shopTypeName = this.Settedlist.shopTypeName
// this.shop.address = this.Settedlist.province + this.Settedlist.city + this.Settedlist.district
// this.shop.detailedAddress = this.Settedlist.detailedAddress
// this.shop.latitude = this.Settedlist.shopLat
// this.shop.longitude = this.Settedlist.shopLng
// this.province = this.Settedlist.province
// this.city = this.Settedlist.city
// this.district = this.Settedlist.district
// this.shop.userName =this.Settedlist.realName
// this.shop.isNumber = this.Settedlist.identitycardNumber
// this.shop.phone = this.Settedlist.phone
// this.shop.business = this.Settedlist.businessLicense
// this.shop.front = this.Settedlist.identitycardPro
// this.shop.back = this.Settedlist.identitycardCon
// this.shop.detailsImg = this.Settedlist.shopCover
// this.detailsImg = this.Settedlist.shopCover.split(',')
// }else{
this.getShopList()
// }
this.getData()
},
onShow() {
this.shop.phone = this.$queue.getData("phone");
},
onHide() {
},
methods: {
getData() {
this.$Request.get("/app/shop/selectShopByUserId").then(res => {
if (res.code == 0 && res.data) {
this.auditReason = res.data.auditReason
this.shop.shopTypeName = res.data.shopTypeName
this.shop.name = res.data.shopName
this.shop.address = res.data.province + res.data.city + res.data.district
this.shop.detailedAddress = res.data.detailedAddress
this.shop.userName = res.data.realName
this.shop.isNumber = res.data.identitycardNumber
this.shop.phone = res.data.phone
this.shop.detailsImg = res.data.shopCover //商铺图片
this.detailsImg = res.data.shopCover.split(',')
this.shop.business = res.data.businessLicense //营业执照
this.shop.front = res.data.identitycardPro //身份证正面
this.shop.back = res.data.identitycardCon //身份证反面
this.shop.latitude = res.data.shopLat
this.shop.longitude = res.data.shopLng
this.province = res.data.province
this.city = res.data.city
this.district = res.data.district
this.shop.status = res.data.status
}
});
},
confirm(e) {
console.log(e)
this.shop.shopTypeName = e[0].label
this.shop.typeid = e[0].value
},
// 店铺列表
getShopList() {
let data = {
page: this.page,
limit: this.limit,
}
this.$Request.get("/app/shoptype/selectShopTypeList", data).then(res => {
if (res.code == 0) {
this.shopList = res.data.list
}
});
},
// 详情图删除
removeImg(index) {
this.detailsImg = ''
},
// 身份证 资格证删除
removeImgs(index) {
if (index == 1) {
this.shop.business = ''
} else if (index == 2) {
this.shop.front = ''
} else if (index == 3) {
this.shop.back = ''
}
},
bindOpen() {
const that = this;
uni.chooseLocation({
success: function(res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
that.shop.detailedAddress = res.address
that.shop.latitude = res.latitude
that.shop.longitude = res.longitude
that.getcity(res.latitude, res.longitude)
}
});
},
getcity(latitude, longitude) {
let data = {
lat: latitude,
lng: longitude,
}
this.$Request.get("/app/address/selectCity", data).then(res => {
if (res.code == 0) {
this.city = res.data.city
this.province = res.data.province
this.district = res.data.district
this.shop.address = res.data.province + res.data.city + res.data.district
}
});
},
// 图片上传
addImages(e) {
let that = this
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < res.tempFilePaths.length; i++) {
that.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
// url: 'https://jiazheng.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
// if (that.detailsImg.length < 6) {
that.detailsImg = JSON.parse(uploadFileRes.data).data
// }
console.log(that.detailsImg)
uni.hideLoading();
}
});
}
}
})
},
// 图片上传
addImage(e) {
let that = this
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < res.tempFilePaths.length; i++) {
that.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
// url: 'https://jiazheng.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
if (e == 1) {
that.shop.business = JSON.parse(uploadFileRes.data).data
} else if (e == 2) {
that.shop.front = JSON.parse(uploadFileRes.data).data
} else if (e == 3) {
that.shop.back = JSON.parse(uploadFileRes.data).data
}
console.log(that.detailsImg)
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;
},
// 发布
submit() {
console.log(this.detailsImg)
this.shop.detailsImg = this.detailsImg
this.shop.detailsImg = this.shop.detailsImg.toString();
if (!this.shop.shopTypeName) {
uni.showToast({
title: '请填写商铺主营类型',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.name) {
uni.showToast({
title: '请填写商铺名称',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.address) {
uni.showToast({
title: '请填写商铺地址',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.detailedAddress) {
uni.showToast({
title: '请填写店铺详细地址',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.userName) {
uni.showToast({
title: '请填写真实姓名',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.isNumber) {
uni.showToast({
title: '请填写身份证号',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.phone) {
uni.showToast({
title: '请填写联系电话',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.verCode) {
uni.showToast({
title: '请填写验证码',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.detailsImg) {
uni.showToast({
title: '请上传商铺图片',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.business) {
uni.showToast({
title: '请上传营业执照',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.front) {
uni.showToast({
title: '请上传身份证正面',
icon: 'none',
duration: 1000
})
return
}
if (!this.shop.back) {
uni.showToast({
title: '请上传身份证反面',
icon: 'none',
duration: 1000
})
return
}
let data = {
shopName: this.shop.name,
shopTypeId: this.shop.typeid,
shopTypeName: this.shop.shopTypeName,
detailedAddress: this.shop.address,
detailedAddress: this.shop.detailedAddress,
shopLat: this.shop.latitude,
shopLng: this.shop.longitude,
province: this.province,
city: this.city,
district: this.district,
realName: this.shop.userName,
identitycardNumber: this.shop.isNumber,
phone: this.shop.phone,
code: this.shop.verCode,
businessLicense: this.shop.business,
identitycardPro: this.shop.front,
identitycardCon: this.shop.back,
shopCover: this.shop.detailsImg
}
// uni.setStorageSync('updataShopId', this.shop.shopId)
this.$Request.postJson("/app/shop/insertShopAuthentication", data).then(res => {
if (res.code == 0) {
uni.showToast({
title: '提交成功,等待审核通过',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
sendMsg() {
// const {
// phone
// } = this.shop;
if (this.sendTime != '获取验证码') {
return;
}
console.log('this.shop.phone', this.shop.phone)
if (!this.shop.phone) {
this.$queue.showToast("请输入手机号");
} else if (this.shop.phone.length !== 11) {
this.$queue.showToast("请输入正确的手机号");
} else {
this.$queue.showLoading("正在发送验证码...");
this.$Request.getT("/app/shop/sendMsgs/" + this.shop.phone + "/enter").then(res => {
if (res.code === 0) {
this.sending = true;
this.$queue.showToast('验证码发送成功请注意查收');
this.countDown();
uni.hideLoading();
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '短信发送失败',
content: res.msg ? res.msg : '请一分钟后再获取验证码'
});
}
});
}
},
countDown() {
const {
count
} = this;
if (count === 1) {
this.count = 60;
this.sending = false;
this.sendTime = '获取验证码'
} else {
this.count = count - 1;
this.sending = true;
this.sendTime = count - 1 + '秒后重新获取';
setTimeout(this.countDown.bind(this), 1000);
}
},
},
}
</script>
<style>
page {
background-color: #F5F5F5;
}
.bg {
background-color: #FFFFFF;
}
textarea::-webkit-input-placeholder {
color: #303133;
font-size: 20rpx;
}
textarea:-moz-placeholder {
color: #303133;
font-size: 20rpx;
}
textarea::-moz-placeholder {
color: #303133;
font-size: 20rpx;
}
textarea::-ms-input-placeholder {
color: #303133;
font-size: 20rpx;
}
.tabBox {
border: 1rpx solid #999999;
padding: 15rpx 20rpx;
border-radius: 15rpx;
font-size: 28rpx;
}
.btnnum {
color: #005DFF;
border: 1rpx solid #005DFF;
}
.send-msg {
border-radius: 30px;
color: #FFFFFF;
/*#FCD202 */
background: #FCD202;
height: 60rpx;
font-size: 28rpx;
line-height: 60rpx;
display: inline-block;
width: 45%;
margin-left: 4%;
position: relative;
top: 20rpx;
}
</style>

168
my/chat/index.vue Normal file
View File

@@ -0,0 +1,168 @@
<template>
<view class="">
<view v-if="chatList.length" class="content ">
<!-- {{userId == item.userId,userId,item.userId}} -->
<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: 50%;">{{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.userUnread"
style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
{{item.userUnread}}
</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: 50%;">{{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.userUnread"
style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
{{item.userUnread}}
</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: [],
time: '',
count: 0,
messageCount: 0
}
},
onLoad() {
this.getChatList()
let that = this
if (that.userId) {
that.time = setInterval(function() {
that.getChatList()
// that.getMsgList()
that.$nextTick(function() {
that.messageCount = uni.getStorageSync('messageCount')
})
}, 3000)
} else {
that.chatList = []
that.msgList = []
}
},
onShow() {
let that = this
that.userId = uni.getStorageSync('userId')
if (that.userId) {
that.page = 1;
// that.chatList = []
that.msgList = []
that.getChatList();
} else {
that.chatList = []
that.msgList = []
}
},
onHide() {
clearInterval(this.time)
},
methods: {
getChatList() {
this.$Request.get("/app/ordersChat/selectOrdersChatPageUser", {
page: this.page,
limit: this.limit,
}).then(res => {
if (res.code == 0) {
if (this.page == 1) {
this.chatList = [];
}
res.data.list.forEach(d => {
this.chatList.push(d);
});
this.count = res.data.totalCount;
// this.chatList = res.data.list
}
});
},
// getMsgList() {
// this.$Request.get("/app/message/selectMessageByUserIdLimit1").then(res => {
// if (res.code == 0) {
// this.msgList = 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/index/shop/im?ordersId=' + e.ordersId
})
// uni.navigateTo({
// url: '/pages/msg/im?chatConversationId=' + e.chatConversationId + '&byUserId=' + userId
// })
},
goMsg() {
uni.navigateTo({
url: '/pages/msg/message'
})
}
},
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>

514
my/check/index.vue Normal file
View File

@@ -0,0 +1,514 @@
<template>
<view class="">
<!-- <view class="text-center text-white bg-red">18岁以上方可认证使用</view> -->
<view class="margin padding-lr bg-white" style="border-radius: 16rpx;">
<view class="flex justify-between align-center" style="border-bottom: 2rpx solid #e6e6e6;color: #1a1a1a;">
<view class="padding-tb text-lg text-bold ">申请信息</view>
<view class="text-df" style="color: #666666;">18岁以上方可认证使用</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">你的生日</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">2020年4月2日</view> -->
<input @click="isShow" v-model="birthday" class="margin-right-xs" disabled placeholder="请填写你的生日"
style="text-align: right;" type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">你的性别</view>
<view class="flex align-center">
<u-radio-group v-model="sex">
<u-radio v-for="(item,index) in gender" :key='index' :name="item.name">{{item.name}}</u-radio>
</u-radio-group>
</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">你的身高(CM)</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">170cm</view> -->
<input class="margin-right-xs" v-model="height" placeholder="请填写你的身高" style="text-align: right;"
type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">你的体重(KG)</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">50kg</view> -->
<input class="margin-right-xs" v-model="weight" placeholder="请填写你的体重" style="text-align: right;"
type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">你的职业</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">设计</view> -->
<input class="margin-right-xs" v-model="occupation" placeholder="请填写你的职业" style="text-align: right;"
type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
</view>
<view class="margin padding bg-white" style="border-radius: 16rpx;">
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">真实姓名</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">设计</view> -->
<input class="margin-right-xs" v-model="realName" placeholder="请填写你的真实姓名" style="text-align: right;"
type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
<view class="flex align-center padding-tb">
<view class="flex-sub text-df text-bold" style="color: #1a1a1a;">身份证号 <text class="text-red"> *</text>
</view>
<view class="flex align-center">
<!-- <view class="margin-right-xs text-gray">设计</view> -->
<input class="margin-right-xs" v-model="identityCardNum" placeholder="请填写你的身份证号"
style="text-align: right;" type="text">
<!-- <image src="../../static/images/orderReceiving/right.png" style="width: 16rpx;height: 26rpx;"></image> -->
</view>
</view>
<view class="text-lg text-bold text-black margin-bottom-sm">上传身份证正面</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="addIDCard(1)" v-if="!identityCardFront">
<image src="../../static/images/index/add.png" mode="widthFix" style="width: 73rpx;"></image>
<view class="text-sm text-gray margin-top-sm">添加身份证正面</view>
</view>
<image @click="addIDCard(1)" v-else :src="identityCardFront" style="width: 100%;height: 320rpx;">
</image>
</view>
<view class="text-lg text-bold text-black margin-tb-sm">上传身份证反面</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="addIDCard(2)" v-if="!identityCardRear">
<image src="../../static/images/index/add.png" mode="widthFix" style="width: 73rpx;"></image>
<view class="text-sm text-gray margin-top-sm">添加身份证反面</view>
</view>
<image @click="addIDCard(2)" v-else :src="identityCardRear" style="width: 100%;height: 320rpx;"></image>
</view>
</view>
<view class="margin padding bg-white" style="border-radius: 16rpx;">
<view class="text-lg text-bold text-black margin-bottom-sm">个人简介</view>
<textarea class="radius" v-model="individualResume"
style=" width: 100%; height: 150rpx;background: #f5f5f5;padding: 15rpx;"
placeholder="请输入个人简介"></textarea>
<view class="text-lg text-bold text-black margin-tb-sm">图片上传</view>
<view class="flex flex-wrap">
<view class="flex " v-if="infantImgs.length"
style="width: 200rpx;height: 200rpx;margin-right: 10rpx;position: relative;margin-bottom: 10rpx;"
v-for="(image,index) in infantImgs" :key="index">
<image :src="image" class="radius" style="width: 100%;height: 100%;" @click="previewImg(index)">
</image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="infantImgremove(index)">
<u-icon name="close-circle-fill" color="red" size="50rpx"></u-icon>
</view>
</view>
<view v-if="infantImgs.length<9" style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center radius" @click="addImages()">
<view>
<view class="text-center">
<image src="../../static/images/index/add.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center">添加图片</view>
</view>
</view>
</view>
<view class="text-lg text-bold text-black margin-tb-sm">视频上传</view>
<view>
<view v-if="!video" style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
class="flex justify-center align-center radius" @click="addVideo()">
<view>
<view class="text-center">
<image src="../../static/images/index/add.png" style="width: 65rpx;height: 55rpx;">
</image>
</view>
<view class="text-center">添加视频</view>
</view>
</view>
<view class="flex " v-if="video" style="width: 100%;position: relative;">
<video :src="video" controls></video>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;" @click="removeVidoe()">
<u-icon name="close-circle-fill" color="red" size="50rpx"></u-icon>
</view>
</view>
</view>
<!-- </view> -->
</view>
<view class="margin">
<view class="text-center text-lg radius text-bold"
style="width: 100%;height: 78rpx;line-height: 78rpx;background: #7E59FF;color: #FFF;"
@click="fabuBtn()">
{{btnName}}
</view>
</view>
<u-picker @confirm="timeAction" v-model="show" :params="params" mode="time"></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
action: 'https://newxxpw.xianmxkj.com/sqx_fast/alioss/upload',
fileList: [],
show: false,
params: {
year: true,
month: true,
day: true,
},
birthday: '', //生日
height: '', //身高
weight: '', //体重
occupation: '', //职业
individualResume: '', //简介
pictureList: [],
realName: '', //姓名
identityCardNum: '', //身份证号
identityCardFront: '', //身份证正面
identityCardRear: '', //身份证反面
gender: [{
name: '男',
checked: true
},
{
name: '女',
checked: false
},
],
sex: '男',
userId: '',
btnName: '提交申请',
video: "",
isFinish: false,
infantImgs: [],
}
},
onLoad(option) {
this.userId = option.userId ? option.userId : ''
if (this.userId) {
// this.getUserInfo()
}
uni.setNavigationBarTitle({
title: "修改个人信息"
})
this.btnName = '提交修改'
this.getPWInfo()
},
methods: {
// 上传视频
addVideo() {
uni.chooseVideo({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
this.$queue.showLoading("上传中...");
console.log(res.tempFilePath)
uni.uploadFile({ // 上传接口
// url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
url: 'https://newxxpw.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePath,
name: 'file',
timeout: '30000',
success: (uploadFileRes) => {
// console.log(JSON.parse(uploadFileRes.data))
this.video = JSON.parse(uploadFileRes.data).data
console.log(this.video)
uni.hideLoading();
}
});
}
})
},
// 删除视频
removeVidoe() {
this.video = ''
},
addIDCard(e) {
uni.chooseImage({
count: 1,
sourceType: ['album', 'camera'],
success: res => {
for (let i = 0; i < 1; i++) {
this.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
// url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
url: 'https://newxxpw.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
if (e == 1) {
this.identityCardFront = JSON.parse(uploadFileRes.data)
.data
} else {
this.identityCardRear = JSON.parse(uploadFileRes.data).data
}
uni.hideLoading();
}
});
}
}
})
},
// 上传照片
addImages(e) {
uni.chooseImage({
count: 9,
sourceType: ['album', 'camera'],
success: res => {
console.log(res.tempFilePaths)
for (let i = 0; i < res.tempFilePaths.length; i++) {
this.$queue.showLoading("上传中...");
uni.uploadFile({ // 上传接口
// url: this.config("APIHOST1") + '/alioss/upload', //真实的接口地址
url: 'https://newxxpw.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
if (this.infantImgs.length < 9) {
this.infantImgs.push(JSON.parse(uploadFileRes.data).data)
}
uni.hideLoading();
}
});
}
}
})
},
// 删除照片
infantImgremove(index) {
this.infantImgs.splice(index, 1)
},
// 预览照片
previewImg(index) {
let _this = this;
uni.previewImage({
current: index,
urls: _this.infantImgs
});
},
getPWInfo() {
this.$Request.getT('/app/usermessage/findPwUserMessage').then(res => {
if (res.code == 0) {
// if (res.data.auditStatus == 0) {
this.birthday = res.data.birthday //生日
this.height = res.data.height //身高
this.weight = res.data.weight //体重
this.sex = res.data.sex == 1 ? '男' : '女'
this.occupation = res.data.occupation //职业
this.individualResume = res.data.individualResume //简介
this.realName = res.data.realName //姓名
this.identityCardNum = res.data.identityCardNum //身份证号
this.identityCardFront = res.data.identityCardFront //身份证正面
this.identityCardRear = res.data.identityCardRear //身份证反面
this.pictureList = res.data.pictureList.split(',')
this.video = res.data.video
this.infantImgs = [];
this.pictureList.forEach(res => {
this.infantImgs.push(res)
})
// }
}
})
},
getUserInfo() {
this.$Request.getT('/app/payorder/selectUserMessageById?userId=' + this.userId).then(res => {
if (res.code == 0) {
console.log(res.data)
this.birthday = res.data.birthday //生日
this.height = res.data.height //身高
this.weight = res.data.weight //体重
this.occupation = res.data.occupation //职业
this.individualResume = res.data.individualResume //简介
this.realName = res.data.realName //姓名
this.identityCardNum = res.data.identityCardNum //身份证号
this.identityCardFront = res.data.identityCardFront //身份证正面
this.identityCardRear = res.data.identityCardRear //身份证反面
this.sex = res.data.sex == 1 ? '男' : '女'
this.pictureList = res.data.pictureList.split(',')
this.video = res.data.video
this.infantImgs = [];
this.pictureList.forEach(res => {
this.infantImgs.push(res)
})
}
})
},
isShow() {
this.show = true
},
timeAction(e) {
console.log(e)
this.birthday = e.year + '-' + e.month + '-' + e.day
},
// 发布
fabuBtn() {
let that = this
if (!that.birthday) {
uni.showToast({
title: '请填写你的生日',
icon: 'none'
})
return
}
if (!that.height) {
uni.showToast({
title: '请填写你的身高',
icon: 'none'
})
return
}
if (!that.weight) {
uni.showToast({
title: '请填写你的体重',
icon: 'none'
})
return
}
if (!that.occupation) {
uni.showToast({
title: '请填写你的职业',
icon: 'none'
})
return
}
if (!that.realName) {
uni.showToast({
title: '请填写你的真实姓名',
icon: 'none'
})
return
}
if (!that.identityCardNum) {
uni.showToast({
title: '请填写你的身份证号',
icon: 'none'
})
return
}
if (!that.identityCardFront) {
uni.showToast({
title: '请上传你的身份证正面',
icon: 'none'
})
return
}
if (!that.identityCardRear) {
uni.showToast({
title: '请上传你的身份证反面',
icon: 'none'
})
return
}
console.log(that.infantImgs, 'lenght', that.infantImgs.length)
if (that.infantImgs.length < 9) {
uni.showToast({
title: '请上传9张你的照片',
icon: 'none'
})
return
}
if (!that.video) {
uni.showToast({
title: '请上传你的视频',
icon: 'none'
})
return
}
console.log(that.isFinish)
console.log(that.infantImgs)
// return
let data = {
birthday: that.birthday, //生日
sex: that.sex == '男' ? 1 : 2, //性别
height: that.height, //身高
weight: that.weight, //体重
occupation: that.occupation, //职业
individualResume: that.individualResume, //简介
pictureList: that.infantImgs.toString(),
realName: that.realName,
identityCardNum: that.identityCardNum,
identityCardFront: that.identityCardFront,
identityCardRear: that.identityCardRear,
video: that.video
}
if (that.userId) {
uni.showModal({
title: '提示',
content: '修改资料预计24小时后通过审核,审核期间将不能接单,是否继续?',
confirmText: '继续',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
that.$Request.postJson('/app/usermessage/updateUserMessage', data).then(
res => {
// console.log(that.res)
if (res.code == 0) {
uni.showToast({
title: '提交成功'
})
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index'
})
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
} else {
that.$Request.postJson('/app/usermessage/applyPw', data).then(res => {
console.log(that.res)
if (res.code == 0) {
uni.showToast({
title: '申请成功'
})
setTimeout(function() {
uni.switchTab({
url: '/pages/my/index'
})
}, 1000)
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
}
},
}
}
</script>
<style>
page {
/* background-color: #FFF; */
}
</style>

276
my/coupon/index.vue Normal file
View File

@@ -0,0 +1,276 @@
<template>
<view class="pages">
<!-- 切换选项 -->
<view class="nav">
<view @tap="change(0)" :class="{nav_btna:status == 0}">可使用</view>
<view @tap="change(1)" :class="{nav_btna:status == 1}">已使用</view>
<view @tap="change(2)" :class="{nav_btna:status == 2}">已失效</view>
</view>
<!-- 全部订单 -->
<view class="cont_one">
<view class="cont_one_ce" v-for="(item,index) in dataList" :key='index'>
<view class="cont_one_top">
<view class="cont_one_top_le flex align-center">
<image :src="item.shopId==0 || item.shopId==null?imgtype2:imgtype1" style="margin-right: 10rpx;width: 65rpx;height: 35rpx;border-radius: 8rpx;" mode=""></image>
{{item.couponName}}
</view>
<view class="cont_one_top_ri"><text></text>{{item.money}}</view>
</view>
<view class="cont_one_text" style="font-size: 28upx;">
<text>有效期至{{item.expirationTime}}</text>
<view v-if="item.minMoney" >{{item.minMoney}}元可用</view>
<view v-if="!item.minMoney" >无门槛优惠券</view>
</view>
<view class="cont_one_bottom">
<view class="cont_one_bottom_le" >
优惠券一张
</view>
<view class="cont_one_bottom_ri flex justify-center align-center" @click="use(item)" v-if="status == 0">立即使用</view>
</view>
<view class="cont_one_img" v-if="status == 1">
<image src="../static/coupon/has.png" mode=""></image>
</view>
<view class="cont_one_img" v-if="status == 2">
<image src="../static/coupon/failure.png" mode=""></image>
</view>
</view>
</view>
<empty v-if="!dataList.length" ></empty>
<u-popup v-model="popupShow" closeable mode="center" border-radius="20">
<view class="margin-tb text-center text-lg text-bold">使用规则</view>
<view class="padding-lr padding-bottom">
<view style="color: #333333;font-size: 28upx;width: 550rpx;height: 70vh;" v-html="content"></view>
</view>
</u-popup>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
imgtype1:'https://tcwm.xianmaxiong.com/file/uploadPath/2022/11/23/24b686b872b3001f0342eae67db6d482.png',
imgtype2:'https://tcwm.xianmaxiong.com/file/uploadPath/2022/11/23/7716e0595580f34c4778ce5626dae262.png',
btnnum: 0,
page: 1,
limit: 10,
status: 0, //0正常 1已使用 2已失效
dataList: [],
popupShow: false,
content: '',
totalCount: 0
};
},
onLoad() {
this.getData()
// this.getGuize()
},
methods: {
change(e) {
this.status = e
this.page = 1
this.dataList = []
this.getData()
},
getData() {
let data = {
status: this.status,
page: this.page,
limit: this.limit,
}
this.$Request.get("/app/coupon/CouponList", data).then(res => {
if (res.code == 0) {
this.totalCount = res.data.totalCount
if (this.page == 1) {
this.dataList = res.data.list
} else {
this.dataList = [...this.dataList, ...res.data.list]
}
}
});
},
//优惠卷兑换规则
getGuize() {
this.$Request.getT('/app/common/type/240').then(res => {
if (res.code == 0) {
this.content = res.data.value;
}
})
},
use(item) {
if(!item.shopId){
uni.switchTab({
url: '/pages/index/index'
})
}else{
uni.navigateTo({
url: '/pages/index/shop/index?shopId=' + item.shopId
});
}
}
},
onReachBottom: function() {
if(this.dataList.length<this.totalCount) {
this.page = this.page + 1;
this.getData()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
}
</script>
<style scoped>
/* 切换选项 */
.nav {
display: flex;
align-items: center;
justify-content: center;
background-color: #FFFFFF;
color: #999999;
}
.nav view {
flex-grow: 1;
margin: 3% 9% 2%;
text-align: center;
}
.nav_btna {
font-size: 38rpx;
line-height: 34rpx;
border-bottom: 14rpx solid #FCD202;
color: #000000;
font-weight: bold;
}
/* 内容 */
/* 全部订单 */
.cont_one {
/* display: none; */
width: 94%;
margin: 0 auto;
}
.cont_one_ce {
width: 100%;
padding: 3% 3% 2%;
margin: 3% 0 0;
background-color: #FFFFFF;
border-radius: 18rpx;
position: relative;
}
.cont_one_top {
display: flex;
width: 100%;
}
.cont_one_top_le {
flex: 2;
font-size: 35rpx;
font-weight: 800;
color: #000000;
line-height: 32rpx;
}
.cont_one_top_le2 {
flex: 2;
font-size: 35rpx;
font-weight: 800;
color: #999999;
line-height: 32rpx;
}
.cont_one_top_ri {
flex: 1;
font-size: 40rpx;
text-align: right;
font-family: DINPro;
font-weight: 500;
color: #FF130A;
line-height: 32rpx;
}
.cont_one_top_ri text {
font-size: 30rpx;
}
.cont_one_text {
font-size: 30rpx;
margin: 2% 0 1%;
font-weight: 400;
color: #999999;
display: flex;
justify-content: space-between;
}
.cont_one_bottom {
width: 100%;
padding: 3% 0 0;
margin-top: 3%;
display: flex;
border-top: 2rpx dotted #E6E6E6;
}
.cont_one_bottom_le {
width: 80%;
/* font-size: 30rpx; */
font-weight: 500;
color: #999999;
line-height: 2;
}
.cont_one_bottom_ri {
width: 20%;
text-align: center;
/* line-height: 2; */
background: rgba(255, 19, 10, 0.2);
font-size: 24rpx;
border: 2rpx solid #FF130A;
color: #FF130A;
opacity: 0.6;
border-radius: 50rpx;
}
/* 到店取餐 */
/* .cont_two {
display: none;width: 94%;margin: 0 auto;
}
.cont_two_ce{
width: 94%;padding: 3% 3% 2%; margin: 3% 0 0 ;background-color: #FFFFFF;
border-radius: 18rpx;
} */
.cont_one_img {}
.cont_one_img {
width: 120upx;
height: 117upx;
position: absolute;
top: 0;
left: 83%;
}
.cont_one_img image {
width: 120upx;
height: 117upx;
}
.cont {
display: none;
}
.cont_dis {
display: block;
}
</style>

77
my/helpList/helpDet.vue Normal file
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>

48
my/helpList/index.vue Normal file
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/images/index/right2.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: 1
}
this.$Request.getT("/app/userinfo/trainingCenterList",data).then(res => {
this.dataList = res.data.list
})
},
goDet(e) {
uni.navigateTo({
url: '/my/helpList/helpDet?id='+e.trainingId
})
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getDataList();
},
}
</script>
<style>
</style>

173
my/hongbao/hongbao.vue Normal file
View File

@@ -0,0 +1,173 @@
<template>
<view>
<view class="empty" v-if="moneylist == ''">
<view
style="display: block; width: 90%; margin: 0 auto; position: fixed;top: 35%;left: 0rpx;right: 0rpx;text-align: center;">
<image src="../../static/images/empty.png" style="width: 300rpx;height: 300rpx;"></image>
<view style="color: #CCCCCC;">暂无内容</view>
</view>
</view>
<view class="popup_money" v-else>
<view class="data_select">
<view class="money_box" v-for="(item,index) in moneylist" :key="index">
<view class="box_tit">
<view class="money_name">{{item.redPacketTitle}}</view>
<view class="money_price">{{item.redPacketAmount}}</view>
</view>
<view class="money_data">有效期至{{item.expirationTime}}</view>
<view class="money_line">
<u-line direction="row" color="#E6E6E6" border-style="dashed" />
</view>
<view class="box_bottom">
<view class="money_use">{{item.minimumAmount}}元可使用</view>
<!-- <view class="money_btn">
<view class="lj_use">
立即使用
</view>
</view> -->
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
moneylist: ''
}
},
onLoad() {
this.hongbao()
},
methods: {
//获取登录用户的所有红包
hongbao() {
this.$Request.getT('/app/tbindent/findAllRedPacket').then(res => {
console.log(res)
if (res.code === 0) {
this.moneylist = res.data
// console.log(this.hongbao)
}
});
}
},
}
</script>
<style>
body {
background-color: #F5F5F5;
}
/* #ifndef MP-WEIXIN */
page {
background: #F2EDED;
}
/* #endif */
.empty {
width: 100%;
background: #ffffff;
/* #ifdef MP-WEIXIN */
height: 93vh;
/* #endif */
/* #ifndef MP-WEIXIN */
height: 100vh;
/* #endif */
}
.popup_money {
height: 800upx;
width: 100%;
position: relative;
}
.u-drawer-bottom {
background-color: #FAF7F5 !important;
}
.money_box {
width: 93%;
margin: 0 auto;
background: #ffffff;
border-radius: 14upx;
height: 220rpx;
margin-bottom: 20upx;
margin-top: 20rpx;
}
.box_tit {
width: 90%;
margin: 0 auto;
height: 80upx;
display: flex;
}
.money_name {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
font-size: 27rpx;
font-weight: bold;
letter-spacing: 2upx;
}
.money_price {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 39upx;
/* font-weight: bold; */
color: red;
}
.money_data {
color: #999999;
font-size: 24rpx;
width: 90%;
margin: 0 auto;
margin-top: -8upx;
}
.u-line {
width: 90% !important;
border-bottom-width: 6upx !important;
margin: 0 auto !important;
margin-top: 22upx !important;
margin-bottom: 22upx !important;
}
.box_bottom {
width: 90%;
margin: 0 auto;
display: flex;
height: 40upx;
}
.money_use {
flex: 1;
color: #999999;
font-size: 24rpx;
display: flex;
justify-content: left;
align-items: center;
}
.lj_use {
width: 150rpx;
border: 2rpx solid #FF7F00;
color: #FF7F00;
text-align: center;
line-height: 48rpx;
border-radius: 40rpx;
font-size: 23rpx;
}
</style>

263
my/integral/index.vue Normal file
View File

@@ -0,0 +1,263 @@
<template>
<view class="integral_all">
<!-- 积分信息 -->
<view class="information">
<view class="information_le">
<view class="information_text1">当前可用积分</view>
<view class="information_text2">{{integralNum}}</view>
<view class="information_text3" @click="goDet(1)" >积分明细 <u-icon name="arrow-right" size="28"></u-icon></view>
</view>
<view class="information_ri">
<image src="../static/integral/rectangular.png" mode="r"></image>
<view class="information_text4" @click="goDet(2)">兑换记录</view>
</view>
<!-- <view class="duihuan" @click="goDet(2)">
兑换记录
</view> -->
</view>
<!-- 兑换商品 -->
<view class="integral_goods">
<view class="integral_goods_sty">
<view class="integral_goods_sty1" v-for="(item,index) in dataList" :key='index' >
<image :src="item.couponPicture" mode=""></image>
<view class="integral_goods_text">{{item.couponName}}</view>
<view class="integral_goods_sty_bo">
<view class="integral_goods_sty_bo_le"><text
class="integral_goods_text2">{{item.needIntegral}}</text>积分</view>
<view class="integral_goods_sty_bo_ri" @click="exchange(item)">兑换</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
btnnum: 0,
page: 1,
limit: 10,
dataList: [],
integralNum: 0
};
},
onLoad() {
this.getIntegral()
this.getData()
},
methods: {
exchange(e) {
let that = this
uni.showModal({
title: '提示',
content: '确定兑换' + e.couponName + '吗?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
that.$Request.post("/app/coupon/buyCoupon", {
couponId: e.couponId
}).then(res => {
if (res.code == 0) {
uni.showToast({
title: '兑换成功'
})
that.getIntegral()
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
},
goDet(e) {
uni.navigateTo({
url:'/my/integral/integralDet?classify='+e
})
},
change(e) {
this.btnnum = e
console.log(this.btnnum)
},
getIntegral() {
this.$Request.get("/app/userintegral/selectUserIntegral").then(res => {
if (res.code == 0) {
this.integralNum = res.data.integralNum
}
});
},
getData() {
let data = {
page: this.page,
limit: this.limit,
shopId:0
}
this.$Request.get("/app/coupon/selectCouponList", data).then(res => {
if (res.code == 0) {
if (this.page == 1) {
this.dataList = res.data.list
} else {
this.dataList = [...this.dataList, ...res.data.list]
}
}
});
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getData();
},
}
</script>
<style scoped>
.integral_all {
width: 100%;
background-color: #FCD202;
}
/* 积分信息 */
.information {
width: 94%;
padding: 4% 3% 5%;
display: flex;
align-items: center;
justify-content: space-between;
}
.information_le {
/* width: 70%; */
color: #FFFFFF;
}
.information_text1 {
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
margin-bottom: 10upx;
line-height: 32rpx
}
.information_text2 {
font-size: 60rpx;
font-weight: bold;
color: #FFFFFF;
margin-bottom: 10upx;
}
.information_text3 {
font-size: 28rpx;
font-weight: 500;
color: #FFFFFF;
line-height: 32rpx;
}
.information_ri {
/* width: 30%; */
/* padding-top: 50rpx; */
position: relative;
}
.information_ri image {
width: 218rpx;
height: 98rpx;
}
.information_text4 {
color: #FFFFFF;
position: absolute;
/* bottom: 0; */
left: 51rpx;
top: 23rpx;
font-size: 28upx;
/* right: 0; */
/* margin: auto; */
}
.duihuan {
padding: 8rpx 18rpx;
background-color: #FCD202;
box-shadow: 0 0 10rpx #FCD202;
}
/* 兑换商品 */
.integral_goods {
width: 100%;
background-color: #F5F5F5;
border-top-left-radius: 18rpx;
border-top-right-radius: 18rpx;
padding-bottom: 3%;
}
.integral_goods_sty {
width: 94%;
margin: 0 auto;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding-top: 3%;
}
.integral_goods_sty1 {
width: 48.5%;
/* margin-left: 3%; */
background-color: #FFFFFF;
padding: 0 2% 4%;
border-radius: 18rpx;
margin-bottom: 3%;
}
/* .integral_goods_sty1:first-child {
margin-left: 0;
} */
.integral_goods_sty1 image {
width: 100%;
height: 240upx;
}
.integral_goods_text {
font-size: 35rpx;
font-weight: bold;
color: #333333;
line-height: 1.8;
}
.integral_goods_sty_bo {
display: flex;
margin-top: 2%;
}
.integral_goods_sty_bo_le {
width: 65%;
color: #999999;
font-size: 30rpx;
}
.integral_goods_text2 {
color: #D80204;
font-size: 28rpx;
margin-right: 4upx;
font-weight: bold;
}
.integral_goods_sty_bo_ri {
width: 35%;
background-color: #FCD202;
font-size: 24rpx;
font-weight: bold;
color: #333333;
padding: 2% 0;
text-align: center;
border-radius: 50rpx;
}
</style>

144
my/integral/integralDet.vue Normal file
View File

@@ -0,0 +1,144 @@
<template>
<view>
<view style="text-align: left;padding-bottom: 10rpx;">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<!-- <view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="margin-bottom: 8upx;color: #ecd4b4">充值</text>
<text v-if="item.type == 2" style="margin-bottom: 8upx;color: #ecd4b4">提现</text>
</view> -->
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx">{{item.title}}</view>
<!-- <view v-if="item.classify === 2" style="margin-bottom: 8upx"> 返佣类型直属返佣</view> -->
<!-- <view v-if="item.classify === 3" style="margin-bottom: 8upx"> 返佣类型非直属支付</view> -->
<view style="margin-bottom: 8upx">{{item.content}}</view>
<view style="margin-bottom: 8upx"> 创建时间{{item.createTime}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">+</text>{{item.num}}积分</text>
<text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text style="color: #000000;">-</text>{{item.num}}积分</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="暂无明细数据" show="false"></empty> -->
<empty v-if="list.length == 0" content="暂无数据" ></empty>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
limit: 10,
tabIndex: 1,
checkReZhiShu: '否',
checkReTuanZhang: '否',
checkReFeiZhiShu: '否',
scrollTop: false,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
},
classify: '',
totalCount: 0
}
},
onLoad(option) {
this.classify = option.classify
if(this.classify == 2) {
uni.setNavigationBarTitle({
title: "兑换记录"
});
}
this.$queue.showLoading("加载中...");
this.getList();
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
methods: {
getList() {
let data = {
page: this.page,
limit: this.limit,
classify: this.classify==2?this.classify:''
}
this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList',data ).then(res => {
if (res.code === 0) {
this.totalCount = res.data.totalCount
if (this.page === 1) {
this.list = res.data.list;
} else {
this.list = [...this.list, ...res.data.list];
}
}
uni.stopPullDownRefresh();
uni.hideLoading();
});
}
},
onReachBottom: function() {
// this.page = this.page + 1;
// this.getList();
if(this.list.length<this.totalCount) {
this.page = this.page + 1;
this.getList()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.getList();
}
}
</script>
<style lang="less">
page {
// background: #1c1b20;
}
.tui-tab-item-title {
// color: #ffffff;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
white-space: nowrap;
}
.tui-tab-item-title-active {
border-bottom: 1px solid #5E81F9;
color: #5E81F9;
font-size: 32upx;
font-weight: bold;
border-bottom-width: 6upx;
text-align: center;
}
.item {
background: #FFFFFF;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
</style>

125
my/integral/record.vue Normal file
View File

@@ -0,0 +1,125 @@
<template>
<view>
<view style="text-align: left;padding-bottom: 10rpx;">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<!-- <view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="margin-bottom: 8upx;color: #ecd4b4">充值</text>
<text v-if="item.type == 2" style="margin-bottom: 8upx;color: #ecd4b4">提现</text>
</view> -->
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx">{{item.title}}</view>
<!-- <view v-if="item.classify === 2" style="margin-bottom: 8upx"> 返佣类型直属返佣</view> -->
<!-- <view v-if="item.classify === 3" style="margin-bottom: 8upx"> 返佣类型非直属支付</view> -->
<view style="margin-bottom: 8upx">{{item.content}}</view>
<view style="margin-bottom: 8upx"> 创建时间{{item.createTime}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text class="text-olive">+</text>{{item.money}}</text>
<text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text class="text-red">-</text>{{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="暂无明细数据" show="false"></empty> -->
<empty v-if="list.length == 0" content="暂无明细" ></empty>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
limit: 10,
tabIndex: 1,
checkReZhiShu: '否',
checkReTuanZhang: '否',
checkReFeiZhiShu: '否',
scrollTop: false,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
}
}
},
onLoad() {
this.$queue.showLoading("加载中...");
this.getList();
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
methods: {
getList() {
let data = {
page: this.page,
limit: this.limit,
}
this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList',data ).then(res => {
if (res.code === 0) {
if (this.page === 1) {
this.list = res.data.list;
} else {
this.list = [...this.list, ...res.data.list];
}
}
uni.stopPullDownRefresh();
uni.hideLoading();
});
}
},
onReachBottom: function() {
this.page = this.page + 1;
this.getList();
},
onPullDownRefresh: function() {
this.page = 1;
this.getList();
}
}
</script>
<style lang="less">
page {
// background: #1c1b20;
}
.tui-tab-item-title {
// color: #ffffff;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
white-space: nowrap;
}
.tui-tab-item-title-active {
border-bottom: 1px solid #5E81F9;
color: #5E81F9;
font-size: 32upx;
font-weight: bold;
border-bottom-width: 6upx;
text-align: center;
}
.item {
// background: #1E1F31;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
</style>

190
my/msg/index.vue Normal file
View File

@@ -0,0 +1,190 @@
<template>
<view class="content">
<!-- <view class="navbar">
<view v-for="(item, index) in tabList" :key="index" class="nav-item"
:class="{ current: tabFromIndex === item.state }" @click="tabClicks(item.state)">
{{ item.text }}
</view>
</view> -->
<view v-for="(item, index) in list" :key="index" class="item" @click="goDet(item.content)">
<view class="flex justify-between"
style="font-size: 30upx;width: 100%;overflow: hidden;text-overflow: ellipsis;white-space:nowrap">
<view class="text-bold">{{ item.title }}</view>
<!-- <view v-if="item.isSee == 0"
style="height: 32rpx;width: 32rpx;border-radius: 100rpx;background-color: red;color: #FFF;text-align: center;">
</view> -->
</view>
<view class="flex justify-between">
<view style="color: #999999;font-size: 28upx;margin-top: 10upx;">{{ item.content }}</view>
<view style="margin-top: 10upx;color: #999999;font-size: 28upx;text-align: right;">{{ item.createAt }}
</view>
</view>
</view>
<!-- <view v-if="list.length === 0" style="background: #1c1b20;text-align: center;padding-top: 140upx;color: #FFFFFF;">暂无消息</view> -->
<empty v-if="list.length === 0" des="暂无消息" show="false"></empty>
</view>
</template>
<script>
import empty from '@/components/empty';
export default {
components: {
empty
},
data() {
return {
tabFromIndex: 5,
tabCurrentIndex: 0,
fromInfo: 5,
list: [],
page: 1,
limit: 20,
scrollTop: false,
tabList: [{
state: 5,
text: '用户消息',
totalElements: 0
},
{
state: 4,
text: '订单消息',
totalElements: 0
}
],
totalCount: 0
};
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
onLoad(options) {
this.$queue.showLoading("加载中...")
this.loadData();
},
methods: {
goDet(e) {
console.log(e.indexOf('下单'))
if (e.indexOf('下单') != -1) {
uni.navigateTo({
url: '/my/order/index'
})
} else if (e.indexOf('接单') != -1) {
uni.navigateTo({
url: '/my/takeOrder/index'
})
} else if (e.indexOf('订单审核通过') != -1) {
uni.navigateTo({
url: '/my/publish/index'
})
}
},
//顶部渠道点击
tabClicks(index) {
this.list = [];
this.page = 1;
this.tabFromIndex = index;
this.$queue.showLoading("加载中...")
this.loadData();
},
//获取消息列表
loadData() {
let that = this;
let number = 10;
let token = this.$queue.getData('token');
if (token) {
let data = {
page: this.page,
limit: this.limit,
// state: this.tabFromIndex
}
this.$Request.getT('/app/message/selectMessageByUserId', data).then(res => {
if (res.code === 0) {
this.totalCount = res.data.totalCount
if (this.page == 1) {
this.list = res.data.list
} else {
res.data.list.forEach(d => {
this.list.push(d);
});
}
}
uni.hideLoading();
uni.stopPullDownRefresh();
});
}
}
},
onReachBottom: function() {
if(this.list.length<this.totalCount) {
this.page = this.page + 1;
this.loadData()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
};
</script>
<style lang="scss">
page,
page {
// background: #111224;
}
.content {
// background: #111224;
height: 100%;
}
.navbar {
display: flex;
height: 40px;
padding: 0 5px;
// background: #1E1F31;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.06);
position: relative;
z-index: 10;
.nav-item {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
height: 100%;
font-size: 15px;
// color: #FFFFFF;
position: relative;
&.current {
color: #5E81F9;
&:after {
content: '';
position: absolute;
left: 50%;
bottom: 0;
transform: translateX(-50%);
width: 44px;
height: 0;
border-bottom: 2px solid #5E81F9;
}
}
}
}
.item {
// background: #1E1F31;
padding: 16rpx 25rpx;
margin: 16rpx;
font-size: 28rpx;
box-shadow: 7rpx 9rpx 34rpx rgba(0, 0, 0, 0.1);
border-radius: 16upx;
background: #fff;
}
</style>

338
my/myPingJia/myPingJia.vue Normal file
View File

@@ -0,0 +1,338 @@
<template>
<view style="padding-bottom: 20rpx;">
<view class="padding-tb-sm margin-lr u-border-bottom" v-for="(item, index) in EvaluateList" :key='index'>
<view class="flex justify-between align-center" @click="gotoShop(item.shopId)">
<view class="flex align-center">
<u-avatar :src="item.shopCover" size="65"></u-avatar>
<view class=" margin-left-sm" style="line-height: 46upx;">{{item.shopName?item.shopName:'匿名'}}
</view>
<view class="flex margin-left-sm">
<u-icon v-for="ite in item.score" :key='ite' color="#FCD202" name="star-fill">
</u-icon>
</view>
</view>
<view>{{item.createTime}}</view>
</view>
<view style="display: flex;">
<view class="margin-top-sm" :style="!item.shopReplyMessage ? 'width: 90%;' : ''">{{item.evaluateMessage}}</view>
<view class="flex padding-top-sm margin-right" @tap="goShow(index)" v-if="!item.shopReplyMessage">
<!-- <image src="../../static/images/order/pinglun.png" style="width: 20px;height: 20px;"></image> -->
</view>
</view>
<view class="margin-top-sm" v-if="item.shopReplyMessage">
<view class="flex align-center">
<view class=" flex align-center text-df" style="color: #999999;">
<view class="text-df">商家回复:</view>{{item.shopReplyMessage}}
</view>
</view>
<!-- <view class="text-lg padding-left margin-left-xl">{{dataDet.shopReplyMessage}}</view> -->
</view>
<view class="flex" style="width: 100%;margin-top: 20rpx;flex-wrap: wrap;" v-if="item.pictures">
<image @click="lookImgs(ind,item.pictures)" :src="ite" v-for="(ite,ind) in item.pictures" :key="ind" style="width: 200rpx;height: 200rpx;margin-right: 10rpx;margin-bottom: 10rpx;" mode=""></image>
</view>
<view class="flex justify-end" style="width: 100%;color: #999999;" @click="deletePj(item)">
删除
</view>
</view>
<empty v-if="EvaluateList.length<=0"></empty>
</view>
</template>
<script>
import empty from '../../components/empty.vue'
export default {
components:{
empty
},
data() {
return {
pinglun: '',
count: 0,
show: false,
customStyle: {
color: '#333333',
background: '#FCD202',
marginRight: '20rpx',
border: 0
},
customStyle1: {
color: '#333333',
background: '#F2F2F2',
marginRight: '20rpx',
border: 0
},
cashDeposit: [],
EvaluateData: {},
EvaluateList: [],
grade: '',
page: 1,
size: 10,
isShow: false,
oneData: [],
titleData: [],
shopDet: {}
}
},
onShow() {
this.getList()
},
onPullDownRefresh() {
this.page = 1
this.getList()
},
onReachBottom: function() {
this.page = this.page + 1;
this.getList()
},
methods: {
deletepjrequest(id){
let data = {
id:id
}
this.$Request.getT("/app/order/deleteEvaluateById", data).then(res => {
uni.hideLoading()
if (res.code == 0) {
uni.showToast({
title:'删除成功'
})
this.page = 1
this.getList()
}else{
uni.showToast({
title:res.msg,
icon:'none'
})
}
});
},
//删除评价
deletePj(item){
let that = this
uni.showModal({
title:'提示',
content:'确定删除此评价?',
complete(ret) {
if(ret.confirm){
//删除评价的接口
that.deletepjrequest(item.id)
}
}
})
},
//去商铺
gotoShop(shopId){
uni.navigateTo({
url:'/pages/index/shop/index?shopId='+shopId
})
},
//预览图片
lookImgs(index,imgs){
uni.previewImage({
current:index,
urls:imgs
})
},
goShow(index){
this.orderNumber = this.EvaluateList[index].orderNumber;
this.show = true;
},
sel(e) {
this.grade = e
this.count = e
this.page = 1
this.getList()
},
open(data) {
console.log(data);
this.oneData = data;
this.titleData = data.goods
this.isShow = true;
},
close() {
this.isShow = false;
},
// 获取评价列表
getList() {
let data = {
page: this.page,
limit: this.size,
}
this.$Request.getT("/app/order/getEvaluateList", data).then(res => {
if (res.code == 0 && res.data) {
// this.EvaluateData = res.data
res.data.records.map(item=>{
if(item.pictures){
item.pictures = item.pictures.split(',')
}else{
item.pictures = []
}
})
if (this.page == 1) {
this.EvaluateList = res.data.records
} else {
this.EvaluateList = [...this.EvaluateList, ...res.data.records]
}
}
});
}
}
}
</script>
<style lang="scss">
page {
background-color: #FFFFFF;
}
.box1 {
position: absolute;
background: #000000;
width: 750rpx;
height: 100vh;
opacity: 0.4;
}
.moudes {
width: 650rpx;
position: absolute;
background: #FFFFFF;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
height: 700rpx;
border-radius: 10rpx;
.bt {
font-size: 30rpx;
font-weight: bold;
}
.pjImg {
width: 200rpx;
height: 200rpx;
}
.navBox {
.avtiter {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
margin-right: 15rpx
}
padding-left: 30rpx;
padding-top: 30rpx;
display: flex;
align-items: center;
.userName {
font-size: 28rpx;
font-weight: bold;
}
}
}
.nrTxt {
display: inline-block;
width: 500rpx;
}
.navList {
text-align: center;
margin-top: 30rpx;
padding-left: 30rpx;
padding-right: 30rpx;
display: flex;
justify-content: center;
.xq {
font-size: 30rpx;
font-weight: bolder;
text-align: center;
}
}
.contentTxt {
view {
margin-bottom: 30rpx;
display: flex;
align-items: center;
}
.title {
font-size: 30rpx;
font-weight: bold;
color: #000000;
margin-right: 15rpx;
}
.imgRsc {
width: 100rpx;
height: 100rpx;
border-radius: 10rpx;
}
}
.list_1 {
position: absolute;
}
.btn {
width: 690upx;
height: 88upx;
margin: 30upx auto;
background: #FCD202;
box-shadow: 0px 10upx 20upx 0upx #FFD9B3;
border-radius: 16upx;
display: flex;
align-items: center;
justify-content: center;
color: #000000;
}
.one {
background: #FFFFFF;
margin-top: 20rpx;
display: flex;
justify-content: space-between;
padding: 20rpx;
.imgSrc {
width: 100rpx;
height: 100rpx;
vertical-align: middle;
margin-right: 20rpx;
border-radius: 10rpx;
}
.name {
margin-top: 10rpx;
margin-bottom: 20rpx;
font-size: 24rpx;
color: #000000;
}
.timer {
font-size: 20rpx;
color: #b3b3c4;
}
.contentTxt {
font-size: 24rpx;
color: #000000;
}
}
</style>

329
my/recruit/index.vue Normal file
View File

@@ -0,0 +1,329 @@
<template>
<view>
<view class="hehuo_view" v-if="XCXIsSelect=='是'">
<image src="../../static/images/my/hezuobg.png"></image>
<view class="text_view">
<view class="item_view">
<view class="item_title">意向代理城市</view>
<input @click="goCity" type="text" disabled v-model="city" placeholder="请输入代理城市" />
<view class="xian"></view>
</view>
<view class="item_view">
<view class="item_title">姓名</view>
<input type="text" v-model="userName" placeholder="请输入姓名" />
<view class="xian"></view>
</view>
<view class="item_view">
<view class="item_title">联系电话</view>
<input type="number" v-model="phone" maxlength="11" placeholder="请输入联系电话" />
<view class="xian"></view>
</view>
<view class="item_view">
<view class="item_title">年龄</view>
<input type="number" v-model="age" maxlength="11" placeholder="请输入年龄" />
<view class="xian"></view>
</view>
<view class="item_view">
<view class="item_title">头像上传</view>
<view class="flex" style="overflow: hidden;flex-direction: initial;">
<view v-if="headImg.length">
<view class="margin-top flex margin-right-sm">
<view class="flex"
style="width: 150upx;height: 150upx;margin-right: 10rpx;position: relative;">
<image :src="headImg" style="width: 100%;height: 100%;"></image>
<view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
@click="headImgremove(index)">
<u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
</view>
</view>
</view>
</view>
<view class="margin-top" @click="addImage()" v-if="headImg.length<=0">
<view style="width: 150upx;height: 150upx;background: #F5F5F5;"
class="flex justify-center align-center">
<view>
<view class="text-center">
<image src="../../static/images/my/add.png"
style="width: 54upx;height: 47upx;position: relative;">
</image>
</view>
<view class="text-center text-xs margin-top-xs">上传图片</view>
</view>
</view>
</view>
</view>
</view>
<!-- <view class="audit_message" v-if="auditContent != '' && bb == 3">拒绝原因{{auditContent}}</view> -->
<view class="save_btn" @tap="save" v-if="bb !=0">提交申请</view>
<!-- <view class="save_btn" v-if="status == 0">审核中</view> -->
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
hotCitys: ['杭州', '天津', '北京', '上海', '深圳', '广州', '成都', '重庆', '厦门'],
locationValue: '正在定位...',
// auditContent: '',
city: '',
money: '',
teamNumber: '',
userName: '',
phone: '',
age: '',
headImg: [],
bb:true,
XCXIsSelect: '是',
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if (this.XCXIsSelect == '否') {
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '骑手招募'
});
}
this.getChannel();
},
methods: {
// 头像删除
headImgremove(index) {
this.headImg = ''
},
getChannel() {
let userId = this.$queue.getData('userId');
this.$Request.getT('/app/artificer/selectAgencyById?userId=' + userId).then(res => {
if (res.code == 0) {
if (res.data == null) {
this.bb = 1;
} else {
this.bb = res.data.status;
this.city = res.data.city;
this.age = res.data.age;
this.headImg = res.data.img;
this.userName = res.data.name;
this.phone = res.data.phone;
}
console.log(this.bb)
// this.auditContent = res.data.auditContent;
}
});
},
//获取省市区
Getcity(latitude, longitude) {
this.$Request.get("/app/Login/selectCity", {
lat: latitude,
lng: longitude
}).then(res => {
console.log(res)
this.city = res.data.city
console.log(this.address)
});
},
goCity() {
let that = this
uni.chooseLocation({
success: function(res) {
console.log('位置名称:' + res.name);
console.log('详细地址:' + res.address);
console.log('纬度:' + res.latitude);
console.log('经度:' + res.longitude);
// that.city = res.address || '郑州'
that.Getcity(res.latitude, res.longitude)
}
});
// uni.getLocation({
// type: 'gcj02',
// geocode: true,
// success: function(res) {
// console.log('当前位置:' + res.address.city);
// that.city = res.address.city || '郑州'
// }
// });
},
save() {
// let isStudent = this.$queue.getData("isStudent");
// if (isStudent != 2) {
// uni.showModal({
// title: '温馨提示',
// content: '您还没有进行实名认证,请认证完成之后再来操作吧!',
// showCancel: true,
// cancelText: '取消',
// confirmText: '确认',
// success: res => {
// if (res.confirm) {
// uni.navigateTo({
// url: '/offlinetask/pages/public/authentication'
// });
// }
// }
// });
// return;
// }
// this.form.headImg = this.headImg
// this.headImg = this.headImg.toString();
if (this.city === '') {
this.$queue.showToast('请输入代理城市')
return;
}
if (this.userName === '') {
this.$queue.showToast('请输入姓名')
return;
}
if (this.phone === '' || this.phone.length != 11) {
this.$queue.showToast('请输入正确的手机号!')
return;
}
if (this.age === '') {
this.$queue.showToast('请输入年龄')
return;
}
if (this.headImg == '') {
this.$queue.showToast('请上传头像')
return;
}
let userId = this.$queue.getData('userId');
let data = {
userId: userId,
name: this.userName,
phone: this.phone,
age: this.age,
city: this.city,
img: this.headImg,
}
this.$Request.postJson('/app/artificer/insertAgency', data).then(res => {
if (res.code == 0) {
uni.hideLoading();
this.$queue.showToast('提交成功!');
setTimeout(d => {
uni.navigateBack();
}, 1000);
} else {
uni.hideLoading();
this.$queue.showToast(res.msg);
}
});
},
addImage() {
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://anmo.xianmxkj.com/sqx_fast/alioss/upload',
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
console.log(uploadFileRes.data)
that.headImg = JSON.parse(uploadFileRes.data).data
console.log(that.headImg)
uni.hideLoading();
}
});
}
}
})
},
}
}
</script>
<style lang="less">
// @import '../../static/less/index.less';
// @import '../../static/css/index.css';
.hehuo_view {
width: 750rpx;
height: 1830upx;
image {
width: 750rpx;
height: 1830upx;
background-size: 100%;
position: absolute;
}
.text_view {
position: absolute;
z-index: 1;
width: 84%;
margin: 660rpx 50rpx 30rpx;
.audit_message {
color: red;
width: 650rpx;
height: 50rpx;
margin-top: 50rpx;
}
.save_btn {
width: 650rpx;
height: 88rpx;
background: #FFFFFF;
border-radius: 10rpx;
text-align: center;
line-height: 88rpx;
/* #ifdef MP-WEIXIN */
margin-top: 150rpx;
/* #endif */
/* #ifdef H5 */
margin-top: 100rpx;
/* #endif */
/* #ifdef APP-PLUS */
margin-top: 180rpx;
/* #endif */
}
.save_btn1 {
width: 650rpx;
height: 88rpx;
background: #FFFFFF;
border-radius: 10rpx;
margin-top: 100rpx;
text-align: center;
line-height: 88rpx;
}
.item_view {
margin-top: 30rpx;
.item_title {
font-size: 28rpx;
font-family: PingFang SC Heavy, PingFang SC Heavy-Heavy;
font-weight: 800;
color: #333333;
}
input {
margin-top: 20rpx;
height: 40rpx;
font-size: 24rpx;
font-family: PingFang SC Regular, PingFang SC Regular-Regular;
font-weight: 400;
color: #333333;
}
.xian {
width: 630rpx;
height: 1rpx;
border: 1rpx solid #77D7B0;
margin-top: 10rpx;
}
}
}
}
</style>

36
my/setting/about.vue Normal file
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/common/type/233').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>

637
my/setting/chat.vue Normal file
View File

@@ -0,0 +1,637 @@
<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.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/images/msg/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/images/msg/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/images/msg/add.png" @click="chooseImage(['album'])"
style="width: 50rpx;height: 50rpx;margin-top: 8rpx;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: 4rpx 10rpx 0;border-radius: 70rpx;padding-left: 10rpx;color: #000000;" />
<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://192.168.1.17:8180/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>

137
my/setting/customer.vue Normal file
View File

@@ -0,0 +1,137 @@
<template>
<view style="height: 100vh;margin: 32upx;">
<view style="text-align: center;background: #fff;padding: 40upx;border-radius: 32upx;">
<view style="font-size: 38upx;color: #333333">添加客服微信咨询</view>
<view style="font-size: 32upx;margin-top: 32upx;color: #333333">微信号{{weixin}}</view>
<view @click="copyHref"
style="background: #5E81F9;width:200upx;margin-top: 32upx;font-size: 30upx;margin-left: 36%;color: #333333;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: #333333;margin-top: 32upx" v-if="isWeiXin">
{{ isWeiXin ? '长按识别上方二维码' : '' }}
</view>
<!-- <button open-type="contact" class="btn">联系在线客服</button> -->
<view @click="goChat" style="width:260upx;margin-top: 32upx;font-size: 30upx;margin-left: 28%;color: #5E81F9;padding: 4upx 20upx;border-radius: 24upx;">联系在线客服</view>
<!-- <view v-if="isWeiXin" style="font-size: 24upx;color: #333333;margin-top: 80upx" @click="rests">无法识别</view> -->
</view>
</view>
</template>
<script>
export default {
data() {
return {
image: '',
isWeiXin: false,
weixin: '710070994',
webviewStyles: {
progress: {
color: '#1A1929 '
}
}
};
},
onLoad() {
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
if (ua.indexOf('micromessenger') !== -1) {
this.isWeiXin = true;
}
// #endif
//获取客服二维码
this.$Request.getT('/app/common/type/1').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
console.log(res.data.value)
this.image = res.data.value;
}
}
});
this.$Request.getT('/app/common/type/44').then(res => {
if (res.code == 0) {
if (res.data && res.data.value) {
this.weixin = res.data.value;
}
}
});
},
onPullDownRefresh: function() {
uni.stopPullDownRefresh(); // 停止刷新
},
methods: {
//邀请码复制
copyHref() {
uni.setClipboardData({
data: this.weixin,
success: r => {
this.$queue.showToast('复制成功');
}
});
},
saveImg() {
let that = this;
// uni.saveImageToPhotosAlbum({
// filePath: that.image,
// success(res) {
// that.$queue.showToast('保存成功');
// }
// });
let _this = this;
let imgsArray = [];
imgsArray[0] = that.image
uni.previewImage({
current: 0,
urls: imgsArray
});
},
rests() {
uni.showToast({
title: '已刷新请再次长按识别',
mask: false,
duration: 1500,
icon: 'none'
});
window.location.reload();
},
// 在线客服
goChat() {
let token = this.$queue.getData('token');
if (token) {
uni.navigateTo({
url: '/my/setting/chat'
});
} else {
this.goLoginInfo();
}
},
//统一登录跳转
goLoginInfo() {
uni.navigateTo({
url: '/pages/public/loginphone'
});
},
}
};
</script>
<style>
/* @import '../../static/css/index.css'; */
page {
/* background: #1c1b20; */
}
.btn {
border: none;
background-color: #fff;
color: #5E81F9;
margin-top: 32upx;
font-size: 30upx;
}
button::after {
border: none;
}
</style>

184
my/setting/feedback.vue Normal file
View File

@@ -0,0 +1,184 @@
<template>
<view class="page" style="background-color: #ffffff;" v-if="XCXIsSelect=='是'">
<view class="feedback-title">
<text>问题和意见</text>
<text @tap="chooseMsg">快速键入</text>
</view>
<view class="feedback-body"><textarea placeholder="请详细描述你的问题和意见..." v-model="sendDate.feedbackMessage" class="feedback-textare" /></view>
<view class="feedback-title"><text>QQ/邮箱</text></view>
<view class="feedback-body"><input class="feedback-input" v-model="sendDate.userEmail" placeholder="方便我们联系你" /></view>
<button style="" class="feedback-submit" @tap="send">提交</button>
</view>
</template>
<script>
export default {
data() {
return {
XCXIsSelect: '是',
msgContents: ['界面显示错乱', '启动缓慢,卡出翔了', 'UI无法直视丑哭了', '偶发性崩溃'],
stars: [1, 2, 3, 4, 5],
imageList: [],
sendDate: {
score: 5,
feedbackMessage: '',
userEmail: ''
}
};
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('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.feedbackMessage = 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.feedbackMessage) {
uni.showToast({
icon: 'none',
title: '请输入反馈内容'
});
return;
}
if (!this.sendDate.userEmail) {
uni.showToast({
icon: 'none',
title: '请填写QQ或邮箱'
});
return;
}
this.$queue.showLoading('加载中...');
this.$Request.postJson('/app/userinfo/userFeedback', {
userEmail: this.sendDate.userEmail,
feedbackMessage: this.sendDate.feedbackMessage,
feedbackType: 1
}).then(res => {
if (res.code === 0) {
uni.showToast({
title: '提交成功'
});
setTimeout(function() {
uni.navigateBack();
}, 1000);
} else {
uni.hideLoading();
uni.showModal({
showCancel: false,
title: '提交失败',
feedbackMessage: 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>

121
my/setting/index.vue Normal file
View File

@@ -0,0 +1,121 @@
<template>
<view class="bg-white 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/images/my/right.png" style="line-height: 50upx;width: 20rpx;height: 30rpx;"></image>
</view> -->
<view class="flex align-center padding-tb" @click="goNav('/my/setting/feedback')" v-if="XCXIsSelect=='是'">
<view class="flex-sub text-df" style="line-height: 50upx;">意见反馈</view>
<image src="../../static/images/index/right2.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex align-center padding-tb" @click="goNav('/my/setting/xieyi')">
<view class="flex-sub text-df" style="line-height: 50upx;">用户协议</view>
<image src="../../static/images/index/right2.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex align-center padding-tb" @click="goNav('/my/setting/mimi')">
<view class="flex-sub text-df" style="line-height: 50upx;">隐私政策</view>
<image src="../../static/images/index/right2.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="flex align-center padding-tb" @click="goNav('/my/setting/about')">
<view class="flex-sub text-df" style="line-height: 50upx;">关于我们</view>
<image src="../../static/images/index/right2.png" style="line-height: 50upx;width: 15rpx;height: 30rpx;">
</image>
</view>
<view class="btn" @click="goOut">退出登录</view>
</view>
</template>
<script>
export default {
data() {
return {
XCXIsSelect: '是',
checked: true
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect') ? this.$queue.getData('XCXIsSelect') : '是'
this.getUserInfo()
},
methods: {
change(val) {
this.checked = val
this.$Request.post('/app/user/updateSendMsg', {
isSendMsg: this.checked == true ? 1 : 2
}).then(res => {
if (res.code === 0) {
this.content = res.data.value;
}
});
},
getUserInfo() {
this.$Request.get("/app/user/selectUserById").then(res => {
if (res.code == 0) {
this.checked = res.data.isSendMsg == null || res.data.isSendMsg == 1 ? true : false
}
});
},
goNav(e) {
uni.navigateTo({
url: e
})
},
goOut() {
uni.showModal({
title: '提示',
content: '确定退出登录吗?',
success: function(res) {
if (res.confirm) {
console.log('用户点击确定');
uni.removeStorageSync('userName')
uni.removeStorageSync('avatar')
uni.removeStorageSync('userId')
uni.removeStorageSync('token')
uni.removeStorageSync('phone')
uni.removeStorageSync('zhiFuBaoName')
uni.removeStorageSync('zhiFuBao')
uni.removeStorageSync('invitationCode')
uni.removeStorageSync('unionId')
uni.removeStorageSync('openId')
uni.removeStorageSync('isVIP')
uni.removeStorageSync('wxCode')
uni.removeStorageSync('wxQrCode')
uni.removeStorageSync('sex')
uni.showToast({
title: '退出成功!',
icon: 'none'
})
setTimeout(function() {
uni.navigateBack()
}, 1000)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
})
}
}
}
</script>
<style>
page {
background-color: #FFF;
}
.btn {
width: 100%;
height: 80upx;
background: #FCD202;
border-radius: 6upx;
text-align: center;
line-height: 80upx;
margin-top: 40upx;
font-size: 34upx;
color: #fff;
}
</style>

37
my/setting/mimi.vue Normal file
View File

@@ -0,0 +1,37 @@
<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/common/type/237').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>

36
my/setting/xieyi.vue Normal file
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/common/type/236').then(res => {
if (res.code == 0) {
this.content = res.data.value;
// this.tit = res.data.min
}
});
}
}
}
</script>
<style>
page {
background: #FFFFFF;
}
</style>

365
my/shoppingCar/index.vue Normal file
View File

@@ -0,0 +1,365 @@
<template>
<view>
<view>
<view class="store-list y-p-30">
<view class="bg-white store-single y-p-30 y-m-b-30 y-radius-30" v-for="(storeItem, storeIndex) in shoppingCart" :key="storeIndex">
<view @click="storeSelBtn(storeIndex)" class="store-header y-flex y-align-center">
<view class="sel-btn y-p-t-5">
<u-icon v-if="(storeItem.isBuySelect && !isEdit) || (storeItem.isDelSelect && isEdit)" name="checkmark-circle-fill" color="#04BE02" size="40rpx"></u-icon>
<view v-else class="no-select"></view>
</view>
<span class="y-font-size-30 y-m-l-13 y-m-r-10">{{storeItem.shopName}}</span>
<u-icon name="arrow-right"></u-icon>
</view>
<view class="goods-list y-p-l-20">
<view class="goods-item y-flex y-p-t-20" v-for="(goodsItem, goodsIndex) in storeItem.orderGoodsList" :key="goodsIndex">
<view @click="goodsSelBtn(storeIndex, goodsIndex)" class="y-flex y-align-center">
<view class="sel-btn">
<u-icon v-if="(goodsItem.isBuySelect && !isEdit) || (goodsItem.isDelSelect && isEdit)" name="checkmark-circle-fill" color="#04BE02" size="40rpx"></u-icon>
<view v-else class="no-select"></view>
</view>
</view>
<view class="y-m-l-15">
<u-image :src="goodsItem.goodsPicture[0]" radius="10rpx" width="162rpx" height="162rpx"></u-image>
</view>
<view class="y-m-l-28 y-flex y-flex-1 y-flex-column">
<view class="y-flex-1">
<view class="goods-name y-font-size-28"> {{goodsItem.goodsName}} </view>
<view class="goods-attr y-flex y-m-t-15">
{{goodsItem.skuMessage}}
<!-- <u-tag v-if="goodsItem.skuMessage.length > 0" :text="goodsItem.skuMessage.join(';')" plain size="mini" type="warning"></u-tag> -->
<!-- <u-tag v-else text="默认规格" plain size="mini" type="warning"></u-tag> -->
</view>
</view>
<view class="goods-price y-flex y-align-end y-flex-1">
<view class="y-flex-1 y-font-size-30 y-weight-bold color-price"> {{goodsItem.goodsPrice}} </view>
<view class="flex align-center">
<image @click="updataNum(storeItem,goodsItem,2)" src="../static/shoppingCar/jian.png" style="width: 54rpx;height: 54rpx;" mode=""></image>
<view class="padding-lr-sm">{{goodsItem.goodsNum}}</view>
<image @click="updataNum(storeItem,goodsItem,1)" src="../static/shoppingCar/add.png" style="width: 49rpx;height: 49rpx;" mode=""></image>
<!-- <u-number-box size="18" v-model="goodsItem.goodsNum" @change="countChange(storeIndex, goodsIndex)"></u-number-box> -->
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="height: 120rpx;"></view>
</view>
<view class="y-position-fixed y-bottom-0 y-left-0 y-right-0 y-p-y-20 y-p-x-30 bg-white y-flex">
<view class="y-flex y-flex-1 y-align-center">
<view @click="allSelBtn()" class="store-header y-flex y-align-center">
<view class="sel-btn y-p-t-5">
<u-icon v-if="allSelState" name="checkmark-circle-fill" color="#04BE02" size="40rpx"></u-icon>
<view v-else class="no-select"></view>
</view>
<span class="y-font-size-28 y-m-l-10">全选</span>
</view>
</view>
<view class="y-flex y-align-center y-font-size-28">
<view v-if="!isEdit" class="y-font-size-33"> 总计: <span class="color-price y-weight-bold y-m-l-8"> {{totalPrice}} </span> </view>
<view class="y-flex y-m-l-25">
<u-button v-if="!isEdit" shape="circle" :hairline="false" :customStyle="submitBtnStyle"> 结算( {{totalSelCount}} ) </u-button>
<u-button v-else shape="circle" :hairline="false" :customStyle="submitBtnStyle"> 删除( {{totalSelCount}} ) </u-button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
isEdit: false, //是否编辑(购物/编辑)
shoppingCart: [],//购物车数据
submitBtnStyle: {
background: '#FD7026',
color: '#ffffff',
border: 'none'
},//结算、删除按钮的样式
page: 1,
limit: 10,
}
},
computed:{
//是否已经全部选中
allSelState(){
let buyAllSelect = true // 购物全选
let delAllSelect = true // 编辑全选
this.shoppingCart.forEach(sitem=>{
sitem.orderGoodsList.forEach(gitem=>{
if(!gitem.isBuySelect) buyAllSelect = false;
if(!gitem.isDelSelect) delAllSelect = false;
})
})
if(!this.isEdit) return buyAllSelect;
else return delAllSelect;
},
//总价格
totalPrice(){
let totalPrice = 0
this.shoppingCart.forEach(sitem=>{
sitem.orderGoodsList.forEach(gitem=>{
if(gitem.isBuySelect){
totalPrice = totalPrice*1 + gitem.goodsPrice*gitem.goodsNum
}
})
})
return totalPrice
},
//当前操作下选中的数量
totalSelCount(){
let buyCount = 0 // 购物全选
let delCount = 0 // 编辑全选
this.shoppingCart.forEach(sitem=>{
sitem.orderGoodsList.forEach(gitem=>{
if(gitem.isBuySelect){
buyCount = buyCount*1 + gitem.goodsNum
}
if(gitem.isDelSelect){
delCount = delCount*1 + 1
}
})
})
if(!this.isEdit){
return buyCount
} else{
return delCount
}
}
},
onLoad() {
this.getData()
},
methods: {
// 结算
goConfirm() {
if (this.shoppingCart && this.goodsList.orderGoodsList[0].length > 0) {
uni.navigateTo({
url: '/pages/diancan/confirmOrder?shopId=' + this.shop.shopId + '&orderType=' + this
.orderType
})
} else {
uni.showToast({
title: '请先添加商品',
icon: "none"
})
}
},
//获取购物车列表
getData(){
let data = {
// page: 1,
// limit: 10
}
this.$Request.get("/app/order/selectShoppingTrolley", data).then(res => {
if (res.code == 0&&res.data) {
res.data.forEach(res=>{
res.isDelSelect = false
res.isBuySelect = false
res.orderGoodsList.forEach(ret=>{
ret.goodsPicture = ret.goodsPicture.split(',')
ret.isDelSelect = false
ret.isBuySelect = false
})
})
if(this.page == 1) {
this.shoppingCart = res.data
} else {
this.shoppingCart = [...this.shoppingCart, ...res.data]
}
}
});
},
//商家的选中与否
storeSelBtn(storeIndex){
if(!this.isEdit){ //购物
this.shoppingCart[storeIndex].isBuySelect = !this.shoppingCart[storeIndex].isBuySelect
this.shoppingCart[storeIndex].orderGoodsList.forEach(item=>{
item.isBuySelect = this.shoppingCart[storeIndex].isBuySelect
})
}else{//编辑
this.shoppingCart[storeIndex].isDelSelect = !this.shoppingCart[storeIndex].isDelSelect
this.shoppingCart[storeIndex].orderGoodsList.forEach(item=>{
item.isDelSelect = this.shoppingCart[storeIndex].isDelSelect
})
}
},
//商品的选中与否
goodsSelBtn(storeIndex, goodsIndex){
if(!this.isEdit){ //购物
this.shoppingCart[storeIndex].orderGoodsList[goodsIndex].isBuySelect = !this.shoppingCart[storeIndex].orderGoodsList[goodsIndex].isBuySelect
let allIsSel = true //是否已经全部选中
this.shoppingCart[storeIndex].orderGoodsList.forEach(item=>{
if(!item.isBuySelect){
allIsSel = false
}
})
this.shoppingCart[storeIndex].isBuySelect = allIsSel
}else{//编辑
this.shoppingCart[storeIndex].orderGoodsList[goodsIndex].isDelSelect = !this.shoppingCart[storeIndex].orderGoodsList[goodsIndex].isDelSelect
let allIsSel = true //是否已经全部选中
this.shoppingCart[storeIndex].orderGoodsList.forEach(item=>{
if(!item.isDelSelect){
allIsSel = false
}
})
this.shoppingCart[storeIndex].isDelSelect = allIsSel
}
},
//全选
allSelBtn(){
let toState = !this.allSelState
if(!this.isEdit){//购物
this.shoppingCart.forEach(sitem=>{
sitem.isBuySelect = toState
sitem.orderGoodsList.forEach(gitem=>{
gitem.isBuySelect = toState
})
})
}else{//编辑
this.shoppingCart.forEach(sitem=>{
sitem.isDelSelect = toState
sitem.orderGoodsList.forEach(gitem=>{
gitem.isDelSelect = toState
})
})
}
},
//商品的数量增减
countChange(storeIndex, goodsIndex){
//请求后台改变购物车商品的数量。。。storeIndex, goodsIndex
},
updataNum(storeItem,goodsItem,type) {
let data = {
orderGoodsId: goodsItem.id,
type: type,
num: 1,
shopId: storeItem.shopId
}
this.$Request.get("/app/order/updateGoodsNum", data).then(res => {
if (res.code == 0) {
this.getData()
}
});
}
}
}
</script>
<style lang="scss" scoped>
.w-90{
width: 90rpx;
}
.sel-btn{
width: 45rpx;
height: 45rpx;
}
.no-select{
width: 39rpx;
height: 39rpx;
border-radius: 50%;
border: 1px solid rgb(235, 236, 238);
}
.y-position-fixed{
position: fixed;
}
.y-top-0{
top: 0;
}
.y-bottom-0{
bottom: 0;
}
.y-left-0{
left: 0;
}
.y-right-0{
right: 0;
}
.y-flex-column{
flex-direction: column !important;
}
.y-w-100{
width: 100%;
}
/*系统状态栏高度*/
.y-system-height{
height: var(--status-bar-height);
}
/* 圆角大小例radius-1 ,radius-10... */
@for $i from 1 through 50 {
.y-radius-#{$i} { border-radius: $i*1rpx;}
/* margin */
.y-m-t-#{$i} { margin-top: $i*1rpx; }
.y-m-b-#{$i} { margin-bottom: $i*1rpx; }
.y-m-l-#{$i} { margin-left: $i*1rpx; }
.y-m-r-#{$i} { margin-right: $i*1rpx; }
.y-m-x-#{$i} { margin-left: $i*1rpx; margin-right: $i*1rpx; }
.y-m-y-#{$i} { margin-top: $i*1rpx; margin-bottom: $i*1rpx; }
.y-m-#{$i} { margin: $i*1rpx; }
/* padding */
.y-p-t-#{$i} { padding-top: $i*1rpx; }
.y-p-b-#{$i} { padding-bottom: $i*1rpx; }
.y-p-l-#{$i} { padding-left: $i*1rpx; }
.y-p-r-#{$i} { padding-right: $i*1rpx; }
.y-p-x-#{$i} { padding-left: $i*1rpx; padding-right: $i*1rpx; }
.y-p-y-#{$i} { padding-top: $i*1rpx; padding-bottom: $i*1rpx; }
.y-p-#{$i} { padding: $i*1rpx; }
/* font-size */
.y-font-size-#{$i} { font-size: $i*1rpx; }
}
/* 自体加粗例weight-100 ,weight-150 ,weight-600... */
@for $i from 1 through 9 {
.y-weight-#{$i*100} { font-weight: $i*100;}
.y-weight-#{$i*100 + 50} { font-weight: 50 + $i*100;}
}
.y-justify-end{
justify-content: flex-end;
}
.y-align-center{
align-items: center;
}
.y-align-start{
align-items: flex-start;
}
.y-align-end{
align-items: flex-end;
}
.y-flex{
display: flex;
}
.y-flex-column{
flex-direction: column;
}
.y-flex-1{
flex: 1;
}
.y-justify-start{
justify-content: flex-start;
}
.y-justify-end{
justify-content: flex-end;
}
.y-justify-around{
justify-content: space-around;
}
.y-justify-between{
justify-content: space-between;
}
.y-weight-bold{
font-weight: bold;
}
.y-border-bottom {
border-bottom: 1rpx solid rgba($color: #707070, $alpha: 0.12);
}
.color-price{
color: #C8222A;
}
</style>

BIN
my/static/address/dete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
my/static/address/write.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

BIN
my/static/apply/addimg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
my/static/coupon/has.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

BIN
my/static/task/level.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

BIN
my/static/tousu/black.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

BIN
my/static/tousu/orange.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

BIN
my/static/vip/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
my/static/vip/vip.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
my/static/wallet/face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

BIN
my/static/wallet/pay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

BIN
my/static/wallet/right1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

369
my/task/index.vue Normal file
View File

@@ -0,0 +1,369 @@
<template>
<view class="pages">
<view class="task_top">
<!-- 用户信息 -->
<view class="task_top_infor">
<view class="task_top_user">
<view class="task_top_user_le">
<image :src="avatar?avatar:'../../static/logo.png'" mode=""></image>
</view>
<view class="task_top_user_ce">
{{userName?userName:'匿名'}}
</view>
<!-- <view class="task_top_user_ri">
<image src="../static/task/level.png" mode=""></image>
<view>LV.1</view>
</view> -->
</view>
<!-- <view class="task_top_text">经验值0/299</view> -->
<view class="task_top_text">当前积分{{integral}}</view>
</view>
<!-- 周期任务 -->
<view class="task_top_task">
<view class="task_top_text2">每日任务</view>
<view class="task_top_task_sty">
<view class="task_top_task_sty_le">
<view class="task_top_task_sty_le_to">
<view class="task_top_task_sty_le_to_le">
每日签到
</view>
<view class="task_top_task_sty_le_to_ri">+{{todayIntegral}}</view>
<view class="task_top_task_img">
<image src="../static/task/goldcoins.png" mode=""></image>
</view>
</view>
<view class="task_top_text3">已连续签到{{today.dayNum}}</view>
</view>
<view class="task_top_task_sty_ri" v-if="isSignIn">
已签到
</view>
<view class="task_top_task_sty_ri2" v-else @click="check">
签到
</view>
</view>
</view>
</view>
<view class="bg-white margin-lr margin-top padding-sm radius" style="text-align: left;padding-bottom: 10rpx;"
v-if="list.length">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx">{{item.title}}</view>
<view style="margin-bottom: 8upx">{{item.content}}</view>
<view style="margin-bottom: 8upx"> 创建时间{{item.createTime}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text
class="text-olive">+</text>{{item.num}}积分</text>
<text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text
class="text-red">-</text>{{item.num}}积分</text>
</view>
</view>
</view>
</view>
</view>
<empty v-if="list.length == 0" content="暂无明细"></empty>
<!-- 成长任务 -->
<!-- <view class="task_top">
<view class="task_top_task">
<view class="task_top_text2">成长任务</view>
<view class="task_top_task_sty">
<view class="task_top_task_sty_le">
<view class="task_top_task_sty_le_to">
<view class="task_top_task_sty_le_to_le">
每日签到
</view>
<view class="task_top_task_sty_le_to_ri">+75</view>
<view class="task_top_task_img">
<image src="../static/task/goldcoins.png" mode=""></image>
</view>
</view>
<view class="task_top_text3">完成0/10</view>
</view>
<view class="task_top_task_sty_ri2">
未完成
</view>
</view>
</view>
</view> -->
</view>
</template>
<script>
import empty from '@/components/empty';
export default {
components: {
empty
},
data() {
return {
userName: '匿名',
avatar: '',
isSignIn: false,
integral: 0,
todayIntegral: 0, //今日签到应得分数
list: [],
page: 1,
limit: 10,
today: {},
totalCount: ''
}
},
onLoad() {
this.getUserInfo()
this.getIsSignIn()
this.getIntegral()
this.getTodayIntegral()
this.getToday()
this.getList()
},
methods: {
getUserInfo() {
this.$Request.get("/app/user/selectUserMessage").then(res => {
if (res.code == 0) {
this.userName = res.data.userName?res.data.userName:res.data.nickName
this.avatar = res.data.avatar
}
});
},
// 我的积分
getIntegral() {
this.$Request.get("/app/userintegral/findUserMessage").then(res => {
if (res.code == 0) {
this.integral = res.data.userIntegral
}
});
},
// 是否签到
getIsSignIn() {
this.$Request.get("/app/userintegral/isSignIn").then(res => {
if (res.code == 0) {
this.isSignIn = res.data == '今日未签到' ? false : true
}
});
},
// 获取今日签到应得分数
getTodayIntegral() {
this.$Request.get("/app/userintegral/todayIntegral").then(res => {
if (res.code == 0) {
this.todayIntegral = res.data
}
});
},
// 获取今日签到天数
getToday() {
this.$Request.get("/app/userintegral/continuousDay").then(res => {
if (res.code == 0) {
this.today = res.data
}
});
},
// 签到
check() {
this.$Request.get("/app/userintegral/signIn").then(res => {
if (res.code == 0) {
// this.todayIntegral = res.data
this.isSignIn = true
uni.showToast({
title: '签到成功',
icon: 'none'
})
this.getIntegral()
this.getList()
this.getToday()
}
});
},
getList() {
let data = {
page: this.page,
limit: this.limit,
classify: 1
}
this.$Request.getT('/app/userintegraldetails/selectIntegraldetailsList', data).then(res => {
if (res.code === 0) {
this.totalCount = res.data.totalCount
if (this.page === 1) {
this.list = res.data.list;
} else {
this.list = [...this.list, ...res.data.list];
}
}
uni.stopPullDownRefresh();
uni.hideLoading();
});
}
},
onReachBottom: function() {
// this.page = this.page + 1;
// this.getList();
if(this.list.length<this.totalCount) {
this.page = this.page + 1;
this.getList()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
}
</script>
<style scoped>
.task_top {
width: 100%;
overflow: hidden;
/* margin: 3% 0; */
background-color: #FFFFFF;
}
/* 用户信息 */
.task_top_infor {
width: 94%;
overflow: hidden;
margin: 4% auto 0;
padding: 2% 3%;
background: linear-gradient(90deg, #F4DAA7 0%, #E2BC7E 100%);
border-radius: 18rpx;
}
.task_top_user {
display: flex;
}
.task_top_user_le image {
width: 80rpx;
height: 80rpx;
border-radius: 50%;
}
.task_top_user_ce {
padding-left: 2%;
font-size: 38rpx;
font-weight: 500;
color: #333333;
line-height: 2;
}
.task_top_user_ri {
margin: 3% 0 0 2%;
}
.task_top_user_ri image {
width: 118rpx;
height: 34rpx;
}
.task_top_user_ri view {
position: relative;
bottom: 43rpx;
left: 45rpx;
font-size: 24rpx;
font-weight: 800;
color: #D3B17B;
}
.task_top_text {
color: #FFFFFF;
line-height: 2;
}
/* 周期任务 */
.task_top_task {
width: 94%;
overflow: hidden;
margin: 3% auto 0;
}
.task_top_text2 {
font-size: 34rpx;
font-weight: bold;
color: #333333;
/* margin-bottom: 2%; */
/* line-height: 32rpx; */
}
.task_top_task_sty {
width: 100%;
overflow: hidden;
background: #FCFBF5;
border-radius: 18rpx;
display: flex;
padding: 4% 3%;
margin: 3% 0;
}
.task_top_task_sty_le {
width: 80%;
}
.task_top_task_sty_le_to {
display: flex;
margin: 2% 0;
}
.task_top_task_sty_le_to_le {
width: 150rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.task_top_task_sty_le_to_ri {
width: 110rpx;
height: 40rpx;
background: rgba(255, 247, 226, 0.5);
border: 2rpx solid #FFA800;
/* border-right: 2rpx solid #FFA800; */
border-radius: 50rpx;
text-align: right;
color: #FFA800;
padding-right: 2%;
}
.task_top_task_img image {
width: 36rpx;
height: 36rpx;
position: relative;
right: 110rpx;
top: 2rpx;
}
.task_top_text3 {
font-size: 26upx;
/* font-family: PingFang SC; */
font-weight: 500;
color: #999999;
}
.task_top_text3 text {
color: #FF130A;
}
.task_top_task_sty_ri {
width: 20%;
border: 2rpx solid #999999;
height: 50rpx;
line-height: 50rpx;
color: #999999;
text-align: center;
font-size: 28upx;
border-radius: 18rpx;
/* margin: 6% 0; */
}
.task_top_task_sty_ri2 {
width: 20%;
border: 2rpx solid #FF130A;
height: 50rpx;
color: #FF130A;
text-align: center;
line-height: 50rpx;
font-size: 28upx;
border-radius: 8px;
/* margin: 6% 0; */
}
</style>

195
my/tousu/detail.vue Normal file
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/tousu/black.png"></image>
<text>{{datas.shipAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.deilveryAddressDetail">
<image src="../static/tousu/orange.png"></image>
<text>{{datas.deilveryAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.shopAddressDetail">
<image src="../static/tousu/black.png"></image>
<text>{{datas.shopAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.userAddressDetail">
<image src="../static/tousu/orange.png"></image>
<text>{{datas.userAddressDetail}}</text>
</view>
<view class="online_text" v-if="datas.indentNumber" @click="copyOrder(datas.indentNumber)">
<image src="../static/tousu/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>

363
my/tousu/index.vue Normal file
View File

@@ -0,0 +1,363 @@
<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 padding-bottom-xs" v-for="(item,index) in orderlist" :key="index" @click="bindonline(item)">
<view class="complain_part1 ">
<view class="part1_left">{{item.illegal}}</view>
<!-- <view class="part1_left" v-if="item.complaintType=='2'">拒绝系统推单</view> -->
<!-- <view class="part1_left" v-if="item.complaintType=='3'">残损违规</view> -->
<!-- <view class="part1_right">扣款{{item.deductMoney}}</view> -->
<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> -->
<span v-if="item.complaintState=='5'">投诉审核中</span>
<span v-if="item.complaintState=='6'">投诉未通过</span>
</view>
</view>
<view class="complain_part2" v-if="item.shopAddressDetail">
<image src="../static/tousu/black.png"></image>
<text>{{item.shopAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.userAddressDetail">
<image src="../static/tousu/orange.png"></image>
<text>{{item.userAddressDetail}}</text>
</view>
<view class="complain_part2" v-if="item.complaintTime">
<image src="../static/tousu/black.png"></image>
<text>投诉时间{{item.complaintTime}}</text>
</view>
<view class="complain_part2" v-if="item.indentNumber">
<image src="../static/tousu/orange.png"></image>
<text>订单号{{item.indentNumber}}</text>
</view>
<!-- <u-line color="#E6E6E6" /> -->
</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> -->
<empty v-if="!orderlist.length" style="z-index:0;position: relative;top: -20px;"></empty>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
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/selectComplaint', {
page: this.page,
limit: this.limit,
// shopId:uni.getStorageSync('shopId')
// 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: '/my/tousu/detail?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>

476
my/vip/index.vue Normal file
View File

@@ -0,0 +1,476 @@
<template>
<view>
<view class="">
<view class="margin-lr margin-top" style="position: relative;border-radius: 10upx;overflow: hidden;">
<image src="../static/vip/vip.png" style="width: 100%;height: 250rpx;"></image>
<view class=" u-flex u-p-l-30 u-p-t-80 u-p-b-30" style="position: absolute;top: 0;width: 100%;">
<view class="u-m-r-20">
<u-avatar :src="avatar" size="100"></u-avatar>
</view>
<view class="u-flex-1 ">
<view class="u-font-18 text-white text-bold">{{userName}}</view>
<view class="u-font-10 text-bold" style="margin-top: 10rpx;color: #999999;" v-if="vipExpirationTime && isVip">有效期{{vipExpirationTime}}</view>
<view class="u-font-14 u-m-t-10 u-tips-color" style="color: #C59D7C;" v-if="!isVip">您目前还未开通会员
</view>
</view>
</view>
</view>
<!-- <view class="flex justify-center margin-top-sm flex-wrap padding-lr-sm">
<view style="display: inline-block;width: 216rpx;height: 250rpx;margin: 10rpx 10rpx;">
<view class="text-center flex flex-direction justify-between padding-tb radius active"
style="color: #DFC5A7;width: 216rpx;height: 250rpx;background: linear-gradient(-30deg, #2B2A30, #4A4A4A);border: 1px;">
<view class="text-bold">月会员</view>
<view class="text-bold">¥<text class="text-xxl">{{vipList.value}}</text></view>
<view>立即购买</view>
</view>
</view>
</view> -->
<view class="flex justify-center align-center margin-top" v-if="!isVip">
<view class="" @click="showpay=true"
style="position: relative;left: 0;right: 0;border-radius: 10upx;overflow: hidden;display: inline-block;margin: auto;">
<image src="../static/vip/bg.png" style="width: 459rpx;height: 129rpx;"></image>
<view class="flex align-center"
style="position: absolute;top: -10rpx;left:30rpx;bottom: 0;margin: auto; width: 100%;height: 100%;">
<view class="text-bold">¥<text class="text-xxl">{{vipList.value}}</text></view>
</view>
</view>
</view>
<view class="padding-tb radius margin-top margin-lr"
style="background-color: #343339;border-radius: 10upx;">
<view class="text-center text-xl text-bold " style="color: #CAB49C;">会员特权</view>
<view class="flex flex-wrap">
<view v-for="(item,index) in MemberList" :key="index"
style="width: 33%;text-align: center;margin-top: 34upx;">
<image :src="item.memberImg" mode="" style="margin: 0 auto;height: 45rpx;width: 45rpx;"></image>
<view class="grid-text margin-top-sm" style="color: #DFC5A7;">{{item.memberName}}</view>
</view>
</view>
</view>
</view>
<view style="height: 110rpx;"></view>
<view class="flex justify-between cu-bar foot bg padding-lr" v-if="!isVip">
<view style="color: #DFC5A7;">
实付<text style="font-size: 38upx;margin-top: 8upx;">{{price}}</text>
</view>
<view class="">
<u-button :custom-style="customStyle" @click="showpay=true" shape="circle" :hair-line="false">立即开通
</u-button>
</view>
</view>
<!-- 支付方式 -->
<u-popup v-model="showpay" mode="bottom" :closeable="closeable">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
<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.text}}
</view>
<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#1777FF" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<view class="pay_btn" @click="pay()">确认支付</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
vipExpirationTime:'',
showpay: false,
closeable: true,
openLists: [],
customStyle: {
width: '250rpx',
color: '#402321',
background: "#DFC5A7",
border: 0,
fontWeight: '700'
},
gridData: [{
title: '专享折上折',
image: '../static/1.png'
},
{
title: '特权礼物',
image: '../static/2.png'
},
{
title: '身份标识',
image: '../static/3.png'
},
{
title: '超值专享券',
image: '../static/4.png'
},
{
title: '商家特权',
image: '../static/5.png'
},
{
title: '定制挂件',
image: '../static/6.png'
}
],
avatar: '',
userName: '匿名',
vipList: [],
selNum: 1,
newPrice: 0,
money: 0,
price: 0,
MemberList: [],
isVip: false,
openWay: 2
}
},
onLoad() {
// #ifdef APP
this.openLists = [{
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
}, {
image: '../../static/images/my/zhifubao.png',
text: '支付宝',
id: 3
},{
image: '../../static/images/my/jinbi.png',
text: '零钱',
id: 1
}]
// #endif
// #ifdef MP-WEIXIN
this.openLists = [{
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
},{
image: '../../static/images/my/jinbi.png',
text: '零钱',
id: 1
}]
// #endif
// #ifdef H5
this.openLists = [{
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
},{
image: '../../static/images/my/zhifubao.png',
text: '支付宝',
id: 3
},{
image: '../../static/images/my/jinbi.png',
text: '零钱',
id: 1
}]
// #endif
this.avatar = uni.getStorageSync('avatar')
this.userName = uni.getStorageSync('userName')
this.getVipList()
this.getMemberList()
this.getMoney()
this.getIsVip()
this.getUserInfo()
},
methods: {
selectWay: function(item) {
this.openWay = item.id;
},
getUserInfo() {
this.$Request.get("/app/user/selectUserById").then(res => {
if (res.code == 0) {
this.avatar = res.data.avatar ? res.data.avatar : '../../static/logo.png'
uni.setStorageSync('avatar', res.data.avatar)
}
});
},
//获取VIP列表
getVipList() {
this.$Request.get('/app/common/type/313').then(res => {
if (res.code == 0) {
this.vipList = res.data
this.price = this.vipList.value
}
})
},
// 获取特权列表
getMemberList() {
this.$Request.get('/app/member/selectMemberList').then(res => {
if (res.code == 0) {
this.MemberList = res.data
}
})
},
getIsVip() {
this.$Request.get("/app/user/selectUserMessage").then(res => {
if (res.code == 0) {
this.vipExpirationTime = res.data.vipExpirationTime;
this.isVip = res.data.isVip==1?true:false
}
});
},
// 我的金币
getMoney() {
this.$Request.get("/app/userMoney/selectMyMoney").then(res => {
if (res.code == 0 && res.data) {
this.money = res.data.money
}
});
},
select(e) {
this.selNum = e.id
this.price = e.money
},
pay() {
let userId = uni.getStorageSync('userId')
this.showpay = false
if (this.openWay == 1) { //余额支付
this.$Request.post("/app/wxPay/balanceBuyVip").then(res => {
if (res.code == 0) {
this.$queue.showToast('支付成功');
setTimeout(function() {
uni.navigateBack()
}, 1000)
}else {
this.$queue.showToast(res.msg);
}
});
} else if (this.openWay == 2) { //微信支付
// #ifdef MP-WEIXIN
let data = {
type: 3
}
this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(res => {
console.log(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.showLoading({
title: '支付成功',
icon: 'none'
});
setTimeout(function() {
uni.navigateBack()
}, 1000)
},
fail: function(err) {
uni.showLoading({
title: '支付失败',
icon: 'nones'
});
}
});
}
});
// #endif
// #ifdef H5
let data = {
userId: userId,
type: 2
}
this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(res => {
this.showpay = false
this.callPay(res);
});
// #endif
// #ifdef APP
let data = {
type: 1
}
this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(res => {
console.log(res)
this.showpay = false
if (res.code == 0) {
this.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
}
});
// #endif
} else if (this.openWay == 3) { //支付宝支付
// #ifdef H5
let data = {
type: 5
}
this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(
res => {
this.showpay = false
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
});
// #endif
// #ifdef APP-PLUS
let data = {
type: 4
}
this.$Request.post('/app/wxPay/wxPayJsApiBuyVip', data).then(res => {
this.showpay = false
this.setPayment('alipay', res.data);
});
// #endif
}
},
callPay: function(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;
console.log(response)
if (!response.package) {
return;
}
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": response.appid, //公众号名称,由商户传入
"timeStamp": response.timestamp, //时间戳自1970年以来的秒数
"nonceStr": response.noncestr, //随机串
"package": response.package,
"signType": response.signType, //微信签名方式:
"paySign": response.sign //微信签名
},
function(res) {
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
uni.showLoading({
title: '支付成功'
});
uni.hideLoading();
uni.navigateTo({
url: '/pages/my/index'
})
} else {
uni.hideLoading();
}
WeixinJSBridge.log(response.err_msg);
}
);
},
isCheckPay(code, name, order) {
if (code == 0) {
console.log('999999999999')
this.setPayment(name, order);
} else {
uni.hideLoading();
uni.showToast({
title: '支付信息有误'
});
}
},
setPayment(name, order) {
console.log(777777777, name, order)
uni.requestPayment({
provider: name,
orderInfo: order, //微信、支付宝订单数据
success: function(res) {
uni.hideLoading();
uni.showLoading({
title: '支付成功',
icon: 'none'
});
setTimeout(function() {
uni.navigateBack()
}, 1000)
},
fail: function(err) {
uni.hideLoading();
},
complete() {
uni.hideLoading();
}
});
}
},
computed: {
}
}
</script>
<style>
.bg {
background-color: #1E1F31;
}
.btn {
width: 100%;
height: 88upx;
background: linear-gradient(0deg, #af8262 0%, #cab49c 100%);
border-radius: 44upx;
text-align: center;
line-height: 88upx;
margin-top: 40upx;
font-size: 34upx;
font-weight: 600;
color: #402321;
}
.active {
border: 1px solid #cab49c !important;
border-radius: ;
}
.popup_pay {
width: 100%;
position: relative;
padding-bottom: 45rpx;
}
.pay_btn {
width: 90%;
margin: 0 auto;
text-align: center;
background: #FCD202;
height: 80rpx;
border-radius: 16rpx;
color: #ffffff;
line-height: 80rpx;
}
</style>

498
my/wallet/index.vue Normal file
View File

@@ -0,0 +1,498 @@
<template>
<view class="pages">
<!-- 余额 -->
<view class="wallet">
<view class="wallet_header">
<view class="wallet_header_text">当前余额</view>
<view class="wallet_header_xin">
<view class="wallet_header_le">{{myMoney}} <text> </text></view>
</view>
</view>
</view>
<!-- 充值 -->
<view class="wallet_topup">
<view class="wallet_header_text">充值金额</view>
<view class="wallet_header_xin2">
<view class="wallet_header_xin2_sty" v-for="(item,index) in wallet" :key='index' :class="{topup:item.isSelect}" @tap="active(item)">
<view class="topup_img" v-if="item.isSelect">
<image src="../static/wallet/face.png" mode=""></image>
</view>
充值<text>{{item.money}}</text>
</view>
</view>
</view>
<!-- 消费 -->
<view class="wallet_header_consum" @click="record()">
<view class="wallet_header_consum_le">消费记录</view>
<view class="wallet_header_consum_ri">
<image src="../static/wallet/right1.png" mode="scaleToFill"></image>
</view>
</view>
<!-- 立即充值 -->
<view class="wallet_bottom" @click="showpay = true" >立即充值</view>
<!-- 支付方式 -->
<u-popup v-model="showpay" mode="bottom" :closeable="closeable">
<view class="popup_pay">
<view style="background-color: #fff;">
<view style="padding: 0 20upx;margin-top: 60rpx;margin-bottom: 20rpx;">
<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.text}}
</view>
<radio-group name="openWay" style="margin-left: 45upx;" @tap='selectWay(item)'>
<label class="tui-radio">
<radio color="#1777FF" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
</view>
<view class="pay_btn" @click="payment()">确认支付</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
showpay: false,
closeable: true,
openLists: [],
openWay: 2,
myMoney: 0,
wallet: [],
thisSelect: {}
}
},
onLoad() {
// #ifdef APP
this.openLists = [ {
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
}, {
image: '../../static/images/my/zhifubao.png',
text: '支付宝',
id: 3
}]
// #endif
// #ifdef MP-WEIXIN
this.openLists = [{
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
}]
// #endif
// #ifdef H5
this.openLists = [ {
image: '../../static/images/my/weixin.png',
text: '微信',
id: 2
}, {
image: '../../static/images/my/zhifubao.png',
text: '支付宝',
id: 3
}]
// #endif
},
onShow() {
this.deploy()
this.getMoneyNum()
},
methods: {
selectWay: function(item) {
this.openWay = item.id;
},
deploy() {
this.$Request.get("/app/topupmoney/selectTopUpMoney").then(res => {
if (res.code == 0) {
res.data.forEach(res=> {
res.isSelect = false
})
this.wallet = res.data
}
});
},
active(e) {
this.wallet.forEach(res => {
if (res.id == e.id) {
res.isSelect = true
this.thisSelect = e
} else {
res.isSelect = false
}
})
console.log(this.wallet)
},
record() {
uni.navigateTo({
url: '/my/wallet/walletDet'
})
},
getMoneyNum() {
this.$Request.get("/app/userMoney/selectMyMoney").then(res => {
if (res.code == 0) {
this.myMoney = res.data.money
}
});
},
payment() {
let that = this
that.showpay = false
if(!that.thisSelect.money) {
uni.showToast({
title: '请选择充值金额!',
icon: 'none'
})
return
}
if (that.openWay == 2) { //微信支付
// #ifdef MP-WEIXIN
that.$Request.post('/app/wxPay/wxPayJsApiMoney', {
money: that.thisSelect.money,
type: 3,
}).then(ret => {
uni.hideLoading()
uni.requestPayment({
provider: 'wxpay',
timeStamp: ret.data.timestamp,
nonceStr: ret.data.noncestr,
package: ret.data.package,
signType: ret.data.signType,
paySign: ret.data.sign,
success: function(suc) {
uni.showToast({
title: '支付成功',
icon: 'success'
})
that.getMoneyNum()
},
fail: function(err) {
console.log('fail:' + JSON.stringify(err));
uni.showToast({
title: '支付失败',
icon: 'none'
})
}
});
});
// #endif
// #ifdef APP
let data = {
type: 1,
money: that.thisSelect.money
}
that.$Request.post('/app/wxPay/wxPayJsApiMoney', data).then(res => {
console.log(res)
that.showpay = false
if (res.code == 0) {
that.isCheckPay(res.code, 'wxpay', JSON.stringify(res.data));
}
});
// #endif
// #ifdef H5
let data = {
money: that.thisSelect.money,
type: 2
}
this.$Request.post('/app/wxPay/wxPayJsApiMoney', data).then(res => {
this.showpay = false
that.callPay(res.data);
});
// #endif
} else if(that.openWay == 3) {
// #ifdef APP-PLUS
let data = {
type: 4,
money: that.thisSelect.money
}
that.$Request.post('/app/wxPay/wxPayJsApiMoney', data).then(res => {
that.showpay = false
that.setPayment('alipay', res.data);
});
// #endif
// #ifdef H5
let data = {
type: 5,
money: that.thisSelect.money
}
this.$Request.post('/app/wxPay/wxPayJsApiMoney', data).then(res => {
this.showpay = false
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
});
// #endif
}
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {
console.log(document.addEventListener,'999')
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 {
console.log(888)
this.onBridgeReady(response);
}
},
onBridgeReady: function(response) {
console.log(response)
let that = this;
if (!response.package) {
return;
}
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": response.appid, //公众号名称,由商户传入
"timeStamp": response.timestamp, //时间戳自1970年以来的秒数
"nonceStr": response.noncestr, //随机串
"package": response.package,
"signType": response.signType, //微信签名方式:
"paySign": response.sign //微信签名
},
function(res) {
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
uni.showLoading({
title: '支付成功'
});
uni.hideLoading();
that.getMoneyNum()
uni.navigateTo({
url: '/pages/my/index'
})
} else {
uni.hideLoading();
}
WeixinJSBridge.log(response.err_msg);
}
);
},
isCheckPay(code, name, order) {
if (code == 0) {
console.log('999999999999')
this.setPayment(name, order);
} else {
uni.hideLoading();
uni.showToast({
title: '支付信息有误'
});
}
},
setPayment(name, order) {
console.log(777777777, name, order)
uni.requestPayment({
provider: name,
orderInfo: order, //微信、支付宝订单数据
success: function(res) {
uni.hideLoading();
uni.showLoading({
title: '支付成功',
icon: 'none'
});
that.getMoneyNum()
// setTimeout(function() {
// uni.navigateBack()
// }, 1000)
},
fail: function(err) {
uni.hideLoading();
},
complete() {
uni.hideLoading();
}
});
}
}
}
</script>
<style scoped>
/* 余额 */
.wallet {
width: 100%;
height: 260rpx;
background: -webkit-linear-gradient(top, #FCD202, #F5F5F5);
}
.wallet_header {
width: 94%;
margin: 0 auto;
background-color: #FFFFFF;
border-radius: 18rpx;
position: relative;
top: 100rpx;
}
.wallet_header_text {
padding: 3% 3% 1%;
line-height: 32rpx;
font-size: 30rpx;
font-weight: 500;
color: #333333;
line-height: 32px;
}
.wallet_header_xin {
padding: 2% 3% 5%;
display: flex;
}
.wallet_header_le {
flex: 2;
font-size: 68rpx;
font-weight: 500;
color: #333333;
}
.wallet_header_le text {
font-size: 34rpx;
}
.wallet_header_ri {
margin-top: 20rpx;
}
.wallet_header_ri image {
width: 40rpx;
height: 30rpx;
}
.wallet_header_ri text {
font-size: 34rpx;
font-weight: 500;
color: #333333;
}
/* 充值 */
.wallet_topup {
width: 94%;
margin: 13% auto 0;
background-color: #FFFFFF;
border-radius: 18rpx;
padding: 0 0 3%;
}
.wallet_header_xin2 {
/* padding: 0 3% 2%; */
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 0 2%;
}
.wallet_header_xin2_sty {
width: 48.5%;
/* margin: 1% 0 0 3%; */
border: 2rpx solid #E6E6E6;
border-radius: 18rpx;
text-align: center;
line-height: 3;
margin-bottom: 2%;
}
.wallet_header_xin2_sty text {
font-size: 44rpx;
}
.wallet_header_xin2_sty:first-child {
margin-left: 0;
}
.topup {
color: #FF130A;
border: 2rpx solid #FF130A;
position: relative;
}
.topup_img {
position: absolute;
bottom: 61rpx;
}
.topup_img image {
width: 48rpx;
height: 40rpx;
}
/* 消费 */
.wallet_header_consum {
width: 94%;
margin: 3% auto;
background-color: #FFFFFF;
border-radius: 18rpx;
padding: 3%;
display: flex;
}
.wallet_header_consum_le {
width: 97%;
font-family: PingFang SC;
font-weight: 500;
color: #333333;
}
.wallet_header_consum_ri {
line-height: 1.5;
}
.wallet_header_consum_ri image {
width: 16rpx;
height: 28rpx;
}
/* 立即充值 */
.wallet_bottom {
width: 94%;
position: fixed;
bottom: 3%;
left: 3%;
line-height: 2.5;
background: #FCD202;
text-align: center;
border-radius: 49rpx;
font-size: 38rpx;
font-weight: bold;
color: #333333;
}
.popup_pay {
width: 100%;
position: relative;
padding-bottom: 45rpx;
}
.pay_btn {
width: 90%;
margin: 0 auto;
text-align: center;
background: #FCD202;
height: 80rpx;
border-radius: 16rpx;
color: #ffffff;
line-height: 80rpx;
}
</style>

137
my/wallet/walletDet.vue Normal file
View File

@@ -0,0 +1,137 @@
<template>
<view>
<view style="text-align: left;padding-bottom: 10rpx;">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<!-- <view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="margin-bottom: 8upx;color: #ecd4b4">充值</text>
<text v-if="item.type == 2" style="margin-bottom: 8upx;color: #ecd4b4">提现</text>
</view> -->
<view style="color: #999999;font-size: 28upx;">
<view style="margin-bottom: 8upx">{{item.title}}</view>
<!-- <view v-if="item.classify === 2" style="margin-bottom: 8upx"> 返佣类型直属返佣</view> -->
<!-- <view v-if="item.classify === 3" style="margin-bottom: 8upx"> 返佣类型非直属支付</view> -->
<view style="margin-bottom: 8upx">{{item.content}}</view>
<view style="margin-bottom: 8upx"> 创建时间{{item.createTime}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<text v-if="item.type == 1" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text
class="text-olive">+</text>{{item.money}}</text>
<text v-if="item.type == 2" style="color: #ecd4b4;font-size: 32upx;font-weight: 600"><text
class="text-red">-</text>{{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="暂无明细数据" show="false"></empty> -->
<empty v-if="list.length == 0" content="暂无明细"></empty>
</view>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
limit: 10,
tabIndex: 1,
checkReZhiShu: '否',
checkReTuanZhang: '否',
checkReFeiZhiShu: '否',
scrollTop: false,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
},
totalCount: 0
}
},
onLoad() {
this.$queue.showLoading("加载中...");
this.getList();
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
methods: {
getList() {
let data = {
page: this.page,
limit: this.limit,
classify: 3
}
this.$Request.get('/app/userMoney/balanceDetailed', data).then(res => {
if (res.code === 0) {
this.totalCount = res.data.totalCount
if (this.page === 1) {
this.list = res.data.list;
} else {
this.list = [...this.list, ...res.data.list];
}
}
uni.stopPullDownRefresh();
uni.hideLoading();
});
}
},
onReachBottom: function() {
if(this.list.length<this.totalCount) {
this.page = this.page + 1;
this.getList()
} else {
uni.showToast({
title: '已经到底了',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.getList();
}
}
</script>
<style lang="less">
page {
// background: #1c1b20;
}
.tui-tab-item-title {
// color: #ffffff;
font-size: 30rpx;
height: 80rpx;
line-height: 80rpx;
flex-wrap: nowrap;
white-space: nowrap;
}
.tui-tab-item-title-active {
border-bottom: 1px solid #5E81F9;
color: #5E81F9;
font-size: 32upx;
font-weight: bold;
border-bottom-width: 6upx;
text-align: center;
}
.item {
background: #FFFFFF;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
</style>