提交
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";
|
||||
|
||||
/**
|
||||
* 扫码查询商品
|
||||
*
|
||||
*/
|
||||
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 {*}
|
||||
|
@ -9,8 +9,8 @@ let httpApiThree
|
||||
// 网络接口修改此字符 小程序域名要求https
|
||||
// let httpApi = 'http://192.168.31.110:8324' // 测试
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
// httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
httpApi = "http://192.168.0.109:8325"
|
||||
httpApi = "https://crmeb-test.shop.lihaink.cn"
|
||||
// httpApi = "http://192.168.0.109:8325"
|
||||
// #ifdef MP-WEIXIN
|
||||
httpApiTwo = "http://cms.com"
|
||||
httpApiThree = 'http://ceshi-oa.lihaink.cn'
|
||||
|
356
manifest.json
356
manifest.json
@ -1,187 +1,187 @@
|
||||
{
|
||||
"name" : "CRMEB",
|
||||
"appid" : "__UNI__3A527D1",
|
||||
"description" : "",
|
||||
"versionName" : "1.0.4",
|
||||
"versionCode" : 127,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"titleNView" : true,
|
||||
"usingComponents" : true,
|
||||
"nvueCompiler" : "uni-app",
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
"name": "CRMEB",
|
||||
"appid": "__UNI__3A527D1",
|
||||
"description": "",
|
||||
"versionName": "1.0.4",
|
||||
"versionCode": 127,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"titleNView": true,
|
||||
"usingComponents": true,
|
||||
"nvueCompiler": "uni-app",
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"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": "应用保存运行状态等信息,需要获取读写手机存储(系统提示为访问设备上的照片、媒体内容和文件)权限,请允许。"
|
||||
},
|
||||
/* 模块配置 */
|
||||
"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" : {
|
||||
"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
|
||||
}
|
||||
"permissionPhoneState": {
|
||||
"request": "none" //拨打电话权限关闭
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wx6e14cb98394e36bc",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
"postcss" : true,
|
||||
"es6" : true
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"privacyDescription": {
|
||||
"NSPhotoLibraryUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSPhotoLibraryAddUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSCameraUsageDescription": "上传用户头像保存分享海报",
|
||||
"NSLocationWhenInUseUsageDescription": "根据客户地理位置推荐最近门店",
|
||||
"NSLocationAlwaysUsageDescription": "根据客户地理位置推荐最近门店"
|
||||
},
|
||||
"permission" : {
|
||||
"scope.userLocation" : {
|
||||
"desc" : "获取您的位置"
|
||||
}
|
||||
"idfa": false,
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"maps": {
|
||||
"amap": {
|
||||
"appkey_ios": "",
|
||||
"appkey_android": ""
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ],
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"h5" : {
|
||||
"devServer" : {
|
||||
"https" : false
|
||||
"payment": {
|
||||
"alipay": {
|
||||
"__platform__": ["ios", "android"]
|
||||
}
|
||||
},
|
||||
"router" : {
|
||||
"mode" : "history",
|
||||
"base" : ""
|
||||
"share": {
|
||||
"weixin": {
|
||||
"appid": "",
|
||||
"UniversalLinks": "https://mer.crmeb.net/"
|
||||
}
|
||||
},
|
||||
"domain" : "",
|
||||
"sdkConfigs" : {
|
||||
"maps" : {
|
||||
"qqmap" : {
|
||||
"key" : "SMJBZ-WCHK4-ZPZUA-DSIXI-XDDVQ-XWFX7"
|
||||
}
|
||||
}
|
||||
"geolocation": {
|
||||
"system": {
|
||||
"__platform__": ["ios", "android"]
|
||||
}
|
||||
},
|
||||
"title" : "加载中...",
|
||||
"template" : "template.h5.html"
|
||||
"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
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"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) {
|
||||
try {
|
||||
const res = await addCartApi({ bar_code: code })
|
||||
const res = await addCartApi({ bar_code: code, product_type: 98 })
|
||||
this.getCartList();
|
||||
this.getCartNum();
|
||||
Toast('添加成功')
|
||||
@ -336,6 +336,8 @@
|
||||
Toast(e)
|
||||
}
|
||||
},
|
||||
|
||||
/* 生成二维码 */
|
||||
pay() {
|
||||
let selectValue = []
|
||||
this.cartList.valid.forEach(el => {
|
||||
@ -345,12 +347,11 @@
|
||||
}
|
||||
})
|
||||
})
|
||||
const data = {
|
||||
cart_id: selectValue
|
||||
}
|
||||
const data = { cart_id: selectValue }
|
||||
this.popUpShow = true
|
||||
createtApi(data).then(res => {
|
||||
if (res.status === 200) {
|
||||
console.log("res", res.data);
|
||||
this.payCodeUrl = res.data.config;
|
||||
this.$refs.qrcode._makeCode()
|
||||
}
|
||||
|
@ -1,14 +1,12 @@
|
||||
<template>
|
||||
<view :style="viewColor">
|
||||
<view class="product-con">
|
||||
<!-- #ifdef H5 -->
|
||||
<view class="head-wrapper" :style="'top:'+statusBarHeight">
|
||||
<view class="head-menu">
|
||||
<view class='iconfont icon-xiangzuo' @click="returns"></view>
|
||||
<view class="iconfont icon-shouye4" @click="goHome"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- #endif -->
|
||||
<view v-if="storeInfo && storeInfo.merchant">
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y='true' scroll-with-animation="true"
|
||||
:style='"height:"+height+"px;"' @scroll="scroll">
|
||||
@ -312,7 +310,12 @@
|
||||
<view class='iconfont icon-shoucang' v-else></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">
|
||||
<view class='iconfont icon-gouwuche1'>
|
||||
<text v-if="CartCount>0" class='num'>{{CartCount || 0}}</text>
|
||||
@ -582,7 +585,6 @@
|
||||
])),
|
||||
},
|
||||
onLoad(options) {
|
||||
console.log('options', options);
|
||||
this.referer = options.referer
|
||||
if (options.product_type) {
|
||||
this.product_type = options.product_type
|
||||
@ -1331,7 +1333,7 @@
|
||||
cart_num: that.attr.productSelect.cart_num,
|
||||
product_attr_unique: that.attr.productSelect !== undefined ? that.attr.productSelect.unique : "",
|
||||
source: this.source,
|
||||
product_type: 0,
|
||||
product_type: this.product_type,
|
||||
spread_id: this.currSpid,
|
||||
referer: this.referer
|
||||
};
|
||||
|
@ -150,9 +150,9 @@
|
||||
if (this.tabsData.tabsActive == 1) {
|
||||
uni.navigateTo({
|
||||
//#ifdef APP
|
||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id
|
||||
url: '/pages/short_video/appSwiper/index?id=' + item.community_id,
|
||||
//#endif
|
||||
//#ifndef APP
|
||||
//#ifndef MP || H5
|
||||
url: '/pages/short_video/nvueSwiper/index?id=' + item.community_id
|
||||
//#endif
|
||||
})
|
||||
@ -184,9 +184,7 @@
|
||||
},
|
||||
/*获取分类列表*/
|
||||
async getCateList() {
|
||||
const {
|
||||
data
|
||||
} = await getTopicList()
|
||||
const { data } = await getTopicList()
|
||||
this.tabsData.list = [{
|
||||
cate_name: "推荐",
|
||||
category_id: 0
|
||||
@ -216,6 +214,7 @@
|
||||
const that = this
|
||||
uni.getLocation({
|
||||
type: 'gcj02',
|
||||
timeout: '10',
|
||||
success: (res) => {
|
||||
let latitude, longitude;
|
||||
latitude = res.latitude.toString();
|
||||
@ -232,9 +231,9 @@
|
||||
},
|
||||
fail: (err) => {
|
||||
uni.showToast({
|
||||
title: err.errMsg,
|
||||
title: "获取定位超时",
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -122,8 +122,15 @@
|
||||
name: this.searchGoodsName
|
||||
}
|
||||
const { data } = await seachBarCodeAPI(rq).catch(err => Toast(err))
|
||||
if (data.list.length == 0) {
|
||||
Toast("暂无搜索商品")
|
||||
if (data.list.length < 1) {
|
||||
this.searchGoodsShow = false
|
||||
Toast("暂无搜索商品,请添加!")
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/product/addGoods/index'
|
||||
})
|
||||
}, 2000)
|
||||
return
|
||||
}
|
||||
this.goods = data.list
|
||||
this.searchGoodsShow = false
|
||||
@ -159,22 +166,17 @@
|
||||
})
|
||||
},
|
||||
async seachBarCode(code) {
|
||||
try {
|
||||
const { data } = await microSeachBarCode({
|
||||
code: code
|
||||
})
|
||||
console.log('data', data.data);
|
||||
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) {
|
||||
const { data } = await seachBarCodeAPI({
|
||||
code: code,
|
||||
mer_id: this.mer_id
|
||||
})
|
||||
if (data.list.length < 1) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/product/addGoods/index?mer_id=${this.mer_id}&code=${code}`
|
||||
})
|
||||
return
|
||||
}
|
||||
this.goods = data.list
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
|
@ -1,143 +1,143 @@
|
||||
<template>
|
||||
<!-- #ifdef MP -->
|
||||
<view :style="viewColor" style="padding-top: 180rpx;">
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP || H5 -->
|
||||
<view :style="viewColor" style="padding-top: 80rpx;">
|
||||
<!-- #endif -->
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class="release_content">
|
||||
<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"
|
||||
:class="{on:tabActive == item.value}" @click="changeTab(item)">
|
||||
<text class="iconfont" :class="item.icon"></text>{{item.name}}
|
||||
<!-- #endif -->
|
||||
<!-- #ifdef APP || H5 -->
|
||||
<view :style="viewColor" style="padding-top: 80rpx;">
|
||||
<!-- #endif -->
|
||||
<form @submit="formSubmit" report-submit='true'>
|
||||
<view class="release_content">
|
||||
<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"
|
||||
:class="{on:tabActive == item.value}" @click="changeTab(item)">
|
||||
<text class="iconfont" :class="item.icon"></text>{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view class="release_item">
|
||||
<view class="photo_count">
|
||||
<view class="input_photo acea-row row-middle">
|
||||
<block v-if="tabActive == 2">
|
||||
<view class="pictrue" v-if="formData.video_link">
|
||||
<view v-if="videoplay">
|
||||
<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 class="release_item">
|
||||
<view class="photo_count">
|
||||
<view class="input_photo acea-row row-middle">
|
||||
<block v-if="tabActive == 2">
|
||||
<view class="pictrue" v-if="formData.video_link">
|
||||
<view v-if="videoplay">
|
||||
<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>
|
||||
<text class="video-text">点击可预览视频</text>
|
||||
|
||||
<view class="close_btn" @click="formData.video_link = ''"><text
|
||||
class="iconfont icon-guanbi4"></text></view>
|
||||
</view>
|
||||
<text class="video-text">点击可预览视频</text>
|
||||
|
||||
<view class="close_btn" @click="formData.video_link = ''"><text
|
||||
class="iconfont icon-guanbi4"></text></view>
|
||||
<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="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 v-else class="pictrue acea-row row-center-wrapper row-column add" @click="uploadVideo">
|
||||
<view><text class='iconfont icon-tianjiashipin'></text></view>
|
||||
<view class="text">添加视频</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" :compress="true">
|
||||
<!-- 你想插入的内容 -->
|
||||
<button class="crop_btn" @click="crop">裁切</button>
|
||||
</bt-cropper>
|
||||
</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 class="textarea">
|
||||
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder'
|
||||
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 class="textarea">
|
||||
<textarea placeholder='分享使用体验和心得,获得更多点赞和关注哦~(600字以内)' name="comment" placeholder-class='placeholder'
|
||||
v-model="formData.content" maxlength="600"></textarea>
|
||||
</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 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 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>
|
||||
<button class="release_btn button" form-type="submit">发布</button>
|
||||
</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>
|
||||
</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-->
|
||||
<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>
|
||||
|
||||
<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 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>
|
||||
<!-- <m-tabbar native>
|
||||
<template v-slot:tabbar_index_2>
|
||||
<view class="custom_style">
|
||||
<view class="custom_style_icon"></view>
|
||||
</view>
|
||||
</template>
|
||||
</m-tabbar> -->
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
@ -108,7 +108,7 @@
|
||||
store_id: '',
|
||||
locationArr: ({}),
|
||||
setrecommend_address: "",
|
||||
mer_id: 0
|
||||
isYunCang: 0
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
@ -147,7 +147,7 @@
|
||||
},
|
||||
getCloudShopMerId(id) {
|
||||
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() {
|
||||
@ -161,9 +161,9 @@
|
||||
})
|
||||
},
|
||||
go_shop() {
|
||||
// if (this.mer_id == 0) {
|
||||
// return Toast('当前区域没有云仓库')
|
||||
// }
|
||||
if (this.isYunCang == 0) {
|
||||
return Toast('当前区域没有云仓库')
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}`
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user