|
|
@@ -1,158 +0,0 @@
|
|
|
-<template>
|
|
|
- <div class="page" :style="{ backgroundImage: `url(${require('@assets/png-dabg.jpg')})` }">
|
|
|
- <div class="page-top">
|
|
|
- <div class="title">
|
|
|
- <div class="text1">{{ typeInfo.name }}</div>
|
|
|
- <div class="text2">{{ typeInfo.sub }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="input">
|
|
|
- <van-field
|
|
|
- type="text"
|
|
|
- :border="false"
|
|
|
- right-icon="guide-o"
|
|
|
- v-model="address"
|
|
|
- placeholder="请输入指定的链接进行绑定"
|
|
|
- @click-right-icon="goUrl"
|
|
|
- />
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="btns">
|
|
|
- <van-button type="default" @click="$router.back()" round>返回</van-button>
|
|
|
- <van-button type="primary" round @click="sure">确认</van-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-<script>
|
|
|
-import superLink from '@/mixins/superLink';
|
|
|
-export default {
|
|
|
- data() {
|
|
|
- return {
|
|
|
- address: '',
|
|
|
- assetId: 0,
|
|
|
- type: 'EXTERNALLINK'
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- typeInfo() {
|
|
|
- let info = [...this.typeOptions].find(item => {
|
|
|
- return item.value === this.type;
|
|
|
- });
|
|
|
- return info || {};
|
|
|
- }
|
|
|
- },
|
|
|
- mixins: [superLink],
|
|
|
- mounted() {
|
|
|
- if (this.$route.query.assetId) {
|
|
|
- this.assetId = this.$route.query.assetId;
|
|
|
- }
|
|
|
- if (this.$route.query.type) {
|
|
|
- this.type = this.$route.query.type;
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- sure() {
|
|
|
- this.$toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true
|
|
|
- });
|
|
|
- this.addHyperLink(this.address)
|
|
|
- .then(res => {
|
|
|
- this.$toast.success('设置成功');
|
|
|
- setTimeout(() => {
|
|
|
- this.$router.go(-2);
|
|
|
- }, 1500);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- this.$toast.clear();
|
|
|
- if (e && e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- addHyperLink(address) {
|
|
|
- return this.$http.post('/domainOrder/addHyperLink', {
|
|
|
- assetId: this.assetId,
|
|
|
- openHyperLink: true,
|
|
|
- hyperLinkType: this.type,
|
|
|
- address: address
|
|
|
- });
|
|
|
- },
|
|
|
- goUrl() {
|
|
|
- window.open(this.address);
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-.page {
|
|
|
- background-color: #0a0b21;
|
|
|
- min-height: var(--app-height) !important;
|
|
|
- background-size: 100% auto;
|
|
|
- background-repeat: no-repeat;
|
|
|
-}
|
|
|
-
|
|
|
-.page-top {
|
|
|
- padding: calc(var(--safe-top) + 24px) 20px 12px;
|
|
|
- .flex();
|
|
|
- align-items: flex-end;
|
|
|
- .title {
|
|
|
- flex-grow: 1;
|
|
|
- .text1 {
|
|
|
- font-size: 20px;
|
|
|
- font-family: AlimamaShuHeiTi;
|
|
|
- color: #ffffff;
|
|
|
- line-height: 30px;
|
|
|
- }
|
|
|
- .text2 {
|
|
|
- font-size: 12px;
|
|
|
- color: #ffffff60;
|
|
|
- line-height: 24px;
|
|
|
- margin-top: 3px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.btns {
|
|
|
- position: fixed;
|
|
|
- bottom: 0;
|
|
|
- right: 0;
|
|
|
- left: 0;
|
|
|
- .flex();
|
|
|
- padding: 9px 16px;
|
|
|
- background-color: #222426;
|
|
|
- z-index: 20;
|
|
|
- .bottom(9px);
|
|
|
- .van-button {
|
|
|
- flex-grow: 1;
|
|
|
- box-sizing: border-box;
|
|
|
- --van-button-primary-background-color: linear-gradient(138deg, #e611ff 0%, #6e44ff 100%);
|
|
|
- }
|
|
|
- .van-button + .van-button {
|
|
|
- margin-left: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .van-button--default {
|
|
|
- background: rgba(255, 255, 255, 0.2);
|
|
|
- border-width: 0;
|
|
|
- color: #fff;
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-.input {
|
|
|
- padding: 20px;
|
|
|
- /deep/ .van-cell {
|
|
|
- background: #ffffff;
|
|
|
- border-radius: 19px;
|
|
|
- --van-cell-vertical-padding: 7px;
|
|
|
- --van-cell-horizontal-padding: 12px;
|
|
|
- --van-field-placeholder-text-color: rgba(0, 0, 0, 0.3);
|
|
|
- --van-field-right-icon-color: #000;
|
|
|
-
|
|
|
- .van-field__control {
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
-</style>
|