Commit 3f1d9c59 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent da038380
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
methods: { methods: {
handleShow() { handleShow() {
this.$refs.adPop.open('center'); this.$refs.adPop.open('center');
this.startCountdown() // this.startCountdown()
}, },
startCountdown() { startCountdown() {
let that = this; let that = this;
......
...@@ -199,10 +199,10 @@ ...@@ -199,10 +199,10 @@
this.handlePay(); this.handlePay();
}, },
handlePay() { handlePay() {
// if (this.os == 'ios') { if (this.os == 'ios') {
// message.notify('暂不支持ios支付'); message.notify('暂不支持ios支付');
// return return
// } }
let that = this; let that = this;
let vipBean = this.vipList[this.selectedIndex]; let vipBean = this.vipList[this.selectedIndex];
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handleFind"> <view class="item arrow" @click="handleFind">
如何找到我 兑换会员
<view class="item_bd ellipsis" style="margin-left: 58rpx;"></view> <view class="item_bd ellipsis" style="margin-left: 58rpx;"></view>
</view> </view>
<view class="item arrow" @click="handlePhone"> <view class="item arrow" @click="handlePhone">
...@@ -153,7 +153,6 @@ ...@@ -153,7 +153,6 @@
}, },
methods: { methods: {
show() { show() {
// loadData() {
this.post({ this.post({
url: '/user/baseMsg', url: '/user/baseMsg',
showLoading: false, showLoading: false,
...@@ -171,11 +170,9 @@ ...@@ -171,11 +170,9 @@
navigateTo(`/pagesA/task/task`) navigateTo(`/pagesA/task/task`)
}, },
handleDotRecord() { handleDotRecord() {
// 看点记录
navigateTo(`/pagesD/dotRecord/dotRecord`) navigateTo(`/pagesD/dotRecord/dotRecord`)
}, },
handleUseDotRecord() { handleUseDotRecord() {
// 看点消费记录
navigateTo(`/pagesD/useDotRecord/useDotRecord`) navigateTo(`/pagesD/useDotRecord/useDotRecord`)
}, },
handleWatchRecord() { handleWatchRecord() {
...@@ -191,16 +188,13 @@ ...@@ -191,16 +188,13 @@
navigateTo(`/pagesA/vipPay/vipPay`) navigateTo(`/pagesA/vipPay/vipPay`)
}, },
handleFind() { handleFind() {
this.showMask = true navigateTo(`/pagesD/cdkey/cdkey`)
}, },
handlePhone() { handlePhone() {
this.showKefuPop = true this.showKefuPop = true
}, },
paySuccess(largeType) { paySuccess(largeType) {
// largeType=vip 开通vip
// largeType=point 购买看点
message.notify('支付成功'); message.notify('支付成功');
this.post({ this.post({
url: '/user/baseMsg', url: '/user/baseMsg',
showLoading: false, showLoading: false,
...@@ -210,11 +204,6 @@ ...@@ -210,11 +204,6 @@
this.userBean = data; this.userBean = data;
} }
}); });
},
getPhoneNumber(e) {
console.log(e.detail.code) // 动态令牌
console.log(e.detail.errMsg) // 回调信息(成功失败都会返回)
console.log(e.detail.errno) // 错误码(失败时返回)
} }
} }
}; };
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
}, },
data() { data() {
return { return {
imId: "58428734699" test: ""
}; };
}, },
methods: { methods: {
......
...@@ -117,6 +117,14 @@ ...@@ -117,6 +117,14 @@
"navigationBarBackgroundColor": "#ffffff", "navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
} }
},{
"path": "cdkey/cdkey",
"style": {
"navigationStyle": "default",
"navigationBarTitleText": "兑换会员",
"navigationBarBackgroundColor": "#ffffff",
"navigationBarTextStyle": "black"
}
}] }]
} }
], ],
......
...@@ -263,10 +263,11 @@ ...@@ -263,10 +263,11 @@
// this.$refs.alertDialog.open(); // this.$refs.alertDialog.open();
}, },
handlePay() { handlePay() {
// if (this.os == 'ios') { if (this.os == 'ios') {
// message.notify('暂不支持ios支付'); message.notify('暂不支持ios支付');
// return return
// } }
let that = this; let that = this;
let vipBean = this.pointList[this.selectedIndex]; let vipBean = this.pointList[this.selectedIndex];
if (this.selectedIndex == -1) { if (this.selectedIndex == -1) {
......
<template>
<view class="body">
<view class="search-head">
<view class="search-bar">
<input class="inputkeyword" type="text" placeholder="请输入兑换码" @input="showChangePrompt"
:value="keyword" />
<image v-if="keyword!=''" @click="clearWord" style="width: 36rpx; height: 36rpx"
src="@/static/video/close.png"></image>
</view>
<text class="searchbutton" @click="addByCDK">去兑换</text>
</view>
</view>
</template>
<script>
import common from '@/mixins/common';
import {
navigateBack,
message,
alert,
} from '@/utils/fun.js';
import {
openUrl
} from '@/utils/app+.js';
const app = getApp();
export default {
name: 'index',
mixins: [common],
data() {
return {
keyword: '',
};
},
methods: {
showChangePrompt(e) {
this.keyword = e.detail.value
},
addByCDK() {
if (this.keyword == '') {
message.notify('请输入兑换码')
return
}
this.post({
url: '/vip/addByCDK',
showLoading: false,
data: {
cdk: this.keyword
},
success: ({
data
}) => {
message.notify('恭喜您,成功兑换会员!')
setTimeout(() => {
navigateBack()
}, 1000)
}
});
}
}
};
</script>
<style lang="scss">
@import '@/scss/uni.scss';
.body {
background-color: whitesmoke;
}
.search-head {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
height: 8%;
}
.search-bar {
border-radius: 60rpx;
margin: 10rpx 15rpx;
padding: 15rpx 30rpx;
width: 80%;
background-color: white;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between
}
.inputkeyword {
flex: 1;
margin-left: 30rpx;
}
.searchbutton {
text-align: center;
color: #000000;
font-size: 30rpx;
width: 20%;
margin-right: 10rpx;
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment