Browse Source

feat: 增加跳转新活动联通流量充值界面

Damon 11 months ago
parent
commit
4298f6eb14
3 changed files with 220 additions and 350 deletions
  1. 217 217
      src/pages.json
  2. 0 131
      src/pages/flowactivity/index.vue
  3. 3 2
      src/pages/pay/index.vue

+ 217 - 217
src/pages.json

@@ -1,219 +1,219 @@
 {
 {
-	"easycom": {
-		"^z-(.*)": "@zebra-ui/swiper/components/z-$1/z-$1.vue"
-	},
-	"pages": [{
-			// 设备引导页
-			"path": "pages/guide/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			//设备操控视频页
-			"path": "pages/devices/detail",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 设备文章
-			"path": "pages/article/index",
-			"style": {
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{
-			// 耳机操作手势
-			"path": "pages/operation/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 帮助与反馈
-			"path": "pages/help/index",
-			"style": {
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{ // 我的反馈
-			"path": "pages/help/detail",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 产品手册
-			"path": "pages/product/manual",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 猫王博物馆
-			"path": "pages/museum/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 猫王博物馆 设备详情页
-			"path": "pages/museum/detail",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 12频道分享
-			"path": "pages/share/channels",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 频道详情
-			"path": "pages/share/list",
-			"style": {
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{
-			// 歌单
-			"path": "pages/share/detail",
-			"style": {
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{
-			// 播放控件
-			"path": "pages/share/controls",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 抽奖
-			"path": "pages/lottery/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 填写收货信息
-			"path": "pages/lottery/detail",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 爱听支付
-			"path": "pages/imusic/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 后台运行保护协议
-			"path": "pages/backgrounder/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 活动页面
-			"path": "pages/activity/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 协议页面
-			"path": "pages/agreement/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 文章页面
-			"path": "pages/content/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 门店列表
-			"path": "pages/map/index",
-			"style": {
-				"navigationBarTitleText": "附近门店",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 添加电台
-			"path": "pages/channel/index",
-			"style": {
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{
-			// 喜马拉雅授权
-			"path": "pages/ximalaya/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 喜马拉雅充值成功
-			"path": "pages/ximalaya/success",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		// 喜马拉雅充值失败
-		{
-			"path": "pages/ximalaya/error",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 流量充值
-			"path": "pages/pay/index",
-			"style": {
-				"navigationBarTitleText": "流量充值",
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 开通记录
-			"path": "pages/pay/detail",
-			"style": {
-				"navigationBarTitleText": "开通记录",
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		},
-		{
-			// 通用提示
-			"path": "pages/warning/index",
-			"style": {
-				"navigationStyle": "custom"
-			}
-		},
-		{
-			// 流量活动页面
-			"path": "pages/flowactivity/index",
-			"style": {
-				"navigationBarTitleText": "流量活动页面",
-				"navigationStyle": "custom",
-				"onReachBottomDistance": 50
-			}
-		}
-	]
+  "easycom": {
+    "^z-(.*)": "@zebra-ui/swiper/components/z-$1/z-$1.vue"
+  },
+  "pages": [
+    {
+      // 设备引导页
+      "path": "pages/guide/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      //设备操控视频页
+      "path": "pages/devices/detail",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 设备文章
+      "path": "pages/article/index",
+      "style": {
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 耳机操作手势
+      "path": "pages/operation/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 帮助与反馈
+      "path": "pages/help/index",
+      "style": {
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 我的反馈
+      "path": "pages/help/detail",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 产品手册
+      "path": "pages/product/manual",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 猫王博物馆
+      "path": "pages/museum/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 猫王博物馆 设备详情页
+      "path": "pages/museum/detail",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 12频道分享
+      "path": "pages/share/channels",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 频道详情
+      "path": "pages/share/list",
+      "style": {
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 歌单
+      "path": "pages/share/detail",
+      "style": {
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 播放控件
+      "path": "pages/share/controls",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 抽奖
+      "path": "pages/lottery/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 填写收货信息
+      "path": "pages/lottery/detail",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 爱听支付
+      "path": "pages/imusic/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 后台运行保护协议
+      "path": "pages/backgrounder/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 活动页面
+      "path": "pages/activity/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 流量活动页面
+      "path": "pages/activity/new",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 协议页面
+      "path": "pages/agreement/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 文章页面
+      "path": "pages/content/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 门店列表
+      "path": "pages/map/index",
+      "style": {
+        "navigationBarTitleText": "附近门店",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 添加电台
+      "path": "pages/channel/index",
+      "style": {
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 喜马拉雅授权
+      "path": "pages/ximalaya/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 喜马拉雅充值成功
+      "path": "pages/ximalaya/success",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    // 喜马拉雅充值失败
+    {
+      "path": "pages/ximalaya/error",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 流量充值
+      "path": "pages/pay/index",
+      "style": {
+        "navigationBarTitleText": "流量充值",
+        "navigationStyle": "custom"
+      }
+    },
+    {
+      // 开通记录
+      "path": "pages/pay/detail",
+      "style": {
+        "navigationBarTitleText": "开通记录",
+        "navigationStyle": "custom",
+        "onReachBottomDistance": 50
+      }
+    },
+    {
+      // 通用提示
+      "path": "pages/warning/index",
+      "style": {
+        "navigationStyle": "custom"
+      }
+    }
+  ]
 }
 }

+ 0 - 131
src/pages/flowactivity/index.vue

@@ -1,131 +0,0 @@
-<template>
-  <view v-if="pic" class='app-container'>
-    <img :src="pic" />
-    <button class="submit" type="submit" circle @click="getSubmit">立即领取</button>
-
-    <!-- 弹窗 -->
-    <uni-popup ref="popup" type="center" :is-mask-click="false">
-      <view class="popup">
-        <h3>领取成功</h3>
-        <view class="center">{{ content }}</view>
-        <view class="submit-btn">
-          <button type="submit" circle @click="getClose">确定</button>
-<!--          <span>该套餐内容仅可在WIFI/移动数据模式下收听</span>-->
-        </view>
-      </view>
-    </uni-popup>
-  </view>
-</template>
-
-<script>
-import {doDlowActivityExchange} from "@/api/pay";
-export default {
-  data() {
-    return {
-      pic: '',
-      form: {
-        activityId: '',
-        state: ''
-      },
-      // 弹窗内容
-      content: '',
-      // 领取成功
-      isShow: false
-    }
-  },
-  onLoad(e) {
-    this.id = e.id
-    this.name =e.name
-    this.pic = e.pic
-    this.description = e.description
-
-    this.form.activityId=e.id
-    this.form.state=e.state
-  },
-  methods: {
-    // 立即领取
-    getSubmit() {
-      doDlowActivityExchange(this.form).then(res => {
-        console.log(res)
-
-        // this.$refs.popup.open()
-        // this.content = "恭喜获得120G移动数据流量"
-        // this.isShow = true
-        if (res.code === 0) {
-          this.$refs.popup.open()
-          this.content = res.data
-          this.isShow = true
-        } else {
-
-          // console.log(res.data.message)
-          uni.showToast({
-            title: res.message,
-            icon: 'none',
-            mask: true,
-            duration: 2000
-          })
-        }
-      })
-    },
-
-    // 关闭弹窗
-    getClose() {
-      this.$refs.popup.close()
-    }
-  }
-}
-</script>
-
-<style lang="scss" scoped>
-.app-container {
-  padding: 0;
-  overflow: hidden;
-  position: relative;
-}
-
-img {
-  width: 100%;
-  height: 100%;
-  display: block;
-}
-
-.submit {
-  position: absolute;
-  bottom: 20rpx;
-  left: 50%;
-  transform: translate(-50%);
-  width: calc(100% - 120rpx);
-}
-
-.popup {
-  width: 576rpx;
-  height: 600rpx;
-  background: #fff;
-  border-radius: 32rpx;
-  color: #000;
-  font-weight: bold;
-  text-align: center;
-  padding: 48rpx 0;
-  display: flex;
-  flex-direction: column;
-  justify-content: space-between;
-  align-items: center;
-
-  .center {
-    font-size: 32rpx;
-  }
-
-  .submit-btn {
-    button {
-      width: 320rpx;
-      height: 80rpx;
-      line-height: 80rpx;
-      font-size: 32rpx;
-    }
-
-    span {
-      font-size: 24rpx;
-    }
-  }
-}
-</style>

+ 3 - 2
src/pages/pay/index.vue

@@ -106,7 +106,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import {openId, wechatPay, detail, options, order, getFlowActivityDetailInfo} from "@/api/pay"
+import { detail, getFlowActivityDetailInfo, openId, options, order, wechatPay } from "@/api/pay";
 
 
 export default {
 export default {
   data() {
   data() {
@@ -140,6 +140,7 @@ export default {
 
 
     }
     }
   },
   },
+  
   onLoad(e) {
   onLoad(e) {
     this.state = e.state
     this.state = e.state
     this.getOpenId(e)
     this.getOpenId(e)
@@ -157,7 +158,7 @@ export default {
       console.log('跳转到活动页面')
       console.log('跳转到活动页面')
       // 跳转到活动页面
       // 跳转到活动页面
       uni.navigateTo({
       uni.navigateTo({
-        url: `/pages/flowactivity/index?state=${this.state}&id=${this.id}&pic=${this.pic}`,
+        url: `/pages/activity/new?state=${this.state}&id=${this.id}&pic=${this.pic}`,
       })
       })
     },
     },
     dialogClose() {
     dialogClose() {