Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
feat(pay): (#540) 全局申请置顶密码确认
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Oct 12, 2018
1 parent 028bbf7 commit 16a8f15
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/components/applyForTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,26 @@
<button
:disabled="disabled || loading"
class="m-long-btn m-signin-btn"
@click="handleOk">
@click="showPasswordConfirm">
<circle-loading v-if="loading"/>
<span v-else>{{ isOwner ? '确认置顶' : '申请置顶' }}</span>
</button>
</div>
</main>

<password-confirm ref="password" @submit="applyTop"/>

</div>
</transition>
</template>

<script>
import { noop } from "@/util";
import PasswordConfirm from "@/components/common/PasswordConfirm.vue";
export default {
name: "ApplyTop",
components: { PasswordConfirm },
data() {
return {
day: 0,
Expand Down Expand Up @@ -136,7 +141,10 @@ export default {
});
},
methods: {
applyTop() {
showPasswordConfirm() {
this.$refs.password.show();
},
applyTop(password) {
if (this.currency < this.amount) {
this.$router.push({ name: "currencyRecharge" });
return this.cancel();
Expand All @@ -145,7 +153,8 @@ export default {
this.loading = true;
const params = {
amount: ~~this.amount,
day: this.day
day: this.day,
password
};
this.applyApi(this.applyPayload, params)
Expand All @@ -160,9 +169,6 @@ export default {
this.$Message.error(err.response.data);
});
},
handleOk() {
this.applyTop();
},
chooseDefaultDay(day) {
this.day = day;
},
Expand Down

0 comments on commit 16a8f15

Please sign in to comment.