|
@@ -31,9 +31,20 @@
|
|
|
<!-- <tm-pickers v-for="item in arrbig" class="tan" :default-value.sync="item.choosevalue" rang-key="category_name" list="[]">
|
|
|
<tm-input title="分类" placeholder="请选择分类" disabled :value="obTstrnew(category_danarr,'')" right-icon="icon-angle-right"></tm-input>
|
|
|
</tm-pickers> -->
|
|
|
- <tm-pickers v-for="(item,index) in arrbig" @confirm="xuanze" :indexfu="index" :list="item.value">
|
|
|
- <tm-input title="分类" placeholder="请选择分类" v-model="item.choosename" disabled right-icon="icon-angle-right"></tm-input>
|
|
|
- </tm-pickers>
|
|
|
+ <view v-for="(item,index) in arrbig">
|
|
|
+ <tm-pickers v-if="item.type=='select'" @confirm="xuanze" :indexfu="index" :list="item.value">
|
|
|
+ <tm-input :title="item.name" align="right" :placeholder="'请选择'+item.name" v-model="item.choosevalue" disabled right-icon="icon-angle-right"></tm-input>
|
|
|
+ </tm-pickers>
|
|
|
+ <tm-input v-if="item.type=='text' && item.name !='颜色'" :title="item.name" v-model="item.value" disabled align="right"></tm-input>
|
|
|
+ <view class="border-b-0 border-grey-darken-4-b-1 py-24 flex-between" v-if="item.name=='颜色'">
|
|
|
+ <text class="text-size-n ">{{item.name}}</text>
|
|
|
+ <view>
|
|
|
+ <view class="seka" :style="{'backgroundColor':buttonColor}" @tap="showPickerColorPop"></view>
|
|
|
+ <picker-color :isShow="showPickerColor" :bottom="bottomPickerColor" @callback='getPickerColor' />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<!-- <tm-listitem
|
|
|
v-for="item in arrbig"
|
|
|
:left-icon-size="80"
|
|
@@ -58,7 +69,6 @@
|
|
|
<tm-input title="适用人群" v-model="reqData.type" align="right"></tm-input>
|
|
|
<tm-input title="品牌" v-model="reqData.brand" align="right"></tm-input>
|
|
|
<tm-input title="材料" v-model="reqData.science" align="right"></tm-input> -->
|
|
|
-
|
|
|
</view>
|
|
|
<tm-button :round="24" class="sao mb-40 mt-40" @click="chuangjianFun()" block>提交</tm-button>
|
|
|
</view>
|
|
@@ -86,12 +96,19 @@
|
|
|
<script>
|
|
|
import{myRequest} from '@/api/request.js'
|
|
|
import { pathToBase64, base64ToPath } from '@/js_sdk/mmmm-image-tools/index.js'
|
|
|
+import pickerColor from "@/components/helang-pickerColor/helang-pickerColor.vue"
|
|
|
export default {
|
|
|
+ components: {
|
|
|
+ "picker-color":pickerColor,
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
+ buttonColor:"#0099FF",
|
|
|
+ showPickerColor:false,
|
|
|
+ bottomPickerColor:0,
|
|
|
arrbig:[],
|
|
|
koutu:'/static/img/53.png',
|
|
|
- active:2,
|
|
|
+ active:0,
|
|
|
category_arr:[],
|
|
|
category_danarr:[],
|
|
|
size_arr:[
|
|
@@ -130,11 +147,27 @@ export default {
|
|
|
this.jiaobenFun()
|
|
|
},
|
|
|
methods: {
|
|
|
+ /* 显示获取颜色选择弹窗 */
|
|
|
+ showPickerColorPop(){
|
|
|
+ this.showPickerColor=true;
|
|
|
+ },
|
|
|
+ /* 获取颜色选择回调 */
|
|
|
+ getPickerColor(color){
|
|
|
+ /* 隐藏弹窗 */
|
|
|
+ this.showPickerColor=false;
|
|
|
+ /* 判断颜色值是否有效 */
|
|
|
+ if(color){
|
|
|
+ this.buttonColor=color;
|
|
|
+ console.log('选择的颜色值是:'+color);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showPickerColorPop(){
|
|
|
+ this.showPickerColor=true;
|
|
|
+ },
|
|
|
xuanze(data){
|
|
|
- var index=data[0].index;
|
|
|
+ // var index=data[0].index;
|
|
|
// this.arrbig[index].choosename=data[0].data;
|
|
|
- console.log(data[0].data)
|
|
|
- console.log(this.arrbig)
|
|
|
+ console.log(data)
|
|
|
},
|
|
|
getFl(){
|
|
|
var that=this;
|
|
@@ -190,8 +223,8 @@ export default {
|
|
|
this.active=1;
|
|
|
},
|
|
|
quindex(){
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/index/index?index=1",
|
|
|
+ uni.switchTab({
|
|
|
+ url: "/pages/wardrobe/index",
|
|
|
})
|
|
|
},
|
|
|
paizhao(){
|
|
@@ -226,7 +259,10 @@ export default {
|
|
|
console.log(res.data)
|
|
|
if (res.data.code == 200) {
|
|
|
var arrbig=[
|
|
|
- {name:"颜色",value:["白色","绿色","蓝色"],choosevalue:'',choosename:''}
|
|
|
+ {name:"名称",value:"羽绒服",choosevalue:'',type:'text'},
|
|
|
+ {name:"颜色",value:"#b1b1b1",choosevalue:'',type:'text'},
|
|
|
+ {name:"尺码",value:["S","L","M"],choosevalue:'L',type:'select'},
|
|
|
+ {name:"材质",value:["牛仔","纯棉","羊毛"],choosevalue:'纯棉',type:'select'}
|
|
|
]
|
|
|
that.arrbig=arrbig;
|
|
|
that.active=2;
|
|
@@ -348,4 +384,5 @@ export default {
|
|
|
.logincla{margin-top: 100px;}
|
|
|
/deep/ .logincla .primary{background-color: #303440 !important;}
|
|
|
/deep/ .quindex uni-button{background-color: #0A84FF !important;}
|
|
|
+ .seka{width: 40px;height: 20px;}
|
|
|
</style>
|