提交
This commit is contained in:
parent
a5b8c7a24a
commit
978bc7b920
16
api/store.js
16
api/store.js
@ -1,4 +1,20 @@
|
|||||||
import request from "@/utils/request.js";
|
import request from "@/utils/request.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 扫码查询商品
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export function microSeachBarCode(data) {
|
||||||
|
return request.get('micro/seach_bar_code', data);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取收款二维码
|
||||||
|
* @returns {*}
|
||||||
|
*/
|
||||||
|
export function createtApi(data) {
|
||||||
|
return request.post('v2/micropay/create', data);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加扫码商品
|
* 添加扫码商品
|
||||||
* @returns {*}
|
* @returns {*}
|
||||||
|
@ -9,8 +9,8 @@ let httpApiThree
|
|||||||
// 网络接口修改此字符 小程序域名要求https
|
// 网络接口修改此字符 小程序域名要求https
|
||||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
// httpApi = "https://crmeb-test.shop.lihaink.cn"
|
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||||
httpApi = "http://192.168.0.109:8325"
|
// httpApi = "http://192.168.0.109:8325"
|
||||||
// #ifdef MP-WEIXIN
|
// #ifdef MP-WEIXIN
|
||||||
httpApiTwo = "http://cms.com"
|
httpApiTwo = "http://cms.com"
|
||||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||||
|
356
manifest.json
356
manifest.json
@ -1,187 +1,187 @@
|
|||||||
{
|
{
|
||||||
"name" : "CRMEB",
|
"name": "CRMEB",
|
||||||
"appid" : "__UNI__3A527D1",
|
"appid": "__UNI__3A527D1",
|
||||||
"description" : "",
|
"description": "",
|
||||||
"versionName" : "1.0.4",
|
"versionName": "1.0.4",
|
||||||
"versionCode" : 127,
|
"versionCode": 127,
|
||||||
"transformPx" : false,
|
"transformPx": false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus": {
|
||||||
"titleNView" : true,
|
"titleNView": true,
|
||||||
"usingComponents" : true,
|
"usingComponents": true,
|
||||||
"nvueCompiler" : "uni-app",
|
"nvueCompiler": "uni-app",
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler": "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion": 3,
|
||||||
"splashscreen" : {
|
"splashscreen": {
|
||||||
"alwaysShowBeforeRender" : true,
|
"alwaysShowBeforeRender": true,
|
||||||
"waiting" : true,
|
"waiting": true,
|
||||||
"autoclose" : true,
|
"autoclose": true,
|
||||||
"delay" : 0
|
"delay": 0
|
||||||
|
},
|
||||||
|
/* 模块配置 */
|
||||||
|
"modules": {
|
||||||
|
"VideoPlayer": {},
|
||||||
|
"iBeacon": {},
|
||||||
|
"Geolocation": {},
|
||||||
|
"Barcode": {},
|
||||||
|
"Camera": {}
|
||||||
|
},
|
||||||
|
"safearea": {
|
||||||
|
"bottom": {
|
||||||
|
"offset": "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/* 应用发布信息 */
|
||||||
|
"distribute": {
|
||||||
|
/* android打包配置 */
|
||||||
|
"android": {
|
||||||
|
"permissions": [
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
||||||
|
],
|
||||||
|
"abiFilters": ["armeabi-v7a", "arm64-v8a", "x86"],
|
||||||
|
"permissionExternalStorage": {
|
||||||
|
"request": "none",
|
||||||
|
"prompt": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
"permissionPhoneState": {
|
||||||
"modules" : {
|
"request": "none" //拨打电话权限关闭
|
||||||
"VideoPlayer" : {},
|
|
||||||
"iBeacon" : {},
|
|
||||||
"Geolocation" : {},
|
|
||||||
"Barcode" : {},
|
|
||||||
"Camera" : {}
|
|
||||||
},
|
|
||||||
"safearea" : {
|
|
||||||
"bottom" : {
|
|
||||||
"offset" : "none"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* 应用发布信息 */
|
|
||||||
"distribute" : {
|
|
||||||
/* android打包配置 */
|
|
||||||
"android" : {
|
|
||||||
"permissions" : [
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_LOCATION_EXTRA_COMMANDS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.BATTERY_STATS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_CONFIGURATION\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.BLUETOOTH_ADMIN\"/>"
|
|
||||||
],
|
|
||||||
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
|
|
||||||
"permissionExternalStorage" : {
|
|
||||||
"request" : "none",
|
|
||||||
"prompt" : "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
|
||||||
},
|
|
||||||
"permissionPhoneState" : {
|
|
||||||
"request" : "none" //拨打电话权限关闭
|
|
||||||
}
|
|
||||||
},
|
|
||||||
/* ios打包配置 */
|
|
||||||
"ios" : {
|
|
||||||
"privacyDescription" : {
|
|
||||||
"NSPhotoLibraryUsageDescription" : "上传用户头像保存分享海报",
|
|
||||||
"NSPhotoLibraryAddUsageDescription" : "上传用户头像保存分享海报",
|
|
||||||
"NSCameraUsageDescription" : "上传用户头像保存分享海报",
|
|
||||||
"NSLocationWhenInUseUsageDescription" : "根据客户地理位置推荐最近门店",
|
|
||||||
"NSLocationAlwaysUsageDescription" : "根据客户地理位置推荐最近门店"
|
|
||||||
},
|
|
||||||
"idfa" : false,
|
|
||||||
"dSYMs" : false
|
|
||||||
},
|
|
||||||
/* SDK配置 */
|
|
||||||
"sdkConfigs" : {
|
|
||||||
"maps" : {
|
|
||||||
"amap" : {
|
|
||||||
"appkey_ios" : "",
|
|
||||||
"appkey_android" : ""
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"payment" : {
|
|
||||||
"alipay" : {
|
|
||||||
"__platform__" : [ "ios", "android" ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"share" : {
|
|
||||||
"weixin" : {
|
|
||||||
"appid" : "",
|
|
||||||
"UniversalLinks" : "https://mer.crmeb.net/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"geolocation" : {
|
|
||||||
"system" : {
|
|
||||||
"__platform__" : [ "ios", "android" ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"push" : {},
|
|
||||||
"oauth" : {
|
|
||||||
"apple" : {}
|
|
||||||
},
|
|
||||||
"ad" : {}
|
|
||||||
},
|
|
||||||
"icons" : {
|
|
||||||
"android" : {
|
|
||||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
|
||||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
|
||||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
|
||||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
|
||||||
},
|
|
||||||
"ios" : {
|
|
||||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
|
||||||
"ipad" : {
|
|
||||||
"app" : "unpackage/res/icons/76x76.png",
|
|
||||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
|
||||||
"notification" : "unpackage/res/icons/20x20.png",
|
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
|
||||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
|
||||||
"settings" : "unpackage/res/icons/29x29.png",
|
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
|
||||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
|
||||||
},
|
|
||||||
"iphone" : {
|
|
||||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
|
||||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
|
||||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
|
||||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
|
||||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
|
||||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
|
||||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
|
||||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"splashscreen" : {
|
|
||||||
"useOriginalMsgbox" : true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* ios打包配置 */
|
||||||
"quickapp" : {},
|
"ios": {
|
||||||
/* 小程序特有相关 */
|
"privacyDescription": {
|
||||||
"mp-weixin" : {
|
"NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
|
||||||
"appid" : "wx6e14cb98394e36bc",
|
"NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
|
||||||
"setting" : {
|
"NSCameraUsageDescription": "上传用户头像保存分享海报",
|
||||||
"urlCheck" : false,
|
"NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
|
||||||
"minified" : true,
|
"NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店"
|
||||||
"postcss" : true,
|
|
||||||
"es6" : true
|
|
||||||
},
|
},
|
||||||
"permission" : {
|
"idfa": false,
|
||||||
"scope.userLocation" : {
|
"dSYMs": false
|
||||||
"desc" : "获取您的位置"
|
},
|
||||||
}
|
/* SDK配置 */
|
||||||
|
"sdkConfigs": {
|
||||||
|
"maps": {
|
||||||
|
"amap": {
|
||||||
|
"appkey_ios": "",
|
||||||
|
"appkey_android": ""
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ],
|
"payment": {
|
||||||
"usingComponents" : true
|
"alipay": {
|
||||||
},
|
"__platform__": ["ios", "android"]
|
||||||
"mp-alipay" : {
|
}
|
||||||
"usingComponents" : true
|
|
||||||
},
|
|
||||||
"mp-baidu" : {
|
|
||||||
"usingComponents" : true
|
|
||||||
},
|
|
||||||
"mp-toutiao" : {
|
|
||||||
"usingComponents" : true
|
|
||||||
},
|
|
||||||
"h5" : {
|
|
||||||
"devServer" : {
|
|
||||||
"https" : false
|
|
||||||
},
|
},
|
||||||
"router" : {
|
"share": {
|
||||||
"mode" : "history",
|
"weixin": {
|
||||||
"base" : ""
|
"appid": "",
|
||||||
|
"UniversalLinks": "https://mer.crmeb.net/"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"domain" : "",
|
"geolocation": {
|
||||||
"sdkConfigs" : {
|
"system": {
|
||||||
"maps" : {
|
"__platform__": ["ios", "android"]
|
||||||
"qqmap" : {
|
}
|
||||||
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"title" : "加载中...",
|
"push": {},
|
||||||
"template" : "template.h5.html"
|
"oauth": {
|
||||||
|
"apple": {}
|
||||||
|
},
|
||||||
|
"ad": {}
|
||||||
|
},
|
||||||
|
"icons": {
|
||||||
|
"android": {
|
||||||
|
"hdpi": "unpackage/res/icons/72x72.png",
|
||||||
|
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||||
|
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||||
|
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||||
|
},
|
||||||
|
"ios": {
|
||||||
|
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||||
|
"ipad": {
|
||||||
|
"app": "unpackage/res/icons/76x76.png",
|
||||||
|
"app@2x": "unpackage/res/icons/152x152.png",
|
||||||
|
"notification": "unpackage/res/icons/20x20.png",
|
||||||
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
|
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||||
|
"settings": "unpackage/res/icons/29x29.png",
|
||||||
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
|
"spotlight": "unpackage/res/icons/40x40.png",
|
||||||
|
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||||
|
},
|
||||||
|
"iphone": {
|
||||||
|
"app@2x": "unpackage/res/icons/120x120.png",
|
||||||
|
"app@3x": "unpackage/res/icons/180x180.png",
|
||||||
|
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||||
|
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||||
|
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||||
|
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||||
|
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||||
|
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"splashscreen": {
|
||||||
|
"useOriginalMsgbox": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
/* 快应用特有相关 */
|
||||||
|
"quickapp": {},
|
||||||
|
/* 小程序特有相关 */
|
||||||
|
"mp-weixin": {
|
||||||
|
"appid": "wxfb4695444ab8d0d0",
|
||||||
|
"setting": {
|
||||||
|
"urlCheck": false,
|
||||||
|
"minified": true,
|
||||||
|
"postcss": true,
|
||||||
|
"es6": true
|
||||||
|
},
|
||||||
|
"permission": {
|
||||||
|
"scope.userLocation": {
|
||||||
|
"desc": "获取您的位置"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"requiredPrivateInfos": ["getLocation", "chooseAddress"],
|
||||||
|
"usingComponents": true
|
||||||
|
},
|
||||||
|
"mp-alipay": {
|
||||||
|
"usingComponents": true
|
||||||
|
},
|
||||||
|
"mp-baidu": {
|
||||||
|
"usingComponents": true
|
||||||
|
},
|
||||||
|
"mp-toutiao": {
|
||||||
|
"usingComponents": true
|
||||||
|
},
|
||||||
|
"h5": {
|
||||||
|
"devServer": {
|
||||||
|
"https": false
|
||||||
|
},
|
||||||
|
"router": {
|
||||||
|
"mode": "history",
|
||||||
|
"base": ""
|
||||||
|
},
|
||||||
|
"domain": "",
|
||||||
|
"sdkConfigs": {
|
||||||
|
"maps": {
|
||||||
|
"qqmap": {
|
||||||
|
"key": "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"title": "加载中...",
|
||||||
|
"template": "template.h5.html"
|
||||||
|
}
|
||||||
|
}
|
@ -328,7 +328,7 @@
|
|||||||
},
|
},
|
||||||
async addCartGoods(code) {
|
async addCartGoods(code) {
|
||||||
try {
|
try {
|
||||||
const res = await addCartApi({ bar_code: code })
|
const res = await addCartApi({ bar_code: code, product_type: 98 })
|
||||||
this.getCartList();
|
this.getCartList();
|
||||||
this.getCartNum();
|
this.getCartNum();
|
||||||
Toast('添加成功')
|
Toast('添加成功')
|
||||||
@ -336,6 +336,8 @@
|
|||||||
Toast(e)
|
Toast(e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* 生成二维码 */
|
||||||
pay() {
|
pay() {
|
||||||
let selectValue = []
|
let selectValue = []
|
||||||
this.cartList.valid.forEach(el => {
|
this.cartList.valid.forEach(el => {
|
||||||
@ -345,12 +347,11 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const data = {
|
const data = { cart_id: selectValue }
|
||||||
cart_id: selectValue
|
|
||||||
}
|
|
||||||
this.popUpShow = true
|
this.popUpShow = true
|
||||||
createtApi(data).then(res => {
|
createtApi(data).then(res => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
console.log("res", res.data);
|
||||||
this.payCodeUrl = res.data.config;
|
this.payCodeUrl = res.data.config;
|
||||||
this.$refs.qrcode._makeCode()
|
this.$refs.qrcode._makeCode()
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="viewColor">
|
<view :style="viewColor">
|
||||||
<view class="product-con">
|
<view class="product-con">
|
||||||
<!-- #ifdef H5 -->
|
|
||||||
<view class="head-wrapper" :style="'top:'+statusBarHeight">
|
<view class="head-wrapper" :style="'top:'+statusBarHeight">
|
||||||
<view class="head-menu">
|
<view class="head-menu">
|
||||||
<view class='iconfont icon-xiangzuo' @click="returns"></view>
|
<view class='iconfont icon-xiangzuo' @click="returns"></view>
|
||||||
<view class="iconfont icon-shouye4" @click="goHome"></view>
|
<view class="iconfont icon-shouye4" @click="goHome"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- #endif -->
|
|
||||||
<view v-if="storeInfo && storeInfo.merchant">
|
<view v-if="storeInfo && storeInfo.merchant">
|
||||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
|
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
|
||||||
:style='"height:"+height+"px;"' @scroll="scroll">
|
:style='"height:"+height+"px;"' @scroll="scroll">
|
||||||
@ -312,7 +310,12 @@
|
|||||||
<view class='iconfont icon-shoucang' v-else></view>
|
<view class='iconfont icon-shoucang' v-else></view>
|
||||||
<view>收藏</view>
|
<view>收藏</view>
|
||||||
</view>
|
</view>
|
||||||
<navigator open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''"
|
<navigator v-if="product_type == 98" open-type='navigate' class="animated item skeleton-rect"
|
||||||
|
:class="animated==true?'bounceIn':''" url='/pages/nongKe/supply_chain/shopping_trolley' hover-class="none">
|
||||||
|
<view class='iconfont icon-gouwuche1'></view>
|
||||||
|
<view>购物车</view>
|
||||||
|
</navigator>
|
||||||
|
<navigator v-else open-type='navigate' class="animated item skeleton-rect" :class="animated==true?'bounceIn':''"
|
||||||
url='/pages/order_addcart/order_addcart' hover-class="none">
|
url='/pages/order_addcart/order_addcart' hover-class="none">
|
||||||
<view class='iconfont icon-gouwuche1'>
|
<view class='iconfont icon-gouwuche1'>
|
||||||
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
|
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
|
||||||
@ -582,7 +585,6 @@
|
|||||||
])),
|
])),
|
||||||
},
|
},
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
console.log('options', options);
|
|
||||||
this.referer = options.referer
|
this.referer = options.referer
|
||||||
if (options.product_type) {
|
if (options.product_type) {
|
||||||
this.product_type = options.product_type
|
this.product_type = options.product_type
|
||||||
@ -1331,7 +1333,7 @@
|
|||||||
cart_num: that.attr.productSelect.cart_num,
|
cart_num: that.attr.productSelect.cart_num,
|
||||||
product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "",
|
product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "",
|
||||||
source: this.source,
|
source: this.source,
|
||||||
product_type: 0,
|
product_type: this.product_type,
|
||||||
spread_id: this.currSpid,
|
spread_id: this.currSpid,
|
||||||
referer: this.referer
|
referer: this.referer
|
||||||
};
|
};
|
||||||
|
@ -150,9 +150,9 @@
|
|||||||
if (this.tabsData.tabsActive == 1) {
|
if (this.tabsData.tabsActive == 1) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
//#ifdef APP
|
//#ifdef APP
|
||||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
|
url: '/pages/short_video/appSwiper/index?id=' + item.community_id,
|
||||||
//#endif
|
//#endif
|
||||||
//#ifndef APP
|
//#ifndef MP || H5
|
||||||
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
||||||
//#endif
|
//#endif
|
||||||
})
|
})
|
||||||
@ -184,9 +184,7 @@
|
|||||||
},
|
},
|
||||||
/*获取分类列表*/
|
/*获取分类列表*/
|
||||||
async getCateList() {
|
async getCateList() {
|
||||||
const {
|
const { data } = await getTopicList()
|
||||||
data
|
|
||||||
} = await getTopicList()
|
|
||||||
this.tabsData.list = [{
|
this.tabsData.list = [{
|
||||||
cate_name: "推荐",
|
cate_name: "推荐",
|
||||||
category_id: 0
|
category_id: 0
|
||||||
@ -216,6 +214,7 @@
|
|||||||
const that = this
|
const that = this
|
||||||
uni.getLocation({
|
uni.getLocation({
|
||||||
type: 'gcj02',
|
type: 'gcj02',
|
||||||
|
timeout: '10',
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
let latitude, longitude;
|
let latitude, longitude;
|
||||||
latitude = res.latitude.toString();
|
latitude = res.latitude.toString();
|
||||||
@ -232,9 +231,9 @@
|
|||||||
},
|
},
|
||||||
fail: (err) => {
|
fail: (err) => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.errMsg,
|
title: "获取定位超时",
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 2000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -122,8 +122,15 @@
|
|||||||
name: this.searchGoodsName
|
name: this.searchGoodsName
|
||||||
}
|
}
|
||||||
const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err))
|
const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err))
|
||||||
if (data.list.length == 0) {
|
if (data.list.length < 1) {
|
||||||
Toast("暂无搜索商品")
|
this.searchGoodsShow = false
|
||||||
|
Toast("暂无搜索商品,请添加!")
|
||||||
|
setTimeout(() => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/product/addGoods/index'
|
||||||
|
})
|
||||||
|
}, 2000)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
this.goods = data.list
|
this.goods = data.list
|
||||||
this.searchGoodsShow = false
|
this.searchGoodsShow = false
|
||||||
@ -159,22 +166,17 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
async seachBarCode(code) {
|
async seachBarCode(code) {
|
||||||
try {
|
const { data } = await seachBarCodeAPI({
|
||||||
const { data } = await microSeachBarCode({
|
code: code,
|
||||||
code: code
|
mer_id: this.mer_id
|
||||||
})
|
})
|
||||||
console.log('data', data.data);
|
if (data.list.length < 1) {
|
||||||
this.product_id = data.data.product_id
|
|
||||||
this.editGoodsStore = data.data.stock
|
|
||||||
this.editGoodsPrice = data.data.price
|
|
||||||
this.editGoodsCode = data.data.attr_value.bar_code
|
|
||||||
this.editGoodsName = data.data.store_name
|
|
||||||
this.editGoodsShow = true
|
|
||||||
} catch (err) {
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}`
|
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}`
|
||||||
})
|
})
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
this.goods = data.list
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
|
@ -1,143 +1,143 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- #ifdef MP -->
|
<!-- #ifdef MP -->
|
||||||
<view :style="viewColor" style="padding-top: 180rpx;">
|
<view :style="viewColor" style="padding-top: 180rpx;">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<!-- #ifdef APP || H5 -->
|
<!-- #ifdef APP || H5 -->
|
||||||
<view :style="viewColor" style="padding-top: 80rpx;">
|
<view :style="viewColor" style="padding-top: 80rpx;">
|
||||||
<!-- #endif -->
|
<!-- #endif -->
|
||||||
<form @submit="formSubmit" report-submit='true'>
|
<form @submit="formSubmit" report-submit='true'>
|
||||||
<view class="release_content">
|
<view class="release_content">
|
||||||
<view v-if="community_app_switch.length == 2" class="release_tab acea-row">
|
<view v-if="community_app_switch.length == 2" class="release_tab acea-row">
|
||||||
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value"
|
<view class="tab_item" v-for="(item, index) in tabList" :key="item.value"
|
||||||
:class="{on:tabActive == item.value}" @click="changeTab(item)">
|
:class="{on:tabActive == item.value}" @click="changeTab(item)">
|
||||||
<text class="iconfont" :class="item.icon"></text>{{item.name}}
|
<text class="iconfont" :class="item.icon"></text>{{item.name}}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view>
|
||||||
<view>
|
<view class="release_item">
|
||||||
<view class="release_item">
|
<view class="photo_count">
|
||||||
<view class="photo_count">
|
<view class="input_photo acea-row row-middle">
|
||||||
<view class="input_photo acea-row row-middle">
|
<block v-if="tabActive == 2">
|
||||||
<block v-if="tabActive == 2">
|
<view class="pictrue" v-if="formData.video_link">
|
||||||
<view class="pictrue" v-if="formData.video_link">
|
<view v-if="videoplay">
|
||||||
<view v-if="videoplay">
|
<video controls id="myvideo" :src="video_link" @fullscreenchange="screenChange"></video>
|
||||||
<video controls id="myvideo" :src="video_link" @fullscreenchange="screenChange"></video>
|
|
||||||
</view>
|
|
||||||
<!--#ifndef APP-PLUS-->
|
|
||||||
<video class="pictrue" :src="formData.video_link"></video>
|
|
||||||
<!--#endif-->
|
|
||||||
<image class="video-bg" mode="widthFix"
|
|
||||||
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png">
|
|
||||||
</image>
|
|
||||||
<view class="videoHover" @click="videoshow">
|
|
||||||
<view>
|
|
||||||
<text class="iconfont icon-24gf-play"></text>
|
|
||||||
</view>
|
</view>
|
||||||
|
<!--#ifndef APP-PLUS-->
|
||||||
|
<video class="pictrue" :src="formData.video_link"></video>
|
||||||
|
<!--#endif-->
|
||||||
|
<image class="video-bg" mode="widthFix"
|
||||||
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/3/video_bg.png">
|
||||||
|
</image>
|
||||||
|
<view class="videoHover" @click="videoshow">
|
||||||
|
<view>
|
||||||
|
<text class="iconfont icon-24gf-play"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<text class="video-text">点击可预览视频</text>
|
||||||
|
|
||||||
|
<view class="close_btn" @click="formData.video_link = ''"><text
|
||||||
|
class="iconfont icon-guanbi4"></text></view>
|
||||||
</view>
|
</view>
|
||||||
<text class="video-text">点击可预览视频</text>
|
<view v-else class="pictrue acea-row row-center-wrapper row-column add" @click="uploadVideo">
|
||||||
|
<view><text class='iconfont icon-tianjiashipin'></text></view>
|
||||||
<view class="close_btn" @click="formData.video_link = ''"><text
|
<view class="text">添加视频</view>
|
||||||
class="iconfont icon-guanbi4"></text></view>
|
</view>
|
||||||
|
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add"
|
||||||
|
@click.stop="clk">
|
||||||
|
<view><text class='iconfont icon-fengmian'></text></view>
|
||||||
|
<view class="text">添加封面</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view class="pictrue" v-for="(item, index) in formData.image" :key="index">
|
||||||
|
<easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage>
|
||||||
|
<text class="cover_text" v-if="tabActive == 2">封面</text>
|
||||||
|
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view>
|
||||||
</view>
|
</view>
|
||||||
<view v-else class="pictrue acea-row row-center-wrapper row-column add" @click="uploadVideo">
|
<block v-if="tabActive == 1">
|
||||||
<view><text class='iconfont icon-tianjiashipin'></text></view>
|
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add"
|
||||||
<view class="text">添加视频</view>
|
@click.stop="clk">
|
||||||
|
<view><text class='iconfont icon-icon25201'></text></view>
|
||||||
|
<view class="text">添加图片</view>
|
||||||
|
</view>
|
||||||
|
</block>
|
||||||
|
<view v-if="showCd" :ratio="16/9" class="container">
|
||||||
|
<bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage" :dWidth="800" :compress="true">
|
||||||
|
<!-- 你想插入的内容 -->
|
||||||
|
<button class="crop_btn" @click="crop">裁切</button>
|
||||||
|
</bt-cropper>
|
||||||
</view>
|
</view>
|
||||||
<view v-if="formData.image.length < 1" class="pictrue acea-row row-center-wrapper row-column add"
|
|
||||||
@click.stop="clk">
|
|
||||||
<view><text class='iconfont icon-fengmian'></text></view>
|
|
||||||
<view class="text">添加封面</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<view class="pictrue" v-for="(item, index) in formData.image" :key="index">
|
|
||||||
<easy-loadimage mode="widthFix" :image-src="item"></easy-loadimage>
|
|
||||||
<text class="cover_text" v-if="tabActive == 2">封面</text>
|
|
||||||
<view class="close_btn" @click="DelPic(index)"><text class="iconfont icon-guanbi4"></text></view>
|
|
||||||
</view>
|
|
||||||
<block v-if="tabActive == 1">
|
|
||||||
<view v-if="formData.image.length < 6" class="pictrue acea-row row-center-wrapper row-column add"
|
|
||||||
@click.stop="clk">
|
|
||||||
<view><text class='iconfont icon-icon25201'></text></view>
|
|
||||||
<view class="text">添加图片</view>
|
|
||||||
</view>
|
|
||||||
</block>
|
|
||||||
<view v-if="showCd" :ratio="16/9" class="container">
|
|
||||||
<bt-cropper ref="cropper" :imageSrc="imageSrc" @cropEnd="loadImage" :dWidth="800">
|
|
||||||
<!-- 你想插入的内容 -->
|
|
||||||
<button class="crop_btn" @click="crop">裁切</button>
|
|
||||||
</bt-cropper>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="textarea">
|
||||||
<view class="textarea">
|
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder'
|
||||||
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder'
|
v-model="formData.content" maxlength="600"></textarea>
|
||||||
v-model="formData.content" maxlength="600"></textarea>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="release_item">
|
|
||||||
<view class='item acea-row row-between-wrapper'>
|
|
||||||
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
|
|
||||||
<view class="select">
|
|
||||||
<view class="select_count" @click.stop="addProduct">
|
|
||||||
<text v-if="productList.length == 0" class="text">选择产品</text>
|
|
||||||
<view v-else class="text">
|
|
||||||
<image class="image" v-for="(item,index) in productList" :key="index"
|
|
||||||
:src="item.image || (item.spu && item.spu.image)"></image>
|
|
||||||
</view>
|
|
||||||
<text class="iconfont icon-xiangyou"></text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='item acea-row row-between-wrapper'>
|
<view class="release_item">
|
||||||
<view class='name'><text class="iconfont icon-canyuhuati"></text>参与话题</view>
|
<view class='item acea-row row-between-wrapper'>
|
||||||
<view class="select">
|
<view class='name'><text class="iconfont icon-baobeilianjie"></text>添加产品({{productList.length}})</view>
|
||||||
<view class="select_count" @click="addTopic">
|
<view class="select">
|
||||||
<text v-if="!topicName.topic_name" class="text">选择话题</text>
|
<view class="select_count" @click.stop="addProduct">
|
||||||
<text v-else class="text_name" @click.stop="deleteTopic">
|
<text v-if="productList.length == 0" class="text">选择产品</text>
|
||||||
<text class="icon">#</text>
|
<view v-else class="text">
|
||||||
<text class="title">{{topicName.topic_name}}</text>
|
<image class="image" v-for="(item,index) in productList" :key="index"
|
||||||
<text class="iconfont icon-guanbi5"></text>
|
:src="item.image || (item.spu && item.spu.image)"></image>
|
||||||
</text>
|
</view>
|
||||||
<text class="iconfont icon-xiangyou"></text>
|
<text class="iconfont icon-xiangyou"></text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class='item acea-row row-between-wrapper'>
|
||||||
|
<view class='name'><text class="iconfont icon-canyuhuati"></text>参与话题</view>
|
||||||
|
<view class="select">
|
||||||
|
<view class="select_count" @click="addTopic">
|
||||||
|
<text v-if="!topicName.topic_name" class="text">选择话题</text>
|
||||||
|
<text v-else class="text_name" @click.stop="deleteTopic">
|
||||||
|
<text class="icon">#</text>
|
||||||
|
<text class="title">{{topicName.topic_name}}</text>
|
||||||
|
<text class="iconfont icon-guanbi5"></text>
|
||||||
|
</text>
|
||||||
|
<text class="iconfont icon-xiangyou"></text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<button class="release_btn button" form-type="submit">发布</button>
|
||||||
</view>
|
</view>
|
||||||
<button class="release_btn button" form-type="submit">发布</button>
|
</form>
|
||||||
|
<!--视频预览弹窗-->
|
||||||
|
<view v-if="showVideo" class="video-count">
|
||||||
|
<!--#ifndef APP-PLUS-->
|
||||||
|
<video id="myVideo" class="videoLink" autoplay loop muted :src="formData.video_link"></video>
|
||||||
|
<!--#endif-->
|
||||||
|
<!--#ifdef APP-PLUS-->
|
||||||
|
|
||||||
|
<video id="myVideo" class="videoLink" autoplay loop
|
||||||
|
:src='formData.video_link && (formData.video_link.substring(0,4) == "http" || formData.video_link.substring(0,5) == "https") ? formData.video_link : "http:" + formData.video_link'></video>
|
||||||
|
<!--#endif-->
|
||||||
</view>
|
</view>
|
||||||
</form>
|
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
|
||||||
<!--视频预览弹窗-->
|
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
||||||
<view v-if="showVideo" class="video-count">
|
</avatar>
|
||||||
<!--#ifndef APP-PLUS-->
|
<!-- 提到的宝贝弹窗 -->
|
||||||
<video id="myVideo" class="videoLink" autoplay loop muted :src="formData.video_link"></video>
|
<uni-popup ref="associated" type="bottom">
|
||||||
<!--#endif-->
|
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
|
||||||
<!--#ifdef APP-PLUS-->
|
</uni-popup>
|
||||||
|
<!-- 话题弹窗 -->
|
||||||
|
<uni-popup ref="participateTopic" type="bottom">
|
||||||
|
<participate-topic @close="close" @getTopic="getTopic"></participate-topic>
|
||||||
|
</uni-popup>
|
||||||
|
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
||||||
|
|
||||||
<video id="myVideo" class="videoLink" autoplay loop
|
<!-- <m-tabbar native>
|
||||||
:src='formData.video_link && (formData.video_link.substring(0,4) == "http" || formData.video_link.substring(0,5) == "https") ? formData.video_link : "http:" + formData.video_link'></video>
|
|
||||||
<!--#endif-->
|
|
||||||
</view>
|
|
||||||
<view class='mask' catchtouchmove="true" :hidden='showVideo==false' @tap="showVideo=false"></view>
|
|
||||||
<avatar @upload="doUpload" @getName="getImgName" quality="1" ref="avatar" selWidth="250upx" selHeight="250upx">
|
|
||||||
</avatar>
|
|
||||||
<!-- 提到的宝贝弹窗 -->
|
|
||||||
<uni-popup ref="associated" type="bottom">
|
|
||||||
<associated @close="close" @getProduct="getProduct" :checkedObj="productList"></associated>
|
|
||||||
</uni-popup>
|
|
||||||
<!-- 话题弹窗 -->
|
|
||||||
<uni-popup ref="participateTopic" type="bottom">
|
|
||||||
<participate-topic @close="close" @getTopic="getTopic"></participate-topic>
|
|
||||||
</uni-popup>
|
|
||||||
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize>
|
|
||||||
|
|
||||||
<!-- <m-tabbar native>
|
|
||||||
<template v-slot:tabbar_index_2>
|
<template v-slot:tabbar_index_2>
|
||||||
<view class="custom_style">
|
<view class="custom_style">
|
||||||
<view class="custom_style_icon"></view>
|
<view class="custom_style_icon"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</m-tabbar> -->
|
</m-tabbar> -->
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -108,7 +108,7 @@
|
|||||||
store_id: '',
|
store_id: '',
|
||||||
locationArr: ({}),
|
locationArr: ({}),
|
||||||
setrecommend_address: "",
|
setrecommend_address: "",
|
||||||
mer_id: 0
|
isYunCang: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
@ -147,7 +147,7 @@
|
|||||||
},
|
},
|
||||||
getCloudShopMerId(id) {
|
getCloudShopMerId(id) {
|
||||||
get_cloud_shop(id).then(res => {
|
get_cloud_shop(id).then(res => {
|
||||||
this.mer_id = res.data.mer_id ?? 0
|
res.data.length > 0 ? this.isYunCang = 1 : this.isYunCang = 0
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
navigat() {
|
navigat() {
|
||||||
@ -161,9 +161,9 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
go_shop() {
|
go_shop() {
|
||||||
// if (this.mer_id == 0) {
|
if (this.isYunCang == 0) {
|
||||||
// return Toast('当前区域没有云仓库')
|
return Toast('当前区域没有云仓库')
|
||||||
// }
|
}
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
|
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user