lu_quan_dev
han 10 months ago
parent 3ce0271116
commit 92ca967d82
  1. 2
      pages/index/index.vue
  2. BIN
      static/test/ai-bg.png
  3. BIN
      static/test/ai-friend.png
  4. BIN
      static/test/ai-self.png
  5. BIN
      static/test/flower-bg.png
  6. BIN
      static/test/icon-back.png
  7. BIN
      static/test/icon-shop.png
  8. BIN
      static/test/icon-text.png
  9. BIN
      static/test/icon-translate-down.png
  10. BIN
      static/test/icon-translate.png
  11. BIN
      static/test/icon-voice.png
  12. BIN
      static/test/weather_cloudy.png
  13. BIN
      static/test/weather_rainy.png
  14. BIN
      static/test/weather_smog.png
  15. BIN
      static/test/weather_snowy.png
  16. BIN
      static/test/weather_sunny.png
  17. 18
      subPageA/shop/shopDetail/shopDetail.vue
  18. 66
      subPageB/jiqiren/jiqiren/zhinengjiqiren.vue
  19. 18
      subPageC/Ai/index.vue
  20. 4
      subPageC/flower/index.vue
  21. 12
      subPageC/translate/index.vue
  22. 12
      subPageC/weather/index.vue

@ -769,8 +769,6 @@
url: "/subPageA/search/search", url: "/subPageA/search/search",
}); });
}, },
}, },
}; };
</script> </script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

@ -31,8 +31,8 @@
<u-parse :content="info.description" /> <u-parse :content="info.description" />
</view> </view>
</view> </view>
<view class="v-order-submit"> <view class="v-order-submit">
<view class="btn m-t-24 text-center" @click="orderSubmit">立即购买</view> <view class="btn m-t-24 text-center" @click="orderSubmit">立即购买</view>
</view> </view>
</view> </view>
@ -76,7 +76,7 @@
}, },
orderSubmit:function(){ orderSubmit:function(){
/* this.judgeLogin((resa) => { /* this.judgeLogin((resa) => {
var data = { var data = {
openid: this.userInfo.openid, openid: this.userInfo.openid,
shopId: this.info.id, shopId: this.info.id,
@ -85,14 +85,14 @@
merchantId:this.info.merchantId, merchantId:this.info.merchantId,
merchantName:this.info.merchantName merchantName:this.info.merchantName
}; };
const parame = { const parame = {
...val, ...val,
...data ...data
} }
const shop = encodeURIComponent(JSON.stringify(parame)); const shop = encodeURIComponent(JSON.stringify(parame));
uni.navigateTo({ uni.navigateTo({
url: "/subPageC/bookShop/bookShop?shop=" + shop url: "/subPageC/bookShop/bookShop?shop=" + shop
}); });
@ -174,10 +174,10 @@
width: 38rpx; width: 38rpx;
height: 38rpx; height: 38rpx;
background: url('@/static/test/icon-shop.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-shop.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 38rpx; background-size: 38rpx;
} }
} }
</style> </style>

@ -122,6 +122,7 @@
inputValue: "", inputValue: "",
luyinstart: true, luyinstart: true,
voicePath: "", voicePath: "",
_recordAuth:null,
messageType: 'voice', // text voice messageType: 'voice', // text voice
recordStart: false, recordStart: false,
draw: undefined, draw: undefined,
@ -295,6 +296,7 @@
}, },
// //
authTips() { authTips() {
const $this=this
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
content: '您拒绝了麦克风权限,将导致功能不能正常使用,去设置权限?', content: '您拒绝了麦克风权限,将导致功能不能正常使用,去设置权限?',
@ -306,7 +308,7 @@
success: (res) => { success: (res) => {
if (res.authSetting['scope.record']) { if (res.authSetting['scope.record']) {
console.log("已授权麦克风"); console.log("已授权麦克风");
this._recordAuth = true $this._recordAuth = true
} else { } else {
// //
wx.showModal({ wx.showModal({
@ -326,24 +328,29 @@
touchstart() { touchstart() {
this.threebut = false; this.threebut = false;
this.textbut = true; this.textbut = true;
const $this=this
// //
const _permission = 'scope.record' const _permission = 'scope.record'
uni.getSetting({ uni.getSetting({
success: (res) => { success: (res) => {
console.log('res.authSetting',res,res.authSetting)
// //
if (res.authSetting.hasOwnProperty(_permission)) { console.log('判断是否有相关权限属性',res.authSetting.hasOwnProperty('scope.record'))
// false if (res.authSetting.hasOwnProperty('scope.record')) {
// false
console.log('属性存在,且为false,用户拒绝过权限',res.authSetting[_permission])
if (!res.authSetting[_permission]) { if (!res.authSetting[_permission]) {
this.authTips() $this.authTips()
} else { } else {
// //
this._recordAuth = true $this._recordAuth = true
// //
recorderManager.start({ recorderManager.start({
format: 'pcm', format: 'pcm',
}) })
recorderManager.onStart(() => { recorderManager.onStart(() => {
this.recordStart = true $this.recordStart = true
}) })
// //
@ -353,18 +360,21 @@
icon: 'none', icon: 'none',
title: '系统出错,请重试' title: '系统出错,请重试'
}) })
this.recordStart = false $this.recordStart = false
}) })
} }
} else { } else {
// //
console.log('属性不存在,需要授权')
uni.authorize({ uni.authorize({
scope: _permission, scope: 'scope.record',
success: () => { success: () => {
// //
this._recordAuth = true $this._recordAuth = true
console.log('授权成功')
}, },
fail: (res) => { fail: (res) => {
console.log('// 未授权隐私协议',res.errno)
/** /**
* 104 未授权隐私协议 * 104 未授权隐私协议
* 用户可能拒绝官方隐私授权弹窗为了避免过度弹窗打扰用户开发者再次调用隐私相关接口时 * 用户可能拒绝官方隐私授权弹窗为了避免过度弹窗打扰用户开发者再次调用隐私相关接口时
@ -380,7 +390,8 @@
}) })
} else { } else {
// //
this.authTips() console.log('// 用户拒绝授权')
$this.authTips()
} }
} }
}) })
@ -399,7 +410,7 @@
duration, duration,
tempFilePath tempFilePath
} = res } = res
this.recordStart = false $this.recordStart = false
wx.uploadFile({ wx.uploadFile({
url: $this.rootPath + '/app-api/wechatshop/toolIdentify/identifySpeech', url: $this.rootPath + '/app-api/wechatshop/toolIdentify/identifySpeech',
@ -410,19 +421,28 @@
}, },
success: function(res) { success: function(res) {
let data = JSON.parse(res.data) let data = JSON.parse(res.data)
if(data.data){
$this.messages.push({
type: "user",
typestyle: "dly_flex_c2 right_dig m-item me",
time: $this.$util.getCurrentTime3(),
headurl: "",
content: [{
text: data.data
}],
contentstyle: "jqr_box"
})
$this.getSelectMsg(data.data, "", 1);
$this.scrollToBottom();
}else{
wx.showModal({
title: '提示',
content: "没听清,请您再说一遍",
showCancel: false,
success: function(res) {}
});
}
$this.messages.push({
type: "user",
typestyle: "dly_flex_c2 right_dig m-item me",
time: $this.$util.getCurrentTime3(),
headurl: "",
content: [{
text: data.data
}],
contentstyle: "jqr_box"
})
$this.getSelectMsg(data.data, "", 1);
$this.scrollToBottom();
}, },
fail: function(res) { fail: function(res) {
UTIL.log(res); UTIL.log(res);

@ -6,7 +6,7 @@
<view class="list_item" :class="item.userType" v-for="(item,index) in list" :key="index"> <view class="list_item" :class="item.userType" v-for="(item,index) in list" :key="index">
<view v-if="item.userType=='self'"> <view v-if="item.userType=='self'">
<view class="text-name row flex-align-center"> <view class="text-name row flex-align-center">
<image class="img" mode="widthFix" src="@/static/test/ai-self.png"></image> <image class="img" mode="widthFix" src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/ai-self.png"></image>
<text>E鹿小助手</text> <text>E鹿小助手</text>
</view> </view>
<view class="text-box">{{item.content}}</view> <view class="text-box">{{item.content}}</view>
@ -15,7 +15,7 @@
v-if="item.userType=='friend'"> v-if="item.userType=='friend'">
<view class="text-box">{{item.content}}</view> <view class="text-box">{{item.content}}</view>
<view class="text-name row flex-align-center"> <view class="text-name row flex-align-center">
<image class="img" mode="widthFix" src="@/static/test/ai-friend.png"></image> <image class="img" mode="widthFix" src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/ai-friend.png"></image>
</view> </view>
</view> </view>
</view> </view>
@ -24,13 +24,13 @@
<!-- 语音/文字发送 --> <!-- 语音/文字发送 -->
<view class="tool flex-align-center"> <view class="tool flex-align-center">
<block v-if="messageType === 'text'"> <block v-if="messageType === 'text'">
<image src="@/static/test/icon-voice.png" mode="widthFix" class="left-icon" <image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-voice.png" mode="widthFix" class="left-icon"
@click="messageType='voice'"> @click="messageType='voice'">
</image> </image>
<input type="text" v-model="content" class="input" @confirm="sendMsg" /> <input type="text" v-model="content" class="input" @confirm="sendMsg" />
</block> </block>
<block v-if="messageType === 'voice'"> <block v-if="messageType === 'voice'">
<image src="@/static/test/icon-text.png" mode="widthFix" class="left-icon" @click="messageType='text'"> <image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-text.png" mode="widthFix" class="left-icon" @click="messageType='text'">
</image> </image>
<text class="voice-crl" @touchstart="touchstart" <text class="voice-crl" @touchstart="touchstart"
@touchend="touchend">{{ recordStart ? '松开 发送' : '按住 说话' }}</text> @touchend="touchend">{{ recordStart ? '松开 发送' : '按住 说话' }}</text>
@ -75,13 +75,13 @@
clientTimer: null, // clientTimer: null, //
clientTime: 10000, // clientTime: 10000, //
serverTimer: null, // serverTimer: null, //
serverTime: 30000, // serverTime: 30000, //
} }
} }
}, },
onShow() { onShow() {
const userInfo = uni.getStorageSync("userInfo"); const userInfo = uni.getStorageSync("userInfo");
this.userInfo = { this.userInfo = {
"message": "", "message": "",
"dialogId": "", "dialogId": "",
@ -381,7 +381,7 @@
} }
.v-pages.Ai { .v-pages.Ai {
// background: url('@/static/test/ai-bg.png'); // background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/ai-bg.png');
// background-repeat: no-repeat; // background-repeat: no-repeat;
// background-position: top; // background-position: top;
// background-size: cover; // background-size: cover;
@ -533,4 +533,4 @@
} }
} }
} }
</style> </style>

@ -18,7 +18,7 @@
style="position: fixed; bottom: 0;left: 0; width: 100%;background-color: #fff;"> style="position: fixed; bottom: 0;left: 0; width: 100%;background-color: #fff;">
<view class="search-title" v-if="search_result.length>0">{{search_result[0].name}}</view> <view class="search-title" v-if="search_result.length>0">{{search_result[0].name}}</view>
<view class="search-image"> <view class="search-image">
<image :src="imageSrc" class="img" mode="widthFix"></image> <image :src="imageSrc" class="img" mode="aspectFit"></image>
</view> </view>
<view class="search-other-title row flex-align-center"> <view class="search-other-title row flex-align-center">
<image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-flower.png" class="img" <image src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-flower.png" class="img"
@ -222,7 +222,7 @@
position: relative; position: relative;
z-index: 9; z-index: 9;
box-sizing: border-box; box-sizing: border-box;
padding: 24rpx; padding: 24rpx 24rpx 40rpx 24rpx;
.search-title { .search-title {
font-size: 36rpx; font-size: 36rpx;

@ -6,15 +6,15 @@
<view class="col row select-item flex-align-center left" @click="fromShow = true" <view class="col row select-item flex-align-center left" @click="fromShow = true"
:class="exchange?'right-to-left':'left-to-right'"> :class="exchange?'right-to-left':'left-to-right'">
<text class="col">{{ActiveFrom.label}}</text> <text class="col">{{ActiveFrom.label}}</text>
<image class="img" mode="widthFix" src="@/static/test/icon-translate-down.png"></image> <image class="img" mode="widthFix" src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-translate-down.png"></image>
</view> </view>
<view class="exchange" @click="exchange=!exchange"> <view class="exchange" @click="exchange=!exchange">
<image class="img" mode="widthFix" src="@/static/test/icon-translate.png"></image> <image class="img" mode="widthFix" src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-translate.png"></image>
</view> </view>
<view class="col row select-item flex-align-center right" @click="toShow = true" <view class="col row select-item flex-align-center right" @click="toShow = true"
:class="exchange?'left-to-right':'right-to-left'"> :class="exchange?'left-to-right':'right-to-left'">
<text class="col">{{ActiveTo.label}}</text> <text class="col">{{ActiveTo.label}}</text>
<image class="img" mode="widthFix" src="@/static/test/icon-translate-down.png"></image> <image class="img" mode="widthFix" src="https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/icon-translate-down.png"></image>
</view> </view>
</view> </view>
<view class="p-l-24 p-r-24"> <view class="p-l-24 p-r-24">
@ -233,9 +233,9 @@
from: this.ActiveTo.value, from: this.ActiveTo.value,
to: this.ActiveFrom.value, to: this.ActiveFrom.value,
} }
} }
this.$Request.get(this.$config.getTtranslate, queryParams, "", "", false, true) this.$Request.get(this.$config.getTtranslate, queryParams, "", "", false, true)
.then(res => { .then(res => {
if (res.data !== null) { if (res.data !== null) {
this.resultText = res.data this.resultText = res.data
} else { } else {
@ -380,4 +380,4 @@
.v-translate-box { .v-translate-box {
margin-top: 40rpx; margin-top: 40rpx;
} }
</style> </style>

@ -203,31 +203,31 @@
height: 100vh; height: 100vh;
&.sunny { &.sunny {
background: url('@/static/test/weather_sunny.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/weather_sunny.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
&.cloudy { &.cloudy {
background: url('@/static/test/weather_cloudy.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/weather_cloudy.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
&.rainy { &.rainy {
background: url('@/static/test/weather_rainy.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/weather_rainy.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
&.smog { &.smog {
background: url('@/static/test/weather_smog.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/weather_smog.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
&.snowy { &.snowy {
background: url('@/static/test/weather_snowy.png'); background: url('https://eluyou.ailuquan.cn/upload/image/2024/mapIcon/daolan/weather_snowy.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: contain; background-size: contain;
} }
@ -372,4 +372,4 @@
} }
} }
} }
</style> </style>

Loading…
Cancel
Save