瀏覽代碼

开发安卓商品页

bayi 1 年之前
父節點
當前提交
60a14dcf49
共有 10 個文件被更改,包括 138 次插入7 次删除
  1. 1 0
      README.md
  2. 3 3
      app.js
  3. 1 0
      app.json
  4. 19 0
      pages/commodity/index.js
  5. 3 0
      pages/commodity/index.json
  6. 52 0
      pages/commodity/index.less
  7. 9 0
      pages/commodity/index.wxml
  8. 47 0
      pages/commodity/index.wxss
  9. 0 1
      pages/userWorks/index.js
  10. 3 3
      utils/request.js

+ 1 - 0
README.md

@@ -33,6 +33,7 @@
 - pages/friend/index 朋友页面
 - pages/pkResult/index pk结果
 - pages/score/index 测评报告
+- pages/commodity/index 安卓商品页面
 
 ## utils 功能 
 

+ 3 - 3
app.js

@@ -115,7 +115,6 @@ App({
             query
         } = wx.getEnterOptionsSync()
         // 1047	扫描小程序码	1048长按图片识别小程序码
-        let types = [1047, 1048]
         var gradeObj = Object.keys({
             "PRESCHOOL": "学前班",
             "PRIMARY_FIRST_GRADE": "一年级",
@@ -125,10 +124,9 @@ App({
             "PRIMARY_FIVE_GRADE": "五年级",
             "PRIMARY_SIX_GRADE": "六年级",
         })
-        if (query.scene && types.includes(scene) && path == 'pages/index/index') {
+        if (query.scene && [1047, 1048].includes(scene) && path == 'pages/index/index') {
             let params = decodeURIComponent(query.scene).split('&')
             if (params.length > 1) {
-                console.log('音箱端参数', params);
                 bindDevice({
                     deviceCode: params[0],
                     channelCode: params[1],
@@ -138,6 +136,8 @@ App({
                     console.log(res);
                 })
             }
+        } else if ([1045,1046].includes(scene)) {
+            console.log("朋友圈广告进入");
         }
     },
     getNavbarInfo() {

+ 1 - 0
app.json

@@ -25,6 +25,7 @@
         "pages/friend/index",
         "pages/pkResult/index",
         "pages/score/index",
+        "pages/commodity/index",
         "pages/medalStore/index",
         "pages/aiAvatar/index",
         "pages/orderRecord/index"

+ 19 - 0
pages/commodity/index.js

@@ -0,0 +1,19 @@
+// pages/commodity/index.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        mask: false
+    },
+    onShow() {
+
+    },
+    closeMask() {
+        this.setData({
+            mask: false,
+        })
+        // this.getWxCode()
+    },
+})

+ 3 - 0
pages/commodity/index.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 52 - 0
pages/commodity/index.less

@@ -0,0 +1,52 @@
+#container {
+    overflow: hidden;
+    width: 750rpx;
+    height: 3831rpx;
+    background: url('http://reader-wx.ai160.com/images/reader/v3/bg.jpg') no-repeat;
+    background-size: 100% 100%;
+
+    .mask {
+        position: fixed;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+        width: 100vw;
+        height: 100vh;
+        left: 0;
+        top: 0;
+        text-align: center;
+        background-color: rgba(0, 0, 0, 0.568);
+
+        .payTips {
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            width: 483rpx;
+            height: 521rpx;
+            padding: 38rpx;
+            box-sizing: border-box;
+            border-radius: 11px;
+            background: white;
+        }
+
+        .simg {
+            width: 120rpx;
+            height: 134rpx;
+        }
+
+        .t1 {
+            margin: 32rpx 0 94rpx;
+            width: 245rpx;
+            height: 49rpx;
+            font-size: 38rpx;
+        }
+
+        .goXkx {
+            padding: 10rpx 110rpx;
+            font-size: 30rpx;
+            color: white;
+            border-radius: 31rpx;
+            background: linear-gradient(180deg, #66d751 0%, #65d952 100%);
+        }
+    }
+}

+ 9 - 0
pages/commodity/index.wxml

@@ -0,0 +1,9 @@
+<view id="container">
+    <view class="mask" wx:if="{{mask}}">
+        <view class="payTips">
+            <image src="https://reader-wx.ai160.com/images/reader/v3/right.webp" class="simg" />
+            <view class="t1">支付成功</view>
+            <view class="goXkx" bindtap="closeMask">确认</view>
+        </view>
+    </view>
+</view>

+ 47 - 0
pages/commodity/index.wxss

@@ -0,0 +1,47 @@
+#container {
+  overflow: hidden;
+  width: 750rpx;
+  height: 3831rpx;
+  background: url('http://reader-wx.ai160.com/images/reader/v3/bg.jpg') no-repeat;
+  background-size: 100% 100%;
+}
+#container .mask {
+  position: fixed;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  width: 100vw;
+  height: 100vh;
+  left: 0;
+  top: 0;
+  text-align: center;
+  background-color: rgba(0, 0, 0, 0.568);
+}
+#container .mask .payTips {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  width: 483rpx;
+  height: 521rpx;
+  padding: 38rpx;
+  box-sizing: border-box;
+  border-radius: 11px;
+  background: white;
+}
+#container .mask .simg {
+  width: 120rpx;
+  height: 134rpx;
+}
+#container .mask .t1 {
+  margin: 32rpx 0 94rpx;
+  width: 245rpx;
+  height: 49rpx;
+  font-size: 38rpx;
+}
+#container .mask .goXkx {
+  padding: 10rpx 110rpx;
+  font-size: 30rpx;
+  color: white;
+  border-radius: 31rpx;
+  background: linear-gradient(180deg, #66d751 0%, #65d952 100%);
+}

+ 0 - 1
pages/userWorks/index.js

@@ -13,7 +13,6 @@ Page({
     firstWork: ''
   },
   onLoad(options) {
-    console.log(options);
     if (options.id) {
       this.getreadInfo(options.id)
       wx.nextTick(() => {

+ 3 - 3
utils/request.js

@@ -6,13 +6,13 @@ const {
         envVersion
     }
 } = wx.getAccountInfoSync();
-if (envVersion == 'develop') {
+/* if (envVersion == 'develop') {
     baseUrl = 'https://reader-api.efunbox.cn/wx'
     oldUrl = 'https://reader-api.efunbox.cn'
-} else {
+} else { */
     baseUrl = 'https://reader-api.ai160.com/wx'
     oldUrl = 'https://reader-api.ai160.com'
-}
+// }
 
 function request(url, method, data, oldBaseUrl = false, intercept = true) {
     let header = {