|
@@ -1,5 +1,7 @@
|
|
import httpRequestApi from '../../../utils/APIClient';
|
|
import httpRequestApi from '../../../utils/APIClient';
|
|
-import {formatDate} from '../../../utils/util';
|
|
|
|
|
|
+import {
|
|
|
|
+ formatDate
|
|
|
|
+} from '../../../utils/util';
|
|
Page({
|
|
Page({
|
|
data: {
|
|
data: {
|
|
fullScreenBtn: false,
|
|
fullScreenBtn: false,
|
|
@@ -12,6 +14,9 @@ Page({
|
|
user: [],
|
|
user: [],
|
|
inputValue: 'smdx',
|
|
inputValue: 'smdx',
|
|
replyList: [],
|
|
replyList: [],
|
|
|
|
+ howMuch: '2000',
|
|
|
|
+ moneySelect: 'moneySelect',
|
|
|
|
+ moneyNormal: 'moneyNormal'
|
|
},
|
|
},
|
|
onLoad: function (option) {
|
|
onLoad: function (option) {
|
|
if (option.title) {
|
|
if (option.title) {
|
|
@@ -42,6 +47,7 @@ Page({
|
|
user: othersTemp,
|
|
user: othersTemp,
|
|
author: author.wechatName,
|
|
author: author.wechatName,
|
|
authorAvatar: author.avatar,
|
|
authorAvatar: author.avatar,
|
|
|
|
+ authorUid: author.uid,
|
|
videoSrc: works.originVideo,
|
|
videoSrc: works.originVideo,
|
|
audioSrc: works.audioPath
|
|
audioSrc: works.audioPath
|
|
})
|
|
})
|
|
@@ -103,16 +109,16 @@ Page({
|
|
console.log(res.data.data.list);
|
|
console.log(res.data.data.list);
|
|
const replyList = res.data.data.list;
|
|
const replyList = res.data.data.list;
|
|
const replyTemp = [];
|
|
const replyTemp = [];
|
|
- replyList.forEach((item)=>{
|
|
|
|
|
|
+ replyList.forEach((item) => {
|
|
const temp = {};
|
|
const temp = {};
|
|
temp.nickName = item.user.wechatName;
|
|
temp.nickName = item.user.wechatName;
|
|
temp.avatar = item.user.avatar;
|
|
temp.avatar = item.user.avatar;
|
|
temp.text = item.detailDesc;
|
|
temp.text = item.detailDesc;
|
|
temp.id = item.id;
|
|
temp.id = item.id;
|
|
- temp.replyCount=item.replyCount;
|
|
|
|
- temp.time = formatDate(item.gmtCreated,3);
|
|
|
|
|
|
+ temp.replyCount = item.replyCount;
|
|
|
|
+ temp.time = formatDate(item.gmtCreated, 3);
|
|
console.log(temp.time)
|
|
console.log(temp.time)
|
|
- replyTemp.push(temp);
|
|
|
|
|
|
+ replyTemp.push(temp);
|
|
});
|
|
});
|
|
this.setData({
|
|
this.setData({
|
|
replyList: replyTemp,
|
|
replyList: replyTemp,
|
|
@@ -149,5 +155,55 @@ Page({
|
|
console.log(res);
|
|
console.log(res);
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ // 选择金额
|
|
|
|
+ setMoney: function(e){
|
|
|
|
+ this.setData({
|
|
|
|
+ howMuch: e.currentTarget.dataset.money
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 奖励
|
|
|
|
+ rewardMoney: function () {
|
|
|
|
+ console.log(this.data.authorUid);
|
|
|
|
+ const data = {
|
|
|
|
+ targetUid: this.data.authorUid,
|
|
|
|
+ amount: "50"
|
|
|
|
+ }
|
|
|
|
+ let uid = wx.getStorageSync('uid');
|
|
|
|
+ httpRequestApi.rewardMoney(uid, data).success(res => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.payMoneyt(res.data.data);
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //支付
|
|
|
|
+ payMoneyt: function (orderInfo) {
|
|
|
|
+ wx.requestPayment({
|
|
|
|
+ 'appId': orderInfo.appId,
|
|
|
|
+ 'timeStamp': orderInfo.timeStamp,
|
|
|
|
+ 'nonceStr': orderInfo.nonceStr,
|
|
|
|
+ 'package': orderInfo.package,
|
|
|
|
+ 'signType': orderInfo.signType,
|
|
|
|
+ 'paySign': orderInfo.sign,
|
|
|
|
+ 'success': function (res) {
|
|
|
|
+ console.log(res)
|
|
|
|
+ wx.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '支付成功',
|
|
|
|
+ success(res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ console.log('点击确定')
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
+ console.log('取消')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ 'fail': function (res) {
|
|
|
|
+ console.log('支付失败', res)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
})
|
|
})
|