diff --git a/common/config.js b/common/config.js index 5c1e14c..a2dd77d 100644 --- a/common/config.js +++ b/common/config.js @@ -6,7 +6,7 @@ * loginTimeoutPage = "/pages/login/index", // 登录超时或失效的情况下,跳转到的登录页面 */ module.exports = { - // baseUrl: 'http://192.168.2.110:7201', + // baseUrl: 'http://192.168.2.113:7201', baseUrl: 'https://supervise.yxtsoft.com/lpkapi', // baseUrl: 'http://jianguan.yyundong.com/api', tokenName: "Authorization", // 请求头中token的名字,与服务器端对应 diff --git a/pages.json b/pages.json index 0cf540b..dc32170 100644 --- a/pages.json +++ b/pages.json @@ -10,13 +10,13 @@ { "path": "pages/card/card_detail", "style": { - "navigationBarTitleText": "礼包详情" + "navigationBarTitleText": "详情" } }, { "path": "pages/card/card", "style": { - "navigationBarTitleText": "礼包" + "navigationBarTitleText": "云菜窖" } }, { @@ -35,7 +35,7 @@ { "path": "pages/card/card_bind", "style": { - "navigationBarTitleText": "绑定礼包卡", + "navigationBarTitleText": "绑定云菜窖卡", "enablePullDownRefresh": false } }, @@ -44,7 +44,7 @@ { "path": "pages/card/card_bind2", "style": { - "navigationBarTitleText": "绑定礼包卡", + "navigationBarTitleText": "绑定云菜窖卡", "enablePullDownRefresh": false } }, { @@ -81,6 +81,14 @@ { "navigationBarTitleText" : "预约记录" } + }, + { + "path" : "pages/good/goodsDetail", + "style" : + { + "navigationBarTitleText" : "商品详情", + "enablePullDownRefresh" : false + } } ], diff --git a/pages/card/card.vue b/pages/card/card.vue index 3afe742..7af5361 100644 --- a/pages/card/card.vue +++ b/pages/card/card.vue @@ -4,13 +4,15 @@ - 绑定新卡 + style="background: #f1f2f3;width: 100%;height: 35px;display: flex;flex-direction: row;justify-content: center;align-items: center;"> + + 绑定新卡 + - + @@ -94,10 +96,20 @@ url: '/pages/card/card_bind' }) }, - detail(sid) { - uni.navigateTo({ - url: '/pages/card/card_detail?sid=' + sid - }) + detail(item) { + + if (item.state == '失效') { + // 记录 + uni.navigateTo({ + url: '/pages/card/card_record?sid=' + item.sid + }) + } else { + // 详情 + uni.navigateTo({ + url: '/pages/card/card_detail?sid=' + item.sid + }) + } + }, booking(sid) { uni.navigateTo({ diff --git a/pages/card/card_bind.vue b/pages/card/card_bind.vue index c09d060..db45d83 100644 --- a/pages/card/card_bind.vue +++ b/pages/card/card_bind.vue @@ -5,7 +5,7 @@ - 绑定礼包卡 + 绑定云菜窖卡 - 绑定礼包卡 + 绑定云菜窖卡 - 提货人员 - 提 货 人 + - 手机号码 - 联系电话 + @@ -64,12 +64,14 @@ - + {{item.goods}} - {{item.remarks}} + + @@ -181,6 +183,12 @@ _this.shortToast('发生异常') }) + }, + goodDetail(sid){ + // 商品详情 + uni.navigateTo({ + url: '/pages/good/goodsDetail?sid=' + sid + }) } } } diff --git a/pages/card/card_detail.vue b/pages/card/card_detail.vue index 0f12ed2..baff969 100644 --- a/pages/card/card_detail.vue +++ b/pages/card/card_detail.vue @@ -36,15 +36,19 @@ 商品明细 - - + {{item.goods}} - 剩余数量:{{item.lnum}} + {{item.remarks}} + + + 总数:{{item.num}} + + 剩余:{{item.lnum}} - x{{item.num}} @@ -119,6 +123,12 @@ uni.navigateTo({ url: '/pages/card/card_booking?sid=' + sid }) + }, + goodDetail(sid){ + // 商品详情 + uni.navigateTo({ + url: '/pages/good/goodsDetail?sid=' + sid + }) } } } diff --git a/pages/card/card_record.vue b/pages/card/card_record.vue index 1d98d02..ec631b5 100644 --- a/pages/card/card_record.vue +++ b/pages/card/card_record.vue @@ -62,6 +62,14 @@ _this.$nextTick(() => { _this.$refs.pageView.setLoadState(2) }) + + // 无数据 + if(_this.data.length==0){ + _this.$nextTick(() => { + _this.$refs.pageView.setLoadState(100) + }) + } + }).catch(e => { // 错误 1 _this.$nextTick(() => { diff --git a/pages/good/goodsDetail.vue b/pages/good/goodsDetail.vue new file mode 100644 index 0000000..8183fd0 --- /dev/null +++ b/pages/good/goodsDetail.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/static/btn_bj.png b/static/btn_bj.png new file mode 100644 index 0000000..01275fd Binary files /dev/null and b/static/btn_bj.png differ diff --git a/static/edit_bg.png b/static/edit_bg.png index 42abbdb..562f3f3 100644 Binary files a/static/edit_bg.png and b/static/edit_bg.png differ diff --git a/static/gift3.png b/static/gift3.png new file mode 100644 index 0000000..fe79652 Binary files /dev/null and b/static/gift3.png differ diff --git a/uni_modules/loading-state/components/loading-state/loading-state.vue b/uni_modules/loading-state/components/loading-state/loading-state.vue index a2bce43..48c2360 100644 --- a/uni_modules/loading-state/components/loading-state/loading-state.vue +++ b/uni_modules/loading-state/components/loading-state/loading-state.vue @@ -12,6 +12,12 @@ + + + + +