Browse Source

添加活动奖品

lex 2 years ago
parent
commit
2b5279dc4c

+ 34 - 0
src/views/award-activity/index.module.less

@@ -0,0 +1,34 @@
+.cellGroup {
+  margin: 14px;
+  overflow: hidden;
+  border-radius: 12px;
+  color: #666666;
+
+  .image {
+    width: 74px;
+    height: 74px;
+    flex-shrink: 0;
+    margin-right: 15px;
+  }
+
+  .title {
+    font-size: 14px;
+    font-weight: 600;
+    color: #333333;
+    line-height: 20px;
+  }
+  .label {
+    font-size: 13px;
+    line-height: 16px;
+  }
+
+  .cellTitle {
+    font-size: 14px;
+    line-height: 20px;
+    font-weight: 600;
+  }
+  .button {
+    border-radius: 8px;
+    padding: 0 12px;
+  }
+}

+ 34 - 6
src/views/award-activity/index.tsx

@@ -1,14 +1,42 @@
-import { CellGroup, Cell } from 'vant'
+import { CellGroup, Cell, Image, Button } from 'vant'
 import { defineComponent } from 'vue'
 import styles from './index.module.less'
 
 export default defineComponent({
   name: 'award-activity',
   render() {
-    return <div>
-      <CellGroup inset>
-        <Cell />
-      </CellGroup>
-    </div>
+    return (
+      <div class={styles.award}>
+        <CellGroup inset class={styles.cellGroup}>
+          <Cell
+            v-slots={{
+              icon: () => <Image class={styles.image} />,
+              title: () => <div class={styles.title}>小酷Ai会员</div>,
+              label: () => (
+                <div class={styles.label}>
+                  小酷Ai(季度)3个月会员;您的智能陪练,会员曲目免费学,练习评测智能选段评分,提升练习兴趣!
+                </div>
+              )
+            }}
+          />
+          <Cell
+            center
+            title={'获奖时间:2022-12-12'}
+            titleClass={styles.cellTitle}
+            v-slots={{
+              value: () => (
+                <Button
+                  color="linear-gradient(180deg, #FF8636 0%, #FF4E19 100%)"
+                  size="small"
+                  class={styles.button}
+                >
+                  立即领取
+                </Button>
+              )
+            }}
+          />
+        </CellGroup>
+      </div>
+    )
   }
 })

+ 1 - 0
src/views/order-detail/userAuth/index.tsx

@@ -3,6 +3,7 @@ import ColFieldGroup from '@/components/col-field-group'
 import ColHeader from '@/components/col-header'
 import request from '@/helpers/request'
 import { verifyIdCard } from '@/helpers/toolsValidate'
+import { postMessage } from '@/helpers/native-message'
 import { state } from '@/state'
 import { Button, CellGroup, Checkbox, Field, Form, Icon, Toast } from 'vant'
 import { defineComponent } from 'vue'