xuqiang hace 4 años
padre
commit
ed364bcb08
Se han modificado 6 ficheros con 409 adiciones y 204 borrados
  1. 6 0
      project.config.json
  2. 172 166
      project.private.config.json
  3. 27 13
      src/pages/Apply.vue
  4. 24 9
      src/pages/receiving.vue
  5. 169 5
      src/pages/store/productEdit.vue
  6. 11 11
      src/pages/wallet.vue

+ 6 - 0
project.config.json

@@ -187,6 +187,12 @@
                     "pathName": "/pages/store/homePage",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "新增商品",
+                    "pathName": "/pages/store/productEdit",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "申请退款",

+ 172 - 166
project.private.config.json

@@ -1,169 +1,175 @@
 {
-  "setting": {},
-  "condition": {
-    "plugin": {
-      "list": []
-    },
-    "game": {
-      "list": []
-    },
-    "gamePlugin": {
-      "list": []
-    },
-    "miniprogram": {
-      "list": [
-        {
-          "id": -1,
-          "name": "消息",
-          "pathName": "/pages/news",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "聊天页面",
-          "pathName": "/pages/chat",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "我的",
-          "pathName": "/pages/mine",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "我的收藏",
-          "pathName": "/pages/mineFollow",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "个人设置",
-          "pathName": "/pages/setting",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "我的钱包",
-          "pathName": "/pages/wallet",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "授权登陆",
-          "pathName": "/pages/authorized",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "常见问题",
-          "pathName": "/pages/questions",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "选择地址",
-          "pathName": "/pages/chooseAddress",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "订单详情",
-          "pathName": "/pages/orderdetails",
-          "query": "id=779"
-        },
-        {
-          "id": -1,
-          "name": "新增地址",
-          "pathName": "/pages/receiving",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "首页",
-          "pathName": "/pages/Home",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "拼箱详情",
-          "pathName": "/pages/details",
-          "query": "id=2570",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "收货地址",
-          "pathName": "/pages/address",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "确认订单",
-          "pathName": "/pages/confirmorder",
-          "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "我买到的",
-          "pathName": "/pages/allorder",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "店铺申请",
-          "pathName": "/pages/store/apply",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "认证审核进度",
-          "pathName": "/pages/store/review",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "店铺首页",
-          "pathName": "/pages/store/homePage",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "申请退款",
-          "pathName": "/pages/Apply",
-          "query": "",
-          "scene": null
-        },
-        {
-          "id": -1,
-          "name": "退款详情",
-          "pathName": "/pages/Applydetails",
-          "query": "",
-          "scene": null
-        },
-        {
-          "name": "pages/allsellout",
-          "pathName": "pages/allsellout",
-          "query": "null",
-          "scene": null
+    "setting": {},
+    "condition": {
+        "plugin": {
+            "list": []
+        },
+        "game": {
+            "list": []
+        },
+        "gamePlugin": {
+            "list": []
+        },
+        "miniprogram": {
+            "list": [
+                {
+                    "id": -1,
+                    "name": "消息",
+                    "pathName": "/pages/news",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "聊天页面",
+                    "pathName": "/pages/chat",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "我的",
+                    "pathName": "/pages/mine",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "我的收藏",
+                    "pathName": "/pages/mineFollow",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "个人设置",
+                    "pathName": "/pages/setting",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "我的钱包",
+                    "pathName": "/pages/wallet",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "授权登陆",
+                    "pathName": "/pages/authorized",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "常见问题",
+                    "pathName": "/pages/questions",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "选择地址",
+                    "pathName": "/pages/chooseAddress",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "订单详情",
+                    "pathName": "/pages/orderdetails",
+                    "query": "id=779"
+                },
+                {
+                    "id": -1,
+                    "name": "新增地址",
+                    "pathName": "/pages/receiving",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "首页",
+                    "pathName": "/pages/Home",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "name": "拼箱详情",
+                    "pathName": "/pages/details",
+                    "query": "id=2570",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "收货地址",
+                    "pathName": "/pages/address",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "确认订单",
+                    "pathName": "/pages/confirmorder",
+                    "query": "caseId=2248&boxIds=2251%2C2257%2C2275%2C2281",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "我买到的",
+                    "pathName": "/pages/allorder",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "店铺申请",
+                    "pathName": "/pages/store/apply",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "认证审核进度",
+                    "pathName": "/pages/store/review",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "店铺首页",
+                    "pathName": "/pages/store/homePage",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "申请退款",
+                    "pathName": "/pages/Apply",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "退款详情",
+                    "pathName": "/pages/Applydetails",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "name": "我卖出的",
+                    "pathName": "pages/allsellout",
+                    "query": "null",
+                    "scene": null
+                },
+                {
+                    "name": "新增商品",
+                    "pathName": "pages/store/productEdit",
+                    "query": "null",
+                    "scene": null
+                }
+            ]
         }
-      ]
     }
-  }
-}
+}

+ 27 - 13
src/pages/Apply.vue

@@ -11,25 +11,16 @@
                 label="退款原因"
                 :value="reason"
                 placeholder="请选择退款原因"
-                custom-style="padding-top:23px;height:88px;"
                 is-link
                 readonly
                 @click="show = true"
             >
             </van-field>
-            <van-field
-                label="退款金额"
-                :value="price"
-                @input="price = $event.detail"
-                custom-style="height:75px;"
-                placeholder="¥970"
-            >
-            </van-field>
+            <van-field label="退款金额" :value="price" @input="price = $event.detail" placeholder="¥970"> </van-field>
             <van-field
                 label="补充说明"
                 :value="message"
                 @input="message = $event.detail"
-                custom-style="height:70px;"
                 rows="1"
                 autosize
                 placeholder="选填"
@@ -152,16 +143,39 @@ export default {
 };
 </script>
 <style lang="less" scoped>
+/deep/ .van-cell {
+    --cell-vertical-padding: 23px;
+    --cell-horizontal-padding: 20px;
+    --field-label-color: #000000;
+    --cell-text-color: #000;
+    .van-field__label,
+    .van-cell__title {
+        font-weight: bold;
+        width: 70px;
+        max-width: 70px !important;
+        min-width: 70px !important;
+        flex-shrink: 0;
+        margin-right: 10px !important;
+    }
+    .van-cell__value {
+        text-align: left;
+    }
+
+    &::after {
+        left: 100px !important;
+    }
+}
 .field {
     .flex();
     padding: 17px 17px;
     background: #f5f7fa;
     height: 36px;
     p {
-        width: 146px;
+        width: 115px;
         font-size: 14px;
-        font-weight: 500;
-        color: #646566;
+        font-weight: bold;
+        color: #000;
+        padding-left: 3px;
         line-height: 24px;
     }
     span {

+ 24 - 9
src/pages/receiving.vue

@@ -14,7 +14,6 @@
                 @input="form.name = $event.detail"
                 placeholder="请填写您的姓名"
                 :border="false"
-                custom-style="padding-top:23px;height:83px;"
                 label="联系人"
             />
             <van-field
@@ -23,7 +22,6 @@
                 @input="form.phone = $event.detail"
                 placeholder="请填写您的手机号码"
                 :border="false"
-                custom-style="height:70px;"
                 label="手机号"
             />
             <van-field
@@ -33,7 +31,6 @@
                 is-link
                 placeholder="请选择省市区"
                 :border="false"
-                custom-style="height:70px;"
                 label="地区"
             />
             <van-field
@@ -42,7 +39,6 @@
                 placeholder="请填写您的详细地址"
                 :border="false"
                 label="详细地址"
-                custom-style="height:70px;"
                 type="textarea"
             />
         </van-cell-group>
@@ -105,11 +101,8 @@ export default {
                 });
                 return;
             }
-            if (!this.form.phone) {
-                wx.showToast({
-                    icon: 'none',
-                    title: '手机号码不能为空'
-                });
+            if (!/^1[3~9]\d{9}$/.test(this.form.phone)) {
+                this.toast('请输入正确手机号');
                 return;
             }
             if (!this.form.city) {
@@ -182,6 +175,28 @@ export default {
 };
 </script>
 <style lang="less" scoped>
+/deep/ .van-cell {
+    --cell-vertical-padding: 23px;
+    --cell-horizontal-padding: 20px;
+    --field-label-color: #000000;
+    --cell-text-color: #000;
+    .van-field__label,
+    .van-cell__title {
+        font-weight: bold;
+        width: 70px;
+        max-width: 70px !important;
+        min-width: 70px !important;
+        flex-shrink: 0;
+        margin-right: 10px !important;
+    }
+    .van-cell__value {
+        text-align: left;
+    }
+
+    &::after {
+        left: 100px !important;
+    }
+}
 .container {
     .box-but {
         background: #f5f7fa;

+ 169 - 5
src/pages/store/productEdit.vue

@@ -2,15 +2,179 @@
 {
     "navigationBarTitleText": "新增商品",
     "navigationBarBackgroundColor": "#ffffff",
-    "navigationBarTextStyle": "black"
 }
 </config>
 <template>
-    <div></div>
-</template>
+    <div class="apply">
+        <van-cell-group :border="false">
+            <van-field
+                label="卡牌名称"
+                :value="name"
+                placeholder="请输入卡牌名称"
+                is-link
+                readonly
+                @click="show = true"
+            >
+            </van-field>
+            <van-field label="卡牌销售" :value="price" @input="price = $event.detail" placeholder="请输入金额">
+            </van-field>
+            <van-field label="拼箱结束" :value="dates" placeholder="请输入结束日期"> </van-field>
+            <van-field
+                label="拼箱人数"
+                :value="num"
+                @input="num = $event.detail"
+                rows="1"
+                autosize
+                placeholder="请输入参加人数"
+            >
+            </van-field>
+            <van-field
+                label="邮费"
+                :value="price"
+                @input="price = $event.detail"
+                rows="1"
+                autosize
+                placeholder="默认邮费10元"
+            >
+            </van-field>
+            <van-field label="卡牌细节图" :border="false"> </van-field>
+        </van-cell-group>
+
+        <div class="btn-list">
+            <van-button :color="$colors.prim" :disabled="!canSubmit" block @click="submit">确认上架</van-button>
+        </div>
 
+        <van-action-sheet
+            :show="show"
+            description="卡牌名称"
+            cancel-text="取消"
+            @overlay="overlay = false"
+            @click="cancel"
+            :actions="actions"
+            @select="select"
+        >
+        </van-action-sheet>
+        <!-- <van-datetime-picker type="year-month" :value="currentDate" :min-date="minDate" @input="onInput" /> -->
+    </div>
+</template>
 <script>
-export default {};
+export default {
+    name: 'apply',
+    data() {
+        return {
+            name: '',
+            num: '',
+            price: '',
+            show: false,
+            actions: [
+                {
+                    name: '地址/电话等信息填写错误'
+                },
+                {
+                    name: '多拍/错拍/不想要'
+                },
+                {
+                    name: '未按约定时间发货'
+                },
+                {
+                    name: '其他'
+                }
+            ]
+            // currentDate: new Date().getTime(),
+            // minDate: new Date().getTime()
+        };
+    },
+    computed: {
+        // canSubmit() {
+        //     if (this.name && this.price) {
+        //         return true;
+        //     } else {
+        //         return false;
+        //     }
+        // }
+    },
+    created() {},
+    methods: {
+        select(action) {
+            this.name = action.detail.name;
+            this.show = false;
+        },
+        submit() {
+            if (!this.reason) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '退货原因不能为空'
+                });
+                return;
+            }
+            if (!this.price) {
+                wx.showToast({
+                    icon: 'none',
+                    title: '退货价格不能为空'
+                });
+                return;
+            }
+            // console.log(this.reason);
+            // console.log(this.price);
+            // console.log(this.message);
+            wx.showToast({
+                title: '提交成功'
+            });
+        },
+        cancel() {
+            this.show = false;
+        }
+    }
+};
 </script>
+<style lang="less" scoped>
+.box {
+    margin: 30px 53px;
+    .box-size {
+        width: 154px;
+        font-size: 14px;
+        font-weight: bold;
+        color: #000000;
+        line-height: 20px;
+        margin: 20px 0 15px 0;
+    }
+    .box-butm {
+        .flex();
+        p {
+            font-size: 13px;
+        }
+        span {
+            font-size: 13px;
+            color: red;
+        }
+    }
+}
+/deep/ .van-cell {
+    --cell-vertical-padding: 23px;
+    --cell-horizontal-padding: 20px;
+    --field-label-color: #000000;
+    --cell-text-color: #000;
+    .van-field__label,
+    .van-cell__title {
+        font-weight: bold;
+        width: 70px;
+        max-width: 70px !important;
+        min-width: 70px !important;
+        flex-shrink: 0;
+        margin-right: 10px !important;
+    }
+    .van-cell__value {
+        text-align: left;
+    }
 
-<style lang="less" scoped></style>
+    &::after {
+        left: 100px !important;
+    }
+}
+.van-cell {
+    line-height: 40px;
+}
+.btn-list {
+    margin: 40px;
+}
+</style>

+ 11 - 11
src/pages/wallet.vue

@@ -65,7 +65,7 @@ export default {
         return {
             moneyInfo: {},
             time: 0,
-            newDate: [],
+            newDate: {},
             option1: [
                 { text: '2012年1月', value: 0 },
                 { text: '2012年2月', value: 1 },
@@ -84,7 +84,7 @@ export default {
         };
     },
     computed: {
-        dataList() {
+        dateList() {
             let info = [...this.newDate].find(item => {
                 return item.text;
             });
@@ -102,15 +102,15 @@ export default {
                 query: {}
             });
         },
-        Withdrawal() {
-            this.newDate = this.option1;
-            console.log(this.dataList.text);
-            this.$http
-                .get('/transactionRecord/showMyTransactionRecords', { yearMonth: this.dataList.text })
-                .then(res => {
-                    console.log(res);
-                });
-        }
+        Withdrawal() {}
+    },
+    onShow() {
+        this.newDate = this.option1;
+        let Aike = this.dateList.text.replace(/%E5%B9%B4/g, '年');
+        console.log(Aike);
+        // this.$http.get('/transactionRecord/showMyTransactionRecords', { yearMonth: Aike }).then(res => {
+        //     console.log(res);
+        // });
     }
 };
 </script>