Commit 54d483a3 by 穆启卓

新增跳到报名页 和 资金明细接口更改

parent 0678932f
...@@ -11,6 +11,16 @@ ...@@ -11,6 +11,16 @@
HelloWorld HelloWorld
}, },
mounted() { mounted() {
// 是否直接打开报名页
(() => {
location.search.split('&').map(item => {
if (item.indexOf('goPartakeChallenge') > -1) {
this.$router.push({name: 'PartakeChallenge'});
sessionStorage.setItem('goPartakeChallenge', item.split('=')[1]);
}
});
})();
// 计算rem比例
(function (win) { (function (win) {
var doc = win.document; var doc = win.document;
var html = doc.documentElement; var html = doc.documentElement;
......
...@@ -383,6 +383,18 @@ export function withdraw_log(page) { ...@@ -383,6 +383,18 @@ export function withdraw_log(page) {
}) })
} }
// 资金明细
export function withdraw_detail(page) {
return fetch({
url: api.withdraw_detail,
method: 'GET',
params: {
page: page,
per_page: 10
}
})
}
// 首页数据 // 首页数据
export function daka_index() { export function daka_index() {
return fetch({ return fetch({
......
...@@ -75,8 +75,10 @@ export default { ...@@ -75,8 +75,10 @@ export default {
daka_status_detail: `${api}/api/v1/daka_status/detail`, daka_status_detail: `${api}/api/v1/daka_status/detail`,
// 比赛详情弹窗 // 比赛详情弹窗
pop_up_windows: `${api}/api/v1/pop_up_windows`, pop_up_windows: `${api}/api/v1/pop_up_windows`,
//首页第一项立即报名 // 首页第一项立即报名
daka_info: `${api}/api/v1/daka_info`, daka_info: `${api}/api/v1/daka_info`,
//检查用户是否关注过公众号,是否需要弹窗 // 检查用户是否关注过公众号,是否需要弹窗
select_follow: `${api}/api/v1/select_follow`, select_follow: `${api}/api/v1/select_follow`,
// 资金明细
withdraw_detail: `${api}/api/v1/withdraw_detail`,
} }
\ No newline at end of file
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<div class="left-content">{{item.created_at}}</div> <div class="left-content">{{item.created_at}}</div>
</div> </div>
<div class="right-item"> <div class="right-item">
<div class="right-title">{{item.change_type === 2 ? '奖金' : item.change_type === 5 ? '押金' : '金额'}}(元)</div> <div class="right-title">{{item.change_type === 6 ? '达标奖励金' : item.change_type === 7 ? '契约金' : '金额'}}(元)</div>
<div class="right-content">+{{item.value}}</div> <div class="right-content">{{item.change_type === 6 ? '+' : item.change_type === 7 ? '-' : ''}}{{item.value}}</div>
</div> </div>
</div> </div>
<div class="no-more-list">没有更多数据啦~</div> <div class="no-more-list">没有更多数据啦~</div>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</template> </template>
<script> <script>
import Title from "@/components/Title.vue"; import Title from "@/components/Title.vue";
import {withdraw_log} from "@/components/axios/api"; import {withdraw_detail} from "@/components/axios/api";
export default { export default {
name: "AmountDetail", name: "AmountDetail",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
history.go(-1); history.go(-1);
}, },
getList(notRefresh) { getList(notRefresh) {
withdraw_log(this.page).then(res => { withdraw_detail(this.page).then(res => {
this.canScroll = true; this.canScroll = true;
if (res.code == 0) { if (res.code == 0) {
if (!notRefresh) { if (!notRefresh) {
......
...@@ -20,6 +20,12 @@ ...@@ -20,6 +20,12 @@
let local_hash = location.hash; let local_hash = location.hash;
window.localStorage.setItem("local_hash", local_hash); window.localStorage.setItem("local_hash", local_hash);
let redirect_uri = encodeURIComponent(`${location.origin}${location.pathname}`); let redirect_uri = encodeURIComponent(`${location.origin}${location.pathname}`);
// 如果链接后缀要求去到报名页
const goPartakeChallenge = sessionStorage.getItem('goPartakeChallenge');
if (goPartakeChallenge && goPartakeChallenge === 'true') {
sessionStorage.removeItem('goPartakeChallenge');
redirect_uri = encodeURIComponent(`${location.origin}/PartakeChallenge`);
}
location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd1aab06cc88d0a5e&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`); location.replace(`https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd1aab06cc88d0a5e&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`);
} else { } else {
console.log("拿到code", code); console.log("拿到code", code);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment