StephenArk30 6 anni fa
parent
commit
60fc1ee365

+ 17 - 0
sourcecode/h5app/vue/src/connector/get-data-methods.js

@@ -0,0 +1,17 @@
+import {BasicFunction} from "./basic-service";
+
+export function get_present_list(userid) {
+    BasicFunction.get_data("smartGoods/list?isDel=0&ownerId=" + userid, function (res) {
+        try {
+            let list = res.model.list;
+            if (res.ret === '10000') {
+                console.log(list);
+                return list;
+            }
+            else return null;
+        } catch (e) {
+            console.warn(e);
+            return null;
+        }
+    }, {})
+}

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

@@ -99,6 +99,15 @@ const routes = [
             navShow: false,
             content: "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
         }
+    },
+    {
+        name: 'draw',
+        component: () => import('./views/Draw'),
+        meta: {
+            title: '抽奖说明',
+            navShow: false,
+            content: "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
+        }
     }
 ];
 

+ 51 - 2
sourcecode/h5app/vue/src/views/Draw.vue

@@ -1,13 +1,62 @@
 <template>
-    $END$
+    <div>
+        <img src="http://pjczv6ygf.bkt.clouddn.com/share_background.jpg"
+             style="height: 100%; width: 100%; z-index: -99; position: absolute; left: 0; top: 0;"
+        />
+        <div class="transparent">
+            <div class="card">
+                <h3 style="color: white"><strong>抽奖说明</strong></h3>
+                <p>关注<span style="color: #F4A460"> 深大换换 </span>,回复“抽奖”获得活动推文,转发推文截图发至后台即可获得本次活动的【抽奖机会】</p>
+            </div>
+        </div>
+        <div
+                style="position: fixed;
+                    bottom: 10px;
+                    margin: 0 auto;
+                    width: 100%;"
+        >
+            <van-button size="large" type="primary" @click="$router.push('index')"
+                        style="background-color: #fd6740; border-color: #fd6740; width: 80%"
+            >返回首页
+            </van-button>
+        </div>
+    </div>
 </template>
 
 <script>
+    import {Button} from 'vant'
     export default {
-        name: "Draw"
+        name: "Draw",
+        components: {
+            [Button.name]: Button
+        },
     }
 </script>
 
 <style scoped>
+    .card {
+        margin-bottom: 20px;
+        margin-left: 20px;
+        margin-right: 20px;
+        padding: 15px;
+        text-align: left;
+        z-index: 1;
+    }
+
+    h3 {
+        font-size: 1.5em;
+    }
 
+    p {
+        font-size: 1em;
+        color: white;
+    }
+
+    .transparent {
+        position: absolute;
+        height: 100%;
+        background-color: rgba(50, 50, 50, 0.7);
+        left: 0;
+        top: 0;
+    }
 </style>

+ 1 - 0
sourcecode/h5app/vue/src/views/giftDetail.vue

@@ -154,6 +154,7 @@
                 return;
             }
             let present = this.$route.query.present;
+            // console.log(this.$route.query.present);
             let userid = localStorage.getItem('frontend-userid');
             let that = this;
             present.comment = '';

+ 9 - 3
sourcecode/h5app/vue/src/views/index.vue

@@ -16,7 +16,7 @@
                 <p><strong>我的礼物</strong></p>
             </van-col>
             <van-col>
-                <van-button round type="primary" size="small" @click="toShare">邀请好友赢大奖</van-button>
+                <van-button round type="primary" size="small" @click="toDraw">参加抽奖</van-button>
             </van-col>
         </van-row>
 
@@ -62,6 +62,7 @@
     } from "vant";
     import AddPresentButton from "../components/addPresentButton";
     import {BasicFunction} from '../connector/basic-service';
+    import * as methods from '../connector/get-data-methods';
     import Guide from "../components/guide";
 
     export default {
@@ -102,13 +103,13 @@
             }
         },
         methods: {
-            toShare() {
+            toDraw() {
                 Toast.loading({
                     mask: true,
                     message: '加载中...',
                     duration: 1000
                 });
-                this.$router.push('share')
+                this.$router.push('draw')
             },
             toDetail(i) {
                 if (this.userStatus === 500) {
@@ -198,6 +199,11 @@
             let b_a = true;
             let h_p = false;
             let that = this;
+
+            // let list = methods.get_present_list(userid);
+            // console.log('presents: ');
+            // console.log(list);
+
             BasicFunction.get_data("smartIdentity/list?userId=" + userid, function (res) {
                 // if(res.model === undefined || res.model.length === 0) {
                 //     Toast.fail('无法获取用户信息,请退出重试');

+ 4 - 4
sourcecode/h5app/vue/src/views/share.vue

@@ -3,10 +3,10 @@
         <div class="transparent" :style="transparent">
             <!--分享页面-->
             <div class="card">
-                <h3 style="color: white"><strong>提交成功!最后一步</strong></h3>
-                <van-row>1.长按保存邀请卡片(图片)至手机</van-row>
-                <van-row>2.转发图片至朋友圈并截图</van-row>
-                <van-row>3.将截图发送至<span style="color: #F4A460"> 深大换换 </span>公众号后台,即可获得本次活动的【匹配资格】和【抽奖机会】</van-row>
+                <h3 style="color: white"><strong>提交成功!25号0点后陆续公布配对结果</strong></h3>
+                <van-row>1.长按保存下方海报,邀请更多朋友来玩吧~</van-row>
+                <van-row>2.上传的校卡和礼物审核通过才能参与配对,记得常回来查看审核结果哦</van-row>
+                <van-row>3.关注<span style="color: #F4A460"> 深大换换 </span>,回复“抽奖”获得活动推文,转发推文截图发至后台即可获得本次活动的【抽奖机会】</van-row>
             </div>
             <div style="position: relative;">
                 <img :src="isWX ? share_http[i] : share[i]" style="max-width: 80%; position: relative;"/>