Browse Source

手机绑定 部分样式修改

test
Enzo 5 years ago
parent
commit
1415828114
  1. 2
      common/api.js
  2. 6
      pages.json
  3. 11
      pages/index/index.vue
  4. 15
      pages/order/order_details.vue
  5. 64
      pages/verification/index.vue

2
common/api.js

@ -40,7 +40,7 @@ export const API_CREATEORDER = '/api/order/create'; //创建订单并支付
export const API_ORDERPAY = '/api/order/pay'; //订单立即支付
export const API_WECHAT_SETPHONE = '/api/user/profile'; //手机绑定
export const API_CONFIRM_CODE = '/api/verification/verify'; //核销订单

6
pages.json

@ -102,6 +102,12 @@
"enablePullDownRefresh": true
}
},
{
"path": "pages/verification/index",
"style": {
"navigationBarTitleText": "核销权限"
}
},
{
"path": "pages/recommList/index",
"style": {

11
pages/index/index.vue

@ -35,7 +35,7 @@
<view class="lf-row-center">
<image src="../../static/no_chancel.png" class="channel-mask1" mode="aspectFill"></image>
</view>
<view class="lf-row-center lf-m-l-10" style="color: #bfbfbf;">您还未添加频道哦~</view>
<view class="lf-row-center lf-m-l-10" style="color: #bfbfbf;" @click="$url('/pages/verification/index')">您还未添加频道哦~</view>
</view>
<!-- 中间广告模块 -->
@ -138,15 +138,6 @@
this.getIndexData()
this.getFavourite()
},
onLoad(options) {
if (options.scene) {
//
let str = decodeURIComponent(options.scene);
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.$msg('核销成功!');
});
}
},
methods: {
//
getFavourite() {

15
pages/order/order_details.vue

@ -71,22 +71,23 @@
foreground="#000" pdground="#000" :onval="true" :loadMake="true" /> -->
<image src="../../static/defult_code.png" mode="aspectFill" style="width: 300rpx;height: 300rpx;"></image>
</view>
<view style="margin-top: 10rpx;position: relative;top: 26rpx;">
<view class="lf-m-t-10">
<view class="lf-font-28 text-black1">
{{checkArea}}
<text v-if="checkArea" style="position: relative;left: 172rpx;top: -36rpx;display: inherit;" class="lf-color-blue lf-font-28" @tap="copy(checkArea)">复制</text></view>
<text>{{checkArea}} </text>
<text v-if="checkArea" class="lf-color-blue lf-font-28 lf-m-l-10" @tap="copy(checkArea)">复制</text>
</view>
</view>
<view class="lf-m-t-32" v-if="checkArea">
<view class="lf-color-green lf-font-28 lf-flex">
<view v-if="checkArea">
<view class="lf-color-green lf-font-28 lf-flex lf-m-t-10">
<text v-if="orderDetails.status == 3">待使用</text>
<text v-else>{{orderDetails.status_text}}</text>
<!-- <text class="lf-iconfont lf-icon-shuaxin1 lf-font-40"
style="color: #999;position: relative;left: 84rpx;top: -42rpx;display: inherit;"
@tap="refreshCode()"></text> -->
<image src="../../static/center/refresh.png"
<!-- <image src="../../static/center/refresh.png"
style="color: #999;position: relative;left: 28rpx;top: 0rpx;display: inherit; width: 30rpx;height: 30rpx;"
@tap="refreshCode()">
</image>
</image> -->
</view>
</view>
<!-- <view style="margin-top: 44rpx;" v-else>

64
pages/verification/index.vue

@ -0,0 +1,64 @@
<template>
<view class="lf-p-40">
<view class="lf-row-center lf-font-28">确认核销权限...</view>
<button class="cu-btn lf-bg-white lf-m-t-30" style="border: 1px solid #1998FE;" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
<text class="lf-font-32 lf-color-blue">确认核销</text>
</button>
</view>
</template>
<script>
export default {
data() {
return {
userInfo: '',
loadOptions: ''
}
},
onLoad(options) {
this.userInfo = uni.getStorageSync('userinfo')
this.loadOptions = options.scene
// if (options.scene) {
// //
// let str = decodeURIComponent(options.scene);
// this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
// this.$msg('!');
// });
// }
},
methods: {
//
getPhoneNumber(event){
if(this.userInfo.mobile == '') {
console.log('需绑定手机号')
if(event.detail.errMsg == 'getPhoneNumber:ok'){
let encryptedData = event.detail.encryptedData;
let iv = event.detail.iv;
// let userInfo = uni.getStorageSync('userinfo') || {};
this.$http(this.API.API_WECHAT_SETPHONE, {
encryptedData,
iv,
// token: userInfo.token //
}).then(res => {
this.$msg('更新成功', {icon: 'success'});
uni.setStorageSync('userinfo', res.data);
let str = decodeURIComponent(this.loadOptions);
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.$msg('核销成功!');
});
})
}
}else {
let str = decodeURIComponent(this.loadOptions);
this.$http(this.API.API_CONFIRM_CODE, {verify_code: str}).then(res => {
this.$msg('核销成功!');
});
console.log('无需绑定手机号')
}
},
}
}
</script>
<style>
</style>
Loading…
Cancel
Save