作者 lihongjuan

1

... ... @@ -742,7 +742,7 @@
height: 4rpx;
background: #C29445;
position: absolute;
bottom: -30rpx;
bottom: -22rpx;
left: 50%;
transform: translateX(-50%);
... ... @@ -1134,4 +1134,24 @@
text-align: center;
margin-top: 30rpx;
}
.add{
width:750rpx;
height:116rpx;
background: #fff;
position: fixed;
bottom:0;
left:0;
display:flex;
justify-content: center;
align-items: center;
}
.addcount{
width:686rpx;
height:88rpx;
background:#C29445;
color:#fff;
font-size: 32rpx;
text-align: center;
line-height: 88rpx;
}
</style>
... ...
{
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/homepage/homepage",
"style": {
... ... @@ -22,6 +20,7 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/nearshop/allprovince",
"style": {
... ... @@ -54,10 +53,7 @@
"navigationBarTextStyle": "black"
}
},
{
"path": "pages/nearshop/cartlist",
"style": {
... ... @@ -82,7 +78,7 @@
"navigationBarTitleText": "等级考试",
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black"
}
},
{
... ... @@ -625,6 +621,6 @@
"navigationBarBackgroundColor": "#fff",
"backgroundColor": "#fff"
}
}
... ...
... ... @@ -3,56 +3,64 @@
<uni-swipe-action>
<uni-swipe-action-item v-for="(item,index) in swipeList" :options="item.options" :key="item.id" @change="swipeChange"
@click="swipeClick($event,index)">
<!-- <text class="cont">{{item.content}}</text> -->
<view class="searchshop commnonpadding">
>
<!-- <text class="cont">{{item.content}}</text> -->
<!-- @click="swipeClick($event,index)" -->
<view class="searchshop commnonpadding" @click.stop="shopdetail" :data-id="item.store_id">
<view class="searchgooditem flex boxsizing">
<view class="shopleftimg">
<image src="../../static/shop.png" mode=""></image>
<image :src="item.store.image" mode=""></image>
</view>
<view class="shopright">
<view class="shopname">湖北省南阳市南阳面粉厂</view>
<view class="shopname">{{item.store.name}}</view>
<view class="shopmiddle flexone">
<view class="shopmiddleleft">
8.2
{{item.store.score}}
</view>
<view class="shopmiddleright">
<view class="star flex">
<view class="starimg">
<image src="../../static/shixing.png" mode=""></image>
<image src="../../static/shixing.png" mode="" v-if="item.store.star>=2"></image>
<image src="../../static/kongxing.png" mode="" v-else></image>
</view>
<view class="starimg">
<image src="../../static/shixing.png" mode=""></image>
<image src="../../static/shixing.png" mode="" v-if="item.store.star>=4"></image>
<image src="../../static/kongxing.png" mode="" v-else></image>
</view>
<view class="starimg">
<image src="../../static/shixing.png" mode=""></image>
<image src="../../static/shixing.png" mode="" v-if="item.store.star>=6"></image>
<image src="../../static/kongxing.png" mode="" v-else></image>
</view>
<view class="starimg">
<image src="../../static/shixing.png" mode=""></image>
<image src="../../static/shixing.png" mode="" v-if="item.store.star>=8"></image>
<image src="../../static/kongxing.png" mode="" v-else></image>
</view>
<view class="starimg">
<image src="../../static/kongxing.png" mode=""></image>
<image src="../../static/shixing.png" mode="" v-if="item.store.star>=10"></image>
<image src="../../static/kongxing.png" mode="" v-else></image>
</view>
</view>
<view class="haoping">好评率96%</view>
<view class="haoping">好评率{{item.store.probability}}%</view>
</view>
</view>
<view class="shopdizhi flexone">
<view class="shopdiimg">
<image src="../../static/shopaddress.png" mode=""></image>
</view>
<view class='shopli'>距离256km</view>
<view class='shopli'>距离{{item.store.distance}}km</view>
</view>
</view>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</template>
<script>
import app from "../../App.vue";
import uniSection from '@/components/uni-section/uni-section.vue'
import uniSwipeAction from '@/components/uni-swipe-action/uni-swipe-action.vue'
import uniSwipeActionItem from '@/components/uni-swipe-action-item/uni-swipe-action-item.vue'
... ... @@ -82,8 +90,50 @@
this.$nextTick(() => {
this.isOpened = true
})
// 获取店铺收藏列表
this.getcollectshop()
},
methods: {
// 获取收藏店铺
getcollectshop() {
let that = this;
var url = 'store/collect_list';
var params = {
}
console.log(params)
app.post(url, params).then((res) => {
let shoplist = res.data.data;
shoplist.forEach(function(value, index, array) {
value.options = [{
text: '取消收藏',
style: {
backgroundColor: '#DAD7DB'
}
}]
})
that.swipeList = shoplist;
this.$forceUpdate()
console.log(that.swipeList)
console.log(res)
}).catch((err) => {
console.log(err)
})
},
// 店铺详情
shopdetail(e) {
console.log(33493490)
let id = e.currentTarget.dataset.id;
console.log(id)
uni.navigateTo({
url: '/pages/nearshop/shopdetail?shopid=' + id
})
},
bindClick(e) {
uni.showToast({
title: `点击了${e.content.text}按钮`,
... ... @@ -102,7 +152,7 @@
},
swipeClick(e, index) {
console.log(e)
let {
content
} = e
... ... @@ -149,12 +199,12 @@
// })
// }
// }
console.log('777889789')
uni.showToast({
title: `点击了${e.content.text}按钮`,
icon: 'none'
})
console.log('777889789')
uni.showToast({
title: `点击了${e.content.text}按钮`,
icon: 'none'
})
}
}
... ...
... ... @@ -36,7 +36,7 @@
<view class="homename">面访用品</view>
</view>
<view class="homeboxitem flexfour">
<view class="homeboxitem flexfour" @click="collectshop">
<view class="homeitemimg">
<image src="../../static/shopcollect.png" mode=""></image>
</view>
... ... @@ -215,7 +215,6 @@
}
},
methods: {
getlocation() {
let that=this;
uni.getLocation({
... ... @@ -224,7 +223,7 @@
console.log('当前位置的经度:' + res.longitude);
console.log('当前位置的纬度:' + res.latitude);
uni.setStorageSync("longitude",res.longitude);
uni.setStorageSync("latitude",res.longitude)
uni.setStorageSync("latitude",res.latitude)
var point = new plus.maps.Point(res.longitude, res.latitude);
plus.maps.Map.reverseGeocode(
point, {},
... ... @@ -246,7 +245,8 @@
that.provincename=uni.getStorageSync("provincename")
}
console.log(that.provincename)
console.log(that.provincename);
that.changeinfo()
// that.getprovinceid()
// _this.addressList = address.match(reg).toString().split(",");
... ... @@ -261,6 +261,24 @@
}
});
},
// 修改个人信息
changeinfo(){
let that = this;
var url = 'member/update_user';
var params = {
avatar:'',
nickname:'',
longitude:uni.getStorageSync("longitude"),
latitude:uni.getStorageSync("latitude")
}
console.log(params)
app.post(url, params).then((res) => {
console.log(res);
this.carttotal=res.data.data.total
}).catch((err) => {
})
},
// 获取购物车气泡
getcartnum(){
let that = this;
... ... @@ -271,14 +289,18 @@
app.post(url, params).then((res) => {
console.log(res);
this.carttotal=res.data.data.total
}).catch((err) => {
})
},
// 店铺收藏
collectshop(){
uni.navigateTo({
url:"/pages/homepage/collectshop"
})
},
// 抽奖专区
choujiang() {
uni.navigateTo({
... ...
... ... @@ -8,21 +8,25 @@
</view>
<view class="miaoshatime flexthree">
<view class='miaoname'>距离开始</view>
<view class='miaotime miaohour boxsizing'>8</view>
<!-- days:'',
hours:'',
minutes:'',
seconds:'', -->
<view class='miaotime miaohour boxsizing'>{{days}}</view>
<view class="miaoname">天</view>
<view class="miaofen flexone miaohour">
<view class='miaotime miaok'>2</view>
<view class='miaotime'>3</view>
<view class='miaotime miaok'>{{hours}}</view>
<!-- <view class='miaotime'>3</view> -->
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>4</view>
<view class='miaotime boxsizing'>5</view>
<view class='miaotime boxsizing miaok'>{{minutes}}</view>
<!-- <view class='miaotime boxsizing'>5</view> -->
</view>
<view class="miaoname">:</view>
<view class="miaofen flexone miaohour">
<view class='miaotime boxsizing miaok'>1</view>
<view class='miaotime boxsizing'>2</view>
<view class='miaotime boxsizing miaok'>{{seconds}}</view>
<!-- <view class='miaotime boxsizing'>2</view> -->
</view>
</view>
... ... @@ -51,7 +55,6 @@
</view>
</view>
</view>
<!-- <view class="searchgooditem flexone boxsizing">
<view class="gooditemleft">
<image src="../../static/goopic.png" mode=""></image>
... ... @@ -123,13 +126,80 @@
return {
showbanben: false,
page:1,
orderlist:[]
orderlist:[],
days:'',
hours:'',
minutes:'',
seconds:'',
}
},
onLoad() {
this.getmiaosha()
this.getmiaosha();
this.getTime()
},
methods: {
// 获取倒计时
getTime(){
let that = this;
var url = 'flour_goods/seckill_setting';
var params = {
}
console.log(params)
app.post(url,params, "post").then((res) => {
console.log(res);
let remaintime=res.data.data.endtime-res.data.data.starttime
let number = remaintime;
// 时间戳处理
var totalSecond = number;
console.log(totalSecond);
var interval = setInterval(function () {
// 秒数
var second = totalSecond;
// 天数位
var day = Math.floor(second/3600/24);
var dayStr = day.toString();
if (dayStr.length == 1) dayStr = '0' + dayStr;
// 小时位
var hr = Math.floor((second - day * 3600 * 24) / 3600);
var hrStr = hr.toString();
if (hrStr.length == 1) hrStr = '0' + hrStr;
// 分钟位
var min = Math.floor((second - day * 3600 * 24 - hr * 3600) / 60);
var minStr = min.toString();
if (minStr.length == 1) minStr = '0' + minStr;
// 秒位
var sec = second - day * 3600 * 24 - hr * 3600 - min * 60;
var secStr = sec.toString();
if (secStr.length == 1) secStr = '0' + secStr;
that.days=dayStr;
that.hours=hrStr;
that.minutes=minStr;
that.seconds=secStr;
totalSecond--;
if (totalSecond <= 0) {
clearInterval(interval);
uni.showToast({
title: '活动已结束',
icon:'none'
});
// 倒计时结束
//that.countDown();
that.days='00';
that.hours='00';
that.minutes='00';
that.seconds='00';
}
}.bind(this), 1000);
}).catch((err) => {})
},
getmiaosha() {
let that = this;
var url = 'flour_goods/get_flour_goods';
... ...
... ... @@ -23,7 +23,6 @@
</view>
<view class="cardyan" @click="getcode" v-if="disable==false">{{time}}</view>
<view class="cardyan" v-else>{{time}}</view>
<!-- <view class="cardyan" @click="getcode">{{time}}</view> -->
</view>
<button class="loginbtn" @click="login">登录</button>
... ... @@ -104,7 +103,6 @@
},
// 获取验证码
getcode() {
let that = this;
that.disable = true;
if (that.phone == '') {
... ... @@ -267,7 +265,6 @@
url: '/pages/login/xieyi?type=' + type
})
}
},
forgetmima() {
uni.navigateTo({
... ... @@ -276,6 +273,7 @@
},
// 微信登录
wxlogin() {
let that = this;
uni.login({
provider: 'weixin',
success: function(loginRes) {
... ... @@ -286,6 +284,36 @@
success: function(infoRes) {
console.log(infoRes)
console.log('用户昵称为:' + infoRes.userInfo.nickName);
var url = 'user/wechat_login';
var params = {
nickname:infoRes.userInfo.nickName,
avatar:infoRes.userInfo.avatarUrl,
openid:infoRes.userInfo.openId,
gender:infoRes.userInfo.gender,
city:infoRes.userInfo.city,
province:infoRes.userInfo.province,
country:infoRes.userInfo.country,
more:JSON.stringify(infoRes.userInfo)
}
console.log('参数', params)
app.post(url, params, "post").then((res) => {
console.log(res);
uni.showToast({
title:'登录成功',
iocn:'none'
})
setTimeout(function(){
uni.navigateTo({
url:"/pages/homepage/homepage"
})
},1500)
}).catch((err) => {
console.log(err)
})
}
});
}
... ...
... ... @@ -19,9 +19,13 @@
</view>
</view>
<view class="tapnav flexone">
<!-- :class="order==2?'nearactive':''" -->
<!-- :class="order==3?'nearactive':''" -->
<view class="tapnavitem" :class="order==2?'nearactive':''" @click="rangge" :data-id="2">距离最近</view>
<view class="tapnavitem" :class="order==2?'nearactive':''" @click="rangge" :data-id="2">
距离最近
</view>
<view class="tapnavitem pingfen" @click="rangge" :class="order==3?'nearactive':''" :data-id="3">评分最高</view>
</view>
... ... @@ -171,13 +175,13 @@
this.page = 1;
this.getshoplist()
},
// 店铺详情
shopdetail(e){
let id=e.currentTarget.dataset.id;
uni.navigateTo({
url:'/pages/nearshop/shopdetail?shopid='+id
})
},
// 店铺详情
shopdetail(e){
let id=e.currentTarget.dataset.id;
uni.navigateTo({
url:'/pages/nearshop/shopdetail?shopid='+id
})
},
// 底部导航跳转
selnav(e) {
console.log(e)
... ...
... ... @@ -419,7 +419,6 @@
stopclickwrap(){
},
// 选择支付方式
paytype(e){
this.pay_type=e.currentTarget.dataset.id
... ...
<template>
<view class="page">
<view class="box">
<view class="item">
<view class="info">
<view class="name">
<image src="../../static/logo.png" mode="widthFix" class="icon" /> 农业银行
</view>
<view class="num">
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">
<vieitemw class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view :class="item.type==3?'item':'itemk'" v-for="(item,index) in accountlist" :key="index">
<view v-if="item.type==1" @click="seltype(item)">
<view class="info flextwo">
<view class="name">
<image src="../../static/ticard.png" class="icon iconk"/> 提现到我的钱包
</view>
<view class="numItem">2665</view>
<image src="../../static/right.png" mode="widthFix" class="right"></image>
</view>
</view>
<view class="btnBox">
<view class="edit">编辑</view>
<image src="../../static/right.png" mode="widthFix" class="right"></image>
</view>
</view>
<view class="item">
<view class="info">
<view class="name">
<image src="../../static/build.png" mode="widthFix" class="icon" /> 建设银行
</view>
<view class="num">
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class='bankitem' v-if="item.type==3">
<view class="info" @click="seltype(item)">
<view class="name">
<image :src="item.image" mode="widthFix" class="icon"/> {{item.bank_name}}
</view>
<view class="numItem">
<vieitemw class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="num">
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">
<vieitemw class="dian"/>
<view class="dian"/>
<view class="dian"/>
<view class="dian"/>
</view>
<view class="numItem">{{item.card_number}}</view>
</view>
<view class="numItem">2665</view>
</view>
<view class="btnBox" @click="editcard(item)">
<view class="edit">编辑</view>
<image src="../../static/right.png" mode="widthFix" class="right"></image>
</view>
</view>
<view class="btnBox">
<view class="edit">编辑</view>
<image src="../../static/right.png" mode="widthFix" class="right"></image>
</view>
</view>
</view>
<view class="add" @click='addcart'>
<view class="addcount">添加银行卡</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
page:1,
pageNum:10,
accountlist:[]
}
},
onLoad(){
},
methods: {
//获取账户信息
getaccount(){
let that = this;
var url = 'bank/get_list';
var params = {
page:that.page,
pageNum:10
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.accountlist=that.accountlist.concat(res.data.data);
that.accountlist.forEach(function(value,index,array){
value.card_number=value.card_number.substr(-4)
})
that.accountlist=that.accountlist;
}).catch((err) => {
console.log(err)
})
},
// 选择银行卡信息
seltype(item){
console.log(item)
uni.$emit('accountinfo',item);
uni.navigateTo({
url:'/pages/usercenter/cashOut'
})
},
// 添加银行卡
addcart(){
uni.navigateTo({
url:'/pages/usercenter/addCard'
})
},
// 编辑银行卡
editcard(item){
let newitem=JSON.stringify(item);
uni.navigateTo({
url:'/pages/usercenter/addCard?item='+newitem+'&type='+1
})
}
},
onShow(){
this.page=1;
this.accountlist=[]
this.getaccount()
}
}
</script>
... ... @@ -86,11 +126,14 @@
page{
background: #F7F7F7;
}
.infok{
}
.box{
margin-top: 38rpx;
padding: 32rpx;
box-sizing: border-box;
overflow: hidden;
padding-bottom: 140rpx;;
}
.item{
width: 100%;
... ... @@ -100,6 +143,14 @@
box-sizing: border-box;
margin-top: 16rpx;
}
.itemk{
width: 100%;
height: 124rpx;
background: #fff;
padding: 24rpx;
box-sizing: border-box;
margin-top: 16rpx;
}
.info {
display: flex;
flex-wrap: wrap;
... ... @@ -114,14 +165,20 @@
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
line-height:44rpx;
/* line-height:44rpx; */
display: flex;
align-items: center;
}
.icon{
width: 36rpx;
margin-right: 8rpx;
}
.iconk{
width: 36rpx;
height:36rpx;
}
.num{
display: flex;
align-items: center;
... ...
<template>
<view class="page">
<view class="title">请绑定持卡人本人的银行卡</view>
<view class="box">
<view class="item">
<text class="name">持卡人</text>
<input type="text" value="" placeholder="mingzi" class="fill"/>
<view class="tixianbox">
<view class='tixiantype'>提现方式</view>
<view class="tixianlist flexone">
<view class="tixianlistitem flexone" :class="sel==1?'selactivek':''" @click="selitem" :data-id="1">
<view class="tixianimg">
<image src="../../static/icon_wechat.png"></image>
</view>
<view class="tixianname">微信</view>
</view>
<view class="tixianlistitem flexone" :class="sel==2?'selactivek':''" @click="selitem" :data-id="2">
<view class="tixianimg">
<image src="../../static/icon_zhifu.png"></image>
</view>
<view class="tixianname">支付宝</view>
</view>
<view class="tixianlistitem flexone" :class="sel==3?'selactivek':''" @click="selitem" :data-id="3">
<view class="tixianimg">
<image src="../../static/ticard.png"></image>
</view>
<view class="tixianname">银行卡</view>
</view>
</view>
<view class="item">
<text class="name">卡号</text>
<input type="text" value="" placeholder="mingzi" class="fill"/>
</view>
<!-- 微信 -->
<view class="cardboxk" v-if="sel==1">
<view class="title">请输入绑定信息</view>
<view class="box">
<view class="item">
<text class="name">姓名</text>
<input type="text" value="" placeholder="请输入姓名" class="fill" @input="enternamew" />
</view>
<view class="item">
<text class="name">账号</text>
<input type="text" value="" placeholder="请输入微信账号" class="fill" @input="enteraccount" />
</view>
</view>
<view class="item">
<text class="name">开户行</text>
<input type="text" value="" placeholder="mingzi" class="fill"/>
</view>
<!--支付宝 -->
<view class="cardboxk" v-if="sel==2">
<view class="title">请输入绑定信息</view>
<view class="box">
<view class="item">
<text class="name">姓名</text>
<input type="text" value="" placeholder="请输入姓名" class="fill" @input="enternamew" />
</view>
<view class="item">
<text class="name">账号</text>
<input type="text" value="" placeholder="请输入支付宝账号" class="fill" @input="enteraccount" />
</view>
</view>
<view class="item">
<text class="name">手机号</text>
<input type="text" value="" placeholder="mingzi" class="fill"/>
</view>
<!-- 银行卡 -->
<view class="cardboxk" v-if="sel==3">
<view class="title">请绑定持卡人本人的银行卡</view>
<view class="box">
<view class="item">
<text class="name">持卡人</text>
<input type="text" value="" placeholder="请输入持卡人" class="fill" @input="enterpeople" />
</view>
<view class="item">
<text class="name">卡号</text>
<input type="text" value="" placeholder="请输入卡号" class="fill" @input="entercard" />
</view>
<picker @change="bindbankPickerChange" :value="index" :range="bankarray" range-key="name">
<!-- <view class="uni-input">{{array[index]}}</view> -->
<view class="item">
<text class="name">开户行</text>
<view class="fill">{{bankname}}</view>
<!-- <input type="text" value="" placeholder="请输入开户行" class="fill" @input="enterbank" /> -->
</view>
</picker>
<view class="item">
<text class="name">手机号</text>
<input type="number" value="" placeholder="请输入手机号" class="fill" @input="enterphone" />
</view>
</view>
</view>
<view class="add" @click='surecard'>
<view class="addcount">确认</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
people: '',
card: '',
bank: '',
phone: '',
item: '',
type: '',
sel: 1,
name2: '',
account: '',
index:0,
bankid:'',
bankname:'请选择开户行',
bankarray:[]
}
},
onLoad(options) {
if (options.item) {
this.item = JSON.parse(options.item);
this.type = options.type;
}
this.getbanklist()
},
methods: {
enterpeople(e) {
this.people = e.detail.value
},
entercard(e) {
this.card = e.detail.value
},
enterbank(e) {
this.bank = e.detail.value
},
enterphone(e) {
console.log(e.detail.value)
this.phone = e.detail.value;
console.log(this.phone)
},
selitem(e) {
this.sel = e.currentTarget.dataset.id;
},
// 输入姓名
enternamew(e) {
this.name2 = e.detail.value
},
// 输入账号
enteraccount(e) {
this.account = e.detail.value
},
// 选择开户行
bindbankPickerChange(e){
this.bankname=this.bankarray[e.target.value].name;
this.bankid=this.bankarray[e.target.value].id
},
// 获取开户行
getbanklist(){
let that=this;
var url = 'bank/open_account';
var params = {
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.bankarray=res.data.data;
}).catch((err) => {
})
},
surecard() {
let that = this;
if(that.sel==3){
if (that.people == '') {
uni.showToast({
title: "请输入持卡人",
icon: "none"
})
return false
}
if (that.card == '') {
uni.showToast({
title: "请输入卡号",
icon: "none"
})
return false
}
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
wx.showToast({
title: '请输入正确手机号',
icon: 'none'
})
return false;
}
}else{
if(that.name2==''){
uni.showToast({
title:'请输入姓名',
icon:'none'
})
return false
}
if(that.sel==1){
if(that.account==''){
uni.showToast({
title:'请输入微信账号',
icon:'none'
})
return false
}
}else{
if(that.account==''){
uni.showToast({
title:'请输入支付宝账号',
icon:'none'
})
return false
}
}
}
var url = 'bank/add_user_address';
var params = {
type: that.sel,
name: that.people,
card_number: that.card,
open_account_id: that.bankid,
mobile: that.phone,
name2: that.name2,
account: that.account
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
if(that.sel==1){
uni.showToast({
title: '添加银行卡成功',
icon: 'none'
})
}else if(that.sel==2){
uni.showToast({
title: '添加微信账户成功',
icon: 'none'
})
}else if(that.sel==3){
uni.showToast({
title: '添加支付宝账户成功',
icon: 'none'
})
}
setTimeout(function() {
uni.navigateBack({
checked: true
})
}, 1500)
}).catch((err) => {
})
}
}
}
</script>
<style>
.title{
font-size:28rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(61,69,76,1);
.tixianlist {
margin-top: 22rpx;
}
.tixianlistitem {
width: 184rpx;
height: 72rpx;
display: flex;
align-items: center;
justify-content: center;
margin-right: 16rpx;
border: 1rpx solid transparent;
}
.selactivek {
border: 1rpx solid #C29445;
border-radius: 8rpx;
}
.tixianname {
color: #3D454C;
font-size: 28rpx;
margin-left: 8rpx;
}
.tixianbox {
padding: 0 40rpx;
box-sizing: border-box;
}
.tixiantype {
color: #3D454C;
font-size: 28rpx;
}
.tixianimg {
width: 48rpx;
height: 48rpx;
font-size: 0;
}
image {
width: 100%;
height: 100%;
}
.title {
font-size: 28rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(61, 6 9, 76, 1);
line-height: 104rpx;
padding: 0 40rpx;
box-sizing: border-box;
}
.box{
.box {
background: #fff;
padding: 0 40rpx;
padding: 0 40rpx;
box-sizing: border-box;
}
.item{
.item {
height: 108rpx;
display: flex;
align-items: center;
border-bottom: 1px solid #EEEEEE;
}
.name{
.name {
width: 84rpx;
font-size:28rpx;
font-family:PingFangHK-Medium,PingFangHK;
font-weight:600;
color:rgba(8,18,31,1);
font-size: 28rpx;
font-family: PingFangHK-Medium, PingFangHK;
font-weight: 600;
color: rgba(8, 18, 31, 1);
margin-right: 16rpx;
}
.fill{
width:232rpx;
font-size:28rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(91,94,100,1);
.fill {
width: 232rpx;
font-size: 28rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(91, 94, 100, 1);
}
</style>
... ...
<template>
<view class="page">
<view class="box" style="margin-top: 0;">
<view class="cardBox">
<image src="../../static/logo.png" mode="widthFix" class="logo"/>
<view class="cardInfo">
<view class="cardTips">提现账户</view>
<view class="cardName">农业银行(6549)</view>
<view class="box" style="margin-top: 0;" @click="selectaccount">
<view class='nodata' v-if="accountinfo==''">请选择提现账户</view>
<view v-else>
<view class="cardBox" v-if="accountinfo.type!=3">
<image src="../../static/ticard.png" mode="widthFix" class="logo" />
<view class="cardInfo">
<view class="cardTips">提现到钱包</view>
</view>
</view>
<view class="cardBox" v-else>
<image src="../../static/logo.png" mode="widthFix" class="logo" />
<view class="cardInfo">
<view class="cardTips">提现账户</view>
<view class="cardName">农业银行(6549)</view>
</view>
</view>
</view>
</view>
</view>
<view class="box">
<view class="title">转账金额</view>
<view class="fillArea">
<text>¥</text>
<input type="text" class="fillmoney">
<input type="number" class="fillmoney" @input="emtermoney">
</view>
<view class="tipsmoney">当前账户余额9938.57元</view>
</view>
<view class="box">
<view class="title">转账说明:</view>
<textarea name="" id="" cols="30" rows="10" class="wordArea"></textarea>
<textarea name="" id="" cols="30" rows="10" class="wordArea" placeholder="转账说明"></textarea>
</view>
<view class="submit">申请提现</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
money: '',
accountinfo: ''
}
},
methods: {
// 选择提现账户
selectaccount() {
uni.navigateTo({
url: '/pages/usercenter/account'
})
},
emtermoney(e) {
var money;
if (/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) { //正则验证,提现金额小数点后不能大于两位数字
money = e.detail.value;
} else {
money = e.detail.value.substring(0, e.detail.value.length - 1);
}
this.money = money
},
},
onShow() {
let that=this;
uni.$once('accountinfo',function(data){
that.accountinfo=data;
console.log(6666);
console.log(that.accountinfo)
})
}
}
</script>
<style>
.page{
.page {
background: #FEFEFE;
padding: 32rpx 32rpx 0;
box-sizing: border-box;
}
.title{
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:600;
color:rgba(8,18,31,1);
.title {
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 600;
color: rgba(8, 18, 31, 1);
}
.box{
.box {
margin-top: 60rpx;
}
.userbox{
width:686rpx;
height:120rpx;
background:rgba(255,255,255,1);
box-shadow:0px 8rpx 24rpx 0px rgba(0,0,0,0.06);
border-radius:8rpx;
.userbox {
width: 686rpx;
height: 120rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 8rpx 24rpx 0px rgba(0, 0, 0, 0.06);
border-radius: 8rpx;
display: flex;
align-items: center;
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
margin-top: 32rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
.avator{
.avator {
width: 72rpx;
margin-right: 16rpx;
}
.fillArea{
.fillArea {
height: 132rpx;
display: flex;
align-items: center;
border-bottom: 1px solid #EAEAEA;
}
.fillArea text{
font-size:72rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
.fillArea text {
font-size: 72rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
margin-right: 16rpx;
}
.fillmoney{
.fillmoney {
width: 400rpx;
display: flex;
align-items: center;
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
}
.tipsmoney{
font-size:24rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(189,196,206,1);
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
}
.tipsmoney {
font-size: 24rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(189, 196, 206, 1);
margin-top: 14rpx;
}
.wordArea{
.wordArea {
width: 100%;
margin-top: 16rpx;
height: 160rpx;
font-size:28rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(61,69,76,1);
font-size: 28rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(61, 69, 76, 1);
}
.submit{
.submit {
width: 686rpx;
height: 84rpx;
background: rgba(194, 148, 69, 1);
... ... @@ -125,31 +171,36 @@
align-items: center;
margin: 100rpx auto;
}
.cardBox{
.cardBox {
display: flex;
align-items: center;
border-bottom: 1px solid #EAEAEA;
padding-bottom: 32rpx;
}
.logo{
.logo {
width: 72rpx;
margin-right: 16rpx;
}
.cardInfo{
.cardInfo {
width: 596rpx;
}
.cardTips{
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
}
.cardName{
font-size:28rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
}
.cardTips {
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
}
.cardName {
font-size: 28rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
margin-top: 16rpx;
}
</style>
... ...
... ... @@ -4,14 +4,13 @@
<view class="title">充值金额</view>
<view class="money">
¥
<input type="text" class="fill" />
<input class="fill" @input="emtermoney" type="digit" />
</view>
<view class="huiyuanbot">
<view class="behuiyuanbtn" @click="sureti">确认</view>
</view>
</view>
<view class="cover" v-if="showwrap">
<view class="coverBox">
<view class="top">
... ... @@ -25,46 +24,143 @@
<view class="moneyTitle">订单总额</view>
</view> -->
<view class="payBox">
<view class="payItem">
<view class="payItem" @click="zhifubao" :data-id="2">
<view class="left">
<image src="../../static/paya.png" mode="widthFix" />
支付宝
</view>
<view class="right">
<image src="../../static/nocheck.png" mode="widthFix" class="check" />
<image src="../../static/check.png" mode="widthFix" class="check" v-if="pay_type==2" />
<image src="../../static/nocheck.png" mode="widthFix" class="check" v-else />
</view>
</view>
<view class="payItem">
<view class="payItem" @click="weixin" :data-id="1">
<view class="left">
<image src="../../static/payb.png" mode="widthFix" />
微信
</view>
<view class="right">
<image src="../../static/check.png" mode="widthFix" class="check" />
<image src="../../static/check.png" mode="widthFix" class="check" v-if="pay_type==1" />
<image src="../../static/nocheck.png" mode="widthFix" class="check" v-else />
</view>
</view>
</view>
<view class="submit">确认支付(¥2560.00)</view>
<view class="submit" @click="pay">确认支付(¥{{money}})</view>
</view>
</view>
</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
showwrap: false,
money: '',
pay_type: ''
};
},
methods: {
sureti(){
this.showwrap=true
sureti() {
if (this.money == '') {
uni.showToast({
title: '请输入充值金额',
icon: "none"
})
return false
}
this.showwrap = true
},
weixin(e) {
this.pay_type = e.currentTarget.dataset.id;
},
zhifubao(e) {
this.pay_type = e.currentTarget.dataset.id;
},
// 正则判断输入两位小数
emtermoney(e) {
var money;
if (/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) { //正则验证,提现金额小数点后不能大于两位数字
money = e.detail.value;
} else {
money = e.detail.value.substring(0, e.detail.value.length - 1);
}
this.money = money
},
// 隐藏弹出
hidewrap(){
this.showwrap=false
}
hidewrap() {
this.showwrap = false
},
// 支付
pay() {
let that = this;
if (this.pay_type == "") {
uni.showToast({
title: "请选择支付方式",
icon: "none"
})
return false
}
var url = 'money/create_order';
var params = {
pay_type: that.pay_type,
total: that.money
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.paymoney(res.data.data.order_money_id)
}).catch((err) => {
})
},
// 支付接口
paymoney(id) {
let that = this;
// if(that.pay_type == 2) {
// }
var url = 'money/pay';
var params = {
order_money_id: id
}
console.log(params)
app.post(url, params, "post").then((res) => {
console.log(res);
if (that.pay_type == 2) {
// 支付宝支付
uni.requestPayment({
provider: 'alipay',
orderInfo: res.data.data.result,
success(r) {
console.log(r)
}
})
}
}).catch((err) => {
console.log(err)
})
},
}
};
</script>
... ...
... ... @@ -10,7 +10,7 @@
<image src="../../static/icond.png" mode="widthFix" class="icon"></image>我的邀请码
</view>
<view class="right salecode">
15621564879
{{share_number}}
<image src="../../static/icona.png" mode="widthFix" class="rcion"></image>
</view>
</view>
... ... @@ -40,7 +40,9 @@
data() {
return {
nickname:'',
avatar:''
avatar:'',
share_number:''
}
},
onLoad() {
... ... @@ -69,6 +71,7 @@
console.log(res);
that.nickname = res.data.data.nickname;
that.avatar = res.data.data.avatar;
that.share_number=res.data.data.share_number
}).catch((err) => {
... ...
... ... @@ -3,155 +3,276 @@
<view class="box" style="margin-top: 0;">
<view class="title">到账用户手机</view>
<view class="searchbox">
<input type="text" placeholder="请输入到账用户手机号" class="fillTel" />
<view class="searchbtn">
<image src="../../static/tel.png" mode="widthFix" class="icon"/>查找
<input type="number" placeholder="请输入到账用户手机号" class="fillTel" @input="enterphone" />
<view class="searchbtn" @click='search'>
<image src="../../static/tel.png" mode="widthFix" class="icon" />查找
</view>
</view>
</view>
<view class="box">
<view class="box" v-if="userinfo!=''">
<view class="title">到账用户信息</view>
<view class="userbox">
<image src="../../static/userpic.png" mode="widthFix" class="avator" />
<text>用户昵称昵称</text>
<image :src="userinfo.avatar" mode="widthFix" class="avator" />
<text>{{userinfo.nickname}}</text>
</view>
</view>
<view class="box">
<view class="title">转账金额</view>
<view class="fillArea">
<text>¥</text>
<input type="text" class="fillmoney">
<input class="fillmoney" @input="emtermoney" type="digit">
</view>
<view class="tipsmoney">当前账户余额9938.57元</view>
<view class="tipsmoney">当前账户余额{{userinfok.money}}元</view>
</view>
<view class="box">
<view class="title">转账说明:</view>
<textarea name="" id="" cols="30" rows="10" class="wordArea"></textarea>
<textarea name="" id="" cols="30" rows="10" class="wordArea" placeholder="转账说明"></textarea>
</view>
<view class="submit">转账</view>
<view class="submit" @click="zhuanzhang">转账</view>
</view>
</template>
<script>
import app from "../../App.vue";
export default {
data() {
return {
phone: '',
userinfo:'',
money:'',
userinfok:''
}
},
onLoad(){
this.getuserinfo()
},
methods: {
enterphone(e) {
this.phone = e.detail.value
},
// 获取用户信息
getuserinfo() {
let that = this;
var url = 'member/index';
var params = {
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.userinfok = res.data.data;
}).catch((err) => {
})
},
emtermoney(e) {
var money;
if (/^(\d?)+(\.\d{0,2})?$/.test(e.detail.value)) { //正则验证,提现金额小数点后不能大于两位数字
money = e.detail.value;
} else {
money = e.detail.value.substring(0, e.detail.value.length - 1);
}
this.money = money
},
search() {
let that=this;
if (!(/^1[3456789]\d{9}$/.test(that.phone))) {
wx.showToast({
title: '请输入正确手机号',
icon: 'none'
})
return false;
}
var url = 'member/get_user';
var params = {
mobile:that.phone
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
that.userinfo=res.data.data;
}).catch((err) => {
console.log(err)
uni.showToast({
title:err.msg,
icon:'none'
})
})
},
zhuanzhang(){
let that = this;
if(that.phone==''){
uni.showToast({
title:'请输入手机号查找用户信息',
icon:'none'
})
return false
}
if(that.money==''){
uni.showToast({
title:'请输入转账金额',
icon:'none'
})
return false
}
var url = 'member/transfer';
var params = {
user_id:that.userinfo.id,
money:that.money
}
console.log('7766554', params)
app.post(url, params).then((res) => {
console.log(res);
uni.showToast({
title:'转账成功',
icon:"none"
})
setTimeout(function(){
uni.navigateBack({
checked:true
})
},1500)
}).catch((err) => {
console.log(err)
uni.showToast({
title:"转账失败",
icon:"none"
})
})
},
}
}
</script>
<style>
page{
page {
background: #FEFEFE;
padding: 32rpx 32rpx 0;
box-sizing: border-box;
}
.title{
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:600;
color:rgba(8,18,31,1);
.title {
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 600;
color: rgba(8, 18, 31, 1);
}
.searchbox{
.searchbox {
height: 104rpx;
display: flex;
align-items: center;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid #EAEAEA;
box-sizing: border-box;
}
.fillTel{
.fillTel {
width: 360rpx;
font-size:36rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(189,196,206,1);
font-size: 36rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(189, 196, 206, 1);
margin-right: ;
}
.searchbtn{
.searchbtn {
display: flex;
align-items: center;
justify-content: center;
width:160rpx;
height:64rpx;
border-radius:8rpx;
border:1px solid rgba(255,148,23,1);
font-size:24rpx;
font-family:PingFangSC-Regular,PingFang SC;
font-weight:400;
color:rgba(255,148,23,1);
}
.searchbtn .icon{
width: 160rpx;
height: 64rpx;
border-radius: 8rpx;
border: 1px solid rgba(255, 148, 23, 1);
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 148, 23, 1);
}
.searchbtn .icon {
width: 32rpx;
margin-right: 16rpx;
}
.box{
.box {
margin-top: 60rpx;
}
.userbox{
width:686rpx;
height:120rpx;
background:rgba(255,255,255,1);
box-shadow:0px 8rpx 24rpx 0px rgba(0,0,0,0.06);
border-radius:8rpx;
.userbox {
width: 686rpx;
height: 120rpx;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 8rpx 24rpx 0px rgba(0, 0, 0, 0.06);
border-radius: 8rpx;
display: flex;
align-items: center;
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
margin-top: 32rpx;
padding: 0 24rpx;
box-sizing: border-box;
}
.avator{
.avator {
width: 72rpx;
margin-right: 16rpx;
}
.fillArea{
.fillArea {
height: 132rpx;
display: flex;
align-items: center;
border-bottom: 1px solid #EAEAEA;
}
.fillArea text{
font-size:72rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
.fillArea text {
font-size: 72rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
margin-right: 16rpx;
}
.fillmoney{
.fillmoney {
width: 400rpx;
display: flex;
align-items: center;
font-size:32rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(8,18,31,1);
}
.tipsmoney{
font-size:24rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(189,196,206,1);
font-size: 32rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(8, 18, 31, 1);
}
.tipsmoney {
font-size: 24rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(189, 196, 206, 1);
margin-top: 14rpx;
}
.wordArea{
.wordArea {
width: 100%;
margin-top: 16rpx;
height: 160rpx;
font-size:28rpx;
font-family:PingFangHK-Regular,PingFangHK;
font-weight:400;
color:rgba(61,69,76,1);
font-size: 28rpx;
font-family: PingFangHK-Regular, PingFangHK;
font-weight: 400;
color: rgba(61, 69, 76, 1);
}
.submit{
.submit {
width: 686rpx;
height: 84rpx;
background: rgba(194, 148, 69, 1);
... ...
... ... @@ -47,7 +47,7 @@
}
},
onLoad() {
this.getuserinfo()
},
methods: {
// 获取用户信息
... ... @@ -89,12 +89,16 @@
url:'/pages/usercenter/transferAccounts'
})
},
// 提现
tixian(){
uni.navigateTo({
url:'/pages/usercenter/cashOut'
})
}
},
onShow(){
this.getuserinfo()
}
}
</script>
... ...