diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..efe7735 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +unpackage \ No newline at end of file diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 59d78d5..1d4d6d6 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -14,6 +14,10 @@ { "launchtype" : "local" }, + "mp-weixin" : + { + "launchtype" : "local" + }, "type" : "uniCloud" } ] diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/barter-app(new-app).iml b/.idea/barter-app(new-app).iml new file mode 100644 index 0000000..0c8867d --- /dev/null +++ b/.idea/barter-app(new-app).iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d22814e --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/App.vue b/App.vue index d5604b0..bc29f64 100644 --- a/App.vue +++ b/App.vue @@ -5,19 +5,20 @@ }, onShow () { console.log('App Show') + uni.hideLoading() }, onHide () { console.log('App Hide') - }, - globalData: { - mainColor: "white" - } + }, + globalData: { + mainColor: "white" + } } + diff --git a/apis/interfaces/coupon.js b/apis/interfaces/coupon.js index 2520e5a..460f2d6 100644 --- a/apis/interfaces/coupon.js +++ b/apis/interfaces/coupon.js @@ -33,7 +33,7 @@ const getCouponsInfoById = (id) => { // 根据企业id获取企业首页的轮播图列表 const couponsByCompanyId = (data) => { return request({ - url: 'coupons', + url: 'coupons/all', method: 'get', data: data }) diff --git a/apis/interfaces/goods.js b/apis/interfaces/goods.js index 544e24c..cf53468 100644 --- a/apis/interfaces/goods.js +++ b/apis/interfaces/goods.js @@ -55,7 +55,7 @@ const managesGoodsBurn = data => { }) } -// 商品管理-商品上架 +// 商品管理-商品上架 ********已废弃 const managesGoodsOnsale = id => { return request({ url: 'manages/goods/'+id+'/onsale', @@ -63,7 +63,7 @@ const managesGoodsOnsale = id => { }) } -// 商品管理-商品下架 +// 商品管理-商品下架 ********已废弃 const managesGoodsOffsale = id => { return request({ url: 'manages/goods/'+id+'/offsale', @@ -71,7 +71,7 @@ const managesGoodsOffsale = id => { }) } -// 发布商品前置 manages/goods/create +// 发布商品前置 const managesGoodsCreateBefore = () => { return request({ url: 'manages/goods/create' @@ -100,7 +100,31 @@ const managesCreate = (data) => { url: 'manages/goods/create', data }) -} +} + +// 商品认证 +const managesGoodsAuth = (id, data) => { + return request({ + url: 'manages/goods/' + id + '/extends', + method:'POST', + data + }) +} + +// 商品删除 +const managesGoodsDelete = id => { + return request({ + url: 'manages/goods/' + id, + method:'DELETE' + }) +} + +// 产品信息 +const managesGoodsEdit = id => { + return request({ + url: 'manages/goods/' + id + }) +} // 区块链证书 const managesChain = (id) => { @@ -129,8 +153,24 @@ const managesCoupons = (id) => { url: 'coupons/'+ id +'/grant', method: 'POST' }) -} - +} + +// 产品编辑 +const managesGoodsPut = (id, data) => { + return request({ + url: 'manages/goods/' + id, + method: 'PUT', + data + }) +} + +// 产品附加信息 +const managesGoodsExtends = id => { + return request({ + url: 'manages/goods/' + id + '/extends', + }) +} + export { mall, list, @@ -143,9 +183,14 @@ export { managesGoodsCreateBefore, managesGoodsCreate, managesCategory, + managesGoodsAuth, + managesGoodsDelete, + managesGoodsEdit, managesCreate, managesChain, managesAttestation, managesTracedTo, - managesCoupons + managesCoupons, + managesGoodsPut, + managesGoodsExtends } diff --git a/apis/interfaces/market.js b/apis/interfaces/market.js new file mode 100644 index 0000000..b328607 --- /dev/null +++ b/apis/interfaces/market.js @@ -0,0 +1,58 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * moduleName: 转让市场 + */ + +import { request } from '../index' + +// 转让市场 +const markets = data => { + return request({ + url: 'markets', + data + }) +} + +// 转让市场记录 +const marketsLogs = data => { + return request({ + url: 'markets/orders', + data + }) +} + +// 转让详情 +const marketsInfo = id => { + return request({ + url: 'markets/' + id + }) +} + +// 提交支付订单 +const marketsBuy = (id, data) => { + return request({ + url: 'markets/' + id + '/create', + method: 'POST', + data + }) +} + +// 转让市场支付 +const marketsPay = (id, platform) => { + return request({ + url: 'markets/pay/' + id + '/' + platform + }) +} + +// + +export { + markets, + marketsLogs, + marketsInfo, + marketsBuy, + marketsPay +} diff --git a/apis/interfaces/mine.js b/apis/interfaces/mine.js new file mode 100644 index 0000000..9ffb88c --- /dev/null +++ b/apis/interfaces/mine.js @@ -0,0 +1,97 @@ +/** + * Web-zdx + * moduleName:个人中心相关操作 + */ + +import request from '../request.js' + +// 关注店铺 +const shopSubscribe = (id) => { + return request({ + url: 'mall/shops/subscribe/' + id, + method: 'POST' + }) +} + +// 我的关注店铺列表 +const shopSubscribeList = (page) => { + return request({ + url: 'mall/shops/subscribe', + method:'get', + data:{ + page:page + } + }) +} + +// 关于我们 +const aboutUs = () => { + return request({ + url: 'articles/about' + }) +} + +// 获取用户信息 +const getUserInfo = () => { + return request({ + url: 'user/app' + }) +} + +// 获取用户设置中心的信息 +const getUserSettingInfo = () => { + return request({ + url: 'user/setting' + }) +} + +// 账号余额等信息 +const chaineb = (data) => { + return request({ + url: 'user/account/chaineb', + method:'get', + data:data + }) +} + +// 我的足迹 +const browsers = (page) => { + return request({ + url: 'mall/goods/browsers', + method: 'get', + data: { + page:page, + page_size:20 + } + }) +} + +// 修改用户头像或昵称 +const resetUserInfo= (data) => { + return request({ + url: 'user/'+data.key, + method: 'PUT', + data:{ + value:data.value + } + }) +} + +// 我的推广码 +const appcode = () => { + return request({ + url: 'user/appcode' + }) +} + +export { + shopSubscribe, + shopSubscribeList, + aboutUs, + getUserInfo, + getUserSettingInfo, + chaineb, + browsers, + resetUserInfo, + appcode +} diff --git a/apis/interfaces/numberWeight.js b/apis/interfaces/numberWeight.js index da795d3..f2878b9 100644 --- a/apis/interfaces/numberWeight.js +++ b/apis/interfaces/numberWeight.js @@ -13,6 +13,7 @@ const mallWarrants = (data) => { data: data }) } + // 我的数权Id获取数权详情 const mallWarrantsList = (symbol) => { return request({ @@ -23,6 +24,7 @@ const mallWarrantsList = (symbol) => { } }) } + // 确认提货 const mallWarrantsSure = (data) => { return request({ @@ -31,6 +33,7 @@ const mallWarrantsSure = (data) => { data: data }) } + // 我的邮寄订单,我的提货单 const mallShipmentsPostShop = (apiUrl,data) => { return request({ @@ -39,6 +42,7 @@ const mallShipmentsPostShop = (apiUrl,data) => { data: data }) } + // 根据提货单的no 获取提货单的详情 const mallShipmentsInfo = (no) => { return request({ @@ -46,6 +50,7 @@ const mallShipmentsInfo = (no) => { method: 'GET' }) } + // 取消提货单 const mallShipmentsCancel = (shipmentNo) => { return request({ @@ -103,6 +108,7 @@ const mallRefundsInfo = (no) => { method: 'GET' }) } + // 确认退货mall/refunds/{refund}/deliver const mallRefundsDeliver = (data) => { return request({ diff --git a/apis/interfaces/scan.js b/apis/interfaces/scan.js new file mode 100644 index 0000000..65467ed --- /dev/null +++ b/apis/interfaces/scan.js @@ -0,0 +1,22 @@ +/** + * Web-zdx + * moduleName:核销相关操作 + */ + +import request from '../request.js' + + +// 扫码前置条件 +const scanInfo = (apiUrl,data,method) => { + return request({ + url: apiUrl, + method:method, + data:data + }) +} + + + +export { + scanInfo +} diff --git a/components/coupon-template/coupon-template-1.vue b/components/coupon-template/coupon-template-1.vue index b08367f..ff0355e 100644 --- a/components/coupon-template/coupon-template-1.vue +++ b/components/coupon-template/coupon-template-1.vue @@ -21,20 +21,18 @@ {{item.price_text}} 剩余{{item.time.expire}}天 - - 去使用 - + 去使用 - + 查看全部{{item.coupon_count}}张优惠券 - + - + @@ -54,11 +52,26 @@ return { }; + }, + methods:{ + couponDetailGo(id) { + // this.$router.push({name: 'CouponDetail', query: {id: id}}) + uni.navigateTo({ + url:'/pages/property/coupon/detail?id='+id + }) + }, + couponMoreListGo(id) { + // this.$router.push({name:'CouponMoreList', query:{id: id}}) + uni.navigateTo({ + url: '/pages/property/coupon/couponMore?id='+id + }) + } } } diff --git a/pages/equity/index.vue b/pages/equity/index.vue index 0fd4374..e50f716 100644 --- a/pages/equity/index.vue +++ b/pages/equity/index.vue @@ -142,7 +142,7 @@ 限时抢购海量商家优惠券 - 查看更多 + 查看更多 diff --git a/pages/goods/add.vue b/pages/goods/add.vue index c9d0605..441f033 100644 --- a/pages/goods/add.vue +++ b/pages/goods/add.vue @@ -23,7 +23,7 @@ - + @@ -32,7 +32,7 @@ - + 商品详情(点击预览,长按删除) @@ -72,98 +72,217 @@ - - - - + + + + + + + + + - - + + - - logistic_type 1.快递,2.自提 - + + + {{logisticArr[logisticType].text}} + + + - + - - stores 自提必填 + + 已关联{{stores.length}}家店铺 + + + - - 321321 + + 已选{{services.length}}项服务 - + - - 321321 - + + + {{expiriedAt || '选择服务到期时间'}} + + + + + + + 选择商品服务 + + + + {{item.name}} + {{item.content}} + + + + + + + + + + + + 选择店铺 + + + + {{item.name}} + {{item.address}} + + + + + + + - + + + diff --git a/pages/goods/management.vue b/pages/goods/management.vue index ef7846b..df68e74 100644 --- a/pages/goods/management.vue +++ b/pages/goods/management.vue @@ -2,10 +2,10 @@ - 已上架 - 已下架 - 审核中 - 已驳回 + 已发布 + 待认证 + 审核中 + 已驳回 @@ -14,16 +14,19 @@ diff --git a/pages/market/details.vue b/pages/market/details.vue new file mode 100644 index 0000000..ffce9b1 --- /dev/null +++ b/pages/market/details.vue @@ -0,0 +1,338 @@ + + + + + diff --git a/pages/market/goods.vue b/pages/market/goods.vue new file mode 100644 index 0000000..0828e1f --- /dev/null +++ b/pages/market/goods.vue @@ -0,0 +1,116 @@ + + + + + diff --git a/pages/market/index.vue b/pages/market/index.vue index d0cc3aa..06fad93 100644 --- a/pages/market/index.vue +++ b/pages/market/index.vue @@ -6,40 +6,57 @@ 价格 - - + + - 易品新境权证*1 - 谷风一木3层软抽面巾纸 - 转让方:温文尔雅的小阿玉 - Hash:djsakljkljfl3213dsaHKLDJS82231csa + 数字权证{{item.surplus}}/{{item.stock}} + 锚定商品:{{item.goods.goods_name}} + 提供企业:{{item.company.name}} + 转让用户:{{item.user.nickname}} - ¥21000.00/个 + ¥{{item.price}}/个 - diff --git a/pages/order/couponMore.vue b/pages/order/couponMore.vue new file mode 100644 index 0000000..d9418ed --- /dev/null +++ b/pages/order/couponMore.vue @@ -0,0 +1,253 @@ + + + + + diff --git a/pages/property/collection/collection.vue b/pages/property/collection/collection.vue new file mode 100644 index 0000000..9bd420b --- /dev/null +++ b/pages/property/collection/collection.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/pages/property/coupon/canUseList.vue b/pages/property/coupon/canUseList.vue new file mode 100644 index 0000000..ca09ed7 --- /dev/null +++ b/pages/property/coupon/canUseList.vue @@ -0,0 +1,217 @@ + + + + + diff --git a/pages/property/coupon/couponMore.vue b/pages/property/coupon/couponMore.vue index 286ebe2..41ce3f1 100644 --- a/pages/property/coupon/couponMore.vue +++ b/pages/property/coupon/couponMore.vue @@ -2,7 +2,7 @@ - + @@ -34,7 +34,7 @@ }, onLoad(e) { console.log(e) - this.id = this.$route.query.id + this.id = e.id this.getMyCoupon() }, onShow() { @@ -56,6 +56,7 @@ } else { this.$refs.uToast.show({ title: '吼吼吼~我是有底的~', + type: 'primary', duration: 3000 }) } @@ -80,9 +81,9 @@ }).catch(err => { this.$refs.uToast.show({ title: err.message, + type: 'primary', duration: 3000 }) - }) }, // 选择顶部菜单 @@ -124,7 +125,6 @@ min-height: 100vh; box-sizing: border-box; background-color: #F7F7F7; - padding-bottom: 20rpx; .coupon-nav { display: flex; diff --git a/pages/property/coupon/detail.vue b/pages/property/coupon/detail.vue index 946afd8..a30761f 100644 --- a/pages/property/coupon/detail.vue +++ b/pages/property/coupon/detail.vue @@ -12,9 +12,9 @@ 可用商品 (多选一) - + - {{item.name}} + {{item.name}} ¥{{item.price}} 立即购买 @@ -38,7 +38,7 @@ - 商品兑换码 + 优惠券兑换码 @@ -67,10 +67,17 @@ GoodTemplate }, onLoad(e) { - console.log(this.$route) - this.coupon_grant_id = this.$route.query.id + this.coupon_grant_id = e.id this.getList() }, + // 监听弹窗页面为false时候,重新请求当前页面 + watch: { + showCode(newVal, oldVal) { + if(!newVal && oldVal){ + uni.setStorageSync('refresh',true) + } + } + }, methods: { // 获取列表 getList() { @@ -87,16 +94,14 @@ }, // 点击立即购买去商品确认页面 nowBuy(items) { - console.log(items, 'items....') - let data = { - skuId: items.goods_sku_id, - qty: 1 - } - this.$router.push({ - name: 'Buy', - params: data + uni.navigateTo({ + url:'/pages/order/buy?qty=1&skuId='+items.goods_sku_id, + }) + }, + goDetail(id){ + uni.navigateTo({ + url:'/pages/goods/details?id='+id }) - console.log(data) }, // 点击二维码特效 clickCode(grantid) { @@ -152,7 +157,7 @@ // 优惠券 .coupon { - margin: 0 $margin * 2; + margin: 0 $margin; background-color: #Fff; position: relative; z-index: 1; @@ -182,7 +187,7 @@ // 可用商品 .goods-item { background-color: #fff; - margin: $margin*1.5 $margin * 2; + margin: $margin*1.5 $margin; border-radius: 20rpx; display: flex; flex-direction: row; @@ -237,18 +242,18 @@ font-size: 34rpx; font-weight: bold; text-align: left; - margin: $margin*2; + margin: $margin $margin; // text-shadow:10rpx 10rpx linear-gradient(to right, #f39e17, #f85b05); text-shadow: 2rpx 2rpx 10rpx $main-color; } // 描述 .describe { - margin: $margin * 2 0; + margin: $margin 0; .describe-des { color: #999; - padding: 10rpx $margin * 2; + padding: 10rpx $margin ; font-size: 28rpx; } } diff --git a/pages/property/eb.vue b/pages/property/eb.vue index e3e12e6..57d7706 100644 --- a/pages/property/eb.vue +++ b/pages/property/eb.vue @@ -1,22 +1,327 @@ - diff --git a/pages/property/historyShop/historyShop.vue b/pages/property/historyShop/historyShop.vue new file mode 100644 index 0000000..fb7760a --- /dev/null +++ b/pages/property/historyShop/historyShop.vue @@ -0,0 +1,139 @@ + + + + + diff --git a/pages/property/index.vue b/pages/property/index.vue index 74958f5..a11e96c 100644 --- a/pages/property/index.vue +++ b/pages/property/index.vue @@ -1,17 +1,17 @@