作者 侯潞浩

对接接口

... ... @@ -230,9 +230,10 @@ App({
globalData: {
userInfo: null,
baseUrl: 'https://xiaoxiangauto.com/',
baseUrl: 'http://chemai.shs.broing.cn/',
// baseUrl: 'https://xiaoxiangauto.com/',
// baseUrl: 'http://chemai.t.brotop.cn/',
imagesUrl: 'https://xiaoxiangauto.com/',
// imagesUrl: 'https://xiaoxiangauto.com/',
statusHeight: 0,
stores_id: '', //进入4s店id
city_glob_id: '', // 城市定位
... ...
// pages/account/account.js
import {
request
} from "../../request/index.js"
Page({
/**
* 页面的初始数据
*/
data: {
active: 1,
color: '#f59b22'
active: 0,
color: '#f59b22',
info: {}
},
/**
... ... @@ -17,8 +21,27 @@ Page({
url: '/pages/accountcashout/accountcashout',
})
},
async getUserInfo() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/newadd/getUserInfo'
})
console.log(data, "信息");
this.setData({
info: data
})
} catch (err) {
// console.log(err);
that.popTest(err.msg)
}
},
onLoad(options) {
this.getUserInfo()
},
onChange(event) {
... ...
... ... @@ -3,14 +3,14 @@
<view class="card">
<view class="cardheader">
<view class="name">
名字
{{info.userinfo.nickname}}
</view>
<view class="cc">
南通同方汽车
</view>
</view>
<view class="price">
2100
{{info.userinfo.money}}
</view>
<view class="keti">
可提现余额(元)
... ... @@ -25,10 +25,10 @@
<van-tabs sticky active="{{ active }}" bind:change="onChange" line-width="{{30}}" color="{{color}}">
<van-tab title="账户明细">
<scroll-view class="mingxi1" scroll-y>
<view class="item" wx:for="{{15}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="item" wx:for="{{info.money_log}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="left">
<view class="title">
提现到支付宝
{{item.memo}}
</view>
<view class="time">
2023.1.7
... ... @@ -36,10 +36,10 @@
</view>
<view class="right">
<view class="pricec">
-100
{{item.type}}{{item.money}}
</view>
<view class="balance">
余额:1788
余额:{{item.after}}
</view>
</view>
</view>
... ... @@ -47,21 +47,21 @@
</van-tab>
<van-tab title="佣金明细">
<scroll-view class="mingxi1" scroll-y>
<view class="itema" wx:for="{{15}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="itema" wx:for="{{info.commission}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="lefta">
<view class="info">
<image class="img" src="/static/img/1_icon.png" mode="" />
<image class="img" src="{{info.userinfo.avatar}}" mode="" />
<view class="nikename">
<view>
昵称
{{info.userinfo.nickname}}
</view>
<view>
手机号:121540245
手机号:{{info.userinfo.mobile}}
</view>
</view>
</view>
<view class="pricec">
-100
{{item.type}}{{item.money}}
</view>
</view>
<view class="righta">
... ... @@ -69,7 +69,7 @@
2023.1.7
</view>
<view class="time">
活动名称
{{item.memo}}
</view>
<view class="balance">
余额:1788
... ...
// pages/accountcashout/accountcashout.js
import {
request
} from '../../request/index'
Page({
/**
* 页面的初始数据
*/
data: {
money: '',
list: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
async tixian() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/newadd/tixian',
data: {
money: that.data.money
}
})
console.log(data, "tixian");
} catch (err) {
wx.showToast({
title: err.msg,
icon: 'none'
})
console.log(err);
}
},
async TixianLog() {
let that = this
try {
const {
data: {
data
}
} = await request({
url: 'api/newadd/TixianLog'
})
console.log(data, "list");
that.setData({
list: data
})
} catch (err) {
wx.showToast({
title: err.msg,
icon: 'none'
})
console.log(err);
}
},
input(e) {
console.log(e.detail.value);
this.setData({
money: e.detail.value
})
},
withdrawal() {
console.log(this.data.money, "tixian");
if (!this.data.money) return wx.showToast({
title: '请输入提现金额',
icon: 'none'
})
this.tixian()
},
onLoad(options) {
this.TixianLog()
},
/**
... ...
... ... @@ -19,36 +19,36 @@
<view class="icon">
</view>
<input class="inp" type="text" />
<input class="inp" type="number" value="{{money}}" name="input" bindinput="input" />
</view>
<view class="all">
全部提现
</view>
</view>
<view class="tips">
<view class="tips" bind:tap="withdrawal">
<view class="">
提现
提现
</view>
<view class="">
微信钱包
</view>
</view>
<scroll-view class="mingxi1" scroll-y>
<view class="item" wx:for="{{15}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="item" wx:for="{{list}}" wx:key="index" wx:for-index="index" wx:for-item="item">
<view class="lefta">
<view class="title">
提现到支付宝
{{item.memo}}
</view>
<view class="time">
2023.1.7
{{item.createtime}}
</view>
</view>
<view class="right">
<view class="pricec">
-100
- {{item.money}}
</view>
<view class="balance">
余额:1788
余额:{{item.after}}
</view>
</view>
</view>
... ...
... ... @@ -55,10 +55,13 @@
.icon {
font-size: 54rpx;
}
.inp {
font-size: 54rpx;
height: 100%;
line-height: 100%;
}
.all {
... ...
... ... @@ -2,10 +2,14 @@ page {
background-color: #f9f9f9;
}
.container {
padding: 20rpx 32rpx;
box-sizing: border-box;
.changeService {
background-color: #fff;
padding: 20rpx 32rpx;
... ...
<view class="container">
<view class="tips">
提示:对活动有疑义,请联系活动经销商
</view>
<block wx:if="{{myOrder.length !=0}}">
<view class="changeService" wx:for="{{myOrder}}" wx:key="index" wx:for-index="index" wx:for-item="item" data-id="{{item.id}}" bindtap="tomyOrderObligation">
<view class="service_title">
<view class="title_">{{item.info.shop}}</view>
<view class="title_status">{{item.state_name}}</view>
</view>
<view class="service_title">
<view class="title_">订单编号:{{item.order_no}}</view>
<view class="title_status">15:00</view>
</view>
<view class="service_content">
<view class="ser_img">
<image src="{{item.info.img}}" />
... ...
... ... @@ -5,6 +5,10 @@ page {
padding: 20rpx 32rpx;
box-sizing: border-box;
}
.tips {
font-size: 26rpx;
color: red;
}
.container .changeService {
background-color: #fff;
padding: 20rpx 32rpx;
... ...
{
"setting": {
"compileHotReLoad": true,
"urlCheck": true
"urlCheck": false
},
"condition": {
"miniprogram": {
... ...
... ... @@ -2,8 +2,8 @@
export const request = (params) => {
wx.showNavigationBarLoading()
// const baseUrl = "http://chemai.t.brotop.cn/"
const baseUrl = "https://xiaoxiangauto.com/"
// const baseUrl = "http://test.xiaoxiangauto.com/"
// const baseUrl = "https://xiaoxiangauto.com/"
const baseUrl = "http://chemai.shs.broing.cn/"
return new Promise((resolve, reject) => {
let header = {
... ...