优惠卷领取动画,微信支付接口
This commit is contained in:
parent
2f7b338d00
commit
a2c305591f
101
app.json
101
app.json
@ -1,53 +1,52 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
"pages/login/login",
|
"pages/login/login",
|
||||||
"pages/index/index",
|
"pages/index/index",
|
||||||
"pages/treaty/privacy/privacy",
|
"pages/treaty/privacy/privacy",
|
||||||
"pages/treaty/service/service",
|
"pages/treaty/service/service",
|
||||||
"pages/mine/mineIndex/mine",
|
"pages/mine/mineIndex/mine",
|
||||||
"pages/copyright/createProjectInfo/createProjectInfo",
|
"pages/copyright/createProjectInfo/createProjectInfo",
|
||||||
"pages/copyright/createBuy/createBuy",
|
"pages/copyright/createBuy/createBuy",
|
||||||
"pages/copyright/payment/payment",
|
"pages/copyright/payment/payment",
|
||||||
"pages/mine/mineAccount/mineCoupons/mineCoupons",
|
"pages/mine/mineAccount/mineCoupons/mineCoupons",
|
||||||
"pages/copyright/publicPay/publicPay",
|
"pages/copyright/publicPay/publicPay",
|
||||||
"pages/copyright/common/payState",
|
"pages/copyright/common/payState",
|
||||||
"pages/readTxt/readTxt",
|
"pages/readTxt/readTxt",
|
||||||
"pages/mine/mineAccount/mineInfo/mineInfo",
|
"pages/mine/mineAccount/mineInfo/mineInfo",
|
||||||
"pages/mine/mineAccount/mineOrder/mineOrder",
|
"pages/mine/mineAccount/mineOrder/mineOrder",
|
||||||
"pages/mine/mineAccount/mineContact/mineContact",
|
"pages/mine/mineAccount/mineContact/mineContact",
|
||||||
"pages/treaty/rule/rule"
|
"pages/treaty/rule/rule"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "AI喵著",
|
"navigationBarTitleText": "AI喵著",
|
||||||
"navigationBarBackgroundColor": "#ffffff"
|
"navigationBarBackgroundColor": "#ffffff"
|
||||||
},
|
},
|
||||||
"tabBar": {
|
"tabBar": {
|
||||||
"color": "#515151",
|
"color": "#515151",
|
||||||
"selectedColor": "#FE9944",
|
"selectedColor": "#FE9944",
|
||||||
"list": [
|
"list": [{
|
||||||
{
|
"pagePath": "pages/index/index",
|
||||||
"pagePath": "pages/index/index",
|
"text": "首页",
|
||||||
"text": "首页",
|
"iconPath": "/static/images/ic_home_normal.png",
|
||||||
"iconPath": "/static/images/ic_home_normal.png",
|
"selectedIconPath": "/static/images/ic_home_select.png"
|
||||||
"selectedIconPath": "/static/images/ic_home_select.png"
|
},
|
||||||
},
|
{
|
||||||
{
|
"pagePath": "pages/mine/mineIndex/mine",
|
||||||
"pagePath": "pages/mine/mineIndex/mine",
|
"text": "我的",
|
||||||
"text": "我的",
|
"iconPath": "/static/images/ic_mine_normal.png",
|
||||||
"iconPath": "/static/images/ic_mine_normal.png",
|
"selectedIconPath": "/static/images/ic_mine_select.png"
|
||||||
"selectedIconPath": "/static/images/ic_mine_select.png"
|
}
|
||||||
}
|
]
|
||||||
]
|
},
|
||||||
},
|
"style": "v2",
|
||||||
"style": "v2",
|
"componentFramework": "glass-easel",
|
||||||
"componentFramework": "glass-easel",
|
"sitemapLocation": "sitemap.json",
|
||||||
"sitemapLocation": "sitemap.json",
|
"lazyCodeLoading": "requiredComponents",
|
||||||
"lazyCodeLoading": "requiredComponents",
|
"usingComponents": {
|
||||||
"usingComponents": {
|
"ad-popup": "./components/ad-popup/ad-popup"
|
||||||
"ad-popup": "./components/ad-popup/ad-popup"
|
},
|
||||||
},
|
"useExtendedLib": {
|
||||||
"useExtendedLib": {
|
"weui": true
|
||||||
"weui": true
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -17,7 +17,25 @@ Component({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
checked: false
|
checked: false,
|
||||||
|
initPosition: {
|
||||||
|
left: 50,
|
||||||
|
top: 50
|
||||||
|
},
|
||||||
|
animation: {},
|
||||||
|
screenWidth: 0,
|
||||||
|
screenHeight: 0
|
||||||
|
},
|
||||||
|
lifetimes: {
|
||||||
|
ready() {
|
||||||
|
const systemInfo = wx.getWindowInfo()
|
||||||
|
this.screenWidth = systemInfo.windowWidth;
|
||||||
|
this.screenHeight = systemInfo.windowHeight;
|
||||||
|
this.setData({
|
||||||
|
screenHeight: systemInfo.windowHeight,
|
||||||
|
screenWidth: systemInfo.windowWidth
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toggleCheck() {
|
toggleCheck() {
|
||||||
@ -33,10 +51,47 @@ Component({
|
|||||||
this.triggerEvent('close', this.data.checked); // 触发关闭事件
|
this.triggerEvent('close', this.data.checked); // 触发关闭事件
|
||||||
},
|
},
|
||||||
onFurl() {
|
onFurl() {
|
||||||
this.setData({
|
this.startAnimation()
|
||||||
visible: false
|
|
||||||
})
|
|
||||||
this.triggerEvent('furl', this.data.checked); //触发收下试卷
|
this.triggerEvent('furl', this.data.checked); //触发收下试卷
|
||||||
|
},
|
||||||
|
startAnimation() {
|
||||||
|
// 先重置元素状态
|
||||||
|
this.setData({
|
||||||
|
showBox: true,
|
||||||
|
animation: {}
|
||||||
|
});
|
||||||
|
// 短暂延迟确保重置完成
|
||||||
|
setTimeout(() => {
|
||||||
|
const animation = wx.createAnimation({
|
||||||
|
duration: 1000,
|
||||||
|
timingFunction: 'ease-in-out'
|
||||||
|
});
|
||||||
|
const targetLeft = this.data.screenWidth - 170;
|
||||||
|
const targetTop = this.data.screenHeight - 170;
|
||||||
|
console.log(this.data.screenHeight)
|
||||||
|
console.log(this.data.screenWidth)
|
||||||
|
animation
|
||||||
|
.translate(targetLeft - this.data.initPosition.left, targetTop - this.data.initPosition.top)
|
||||||
|
.scale(0.03)
|
||||||
|
.rotate(180)
|
||||||
|
.skew(10, 10)
|
||||||
|
.opacity(0)
|
||||||
|
.step();
|
||||||
|
this.setData({
|
||||||
|
animation: animation.export()
|
||||||
|
});
|
||||||
|
// 动画结束后隐藏元素
|
||||||
|
setTimeout(() => {
|
||||||
|
this.setData({
|
||||||
|
visible: false,
|
||||||
|
initPosition: {
|
||||||
|
left: 50,
|
||||||
|
top: 50
|
||||||
|
},
|
||||||
|
animation: {}
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
@ -1,5 +1,5 @@
|
|||||||
<view class="ad-popup" wx:if="{{visible}}">
|
<view class="ad-popup" wx:if="{{visible}}">
|
||||||
<view class="ad-content">
|
<view class="ad-content" animation="{{animation}}" style="left: {{initPosition.left}};top:{{initPosition.top}}">
|
||||||
<view class="ic-close close-icon" bind:tap="onClose"></view>
|
<view class="ic-close close-icon" bind:tap="onClose"></view>
|
||||||
<view class="image-box">
|
<view class="image-box">
|
||||||
<view class="ad-bg img"></view>
|
<view class="ad-bg img"></view>
|
||||||
|
@ -7,6 +7,7 @@ const apiPath = {
|
|||||||
getPayOrder: '/api/pay/get-pay', //获取支付订单
|
getPayOrder: '/api/pay/get-pay', //获取支付订单
|
||||||
enterprisePay: '/api/pay/pay-account-recharge/${accountRechargeId}', //企业付款完成支付
|
enterprisePay: '/api/pay/pay-account-recharge/${accountRechargeId}', //企业付款完成支付
|
||||||
enterpriseAccountInfo: '/api/pay/get-pay-system-bank', //获取公司账户信息
|
enterpriseAccountInfo: '/api/pay/get-pay-system-bank', //获取公司账户信息
|
||||||
|
wxPayParams: '/api/accountrecharge/save-wx-pay-prepay-id', //获取微信支付所需参数 rechargeMoney金额 packageInfoId套餐包ID
|
||||||
}
|
}
|
||||||
class PayService {
|
class PayService {
|
||||||
static doGetBuyPackageList(type, data) {
|
static doGetBuyPackageList(type, data) {
|
||||||
@ -26,6 +27,10 @@ class PayService {
|
|||||||
static doGetOrder(data) {
|
static doGetOrder(data) {
|
||||||
return request(apiPath.getPayOrder, "POST", data)
|
return request(apiPath.getPayOrder, "POST", data)
|
||||||
}
|
}
|
||||||
|
//获取微信支付参数
|
||||||
|
static doGetWxPayParams(data) {
|
||||||
|
return request(apiPath.wxPayParams, "POST", data, null, "operator")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PayService;
|
export default PayService;
|
@ -2,6 +2,7 @@ const Cache = require('../utils/storage');
|
|||||||
// 定义api服务地址
|
// 定义api服务地址
|
||||||
// const baseUrl = 'https://www.xzszwhy.cn/daqi/app';
|
// const baseUrl = 'https://www.xzszwhy.cn/daqi/app';
|
||||||
const operatorUrl = 'http://192.168.0.15:8091/operator';
|
const operatorUrl = 'http://192.168.0.15:8091/operator';
|
||||||
|
// const operatorUrl = 'https://www.aimzhu.com/operator';
|
||||||
const copyrightUrl = 'http://192.168.0.15:7025/copyright';
|
const copyrightUrl = 'http://192.168.0.15:7025/copyright';
|
||||||
const uploadImgUrl = copyrightUrl + '/api/file/v2/upload-image'
|
const uploadImgUrl = copyrightUrl + '/api/file/v2/upload-image'
|
||||||
const previewUrl = copyrightUrl + '/route/file/v2/download/true/'
|
const previewUrl = copyrightUrl + '/route/file/v2/download/true/'
|
||||||
|
@ -52,6 +52,14 @@ Page({
|
|||||||
wx.setNavigationBarTitle({
|
wx.setNavigationBarTitle({
|
||||||
title: '创建软著',
|
title: '创建软著',
|
||||||
})
|
})
|
||||||
|
wx.setNavigationBarColor({
|
||||||
|
frontColor: '#000000', // 必写项,字体颜色仅支持#ffffff和#000000
|
||||||
|
backgroundColor: '#F0F0F0', // 传递的颜色值,仅支持十六进制颜色
|
||||||
|
animation: { // 可选项
|
||||||
|
duration: 500,
|
||||||
|
timingFunc: 'easeIn'
|
||||||
|
}
|
||||||
|
})
|
||||||
const typeParams = options.type //类型
|
const typeParams = options.type //类型
|
||||||
const priceParams = options.price //价格
|
const priceParams = options.price //价格
|
||||||
const isUrgentParams = options.isUrgent
|
const isUrgentParams = options.isUrgent
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view wx:if="{{canSelCoupons}}" class="item">
|
<view wx:if="{{canSelCoupons}}" class="item">
|
||||||
<text class="label">优惠券</text>
|
<text class="label">优惠券</text>
|
||||||
<text style="flex:1;text-align: right;padding-right: 10px;color: #555;font-size: 14px;">{{selectCoupons.id? selectCoupons.id : '请选择优惠券'}}</text>
|
<text bindtap="doShowCoupons" style="flex:1;text-align: right;padding-right: 10px;color: #555;font-size: 14px;">{{selectCoupons.couponId? selectCoupons.coupon.title : '请选择优惠券'}}</text>
|
||||||
<text class="link" wx:if="{{!tools.isEmpty(selectCoupons)}}" bind:tap="clearSelectPackageOrCoupons">取消</text>
|
<text class="link" wx:if="{{!tools.isEmpty(selectCoupons)}}" bind:tap="clearSelectPackageOrCoupons">取消</text>
|
||||||
<text class="link" bindtap="doShowCoupons" wx:if="{{tools.isEmpty(selectCoupons)}}">选择</text>
|
<text class="link" bindtap="doShowCoupons" wx:if="{{tools.isEmpty(selectCoupons)}}">选择</text>
|
||||||
</view>
|
</view>
|
||||||
@ -133,7 +133,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>优惠卷</text>
|
<text>优惠卷</text>
|
||||||
</view>
|
</view>
|
||||||
<view>减{{amount/100}}元</view>
|
<view>减{{item.coupon.amount/100}}元</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="ticket-content">{{item.coupon.title}}</view>
|
<view class="ticket-content">{{item.coupon.title}}</view>
|
||||||
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
|
<view class="ticket-desc">有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}</view>
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
page {
|
||||||
|
background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
.create-container {
|
.create-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -77,6 +81,7 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.desc .icon {
|
.desc .icon {
|
||||||
|
@ -70,7 +70,8 @@ Page({
|
|||||||
if (regex.test(inputValue)) {
|
if (regex.test(inputValue)) {
|
||||||
//数字
|
//数字
|
||||||
_self.setData({
|
_self.setData({
|
||||||
payMoney: e.detail.value
|
payMoney: e.detail.value,
|
||||||
|
selectBag: {}
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
@ -79,7 +80,8 @@ Page({
|
|||||||
success: () => {
|
success: () => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
_self.setData({
|
_self.setData({
|
||||||
payMoney: 100
|
payMoney: 100,
|
||||||
|
selectBag: {}
|
||||||
})
|
})
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@ -117,14 +119,30 @@ Page({
|
|||||||
},
|
},
|
||||||
//TODO 调用微信支付
|
//TODO 调用微信支付
|
||||||
toWeChatPay() {
|
toWeChatPay() {
|
||||||
|
const _self = this
|
||||||
|
wx.showLoading({
|
||||||
|
title: '支付中...',
|
||||||
|
})
|
||||||
|
const data = {
|
||||||
|
rechargeMoney: _self.data.payMoney,
|
||||||
|
packageInfoId: _self.data.selectBag.packageInfoId ? _self.data.selectBag.packageInfoId : ''
|
||||||
|
}
|
||||||
|
PayService.doGetWxPayParams(data)
|
||||||
|
.then(res => {
|
||||||
|
wx.hideLoading()
|
||||||
|
console.log(res)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
wx.hideLoading()
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
//去支付
|
//去支付
|
||||||
doPay() {
|
doPay() {
|
||||||
const _self = this
|
const _self = this
|
||||||
if (_self.data.payWay == '1') {
|
if (_self.data.payWay == '1') {
|
||||||
//微信
|
//微信
|
||||||
toWeChatPay()
|
_self.toWeChatPay()
|
||||||
} else {
|
} else {
|
||||||
//对公 需要传递参数 选中套餐 or 直接冲钱
|
//对公 需要传递参数 选中套餐 or 直接冲钱
|
||||||
const id = _self.data.selectBag.packageInfoId
|
const id = _self.data.selectBag.packageInfoId
|
||||||
|
@ -117,12 +117,9 @@ Page({
|
|||||||
},
|
},
|
||||||
//创建项目
|
//创建项目
|
||||||
createCopy() {
|
createCopy() {
|
||||||
this.setData({
|
wx.navigateTo({
|
||||||
showAd: true
|
url: '/pages/copyright/createBuy/createBuy',
|
||||||
})
|
})
|
||||||
// wx.navigateTo({
|
|
||||||
// url: '/pages/copyright/createBuy/createBuy',
|
|
||||||
// })
|
|
||||||
},
|
},
|
||||||
//充值
|
//充值
|
||||||
goPayment() {
|
goPayment() {
|
||||||
@ -286,7 +283,7 @@ Page({
|
|||||||
const _self = this
|
const _self = this
|
||||||
this.setData({
|
this.setData({
|
||||||
showDownload: true,
|
showDownload: true,
|
||||||
sysPreviewUrl: copyrightUrl + item.previewUrl,
|
sysPreviewUrl: `${copyrightUrl}/${item.previewUrl}`,
|
||||||
tempItem: item
|
tempItem: item
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@ -465,7 +462,8 @@ Page({
|
|||||||
showSuccess: true,
|
showSuccess: true,
|
||||||
showAd: false
|
showAd: false
|
||||||
})
|
})
|
||||||
}, err => {
|
})
|
||||||
|
.catch(err => {
|
||||||
wx.hideLoading()
|
wx.hideLoading()
|
||||||
_self.setData({
|
_self.setData({
|
||||||
errorHint: err.msg ? err.msg : '本次领取操作未成功,请重新进入小程序后再次尝试。',
|
errorHint: err.msg ? err.msg : '本次领取操作未成功,请重新进入小程序后再次尝试。',
|
||||||
|
@ -51,8 +51,8 @@
|
|||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<container-loading loadingState="{{listLoading}}" style="height: {{contentHeight+100}}rpx;" bindrefresh="doRefreshList">
|
<container-loading loadingState="{{listLoading}}" style="height: {{contentHeight+110}}rpx;" bindrefresh="doRefreshList">
|
||||||
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight+100}}rpx;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
<scroll-view scroll-y="{{true}}" style="height: {{contentHeight+110}}rpx;" bindrefresherrefresh="doRefreshList" refresher-enabled refresher-triggered="{{listRefreshTrig}}" bindscrolltolower="doLoadMore" lower-threshold='30'>
|
||||||
<view class="list-content">
|
<view class="list-content">
|
||||||
<block wx:for="{{projectList}}" wx:key="index">
|
<block wx:for="{{projectList}}" wx:key="index">
|
||||||
<view class="list-item">
|
<view class="list-item">
|
||||||
@ -93,7 +93,6 @@
|
|||||||
<mp-half-screen-dialog show="{{showDownload}}" ext-class="custom-dialog">
|
<mp-half-screen-dialog show="{{showDownload}}" ext-class="custom-dialog">
|
||||||
<view slot="title" style="font-size: 16px;font-weight: bold;">资料下载</view>
|
<view slot="title" style="font-size: 16px;font-weight: bold;">资料下载</view>
|
||||||
<view slot="desc" style="margin-top: 10px;">
|
<view slot="desc" style="margin-top: 10px;">
|
||||||
<view class="hint">温馨提示:若您想把下载的文件留存到本地,打开预览页面后,在界面右上角操作栏内,选择使用其他软件打开或者保存文件功能就能实现。</view>
|
|
||||||
<view class="download-desc">
|
<view class="download-desc">
|
||||||
<view class="link-title">项目预览链接</view>
|
<view class="link-title">项目预览链接</view>
|
||||||
<text class="link" selectable="true">{{sysPreviewUrl}}</text>
|
<text class="link" selectable="true">{{sysPreviewUrl}}</text>
|
||||||
@ -147,6 +146,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="hint mt-10">温馨提示:若您想把下载的文件留存到本地,打开预览页面后,在界面右上角操作栏内,选择使用其他软件打开或者保存文件功能就能实现。</view>
|
||||||
</view>
|
</view>
|
||||||
</mp-half-screen-dialog>
|
</mp-half-screen-dialog>
|
||||||
<down-progress isShow="{{downloading}}" progress="{{downloadProgress}}"></down-progress>
|
<down-progress isShow="{{downloading}}" progress="{{downloadProgress}}"></down-progress>
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
.notice-box {
|
.notice-box {
|
||||||
background-color: #FFE5BC;
|
background-color: #FFE5BC;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
|
border-radius: 3px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
@ -374,7 +374,8 @@
|
|||||||
.download-item:nth-of-type(n+2) {
|
.download-item:nth-of-type(n+2) {
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
.download-item:last-child{
|
|
||||||
|
.download-item:last-child {
|
||||||
margin-bottom: 80px;
|
margin-bottom: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -501,7 +502,8 @@
|
|||||||
color: rgb(248, 185, 50);
|
color: rgb(248, 185, 50);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.weui-half-screen-dialog__ft{
|
|
||||||
|
.weui-half-screen-dialog__ft {
|
||||||
height: 0;
|
height: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
@ -139,7 +139,7 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.l-price {
|
.l-price {
|
||||||
font-size: 30px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
@ -157,9 +157,9 @@ page {
|
|||||||
.r-title {
|
.r-title {
|
||||||
line-height: 25px;
|
line-height: 25px;
|
||||||
color: #313131;
|
color: #313131;
|
||||||
font-size: 18px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: left;
|
text-align: center;
|
||||||
font-family: PingFangSC-medium;
|
font-family: PingFangSC-medium;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,11 +74,11 @@ Page({
|
|||||||
console.log(err)
|
console.log(err)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//获取账户余额
|
||||||
getMinePackageCount() {
|
getMinePackageCount() {
|
||||||
const _self = this
|
const _self = this
|
||||||
UserApi.doGetMinePackageCount()
|
UserApi.doGetMinePackageCount()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
console.log(res)
|
|
||||||
_self.setData({
|
_self.setData({
|
||||||
allCount: res.ALL,
|
allCount: res.ALL,
|
||||||
materialCount: res.MATERIAL
|
materialCount: res.MATERIAL
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-box" style="height: {{contentHeight+180}}rpx;">
|
<view class="menu-box" style="height: {{contentHeight+190}}rpx;">
|
||||||
<scroll-view scroll-y style="height: {{contentHeight+180}}rpx;">
|
<scroll-view scroll-y style="height: {{contentHeight+190}}rpx;">
|
||||||
<view class="menu-container">
|
<view class="menu-container">
|
||||||
<block wx:for="{{menuList}}" wx:key="index">
|
<block wx:for="{{menuList}}" wx:key="index">
|
||||||
<view class="menu-item" bind:tap="itemClick" data-path="{{item.path}}">
|
<view class="menu-item" bind:tap="itemClick" data-path="{{item.path}}">
|
||||||
|
@ -175,6 +175,16 @@ const removeImgStyleFromRichText = (richText) => {
|
|||||||
}
|
}
|
||||||
return richText;
|
return richText;
|
||||||
}
|
}
|
||||||
|
//生成32位随机字符串
|
||||||
|
const random32Str = () => {
|
||||||
|
const charSet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
||||||
|
let randomString = '';
|
||||||
|
for (let i = 0; i < 32; i++) {
|
||||||
|
const randomIndex = Math.floor(Math.random() * charSet.length);
|
||||||
|
randomString += charSet.charAt(randomIndex);
|
||||||
|
}
|
||||||
|
return randomString;
|
||||||
|
}
|
||||||
module.exports = {
|
module.exports = {
|
||||||
formatTime: formatTime,
|
formatTime: formatTime,
|
||||||
formatDate: formatDate,
|
formatDate: formatDate,
|
||||||
@ -185,5 +195,6 @@ module.exports = {
|
|||||||
formatHtml: formatRichText,
|
formatHtml: formatRichText,
|
||||||
removeImgStyle: removeImgStyleFromRichText,
|
removeImgStyle: removeImgStyleFromRichText,
|
||||||
dateTimePicker: dateTimePicker,
|
dateTimePicker: dateTimePicker,
|
||||||
pxToRpx: pxToRpx
|
pxToRpx: pxToRpx,
|
||||||
|
random32Str: random32Str
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user