充值页面,图片替换

This commit is contained in:
itgaojian163 2025-03-31 18:23:29 +08:00
parent 57873737c2
commit e76d266992
44 changed files with 1032 additions and 163 deletions

View File

@ -1,44 +1,47 @@
{
"pages": [
"pages/login/login",
"pages/index/index",
"pages/treaty/privacy/privacy",
"pages/treaty/service/service",
"pages/mine/mine",
"pages/copyright/createProjectInfo/createProjectInfo",
"pages/copyright/createBuy/createBuy",
"pages/copyright/payment/payment"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "AI喵著",
"navigationBarBackgroundColor": "#ffffff"
},
"tabBar": {
"color": "#515151",
"selectedColor": "#FE9944",
"list": [{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/static/images/ic_home_normal.png",
"selectedIconPath": "/static/images/ic_home_select.png"
},
{
"pagePath": "pages/mine/mine",
"text": "我的",
"iconPath": "/static/images/ic_mine_normal.png",
"selectedIconPath": "/static/images/ic_mine_select.png"
}
]
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"usingComponents": {
"ad-popup": "./components/ad-popup/ad-popup"
},
"useExtendedLib": {
"weui": true
}
"pages": [
"pages/login/login",
"pages/index/index",
"pages/treaty/privacy/privacy",
"pages/treaty/service/service",
"pages/mine/mineIndex/mine",
"pages/copyright/createProjectInfo/createProjectInfo",
"pages/copyright/createBuy/createBuy",
"pages/copyright/payment/payment",
"pages/mine/mineAccount/mineCoupons/mineCoupons",
"pages/copyright/publicPay/publicPay"
],
"window": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "AI喵著",
"navigationBarBackgroundColor": "#ffffff"
},
"tabBar": {
"color": "#515151",
"selectedColor": "#FE9944",
"list": [
{
"pagePath": "pages/index/index",
"text": "首页",
"iconPath": "/static/images/ic_home_normal.png",
"selectedIconPath": "/static/images/ic_home_select.png"
},
{
"pagePath": "pages/mine/mineIndex/mine",
"text": "我的",
"iconPath": "/static/images/ic_mine_normal.png",
"selectedIconPath": "/static/images/ic_mine_select.png"
}
]
},
"style": "v2",
"componentFramework": "glass-easel",
"sitemapLocation": "sitemap.json",
"lazyCodeLoading": "requiredComponents",
"usingComponents": {
"ad-popup": "./components/ad-popup/ad-popup"
},
"useExtendedLib": {
"weui": true
}
}

View File

@ -33,7 +33,5 @@ Component({
/**
* 组件的方法列表
*/
methods: {
}
methods: {}
})

View File

@ -1,12 +1,12 @@
<view class="container" style="height:{{height}}px;">
<view class="container" style="flex:1;height:auto;">
<view class="loading" wx:if="{{loadingVisible=='loading'}}"></view>
<view wx:elif="{{loadingVisible=='error'}}" class="error-box">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;">加载失败</text>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">加载失败</text>
</view>
<view wx:elif="{{loadingVisible=='empty'}}" class="error-box">
<image src="/static/images/load_err.png" class="loading_err"></image>
<text style="align-self: center;margin-top: 10px;color: #cecece;">暂无数据</text>
<text style="align-self: center;margin-top: 10px;color: #cecece;font-size: 14px;">暂无数据</text>
</view>
<block wx:else="{{loadingVisible=='success'}}">
<slot></slot>

View File

@ -4,7 +4,7 @@
justify-content: center;
align-items: center;
width: 100%;
min-height: 200rpx;
height: auto;
}
.loading {
@ -40,6 +40,13 @@
align-self: center;
display: flex;
flex-direction: column;
display: flex;
justify-content: center;
/* 水平居中 */
align-items: center;
/* 垂直居中 */
width: 100vw;
height: 40vh;
}
.loading_err {

27
net/api/payApi.js Normal file
View File

@ -0,0 +1,27 @@
import {
request
} from "../http";
// 公共API
const apiPath = {
getBuyPackageList: '/api/proj/servicepkg/packageinfo/listpage/${type}/self', //获取可以购买的套餐包列表
getPayOrder: '/api/pay/get-order', //获取支付订单
enterprisePay: '/api/pay/pay-account-recharge/${accountRechargeId}', //企业付款完成支付
enterpriseAccountInfo: '/api/pay/get-pay-system-bank', //获取公司账户信息
}
class PayService {
static doGetBuyPackageList(type, data) {
const path = apiPath.getBuyPackageList.replace('${type}', type);
return request(path, "GET", data);
}
//对公转账完成
static doCompleteEnterprisePay(url, data) {
const path = apiPath.enterprisePay.repeat('${accountRechargeId}', url)
return request(path, "POST", data)
}
//获取账户信息
static doGetEnterpriseAccountInfo() {
return request(apiPath.enterpriseAccountInfo, "GET")
}
}
export default PayService;

View File

@ -8,7 +8,7 @@ const apiPath = {
getNotice: '/api/env/custom/get-proj-create-notice', //获取notice
getPrice: '/api/proj/charge/get', //获取创建项目的单价
getContactList: '/api/proj-contact/list/self', //获取产权联系人列表
getCouponsList: '/api/coupon/user/listpage/self', //获取优惠卷
getCouponsList: '/api/coupon/user/listpage/self', //获取我可以使用的优惠卷
getPackageList: '/api/proj/servicepkg/packageorder/listpage/self', //获取套餐包
getCommendProjectName: '/api/proj/recommend/list-proj-name/ai', //推荐项目名称
createProject: '/api/proj/create-quick', //快速创建项目

View File

@ -7,6 +7,9 @@ const apiPath = {
registerUrl: '/api/user/wx/register', //注册,
csaNo: '/api/csa/get', //获取客服编号
createContact: '/api/proj-contact/save', //创建联系人
mineAccount: '/api/user-info/get-user-self', //获取我的账户余额
minePackageCount: '/api/proj/servicepkg/packageorder/count/self', //我的套餐包剩余
uploadImg: '/api/file/v2/upload-image', //上传图片
}
class UserService {
static doLogin(data) {
@ -21,6 +24,16 @@ class UserService {
static doCreateContact(data) {
return request(apiPath.createContact, "POST", data)
}
static doGetMineAccount() {
return request(apiPath.mineAccount, "GET")
}
static doGetMinePackageCount() {
return request(apiPath.minePackageCount, "GET")
}
static doUploadImg(data) {
return request(apiPath.uploadImg, "POST", data)
}
}
export default UserService;

View File

@ -3,6 +3,7 @@ const Cache = require('../utils/storage');
// const baseUrl = 'https://www.xzszwhy.cn/daqi/app';
const operatorUrl = 'http://192.168.0.15:8091/operator';
const copyrightUrl = 'http://192.168.0.15:7025/copyright';
const uploadImgUrl = copyrightUrl + '/api/file/v2/upload-image'
/**
* 传入请求参数返回Promise支持链试调用
* @param url 请求地址
@ -67,5 +68,6 @@ function request(url, method = "GET", data = {}, params = {}, project = "copyrig
// 导出请求和服务地址
export {
request
request,
uploadImgUrl
}

View File

@ -73,8 +73,9 @@ Page({
if (type == 'ALL' && _self.data.isUrgent) {
price += _self.data.urgent
}
const urgent = _self.data.isUrgent ? 'URGENT' : ''
wx.navigateTo({
url: '../createProjectInfo/createProjectInfo?type=' + type + '&price=' + price + '&isUrgent=' + _self.data.isUrgent,
url: '../createProjectInfo/createProjectInfo?type=' + type + '&price=' + price + '&isUrgent=' + urgent
})
}
})

View File

@ -17,22 +17,10 @@ Page({
isShowContact: false, //是否显示联系人
currentLanguage: 'JAVA', //当前选中的语言
price: 0,
packageList: [{
id: 1
}, {
id: 2
}, {
id: 3
}], //套餐包
packageList: [], //套餐包
tempPackage: {}, //临时选中的优惠卷,没有点击确定按钮前
selectPackage: {}, //选中的套餐包
couponsList: [{
id: 1
}, {
id: 2
}, {
id: 3
}], //优惠卷
couponsList: [], //优惠卷
selectCoupons: {}, //选中的优惠卷
tempCoupons: {}, //临时选中的优惠卷,没有点击确定按钮
contactList: [], //联系人
@ -181,11 +169,25 @@ Page({
},
//获取套餐包
doGetPackage() {
ProjectService.doGetPackageList()
const _self = this
const data = {
page: 1,
rows: 100,
packageType: _self.data.type,
keyong: 1,
}
ProjectService.doGetPackageList(data)
.then(res => {
console.log('套餐包')
console.log(res)
_self.setData({
packageList: res.rows
})
}, err => {
console.log(err)
_self.setData({
packageList: []
})
})
},
//获取优惠卷
@ -201,11 +203,14 @@ Page({
.then(res => {
console.log('优惠卷')
console.log(res)
// _self.setData({
// couponsList: res.rows
// })
_self.setData({
couponsList: res.rows
})
}, err => {
console.log(err)
_self.setData({
couponsList: []
})
})
},
//显示优惠卷
@ -415,16 +420,22 @@ Page({
title: '创建中...',
})
//构建参数
console.log(_self.data.isUrgent)
var list = []
if (_self.data.isUrgent != '') {
list = [_self.data.isUrgent]
}
const data = {
applyContactCsaNo: _self.data.selectContact.csaNo, // 联系人客服编号
applyContactId: _self.data.selectContact.projContactId, //联系人ID
applyContactName: _self.data.selectContact.name, //联系人姓名
applyContactPhone: _self.data.selectContact.phone, //联系人手机
projDevCompleteDate: _self.data.completeDate, //开发完成日期
projSubName: _self.data.projectName, //项目简称
projName: _self.data.projectName, //项目简称
projVersion: _self.data.version, //项目版本
backendCodeLang: _self.data.currentLanguage,
projChargeType: 'ALL', //项目收费类型 ALL,FREE,MATERIAL,MATERIAL_AGENT,MATERIAL_AGENT_URGENT
projChargeType: _self.data.type, //项目收费类型 ALL,FREE,MATERIAL,MATERIAL_AGENT,MATERIAL_AGENT_URGENT
listProjChargeAdditional: list
}
ProjectService.doCreateProject(data)
.then(res => {

View File

@ -134,13 +134,13 @@
</view>
<text>优惠卷</text>
</view>
<view>减5元</view>
<view>减{{amount/100}}元</view>
</view>
<view class="ticket-content">5元优惠卷</view>
<view class="ticket-desc">有效期:2025-02-07至2025-04-30</view>
<view class="ticket-content">{{item.coupon.title}}</view>
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
</view>
<view class="r-tickets">
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempCoupons.id==item.id}}"></radio>
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempCoupons.couponId==item.couponId}}"></radio>
</view>
</view>
</block>
@ -162,13 +162,13 @@
<view class="l-tickets">
<view class="ticket-title">
<view>套餐包</view>
<view>剩余13件</view>
<view>剩余{{item.packageTotalSurplusCount}}件</view>
</view>
<view class="ticket-content">60元一件撰写材料包</view>
<view class="ticket-desc">平均全托管一件220元</view>
<view class="ticket-content">{{item.packageInfoAppDTO.packageName}}</view>
<view class="ticket-desc">{{item.packageInfoAppDTO.packageDescription}}</view>
</view>
<view class="r-tickets">
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempPackage.id==item.id}}"></radio>
<radio class="custom-radio" style="margin-left: 5px;" checked="{{tempPackage.packageInfoId==item.packageInfoId}}"></radio>
</view>
</view>
</block>

View File

@ -1,4 +1,5 @@
// pages/copyright/payment/payment.js
import PayService from '../../../net/api/payApi';
Page({
/**
@ -8,16 +9,55 @@ Page({
paySumOptions: [100, 300, 500, 1000, 2000, 5000],
currentTab: 0, //充值金额选项
payMoney: 100, //支付金额
currentBagTab: 1, //当前套餐包tab
currentBagTab: 'MATERIAL', //当前套餐包tab
bagList: [], //套餐包列表
payWay: 1, //支付方式 1微信 2对公
showError: false,
errorHint: '',
listLoading: 'loading',
selectBag: {}, //选中的套餐包
},
onLoad(options) {
const _self = this
_self.doGetPackageList(_self.data.currentBagTab)
},
//获取可以购买的套餐包
doGetPackageList(path) {
const _self = this
_self.setData({
listLoading: 'loading'
})
const data = {
page: 1,
rows: 10
}
PayService.doGetBuyPackageList(path, data)
.then(res => {
wx.hideLoading()
console.log(res)
_self.setData({
listLoading: res.rows && res.rows.length > 0 ? 'success' : 'empty'
})
_self.setData({
bagList: res.rows
})
}, err => {
wx.hideLoading()
console.log(err)
_self.setData({
listLoading: 'error'
})
_self.setData({
showError: true,
errorHint: '未获取到套餐数据,请重试'
})
})
},
//监听充值金额选项
doChangePayMoney(e) {
this.setData({
payMoney: e.currentTarget.dataset.value
payMoney: e.currentTarget.dataset.value,
selectBag: {}
})
},
//监听充值金额变化
@ -50,16 +90,45 @@ Page({
this.setData({
currentBagTab: e.currentTarget.dataset.value
})
this.doGetPackageList(this.data.currentBagTab)
},
//切换支付方式
doChangePayWay(e) {
console.log(e)
this.setData({
payWay: e.detail.value
payWay: e.currentTarget.dataset.value
})
},
//选中套餐包
chooseBag(e) {
console.log(e)
const _self = this
const selItem = e.currentTarget.dataset.value
_self.setData({
payMoney: selItem.packageAvgMoney / 100,
currentTab: -1,
selectBag: selItem
})
wx.pageScrollTo({
scrollTop: 0,
duration: 300
})
},
//调用微信支付
toWeChatPay() {
},
//去支付
doPay() {
const _self = this
if (_self.data.payWay == '1') {
//微信
toWeChatPay()
} else {
//对公 需要传递参数 选中套餐 or 直接冲钱
wx.redirectTo({
url: '/pages/copyright/publicPay/publicPay?packageId=' + _self.data.selectBag.packageInfoId,
})
}
}
})

View File

@ -1,3 +1,6 @@
{
"usingComponents": {}
"usingComponents": {
"mp-toptips": "weui-miniprogram/toptips/toptips",
"container-loading": "/components/container-loading/container-loading"
}
}

View File

@ -27,15 +27,15 @@
<!-- 付款方式 -->
<view class="card-box">
<view>付款方式</view>
<radio-group bindchange="doChangePayWay" class="form-radio_wrap">
<view class="pay-option-item mt-20">
<radio-group class="form-radio_wrap">
<view class="pay-option-item mt-20" bind:tap="doChangePayWay" data-value="1">
<view class="option-type">
<view class="icon icon-wechat"></view>
<view>微信支付</view>
</view>
<radio class="radio" checked="{{payWay==1}}" value="1"></radio>
</view>
<view class="pay-option-item">
<view class="pay-option-item" bind:tap="doChangePayWay" data-value="2">
<view class="option-type">
<view class="icon icon-card"></view>
<view>对公转账</view>
@ -47,42 +47,30 @@
<!-- 套餐包 -->
<view class="card-box">
<view class="bag-box">
<view class="{{currentBagTab==1?'bag-select':'bag-normal'}} border-left" bind:tap="doChangeBagTab" data-value="1">写材料套餐包</view>
<view class="{{currentBagTab==2?'bag-select':'bag-normal'}} border-right" bind:tap="doChangeBagTab" data-value="2">全托管套餐包</view>
<view class="{{currentBagTab=='MATERIAL'?'bag-select':'bag-normal'}} border-left" bind:tap="doChangeBagTab" data-value="MATERIAL">写材料套餐包</view>
<view class="{{currentBagTab=='ALL'?'bag-select':'bag-normal'}} border-right" bind:tap="doChangeBagTab" data-value="ALL">全托管套餐包</view>
</view>
<view class="bag-list">
<!-- 列表 -->
<view class="bag-item">
<view class="bag-item-title-box">
<view class="title">70元套餐包</view>
<view class="sum">70</view>
</view>
<view class="bag-item-desc-box">
<view class="desc">平均写一件材料100元</view>
<view class="btn">选购</view>
</view>
<container-loading loadingState="{{listLoading}}">
<view class="bag-list">
<!-- 列表 -->
<block wx:for="{{bagList}}" wx:key="index">
<view class="bag-item">
<view class="bag-item-title-box">
<view class="p-title">{{item.packageName}}</view>
<view class="sum">{{item.packageMoney/100}}</view>
</view>
<view class="bag-item-desc-box">
<view class="desc">{{item.packageDescription}}</view>
<view class="btn" bind:tap="chooseBag" data-value="{{item}}">选购</view>
</view>
</view>
</block>
</view>
<view class="bag-item">
<view class="bag-item-title-box">
<view class="title">70元套餐包</view>
<view class="sum">70</view>
</view>
<view class="bag-item-desc-box">
<view class="desc">平均写一件材料100元</view>
<view class="btn">选购</view>
</view>
</view>
<view class="bag-item">
<view class="bag-item-title-box">
<view class="title">70元套餐包</view>
<view class="sum">70</view>
</view>
<view class="bag-item-desc-box">
<view class="desc">平均写一件材料100元</view>
<view class="btn">选购</view>
</view>
</view>
</view>
</container-loading>
</view>
<view class="green-bottom-btn" bind:tap="doPay">确认充值</view>
</view>
<view class="bottom-btn-box">
<view class="green-bottom-btn" bind:tap="doPay">确认充值</view>
</view>
</view>
<mp-toptips msg="{{errorHint}}" type="error" show="{{showError}}"></mp-toptips>

View File

@ -36,7 +36,7 @@
}
.sum-input-box .title {
font-size: 24rpx;
font-size: 12px;
color: black;
}
@ -134,19 +134,35 @@
white-space: nowrap;
}
.green-bottom-btn {
.bottom-btn-box {
position: fixed;
background-color: #37AD46;
left: 0;
bottom: 0;
color: white;
text-align: center;
height: 100rpx;
width: 94vw;
width: 100vw;
line-height: 100rpx;
border-radius: 20rpx;
margin: 20rpx;
background-color: white;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 80px;
}
.green-bottom-btn {
background-color: #37AD46;
color: white;
text-align: center;
height: 42px;
width: 90vw;
line-height: 42px;
border-radius: 20rpx;
margin-bottom: 20px;
}
.green-bottom-btn:active {
background-color: #79df87;
}
.green-bottom-btn:active {
@ -159,6 +175,7 @@
flex-direction: column;
margin-top: 20rpx;
margin-bottom: 110rpx;
width: 86vw;
}
.bag-item {
@ -175,6 +192,12 @@
align-items: center;
}
.p-title {
font-size: 14px;
font-weight: 800;
color: black;
}
.bag-item-title-box .title {
font-size: 40rpx;
color: black;
@ -182,7 +205,7 @@
}
.bag-item-title-box .sum {
font-size: 32rpx;
font-size: 14px;
color: black;
font-weight: 400;
}
@ -199,7 +222,7 @@
flex-direction: row;
justify-content: space-between;
align-items: center;
margin-top: 20rpx;
margin-top: 2px;
}
.bag-item-desc-box .desc {
@ -209,8 +232,8 @@
.bag-item-desc-box .btn {
background-color: #FFC67D;
padding: 10rpx 30rpx;
padding: 1px 15px;
color: white;
border-radius: 20rpx;
font-size: 28rpx;
border-radius: 5px;
font-size: 12px;
}

View File

@ -0,0 +1,128 @@
// pages/copyright/publicPay/publicPay.js
import PayApi from '../../../net/api/payApi'
import {
request,
uploadImgUrl
} from "../../../net/http";
const dateTimePicker = require('../../../utils/util');
const Cache = require('../../../utils/storage')
Page({
/**
* 页面的初始数据
*/
data: {
incomeEnterprise: {},
showError: false,
errorHint: '',
dateTimeArray: null,
dateTime: null,
startYear: 2000,
endYear: 2050,
files: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options.packageId)
// 获取完整的年月日时分秒,以及默认显示的数组
const obj = dateTimePicker.dateTimePicker(this.data.startYear, this.data.endYear);
this.setData({
dateTimeArray: obj.dateTimeArray,
dateTime: obj.dateTime,
selectFile: this.selectFile.bind(this),
uploadFile: this.uploadFile.bind(this),
});
this.getEnterpriseAccountInfo()
},
changeDateTime(e) {
// 处理日期时间选择变化的逻辑
console.log('选择的日期时间发生变化:', e.detail.value);
this.setData({
dateTime: e.detail.value
});
},
changeDateTimeColumn(e) {
// 处理日期时间选择器列变化的逻辑
console.log('选择器的列发生变化:', e.detail.column, e.detail.value);
},
//获取收款方信息
getEnterpriseAccountInfo() {
const _self = this
wx.showLoading({
title: '加载中...',
})
PayApi.doGetEnterpriseAccountInfo()
.then(res => {
wx.hideLoading()
console.log(res)
_self.setData({
incomeEnterprise: res
})
}, err => {
wx.hideLoading()
_self.setData({
showError: true,
errorHint: err.msg ? err.msg : '网络错误,请重试'
})
console.log(err)
})
},
previewImage(e) {
wx.previewImage({
current: e.currentTarget.id, // 当前显示图片的http链接
urls: this.data.files // 需要预览的图片http链接列表
})
},
selectFile(files) {
console.log('files', files)
// 返回false可以阻止某次文件上传
},
uploadFile(files) {
const tempFilePaths = files.tempFilePaths;
const token = Cache.get('token')
const header = {}
if (token) {
header.Auth = `Bearer ${token}`;
}
var that = this
for (let i = 0; i < tempFilePaths.length; i++) {
wx.uploadFile({
url: uploadImgUrl,
header: header,
filePath: tempFilePaths[i],
name: 'image',
success(res) {
console.log(res)
let result = JSON.parse(res.data)
that.data.files.push(result.data)
// do something例如把上传成功后的图片地址保存起来
},
fail(err) {
console.log(err);
// do something when upload failed
}
})
}
// 文件上传的函数返回一个promise
return new Promise((resolve, reject) => {
var result = {};
result['urls'] = tempFilePaths;
resolve(result);
})
},
deleteImage: function (e) {
var index = e.detail.index;
this.data.files.splice(index, 1);
},
uploadError(e) {
console.log('upload error', e.detail)
},
uploadSuccess(e) {
console.log('upload success', e.detail)
}
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {
"mp-toptips": "weui-miniprogram/toptips/toptips",
"mp-uploader": "weui-miniprogram/uploader/uploader"
}
}

View File

@ -0,0 +1,69 @@
<view class="page-container">
<view class="container-box">
<view class="box-title">收款方信息</view>
<view class="item mt-10">
<view class="title">公司名称</view>
<view class="content">{{incomeEnterprise.bankAccountName}}</view>
</view>
<view class="item">
<view class="title">开户银行</view>
<view class="content">{{incomeEnterprise.bankName}}</view>
</view>
<view class="item">
<view class="title">银行账号</view>
<view class="content">{{incomeEnterprise.bankNumber}}</view>
</view>
<view class="item">
<view class="title">银行联行号</view>
<view class="content">{{incomeEnterprise.bankUnionpayNumber}}</view>
</view>
<view class="item">
<view class="title">打款备注</view>
<view class="content">{{incomeEnterprise.bankRemark}}</view>
</view>
<view class="item">
<view class="title">说明</view>
<view class="content">请打款时必须按照以上备注填写</view>
</view>
</view>
<view class="container-box mt-20">
<view class="box-title">付款方信息</view>
<view class="item">
<view class="title">公司名称</view>
<view class="content">
<input class="input-box" placeholder="请输入公司名称" />
</view>
</view>
<view class="item">
<view class="title">开户银行</view>
<view class="content"><input class="input-box" placeholder="请输入开户银行" /></view>
</view>
<view class="item">
<view class="title">银行账号</view>
<view class="content"><input class="input-box" placeholder="请输入银行账号" /></view>
</view>
<view class="item">
<view class="title">打款时间</view>
<view class="content">
<picker mode="multiSelector" value="{{dateTime}}" bindchange="changeDateTime" bindcolumnchange="changeDateTimeColumn" range="{{dateTimeArray}}">
<view class="time-picker-box">
<view class="time-picker">
{{dateTimeArray[0][dateTime[0]]}}-{{dateTimeArray[1][dateTime[1]]}}-{{dateTimeArray[2][dateTime[2]]}} {{dateTimeArray[3][dateTime[3]]}}:{{dateTimeArray[4][dateTime[4]]}}:{{dateTimeArray[5][dateTime[5]]}}
</view>
<view class="time-icon" style="width: 16px;height: 16px;"></view>
</view>
</picker>
</view>
</view>
<view class="item-v">
<view class="content-v">
<mp-uploader max-count="4" delete="true" bindfail="uploadError" bindsuccess="uploadSuccess" select="{{selectFile}}" upload="{{uploadFile}}" bind:delete="deleteImage" files="{{files}}" title="上传打款凭证"></mp-uploader>
</view>
</view>
</view>
<view>
</view>
<mp-toptips msg="{{errorHint}}" type="error" show="{{showError}}"></mp-toptips>
</view>

View File

@ -0,0 +1,120 @@
/* pages/copyright/publicPay/publicPay.wxss */
.container-box {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
background-color: white;
border-radius: 10px;
padding: 15px;
box-shadow: 4rpx 4rpx 8rpx rgba(0, 0, 0, 0.1);
}
.box-title {
font-size: 18px;
font-weight: 800;
color: black;
}
.item {
display: flex;
flex-direction: row;
justify-content: center;
align-items: flex-start;
width: 100vw;
padding: 5px 0px;
}
/* .item:nth-last-of-type(n+1){
} */
.title {
flex: .2;
font-size: 14px;
color: black;
font-weight: 500;
}
.content {
flex: .8;
font-size: 14px;
color: rgb(68, 68, 68);
font-weight: 400;
}
.time-picker-box {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 60vw;
align-items: center;
}
.weui-uploader__title {
font-size: 14px;
color: black;
font-weight: 800;
padding-right: 10px;
}
.weui-uploader__bd {
display: flex;
flex-direction: row;
}
.weui-uploader__input-box {
width: 65px;
height: 65px;
border-radius: 5px;
}
.weui-uploader__file {
width: 65px;
height: 65px;
border-radius: 5px;
}
.weui-uploader__img {
border-radius: 5px;
}
.weui-uploader__overview {
display: flex;
flex-direction: row;
justify-content: space-between;
width: 80vw;
}
.time-picker {
font-size: 14px;
color: rgb(68, 68, 68);
font-weight: 400;
}
.time-icon {
background-image: url('data:image/svg+xml;charset=utf-8;base64,PHN2ZyB0PSIxNzQzNDE0Mzc3MjcwIiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQ2MjgiIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiI+PHBhdGggZD0iTTE5MiA1MTJoMTI4di0xMjhIMTkyeiBtMCAxOTJoMTI4di0xMjhIMTkyeiBtNzY4LTE5Mi4wMzJWMTYwYTk2IDk2IDAgMCAwLTk2LTk2aC05NnYtMzEuMTA0YzAtMTcuMjE2LTEzLjI0OC0zMi4wNjQtMzAuNDY0LTMyLjg2NEw3MzYgMGEzMiAzMiAwIDAgMC0zMiAzMnYzMkgzMjB2LTMxLjEwNEMzMjAgMTUuNjggMzA2Ljc1MiAwLjgzMiAyODkuNTM2IDAuMDMyTDI4OCAwYTMyIDMyIDAgMCAwLTMyIDMydjMySDE2MGE5NiA5NiAwIDAgMC05NiA5NnY2NDBhOTYgOTYgMCAwIDAgOTYgOTZoMjg4YzU4LjkxMiA3OC4wOCAxNTEuNDg4IDEyOCAyNTUuNzQ0IDEyOGgyLjg0OC0wLjE2YzE3NS45NjgtMS4zMTIgMzE4LjgxNi0xNDYuNDMyIDMxNy41MzYtMzIyLjRhMzE3LjEyIDMxNy4xMiAwIDAgMC02NC41NzYtMTkwLjRsMC41NzYgMC44ek0xMjggMTc2QTQ4IDQ4IDAgMCAxIDE3NiAxMjhIMjU2djMxLjEwNGMwIDE3LjIxNiAxMy4yNDggMzIuMDY0IDMwLjQ2NCAzMi44NjRMMjg4IDE5MmEzMiAzMiAwIDAgMCAzMi0zMlYxMjhoMzg0djMxLjEwNGMwIDE3LjIxNiAxMy4yNDggMzIuMDY0IDMwLjQ2NCAzMi44NjRMNzM2IDE5MmEzMiAzMiAwIDAgMCAzMi0zMlYxMjhoODBBNDggNDggMCAwIDEgODk2IDE3NlYyNTZIMTI4ek0zODQgNzA0djAuMzg0YTMxOC4wOCAzMTguMDggMCAwIDAgMjcuNDU2IDEyOS42NjRsLTAuOC0yLjAxNkgxNzZhNDggNDggMCAwIDEtNDgtNDh2LTQ2NGg3Njh2MTI4Yy01Mi44MzItMzkuOTM2LTExOS42MTYtNjQtMTkyLTY0cy0xMzkuMTY4IDI0LjAzMi0xOTIuOCA2NC41NzZsMC44LTAuNTc2di02NGgtMTI4djEyOGg2NGEzMTYuMzg0IDMxNi4zODQgMCAwIDAtNjQgMTkxLjUydjAuNTEyLTAuMDMyeiBtNTc1Ljk2OCAzLjQyNGEyNTYgMjU2IDAgMSAxLTc3LjM0NC0xODYuNzg0bC0wLjA2NC0wLjA2NGEyNTUuNTg0IDI1NS41ODQgMCAwIDEgNzcuNDA4IDE4My41NTJsLTAuMDMyIDMuNDg4di0wLjE5MnpNODAwIDcwNGgtOTZ2LTE2MGEzMiAzMiAwIDAgMC02NCAwdjE5MmEzMiAzMiAwIDAgMCAzMiAzMmgxMjhhMzIgMzIgMCAwIDAgMC02NHoiIHAtaWQ9IjQ2MjkiIGZpbGw9IiMyYzJjMmMiPjwvcGF0aD48L3N2Zz4=');
background-size: contain;
background-repeat: no-repeat;
}
.input-box {
width: 65vw;
}
.item-v {
display: flex;
flex-direction: column;
}
.title-v {
flex: 1;
font-size: 14px;
font-weight: 800;
}
.content-v {
font-size: 14px;
margin-top: 5px;
}

View File

@ -44,7 +44,7 @@ Page({
},
],
currentExpand: '',
currentStatus: 1, //默认状态 1进行 2完成
currentStatus: 'PROCESSING', //默认状态 PROCESSING进行中 COMPLETE完成
listLoading: 'loading', //loading 状态
listRefreshTrig: false, //是否正在刷新
pageData: {
@ -52,7 +52,8 @@ Page({
rows: 10
},
projectList: [], //项目列表
noticeContent: ''
noticeContent: '',
defaultNotice: '用AI创造用平台保护——欢迎来到您的著作权守护站!'
},
onLoad(e) {
const _self = this
@ -80,6 +81,7 @@ Page({
this.setData({
currentStatus: e.currentTarget.dataset.value
})
this.doChangeParams(1)
},
//切换类型
doChangeType(e) {
@ -136,8 +138,9 @@ Page({
rows: _self.data.pageData.rows,
tagNot: part2 ? part2 : '',
tagDataId: part1,
chargeType: _self.data.currentType,
chargeAdditionals: _self.data.currentExpand
chargeType: _self.data.currentType, //
chargeAdditionals: _self.data.currentExpand, //额外附加
status: _self.data.currentStatus, //当前项目状态
}
_self.doGetSelfList(params)
},
@ -158,7 +161,7 @@ Page({
.then(res => {
console.log(res)
_self.setData({
noticeContent: res.data
noticeContent: res.data && res.data != '' ? res.data : _self.data.defaultNotice
})
}, err => {
console.log(err)

View File

@ -24,8 +24,8 @@
<view class="list-title-box">
<view class="list-title-txt">软著列表</view>
<view class="list-title-btns">
<view bind:tap="doChangeStatus" data-value="1" class="{{currentStatus==1? 'btn-select':'btn-normal'}} border-left">进行中的</view>
<view bind:tap="doChangeStatus" data-value="2" class="{{currentStatus==2? 'btn-select':'btn-normal'}} border-right">已完成的</view>
<view bind:tap="doChangeStatus" data-value="PROCESSING" class="{{currentStatus=='PROCESSING'? 'btn-select':'btn-normal'}} border-left">进行中的</view>
<view bind:tap="doChangeStatus" data-value="COMPLETE" class="{{currentStatus=='COMPLETE'? 'btn-select':'btn-normal'}} border-right">已完成的</view>
</view>
</view>
<scroll-view scroll-x="{{true}}" class="mt-20">
@ -51,7 +51,7 @@
</scroll-view>
</view>
</view>
<container-loading loadingState="{{listLoading}}" widgetHeight="{{contentHeight-240}}">
<container-loading loadingState="{{listLoading}}" style="height:{{contentHeight-240}}px;">
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight-245}}px;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}">
<view class="list-content">
<block wx:for="{{projectList}}" wx:key="index">

File diff suppressed because one or more lines are too long

View File

@ -67,11 +67,14 @@ Page({
}
}, err => {
//TODO 发生未知错误,需要提醒重新进入小程序
console.log('doLogin')
console.log(err)
wx.hideLoading()
_self.doShowExit()
})
} else {
//TODO 发生未知错误,需要提醒重新进入小程序
console.log('code null')
_self.doShowExit()
}
},
@ -191,8 +194,8 @@ Page({
const _self = this
if (_self.data.contactName == '') {
_self.setData({
errorHint:'请输入联系人姓名',
showError:true
errorHint: '请输入联系人姓名',
showError: true
})
return
}

View File

@ -2,5 +2,6 @@
"usingComponents": {
"mp-half-screen-dialog": "weui-miniprogram/half-screen-dialog/half-screen-dialog",
"mp-toptips": "weui-miniprogram/toptips/toptips"
}
},
"navigationStyle": "custom"
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,109 @@
import ProApi from '../../../../net/api/projectApi'
const app = getApp()
const deviceInfo = wx.getDeviceInfo()
const screenInfo = wx.getWindowInfo();
const statusBarHeight = screenInfo.statusBarHeight; // 状态栏高度
const navBarHeight = deviceInfo.platform == 'IOS' ? 48 : 50; // 导航栏高度iOS 为 44pxAndroid 为 48px
const windowHeight = screenInfo.windowHeight - navBarHeight - statusBarHeight; //可用内容高度
Page({
/**
* 页面的初始数据
*/
data: {
couponsList: [],
loadingStatus: 'loading',
currentPage: 1,
listRefreshTrig: false,
currentStatus: 1,
rows: 10,
isLoadMore: false, //是否正在加载更多
height: windowHeight
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.doRefreshList()
},
//tab切换
doChangeStatus(e) {
const value = e.currentTarget.dataset.value
this.setData({
currentStatus: value
})
this.doRefreshList()
},
//获取我的优惠卷
doGetMyCoupons(data) {
const _self = this
ProApi.doGetCouponseList(data)
.then(res => {
wx.stopPullDownRefresh()
console.log('优惠卷')
console.log(res)
_self.setData({
loadingStatus: res.rows && res.rows.length > 0 ? 'success' : 'empty',
couponsList: _self.data.couponsList.concat(res.rows),
listRefreshTrig: false,
isLoadMore: false
})
}, err => {
console.log(err)
wx.stopPullDownRefresh()
_self.setData({
couponsList: [],
loadingStatus: 'error',
listRefreshTrig: false,
isLoadMore: false
})
})
},
//构建请求参数
buildParams(value) {
const _self = this
console.log(value)
var data = {}
if (value == 1) {
data.isEffective = 1
data.isUsed = 0
} else if (value == 2) {
data.isEffective = ''
data.isUsed = 1
} else {
data.isEffective = 0
data.isUsed = 0
}
data.rows = _self.data.rows
return data
},
//下拉刷新
doRefreshList() {
const _self = this
_self.setData({
currentPage: 1,
listRefreshTrig: true,
loadingStatus: 'loading'
})
var data = _self.buildParams(_self.data.currentStatus)
data.page = _self.data.currentPage
_self.doGetMyCoupons(data)
},
//加载更多
doLoadMore() {
if (this.data.isLoadMore) {
return
}
console.log('加载更多')
const _self = this
_self.setData({
currentPage: ++_self.data.currentPage,
isLoadMore: true
})
var data = _self.buildParams(_self.data.currentStatus)
data.page = _self.data.currentPage
_self.doGetMyCoupons(data)
}
})

View File

@ -0,0 +1,5 @@
{
"usingComponents": {
"container-loading": "/components/container-loading/container-loading"
}
}

View File

@ -0,0 +1,32 @@
<view class="list-title-btns">
<view bind:tap="doChangeStatus" data-value="1" class="{{currentStatus==1? 'btn-select':'btn-normal'}} border-left">可用</view>
<view bind:tap="doChangeStatus" data-value="2" class="{{currentStatus==2? 'btn-select':'btn-normal'}} border-right">已使用</view>
<view bind:tap="doChangeStatus" data-value="3" class="{{currentStatus==3? 'btn-select':'btn-normal'}} border-right">不可用</view>
</view>
<view style="margin-top: 50px;">
<container-loading loadingState="{{loadingStatus}}">
<scroll-view scroll-y style="height: {{height}}px;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
<view class="coupons-list-box">
<block wx:for="{{couponsList}}" wx:key="index">
<view class="tickets">
<view class="l-tickets">
<view class="ticket-title">
<view style="display: flex;flex-direction: row;justify-content: center;align-items: center;">
<view class="coupons-icon" style="width: 24px;height: 24px;">
</view>
<text>优惠卷</text>
</view>
<view></view>
</view>
<view class="ticket-content">{{item.coupon.title}}</view>
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
</view>
<view class="r-tickets">
减{{amount/100}}元
</view>
</view>
</block>
</view>
</scroll-view>
</container-loading>
</view>

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
// pages/mine/mine.js
import UserApi from '../../../net/api/userApi'
const app = getApp()
const deviceInfo = wx.getDeviceInfo()
const screenInfo = wx.getWindowInfo();
@ -15,6 +16,9 @@ Page({
navBarHeight: navBarHeight,
totalHeight: navBarHeight, // 导航栏总高度
contentHeight: windowHeight,
allCount: 0,
materialCount: 0,
accountInfo: {},
menuList: [{
"icon": "https://img.icons8.com/?size=100&id=OZzk5umGngVd&format=png&color=000000",
"title": "个人信息"
@ -40,7 +44,34 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
const _self = this
_self.getMineAccount()
_self.getMinePackageCount()
},
getMineAccount() {
const _self = this
UserApi.doGetMineAccount()
.then(res => {
_self.setData({
accountInfo: res
})
}, err => {
console.log(err)
})
},
getMinePackageCount() {
UserApi.doGetMinePackageCount()
.then(res => {
console.log(res)
}, err => {
console.log(err)
})
},
//优惠卷
doCoupons() {
wx.navigateTo({
url: '/pages/mine/mineAccount/mineCoupons/mineCoupons',
})
},
//跳转充值页面
doPay() {

View File

@ -1,5 +1,5 @@
<view class="bg-container">
<image class="bg-image" src="/static/images/bg_mine.jpeg"></image>
<image class="bg-image" src="/static/images/bg_mine.png"></image>
<view class="content-container">
<view class="custom-navbar" style="height: {{totalHeight}}px; padding-top: {{statusBarHeight}}px;justify-content: center;">
<view class="navbar-title" style="color:#532A00;">AI喵著</view>
@ -8,7 +8,7 @@
<view class="container-box">
<view class="box-up">
<view class="balance">
<view>10000000</view>
<view>{{accountInfo.accountMoney/100}}</view>
<view class="arrow-down"></view>
</view>
<view class="balance-box">
@ -21,13 +21,13 @@
<view class="package-bag">
<view class="package-bag-item">
<text class="title">全托管</text>
<text class="num">100</text>
<text class="num">{{allCount}}</text>
</view>
<view class="package-bag-item">
<text class="title">写材料</text>
<text class="num">2000</text>
<text class="num">{{materialCount}}</text>
</view>
<view class="package-bag-item">
<view class="package-bag-item" bind:tap="doCoupons">
<view class="icon icon-coupon-ind"></view>
<view class="title">优惠卷</view>
</view>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 KiB

BIN
static/images/bg_mine.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

BIN
static/images/ic_check_fit.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 720 B

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 384 B

After

Width:  |  Height:  |  Size: 345 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 403 B

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 418 B

After

Width:  |  Height:  |  Size: 377 B

BIN
static/images/load_err.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -1,3 +1,70 @@
const dateTimePicker = (startYear, endYear) => {
// 生成年份数组
const years = [];
for (let i = startYear; i <= endYear; i++) {
years.push(i.toString());
}
// 生成月份数组
const months = [];
for (let i = 1; i <= 12; i++) {
months.push(i < 10 ? `0${i}` : i.toString());
}
// 生成日期数组
const days = [];
for (let i = 1; i <= 31; i++) {
days.push(i < 10 ? `0${i}` : i.toString());
}
// 生成小时数组
const hours = [];
for (let i = 0; i < 24; i++) {
hours.push(i < 10 ? `0${i}` : i.toString());
}
// 生成分钟数组
const minutes = [];
for (let i = 0; i < 60; i++) {
minutes.push(i < 10 ? `0${i}` : i.toString());
}
// 生成秒数组
const seconds = [];
for (let i = 0; i < 60; i++) {
seconds.push(i < 10 ? `0${i}` : i.toString());
}
// 获取当前日期和时间
const now = new Date();
const currentYear = now.getFullYear().toString();
const currentMonth = (now.getMonth() + 1).toString().padStart(2, '0');
const currentDay = now.getDate().toString().padStart(2, '0');
const currentHour = now.getHours().toString().padStart(2, '0');
const currentMinute = now.getMinutes().toString().padStart(2, '0');
const currentSecond = now.getSeconds().toString().padStart(2, '0');
// 获取默认选中的索引
const dateTime = [
years.indexOf(currentYear),
months.indexOf(currentMonth),
days.indexOf(currentDay),
hours.indexOf(currentHour),
minutes.indexOf(currentMinute),
seconds.indexOf(currentSecond)
];
// 返回包含所有数组和默认选中索引的对象
const dateTimeArray = [years, months, days, hours, minutes, seconds];
return {
dateTimeArray,
dateTime
};
}
const formatTime = date => {
const year = date.getFullYear()
const month = date.getMonth() + 1
@ -114,5 +181,6 @@ module.exports = {
randomDark: randomDarkColor,
randomLight: randomLightColor,
formatHtml: formatRichText,
removeImgStyle: removeImgStyleFromRichText
removeImgStyle: removeImgStyleFromRichText,
dateTimePicker: dateTimePicker
}