|
|
@@ -1,50 +1,40 @@
|
|
|
<template>
|
|
|
<view class="container">
|
|
|
- <view class="list flex_r flex_ac flex_jb mar_t16" @click="OnpickerShow">
|
|
|
+ <view class="list flex_r flex_ac flex_jb mar_t16">
|
|
|
<view class="list_name">赠送类型:</view>
|
|
|
<view class="list_text">
|
|
|
- <!-- <uni-data-select
|
|
|
- v-model="value"
|
|
|
- :localdata="range"
|
|
|
- :clear="false"
|
|
|
- class="type_select"
|
|
|
- /> -->
|
|
|
- <span>{{range[0][value].label}}</span>
|
|
|
- <span class="iconfont"></span>
|
|
|
+ <!-- <span>{{range[0][value].label}}</span>
|
|
|
+ <span class="iconfont"></span> -->
|
|
|
+ <div class="option-i" @click="value = 0">
|
|
|
+ <img src="@/static/img/xuanzhong_icon.png" v-if="value === 0" class="ico" alt="" />
|
|
|
+ <img src="@/static/img/weixuanzhong_icon.png" v-else class="ico" alt="" />
|
|
|
+ <span class="txt">企业</span>
|
|
|
+ </div>
|
|
|
+ <div class="option-i" @click="value = 1">
|
|
|
+ <img src="@/static/img/xuanzhong_icon.png" v-if="value === 1" class="ico" alt="" />
|
|
|
+ <img src="@/static/img/weixuanzhong_icon.png" v-else class="ico" alt="" />
|
|
|
+ <span class="txt">企业</span>
|
|
|
+ </div>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list flex_r flex_ac flex_jb mar_t16" v-if="value == 0">
|
|
|
<view class="list_name">当前余额:</view>
|
|
|
- <view class="list_text"
|
|
|
- ><text>{{ userinfo.user_money }}</text></view
|
|
|
- >
|
|
|
+ <view class="list_text"><text>{{ userinfo.user_money }}</text></view>
|
|
|
</view>
|
|
|
<view class="list flex_r flex_ac flex_jb mar_t16" v-else>
|
|
|
<view class="list_name">当前茶宝:</view>
|
|
|
- <view class="list_text"
|
|
|
- ><text>{{ userinfo.cha_bao }}</text></view
|
|
|
- >
|
|
|
+ <view class="list_text"><text>{{ userinfo.cha_bao }}</text></view>
|
|
|
</view>
|
|
|
<view class="list flex_r flex_ac flex_jb mar_t16">
|
|
|
<view class="list_name">对方账号:</view>
|
|
|
<view class="list_text">
|
|
|
- <input
|
|
|
- type="text"
|
|
|
- v-model="id"
|
|
|
- placeholder="输入对方账号"
|
|
|
- placeholder-style="color:#ddd;"
|
|
|
- />
|
|
|
+ <input type="text" v-model="id" placeholder="输入对方账号" placeholder-style="color:#ddd;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list flex_r flex_ac flex_jb mar_t16">
|
|
|
<view class="list_name">赠送数量:</view>
|
|
|
<view class="list_text">
|
|
|
- <input
|
|
|
- type="text"
|
|
|
- v-model="give_num"
|
|
|
- placeholder="自定义赠送数量"
|
|
|
- placeholder-style="color:#ddd;"
|
|
|
- />
|
|
|
+ <input type="text" v-model="give_num" placeholder="自定义赠送数量" placeholder-style="color:#ddd;" />
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="list flex_r flex_ac flex_jb mar_t16">
|
|
|
@@ -53,8 +43,7 @@
|
|
|
</view>
|
|
|
<view class="tips">{{ list[value].tips }}</view>
|
|
|
<view class="btn flex_r flex_ac flex_jc" @tap="give">立即赠送</view>
|
|
|
-
|
|
|
- <m-picker mode="bottom" :show.sync="pickerShow" :range="range" @confirm="confirm" />
|
|
|
+ <!-- <m-picker mode="bottom" :show.sync="pickerShow" :range="range" @confirm="confirm" /> -->
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
@@ -62,7 +51,7 @@ let page = 1;
|
|
|
let app = getApp();
|
|
|
var appEv = app.$vm.$options;
|
|
|
import { get, post } from "@/request/api.js";
|
|
|
-import mPicker from '@/components/jarvis-picker/m-picker.vue';
|
|
|
+// import mPicker from '@/components/jarvis-picker/m-picker.vue';
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -81,7 +70,9 @@ export default {
|
|
|
list: [],
|
|
|
};
|
|
|
},
|
|
|
- components: { mPicker },
|
|
|
+ components: {
|
|
|
+ // mPicker
|
|
|
+ },
|
|
|
onLoad() {
|
|
|
this.userinfo = uni.getStorageSync("userinfo");
|
|
|
this.getGiveList();
|
|
|
@@ -131,15 +122,14 @@ export default {
|
|
|
title: "提示",
|
|
|
content: content,
|
|
|
showCancel: true,
|
|
|
- success: function (res) {
|
|
|
+ success: function(res) {
|
|
|
if (res.confirm) {
|
|
|
if (that.value == 0) {
|
|
|
that.giveMoney();
|
|
|
} else {
|
|
|
that.giveIntegral();
|
|
|
}
|
|
|
- } else {
|
|
|
- }
|
|
|
+ } else {}
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
@@ -188,10 +178,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- OnpickerShow(){
|
|
|
+ OnpickerShow() {
|
|
|
this.pickerShow = !this.pickerShow;
|
|
|
},
|
|
|
- confirm(da){
|
|
|
+ confirm(da) {
|
|
|
this.value = da[0]
|
|
|
}
|
|
|
},
|
|
|
@@ -217,10 +207,28 @@ page {
|
|
|
flex: 1;
|
|
|
font-family: "SourceHanSansCN-Bold";
|
|
|
text-align: right;
|
|
|
- .iconfont{
|
|
|
+
|
|
|
+ .iconfont {
|
|
|
font-size: 28rpx;
|
|
|
margin-left: 12rpx;
|
|
|
}
|
|
|
+
|
|
|
+ .option-i {
|
|
|
+ display: inline-block;
|
|
|
+ margin-right: 32rpx;
|
|
|
+ &:last-child {
|
|
|
+ margin-right: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .ico {
|
|
|
+ width: 32rpx;
|
|
|
+ height: 32rpx;
|
|
|
+ margin-right: 6rpx;
|
|
|
+ }
|
|
|
+ .txt,
|
|
|
+ .ico {
|
|
|
+ vertical-align: middle;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.list_name {
|