| | |
| | | export const refundPriceStatistics = (params) => { |
| | | return getRequest(`/statistics/refund/order/getPrice`, params) |
| | | } |
| | | |
| | | export const getGoodsFirstSkuId = (id) =>{ |
| | | return getRequest('/goods/goods/getFirstSkuId/'+id) |
| | | } |
| | |
| | | window.open(src, "_blank"); |
| | | }; |
| | | Vue.prototype.endpoint = "https://lmk-1356772813.cos.ap-chengdu.myqcloud.com" |
| | | Vue.prototype.QRcodeBaseUrl = "https://myk.9village.cn" |
| | | Vue.prototype.wapLinkTo = function (goodsId, skuId) { |
| | | // app端二维码 |
| | | if (skuId) { |
| | |
| | | |
| | | <div style="margin-left: 13px"> |
| | | <div class="div-zoom"> |
| | | <a @click="linkTo(row.id, row.skuId)">{{ row.goodsName }}</a> |
| | | {{ row.goodsName }} |
| | | </div> |
| | | <Poptip trigger="hover" title="扫码在手机中查看" transfer> |
| | | <div slot="content"> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </Table> |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | :loading="codeLoading" |
| | | > |
| | | <vue-qr |
| | | :text="wapLinkTo(row.id, row.skuId)" |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | <img |
| | | src="../../../assets/qrcode.svg" |
| | | class="hover-pointer" |
| | | width="20" |
| | | height="20" |
| | | alt="" |
| | | /> |
| | | </Poptip> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </Table> |
| | | </Modal> |
| | | <Row type="flex" justify="end" class="mt_10"> |
| | | <Page |
| | | :current="searchForm.pageNumber" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getGoodsListData, upGoods, lowGoods } from "@/api/goods"; |
| | | import { getGoodsListData, upGoods, lowGoods ,getGoodsFirstSkuId } from "@/api/goods"; |
| | | import {getSts} from '@/api/file' |
| | | import vueQr from "vue-qr"; |
| | | export default { |
| | |
| | | name: "goods", |
| | | data() { |
| | | return { |
| | | showGeneralQrCode:false, |
| | | QRCodeUrl:'', |
| | | codeUrl: this.QRcodeBaseUrl+ '/scanpage/goods', |
| | | codeLoading:false, |
| | | |
| | | id: "", //要操作的id |
| | | loading: true, // 表单加载状态 |
| | | modalVisible: false, // 添加或编辑显示 |
| | |
| | | key: "action", |
| | | align: "center", |
| | | fixed: "right", |
| | | width: 150, |
| | | width: 220, |
| | | render: (h, params) => { |
| | | if (params.row.marketEnable == "DOWN") { |
| | | return h("div", [ |
| | |
| | | h( |
| | | "Button", |
| | | { |
| | | style: { |
| | | marginRight: "5px", |
| | | }, |
| | | props: { |
| | | size: "small", |
| | | }, |
| | |
| | | }, |
| | | "查看" |
| | | ), |
| | | h( |
| | | "Button", |
| | | { |
| | | props: { |
| | | size: "small", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.generalQrCode(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "生成二维码" |
| | | ) |
| | | ]); |
| | | } else { |
| | | return h("div", [ |
| | |
| | | h( |
| | | "Button", |
| | | { |
| | | style: { |
| | | marginRight: "5px", |
| | | }, |
| | | props: { |
| | | size: "small", |
| | | }, |
| | |
| | | }, |
| | | "查看" |
| | | ), |
| | | h( |
| | | "Button", |
| | | { |
| | | props: { |
| | | type: "error", |
| | | size: "small", |
| | | }, |
| | | on: { |
| | | click: () => { |
| | | this.generalQrCode(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "生成二维码" |
| | | ) |
| | | ]); |
| | | } |
| | | }, |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | }, |
| | | generalQrCode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | this.codeLoading = true; |
| | | |
| | | //获得商品对应的第一个skuid |
| | | getGoodsFirstSkuId(row.id).then(res =>{ |
| | | this.codeLoading = false; |
| | | |
| | | if (res.code){ |
| | | this.QRCodeUrl = this.codeUrl + "?id="+ res.result +"&goodsId=" + row.id |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | |
| | | // 初始化数据 |
| | | init() { |
| | | this.getDataList(); |
| | |
| | | <Button type="success" size="small" style="margin-right: 5px" |
| | | @click="deleteHealthVideo(row)">删除 |
| | | </Button> |
| | | <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'" |
| | | @click="generalQrCode(row)">生成二维码 |
| | | </Button> |
| | | |
| | | </template> |
| | | </Table> |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | > |
| | | <vue-qr |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | |
| | | <Row type="flex" justify="end" class="mt_10"> |
| | | <Page |
| | |
| | | import Editor from '@/components/editor/index.vue' |
| | | import COS from 'cos-js-sdk-v5'; |
| | | import {getFileKey} from "@/utils/file.js"; |
| | | import vueQr from "vue-qr"; |
| | | |
| | | export default { |
| | | name: "VideoList", |
| | | components: {Editor}, |
| | | components: {Editor,"vue-qr": vueQr}, |
| | | data() { |
| | | return { |
| | | showGeneralQrCode:false, |
| | | codeUrl: this.QRcodeBaseUrl+ '/scanpage/health', |
| | | QRCodeUrl:'', |
| | | |
| | | |
| | | videoDownForm: { |
| | | id: '', |
| | | reason: '' |
| | |
| | | this.getTags('') |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | |
| | | }, |
| | | generalQrCode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true; |
| | | console.log('-------------------->',row); |
| | | //shareType可能会是动态的,会加判断视频来源 |
| | | |
| | | |
| | | this.QRCodeUrl = this.codeUrl + '?shareType=health' + '&videoId='+ row.id + '%source=' + 'system'; |
| | | //TODO 根据视频信息中的 ,作者id获得用户 判断 来源 ,用户作者的uniid为null则是系统上传,不为空则是用户上传; |
| | | |
| | | // console.log(this.QRCodeUrl) |
| | | }, |
| | | // 秒转x分x秒 |
| | | formatSeconds(seconds) { |
| | | if (isNaN(seconds) || seconds < 0) return '0秒'; |
| | |
| | | <Button type="success" size="small" style="margin-right: 5px" |
| | | @click="deleteHealthVideo(row)">删除 |
| | | </Button> |
| | | <Button type="error" size="small" style="margin-right: 5px" v-if="row.status === '1'" |
| | | @click="generalQrCode(row)">生成二维码 |
| | | </Button> |
| | | </template> |
| | | </Table> |
| | | |
| | | </Table> |
| | | <Modal |
| | | v-model="showGeneralQrCode" |
| | | title="二维码" |
| | | width="800" |
| | | :mask-closable="false" |
| | | > |
| | | <vue-qr |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | | :size="150" |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | <Row type="flex" justify="end" class="mt_10"> |
| | | <Page |
| | | :current="searchForm.pageNumber" |
| | |
| | | ></Page> |
| | | </Row> |
| | | </Card> |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import COS from 'cos-js-sdk-v5'; |
| | | import {getFileKey} from "@/utils/file.js"; |
| | | import {getKitchenTypeAllList} from "@/api/kitchen"; |
| | | import vueQr from "vue-qr"; |
| | | |
| | | export default { |
| | | name: "VideoList", |
| | | components: {Editor}, |
| | | components: {Editor,"vue-qr": vueQr}, |
| | | data() { |
| | | return { |
| | | showGeneralQrCode:false, |
| | | codeUrl: this.QRcodeBaseUrl+ '/scanpage/cook', |
| | | QRCodeUrl:'', |
| | | |
| | | videoDownForm: { |
| | | id: '', |
| | | reason: '' |
| | |
| | | this.getTypes('') |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | }, |
| | | |
| | | generalQrCode(row){ |
| | | this.QRCodeUrl = ''; |
| | | this.showGeneralQrCode = true |
| | | console.log('-------------------->',row); |
| | | //shareType可能会是动态的,会加判断视频来源 |
| | | console.log(item) |
| | | // uni.navigateTo({ |
| | | // url: `/pages/product/goods?id=${item.id}&goodsId=${item.goodsId}` |
| | | // }); |
| | | this.QRCodeUrl = this.codeUrl + '?shareType=cook' + '&videoId='+ row.id + '%source=' + 'system'; |
| | | //TODO 根据视频信息中的 ,作者id获得用户 判断 来源 ,用户作者的uniid为null则是系统上传,不为空则是用户上传 |
| | | |
| | | // console.log(this.QRCodeUrl) |
| | | }, |
| | | |
| | | // 秒转x分x秒 |
| | | formatSeconds(seconds) { |
| | | if (isNaN(seconds) || seconds < 0) return '0秒'; |
| | |
| | | :mask-closable="false" |
| | | > |
| | | <vue-qr |
| | | text="https://myk.9village.cn/scanpage/recommend?shareType=videoRecommend&videoId=1948284811844190209" |
| | | :text="QRCodeUrl" |
| | | :margin="0" |
| | | colorDark="#000" |
| | | colorLight="#fff" |
| | |
| | | ></vue-qr> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="closeGeneralQrCode">关闭</Button> |
| | | <Button type="primary" @click="generalQrCode">确认</Button> |
| | | <!-- <Button type="primary" @click="generalQrCode">确认</Button>--> |
| | | </div> |
| | | </Modal> |
| | | <Row type="flex" justify="end" class="mt_10"> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | // https://myk.9village.cn/scanpage/recommend?shareType=videoRecommend&videoId=1948284811844190209 |
| | | baseQRCodeUrl: this.QRcodeBaseUrl+ '/scanpage/recommend', |
| | | QRCodeUrl:'', |
| | | showGeneralQrCode:false, |
| | | endpoint: '', |
| | | searchGoods: '', |
| | |
| | | this.getTags('') |
| | | }, |
| | | methods: { |
| | | closeGeneralQrCode(){ |
| | | this.showGeneralQrCode = false; |
| | | this.QRCodeUrl = ''; |
| | | }, |
| | | generalQrCode(row){ |
| | | this.showGeneralQrCode = true |
| | | console.log('-------------------->',row); |
| | | this.QRCodeUrl = this.baseQRCodeUrl + '?shareType=videoRecommend' + '&videoId='+ row.id; |
| | | console.log(this.QRCodeUrl) |
| | | }, |
| | | //todo 保留后续可能会使用 |
| | | changeGoodsNum(id,index,goodsNum){ |