| | |
| | | <view class="search-container m-t-12 flex" @click="goto('/pages/home/components/home-search',false)">
|
| | | <view class="flex1 input">
|
| | | <u-input placeholder="请输入花名" disabled v-model="search_flow">
|
| | | <template slot="suffix"> |
| | | <template slot="suffix">
|
| | | <!-- @click="buttonSearchFlow" -->
|
| | | <uni-icons color="#20613D" type="search" size="24" ></uni-icons>
|
| | | <uni-icons color="#20613D" type="search" size="24"></uni-icons>
|
| | | </template>
|
| | | </u-input>
|
| | | </view>
|
| | |
| | | currentNotice: {}
|
| | | };
|
| | | },
|
| | | // onShareAppMessage() {
|
| | | // let that = this;
|
| | | // var url =
|
| | | // `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`; //你的转发页面路径拼接参数
|
| | | // return {
|
| | | // title: "校购GO小狗狗",
|
| | | // path: url,
|
| | | // }
|
| | | // },
|
| | | // onShareTimeline() {
|
| | | // let that = this;
|
| | | // var url = "/pages/home/home" //你的分享页面路径
|
| | | // return {
|
| | | // title: '校购GO小狗狗',
|
| | | // path: url,
|
| | | // query: `shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${this.currentInfo&&this.currentInfo.nickName||''}`, //你的参数拼接,注意:不需要加?
|
| | | // // imageUrl: 'https://cdn.uviewui.com/uview/swiper/1.jpg' //你分享的封面
|
| | | // };
|
| | | // },
|
| | | onShareAppMessage() {
|
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || ''
|
| | | var url =
|
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
|
| | | return {
|
| | | title: "花满芫",
|
| | | path: url,
|
| | | }
|
| | | },
|
| | | onShareTimeline() {
|
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | }
|
| | | },
|
| | |
|
| | | onLoad(options) { |
| | | // if(options.partnerUserId){ |
| | | // //需要前往注册了 |
| | | // uni.navigateTo({ |
| | | // url: '/pages/login/supplier-login' |
| | | // }) |
| | | onLoad(options) {
|
| | | // if(options.partnerUserId){
|
| | | // //需要前往注册了
|
| | | // uni.navigateTo({
|
| | | // url: '/pages/login/supplier-login'
|
| | | // })
|
| | | // }
|
| | | // console.log('home created')
|
| | | //这里进行一次初始化即可
|
| | |
| | | |
| | | }; |
| | | }, |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && |
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO && |
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | uni.stopPullDownRefresh() |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log("蓝牙状态",res) |
| | | console.log("蓝牙状态", res) |
| | | that.$message.showToast('获取蓝牙状态失败') |
| | | |
| | | } |
| | |
| | | |
| | | }, |
| | | fail: function(res) { |
| | | console.log('createBLEConnection fail',res) |
| | | console.log('createBLEConnection fail', res) |
| | | that.$message.showToast('连接打印机失败') |
| | | }, |
| | | complete() { |
| | |
| | | }
|
| | | // #endif
|
| | |
|
| | | }, |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | },
|
| | | data() {
|
| | | return {
|
| | |
| | | order_pendding_num: 0,
|
| | |
|
| | | };
|
| | | },
|
| | | // watch: {
|
| | | // currentInfo(nv, ov) {
|
| | | // if (!cacheUserId) {
|
| | |
|
| | | // }
|
| | | // }
|
| | | // },
|
| | | }, |
| | | // #ifndef PUB_CUSTOMER |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | // #endif |
| | | // #ifdef PUB_CUSTOMER |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | // #endif
|
| | | onShow() {
|
| | | this.getTj()
|
| | | },
|
| | |
| | | console.log('条码内容:' + res.result);
|
| | | var dto = undefined
|
| | | try {
|
| | | if (res.result && res.result.startsWith('http://') && res.result.indexOf(
|
| | | if (res.result && (res.result.startsWith('https://')||res.result.startsWith('http://')) && res.result.indexOf(
|
| | | 'partnerUserId') >= 0) {
|
| | | var arr = res.result.split("?")[1].split("&")
|
| | | dto = {}
|
| | |
| | | } else {
|
| | | that.$message.showToast('二维码格式不正确扫码失败')
|
| | | }
|
| | | } catch (e) {
|
| | | } catch (e) { |
| | | console.log('e',e)
|
| | | that.$message.showToast('二维码扫码错误')
|
| | | }
|
| | | },
|
| | |
| | | this.query.supplierId = this.id
|
| | | this.getList('post')
|
| | | },
|
| | | // #ifdef PUB_CUSTOMER
|
| | | onShareAppMessage() {
|
| | | let that = this;
|
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
|
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
|
| | | var url =
|
| | | `/sub_pages/customer/shop/shop?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
|
| | | return {
|
| | | title: this.dto.id && this.dto.name ? (this.dto.name + " 的店铺") : "花满芫",
|
| | | path: url,
|
| | | }
|
| | | },
|
| | | onShareTimeline() {
|
| | | let that = this;
|
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
|
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
|
| | | var url =
|
| | | `/sub_pages/customer/shop/shop?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
|
| | | return {
|
| | | title: this.dto.id && this.dto.name ? (this.dto.name + " 的店铺") : "花满芫",
|
| | | path: url,
|
| | | }
|
| | | },
|
| | | // #endif
|
| | | onReachBottom() {
|
| | | if (this.flg === '0') {
|
| | | this.getMore('post')
|
| | |
| | | shopnum: 0,
|
| | | }
|
| | | },
|
| | | onShow() { |
| | | if (this.id) { |
| | | this.getDetail() |
| | | onShow() {
|
| | | if (this.id) {
|
| | | this.getDetail()
|
| | | }
|
| | | this.refreshShopNum()
|
| | | },
|
| | |
| | | }
|
| | | this.refreshShopNum()
|
| | | },
|
| | | // #ifdef PUB_CUSTOMER
|
| | | onShareAppMessage() {
|
| | | let that = this;
|
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
|
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
|
| | | var url =
|
| | | `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
|
| | | return {
|
| | |
|
| | | title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫",
|
| | | path: url,
|
| | | }
|
| | | },
|
| | | onShareTimeline() {
|
| | | let that = this;
|
| | | var name = that.currentInfo.customerDTO && currentInfo.customerDTO.name || that.currentInfo.supplierDTO &&
|
| | | currentInfo.supplierDTO.name || that.currentInfo.partnerDTO && currentInfo.partnerDTO.name || ''
|
| | | var url =
|
| | | `/sub_pages/customer/trade/detail?id=${this.id}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数
|
| | | return {
|
| | | title: this.dto.id ? (this.dto.name + " " + (this.dto.price || '-') + '元/扎 ' + (this.dto.unit || '')) : "花满芫",
|
| | | path: url,
|
| | | }
|
| | | },
|
| | | // #endif
|
| | | methods: {
|
| | | async updateItemNum(item) {
|
| | | const res = await this.$message.confirm('', {
|
| | |
| | |
|
| | | } else {
|
| | | if (!item.stock || t > item.stock) {
|
| | | this.$message.showToast('库存不足无法修改') |
| | | this.$message.showToast('库存不足无法修改')
|
| | | return
|
| | | }
|
| | | this.addnum(item, (t - item.shopnum))
|
| | |
| | | })
|
| | | this.$message.hideLoading()
|
| | | if (code === 0) {
|
| | | item.shopnum += addnum |
| | | item.shopnum += addnum
|
| | | this.refreshShopNum()
|
| | | this.$forceUpdate()
|
| | | }
|
| | | },
|
| | |
|
| | | async refreshShopNum() {
|
| | | this.shopnum = await this.$store.dispatch('countShopping'); |
| | | this.$store.dispatch('sign_add','shopnum') |
| | | |
| | | this.shopnum = await this.$store.dispatch('countShopping');
|
| | | this.$store.dispatch('sign_add', 'shopnum')
|
| | |
|
| | | },
|
| | | async collectItem(dto) {
|
| | | if (!this.currentInfo.id) {
|
| | |
| | | []
|
| | | ]
|
| | | }
|
| | | },
|
| | | }, |
| | | // #ifdef PUB_CUSTOMER |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫-商品列表", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/sub_pages/customer/trade/list?category=${this.query.category}&zoneId=${this.query.zoneId}&name=${this.query.name}&shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫-商品列表", |
| | | path: url, |
| | | } |
| | | }, |
| | | // #endif
|
| | | async onLoad(options) {
|
| | | // this.list = [{},{}]
|
| | | console.log('options', options)
|
| | |
| | | currentCategory: {}
|
| | |
|
| | | }
|
| | | },
|
| | | }, |
| | | // #ifdef PUB_CUSTOMER |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/home/home?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | // #endif
|
| | | onPullDownRefresh() {
|
| | | this.$http.request('get', '/api/customer/flower/category/tree', {}).then(res => {
|
| | | var data = res.data
|
| | |
| | | created() { |
| | | |
| | | }, |
| | | onShareAppMessage() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | onShareTimeline() { |
| | | let that = this; |
| | | var name = that.currentInfo.customerDTO&¤tInfo.customerDTO.name || that.currentInfo.supplierDTO&¤tInfo.supplierDTO.name || that.currentInfo.partnerDTO&¤tInfo.partnerDTO.name || '' |
| | | var url = |
| | | `/pages/login/supplier-login?shareId=${this.currentInfo&&this.currentInfo.id||''}&shareName=${name||''}`; //你的转发页面路径拼接参数 |
| | | return { |
| | | title: "花满芫", |
| | | path: url, |
| | | } |
| | | }, |
| | | async onPullDownRefresh() { |
| | | await this.$store.dispatch('getCurrentInfo') |
| | | uni.stopPullDownRefresh() |