Explorar el Código

Assess share is ok

JacquesLu hace 6 años
padre
commit
f20b416393

+ 35 - 35
sourcecode/h5app/vue/package-lock.json

@@ -2268,9 +2268,9 @@
           "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-2.0.1.tgz",
           "integrity": "sha512-D6MUW4K/VzoJ4rJ01JFKxDrtY1v9wrgzCX5f2qj/lzH1m/lW6MhUZFKerVsnyjOhOsYzI9Kqqak+10l4LvLpMw==",
           "requires": {
-            "prepend-http": "2.0.0",
-            "query-string": "5.1.1",
-            "sort-keys": "2.0.0"
+            "prepend-http": "^2.0.0",
+            "query-string": "^5.0.1",
+            "sort-keys": "^2.0.0"
           }
         }
       }
@@ -2577,7 +2577,7 @@
       "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz",
       "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=",
       "requires": {
-        "mimic-response": "1.0.1"
+        "mimic-response": "^1.0.0"
       }
     },
     "co": {
@@ -3256,7 +3256,7 @@
       "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz",
       "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=",
       "requires": {
-        "mimic-response": "1.0.1"
+        "mimic-response": "^1.0.0"
       }
     },
     "deep-equal": {
@@ -5333,23 +5333,23 @@
       "resolved": "https://registry.npmjs.org/got/-/got-8.3.2.tgz",
       "integrity": "sha512-qjUJ5U/hawxosMryILofZCkm3C84PLJS/0grRIpjAwu+Lkxxj5cxeCU25BG0/3mDSpXKTyZr8oh8wIgLaH0QCw==",
       "requires": {
-        "@sindresorhus/is": "0.7.0",
-        "cacheable-request": "2.1.4",
-        "decompress-response": "3.3.0",
-        "duplexer3": "0.1.4",
-        "get-stream": "3.0.0",
-        "into-stream": "3.1.0",
-        "is-retry-allowed": "1.1.0",
-        "isurl": "1.0.0",
-        "lowercase-keys": "1.0.1",
-        "mimic-response": "1.0.1",
-        "p-cancelable": "0.4.1",
-        "p-timeout": "2.0.1",
-        "pify": "3.0.0",
-        "safe-buffer": "5.1.2",
-        "timed-out": "4.0.1",
-        "url-parse-lax": "3.0.0",
-        "url-to-options": "1.0.1"
+        "@sindresorhus/is": "^0.7.0",
+        "cacheable-request": "^2.1.1",
+        "decompress-response": "^3.3.0",
+        "duplexer3": "^0.1.4",
+        "get-stream": "^3.0.0",
+        "into-stream": "^3.1.0",
+        "is-retry-allowed": "^1.1.0",
+        "isurl": "^1.0.0-alpha5",
+        "lowercase-keys": "^1.0.0",
+        "mimic-response": "^1.0.0",
+        "p-cancelable": "^0.4.0",
+        "p-timeout": "^2.0.1",
+        "pify": "^3.0.0",
+        "safe-buffer": "^5.1.1",
+        "timed-out": "^4.0.1",
+        "url-parse-lax": "^3.0.0",
+        "url-to-options": "^1.0.1"
       },
       "dependencies": {
         "get-stream": {
@@ -5445,7 +5445,7 @@
       "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz",
       "integrity": "sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw==",
       "requires": {
-        "has-symbol-support-x": "1.4.2"
+        "has-symbol-support-x": "^1.4.1"
       }
     },
     "has-value": {
@@ -5997,8 +5997,8 @@
       "resolved": "http://registry.npmjs.org/into-stream/-/into-stream-3.1.0.tgz",
       "integrity": "sha1-lvsKk2wSur1v8XUqF9BWFqvQlMY=",
       "requires": {
-        "from2": "2.3.0",
-        "p-is-promise": "1.1.0"
+        "from2": "^2.1.1",
+        "p-is-promise": "^1.1.0"
       }
     },
     "invariant": {
@@ -6371,8 +6371,8 @@
       "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz",
       "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==",
       "requires": {
-        "has-to-string-tag-x": "1.4.1",
-        "is-object": "1.0.1"
+        "has-to-string-tag-x": "^1.2.0",
+        "is-object": "^1.0.1"
       }
     },
     "javascript-stringify": {
@@ -7571,7 +7571,7 @@
       "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-2.0.1.tgz",
       "integrity": "sha512-88em58dDVB/KzPEx1X0N3LwFfYZPyDc4B6eF38M1rk9VTZMbxXXgjugz8mmwpS9Ox4BDZ+t6t3QP5+/gazweIA==",
       "requires": {
-        "p-finally": "1.0.0"
+        "p-finally": "^1.0.0"
       }
     },
     "p-try": {
@@ -8474,9 +8474,9 @@
       "resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
       "integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
       "requires": {
-        "decode-uri-component": "0.2.0",
-        "object-assign": "4.1.1",
-        "strict-uri-encode": "1.1.0"
+        "decode-uri-component": "^0.2.0",
+        "object-assign": "^4.1.0",
+        "strict-uri-encode": "^1.0.0"
       }
     },
     "querystring": {
@@ -8864,7 +8864,7 @@
       "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz",
       "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=",
       "requires": {
-        "lowercase-keys": "1.0.1"
+        "lowercase-keys": "^1.0.0"
       }
     },
     "restore-cursor": {
@@ -9407,7 +9407,7 @@
       "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-2.0.0.tgz",
       "integrity": "sha1-ZYU1WEhh7JfXMNbPQYIuH1ZoQSg=",
       "requires": {
-        "is-plain-obj": "1.1.0"
+        "is-plain-obj": "^1.0.0"
       }
     },
     "source-list-map": {
@@ -10517,7 +10517,7 @@
       "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz",
       "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=",
       "requires": {
-        "prepend-http": "2.0.0"
+        "prepend-http": "^2.0.0"
       }
     },
     "url-to-options": {
@@ -10691,7 +10691,7 @@
       "resolved": "https://registry.npmjs.org/vue-resource/-/vue-resource-1.5.1.tgz",
       "integrity": "sha512-o6V4wNgeqP+9v9b2bPXrr20CGNQPEXjpbUWdZWq9GJhqVeAGcYoeTtn/D4q059ZiyN0DIrDv/ADrQUmlUQcsmg==",
       "requires": {
-        "got": "8.3.2"
+        "got": "^8.0.3"
       }
     },
     "vue-router": {

+ 8 - 0
sourcecode/h5app/vue/src/router.js

@@ -63,6 +63,14 @@ const routes = [
             title: '礼品卡',
             navShow: false
         }
+    },
+    {
+        name:'assess',
+        component: ()=>import('./views/Assess'),
+        meta:{
+            title:'礼物卡(评价)',
+            navShow:false
+        }
     }
 ];
 

+ 131 - 0
sourcecode/h5app/vue/src/views/Assess.vue

@@ -0,0 +1,131 @@
+<template>
+    <div>
+        <div class="card">
+            <h3>交换成功!写一封感谢信送给ta吧~
+            </h3>
+            <van-cell-group>
+                <van-field
+                        type="textarea"
+                        placeholder="请输入你想写给ta的感谢信..."
+                        rows="5"
+                        autosize
+                        v-model="assess"
+                        :error="assEss"
+                        @click="assEss=false"
+                        required
+                        maxlength="300"
+                />
+            </van-cell-group>
+            <div>
+                <van-rate
+                        v-model="value"
+                        icon="like"
+                        void-icon="like-o"
+                />
+                <p>
+                    请选择感动指数(对方不可见)
+                </p>
+                <van-button round type="primary" class='assess' @click="Assess">送出感谢信</van-button>
+            </div>
+
+        </div>
+        <div style="position: relative;">
+            <img :src="Assessimage" style="max-width: 100%; position: relative;"/>
+        </div>
+    </div>
+</template>
+
+<script>
+
+    import {
+        CellGroup, Field,
+        Rate,
+        Button
+    } from 'vant'
+
+    export default {
+        name: "Assess",
+        components: {
+            [CellGroup.name]: CellGroup, [Field.name]: Field,
+            [Rate.name]: Rate, [Button.name]: Button,
+        },
+        data() {
+            return {
+                value:4,
+                assess: '',
+                assessError: false,
+                active: 0,
+                Assessimage: require('../assets/thanks.png'),
+            }
+        },
+        methods: {
+            publishPresent() {
+                // 检验输入
+
+                if (this.assess.length <= 15) {
+                    this.assessError = true;
+                    Toast.fail('请输入至少15个字的礼物评价');
+                    return;
+                }
+                // post_present()
+                let present = {
+                    assess: this.assess,
+                };
+                console.log(present);
+                BasicFunction.get_data("ajaxpostpresent", function (response) {
+                    console.log("------ Data Rcvd in PresentReg --------");
+                    console.log(response);
+                    if(response.ret === "10000"){
+                        // 不需要 设置 SessionID, 已经自动保存在jSessionID中
+                        this.$router.push('index');
+                    } else {
+                        // 注册失败的处理
+                        Toast.fail("上传失败,请检查网络");
+                    }
+                }, [{}]);
+
+                // this.$router.push('index');
+            },
+            Assess() {
+                this.$router.push('index');
+            },
+        },
+        created: function () {
+            if(this.$route.query.present) {
+                let present = this.$route.query.present;
+                console.log(present);
+                this.assess = present.presentDesc;
+            }
+        }
+    }
+</script>
+
+<style scoped>
+    h2 {
+        color: #fd6740;
+        text-align: left;
+        padding: 5px;
+        border-bottom: solid 1px #e4e4e4;
+    }
+    .card {
+        background-color: white;
+        margin: 20px 20px;
+        border: solid 1px #e4e4e4;
+        padding: 15px;
+    }
+
+    .van-buttom {
+        background-color: red;
+        border-color: red;
+        margin: auto;
+        width: 10%;
+    }
+    .van-rate{
+        margin: auto;
+    }
+    p{
+        margin: auto;
+        size: 5px;
+    }
+
+</style>

+ 29 - 0
sourcecode/h5app/vue/src/views/me.vue

@@ -14,9 +14,38 @@
             return {
                 button_active: true
             }
+
         },
         created: function () {
             this.button_active = false;
+
+            var userId = localStorage.getItem("frontend-userid");
+            BasicFunction.get_data("smartIdentity/list?userId="+userId, function (response) {
+                console.log("------ Data Rcvd in PresentReg --------");
+                console.log(response);
+                if(response.ret === "10000"){
+                    // 不需要 设置 SessionID, 已经自动保存在jSessionID中
+                    this.$router.push('index');
+                } else {
+                    // 注册失败的处理
+                    Toast.fail("上传失败,请检查网络");
+                }
+            }, {});
+
+            BasicFunction.get_data("smartIdentity/updateBatch", function (response) {
+                console.log("------ Data Rcvd in PresentReg --------");
+                console.log(response);
+                if(response.ret === "10000"){
+                    this.$router.push('index');
+                } else {
+                    // 注册失败的处理
+                    Toast.fail("上传失败,请检查网络");
+                }
+            }, [{"reviewId":1,"userId":1,"dormDistrict":10,
+                "userSex":1,"userSchoolCard":20123333222,
+                "userReviewStatus":1000,
+                "reviewerId":1,"reviewerNote":"nmo",
+                "reviewerNoteToUser":"noo"}]);
         }
     }
 </script>

+ 29 - 3
sourcecode/h5app/vue/src/views/share.vue

@@ -1,16 +1,42 @@
 <template>
     <div>
         <!--分享页面-->
-        <h1>share</h1>
+        <div style="position: relative;">
+            <img :src="share" style="max-width: 80%; position: relative;"/>
+        </div>
+        <van-button size="large" type="primary" @click="Toindex">返回首页</van-button>
+
     </div>
 </template>
 
 <script>
+    import {
+        Button
+    } from 'vant'
     export default {
-        name: "share"
+        name: "share",
+        components: {
+            [Button.name]: Button
+        },
+        data() {
+            return {
+                active: 0,
+                share: require('../assets/post.png'),
+            }
+        },
+        methods:{
+            Toindex(){
+                this.$router.push('index');
+            }
+        }
     }
 </script>
 
 <style scoped>
-
+    .van-button {
+        background-color: #fd6740;
+        border-color: #fd6740;
+        margin: 10px 0 10px;
+        width: 55%;
+    }
 </style>