| mini-program/App.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/address/address.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/confirm-order/confirm-order.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/details/details.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/index/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/my-collection/my-collection.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/search/search.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/pages/zhuanqu/zhuanqu.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/unpackage/dist/dev/mp-weixin/common/main.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| mini-program/utils/http.api.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
mini-program/App.vue
@@ -104,11 +104,12 @@ const qqmapsdk = new QQMapWX({ key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND' }); console.log(locParam) qqmapsdk.reverseGeocoder({ locParam, success: function(res) { console.log(res, '==================è·åå°å'); that.$store.commit('setPosition', res) that.$store.commit('setPosition', res.result) that.$isResolve() }, fail: (err) => { mini-program/pages.json
@@ -185,6 +185,12 @@ "style": { "navigationBarTitleText": "éå®" } }, { "path": "pages/zhuanqu/zhuanqu", "style": { "navigationBarTitleText": "ä¸åº" } } ], "subPackages": [ mini-program/pages/address/address.vue
@@ -1,6 +1,6 @@ <template> <view class="list"> <view class="list-item" v-for="(item, index) in list" :key="index"> <view class="list-item" v-for="(item, index) in list" :key="index" @click="selectRow(item)"> <view class="list-item-left"> <view class="list-item-a"> <text>{{item.name}}</text> @@ -9,7 +9,7 @@ </view> <view class="list-item-b">{{item.areaDetail}}{{item.addr}}</view> </view> <image src="/static/icon/address_ic_edit@2x.png" mode="widthFix" @click="edit(item)"></image> <image src="/static/icon/address_ic_edit@2x.png" mode="widthFix" @click.stop="edit(item)"></image> </view> <view class="button" @click="add"> <image src="/static/images/icon_add_dz@2x.png" mode="widthFix"></image> @@ -22,13 +22,25 @@ export default { data() { return { list: [] list: [], type: null }; }, onShow() { this.getAddr() }, onLoad(option) { if (option.type) { this.type = option.type } }, methods: { selectRow(item) { if (this.type == 1) { uni.$emit('update', item) uni.navigateBack({ delta: 1 }); } }, getAddr() { this.$u.api.findListAddr() .then(res => { mini-program/pages/confirm-order/confirm-order.vue
@@ -1,71 +1,79 @@ <template> <view class="box"> <view class="box" v-if="orderInfo"> <view class="box-addr"> <view class="box-addr-list"> <view class="box-addr-list-row active"> <view @click="changeOrderType(0)" :class="receiveType === 0 ? 'box-addr-list-row active' : 'box-addr-list-row'"> <image src="/static/icon/ic_wuliu_sel@2x.png" mode="widthFix"></image> <text>ç©æµé é</text> </view> <view class="box-addr-list-row"> <view @click="changeOrderType(1)" :class="receiveType === 1 ? 'box-addr-list-row active' : 'box-addr-list-row'"> <image src="/static/icon/ic_daodian@2x.png" mode="widthFix"></image> <text>é¨åºèªæ</text> </view> </view> <!-- ç©æµé é --> <!-- <view class="box-addr-val"> <view class="box-addr-val" v-if="receiveType === 0"> <image class="icon1" src="/static/icon/ic_location@2x.png" mode="widthFix"></image> <view class="info"> <view class="info-top"> <text>æéå¹³</text> <text>181777889338</text> </view> <view class="info-bottom"> å®å¾½çåè¥å¸ç»å¼åºæ¾è°·è·¯å¤å°å½é B座808 è±ç±³ç§ææéå ¬å¸ <view class="info" @click="jumpAddr"> <template v-if="addr"> <view class="info-top"> <text>{{addr.name}}</text> <text>{{addr.phone}}</text> </view> <view class="info-bottom"> {{addr.areaDetail}}{{addr.addr}} </view> </template> <view class="info-wu" v-else> <text>éæ©å°å</text> <image class="icon2" src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> </view> <image class="icon2" src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> --> <image class="icon2" src="/static/icon/ic_ar2@2x.png" mode="widthFix" v-if="addr"></image> </view> <!-- é¨åºèªæ --> <view class="box-addr-val"> <image class="icon1" src="/static/icon/ic_address@2x1.png" mode="widthFix"></image> <view class="info"> <view class="info-top"> <text>XXXç»éå</text> <template v-if="receiveType === 1"> <view class="box-addr-val"> <image class="icon1" src="/static/icon/ic_address@2x1.png" mode="widthFix"></image> <view class="info"> <view class="info-top"> <text>XXXç»éå</text> </view> <view class="info-bottom"> å®å¾½çåè¥å¸ç»å¼åºæ¾è°·è·¯å¤å°å½é B座808室 </view> </view> <view class="info-bottom"> å®å¾½çåè¥å¸ç»å¼åºæ¾è°·è·¯å¤å°å½é B座808室 <image class="icon2" src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> <view class="box-addr-time"> <text>è¥ä¸æ¶é´ï¼</text> <text>å¨ä¸è³å¨äº 09:00-19:00</text> </view> <view class="box-addr-dz"> <view class="box-addr-dz-left"> <text>èç³»çµè¯ï¼</text> <text>0551-87899903</text> </view> <view class="box-addr-dz-r"> <image src="/static/icon/ic_address@2x.png" mode="widthFix"></image> <text>1.3km</text> </view> </view> <image class="icon2" src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> <view class="box-addr-time"> <text>è¥ä¸æ¶é´ï¼</text> <text>å¨ä¸è³å¨äº 09:00-19:00</text> </view> <view class="box-addr-dz"> <view class="box-addr-dz-left"> <text>èç³»çµè¯ï¼</text> <text>0551-87899903</text> </view> <view class="box-addr-dz-r"> <image src="/static/icon/ic_address@2x.png" mode="widthFix"></image> <text>1.3km</text> </view> </view> </template> </view> <view class="box-shop"> <view class="item"> <view class="item" v-for="(item, index) in orderInfo.goodsCalculateList" :key="index"> <view class="item-image"> <image src="/static/logo.png" mode="widthFix"></image> <image :src="item.skuImg" mode="widthFix"></image> </view> <view class="item-info"> <view class="item-info-title">ä¸èè¾ç¦¾å®½é½¿ éç¨é·æ²/ä¸è/ä¹ ä¿ç°</view> <view class="item-info-title">{{item.name}}</view> <view class="item-info-bottom"> <view class="price">Â¥499.00</view> <view class="price">Â¥{{item.skuAmount}}</view> <view class="num"> <view class="num-add">-</view> <view class="num-total">0</view> <view class="num-add">+</view> <!-- <view class="num-add">-</view> --> <view class="num-total">æ°éï¼{{item.goodsNum}}</view> <!-- <view class="num-add">+</view> --> </view> </view> </view> @@ -75,104 +83,95 @@ <view class="info-item"> <view class="info-item-label">å忻价</view> <view class="info-item-price"> <text>897</text> <text>.00</text> <text>{{orderInfo.amount}}</text> </view> </view> <view class="info-item"> <view class="info-item-label">è¿è´¹</view> <view class="info-item-price1">Â¥10.00</view> <view class="info-item-price1">Â¥{{orderInfo.mailAmount}}</view> </view> <view class="info-item"> <view class="info-item-label">伿 å¸</view> <view class="info-item-price1"> -Â¥100.00 <view class="info-item-price1" @click="show = true"> -Â¥{{orderInfo.couponAmount}} <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> </view> <view class="info-item"> <view class="info-item-label">ç§¯åæµæ£</view> <view class="info-item-price1"> -Â¥10.00 <view class="info-item-price1" @click="show1 = true"> -Â¥{{orderInfo.integralAmount}} <image src="/static/icon/ic_ar2@2x.png" mode="widthFix"></image> </view> </view> <view class="info-item"> <view class="info-item-label" style="color: #222222; font-size: 30rpx; font-weight: 600;">åºä»æ¬¾</view> <view class="info-item-price2"> <text>797</text> <text>.00</text> <text>{{orderInfo.payAmount}}</text> </view> </view> </view> </view> <view class="remark"> <view class="remark-label">订å夿³¨</view> <input type="text" placeholder="请è¾å ¥å¤æ³¨" /> <input type="text" v-model="remark" placeholder="请è¾å ¥å¤æ³¨" /> </view> <view class="play"> <view class="play-info"> <image src="/static/icon/order_ic_wepay@2x.png" mode="widthFix"></image> <text>微信æ¯ä»</text> </view> <image src="/static/icon/ic_agree@2x.png" mode=""></image> <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix"></image> </view> <view class="footer"> <view class="edit"> <view class="edit-btn">ç«å³æ¯ä» Â¥799.00</view> <view class="edit-btn" @click="payment">ç«å³æ¯ä» Â¥{{orderInfo.payAmount}}</view> </view> <view style="width: 100%; height: env(safe-area-inset-bottom);"></view> </view> <!-- 伿 å¸ --> <u-popup :show="show" round="15" :closeable="true" mode="bottom"> <u-popup :show="show" round="15" :closeable="true" @close="show = false" mode="bottom"> <view class="coupon"> <view class="coupon-title">鿩伿 å¸</view> <view class="coupon-list"> <view class="coupon-list-item"> <view class="jiage"> <text>100</text> <text>满300å¯ç¨</text> <scroll-view scroll-y class="coupon-list"> <view class="coupon-list-item" v-for="(item, index) in orderInfo.memberCouponList" :key="index" @click="selectCoupon(index)"> <view class="jiage" v-if="item.couponType === 0"> <text>{{item.price}}</text> <text>满{{item.limitPrice}}å¯ç¨</text> </view> <view class="jiage1" v-if="item.couponType === 1"> <text>{{item.price}}</text> <text>满{{item.limitPrice}}å¯ç¨</text> </view> <view class="juaninfo"> <view class="juaninfo-info"> <text>æ°å®¢ä¸äº«</text> <text>2020.5.25 æ¥å°æ</text> <text>{{item.name}}</text> <text>{{item.endDate.substring(0, 10)}} æ¥å°æ</text> </view> <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!item.active"></image> <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image> </view> </view> <view class="coupon-list-item disable"> <view class="jiage"> <text>100</text> <text>满300å¯ç¨</text> </view> <view class="juaninfo"> <view class="juaninfo-info"> <text>æ°å®¢ä¸äº«</text> <text>2020.5.25 æ¥å°æ</text> </view> <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> </view> </view> </view> <view class="coupon-btn">ç¡®å®</view> </scroll-view> <view class="coupon-btn" @click="confirmCoupon">ç¡®å®</view> </view> </u-popup> <!-- 积å --> <u-popup :show="show1" round="15" :closeable="true" mode="bottom"> <u-popup :show="show1" round="15" @close="show1 = false" :closeable="true" mode="bottom"> <view class="coupon"> <view class="coupon-title">使ç¨ç§¯å</view> <view class="coupon-content"> <view class="coupon-content-a"> <text>å½å积åï¼</text> <text>1200</text> <text>{{orderInfo.surplusIntegral || 0}}</text> </view> <view class="coupon-content-b"> <text>æ¬åå¯ç¨ç§¯åï¼1000</text> <image src="/static/icon/ic_agree_sel@2x.png" mode="widthFix"></image> <view class="coupon-content-b" @click="useIntegralCopy = useIntegralCopy === 1 ? 0 : 1"> <text>æ¬åå¯ç¨ç§¯åï¼{{orderInfo.deductIntegral}}</text> <image src="/static/icon/ic_agree_sel@2x.png" mode="widthFix" v-if="useIntegralCopy === 1"></image> <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-else></image> </view> </view> <view class="coupon-btn">ç¡®å®</view> <view class="coupon-btn" @click="confirmJF">ç¡®å®</view> </view> </u-popup> <!-- é¨åº --> @@ -226,15 +225,154 @@ </template> <script> import { mapState } from 'vuex' export default { computed: { ...mapState(['position']) }, data() { return { show: false, show1: false, show2: false, show3: true, keyword: '' show3: false, keyword: '', orderInfo: null, addr: null, remark: '', useIntegralCopy: 0, useIntegral: 0, receiveType: 0, couponId: null, payDetailRequestList: [] }; }, onLoad(option) { const shop = uni.getStorageSync('shop'); if (shop) { this.payDetailRequestList = shop uni.removeStorageSync('shop'); } uni.$on('update', (data) => { this.addr = data this.getOrderInfo() }) this.getDefaultAddr() }, methods: { // è·åéè¿é¨åº getShopLists() { this.$u.api.getShopList({ cityName: this.position.ad_info.city, lat: this.position.location.lat, lgt: this.position.location.lng }).then(res => { if (res.code === 200) { console.log(res) } }) }, // æ¯ä» payment() { this.$u.api.orderPay({ addressId: this.addr.id, couponId: this.couponId, payDetailRequestList: this.payDetailRequestList, receiveType: this.receiveType, useIntegral: this.useIntegral, remark: this.remark, titlePrice: this.orderInfo.payAmount }).then(res => { if (res.code === 200) { // ç§¯åæµæ£ if (res.data.payType === 1) { uni.reLaunch({ url: `/pagesA/pages/order-details/order-details?id=${res.data.orderId}&userType=0` }) } else { wx.requestPayment({ timeStamp: res.data.response.timeStamp, nonceStr: res.data.response.nonceStr, package: res.data.response.packageValue, signType: res.data.response.signType, paySign: res.data.response.paySign, success (pay) { if (pay.errMsg === "requestPayment:ok") { uni.reLaunch({ url: `/pagesA/pages/order-details/order-details?id=${res.data.orderId}&userType=0` }) } else { uni.showToast({ title: '订ååæ¶æ¯ä»', icon: 'none' }) } } }) } } }) }, // ç¡®å®ä½¿ç¨ç§¯å confirmJF() { this.useIntegral = this.useIntegralCopy this.show1 = false this.getOrderInfo() }, // ç¡®å®éæ©ä¼æ å¸ confirmCoupon() { let arr = this.orderInfo.memberCouponList.filter(item => item.active) if (arr.length > 0) { this.couponId = arr[0].id } this.show = false this.getOrderInfo() }, // 鿩伿 å¸ selectCoupon(i) { this.orderInfo.memberCouponList.forEach((item, index) => { item.active = index === i }) }, // è·å订å详ç»ä¿¡æ¯ getOrderInfo() { this.$u.api.orderPayConfirm({ addressId: this.addr ? this.addr.id : null, couponId: this.couponId, payDetailRequestList: this.payDetailRequestList, receiveType: this.receiveType, useIntegral: this.useIntegral }).then(res => { if (res.code === 200) { if (!res.data.memberCouponList) { res.data.memberCouponList = [] } else { res.data.memberCouponList.forEach(item => { item.active = false }) } this.orderInfo = res.data } }) }, changeOrderType(type) { this.receiveType = type if (this.receiveType === 1) { this.getShopLists() } this.getOrderInfo() }, jumpAddr() { uni.navigateTo({ url: '/pages/address/address?type=1' }) }, getDefaultAddr() { this.$u.api.findDefault() .then(res => { if (res.code === 200) { this.addr = res.data this.getOrderInfo() } }) } } } </script> @@ -434,6 +572,7 @@ } .coupon-list { width: 100%; max-height: 600rpx; display: flex; flex-direction: column; .disable { @@ -481,6 +620,35 @@ color: #E4001D; &::before { content: 'ï¿¥'; font-weight: 600; font-size: 24rpx; color: #E4001D; } } &:nth-child(2) { font-weight: 400; font-size: 24rpx; color: #E93047; margin-top: 8rpx; } } } .jiage1 { flex-shrink: 0; width: 208rpx; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1rpx dashed #E3C1C1; text { &:nth-child(1) { font-weight: 600; font-size: 44rpx; color: #E4001D; &::after { content: 'æ'; font-weight: 600; font-size: 24rpx; color: #E4001D; @@ -868,6 +1036,7 @@ } .info { flex: 1; min-height: 48rpx; display: flex; flex-direction: column; .info-top { @@ -893,6 +1062,23 @@ color: #333333; margin-top: 14rpx; } .info-wu { flex: 1; height: 100%; display: flex; align-items: center; justify-content: space-between; text { font-weight: 400; font-size: 26rpx; color: #333333; } image { width: 12rpx; height: 24rpx; margin: 0 !important; } } } .icon2 { flex-shrink: 0; mini-program/pages/details/details.vue
@@ -27,9 +27,10 @@ <view class="footer"> <view class="edit"> <view class="edit-left"> <view class="edit-left-row" @click="toIndex"> <image src="/static/icon/detail_ic_home@2x.png" mode="widthFix"></image> <text>é¦é¡µ</text> <view class="edit-left-row" @click="shoucang"> <image src="/static/icon/ic_collect_sel@2x.png" mode="widthFix" v-if="info.collectStatus === 1"></image> <image src="/static/icon/ic_collect@2x.png" mode="widthFix" v-else></image> <text>{{info.collectStatus === 1 ? 'å·²æ¶è' : 'æ¶è'}}</text> </view> <view class="edit-left-row"> <button open-type="contact">客æ</button> @@ -71,9 +72,33 @@ this.cardNum() }, methods: { shoucang() { if (this.info.collectStatus === 1) { this.$u.api.cancelbatch({ ids: this.info.id }) .then(res => { if (res.code === 200) { this.info.collectStatus = 0 } }) } else { this.$u.api.saveCollect({ objId: this.info.id, type: 1 }) .then(res => { if (res.code === 200) { this.info.collectStatus = 1 } }) } }, submit() { let shop = [ { goodsNum: 1, goodsSkuId: this.info.goodsSkuResponseList[0].id } ] uni.setStorageSync('shop', shop) uni.navigateTo({ url: '/pages/confirm-order/confirm-order?id=' + this.id url: '/pages/confirm-order/confirm-order' }) }, addCard(e) { @@ -91,11 +116,6 @@ toCard() { uni.navigateTo({ url: '/pages/shopping-cart/shopping-cart' }) }, toIndex() { uni.switchTab({ url: '/pages/index/index' }) }, cardNum() { mini-program/pages/index/index.vue
@@ -6,7 +6,7 @@ <view :style="{ width: '100%', height: statusbarHeight + 'px' }"></view> <view class="head-bar-nav" :style="{ height: navHeight + 'px' }" @click="openLoacing"> <image src="/static/icon/home_ic_location@2x.png" mode="widthFix"></image> <text>è²è±ç§æåæ°äº§ä¸åF座</text> <text>{{position.formatted_addresses.recommend}}</text> <u-icon name="arrow-right" color="#222222" size="13"></u-icon> </view> </view> @@ -20,7 +20,7 @@ <u-scroll-list indicatorActiveColor="#004096"> <view class="scroll-list"> <view class="scroll-list__line" v-for="(item, index) in labels" :key="index"> <view class="cate-item" v-for="(child, index) in item" :key="index"> <view class="cate-item" v-for="(child, index) in item" :key="index" @click="jumpSearch(child, 1)"> <view class="cate-item-image"> <image :src="child.imgUrl" mode="widthFix"></image> </view> @@ -35,7 +35,7 @@ <u-scroll-list indicatorActiveColor="#004096"> <view class="scroll-list" style="padding: 0;"> <view class="scroll-list__line" v-for="(item, index) in brand" :key="index"> <view class="cate-item1" v-for="(child, index) in item" :key="index"> <view class="cate-item1" v-for="(child, index) in item" :key="index" @click="jumpSearch(child, 2)"> <image :src="child.imgUrl" mode="widthFix"></image> <text>{{child.name}}</text> </view> @@ -44,7 +44,7 @@ </u-scroll-list> <view class="title"> <view class="title-left">åè´¨ä¸åº</view> <view class="title-right"> <view class="title-right" @click="toZhuanqu"> <text>æ´å¤</text> <u-icon name="arrow-right" color="#AAAAAA" size="10"></u-icon> </view> @@ -143,6 +143,11 @@ this.getGoodsList() }, methods: { toZhuanqu() { uni.navigateTo({ url: '/pages/zhuanqu/zhuanqu' }) }, addCard(e) { this.$u.api.addCart({ goodsId: e.id, @@ -260,10 +265,19 @@ highAccuracyExpireTime: 3000, isHighAccuracy: true, success: function(addr) { } }); }, openLoacing() { var that = this; uni.chooseLocation({ success(res1) { const locParam = { latitude: addr.latitude, longitude: addr.longitude latitude: res1.latitude, longitude: res1.longitude }; console.log(locParam) const qqmapsdk = new QQMapWX({ key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND' }); @@ -271,26 +285,32 @@ qqmapsdk.reverseGeocoder({ locParam, success: function(res) { console.log(res, '==================è·åå°å'); console.log(res, '==================indexè·åå°å') that.$store.commit('setPosition', res.result) }, fail: (err) => { console.error('è·åä½ç½®å¤±è´¥===========', err); } }); } }); }) }, openLoacing() { uni.chooseLocation({ success(res) { console.log(res) jumpSearch(row, type) { if (row) { if (type === 1) { uni.navigateTo({ url: '/pages/search/search?categoryId=' + row.id }) } else { uni.navigateTo({ url: '/pages/search/search?applicableBrandId=' + row.id }) } }) }, jumpSearch() { uni.navigateTo({ url: '/pages/search/search' }) } else { uni.navigateTo({ url: '/pages/search/search' }) } } } } @@ -380,10 +400,14 @@ } text { max-width: 400rpx; font-weight: 500; font-size: 32rpx; color: #111111; margin-right: 8rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } } } mini-program/pages/my-collection/my-collection.vue
@@ -5,7 +5,7 @@ <text>{{item.name}}</text> <view class="cate-item-x" v-if="type === item.id"></view> </view> <view class="cate-item" style="flex: 0.7; justify-content: flex-end; padding-right: 30rpx; box-sizing: border-box;" @click="edit = !edit"> <view class="cate-item" style="flex: 0.7; justify-content: flex-end; padding-right: 30rpx; box-sizing: border-box;" @click="guanli"> <image src="/static/icon/ic_guanli@2x.png" mode="widthFix" v-show="!edit"></image> <image src="/static/icon/ic_guanli_sel@2x.png" mode="widthFix" v-show="edit"></image> <text class="wz" :style="{ color: edit ? '#004096' : '' }">管ç</text> @@ -13,8 +13,9 @@ </view> <view class="list1" v-if="type === '1'"> <view class="list-item" v-for="(item, index) in list" :key="index"> <view class="left" v-if="edit"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> <view class="left" v-if="edit" @click="select(index)"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!item.active"></image> <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image> </view> <view class="right"> <view class="list-item-image"> @@ -33,12 +34,13 @@ <view class="list" v-else> <view class="list-item" v-for="(item, index) in list" :key="index"> <view class="info"> <view class="check" v-if="edit"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> <view class="check" v-if="edit" @click="select(index)"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!item.active"></image> <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image> </view> <view class="info-right"> <view class="info-title">{{item.name}}</view> <view class="info-desc">{{item.remark}}</view> <view class="info-desc">{{item.content}}</view> <view class="info-data"> <view class="tips">{{item.labelName}}</view> <text>{{item.readNum}} é 读ï½{{item.createDate}}</text> @@ -54,22 +56,47 @@ <view style="width: 100%; height: calc(100rpx + env(safe-area-inset-bottom));"></view> <view class="footer"> <view class="caozuo"> <view class="caozuo-left"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix"></image> <view class="caozuo-left" @click="quanxuan"> <image src="/static/icon/ic_agree@2x.png" mode="widthFix" v-if="!selectAll"></image> <image src="/static/icon/cart_ic_sel@2x.png" mode="widthFix" v-else></image> <text>å ¨é</text> </view> <view class="caozuo-btn">å é¤(0)</view> <view class="caozuo-btn" @click="shanchu">å é¤({{totalNum}})</view> </view> <view style="width: 100%; height: env(safe-area-inset-bottom);"></view> </view> </template> <u-modal :show="show" :showCancelButton="true" @confirm="dele" @cancel="show = false"> 确认å é¤åï¼ </u-modal> </view> </template> <script> export default { computed: { totalNum() { let total = 0 this.list.forEach((item) => { if (item.active) { total++ } }) return total; }, selectAll() { let isSelectAll = true this.list.forEach((item) => { if (!item.active) { isSelectAll = false } }) return isSelectAll; } }, data() { return { show: false, edit: false, type: '1', page: 1, @@ -89,8 +116,48 @@ this.getList() }, methods: { shanchu() { if (this.totalNum > 0) { this.show = true } else { uni.showToast({ title: 'è³å°éæ©ä¸é¡¹å 容', icon: 'none' }) } }, dele() { this.$u.api.cancelbatch({ ids: this.list.filter(item => item.active).map(item => item.id).join(',') }).then(res => { if (res.code === 200) { this.show = false this.edit = false this.page = 1 this.list = [] this.next = true this.getList() this.getNum() } }) }, quanxuan() { this.list.forEach(item => { item.active = true }) }, guanli() { this.edit = !this.edit this.list.forEach(item => { item.active = false }) }, select(index) { this.list[index].active = !this.list[index].active }, changeRow(id) { this.type = id this.edit = false this.page = 1 this.list = [] this.next = true @@ -115,8 +182,10 @@ } }).then(res => { if (res.code === 200) { console.log(res) this.page++ res.data.records.forEach(item => { item.active = false }) this.list.push(...res.data.records) if (res.data.total === this.list.length) { this.next = false @@ -378,6 +447,7 @@ font-size: 24rpx; color: #999999; margin-left: 10rpx; text-decoration: line-through; } } } mini-program/pages/search/search.vue
@@ -7,7 +7,7 @@ <view class="history" v-if="historyList && historyList.length > 0"> <view class="history-title">åå²æç´¢</view> <view class="history-list"> <view class="history-list-item" v-for="(item, index) in historyList" :key="index">{{item.content}}</view> <view class="history-list-item" v-for="(item, index) in historyList" :key="index" @click="seleContent(item.content)">{{item.content}}</view> </view> </view> <template v-if="isSearch"> @@ -54,23 +54,38 @@ page: 1, next: true, isSearch: false, historyList: [] historyList: [], categoryId: null, applicableBrandId: null }; }, onLoad() { onLoad(option) { if (option.categoryId) { this.categoryId = option.categoryId this.isSearch = true this.getGoodsList() } if (option.applicableBrandId) { this.applicableBrandId = option.applicableBrandId this.isSearch = true this.getGoodsList() } this.gethistary() }, onReachBottom() { this.getGoodsList() }, methods: { seleContent(val) { this.goodsName = val this.search() }, gethistary() { if (!this.userInfo) return this.$u.api.searchHistoryList({ memberId: this.userInfo.id }).then(res => { if (res.code === 200) { console.log(res) this.historyList = res.data } }) @@ -92,10 +107,14 @@ model: { type: 0, sortInfo: 3, goodsName: this.goodsName goodsName: this.goodsName, memberId: this.userInfo.id, categoryId: this.categoryId, applicableBrandId: this.applicableBrandId } }).then(res => { if (res.code === 200) { this.gethistary() res.data.records.forEach(item => { item.minPrice = item.minPrice.toFixed(2).split('.') }) @@ -111,6 +130,11 @@ } </script> <style> page { background-color: #F9F9FB; } </style> <style lang="scss" scoped> .box { width: 100%; @@ -152,7 +176,7 @@ margin-right: 24rpx; margin-bottom: 24rpx; &:last-child { margin: 0 !important; margin-right: 0 !important; } } } mini-program/pages/zhuanqu/zhuanqu.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,21 @@ <template> <view class="box"> </view> </template> <script> export default { data() { return { }; } } </script> <style lang="scss" scoped> .box { width: 100%; } </style> mini-program/unpackage/dist/dev/mp-weixin/common/main.js
@@ -298,11 +298,12 @@ var qqmapsdk = new QQMapWX({ key: 'HEIBZ-QJLLM-SZ36X-6ZBHI-S6Y2J-S6FND' }); console.log(locParam); qqmapsdk.reverseGeocoder({ locParam: locParam, success: function success(res) { console.log(res, '==================è·åå°å'); that.$store.commit('setPosition', res); that.$store.commit('setPosition', res.result); that.$isResolve(); }, fail: function fail(err) { mini-program/utils/http.api.js
@@ -6,6 +6,12 @@ return config; }) let getShopList = (data = {}) => vm.$u.http.post('web/shop/getShopList', data); // ç¨æ·ä¸åæ¥è¯¢å¯éæ©çèªæç»éå let replayPay = (params = {}) => vm.$u.http.get('web/orders/replayPay', {params}); // 订åéæ°æ¯ä» let orderPay = (data = {}) => vm.$u.http.post('web/orders/orderPay', data); // è®¢åæ¯ä» let getApplyCoupon = (data = {}) => vm.$u.http.post('web/orders/getApplyCoupon', data); // å¯ç¨ä¼æ å¸ä¿¡æ¯ let orderPayConfirm = (data = {}) => vm.$u.http.post('web/orders/orderPayConfirm', data); // 订åå¾ æ¯ä»ä¿¡æ¯ let findDefault = (params = {}) => vm.$u.http.get('web/addr/findDefault', {params}); // æ¥è¯¢ç¨æ·é»è®¤å°å let getCollectNum = (params = {}) => vm.$u.http.get('web/collect/getCollectNum', {params}); // æçæ¶èæ°é let myCollectPage = (data = {}) => vm.$u.http.post('web/collect/myCollectPage', data); // æçæ¶è let memberCouponDetail = (params = {}) => vm.$u.http.get('web/orders/memberCouponDetail', {params}); // ä¼å伿 å¸è¯¦æ @@ -78,6 +84,12 @@ vm.$u.api = { getShopList, replayPay, orderPay, getApplyCoupon, orderPayConfirm, findDefault, getCollectNum, myCollectPage, memberCouponDetail,