diff --git a/app.json b/app.json
index a70a26f..8afb67c 100644
--- a/app.json
+++ b/app.json
@@ -1,53 +1,52 @@
{
- "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",
- "pages/copyright/common/payState",
- "pages/readTxt/readTxt",
- "pages/mine/mineAccount/mineInfo/mineInfo",
- "pages/mine/mineAccount/mineOrder/mineOrder",
- "pages/mine/mineAccount/mineContact/mineContact",
- "pages/treaty/rule/rule"
- ],
- "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
- }
+ "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",
+ "pages/copyright/common/payState",
+ "pages/readTxt/readTxt",
+ "pages/mine/mineAccount/mineInfo/mineInfo",
+ "pages/mine/mineAccount/mineOrder/mineOrder",
+ "pages/mine/mineAccount/mineContact/mineContact",
+ "pages/treaty/rule/rule"
+ ],
+ "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
+ }
}
\ No newline at end of file
diff --git a/components/ad-popup/ad-popup.js b/components/ad-popup/ad-popup.js
index 43dc329..9669b28 100644
--- a/components/ad-popup/ad-popup.js
+++ b/components/ad-popup/ad-popup.js
@@ -17,7 +17,25 @@ Component({
}
},
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: {
toggleCheck() {
@@ -33,10 +51,47 @@ Component({
this.triggerEvent('close', this.data.checked); // 触发关闭事件
},
onFurl() {
- this.setData({
- visible: false
- })
+ this.startAnimation()
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);
}
}
})
\ No newline at end of file
diff --git a/components/ad-popup/ad-popup.wxml b/components/ad-popup/ad-popup.wxml
index d613397..7b6c0fa 100644
--- a/components/ad-popup/ad-popup.wxml
+++ b/components/ad-popup/ad-popup.wxml
@@ -1,5 +1,5 @@
{{item.coupon.title}}
有效期:{{item.coupon.useGmtStart}}至{{item.coupon.useGmtEnd}}
diff --git a/pages/copyright/createProjectInfo/createProjectInfo.wxss b/pages/copyright/createProjectInfo/createProjectInfo.wxss
index 2d481d2..fb47200 100644
--- a/pages/copyright/createProjectInfo/createProjectInfo.wxss
+++ b/pages/copyright/createProjectInfo/createProjectInfo.wxss
@@ -1,3 +1,7 @@
+page {
+ background: linear-gradient(to bottom, #F0F0F0, #FFFFFF);
+}
+
.create-container {
display: flex;
flex-direction: column;
@@ -77,6 +81,7 @@
flex-direction: row;
justify-content: space-between;
padding-right: 10px;
+ align-items: center;
}
.desc .icon {
diff --git a/pages/copyright/payment/payment.js b/pages/copyright/payment/payment.js
index 6628c97..776723a 100644
--- a/pages/copyright/payment/payment.js
+++ b/pages/copyright/payment/payment.js
@@ -70,7 +70,8 @@ Page({
if (regex.test(inputValue)) {
//数字
_self.setData({
- payMoney: e.detail.value
+ payMoney: e.detail.value,
+ selectBag: {}
})
} else {
wx.showToast({
@@ -79,7 +80,8 @@ Page({
success: () => {
setTimeout(() => {
_self.setData({
- payMoney: 100
+ payMoney: 100,
+ selectBag: {}
})
}, 1000);
}
@@ -117,14 +119,30 @@ Page({
},
//TODO 调用微信支付
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() {
const _self = this
if (_self.data.payWay == '1') {
//微信
- toWeChatPay()
+ _self.toWeChatPay()
} else {
//对公 需要传递参数 选中套餐 or 直接冲钱
const id = _self.data.selectBag.packageInfoId
diff --git a/pages/index/index.js b/pages/index/index.js
index a8e8892..2a98737 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -117,12 +117,9 @@ Page({
},
//创建项目
createCopy() {
- this.setData({
- showAd: true
+ wx.navigateTo({
+ url: '/pages/copyright/createBuy/createBuy',
})
- // wx.navigateTo({
- // url: '/pages/copyright/createBuy/createBuy',
- // })
},
//充值
goPayment() {
@@ -286,7 +283,7 @@ Page({
const _self = this
this.setData({
showDownload: true,
- sysPreviewUrl: copyrightUrl + item.previewUrl,
+ sysPreviewUrl: `${copyrightUrl}/${item.previewUrl}`,
tempItem: item
})
},
@@ -465,7 +462,8 @@ Page({
showSuccess: true,
showAd: false
})
- }, err => {
+ })
+ .catch(err => {
wx.hideLoading()
_self.setData({
errorHint: err.msg ? err.msg : '本次领取操作未成功,请重新进入小程序后再次尝试。',
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index e97fa94..2c7cb81 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -51,8 +51,8 @@
-
-
+
+
@@ -93,7 +93,6 @@
资料下载
- 温馨提示:若您想把下载的文件留存到本地,打开预览页面后,在界面右上角操作栏内,选择使用其他软件打开或者保存文件功能就能实现。
项目预览链接
{{sysPreviewUrl}}
@@ -147,6 +146,7 @@
+ 温馨提示:若您想把下载的文件留存到本地,打开预览页面后,在界面右上角操作栏内,选择使用其他软件打开或者保存文件功能就能实现。
diff --git a/pages/index/index.wxss b/pages/index/index.wxss
index 48dc0c1..4f25c89 100644
--- a/pages/index/index.wxss
+++ b/pages/index/index.wxss
@@ -64,7 +64,7 @@
.notice-box {
background-color: #FFE5BC;
margin-top: 20rpx;
-
+ border-radius: 3px;
display: flex;
flex-direction: row;
justify-content: flex-start;
@@ -374,7 +374,8 @@
.download-item:nth-of-type(n+2) {
margin-top: 10px;
}
-.download-item:last-child{
+
+.download-item:last-child {
margin-bottom: 80px;
}
@@ -501,7 +502,8 @@
color: rgb(248, 185, 50);
font-weight: bold;
}
-.weui-half-screen-dialog__ft{
+
+.weui-half-screen-dialog__ft {
height: 0;
padding: 0;
}
\ No newline at end of file
diff --git a/pages/mine/mineAccount/mineCoupons/mineCoupons.wxss b/pages/mine/mineAccount/mineCoupons/mineCoupons.wxss
index 809e8e2..d4b0d55 100644
--- a/pages/mine/mineAccount/mineCoupons/mineCoupons.wxss
+++ b/pages/mine/mineAccount/mineCoupons/mineCoupons.wxss
@@ -139,7 +139,7 @@ page {
}
.l-price {
- font-size: 30px;
+ font-size: 20px;
font-weight: bold;
margin-left: 5px;
}
@@ -157,9 +157,9 @@ page {
.r-title {
line-height: 25px;
color: #313131;
- font-size: 18px;
+ font-size: 14px;
font-weight: bold;
- text-align: left;
+ text-align: center;
font-family: PingFangSC-medium;
}
diff --git a/pages/mine/mineIndex/mine.js b/pages/mine/mineIndex/mine.js
index 0fff20d..acf02c3 100644
--- a/pages/mine/mineIndex/mine.js
+++ b/pages/mine/mineIndex/mine.js
@@ -74,11 +74,11 @@ Page({
console.log(err)
})
},
+ //获取账户余额
getMinePackageCount() {
const _self = this
UserApi.doGetMinePackageCount()
.then(res => {
- console.log(res)
_self.setData({
allCount: res.ALL,
materialCount: res.MATERIAL
diff --git a/pages/mine/mineIndex/mine.wxml b/pages/mine/mineIndex/mine.wxml
index 8562cc1..a2747f0 100644
--- a/pages/mine/mineIndex/mine.wxml
+++ b/pages/mine/mineIndex/mine.wxml
@@ -34,8 +34,8 @@
-