xuxy
2024-06-26 5a72a35e3c9d76299b0d4d2f8f7ca61eff4c1284
update
已修改7个文件
93 ■■■■ 文件已修改
common/self.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/dying318-picker/Picker.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/farmer/flower-manage/flower-add.vue 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/farmer/flower-manage/flower-manage.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni.scss 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/uni-scss/theme.scss 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
uni_modules/uni-scss/variables.scss 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
common/self.scss
@@ -13,6 +13,9 @@
    --topicgray: #999999;
    --topicdarkgray: #936E32;
}
$u-main-color: #20613D;
$main-color: #20613D;
$u-primary: #20613D;
body{
    --tcolor: #3140A2;
    font-family: PingFangSC-Regular, PingFang SC;
components/dying318-picker/Picker.vue
@@ -50,8 +50,8 @@
                value: Object,
                default() {
                    return {
                        value: 'value',
                        label: 'label',
                        value: 'id',
                        label: 'name',
                        children: 'children'
                    }
                }
@@ -131,6 +131,8 @@
                        this.setColumn(index, pickerList)
                    })
                    this.reactModel = false;
                    console.log('init picker',this.pickerList)
                } else {
                    this.setColumn(0, this.pickerList)
                }
pages/farmer/flower-manage/flower-add.vue
@@ -144,10 +144,10 @@
                修改
            </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>
@@ -173,8 +173,8 @@
                <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>
@@ -210,22 +210,17 @@
                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) {
@@ -233,7 +228,8 @@
            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: '全部',
@@ -283,27 +279,25 @@
        },
        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 = []
pages/farmer/flower-manage/flower-manage.vue
@@ -81,8 +81,14 @@
            <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
@@ -1,4 +1,7 @@
/* 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_modules/uni-scss/theme.scss
@@ -29,8 +29,3 @@
$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_modules/uni-scss/variables.scss
@@ -5,7 +5,7 @@
$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%);