yuany 3 tahun lalu
induk
melakukan
16f93fddcd

+ 34 - 29
src/components/Post.vue

@@ -57,14 +57,18 @@
                             <div class="minter_con">
                                 <div>
                                     <div class="minter_con_one">
-                                        <img :src="require('@assets/icon@3x.png')" alt="" class="minter_con_one_text1">
+                                        <img :src="logoImg" alt="" class="minter_con_one_text1" />
                                         <!-- <div class="minter_con_one_text1">拉索</div> -->
                                         <div class="minter_con_one_text2" v-if="info.category">{{ info.category }}</div>
                                     </div>
                                     <div class="minter_con_two">扫码打开拉索APP,发现有趣数字藏品</div>
                                 </div>
                                 <div>
-                                    <vue-qrcode :value="url" :options="{ width: 70, margin: 3 }" class="code"></vue-qrcode>
+                                    <vue-qrcode
+                                        :value="url"
+                                        :options="{ width: 70, margin: 3 }"
+                                        class="code"
+                                    ></vue-qrcode>
                                 </div>
                             </div>
                             <!-- <div class="minter-content">
@@ -80,11 +84,10 @@
                     </div>
                 </template>
 
-                <div class="btn" @click.stop="">
-                    <!-- v-if="cordova" -->
+                <div class="btn" @click.stop="" v-if="cordova">
                     <van-button type="primary" @click="save">保存图片</van-button>
                 </div>
-                <!-- <div class="tips" v-else>长按图片保存</div> -->
+                <div class="tips" v-else @click="save">长按图片保存</div>
             </div>
         </van-overlay>
         <div class="share" v-if="!noButton" @click="init">
@@ -130,7 +133,8 @@ export default {
             detailImg: '',
             userImg: '',
             cordova: window.cordova,
-            shareBg: ''
+            shareBg: '',
+            logoImg: ''
         };
     },
     computed: {
@@ -187,6 +191,7 @@ export default {
                     forbidClick: true
                 });
                 this.$nextTick(() => {
+                    this.getImgBase64(require('@assets/icon@3x.png'), 'logoImg');
                     if (this.assignment && this.pageUrl === 'productDetail') {
                         this.getImgBase64(this.info.shareBg, 'shareBg');
                     } else {
@@ -237,26 +242,26 @@ export default {
             });
         },
         save() {
-            // if (window.cordova) {
-                let _this = this;
-                imageSaver.saveBase64Image(
-                    { data: this.img },
-                    function (filePath) {
-                        _this.$toast('图片已保存至文件夹');
-                        _this.show = false;
-                        console.log('File saved on ' + filePath);
-                    },
-                    function (msg) {
-                        _this.$dialog.alert({
-                            title: '提示',
-                            message: msg + ',请尝试截图保存分享'
-                        });
-                        (1).then(() => {
-                            _this.preview(0, [_this.img]);
-                        });
-                    }
-                );
-            // }
+            if (window.cordova) {
+            let _this = this;
+            imageSaver.saveBase64Image(
+                { data: this.img },
+                function (filePath) {
+                    _this.$toast('图片已保存至文件夹');
+                    _this.show = false;
+                    console.log('File saved on ' + filePath);
+                },
+                function (msg) {
+                    _this.$dialog.alert({
+                        title: '提示',
+                        message: msg + ',请尝试截图保存分享'
+                    });
+                    (1).then(() => {
+                        _this.preview(0, [_this.img]);
+                    });
+                }
+            );
+            }
         }
     }
 };
@@ -347,7 +352,7 @@ export default {
         width: 100%;
         display: flex;
         justify-content: space-between;
-        background: #1E222C;
+        background: #1e222c;
         border-radius: 8px;
         .minter_con_one {
             display: flex;
@@ -372,7 +377,7 @@ export default {
                 font-size: 14px;
                 font-family: PingFangSC-Light, PingFang SC;
                 font-weight: 300;
-                color: #F9DDB3;
+                color: #f9ddb3;
                 line-height: 14px;
                 // line-height: 16px;
             }
@@ -500,7 +505,7 @@ export default {
     // width: 150px;
     font-size: 18px;
     align-self: center;
-    /deep/ .van-button{
+    /deep/ .van-button {
         height: 46px;
     }
 }

+ 1 - 1
src/mixins/product.js

@@ -165,7 +165,7 @@ export default {
         },
         getShort(str = '') {
             if (str) {
-                str = '...' + str.substr(-8, 8);
+                str = str.substr(0, 20) + '...';
             }
             return str;
         },

+ 1 - 1
src/styles/app.less

@@ -134,7 +134,7 @@ input:-webkit-autofill {
     .van-dialog__confirm {
         .van-button__text {
             font-size: 17px;
-            color: #fe2c5570;
+            color: rgba(254, 44, 85, 0.8);
         }
     }
 }

+ 152 - 97
src/views/Givesubmit.vue

@@ -233,10 +233,16 @@ export default {
                         })
                         .then(() => {
                             if (res.status === 'CANCELLED') {
-                                this.$router.push({ path: '/assetDetail', query: { id: this.info.id, collectionStatus: res.status} })
+                                this.$router.push({
+                                    path: '/assetDetail',
+                                    query: { id: this.info.id, collectionStatus: res.status }
+                                });
                                 this.$router.go(-2);
                             } else {
-                                this.$router.push({ path: '/assetDetail', query: { id: this.info.id, collectionStatus: res.status} })
+                                this.$router.push({
+                                    path: '/assetDetail',
+                                    query: { id: this.info.id, collectionStatus: res.status }
+                                });
                                 this.$router.go(-2);
                             }
                             // on close
@@ -259,104 +265,153 @@ export default {
                 forbidClick: true
             });
             this.$http
-                .post('/user/verifyTradeCode', {
-                    tradeCode: this.password
+                .post('/asset/gift', {
+                    assetId: this.$route.query.id,
+                    toUserId: this.$route.query.toUserId
                 })
-                .then(() => {
-                    this.$http
-                        .post('/asset/gift', {
-                            assetId: this.$route.query.id,
-                            toUserId: this.$route.query.toUserId
-                        })
-                        .then(res => {
-                            this.orderId = res.id;
-                            this.$nextTick(() => {
-                                if (this.payType === 'ALIPAY') {
-                                    // document.location.replace(
-                                    //     resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
-                                    // );
-                                    if (this.inWeixin) {
-                                        document.location.replace(
-                                            resolveUrl(this.$baseUrl, '/payOrder/gift/alipay_wx?id=' + res.id)
-                                        );
-                                    } else {
-                                        this.$http
-                                            .get(
-                                                `/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`
-                                            )
-                                            .then(res => {
-                                                this.hrefUrl =
-                                                    'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
-                                                // window.open(
-                                                //     'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
-                                                //     '_blank'
-                                                // );
-                                                this.$nextTick(() => {
-                                                    document.getElementById('pay').click();
-                                                });
-
-                                                this.$toast.loading({
-                                                    message: '加载中...',
-                                                    forbidClick: true
-                                                });
-                                                this.getOrder(true);
-                                            })
-                                            .catch(e => {
-                                                if (e.error) {
-                                                    this.$toast(e.error);
-                                                }
+                .then(res => {
+                    this.orderId = res.id;
+                    this.$nextTick(() => {
+                        if (this.payType === 'ALIPAY') {
+                            // document.location.replace(
+                            //     resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
+                            // );
+                            if (this.inWeixin) {
+                                if (this.gas === '0') {
+                                    this.$http
+                                        .get('/payOrder/gift/alipay_wx?id=' + res.id)
+                                        .then(res => {
+                                            this.$toast.success('转赠成功');
+                                            this.getOrder(true);
+                                            // setTimeout(() => {
+                                            // this.$router.push({
+                                            //     path: '/orderDetail',
+                                            //     query: {
+                                            //         id: res.id,
+                                            //     }
+                                            // });
+                                            // this.$router.replace('/orders');
+                                            // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
+                                            // this.$router.replace('/giftOrder/' + order.getId());
+                                            // }, 1000);
+                                        })
+                                        .catch(e => {
+                                            if (e.error) {
+                                                this.$toast(e.error);
+                                            }
+                                        });
+                                } else {
+                                    document.location.replace(
+                                        resolveUrl(this.$baseUrl, '/payOrder/gift/alipay_wx?id=' + res.id)
+                                    );
+                                }
+                            } else {
+                                if (this.gas === '0') {
+                                    console.log("131313")
+                                    this.$http
+                                        .get(`/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
+                                        .then(res => {
+                                            this.$toast.success('转赠成功');
+                                            this.getOrder(true);
+                                            // setTimeout(() => {
+                                            // this.$router.push({
+                                            //     path: '/orderDetail',
+                                            //     query: {
+                                            //         id: res.id,
+                                            //     }
+                                            // });
+                                            // this.$router.replace('/giftOrder/' + order.getId());
+                                            // this.$router.replace('/orders');
+                                            // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
+                                            // }, 1000);
+                                        })
+                                        .catch(e => {
+                                            if (e.error) {
+                                                this.$toast(e.error);
+                                            }
+                                        });
+                                } else {
+                                    this.$http
+                                        .get(`/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
+                                        .then(res => {
+                                            this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
+                                            // window.open(
+                                            //     'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
+                                            //     '_blank'
+                                            // );
+                                            this.$nextTick(() => {
+                                                document.getElementById('pay').click();
                                             });
-                                    }
-                                } else if (this.payType === 'WEIXIN') {
-                                    if (this.inWeixin) {
-                                        this.$toast.loading('加载中');
-                                        this.$http
-                                            .post('/payOrder/gift/weixin', {
-                                                id: res.id,
-                                                openId: localStorage.getItem('openId')
-                                            })
-                                            .then(res => {
-                                                console.log({
-                                                    ...res,
-                                                    package: res.package || res.packageValue,
-                                                    timestamp: res.timestamp || res.timeStamp
-                                                });
-                                                let _this = this;
-                                                wx.chooseWXPay({
-                                                    ...res,
-                                                    package: res.package || res.packageValue,
-                                                    timestamp: res.timeStamp,
-                                                    success(res) {
-                                                        _this.$toast.success('支付成功');
-                                                        setTimeout(() => {
-                                                            _this.$router.replace('/orders');
-                                                        }, 1000);
-                                                    },
-                                                    fail(e) {
-                                                        console.log(e);
-                                                        _this.$toast('支付失败,请稍后再试');
-                                                    }
-                                                });
+
+                                            this.$toast.loading({
+                                                message: '加载中...',
+                                                forbidClick: true
                                             });
-                                    } else {
-                                        document.location.replace(
-                                            resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
-                                        );
-                                    }
+                                            this.getOrder(true);
+                                        })
+                                        .catch(e => {
+                                            if (e.error) {
+                                                this.$toast(e.error);
+                                            }
+                                        });
                                 }
-                            });
-                        })
-                        .catch(e => {
-                            if (e) {
-                                this.$toast(e.error);
                             }
-                        });
+                        } else if (this.payType === 'WEIXIN') {
+                            if (this.inWeixin) {
+                                this.$toast.loading('加载中');
+                                this.$http
+                                    .post('/payOrder/gift/weixin', {
+                                        id: res.id,
+                                        openId: localStorage.getItem('openId')
+                                    })
+                                    .then(res => {
+                                        console.log({
+                                            ...res,
+                                            package: res.package || res.packageValue,
+                                            timestamp: res.timestamp || res.timeStamp
+                                        });
+                                        let _this = this;
+                                        wx.chooseWXPay({
+                                            ...res,
+                                            package: res.package || res.packageValue,
+                                            timestamp: res.timeStamp,
+                                            success(res) {
+                                                _this.$toast.success('支付成功');
+                                                setTimeout(() => {
+                                                    _this.$router.replace('/orders');
+                                                }, 1000);
+                                            },
+                                            fail(e) {
+                                                console.log(e);
+                                                _this.$toast('支付失败,请稍后再试');
+                                            }
+                                        });
+                                    });
+                            } else {
+                                document.location.replace(
+                                    resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
+                                );
+                            }
+                        }
+                    });
                 })
                 .catch(e => {
                     if (e) {
-                        this.$toast('失败点击忘记密码进行修改');
+                        this.$toast(e.error);
                     }
                 });
+            // this.$http
+            //     .post('/user/verifyTradeCode', {
+            //         tradeCode: this.password
+            //     })
+            //     .then(() => {
+
+            //     })
+            //     .catch(e => {
+            //         if (e) {
+            //             this.$toast('失败点击忘记密码进行修改');
+            //         }
+            //     });
         }
     },
     beforeUnmount() {
@@ -425,7 +480,7 @@ export default {
             .gift_confirmation_top_three_text2 {
                 margin-right: 5px;
             }
-            .gift_confirmation_top_three_img{
+            .gift_confirmation_top_three_img {
                 width: 16px;
                 height: 16px;
                 margin-top: 2px;
@@ -572,23 +627,23 @@ export default {
                     color: #ffffff;
                     line-height: 24px;
                 }
-                .add_bank_card_img_one{
+                .add_bank_card_img_one {
                     width: 24px;
                     height: 24px;
                     margin-right: 10px;
                 }
             }
-            .add_bank_card_img_two{
-                    width: 22px;
-                    height: 22px;
-                }
+            .add_bank_card_img_two {
+                width: 22px;
+                height: 22px;
+            }
         }
         .payment_method_con {
             font-size: 14px;
             font-family: PingFangSC-Medium, PingFang SC;
             font-weight: 500;
             color: #ffffff;
-            .choose-icon{
+            .choose-icon {
                 width: 22px;
                 height: 22px;
             }

+ 31 - 11
src/views/account/Login.vue

@@ -10,6 +10,7 @@
                     type="tel"
                     name="手机号码"
                     placeholder="请输入手机号"
+                    clearable="true"
                     v-model="form.phone"
                     :rules="[
                         { required: true, message: '请输入手机号码' },
@@ -25,7 +26,7 @@
                     name="验证码"
                     placeholder="请输入验证码"
                     v-model="form.code"
-                    maxlength = '4'
+                    maxlength="4"
                     :rules="[{ required: true, message: '请输入验证码' }]"
                 >
                     <template #button>
@@ -36,16 +37,18 @@
                             type="primary"
                             @click="sendPhone"
                             :disabled="isSend"
+                            :class="isSend ? 'sub-code_con' : ''"
                         >
                             {{ isSend ? `已发送(${sendNum})S` : '获取验证码' }}
                         </van-button>
                     </template>
                 </van-field>
+                <van-cell></van-cell>
             </div>
             <div class="button">
                 <div class="xieyi">
                     <van-checkbox v-model="checked">
-                        已阅读并同意
+                        <span class="xieyi_con">已阅读并同意</span>
                         <span @click.stop="$router.push('/agreement?page=service')"> 《服务协议》 </span>
                         <span @click.stop="$router.push('/agreement')"> 《用户隐私协议》 </span>
                     </van-checkbox>
@@ -242,7 +245,7 @@ export default {
     }
 }
 .login {
-    padding: 10px 40px 100px;
+    padding: 40px 40px 100px;
     background-repeat: no-repeat;
     background-size: 100% 100%;
 }
@@ -303,6 +306,7 @@ export default {
     // box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.5);
     border-radius: 12px;
     .van-cell:after {
+        content: '';
         left: 0px;
         right: 0px;
         border: none;
@@ -334,6 +338,10 @@ export default {
     .van-field__body {
         height: 67px;
         align-items: center;
+        input::placeholder {
+            color: #ffffff;
+            opacity: 0.3;
+        }
     }
 }
 .button {
@@ -358,13 +366,15 @@ export default {
         border-radius: 12px;
     }
 }
-
 .sub-code {
     padding-right: 0;
     border-width: 0;
     font-size: 14px;
 }
-
+.sub-code_con {
+    color: #ffffff;
+    opacity: 0.3;
+}
 .forget {
     position: absolute;
     font-weight: normal !important;
@@ -372,6 +382,9 @@ export default {
     top: -65px;
 }
 .xieyi {
+    .xieyi_con {
+        color: #5e6168;
+    }
     .flex();
     // justify-content: center;
     margin-top: 50px;
@@ -384,6 +397,10 @@ export default {
     }
 }
 
+/deep/.van-checkbox__icon .van-icon {
+    font-size: 11px;
+}
+
 // .van-checkbox {
 //     background-color: #101010;
 //     padding: 5px 0;
@@ -396,23 +413,26 @@ export default {
 // /deep/.van-checkbox__icon {
 //     height: 14px;
 // }
-
 /deep/.van-checkbox__icon--checked .van-icon {
     // background: @prim;
     background-color: #fff;
     color: #333333;
     border-width: 0;
-    font-size: @font1;
-    width: 14px;
-    height: 14px;
+    // font-size: @font1;
+    // width: 14px;
+    // height: 14px;
 }
 /deep/ .van-checkbox__icon--round {
     padding-top: 3px;
     box-sizing: border-box;
 }
 /deep/ .van-icon-success {
-    width: 14px;
-    height: 14px;
+    // width: 14px;
+    // height: 14px;
+}
+/deep/ .van-icon-success:before {
+    // width: 14px;
+    // height: 14px;
 }
 // /deep/ .van-checkbox__icon--round{
 //     width: 14px;

+ 15 - 3
src/views/account/Verified.vue

@@ -84,7 +84,13 @@
             </van-field> -->
 
             <div class="button" ref="btn">
-                <van-button color="#2BA1F560" block @click="submit" class="sure" type="primary">
+                <van-button
+                    :color="canNext ? '#2BA1F5' : '#2BA1F560'"
+                    block
+                    @click="submit"
+                    class="sure"
+                    type="primary"
+                >
                     申请认证
                 </van-button>
             </div>
@@ -97,7 +103,10 @@ import { mapState } from 'vuex';
 import phone from '../../mixins/phone';
 export default {
     computed: {
-        ...mapState(['userInfo'])
+        ...mapState(['userInfo']),
+        canNext() {
+            return this.form.realName && this.form.idNo;
+        }
     },
 
     mixins: [phone],
@@ -192,7 +201,10 @@ export default {
 .van-cell::after {
     border-bottom-color: @tabBorder;
 }
-
+/deep/.van-button--disabled {
+    cursor: not-allowed;
+    opacity: var(--van-button-disabled-opacity);
+}
 .icon {
     display: block;
     margin-top: 12px;

+ 7 - 6
src/views/asset/Detail.vue

@@ -116,10 +116,10 @@
                         <div class="work_story_creator_left">创作者</div>
                         <div class="work_story_creator_right">{{ info.minter }}</div>
                     </div>
-                    <!-- <div class="work_story_creator">
+                    <div class="work_story_creator">
                         <div class="work_story_creator_left">发行方</div>
                         <div class="work_story_creator_right">{{ info.issuer }}</div>
-                    </div> -->
+                    </div>
                 </div>
             </div>
             <!-- 持有特权 -->
@@ -444,21 +444,21 @@
             <div class="gift_collection">
                 <div class="gift_collection_one">
                     <img
-                        :src="collectionStatus === 'CANCELLED' ? giftSuccess : giftFailed"
+                        :src="collectionStatus === 'CANCELLED' ? giftFailed : giftSuccess"
                         alt=""
                         class="gift_collection_one_img"
                     />
                     <div class="gift_collection_one_title">
-                        {{ collectionStatus === 'CANCELLED' ? '赠送成功' : '赠送失败' }}
+                        {{ collectionStatus === 'CANCELLED' ? '赠送失败' : '赠送成功' }}
                     </div>
                 </div>
                 <div class="gift_collection_two">
-                    {{ collectionStatus === 'CANCELLED' ? '我们会在24小时内,短信通知您的好友' : '很遗憾!赠送失败' }}
+                    {{ collectionStatus === 'CANCELLED' ? '很遗憾!赠送失败' : '我们会在24小时内,短信通知您的好友' }}
                 </div>
                 <div class="gift_collection_three">
                     <div class="gift_collection_three_left" @click="$router.push('/store')">返回</div>
                     <div class="gift_collection_three_right" @click="againGive">
-                        {{ collectionStatus === 'CANCELLED' ? '完成' : '重新转赠' }}
+                        {{ collectionStatus === 'CANCELLED' ? '重新转赠' : '完成' }}
                     </div>
                 </div>
             </div>
@@ -1289,6 +1289,7 @@ export default {
                     font-size: 11px;
                     font-family: PingFangSC-Regular, PingFang SC;
                     font-weight: 400;
+                    align-items: center;
                     .list_of_details_one_title_one_text1 {
                         padding: 0px 6px;
                         box-sizing: border-box;

+ 2 - 2
src/views/order/Orders.vue

@@ -204,7 +204,7 @@ export default {
     height: 36px;
     // padding: 12px 0px 15px;
     .van-tabs__nav--line {
-        padding: 0  25px !important;
+        padding: 0 25px !important;
         border-top: none;
         background: #191d27;
         justify-content: space-between;
@@ -274,7 +274,7 @@ export default {
     padding: 15px;
     box-sizing: border-box;
 }
-/deep/ .van-empty{
+/deep/ .van-empty {
     padding-top: 68px;
 }
 /deep/ .van-tabs__nav--line {

+ 6 - 3
src/views/product/Detail.vue

@@ -1264,6 +1264,7 @@ export default {
                     display: flex;
                     justify-content: center;
                     transform: translateY(-45px);
+                    align-items: center;
                     .limited_label_title {
                         padding: 0px 6px;
                         box-sizing: border-box;
@@ -1355,6 +1356,7 @@ export default {
                 box-sizing: border-box;
                 display: flex;
                 justify-content: space-between;
+                align-items: center;
                 .collection_author_left {
                     display: flex;
                     .author_details {
@@ -1380,7 +1382,7 @@ export default {
                     }
                 }
                 .collection_author_right {
-                    margin-top: 5px;
+                    // margin-top: 5px;
                     box-sizing: border-box;
                     width: 72px;
                     height: 30px;
@@ -1946,7 +1948,7 @@ export default {
             margin-bottom: 0;
         }
     }
-    @bottom: 6px;
+    @bottom: 0px;
     .transaction_button {
         width: 100%;
         background: #161a24;
@@ -1954,6 +1956,7 @@ export default {
         box-sizing: border-box;
         display: flex;
         justify-content: space-between;
+        align-items: center;
         position: fixed;
         bottom: 0;
         padding-bottom: calc(@bottom+ constant(safe-area-inset-bottom));
@@ -1989,7 +1992,7 @@ export default {
             }
         }
         .transaction_button_right {
-            padding-top: 10px;
+            // padding-top: 10px;
             box-sizing: border-box;
             .sold_out {
                 width: 160px;