This commit is contained in:
Mr.jiang 2024-08-13 14:08:40 +08:00
parent 21111c21b8
commit 677be5d3eb
5 changed files with 173 additions and 174 deletions

View File

@ -1,6 +1,6 @@
<template> <template>
<view style="width: 100%;" class="refresh-body" @touchmove.stop.prevent> <view style="width: 100%;" class="refresh-body" @touchmove.stop.prevent>
<scroll-view scroll-y @scroll="scroll" @touchstart="touchstart" @scrolltolower="loadMore" @touchmove="touchmove" @touchend="touchend" class="refresh-scroll"> <scroll-view @touchmove.stop scroll-y @scroll="scroll" @touchstart="touchstart" @scrolltolower="loadMore" @touchmove="touchmove" @touchend="touchend" class="refresh-scroll">
<view class="content"> <view class="content">
<slot name="content"></slot> <slot name="content"></slot>
<view class="t-loading-box" v-if="loadingType!=3&&openLoadMore" @click="loadMore"> <view class="t-loading-box" v-if="loadingType!=3&&openLoadMore" @click="loadMore">

View File

@ -1,15 +1,9 @@
<template> <template>
<view style="height: 100vh;width: 100%;overflow: scroll;"> <view class="hb-view">
<!-- <view class="flex align-center justify-between you-nav"> <t-refresh ref="refresh" v-if="hongbao.length>0" @refresh="refresh" @loadMore="loadMore"
<view v-for="(item,index) in tab" :key="index" class="text-center box" :loadingType="loadingType" :tPadding="0">
:class="tabIndex == index?'tanColor':''" @click="bindTab(item.state)">
<view style="z-index: 9;">{{item.name}}</view>
<view class="" :class="tabIndex == index?'line':''"></view>
</view>
</view> -->
<t-refresh ref="refresh" v-if="hongbao.length>0" @refresh="refresh" @loadMore="loadMore" :loadingType="loadingType" :tPadding="0">
<template slot="content"> <template slot="content">
<checkbox-group @change="checkboxChange" > <checkbox-group @change="checkboxChange">
<view> <view>
<view class="youhui-weiyong youhui-list" v-for="(item,index) in hongbao" :key="index"> <view class="youhui-weiyong youhui-list" v-for="(item,index) in hongbao" :key="index">
<view class="youhui-view-left"> <view class="youhui-view-left">
@ -24,7 +18,6 @@
<view class="youhui-view-right"> <view class="youhui-view-right">
<view class="youhui-view-right-top"> <view class="youhui-view-right-top">
<view class="youhui-view-right-title">{{item.couponName}}</view> <view class="youhui-view-right-title">{{item.couponName}}</view>
<!-- <view class="youhui-view-right-time">{{item.endDate}}</view> -->
</view> </view>
</view> </view>
</view> </view>
@ -36,9 +29,9 @@
<view class="push-button" @tap="shiYong()" v-if="isCoupon==null"> <view class="push-button" @tap="shiYong()" v-if="isCoupon==null">
<span class="que-btn">立即领取</span> <span class="que-btn">立即领取</span>
</view> </view>
<view class="push-button" v-else> <view class="push-button" v-else>
<span class="que-btn2">已经领取</span> <span class="que-btn2">已经领取</span>
</view> </view>
<empty v-if="hongbao.length==0"></empty> <empty v-if="hongbao.length==0"></empty>
</view> </view>
</template> </template>
@ -47,23 +40,12 @@
import tRefresh from "@/components/t-refresh/t-refresh.vue" import tRefresh from "@/components/t-refresh/t-refresh.vue"
import empty from '@/components/empty.vue' import empty from '@/components/empty.vue'
export default { export default {
components:{ components: {
empty, empty,
tRefresh tRefresh
}, },
data() { data() {
return { return {
tab: [{
name: '可使用',
state: 0
}, {
name: '已使用',
state: 1
}, {
name: '已失效',
state: 2
}],
tabIndex: 0,
hongbao: [], hongbao: [],
page: 1, page: 1,
size: 10, size: 10,
@ -74,79 +56,75 @@
contentrefresh: '正在加载...', contentrefresh: '正在加载...',
contentnomore: '没有更多数据了' contentnomore: '没有更多数据了'
}, },
isCoupon: 0 isCoupon: 0
} }
}, },
onLoad() { onLoad() {
this.getMyList(); this.getMyList();
this.getUserInfo(); this.getUserInfo();
}, },
methods: { methods: {
shiYong(){ shiYong() {
var that=this; var that = this;
that.$Request.get('/app/coupon/insertNewUserCoupon').then(res => { that.$Request.get('/app/coupon/insertNewUserCoupon').then(res => {
if (res.code == 0) { if (res.code == 0) {
uni.showToast({ uni.showToast({
// title:'' // title:''
icon:'success', icon: 'success',
title:"领取成功" title: "领取成功"
}) })
setTimeout(()=>{this.goHome()},1500) setTimeout(() => {
}else{ this.goHome()
}, 1500)
} else {
uni.showToast({ uni.showToast({
icon:'error', icon: 'error',
title:res.msg title: res.msg
}) })
} }
}) })
}, },
goHome(){ goHome() {
uni.switchTab({ uni.switchTab({
url:'/pages/index/index' url: '/pages/index/index'
}) })
}, },
// //
loadMore: async function() { loadMore: async function() {
//loadingType: 0. 1. 2. //loadingType: 0. 1. 2.
if(this.loadingType==0){ if (this.loadingType == 0) {
this.loadingType=2 this.loadingType = 2
// //
setTimeout(()=>{ setTimeout(() => {
this.page++; this.page++;
this.loadingType=0; this.loadingType = 0;
this.getData() this.getData()
},1000) }, 1000)
} }
}, },
getUserInfo() { getUserInfo() {
this.$Request.getT('/app/user/selectUserById').then(res => { this.$Request.getT('/app/user/selectUserById').then(res => {
if (res.code == 0) { if (res.code == 0) {
this.isCoupon = res.data.isCoupon; this.isCoupon = res.data.isCoupon;
console.log(this.isCoupon); console.log(this.isCoupon);
} }
}) })
}, },
getMyList() { getMyList() {
this.loadingType = 1; this.loadingType = 1;
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}); });
this.$Request.getT('/app/coupon/selectNewUserCoupon?page='+this.page+'&limit='+this.size).then(res => { this.$Request.getT('/app/coupon/selectNewUserCoupon?page=' + this.page + '&limit=' + this.size).then(
res => {
if (res.code == 0) { if (res.code == 0) {
if (this.page == 1) this.hongbao = []; // if (this.page == 1) this.hongbao = []; //
this.hongbao = [...this.hongbao, ...res.data.list]; // this.hongbao = [...this.hongbao, ...res.data.list]; //
} else { }
this.loadingType = 2;
}
uni.hideLoading(); uni.hideLoading();
}); });
}, },
bindTab(index) {
this.tabIndex = index
this.hongbao = [];
this.page = 1;
this.getMyList();
}
}, },
onPageScroll: function(e) { onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200; this.scrollTop = e.scrollTop > 200;
@ -163,21 +141,28 @@
</script> </script>
<style scoped> <style scoped>
/deep/.refresh-body{ .hb-view{
width: 100%;
/* height: 100vh;
overflow: scroll; */
}
/deep/.refresh-body {
height: 870px !important; height: 870px !important;
margin-bottom: 60rpx; margin-bottom: 60rpx;
} }
.push-button{
width: 100%; .push-button {
height: 48px; width: 100%;
position: fixed; height: 48px;
bottom: 0px; position: fixed;
display: flex; bottom: 0px;
flex-direction: column; display: flex;
align-items: center; flex-direction: column;
margin: 0 auto; align-items: center;
margin: 0 auto;
} }
.que-btn{
.que-btn {
display: inline-block; display: inline-block;
width: 90%; width: 90%;
text-align: center; text-align: center;
@ -190,44 +175,48 @@
font-size: 34rpx; font-size: 34rpx;
} }
.que-btn2{ .que-btn2 {
display: inline-block; display: inline-block;
width: 90%; width: 90%;
text-align: center; text-align: center;
background: linear-gradient(90deg, #949494, #b4b4b4, #c5c5c5); background: linear-gradient(90deg, #949494, #b4b4b4, #c5c5c5);
height: 40px; height: 40px;
border-radius: 28px; border-radius: 28px;
color: #ffffff; color: #ffffff;
line-height: 40px; line-height: 40px;
margin-top: 4px; margin-top: 4px;
font-size: 34rpx; font-size: 34rpx;
} }
/deep/.page-box{ /deep/.page-box {
width: 100%; width: 100%;
} }
.youhui-img{
.youhui-img {
width: 111.81rpx; width: 111.81rpx;
height: 111.81rpx; height: 111.81rpx;
} }
.youhui-view-right-time{ .youhui-view-right-time {
font-weight: 400; font-weight: 400;
font-size: 22rpx; font-size: 22rpx;
color: #999999; color: #999999;
} }
.youhui-view-right-title{
.youhui-view-right-title {
width: 260rpx; width: 260rpx;
font-weight: 400; font-weight: 400;
font-size: 28rpx; font-size: 28rpx;
color: #333333; color: #333333;
} }
.youhui-view-right-top{
.youhui-view-right-top {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
} }
.youhui-view-right{
.youhui-view-right {
width: 502.08rpx; width: 502.08rpx;
height: 100%; height: 100%;
display: flex; display: flex;
@ -235,40 +224,48 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.youhui-view-left-bottom{
.youhui-view-left-bottom {
font-weight: 400; font-weight: 400;
font-size: 22rpx; font-size: 22rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.youhui-view-left-yuan{
.youhui-view-left-yuan {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: baseline; align-items: baseline;
color: #FFFFFF; color: #FFFFFF;
} }
.youhui-view-left-num{
.youhui-view-left-num {
font-weight: bold; font-weight: bold;
font-size: 89rpx; font-size: 89rpx;
} }
.youhui-view-left-text{
.youhui-view-left-text {
font-weight: bold; font-weight: bold;
font-size:24.31rpx; font-size: 24.31rpx;
} }
.youhui-view-left{
.youhui-view-left {
width: 199rpx; width: 199rpx;
height: 242rpx; height: 242rpx;
display: flex; display: flex;
flex-direction:column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.youhui-yiyong{
.youhui-yiyong {
background-image: url('../../static/youhuijuan/coupons7.png'); background-image: url('../../static/youhuijuan/coupons7.png');
} }
.youhui-weiyong{
.youhui-weiyong {
background-image: url('../../static/youhuijuan/coupons1.png'); background-image: url('../../static/youhuijuan/coupons1.png');
} }
.youhui-list{
.youhui-list {
width: 95%; width: 95%;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -278,10 +275,12 @@
margin: 10px auto; margin: 10px auto;
justify-content: space-between; justify-content: space-between;
} }
.you-nav{
.you-nav {
background: #FFFFFF; background: #FFFFFF;
padding: 14px 25px 0px 25px; padding: 14px 25px 0px 25px;
} }
page { page {
background: #F5F5F5; background: #F5F5F5;
} }
@ -328,4 +327,4 @@
color: #FF130A; color: #FF130A;
font-size: 24upx; font-size: 24upx;
} }
</style> </style>

View File

@ -430,7 +430,7 @@
let that = this let that = this
that.getBannerList() that.getBannerList()
that.remen() that.remen()
that.getKTCityList(); // that.getKTCityList();
// //
if (e.invitation) { if (e.invitation) {
that.$queue.setData('inviterCode', e.invitation); that.$queue.setData('inviterCode', e.invitation);
@ -512,7 +512,7 @@
// #endif // #endif
// this.city = uni.getStorageSync('city')// // this.city = uni.getStorageSync('city')//
that.getIsVip() that.getIsVip()
that.getKTCityList(); // that.getKTCityList();
that.getHomeArtificerList(); that.getHomeArtificerList();
that.getHomeNearbyList(); that.getHomeNearbyList();
}else{ }else{
@ -627,9 +627,8 @@
let streetNumber = response.data.regeocode.addressComponent.streetNumber.street; let streetNumber = response.data.regeocode.addressComponent.streetNumber.street;
let number = response.data.regeocode.addressComponent.streetNumber.number; let number = response.data.regeocode.addressComponent.streetNumber.number;
that.city = address.replace(province,'').replace(city,'').replace(district,'').replace(streetNumber,'').replace(number,'').replace(township,'') that.city = address.replace(province,'').replace(city,'').replace(district,'').replace(streetNumber,'').replace(number,'').replace(township,'')
// that.city=that.latadd that.page = 1;
that.page = 1 that.getTpCount();
that.getKTCityList();
} else { } else {
console.log('逆地理编码失败', response.data); console.log('逆地理编码失败', response.data);
} }
@ -932,11 +931,11 @@
}, },
getCity(e) { getCity(e) {
this.city = e[0].label; // this.city = e[0].label;
uni.setStorageSync('city', this.city) // uni.setStorageSync('city', this.city)
this.getKTCityList(); // this.getKTCityList();
this.getHomeArtificerList(); // this.getHomeArtificerList();
this.getHomeNearbyList(); // this.getHomeNearbyList();
// this.page = 1 // this.page = 1
// this.getlist() // this.getlist()
}, },

View File

@ -25,7 +25,7 @@
<view class="bg margin-top padding-lr" style="border-radius: 20rpx; padding: 20rpx 35rpx;"> <view class="bg margin-top padding-lr" style="border-radius: 20rpx; padding: 20rpx 35rpx;">
<view> <view>
<view v-for="(item,index) in openLists" :key='index'> <view v-for="(item,index) in openLists" :key='index'>
<view class="align-center justify-between" <!-- <view class="align-center justify-between"
style="display: flex;height: 100upx;padding: 20upx 0;" style="display: flex;height: 100upx;padding: 20upx 0;"
v-if="item.text === '微信' && wxTxSel != '否'"> v-if="item.text === '微信' && wxTxSel != '否'">
<view class="flex align-center"> <view class="flex align-center">
@ -39,7 +39,7 @@
<radio color="#029d88" :checked="openWay === item.id ? true : false" /> <radio color="#029d88" :checked="openWay === item.id ? true : false" />
</label> </label>
</radio-group> </radio-group>
</view> </view> -->
<view class="align-center justify-between" <view class="align-center justify-between"
style="display: flex;height: 100upx;padding: 20upx 0;" style="display: flex;height: 100upx;padding: 20upx 0;"
v-if="item.text === '银联' && ylTxSel != '否'"> v-if="item.text === '银联' && ylTxSel != '否'">
@ -75,9 +75,7 @@
v-if="XCXIsSelect != '否'"> v-if="XCXIsSelect != '否'">
<view class="flex align-center justify-between" @click="goNav('/my/wallet/zhifubao')"> <view class="flex align-center justify-between" @click="goNav('/my/wallet/zhifubao')">
<view class="flex align-center"> <view class="flex align-center">
<!-- <image
src="https://admin.sjajk.com/file/uploadPath/2023/01/03/da75d52b95a64fc349d0353ab16cb719.png"
style="width: 44rpx;height: 44rpx;"></image> -->
<view>提现账号</view> <view>提现账号</view>
</view> </view>
<image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image> <image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image>
@ -85,9 +83,7 @@
<view class="flex align-center justify-between margin-top-xl" <view class="flex align-center justify-between margin-top-xl"
@click="goNav('/my/wallet/mymoneydetail?navName='+navName)"> @click="goNav('/my/wallet/mymoneydetail?navName='+navName)">
<view class="flex align-center"> <view class="flex align-center">
<!-- <image
src="https://admin.sjajk.com/file/uploadPath/2023/01/03/ba45c8489a14029c1782ac0a28fd8a49.png"
style="width: 48rpx;height: 34rpx;"></image> -->
<view>钱包明细</view> <view>钱包明细</view>
</view> </view>
<image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image> <image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image>
@ -95,9 +91,7 @@
<view class="flex align-center justify-between margin-top-xl" @click="goNav('/pages/my/applyBroker/withdrawalRecord?navName='+navName)"> <view class="flex align-center justify-between margin-top-xl" @click="goNav('/pages/my/applyBroker/withdrawalRecord?navName='+navName)">
<view class="flex align-center"> <view class="flex align-center">
<!-- <image
src="https://admin.sjajk.com/file/uploadPath/2023/01/03/e90eb8a74548dc3b11c3c856e24e6fbc.png"
style="width: 40rpx;height: 52rpx;"></image> -->
<view>提现记录</view> <view>提现记录</view>
</view> </view>
<image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image> <image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image>
@ -105,9 +99,7 @@
<view class="flex align-center justify-between margin-top-xl" @click="goNav('/my/wallet/yinhangka')" <view class="flex align-center justify-between margin-top-xl" @click="goNav('/my/wallet/yinhangka')"
v-if="ylTxSel != '否'"> v-if="ylTxSel != '否'">
<view class="flex align-center"> <view class="flex align-center">
<!-- <image
src="https://admin.sjajk.com/file/uploadPath/2023/01/03/ba45c8489a14029c1782ac0a28fd8a49.png"
style="width: 48rpx;height: 34rpx;"></image> -->
<view>银行卡账号</view> <view>银行卡账号</view>
</view> </view>
<image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image> <image src="../../../static/img/you.png" style="width: 16rpx;height: 28rpx;"></image>

View File

@ -215,7 +215,7 @@
</view> </view>
</view> </view>
<!-- 经验筛选 --> <!-- 经验筛选 -->
<u-select v-model="Cityshow" :list="cityList" @confirm="getCity"></u-select> <!-- <u-select v-model="Cityshow" :list="cityList" @confirm="getCity"></u-select> -->
</view> </view>
</template> </template>
<script> <script>
@ -352,9 +352,11 @@ import permision from "@/components/permission.js";
that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude)); that.infoWindow.setPosition(new TMap.LatLng(res.latitude, res.longitude));
} }
that.page = 1; that.page = 1;
console.log(333333)
that.selectCity(that.longitude,that.latitude) that.selectCity(that.longitude,that.latitude)
}, },
fail: function(e) { fail: function(e) {
that.getlist()
console.log('获取地址失败1', e) console.log('获取地址失败1', e)
// #ifdef APP-PLUS // #ifdef APP-PLUS
that.checkPermission(); that.checkPermission();
@ -396,9 +398,9 @@ import permision from "@/components/permission.js";
that.latitude = location[1] that.latitude = location[1]
that.componentKey++ that.componentKey++
that.initMap(); that.initMap();
console.log("location========>",add) console.log("location========>location",add)
} }
that.getKTCityList(); // that.getKTCityList();
that.getTpCount(); that.getTpCount();
that.getTpMy(); that.getTpMy();
that.userId = uni.getStorageSync('userId') that.userId = uni.getStorageSync('userId')
@ -413,20 +415,24 @@ import permision from "@/components/permission.js";
that.page = 1 that.page = 1
// that.selectCity(that.latitude,that.longitude) // that.selectCity(that.latitude,that.longitude)
that.getlist() that.getlist()
console.log(11111111)
} else { } else {
console.log(22222222)
uni.getLocation({ uni.getLocation({
type: 'gcj02', type: 'gcj02',
highAccuracyExpireTime: 500, highAccuracyExpireTime: 500,
geocode: true, //true geocode: true, //true
success: function(res) { success: function(res) {
console.log(res, '地理位置onShow') console.log(res, '地理位置onShow')
that.latitude = res.latitude that.latitude = res.latitude;
that.longitude = res.longitude that.longitude = res.longitude;
that.page = 1 that.page = 1;
that.getTypeList(); that.selectCity(that.longitude,that.latitude)
// that.getTypeList();
// that.getlist() // that.getlist()
}, },
fail: function() { fail: function() {
that.getlist()
console.log('获取地址失败2') console.log('获取地址失败2')
} }
}) })
@ -452,6 +458,39 @@ import permision from "@/components/permission.js";
//this.closeSocket(); //this.closeSocket();
}, },
methods: { methods: {
selectCity(longitude, latitude) {
var that=this;
var longitude = that.longitude;
var latitude = that.latitude;
let amapKey = that.Key2; // API Key
let url = `https://restapi.amap.com/v3/geocode/regeo?key=${amapKey}&location=${longitude},${latitude}&radius=1000`;
uni.request({
url: url,
success: (response) => {
if(response.data && response.data.regeocode) {
let address = response.data.regeocode.formatted_address;
let province = response.data.regeocode.addressComponent.province;
let city = response.data.regeocode.addressComponent.city;
let district = response.data.regeocode.addressComponent.district;
let township = response.data.regeocode.addressComponent.township;
let streetNumber = response.data.regeocode.addressComponent.streetNumber.street;
let number = response.data.regeocode.addressComponent.streetNumber.number;
that.cityname = address.replace(province,'').replace(city,'').replace(district,'').replace(streetNumber,'').replace(number,'').replace(township,'')
that.city=city
that.page = 1
that.getlist()
// that.getKTCityList();
var add=uni.getStorageSync('cityTherapist');
console.log('getStorageSync===========', add);
} else {
console.log('逆地理编码失败', response.data);
}
},
fail: (error) => {
console.log('网络请求失败', error);
}
});
},
changeClick(index,item){ changeClick(index,item){
this.artificerName=''; this.artificerName='';
this.technicianType=item.id; this.technicianType=item.id;
@ -679,12 +718,12 @@ import permision from "@/components/permission.js";
}); });
}, },
getCity(e) { getCity(e) {
console.log("得到的城市-------------》",e[0].label); // console.log("-------------",e[0].label);
this.city = e[0].label; // this.city = e[0].label;
uni.setStorageSync('city', this.city) // uni.setStorageSync('city', this.city)
this.getKTCityList(); // this.getKTCityList();
this.page = 1 // this.page = 1
this.getlist() // this.getlist()
}, },
getKTCityList() { getKTCityList() {
let cityName; let cityName;
@ -737,37 +776,7 @@ import permision from "@/components/permission.js";
} }
}); });
}, },
selectCity(longitude, latitude) {
var that=this;
var longitude = that.longitude;
var latitude = that.latitude;
let amapKey = that.Key2; // API Key
let url = `https://restapi.amap.com/v3/geocode/regeo?key=${amapKey}&location=${longitude},${latitude}&radius=1000`;
uni.request({
url: url,
success: (response) => {
if(response.data && response.data.regeocode) {
let address = response.data.regeocode.formatted_address;
let province = response.data.regeocode.addressComponent.province;
let city = response.data.regeocode.addressComponent.city;
let district = response.data.regeocode.addressComponent.district;
let township = response.data.regeocode.addressComponent.township;
let streetNumber = response.data.regeocode.addressComponent.streetNumber.street;
let number = response.data.regeocode.addressComponent.streetNumber.number;
that.cityname = address.replace(province,'').replace(city,'').replace(district,'').replace(streetNumber,'').replace(number,'').replace(township,'')
that.city=city
that.page = 1
that.getlist()
that.getKTCityList();
} else {
console.log('逆地理编码失败', response.data);
}
},
fail: (error) => {
console.log('网络请求失败', error);
}
});
},
tanChange(index, item) { tanChange(index, item) {
this.orderIndex = index this.orderIndex = index
this.tabIndex = item.id this.tabIndex = item.id