| | |
| | | --topicgray: #999999; |
| | | --topicdarkgray: #936E32; |
| | | } |
| | | $u-main-color: #20613D; |
| | | $main-color: #20613D; |
| | | $u-primary: #20613D; |
| | | body{ |
| | | --tcolor: #3140A2; |
| | | font-family: PingFangSC-Regular, PingFang SC; |
| | |
| | | value: Object, |
| | | default() { |
| | | return { |
| | | value: 'value', |
| | | label: 'label', |
| | | value: 'id', |
| | | label: 'name', |
| | | children: 'children' |
| | | } |
| | | } |
| | |
| | | this.setColumn(index, pickerList) |
| | | }) |
| | | this.reactModel = false; |
| | | console.log('init picker',this.pickerList) |
| | | |
| | | } else { |
| | | this.setColumn(0, this.pickerList) |
| | | } |
| | |
| | | 修改 |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- |
| | | |
| | | <u-picker @confirm="select_category" keyName="name" @cancel="show_select_category=false" |
| | | :show="show_select_category" :columns="columns_categorys"></u-picker> |
| | | :show="show_select_category" :columns="columns_categorys"></u-picker> --> |
| | | |
| | | <u-picker @confirm="select_level" keyName="label" @cancel="show_select_level=false" :show="show_select_level" |
| | | :columns="columns_levels"></u-picker> |
| | |
| | | <view class="button-green" @click="closeParamPop">返回</view> |
| | | </view> |
| | | </uni-popup> |
| | | |
| | | <dying318picker :pickerList="columns_categorys" ref="picker_category" :pickerKey="pickerKey"></dying318picker> |
| | | <dying318picker :picker-list="columns_categorys" ref="picker_category" @confirm="confirmPickerCategory"> |
| | | </dying318picker> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | columns_categorys: [], |
| | | columns_levels: [], |
| | | // columns_params: [], //弹窗选择具体的值 |
| | | pickerKey: { |
| | | value: 'id', |
| | | lable: 'name', |
| | | children: 'children' |
| | | cancel: { |
| | | color: '#999', |
| | | }, |
| | | cancel: { |
| | | color: '#999', |
| | | }, |
| | | confirm: { |
| | | color: '#20613D', |
| | | }, |
| | | // column: [ |
| | | // {flex: 1}, |
| | | // {flex: 1}, |
| | | // {flex: 3}, |
| | | // ] |
| | | confirm: { |
| | | color: '#20613D', |
| | | }, |
| | | // column: [ |
| | | // {flex: 1}, |
| | | // {flex: 1}, |
| | | // {flex: 3}, |
| | | // ] |
| | | } |
| | | }, |
| | | async onLoad(options) { |
| | |
| | | this.$http.request('get', '/api/flower/category/tree', {}).then(res => { |
| | | var data = res.data |
| | | this.columns_categorys = data || [] |
| | | console.log('columns_categorys',this.columns_categorys) |
| | | console.log('columns_categorys', this.columns_categorys) |
| | | |
| | | // this.columns_categorys = [data || []] |
| | | // this.columns_categorys[0].unshift({ |
| | | // label: '全部', |
| | |
| | | }, |
| | | |
| | | methods: { |
| | | async confirmPickerCategory(picker) { |
| | | console.log('confirmPickerCategory', picker) |
| | | var id = picker.value |
| | | var name = picker.label |
| | | if (id !== this.dto.category) { |
| | | if (this.dto.category) { |
| | | await this.$message.confirm('修改分类将清空商品参数,确定修改吗') |
| | | } |
| | | this.dto.categoryStr = name |
| | | this.dto.category = id |
| | | this.$message.showLoading() |
| | | await this.refresh_category() |
| | | this.$message.hideLoading() |
| | | } |
| | | }, |
| | | closeParamPop() { |
| | | this.$refs.popup_param.close() |
| | | }, |
| | | |
| | | async select_category(e) { |
| | | if (e.value[0].id !== this.dto.category) { |
| | | if (this.dto.category) { |
| | | await this.$message.confirm('修改分类将清空商品参数,确定修改吗') |
| | | } |
| | | console.log('select_category', e) |
| | | this.show_select_category = false |
| | | this.dto.categoryStr = e.value[0].name |
| | | this.dto.category = e.value[0].id |
| | | this.$message.showLoading() |
| | | await this.refresh_category() |
| | | this.$message.hideLoading() |
| | | } else { |
| | | |
| | | } |
| | | |
| | | }, |
| | | async refresh_category() { |
| | | // this.columns_params = [] |
| | | this.dto.params = [] |
| | |
| | | <view class="component-popup_input"> |
| | | |
| | | <!-- 输入框--> |
| | | <!-- #ifdef H5 --> |
| | | <uni-easyinput class="p9-12" maxlength="100" type="textarea" v-model="content" |
| | | :placeholder="inputplaceholder"></uni-easyinput> |
| | | <!-- #endif --> |
| | | <!-- #ifdef MP --> |
| | | <input v-model="content" :placeholder="inputplaceholder" type="digit" v-if="currentInputKey=='price'"/> |
| | | <input v-model="content" :placeholder="inputplaceholder" type="number" v-if="currentInputKey=='stock'"/> |
| | | <!-- #endif --> |
| | | |
| | | <!-- 提交按钮 --> |
| | | <view class="button-green" @click="submitValue">提交</view> |
| | |
| | | /* uni.scss */ |
| | | @import '@/common/self.scss'; |
| | | $u-primary: $main-color; |
| | | @import 'uview-ui/theme.scss'; |
| | | $u-primary: $main-color; |
| | | |
| | | @import '@/uni_modules/uni-scss/variables.scss'; |
| | |
| | | $uni-black: #000000; |
| | | $uni-white: #ffffff; |
| | | $uni-transparent: rgba($color: #000000, $alpha: 0); |
| | | |
| | | @import "uview-ui/theme.scss"; |
| | | @import "uview-ui/index.scss"; |
| | | |
| | | @import '@/node_modules/uview-ui/theme.scss'; |
| | |
| | | $uni-radius-root:5px; |
| | | |
| | | // 主色 |
| | | $uni-primary: #2979ff; |
| | | $uni-primary: $main-color; |
| | | $uni-primary-disable:mix(#fff,$uni-primary,50%); |
| | | $uni-primary-light: mix(#fff,$uni-primary,80%); |
| | | |