xuqiang 4 лет назад
Родитель
Сommit
cb33db4b02

+ 42 - 124
src/main/nine-space/src/views/Givesubmit.vue

@@ -104,39 +104,8 @@ export default {
             this.$http.get('/asset/get/' + this.$route.query.id).then(res => {
                 this.info = res;
                 console.log(this.info);
-                // setTimeout(() => {
-                //     this.$toast.clear();
-                //     this.bs.value.refresh();
-                // }, 100);
-                // this.$http('/sysConfig/get/gas_fee')
             });
         }
-        //  else {
-        //     this.$http.get('/order/get/' + this.$route.query.orderId).then(res => {
-        //         this.info = res;
-        //         this.orderId = res.id;
-        //         setTimeout(() => {
-        //             this.bs.value.refresh();
-        //         }, 100);
-        //         this.$dialog
-        //             .alert({
-        //                 title: '提示',
-        //                 message:
-        //                     res.status === 'NOT_PAID' || res.status === 'CANCELLED'
-        //                         ? '订单支付失败,点击重新下单'
-        //                         : '订单已支付,点击查看订单详情'
-        //             })
-        //             .then(() => {
-        //                 if (res.status === 'NOT_PAID' || res.status === 'CANCELLED') {
-        //                     this.$router.back();
-        //                 } else {
-        //                     this.$router.replace('/orderDetail?id' + res.id);
-        //                 }
-        //                 // on close
-        //             });
-        //     });
-        // }
-        // this.bottom = this.$refs.bottom;
     },
     methods: {
         submit() {
@@ -151,49 +120,48 @@ export default {
                             toUserId: this.$route.query.toUserId
                         })
                         .then(res => {
-                            console.log(res);
-                            // this.$nextTick(() => {
-                            //     if (this.payType === 'ALIPAY') {
-                            //         document.location.replace(
-                            //             path.resolve(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
-                            //         );
-                            //     } 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
-                            //                     });
-                            //                     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(
-                            //                 path.resolve(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
-                            //             );
-                            //         }
-                            //     }
-                            // });
+                            this.$nextTick(() => {
+                                if (this.payType === 'ALIPAY') {
+                                    document.location.replace(
+                                        path.resolve(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
+                                    );
+                                } 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
+                                                });
+                                                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(
+                                            path.resolve(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
+                                        );
+                                    }
+                                }
+                            });
                         })
                         .catch(e => {
                             if (e) {
@@ -206,56 +174,6 @@ export default {
                         this.$toast('失败点击忘记密码进行修改');
                     }
                 });
-            // this.$toast.loading('加载中');
-            // this.$http
-            //     .post('/order/create?collectionId=' + this.$route.query.id + '&qty=1')
-            //     .then(res => {
-            //         this.$toast.clear();
-            //         this.orderId = res.id;
-            //         this.$router.replace('/submit?orderId=' + res.id);
-            //         this.$nextTick(() => {
-            //             if (this.payType === 'ALIPAY') {
-            //                 document.location.replace(path.resolve(this.$baseUrl, 'payOrder/alipay?id=' + res.id));
-            //             } else if (this.payType === 'WEIXIN') {
-            //                 if (this.inWeixin) {
-            //                     this.$toast.loading('加载中');
-            //                     this.$http
-            //                         .post('/payOrder/weixin', { id: res.id, openId: localStorage.getItem('openId') })
-            //                         .then(res => {
-            //                             console.log({
-            //                                 ...res,
-            //                                 package: res.package || res.packageValue
-            //                             });
-            //                             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(
-            //                         path.resolve(this.$baseUrl, 'payOrder/weixin_h5?id=' + res.id)
-            //                     );
-            //                 }
-            //             }
-            //         });
-            //     })
-            //     .catch(e => {
-            //         if (e) {
-            //             this.$toast(e.error);
-            //         }
-            //     });
         }
     }
 };

+ 27 - 5
src/main/nine-space/src/views/asset/Detail.vue

@@ -214,6 +214,17 @@
                 说明:<span>{{ init2.description }}</span>
             </div>
         </van-dialog>
+        <van-dialog v-model:show="show4" confirm-button-text="返回">
+            <div class="title2">
+                <img class="img" :src="init2.icon[1]" alt="" />
+                <div class="title3">{{ init2.name }}</div>
+            </div>
+            <div class="border"></div>
+            <div class="name">藏有创作者填写的隐藏内容,持有者才能打开</div>
+            <div class="name1">
+                说明:<span>{{ init2.description }}</span>
+            </div>
+        </van-dialog>
         <van-popup v-model:show="show2">
             <div class="con">
                 <div class="Whisper">提示</div>
@@ -268,6 +279,7 @@ export default {
             liked: false,
             show2: false,
             show3: false,
+            show4: false,
             btn: null,
             list: [],
             show: false,
@@ -296,7 +308,8 @@ export default {
     methods: {
         privilegeFn(init) {
             this.list2 = init;
-            if (!init.once && !init.opened) {
+            // && !init.opened
+            if (!init.once) {
                 this.show = true;
                 this.$http
                     .post('/asset/usePrivilege', {
@@ -309,10 +322,11 @@ export default {
             }
         },
         openedFn() {
-            this.show2 = false;
-            this.show3 = true;
+            this.show2 = true;
+            this.show3 = false;
             if (!this.init2.once) {
-                this.show = true;
+                this.show2 = false;
+                this.show4 = true;
                 this.$http
                     .post('/asset/usePrivilege', {
                         assetId: this.info.id,
@@ -324,8 +338,16 @@ export default {
             }
         },
         Whisper() {
-            if (!this.init2.opened) {
+            if (!this.init2.once) {
                 this.show2 = true;
+                this.$http
+                    .post('/asset/usePrivilege', {
+                        assetId: this.info.id,
+                        privilegeId: this.init2.id
+                    })
+                    .then(res => {
+                        console.log(res);
+                    });
             }
         },
         record() {

+ 24 - 7
src/main/pc-space/src/views/AssetDetail.vue

@@ -112,10 +112,17 @@
                     <div class="name">{{ info.category }}</div>
                     <div class="bor"></div>
                     <div class="box">
-                        <div>
-                            <img @click="Whisper" v-if="init2.opened" class="img" :src="init2.icon[2]" alt="" />
-                            <img @click="Whisper" v-else class="img" :src="init2.icon[0]" alt="" />
-                        </div>
+                        <!-- <el-popover
+                            placement="top-start"
+                            title="标题"
+                            width="200"
+                            trigger="hover"
+                            content="这是一段内容,这是一段内容,这是一段内容,这是一段内容。"
+                        >
+                            <el-button slot="reference">hover 激活</el-button>
+                        </el-popover> -->
+                        <img @click="Whisper" v-if="init2.opened" class="img" :src="init2.icon[2]" alt="" />
+                        <img @click="Whisper" v-else class="img" :src="init2.icon[0]" alt="" />
                     </div>
                     <div class="bor"></div>
                     <div v-for="(item, index) in init" :key="index">
@@ -297,13 +304,21 @@ export default {
     },
     methods: {
         Whisper() {
-            if (!this.init2.opened) {
+            if (!this.init2.once) {
                 this.show2 = true;
+                this.$http
+                    .post('/asset/usePrivilege', {
+                        assetId: this.info.id,
+                        privilegeId: this.init2.id
+                    })
+                    .then(res => {
+                        console.log(res);
+                    });
             }
         },
         privilegeFn(init) {
             this.list2 = init;
-            if (!init.once && !init.opened) {
+            if (!init.once) {
                 console.log(this.list2.icon[1]);
                 this.show4 = true;
                 this.$http
@@ -496,7 +511,6 @@ export default {
     .title2 {
         display: flex;
         align-items: center;
-        // padding-top: 12px;
         margin-top: -13px;
         .img {
             width: 18px;
@@ -504,6 +518,9 @@ export default {
             color: #ff4f50;
             margin-right: 3px;
             margin-bottom: 5px;
+            .img:hover {
+                background: red;
+            }
         }
         .title3 {
             font-size: 16px;

+ 86 - 11
src/main/pc-space/src/views/Send.vue

@@ -14,7 +14,19 @@
                 ></el-input>
 
                 <div class="user-content">
-                    <div class="empty">检索用户区域</div>
+                    <div class="empty" v-if="info.length === 0">检索用户区域</div>
+                    <div v-if="info.length != 0" class="content">
+                        <img class="img" :src="info.avatar" alt="" />
+                        <div class="init">
+                            <div>
+                                <div class="text1">{{ info.realName || '保密' }}</div>
+                                <div class="text2">
+                                    手机号码 <span>{{ info.phone }}</span>
+                                </div>
+                            </div>
+                            <el-checkbox size="124px" v-model="checked"></el-checkbox>
+                        </div>
+                    </div>
                 </div>
             </div>
             <div class="info">
@@ -68,6 +80,8 @@ export default {
         return {
             payMethods: 'ALIPAY',
             show: false,
+            info: [],
+            checked: true,
             payList: [
                 {
                     icon: require('../assets/alipay.png'),
@@ -104,7 +118,8 @@ export default {
                 .then(() => {
                     this.show = true;
                     this.loading = true;
-                    return this.$http.get('/order/get/' + 2368);
+                    console.log(this.$route.query.id);
+                    // return this.$http.get('/order/get/' + this.$route.query.id);
                     // return this.$http.post('/order/create?collectionId=' + info.id + '&qty=1');
                 })
                 .then(res => {
@@ -128,21 +143,36 @@ export default {
             );
         },
         getUser() {
-            this.$http.post(
-                '/user/searchByPhone',
-                {
-                    search: this.phone
-                },
-                {
-                    body: 'json'
-                }
-            );
+            this.$http
+                .post('/user/searchByPhone', {
+                    phone: this.phone
+                })
+                .then(res => {
+                    this.info = res;
+                    if (this.info.length === 0) {
+                        this.empty = true;
+                    }
+                })
+                .catch(e => {
+                    if (e) {
+                        this.$toast(e.error);
+                    }
+                });
         }
     }
 };
 </script>
 
 <style lang="less" scoped>
+/deep/ .el-checkbox__inner {
+    // width: 24px;
+    // height: 24px;
+    border-radius: 50%;
+    // background-image: linear-gradient(135deg, #fdfb60 20%, #ff8f3e 100%);
+}
+/deep/ .el-checkbox__label {
+    margin-right: 20px;
+}
 .info {
     .flex();
     height: 94px;
@@ -321,6 +351,51 @@ export default {
             top: 50%;
             transform: translate(-50%, -50%);
         }
+        .content {
+            // padding: 0px 16px;
+            display: flex;
+            align-items: center;
+            padding-top: 40px;
+            border-radius: 12px;
+            .img {
+                width: 70px;
+                height: 70px;
+                border-radius: 50%;
+                margin: 0 12px 0 20px;
+            }
+            .init {
+                display: flex;
+                align-items: center;
+                justify-content: space-between;
+                width: 100%;
+                .text1 {
+                    font-size: 16px;
+                    font-weight: bold;
+                    color: #000;
+                    line-height: 24px;
+                }
+                .text2 {
+                    font-size: 14px;
+                    font-weight: 400;
+                    color: #939599;
+                    line-height: 24px;
+                }
+                span {
+                    color: #000;
+                }
+                .btn {
+                    width: 70px;
+                    height: 26px;
+                    border-radius: 16px;
+                    border: 1px solid;
+                    // border-image: linear-gradient(135deg, rgba(253, 251, 96, 1), rgba(255, 143, 62, 1)) 1 1;
+                    line-height: 26px;
+                    font-size: 14px;
+                    color: #fdfb60;
+                    text-align: center;
+                }
+            }
+        }
     }
 }
 </style>

+ 1 - 1
src/main/pc-space/src/views/user/Transaction.vue

@@ -10,7 +10,7 @@
             <div class="content" v-if="flag">
                 <el-steps :space="180" :active="1" align-center>
                     <el-step title="验证当前手机号"></el-step>
-                    <el-step title="绑定新手机号"></el-step>
+                    <el-step title="修改交易密码"></el-step>
                     <el-step title="完成"></el-step>
                 </el-steps>
                 <el-form